diff --git a/assets/AiDeadlinesView-IO9EVzyU.js b/assets/AiDeadlinesView-DSFbzhXI.js similarity index 96% rename from assets/AiDeadlinesView-IO9EVzyU.js rename to assets/AiDeadlinesView-DSFbzhXI.js index 5551d7ee21fe3d50f4ff774effa0bb1222654ac9..1238514de49f76c8a24eba4a8c2bbd90905d0db1 100644 --- a/assets/AiDeadlinesView-IO9EVzyU.js +++ b/assets/AiDeadlinesView-DSFbzhXI.js @@ -1,3 +1,3 @@ -import{r as x,j as t}from"./index-CnBotBa4.js";import{u as A}from"./useQuery-C8pfCInN.js";import{c as B}from"./catalog-mND3MerS.js";import{S as U}from"./switch-D71Zro87.js";import{S as W}from"./skeleton-DuOQBmSr.js";import{A as O,a as V}from"./alert-B0qZtPeK.js";import{s as z}from"./safeExternalHref-CkBrsh84.js";import{D as P,a as G,b as Y,c as H,d as K}from"./dialog-mXYRHqz9.js";import"./index-C2-TgiAT.js";const b=1e3*60*60*24,S={urgent:"#c0392b",soon:"#b9770e",normal:"#3f7d3f",passed:"var(--ink-faint)"},k=e=>e.split("-").map(a=>a.charAt(0).toUpperCase()+a.slice(1)).join(" "),q=new Set(["machine-learning","computer-vision","natural-language-processing","data-mining","robotics","computer-graphics","human-computer-interaction","web-search","signal-processing","representation-learning","reinforcement-learning","optimization-methods","large-language-models","information-retrieval","speech","mathematics"]),Q=e=>e.trim().toLowerCase().replace(/\s+/g,"-"),D=e=>Array.from(new Set((e.tags??[]).map(Q).filter(a=>q.has(a)))),F=e=>new Date(e).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}),I=(e,a)=>{if(!e)return null;const n=new Date(`${e}T00:00:00`),r=a?new Date(`${a}T00:00:00`):null,o=s=>s.toLocaleDateString("en-US",{month:"long",day:"numeric"}),i=n.getFullYear();return r&&r.getTime()!==n.getTime()?n.getMonth()===r.getMonth()?`${o(n).replace(/\d+$/,"").trim()} ${n.getDate()}–${r.getDate()}, ${i}`:`${o(n)} – ${o(r)}, ${i}`:`${o(n)}, ${i}`},M=e=>[...e.deadlines??[]].sort((a,n)=>new Date(a.deadline_at).getTime()-new Date(n.deadline_at).getTime()),T=(e,a)=>M(e).find(n=>new Date(n.deadline_at).getTime()>a)??null,L=e=>{const a=M(e);return a.length?a[a.length-1]:null},J=(e,a)=>{const n=e-a;if(n<=0)return"Deadline passed";const r=Math.floor(n/b);if(r>=1){const s=Math.floor((n-r*b)/36e5);return`in ${r}d ${s}h`}const o=Math.floor(n/(1e3*60*60));return o>=1?`in ${o}h`:`in ${Math.max(1,Math.floor(n/(1e3*60)))}m`},X=(e,a)=>{const n=e-a;if(n<=0)return"Deadline passed";const r=Math.floor(n/b),o=Math.floor(n%b/(1e3*60*60)),i=Math.floor(n%(1e3*60*60)/(1e3*60)),s=Math.floor(n%(1e3*60)/1e3);return`${r}d ${o}h ${i}m ${s}s`},_=(e,a)=>{if(e==null)return S.passed;const n=(e-a)/b;return n<=0?S.passed:n<=7?S.urgent:n<=30?S.soon:S.normal},$={fontFamily:"var(--mono)",fontSize:10,letterSpacing:"0.12em",textTransform:"uppercase",color:"var(--ink-faint)"},Z=(e,a)=>{const n=Math.ceil((e-a)/b);return n<=0?"passed":`${n} ${n===1?"day":"days"}`},R=(e,a)=>{const n=I(e.start_date,e.end_date),r=e.venue||[e.city,e.country].filter(Boolean).join(", ");return[`${a.label||a.type||"Deadline"} for ${e.name}`,n?`Dates: ${n}`:null,r?`Location: ${r}`:null,e.url?`Website: ${e.url}`:null].filter(Boolean).join(` +import{r as x,j as t}from"./index-hxawG6mk.js";import{u as A}from"./useQuery-B7vCF2Os.js";import{c as B}from"./catalog-ePebz7GX.js";import{S as U}from"./switch-BC-W3U4C.js";import{S as W}from"./skeleton-CRfsRMNe.js";import{A as O,a as V}from"./alert-2LCyXuCE.js";import{s as z}from"./safeExternalHref-CkBrsh84.js";import{D as P,a as G,b as Y,c as H,d as K}from"./dialog-D2TDqr0v.js";import"./index-DvHdqmQp.js";const b=1e3*60*60*24,S={urgent:"#c0392b",soon:"#b9770e",normal:"#3f7d3f",passed:"var(--ink-faint)"},k=e=>e.split("-").map(a=>a.charAt(0).toUpperCase()+a.slice(1)).join(" "),q=new Set(["machine-learning","computer-vision","natural-language-processing","data-mining","robotics","computer-graphics","human-computer-interaction","web-search","signal-processing","representation-learning","reinforcement-learning","optimization-methods","large-language-models","information-retrieval","speech","mathematics"]),Q=e=>e.trim().toLowerCase().replace(/\s+/g,"-"),D=e=>Array.from(new Set((e.tags??[]).map(Q).filter(a=>q.has(a)))),F=e=>new Date(e).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}),I=(e,a)=>{if(!e)return null;const n=new Date(`${e}T00:00:00`),r=a?new Date(`${a}T00:00:00`):null,o=s=>s.toLocaleDateString("en-US",{month:"long",day:"numeric"}),i=n.getFullYear();return r&&r.getTime()!==n.getTime()?n.getMonth()===r.getMonth()?`${o(n).replace(/\d+$/,"").trim()} ${n.getDate()}–${r.getDate()}, ${i}`:`${o(n)} – ${o(r)}, ${i}`:`${o(n)}, ${i}`},M=e=>[...e.deadlines??[]].sort((a,n)=>new Date(a.deadline_at).getTime()-new Date(n.deadline_at).getTime()),T=(e,a)=>M(e).find(n=>new Date(n.deadline_at).getTime()>a)??null,L=e=>{const a=M(e);return a.length?a[a.length-1]:null},J=(e,a)=>{const n=e-a;if(n<=0)return"Deadline passed";const r=Math.floor(n/b);if(r>=1){const s=Math.floor((n-r*b)/36e5);return`in ${r}d ${s}h`}const o=Math.floor(n/(1e3*60*60));return o>=1?`in ${o}h`:`in ${Math.max(1,Math.floor(n/(1e3*60)))}m`},X=(e,a)=>{const n=e-a;if(n<=0)return"Deadline passed";const r=Math.floor(n/b),o=Math.floor(n%b/(1e3*60*60)),i=Math.floor(n%(1e3*60*60)/(1e3*60)),s=Math.floor(n%(1e3*60)/1e3);return`${r}d ${o}h ${i}m ${s}s`},_=(e,a)=>{if(e==null)return S.passed;const n=(e-a)/b;return n<=0?S.passed:n<=7?S.urgent:n<=30?S.soon:S.normal},$={fontFamily:"var(--mono)",fontSize:10,letterSpacing:"0.12em",textTransform:"uppercase",color:"var(--ink-faint)"},Z=(e,a)=>{const n=Math.ceil((e-a)/b);return n<=0?"passed":`${n} ${n===1?"day":"days"}`},R=(e,a)=>{const n=I(e.start_date,e.end_date),r=e.venue||[e.city,e.country].filter(Boolean).join(", ");return[`${a.label||a.type||"Deadline"} for ${e.name}`,n?`Dates: ${n}`:null,r?`Location: ${r}`:null,e.url?`Website: ${e.url}`:null].filter(Boolean).join(` `)},C=e=>e.toISOString().replace(/[-:]/g,"").replace(/\.\d{3}/,""),ee=(e,a)=>{const n=new Date(a.deadline_at),r=new Date(n.getTime()+60*60*1e3),o=`${e.short_name||e.name} ${a.label||a.type||"deadline"}`,i=e.venue||[e.city,e.country].filter(Boolean).join(", "),s=`https://calendar.google.com/calendar/render?action=TEMPLATE&text=${encodeURIComponent(o)}&dates=${C(n)}/${C(r)}&details=${encodeURIComponent(R(e,a))}&location=${encodeURIComponent(i)}`,m=z(s);m&&window.open(m,"_blank","noopener,noreferrer")},te=(e,a)=>{const n=new Date(a.deadline_at),r=new Date(n.getTime()+60*60*1e3),o=`${e.short_name||e.name} ${a.label||a.type||"deadline"}`,i=e.venue||[e.city,e.country].filter(Boolean).join(", "),s=["BEGIN:VCALENDAR","VERSION:2.0","BEGIN:VEVENT",e.url?`URL:${e.url}`:null,`DTSTART:${C(n)}`,`DTEND:${C(r)}`,`SUMMARY:${o}`,`DESCRIPTION:${R(e,a).replace(/\n/g,"\\n")}`,i?`LOCATION:${i}`:null,"END:VEVENT","END:VCALENDAR"].filter(Boolean).join(` `),m=new Blob([s],{type:"text/calendar;charset=utf-8"}),c=document.createElement("a");c.href=URL.createObjectURL(m),c.download=`${(e.short_name||e.name).toLowerCase().replace(/\s+/g,"-")}-deadline.ics`,document.body.appendChild(c),c.click(),document.body.removeChild(c),URL.revokeObjectURL(c.href)},ne=({conf:e,open:a,onOpenChange:n})=>{const[r,o]=x.useState(()=>Date.now());x.useEffect(()=>{if(!a)return;o(Date.now());const d=setInterval(()=>o(Date.now()),1e3);return()=>clearInterval(d)},[a]);const i=x.useMemo(()=>e?M(e):[],[e]),s=x.useMemo(()=>e?T(e,r):null,[e,r]),m=e?I(e.start_date,e.end_date):null,c=e?e.venue||[e.city,e.country].filter(Boolean).join(", ")||e.location:null,u=s?new Date(s.deadline_at).getTime():null;return t.jsx(P,{open:a,onOpenChange:n,children:t.jsx(G,{className:"max-w-xl",style:{background:"var(--bg-elevated)",maxHeight:"85vh",overflowY:"auto"},children:e&&t.jsxs(t.Fragment,{children:[t.jsxs(Y,{children:[t.jsx(H,{asChild:!0,children:t.jsx("h2",{style:{fontFamily:"var(--serif)",fontSize:26,fontWeight:500,letterSpacing:"-0.01em",margin:0},children:e.short_name?`${e.short_name} ${e.year??""}`.trim():e.name})}),e.short_name&&e.name||e.description?t.jsx(K,{asChild:!0,children:t.jsx("span",{style:{fontFamily:"var(--serif)",fontSize:14,color:"var(--ink-soft)"},children:e.short_name?e.name:e.description})}):null]}),t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:20,marginTop:4},children:[t.jsxs("div",{style:{display:"flex",flexWrap:"wrap",gap:24},children:[m&&t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:4},children:[t.jsx("span",{style:$,children:"Dates"}),t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:13,color:"var(--ink-soft)"},children:m})]}),c&&t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:4},children:[t.jsx("span",{style:$,children:"Venue"}),t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:13,color:"var(--ink-soft)"},children:c})]})]}),u!=null&&t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:4,padding:"12px 14px",borderRadius:8,background:"var(--bg-subtle)",border:"1px solid var(--hairline)"},children:[t.jsx("span",{style:$,children:"Next deadline in"}),t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:22,fontWeight:600,color:_(u,r)},children:X(u,r)})]}),t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:8},children:[t.jsx("span",{style:$,children:"Important deadlines"}),i.length===0?t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:13,color:"var(--ink-faint)"},children:"No deadlines listed"}):i.map((d,p)=>{const y=new Date(d.deadline_at).getTime(),l=s!=null&&d.deadline_at===s.deadline_at&&d.type===s.type,h=y<=r;return t.jsxs("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:12,padding:"8px 12px",borderRadius:6,background:l?"var(--accent-soft)":"transparent",border:l?"1px solid var(--hairline-strong)":"1px solid var(--hairline)",opacity:h&&!l?.55:1},children:[t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:2},children:[t.jsxs("span",{style:{fontFamily:"var(--mono)",fontSize:13,color:"var(--ink)",fontWeight:l?600:400},children:[d.label||k(d.type||"deadline"),l&&t.jsx("span",{style:{...$,marginLeft:8},children:"Next"})]}),t.jsxs("span",{style:{fontFamily:"var(--mono)",fontSize:12,color:"var(--ink-faint)"},children:[F(d.deadline_at),d.timezone?` · ${d.timezone}`:""]})]}),t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:12,fontWeight:600,whiteSpace:"nowrap",color:_(h?null:y,r)},children:Z(y,r)})]},`${d.type??"deadline"}-${p}`)})]}),D(e).length>0&&t.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:6},children:D(e).map(d=>t.jsx("span",{className:"tag-chip",style:{background:"var(--bg-subtle)",color:"var(--ink-soft)"},children:k(d)},d))}),t.jsxs("div",{style:{display:"flex",flexWrap:"wrap",alignItems:"center",gap:16,paddingTop:12,borderTop:"1px solid var(--hairline)"},children:[e.url&&t.jsx("a",{href:z(e.url)??void 0,target:"_blank",rel:"noopener noreferrer",style:{fontFamily:"var(--mono)",fontSize:12,color:"var(--accent-text)"},children:"Visit website ↗"}),s&&t.jsxs("div",{style:{display:"flex",gap:12,marginLeft:"auto"},children:[t.jsx("button",{type:"button",className:"tag-chip",onClick:()=>ee(e,s),style:{background:"var(--bg-subtle)",color:"var(--ink-soft)"},children:"+ Google Calendar"}),t.jsx("button",{type:"button",className:"tag-chip",onClick:()=>te(e,s),style:{background:"var(--bg-subtle)",color:"var(--ink-soft)"},children:"+ Apple / .ics"})]})]})]})]})})})},E=({id:e,label:a,checked:n,onChange:r})=>t.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,fontFamily:"var(--mono)",fontSize:12,color:"var(--ink-soft)"},children:[t.jsx(U,{id:e,checked:n,onCheckedChange:r}),t.jsx("label",{htmlFor:e,style:{cursor:"pointer"},children:a})]}),ae=({conf:e,now:a,selectedDomains:n,onToggleDomain:r,onOpen:o})=>{const i=T(e,a),s=i??L(e),m=s?new Date(s.deadline_at).getTime():null,c=_(i?m:null,a),u=I(e.start_date,e.end_date),d=[e.city??null,e.country??null].filter(Boolean).join(", ");return t.jsxs("div",{role:"button",tabIndex:0,onClick:()=>o(e),onKeyDown:p=>{(p.key==="Enter"||p.key===" ")&&(p.preventDefault(),o(e))},style:{border:"1px solid var(--hairline)",borderRadius:8,padding:20,background:"var(--bg-elevated)",display:"flex",flexDirection:"column",gap:12,cursor:"pointer"},children:[t.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"baseline",gap:12},children:[t.jsx("h3",{style:{fontFamily:"var(--serif)",fontSize:20,fontWeight:500,letterSpacing:"-0.01em",margin:0},children:e.short_name?`${e.short_name} ${e.year??""}`.trim():e.name}),e.url&&t.jsx("a",{href:z(e.url)??void 0,target:"_blank",rel:"noopener noreferrer",onClick:p=>p.stopPropagation(),style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--accent-text)",whiteSpace:"nowrap"},children:"website ↗"})]}),t.jsxs("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:12,paddingBottom:12,borderBottom:"1px solid var(--hairline)"},children:[t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:2},children:[t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)"},children:(s==null?void 0:s.label)||(s==null?void 0:s.type)||"Deadline"}),t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:12,color:"var(--ink-soft)"},children:s?`${F(s.deadline_at)}${s.timezone?` · ${s.timezone}`:""}`:"TBD"})]}),t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:14,fontWeight:600,color:c,whiteSpace:"nowrap"},children:m!=null?J(m,a):"TBD"})]}),t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:4,fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)"},children:[u&&t.jsx("span",{children:u}),d&&t.jsx("span",{children:d})]}),D(e).length>0&&t.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:6},children:D(e).map(p=>{const y=n.has(p);return t.jsx("button",{className:"tag-chip",onClick:l=>{l.stopPropagation(),r(p)},style:{background:y?"var(--ink)":"var(--bg-subtle)",color:y?"var(--bg)":"var(--ink-soft)"},children:k(p)},p)})})]})},ue=()=>{const[e,a]=x.useState(!0),[n,r]=x.useState(!1),[o,i]=x.useState(new Set),[s,m]=x.useState(null),c=x.useMemo(()=>Date.now(),[]),u=A({queryKey:["conference-deadlines"],queryFn:()=>B.conferenceDeadlines(),staleTime:10*60*1e3}),d=l=>{i(h=>{const g=new Set(h);return g.has(l)?g.delete(l):g.add(l),g})},p=x.useMemo(()=>{var h;const l=new Map;return(h=u.data)==null||h.results.forEach(g=>{D(g).forEach(j=>l.set(j,(l.get(j)??0)+1))}),Array.from(l.entries()).sort((g,j)=>j[1]-g[1]).map(([g])=>g)},[u.data]),y=x.useMemo(()=>{var j;const h=(((j=u.data)==null?void 0:j.results)??[]).filter(f=>!(e&&f.tier!=="a"||o.size>0&&!D(f).some(v=>o.has(v))||!n&&!T(f,c))),g=f=>{const w=T(f,c);if(w)return{group:0,time:new Date(w.deadline_at).getTime()};const v=L(f);return{group:1,time:-(v?new Date(v.deadline_at).getTime():0)}};return[...h].sort((f,w)=>{const v=g(f),N=g(w);return v.group!==N.group?v.group-N.group:v.time-N.time})},[u.data,e,n,o,c]);return u.error?t.jsx("div",{className:"page",children:t.jsx(O,{variant:"destructive",children:t.jsx(V,{children:"Failed to load conference deadlines. Please try again."})})}):t.jsxs("div",{className:"page",children:[t.jsx("div",{className:"feed-header",children:t.jsxs("div",{children:[t.jsxs("h1",{className:"feed-title",children:["AI Conference ",t.jsx("em",{children:"Deadlines"})]}),t.jsx("div",{className:"feed-subtitle",children:"Upcoming submission deadlines for major AI conferences, counting down."})]})}),t.jsxs("div",{style:{display:"flex",flexWrap:"wrap",alignItems:"center",gap:20,padding:"16px 0",borderBottom:"1px solid var(--hairline)",marginBottom:24},children:[t.jsx(E,{id:"top-tier-only",label:"Top tier only",checked:e,onChange:a}),t.jsx(E,{id:"show-past",label:"Show past conferences",checked:n,onChange:r})]}),p.length>0&&t.jsxs("div",{style:{display:"flex",flexWrap:"wrap",gap:6,marginBottom:24},children:[p.map(l=>{const h=o.has(l);return t.jsx("button",{className:"tag-chip",onClick:()=>d(l),style:{background:h?"var(--ink)":"var(--bg-subtle)",color:h?"var(--bg)":"var(--ink-soft)"},children:k(l)},l)}),o.size>0&&t.jsx("button",{className:"tag-chip",onClick:()=>i(new Set),style:{background:"transparent",color:"var(--ink-faint)"},children:"Clear ✕"})]}),t.jsx("div",{className:"sort-bar",children:t.jsx("div",{className:"results-count",children:u.isLoading?"…":`${y.length} conferences`})}),u.isLoading?t.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(320px, 1fr))",gap:16},children:Array.from({length:6}).map((l,h)=>t.jsx(W,{className:"h-44"},h))}):y.length===0?t.jsxs("div",{className:"no-results",children:["No conferences match these filters",n?".":" — try enabling “Show past conferences”."]}):t.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(320px, 1fr))",gap:16},children:y.map(l=>t.jsx(ae,{conf:l,now:c,selectedDomains:o,onToggleDomain:d,onOpen:m},l.id))}),t.jsx(ne,{conf:s,open:s!==null,onOpenChange:l=>{l||m(null)}})]})};export{ue as default}; diff --git a/assets/ApiDocsView-B7dp0r07.js b/assets/ApiDocsView-CyWlcUYZ.js similarity index 98% rename from assets/ApiDocsView-B7dp0r07.js rename to assets/ApiDocsView-CyWlcUYZ.js index a4bce5320686c0a0d1aea1b75522b9689934ae39..a5c96191029f945c3927311d213f79d336607500 100644 --- a/assets/ApiDocsView-B7dp0r07.js +++ b/assets/ApiDocsView-CyWlcUYZ.js @@ -1,4 +1,4 @@ -import{a4 as m,r as o,j as e}from"./index-CnBotBa4.js";import{u as f}from"./useQuery-C8pfCInN.js";import{M as g}from"./index-DxRopg3G.js";const y={queryKey:["public-api-schema"],queryFn:()=>m("/openapi.json",{credentials:"omit"}),staleTime:5*60*1e3};function b(s,r){const n=new URLSearchParams;for(const[a,t]of Object.entries(r["x-example-parameters"]))s.includes(`{${a}}`)?s=s.replace(`{${a}}`,encodeURIComponent(String(t))):n.append(a,String(t));return`https://paperswithcode.co${s}${n.size?`?${n}`:""}`}function w(s,r){return r==="Python"?`import requests +import{a4 as m,r as o,j as e}from"./index-hxawG6mk.js";import{u as f}from"./useQuery-B7vCF2Os.js";import{M as g}from"./index-CaRYlo5c.js";const y={queryKey:["public-api-schema"],queryFn:()=>m("/openapi.json",{credentials:"omit"}),staleTime:5*60*1e3};function b(s,r){const n=new URLSearchParams;for(const[a,t]of Object.entries(r["x-example-parameters"]))s.includes(`{${a}}`)?s=s.replace(`{${a}}`,encodeURIComponent(String(t))):n.append(a,String(t));return`https://paperswithcode.co${s}${n.size?`?${n}`:""}`}function w(s,r){return r==="Python"?`import requests response = requests.get(${JSON.stringify(s)}, timeout=30) response.raise_for_status() diff --git a/assets/ArtifactWorkspace-C7nTcvIL.js b/assets/ArtifactWorkspace-CCP7C86X.js similarity index 99% rename from assets/ArtifactWorkspace-C7nTcvIL.js rename to assets/ArtifactWorkspace-CCP7C86X.js index a530fd27a758d582d7490dadbadf6a8f1c6b6b14..9d6da2860c4d31d28a272041473d878cdfcd1582 100644 --- a/assets/ArtifactWorkspace-C7nTcvIL.js +++ b/assets/ArtifactWorkspace-CCP7C86X.js @@ -1,4 +1,4 @@ -var QN=Object.defineProperty;var Qk=n=>{throw TypeError(n)};var eL=(n,e,t)=>e in n?QN(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var re=(n,e,t)=>eL(n,typeof e!="symbol"?e+"":e,t),B0=(n,e,t)=>e.has(n)||Qk("Cannot "+t);var f=(n,e,t)=>(B0(n,e,"read from private field"),t?t.call(n):e.get(n)),R=(n,e,t)=>e.has(n)?Qk("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(n):e.set(n,t),C=(n,e,t,s)=>(B0(n,e,"write to private field"),s?s.call(n,t):e.set(n,t),t),T=(n,e,t)=>(B0(n,e,"access private method"),t);var ps=(n,e,t,s)=>({set _(i){C(n,e,i,t)},get _(){return f(n,e,s)}});import{g as Da,r as K,j as S,F as ee,L as jv,U as tL,Z as L_,K as rn,_ as sm,$ as Zy,X as D_,a0 as nL,m as CC,l as sL}from"./index-CnBotBa4.js";import{u as $C,P as TC,b as PC,M as iL,R as rL,W as oL,d as F_,A as aL,l as lL,K as cL,L as hL,N as uL,O as RC,Q as dL}from"./chatLaunch-CptFdc8a.js";/* empty css */import{H as Cp,a as $p,b as Tp}from"./hover-card-CkboGKdu.js";import{u as wo}from"./useQuery-C8pfCInN.js";import{f as fL,p as pL,T as mL}from"./github-D6RT7m6V.js";import{G as Xy}from"./github-DFkgF81-.js";import{c as U0}from"./catalog-mND3MerS.js";import{r as gL,a as yL,P as j_,c as vL}from"./PaperPreviewLink-ChJBLunV.js";import{M as bL,d as wL}from"./index-DxRopg3G.js";import{r as _L}from"./index-DLNxIk77.js";import{c as eA}from"./chat-B0u4w1H2.js";import{C as SL}from"./copy-0hFmISJO.js";import{F as kL}from"./file-text-BZVTM8hV.js";import{u as im}from"./useMutation-YEvFXzv3.js";import{E as MC}from"./external-link-C_QBJuYU.js";/** +var QN=Object.defineProperty;var Qk=n=>{throw TypeError(n)};var eL=(n,e,t)=>e in n?QN(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var re=(n,e,t)=>eL(n,typeof e!="symbol"?e+"":e,t),B0=(n,e,t)=>e.has(n)||Qk("Cannot "+t);var f=(n,e,t)=>(B0(n,e,"read from private field"),t?t.call(n):e.get(n)),R=(n,e,t)=>e.has(n)?Qk("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(n):e.set(n,t),C=(n,e,t,s)=>(B0(n,e,"write to private field"),s?s.call(n,t):e.set(n,t),t),T=(n,e,t)=>(B0(n,e,"access private method"),t);var ps=(n,e,t,s)=>({set _(i){C(n,e,i,t)},get _(){return f(n,e,s)}});import{g as Da,r as K,j as S,F as ee,L as jv,U as tL,Z as L_,K as rn,_ as sm,$ as Zy,X as D_,a0 as nL,m as CC,l as sL}from"./index-hxawG6mk.js";import{u as $C,P as TC,b as PC,M as iL,R as rL,W as oL,d as F_,A as aL,l as lL,K as cL,L as hL,N as uL,O as RC,Q as dL}from"./chatLaunch-DrTVeX4t.js";/* empty css */import{H as Cp,a as $p,b as Tp}from"./hover-card-DEHIu6q-.js";import{u as wo}from"./useQuery-B7vCF2Os.js";import{f as fL,p as pL,T as mL}from"./github-Bf2b_Y1p.js";import{G as Xy}from"./github-C-cqt6uw.js";import{c as U0}from"./catalog-ePebz7GX.js";import{r as gL,a as yL,P as j_,c as vL}from"./PaperPreviewLink-BJhSzNVs.js";import{M as bL,d as wL}from"./index-CaRYlo5c.js";import{r as _L}from"./index-Ddr0k9KU.js";import{c as eA}from"./chat-DJiy7CbR.js";import{C as SL}from"./copy-B2wC0pMM.js";import{F as kL}from"./file-text-DIeliPoM.js";import{u as im}from"./useMutation-gPqxjZGO.js";import{E as MC}from"./external-link-CWzYMTrZ.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/AstraForRoboticsView-D-23yXHI.js b/assets/AstraForRoboticsView-Cw29Eva6.js similarity index 92% rename from assets/AstraForRoboticsView-D-23yXHI.js rename to assets/AstraForRoboticsView-Cw29Eva6.js index 6e906fd7141d2620f61b4beb862f2b8718395120..647a6afcc655767f642347dc3b814a9b8dcad753 100644 --- a/assets/AstraForRoboticsView-D-23yXHI.js +++ b/assets/AstraForRoboticsView-Cw29Eva6.js @@ -1 +1 @@ -import{d as v,r as h,j as a,L as n}from"./index-CnBotBa4.js";import{P as N}from"./components-CSFfzsKt.js";import{P}from"./PaperFeedFilters-DBRREw9D.js";import{A as k,a as A}from"./alert-B0qZtPeK.js";import{S as w}from"./skeleton-DuOQBmSr.js";import{u as S}from"./useIntersectionObserver-WHgviHIR.js";import{u as R}from"./usePapers-fw4Ivp2T.js";import{f as L,D as T}from"./latexPlainText-DI8YEXVe.js";import{t as F}from"./transform-DMbrhcTx.js";import"./paperQueryKeys-BP2E-0yf.js";import"./LatexTitle-B1D_EqzJ.js";import"./papers-DkTdvzl4.js";import"./safeExternalHref-CkBrsh84.js";import"./useQuery-C8pfCInN.js";import"./useInfiniteQuery-DUlXElgD.js";const f="robotics",b="gpt-6-astra",I="https://x.com/YuXiang_IRVL/status/2100395131924840570",C=[["trending","trending"],["date_published","newest"],["citation_count","most cited"]],O=[{handle:"Frame_Robotics",author:"Frame Robotics",summary:"Real-arm control that fixes grip angle and carry height on the next try after a miss.",url:"https://x.com/Frame_Robotics/status/2099900836273090614"},{handle:"qineng_wang",author:"Qineng Wang",summary:"Dual-ALOHA spatial-constraint puzzles: unlocking interlocked parts and threading a rope through three rings.",url:"https://x.com/qineng_wang/status/2099893504658866561"},{handle:"__Rhodium__",author:"Lucas",summary:"In-context learning of the controls and the workspace, reaching the task goal in three tries.",url:"https://x.com/__Rhodium__/status/2099521054678925534"},{handle:"SuveenE",author:"Suveen Ellawela",summary:"Picking up a pipette and fitting a 5 mm tip on a MolmoAct2 real-world eval, using the free hand for a better view.",url:"https://x.com/SuveenE/status/2099448450341605672"},{handle:"cdngdev",author:"thijs",summary:"A robot arm with a paintbrush painting the Golden Gate Bridge, improving across attempts from camera feedback.",url:"https://x.com/cdngdev/status/2097339677128982873"},{handle:"IsaacSin12",author:"Isaac Sin",summary:"Zero-shot sorting of irregularly shaped blocks into cups by color.",url:"https://x.com/IsaacSin12/status/2096715382166098302"},{handle:"chooi_jeq",author:"Jay Chooi",summary:"Robocurve's robot-control comparison: 95% task completion versus 40% for Fable 5.1 at lower cost.",url:"https://x.com/chooi_jeq/status/2096064315115839904"}],G=[{handle:"Lingjun_Mao",author:"Lingjun Mao",summary:"Adapting to a new embodiment to put a cake into an air fryer through CuRobo motion-planning tool APIs.",url:"https://x.com/Lingjun_Mao/status/2100294902672462176"},{handle:"walterzhu8",author:"Wentao Zhu",summary:"A day-and-a-half autonomous run that builds and trains pen spinning on a Sharpa hand in Isaac Lab.",url:"https://x.com/walterzhu8/status/2100212420840989112"},{handle:"mishig25",author:"Mishig",summary:"Painting the Eiffel Tower in MuJoCo with an SO-101 and a brush, with the full experiment shared on Hugging Face.",url:"https://x.com/mishig25/status/2099611674793668676"},{handle:"RunpeiDong",author:"Runpei Dong",summary:"Getting a humanoid into a Tesla in MuJoCo: learning from feedback, then reusing that experience with egocentric perception.",url:"https://x.com/RunpeiDong/status/2099604536327614717"},{handle:"frankzydou",author:"Zhiyang (Frank) Dou",summary:"A LeRobot SO-101 real-world pickup from a third-person RGB camera, where the arm has to bend back to reach the pen.",url:"https://x.com/frankzydou/status/2099338127915512297"},{handle:"Parvkpr",author:"Parv Kapoor",summary:"Real-to-sim: building an interactive simulation environment from a single image or video.",url:"https://x.com/Parvkpr/status/2098847963867238597"},{handle:"z_code68632",author:"code_z",summary:"One demo per task: unscrewing a bottle cap, inserting a plug, clearing obstacles, and imitating a dance on a real robot.",url:"https://x.com/z_code68632/status/2098397364725895387"}],j=({posts:s,label:i})=>a.jsxs("div",{className:"astra-posts",children:[a.jsx("div",{className:"astra-posts-label",children:i}),a.jsx("ul",{children:s.map(o=>a.jsxs("li",{children:[a.jsxs("a",{href:o.url,target:"_blank",rel:"noreferrer",children:["@",o.handle]}),a.jsxs("span",{className:"astra-post-author",children:[" ",o.author]}),a.jsxs("span",{className:"astra-post-summary",children:[" — ",o.summary]})]},o.url))})]}),E=s=>s==="date_published"||s==="citation_count"?s:"trending",W=()=>{var g,x;const[s,i]=v(),o=E(s.get("order_by")),d=s.get("has_code")==="true",m=s.get("has_hf_artifacts")==="true",t=R({task:f,method:b,page_size:12,order_by:o,order_dir:"desc",include_resources:!0,has_code:d,has_hf_artifacts:m}),{targetRef:_,isIntersecting:u}=S({rootMargin:"200px"});h.useEffect(()=>(document.title=L("GPT-6 Astra for Robotics"),()=>{document.title=T}),[]),h.useEffect(()=>{u&&t.hasNextPage&&!t.isFetchingNextPage&&t.fetchNextPage()},[u,t.hasNextPage,t.isFetchingNextPage]);const p=h.useMemo(()=>{var e;return(((e=t.data)==null?void 0:e.pages)??[]).flatMap(r=>r.results.map(F))},[t.data]),y=((x=(g=t.data)==null?void 0:g.pages[0])==null?void 0:x.count)??0,c=(e,r)=>{const l=new URLSearchParams(s);r===null?l.delete(e):l.set(e,r),i(l)};return a.jsxs("div",{className:"page",children:[a.jsxs("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:[a.jsx(n,{to:"/",children:"Home"}),a.jsx("span",{children:" / "}),a.jsx("span",{children:"GPT-6 Astra for Robotics"})]}),a.jsx("header",{className:"feed-header",children:a.jsxs("div",{children:[a.jsx("div",{className:"astra-eyebrow",children:"Collection"}),a.jsxs("h1",{className:"feed-title",children:["GPT-6 Astra ",a.jsx("em",{children:"for Robotics"})]}),a.jsx("div",{className:"feed-subtitle",children:"Papers, technical reports, and evaluations that put OpenAI’s frontier model in control of real and simulated robots."}),a.jsxs("p",{className:"astra-lede",children:["The GPT-6 Astra launch never mentioned robots, yet within days the model was driving arms, hands, and humanoids. As"," ",a.jsx("a",{href:I,target:"_blank",rel:"noreferrer",children:"Yu Xiang"})," ","framed it, the work splits into two families: Astra acting as the robot policy itself, and Astra acting as an agent that orchestrates everything else."]})]})}),a.jsxs("section",{className:"astra-approaches","aria-label":"How GPT-6 Astra is used for robots",children:[a.jsxs("article",{className:"astra-approach",children:[a.jsx("div",{className:"astra-approach-num",children:"01 / Robot policy"}),a.jsx("h2",{children:"Astra as the policy, like a VLA"}),a.jsx("p",{children:"The model looks at camera frames and robot state and directly emits actions: end-effector poses, joint targets, or gripper commands, closing the control loop step by step with no task-specific training."}),a.jsx(j,{posts:O,label:"Seen on X"})]}),a.jsxs("article",{className:"astra-approach",children:[a.jsx("div",{className:"astra-approach-num",children:"02 / Agent"}),a.jsx("h2",{children:"Astra as the agent"}),a.jsx("p",{children:"The model reasons about the scene, writes and runs code, calls planners and tools, or delegates low-level motion to pretrained policies such as VLAs, and keeps the robot on task over long horizons."}),a.jsx(j,{posts:G,label:"Seen on X"})]})]}),a.jsxs("p",{className:"astra-note",children:["Listing is automatic: any paper tagged with both the"," ",a.jsx(n,{to:`/tasks/${f}`,children:"Robotics"})," task and the"," ",a.jsx(n,{to:`/methods/${b}`,children:"GPT-6 Astra"})," method appears here. Missing a report or preprint?"," ",a.jsx(n,{to:"/submit",children:"Submit it"}),"."]}),a.jsxs("div",{className:"task-section-head",style:{marginTop:36},children:[a.jsx("div",{className:"task-section-eyebrow",children:"Top trending · sort below"}),a.jsxs("div",{className:"task-section-title",children:["Papers ",a.jsxs("span",{className:"meta",children:["[",y.toLocaleString(),"]"]})]})]}),a.jsx("div",{className:"sort-bar",children:a.jsxs("div",{className:"paper-feed-toolbar-controls",children:[a.jsx("div",{className:"sort-options",children:C.map(([e,r])=>a.jsx("button",{type:"button",className:`sort-btn ${o===e?"active":""}`,onClick:()=>c("order_by",e==="trending"?null:e),children:r},e))}),a.jsx(P,{hasCode:d,hasHfArtifacts:m,onHasCodeChange:e=>c("has_code",e?"true":null),onHasHfArtifactsChange:e=>c("has_hf_artifacts",e?"true":null)})]})}),t.error?a.jsx(k,{variant:"destructive",children:a.jsx(A,{children:"Failed to load the collection. Please try again."})}):t.isLoading?a.jsx("div",{className:"paper-list",children:Array.from({length:3}).map((e,r)=>a.jsx(w,{className:"h-40 w-full"},r))}):p.length===0?a.jsx("div",{className:"no-results",children:"No papers match this selection yet."}):a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"paper-list",children:p.map((e,r)=>a.jsx(N,{paper:e,rank:r+1},e.id))}),a.jsx("div",{ref:_,style:{height:1}}),t.isFetchingNextPage&&a.jsx("div",{style:{padding:"20px 0",textAlign:"center",color:"var(--ink-faint)"},children:"Loading more…"})]})]})};export{W as default}; +import{d as v,r as h,j as a,L as n}from"./index-hxawG6mk.js";import{P as N}from"./components-Djdw_Z-e.js";import{P}from"./PaperFeedFilters-BsWw60hu.js";import{A as k,a as A}from"./alert-2LCyXuCE.js";import{S as w}from"./skeleton-CRfsRMNe.js";import{u as S}from"./useIntersectionObserver-rTEWxOEQ.js";import{u as R}from"./usePapers-K74IxnFM.js";import{f as L,D as T}from"./latexPlainText-DI8YEXVe.js";import{t as F}from"./transform-DfrN0kQW.js";import"./paperQueryKeys-BP2E-0yf.js";import"./LatexTitle-QTkECjbh.js";import"./papers-B0ysePyJ.js";import"./safeExternalHref-CkBrsh84.js";import"./useQuery-B7vCF2Os.js";import"./useInfiniteQuery-BIEmOe8z.js";const f="robotics",b="gpt-6-astra",I="https://x.com/YuXiang_IRVL/status/2100395131924840570",C=[["trending","trending"],["date_published","newest"],["citation_count","most cited"]],O=[{handle:"Frame_Robotics",author:"Frame Robotics",summary:"Real-arm control that fixes grip angle and carry height on the next try after a miss.",url:"https://x.com/Frame_Robotics/status/2099900836273090614"},{handle:"qineng_wang",author:"Qineng Wang",summary:"Dual-ALOHA spatial-constraint puzzles: unlocking interlocked parts and threading a rope through three rings.",url:"https://x.com/qineng_wang/status/2099893504658866561"},{handle:"__Rhodium__",author:"Lucas",summary:"In-context learning of the controls and the workspace, reaching the task goal in three tries.",url:"https://x.com/__Rhodium__/status/2099521054678925534"},{handle:"SuveenE",author:"Suveen Ellawela",summary:"Picking up a pipette and fitting a 5 mm tip on a MolmoAct2 real-world eval, using the free hand for a better view.",url:"https://x.com/SuveenE/status/2099448450341605672"},{handle:"cdngdev",author:"thijs",summary:"A robot arm with a paintbrush painting the Golden Gate Bridge, improving across attempts from camera feedback.",url:"https://x.com/cdngdev/status/2097339677128982873"},{handle:"IsaacSin12",author:"Isaac Sin",summary:"Zero-shot sorting of irregularly shaped blocks into cups by color.",url:"https://x.com/IsaacSin12/status/2096715382166098302"},{handle:"chooi_jeq",author:"Jay Chooi",summary:"Robocurve's robot-control comparison: 95% task completion versus 40% for Fable 5.1 at lower cost.",url:"https://x.com/chooi_jeq/status/2096064315115839904"}],G=[{handle:"Lingjun_Mao",author:"Lingjun Mao",summary:"Adapting to a new embodiment to put a cake into an air fryer through CuRobo motion-planning tool APIs.",url:"https://x.com/Lingjun_Mao/status/2100294902672462176"},{handle:"walterzhu8",author:"Wentao Zhu",summary:"A day-and-a-half autonomous run that builds and trains pen spinning on a Sharpa hand in Isaac Lab.",url:"https://x.com/walterzhu8/status/2100212420840989112"},{handle:"mishig25",author:"Mishig",summary:"Painting the Eiffel Tower in MuJoCo with an SO-101 and a brush, with the full experiment shared on Hugging Face.",url:"https://x.com/mishig25/status/2099611674793668676"},{handle:"RunpeiDong",author:"Runpei Dong",summary:"Getting a humanoid into a Tesla in MuJoCo: learning from feedback, then reusing that experience with egocentric perception.",url:"https://x.com/RunpeiDong/status/2099604536327614717"},{handle:"frankzydou",author:"Zhiyang (Frank) Dou",summary:"A LeRobot SO-101 real-world pickup from a third-person RGB camera, where the arm has to bend back to reach the pen.",url:"https://x.com/frankzydou/status/2099338127915512297"},{handle:"Parvkpr",author:"Parv Kapoor",summary:"Real-to-sim: building an interactive simulation environment from a single image or video.",url:"https://x.com/Parvkpr/status/2098847963867238597"},{handle:"z_code68632",author:"code_z",summary:"One demo per task: unscrewing a bottle cap, inserting a plug, clearing obstacles, and imitating a dance on a real robot.",url:"https://x.com/z_code68632/status/2098397364725895387"}],j=({posts:s,label:i})=>a.jsxs("div",{className:"astra-posts",children:[a.jsx("div",{className:"astra-posts-label",children:i}),a.jsx("ul",{children:s.map(o=>a.jsxs("li",{children:[a.jsxs("a",{href:o.url,target:"_blank",rel:"noreferrer",children:["@",o.handle]}),a.jsxs("span",{className:"astra-post-author",children:[" ",o.author]}),a.jsxs("span",{className:"astra-post-summary",children:[" — ",o.summary]})]},o.url))})]}),E=s=>s==="date_published"||s==="citation_count"?s:"trending",W=()=>{var g,x;const[s,i]=v(),o=E(s.get("order_by")),d=s.get("has_code")==="true",m=s.get("has_hf_artifacts")==="true",t=R({task:f,method:b,page_size:12,order_by:o,order_dir:"desc",include_resources:!0,has_code:d,has_hf_artifacts:m}),{targetRef:_,isIntersecting:u}=S({rootMargin:"200px"});h.useEffect(()=>(document.title=L("GPT-6 Astra for Robotics"),()=>{document.title=T}),[]),h.useEffect(()=>{u&&t.hasNextPage&&!t.isFetchingNextPage&&t.fetchNextPage()},[u,t.hasNextPage,t.isFetchingNextPage]);const p=h.useMemo(()=>{var e;return(((e=t.data)==null?void 0:e.pages)??[]).flatMap(r=>r.results.map(F))},[t.data]),y=((x=(g=t.data)==null?void 0:g.pages[0])==null?void 0:x.count)??0,c=(e,r)=>{const l=new URLSearchParams(s);r===null?l.delete(e):l.set(e,r),i(l)};return a.jsxs("div",{className:"page",children:[a.jsxs("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:[a.jsx(n,{to:"/",children:"Home"}),a.jsx("span",{children:" / "}),a.jsx("span",{children:"GPT-6 Astra for Robotics"})]}),a.jsx("header",{className:"feed-header",children:a.jsxs("div",{children:[a.jsx("div",{className:"astra-eyebrow",children:"Collection"}),a.jsxs("h1",{className:"feed-title",children:["GPT-6 Astra ",a.jsx("em",{children:"for Robotics"})]}),a.jsx("div",{className:"feed-subtitle",children:"Papers, technical reports, and evaluations that put OpenAI’s frontier model in control of real and simulated robots."}),a.jsxs("p",{className:"astra-lede",children:["The GPT-6 Astra launch never mentioned robots, yet within days the model was driving arms, hands, and humanoids. As"," ",a.jsx("a",{href:I,target:"_blank",rel:"noreferrer",children:"Yu Xiang"})," ","framed it, the work splits into two families: Astra acting as the robot policy itself, and Astra acting as an agent that orchestrates everything else."]})]})}),a.jsxs("section",{className:"astra-approaches","aria-label":"How GPT-6 Astra is used for robots",children:[a.jsxs("article",{className:"astra-approach",children:[a.jsx("div",{className:"astra-approach-num",children:"01 / Robot policy"}),a.jsx("h2",{children:"Astra as the policy, like a VLA"}),a.jsx("p",{children:"The model looks at camera frames and robot state and directly emits actions: end-effector poses, joint targets, or gripper commands, closing the control loop step by step with no task-specific training."}),a.jsx(j,{posts:O,label:"Seen on X"})]}),a.jsxs("article",{className:"astra-approach",children:[a.jsx("div",{className:"astra-approach-num",children:"02 / Agent"}),a.jsx("h2",{children:"Astra as the agent"}),a.jsx("p",{children:"The model reasons about the scene, writes and runs code, calls planners and tools, or delegates low-level motion to pretrained policies such as VLAs, and keeps the robot on task over long horizons."}),a.jsx(j,{posts:G,label:"Seen on X"})]})]}),a.jsxs("p",{className:"astra-note",children:["Listing is automatic: any paper tagged with both the"," ",a.jsx(n,{to:`/tasks/${f}`,children:"Robotics"})," task and the"," ",a.jsx(n,{to:`/methods/${b}`,children:"GPT-6 Astra"})," method appears here. Missing a report or preprint?"," ",a.jsx(n,{to:"/submit",children:"Submit it"}),"."]}),a.jsxs("div",{className:"task-section-head",style:{marginTop:36},children:[a.jsx("div",{className:"task-section-eyebrow",children:"Top trending · sort below"}),a.jsxs("div",{className:"task-section-title",children:["Papers ",a.jsxs("span",{className:"meta",children:["[",y.toLocaleString(),"]"]})]})]}),a.jsx("div",{className:"sort-bar",children:a.jsxs("div",{className:"paper-feed-toolbar-controls",children:[a.jsx("div",{className:"sort-options",children:C.map(([e,r])=>a.jsx("button",{type:"button",className:`sort-btn ${o===e?"active":""}`,onClick:()=>c("order_by",e==="trending"?null:e),children:r},e))}),a.jsx(P,{hasCode:d,hasHfArtifacts:m,onHasCodeChange:e=>c("has_code",e?"true":null),onHasHfArtifactsChange:e=>c("has_hf_artifacts",e?"true":null)})]})}),t.error?a.jsx(k,{variant:"destructive",children:a.jsx(A,{children:"Failed to load the collection. Please try again."})}):t.isLoading?a.jsx("div",{className:"paper-list",children:Array.from({length:3}).map((e,r)=>a.jsx(w,{className:"h-40 w-full"},r))}):p.length===0?a.jsx("div",{className:"no-results",children:"No papers match this selection yet."}):a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"paper-list",children:p.map((e,r)=>a.jsx(N,{paper:e,rank:r+1},e.id))}),a.jsx("div",{ref:_,style:{height:1}}),t.isFetchingNextPage&&a.jsx("div",{style:{padding:"20px 0",textAlign:"center",color:"var(--ink-faint)"},children:"Loading more…"})]})]})};export{W as default}; diff --git a/assets/AuthorDetailView-DYFlBbTQ.js b/assets/AuthorDetailView-DYFlBbTQ.js new file mode 100644 index 0000000000000000000000000000000000000000..f5c2460d48c7b6580d54f7d88ee9fed46d89ff25 --- /dev/null +++ b/assets/AuthorDetailView-DYFlBbTQ.js @@ -0,0 +1 @@ +import{u as C,j as e,d as R,r as v,L as S}from"./index-hxawG6mk.js";import{u as w}from"./useQuery-B7vCF2Os.js";import{P as k}from"./components-Djdw_Z-e.js";import{a as H,P as L,b as O}from"./PaperDateFilter-CmJ1wf5w.js";import{P as B}from"./PaperFeedFilters-BsWw60hu.js";import{R as I}from"./ResearchFollowButton-uts1MEpQ.js";import{A as T,a as $}from"./alert-2LCyXuCE.js";import{S as y}from"./skeleton-CRfsRMNe.js";import{u as E}from"./useIntersectionObserver-rTEWxOEQ.js";import{u as M}from"./usePapers-K74IxnFM.js";import{p as q}from"./papers-B0ysePyJ.js";import{h as z}from"./hfAvatar-CpaIt9Yp.js";import{t as U}from"./transform-DfrN0kQW.js";import F from"./NotFound-B1i1qS3r.js";import"./paperQueryKeys-BP2E-0yf.js";import"./LatexTitle-QTkECjbh.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-BEdoEHfx.js";import"./useMutation-gPqxjZGO.js";import"./research-25A5rLuK.js";import"./plus-C1naIkSJ.js";import"./useInfiniteQuery-BIEmOe8z.js";const K=[["trending","trending"],["date_published","newest"],["citation_count","most cited"]],Q=r=>r==="date_published"||r==="citation_count"?r:"trending",V=({authorId:r})=>{var f,x,j,_,N,b,P;const[o,h]=R(),p=Q(o.get("order_by")),m=o.get("has_code")==="true",u=o.get("has_hf_artifacts")==="true",i=H(o),t=w({queryKey:["author",r],queryFn:()=>q.getAuthor(r)}),s=M({author:r,page_size:12,order_by:p,order_dir:"desc",include_resources:!0,has_code:m,has_hf_artifacts:u,start_date:i.startDate,end_date:i.endDate}),{targetRef:A,isIntersecting:g}=E({rootMargin:"200px"}),c=v.useMemo(()=>{var a;return(((a=s.data)==null?void 0:a.pages)??[]).flatMap(n=>n.results.map(U))},[s.data]);v.useEffect(()=>{g&&s.hasNextPage&&!s.isFetchingNextPage&&s.fetchNextPage()},[g,s.hasNextPage,s.isFetchingNextPage,c.length]);const D=((x=(f=s.data)==null?void 0:f.pages[0])==null?void 0:x.count)??0,d=(a,n)=>{const l=new URLSearchParams(o);n?l.set(a,n):l.delete(a),h(l)};return((j=t.error)==null?void 0:j.status)===404?e.jsx(F,{}):e.jsxs("div",{className:"page",children:[e.jsxs("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:[e.jsx(S,{to:"/",children:"Home"}),e.jsx("span",{children:" / "}),e.jsx("span",{children:"Authors"}),e.jsx("span",{children:" / "}),e.jsx("span",{children:((_=t.data)==null?void 0:_.full_name)??r})]}),e.jsxs("header",{className:"author-hero",children:[e.jsx("div",{className:"organizations-eyebrow",children:"AUTHOR"}),e.jsxs("div",{className:"author-hero-title",children:[((N=t.data)==null?void 0:N.hf_username)&&t.data.hf_avatar_url&&e.jsx("a",{href:`https://huggingface.co/${t.data.hf_username}`,target:"_blank",rel:"noopener noreferrer","aria-label":`@${t.data.hf_username} on Hugging Face`,children:e.jsx("img",{className:"author-avatar",src:z(t.data.hf_avatar_url),alt:"",width:96,height:96})}),e.jsx("h1",{className:"feed-title",children:((b=t.data)==null?void 0:b.full_name)??e.jsx(y,{className:"h-12 w-64 inline-block"})})]}),t.data&&e.jsxs("div",{className:"feed-subtitle",children:[t.data.paper_count.toLocaleString()," ",t.data.paper_count===1?"paper":"papers",t.data.hf_username&&e.jsxs(e.Fragment,{children:[" · ",e.jsxs("a",{href:`https://huggingface.co/${t.data.hf_username}`,target:"_blank",rel:"noopener noreferrer",children:["@",t.data.hf_username," on Hugging Face ↗"]})]})]}),t.data&&e.jsx(I,{kind:"author",entityId:t.data.id})]}),e.jsxs("div",{className:"sort-bar",style:{alignItems:"center",gap:16},children:[e.jsxs("div",{className:"paper-feed-toolbar-controls",children:[e.jsx("div",{className:"sort-options",children:K.map(([a,n])=>e.jsx("button",{type:"button",className:`sort-btn ${p===a?"active":""}`,onClick:()=>d("order_by",a==="trending"?null:a),children:n},a))}),e.jsx(B,{hasCode:m,hasHfArtifacts:u,onHasCodeChange:a=>d("has_code",a?"true":null),onHasHfArtifactsChange:a=>d("has_hf_artifacts",a?"true":null)})]}),e.jsx(L,{startDate:i.startDate,endDate:i.endDate,onChange:a=>h(O(o,a))}),e.jsxs("div",{className:"results-count",children:[D.toLocaleString()," papers"]})]}),s.error?e.jsx(T,{variant:"destructive",children:e.jsxs($,{children:["Failed to load papers."," ",e.jsx("button",{type:"button",onClick:()=>void s.refetch(),children:"Try again"})]})}):s.isLoading?e.jsx("div",{className:"paper-list",children:Array.from({length:4}).map((a,n)=>e.jsx(y,{className:"h-40 w-full"},n))}):c.length===0?e.jsx("div",{className:"no-results",children:((P=t.data)==null?void 0:P.paper_count)===0?"No public papers are available.":"No papers found for this selection."}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"paper-list",children:c.map((a,n)=>e.jsx(k,{paper:a,rank:n+1},a.id))}),e.jsx("div",{ref:A,style:{height:1}}),s.isFetchingNextPage&&e.jsx("div",{style:{padding:"20px 0",textAlign:"center"},children:"Loading more…"})]})]})},fe=()=>{const{authorId:r}=C();return r?e.jsx(V,{authorId:r},r):e.jsx(F,{})};export{fe as default}; diff --git a/assets/AuthorDetailView-Dv6cMldc.js b/assets/AuthorDetailView-Dv6cMldc.js deleted file mode 100644 index c33cbda14ef8b0efb3dae11990b3446715d8b2e7..0000000000000000000000000000000000000000 --- a/assets/AuthorDetailView-Dv6cMldc.js +++ /dev/null @@ -1 +0,0 @@ -import{u as C,j as e,d as R,r as v,L as S}from"./index-CnBotBa4.js";import{u as w}from"./useQuery-C8pfCInN.js";import{P as k}from"./components-CSFfzsKt.js";import{a as H,P as L,b as O}from"./PaperDateFilter-DMplC82d.js";import{P as $}from"./PaperFeedFilters-DBRREw9D.js";import{R as B}from"./ResearchFollowButton-CIKuncTY.js";import{A as I,a as T}from"./alert-B0qZtPeK.js";import{S as y}from"./skeleton-DuOQBmSr.js";import{u as E}from"./useIntersectionObserver-WHgviHIR.js";import{u as M}from"./usePapers-fw4Ivp2T.js";import{p as q}from"./papers-DkTdvzl4.js";import{t as z}from"./transform-DMbrhcTx.js";import F from"./NotFound-B8QVsf71.js";import"./paperQueryKeys-BP2E-0yf.js";import"./LatexTitle-B1D_EqzJ.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-BvojInsz.js";import"./useMutation-YEvFXzv3.js";import"./research-DhkAyrPi.js";import"./plus-DTSO60Ls.js";import"./useInfiniteQuery-DUlXElgD.js";const U=[["trending","trending"],["date_published","newest"],["citation_count","most cited"]],K=r=>r==="date_published"||r==="citation_count"?r:"trending",Q=r=>r.startsWith("/")?`https://huggingface.co${r}`:r,V=({authorId:r})=>{var f,x,j,_,N,b,P;const[o,h]=R(),p=K(o.get("order_by")),m=o.get("has_code")==="true",u=o.get("has_hf_artifacts")==="true",i=H(o),t=w({queryKey:["author",r],queryFn:()=>q.getAuthor(r)}),s=M({author:r,page_size:12,order_by:p,order_dir:"desc",include_resources:!0,has_code:m,has_hf_artifacts:u,start_date:i.startDate,end_date:i.endDate}),{targetRef:A,isIntersecting:g}=E({rootMargin:"200px"}),c=v.useMemo(()=>{var a;return(((a=s.data)==null?void 0:a.pages)??[]).flatMap(n=>n.results.map(z))},[s.data]);v.useEffect(()=>{g&&s.hasNextPage&&!s.isFetchingNextPage&&s.fetchNextPage()},[g,s.hasNextPage,s.isFetchingNextPage,c.length]);const D=((x=(f=s.data)==null?void 0:f.pages[0])==null?void 0:x.count)??0,d=(a,n)=>{const l=new URLSearchParams(o);n?l.set(a,n):l.delete(a),h(l)};return((j=t.error)==null?void 0:j.status)===404?e.jsx(F,{}):e.jsxs("div",{className:"page",children:[e.jsxs("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:[e.jsx(S,{to:"/",children:"Home"}),e.jsx("span",{children:" / "}),e.jsx("span",{children:"Authors"}),e.jsx("span",{children:" / "}),e.jsx("span",{children:((_=t.data)==null?void 0:_.full_name)??r})]}),e.jsxs("header",{className:"author-hero",children:[e.jsx("div",{className:"organizations-eyebrow",children:"AUTHOR"}),e.jsxs("div",{className:"author-hero-title",children:[((N=t.data)==null?void 0:N.hf_username)&&t.data.hf_avatar_url&&e.jsx("a",{href:`https://huggingface.co/${t.data.hf_username}`,target:"_blank",rel:"noopener noreferrer","aria-label":`@${t.data.hf_username} on Hugging Face`,children:e.jsx("img",{className:"author-avatar",src:Q(t.data.hf_avatar_url),alt:"",width:56,height:56})}),e.jsx("h1",{className:"feed-title",children:((b=t.data)==null?void 0:b.full_name)??e.jsx(y,{className:"h-12 w-64 inline-block"})})]}),t.data&&e.jsxs("div",{className:"feed-subtitle",children:[t.data.paper_count.toLocaleString()," ",t.data.paper_count===1?"paper":"papers",t.data.hf_username&&e.jsxs(e.Fragment,{children:[" · ",e.jsxs("a",{href:`https://huggingface.co/${t.data.hf_username}`,target:"_blank",rel:"noopener noreferrer",children:["@",t.data.hf_username," on Hugging Face ↗"]})]})]}),t.data&&e.jsx(B,{kind:"author",entityId:t.data.id})]}),e.jsxs("div",{className:"sort-bar",style:{alignItems:"center",gap:16},children:[e.jsxs("div",{className:"paper-feed-toolbar-controls",children:[e.jsx("div",{className:"sort-options",children:U.map(([a,n])=>e.jsx("button",{type:"button",className:`sort-btn ${p===a?"active":""}`,onClick:()=>d("order_by",a==="trending"?null:a),children:n},a))}),e.jsx($,{hasCode:m,hasHfArtifacts:u,onHasCodeChange:a=>d("has_code",a?"true":null),onHasHfArtifactsChange:a=>d("has_hf_artifacts",a?"true":null)})]}),e.jsx(L,{startDate:i.startDate,endDate:i.endDate,onChange:a=>h(O(o,a))}),e.jsxs("div",{className:"results-count",children:[D.toLocaleString()," papers"]})]}),s.error?e.jsx(I,{variant:"destructive",children:e.jsxs(T,{children:["Failed to load papers."," ",e.jsx("button",{type:"button",onClick:()=>void s.refetch(),children:"Try again"})]})}):s.isLoading?e.jsx("div",{className:"paper-list",children:Array.from({length:4}).map((a,n)=>e.jsx(y,{className:"h-40 w-full"},n))}):c.length===0?e.jsx("div",{className:"no-results",children:((P=t.data)==null?void 0:P.paper_count)===0?"No public papers are available.":"No papers found for this selection."}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"paper-list",children:c.map((a,n)=>e.jsx(k,{paper:a,rank:n+1},a.id))}),e.jsx("div",{ref:A,style:{height:1}}),s.isFetchingNextPage&&e.jsx("div",{style:{padding:"20px 0",textAlign:"center"},children:"Loading more…"})]})]})},ge=()=>{const{authorId:r}=C();return r?e.jsx(V,{authorId:r},r):e.jsx(F,{})};export{ge as default}; diff --git a/assets/AuthorizePaperEditView-D4j-P-8L.js b/assets/AuthorizePaperEditView-CfwqJzqG.js similarity index 87% rename from assets/AuthorizePaperEditView-D4j-P-8L.js rename to assets/AuthorizePaperEditView-CfwqJzqG.js index 226173445a088a373be29d7519e69a958bfc1e65..3d4c9f5c29cdea466c42af05956bc1ac722b33d8 100644 --- a/assets/AuthorizePaperEditView-D4j-P-8L.js +++ b/assets/AuthorizePaperEditView-CfwqJzqG.js @@ -1 +1 @@ -import{u,a as d,j as e,L as l,H as p}from"./index-CnBotBa4.js";import{u as c}from"./useQuery-C8pfCInN.js";import{u as h}from"./useMutation-YEvFXzv3.js";import{B as m}from"./button-DNii_czO.js";import{p as n}from"./paperEdits-C4mFP78Y.js";function b(){const{authorizationId:t=""}=u(),{user:s,isLoading:o}=d(),i=c({queryKey:["paper-edit-authorization",t],queryFn:()=>n.authorization(t),retry:!1}),r=h({mutationFn:()=>n.approve(t)}),a=i.data;return e.jsxs("main",{className:"mx-auto max-w-xl space-y-5 px-6 py-12",children:[e.jsx("h1",{className:"text-2xl font-semibold",children:"Authorize your agent to edit a paper"}),(i.isLoading||o)&&e.jsx("p",{children:"Loading authorization…"}),i.error&&e.jsx("p",{role:"alert",children:i.error.message}),a&&e.jsxs(e.Fragment,{children:[e.jsx(l,{className:"underline",to:`/paper/${a.paper_id}`,children:a.title}),e.jsxs("p",{children:["Check that your CLI shows this code: ",e.jsx("strong",{className:"font-mono",children:a.user_code})]}),e.jsx("p",{children:"Only approve a request you started. Your agent will be able to publish changes to this paper’s links, tags, and evaluation results for one hour, without further approval."}),e.jsx("p",{children:"Edits appear publicly under your Hugging Face username. You can edit up to 20 distinct papers per UTC day. Evaluation deletion and changes to shared benchmark definitions require an administrator."}),r.isSuccess||a.approved?e.jsx("p",{role:"status",children:"Access approved. Return to your CLI to continue."}):s?e.jsxs(e.Fragment,{children:[e.jsxs("p",{children:["Signed in as ",e.jsxs("strong",{children:["@",s.username]})]}),e.jsx(m,{disabled:r.isPending||!s.can_directly_edit_catalog,onClick:()=>r.mutate(),children:r.isPending?"Authorizing…":"Authorize for one hour"}),!s.can_directly_edit_catalog&&e.jsx("p",{children:"Direct editing is unavailable for this session."})]}):e.jsx(p,{returnTo:`/authorize-paper-edit/${t}`,label:"Sign in with Hugging Face"}),r.error&&e.jsx("p",{role:"alert",children:r.error.message})]})]})}export{b as default}; +import{u,a as d,j as e,L as l,H as p}from"./index-hxawG6mk.js";import{u as c}from"./useQuery-B7vCF2Os.js";import{u as h}from"./useMutation-gPqxjZGO.js";import{B as m}from"./button-DR59q2Iu.js";import{p as n}from"./paperEdits-B1ZmleCA.js";function b(){const{authorizationId:t=""}=u(),{user:s,isLoading:o}=d(),i=c({queryKey:["paper-edit-authorization",t],queryFn:()=>n.authorization(t),retry:!1}),r=h({mutationFn:()=>n.approve(t)}),a=i.data;return e.jsxs("main",{className:"mx-auto max-w-xl space-y-5 px-6 py-12",children:[e.jsx("h1",{className:"text-2xl font-semibold",children:"Authorize your agent to edit a paper"}),(i.isLoading||o)&&e.jsx("p",{children:"Loading authorization…"}),i.error&&e.jsx("p",{role:"alert",children:i.error.message}),a&&e.jsxs(e.Fragment,{children:[e.jsx(l,{className:"underline",to:`/paper/${a.paper_id}`,children:a.title}),e.jsxs("p",{children:["Check that your CLI shows this code: ",e.jsx("strong",{className:"font-mono",children:a.user_code})]}),e.jsx("p",{children:"Only approve a request you started. Your agent will be able to publish changes to this paper’s links, tags, and evaluation results for one hour, without further approval."}),e.jsx("p",{children:"Edits appear publicly under your Hugging Face username. You can edit up to 20 distinct papers per UTC day. Evaluation deletion and changes to shared benchmark definitions require an administrator."}),r.isSuccess||a.approved?e.jsx("p",{role:"status",children:"Access approved. Return to your CLI to continue."}):s?e.jsxs(e.Fragment,{children:[e.jsxs("p",{children:["Signed in as ",e.jsxs("strong",{children:["@",s.username]})]}),e.jsx(m,{disabled:r.isPending||!s.can_directly_edit_catalog,onClick:()=>r.mutate(),children:r.isPending?"Authorizing…":"Authorize for one hour"}),!s.can_directly_edit_catalog&&e.jsx("p",{children:"Direct editing is unavailable for this session."})]}):e.jsx(p,{returnTo:`/authorize-paper-edit/${t}`,label:"Sign in with Hugging Face"}),r.error&&e.jsx("p",{role:"alert",children:r.error.message})]})]})}export{b as default}; diff --git a/assets/AutonomousOperations-BY3hlf53.js b/assets/AutonomousOperations-DOs7X7Qx.js similarity index 94% rename from assets/AutonomousOperations-BY3hlf53.js rename to assets/AutonomousOperations-DOs7X7Qx.js index c45c002b9c1a145e880103f0e86fdf1fd09d8202..248efc3d4c38df29b40426b3f6bd74a395796bdb 100644 --- a/assets/AutonomousOperations-BY3hlf53.js +++ b/assets/AutonomousOperations-DOs7X7Qx.js @@ -1,4 +1,4 @@ -import{g as R,a as B,m as q,r as m,j as e,L as H}from"./index-CnBotBa4.js";import{u as I}from"./useQuery-C8pfCInN.js";import{u as Q}from"./useMutation-YEvFXzv3.js";import{B as P}from"./badge-CW-eQ3eC.js";import{B as x}from"./button-DNii_czO.js";import{A as D,C as n,d as i,a as t,b as r,f as h,o as u}from"./operations-scUEWit-.js";import{I as j}from"./input-fzMY4SDb.js";import{S as $}from"./shield-alert-B-esZpK3.js";/** +import{g as R,a as B,m as q,r as m,j as e,L as H}from"./index-hxawG6mk.js";import{u as I}from"./useQuery-B7vCF2Os.js";import{u as Q}from"./useMutation-gPqxjZGO.js";import{B as P}from"./badge-GWSoUTqe.js";import{B as x}from"./button-DR59q2Iu.js";import{A as D,C as n,d as i,a as t,b as r,f as h,o as u}from"./operations-DFo5ls8Y.js";import{I as j}from"./input-BOLTsgbP.js";import{S as $}from"./shield-alert-DrzIR1qR.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/BenchmarkDetailView-BOxa_K-Z.js b/assets/BenchmarkDetailView-CYl_W7HU.js similarity index 98% rename from assets/BenchmarkDetailView-BOxa_K-Z.js rename to assets/BenchmarkDetailView-CYl_W7HU.js index d41482ddaf71579d6825d203fb228a8ddc71d7f1..8538035750e214037bc441b2919a49b33f103ecb 100644 --- a/assets/BenchmarkDetailView-BOxa_K-Z.js +++ b/assets/BenchmarkDetailView-CYl_W7HU.js @@ -1,2 +1,2 @@ -import{r as F,j as a,y as le,L as ne,b as ot,h as ct,u as dt,d as ut,k as mt}from"./index-CnBotBa4.js";import{R as ht}from"./ResearchFollowButton-CIKuncTY.js";import{u as te}from"./useQuery-C8pfCInN.js";import{c as re}from"./catalog-mND3MerS.js";import{C as ft,E as pt,e as gt}from"./ExternalSourceEvalBadge-B3diD7Bx.js";import{L as oe}from"./LatexTitle-B1D_EqzJ.js";import{S as Ke}from"./switch-D71Zro87.js";import{I as xt}from"./components-CSFfzsKt.js";import{S as ce}from"./skeleton-DuOQBmSr.js";import{A as bt,a as yt}from"./alert-B0qZtPeK.js";import{B as wt}from"./BenchmarkTrendSparkline-CLoJOqdn.js";import{s as vt}from"./safeExternalHref-CkBrsh84.js";import{s as jt}from"./slug-BpH-Nkvz.js";import"./useMutation-YEvFXzv3.js";import"./research-DhkAyrPi.js";import"./plus-DTSO60Ls.js";import"./papers-DkTdvzl4.js";import"./hover-card-CkboGKdu.js";import"./index-C2-TgiAT.js";import"./paperQueryKeys-BP2E-0yf.js";import"./transform-DMbrhcTx.js";function _t(e,t,r){const s=t?(e??[]).filter(l=>l.task_id===t):e??[],n=s.filter(l=>l.is_open===!1),i=n.reduce((l,c)=>l?(c.best_rank??Number.POSITIVE_INFINITY)<(l.best_rank??Number.POSITIVE_INFINITY)?c:l:c,null);return{visible:r?s.filter(l=>l.is_open!==!1):s,hiddenClosed:n,topHiddenClosed:i}}function ie(e){if(e==null)return null;if(typeof e=="number")return Number.isFinite(e)?e:null;const t=e.includes("±")?e.split("±")[0].trim():e.trim(),r=parseFloat(t);return Number.isFinite(r)?r:null}const Ge=[{label:"All",maxParametersExclusive:void 0},{label:"<10M",maxParametersExclusive:1e7},{label:"<100M",maxParametersExclusive:1e8},{label:"<1B",maxParametersExclusive:1e9},{label:"<3B",maxParametersExclusive:3e9},{label:"<6B",maxParametersExclusive:6e9},{label:"<12B",maxParametersExclusive:12e9},{label:"<32B",maxParametersExclusive:32e9},{label:"<128B",maxParametersExclusive:128e9},{label:"<500B",maxParametersExclusive:5e11}];function St(e){const t=e===null?void 0:Number(e);return Ge.some(r=>r.maxParametersExclusive===t)?t:void 0}function kt(e){return new Intl.NumberFormat("en",{notation:"compact",maximumSignificantDigits:3}).format(e)}function Ct(e){return[e.paper_id,e.task_id,e.dataset_id,e.model_name,e.harness??""].join("|")}function Et(e){const t=new Map;for(const r of e){const s=Ct(r),n=t.get(s);if(!n){t.set(s,{...r,metrics:{...r.metrics||{}},sourceEvaluationIds:[r.id],ranksByMetric:r.best_metric&&r.best_rank!=null?{[r.best_metric]:r.best_rank}:{},parameterCount:r.num_parameters??null,hasParameterConflict:!1});continue}n.metrics={...n.metrics,...r.metrics||{}},n.sourceEvaluationIds.push(r.id),r.best_metric&&r.best_rank!=null&&(n.ranksByMetric[r.best_metric]=r.best_rank),r.num_parameters!=null&&!n.hasParameterConflict&&(n.parameterCount===null?n.parameterCount=r.num_parameters:n.parameterCount!==r.num_parameters&&(n.parameterCount=null,n.hasParameterConflict=!0))}return Array.from(t.values())}function Le(e,t){return t===void 0?e:e.filter(r=>r.parameterCount!==null&&r.parameterCounts+n,0);for(const[s,n]of t)if(n>=2&&n*2>r)return s;return null}function $t(e,t){const r=e.evaluated_on;return r&&r!==t&&r!==Rt(e.updated_at)?r:e.paper_published_date||""}function Mt(e,t,r){if(e.length===0)return{points:[],sota:0,sotaModel:""};const s=Pt(e),n=e.map(u=>{var R;const h=ie((R=u.metrics)==null?void 0:R[t]);return{eval:u,value:h,date:$t(u,s)}}).filter(u=>u.value!==null&&!!u.date).sort((u,h)=>u.date.localeCompare(h.date)),i=[];let l=null;for(const u of n){const h=l==null?!0:r==="↓"?u.valuel;h&&(l=u.value),i.push({value:u.value,date:u.date,dateLabel:u.date.slice(0,7),modelName:u.eval.model_name||"",paperTitle:u.eval.paper_title||"",paperRouteId:u.eval.paper_arxiv_id||u.eval.paper_id||null,isSota:h})}const d=e.map(u=>{var h;return{eval:u,value:ie((h=u.metrics)==null?void 0:h[t])}}).filter(u=>u.value!==null).sort((u,h)=>r==="↓"?u.value-h.value:h.value-u.value)[0],f=(d==null?void 0:d.value)??0,x=(d==null?void 0:d.eval.model_name)||(d==null?void 0:d.eval.paper_title)||"";return{points:i,sota:f,sotaModel:x}}function Qe(e,t,r,s){const n=t.find(i=>i.id===s);if(e.length===0)return null;if(n!=null&&n.task_id&&e.some(i=>i.id===n.task_id))return n.task_id;if(r){const i=e.find(l=>l.slug===r);if(i)return i.id}if(e.length===1)return e[0].id;if(t.length>0){const i=new Map;for(const d of t)i.set(d.task_id,(i.get(d.task_id)||0)+1);let l=null,c=-1;for(const d of e){const f=i.get(d.id)||0;f>c&&(c=f,l=d.id)}if(l)return l}return e[0].id}function Tt(e){var _,X,Y;const{evaluations:t,tasks:r,taskSlug:s,highlightEvalId:n,parameterBound:i,showMoreMetrics:l,fittingMetricCount:c=1}=e,d=Qe(r,t,s,n),f=r.find(o=>o.id===d)||r[0]||null,x=t.find(o=>o.id===n),u=_t(t,d,e.hideClosed),h=Et(u.visible),R=Le(h,i),E=e.configuredMetrics.map(o=>o.metric_name),L=Array.from(new Set(h.flatMap(o=>[...o.best_metric?[o.best_metric]:[],...Object.keys(o.metrics||{})]))),S=E.length?E:L,g=new Map;for(const o of h){const m=o.best_metric;!m||ie(o.metrics[m])===null||E.length&&!S.includes(m)||g.set(m,(g.get(m)||0)+1)}const k=((_=[...g].sort((o,m)=>m[1]-o[1])[0])==null?void 0:_[0])||S[0]||"",j=S.find(o=>{var m;return o.toLocaleLowerCase()===((m=e.metric)==null?void 0:m.trim().toLocaleLowerCase())})||(x==null?void 0:x.best_metric)||k,D=((X=e.directions)==null?void 0:X.directions[j])==="lower_is_better"?"↓":"↑",W=j&&S.includes(j)?[j,...S.filter(o=>o!==j)]:S,w=W.length?l?W:W.slice(0,Math.max(1,c)):j?[j]:[],q=R.slice().sort((o,m)=>{const p=ie(o.metrics[j]),y=ie(m.metrics[j]);return p!==null&&y!==null?D==="↓"?p-y:y-p:p!==null?-1:y!==null?1:Ie(o,j)-Ie(m,j)});let I=null,N=0;const Q=q.map((o,m)=>{const p=ie(o.metrics[j]);return p!==null&&p!==I&&(I=p,N=m+1),{evaluation:o,rank:p===null?null:N,isHighlighted:Nt(o,n)}}),{points:z,sota:ee,sotaModel:O}=Mt(R,j,D),$=i===void 0?e.initialSummary:void 0,U=e.ready.evaluations&&e.ready.tasks&&e.ready.directions&&(!d||e.ready.metrics),K={parameter_coverage_known:h.filter(o=>o.parameterCount!==null).length,parameter_coverage_total:h.length};return{currentTaskId:d,primaryTask:f,activeMetric:j,arrow:D,allowedMetrics:S,orderedMetrics:W,visibleMetrics:w,rows:Q,chartPoints:z,highlightedEval:((Y=Q.find(o=>o.isHighlighted))==null?void 0:Y.evaluation)||null,hiddenClosedEvals:u.hiddenClosed,hiddenClosedTopEval:u.topHiddenClosed,parameterBound:i,parameterCoverage:K,hasParameterMetadata:K.parameter_coverage_known>0,parameterFilters:Ge.map(o=>({...o,selected:i===o.maxParametersExclusive,disabled:i!==o.maxParametersExclusive&&Le(h,o.maxParametersExclusive).length===0})),displayedMetric:U?j:$==null?void 0:$.metric,displayedSota:U?ee:$==null?void 0:$.value,displayedSotaModel:U?O:$==null?void 0:$.model_name,isSummaryLoading:!U&&!$,isInitialFilteredViewLoading:i!==void 0&&!U}}function Ft(e,t,r,s=1,n=0){const i=e-t.fixed-(r?t.harness:0);if(t.metric<=0)return 1;const l=Math.floor(i/t.metric);if(lr+he(t,s),0),harness:he(t,"--bm-harness-width"),metric:he(t,"--bm-metric-width")}}const It=20;function Ae(e,t){return e?a.jsx(oe,{title:e}):t||"—"}function At({model:e,showHarness:t,setMetric:r,highlightRowRef:s,onFittingMetricCountChange:n}){const{rows:i,visibleMetrics:l,activeMetric:c,arrow:d}=e,[f,x]=F.useState(null);return F.useEffect(()=>{if(!f)return;const u=()=>{f.classList.toggle("has-horizontal-overflow",f.scrollWidth>f.clientWidth);const R=f.firstElementChild;if(!R)return;const E=f.clientWidth,L=Lt(R),S=document.documentElement,g=S.scrollHeight>S.clientHeight?0:It;n(k=>Ft(E,L,t,k,g))},h=new ResizeObserver(u);return h.observe(f),f.firstElementChild&&h.observe(f.firstElementChild),u(),()=>h.disconnect()},[f,t,n]),a.jsx("div",{ref:x,className:"bm-table-scroll",role:"region","aria-label":"Leaderboard metrics",tabIndex:0,children:a.jsxs("table",{id:"benchmark-leaderboard",className:"bm-table",style:{"--bm-metric-count":l.length,"--bm-harness-count":t?1:0},children:[a.jsxs("colgroup",{children:[a.jsx("col",{className:"bm-width-rank"}),a.jsx("col",{className:"bm-width-model"}),a.jsx("col",{className:"bm-width-parameters"}),t&&a.jsx("col",{className:"bm-width-harness"}),l.map(u=>a.jsx("col",{className:"bm-width-metric"},u)),a.jsx("col",{}),a.jsx("col",{className:"bm-width-year"})]}),a.jsx("thead",{children:a.jsxs("tr",{children:[a.jsx("th",{className:"col-rank",children:"Rank"}),a.jsx("th",{className:"col-model",children:"Model"}),a.jsx("th",{className:"col-parameters",children:"Parameters"}),t&&a.jsx("th",{className:"col-harness",children:"Harness"}),l.map(u=>{const h=u===c;return a.jsx("th",{className:`col-value ${h?"is-active":""}`,"aria-sort":h?d==="↓"?"ascending":"descending":"none",children:a.jsxs("button",{type:"button",className:"bm-metric-header",onClick:()=>r(u),"aria-pressed":h,title:`Sort by ${u}`,children:[u,h?` ${d}`:""]})},u)}),a.jsx("th",{className:"col-paper",children:"Paper"}),a.jsx("th",{className:"col-year",children:"Year"})]})}),a.jsx("tbody",{children:i.map(({evaluation:u,rank:h,isHighlighted:R})=>{var S;const E=u.paper_arxiv_id||u.paper_id,L=u.paper_title||(u.paper_arxiv_id?`arXiv:${u.paper_arxiv_id}`:null);return a.jsxs("tr",{ref:R?s:void 0,className:R?"is-highlighted":void 0,children:[a.jsx("td",{className:"col-rank",children:h??"—"}),a.jsxs("td",{className:"col-model",children:[R&&a.jsx("span",{className:"bm-row-marker","aria-hidden":"true"}),u.hf_model_url?a.jsx("a",{href:u.hf_model_url,target:"_blank",rel:"noopener noreferrer",className:"bm-model-link",title:`Open ${u.model_name||"model"} on Hugging Face`,children:u.model_name||"—"}):u.model_name||"—",u.is_open===!1&&a.jsx(ft,{}),(u.external??u.is_external)&&a.jsx(pt,{sourceUrl:u.source_url||u.external_source_url||u.result_url})]}),a.jsx("td",{className:"col-parameters",title:u.parameterCount===null?void 0:u.parameterCount.toLocaleString("en-US"),"aria-label":u.parameterCount===null?"Parameters unknown":`${u.parameterCount.toLocaleString("en-US")} parameters`,children:u.parameterCount===null?"—":kt(u.parameterCount)}),t&&a.jsx("td",{className:"col-harness",children:u.harness||"—"}),l.map(g=>{var j;const k=g===c,B=(j=u.metrics)==null?void 0:j[g];return a.jsx("td",{className:`col-value${k?" is-active":""}${k&&h===1?" is-best":""}`,children:B!=null&&B!==""?le(B):"—"},g)}),a.jsx("td",{className:"col-paper",children:E?a.jsx(ne,{to:`/paper/${E}`,title:u.paper_title||L||void 0,children:Ae(u.paper_title,L)}):Ae(u.paper_title,L)}),a.jsx("td",{className:"col-year",children:((S=u.evaluated_on||u.paper_published_date)==null?void 0:S.slice(0,4))||"—"})]},u.id)})})]})})}function Be(e){const t=e.length===7?`${e}-01`:e,r=new Date(t).getTime();return Number.isFinite(r)?r:0}const fe=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function pe(e){const t=new Date(e);return{year:t.getFullYear(),month:t.getMonth()}}function Bt(e,t){if(e===t){const{year:d,month:f}=pe(e);return[{timestamp:new Date(d,f,1).getTime(),key:`${d}-${f}`,label:`${fe[f]} ${d}`}]}const r=pe(e),s=pe(t);if(r.year===s.year){const d=s.month-r.month+1;let f=1;const x=12;d>x&&(f=Math.ceil(d/x));const u=[];for(let h=r.month;h<=s.month;h+=f)u.push({timestamp:new Date(r.year,h,1).getTime(),key:`${r.year}-${h}`,label:d<=3?`${fe[h]} ${r.year}`:fe[h]});return u}const n=s.year-r.year+1;let i=1;const l=12;n>l&&(i=Math.ceil(n/l));const c=[];for(let d=r.year;d<=s.year;d+=i)c.push({timestamp:new Date(d,0,1).getTime(),key:String(d),label:String(d)});return c}const Dt=({points:e,metric:t})=>{const r=ot(),[s,n]=F.useState(null),i=880,l=320,c=60,d=30,f=40,x=50,u=e.map(o=>o.value),h=Math.min(...u),E=Math.max(...u)-h||1,L=i-c-d,S=l-f-x,g=e.map(o=>Be(o.date)),k=Math.min(...g),B=Math.max(...g),j=B-k||1,D=o=>k===B?c+L/2:c+(o-k)/j*L,W=e.map((o,m)=>{const p=D(Be(o.date)),y=(o.value-h)/E,P=f+S*(1-y);return{x:p,y:P,data:o,idx:m}}),w=W.filter(o=>o.data.isSota);let q="";if(w.length>=2){q=`M${w[0].x},${w[0].y}`;for(let o=1;o{const m=o.data.modelName||o.data.paperTitle||"";if(!m)return null;const p=m.length>22?m.slice(0,21)+"…":m,y=p.length*I;let P=o.x-y/2,C=o.x+y/2,v="middle";return Pi-d&&(C=i-d,P=C-y,v="end"),{x:v==="start"?c:v==="end"?i-d:o.x,y:o.y-Q,text:p,anchor:v,left:P,right:C}},ee=[],O=w.length>0?z(w[w.length-1]):null;let $=-1/0;for(let o=0;oO.left-N||($=m.right,ee.push({x:m.x,y:m.y,text:m.text,anchor:m.anchor})))}O&&ee.push({x:O.x,y:O.y,text:O.text,anchor:O.anchor});const U=Bt(k,B),K=5,_=o=>n(m=>m===o?null:m),X=o=>{o&&r(`/paper/${o}`)},Y=(o,m)=>{const y=`${o.data.modelName||o.data.paperTitle||"Unknown model"}: ${le(o.data.value)} on ${o.data.dateLabel}`,P=!!o.data.paperRouteId;return a.jsxs("g",{children:[m,a.jsx("circle",{cx:o.x,cy:o.y,r:"10",fill:"transparent",style:{cursor:P?"pointer":"default",outline:"none"},tabIndex:0,role:P?"link":"img","aria-label":y,onMouseEnter:()=>n(o.idx),onMouseLeave:()=>_(o.idx),onFocus:()=>n(o.idx),onBlur:()=>_(o.idx),onClick:()=>X(o.data.paperRouteId),onKeyDown:C=>{P&&(C.key==="Enter"||C.key===" ")&&(C.preventDefault(),X(o.data.paperRouteId))},children:a.jsx("title",{children:y})})]},o.idx)};return a.jsxs("svg",{width:"100%",viewBox:`0 0 ${i} ${l}`,style:{display:"block"},children:[a.jsx("text",{x:c-38,y:f+S/2,fontSize:"11",fontFamily:"var(--mono)",fill:"var(--ink-faint)",textAnchor:"middle",transform:`rotate(-90 ${c-38} ${f+S/2})`,children:t}),Array.from({length:K}).map((o,m)=>{const p=m/(K-1),y=f+S*(1-p),P=h+E*p;return a.jsxs("g",{children:[a.jsx("line",{x1:c,y1:y,x2:i-d,y2:y,stroke:"var(--hairline)",strokeWidth:"1"}),a.jsx("text",{x:c-10,y:y+4,fontSize:"11",fontFamily:"var(--mono)",fill:"var(--ink-faint)",textAnchor:"end",children:le(P)})]},m)}),U.map(o=>{const m=D(o.timestamp);return a.jsx("text",{x:m,y:l-x+18,fontSize:"11",fontFamily:"var(--mono)",fill:"var(--ink-soft)",textAnchor:"middle",children:o.label},o.key)}),W.filter(o=>!o.data.isSota).map(o=>{const m=s===o.idx;return Y(o,a.jsx("circle",{cx:o.x,cy:o.y,r:m?3:2,fill:"var(--ink-faint)",opacity:m?1:.45,style:{transition:"r 0.12s ease, opacity 0.12s ease"}}))}),q&&a.jsx("path",{d:q,stroke:"var(--accent)",strokeWidth:"2",fill:"none",strokeLinejoin:"round",strokeLinecap:"round"}),w.map(o=>{const m=s===o.idx;return Y(o,a.jsx("circle",{cx:o.x,cy:o.y,r:m?4.5:3,fill:m?"var(--accent)":"var(--bg-elevated)",stroke:"var(--accent)",strokeWidth:"1.5",style:{transition:"r 0.12s ease, fill 0.12s ease"}}))}),ee.map((o,m)=>a.jsx("text",{x:o.x,y:o.y,fontSize:"9.5",fontFamily:"var(--mono)",fill:"var(--ink-soft)",textAnchor:o.anchor,pointerEvents:"none",style:{paintOrder:"stroke",stroke:"var(--bg-elevated)",strokeWidth:3,strokeLinejoin:"round"},children:o.text},`label-${m}`)),s!==null&&W[s]&&(()=>{const o=W[s],m=o.data.modelName||o.data.paperTitle||"Unknown model",y=`${m.length>40?m.slice(0,39)+"…":m}: ${le(o.data.value)}`,C=Math.max(120,Math.min(340,y.length*6.6+24)),v=30;let H=o.x-C/2;Hi-d&&(H=i-d-C);const G=o.y-v-14>=f?o.y-v-12:o.y+12;return a.jsxs("g",{pointerEvents:"none",children:[a.jsx("rect",{x:H,y:G,width:C,height:v,rx:"6",ry:"6",fill:"var(--bg-elevated)",stroke:"var(--hairline-strong)",strokeWidth:"1",style:{filter:"drop-shadow(0 2px 6px rgba(0,0,0,0.08))"}}),a.jsx("text",{x:H+12,y:G+19,fontSize:"12",fontFamily:"var(--sans)",fill:"var(--ink)",fontWeight:500,children:y})]})})()]})};function Ht(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"),n=r.createElement("a");return r.head.appendChild(s),r.body.appendChild(n),t&&(s.href=t),n.href=e,n.href}const Vt=(()=>{let e=0;const t=()=>`0000${(Math.random()*36**4<<0).toString(36)}`.slice(-4);return()=>(e+=1,`u${t()}${e}`)})();function Z(e){const t=[];for(let r=0,s=e.length;rV||e.height>V)&&(e.width>V&&e.height>V?e.width>e.height?(e.height*=V/e.width,e.width=V):(e.width*=V/e.height,e.height=V):e.width>V?(e.height*=V/e.width,e.width=V):(e.width*=V/e.height,e.height=V))}function zt(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]),n=s.length,i=new Uint8Array(n);for(let l=0;l{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 Gt(e,t,r){const s="http://www.w3.org/2000/svg",n=document.createElementNS(s,"svg"),i=document.createElementNS(s,"foreignObject");return n.setAttribute("width",`${t}`),n.setAttribute("height",`${r}`),n.setAttribute("viewBox",`0 0 ${t} ${r}`),i.setAttribute("width","100%"),i.setAttribute("height","100%"),i.setAttribute("x","0"),i.setAttribute("y","0"),i.setAttribute("externalResourcesRequired","true"),n.appendChild(i),i.appendChild(e),Kt(n)}const A=(e,t)=>{if(e instanceof t)return!0;const r=Object.getPrototypeOf(e);return r===null?!1:r.constructor.name===t.name||A(r,t)};function Qt(e){const t=e.getPropertyValue("content");return`${e.cssText} content: '${t.replace(/'|"/g,"")}';`}function Xt(e,t){return Xe(t).map(r=>{const s=e.getPropertyValue(r),n=e.getPropertyPriority(r);return`${r}: ${s}${n?" !important":""};`}).join(" ")}function Yt(e,t,r,s){const n=`.${e}:${t}`,i=r.cssText?Qt(r):Xt(r,s);return document.createTextNode(`${n}{${i}}`)}function De(e,t,r,s){const n=window.getComputedStyle(e,r),i=n.getPropertyValue("content");if(i===""||i==="none")return;const l=Vt();try{t.className=`${t.className} ${l}`}catch{return}const c=document.createElement("style");c.appendChild(Yt(l,r,n,s)),t.appendChild(c)}function Jt(e,t,r){De(e,t,":before",r),De(e,t,":after",r)}const He="application/font-woff",Ve="image/jpeg",Zt={woff:He,woff2:He,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:Ve,jpeg:Ve,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml",webp:"image/webp"};function er(e){const t=/\.([^./]*?)$/g.exec(e);return t?t[1]:""}function ye(e){const t=er(e).toLowerCase();return Zt[t]||""}function tr(e){return e.split(/,/)[1]}function xe(e){return e.search(/^(data:)/)!==-1}function rr(e,t){return`data:${t};base64,${e}`}async function Je(e,t,r){const s=await fetch(e,t);if(s.status===404)throw new Error(`Resource "${s.url}" not found`);const n=await s.blob();return new Promise((i,l)=>{const c=new FileReader;c.onerror=l,c.onloadend=()=>{try{i(r({res:s,result:c.result}))}catch(d){l(d)}},c.readAsDataURL(n)})}const ge={};function ar(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 we(e,t,r){const s=ar(e,t,r.includeQueryParams);if(ge[s]!=null)return ge[s];r.cacheBust&&(e+=(/\?/.test(e)?"&":"?")+new Date().getTime());let n;try{const i=await Je(e,r.fetchRequestInit,({res:l,result:c})=>(t||(t=l.headers.get("Content-Type")||""),tr(c)));n=rr(i,t)}catch(i){n=r.imagePlaceholder||"";let l=`Failed to fetch resource: ${e}`;i&&(l=typeof i=="string"?i:i.message),l&&console.warn(l)}return ge[s]=n,n}async function sr(e){const t=e.toDataURL();return t==="data:,"?e.cloneNode(!1):ue(t)}async function nr(e,t){if(e.currentSrc){const i=document.createElement("canvas"),l=i.getContext("2d");i.width=e.clientWidth,i.height=e.clientHeight,l==null||l.drawImage(e,0,0,i.width,i.height);const c=i.toDataURL();return ue(c)}const r=e.poster,s=ye(r),n=await we(r,s,t);return ue(n)}async function ir(e,t){var r;try{if(!((r=e==null?void 0:e.contentDocument)===null||r===void 0)&&r.body)return await me(e.contentDocument.body,t,!0)}catch{}return e.cloneNode(!1)}async function lr(e,t){return A(e,HTMLCanvasElement)?sr(e):A(e,HTMLVideoElement)?nr(e,t):A(e,HTMLIFrameElement)?ir(e,t):e.cloneNode(Ze(e))}const or=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SLOT",Ze=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SVG";async function cr(e,t,r){var s,n;if(Ze(t))return t;let i=[];return or(e)&&e.assignedNodes?i=Z(e.assignedNodes()):A(e,HTMLIFrameElement)&&(!((s=e.contentDocument)===null||s===void 0)&&s.body)?i=Z(e.contentDocument.body.childNodes):i=Z(((n=e.shadowRoot)!==null&&n!==void 0?n:e).childNodes),i.length===0||A(e,HTMLVideoElement)||await i.reduce((l,c)=>l.then(()=>me(c,r)).then(d=>{d&&t.appendChild(d)}),Promise.resolve()),t}function dr(e,t,r){const s=t.style;if(!s)return;const n=window.getComputedStyle(e);n.cssText?(s.cssText=n.cssText,s.transformOrigin=n.transformOrigin):Xe(r).forEach(i=>{let l=n.getPropertyValue(i);i==="font-size"&&l.endsWith("px")&&(l=`${Math.floor(parseFloat(l.substring(0,l.length-2)))-.1}px`),A(e,HTMLIFrameElement)&&i==="display"&&l==="inline"&&(l="block"),i==="d"&&t.getAttribute("d")&&(l=`path(${t.getAttribute("d")})`),s.setProperty(i,l,n.getPropertyPriority(i))})}function ur(e,t){A(e,HTMLTextAreaElement)&&(t.innerHTML=e.value),A(e,HTMLInputElement)&&t.setAttribute("value",e.value)}function mr(e,t){if(A(e,HTMLSelectElement)){const r=t,s=Array.from(r.children).find(n=>e.value===n.getAttribute("value"));s&&s.setAttribute("selected","")}}function hr(e,t,r){return A(t,Element)&&(dr(e,t,r),Jt(e,t,r),ur(e,t),mr(e,t)),t}async function fr(e,t){const r=e.querySelectorAll?e.querySelectorAll("use"):[];if(r.length===0)return e;const s={};for(let i=0;ilr(s,t)).then(s=>cr(e,s,t)).then(s=>hr(e,s,t)).then(s=>fr(s,t))}const et=/url\((['"]?)([^'"]+?)\1\)/g,pr=/url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g,gr=/src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;function xr(e){const t=e.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1");return new RegExp(`(url\\(['"]?)(${t})(['"]?\\))`,"g")}function br(e){const t=[];return e.replace(et,(r,s,n)=>(t.push(n),r)),t.filter(r=>!xe(r))}async function yr(e,t,r,s,n){try{const i=r?Ht(t,r):t,l=ye(t);let c;return n||(c=await we(i,l,s)),e.replace(xr(t),`$1${c}$3`)}catch{}return e}function wr(e,{preferredFontFormat:t}){return t?e.replace(gr,r=>{for(;;){const[s,,n]=pr.exec(r)||[];if(!n)return"";if(n===t)return`src: ${s};`}}):e}function tt(e){return e.search(et)!==-1}async function rt(e,t,r){if(!tt(e))return e;const s=wr(e,r);return br(s).reduce((i,l)=>i.then(c=>yr(c,l,t,r)),Promise.resolve(s))}async function se(e,t,r){var s;const n=(s=t.style)===null||s===void 0?void 0:s.getPropertyValue(e);if(n){const i=await rt(n,null,r);return t.style.setProperty(e,i,t.style.getPropertyPriority(e)),!0}return!1}async function vr(e,t){await se("background",e,t)||await se("background-image",e,t),await se("mask",e,t)||await se("-webkit-mask",e,t)||await se("mask-image",e,t)||await se("-webkit-mask-image",e,t)}async function jr(e,t){const r=A(e,HTMLImageElement);if(!(r&&!xe(e.src))&&!(A(e,SVGImageElement)&&!xe(e.href.baseVal)))return;const s=r?e.src:e.href.baseVal,n=await we(s,ye(s),t);await new Promise((i,l)=>{e.onload=i,e.onerror=t.onImageErrorHandler?(...d)=>{try{i(t.onImageErrorHandler(...d))}catch(f){l(f)}}:l;const c=e;c.decode&&(c.decode=i),c.loading==="lazy"&&(c.loading="eager"),r?(e.srcset="",e.src=n):e.href.baseVal=n})}async function _r(e,t){const s=Z(e.childNodes).map(n=>at(n,t));await Promise.all(s).then(()=>e)}async function at(e,t){A(e,Element)&&(await vr(e,t),await jr(e,t),await _r(e,t))}function Sr(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(n=>{r[n]=s[n]}),e}const We={};async function Oe(e){let t=We[e];if(t!=null)return t;const s=await(await fetch(e)).text();return t={url:e,cssText:s},We[e]=t,t}async function Ue(e,t){let r=e.cssText;const s=/url\(["']?([^"')]+)["']?\)/g,i=(r.match(/url\([^)]+\)/g)||[]).map(async l=>{let c=l.replace(s,"$1");return c.startsWith("https://")||(c=new URL(c,e.url).href),Je(c,t.fetchRequestInit,({result:d})=>(r=r.replace(l,`url(${d})`),[l,d]))});return Promise.all(i).then(()=>r)}function qe(e){if(e==null)return[];const t=[],r=/(\/\*[\s\S]*?\*\/)/gi;let s=e.replace(r,"");const n=new RegExp("((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)})","gi");for(;;){const d=n.exec(s);if(d===null)break;t.push(d[0])}s=s.replace(n,"");const i=/@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi,l="((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})",c=new RegExp(l,"gi");for(;;){let d=i.exec(s);if(d===null){if(d=c.exec(s),d===null)break;i.lastIndex=c.lastIndex}else c.lastIndex=i.lastIndex;t.push(d[0])}return t}async function kr(e,t){const r=[],s=[];return e.forEach(n=>{if("cssRules"in n)try{Z(n.cssRules||[]).forEach((i,l)=>{if(i.type===CSSRule.IMPORT_RULE){let c=l+1;const d=i.href,f=Oe(d).then(x=>Ue(x,t)).then(x=>qe(x).forEach(u=>{try{n.insertRule(u,u.startsWith("@import")?c+=1:n.cssRules.length)}catch(h){console.error("Error inserting rule from remote css",{rule:u,error:h})}})).catch(x=>{console.error("Error loading remote css",x.toString())});s.push(f)}})}catch(i){const l=e.find(c=>c.href==null)||document.styleSheets[0];n.href!=null&&s.push(Oe(n.href).then(c=>Ue(c,t)).then(c=>qe(c).forEach(d=>{l.insertRule(d,l.cssRules.length)})).catch(c=>{console.error("Error loading remote stylesheet",c)})),console.error("Error inlining remote css file",i)}}),Promise.all(s).then(()=>(e.forEach(n=>{if("cssRules"in n)try{Z(n.cssRules||[]).forEach(i=>{r.push(i)})}catch(i){console.error(`Error while reading CSS rules from ${n.href}`,i)}}),r))}function Cr(e){return e.filter(t=>t.type===CSSRule.FONT_FACE_RULE).filter(t=>tt(t.style.getPropertyValue("src")))}async function Er(e,t){if(e.ownerDocument==null)throw new Error("Provided element is not within a Document");const r=Z(e.ownerDocument.styleSheets),s=await kr(r,t);return Cr(s)}function st(e){return e.trim().replace(/["']/g,"")}function Nr(e){const t=new Set;function r(s){(s.style.fontFamily||getComputedStyle(s).fontFamily).split(",").forEach(i=>{t.add(st(i))}),Array.from(s.children).forEach(i=>{i instanceof HTMLElement&&r(i)})}return r(e),t}async function Rr(e,t){const r=await Er(e,t),s=Nr(e);return(await Promise.all(r.filter(i=>s.has(st(i.style.fontFamily))).map(i=>{const l=i.parentStyleSheet?i.parentStyleSheet.href:null;return rt(i.cssText,l,t)}))).join(` +import{r as F,j as a,y as le,L as ne,b as ot,h as ct,u as dt,d as ut,k as mt}from"./index-hxawG6mk.js";import{R as ht}from"./ResearchFollowButton-uts1MEpQ.js";import{u as te}from"./useQuery-B7vCF2Os.js";import{c as re}from"./catalog-ePebz7GX.js";import{C as ft,E as pt,e as gt}from"./ExternalSourceEvalBadge-CxgGG_57.js";import{L as oe}from"./LatexTitle-QTkECjbh.js";import{S as Ke}from"./switch-BC-W3U4C.js";import{I as xt}from"./components-Djdw_Z-e.js";import{S as ce}from"./skeleton-CRfsRMNe.js";import{A as bt,a as yt}from"./alert-2LCyXuCE.js";import{B as wt}from"./BenchmarkTrendSparkline-CKdWZt_L.js";import{s as vt}from"./safeExternalHref-CkBrsh84.js";import{s as jt}from"./slug-BpH-Nkvz.js";import"./useMutation-gPqxjZGO.js";import"./research-25A5rLuK.js";import"./plus-C1naIkSJ.js";import"./papers-B0ysePyJ.js";import"./hover-card-DEHIu6q-.js";import"./index-DvHdqmQp.js";import"./paperQueryKeys-BP2E-0yf.js";import"./transform-DfrN0kQW.js";function _t(e,t,r){const s=t?(e??[]).filter(l=>l.task_id===t):e??[],n=s.filter(l=>l.is_open===!1),i=n.reduce((l,c)=>l?(c.best_rank??Number.POSITIVE_INFINITY)<(l.best_rank??Number.POSITIVE_INFINITY)?c:l:c,null);return{visible:r?s.filter(l=>l.is_open!==!1):s,hiddenClosed:n,topHiddenClosed:i}}function ie(e){if(e==null)return null;if(typeof e=="number")return Number.isFinite(e)?e:null;const t=e.includes("±")?e.split("±")[0].trim():e.trim(),r=parseFloat(t);return Number.isFinite(r)?r:null}const Ge=[{label:"All",maxParametersExclusive:void 0},{label:"<10M",maxParametersExclusive:1e7},{label:"<100M",maxParametersExclusive:1e8},{label:"<1B",maxParametersExclusive:1e9},{label:"<3B",maxParametersExclusive:3e9},{label:"<6B",maxParametersExclusive:6e9},{label:"<12B",maxParametersExclusive:12e9},{label:"<32B",maxParametersExclusive:32e9},{label:"<128B",maxParametersExclusive:128e9},{label:"<500B",maxParametersExclusive:5e11}];function St(e){const t=e===null?void 0:Number(e);return Ge.some(r=>r.maxParametersExclusive===t)?t:void 0}function kt(e){return new Intl.NumberFormat("en",{notation:"compact",maximumSignificantDigits:3}).format(e)}function Ct(e){return[e.paper_id,e.task_id,e.dataset_id,e.model_name,e.harness??""].join("|")}function Et(e){const t=new Map;for(const r of e){const s=Ct(r),n=t.get(s);if(!n){t.set(s,{...r,metrics:{...r.metrics||{}},sourceEvaluationIds:[r.id],ranksByMetric:r.best_metric&&r.best_rank!=null?{[r.best_metric]:r.best_rank}:{},parameterCount:r.num_parameters??null,hasParameterConflict:!1});continue}n.metrics={...n.metrics,...r.metrics||{}},n.sourceEvaluationIds.push(r.id),r.best_metric&&r.best_rank!=null&&(n.ranksByMetric[r.best_metric]=r.best_rank),r.num_parameters!=null&&!n.hasParameterConflict&&(n.parameterCount===null?n.parameterCount=r.num_parameters:n.parameterCount!==r.num_parameters&&(n.parameterCount=null,n.hasParameterConflict=!0))}return Array.from(t.values())}function Le(e,t){return t===void 0?e:e.filter(r=>r.parameterCount!==null&&r.parameterCounts+n,0);for(const[s,n]of t)if(n>=2&&n*2>r)return s;return null}function $t(e,t){const r=e.evaluated_on;return r&&r!==t&&r!==Rt(e.updated_at)?r:e.paper_published_date||""}function Mt(e,t,r){if(e.length===0)return{points:[],sota:0,sotaModel:""};const s=Pt(e),n=e.map(u=>{var R;const h=ie((R=u.metrics)==null?void 0:R[t]);return{eval:u,value:h,date:$t(u,s)}}).filter(u=>u.value!==null&&!!u.date).sort((u,h)=>u.date.localeCompare(h.date)),i=[];let l=null;for(const u of n){const h=l==null?!0:r==="↓"?u.valuel;h&&(l=u.value),i.push({value:u.value,date:u.date,dateLabel:u.date.slice(0,7),modelName:u.eval.model_name||"",paperTitle:u.eval.paper_title||"",paperRouteId:u.eval.paper_arxiv_id||u.eval.paper_id||null,isSota:h})}const d=e.map(u=>{var h;return{eval:u,value:ie((h=u.metrics)==null?void 0:h[t])}}).filter(u=>u.value!==null).sort((u,h)=>r==="↓"?u.value-h.value:h.value-u.value)[0],f=(d==null?void 0:d.value)??0,x=(d==null?void 0:d.eval.model_name)||(d==null?void 0:d.eval.paper_title)||"";return{points:i,sota:f,sotaModel:x}}function Qe(e,t,r,s){const n=t.find(i=>i.id===s);if(e.length===0)return null;if(n!=null&&n.task_id&&e.some(i=>i.id===n.task_id))return n.task_id;if(r){const i=e.find(l=>l.slug===r);if(i)return i.id}if(e.length===1)return e[0].id;if(t.length>0){const i=new Map;for(const d of t)i.set(d.task_id,(i.get(d.task_id)||0)+1);let l=null,c=-1;for(const d of e){const f=i.get(d.id)||0;f>c&&(c=f,l=d.id)}if(l)return l}return e[0].id}function Tt(e){var _,X,Y;const{evaluations:t,tasks:r,taskSlug:s,highlightEvalId:n,parameterBound:i,showMoreMetrics:l,fittingMetricCount:c=1}=e,d=Qe(r,t,s,n),f=r.find(o=>o.id===d)||r[0]||null,x=t.find(o=>o.id===n),u=_t(t,d,e.hideClosed),h=Et(u.visible),R=Le(h,i),E=e.configuredMetrics.map(o=>o.metric_name),L=Array.from(new Set(h.flatMap(o=>[...o.best_metric?[o.best_metric]:[],...Object.keys(o.metrics||{})]))),S=E.length?E:L,g=new Map;for(const o of h){const m=o.best_metric;!m||ie(o.metrics[m])===null||E.length&&!S.includes(m)||g.set(m,(g.get(m)||0)+1)}const k=((_=[...g].sort((o,m)=>m[1]-o[1])[0])==null?void 0:_[0])||S[0]||"",j=S.find(o=>{var m;return o.toLocaleLowerCase()===((m=e.metric)==null?void 0:m.trim().toLocaleLowerCase())})||(x==null?void 0:x.best_metric)||k,D=((X=e.directions)==null?void 0:X.directions[j])==="lower_is_better"?"↓":"↑",W=j&&S.includes(j)?[j,...S.filter(o=>o!==j)]:S,w=W.length?l?W:W.slice(0,Math.max(1,c)):j?[j]:[],q=R.slice().sort((o,m)=>{const p=ie(o.metrics[j]),y=ie(m.metrics[j]);return p!==null&&y!==null?D==="↓"?p-y:y-p:p!==null?-1:y!==null?1:Ie(o,j)-Ie(m,j)});let I=null,N=0;const Q=q.map((o,m)=>{const p=ie(o.metrics[j]);return p!==null&&p!==I&&(I=p,N=m+1),{evaluation:o,rank:p===null?null:N,isHighlighted:Nt(o,n)}}),{points:z,sota:ee,sotaModel:O}=Mt(R,j,D),$=i===void 0?e.initialSummary:void 0,U=e.ready.evaluations&&e.ready.tasks&&e.ready.directions&&(!d||e.ready.metrics),K={parameter_coverage_known:h.filter(o=>o.parameterCount!==null).length,parameter_coverage_total:h.length};return{currentTaskId:d,primaryTask:f,activeMetric:j,arrow:D,allowedMetrics:S,orderedMetrics:W,visibleMetrics:w,rows:Q,chartPoints:z,highlightedEval:((Y=Q.find(o=>o.isHighlighted))==null?void 0:Y.evaluation)||null,hiddenClosedEvals:u.hiddenClosed,hiddenClosedTopEval:u.topHiddenClosed,parameterBound:i,parameterCoverage:K,hasParameterMetadata:K.parameter_coverage_known>0,parameterFilters:Ge.map(o=>({...o,selected:i===o.maxParametersExclusive,disabled:i!==o.maxParametersExclusive&&Le(h,o.maxParametersExclusive).length===0})),displayedMetric:U?j:$==null?void 0:$.metric,displayedSota:U?ee:$==null?void 0:$.value,displayedSotaModel:U?O:$==null?void 0:$.model_name,isSummaryLoading:!U&&!$,isInitialFilteredViewLoading:i!==void 0&&!U}}function Ft(e,t,r,s=1,n=0){const i=e-t.fixed-(r?t.harness:0);if(t.metric<=0)return 1;const l=Math.floor(i/t.metric);if(lr+he(t,s),0),harness:he(t,"--bm-harness-width"),metric:he(t,"--bm-metric-width")}}const It=20;function Ae(e,t){return e?a.jsx(oe,{title:e}):t||"—"}function At({model:e,showHarness:t,setMetric:r,highlightRowRef:s,onFittingMetricCountChange:n}){const{rows:i,visibleMetrics:l,activeMetric:c,arrow:d}=e,[f,x]=F.useState(null);return F.useEffect(()=>{if(!f)return;const u=()=>{f.classList.toggle("has-horizontal-overflow",f.scrollWidth>f.clientWidth);const R=f.firstElementChild;if(!R)return;const E=f.clientWidth,L=Lt(R),S=document.documentElement,g=S.scrollHeight>S.clientHeight?0:It;n(k=>Ft(E,L,t,k,g))},h=new ResizeObserver(u);return h.observe(f),f.firstElementChild&&h.observe(f.firstElementChild),u(),()=>h.disconnect()},[f,t,n]),a.jsx("div",{ref:x,className:"bm-table-scroll",role:"region","aria-label":"Leaderboard metrics",tabIndex:0,children:a.jsxs("table",{id:"benchmark-leaderboard",className:"bm-table",style:{"--bm-metric-count":l.length,"--bm-harness-count":t?1:0},children:[a.jsxs("colgroup",{children:[a.jsx("col",{className:"bm-width-rank"}),a.jsx("col",{className:"bm-width-model"}),a.jsx("col",{className:"bm-width-parameters"}),t&&a.jsx("col",{className:"bm-width-harness"}),l.map(u=>a.jsx("col",{className:"bm-width-metric"},u)),a.jsx("col",{}),a.jsx("col",{className:"bm-width-year"})]}),a.jsx("thead",{children:a.jsxs("tr",{children:[a.jsx("th",{className:"col-rank",children:"Rank"}),a.jsx("th",{className:"col-model",children:"Model"}),a.jsx("th",{className:"col-parameters",children:"Parameters"}),t&&a.jsx("th",{className:"col-harness",children:"Harness"}),l.map(u=>{const h=u===c;return a.jsx("th",{className:`col-value ${h?"is-active":""}`,"aria-sort":h?d==="↓"?"ascending":"descending":"none",children:a.jsxs("button",{type:"button",className:"bm-metric-header",onClick:()=>r(u),"aria-pressed":h,title:`Sort by ${u}`,children:[u,h?` ${d}`:""]})},u)}),a.jsx("th",{className:"col-paper",children:"Paper"}),a.jsx("th",{className:"col-year",children:"Year"})]})}),a.jsx("tbody",{children:i.map(({evaluation:u,rank:h,isHighlighted:R})=>{var S;const E=u.paper_arxiv_id||u.paper_id,L=u.paper_title||(u.paper_arxiv_id?`arXiv:${u.paper_arxiv_id}`:null);return a.jsxs("tr",{ref:R?s:void 0,className:R?"is-highlighted":void 0,children:[a.jsx("td",{className:"col-rank",children:h??"—"}),a.jsxs("td",{className:"col-model",children:[R&&a.jsx("span",{className:"bm-row-marker","aria-hidden":"true"}),u.hf_model_url?a.jsx("a",{href:u.hf_model_url,target:"_blank",rel:"noopener noreferrer",className:"bm-model-link",title:`Open ${u.model_name||"model"} on Hugging Face`,children:u.model_name||"—"}):u.model_name||"—",u.is_open===!1&&a.jsx(ft,{}),(u.external??u.is_external)&&a.jsx(pt,{sourceUrl:u.source_url||u.external_source_url||u.result_url})]}),a.jsx("td",{className:"col-parameters",title:u.parameterCount===null?void 0:u.parameterCount.toLocaleString("en-US"),"aria-label":u.parameterCount===null?"Parameters unknown":`${u.parameterCount.toLocaleString("en-US")} parameters`,children:u.parameterCount===null?"—":kt(u.parameterCount)}),t&&a.jsx("td",{className:"col-harness",children:u.harness||"—"}),l.map(g=>{var j;const k=g===c,B=(j=u.metrics)==null?void 0:j[g];return a.jsx("td",{className:`col-value${k?" is-active":""}${k&&h===1?" is-best":""}`,children:B!=null&&B!==""?le(B):"—"},g)}),a.jsx("td",{className:"col-paper",children:E?a.jsx(ne,{to:`/paper/${E}`,title:u.paper_title||L||void 0,children:Ae(u.paper_title,L)}):Ae(u.paper_title,L)}),a.jsx("td",{className:"col-year",children:((S=u.evaluated_on||u.paper_published_date)==null?void 0:S.slice(0,4))||"—"})]},u.id)})})]})})}function Be(e){const t=e.length===7?`${e}-01`:e,r=new Date(t).getTime();return Number.isFinite(r)?r:0}const fe=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function pe(e){const t=new Date(e);return{year:t.getFullYear(),month:t.getMonth()}}function Bt(e,t){if(e===t){const{year:d,month:f}=pe(e);return[{timestamp:new Date(d,f,1).getTime(),key:`${d}-${f}`,label:`${fe[f]} ${d}`}]}const r=pe(e),s=pe(t);if(r.year===s.year){const d=s.month-r.month+1;let f=1;const x=12;d>x&&(f=Math.ceil(d/x));const u=[];for(let h=r.month;h<=s.month;h+=f)u.push({timestamp:new Date(r.year,h,1).getTime(),key:`${r.year}-${h}`,label:d<=3?`${fe[h]} ${r.year}`:fe[h]});return u}const n=s.year-r.year+1;let i=1;const l=12;n>l&&(i=Math.ceil(n/l));const c=[];for(let d=r.year;d<=s.year;d+=i)c.push({timestamp:new Date(d,0,1).getTime(),key:String(d),label:String(d)});return c}const Dt=({points:e,metric:t})=>{const r=ot(),[s,n]=F.useState(null),i=880,l=320,c=60,d=30,f=40,x=50,u=e.map(o=>o.value),h=Math.min(...u),E=Math.max(...u)-h||1,L=i-c-d,S=l-f-x,g=e.map(o=>Be(o.date)),k=Math.min(...g),B=Math.max(...g),j=B-k||1,D=o=>k===B?c+L/2:c+(o-k)/j*L,W=e.map((o,m)=>{const p=D(Be(o.date)),y=(o.value-h)/E,P=f+S*(1-y);return{x:p,y:P,data:o,idx:m}}),w=W.filter(o=>o.data.isSota);let q="";if(w.length>=2){q=`M${w[0].x},${w[0].y}`;for(let o=1;o{const m=o.data.modelName||o.data.paperTitle||"";if(!m)return null;const p=m.length>22?m.slice(0,21)+"…":m,y=p.length*I;let P=o.x-y/2,C=o.x+y/2,v="middle";return Pi-d&&(C=i-d,P=C-y,v="end"),{x:v==="start"?c:v==="end"?i-d:o.x,y:o.y-Q,text:p,anchor:v,left:P,right:C}},ee=[],O=w.length>0?z(w[w.length-1]):null;let $=-1/0;for(let o=0;oO.left-N||($=m.right,ee.push({x:m.x,y:m.y,text:m.text,anchor:m.anchor})))}O&&ee.push({x:O.x,y:O.y,text:O.text,anchor:O.anchor});const U=Bt(k,B),K=5,_=o=>n(m=>m===o?null:m),X=o=>{o&&r(`/paper/${o}`)},Y=(o,m)=>{const y=`${o.data.modelName||o.data.paperTitle||"Unknown model"}: ${le(o.data.value)} on ${o.data.dateLabel}`,P=!!o.data.paperRouteId;return a.jsxs("g",{children:[m,a.jsx("circle",{cx:o.x,cy:o.y,r:"10",fill:"transparent",style:{cursor:P?"pointer":"default",outline:"none"},tabIndex:0,role:P?"link":"img","aria-label":y,onMouseEnter:()=>n(o.idx),onMouseLeave:()=>_(o.idx),onFocus:()=>n(o.idx),onBlur:()=>_(o.idx),onClick:()=>X(o.data.paperRouteId),onKeyDown:C=>{P&&(C.key==="Enter"||C.key===" ")&&(C.preventDefault(),X(o.data.paperRouteId))},children:a.jsx("title",{children:y})})]},o.idx)};return a.jsxs("svg",{width:"100%",viewBox:`0 0 ${i} ${l}`,style:{display:"block"},children:[a.jsx("text",{x:c-38,y:f+S/2,fontSize:"11",fontFamily:"var(--mono)",fill:"var(--ink-faint)",textAnchor:"middle",transform:`rotate(-90 ${c-38} ${f+S/2})`,children:t}),Array.from({length:K}).map((o,m)=>{const p=m/(K-1),y=f+S*(1-p),P=h+E*p;return a.jsxs("g",{children:[a.jsx("line",{x1:c,y1:y,x2:i-d,y2:y,stroke:"var(--hairline)",strokeWidth:"1"}),a.jsx("text",{x:c-10,y:y+4,fontSize:"11",fontFamily:"var(--mono)",fill:"var(--ink-faint)",textAnchor:"end",children:le(P)})]},m)}),U.map(o=>{const m=D(o.timestamp);return a.jsx("text",{x:m,y:l-x+18,fontSize:"11",fontFamily:"var(--mono)",fill:"var(--ink-soft)",textAnchor:"middle",children:o.label},o.key)}),W.filter(o=>!o.data.isSota).map(o=>{const m=s===o.idx;return Y(o,a.jsx("circle",{cx:o.x,cy:o.y,r:m?3:2,fill:"var(--ink-faint)",opacity:m?1:.45,style:{transition:"r 0.12s ease, opacity 0.12s ease"}}))}),q&&a.jsx("path",{d:q,stroke:"var(--accent)",strokeWidth:"2",fill:"none",strokeLinejoin:"round",strokeLinecap:"round"}),w.map(o=>{const m=s===o.idx;return Y(o,a.jsx("circle",{cx:o.x,cy:o.y,r:m?4.5:3,fill:m?"var(--accent)":"var(--bg-elevated)",stroke:"var(--accent)",strokeWidth:"1.5",style:{transition:"r 0.12s ease, fill 0.12s ease"}}))}),ee.map((o,m)=>a.jsx("text",{x:o.x,y:o.y,fontSize:"9.5",fontFamily:"var(--mono)",fill:"var(--ink-soft)",textAnchor:o.anchor,pointerEvents:"none",style:{paintOrder:"stroke",stroke:"var(--bg-elevated)",strokeWidth:3,strokeLinejoin:"round"},children:o.text},`label-${m}`)),s!==null&&W[s]&&(()=>{const o=W[s],m=o.data.modelName||o.data.paperTitle||"Unknown model",y=`${m.length>40?m.slice(0,39)+"…":m}: ${le(o.data.value)}`,C=Math.max(120,Math.min(340,y.length*6.6+24)),v=30;let H=o.x-C/2;Hi-d&&(H=i-d-C);const G=o.y-v-14>=f?o.y-v-12:o.y+12;return a.jsxs("g",{pointerEvents:"none",children:[a.jsx("rect",{x:H,y:G,width:C,height:v,rx:"6",ry:"6",fill:"var(--bg-elevated)",stroke:"var(--hairline-strong)",strokeWidth:"1",style:{filter:"drop-shadow(0 2px 6px rgba(0,0,0,0.08))"}}),a.jsx("text",{x:H+12,y:G+19,fontSize:"12",fontFamily:"var(--sans)",fill:"var(--ink)",fontWeight:500,children:y})]})})()]})};function Ht(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"),n=r.createElement("a");return r.head.appendChild(s),r.body.appendChild(n),t&&(s.href=t),n.href=e,n.href}const Vt=(()=>{let e=0;const t=()=>`0000${(Math.random()*36**4<<0).toString(36)}`.slice(-4);return()=>(e+=1,`u${t()}${e}`)})();function Z(e){const t=[];for(let r=0,s=e.length;rV||e.height>V)&&(e.width>V&&e.height>V?e.width>e.height?(e.height*=V/e.width,e.width=V):(e.width*=V/e.height,e.height=V):e.width>V?(e.height*=V/e.width,e.width=V):(e.width*=V/e.height,e.height=V))}function zt(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]),n=s.length,i=new Uint8Array(n);for(let l=0;l{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 Gt(e,t,r){const s="http://www.w3.org/2000/svg",n=document.createElementNS(s,"svg"),i=document.createElementNS(s,"foreignObject");return n.setAttribute("width",`${t}`),n.setAttribute("height",`${r}`),n.setAttribute("viewBox",`0 0 ${t} ${r}`),i.setAttribute("width","100%"),i.setAttribute("height","100%"),i.setAttribute("x","0"),i.setAttribute("y","0"),i.setAttribute("externalResourcesRequired","true"),n.appendChild(i),i.appendChild(e),Kt(n)}const A=(e,t)=>{if(e instanceof t)return!0;const r=Object.getPrototypeOf(e);return r===null?!1:r.constructor.name===t.name||A(r,t)};function Qt(e){const t=e.getPropertyValue("content");return`${e.cssText} content: '${t.replace(/'|"/g,"")}';`}function Xt(e,t){return Xe(t).map(r=>{const s=e.getPropertyValue(r),n=e.getPropertyPriority(r);return`${r}: ${s}${n?" !important":""};`}).join(" ")}function Yt(e,t,r,s){const n=`.${e}:${t}`,i=r.cssText?Qt(r):Xt(r,s);return document.createTextNode(`${n}{${i}}`)}function De(e,t,r,s){const n=window.getComputedStyle(e,r),i=n.getPropertyValue("content");if(i===""||i==="none")return;const l=Vt();try{t.className=`${t.className} ${l}`}catch{return}const c=document.createElement("style");c.appendChild(Yt(l,r,n,s)),t.appendChild(c)}function Jt(e,t,r){De(e,t,":before",r),De(e,t,":after",r)}const He="application/font-woff",Ve="image/jpeg",Zt={woff:He,woff2:He,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:Ve,jpeg:Ve,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml",webp:"image/webp"};function er(e){const t=/\.([^./]*?)$/g.exec(e);return t?t[1]:""}function ye(e){const t=er(e).toLowerCase();return Zt[t]||""}function tr(e){return e.split(/,/)[1]}function xe(e){return e.search(/^(data:)/)!==-1}function rr(e,t){return`data:${t};base64,${e}`}async function Je(e,t,r){const s=await fetch(e,t);if(s.status===404)throw new Error(`Resource "${s.url}" not found`);const n=await s.blob();return new Promise((i,l)=>{const c=new FileReader;c.onerror=l,c.onloadend=()=>{try{i(r({res:s,result:c.result}))}catch(d){l(d)}},c.readAsDataURL(n)})}const ge={};function ar(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 we(e,t,r){const s=ar(e,t,r.includeQueryParams);if(ge[s]!=null)return ge[s];r.cacheBust&&(e+=(/\?/.test(e)?"&":"?")+new Date().getTime());let n;try{const i=await Je(e,r.fetchRequestInit,({res:l,result:c})=>(t||(t=l.headers.get("Content-Type")||""),tr(c)));n=rr(i,t)}catch(i){n=r.imagePlaceholder||"";let l=`Failed to fetch resource: ${e}`;i&&(l=typeof i=="string"?i:i.message),l&&console.warn(l)}return ge[s]=n,n}async function sr(e){const t=e.toDataURL();return t==="data:,"?e.cloneNode(!1):ue(t)}async function nr(e,t){if(e.currentSrc){const i=document.createElement("canvas"),l=i.getContext("2d");i.width=e.clientWidth,i.height=e.clientHeight,l==null||l.drawImage(e,0,0,i.width,i.height);const c=i.toDataURL();return ue(c)}const r=e.poster,s=ye(r),n=await we(r,s,t);return ue(n)}async function ir(e,t){var r;try{if(!((r=e==null?void 0:e.contentDocument)===null||r===void 0)&&r.body)return await me(e.contentDocument.body,t,!0)}catch{}return e.cloneNode(!1)}async function lr(e,t){return A(e,HTMLCanvasElement)?sr(e):A(e,HTMLVideoElement)?nr(e,t):A(e,HTMLIFrameElement)?ir(e,t):e.cloneNode(Ze(e))}const or=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SLOT",Ze=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SVG";async function cr(e,t,r){var s,n;if(Ze(t))return t;let i=[];return or(e)&&e.assignedNodes?i=Z(e.assignedNodes()):A(e,HTMLIFrameElement)&&(!((s=e.contentDocument)===null||s===void 0)&&s.body)?i=Z(e.contentDocument.body.childNodes):i=Z(((n=e.shadowRoot)!==null&&n!==void 0?n:e).childNodes),i.length===0||A(e,HTMLVideoElement)||await i.reduce((l,c)=>l.then(()=>me(c,r)).then(d=>{d&&t.appendChild(d)}),Promise.resolve()),t}function dr(e,t,r){const s=t.style;if(!s)return;const n=window.getComputedStyle(e);n.cssText?(s.cssText=n.cssText,s.transformOrigin=n.transformOrigin):Xe(r).forEach(i=>{let l=n.getPropertyValue(i);i==="font-size"&&l.endsWith("px")&&(l=`${Math.floor(parseFloat(l.substring(0,l.length-2)))-.1}px`),A(e,HTMLIFrameElement)&&i==="display"&&l==="inline"&&(l="block"),i==="d"&&t.getAttribute("d")&&(l=`path(${t.getAttribute("d")})`),s.setProperty(i,l,n.getPropertyPriority(i))})}function ur(e,t){A(e,HTMLTextAreaElement)&&(t.innerHTML=e.value),A(e,HTMLInputElement)&&t.setAttribute("value",e.value)}function mr(e,t){if(A(e,HTMLSelectElement)){const r=t,s=Array.from(r.children).find(n=>e.value===n.getAttribute("value"));s&&s.setAttribute("selected","")}}function hr(e,t,r){return A(t,Element)&&(dr(e,t,r),Jt(e,t,r),ur(e,t),mr(e,t)),t}async function fr(e,t){const r=e.querySelectorAll?e.querySelectorAll("use"):[];if(r.length===0)return e;const s={};for(let i=0;ilr(s,t)).then(s=>cr(e,s,t)).then(s=>hr(e,s,t)).then(s=>fr(s,t))}const et=/url\((['"]?)([^'"]+?)\1\)/g,pr=/url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g,gr=/src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;function xr(e){const t=e.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1");return new RegExp(`(url\\(['"]?)(${t})(['"]?\\))`,"g")}function br(e){const t=[];return e.replace(et,(r,s,n)=>(t.push(n),r)),t.filter(r=>!xe(r))}async function yr(e,t,r,s,n){try{const i=r?Ht(t,r):t,l=ye(t);let c;return n||(c=await we(i,l,s)),e.replace(xr(t),`$1${c}$3`)}catch{}return e}function wr(e,{preferredFontFormat:t}){return t?e.replace(gr,r=>{for(;;){const[s,,n]=pr.exec(r)||[];if(!n)return"";if(n===t)return`src: ${s};`}}):e}function tt(e){return e.search(et)!==-1}async function rt(e,t,r){if(!tt(e))return e;const s=wr(e,r);return br(s).reduce((i,l)=>i.then(c=>yr(c,l,t,r)),Promise.resolve(s))}async function se(e,t,r){var s;const n=(s=t.style)===null||s===void 0?void 0:s.getPropertyValue(e);if(n){const i=await rt(n,null,r);return t.style.setProperty(e,i,t.style.getPropertyPriority(e)),!0}return!1}async function vr(e,t){await se("background",e,t)||await se("background-image",e,t),await se("mask",e,t)||await se("-webkit-mask",e,t)||await se("mask-image",e,t)||await se("-webkit-mask-image",e,t)}async function jr(e,t){const r=A(e,HTMLImageElement);if(!(r&&!xe(e.src))&&!(A(e,SVGImageElement)&&!xe(e.href.baseVal)))return;const s=r?e.src:e.href.baseVal,n=await we(s,ye(s),t);await new Promise((i,l)=>{e.onload=i,e.onerror=t.onImageErrorHandler?(...d)=>{try{i(t.onImageErrorHandler(...d))}catch(f){l(f)}}:l;const c=e;c.decode&&(c.decode=i),c.loading==="lazy"&&(c.loading="eager"),r?(e.srcset="",e.src=n):e.href.baseVal=n})}async function _r(e,t){const s=Z(e.childNodes).map(n=>at(n,t));await Promise.all(s).then(()=>e)}async function at(e,t){A(e,Element)&&(await vr(e,t),await jr(e,t),await _r(e,t))}function Sr(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(n=>{r[n]=s[n]}),e}const We={};async function Oe(e){let t=We[e];if(t!=null)return t;const s=await(await fetch(e)).text();return t={url:e,cssText:s},We[e]=t,t}async function Ue(e,t){let r=e.cssText;const s=/url\(["']?([^"')]+)["']?\)/g,i=(r.match(/url\([^)]+\)/g)||[]).map(async l=>{let c=l.replace(s,"$1");return c.startsWith("https://")||(c=new URL(c,e.url).href),Je(c,t.fetchRequestInit,({result:d})=>(r=r.replace(l,`url(${d})`),[l,d]))});return Promise.all(i).then(()=>r)}function qe(e){if(e==null)return[];const t=[],r=/(\/\*[\s\S]*?\*\/)/gi;let s=e.replace(r,"");const n=new RegExp("((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)})","gi");for(;;){const d=n.exec(s);if(d===null)break;t.push(d[0])}s=s.replace(n,"");const i=/@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi,l="((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})",c=new RegExp(l,"gi");for(;;){let d=i.exec(s);if(d===null){if(d=c.exec(s),d===null)break;i.lastIndex=c.lastIndex}else c.lastIndex=i.lastIndex;t.push(d[0])}return t}async function kr(e,t){const r=[],s=[];return e.forEach(n=>{if("cssRules"in n)try{Z(n.cssRules||[]).forEach((i,l)=>{if(i.type===CSSRule.IMPORT_RULE){let c=l+1;const d=i.href,f=Oe(d).then(x=>Ue(x,t)).then(x=>qe(x).forEach(u=>{try{n.insertRule(u,u.startsWith("@import")?c+=1:n.cssRules.length)}catch(h){console.error("Error inserting rule from remote css",{rule:u,error:h})}})).catch(x=>{console.error("Error loading remote css",x.toString())});s.push(f)}})}catch(i){const l=e.find(c=>c.href==null)||document.styleSheets[0];n.href!=null&&s.push(Oe(n.href).then(c=>Ue(c,t)).then(c=>qe(c).forEach(d=>{l.insertRule(d,l.cssRules.length)})).catch(c=>{console.error("Error loading remote stylesheet",c)})),console.error("Error inlining remote css file",i)}}),Promise.all(s).then(()=>(e.forEach(n=>{if("cssRules"in n)try{Z(n.cssRules||[]).forEach(i=>{r.push(i)})}catch(i){console.error(`Error while reading CSS rules from ${n.href}`,i)}}),r))}function Cr(e){return e.filter(t=>t.type===CSSRule.FONT_FACE_RULE).filter(t=>tt(t.style.getPropertyValue("src")))}async function Er(e,t){if(e.ownerDocument==null)throw new Error("Provided element is not within a Document");const r=Z(e.ownerDocument.styleSheets),s=await kr(r,t);return Cr(s)}function st(e){return e.trim().replace(/["']/g,"")}function Nr(e){const t=new Set;function r(s){(s.style.fontFamily||getComputedStyle(s).fontFamily).split(",").forEach(i=>{t.add(st(i))}),Array.from(s.children).forEach(i=>{i instanceof HTMLElement&&r(i)})}return r(e),t}async function Rr(e,t){const r=await Er(e,t),s=Nr(e);return(await Promise.all(r.filter(i=>s.has(st(i.style.fontFamily))).map(i=>{const l=i.parentStyleSheet?i.parentStyleSheet.href:null;return rt(i.cssText,l,t)}))).join(` `)}async function Pr(e,t){const r=t.fontEmbedCSS!=null?t.fontEmbedCSS:t.skipFonts?null:await Rr(e,t);if(r){const s=document.createElement("style"),n=document.createTextNode(r);s.appendChild(n),e.firstChild?e.insertBefore(s,e.firstChild):e.appendChild(s)}}async function $r(e,t={}){const{width:r,height:s}=Ye(e,t),n=await me(e,t,!0);return await Pr(n,t),await at(n,t),Sr(n,t),await Gt(n,r,s)}async function Mr(e,t={}){const{width:r,height:s}=Ye(e,t),n=await $r(e,t),i=await ue(n),l=document.createElement("canvas"),c=l.getContext("2d"),d=t.pixelRatio||Ut(),f=t.canvasWidth||r,x=t.canvasHeight||s;return l.width=f*d,l.height=x*d,t.skipAutoScale||qt(l),l.style.width=`${f}`,l.style.height=`${x}`,t.backgroundColor&&(c.fillStyle=t.backgroundColor,c.fillRect(0,0,l.width,l.height)),c.drawImage(i,0,0,l.width,l.height),l}async function Tr(e,t={}){const r=await Mr(e,t);return await zt(r)}const be="#ffffff";function Fr(){return typeof window>"u"?be:window.getComputedStyle(document.documentElement).getPropertyValue("--bg-elevated").trim()||be}function Lr(e){if(typeof window>"u")return be;const t=window.getComputedStyle(e).backgroundColor;return!t||t==="rgba(0, 0, 0, 0)"||t==="transparent"?Fr():t}async function Ir(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 Tr(e,{pixelRatio:2,cacheBust:!0,backgroundColor:Lr(e)});if(!t)throw new Error("Failed to render screenshot.");await window.navigator.clipboard.write([new window.ClipboardItem({"image/png":t})])}const nt=({targetRef:e,label:t})=>{const{toast:r}=ct(),[s,n]=F.useState("idle"),i=F.useRef(null);F.useEffect(()=>()=>{i.current!==null&&window.clearTimeout(i.current)},[]);const l=F.useCallback(async()=>{const d=e.current;if(d){n("copying"),d.classList.add("is-capturing"),d.offsetHeight,await new Promise(f=>window.requestAnimationFrame(()=>f()));try{await Ir(d),n("copied"),r({title:"Screenshot copied",description:`Image of the ${t} copied to your clipboard.`}),i.current!==null&&window.clearTimeout(i.current),i.current=window.setTimeout(()=>n("idle"),1500)}catch(f){n("idle"),r({title:"Copy failed",description:f instanceof Error&&f.message?f.message:"Could not copy the screenshot to your clipboard.",variant:"destructive"})}finally{d.classList.remove("is-capturing")}}},[e,t,r]),c=s==="copied"?"Copied":s==="copying"?"Copying…":"Copy image";return a.jsxs("button",{type:"button",className:"bm-copy-btn",onClick:l,disabled:s==="copying","aria-label":`Copy ${t} screenshot to clipboard`,title:`Copy ${t} screenshot to clipboard`,children:[a.jsx(xt,{name:"copy",size:11}),c]})};function Ar({model:e,datasetName:t,hideClosed:r,setHideClosed:s,setMetric:n}){const i=F.useRef(null),{isInitialFilteredViewLoading:l,chartPoints:c,activeMetric:d,allowedMetrics:f,orderedMetrics:x,parameterBound:u}=e;return l||c.length===0?null:a.jsxs("div",{className:"bm-card",ref:i,children:[a.jsxs("div",{className:"bm-card-screenshot-header","aria-hidden":"true",children:[a.jsxs("div",{className:"bm-card-screenshot-title",children:[a.jsx("span",{className:"bm-card-screenshot-eyebrow",children:"Benchmark"}),a.jsx("span",{className:"bm-card-screenshot-name",children:t})]}),a.jsxs("div",{className:"bm-card-screenshot-brand",children:[a.jsxs("span",{className:"brand",children:[a.jsx("span",{className:"brand-mark"}),a.jsxs("span",{className:"brand-name",children:["Papers ",a.jsx("em",{children:"With Code"})]})]}),a.jsx("span",{className:"bm-card-screenshot-url",children:"paperswithcode.co"})]})]}),a.jsxs("div",{className:"bm-card-head",children:[a.jsx("div",{className:"bm-card-title",children:"SOTA progression"}),a.jsxs("div",{className:"bm-card-actions",children:[f.length>1&&a.jsxs("label",{className:"bm-view-select",children:[a.jsx("span",{className:"bm-view-select-label",children:"View"}),a.jsx("select",{value:d,onChange:h=>n(h.target.value),children:x.map(h=>a.jsx("option",{value:h,children:h},h))})]}),a.jsxs("label",{className:"bm-closed-toggle",title:"Show or hide evaluations of closed-source models",children:[a.jsx(Ke,{className:"bm-closed-toggle-switch",checked:!r,onCheckedChange:h=>{s(!h)},"aria-label":"Show closed-source models"}),a.jsx("span",{className:"bm-closed-toggle-label",children:"Closed-source"})]}),a.jsx(nt,{targetRef:i,label:"SOTA chart"})]})]}),a.jsx("div",{className:"bm-chart-wrap",children:a.jsx(Dt,{points:c,metric:d})}),a.jsxs("div",{className:"bm-chart-foot",children:[a.jsx("span",{className:"legend-dot"}),u===void 0?"All models":"Filtered models"," over time · highlighted dots track the running best · hover for the model · click to open the paper"]})]})}function Br(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 ze(e,t){return e?a.jsx(oe,{title:e}):t||"—"}const ia=()=>{var ve,je,_e,Se,ke,Ce,Ee,Ne,Re,Pe,$e;const{datasetSlug:e}=dt(),[t,r]=ut(),s=t.get("task")||void 0,n=t.get("eval")||void 0,i=St(t.get("max_parameters_exclusive")),{preferences:l,setHideClosedSourceEvals:c}=mt(),d=F.useRef(null),f=F.useRef(!1),x=F.useRef(null),[u,h]=F.useState(null),R=`${e}:${s||""}`,E=u===R,[L,S]=F.useState(1),g=te({queryKey:["dataset",e,"with-paper",s,l.hide_closed_source_evals?"open":"all"],queryFn:()=>re.getDatasetBySlug(e,{include_paper:!0,task:s,is_open:l.hide_closed_source_evals?!0:void 0}),enabled:!!e,staleTime:10*60*1e3}),k=te({queryKey:["dataset-evals",(ve=g.data)==null?void 0:ve.id],queryFn:()=>gt.byDataset(g.data.id),enabled:!!((je=g.data)!=null&&je.id),staleTime:5*60*1e3}),B=te({queryKey:["dataset-tasks",(_e=g.data)==null?void 0:_e.id],queryFn:()=>re.datasetTasks(g.data.id),enabled:!!((Se=g.data)!=null&&Se.id),staleTime:10*60*1e3}),j=te({queryKey:["metric-directions"],queryFn:()=>re.metricDirections(),staleTime:60*60*1e3}),D=Qe(B.data||[],k.data||[],s,n),W=te({queryKey:["task-benchmark-trends",D,l.hide_closed_source_evals?!0:void 0],queryFn:()=>re.trendingBenchmarks(D,{limit:100,min_recent_papers:0,is_open:l.hide_closed_source_evals?!0:void 0}),enabled:!!D&&!!((ke=g.data)!=null&&ke.id),staleTime:10*60*1e3}),w=F.useMemo(()=>{var b;return(((b=W.data)==null?void 0:b.results)||[]).find(M=>{var T;return M.id===((T=g.data)==null?void 0:T.id)})||null},[W.data,(Ce=g.data)==null?void 0:Ce.id]),q=te({queryKey:["leaderboard-metrics",(Ee=g.data)==null?void 0:Ee.id,D],queryFn:()=>re.leaderboardMetrics(g.data.id,D),enabled:!!((Ne=g.data)!=null&&Ne.id)&&!!D,staleTime:10*60*1e3}),I=Tt({evaluations:k.data||[],tasks:B.data||[],configuredMetrics:q.data||[],directions:j.data,initialSummary:(Re=g.data)==null?void 0:Re.leaderboard_summary,taskSlug:s,highlightEvalId:n,metric:t.get("metric")||void 0,hideClosed:l.hide_closed_source_evals,parameterBound:i,showMoreMetrics:E,fittingMetricCount:L,ready:{evaluations:k.isSuccess,tasks:B.isSuccess,directions:j.isSuccess,metrics:q.isSuccess}}),{primaryTask:N,hiddenClosedEvals:Q,hiddenClosedTopEval:z,isSummaryLoading:ee,displayedMetric:O,displayedSota:$,displayedSotaModel:U,isInitialFilteredViewLoading:K,highlightedEval:_,hasParameterMetadata:X,parameterCoverage:Y,orderedMetrics:o}=I;F.useEffect(()=>{if(f.current||!n||!k.data||k.data.length===0)return;const b=d.current;b&&(f.current=!0,b.scrollIntoView({behavior:"smooth",block:"start"}))},[n,k.data]);const m=te({queryKey:["area",N==null?void 0:N.area_id],queryFn:()=>re.getArea(N.area_id),enabled:!!(N!=null&&N.area_id),staleTime:10*60*1e3});if(g.isLoading)return a.jsxs("div",{className:"page",children:[a.jsx(ce,{className:"h-12 w-1/2 mb-6"}),a.jsx(ce,{className:"h-64 w-full"})]});if(g.error||!g.data)return a.jsx("div",{className:"page",children:a.jsx(bt,{variant:"destructive",children:a.jsx(yt,{children:"Benchmark not found."})})});const p=g.data,y=!!p.supports_harness,P=b=>{r(M=>{const T=new URLSearchParams(M);return b===void 0?T.delete("max_parameters_exclusive"):T.set("max_parameters_exclusive",String(b)),T})},C=b=>{r(M=>{const T=new URLSearchParams(M);return T.set("metric",b),T})},v=p.introducing_paper??void 0,H=(v==null?void 0:v.arxiv_id)||(v==null?void 0:v.id)||Br(p.paper_url),J=(v==null?void 0:v.title)||p.introducing_paper_title||null,G=((Pe=v==null?void 0:v.published)==null?void 0:Pe.slice(0,4))||p.introduced_year||null,it=!!H||!!p.paper_url||!!J,lt=v!=null&&v.arxiv_id||($e=p.paper_url)!=null&&$e.match(/^https?:\/\/(?:www\.)?arxiv\.org\//i)?`arXiv:${H}`:`Paper ${H}`;return a.jsx("div",{className:"page",children:a.jsxs("div",{className:"bm-page",children:[a.jsxs("div",{className:"breadcrumb",children:[a.jsx(ne,{to:"/tasks",children:"Tasks"}),m.data&&a.jsxs(a.Fragment,{children:[a.jsx("span",{className:"sep",children:"/"}),a.jsx(ne,{to:`/tasks#area-${jt(m.data.name)}`,children:m.data.name})]}),N&&a.jsxs(a.Fragment,{children:[a.jsx("span",{className:"sep",children:"/"}),a.jsx(ne,{to:`/tasks/${N.slug||N.id}`,children:N.name})]}),a.jsx("span",{className:"sep",children:"/"}),a.jsx("span",{style:{color:"var(--accent-text)"},children:p.name})]}),a.jsxs("div",{className:"bm-title-row",children:[a.jsx("h1",{className:"bm-title",children:p.name}),w&&a.jsxs("div",{className:"bm-title-trend","aria-label":`${p.name} reporting trend`,children:[a.jsx(wt,{history:w.history,benchmarkName:w.name}),a.jsxs("span",{className:"bm-title-trend-summary",children:[a.jsx("strong",{children:w.recent_paper_count})," ",w.recent_paper_count===1?"paper":"papers",w.rate_change==null?w.recent_paper_count>0&&a.jsx("span",{className:"benchmark-trend-change is-new",children:"new"}):a.jsxs("span",{className:`benchmark-trend-change ${w.rate_change>=1?"is-up":"is-down"}`,children:[w.rate_change>=1?"↑":"↓"," ",w.rate_change.toFixed(1),"×"]})]})]})]}),a.jsx(ht,{kind:"benchmark",entityId:p.id}),a.jsxs("div",{className:"bm-subtitle",children:[ee?a.jsx(ce,{className:"h-5 w-64 bm-summary-skeleton","aria-label":"Loading benchmark summary"}):a.jsxs("span",{children:[O&&a.jsxs(a.Fragment,{children:[a.jsx("span",{className:"metric-tag",children:O}),a.jsx("span",{style:{color:"var(--hairline-strong)",margin:"0 8px"},children:"·"})]}),U?a.jsxs("span",{children:["Best: ",a.jsx("span",{className:"best-name",children:le($)})," by ",a.jsx("span",{className:"best-name",style:{fontStyle:"normal"},children:U})]}):a.jsxs("span",{children:[I.rows.length," evaluations"]})]}),p.hf_url&&a.jsxs("a",{className:"bm-action-btn",href:p.hf_url,target:"_blank",rel:"noopener noreferrer",children:[a.jsx("span",{"aria-hidden":"true",children:"🤗"})," View on Hugging Face"]})]}),p.description&&a.jsx("p",{className:"bm-description",children:p.description}),l.hide_closed_source_evals&&Q.length>0&&a.jsxs("div",{className:"bm-hidden-closed-notice",children:[a.jsxs("span",{children:[Q.length," closed-source ",Q.length===1?"row is":"rows are"," hidden",z!=null&&z.model_name?a.jsxs(a.Fragment,{children:[", including ",a.jsx("strong",{children:z.model_name})]}):null,"."]}),a.jsx("button",{type:"button",className:"bm-hidden-closed-action",onClick:()=>{c(!1)},children:"Show closed-source"})]}),it&&a.jsxs("div",{className:"method-source",style:{marginTop:0,marginBottom:18},children:[a.jsx("span",{className:"method-source-label",children:"Source"}),H?a.jsxs(ne,{to:`/paper/${H}`,target:"_blank",rel:"noopener noreferrer",className:"method-source-link",children:[a.jsx("span",{className:"method-source-title",children:J?a.jsx(oe,{title:J}):lt}),G&&a.jsx("span",{className:"method-source-meta",children:G})]}):p.paper_url?a.jsxs("a",{href:vt(p.paper_url)??void 0,target:"_blank",rel:"noopener noreferrer",className:"method-source-link",children:[a.jsx("span",{className:"method-source-title",children:J?a.jsx(oe,{title:J}):p.paper_url}),G&&a.jsx("span",{className:"method-source-meta",children:G})]}):a.jsxs("div",{className:"method-source-link is-static",children:[a.jsx("span",{className:"method-source-title",children:J?a.jsx(oe,{title:J}):null}),G&&a.jsx("span",{className:"method-source-meta",children:G})]})]}),a.jsx(Ar,{model:I,datasetName:p.name,hideClosed:l.hide_closed_source_evals,setHideClosed:c,setMetric:C}),_&&(()=>{var Te,Fe;const b=_.paper_arxiv_id||_.paper_id,M=_.paper_title||(_.paper_arxiv_id?`arXiv:${_.paper_arxiv_id}`:null),T=_.best_metric&&((Te=_.metrics)==null?void 0:Te[_.best_metric])!==void 0?_.best_metric:I.activeMetric,Me=(Fe=_.metrics)==null?void 0:Fe[T];return a.jsxs("div",{className:"bm-highlight-banner",role:"status",children:[a.jsx("span",{className:"bm-highlight-dot","aria-hidden":"true"}),a.jsxs("div",{className:"bm-highlight-text",children:[a.jsx("span",{className:"bm-highlight-label",children:"Comparing result"}),a.jsxs("span",{className:"bm-highlight-paper",children:[_.model_name||M||"—",_.harness?` · ${_.harness}`:""]}),a.jsxs("span",{className:"bm-highlight-meta",children:[Me!==void 0&&T?a.jsxs(a.Fragment,{children:[T,": ",le(Me),M?" · ":""]}):null,b?a.jsx(ne,{to:`/paper/${b}`,children:ze(_.paper_title,M)}):ze(_.paper_title,M)]})]})]})})(),a.jsxs("div",{className:"bm-card",ref:x,children:[a.jsxs("div",{className:"bm-card-screenshot-header","aria-hidden":"true",children:[a.jsxs("div",{className:"bm-card-screenshot-title",children:[a.jsx("span",{className:"bm-card-screenshot-eyebrow",children:"Benchmark"}),a.jsx("span",{className:"bm-card-screenshot-name",children:p.name})]}),a.jsxs("div",{className:"bm-card-screenshot-brand",children:[a.jsxs("span",{className:"brand",children:[a.jsx("span",{className:"brand-mark"}),a.jsxs("span",{className:"brand-name",children:["Papers ",a.jsx("em",{children:"With Code"})]})]}),a.jsx("span",{className:"bm-card-screenshot-url",children:"paperswithcode.co"})]})]}),a.jsxs("div",{className:"bm-card-head",children:[a.jsx("div",{className:"bm-card-title",children:"Leaderboard"}),a.jsxs("div",{className:"bm-card-actions",children:[I.allowedMetrics.length>1&&a.jsxs("label",{className:"bm-view-select",children:[a.jsx("span",{className:"bm-view-select-label",children:"View"}),a.jsx("select",{value:I.activeMetric,onChange:b=>C(b.target.value),children:o.map(b=>a.jsx("option",{value:b,children:b},b))})]}),a.jsxs("label",{className:"bm-closed-toggle",title:"Show or hide evaluations of closed-source models",children:[a.jsx(Ke,{className:"bm-closed-toggle-switch",checked:!l.hide_closed_source_evals,onCheckedChange:b=>{c(!b)},"aria-label":"Show closed-source models"}),a.jsx("span",{className:"bm-closed-toggle-label",children:"Closed-source"})]}),!K&&!X&&k.isSuccess?a.jsx("span",{className:"bm-parameter-unavailable",children:"Parameter metadata unavailable"}):null,a.jsx(nt,{targetRef:x,label:"leaderboard"})]})]}),!K&&X&&a.jsxs("div",{className:"bm-parameter-filter-bar",children:[a.jsx("span",{className:"bm-parameter-filter-label",children:"Parameters Size"}),a.jsx("div",{className:"bm-parameter-filter-options",role:"group","aria-label":"Filter leaderboard by parameter size",children:I.parameterFilters.map(b=>{const{selected:M,disabled:T}=b;return a.jsx("button",{type:"button",className:`bm-parameter-filter-option${M?" is-active":""}`,"aria-pressed":M,disabled:T,onClick:()=>P(b.maxParametersExclusive),children:b.label},b.label)})}),a.jsxs("span",{className:"bm-parameter-coverage",children:["Parameters known for ",Y.parameter_coverage_known," of ",Y.parameter_coverage_total," entries"]})]}),k.isLoading||K?a.jsx("div",{style:{padding:16},children:Array.from({length:5}).map((b,M)=>a.jsx(ce,{className:"h-10 w-full mb-2"},M))}):I.rows.length===0?i?a.jsxs("div",{className:"no-results",children:["No known parameter counts match this filter. "," ",a.jsx("button",{type:"button",className:"bm-empty-filter-action",onClick:()=>P(void 0),children:"Show all"})]}):a.jsx("div",{className:"no-results",children:"No evaluations submitted yet."}):a.jsxs(a.Fragment,{children:[o.length>L&&a.jsxs("div",{className:"bm-metric-columns-control",children:[a.jsx("button",{type:"button",className:"bm-metric-columns-toggle","aria-expanded":E,"aria-controls":"benchmark-leaderboard",onClick:()=>h(E?null:R),children:E?"Show fewer metrics":`Show more metrics (${o.length-L})`}),E&&a.jsx("span",{children:"Scroll metrics horizontally; model and paper details stay visible."})]}),a.jsx(At,{model:I,showHarness:y,setMetric:C,highlightRowRef:d,onFittingMetricCountChange:S})]})]})]})})};export{ia as default}; diff --git a/assets/BenchmarkTrendSparkline-CLoJOqdn.js b/assets/BenchmarkTrendSparkline-CKdWZt_L.js similarity index 97% rename from assets/BenchmarkTrendSparkline-CLoJOqdn.js rename to assets/BenchmarkTrendSparkline-CKdWZt_L.js index 9e30aa9b065b29dc6051691526a1ba953c885d18..a69e5dd6cea94e4dc1c2c5d663303d62dd0f89e4 100644 --- a/assets/BenchmarkTrendSparkline-CLoJOqdn.js +++ b/assets/BenchmarkTrendSparkline-CKdWZt_L.js @@ -1 +1 @@ -import{r as C,j as t}from"./index-CnBotBa4.js";const g=112,p=42,o=5,m=5,b=new Intl.DateTimeFormat("en",{month:"short",timeZone:"UTC"}),y=(e,d)=>{const r=new Date(`${e}T00:00:00Z`),n=new Date(`${d}T00:00:00Z`);return r.getUTCMonth()===n.getUTCMonth()?`${b.format(r)} ${r.getUTCDate()}–${n.getUTCDate()}`:`${b.format(r)} ${r.getUTCDate()}–${b.format(n)} ${n.getUTCDate()}`},I=({history:e,benchmarkName:d,interactive:r=!1})=>{const[n,x]=C.useState(null),h=e.map(s=>s.paper_count),M=Math.max(1,...h),f=g-o*2,T=p-m*2,v=h.length>1?f/(h.length-1):0,a=h.map((s,c)=>({x:o+v*c,y:m+T-s/M*T})),$=a.map(({x:s,y:c})=>`${s},${c}`).join(" "),_=a.length?`${o},${p-m} ${$} ${a[a.length-1].x},${p-m}`:"",D=h.reduce((s,c)=>s+c,0),u=49,N=14,i=n==null?null:a[n],j=i?Math.min(g-o-u,Math.max(o,i.x-u/2)):0,k=i?i.y>p/2?i.y-N-3:i.y+3:0;return t.jsxs("svg",{className:`benchmark-trend-sparkline${r?" is-interactive":""}`,viewBox:`0 0 ${g} ${p}`,role:r?"group":"img","aria-label":`${d}: ${D} reporting papers across the displayed trend history`,children:[t.jsxs("title",{children:[d,": ",D," reporting papers across the displayed trend history"]}),t.jsx("line",{className:"benchmark-trend-axis",x1:o,y1:p-m,x2:g-o,y2:p-m}),t.jsx("line",{className:"benchmark-trend-axis",x1:o,y1:m,x2:o,y2:p-m}),_&&t.jsx("polygon",{className:"benchmark-trend-area",points:_}),$&&t.jsx("polyline",{className:"benchmark-trend-line",points:$}),r?a.map(({x:s,y:c},l)=>t.jsxs("g",{className:"benchmark-trend-point",tabIndex:0,role:"img","aria-label":`${y(e[l].start_date,e[l].end_date)}: ${e[l].paper_count} ${e[l].paper_count===1?"paper":"papers"}`,onMouseEnter:()=>x(l),onMouseLeave:()=>x(null),onFocus:()=>x(l),onBlur:()=>x(null),children:[t.jsx("circle",{className:"benchmark-trend-point-hit",cx:s,cy:c,r:"5"}),t.jsx("circle",{className:"benchmark-trend-point-mark",cx:s,cy:c,r:"1.8"})]},`${e[l].start_date}-${e[l].end_date}`)):a.length>0&&t.jsx("circle",{className:"benchmark-trend-dot",cx:a[a.length-1].x,cy:a[a.length-1].y,r:"2.6"}),i&&n!=null&&t.jsxs("g",{className:"benchmark-trend-tooltip",pointerEvents:"none",children:[t.jsx("rect",{x:j,y:k,width:u,height:N,rx:"2"}),t.jsx("text",{x:j+3,y:k+5.4,children:y(e[n].start_date,e[n].end_date)}),t.jsxs("text",{className:"benchmark-trend-tooltip-value",x:j+3,y:k+11,children:[e[n].paper_count," ",e[n].paper_count===1?"paper":"papers"]})]})]})};export{I as B}; +import{r as C,j as t}from"./index-hxawG6mk.js";const g=112,p=42,o=5,m=5,b=new Intl.DateTimeFormat("en",{month:"short",timeZone:"UTC"}),y=(e,d)=>{const r=new Date(`${e}T00:00:00Z`),n=new Date(`${d}T00:00:00Z`);return r.getUTCMonth()===n.getUTCMonth()?`${b.format(r)} ${r.getUTCDate()}–${n.getUTCDate()}`:`${b.format(r)} ${r.getUTCDate()}–${b.format(n)} ${n.getUTCDate()}`},I=({history:e,benchmarkName:d,interactive:r=!1})=>{const[n,x]=C.useState(null),h=e.map(s=>s.paper_count),M=Math.max(1,...h),f=g-o*2,T=p-m*2,v=h.length>1?f/(h.length-1):0,a=h.map((s,c)=>({x:o+v*c,y:m+T-s/M*T})),$=a.map(({x:s,y:c})=>`${s},${c}`).join(" "),_=a.length?`${o},${p-m} ${$} ${a[a.length-1].x},${p-m}`:"",D=h.reduce((s,c)=>s+c,0),u=49,N=14,i=n==null?null:a[n],j=i?Math.min(g-o-u,Math.max(o,i.x-u/2)):0,k=i?i.y>p/2?i.y-N-3:i.y+3:0;return t.jsxs("svg",{className:`benchmark-trend-sparkline${r?" is-interactive":""}`,viewBox:`0 0 ${g} ${p}`,role:r?"group":"img","aria-label":`${d}: ${D} reporting papers across the displayed trend history`,children:[t.jsxs("title",{children:[d,": ",D," reporting papers across the displayed trend history"]}),t.jsx("line",{className:"benchmark-trend-axis",x1:o,y1:p-m,x2:g-o,y2:p-m}),t.jsx("line",{className:"benchmark-trend-axis",x1:o,y1:m,x2:o,y2:p-m}),_&&t.jsx("polygon",{className:"benchmark-trend-area",points:_}),$&&t.jsx("polyline",{className:"benchmark-trend-line",points:$}),r?a.map(({x:s,y:c},l)=>t.jsxs("g",{className:"benchmark-trend-point",tabIndex:0,role:"img","aria-label":`${y(e[l].start_date,e[l].end_date)}: ${e[l].paper_count} ${e[l].paper_count===1?"paper":"papers"}`,onMouseEnter:()=>x(l),onMouseLeave:()=>x(null),onFocus:()=>x(l),onBlur:()=>x(null),children:[t.jsx("circle",{className:"benchmark-trend-point-hit",cx:s,cy:c,r:"5"}),t.jsx("circle",{className:"benchmark-trend-point-mark",cx:s,cy:c,r:"1.8"})]},`${e[l].start_date}-${e[l].end_date}`)):a.length>0&&t.jsx("circle",{className:"benchmark-trend-dot",cx:a[a.length-1].x,cy:a[a.length-1].y,r:"2.6"}),i&&n!=null&&t.jsxs("g",{className:"benchmark-trend-tooltip",pointerEvents:"none",children:[t.jsx("rect",{x:j,y:k,width:u,height:N,rx:"2"}),t.jsx("text",{x:j+3,y:k+5.4,children:y(e[n].start_date,e[n].end_date)}),t.jsxs("text",{className:"benchmark-trend-tooltip-value",x:j+3,y:k+11,children:[e[n].paper_count," ",e[n].paper_count===1?"paper":"papers"]})]})]})};export{I as B}; diff --git a/assets/ChatView-Buo8RKMA.js b/assets/ChatView-DOWTcGaK.js similarity index 98% rename from assets/ChatView-Buo8RKMA.js rename to assets/ChatView-DOWTcGaK.js index f5dcb50c24b6e1e104f6c4a0fe1ac31f1877d54f..57f86d4be30d4cc6c5d35458743ee3dc9463b378 100644 --- a/assets/ChatView-Buo8RKMA.js +++ b/assets/ChatView-DOWTcGaK.js @@ -1,4 +1,4 @@ -var fr=Object.defineProperty;var pr=(t,e,r)=>e in t?fr(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var X=(t,e,r)=>pr(t,typeof e!="symbol"?e+"":e,r);import{g as hr,r as u,A as mr,W as gr,j as i,X as yr,h as Kt,F as it,a as Vt,u as _r,b as br,d as wr,m as vr,Y as xr,L as Ot,f as Sr}from"./index-CnBotBa4.js";import{u as et}from"./useQuery-C8pfCInN.js";import{C as Rr,U as jt,b as Er,c as Ve,u as Tr,d as kr,A as Cr,a as Ir}from"./ArtifactWorkspace-C7nTcvIL.js";import{c as He}from"./chat-B0u4w1H2.js";import{e as Ar,f as $t,h as Or,T as jr,d as zt,i as Dr,j as Nr,k as Lr,l as $e,m as Mr,t as Dt,n as ht,o as Gt,r as Fr,s as qr,S as Pr,a as Yr,D as ot,v as Br,w as tt,x as Je,y as Wr,z as Hr,B as Xe,E as Ze,F as Ur,G as Kr,H as Vr,I as ct,J as $r}from"./chatLaunch-CptFdc8a.js";import{S as zr}from"./chatPrompts-DypmWIqx.js";import{u as Gr,O as Qr}from"./openrouter-BMS0vcTS.js";import{q as Qt}from"./queryOptions-C9woPjwX.js";/* empty css */import"./hover-card-CkboGKdu.js";import"./github-D6RT7m6V.js";import"./github-DFkgF81-.js";import"./catalog-mND3MerS.js";import"./PaperPreviewLink-ChJBLunV.js";import"./index-DxRopg3G.js";import"./index-DLNxIk77.js";import"./katex-DkKDou_j.js";import"./paperQueryKeys-BP2E-0yf.js";import"./papers-DkTdvzl4.js";import"./useMutation-YEvFXzv3.js";import"./copy-0hFmISJO.js";import"./file-text-BZVTM8hV.js";import"./external-link-C_QBJuYU.js";import"./chevron-down-IUgkNqZp.js";/** +var fr=Object.defineProperty;var pr=(t,e,r)=>e in t?fr(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var X=(t,e,r)=>pr(t,typeof e!="symbol"?e+"":e,r);import{g as hr,r as u,A as mr,W as gr,j as i,X as yr,h as Kt,F as it,a as Vt,u as _r,b as br,d as wr,m as vr,Y as xr,L as Ot,f as Sr}from"./index-hxawG6mk.js";import{u as et}from"./useQuery-B7vCF2Os.js";import{C as Rr,U as jt,b as Er,c as Ve,u as Tr,d as kr,A as Cr,a as Ir}from"./ArtifactWorkspace-CCP7C86X.js";import{c as He}from"./chat-DJiy7CbR.js";import{e as Ar,f as $t,h as Or,T as jr,d as zt,i as Dr,j as Nr,k as Lr,l as $e,m as Mr,t as Dt,n as ht,o as Gt,r as Fr,s as qr,S as Pr,a as Yr,D as ot,v as Br,w as tt,x as Je,y as Wr,z as Hr,B as Xe,E as Ze,F as Ur,G as Kr,H as Vr,I as ct,J as $r}from"./chatLaunch-DrTVeX4t.js";import{S as zr}from"./chatPrompts-DypmWIqx.js";import{u as Gr,O as Qr}from"./openrouter-CJoBewhx.js";import{q as Qt}from"./queryOptions-C9woPjwX.js";/* empty css */import"./hover-card-DEHIu6q-.js";import"./github-Bf2b_Y1p.js";import"./github-C-cqt6uw.js";import"./catalog-ePebz7GX.js";import"./PaperPreviewLink-BJhSzNVs.js";import"./index-CaRYlo5c.js";import"./index-Ddr0k9KU.js";import"./katex-DkKDou_j.js";import"./paperQueryKeys-BP2E-0yf.js";import"./papers-B0ysePyJ.js";import"./useMutation-gPqxjZGO.js";import"./copy-B2wC0pMM.js";import"./file-text-DIeliPoM.js";import"./external-link-CWzYMTrZ.js";import"./chevron-down-dhq7I8yA.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/ConferenceDetailView-C8yZCkY3.js b/assets/ConferenceDetailView-B6G28Pgh.js similarity index 91% rename from assets/ConferenceDetailView-C8yZCkY3.js rename to assets/ConferenceDetailView-B6G28Pgh.js index d2b72ab06b848167a258e5298f9d815c6cc3499c..ae40b3b0ad12307426f0720ae56b6785176fef99 100644 --- a/assets/ConferenceDetailView-C8yZCkY3.js +++ b/assets/ConferenceDetailView-B6G28Pgh.js @@ -1 +1 @@ -import{u as L,r as D,j as e,L as p}from"./index-CnBotBa4.js";import{u as T}from"./useQuery-C8pfCInN.js";import{M as F}from"./MarkdownText-BAS9zVyW.js";import{c as A}from"./catalog-mND3MerS.js";import{c as B,h as C,d as E}from"./transform-DMbrhcTx.js";import{S as f}from"./skeleton-DuOQBmSr.js";import{A as P,a as z}from"./alert-B0qZtPeK.js";import{s as M}from"./safeExternalHref-CkBrsh84.js";/* empty css */import"./PaperPreviewLink-ChJBLunV.js";import"./index-DxRopg3G.js";import"./index-DLNxIk77.js";import"./katex-DkKDou_j.js";import"./hover-card-CkboGKdu.js";import"./paperQueryKeys-BP2E-0yf.js";import"./papers-DkTdvzl4.js";import"./useMutation-YEvFXzv3.js";const R=a=>(a==null?void 0:a.trim().toLowerCase().replace(/[\s_]+/g,"-"))??"",O=(a,t)=>{if(!a)return null;const i=new Date(`${a}T00:00:00`),s=t?new Date(`${t}T00:00:00`):null,c=g=>g.toLocaleDateString("en-US",{month:"long",day:"numeric"}),m=i.getFullYear();return s&&s.getTime()!==i.getTime()?i.getMonth()===s.getMonth()?`${c(i).replace(/\d+$/,"").trim()} ${i.getDate()}–${s.getDate()}, ${m}`:`${c(i)} – ${c(s)}, ${m}`:`${c(i)}, ${m}`},re=()=>{var k,S,b,_,$,w;const{confSlug:a}=L(),t=T({queryKey:["conference-areas-with-tasks",a],queryFn:()=>A.conferenceAreasWithTasks(a),enabled:!!a,staleTime:10*60*1e3}),i=D.useMemo(()=>{if(!t.data)return[];const n={general:0,vision:1,video:2,language:3,audio:4,other:5},r=o=>n[R(o)]??999;return[...t.data.results].sort((o,l)=>{const d=r(o.name),x=r(l.name);return d!==x?d-x:o.name.localeCompare(l.name)})},[t.data]),s=(k=t.data)==null?void 0:k.conference,c=((S=t.data)==null?void 0:S.total_paper_count)??0,m=((b=t.data)==null?void 0:b.oral_paper_count)??0,g=((_=t.data)==null?void 0:_.spotlight_paper_count)??0,u=(($=t.data)==null?void 0:$.outstanding_paper_count)??0,j=((w=t.data)==null?void 0:w.best_paper_finalist_paper_count)??0,v=i.reduce((n,r)=>n+r.tasks.length,0);if(t.error)return e.jsx("div",{className:"page",children:e.jsx(P,{variant:"destructive",children:e.jsx(z,{children:"Failed to load conference. Please try again."})})});const y=s?O(s.start_date,s.end_date):null,N=s?[s.venue,s.location].filter(Boolean).join(", "):null,h=s==null?void 0:s.name;return e.jsxs("div",{className:"page",children:[e.jsxs("div",{className:s!=null&&s.image_url?"task-hero-grid":void 0,children:[e.jsxs("div",{children:[e.jsx("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--accent-text)",letterSpacing:"0.1em",marginBottom:8},children:"CONFERENCE"}),e.jsx("h1",{className:"feed-title",children:h??e.jsx(f,{className:"h-10 w-64 inline-block"})}),e.jsxs("div",{className:"feed-subtitle",style:{display:"flex",flexDirection:"column",gap:4},children:[y&&e.jsx("span",{children:y}),N&&e.jsx("span",{children:N}),(s==null?void 0:s.url)&&e.jsx("a",{href:M(s.url)??void 0,target:"_blank",rel:"noopener noreferrer",style:{color:"var(--accent-text)"},children:s.url.replace(/^https?:\/\//,"")}),(s==null?void 0:s.hf_url)&&e.jsxs("a",{className:"bm-action-btn",href:s.hf_url,target:"_blank",rel:"noopener noreferrer",style:{alignSelf:"flex-start",marginTop:4},children:[e.jsx("span",{"aria-hidden":"true",children:"🤗"})," View on Hugging Face"]})]}),(s==null?void 0:s.description)&&e.jsx(F,{className:"method-description",text:s.description})]}),(s==null?void 0:s.image_url)&&e.jsxs("figure",{className:"task-figure-card",children:[e.jsx("div",{className:"task-figure-img-wrap",children:e.jsx("img",{className:"task-figure-img",src:s.image_url,alt:h?`${h} visual`:"Conference visual",onError:n=>{var r,o;(o=(r=n.currentTarget.parentElement)==null?void 0:r.parentElement)==null||o.style.setProperty("display","none")}})}),e.jsxs("figcaption",{children:["Figure · ",h??"Conference",s.image_credit&&e.jsxs(e.Fragment,{children:[e.jsx("br",{}),e.jsx(F,{className:"task-image-credit",text:s.image_credit})]})]})]})]}),!t.isLoading&&c>0&&e.jsxs("section",{style:{marginTop:48,marginBottom:48},children:[e.jsxs("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:24,paddingBottom:12,borderBottom:"1px solid var(--hairline-strong)"},children:[e.jsxs("div",{children:[e.jsx("h2",{style:{fontFamily:"var(--serif)",fontSize:26,fontWeight:500,letterSpacing:"-0.02em",marginBottom:4},children:"Browse papers"}),e.jsx("div",{style:{fontFamily:"var(--serif)",fontStyle:"italic",fontSize:13,color:"var(--ink-soft)"},children:"All accepted papers, plus oral, spotlight, outstanding, and best paper finalists."})]}),e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",whiteSpace:"nowrap"},children:[c.toLocaleString()," papers"]})]}),e.jsxs("div",{className:"tag-grid",children:[e.jsxs(p,{to:`/conferences/${a}/all`,className:"tag-cell",children:[e.jsxs("div",{className:"name",children:[e.jsx("span",{className:"dot",style:{background:"var(--accent)"}}),"All papers"]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[c.toLocaleString()," papers"]})})]}),m>0&&e.jsxs(p,{to:`/conferences/${a}/oral`,className:"tag-cell",children:[e.jsxs("div",{className:"name",children:[e.jsx("span",{className:"dot",style:{background:"#fdbb02"}}),"Oral papers"]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[m.toLocaleString()," papers"]})})]}),g>0&&e.jsxs(p,{to:`/conferences/${a}/spotlight`,className:"tag-cell",children:[e.jsxs("div",{className:"name",children:[e.jsx("span",{className:"dot",style:{background:"#fdbb02"}}),"Spotlight papers"]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[g.toLocaleString()," papers"]})})]}),u>0&&e.jsxs(p,{to:`/conferences/${a}/outstanding`,className:"tag-cell",children:[e.jsxs("div",{className:"name",children:[e.jsx("span",{className:"dot",style:{background:"#c45c26"}}),"Outstanding papers"]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[u.toLocaleString()," papers"]})})]}),j>0&&e.jsxs(p,{to:`/conferences/${a}/best-paper-finalists`,className:"tag-cell",children:[e.jsxs("div",{className:"name",children:[e.jsx("span",{className:"dot",style:{background:"#c9a227"}}),"Best paper finalists"]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[j.toLocaleString()," papers"]})})]})]})]}),t.isLoading?e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:32},children:Array.from({length:4}).map((n,r)=>e.jsxs("div",{children:[e.jsx(f,{className:"h-8 w-1/3 mb-4"}),e.jsx("div",{className:"tag-grid",children:Array.from({length:6}).map((o,l)=>e.jsx(f,{className:"h-24"},l))})]},r))}):i.map(n=>{const r=n.tasks;if(r.length===0)return null;const o=r.reduce((l,d)=>l+(d.paper_count||0),0);return e.jsxs("section",{style:{marginBottom:48},children:[e.jsxs("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:24,paddingBottom:12,borderBottom:"1px solid var(--hairline-strong)"},children:[e.jsxs("div",{children:[e.jsx("h2",{style:{fontFamily:"var(--serif)",fontSize:26,fontWeight:500,letterSpacing:"-0.02em",marginBottom:4},children:n.name}),n.description&&e.jsx("div",{style:{fontFamily:"var(--serif)",fontStyle:"italic",fontSize:13,color:"var(--ink-soft)"},children:n.description})]}),e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",whiteSpace:"nowrap"},children:[r.length," ",r.length===1?"task":"tasks"," · ",o.toLocaleString()," papers"]})]}),e.jsx("div",{className:"tag-grid",children:r.map(l=>{const d=l.slug||"",x=B(C(d));return e.jsxs(p,{to:`/conferences/${a}/${d}`,className:"tag-cell",children:[e.jsxs("div",{className:"name",children:[e.jsx("span",{className:"dot",style:{background:x.dot}}),E(l.name,d)]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[(l.paper_count??0).toLocaleString()," papers"]})})]},l.id)})})]},n.id)}),v>0&&e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",marginTop:24},children:[v," tasks across ",i.filter(n=>n.tasks.length>0).length," areas."]})]})};export{re as default}; +import{u as L,r as D,j as e,L as p}from"./index-hxawG6mk.js";import{u as T}from"./useQuery-B7vCF2Os.js";import{M as F}from"./MarkdownText-C2hX4LYt.js";import{c as A}from"./catalog-ePebz7GX.js";import{c as B,h as C,d as E}from"./transform-DfrN0kQW.js";import{S as f}from"./skeleton-CRfsRMNe.js";import{A as P,a as z}from"./alert-2LCyXuCE.js";import{s as M}from"./safeExternalHref-CkBrsh84.js";/* empty css */import"./PaperPreviewLink-BJhSzNVs.js";import"./index-CaRYlo5c.js";import"./index-Ddr0k9KU.js";import"./katex-DkKDou_j.js";import"./hover-card-DEHIu6q-.js";import"./paperQueryKeys-BP2E-0yf.js";import"./papers-B0ysePyJ.js";import"./useMutation-gPqxjZGO.js";const R=a=>(a==null?void 0:a.trim().toLowerCase().replace(/[\s_]+/g,"-"))??"",O=(a,t)=>{if(!a)return null;const i=new Date(`${a}T00:00:00`),s=t?new Date(`${t}T00:00:00`):null,c=g=>g.toLocaleDateString("en-US",{month:"long",day:"numeric"}),m=i.getFullYear();return s&&s.getTime()!==i.getTime()?i.getMonth()===s.getMonth()?`${c(i).replace(/\d+$/,"").trim()} ${i.getDate()}–${s.getDate()}, ${m}`:`${c(i)} – ${c(s)}, ${m}`:`${c(i)}, ${m}`},re=()=>{var k,S,b,_,$,w;const{confSlug:a}=L(),t=T({queryKey:["conference-areas-with-tasks",a],queryFn:()=>A.conferenceAreasWithTasks(a),enabled:!!a,staleTime:10*60*1e3}),i=D.useMemo(()=>{if(!t.data)return[];const n={general:0,vision:1,video:2,language:3,audio:4,other:5},r=o=>n[R(o)]??999;return[...t.data.results].sort((o,l)=>{const d=r(o.name),x=r(l.name);return d!==x?d-x:o.name.localeCompare(l.name)})},[t.data]),s=(k=t.data)==null?void 0:k.conference,c=((S=t.data)==null?void 0:S.total_paper_count)??0,m=((b=t.data)==null?void 0:b.oral_paper_count)??0,g=((_=t.data)==null?void 0:_.spotlight_paper_count)??0,u=(($=t.data)==null?void 0:$.outstanding_paper_count)??0,j=((w=t.data)==null?void 0:w.best_paper_finalist_paper_count)??0,v=i.reduce((n,r)=>n+r.tasks.length,0);if(t.error)return e.jsx("div",{className:"page",children:e.jsx(P,{variant:"destructive",children:e.jsx(z,{children:"Failed to load conference. Please try again."})})});const y=s?O(s.start_date,s.end_date):null,N=s?[s.venue,s.location].filter(Boolean).join(", "):null,h=s==null?void 0:s.name;return e.jsxs("div",{className:"page",children:[e.jsxs("div",{className:s!=null&&s.image_url?"task-hero-grid":void 0,children:[e.jsxs("div",{children:[e.jsx("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--accent-text)",letterSpacing:"0.1em",marginBottom:8},children:"CONFERENCE"}),e.jsx("h1",{className:"feed-title",children:h??e.jsx(f,{className:"h-10 w-64 inline-block"})}),e.jsxs("div",{className:"feed-subtitle",style:{display:"flex",flexDirection:"column",gap:4},children:[y&&e.jsx("span",{children:y}),N&&e.jsx("span",{children:N}),(s==null?void 0:s.url)&&e.jsx("a",{href:M(s.url)??void 0,target:"_blank",rel:"noopener noreferrer",style:{color:"var(--accent-text)"},children:s.url.replace(/^https?:\/\//,"")}),(s==null?void 0:s.hf_url)&&e.jsxs("a",{className:"bm-action-btn",href:s.hf_url,target:"_blank",rel:"noopener noreferrer",style:{alignSelf:"flex-start",marginTop:4},children:[e.jsx("span",{"aria-hidden":"true",children:"🤗"})," View on Hugging Face"]})]}),(s==null?void 0:s.description)&&e.jsx(F,{className:"method-description",text:s.description})]}),(s==null?void 0:s.image_url)&&e.jsxs("figure",{className:"task-figure-card",children:[e.jsx("div",{className:"task-figure-img-wrap",children:e.jsx("img",{className:"task-figure-img",src:s.image_url,alt:h?`${h} visual`:"Conference visual",onError:n=>{var r,o;(o=(r=n.currentTarget.parentElement)==null?void 0:r.parentElement)==null||o.style.setProperty("display","none")}})}),e.jsxs("figcaption",{children:["Figure · ",h??"Conference",s.image_credit&&e.jsxs(e.Fragment,{children:[e.jsx("br",{}),e.jsx(F,{className:"task-image-credit",text:s.image_credit})]})]})]})]}),!t.isLoading&&c>0&&e.jsxs("section",{style:{marginTop:48,marginBottom:48},children:[e.jsxs("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:24,paddingBottom:12,borderBottom:"1px solid var(--hairline-strong)"},children:[e.jsxs("div",{children:[e.jsx("h2",{style:{fontFamily:"var(--serif)",fontSize:26,fontWeight:500,letterSpacing:"-0.02em",marginBottom:4},children:"Browse papers"}),e.jsx("div",{style:{fontFamily:"var(--serif)",fontStyle:"italic",fontSize:13,color:"var(--ink-soft)"},children:"All accepted papers, plus oral, spotlight, outstanding, and best paper finalists."})]}),e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",whiteSpace:"nowrap"},children:[c.toLocaleString()," papers"]})]}),e.jsxs("div",{className:"tag-grid",children:[e.jsxs(p,{to:`/conferences/${a}/all`,className:"tag-cell",children:[e.jsxs("div",{className:"name",children:[e.jsx("span",{className:"dot",style:{background:"var(--accent)"}}),"All papers"]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[c.toLocaleString()," papers"]})})]}),m>0&&e.jsxs(p,{to:`/conferences/${a}/oral`,className:"tag-cell",children:[e.jsxs("div",{className:"name",children:[e.jsx("span",{className:"dot",style:{background:"#fdbb02"}}),"Oral papers"]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[m.toLocaleString()," papers"]})})]}),g>0&&e.jsxs(p,{to:`/conferences/${a}/spotlight`,className:"tag-cell",children:[e.jsxs("div",{className:"name",children:[e.jsx("span",{className:"dot",style:{background:"#fdbb02"}}),"Spotlight papers"]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[g.toLocaleString()," papers"]})})]}),u>0&&e.jsxs(p,{to:`/conferences/${a}/outstanding`,className:"tag-cell",children:[e.jsxs("div",{className:"name",children:[e.jsx("span",{className:"dot",style:{background:"#c45c26"}}),"Outstanding papers"]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[u.toLocaleString()," papers"]})})]}),j>0&&e.jsxs(p,{to:`/conferences/${a}/best-paper-finalists`,className:"tag-cell",children:[e.jsxs("div",{className:"name",children:[e.jsx("span",{className:"dot",style:{background:"#c9a227"}}),"Best paper finalists"]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[j.toLocaleString()," papers"]})})]})]})]}),t.isLoading?e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:32},children:Array.from({length:4}).map((n,r)=>e.jsxs("div",{children:[e.jsx(f,{className:"h-8 w-1/3 mb-4"}),e.jsx("div",{className:"tag-grid",children:Array.from({length:6}).map((o,l)=>e.jsx(f,{className:"h-24"},l))})]},r))}):i.map(n=>{const r=n.tasks;if(r.length===0)return null;const o=r.reduce((l,d)=>l+(d.paper_count||0),0);return e.jsxs("section",{style:{marginBottom:48},children:[e.jsxs("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:24,paddingBottom:12,borderBottom:"1px solid var(--hairline-strong)"},children:[e.jsxs("div",{children:[e.jsx("h2",{style:{fontFamily:"var(--serif)",fontSize:26,fontWeight:500,letterSpacing:"-0.02em",marginBottom:4},children:n.name}),n.description&&e.jsx("div",{style:{fontFamily:"var(--serif)",fontStyle:"italic",fontSize:13,color:"var(--ink-soft)"},children:n.description})]}),e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",whiteSpace:"nowrap"},children:[r.length," ",r.length===1?"task":"tasks"," · ",o.toLocaleString()," papers"]})]}),e.jsx("div",{className:"tag-grid",children:r.map(l=>{const d=l.slug||"",x=B(C(d));return e.jsxs(p,{to:`/conferences/${a}/${d}`,className:"tag-cell",children:[e.jsxs("div",{className:"name",children:[e.jsx("span",{className:"dot",style:{background:x.dot}}),E(l.name,d)]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[(l.paper_count??0).toLocaleString()," papers"]})})]},l.id)})})]},n.id)}),v>0&&e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",marginTop:24},children:[v," tasks across ",i.filter(n=>n.tasks.length>0).length," areas."]})]})};export{re as default}; diff --git a/assets/ConferenceTaskView-DDjlbbXm.js b/assets/ConferenceTaskView-DNX01Fcj.js similarity index 84% rename from assets/ConferenceTaskView-DDjlbbXm.js rename to assets/ConferenceTaskView-DNX01Fcj.js index a53448484abc47e7f85daff8204af3f2a02d7e15..d2f38d96a4944f350e012de7d8c845687e339f47 100644 --- a/assets/ConferenceTaskView-DDjlbbXm.js +++ b/assets/ConferenceTaskView-DNX01Fcj.js @@ -1 +1 @@ -import{u as $,d as W,r as P,j as e,L as y,F as G}from"./index-CnBotBa4.js";import{u as M}from"./useQuery-C8pfCInN.js";import{P as J}from"./components-CSFfzsKt.js";import{P as X}from"./PaperFeedFilters-DBRREw9D.js";import{a as Y,P as Z,b as ee}from"./PaperDateFilter-DMplC82d.js";import{M as h}from"./MarkdownText-BAS9zVyW.js";import{c as z}from"./catalog-mND3MerS.js";import{t as se,d as ae}from"./transform-DMbrhcTx.js";import{d as te}from"./usePapers-fw4Ivp2T.js";import{u as re}from"./useIntersectionObserver-WHgviHIR.js";import{S as ne}from"./skeleton-DuOQBmSr.js";import{A as ie,a as oe}from"./alert-B0qZtPeK.js";import"./paperQueryKeys-BP2E-0yf.js";import"./LatexTitle-B1D_EqzJ.js";import"./papers-DkTdvzl4.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-BvojInsz.js";/* empty css */import"./PaperPreviewLink-ChJBLunV.js";import"./index-DxRopg3G.js";import"./index-DLNxIk77.js";import"./katex-DkKDou_j.js";import"./hover-card-CkboGKdu.js";import"./useMutation-YEvFXzv3.js";import"./useInfiniteQuery-DUlXElgD.js";const ce=[["trending","trending"],["date_published","newest"],["citation_count","most cited"]],le=t=>t==="trending"||t==="date_published"||t==="citation_count"?t:"trending",Be=()=>{var A,L,O,T,B,D;const{confSlug:t,taskSlug:n}=$(),[o,u]=W(),w=le(o.get("order_by")),S=o.get("has_code")==="true",k=o.get("has_hf_artifacts")==="true",f=Y(o),I=a=>{const s=new URLSearchParams(o);s.set("order_by",a),u(s)},q=a=>{const s=new URLSearchParams(o);a?s.set("has_code","true"):s.delete("has_code"),u(s)},Q=a=>{const s=new URLSearchParams(o);a?s.set("has_hf_artifacts","true"):s.delete("has_hf_artifacts"),u(s)},R=n==="all",N=n==="oral",_=n==="spotlight",l=n==="outstanding",d=n==="best-paper-finalists",x=l||d,p=R||N||_||l||d,K=p?void 0:n,U=N?"oral":_?"spotlight":l?"outstanding":d?"best_paper_finalist":void 0,m=M({queryKey:["conference",t],queryFn:()=>z.getConference(t),enabled:!!t,staleTime:10*60*1e3}),j=M({queryKey:["task",n],queryFn:()=>z.getTask(n),enabled:!!n&&!p,staleTime:10*60*1e3}),i=te({conferenceSlug:t||"",taskSlug:K,presentation:U,page_size:12,order_by:w,order_dir:"desc",include_resources:!0,has_code:S,has_hf_artifacts:k,start_date:f.startDate,end_date:f.endDate,enabled:!!t}),{targetRef:V,isIntersecting:C}=re({rootMargin:"200px"});P.useEffect(()=>{C&&i.hasNextPage&&!i.isFetchingNextPage&&i.fetchNextPage()},[C,i.hasNextPage,i.isFetchingNextPage]),P.useEffect(()=>{window.scrollTo(0,0)},[t,n]);const v=P.useMemo(()=>{var s;return(((s=i.data)==null?void 0:s.pages)??[]).flatMap(c=>c.results)},[i.data]),b=P.useMemo(()=>v.map(se),[v]),g=R?"All papers":N?"Oral papers":_?"Spotlight papers":l?"Outstanding papers":d?"Best paper finalists":ae(((A=j.data)==null?void 0:A.name)||n||"",((L=j.data)==null?void 0:L.slug)||n),F=((T=(O=i.data)==null?void 0:O.pages[0])==null?void 0:T.count)??((B=m.data)==null?void 0:B.paper_count)??0,r=j.data;return m.error||j.error||i.error?e.jsx("div",{className:"page",children:e.jsx(ie,{variant:"destructive",children:e.jsx(oe,{children:"Failed to load conference papers. Please try again."})})}):e.jsxs("div",{className:"page",children:[e.jsxs("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:[e.jsx(y,{to:"/",children:"Home"}),e.jsx("span",{children:" / "}),e.jsx(y,{to:"/conferences",children:"Conferences"}),e.jsx("span",{children:" / "}),e.jsx(y,{to:`/conferences/${t}`,children:((D=m.data)==null?void 0:D.name)??t}),e.jsx("span",{children:" / "}),e.jsx("span",{children:g})]}),e.jsxs("div",{className:!p&&(r!=null&&r.image_url)?"task-hero-grid":void 0,style:{marginTop:16,marginBottom:28},children:[e.jsxs("div",{children:[e.jsx("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--accent-text)",letterSpacing:"0.1em",marginBottom:8},children:p?"BROWSE PAPERS":"TASK"}),e.jsx("h1",{className:"domain-mega-title",children:g}),l&&t==="iclr-2026"&&e.jsx(h,{className:"task-explainer",text:"ICLR 2026 recognized two Outstanding Papers and one Honorable Mention. [Read the announcement](https://blog.iclr.cc/2026/04/23/announcing-the-iclr-2026-outstanding-papers/)."}),l&&t==="icml-2026"&&e.jsx(h,{className:"task-explainer",text:"ICML 2026 recognized two Outstanding Papers and five Honorable Mentions. [Read the announcement](https://blog.icml.cc/2026/07/05/announcing-the-icml-2026-awards/)."}),d&&t==="cvpr-2026"&&e.jsx(h,{className:"task-explainer",text:"CVPR 2026 recognized fifteen Best Paper Award finalists, including the winners. [Read the announcement](https://x.com/CVPR/status/2062912519522717978)."}),!p&&(r==null?void 0:r.description)&&e.jsx(h,{className:"task-explainer",text:r.description}),m.data&&e.jsxs("div",{className:"task-quickstats",style:{marginTop:12},children:[e.jsxs("span",{children:[e.jsx("span",{className:"num",children:F.toLocaleString()}),"PAPERS"]}),e.jsx("span",{children:m.data.name})]})]}),!p&&(r==null?void 0:r.image_url)&&e.jsxs("figure",{className:"task-figure-card",children:[e.jsx("div",{className:"task-figure-img-wrap",children:e.jsx("img",{className:"task-figure-img",src:r.image_url,alt:`${g} schematic`,onError:a=>{var s,c;(c=(s=a.currentTarget.parentElement)==null?void 0:s.parentElement)==null||c.style.setProperty("display","none")}})}),e.jsxs("figcaption",{children:["Figure · ",g,r.image_credit&&e.jsxs(e.Fragment,{children:[e.jsx("br",{}),e.jsx(h,{className:"task-image-credit",text:r.image_credit})]})]})]})]}),e.jsxs("div",{className:"task-section-head",children:[e.jsx("div",{className:"task-section-eyebrow",children:x?"Award papers":"Conference papers · sort below"}),e.jsxs("div",{className:"task-section-title",children:["Papers ",e.jsxs("span",{className:"meta",children:["[",F.toLocaleString(),"]"]})]})]}),e.jsxs("div",{className:"sort-bar",children:[e.jsxs("div",{className:"paper-feed-toolbar-controls",children:[!x&&e.jsx("div",{className:"sort-options",children:ce.map(([a,s])=>e.jsx("button",{className:`sort-btn ${w===a?"active":""}`,onClick:()=>I(a),children:s},a))}),e.jsx(X,{hasCode:S,hasHfArtifacts:k,onHasCodeChange:q,onHasHfArtifactsChange:Q,showDivider:!x})]}),e.jsx(Z,{startDate:f.startDate,endDate:f.endDate,onChange:a=>u(ee(o,a))}),!x&&e.jsxs("div",{className:"results-count",children:[b.length," loaded in ",e.jsx("span",{children:g})]})]}),i.isLoading?e.jsx("div",{className:"paper-list",children:Array.from({length:4}).map((a,s)=>e.jsx(ne,{className:"h-40 w-full"},s))}):b.length===0?e.jsx("div",{className:"no-results",children:"No papers found for this selection."}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"paper-list",children:b.map((a,s)=>{var E;const c=(E=v[s])==null?void 0:E.conference_award,H=c==="outstanding"?"Outstanding Paper":c==="honorable_mention"?"Honorable Mention":c==="best_paper_finalist"&&!d?"Best Paper Finalist":null;return e.jsxs(G.Fragment,{children:[H&&e.jsx("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--accent-text)",letterSpacing:"0.08em",marginBottom:8},children:H}),e.jsx(J,{paper:a,rank:s+1})]},a.id)})}),e.jsx("div",{ref:V,style:{height:1}}),i.isFetchingNextPage&&e.jsx("div",{style:{padding:"20px 0",textAlign:"center",color:"var(--ink-faint)"},children:"Loading more…"})]})]})};export{Be as default}; +import{u as $,d as W,r as P,j as e,L as y,F as G}from"./index-hxawG6mk.js";import{u as M}from"./useQuery-B7vCF2Os.js";import{P as J}from"./components-Djdw_Z-e.js";import{P as X}from"./PaperFeedFilters-BsWw60hu.js";import{a as Y,P as Z,b as ee}from"./PaperDateFilter-CmJ1wf5w.js";import{M as h}from"./MarkdownText-C2hX4LYt.js";import{c as z}from"./catalog-ePebz7GX.js";import{t as se,d as ae}from"./transform-DfrN0kQW.js";import{d as te}from"./usePapers-K74IxnFM.js";import{u as re}from"./useIntersectionObserver-rTEWxOEQ.js";import{S as ne}from"./skeleton-CRfsRMNe.js";import{A as ie,a as oe}from"./alert-2LCyXuCE.js";import"./paperQueryKeys-BP2E-0yf.js";import"./LatexTitle-QTkECjbh.js";import"./papers-B0ysePyJ.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-BEdoEHfx.js";/* empty css */import"./PaperPreviewLink-BJhSzNVs.js";import"./index-CaRYlo5c.js";import"./index-Ddr0k9KU.js";import"./katex-DkKDou_j.js";import"./hover-card-DEHIu6q-.js";import"./useMutation-gPqxjZGO.js";import"./useInfiniteQuery-BIEmOe8z.js";const ce=[["trending","trending"],["date_published","newest"],["citation_count","most cited"]],le=t=>t==="trending"||t==="date_published"||t==="citation_count"?t:"trending",Be=()=>{var A,L,O,T,B,D;const{confSlug:t,taskSlug:n}=$(),[o,u]=W(),w=le(o.get("order_by")),S=o.get("has_code")==="true",k=o.get("has_hf_artifacts")==="true",f=Y(o),I=a=>{const s=new URLSearchParams(o);s.set("order_by",a),u(s)},q=a=>{const s=new URLSearchParams(o);a?s.set("has_code","true"):s.delete("has_code"),u(s)},Q=a=>{const s=new URLSearchParams(o);a?s.set("has_hf_artifacts","true"):s.delete("has_hf_artifacts"),u(s)},R=n==="all",N=n==="oral",_=n==="spotlight",l=n==="outstanding",d=n==="best-paper-finalists",x=l||d,p=R||N||_||l||d,K=p?void 0:n,U=N?"oral":_?"spotlight":l?"outstanding":d?"best_paper_finalist":void 0,m=M({queryKey:["conference",t],queryFn:()=>z.getConference(t),enabled:!!t,staleTime:10*60*1e3}),j=M({queryKey:["task",n],queryFn:()=>z.getTask(n),enabled:!!n&&!p,staleTime:10*60*1e3}),i=te({conferenceSlug:t||"",taskSlug:K,presentation:U,page_size:12,order_by:w,order_dir:"desc",include_resources:!0,has_code:S,has_hf_artifacts:k,start_date:f.startDate,end_date:f.endDate,enabled:!!t}),{targetRef:V,isIntersecting:C}=re({rootMargin:"200px"});P.useEffect(()=>{C&&i.hasNextPage&&!i.isFetchingNextPage&&i.fetchNextPage()},[C,i.hasNextPage,i.isFetchingNextPage]),P.useEffect(()=>{window.scrollTo(0,0)},[t,n]);const v=P.useMemo(()=>{var s;return(((s=i.data)==null?void 0:s.pages)??[]).flatMap(c=>c.results)},[i.data]),b=P.useMemo(()=>v.map(se),[v]),g=R?"All papers":N?"Oral papers":_?"Spotlight papers":l?"Outstanding papers":d?"Best paper finalists":ae(((A=j.data)==null?void 0:A.name)||n||"",((L=j.data)==null?void 0:L.slug)||n),F=((T=(O=i.data)==null?void 0:O.pages[0])==null?void 0:T.count)??((B=m.data)==null?void 0:B.paper_count)??0,r=j.data;return m.error||j.error||i.error?e.jsx("div",{className:"page",children:e.jsx(ie,{variant:"destructive",children:e.jsx(oe,{children:"Failed to load conference papers. Please try again."})})}):e.jsxs("div",{className:"page",children:[e.jsxs("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:[e.jsx(y,{to:"/",children:"Home"}),e.jsx("span",{children:" / "}),e.jsx(y,{to:"/conferences",children:"Conferences"}),e.jsx("span",{children:" / "}),e.jsx(y,{to:`/conferences/${t}`,children:((D=m.data)==null?void 0:D.name)??t}),e.jsx("span",{children:" / "}),e.jsx("span",{children:g})]}),e.jsxs("div",{className:!p&&(r!=null&&r.image_url)?"task-hero-grid":void 0,style:{marginTop:16,marginBottom:28},children:[e.jsxs("div",{children:[e.jsx("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--accent-text)",letterSpacing:"0.1em",marginBottom:8},children:p?"BROWSE PAPERS":"TASK"}),e.jsx("h1",{className:"domain-mega-title",children:g}),l&&t==="iclr-2026"&&e.jsx(h,{className:"task-explainer",text:"ICLR 2026 recognized two Outstanding Papers and one Honorable Mention. [Read the announcement](https://blog.iclr.cc/2026/04/23/announcing-the-iclr-2026-outstanding-papers/)."}),l&&t==="icml-2026"&&e.jsx(h,{className:"task-explainer",text:"ICML 2026 recognized two Outstanding Papers and five Honorable Mentions. [Read the announcement](https://blog.icml.cc/2026/07/05/announcing-the-icml-2026-awards/)."}),d&&t==="cvpr-2026"&&e.jsx(h,{className:"task-explainer",text:"CVPR 2026 recognized fifteen Best Paper Award finalists, including the winners. [Read the announcement](https://x.com/CVPR/status/2062912519522717978)."}),!p&&(r==null?void 0:r.description)&&e.jsx(h,{className:"task-explainer",text:r.description}),m.data&&e.jsxs("div",{className:"task-quickstats",style:{marginTop:12},children:[e.jsxs("span",{children:[e.jsx("span",{className:"num",children:F.toLocaleString()}),"PAPERS"]}),e.jsx("span",{children:m.data.name})]})]}),!p&&(r==null?void 0:r.image_url)&&e.jsxs("figure",{className:"task-figure-card",children:[e.jsx("div",{className:"task-figure-img-wrap",children:e.jsx("img",{className:"task-figure-img",src:r.image_url,alt:`${g} schematic`,onError:a=>{var s,c;(c=(s=a.currentTarget.parentElement)==null?void 0:s.parentElement)==null||c.style.setProperty("display","none")}})}),e.jsxs("figcaption",{children:["Figure · ",g,r.image_credit&&e.jsxs(e.Fragment,{children:[e.jsx("br",{}),e.jsx(h,{className:"task-image-credit",text:r.image_credit})]})]})]})]}),e.jsxs("div",{className:"task-section-head",children:[e.jsx("div",{className:"task-section-eyebrow",children:x?"Award papers":"Conference papers · sort below"}),e.jsxs("div",{className:"task-section-title",children:["Papers ",e.jsxs("span",{className:"meta",children:["[",F.toLocaleString(),"]"]})]})]}),e.jsxs("div",{className:"sort-bar",children:[e.jsxs("div",{className:"paper-feed-toolbar-controls",children:[!x&&e.jsx("div",{className:"sort-options",children:ce.map(([a,s])=>e.jsx("button",{className:`sort-btn ${w===a?"active":""}`,onClick:()=>I(a),children:s},a))}),e.jsx(X,{hasCode:S,hasHfArtifacts:k,onHasCodeChange:q,onHasHfArtifactsChange:Q,showDivider:!x})]}),e.jsx(Z,{startDate:f.startDate,endDate:f.endDate,onChange:a=>u(ee(o,a))}),!x&&e.jsxs("div",{className:"results-count",children:[b.length," loaded in ",e.jsx("span",{children:g})]})]}),i.isLoading?e.jsx("div",{className:"paper-list",children:Array.from({length:4}).map((a,s)=>e.jsx(ne,{className:"h-40 w-full"},s))}):b.length===0?e.jsx("div",{className:"no-results",children:"No papers found for this selection."}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"paper-list",children:b.map((a,s)=>{var E;const c=(E=v[s])==null?void 0:E.conference_award,H=c==="outstanding"?"Outstanding Paper":c==="honorable_mention"?"Honorable Mention":c==="best_paper_finalist"&&!d?"Best Paper Finalist":null;return e.jsxs(G.Fragment,{children:[H&&e.jsx("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--accent-text)",letterSpacing:"0.08em",marginBottom:8},children:H}),e.jsx(J,{paper:a,rank:s+1})]},a.id)})}),e.jsx("div",{ref:V,style:{height:1}}),i.isFetchingNextPage&&e.jsx("div",{style:{padding:"20px 0",textAlign:"center",color:"var(--ink-faint)"},children:"Loading more…"})]})]})};export{Be as default}; diff --git a/assets/ConferencesIndexView-BdHp1p-m.js b/assets/ConferencesIndexView-8nxxIGFL.js similarity index 85% rename from assets/ConferencesIndexView-BdHp1p-m.js rename to assets/ConferencesIndexView-8nxxIGFL.js index 731f2c75b3992ba28dd9b625c5bb9166a5e8f5e7..83ae5d28bc255e1b74eb95aafd647c9e0c071a9a 100644 --- a/assets/ConferencesIndexView-BdHp1p-m.js +++ b/assets/ConferencesIndexView-8nxxIGFL.js @@ -1 +1 @@ -import{r as p,j as e,L as d}from"./index-CnBotBa4.js";import{u}from"./useQuery-C8pfCInN.js";import{c as f}from"./catalog-mND3MerS.js";import{S as m}from"./skeleton-DuOQBmSr.js";import{A as h,a as g}from"./alert-B0qZtPeK.js";import{T as x}from"./TaxonomySuggestionTile-FyHlZUAE.js";import"./SignInToEditDialog-Nxaw2Fu9.js";import"./button-DNii_czO.js";import"./input-fzMY4SDb.js";import"./textarea-D8TA8f9X.js";import"./searchable-select-Dky9Eonk.js";import"./popover-BvojInsz.js";import"./dialog-mXYRHqz9.js";import"./loader-circle-zwM3ton0.js";import"./useMutation-YEvFXzv3.js";import"./submissions-BXysTHzU.js";import"./plus-DTSO60Ls.js";const j=(r,a)=>{if(!r)return null;const t=new Date(`${r}T00:00:00`),s=a?new Date(`${a}T00:00:00`):null,n=o=>o.toLocaleDateString("en-US",{month:"long",day:"numeric"}),i=t.getFullYear();return s&&s.getTime()!==t.getTime()?t.getMonth()===s.getMonth()?`${n(t).replace(/\d+$/,"").trim()} ${t.getDate()}–${s.getDate()}, ${i}`:`${n(t)} – ${n(s)}, ${i}`:`${n(t)}, ${i}`},v=r=>{var t;if(r.year!=null)return r.year;if(r.start_date)return Number(r.start_date.slice(0,4));const a=(t=r.slug.match(/-(\d{4})$/))==null?void 0:t[1];return a?Number(a):0},y=(r,a)=>{if(r.start_date&&a.start_date){const t=r.start_date.localeCompare(a.start_date);if(t!==0)return t}else{if(r.start_date)return-1;if(a.start_date)return 1}return r.name.localeCompare(a.name)},N={display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:24,paddingBottom:12,borderBottom:"1px solid var(--hairline-strong)"},z=()=>{const r=u({queryKey:["conferences"],queryFn:()=>f.conferences(),staleTime:6e5}),a=p.useMemo(()=>{var s;if(!((s=r.data)!=null&&s.results))return null;const t={};return r.data.results.forEach(n=>{const i=v(n);(t[i]||(t[i]=[])).push(n)}),Object.values(t).forEach(n=>n.sort(y)),Object.keys(t).map(Number).sort((n,i)=>i-n).map(n=>({year:n,conferences:t[n]}))},[r.data]);return r.error?e.jsx("div",{className:"page",children:e.jsx(h,{variant:"destructive",children:e.jsx(g,{children:"Failed to load conferences. Please try again."})})}):e.jsxs("div",{className:"page",children:[e.jsx("div",{className:"feed-header",children:e.jsxs("div",{children:[e.jsxs("h1",{className:"feed-title",children:["All ",e.jsx("em",{children:"Conferences"})]}),e.jsx("div",{className:"feed-subtitle",children:"Browse accepted papers from major AI conferences, grouped by research area and task."}),e.jsxs("div",{className:"conference-deadlines-link",children:["Find deadlines for upcoming conferences"," ",e.jsx(d,{to:"/ai-deadlines",className:"underline underline-offset-2 hover:text-foreground",children:"here"}),". Conference information is based on"," ",e.jsx("a",{href:"https://huggingface.co/ai-conferences",target:"_blank",rel:"noreferrer",className:"underline underline-offset-2 hover:text-foreground",children:"Hugging Face AI Conferences"}),"."]})]})}),r.isLoading?e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:32},children:Array.from({length:2}).map((t,s)=>e.jsxs("div",{children:[e.jsx(m,{className:"h-8 w-24 mb-4"}),e.jsx("div",{className:"tag-grid",children:Array.from({length:3}).map((n,i)=>e.jsx(m,{className:"h-32"},i))})]},s))}):a==null?void 0:a.map(({year:t,conferences:s})=>{const n=s.reduce((o,l)=>o+(l.paper_count??0),0),i=t>0?String(t):"Unknown year";return e.jsxs("section",{style:{marginBottom:48},children:[e.jsxs("div",{style:N,children:[e.jsx("div",{children:e.jsx("h2",{style:{fontFamily:"var(--serif)",fontSize:26,fontWeight:500,letterSpacing:"-0.02em",marginBottom:4},children:i})}),e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",whiteSpace:"nowrap"},children:[s.length," ",s.length===1?"conference":"conferences"," ·"," ",n.toLocaleString()," papers"]})]}),e.jsxs("div",{className:"tag-grid",children:[s.map(o=>{const l=j(o.start_date,o.end_date),c=[o.venue,o.location].filter(Boolean).join(", ");return e.jsxs(d,{to:`/conferences/${o.slug}`,className:"tag-cell",children:[e.jsx("div",{className:"name",children:o.name}),e.jsxs("div",{className:"meta",style:{display:"flex",flexDirection:"column",gap:4},children:[l&&e.jsx("span",{children:l}),c&&e.jsx("span",{children:c}),e.jsxs("span",{children:[(o.paper_count??0).toLocaleString()," papers"]})]})]},o.id)}),e.jsx(x,{kind:"conference"})]})]},t)})]})};export{z as default}; +import{r as p,j as e,L as d}from"./index-hxawG6mk.js";import{u}from"./useQuery-B7vCF2Os.js";import{c as f}from"./catalog-ePebz7GX.js";import{S as m}from"./skeleton-CRfsRMNe.js";import{A as h,a as g}from"./alert-2LCyXuCE.js";import{T as x}from"./TaxonomySuggestionTile-DiI1TNoC.js";import"./SignInToEditDialog-4j2lLlXQ.js";import"./button-DR59q2Iu.js";import"./input-BOLTsgbP.js";import"./textarea-DzlRNXqF.js";import"./searchable-select-cLm40hhL.js";import"./popover-BEdoEHfx.js";import"./dialog-D2TDqr0v.js";import"./loader-circle-CXb3415J.js";import"./useMutation-gPqxjZGO.js";import"./submissions-DgbzmxlX.js";import"./plus-C1naIkSJ.js";const j=(r,a)=>{if(!r)return null;const t=new Date(`${r}T00:00:00`),s=a?new Date(`${a}T00:00:00`):null,n=o=>o.toLocaleDateString("en-US",{month:"long",day:"numeric"}),i=t.getFullYear();return s&&s.getTime()!==t.getTime()?t.getMonth()===s.getMonth()?`${n(t).replace(/\d+$/,"").trim()} ${t.getDate()}–${s.getDate()}, ${i}`:`${n(t)} – ${n(s)}, ${i}`:`${n(t)}, ${i}`},v=r=>{var t;if(r.year!=null)return r.year;if(r.start_date)return Number(r.start_date.slice(0,4));const a=(t=r.slug.match(/-(\d{4})$/))==null?void 0:t[1];return a?Number(a):0},y=(r,a)=>{if(r.start_date&&a.start_date){const t=r.start_date.localeCompare(a.start_date);if(t!==0)return t}else{if(r.start_date)return-1;if(a.start_date)return 1}return r.name.localeCompare(a.name)},N={display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:24,paddingBottom:12,borderBottom:"1px solid var(--hairline-strong)"},z=()=>{const r=u({queryKey:["conferences"],queryFn:()=>f.conferences(),staleTime:6e5}),a=p.useMemo(()=>{var s;if(!((s=r.data)!=null&&s.results))return null;const t={};return r.data.results.forEach(n=>{const i=v(n);(t[i]||(t[i]=[])).push(n)}),Object.values(t).forEach(n=>n.sort(y)),Object.keys(t).map(Number).sort((n,i)=>i-n).map(n=>({year:n,conferences:t[n]}))},[r.data]);return r.error?e.jsx("div",{className:"page",children:e.jsx(h,{variant:"destructive",children:e.jsx(g,{children:"Failed to load conferences. Please try again."})})}):e.jsxs("div",{className:"page",children:[e.jsx("div",{className:"feed-header",children:e.jsxs("div",{children:[e.jsxs("h1",{className:"feed-title",children:["All ",e.jsx("em",{children:"Conferences"})]}),e.jsx("div",{className:"feed-subtitle",children:"Browse accepted papers from major AI conferences, grouped by research area and task."}),e.jsxs("div",{className:"conference-deadlines-link",children:["Find deadlines for upcoming conferences"," ",e.jsx(d,{to:"/ai-deadlines",className:"underline underline-offset-2 hover:text-foreground",children:"here"}),". Conference information is based on"," ",e.jsx("a",{href:"https://huggingface.co/ai-conferences",target:"_blank",rel:"noreferrer",className:"underline underline-offset-2 hover:text-foreground",children:"Hugging Face AI Conferences"}),"."]})]})}),r.isLoading?e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:32},children:Array.from({length:2}).map((t,s)=>e.jsxs("div",{children:[e.jsx(m,{className:"h-8 w-24 mb-4"}),e.jsx("div",{className:"tag-grid",children:Array.from({length:3}).map((n,i)=>e.jsx(m,{className:"h-32"},i))})]},s))}):a==null?void 0:a.map(({year:t,conferences:s})=>{const n=s.reduce((o,l)=>o+(l.paper_count??0),0),i=t>0?String(t):"Unknown year";return e.jsxs("section",{style:{marginBottom:48},children:[e.jsxs("div",{style:N,children:[e.jsx("div",{children:e.jsx("h2",{style:{fontFamily:"var(--serif)",fontSize:26,fontWeight:500,letterSpacing:"-0.02em",marginBottom:4},children:i})}),e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",whiteSpace:"nowrap"},children:[s.length," ",s.length===1?"conference":"conferences"," ·"," ",n.toLocaleString()," papers"]})]}),e.jsxs("div",{className:"tag-grid",children:[s.map(o=>{const l=j(o.start_date,o.end_date),c=[o.venue,o.location].filter(Boolean).join(", ");return e.jsxs(d,{to:`/conferences/${o.slug}`,className:"tag-cell",children:[e.jsx("div",{className:"name",children:o.name}),e.jsxs("div",{className:"meta",style:{display:"flex",flexDirection:"column",gap:4},children:[l&&e.jsx("span",{children:l}),c&&e.jsx("span",{children:c}),e.jsxs("span",{children:[(o.paper_count??0).toLocaleString()," papers"]})]})]},o.id)}),e.jsx(x,{kind:"conference"})]})]},t)})]})};export{z as default}; diff --git a/assets/CronDashboard-BXgFsRKT.js b/assets/CronDashboard-BtWUYdS2.js similarity index 98% rename from assets/CronDashboard-BXgFsRKT.js rename to assets/CronDashboard-BtWUYdS2.js index 52b1cb3d758bc2498895455980aa1192980e7ccd..aef2efd5a0b85f84fdbcb2280a02912da20eb914 100644 --- a/assets/CronDashboard-BXgFsRKT.js +++ b/assets/CronDashboard-BtWUYdS2.js @@ -1,4 +1,4 @@ -import{g as I,r as h,z as as,q as rs,j as e,p as le,a1 as ns,R as ts,I as is,t as me,P as cs,w as ls,B as Re,x as A,m as Fe,L as xe,a as ds,f as os}from"./index-CnBotBa4.js";import{u as X}from"./useQuery-C8pfCInN.js";import{f as _,A as ie,C as v,a as b,b as y,c as q,d as f,o as ve}from"./operations-scUEWit-.js";import{B as S}from"./badge-CW-eQ3eC.js";import{B as C}from"./button-DNii_czO.js";import{C as ms}from"./chevron-down-IUgkNqZp.js";import{D as fe,r as us,f as hs,h as xs,j as ps,p as js,k as gs,l as vs}from"./codexAddEvals-vDBuZ5Km.js";import{F as _e}from"./file-text-BZVTM8hV.js";import{S as Te}from"./shield-alert-B-esZpK3.js";import{E as ee}from"./external-link-C_QBJuYU.js";import{C as se,R as Ne}from"./refresh-cw-B16d_5-C.js";import{L as D}from"./loader-circle-zwM3ton0.js";import{C as pe}from"./circle-check-BBMzXw2d.js";import{u as O}from"./useMutation-YEvFXzv3.js";import{u as fs}from"./useInfiniteQuery-DUlXElgD.js";import{p as Ae}from"./paperEdits-C4mFP78Y.js";import{c as ue}from"./catalog-mND3MerS.js";import{c as be}from"./chat-B0u4w1H2.js";/** +import{g as I,r as h,z as as,q as rs,j as e,p as le,a1 as ns,R as ts,I as is,t as me,P as cs,w as ls,B as Re,x as A,m as Fe,L as xe,a as ds,f as os}from"./index-hxawG6mk.js";import{u as X}from"./useQuery-B7vCF2Os.js";import{f as _,A as ie,C as v,a as b,b as y,c as q,d as f,o as ve}from"./operations-DFo5ls8Y.js";import{B as S}from"./badge-GWSoUTqe.js";import{B as C}from"./button-DR59q2Iu.js";import{C as ms}from"./chevron-down-dhq7I8yA.js";import{D as fe,r as us,f as hs,h as xs,j as ps,p as js,k as gs,l as vs}from"./codexAddEvals-BJRRv0q0.js";import{F as _e}from"./file-text-DIeliPoM.js";import{S as Te}from"./shield-alert-DrzIR1qR.js";import{E as ee}from"./external-link-CWzYMTrZ.js";import{C as se,R as Ne}from"./refresh-cw-Dg-Q2M4w.js";import{L as D}from"./loader-circle-CXb3415J.js";import{C as pe}from"./circle-check-Cs0UNhNB.js";import{u as O}from"./useMutation-gPqxjZGO.js";import{u as fs}from"./useInfiniteQuery-BIEmOe8z.js";import{p as Ae}from"./paperEdits-B1ZmleCA.js";import{c as ue}from"./catalog-ePebz7GX.js";import{c as be}from"./chat-DJiy7CbR.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/ExternalSourceEvalBadge-B3diD7Bx.js b/assets/ExternalSourceEvalBadge-CxgGG_57.js similarity index 94% rename from assets/ExternalSourceEvalBadge-B3diD7Bx.js rename to assets/ExternalSourceEvalBadge-CxgGG_57.js index 72e3913dbcef198e0dac63723607c8e8e59d206d..297145578afb973810d9fad881989a8b2d02ec9b 100644 --- a/assets/ExternalSourceEvalBadge-B3diD7Bx.js +++ b/assets/ExternalSourceEvalBadge-CxgGG_57.js @@ -1 +1 @@ -import{a as o}from"./papers-DkTdvzl4.js";import{a4 as g,j as a,L as l}from"./index-CnBotBa4.js";import{H as u,a as c,b as d}from"./hover-card-CkboGKdu.js";import{s as m}from"./safeExternalHref-CkBrsh84.js";class b{constructor(e){this.request=e}list(e={}){const t=new URLSearchParams(Object.entries(e).filter(r=>r[1]!==void 0).map(([r,n])=>[r,String(n)])).toString();return this.request(`/evaluations/${t?`?${t}`:""}`,{cache:"no-store"})}get(e){return this.request(`/evaluations/${e}`)}async byPaper(e){return this.allPages({paper_id:Number(e),ordering:"-benchmark_popularity"})}async byDataset(e,t){return this.allPages({dataset_id:Number(e),best_metric:t,ordering:"best_rank"})}async byLeaderboard(e,t,r={}){return this.allPages({dataset_id:Number(e),task_id:Number(t),ordering:"best_rank",...r})}create(e){return this.request("/evaluations/",{method:"POST",body:JSON.stringify(e)})}update(e,t){return this.request(`/evaluations/${e}`,{method:"PUT",body:JSON.stringify(t)})}delete(e){return this.request(`/evaluations/${e}`,{method:"DELETE"})}primeCurationState(e,t=!1){return o.primeEvaluations(e,t)}batch(e,t){return o.mutateEvaluations(e,t,"/evaluations/batch",{method:"POST",body:JSON.stringify({paper_id:e,operations:t})})}async allPages(e){const r=await this.list({...e,page_size:100});if(!r.next_page)return r.results;const n=Math.ceil(r.count/100),p=await Promise.all(Array.from({length:n-1},(i,h)=>this.list({...e,page:h+2,page_size:100})));return[r,...p].flatMap(i=>i.results)}}const w=new b(g),j=()=>a.jsxs(u,{openDelay:120,closeDelay:120,children:[a.jsx(c,{asChild:!0,children:a.jsx("button",{type:"button",className:"bm-closed-source-tag","aria-label":"Closed-source model",children:"closed"})}),a.jsxs(d,{side:"top",align:"start",className:"w-auto max-w-[260px] p-3 text-sm leading-snug",children:["This is an evaluation of a closed-source model. You can disable viewing these in your"," ",a.jsx(l,{to:"/settings",className:"closed-eval-tooltip-link",children:"settings"}),"."]})]});function x(s){if(!s)return"Evaluation sourced outside this paper";const e=s.toLowerCase();if(e.includes("open-asr-leaderboard"))return"Open ASR Leaderboard";if(e.includes("arcprize.org"))return"ARC Prize Leaderboard";if(e.includes("frontierswe.com"))return"FrontierSWE";if(e.includes("deepswe.datacurve.ai"))return"DeepSWE";try{const t=new URL(s,"https://paperswithcode.co");return t.pathname.startsWith("/paper/")?"Source paper":t.hostname.replace(/^www\./,"")}catch{return s}}const E=({sourceUrl:s})=>{const e=m(s),t=typeof s=="string"&&s.startsWith("/paper/")?s:null,r=x(s);return a.jsxs(u,{openDelay:120,closeDelay:120,children:[a.jsx(c,{asChild:!0,children:a.jsx("button",{type:"button",className:"bm-external-source-tag","aria-label":`Externally sourced evaluation: ${r}`,children:"External"})}),a.jsxs(d,{side:"top",align:"start",className:"w-auto max-w-[280px] p-3 text-sm leading-snug",children:["This score was sourced outside this paper.",t?a.jsxs(a.Fragment,{children:[" ",a.jsx(l,{to:t,target:"_blank",rel:"noopener noreferrer",className:"external-eval-tooltip-link",children:r}),"."]}):e?a.jsxs(a.Fragment,{children:[" ",a.jsx("a",{href:e,target:"_blank",rel:"noopener noreferrer",className:"external-eval-tooltip-link",children:r}),"."]}):a.jsxs(a.Fragment,{children:[" ",r,"."]})]})]})};export{j as C,E,w as e}; +import{a as o}from"./papers-B0ysePyJ.js";import{a4 as g,j as a,L as l}from"./index-hxawG6mk.js";import{H as u,a as c,b as d}from"./hover-card-DEHIu6q-.js";import{s as m}from"./safeExternalHref-CkBrsh84.js";class b{constructor(e){this.request=e}list(e={}){const t=new URLSearchParams(Object.entries(e).filter(r=>r[1]!==void 0).map(([r,n])=>[r,String(n)])).toString();return this.request(`/evaluations/${t?`?${t}`:""}`,{cache:"no-store"})}get(e){return this.request(`/evaluations/${e}`)}async byPaper(e){return this.allPages({paper_id:Number(e),ordering:"-benchmark_popularity"})}async byDataset(e,t){return this.allPages({dataset_id:Number(e),best_metric:t,ordering:"best_rank"})}async byLeaderboard(e,t,r={}){return this.allPages({dataset_id:Number(e),task_id:Number(t),ordering:"best_rank",...r})}create(e){return this.request("/evaluations/",{method:"POST",body:JSON.stringify(e)})}update(e,t){return this.request(`/evaluations/${e}`,{method:"PUT",body:JSON.stringify(t)})}delete(e){return this.request(`/evaluations/${e}`,{method:"DELETE"})}primeCurationState(e,t=!1){return o.primeEvaluations(e,t)}batch(e,t){return o.mutateEvaluations(e,t,"/evaluations/batch",{method:"POST",body:JSON.stringify({paper_id:e,operations:t})})}async allPages(e){const r=await this.list({...e,page_size:100});if(!r.next_page)return r.results;const n=Math.ceil(r.count/100),p=await Promise.all(Array.from({length:n-1},(i,h)=>this.list({...e,page:h+2,page_size:100})));return[r,...p].flatMap(i=>i.results)}}const w=new b(g),j=()=>a.jsxs(u,{openDelay:120,closeDelay:120,children:[a.jsx(c,{asChild:!0,children:a.jsx("button",{type:"button",className:"bm-closed-source-tag","aria-label":"Closed-source model",children:"closed"})}),a.jsxs(d,{side:"top",align:"start",className:"w-auto max-w-[260px] p-3 text-sm leading-snug",children:["This is an evaluation of a closed-source model. You can disable viewing these in your"," ",a.jsx(l,{to:"/settings",className:"closed-eval-tooltip-link",children:"settings"}),"."]})]});function x(s){if(!s)return"Evaluation sourced outside this paper";const e=s.toLowerCase();if(e.includes("open-asr-leaderboard"))return"Open ASR Leaderboard";if(e.includes("arcprize.org"))return"ARC Prize Leaderboard";if(e.includes("frontierswe.com"))return"FrontierSWE";if(e.includes("deepswe.datacurve.ai"))return"DeepSWE";try{const t=new URL(s,"https://paperswithcode.co");return t.pathname.startsWith("/paper/")?"Source paper":t.hostname.replace(/^www\./,"")}catch{return s}}const E=({sourceUrl:s})=>{const e=m(s),t=typeof s=="string"&&s.startsWith("/paper/")?s:null,r=x(s);return a.jsxs(u,{openDelay:120,closeDelay:120,children:[a.jsx(c,{asChild:!0,children:a.jsx("button",{type:"button",className:"bm-external-source-tag","aria-label":`Externally sourced evaluation: ${r}`,children:"External"})}),a.jsxs(d,{side:"top",align:"start",className:"w-auto max-w-[280px] p-3 text-sm leading-snug",children:["This score was sourced outside this paper.",t?a.jsxs(a.Fragment,{children:[" ",a.jsx(l,{to:t,target:"_blank",rel:"noopener noreferrer",className:"external-eval-tooltip-link",children:r}),"."]}):e?a.jsxs(a.Fragment,{children:[" ",a.jsx("a",{href:e,target:"_blank",rel:"noopener noreferrer",className:"external-eval-tooltip-link",children:r}),"."]}):a.jsxs(a.Fragment,{children:[" ",r,"."]})]})]})};export{j as C,E,w as e}; diff --git a/assets/FeedView-CNbdpALd.js b/assets/FeedView-BTDU8K4n.js similarity index 90% rename from assets/FeedView-CNbdpALd.js rename to assets/FeedView-BTDU8K4n.js index 1fcd8325d75af86fb32aa8b0e896afb6493bab8c..7fe2d9ef92420d7bd394c9632c60a31b636eefa5 100644 --- a/assets/FeedView-CNbdpALd.js +++ b/assets/FeedView-BTDU8K4n.js @@ -1 +1 @@ -import{b as B,c as G,d as W,r as h,j as e,L as D,i as I,e as K,H as Q,C as V,f as X}from"./index-CnBotBa4.js";import{r as Y}from"./research-DhkAyrPi.js";import{P as J}from"./components-CSFfzsKt.js";import{P as Z}from"./PaperFeedFilters-DBRREw9D.js";import{r as ee,P as se,w as ae}from"./PaperDateFilter-DMplC82d.js";import{D as te,u as re,P as ne,M as ie,S as oe,a as le,R as ce,W as de,A as me,b as he,q as pe,c as ue}from"./chatLaunch-CptFdc8a.js";import{c as fe}from"./chat-B0u4w1H2.js";import{c as q}from"./catalog-mND3MerS.js";import{S as P}from"./chatPrompts-DypmWIqx.js";import{t as ge,d as $}from"./transform-DMbrhcTx.js";import{u as xe}from"./usePapers-fw4Ivp2T.js";import{u as be}from"./useIntersectionObserver-WHgviHIR.js";import{S as w}from"./skeleton-DuOQBmSr.js";import{A as je,a as ve}from"./alert-B0qZtPeK.js";import{u as O}from"./useQuery-C8pfCInN.js";import{u as ye}from"./useInfiniteQuery-DUlXElgD.js";import"./paperQueryKeys-BP2E-0yf.js";import"./LatexTitle-B1D_EqzJ.js";import"./papers-DkTdvzl4.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-BvojInsz.js";import"./chevron-down-IUgkNqZp.js";const Ne=[["trending","trending"],["date_published","newest"],["citation_count","most cited"]],U=45,_e=1800,we=25,Pe=350,Se=n=>{const[x,o]=h.useState(P[0].slice(0,1));return h.useEffect(()=>{var u,b;if(!n)return;if((b=(u=window.matchMedia)==null?void 0:u.call(window,"(prefers-reduced-motion: reduce)"))!=null&&b.matches){o(P[0]);return}let l=0,i=1,c=!1,p;o(P[0].slice(0,i));const m=()=>{const j=P[l];if(!c){if(i+=1,o(j.slice(0,i)),i===j.length){c=!0,p=window.setTimeout(m,_e);return}p=window.setTimeout(m,U);return}if(i-=1,o(j.slice(0,i)),i===0){c=!1,l=(l+1)%P.length,p=window.setTimeout(m,Pe);return}p=window.setTimeout(m,we)};return p=window.setTimeout(m,U),()=>window.clearTimeout(p)},[n]),x},Ae=n=>n==="trending"||n==="date_published"||n==="citation_count"?n:"trending",Te=()=>{var L,C;const n=B(),x=K(),o=X()?oe:le,[l,i]=h.useState({text:"",paperMentions:[]}),c=l.text,[p,m]=h.useState(0),[u,b]=h.useState(te),[j,F]=h.useState(!0),[S,H]=h.useState("low"),[g,A]=h.useState(!1),[T,y]=h.useState(null),f=Se(!c),N=h.useRef(null),M=O({queryKey:["chatAvailability"],queryFn:()=>fe.getAvailability(),retry:!1,enabled:I()}),R=!!((L=M.data)!=null&&L.web_search_available),_=I()&&((C=M.data)==null?void 0:C.paper_mentions_enabled)!==!1,r=re({draft:l,onChange:i,enabled:_,textareaRef:N});h.useLayoutEffect(()=>{const t=N.current;if(!t)return;const d=()=>{if(t.style.height="auto",c){t.style.height=`${Math.min(t.scrollHeight,160)}px`;return}const s=t.placeholder,a=P.reduce((v,E)=>(t.placeholder=E,Math.max(v,t.scrollHeight)),0);t.placeholder=s,t.style.height=`${Math.min(a,160)}px`};return d(),window.addEventListener("resize",d),()=>window.removeEventListener("resize",d)},[c]);const k=async(t=l)=>{const d=t.text.trim();if(!(!d||g)){if(x){const s=new URLSearchParams({q:d,model:u}),a=`${V}?${s}`,v=window.open(a,"_blank");if(!v){y(a);return}v.opener=null,y(null),i({text:"",paperMentions:[]});return}A(!0),pe(t,u,{webSearchEnabled:j,reasoningEffort:S});try{const s=await ue(u,S);n(`/chat/${s.id}`)}catch{n("/chat")}}};return e.jsxs(e.Fragment,{children:[!x&&e.jsx("div",{className:"ask-home-new",children:"Hint: type @ to bring papers into context"}),e.jsxs("div",{className:"ask-home",children:[e.jsxs("div",{className:"ask-home-textarea-wrap",children:[e.jsx(ne,{text:l.text,mentions:l.paperMentions,scrollTop:p,variant:"home"}),e.jsx("textarea",{ref:N,rows:1,value:c,placeholder:f,"aria-label":"Ask the assistant",disabled:g,onChange:t=>r.updateText(t.target.value,t.target.selectionStart),onSelect:t=>r.refresh(t.currentTarget.selectionStart),onClick:t=>r.refresh(t.currentTarget.selectionStart),onScroll:t=>m(t.currentTarget.scrollTop),onBlur:t=>{var d,s;(s=(d=t.relatedTarget)==null?void 0:d.closest)!=null&&s.call(d,".chat-paper-picker")||window.setTimeout(r.close,0)},onKeyDown:t=>{r.keyDown(t)||t.key==="Enter"&&!t.shiftKey&&(t.preventDefault(),k())},role:_?"combobox":void 0,"aria-expanded":_?r.open:void 0,"aria-controls":r.open?r.pickerId:void 0,"aria-activedescendant":r.open&&r.results.length?`${r.optionIdPrefix}-${r.activeIndex}`:void 0,"aria-autocomplete":_?"list":void 0,"aria-describedby":r.message?"ask-home-paper-mention-message":void 0})]}),T&&e.jsx("div",{className:"chat-paper-mention-message",role:"alert",children:e.jsx("a",{href:T,target:"_blank",rel:"noreferrer",children:"Open this question on paperswithcode.co"})}),r.message&&e.jsx("div",{id:"ask-home-paper-mention-message",className:"chat-paper-mention-message",role:"alert",children:r.message}),e.jsxs("div",{className:"ask-home-foot",children:[e.jsxs("div",{className:"ask-home-provider-tools",children:[e.jsx(ie,{models:o,selectedModel:u,onModelChange:b}),!x&&e.jsx(ce,{value:S,onChange:H,disabled:g}),R&&e.jsx(de,{enabled:j,onChange:F,disabled:g})]}),e.jsx("button",{type:"button",className:`chat-send${c.trim()?" chat-send-on":""}`,onClick:()=>void k(),disabled:!c.trim()||g,"aria-label":"Ask the assistant",children:e.jsx(me,{})})]}),e.jsx(he,{open:r.open,query:r.query,results:r.results,activeIndex:r.activeIndex,loading:r.loading,error:r.error,onSelect:r.select,id:r.pickerId,optionIdPrefix:r.optionIdPrefix})]})]})},Ye=({following:n=!1})=>{var k,L,C,t,d;const x=B(),o=G(),l=o==null?void 0:o.user,[i,c]=W(),p=Ae(i.get("order_by")),m=ee(i,void 0,n?"month":"week"),u=i.get("has_code")==="true",b=i.get("has_hf_artifacts")==="true",j=s=>{const a=new URLSearchParams(i);a.set("order_by",s),n?x(`/?${a}`):c(a)},F=s=>{const a=new URLSearchParams(i);s?a.set("has_code","true"):a.delete("has_code"),c(a)},S=s=>{const a=new URLSearchParams(i);s?a.set("has_hf_artifacts","true"):a.delete("has_hf_artifacts"),c(a)},H=O({queryKey:["top-tasks-sidebar"],queryFn:()=>q.topTasks(8),staleTime:10*60*1e3}),g=O({queryKey:["trending-tasks-sidebar"],queryFn:()=>q.trendingTasks({limit:8,level:0}),staleTime:10*60*1e3}),A=xe({enabled:!n,page_size:30,order_by:p,order_dir:"desc",start_date:m.startDate,end_date:m.endDate,include_resources:!0,has_code:u,has_hf_artifacts:b}),T={...m,hasCode:u,hasHfArtifacts:b},y=ye({queryKey:["research-feed",l==null?void 0:l.hf_subject,T],queryFn:({pageParam:s})=>Y.following(s,T),initialPageParam:0,getNextPageParam:(s,a)=>s.length===40?a.length*40:void 0,enabled:n&&!!l}),f=n?y:A,N=h.useMemo(()=>{var a,v;return(n?((a=y.data)==null?void 0:a.pages.flatMap(E=>E.map(z=>z.paper)))??[]:((v=A.data)==null?void 0:v.pages.flatMap(E=>E.results))??[]).map(ge)},[n,y.data,A.data]),{targetRef:M,isIntersecting:R}=be({rootMargin:"400px"});h.useEffect(()=>{R&&f.hasNextPage&&!f.isFetchingNextPage&&f.fetchNextPage()},[R,f.hasNextPage,f.isFetchingNextPage]);const _=f.isLoading||n&&(o==null?void 0:o.isLoading),r=f.error;return e.jsxs("div",{className:"page",children:[e.jsx("div",{className:"feed-header",children:e.jsxs("div",{children:[e.jsxs("h1",{className:"feed-title",children:["Trending ",e.jsx("em",{children:"Research"})]}),e.jsx("div",{className:"feed-subtitle",children:"Curated daily from arXiv and Hugging Face"})]})}),e.jsxs("div",{className:"layout-with-sidebar",children:[e.jsxs("aside",{className:"sidebar",children:[e.jsxs("div",{className:"sidebar-section sidebar-section-top-domains",children:[e.jsx("div",{className:"sidebar-label",children:"Top Domains"}),H.isLoading&&e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:Array.from({length:6}).map((s,a)=>e.jsx(w,{className:"h-5 w-full"},a))}),(k=H.data)==null?void 0:k.map(s=>e.jsxs(D,{to:`/tasks/${s.slug}`,className:"sidebar-link",children:[$(s.name,s.slug),s.paper_count!=null&&e.jsx("span",{className:"count",children:s.paper_count})]},s.id)),e.jsx(D,{to:"/tasks",className:"sidebar-link",style:{marginTop:8,fontStyle:"italic"},children:"all domains →"})]}),e.jsxs("div",{className:"sidebar-section sidebar-section-trending-domains",children:[e.jsx("div",{className:"sidebar-label",children:"Trending Domains"}),g.isLoading&&e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:Array.from({length:6}).map((s,a)=>e.jsx(w,{className:"h-5 w-full"},a))}),((C=(L=g.data)==null?void 0:L.results)==null?void 0:C.length)===0&&!g.isLoading&&e.jsx("div",{style:{fontSize:12,color:"var(--ink-faint)"},children:"No domains gaining momentum right now."}),(d=(t=g.data)==null?void 0:t.results)==null?void 0:d.map(s=>e.jsxs(D,{to:`/tasks/${s.slug}`,className:"sidebar-link",children:[$(s.name,s.slug),e.jsxs("span",{className:"count",children:[s.share_lift.toFixed(1),"x"]})]},s.id))]})]}),e.jsxs("div",{className:"feed-main",children:[(I()||K())&&e.jsx("div",{className:"feed-chat",children:e.jsx(Te,{})}),e.jsxs("div",{className:"feed-content",children:[e.jsxs("div",{className:"sort-bar home-feed-sort-bar",children:[e.jsxs("div",{className:"paper-feed-toolbar-controls",children:[e.jsxs("div",{className:"sort-options",children:[Ne.map(([s,a])=>e.jsx("button",{className:`sort-btn ${!n&&p===s?"active":""}`,onClick:()=>j(s),children:a},s)),e.jsx("button",{className:`sort-btn ${n?"active":""}`,onClick:()=>{const s=new URLSearchParams(i);s.delete("order_by");const a=s.toString();x(a?`/following?${a}`:"/following")},children:"following"})]}),e.jsx(Z,{hasCode:u,hasHfArtifacts:b,onHasCodeChange:F,onHasHfArtifactsChange:S})]}),e.jsx(se,{startDate:m.startDate,endDate:m.endDate,onChange:s=>c(ae(i,s))})]}),r&&e.jsx(je,{variant:"destructive",className:"mb-4",children:e.jsxs(ve,{children:["Failed to load papers. ",e.jsx("button",{type:"button",onClick:()=>void f.refetch(),children:"Try again"})]})}),n&&!(o!=null&&o.isLoading)&&!l?e.jsx(Q,{returnTo:"/following",label:"Sign in to see your follows"}):_?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(w,{className:"paper-thumb-skeleton"})}),e.jsxs("div",{className:"paper-body",style:{flex:1,gap:12},children:[e.jsx(w,{className:"h-6 w-3/4"}),e.jsx(w,{className:"h-4 w-1/2"}),e.jsx(w,{className:"h-12 w-full"})]})]},a))}):N.length===0?r?null:e.jsx("div",{className:"no-results",children:n?e.jsxs(e.Fragment,{children:["No papers from your follows match these filters. Widen the date range, or follow more from ",e.jsx(D,{to:"/tasks",children:"tasks"}),", ",e.jsx(D,{to:"/methods",children:"methods"}),", benchmark, author, or organization pages."]}):"No papers in this window."}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"paper-list",children:N.map((s,a)=>e.jsx(J,{paper:s,rank:a+1},s.id))}),e.jsx("div",{ref:M,style:{height:1}}),f.isFetchingNextPage&&e.jsx("div",{style:{padding:"20px 0",textAlign:"center",color:"var(--ink-faint)"},children:"Loading more…"})]})]})]})]})]})};export{Te as AskAssistant,Ye as default}; +import{b as B,c as G,d as W,r as h,j as e,L as D,i as I,e as K,H as Q,C as V,f as X}from"./index-hxawG6mk.js";import{r as Y}from"./research-25A5rLuK.js";import{P as J}from"./components-Djdw_Z-e.js";import{P as Z}from"./PaperFeedFilters-BsWw60hu.js";import{r as ee,P as se,w as ae}from"./PaperDateFilter-CmJ1wf5w.js";import{D as te,u as re,P as ne,M as ie,S as oe,a as le,R as ce,W as de,A as me,b as he,q as pe,c as ue}from"./chatLaunch-DrTVeX4t.js";import{c as fe}from"./chat-DJiy7CbR.js";import{c as q}from"./catalog-ePebz7GX.js";import{S as P}from"./chatPrompts-DypmWIqx.js";import{t as ge,d as $}from"./transform-DfrN0kQW.js";import{u as xe}from"./usePapers-K74IxnFM.js";import{u as be}from"./useIntersectionObserver-rTEWxOEQ.js";import{S as w}from"./skeleton-CRfsRMNe.js";import{A as je,a as ve}from"./alert-2LCyXuCE.js";import{u as O}from"./useQuery-B7vCF2Os.js";import{u as ye}from"./useInfiniteQuery-BIEmOe8z.js";import"./paperQueryKeys-BP2E-0yf.js";import"./LatexTitle-QTkECjbh.js";import"./papers-B0ysePyJ.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-BEdoEHfx.js";import"./chevron-down-dhq7I8yA.js";const Ne=[["trending","trending"],["date_published","newest"],["citation_count","most cited"]],U=45,_e=1800,we=25,Pe=350,Se=n=>{const[x,o]=h.useState(P[0].slice(0,1));return h.useEffect(()=>{var u,b;if(!n)return;if((b=(u=window.matchMedia)==null?void 0:u.call(window,"(prefers-reduced-motion: reduce)"))!=null&&b.matches){o(P[0]);return}let l=0,i=1,c=!1,p;o(P[0].slice(0,i));const m=()=>{const j=P[l];if(!c){if(i+=1,o(j.slice(0,i)),i===j.length){c=!0,p=window.setTimeout(m,_e);return}p=window.setTimeout(m,U);return}if(i-=1,o(j.slice(0,i)),i===0){c=!1,l=(l+1)%P.length,p=window.setTimeout(m,Pe);return}p=window.setTimeout(m,we)};return p=window.setTimeout(m,U),()=>window.clearTimeout(p)},[n]),x},Ae=n=>n==="trending"||n==="date_published"||n==="citation_count"?n:"trending",Te=()=>{var L,C;const n=B(),x=K(),o=X()?oe:le,[l,i]=h.useState({text:"",paperMentions:[]}),c=l.text,[p,m]=h.useState(0),[u,b]=h.useState(te),[j,F]=h.useState(!0),[S,H]=h.useState("low"),[g,A]=h.useState(!1),[T,y]=h.useState(null),f=Se(!c),N=h.useRef(null),M=O({queryKey:["chatAvailability"],queryFn:()=>fe.getAvailability(),retry:!1,enabled:I()}),R=!!((L=M.data)!=null&&L.web_search_available),_=I()&&((C=M.data)==null?void 0:C.paper_mentions_enabled)!==!1,r=re({draft:l,onChange:i,enabled:_,textareaRef:N});h.useLayoutEffect(()=>{const t=N.current;if(!t)return;const d=()=>{if(t.style.height="auto",c){t.style.height=`${Math.min(t.scrollHeight,160)}px`;return}const s=t.placeholder,a=P.reduce((v,E)=>(t.placeholder=E,Math.max(v,t.scrollHeight)),0);t.placeholder=s,t.style.height=`${Math.min(a,160)}px`};return d(),window.addEventListener("resize",d),()=>window.removeEventListener("resize",d)},[c]);const k=async(t=l)=>{const d=t.text.trim();if(!(!d||g)){if(x){const s=new URLSearchParams({q:d,model:u}),a=`${V}?${s}`,v=window.open(a,"_blank");if(!v){y(a);return}v.opener=null,y(null),i({text:"",paperMentions:[]});return}A(!0),pe(t,u,{webSearchEnabled:j,reasoningEffort:S});try{const s=await ue(u,S);n(`/chat/${s.id}`)}catch{n("/chat")}}};return e.jsxs(e.Fragment,{children:[!x&&e.jsx("div",{className:"ask-home-new",children:"Hint: type @ to bring papers into context"}),e.jsxs("div",{className:"ask-home",children:[e.jsxs("div",{className:"ask-home-textarea-wrap",children:[e.jsx(ne,{text:l.text,mentions:l.paperMentions,scrollTop:p,variant:"home"}),e.jsx("textarea",{ref:N,rows:1,value:c,placeholder:f,"aria-label":"Ask the assistant",disabled:g,onChange:t=>r.updateText(t.target.value,t.target.selectionStart),onSelect:t=>r.refresh(t.currentTarget.selectionStart),onClick:t=>r.refresh(t.currentTarget.selectionStart),onScroll:t=>m(t.currentTarget.scrollTop),onBlur:t=>{var d,s;(s=(d=t.relatedTarget)==null?void 0:d.closest)!=null&&s.call(d,".chat-paper-picker")||window.setTimeout(r.close,0)},onKeyDown:t=>{r.keyDown(t)||t.key==="Enter"&&!t.shiftKey&&(t.preventDefault(),k())},role:_?"combobox":void 0,"aria-expanded":_?r.open:void 0,"aria-controls":r.open?r.pickerId:void 0,"aria-activedescendant":r.open&&r.results.length?`${r.optionIdPrefix}-${r.activeIndex}`:void 0,"aria-autocomplete":_?"list":void 0,"aria-describedby":r.message?"ask-home-paper-mention-message":void 0})]}),T&&e.jsx("div",{className:"chat-paper-mention-message",role:"alert",children:e.jsx("a",{href:T,target:"_blank",rel:"noreferrer",children:"Open this question on paperswithcode.co"})}),r.message&&e.jsx("div",{id:"ask-home-paper-mention-message",className:"chat-paper-mention-message",role:"alert",children:r.message}),e.jsxs("div",{className:"ask-home-foot",children:[e.jsxs("div",{className:"ask-home-provider-tools",children:[e.jsx(ie,{models:o,selectedModel:u,onModelChange:b}),!x&&e.jsx(ce,{value:S,onChange:H,disabled:g}),R&&e.jsx(de,{enabled:j,onChange:F,disabled:g})]}),e.jsx("button",{type:"button",className:`chat-send${c.trim()?" chat-send-on":""}`,onClick:()=>void k(),disabled:!c.trim()||g,"aria-label":"Ask the assistant",children:e.jsx(me,{})})]}),e.jsx(he,{open:r.open,query:r.query,results:r.results,activeIndex:r.activeIndex,loading:r.loading,error:r.error,onSelect:r.select,id:r.pickerId,optionIdPrefix:r.optionIdPrefix})]})]})},Ye=({following:n=!1})=>{var k,L,C,t,d;const x=B(),o=G(),l=o==null?void 0:o.user,[i,c]=W(),p=Ae(i.get("order_by")),m=ee(i,void 0,n?"month":"week"),u=i.get("has_code")==="true",b=i.get("has_hf_artifacts")==="true",j=s=>{const a=new URLSearchParams(i);a.set("order_by",s),n?x(`/?${a}`):c(a)},F=s=>{const a=new URLSearchParams(i);s?a.set("has_code","true"):a.delete("has_code"),c(a)},S=s=>{const a=new URLSearchParams(i);s?a.set("has_hf_artifacts","true"):a.delete("has_hf_artifacts"),c(a)},H=O({queryKey:["top-tasks-sidebar"],queryFn:()=>q.topTasks(8),staleTime:10*60*1e3}),g=O({queryKey:["trending-tasks-sidebar"],queryFn:()=>q.trendingTasks({limit:8,level:0}),staleTime:10*60*1e3}),A=xe({enabled:!n,page_size:30,order_by:p,order_dir:"desc",start_date:m.startDate,end_date:m.endDate,include_resources:!0,has_code:u,has_hf_artifacts:b}),T={...m,hasCode:u,hasHfArtifacts:b},y=ye({queryKey:["research-feed",l==null?void 0:l.hf_subject,T],queryFn:({pageParam:s})=>Y.following(s,T),initialPageParam:0,getNextPageParam:(s,a)=>s.length===40?a.length*40:void 0,enabled:n&&!!l}),f=n?y:A,N=h.useMemo(()=>{var a,v;return(n?((a=y.data)==null?void 0:a.pages.flatMap(E=>E.map(z=>z.paper)))??[]:((v=A.data)==null?void 0:v.pages.flatMap(E=>E.results))??[]).map(ge)},[n,y.data,A.data]),{targetRef:M,isIntersecting:R}=be({rootMargin:"400px"});h.useEffect(()=>{R&&f.hasNextPage&&!f.isFetchingNextPage&&f.fetchNextPage()},[R,f.hasNextPage,f.isFetchingNextPage]);const _=f.isLoading||n&&(o==null?void 0:o.isLoading),r=f.error;return e.jsxs("div",{className:"page",children:[e.jsx("div",{className:"feed-header",children:e.jsxs("div",{children:[e.jsxs("h1",{className:"feed-title",children:["Trending ",e.jsx("em",{children:"Research"})]}),e.jsx("div",{className:"feed-subtitle",children:"Curated daily from arXiv and Hugging Face"})]})}),e.jsxs("div",{className:"layout-with-sidebar",children:[e.jsxs("aside",{className:"sidebar",children:[e.jsxs("div",{className:"sidebar-section sidebar-section-top-domains",children:[e.jsx("div",{className:"sidebar-label",children:"Top Domains"}),H.isLoading&&e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:Array.from({length:6}).map((s,a)=>e.jsx(w,{className:"h-5 w-full"},a))}),(k=H.data)==null?void 0:k.map(s=>e.jsxs(D,{to:`/tasks/${s.slug}`,className:"sidebar-link",children:[$(s.name,s.slug),s.paper_count!=null&&e.jsx("span",{className:"count",children:s.paper_count})]},s.id)),e.jsx(D,{to:"/tasks",className:"sidebar-link",style:{marginTop:8,fontStyle:"italic"},children:"all domains →"})]}),e.jsxs("div",{className:"sidebar-section sidebar-section-trending-domains",children:[e.jsx("div",{className:"sidebar-label",children:"Trending Domains"}),g.isLoading&&e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:Array.from({length:6}).map((s,a)=>e.jsx(w,{className:"h-5 w-full"},a))}),((C=(L=g.data)==null?void 0:L.results)==null?void 0:C.length)===0&&!g.isLoading&&e.jsx("div",{style:{fontSize:12,color:"var(--ink-faint)"},children:"No domains gaining momentum right now."}),(d=(t=g.data)==null?void 0:t.results)==null?void 0:d.map(s=>e.jsxs(D,{to:`/tasks/${s.slug}`,className:"sidebar-link",children:[$(s.name,s.slug),e.jsxs("span",{className:"count",children:[s.share_lift.toFixed(1),"x"]})]},s.id))]})]}),e.jsxs("div",{className:"feed-main",children:[(I()||K())&&e.jsx("div",{className:"feed-chat",children:e.jsx(Te,{})}),e.jsxs("div",{className:"feed-content",children:[e.jsxs("div",{className:"sort-bar home-feed-sort-bar",children:[e.jsxs("div",{className:"paper-feed-toolbar-controls",children:[e.jsxs("div",{className:"sort-options",children:[Ne.map(([s,a])=>e.jsx("button",{className:`sort-btn ${!n&&p===s?"active":""}`,onClick:()=>j(s),children:a},s)),e.jsx("button",{className:`sort-btn ${n?"active":""}`,onClick:()=>{const s=new URLSearchParams(i);s.delete("order_by");const a=s.toString();x(a?`/following?${a}`:"/following")},children:"following"})]}),e.jsx(Z,{hasCode:u,hasHfArtifacts:b,onHasCodeChange:F,onHasHfArtifactsChange:S})]}),e.jsx(se,{startDate:m.startDate,endDate:m.endDate,onChange:s=>c(ae(i,s))})]}),r&&e.jsx(je,{variant:"destructive",className:"mb-4",children:e.jsxs(ve,{children:["Failed to load papers. ",e.jsx("button",{type:"button",onClick:()=>void f.refetch(),children:"Try again"})]})}),n&&!(o!=null&&o.isLoading)&&!l?e.jsx(Q,{returnTo:"/following",label:"Sign in to see your follows"}):_?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(w,{className:"paper-thumb-skeleton"})}),e.jsxs("div",{className:"paper-body",style:{flex:1,gap:12},children:[e.jsx(w,{className:"h-6 w-3/4"}),e.jsx(w,{className:"h-4 w-1/2"}),e.jsx(w,{className:"h-12 w-full"})]})]},a))}):N.length===0?r?null:e.jsx("div",{className:"no-results",children:n?e.jsxs(e.Fragment,{children:["No papers from your follows match these filters. Widen the date range, or follow more from ",e.jsx(D,{to:"/tasks",children:"tasks"}),", ",e.jsx(D,{to:"/methods",children:"methods"}),", benchmark, author, or organization pages."]}):"No papers in this window."}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"paper-list",children:N.map((s,a)=>e.jsx(J,{paper:s,rank:a+1},s.id))}),e.jsx("div",{ref:M,style:{height:1}}),f.isFetchingNextPage&&e.jsx("div",{style:{padding:"20px 0",textAlign:"center",color:"var(--ink-faint)"},children:"Loading more…"})]})]})]})]})]})};export{Te as AskAssistant,Ye as default}; diff --git a/assets/FollowingView-CwwmbQtN.js b/assets/FollowingView-CwwmbQtN.js new file mode 100644 index 0000000000000000000000000000000000000000..4a4bf0238666695efb6bda82e8d3ed40f9c602bd --- /dev/null +++ b/assets/FollowingView-CwwmbQtN.js @@ -0,0 +1 @@ +import{j as o}from"./index-hxawG6mk.js";import r from"./FeedView-BTDU8K4n.js";import"./research-25A5rLuK.js";import"./components-Djdw_Z-e.js";import"./paperQueryKeys-BP2E-0yf.js";import"./LatexTitle-QTkECjbh.js";import"./transform-DfrN0kQW.js";import"./papers-B0ysePyJ.js";import"./safeExternalHref-CkBrsh84.js";import"./PaperFeedFilters-BsWw60hu.js";import"./PaperDateFilter-CmJ1wf5w.js";import"./popover-BEdoEHfx.js";import"./chatLaunch-DrTVeX4t.js";import"./chat-DJiy7CbR.js";import"./chevron-down-dhq7I8yA.js";import"./useQuery-B7vCF2Os.js";import"./catalog-ePebz7GX.js";import"./chatPrompts-DypmWIqx.js";import"./usePapers-K74IxnFM.js";import"./useInfiniteQuery-BIEmOe8z.js";import"./useIntersectionObserver-rTEWxOEQ.js";import"./skeleton-CRfsRMNe.js";import"./alert-2LCyXuCE.js";function k(){return o.jsx(r,{following:!0})}export{k as default}; diff --git a/assets/FollowingView-NGImDHBL.js b/assets/FollowingView-NGImDHBL.js deleted file mode 100644 index 74498260d6f837f5748c82cd01fcbb0b528930c0..0000000000000000000000000000000000000000 --- a/assets/FollowingView-NGImDHBL.js +++ /dev/null @@ -1 +0,0 @@ -import{j as o}from"./index-CnBotBa4.js";import r from"./FeedView-CNbdpALd.js";import"./research-DhkAyrPi.js";import"./components-CSFfzsKt.js";import"./paperQueryKeys-BP2E-0yf.js";import"./LatexTitle-B1D_EqzJ.js";import"./transform-DMbrhcTx.js";import"./papers-DkTdvzl4.js";import"./safeExternalHref-CkBrsh84.js";import"./PaperFeedFilters-DBRREw9D.js";import"./PaperDateFilter-DMplC82d.js";import"./popover-BvojInsz.js";import"./chatLaunch-CptFdc8a.js";import"./chat-B0u4w1H2.js";import"./chevron-down-IUgkNqZp.js";import"./useQuery-C8pfCInN.js";import"./catalog-mND3MerS.js";import"./chatPrompts-DypmWIqx.js";import"./usePapers-fw4Ivp2T.js";import"./useInfiniteQuery-DUlXElgD.js";import"./useIntersectionObserver-WHgviHIR.js";import"./skeleton-DuOQBmSr.js";import"./alert-B0qZtPeK.js";function k(){return o.jsx(r,{following:!0})}export{k as default}; diff --git a/assets/FrameworksIndexView-D1-Xne_s.js b/assets/FrameworksIndexView-PzvCSGNE.js similarity index 92% rename from assets/FrameworksIndexView-D1-Xne_s.js rename to assets/FrameworksIndexView-PzvCSGNE.js index 45f0addc0b66bcefc15a5a3dac9084818cc2794a..0d888bcfe602df6cae6f670df01cb1a0825f6a65 100644 --- a/assets/FrameworksIndexView-D1-Xne_s.js +++ b/assets/FrameworksIndexView-PzvCSGNE.js @@ -1 +1 @@ -import{b as d,j as e,L as o,F as m}from"./index-CnBotBa4.js";import{u as p}from"./useQuery-C8pfCInN.js";import{I as h}from"./components-CSFfzsKt.js";import{c as u}from"./catalog-mND3MerS.js";import{c as g,h as f}from"./transform-DMbrhcTx.js";import"./paperQueryKeys-BP2E-0yf.js";import"./LatexTitle-B1D_EqzJ.js";import"./papers-DkTdvzl4.js";import"./safeExternalHref-CkBrsh84.js";const x={gpu:"GPU",cpu:"CPU",apple:"Apple silicon"},j={display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:24,paddingBottom:12,borderBottom:"1px solid var(--hairline-strong)"},k={fontFamily:"var(--serif)",fontSize:26,fontWeight:500,letterSpacing:"-0.02em",marginBottom:4},_={fontFamily:"var(--serif)",fontStyle:"italic",fontSize:13,color:"var(--ink-soft)"},v={fontFamily:"var(--mono)",fontSize:13,fontWeight:600,letterSpacing:"0.04em",textTransform:"uppercase",color:"var(--ink)",marginBottom:6},b=({platform:r})=>{const n=g(f(r));return e.jsx("span",{className:"framework-platform-chip",style:{background:n.bg,color:n.text},children:x[r]})},w=({framework:r})=>{const n=d(),l=`/papers?framework=${encodeURIComponent(r.slug)}`;return e.jsxs("article",{id:`framework-${r.slug}`,className:"framework-card framework-card-clickable",role:"link",tabIndex:0,"aria-label":`View papers implemented by ${r.name}`,onClick:a=>{a.target.closest("a, button")||n(l)},onKeyDown:a=>{a.target===a.currentTarget&&(a.key==="Enter"||a.key===" ")&&(a.preventDefault(),n(l))},children:[e.jsxs("div",{className:"framework-card-head",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"framework-card-name",children:r.name}),r.organization_name&&e.jsx("div",{className:"framework-card-org",children:r.organization_name})]}),r.platforms&&r.platforms.length>0&&e.jsx("div",{className:"framework-platform-row",children:r.platforms.map(a=>e.jsx(b,{platform:a},a))})]}),e.jsx("p",{className:"framework-card-desc",children:r.description}),r.when_to_use&&e.jsxs("div",{className:"framework-card-when",children:[e.jsx("span",{className:"framework-card-when-label",children:"When to use"}),r.when_to_use]}),(r.github_url||r.docs_url||r.introducing_paper_arxiv_id)&&e.jsxs("div",{className:"framework-card-links",children:[r.introducing_paper_arxiv_id&&e.jsx(o,{to:`/paper/${r.introducing_paper_arxiv_id}`,className:"framework-link",children:"Introducing paper"}),r.github_url&&r.paper_count>0&&e.jsxs(o,{to:l,className:"framework-link",children:["Implements ",r.paper_count," ",r.paper_count===1?"paper":"papers"]}),r.github_url&&r.paper_count===0&&e.jsx("span",{className:"framework-link framework-link-disabled","aria-disabled":"true",children:"Implements 0 papers"}),r.github_url&&e.jsxs("a",{href:r.github_url,target:"_blank",rel:"noopener noreferrer",className:"framework-link",children:[e.jsx(h,{name:"github",size:13}),"GitHub"]}),r.docs_url&&r.docs_url!==r.github_url&&e.jsx("a",{href:r.docs_url,target:"_blank",rel:"noopener noreferrer",className:"framework-link",children:"Docs"})]})]})},E=()=>{var a;const r=p({queryKey:["framework-catalog"],queryFn:()=>u.frameworkCatalog()}),n=((a=r.data)==null?void 0:a.domains)??[],l=n.reduce((i,s)=>i+s.categories.reduce((t,c)=>t+c.frameworks.length,0),0);return m.useEffect(()=>{var s;const i=window.location.hash.slice(1);i&&((s=document.getElementById(i))==null||s.scrollIntoView())},[r.data]),e.jsxs("div",{className:"page",children:[e.jsx("div",{className:"feed-header",children:e.jsxs("div",{children:[e.jsxs("h1",{className:"feed-title",children:["AI ",e.jsx("em",{children:"Frameworks"})]}),e.jsx("div",{className:"feed-subtitle",children:"Curated libraries and tools to run, serve, and train models — pick the right stack for your hardware and workload."})]})}),r.isLoading&&e.jsx("div",{className:"empty",children:"Loading frameworks…"}),r.isError&&e.jsx("div",{className:"empty",children:"Could not load frameworks."}),n.map(i=>e.jsxs("section",{style:{marginBottom:56},children:[e.jsxs("div",{style:j,children:[e.jsxs("div",{children:[e.jsx("h2",{style:k,children:i.name}),e.jsx("div",{style:_,children:i.description})]}),e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",whiteSpace:"nowrap"},children:[i.categories.length," ",i.categories.length===1?"category":"categories"," ·"," ",i.categories.reduce((s,t)=>s+t.frameworks.length,0)," frameworks"]})]}),i.categories.map(s=>e.jsxs("div",{className:"framework-category",children:[e.jsxs("div",{className:"framework-category-head",children:[e.jsxs("div",{children:[e.jsx("h3",{style:v,children:s.name}),s.description&&e.jsx("p",{className:"framework-category-blurb",children:s.description}),s.guide_url&&e.jsxs("a",{href:s.guide_url,target:"_blank",rel:"noopener noreferrer",className:"framework-guide-link",children:[s.guide_label??"Read guide"," →"]})]}),e.jsxs("div",{className:"framework-category-meta",children:[s.frameworks.length," ",s.frameworks.length===1?"framework":"frameworks"]})]}),e.jsx("div",{className:"framework-grid",children:s.frameworks.map(t=>e.jsx(w,{framework:t},t.slug))})]},s.slug))]},i.slug)),e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",marginTop:8},children:[l," frameworks across ",n.length," ",n.length===1?"domain":"domains",". More areas coming soon."]})]})};export{w as FrameworkCard,E as default}; +import{b as d,j as e,L as o,F as m}from"./index-hxawG6mk.js";import{u as p}from"./useQuery-B7vCF2Os.js";import{I as h}from"./components-Djdw_Z-e.js";import{c as u}from"./catalog-ePebz7GX.js";import{c as g,h as f}from"./transform-DfrN0kQW.js";import"./paperQueryKeys-BP2E-0yf.js";import"./LatexTitle-QTkECjbh.js";import"./papers-B0ysePyJ.js";import"./safeExternalHref-CkBrsh84.js";const x={gpu:"GPU",cpu:"CPU",apple:"Apple silicon"},j={display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:24,paddingBottom:12,borderBottom:"1px solid var(--hairline-strong)"},k={fontFamily:"var(--serif)",fontSize:26,fontWeight:500,letterSpacing:"-0.02em",marginBottom:4},_={fontFamily:"var(--serif)",fontStyle:"italic",fontSize:13,color:"var(--ink-soft)"},v={fontFamily:"var(--mono)",fontSize:13,fontWeight:600,letterSpacing:"0.04em",textTransform:"uppercase",color:"var(--ink)",marginBottom:6},b=({platform:r})=>{const n=g(f(r));return e.jsx("span",{className:"framework-platform-chip",style:{background:n.bg,color:n.text},children:x[r]})},w=({framework:r})=>{const n=d(),l=`/papers?framework=${encodeURIComponent(r.slug)}`;return e.jsxs("article",{id:`framework-${r.slug}`,className:"framework-card framework-card-clickable",role:"link",tabIndex:0,"aria-label":`View papers implemented by ${r.name}`,onClick:a=>{a.target.closest("a, button")||n(l)},onKeyDown:a=>{a.target===a.currentTarget&&(a.key==="Enter"||a.key===" ")&&(a.preventDefault(),n(l))},children:[e.jsxs("div",{className:"framework-card-head",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"framework-card-name",children:r.name}),r.organization_name&&e.jsx("div",{className:"framework-card-org",children:r.organization_name})]}),r.platforms&&r.platforms.length>0&&e.jsx("div",{className:"framework-platform-row",children:r.platforms.map(a=>e.jsx(b,{platform:a},a))})]}),e.jsx("p",{className:"framework-card-desc",children:r.description}),r.when_to_use&&e.jsxs("div",{className:"framework-card-when",children:[e.jsx("span",{className:"framework-card-when-label",children:"When to use"}),r.when_to_use]}),(r.github_url||r.docs_url||r.introducing_paper_arxiv_id)&&e.jsxs("div",{className:"framework-card-links",children:[r.introducing_paper_arxiv_id&&e.jsx(o,{to:`/paper/${r.introducing_paper_arxiv_id}`,className:"framework-link",children:"Introducing paper"}),r.github_url&&r.paper_count>0&&e.jsxs(o,{to:l,className:"framework-link",children:["Implements ",r.paper_count," ",r.paper_count===1?"paper":"papers"]}),r.github_url&&r.paper_count===0&&e.jsx("span",{className:"framework-link framework-link-disabled","aria-disabled":"true",children:"Implements 0 papers"}),r.github_url&&e.jsxs("a",{href:r.github_url,target:"_blank",rel:"noopener noreferrer",className:"framework-link",children:[e.jsx(h,{name:"github",size:13}),"GitHub"]}),r.docs_url&&r.docs_url!==r.github_url&&e.jsx("a",{href:r.docs_url,target:"_blank",rel:"noopener noreferrer",className:"framework-link",children:"Docs"})]})]})},E=()=>{var a;const r=p({queryKey:["framework-catalog"],queryFn:()=>u.frameworkCatalog()}),n=((a=r.data)==null?void 0:a.domains)??[],l=n.reduce((i,s)=>i+s.categories.reduce((t,c)=>t+c.frameworks.length,0),0);return m.useEffect(()=>{var s;const i=window.location.hash.slice(1);i&&((s=document.getElementById(i))==null||s.scrollIntoView())},[r.data]),e.jsxs("div",{className:"page",children:[e.jsx("div",{className:"feed-header",children:e.jsxs("div",{children:[e.jsxs("h1",{className:"feed-title",children:["AI ",e.jsx("em",{children:"Frameworks"})]}),e.jsx("div",{className:"feed-subtitle",children:"Curated libraries and tools to run, serve, and train models — pick the right stack for your hardware and workload."})]})}),r.isLoading&&e.jsx("div",{className:"empty",children:"Loading frameworks…"}),r.isError&&e.jsx("div",{className:"empty",children:"Could not load frameworks."}),n.map(i=>e.jsxs("section",{style:{marginBottom:56},children:[e.jsxs("div",{style:j,children:[e.jsxs("div",{children:[e.jsx("h2",{style:k,children:i.name}),e.jsx("div",{style:_,children:i.description})]}),e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",whiteSpace:"nowrap"},children:[i.categories.length," ",i.categories.length===1?"category":"categories"," ·"," ",i.categories.reduce((s,t)=>s+t.frameworks.length,0)," frameworks"]})]}),i.categories.map(s=>e.jsxs("div",{className:"framework-category",children:[e.jsxs("div",{className:"framework-category-head",children:[e.jsxs("div",{children:[e.jsx("h3",{style:v,children:s.name}),s.description&&e.jsx("p",{className:"framework-category-blurb",children:s.description}),s.guide_url&&e.jsxs("a",{href:s.guide_url,target:"_blank",rel:"noopener noreferrer",className:"framework-guide-link",children:[s.guide_label??"Read guide"," →"]})]}),e.jsxs("div",{className:"framework-category-meta",children:[s.frameworks.length," ",s.frameworks.length===1?"framework":"frameworks"]})]}),e.jsx("div",{className:"framework-grid",children:s.frameworks.map(t=>e.jsx(w,{framework:t},t.slug))})]},s.slug))]},i.slug)),e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",marginTop:8},children:[l," frameworks across ",n.length," ",n.length===1?"domain":"domains",". More areas coming soon."]})]})};export{w as FrameworkCard,E as default}; diff --git a/assets/LatexTitle-B1D_EqzJ.js b/assets/LatexTitle-QTkECjbh.js similarity index 98% rename from assets/LatexTitle-B1D_EqzJ.js rename to assets/LatexTitle-QTkECjbh.js index b52a672eecc71a27f9795cde3dd95d4e8dfc721b..3f721730041441a529675991419efd189191410d 100644 --- a/assets/LatexTitle-B1D_EqzJ.js +++ b/assets/LatexTitle-QTkECjbh.js @@ -1,2 +1,2 @@ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/katex-wklAmtGL.css"])))=>i.map(i=>d[i]); -import{j as u,r as A,_ as L}from"./index-CnBotBa4.js";let g=null,$=null;function M(){return $??($=Promise.all([L(()=>import("./katex-DkKDou_j.js"),[]),L(()=>Promise.resolve({}),__vite__mapDeps([0]))]).then(([n])=>(g=n.default,g))),$}const O=new Set([",",";",":","!"," ","quad","qquad","enspace","thinspace"]),S={a:"á",e:"é",i:"í",o:"ó",u:"ú",y:"ý",A:"Á",E:"É",I:"Í",O:"Ó",U:"Ú",Y:"Ý"},b={a:"à",e:"è",i:"ì",o:"ò",u:"ù",A:"À",E:"È",I:"Ì",O:"Ò",U:"Ù"},w={a:"â",e:"ê",i:"î",o:"ô",u:"û",A:"Â",E:"Ê",I:"Î",O:"Ô",U:"Û"},k={a:"ä",e:"ë",i:"ï",o:"ö",u:"ü",y:"ÿ",A:"Ä",E:"Ë",I:"Ï",O:"Ö",U:"Ü",Y:"Ÿ"},N={"'":S,"`":b,"^":w,'"':k,"~":{n:"ñ",N:"Ñ"}},T={ss:"ß",ae:"æ",AE:"Æ",oe:"œ",OE:"Œ",o:"ø",O:"Ø",l:"ł",L:"Ł"};function I(n,i){var e;return((e=N[n])==null?void 0:e[i])??null}function v(n){const i=[];let e=0,t="";const r=()=>{t&&(i.push({type:"text",content:t}),t="")};for(;e=n.length)return{name:"",end:e};if(!/[a-zA-Z]/.test(n[e]))return{name:n[e],end:e+1};const t=e;for(;e=n.length)return null;if(n[i+1]==="{"){const t=d(n,i+1);return t?{end:t.end}:null}return/[A-Za-z0-9+\-=.]/.test(n[i+1])?{end:i+2}:null}function y(n,i){let e=i;if(n[e]==="\\"){const{name:o,end:s}=j(n,e);if(!o)return null;if(e=s,n[e]==="{"){const a=d(n,e);a&&(e=a.end)}}else if(/[A-Za-z0-9]/.test(n[e])){let o=e+1;for(;oe.length-i.length)}function X(n,i,e){const t=z(i);if(!t.length)return[n];const r=t.map(s=>s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")),o=new RegExp(`(${r.join("|")})`,"gi");return n.split(o).filter(Boolean).map((s,a)=>t.some(p=>p.toLocaleLowerCase()===s.toLocaleLowerCase())?u.jsx("mark",{children:s},`${e}-mark-${a}`):s)}function m(n,i,e){const t=[];let r=0,o=0;const s=()=>`${i}-${o++}`,a=(p,f)=>p==="strong"?u.jsx("strong",{children:f},s()):u.jsx("em",{children:f},s());for(;rr&&t.push(...X(n.slice(r,f),e,s())),r=f}return t}function _({latex:n,display:i}){const[e,t]=A.useState(g);A.useEffect(()=>{if(e)return;let o=!0;return M().then(s=>{o&&t(()=>s)}),()=>{o=!1}},[e]);const r=A.useMemo(()=>{if(e)try{return e.renderToString(n.trim(),{displayMode:i,throwOnError:!1})}catch{return null}},[e,n,i]);return r===void 0?u.jsx(u.Fragment,{children:n}):r?u.jsx("span",{className:i?"katex-display":void 0,dangerouslySetInnerHTML:{__html:r}}):u.jsx(u.Fragment,{children:i?`$$${n}$$`:`$${n}$`})}function D(n,i){const e=v(n),t=[];return e.forEach((r,o)=>{const s=`latex-${o}`;if(r.type==="text"){const a=m(r.content,s,i);a.length===1?t.push(a[0]):a.length>1&&t.push(u.jsx(A.Fragment,{children:a},s));return}if(r.type==="display"){t.push(u.jsx(_,{latex:r.content,display:!0},s));return}t.push(u.jsx(_,{latex:r.content,display:!1},s))}),t.length===1?t[0]:u.jsx(u.Fragment,{children:t})}const P=({text:n,className:i="",highlight:e})=>{const t=A.useMemo(()=>D(n,e),[n,e]);return u.jsx("span",{className:i,children:t})},Z=({title:n,className:i="",highlight:e})=>u.jsx(P,{text:n,className:i,highlight:e});export{Z as L,P as a}; +import{j as u,r as A,_ as L}from"./index-hxawG6mk.js";let g=null,$=null;function M(){return $??($=Promise.all([L(()=>import("./katex-DkKDou_j.js"),[]),L(()=>Promise.resolve({}),__vite__mapDeps([0]))]).then(([n])=>(g=n.default,g))),$}const O=new Set([",",";",":","!"," ","quad","qquad","enspace","thinspace"]),S={a:"á",e:"é",i:"í",o:"ó",u:"ú",y:"ý",A:"Á",E:"É",I:"Í",O:"Ó",U:"Ú",Y:"Ý"},b={a:"à",e:"è",i:"ì",o:"ò",u:"ù",A:"À",E:"È",I:"Ì",O:"Ò",U:"Ù"},w={a:"â",e:"ê",i:"î",o:"ô",u:"û",A:"Â",E:"Ê",I:"Î",O:"Ô",U:"Û"},k={a:"ä",e:"ë",i:"ï",o:"ö",u:"ü",y:"ÿ",A:"Ä",E:"Ë",I:"Ï",O:"Ö",U:"Ü",Y:"Ÿ"},N={"'":S,"`":b,"^":w,'"':k,"~":{n:"ñ",N:"Ñ"}},T={ss:"ß",ae:"æ",AE:"Æ",oe:"œ",OE:"Œ",o:"ø",O:"Ø",l:"ł",L:"Ł"};function I(n,i){var e;return((e=N[n])==null?void 0:e[i])??null}function v(n){const i=[];let e=0,t="";const r=()=>{t&&(i.push({type:"text",content:t}),t="")};for(;e=n.length)return{name:"",end:e};if(!/[a-zA-Z]/.test(n[e]))return{name:n[e],end:e+1};const t=e;for(;e=n.length)return null;if(n[i+1]==="{"){const t=d(n,i+1);return t?{end:t.end}:null}return/[A-Za-z0-9+\-=.]/.test(n[i+1])?{end:i+2}:null}function y(n,i){let e=i;if(n[e]==="\\"){const{name:o,end:s}=j(n,e);if(!o)return null;if(e=s,n[e]==="{"){const a=d(n,e);a&&(e=a.end)}}else if(/[A-Za-z0-9]/.test(n[e])){let o=e+1;for(;oe.length-i.length)}function X(n,i,e){const t=z(i);if(!t.length)return[n];const r=t.map(s=>s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")),o=new RegExp(`(${r.join("|")})`,"gi");return n.split(o).filter(Boolean).map((s,a)=>t.some(p=>p.toLocaleLowerCase()===s.toLocaleLowerCase())?u.jsx("mark",{children:s},`${e}-mark-${a}`):s)}function m(n,i,e){const t=[];let r=0,o=0;const s=()=>`${i}-${o++}`,a=(p,f)=>p==="strong"?u.jsx("strong",{children:f},s()):u.jsx("em",{children:f},s());for(;rr&&t.push(...X(n.slice(r,f),e,s())),r=f}return t}function _({latex:n,display:i}){const[e,t]=A.useState(g);A.useEffect(()=>{if(e)return;let o=!0;return M().then(s=>{o&&t(()=>s)}),()=>{o=!1}},[e]);const r=A.useMemo(()=>{if(e)try{return e.renderToString(n.trim(),{displayMode:i,throwOnError:!1})}catch{return null}},[e,n,i]);return r===void 0?u.jsx(u.Fragment,{children:n}):r?u.jsx("span",{className:i?"katex-display":void 0,dangerouslySetInnerHTML:{__html:r}}):u.jsx(u.Fragment,{children:i?`$$${n}$$`:`$${n}$`})}function D(n,i){const e=v(n),t=[];return e.forEach((r,o)=>{const s=`latex-${o}`;if(r.type==="text"){const a=m(r.content,s,i);a.length===1?t.push(a[0]):a.length>1&&t.push(u.jsx(A.Fragment,{children:a},s));return}if(r.type==="display"){t.push(u.jsx(_,{latex:r.content,display:!0},s));return}t.push(u.jsx(_,{latex:r.content,display:!1},s))}),t.length===1?t[0]:u.jsx(u.Fragment,{children:t})}const P=({text:n,className:i="",highlight:e})=>{const t=A.useMemo(()=>D(n,e),[n,e]);return u.jsx("span",{className:i,children:t})},Z=({title:n,className:i="",highlight:e})=>u.jsx(P,{text:n,className:i,highlight:e});export{Z as L,P as a}; diff --git a/assets/MarkdownText-BAS9zVyW.js b/assets/MarkdownText-C2hX4LYt.js similarity index 85% rename from assets/MarkdownText-BAS9zVyW.js rename to assets/MarkdownText-C2hX4LYt.js index bade6e988bfb846d55e5be93e70e95634b183e9a..758531e02b351a3e231666fcf0af2419a8a8d86b 100644 --- a/assets/MarkdownText-BAS9zVyW.js +++ b/assets/MarkdownText-C2hX4LYt.js @@ -1 +1 @@ -import{n as l,j as s,L as u}from"./index-CnBotBa4.js";/* empty css */import{r as p,a as m,P as h}from"./PaperPreviewLink-ChJBLunV.js";import{M as d}from"./index-DxRopg3G.js";import{r as w}from"./index-DLNxIk77.js";const x=new Set(["paperswithcode.co","www.paperswithcode.co","localhost","127.0.0.1","167.235.148.241"]),P=["/methods","/paper","/papers","/tasks","/benchmark","/conferences"];function f(n,o=window.location.origin){if(!n)return null;let t;if(n.startsWith("/"))t=n;else try{const e=new URL(n,o);if(!x.has(e.hostname))return null;t=`${e.pathname}${e.search}${e.hash}`}catch{return null}const r=t.split(/[?#]/,1)[0];return P.some(e=>r===e||r.startsWith(`${e}/`))?t:null}function k(n){const t=n.split(/[?#]/,1)[0].match(/^\/papers?\/([^/]+)$/);if(!t||t[1].includes("%"))return null;const r=t[1],e=/^\d{4}[.-]\d{4,5}(?:v\d+)?$/.test(r),a=/^[1-9]\d*$/.test(r);return!e&&!a?null:l(r)}const L=({text:n,className:o=""})=>s.jsx("div",{className:o,children:s.jsx(d,{remarkPlugins:[w,m],rehypePlugins:[p],components:{a:({href:t,children:r,node:e,...a})=>{const i=f(t);if(i){const c=k(i);return c?s.jsx(h,{routeId:c,to:i,...a,children:r}):s.jsx(u,{to:i,...a,children:r})}return s.jsx("a",{href:t,target:"_blank",rel:"noopener noreferrer",...a,children:r})}},children:n})});export{L as M,f as r}; +import{n as l,j as s,L as u}from"./index-hxawG6mk.js";/* empty css */import{r as p,a as m,P as h}from"./PaperPreviewLink-BJhSzNVs.js";import{M as d}from"./index-CaRYlo5c.js";import{r as w}from"./index-Ddr0k9KU.js";const x=new Set(["paperswithcode.co","www.paperswithcode.co","localhost","127.0.0.1","167.235.148.241"]),P=["/methods","/paper","/papers","/tasks","/benchmark","/conferences"];function f(n,o=window.location.origin){if(!n)return null;let t;if(n.startsWith("/"))t=n;else try{const e=new URL(n,o);if(!x.has(e.hostname))return null;t=`${e.pathname}${e.search}${e.hash}`}catch{return null}const r=t.split(/[?#]/,1)[0];return P.some(e=>r===e||r.startsWith(`${e}/`))?t:null}function k(n){const t=n.split(/[?#]/,1)[0].match(/^\/papers?\/([^/]+)$/);if(!t||t[1].includes("%"))return null;const r=t[1],e=/^\d{4}[.-]\d{4,5}(?:v\d+)?$/.test(r),a=/^[1-9]\d*$/.test(r);return!e&&!a?null:l(r)}const L=({text:n,className:o=""})=>s.jsx("div",{className:o,children:s.jsx(d,{remarkPlugins:[w,m],rehypePlugins:[p],components:{a:({href:t,children:r,node:e,...a})=>{const i=f(t);if(i){const c=k(i);return c?s.jsx(h,{routeId:c,to:i,...a,children:r}):s.jsx(u,{to:i,...a,children:r})}return s.jsx("a",{href:t,target:"_blank",rel:"noopener noreferrer",...a,children:r})}},children:n})});export{L as M,f as r}; diff --git a/assets/McpView-cPV088fi.js b/assets/McpView-C4J0oV-e.js similarity index 97% rename from assets/McpView-cPV088fi.js rename to assets/McpView-C4J0oV-e.js index ac1d4fa698f6da2c57f00c282dabc74e83f1567b..bd1cd3cebb9096d60392e9d91e9e0dff064a196a 100644 --- a/assets/McpView-cPV088fi.js +++ b/assets/McpView-C4J0oV-e.js @@ -1 +1 @@ -import{F as m,j as e,l as b}from"./index-CnBotBa4.js";import{u as x}from"./useQuery-C8pfCInN.js";import{f as j,D as f}from"./latexPlainText-DI8YEXVe.js";import{q as y}from"./queryOptions-C9woPjwX.js";import{E as i}from"./external-link-C_QBJuYU.js";import{C as g}from"./copy-0hFmISJO.js";const h="https://paperswithcode.co/mcp",v="https://staging.paperswithcode.co/mcp";function u(s){const a=typeof window>"u"?void 0:window.location;return a?a.hostname==="staging.paperswithcode.co"?v:a.hostname==="paperswithcode.co"||a.hostname==="www.paperswithcode.co"?h:`${a.origin.replace(/\/$/,"")}/mcp`:h}function w(s){if(!s||typeof s!="object"||s.status!=="ok"||s.service!=="pwc-mcp"||typeof s.version!="string"||typeof s.protocol!="string")throw new Error("MCP health response is invalid");return s}async function k(s){const a=new AbortController,c=()=>a.abort();s==null||s.addEventListener("abort",c,{once:!0});const o=window.setTimeout(c,5e3);try{const t=await fetch(`${u()}/health`,{headers:{Accept:"application/json"},signal:a.signal,credentials:"omit"});if(!t.ok)throw new Error("MCP service is unavailable");return w(await t.json())}finally{window.clearTimeout(o),s==null||s.removeEventListener("abort",c)}}const C=()=>y({queryKey:["mcp","health"],queryFn:({signal:s})=>k(s),retry:!1,staleTime:3e4,refetchInterval:6e4,refetchOnWindowFocus:!1}),N=[["search_papers","Search by topic, title, author, or arXiv ID."],["list_papers","Filter and order papers by taxonomy, venue, date, or organization."],["get_paper_info","Read canonical metadata, authors, abstract, links, and resources."],["read_paper","Read stored paper Markdown with safe continuation for long papers."],["list_recent_papers","Browse the most recently indexed research."],["get_related_papers","Find related work already indexed in the catalogue."],["list_trending_papers","Discover papers with recent repository momentum."],["get_paper_evaluations","Inspect benchmark results reported by one paper."],["get_paper_lineage","Follow explicit predecessor and successor relationships."],["list_tasks","Search tasks and retrieve stable slugs for exact lookup."],["get_task","Inspect a research task and its benchmark coverage."],["list_methods","Search methods and retrieve stable slugs for exact lookup."],["get_method","Inspect a method, its source paper, and catalogue metadata."],["list_conferences","Browse conferences with imported papers."],["get_conference","Inspect one exact conference edition."],["list_organizations","Browse research organizations."],["get_organization","Inspect one exact research organization."],["list_frameworks","Browse frameworks by domain, category, or platform."],["get_framework","Inspect one exact research framework."],["list_benchmarks","Browse and filter benchmark leaderboards."],["get_benchmark","Read one benchmark, metrics, datasets, and leading results."]],P=["pwc://papers/{paper}","pwc://papers/{paper}/markdown","pwc://tasks/{task}","pwc://benchmarks/{benchmark}"],_=["Find recent papers on test-time compute and summarize the main approaches.","Compare the methods and reported benchmarks in these three arXiv papers.","What are the leading benchmarks for text-to-video generation?","Trace the predecessor and successor papers for Mamba."],d=[{key:"chatgpt",label:"ChatGPT",summary:"In workspace developer settings, add a custom MCP app and paste the server URL. Availability and admin approval vary by plan."},{key:"claude",label:"Claude",summary:"Open Settings → Connectors → Add custom connector, paste the URL, then enable Papers With Code from Search and tools."},{key:"claude-code",label:"Claude Code",summary:"Add the anonymous Streamable HTTP server from a terminal.",code:s=>`claude mcp add --transport http paperswithcode ${s}`},{key:"cursor",label:"Cursor",summary:"Add this entry to your project or user MCP configuration.",code:s=>JSON.stringify({mcpServers:{paperswithcode:{url:s}}},null,2)},{key:"vscode",label:"VS Code",summary:"Add this Streamable HTTP server to .vscode/mcp.json.",code:s=>JSON.stringify({servers:{paperswithcode:{type:"http",url:s}}},null,2)},{key:"generic",label:"Generic",summary:"Configure an anonymous, stateless Streamable HTTP server using the URL below. No API key or OAuth flow is required."}],l=({value:s,label:a})=>{const[c,o]=m.useState(!1),t=async()=>{var n;(n=navigator.clipboard)!=null&&n.writeText&&(await navigator.clipboard.writeText(s),o(!0),window.setTimeout(()=>o(!1),1500))};return e.jsxs("button",{className:"action-btn mcp-copy",type:"button",onClick:()=>void t(),"aria-label":a,children:[c?e.jsx(b,{size:16,"aria-hidden":!0}):e.jsx(g,{size:16,"aria-hidden":!0}),c?"Copied":"Copy"]})},L=()=>{var n;const s=u(),a=x(C()),[c,o]=m.useState("chatgpt"),t=d.find(r=>r.key===c)??d[0];return m.useEffect(()=>(document.title=j("MCP Server"),()=>{document.title=f}),[]),e.jsxs("article",{className:"page mcp-page",children:[e.jsxs("header",{className:"mcp-hero",children:[e.jsxs("div",{children:[e.jsx("p",{className:"sidebar-label mcp-kicker",children:"Model Context Protocol"}),e.jsx("h1",{className:"feed-title",children:"Use Papers With Code in your AI assistant"}),e.jsx("p",{className:"mcp-lede",children:"Search research, inspect methods and benchmarks, and read complete papers through one anonymous, read-only MCP connection."}),e.jsxs("div",{className:"mcp-status","aria-live":"polite",children:[e.jsx("span",{className:a.isSuccess?"is-up":"is-unknown","aria-hidden":!0}),a.isSuccess?"Operational":"Status unavailable",a.data?` · v${a.data.version}`:""]})]}),e.jsxs("div",{className:"mcp-endpoint-card",children:[e.jsx("span",{children:"Remote MCP URL"}),e.jsx("code",{children:s}),e.jsx(l,{value:s,label:"Copy MCP server URL"})]})]}),e.jsxs("section",{className:"mcp-section","aria-labelledby":"mcp-connect",children:[e.jsxs("div",{className:"mcp-section-heading",children:[e.jsx("p",{className:"sidebar-label",children:"Connect"}),e.jsx("h2",{id:"mcp-connect",children:"One URL, your preferred client"}),e.jsx("span",{children:"Setup matrix reviewed September 13, 2026; staging qualification pending."})]}),e.jsx("div",{className:"mcp-client-tabs",role:"tablist","aria-label":"MCP client setup",children:d.map(r=>e.jsx("button",{type:"button",role:"tab","aria-selected":c===r.key,onClick:()=>o(r.key),children:r.label},r.key))}),e.jsxs("div",{className:"mcp-setup",role:"tabpanel",children:[e.jsx("p",{children:t.summary}),t.code?e.jsxs("div",{className:"mcp-code-row",children:[e.jsx("pre",{children:e.jsx("code",{children:t.code(s)})}),e.jsx(l,{value:t.code(s),label:`Copy ${t.label} setup`})]}):e.jsxs("div",{className:"mcp-code-row",children:[e.jsx("pre",{children:e.jsx("code",{children:s})}),e.jsx(l,{value:s,label:`Copy ${t.label} endpoint`})]})]})]}),e.jsxs("section",{className:"mcp-section","aria-labelledby":"mcp-capabilities",children:[e.jsxs("div",{className:"mcp-section-heading",children:[e.jsx("p",{className:"sidebar-label",children:"Capabilities"}),e.jsx("h2",{id:"mcp-capabilities",children:"Research context, structured for assistants"})]}),e.jsx("div",{className:"mcp-capability-grid",children:[["Discover","Search recent and established work with catalogue filters."],["Read","Continue through long stored papers without presenting a partial document as complete."],["Connect","Explore related work, paper lineage, tasks, and methods."],["Compare","Inspect benchmarks, datasets, metrics, and reported evaluations."]].map(([r,p])=>e.jsxs("div",{children:[e.jsx("h3",{children:r}),e.jsx("p",{children:p})]},r))})]}),e.jsxs("section",{className:"mcp-section","aria-labelledby":"mcp-tools",children:[e.jsxs("div",{className:"mcp-section-heading",children:[e.jsx("p",{className:"sidebar-label",children:"Catalogue"}),e.jsx("h2",{id:"mcp-tools",children:"Twenty-one focused, read-only tools"})]}),e.jsx("div",{className:"mcp-tool-grid",children:N.map(([r,p])=>e.jsxs("div",{className:"mcp-tool",children:[e.jsx("code",{children:r}),e.jsx("p",{children:p})]},r))}),e.jsx("h3",{className:"mcp-subheading",children:"Resource templates"}),e.jsx("div",{className:"mcp-resource-list",children:P.map(r=>e.jsx("code",{children:r},r))})]}),e.jsxs("section",{className:"mcp-section","aria-labelledby":"mcp-prompts",children:[e.jsxs("div",{className:"mcp-section-heading",children:[e.jsx("p",{className:"sidebar-label",children:"Try asking"}),e.jsx("h2",{id:"mcp-prompts",children:"Prompts that start useful research"})]}),e.jsx("div",{className:"mcp-prompt-list",children:_.map(r=>e.jsxs("div",{children:[e.jsx("p",{children:r}),e.jsx(l,{value:r,label:"Copy example prompt"})]},r))})]}),e.jsxs("section",{className:"mcp-section mcp-notes","aria-labelledby":"mcp-limits",children:[e.jsxs("div",{children:[e.jsx("p",{className:"sidebar-label mcp-kicker",children:"Limits & privacy"}),e.jsx("h2",{id:"mcp-limits",children:"Public by design"}),e.jsx("p",{children:"No account, API key, or write access. Fair-use limits are 60 total requests per minute, 10 semantic searches per minute, four concurrent requests per client, and 25 list results per call."}),e.jsx("p",{children:"MCP telemetry retains tool name, status, latency, response size, protocol, and server version—not prompts, paper IDs, cursors, resource URIs, raw IPs, authorization values, or bodies. Catalogue infrastructure has its own operational logging policy."})]}),e.jsxs("div",{children:[e.jsx("p",{className:"sidebar-label mcp-kicker",children:"Protocol & troubleshooting"}),e.jsx("h2",{children:"Streamable HTTP"}),e.jsxs("p",{children:["Primary protocol: ",((n=a.data)==null?void 0:n.protocol)??"verified during connection setup",". If setup fails, confirm your client supports remote Streamable HTTP, that custom servers are enabled by your workspace administrator, and that you pasted the URL exactly."]}),e.jsxs("nav",{className:"mcp-links","aria-label":"MCP documentation links",children:[e.jsxs("a",{href:"https://github.com/huggingface/pwc-cli",target:"_blank",rel:"noreferrer",children:["CLI repository ",e.jsx(i,{size:13})]}),e.jsxs("a",{href:"https://modelcontextprotocol.io/docs/2026-07-28/learn/server-concepts",target:"_blank",rel:"noreferrer",children:["MCP specification ",e.jsx(i,{size:13})]}),e.jsxs("a",{href:"/docs",target:"_blank",rel:"noreferrer",children:["Public API ",e.jsx(i,{size:13})]}),e.jsxs("a",{href:"/mcp/schema",target:"_blank",rel:"noreferrer",children:["MCP tool schema ",e.jsx(i,{size:13})]}),e.jsxs("a",{href:"/llms.txt",target:"_blank",rel:"noreferrer",children:["llms.txt ",e.jsx(i,{size:13})]})]})]})]})]})};export{L as default}; +import{F as m,j as e,l as b}from"./index-hxawG6mk.js";import{u as x}from"./useQuery-B7vCF2Os.js";import{f as j,D as f}from"./latexPlainText-DI8YEXVe.js";import{q as y}from"./queryOptions-C9woPjwX.js";import{E as i}from"./external-link-CWzYMTrZ.js";import{C as g}from"./copy-B2wC0pMM.js";const h="https://paperswithcode.co/mcp",v="https://staging.paperswithcode.co/mcp";function u(s){const a=typeof window>"u"?void 0:window.location;return a?a.hostname==="staging.paperswithcode.co"?v:a.hostname==="paperswithcode.co"||a.hostname==="www.paperswithcode.co"?h:`${a.origin.replace(/\/$/,"")}/mcp`:h}function w(s){if(!s||typeof s!="object"||s.status!=="ok"||s.service!=="pwc-mcp"||typeof s.version!="string"||typeof s.protocol!="string")throw new Error("MCP health response is invalid");return s}async function k(s){const a=new AbortController,c=()=>a.abort();s==null||s.addEventListener("abort",c,{once:!0});const o=window.setTimeout(c,5e3);try{const t=await fetch(`${u()}/health`,{headers:{Accept:"application/json"},signal:a.signal,credentials:"omit"});if(!t.ok)throw new Error("MCP service is unavailable");return w(await t.json())}finally{window.clearTimeout(o),s==null||s.removeEventListener("abort",c)}}const C=()=>y({queryKey:["mcp","health"],queryFn:({signal:s})=>k(s),retry:!1,staleTime:3e4,refetchInterval:6e4,refetchOnWindowFocus:!1}),N=[["search_papers","Search by topic, title, author, or arXiv ID."],["list_papers","Filter and order papers by taxonomy, venue, date, or organization."],["get_paper_info","Read canonical metadata, authors, abstract, links, and resources."],["read_paper","Read stored paper Markdown with safe continuation for long papers."],["list_recent_papers","Browse the most recently indexed research."],["get_related_papers","Find related work already indexed in the catalogue."],["list_trending_papers","Discover papers with recent repository momentum."],["get_paper_evaluations","Inspect benchmark results reported by one paper."],["get_paper_lineage","Follow explicit predecessor and successor relationships."],["list_tasks","Search tasks and retrieve stable slugs for exact lookup."],["get_task","Inspect a research task and its benchmark coverage."],["list_methods","Search methods and retrieve stable slugs for exact lookup."],["get_method","Inspect a method, its source paper, and catalogue metadata."],["list_conferences","Browse conferences with imported papers."],["get_conference","Inspect one exact conference edition."],["list_organizations","Browse research organizations."],["get_organization","Inspect one exact research organization."],["list_frameworks","Browse frameworks by domain, category, or platform."],["get_framework","Inspect one exact research framework."],["list_benchmarks","Browse and filter benchmark leaderboards."],["get_benchmark","Read one benchmark, metrics, datasets, and leading results."]],P=["pwc://papers/{paper}","pwc://papers/{paper}/markdown","pwc://tasks/{task}","pwc://benchmarks/{benchmark}"],_=["Find recent papers on test-time compute and summarize the main approaches.","Compare the methods and reported benchmarks in these three arXiv papers.","What are the leading benchmarks for text-to-video generation?","Trace the predecessor and successor papers for Mamba."],d=[{key:"chatgpt",label:"ChatGPT",summary:"In workspace developer settings, add a custom MCP app and paste the server URL. Availability and admin approval vary by plan."},{key:"claude",label:"Claude",summary:"Open Settings → Connectors → Add custom connector, paste the URL, then enable Papers With Code from Search and tools."},{key:"claude-code",label:"Claude Code",summary:"Add the anonymous Streamable HTTP server from a terminal.",code:s=>`claude mcp add --transport http paperswithcode ${s}`},{key:"cursor",label:"Cursor",summary:"Add this entry to your project or user MCP configuration.",code:s=>JSON.stringify({mcpServers:{paperswithcode:{url:s}}},null,2)},{key:"vscode",label:"VS Code",summary:"Add this Streamable HTTP server to .vscode/mcp.json.",code:s=>JSON.stringify({servers:{paperswithcode:{type:"http",url:s}}},null,2)},{key:"generic",label:"Generic",summary:"Configure an anonymous, stateless Streamable HTTP server using the URL below. No API key or OAuth flow is required."}],l=({value:s,label:a})=>{const[c,o]=m.useState(!1),t=async()=>{var n;(n=navigator.clipboard)!=null&&n.writeText&&(await navigator.clipboard.writeText(s),o(!0),window.setTimeout(()=>o(!1),1500))};return e.jsxs("button",{className:"action-btn mcp-copy",type:"button",onClick:()=>void t(),"aria-label":a,children:[c?e.jsx(b,{size:16,"aria-hidden":!0}):e.jsx(g,{size:16,"aria-hidden":!0}),c?"Copied":"Copy"]})},L=()=>{var n;const s=u(),a=x(C()),[c,o]=m.useState("chatgpt"),t=d.find(r=>r.key===c)??d[0];return m.useEffect(()=>(document.title=j("MCP Server"),()=>{document.title=f}),[]),e.jsxs("article",{className:"page mcp-page",children:[e.jsxs("header",{className:"mcp-hero",children:[e.jsxs("div",{children:[e.jsx("p",{className:"sidebar-label mcp-kicker",children:"Model Context Protocol"}),e.jsx("h1",{className:"feed-title",children:"Use Papers With Code in your AI assistant"}),e.jsx("p",{className:"mcp-lede",children:"Search research, inspect methods and benchmarks, and read complete papers through one anonymous, read-only MCP connection."}),e.jsxs("div",{className:"mcp-status","aria-live":"polite",children:[e.jsx("span",{className:a.isSuccess?"is-up":"is-unknown","aria-hidden":!0}),a.isSuccess?"Operational":"Status unavailable",a.data?` · v${a.data.version}`:""]})]}),e.jsxs("div",{className:"mcp-endpoint-card",children:[e.jsx("span",{children:"Remote MCP URL"}),e.jsx("code",{children:s}),e.jsx(l,{value:s,label:"Copy MCP server URL"})]})]}),e.jsxs("section",{className:"mcp-section","aria-labelledby":"mcp-connect",children:[e.jsxs("div",{className:"mcp-section-heading",children:[e.jsx("p",{className:"sidebar-label",children:"Connect"}),e.jsx("h2",{id:"mcp-connect",children:"One URL, your preferred client"}),e.jsx("span",{children:"Setup matrix reviewed September 13, 2026; staging qualification pending."})]}),e.jsx("div",{className:"mcp-client-tabs",role:"tablist","aria-label":"MCP client setup",children:d.map(r=>e.jsx("button",{type:"button",role:"tab","aria-selected":c===r.key,onClick:()=>o(r.key),children:r.label},r.key))}),e.jsxs("div",{className:"mcp-setup",role:"tabpanel",children:[e.jsx("p",{children:t.summary}),t.code?e.jsxs("div",{className:"mcp-code-row",children:[e.jsx("pre",{children:e.jsx("code",{children:t.code(s)})}),e.jsx(l,{value:t.code(s),label:`Copy ${t.label} setup`})]}):e.jsxs("div",{className:"mcp-code-row",children:[e.jsx("pre",{children:e.jsx("code",{children:s})}),e.jsx(l,{value:s,label:`Copy ${t.label} endpoint`})]})]})]}),e.jsxs("section",{className:"mcp-section","aria-labelledby":"mcp-capabilities",children:[e.jsxs("div",{className:"mcp-section-heading",children:[e.jsx("p",{className:"sidebar-label",children:"Capabilities"}),e.jsx("h2",{id:"mcp-capabilities",children:"Research context, structured for assistants"})]}),e.jsx("div",{className:"mcp-capability-grid",children:[["Discover","Search recent and established work with catalogue filters."],["Read","Continue through long stored papers without presenting a partial document as complete."],["Connect","Explore related work, paper lineage, tasks, and methods."],["Compare","Inspect benchmarks, datasets, metrics, and reported evaluations."]].map(([r,p])=>e.jsxs("div",{children:[e.jsx("h3",{children:r}),e.jsx("p",{children:p})]},r))})]}),e.jsxs("section",{className:"mcp-section","aria-labelledby":"mcp-tools",children:[e.jsxs("div",{className:"mcp-section-heading",children:[e.jsx("p",{className:"sidebar-label",children:"Catalogue"}),e.jsx("h2",{id:"mcp-tools",children:"Twenty-one focused, read-only tools"})]}),e.jsx("div",{className:"mcp-tool-grid",children:N.map(([r,p])=>e.jsxs("div",{className:"mcp-tool",children:[e.jsx("code",{children:r}),e.jsx("p",{children:p})]},r))}),e.jsx("h3",{className:"mcp-subheading",children:"Resource templates"}),e.jsx("div",{className:"mcp-resource-list",children:P.map(r=>e.jsx("code",{children:r},r))})]}),e.jsxs("section",{className:"mcp-section","aria-labelledby":"mcp-prompts",children:[e.jsxs("div",{className:"mcp-section-heading",children:[e.jsx("p",{className:"sidebar-label",children:"Try asking"}),e.jsx("h2",{id:"mcp-prompts",children:"Prompts that start useful research"})]}),e.jsx("div",{className:"mcp-prompt-list",children:_.map(r=>e.jsxs("div",{children:[e.jsx("p",{children:r}),e.jsx(l,{value:r,label:"Copy example prompt"})]},r))})]}),e.jsxs("section",{className:"mcp-section mcp-notes","aria-labelledby":"mcp-limits",children:[e.jsxs("div",{children:[e.jsx("p",{className:"sidebar-label mcp-kicker",children:"Limits & privacy"}),e.jsx("h2",{id:"mcp-limits",children:"Public by design"}),e.jsx("p",{children:"No account, API key, or write access. Fair-use limits are 60 total requests per minute, 10 semantic searches per minute, four concurrent requests per client, and 25 list results per call."}),e.jsx("p",{children:"MCP telemetry retains tool name, status, latency, response size, protocol, and server version—not prompts, paper IDs, cursors, resource URIs, raw IPs, authorization values, or bodies. Catalogue infrastructure has its own operational logging policy."})]}),e.jsxs("div",{children:[e.jsx("p",{className:"sidebar-label mcp-kicker",children:"Protocol & troubleshooting"}),e.jsx("h2",{children:"Streamable HTTP"}),e.jsxs("p",{children:["Primary protocol: ",((n=a.data)==null?void 0:n.protocol)??"verified during connection setup",". If setup fails, confirm your client supports remote Streamable HTTP, that custom servers are enabled by your workspace administrator, and that you pasted the URL exactly."]}),e.jsxs("nav",{className:"mcp-links","aria-label":"MCP documentation links",children:[e.jsxs("a",{href:"https://github.com/huggingface/pwc-cli",target:"_blank",rel:"noreferrer",children:["CLI repository ",e.jsx(i,{size:13})]}),e.jsxs("a",{href:"https://modelcontextprotocol.io/docs/2026-07-28/learn/server-concepts",target:"_blank",rel:"noreferrer",children:["MCP specification ",e.jsx(i,{size:13})]}),e.jsxs("a",{href:"/docs",target:"_blank",rel:"noreferrer",children:["Public API ",e.jsx(i,{size:13})]}),e.jsxs("a",{href:"/mcp/schema",target:"_blank",rel:"noreferrer",children:["MCP tool schema ",e.jsx(i,{size:13})]}),e.jsxs("a",{href:"/llms.txt",target:"_blank",rel:"noreferrer",children:["llms.txt ",e.jsx(i,{size:13})]})]})]})]})]})};export{L as default}; diff --git a/assets/MethodDetailView-QzkjVHR9.js b/assets/MethodDetailView-DuhUpcku.js similarity index 92% rename from assets/MethodDetailView-QzkjVHR9.js rename to assets/MethodDetailView-DuhUpcku.js index 34443dad7eebd6c50307214308f0d3e3c886c101..b3b6d45f05bd1059104c47cb6c412cce0e0cc9d3 100644 --- a/assets/MethodDetailView-QzkjVHR9.js +++ b/assets/MethodDetailView-DuhUpcku.js @@ -1 +1 @@ -import{j as e,r as A,u as Z,d as V,L,af as X}from"./index-CnBotBa4.js";import{R as Y}from"./ResearchFollowButton-CIKuncTY.js";import{p as J}from"./paperQueryKeys-BP2E-0yf.js";import{u as F}from"./useQuery-C8pfCInN.js";import{u as ee}from"./useInfiniteQuery-DUlXElgD.js";import{M as te,P as se}from"./components-CSFfzsKt.js";import{P as ae}from"./PaperFeedFilters-DBRREw9D.js";import{a as re,P as ne,b as ie}from"./PaperDateFilter-DMplC82d.js";import{r as le,M as O}from"./MarkdownText-BAS9zVyW.js";import{c as N}from"./catalog-mND3MerS.js";import{p as oe}from"./papers-DkTdvzl4.js";import{s as ce}from"./slug-BpH-Nkvz.js";import{t as de}from"./transform-DMbrhcTx.js";import{u as me}from"./useIntersectionObserver-WHgviHIR.js";import{S as M}from"./skeleton-DuOQBmSr.js";import{A as he,a as pe}from"./alert-B0qZtPeK.js";import{s as ue}from"./safeExternalHref-CkBrsh84.js";import"./useMutation-YEvFXzv3.js";import"./research-DhkAyrPi.js";import"./plus-DTSO60Ls.js";import"./LatexTitle-B1D_EqzJ.js";import"./popover-BvojInsz.js";/* empty css */import"./PaperPreviewLink-ChJBLunV.js";import"./index-DxRopg3G.js";import"./index-DLNxIk77.js";import"./katex-DkKDou_j.js";import"./hover-card-CkboGKdu.js";const s={pink:"#F8D7D9",pinkS:"#D9B0B3",yellow:"#FBEFC2",yellowS:"#C9B97D",orange:"#F8D7B3",orangeS:"#C99466",blue:"#CDE2EE",blueS:"#7FA4BA",purple:"#D4D2EA",purpleS:"#8E8AC0",green:"#CCE2C5",greenS:"#7DA475",ink:"#1A1814",faint:"#8E8678"},j=({x:t,y:n,w:d,h:m,fill:f,stroke:x,label:p,fontSize:l=10})=>e.jsxs("g",{children:[e.jsx("rect",{x:t,y:n,width:d,height:m,rx:"3",ry:"3",fill:f,stroke:x,strokeWidth:"1"}),e.jsx("text",{x:t+d/2,y:n+m/2,fontSize:l,fontFamily:"var(--sans)",fill:s.ink,textAnchor:"middle",dominantBaseline:"middle",children:p})]}),xe=()=>e.jsxs("svg",{viewBox:"0 0 360 420",width:"100%",height:"100%",style:{display:"block"},children:[e.jsx("text",{x:"180",y:"20",fontSize:"11",fontFamily:"var(--serif)",fontStyle:"italic",fill:s.faint,textAnchor:"middle",children:"Scaled Dot-Product Attention"}),e.jsx(j,{x:140,y:40,w:80,h:26,fill:s.yellow,stroke:s.yellowS,label:"MatMul",fontSize:11}),e.jsx("path",{d:"M180 66 L180 80",stroke:s.ink}),e.jsx(j,{x:140,y:80,w:80,h:26,fill:s.green,stroke:s.greenS,label:"SoftMax",fontSize:11}),e.jsx("path",{d:"M180 106 L180 120",stroke:s.ink}),e.jsx(j,{x:140,y:120,w:80,h:26,fill:s.purple,stroke:s.purpleS,label:"Mask (opt.)",fontSize:11}),e.jsx("path",{d:"M180 146 L180 160",stroke:s.ink}),e.jsx(j,{x:140,y:160,w:80,h:26,fill:s.blue,stroke:s.blueS,label:"Scale ÷√dₖ",fontSize:11}),e.jsx("path",{d:"M180 186 L180 200",stroke:s.ink}),e.jsx(j,{x:140,y:200,w:80,h:26,fill:s.yellow,stroke:s.yellowS,label:"MatMul",fontSize:11}),e.jsx("path",{d:"M156 226 L120 270",stroke:s.ink}),e.jsx("path",{d:"M180 226 L180 270",stroke:s.ink}),e.jsx("path",{d:"M204 226 L240 270",stroke:s.ink}),e.jsx(j,{x:100,y:270,w:40,h:24,fill:s.pink,stroke:s.pinkS,label:"Q",fontSize:13}),e.jsx(j,{x:160,y:270,w:40,h:24,fill:s.pink,stroke:s.pinkS,label:"K",fontSize:13}),e.jsx(j,{x:220,y:270,w:40,h:24,fill:s.pink,stroke:s.pinkS,label:"V",fontSize:13}),e.jsxs("text",{x:"180",y:"330",fontSize:"14",fontFamily:"var(--serif)",fontStyle:"italic",fill:s.ink,textAnchor:"middle",children:["softmax(QK",e.jsx("tspan",{fontSize:"9",baselineShift:"super",children:"⊤"})," / √d) V"]})]}),ge=[["my-skill/",""],["├── SKILL.md","# Required: metadata + instructions"],["├── scripts/","# Optional: executable code"],["├── references/","# Optional: documentation"],["├── assets/","# Optional: templates, resources"],["└── ...","# Any additional files or directories"]],fe=()=>e.jsxs("svg",{viewBox:"0 0 360 420",width:"100%",height:"100%",style:{display:"block"},children:[e.jsx("text",{x:"180",y:"20",fontSize:"11",fontFamily:"var(--serif)",fontStyle:"italic",fill:s.faint,textAnchor:"middle",children:"Skill package layout"}),e.jsx("rect",{x:"28",y:"48",width:"304",height:"318",rx:"8",fill:"#FFFDF8",stroke:s.faint,strokeWidth:"1"}),ge.map(([t,n],d)=>{const m=92+d*44;return e.jsxs("g",{children:[e.jsx("text",{x:"44",y:m,fontSize:"11",fontFamily:"var(--mono)",fill:s.ink,dominantBaseline:"middle",children:t}),n?e.jsx("text",{x:"138",y:m,fontSize:"8.5",fontFamily:"var(--mono)",fill:s.faint,dominantBaseline:"middle",children:n}):null]},t)})]}),je={attention:xe,"agent-skills":fe},_e=({method:t})=>e.jsxs("svg",{viewBox:"0 0 360 420",width:"100%",height:"100%",children:[e.jsx("text",{x:"180",y:"20",fontSize:"11",fontFamily:"var(--serif)",fontStyle:"italic",fill:s.faint,textAnchor:"middle",children:t.name||"method"}),e.jsx(j,{x:80,y:70,w:200,h:50,fill:s.blue,stroke:s.blueS,label:"Input",fontSize:12}),e.jsx("path",{d:"M180 120 L180 150",stroke:s.ink}),e.jsx(j,{x:80,y:150,w:200,h:70,fill:s.orange,stroke:s.orangeS,label:t.name||"transform",fontSize:13}),e.jsx("path",{d:"M180 220 L180 250",stroke:s.ink}),e.jsx(j,{x:80,y:250,w:200,h:50,fill:s.purple,stroke:s.purpleS,label:"Output",fontSize:12})]}),ye=({method:t})=>{const n=(t.slug||"").toLowerCase(),d=je[n];if(d)return e.jsx("div",{className:"method-figure-svg method-figure-svg--schematic",children:e.jsx(d,{})});if(t.image_url){const m=n==="transformer"||n==="gpt-4"||n==="gpt-4o"||n==="multi-head-attention"?" method-figure-svg--compact":n==="rpn"?" method-figure-svg--scaled-80":"";return e.jsx("div",{className:`method-figure-svg method-figure-svg--image${m}`,children:e.jsx("img",{className:"method-figure-img",src:t.image_url,alt:`${t.name} figure`})})}return e.jsx("div",{className:"method-figure-svg method-figure-svg--schematic",children:e.jsx(_e,{method:t})})},C=720,T=138,u={top:8,right:10,bottom:25,left:36},Q=56,ve=new Intl.DateTimeFormat("en",{month:"short",year:"2-digit",timeZone:"UTC"}),Se=new Intl.DateTimeFormat("en",{year:"numeric",timeZone:"UTC"}),I=t=>ve.format(new Date(`${t}T00:00:00Z`)),Ne=(t,n)=>{if(t===0)return new Set;const d=t>48?12:t>36?6:t>18?3:2,m=Math.max(1,Math.ceil(Q/n)),f=Math.max(d,m),x=t-1,p=new Set([0,x]);for(let l=f;l=Q&&p.add(l);return p},U=t=>{if(t.coverage_status===void 0||["complete","not_applicable"].includes(t.coverage_status))return null;const n=t.processed_paper_count!==void 0&&t.eligible_paper_count!==void 0?`; ${t.processed_paper_count.toLocaleString()} of ${t.eligible_paper_count.toLocaleString()} eligible papers processed`:"";return`Historical tagging ${t.coverage_status==="failed"?"needs retry":"in progress"}${n}`},ke=({history:t,methodName:n})=>{const[d,m]=A.useState(null),f=Math.max(1,...t.map(o=>o.paper_count)),x=C-u.left-u.right,p=T-u.top-u.bottom,l=t.length?x/t.length:x,k=Math.max(2,l*.68),D=Ne(t.length,l),h=Array.from(new Set([0,Math.ceil(f/2),f])),_=d==null?null:t[d],g=_?U(_):null;return e.jsxs("div",{className:"method-usage-chart-wrap",children:[e.jsxs("svg",{className:"method-usage-chart",viewBox:`0 0 ${C} ${T}`,role:"group","aria-label":`${n}: papers mentioning this method by publication month`,children:[e.jsxs("title",{children:[n,": papers mentioning this method by publication month"]}),h.map(o=>{const i=u.top+p-o/f*p;return e.jsxs("g",{children:[e.jsx("line",{className:"method-usage-gridline",x1:u.left,x2:C-u.right,y1:i,y2:i}),e.jsx("text",{className:"method-usage-y-label",x:u.left-8,y:i+3,textAnchor:"end",children:o})]},o)}),t.map((o,i)=>{const b=o.paper_count/f*p,y=o.paper_count>0?Math.max(1,b):0,P=u.left+l*i+(l-k)/2,w=u.top+p-y,a=d===i,S=i===t.length-1,v=U(o);return e.jsxs("g",{className:`method-usage-bar${a?" is-active":""}${S?" is-current":""}`,tabIndex:0,role:"img","aria-label":`${I(o.start_date)}: ${o.paper_count} ${o.paper_count===1?"paper":"papers"}${v?`. ${v}`:""}`,onMouseEnter:()=>m(i),onMouseLeave:()=>m(null),onFocus:()=>m(i),onBlur:()=>m(null),children:[e.jsx("rect",{className:"method-usage-bar-hit",x:u.left+l*i,y:u.top,width:l,height:p}),e.jsx("rect",{className:"method-usage-bar-mark",x:P,y:w,width:k,height:y,rx:"1.5"})]},o.start_date)}),t.map((o,i)=>D.has(i)?e.jsx("text",{className:"method-usage-x-label",x:u.left+l*(i+.5),y:T-11,textAnchor:"middle",children:t.length>48?Se.format(new Date(`${o.start_date}T00:00:00Z`)):I(o.start_date)},o.start_date):null)]}),_&&e.jsxs("div",{className:"method-usage-tooltip",role:"status",children:[e.jsx("strong",{children:I(_.start_date)}),e.jsxs("span",{children:[_.paper_count," ",_.paper_count===1?"paper":"papers",d===t.length-1?" · month to date":""]}),e.jsxs("span",{children:[(_.catalog_share??0).toFixed(2),"% of"," ",(_.catalog_paper_count??0).toLocaleString()," catalog papers"]}),g&&e.jsx("span",{children:g})]})]})},be=[["trending","trending"],["new","newest"],["cited","most cited"]],G={"on-policy-distillation":["fine-tuning","post-training","rlvr","rlhf","direct-preference-optimization-dpo"],mcp:["agent-skills"],"agent-skills":["mcp"]},et=()=>{var E,B,$,R,H,q;const{methodSlug:t}=Z(),[n,d]=V(),[m,f]=A.useState("trending"),x=n.get("has_code")==="true",p=n.get("has_hf_artifacts")==="true",l=re(n),k=r=>{const c=new URLSearchParams(n);r?c.set("has_code","true"):c.delete("has_code"),d(c)},D=r=>{const c=new URLSearchParams(n);r?c.set("has_hf_artifacts","true"):c.delete("has_hf_artifacts"),d(c)},h=F({queryKey:["method",t],queryFn:()=>N.getMethod(t),enabled:!!t,staleTime:10*60*1e3}),_=F({queryKey:["areas-all"],queryFn:()=>N.listAreas({page_size:50,ordering:"name"}),enabled:!!((E=h.data)!=null&&E.area_id),staleTime:10*60*1e3}),g=F({queryKey:["method-trend",t],queryFn:()=>N.methodTrend(t),enabled:!!t,staleTime:10*60*1e3}),o=m==="trending"?"trending":m==="cited"?"citation_count":"date_published",i=ee({queryKey:[...J.feeds.method,t,o,x,p,l.startDate,l.endDate],queryFn:({pageParam:r=1})=>oe.forMethod(t,{page:r,page_size:20,order_by:o,order_dir:"desc",include_resources:!0,repository_limit:1,has_code:x,has_hf_artifacts:p,start_date:l.startDate,end_date:l.endDate}),getNextPageParam:r=>r.next_page,initialPageParam:1,enabled:!!t,staleTime:5*60*1e3,placeholderData:X}),b=F({queryKey:["related-methods",(B=h.data)==null?void 0:B.slug,($=h.data)==null?void 0:$.area_id,(R=h.data)==null?void 0:R.id],queryFn:async()=>{const r=h.data;if(!r)return[];const c=r.slug?G[r.slug]:void 0;return c?Promise.all(c.map(W=>N.getMethod(W))):r.area_id?(await N.listMethods({area_id:r.area_id,exclude_id:r.id,ordering:"-paper_count",page_size:8})).results:[]},enabled:!!(h.data&&(h.data.slug&&G[h.data.slug]||h.data.area_id)),staleTime:10*60*1e3}),y=A.useMemo(()=>{var c;return(((c=i.data)==null?void 0:c.pages.flatMap(K=>K.results))||[]).map(de)},[i.data]),{targetRef:P,isIntersecting:w}=me({rootMargin:"200px"});if(A.useEffect(()=>{w&&i.hasNextPage&&!i.isFetchingNextPage&&i.fetchNextPage()},[w,i.hasNextPage,i.isFetchingNextPage]),h.isLoading)return e.jsxs("div",{className:"page",children:[e.jsx(M,{className:"h-12 w-1/2 mb-4"}),e.jsx(M,{className:"h-64 w-full"})]});if(h.error||!h.data)return e.jsx("div",{className:"page",children:e.jsx(he,{variant:"destructive",children:e.jsx(pe,{children:"Method not found."})})});const a=h.data,S=(H=_.data)==null?void 0:H.results.find(r=>r.id===a.area_id),v=le(a.source_url),z=v?null:ue(a.source_url);return e.jsxs("div",{className:"page",children:[e.jsxs("div",{className:"breadcrumb",children:[e.jsx(L,{to:"/methods",children:"Methods"}),S&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"sep",children:"/"}),e.jsx(L,{to:`/methods#area-${ce(S.name)}`,children:S.name})]}),e.jsx("span",{className:"sep",children:"/"}),e.jsx("span",{style:{color:"var(--ink)"},children:a.name})]}),e.jsxs("div",{className:`tag-hero method-hero-grid${a.slug==="grokking"||a.slug==="latent-reasoning"||a.slug==="world-action-models"?" method-hero-grid--wide-figure":""}`,children:[e.jsxs("div",{children:[e.jsx("div",{className:"tag-hero-eyebrow",children:"METHOD"}),e.jsx("h1",{className:"tag-hero-title method-hero-title",children:a.name}),e.jsx(Y,{kind:"method",entityId:a.id}),a.full_name&&a.full_name!==a.name&&e.jsx("div",{style:{fontFamily:"var(--serif)",fontSize:16,fontStyle:"italic",color:"var(--ink-soft)",marginTop:8},children:a.full_name}),a.description&&e.jsx(O,{className:"method-description",text:a.description}),a.source_url&&a.source_title&&e.jsxs("div",{className:"method-source",children:[e.jsx("span",{className:"method-source-label",children:"Source"}),v?e.jsxs(L,{className:"method-source-link",to:v,target:"_blank",rel:"noopener noreferrer",children:[e.jsx("span",{className:"method-source-title",children:a.source_title}),a.introduced_year&&e.jsx("span",{className:"method-source-meta",children:a.introduced_year})]}):z?e.jsxs("a",{className:"method-source-link",href:z,target:"_blank",rel:"noopener noreferrer",children:[e.jsx("span",{className:"method-source-title",children:a.source_title}),a.introduced_year&&e.jsx("span",{className:"method-source-meta",children:a.introduced_year})]}):e.jsxs("div",{className:"method-source-link is-static",children:[e.jsx("span",{className:"method-source-title",children:a.source_title}),a.introduced_year&&e.jsx("span",{className:"method-source-meta",children:a.introduced_year})]})]}),e.jsxs("div",{className:"tag-hero-meta",children:[e.jsxs("div",{className:"stat",children:[e.jsx("span",{className:"label",children:"Papers mentioning"}),e.jsx("span",{className:"value",children:(a.paper_count??0).toLocaleString()})]}),g.data&&e.jsxs("div",{className:"stat",children:[e.jsx("span",{className:"label",children:"Recent mentions"}),e.jsxs("span",{className:"value",children:[(g.data.recent_paper_count*30/g.data.recent_days).toFixed(1),e.jsx("small",{children:"/mo"})]}),!g.data.comparison_complete&&e.jsx("span",{title:"Tagging is still catching up. This rate reflects mentions found so far.",children:"Partial coverage"})]}),a.introduced_year!=null&&e.jsxs("div",{className:"stat",children:[e.jsx("span",{className:"label",children:"Introduced"}),e.jsx("span",{className:"value",children:a.introduced_year})]})]}),g.isLoading?e.jsx(M,{className:"h-36 w-full method-trend-skeleton"}):g.data?e.jsxs("section",{className:"method-trend-panel method-trend-panel--compact",children:[e.jsxs("div",{className:"method-trend-header",children:[e.jsx("div",{children:e.jsx("div",{className:"method-trend-eyebrow",children:"Usage trend"})}),e.jsxs("div",{className:"method-trend-summary",children:[e.jsx("strong",{children:g.data.recent_paper_count}),e.jsxs("span",{children:["papers / ",g.data.recent_days,"d"]})]})]}),e.jsx(ke,{history:g.data.history,methodName:a.name})]}):null]}),e.jsxs("figure",{className:"method-figure-card",children:[e.jsx(ye,{method:a}),a.image_credit&&e.jsx("figcaption",{children:e.jsx(O,{className:"method-image-credit",text:a.image_credit})})]})]}),(((q=b.data)==null?void 0:q.length)??0)>0&&e.jsxs("div",{className:"filter-row",children:[e.jsx("span",{className:"label",children:"Related methods"}),b.data.map(r=>e.jsx(te,{method:{slug:r.slug,name:r.name}},r.id))]}),e.jsxs("div",{className:"sort-bar",children:[e.jsxs("div",{className:"paper-feed-toolbar-controls",children:[e.jsx("div",{className:"sort-options",children:be.map(([r,c])=>e.jsx("button",{className:`sort-btn ${m===r?"active":""}`,onClick:()=>f(r),children:c},r))}),e.jsx(ae,{hasCode:x,hasHfArtifacts:p,onHasCodeChange:k,onHasHfArtifactsChange:D})]}),e.jsx(ne,{startDate:l.startDate,endDate:l.endDate,onChange:r=>d(ie(n,r))}),e.jsxs("div",{className:"results-count",children:[y.length," papers mentioning ",a.name]})]}),i.isLoading?e.jsx("div",{className:"paper-list",children:Array.from({length:4}).map((r,c)=>e.jsx(M,{className:"h-40 w-full"},c))}):y.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:y.map((r,c)=>e.jsx(se,{paper:r,rank:c+1},r.id))}),e.jsx("div",{ref:P,style:{height:1}}),i.isFetchingNextPage&&e.jsx("div",{style:{padding:"20px 0",textAlign:"center",color:"var(--ink-faint)"},children:"Loading more…"})]})]})};export{et as default}; +import{j as e,r as A,u as Z,d as V,L,af as X}from"./index-hxawG6mk.js";import{R as Y}from"./ResearchFollowButton-uts1MEpQ.js";import{p as J}from"./paperQueryKeys-BP2E-0yf.js";import{u as F}from"./useQuery-B7vCF2Os.js";import{u as ee}from"./useInfiniteQuery-BIEmOe8z.js";import{M as te,P as se}from"./components-Djdw_Z-e.js";import{P as ae}from"./PaperFeedFilters-BsWw60hu.js";import{a as re,P as ne,b as ie}from"./PaperDateFilter-CmJ1wf5w.js";import{r as le,M as O}from"./MarkdownText-C2hX4LYt.js";import{c as N}from"./catalog-ePebz7GX.js";import{p as oe}from"./papers-B0ysePyJ.js";import{s as ce}from"./slug-BpH-Nkvz.js";import{t as de}from"./transform-DfrN0kQW.js";import{u as me}from"./useIntersectionObserver-rTEWxOEQ.js";import{S as M}from"./skeleton-CRfsRMNe.js";import{A as he,a as pe}from"./alert-2LCyXuCE.js";import{s as ue}from"./safeExternalHref-CkBrsh84.js";import"./useMutation-gPqxjZGO.js";import"./research-25A5rLuK.js";import"./plus-C1naIkSJ.js";import"./LatexTitle-QTkECjbh.js";import"./popover-BEdoEHfx.js";/* empty css */import"./PaperPreviewLink-BJhSzNVs.js";import"./index-CaRYlo5c.js";import"./index-Ddr0k9KU.js";import"./katex-DkKDou_j.js";import"./hover-card-DEHIu6q-.js";const s={pink:"#F8D7D9",pinkS:"#D9B0B3",yellow:"#FBEFC2",yellowS:"#C9B97D",orange:"#F8D7B3",orangeS:"#C99466",blue:"#CDE2EE",blueS:"#7FA4BA",purple:"#D4D2EA",purpleS:"#8E8AC0",green:"#CCE2C5",greenS:"#7DA475",ink:"#1A1814",faint:"#8E8678"},j=({x:t,y:n,w:d,h:m,fill:f,stroke:x,label:p,fontSize:l=10})=>e.jsxs("g",{children:[e.jsx("rect",{x:t,y:n,width:d,height:m,rx:"3",ry:"3",fill:f,stroke:x,strokeWidth:"1"}),e.jsx("text",{x:t+d/2,y:n+m/2,fontSize:l,fontFamily:"var(--sans)",fill:s.ink,textAnchor:"middle",dominantBaseline:"middle",children:p})]}),xe=()=>e.jsxs("svg",{viewBox:"0 0 360 420",width:"100%",height:"100%",style:{display:"block"},children:[e.jsx("text",{x:"180",y:"20",fontSize:"11",fontFamily:"var(--serif)",fontStyle:"italic",fill:s.faint,textAnchor:"middle",children:"Scaled Dot-Product Attention"}),e.jsx(j,{x:140,y:40,w:80,h:26,fill:s.yellow,stroke:s.yellowS,label:"MatMul",fontSize:11}),e.jsx("path",{d:"M180 66 L180 80",stroke:s.ink}),e.jsx(j,{x:140,y:80,w:80,h:26,fill:s.green,stroke:s.greenS,label:"SoftMax",fontSize:11}),e.jsx("path",{d:"M180 106 L180 120",stroke:s.ink}),e.jsx(j,{x:140,y:120,w:80,h:26,fill:s.purple,stroke:s.purpleS,label:"Mask (opt.)",fontSize:11}),e.jsx("path",{d:"M180 146 L180 160",stroke:s.ink}),e.jsx(j,{x:140,y:160,w:80,h:26,fill:s.blue,stroke:s.blueS,label:"Scale ÷√dₖ",fontSize:11}),e.jsx("path",{d:"M180 186 L180 200",stroke:s.ink}),e.jsx(j,{x:140,y:200,w:80,h:26,fill:s.yellow,stroke:s.yellowS,label:"MatMul",fontSize:11}),e.jsx("path",{d:"M156 226 L120 270",stroke:s.ink}),e.jsx("path",{d:"M180 226 L180 270",stroke:s.ink}),e.jsx("path",{d:"M204 226 L240 270",stroke:s.ink}),e.jsx(j,{x:100,y:270,w:40,h:24,fill:s.pink,stroke:s.pinkS,label:"Q",fontSize:13}),e.jsx(j,{x:160,y:270,w:40,h:24,fill:s.pink,stroke:s.pinkS,label:"K",fontSize:13}),e.jsx(j,{x:220,y:270,w:40,h:24,fill:s.pink,stroke:s.pinkS,label:"V",fontSize:13}),e.jsxs("text",{x:"180",y:"330",fontSize:"14",fontFamily:"var(--serif)",fontStyle:"italic",fill:s.ink,textAnchor:"middle",children:["softmax(QK",e.jsx("tspan",{fontSize:"9",baselineShift:"super",children:"⊤"})," / √d) V"]})]}),ge=[["my-skill/",""],["├── SKILL.md","# Required: metadata + instructions"],["├── scripts/","# Optional: executable code"],["├── references/","# Optional: documentation"],["├── assets/","# Optional: templates, resources"],["└── ...","# Any additional files or directories"]],fe=()=>e.jsxs("svg",{viewBox:"0 0 360 420",width:"100%",height:"100%",style:{display:"block"},children:[e.jsx("text",{x:"180",y:"20",fontSize:"11",fontFamily:"var(--serif)",fontStyle:"italic",fill:s.faint,textAnchor:"middle",children:"Skill package layout"}),e.jsx("rect",{x:"28",y:"48",width:"304",height:"318",rx:"8",fill:"#FFFDF8",stroke:s.faint,strokeWidth:"1"}),ge.map(([t,n],d)=>{const m=92+d*44;return e.jsxs("g",{children:[e.jsx("text",{x:"44",y:m,fontSize:"11",fontFamily:"var(--mono)",fill:s.ink,dominantBaseline:"middle",children:t}),n?e.jsx("text",{x:"138",y:m,fontSize:"8.5",fontFamily:"var(--mono)",fill:s.faint,dominantBaseline:"middle",children:n}):null]},t)})]}),je={attention:xe,"agent-skills":fe},_e=({method:t})=>e.jsxs("svg",{viewBox:"0 0 360 420",width:"100%",height:"100%",children:[e.jsx("text",{x:"180",y:"20",fontSize:"11",fontFamily:"var(--serif)",fontStyle:"italic",fill:s.faint,textAnchor:"middle",children:t.name||"method"}),e.jsx(j,{x:80,y:70,w:200,h:50,fill:s.blue,stroke:s.blueS,label:"Input",fontSize:12}),e.jsx("path",{d:"M180 120 L180 150",stroke:s.ink}),e.jsx(j,{x:80,y:150,w:200,h:70,fill:s.orange,stroke:s.orangeS,label:t.name||"transform",fontSize:13}),e.jsx("path",{d:"M180 220 L180 250",stroke:s.ink}),e.jsx(j,{x:80,y:250,w:200,h:50,fill:s.purple,stroke:s.purpleS,label:"Output",fontSize:12})]}),ye=({method:t})=>{const n=(t.slug||"").toLowerCase(),d=je[n];if(d)return e.jsx("div",{className:"method-figure-svg method-figure-svg--schematic",children:e.jsx(d,{})});if(t.image_url){const m=n==="transformer"||n==="gpt-4"||n==="gpt-4o"||n==="multi-head-attention"?" method-figure-svg--compact":n==="rpn"?" method-figure-svg--scaled-80":"";return e.jsx("div",{className:`method-figure-svg method-figure-svg--image${m}`,children:e.jsx("img",{className:"method-figure-img",src:t.image_url,alt:`${t.name} figure`})})}return e.jsx("div",{className:"method-figure-svg method-figure-svg--schematic",children:e.jsx(_e,{method:t})})},C=720,T=138,u={top:8,right:10,bottom:25,left:36},Q=56,ve=new Intl.DateTimeFormat("en",{month:"short",year:"2-digit",timeZone:"UTC"}),Se=new Intl.DateTimeFormat("en",{year:"numeric",timeZone:"UTC"}),I=t=>ve.format(new Date(`${t}T00:00:00Z`)),Ne=(t,n)=>{if(t===0)return new Set;const d=t>48?12:t>36?6:t>18?3:2,m=Math.max(1,Math.ceil(Q/n)),f=Math.max(d,m),x=t-1,p=new Set([0,x]);for(let l=f;l=Q&&p.add(l);return p},U=t=>{if(t.coverage_status===void 0||["complete","not_applicable"].includes(t.coverage_status))return null;const n=t.processed_paper_count!==void 0&&t.eligible_paper_count!==void 0?`; ${t.processed_paper_count.toLocaleString()} of ${t.eligible_paper_count.toLocaleString()} eligible papers processed`:"";return`Historical tagging ${t.coverage_status==="failed"?"needs retry":"in progress"}${n}`},ke=({history:t,methodName:n})=>{const[d,m]=A.useState(null),f=Math.max(1,...t.map(o=>o.paper_count)),x=C-u.left-u.right,p=T-u.top-u.bottom,l=t.length?x/t.length:x,k=Math.max(2,l*.68),D=Ne(t.length,l),h=Array.from(new Set([0,Math.ceil(f/2),f])),_=d==null?null:t[d],g=_?U(_):null;return e.jsxs("div",{className:"method-usage-chart-wrap",children:[e.jsxs("svg",{className:"method-usage-chart",viewBox:`0 0 ${C} ${T}`,role:"group","aria-label":`${n}: papers mentioning this method by publication month`,children:[e.jsxs("title",{children:[n,": papers mentioning this method by publication month"]}),h.map(o=>{const i=u.top+p-o/f*p;return e.jsxs("g",{children:[e.jsx("line",{className:"method-usage-gridline",x1:u.left,x2:C-u.right,y1:i,y2:i}),e.jsx("text",{className:"method-usage-y-label",x:u.left-8,y:i+3,textAnchor:"end",children:o})]},o)}),t.map((o,i)=>{const b=o.paper_count/f*p,y=o.paper_count>0?Math.max(1,b):0,P=u.left+l*i+(l-k)/2,w=u.top+p-y,a=d===i,S=i===t.length-1,v=U(o);return e.jsxs("g",{className:`method-usage-bar${a?" is-active":""}${S?" is-current":""}`,tabIndex:0,role:"img","aria-label":`${I(o.start_date)}: ${o.paper_count} ${o.paper_count===1?"paper":"papers"}${v?`. ${v}`:""}`,onMouseEnter:()=>m(i),onMouseLeave:()=>m(null),onFocus:()=>m(i),onBlur:()=>m(null),children:[e.jsx("rect",{className:"method-usage-bar-hit",x:u.left+l*i,y:u.top,width:l,height:p}),e.jsx("rect",{className:"method-usage-bar-mark",x:P,y:w,width:k,height:y,rx:"1.5"})]},o.start_date)}),t.map((o,i)=>D.has(i)?e.jsx("text",{className:"method-usage-x-label",x:u.left+l*(i+.5),y:T-11,textAnchor:"middle",children:t.length>48?Se.format(new Date(`${o.start_date}T00:00:00Z`)):I(o.start_date)},o.start_date):null)]}),_&&e.jsxs("div",{className:"method-usage-tooltip",role:"status",children:[e.jsx("strong",{children:I(_.start_date)}),e.jsxs("span",{children:[_.paper_count," ",_.paper_count===1?"paper":"papers",d===t.length-1?" · month to date":""]}),e.jsxs("span",{children:[(_.catalog_share??0).toFixed(2),"% of"," ",(_.catalog_paper_count??0).toLocaleString()," catalog papers"]}),g&&e.jsx("span",{children:g})]})]})},be=[["trending","trending"],["new","newest"],["cited","most cited"]],G={"on-policy-distillation":["fine-tuning","post-training","rlvr","rlhf","direct-preference-optimization-dpo"],mcp:["agent-skills"],"agent-skills":["mcp"]},et=()=>{var E,B,$,R,H,q;const{methodSlug:t}=Z(),[n,d]=V(),[m,f]=A.useState("trending"),x=n.get("has_code")==="true",p=n.get("has_hf_artifacts")==="true",l=re(n),k=r=>{const c=new URLSearchParams(n);r?c.set("has_code","true"):c.delete("has_code"),d(c)},D=r=>{const c=new URLSearchParams(n);r?c.set("has_hf_artifacts","true"):c.delete("has_hf_artifacts"),d(c)},h=F({queryKey:["method",t],queryFn:()=>N.getMethod(t),enabled:!!t,staleTime:10*60*1e3}),_=F({queryKey:["areas-all"],queryFn:()=>N.listAreas({page_size:50,ordering:"name"}),enabled:!!((E=h.data)!=null&&E.area_id),staleTime:10*60*1e3}),g=F({queryKey:["method-trend",t],queryFn:()=>N.methodTrend(t),enabled:!!t,staleTime:10*60*1e3}),o=m==="trending"?"trending":m==="cited"?"citation_count":"date_published",i=ee({queryKey:[...J.feeds.method,t,o,x,p,l.startDate,l.endDate],queryFn:({pageParam:r=1})=>oe.forMethod(t,{page:r,page_size:20,order_by:o,order_dir:"desc",include_resources:!0,repository_limit:1,has_code:x,has_hf_artifacts:p,start_date:l.startDate,end_date:l.endDate}),getNextPageParam:r=>r.next_page,initialPageParam:1,enabled:!!t,staleTime:5*60*1e3,placeholderData:X}),b=F({queryKey:["related-methods",(B=h.data)==null?void 0:B.slug,($=h.data)==null?void 0:$.area_id,(R=h.data)==null?void 0:R.id],queryFn:async()=>{const r=h.data;if(!r)return[];const c=r.slug?G[r.slug]:void 0;return c?Promise.all(c.map(W=>N.getMethod(W))):r.area_id?(await N.listMethods({area_id:r.area_id,exclude_id:r.id,ordering:"-paper_count",page_size:8})).results:[]},enabled:!!(h.data&&(h.data.slug&&G[h.data.slug]||h.data.area_id)),staleTime:10*60*1e3}),y=A.useMemo(()=>{var c;return(((c=i.data)==null?void 0:c.pages.flatMap(K=>K.results))||[]).map(de)},[i.data]),{targetRef:P,isIntersecting:w}=me({rootMargin:"200px"});if(A.useEffect(()=>{w&&i.hasNextPage&&!i.isFetchingNextPage&&i.fetchNextPage()},[w,i.hasNextPage,i.isFetchingNextPage]),h.isLoading)return e.jsxs("div",{className:"page",children:[e.jsx(M,{className:"h-12 w-1/2 mb-4"}),e.jsx(M,{className:"h-64 w-full"})]});if(h.error||!h.data)return e.jsx("div",{className:"page",children:e.jsx(he,{variant:"destructive",children:e.jsx(pe,{children:"Method not found."})})});const a=h.data,S=(H=_.data)==null?void 0:H.results.find(r=>r.id===a.area_id),v=le(a.source_url),z=v?null:ue(a.source_url);return e.jsxs("div",{className:"page",children:[e.jsxs("div",{className:"breadcrumb",children:[e.jsx(L,{to:"/methods",children:"Methods"}),S&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"sep",children:"/"}),e.jsx(L,{to:`/methods#area-${ce(S.name)}`,children:S.name})]}),e.jsx("span",{className:"sep",children:"/"}),e.jsx("span",{style:{color:"var(--ink)"},children:a.name})]}),e.jsxs("div",{className:`tag-hero method-hero-grid${a.slug==="grokking"||a.slug==="latent-reasoning"||a.slug==="world-action-models"?" method-hero-grid--wide-figure":""}`,children:[e.jsxs("div",{children:[e.jsx("div",{className:"tag-hero-eyebrow",children:"METHOD"}),e.jsx("h1",{className:"tag-hero-title method-hero-title",children:a.name}),e.jsx(Y,{kind:"method",entityId:a.id}),a.full_name&&a.full_name!==a.name&&e.jsx("div",{style:{fontFamily:"var(--serif)",fontSize:16,fontStyle:"italic",color:"var(--ink-soft)",marginTop:8},children:a.full_name}),a.description&&e.jsx(O,{className:"method-description",text:a.description}),a.source_url&&a.source_title&&e.jsxs("div",{className:"method-source",children:[e.jsx("span",{className:"method-source-label",children:"Source"}),v?e.jsxs(L,{className:"method-source-link",to:v,target:"_blank",rel:"noopener noreferrer",children:[e.jsx("span",{className:"method-source-title",children:a.source_title}),a.introduced_year&&e.jsx("span",{className:"method-source-meta",children:a.introduced_year})]}):z?e.jsxs("a",{className:"method-source-link",href:z,target:"_blank",rel:"noopener noreferrer",children:[e.jsx("span",{className:"method-source-title",children:a.source_title}),a.introduced_year&&e.jsx("span",{className:"method-source-meta",children:a.introduced_year})]}):e.jsxs("div",{className:"method-source-link is-static",children:[e.jsx("span",{className:"method-source-title",children:a.source_title}),a.introduced_year&&e.jsx("span",{className:"method-source-meta",children:a.introduced_year})]})]}),e.jsxs("div",{className:"tag-hero-meta",children:[e.jsxs("div",{className:"stat",children:[e.jsx("span",{className:"label",children:"Papers mentioning"}),e.jsx("span",{className:"value",children:(a.paper_count??0).toLocaleString()})]}),g.data&&e.jsxs("div",{className:"stat",children:[e.jsx("span",{className:"label",children:"Recent mentions"}),e.jsxs("span",{className:"value",children:[(g.data.recent_paper_count*30/g.data.recent_days).toFixed(1),e.jsx("small",{children:"/mo"})]}),!g.data.comparison_complete&&e.jsx("span",{title:"Tagging is still catching up. This rate reflects mentions found so far.",children:"Partial coverage"})]}),a.introduced_year!=null&&e.jsxs("div",{className:"stat",children:[e.jsx("span",{className:"label",children:"Introduced"}),e.jsx("span",{className:"value",children:a.introduced_year})]})]}),g.isLoading?e.jsx(M,{className:"h-36 w-full method-trend-skeleton"}):g.data?e.jsxs("section",{className:"method-trend-panel method-trend-panel--compact",children:[e.jsxs("div",{className:"method-trend-header",children:[e.jsx("div",{children:e.jsx("div",{className:"method-trend-eyebrow",children:"Usage trend"})}),e.jsxs("div",{className:"method-trend-summary",children:[e.jsx("strong",{children:g.data.recent_paper_count}),e.jsxs("span",{children:["papers / ",g.data.recent_days,"d"]})]})]}),e.jsx(ke,{history:g.data.history,methodName:a.name})]}):null]}),e.jsxs("figure",{className:"method-figure-card",children:[e.jsx(ye,{method:a}),a.image_credit&&e.jsx("figcaption",{children:e.jsx(O,{className:"method-image-credit",text:a.image_credit})})]})]}),(((q=b.data)==null?void 0:q.length)??0)>0&&e.jsxs("div",{className:"filter-row",children:[e.jsx("span",{className:"label",children:"Related methods"}),b.data.map(r=>e.jsx(te,{method:{slug:r.slug,name:r.name}},r.id))]}),e.jsxs("div",{className:"sort-bar",children:[e.jsxs("div",{className:"paper-feed-toolbar-controls",children:[e.jsx("div",{className:"sort-options",children:be.map(([r,c])=>e.jsx("button",{className:`sort-btn ${m===r?"active":""}`,onClick:()=>f(r),children:c},r))}),e.jsx(ae,{hasCode:x,hasHfArtifacts:p,onHasCodeChange:k,onHasHfArtifactsChange:D})]}),e.jsx(ne,{startDate:l.startDate,endDate:l.endDate,onChange:r=>d(ie(n,r))}),e.jsxs("div",{className:"results-count",children:[y.length," papers mentioning ",a.name]})]}),i.isLoading?e.jsx("div",{className:"paper-list",children:Array.from({length:4}).map((r,c)=>e.jsx(M,{className:"h-40 w-full"},c))}):y.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:y.map((r,c)=>e.jsx(se,{paper:r,rank:c+1},r.id))}),e.jsx("div",{ref:P,style:{height:1}}),i.isFetchingNextPage&&e.jsx("div",{style:{padding:"20px 0",textAlign:"center",color:"var(--ink-faint)"},children:"Loading more…"})]})]})};export{et as default}; diff --git a/assets/MethodsIndexView-wGGaknFx.js b/assets/MethodsIndexView-BCYbsfhj.js similarity index 84% rename from assets/MethodsIndexView-wGGaknFx.js rename to assets/MethodsIndexView-BCYbsfhj.js index f75c6f8e701a21911fabe1f8184c4b5d43e4659a..8ebe92e52229dc3437b16b9cb763b7629a567fc7 100644 --- a/assets/MethodsIndexView-wGGaknFx.js +++ b/assets/MethodsIndexView-BCYbsfhj.js @@ -1,4 +1,4 @@ -import{g,r as d,j as e,L as f}from"./index-CnBotBa4.js";import{u as m}from"./useQuery-C8pfCInN.js";import{c as h}from"./catalog-mND3MerS.js";import{s as j}from"./slug-BpH-Nkvz.js";import{S as p}from"./skeleton-DuOQBmSr.js";import{A as y,a as v}from"./alert-B0qZtPeK.js";import{T as _}from"./TaxonomySuggestionTile-FyHlZUAE.js";import"./SignInToEditDialog-Nxaw2Fu9.js";import"./button-DNii_czO.js";import"./input-fzMY4SDb.js";import"./textarea-D8TA8f9X.js";import"./searchable-select-Dky9Eonk.js";import"./popover-BvojInsz.js";import"./dialog-mXYRHqz9.js";import"./loader-circle-zwM3ton0.js";import"./useMutation-YEvFXzv3.js";import"./submissions-BXysTHzU.js";import"./plus-DTSO60Ls.js";/** +import{g,r as d,j as e,L as f}from"./index-hxawG6mk.js";import{u as m}from"./useQuery-B7vCF2Os.js";import{c as h}from"./catalog-ePebz7GX.js";import{s as j}from"./slug-BpH-Nkvz.js";import{S as p}from"./skeleton-CRfsRMNe.js";import{A as y,a as v}from"./alert-2LCyXuCE.js";import{T as _}from"./TaxonomySuggestionTile-DiI1TNoC.js";import"./SignInToEditDialog-4j2lLlXQ.js";import"./button-DR59q2Iu.js";import"./input-BOLTsgbP.js";import"./textarea-DzlRNXqF.js";import"./searchable-select-cLm40hhL.js";import"./popover-BEdoEHfx.js";import"./dialog-D2TDqr0v.js";import"./loader-circle-CXb3415J.js";import"./useMutation-gPqxjZGO.js";import"./submissions-DgbzmxlX.js";import"./plus-C1naIkSJ.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/NotFound-B8QVsf71.js b/assets/NotFound-B1i1qS3r.js similarity index 89% rename from assets/NotFound-B8QVsf71.js rename to assets/NotFound-B1i1qS3r.js index 79f7e3030ac9399cc5d0b94794186b641e4745e3..723eb5cb27473cbbe40bd18d813a1084b601adfb 100644 --- a/assets/NotFound-B8QVsf71.js +++ b/assets/NotFound-B1i1qS3r.js @@ -1 +1 @@ -import{ar as o,r as a,j as t,L as s}from"./index-CnBotBa4.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}; +import{ar as o,r as a,j as t,L as s}from"./index-hxawG6mk.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}; diff --git a/assets/OrganizationContributionGraph-DMjwvdOh.js b/assets/OrganizationContributionGraph-C-95DVgW.js similarity index 94% rename from assets/OrganizationContributionGraph-DMjwvdOh.js rename to assets/OrganizationContributionGraph-C-95DVgW.js index fd1978b42578f812afe465cc5331cd38f780d2f3..b322df2ec78654fc9db1143ad54c29e86abb59f5 100644 --- a/assets/OrganizationContributionGraph-DMjwvdOh.js +++ b/assets/OrganizationContributionGraph-C-95DVgW.js @@ -1 +1 @@ -import{r as b,j as o}from"./index-CnBotBa4.js";import{u as z}from"./useQuery-C8pfCInN.js";import{S as T}from"./skeleton-DuOQBmSr.js";import{c as w}from"./catalog-mND3MerS.js";const x=24*60*60*1e3,f=12,y=3,v=new Map([[1,"Mon"],[3,"Wed"],[5,"Fri"]]),$=n=>new Date(`${n}T00:00:00Z`),N=n=>n.toISOString().slice(0,10),_=(n,r)=>{if(n===0)return 0;const i=r.findIndex(s=>n<=s);return i===-1?4:i+1},D=n=>{const r=$(n.start_date),i=$(n.end_date),s=new Date(r.getTime()-r.getUTCDay()*x),h=new Date(i.getTime()+(6-i.getUTCDay())*x),p=new Map(n.results.map(e=>[e.date,e.paper_count])),u=n.results.map(e=>e.paper_count).sort((e,m)=>e-m),c=[.25,.5,.75].map(e=>u[Math.min(u.length-1,Math.floor(u.length*e))]??1),l=[];for(let e=s.getTime();e<=h.getTime();e+=x){const m=new Date(e),d=N(m),g=e>=r.getTime()&&e<=i.getTime(),C=g?p.get(d)??0:0;l.push({key:d,date:m,count:C,inRange:g,level:_(C,c)})}const t=l.length/7,a=[];let j=-1;for(let e=0;eg.inRange&&(e===0||g.date.getUTCDate()<=7));d&&d.date.getUTCMonth()!==j&&(j=d.date.getUTCMonth(),a.length>0&&e-a[a.length-1].column<3&&a.pop(),a.push({label:d.date.toLocaleString("en",{month:"short",timeZone:"UTC"}),column:e}))}return{days:l,months:a,weekCount:t}},L=({data:n,organizationName:r,title:i="Paper contributions",noun:s="paper"})=>{const h=b.useRef(null),{days:p,months:u,weekCount:c}=b.useMemo(()=>D(n),[n]),l=c*f+(c-1)*y;return b.useEffect(()=>{const t=h.current;t&&(t.scrollLeft=t.scrollWidth)},[c]),o.jsxs("section",{className:"organization-contributions","aria-labelledby":"organization-contributions-title",children:[o.jsxs("div",{className:"organization-contributions-header",children:[o.jsx("h2",{id:"organization-contributions-title",className:"organization-contributions-title",children:i}),o.jsxs("p",{className:"organization-contributions-summary",children:[n.total_count.toLocaleString()," ",n.total_count===1?s:`${s}s`," recorded in the last year"]})]}),o.jsx("div",{className:"organization-contributions-scroll",ref:h,children:o.jsxs("div",{className:"organization-contributions-plot",style:{width:l+34},role:"img","aria-label":`${r} recorded ${n.total_count} ${n.total_count===1?s:`${s}s`} in the last year`,children:[o.jsx("div",{className:"organization-contributions-weekdays","aria-hidden":"true",children:Array.from({length:7}).map((t,a)=>o.jsx("span",{children:v.get(a)??""},a))}),o.jsxs("div",{children:[o.jsx("div",{className:"organization-contributions-months",style:{width:l,gridTemplateColumns:`repeat(${c}, ${f}px)`},"aria-hidden":"true",children:u.map(t=>o.jsx("span",{style:{gridColumnStart:t.column+1},children:t.label},`${t.label}-${t.column}`))}),o.jsx("div",{className:"organization-contributions-grid",style:{width:l,gridTemplateColumns:`repeat(${c}, ${f}px)`},"aria-hidden":"true",children:p.map(t=>o.jsx("span",{className:`organization-contribution-cell ${t.inRange?`level-${t.level}`:"is-outside"}`,title:t.inRange?`${t.count} ${t.count===1?s:`${s}s`} on ${t.date.toLocaleDateString("en",{dateStyle:"long",timeZone:"UTC"})}`:void 0},t.key))})]})]})}),o.jsxs("div",{className:"organization-contributions-legend","aria-hidden":"true",children:[o.jsx("span",{children:"Fewer"}),[0,1,2,3,4].map(t=>o.jsx("span",{className:`organization-contribution-cell level-${t}`},t)),o.jsx("span",{children:"More"})]})]})},A=({organizationSlug:n,organizationName:r})=>{const i=z({queryKey:["organization-contributions",n],queryFn:()=>w.organizationContributions(n),staleTime:6e5});return i.isLoading?o.jsx(T,{className:"organization-contributions-skeleton"}):i.data?o.jsx(L,{data:i.data,organizationName:r}):null};export{L as C,A as O}; +import{r as b,j as o}from"./index-hxawG6mk.js";import{u as z}from"./useQuery-B7vCF2Os.js";import{S as T}from"./skeleton-CRfsRMNe.js";import{c as w}from"./catalog-ePebz7GX.js";const x=24*60*60*1e3,f=12,y=3,v=new Map([[1,"Mon"],[3,"Wed"],[5,"Fri"]]),$=n=>new Date(`${n}T00:00:00Z`),N=n=>n.toISOString().slice(0,10),_=(n,r)=>{if(n===0)return 0;const i=r.findIndex(s=>n<=s);return i===-1?4:i+1},D=n=>{const r=$(n.start_date),i=$(n.end_date),s=new Date(r.getTime()-r.getUTCDay()*x),h=new Date(i.getTime()+(6-i.getUTCDay())*x),p=new Map(n.results.map(e=>[e.date,e.paper_count])),u=n.results.map(e=>e.paper_count).sort((e,m)=>e-m),c=[.25,.5,.75].map(e=>u[Math.min(u.length-1,Math.floor(u.length*e))]??1),l=[];for(let e=s.getTime();e<=h.getTime();e+=x){const m=new Date(e),d=N(m),g=e>=r.getTime()&&e<=i.getTime(),C=g?p.get(d)??0:0;l.push({key:d,date:m,count:C,inRange:g,level:_(C,c)})}const t=l.length/7,a=[];let j=-1;for(let e=0;eg.inRange&&(e===0||g.date.getUTCDate()<=7));d&&d.date.getUTCMonth()!==j&&(j=d.date.getUTCMonth(),a.length>0&&e-a[a.length-1].column<3&&a.pop(),a.push({label:d.date.toLocaleString("en",{month:"short",timeZone:"UTC"}),column:e}))}return{days:l,months:a,weekCount:t}},L=({data:n,organizationName:r,title:i="Paper contributions",noun:s="paper"})=>{const h=b.useRef(null),{days:p,months:u,weekCount:c}=b.useMemo(()=>D(n),[n]),l=c*f+(c-1)*y;return b.useEffect(()=>{const t=h.current;t&&(t.scrollLeft=t.scrollWidth)},[c]),o.jsxs("section",{className:"organization-contributions","aria-labelledby":"organization-contributions-title",children:[o.jsxs("div",{className:"organization-contributions-header",children:[o.jsx("h2",{id:"organization-contributions-title",className:"organization-contributions-title",children:i}),o.jsxs("p",{className:"organization-contributions-summary",children:[n.total_count.toLocaleString()," ",n.total_count===1?s:`${s}s`," recorded in the last year"]})]}),o.jsx("div",{className:"organization-contributions-scroll",ref:h,children:o.jsxs("div",{className:"organization-contributions-plot",style:{width:l+34},role:"img","aria-label":`${r} recorded ${n.total_count} ${n.total_count===1?s:`${s}s`} in the last year`,children:[o.jsx("div",{className:"organization-contributions-weekdays","aria-hidden":"true",children:Array.from({length:7}).map((t,a)=>o.jsx("span",{children:v.get(a)??""},a))}),o.jsxs("div",{children:[o.jsx("div",{className:"organization-contributions-months",style:{width:l,gridTemplateColumns:`repeat(${c}, ${f}px)`},"aria-hidden":"true",children:u.map(t=>o.jsx("span",{style:{gridColumnStart:t.column+1},children:t.label},`${t.label}-${t.column}`))}),o.jsx("div",{className:"organization-contributions-grid",style:{width:l,gridTemplateColumns:`repeat(${c}, ${f}px)`},"aria-hidden":"true",children:p.map(t=>o.jsx("span",{className:`organization-contribution-cell ${t.inRange?`level-${t.level}`:"is-outside"}`,title:t.inRange?`${t.count} ${t.count===1?s:`${s}s`} on ${t.date.toLocaleDateString("en",{dateStyle:"long",timeZone:"UTC"})}`:void 0},t.key))})]})]})}),o.jsxs("div",{className:"organization-contributions-legend","aria-hidden":"true",children:[o.jsx("span",{children:"Fewer"}),[0,1,2,3,4].map(t=>o.jsx("span",{className:`organization-contribution-cell level-${t}`},t)),o.jsx("span",{children:"More"})]})]})},A=({organizationSlug:n,organizationName:r})=>{const i=z({queryKey:["organization-contributions",n],queryFn:()=>w.organizationContributions(n),staleTime:6e5});return i.isLoading?o.jsx(T,{className:"organization-contributions-skeleton"}):i.data?o.jsx(L,{data:i.data,organizationName:r}):null};export{L as C,A as O}; diff --git a/assets/OrganizationDetailView-BY-TbtJS.js b/assets/OrganizationDetailView-BY-TbtJS.js new file mode 100644 index 0000000000000000000000000000000000000000..ef8e3a208bd59b7785077d6d2e47a330b3be7d8c --- /dev/null +++ b/assets/OrganizationDetailView-BY-TbtJS.js @@ -0,0 +1 @@ +import{u as t,j as r}from"./index-hxawG6mk.js";import{O as i}from"./OrganizationPaperFeed-CfEifyNO.js";import m from"./NotFound-B1i1qS3r.js";import"./ResearchFollowButton-uts1MEpQ.js";import"./useQuery-B7vCF2Os.js";import"./useMutation-gPqxjZGO.js";import"./research-25A5rLuK.js";import"./plus-C1naIkSJ.js";import"./components-Djdw_Z-e.js";import"./paperQueryKeys-BP2E-0yf.js";import"./LatexTitle-QTkECjbh.js";import"./transform-DfrN0kQW.js";import"./papers-B0ysePyJ.js";import"./safeExternalHref-CkBrsh84.js";import"./MarkdownText-C2hX4LYt.js";/* empty css */import"./PaperPreviewLink-BJhSzNVs.js";import"./index-CaRYlo5c.js";import"./index-Ddr0k9KU.js";import"./katex-DkKDou_j.js";import"./hover-card-DEHIu6q-.js";import"./OrganizationContributionGraph-C-95DVgW.js";import"./skeleton-CRfsRMNe.js";import"./catalog-ePebz7GX.js";import"./PaperFeedFilters-BsWw60hu.js";import"./PaperDateFilter-CmJ1wf5w.js";import"./popover-BEdoEHfx.js";import"./alert-2LCyXuCE.js";import"./searchable-select-cLm40hhL.js";import"./button-DR59q2Iu.js";import"./dialog-D2TDqr0v.js";import"./loader-circle-CXb3415J.js";import"./useIntersectionObserver-rTEWxOEQ.js";import"./usePapers-K74IxnFM.js";import"./useInfiniteQuery-BIEmOe8z.js";const I=()=>{const{orgSlug:o}=t();return o?r.jsx(i,{organizationSlug:o}):r.jsx(m,{})};export{I as default}; diff --git a/assets/OrganizationDetailView-cony7X_q.js b/assets/OrganizationDetailView-cony7X_q.js deleted file mode 100644 index e01b2747032e37519de70560c6980b8ca93d4aec..0000000000000000000000000000000000000000 --- a/assets/OrganizationDetailView-cony7X_q.js +++ /dev/null @@ -1 +0,0 @@ -import{u as t,j as r}from"./index-CnBotBa4.js";import{O as i}from"./OrganizationPaperFeed-D52-PjRU.js";import m from"./NotFound-B8QVsf71.js";import"./ResearchFollowButton-CIKuncTY.js";import"./useQuery-C8pfCInN.js";import"./useMutation-YEvFXzv3.js";import"./research-DhkAyrPi.js";import"./plus-DTSO60Ls.js";import"./components-CSFfzsKt.js";import"./paperQueryKeys-BP2E-0yf.js";import"./LatexTitle-B1D_EqzJ.js";import"./transform-DMbrhcTx.js";import"./papers-DkTdvzl4.js";import"./safeExternalHref-CkBrsh84.js";import"./MarkdownText-BAS9zVyW.js";/* empty css */import"./PaperPreviewLink-ChJBLunV.js";import"./index-DxRopg3G.js";import"./index-DLNxIk77.js";import"./katex-DkKDou_j.js";import"./hover-card-CkboGKdu.js";import"./OrganizationContributionGraph-DMjwvdOh.js";import"./skeleton-DuOQBmSr.js";import"./catalog-mND3MerS.js";import"./PaperFeedFilters-DBRREw9D.js";import"./PaperDateFilter-DMplC82d.js";import"./popover-BvojInsz.js";import"./alert-B0qZtPeK.js";import"./searchable-select-Dky9Eonk.js";import"./button-DNii_czO.js";import"./dialog-mXYRHqz9.js";import"./loader-circle-zwM3ton0.js";import"./useIntersectionObserver-WHgviHIR.js";import"./usePapers-fw4Ivp2T.js";import"./useInfiniteQuery-DUlXElgD.js";const I=()=>{const{orgSlug:o}=t();return o?r.jsx(i,{organizationSlug:o}):r.jsx(m,{})};export{I as default}; diff --git a/assets/OrganizationPaperFeed-D52-PjRU.js b/assets/OrganizationPaperFeed-CfEifyNO.js similarity index 87% rename from assets/OrganizationPaperFeed-D52-PjRU.js rename to assets/OrganizationPaperFeed-CfEifyNO.js index 36251d62eda9d9223faa8a7cafb7fa22d730511c..6fc02bf8e6a949bb18645bc1493203ea6f30d7cd 100644 --- a/assets/OrganizationPaperFeed-D52-PjRU.js +++ b/assets/OrganizationPaperFeed-CfEifyNO.js @@ -1 +1 @@ -import{b as E,d as B,r as d,j as e,L as A}from"./index-CnBotBa4.js";import{R as Q}from"./ResearchFollowButton-CIKuncTY.js";import{u as C}from"./useQuery-C8pfCInN.js";import{P as U}from"./components-CSFfzsKt.js";import{M as G}from"./MarkdownText-BAS9zVyW.js";import{O as K}from"./OrganizationContributionGraph-DMjwvdOh.js";import{P as W}from"./PaperFeedFilters-DBRREw9D.js";import{a as Z,P as J,b as V}from"./PaperDateFilter-DMplC82d.js";import{A as X,a as Y}from"./alert-B0qZtPeK.js";import{S as z}from"./searchable-select-Dky9Eonk.js";import{S as $}from"./skeleton-DuOQBmSr.js";import{u as ee}from"./useIntersectionObserver-WHgviHIR.js";import{e as se}from"./usePapers-fw4Ivp2T.js";import{c as R}from"./catalog-mND3MerS.js";import{d as D,t as ae}from"./transform-DMbrhcTx.js";import re from"./NotFound-B8QVsf71.js";const te=[["trending","trending"],["date_published","newest"],["citation_count","most cited"]],ne=n=>n==="date_published"||n==="citation_count"?n:"trending",ye=({organizationSlug:n,taskSlug:p})=>{var y,P,v,F,L,k,w,O;const T=E(),[o,h]=B(),[I,u]=d.useState(!1),g=ne(o.get("order_by")),f=o.get("has_code")==="true",_=o.get("has_hf_artifacts")==="true",m=Z(o),x=C({queryKey:["organization",n],queryFn:()=>R.getOrganization(n),staleTime:10*60*1e3}),c=C({queryKey:["organization-areas-with-tasks",n],queryFn:()=>R.organizationAreasWithTasks(n),staleTime:10*60*1e3}),i=se({organizationSlug:n,taskSlug:p,page_size:12,order_by:g,order_dir:"desc",include_resources:!0,has_code:f,has_hf_artifacts:_,start_date:m.startDate,end_date:m.endDate,enabled:!!n}),{targetRef:M,isIntersecting:j}=ee({rootMargin:"200px"});d.useEffect(()=>{j&&i.hasNextPage&&!i.isFetchingNextPage&&i.fetchNextPage()},[j,i.hasNextPage,i.isFetchingNextPage]),d.useEffect(()=>{u(!1)},[n,p]);const b=d.useMemo(()=>{var a;return(((a=c.data)==null?void 0:a.results)??[]).flatMap(r=>r.tasks.filter(t=>!!t.slug).map(t=>({...t,slug:t.slug,label:D(t.name,t.slug)})))},[c.data]),l=b.find(a=>a.slug===p),N=d.useMemo(()=>{var a;return(((a=i.data)==null?void 0:a.pages)??[]).flatMap(r=>r.results.map(ae))},[i.data]),s=x.data??((y=c.data)==null?void 0:y.organization),H=((v=(P=i.data)==null?void 0:P.pages[0])==null?void 0:v.count)??0;if(((F=x.error)==null?void 0:F.status)===404||((L=c.error)==null?void 0:L.status)===404||((k=i.error)==null?void 0:k.status)===404)return e.jsx(re,{});if(c.error||i.error)return e.jsx("div",{className:"page",children:e.jsx(X,{variant:"destructive",children:e.jsx(Y,{children:"Failed to load organization papers. Please try again."})})});const q=a=>{const r=a.trim().toLocaleLowerCase();return b.filter(t=>`${t.label} ${t.slug}`.toLocaleLowerCase().includes(r)).map(t=>({value:t.slug,label:t.label,description:`${t.paper_count.toLocaleString()} ${t.paper_count===1?"paper":"papers"}`}))},S=a=>{const r=a==="__all__"?`/orgs/${n}`:`/orgs/${n}/${a}`,t=o.toString();T({pathname:r,search:t?`?${t}`:""})};return e.jsxs("div",{className:"page",children:[e.jsxs("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:[e.jsx(A,{to:"/",children:"Home"}),e.jsx("span",{children:" / "}),e.jsx(A,{to:"/organizations",children:"Organizations"}),e.jsx("span",{children:" / "}),e.jsx("span",{children:(s==null?void 0:s.name)??n}),l&&e.jsxs(e.Fragment,{children:[e.jsx("span",{children:" / "}),e.jsx("span",{children:D(l.name,l.slug)})]})]}),e.jsxs("header",{className:"organization-hero",children:[e.jsxs("div",{className:"organization-hero-profile",children:[e.jsx("div",{className:"organizations-eyebrow",children:"ORGANIZATION"}),e.jsxs("h1",{className:"feed-title organization-hero-title",children:[s!=null&&s.logo_url&&!I?e.jsx("img",{src:s.logo_url,alt:"",width:58,height:58,onError:()=>u(!0)}):s?e.jsx("span",{className:"organization-logo organization-logo--fallback","aria-hidden":"true",children:s.name.slice(0,1).toUpperCase()}):null,(s==null?void 0:s.name)??e.jsx($,{className:"h-12 w-64"})]}),s&&e.jsx(Q,{kind:"organization",entityId:s.id}),s&&e.jsxs("div",{className:"feed-subtitle",children:[((w=s.paper_count)==null?void 0:w.toLocaleString())??0," papers",(s.organization_trending_score??0)>0&&s.trending_rank&&e.jsxs(e.Fragment,{children:[" · #",s.trending_rank," trending this month"]})]}),(s==null?void 0:s.description)&&e.jsx(G,{className:"method-description",text:s.description}),s&&e.jsxs("div",{className:"organization-hero-links",children:[s.website_url&&e.jsx("a",{href:s.website_url,target:"_blank",rel:"noreferrer",children:"Website ↗"}),s.hf_url&&e.jsx("a",{href:s.hf_url,target:"_blank",rel:"noreferrer",children:"Hugging Face ↗"}),s.github_url&&e.jsx("a",{href:s.github_url,target:"_blank",rel:"noreferrer",children:"GitHub ↗"})]})]}),e.jsx(K,{organizationSlug:n,organizationName:(s==null?void 0:s.name)??n})]}),e.jsxs("div",{className:"sort-bar",style:{alignItems:"center",gap:16},children:[e.jsx("div",{style:{minWidth:260},children:e.jsx(z,{value:p??"__all__",onChange:S,placeholder:"All tasks",searchPlaceholder:"Search organization tasks...",emptyMessage:"No matching tasks.",ariaLabel:"Filter papers by task",selectedOption:l?{value:l.slug,label:l.label,description:`${l.paper_count.toLocaleString()} ${l.paper_count===1?"paper":"papers"}`}:{value:"__all__",label:"All tasks",description:`${((O=s==null?void 0:s.paper_count)==null?void 0:O.toLocaleString())??0} papers`},queryKey:["organization-task-options",n],queryFn:async a=>{var r;return[{value:"__all__",label:"All tasks",description:`${((r=s==null?void 0:s.paper_count)==null?void 0:r.toLocaleString())??0} papers`},...q(a)]},enabled:!c.isLoading,className:"h-[38px]"})}),e.jsxs("div",{className:"paper-feed-toolbar-controls",children:[e.jsx("div",{className:"sort-options",children:te.map(([a,r])=>e.jsx("button",{type:"button",className:`sort-btn ${g===a?"active":""}`,onClick:()=>{const t=new URLSearchParams(o);a==="trending"?t.delete("order_by"):t.set("order_by",a),h(t)},children:r},a))}),e.jsx(W,{hasCode:f,hasHfArtifacts:_,onHasCodeChange:a=>{const r=new URLSearchParams(o);a?r.set("has_code","true"):r.delete("has_code"),h(r)},onHasHfArtifactsChange:a=>{const r=new URLSearchParams(o);a?r.set("has_hf_artifacts","true"):r.delete("has_hf_artifacts"),h(r)}})]}),e.jsx(J,{startDate:m.startDate,endDate:m.endDate,onChange:a=>h(V(o,a))}),e.jsxs("div",{className:"results-count",children:[H.toLocaleString()," papers"]})]}),i.isLoading?e.jsx("div",{className:"paper-list",children:Array.from({length:4}).map((a,r)=>e.jsx($,{className:"h-40 w-full"},r))}):N.length===0?e.jsx("div",{className:"no-results",children:(s==null?void 0:s.paper_count)===0?"No papers indexed yet":"No papers found for this selection."}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"paper-list",children:N.map((a,r)=>e.jsx(U,{paper:a,rank:r+1,showInstitution:!1},a.id))}),e.jsx("div",{ref:M,style:{height:1}}),i.isFetchingNextPage&&e.jsx("div",{style:{padding:"20px 0",textAlign:"center"},children:"Loading more…"})]})]})};export{ye as O}; +import{b as E,d as B,r as d,j as e,L as A}from"./index-hxawG6mk.js";import{R as Q}from"./ResearchFollowButton-uts1MEpQ.js";import{u as C}from"./useQuery-B7vCF2Os.js";import{P as U}from"./components-Djdw_Z-e.js";import{M as G}from"./MarkdownText-C2hX4LYt.js";import{O as K}from"./OrganizationContributionGraph-C-95DVgW.js";import{P as W}from"./PaperFeedFilters-BsWw60hu.js";import{a as Z,P as J,b as V}from"./PaperDateFilter-CmJ1wf5w.js";import{A as X,a as Y}from"./alert-2LCyXuCE.js";import{S as z}from"./searchable-select-cLm40hhL.js";import{S as $}from"./skeleton-CRfsRMNe.js";import{u as ee}from"./useIntersectionObserver-rTEWxOEQ.js";import{e as se}from"./usePapers-K74IxnFM.js";import{c as R}from"./catalog-ePebz7GX.js";import{d as D,t as ae}from"./transform-DfrN0kQW.js";import re from"./NotFound-B1i1qS3r.js";const te=[["trending","trending"],["date_published","newest"],["citation_count","most cited"]],ne=n=>n==="date_published"||n==="citation_count"?n:"trending",ye=({organizationSlug:n,taskSlug:p})=>{var y,P,v,F,L,k,w,O;const T=E(),[o,h]=B(),[I,u]=d.useState(!1),g=ne(o.get("order_by")),f=o.get("has_code")==="true",_=o.get("has_hf_artifacts")==="true",m=Z(o),x=C({queryKey:["organization",n],queryFn:()=>R.getOrganization(n),staleTime:10*60*1e3}),c=C({queryKey:["organization-areas-with-tasks",n],queryFn:()=>R.organizationAreasWithTasks(n),staleTime:10*60*1e3}),i=se({organizationSlug:n,taskSlug:p,page_size:12,order_by:g,order_dir:"desc",include_resources:!0,has_code:f,has_hf_artifacts:_,start_date:m.startDate,end_date:m.endDate,enabled:!!n}),{targetRef:M,isIntersecting:j}=ee({rootMargin:"200px"});d.useEffect(()=>{j&&i.hasNextPage&&!i.isFetchingNextPage&&i.fetchNextPage()},[j,i.hasNextPage,i.isFetchingNextPage]),d.useEffect(()=>{u(!1)},[n,p]);const b=d.useMemo(()=>{var a;return(((a=c.data)==null?void 0:a.results)??[]).flatMap(r=>r.tasks.filter(t=>!!t.slug).map(t=>({...t,slug:t.slug,label:D(t.name,t.slug)})))},[c.data]),l=b.find(a=>a.slug===p),N=d.useMemo(()=>{var a;return(((a=i.data)==null?void 0:a.pages)??[]).flatMap(r=>r.results.map(ae))},[i.data]),s=x.data??((y=c.data)==null?void 0:y.organization),H=((v=(P=i.data)==null?void 0:P.pages[0])==null?void 0:v.count)??0;if(((F=x.error)==null?void 0:F.status)===404||((L=c.error)==null?void 0:L.status)===404||((k=i.error)==null?void 0:k.status)===404)return e.jsx(re,{});if(c.error||i.error)return e.jsx("div",{className:"page",children:e.jsx(X,{variant:"destructive",children:e.jsx(Y,{children:"Failed to load organization papers. Please try again."})})});const q=a=>{const r=a.trim().toLocaleLowerCase();return b.filter(t=>`${t.label} ${t.slug}`.toLocaleLowerCase().includes(r)).map(t=>({value:t.slug,label:t.label,description:`${t.paper_count.toLocaleString()} ${t.paper_count===1?"paper":"papers"}`}))},S=a=>{const r=a==="__all__"?`/orgs/${n}`:`/orgs/${n}/${a}`,t=o.toString();T({pathname:r,search:t?`?${t}`:""})};return e.jsxs("div",{className:"page",children:[e.jsxs("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:[e.jsx(A,{to:"/",children:"Home"}),e.jsx("span",{children:" / "}),e.jsx(A,{to:"/organizations",children:"Organizations"}),e.jsx("span",{children:" / "}),e.jsx("span",{children:(s==null?void 0:s.name)??n}),l&&e.jsxs(e.Fragment,{children:[e.jsx("span",{children:" / "}),e.jsx("span",{children:D(l.name,l.slug)})]})]}),e.jsxs("header",{className:"organization-hero",children:[e.jsxs("div",{className:"organization-hero-profile",children:[e.jsx("div",{className:"organizations-eyebrow",children:"ORGANIZATION"}),e.jsxs("h1",{className:"feed-title organization-hero-title",children:[s!=null&&s.logo_url&&!I?e.jsx("img",{src:s.logo_url,alt:"",width:58,height:58,onError:()=>u(!0)}):s?e.jsx("span",{className:"organization-logo organization-logo--fallback","aria-hidden":"true",children:s.name.slice(0,1).toUpperCase()}):null,(s==null?void 0:s.name)??e.jsx($,{className:"h-12 w-64"})]}),s&&e.jsx(Q,{kind:"organization",entityId:s.id}),s&&e.jsxs("div",{className:"feed-subtitle",children:[((w=s.paper_count)==null?void 0:w.toLocaleString())??0," papers",(s.organization_trending_score??0)>0&&s.trending_rank&&e.jsxs(e.Fragment,{children:[" · #",s.trending_rank," trending this month"]})]}),(s==null?void 0:s.description)&&e.jsx(G,{className:"method-description",text:s.description}),s&&e.jsxs("div",{className:"organization-hero-links",children:[s.website_url&&e.jsx("a",{href:s.website_url,target:"_blank",rel:"noreferrer",children:"Website ↗"}),s.hf_url&&e.jsx("a",{href:s.hf_url,target:"_blank",rel:"noreferrer",children:"Hugging Face ↗"}),s.github_url&&e.jsx("a",{href:s.github_url,target:"_blank",rel:"noreferrer",children:"GitHub ↗"})]})]}),e.jsx(K,{organizationSlug:n,organizationName:(s==null?void 0:s.name)??n})]}),e.jsxs("div",{className:"sort-bar",style:{alignItems:"center",gap:16},children:[e.jsx("div",{style:{minWidth:260},children:e.jsx(z,{value:p??"__all__",onChange:S,placeholder:"All tasks",searchPlaceholder:"Search organization tasks...",emptyMessage:"No matching tasks.",ariaLabel:"Filter papers by task",selectedOption:l?{value:l.slug,label:l.label,description:`${l.paper_count.toLocaleString()} ${l.paper_count===1?"paper":"papers"}`}:{value:"__all__",label:"All tasks",description:`${((O=s==null?void 0:s.paper_count)==null?void 0:O.toLocaleString())??0} papers`},queryKey:["organization-task-options",n],queryFn:async a=>{var r;return[{value:"__all__",label:"All tasks",description:`${((r=s==null?void 0:s.paper_count)==null?void 0:r.toLocaleString())??0} papers`},...q(a)]},enabled:!c.isLoading,className:"h-[38px]"})}),e.jsxs("div",{className:"paper-feed-toolbar-controls",children:[e.jsx("div",{className:"sort-options",children:te.map(([a,r])=>e.jsx("button",{type:"button",className:`sort-btn ${g===a?"active":""}`,onClick:()=>{const t=new URLSearchParams(o);a==="trending"?t.delete("order_by"):t.set("order_by",a),h(t)},children:r},a))}),e.jsx(W,{hasCode:f,hasHfArtifacts:_,onHasCodeChange:a=>{const r=new URLSearchParams(o);a?r.set("has_code","true"):r.delete("has_code"),h(r)},onHasHfArtifactsChange:a=>{const r=new URLSearchParams(o);a?r.set("has_hf_artifacts","true"):r.delete("has_hf_artifacts"),h(r)}})]}),e.jsx(J,{startDate:m.startDate,endDate:m.endDate,onChange:a=>h(V(o,a))}),e.jsxs("div",{className:"results-count",children:[H.toLocaleString()," papers"]})]}),i.isLoading?e.jsx("div",{className:"paper-list",children:Array.from({length:4}).map((a,r)=>e.jsx($,{className:"h-40 w-full"},r))}):N.length===0?e.jsx("div",{className:"no-results",children:(s==null?void 0:s.paper_count)===0?"No papers indexed yet":"No papers found for this selection."}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"paper-list",children:N.map((a,r)=>e.jsx(U,{paper:a,rank:r+1,showInstitution:!1},a.id))}),e.jsx("div",{ref:M,style:{height:1}}),i.isFetchingNextPage&&e.jsx("div",{style:{padding:"20px 0",textAlign:"center"},children:"Loading more…"})]})]})};export{ye as O}; diff --git a/assets/OrganizationTaskView-CjhWSvD0.js b/assets/OrganizationTaskView-CjhWSvD0.js deleted file mode 100644 index 48dcc58d44e7b1ac090d2269050dc8bc0b26946c..0000000000000000000000000000000000000000 --- a/assets/OrganizationTaskView-CjhWSvD0.js +++ /dev/null @@ -1 +0,0 @@ -import{u as i,j as t}from"./index-CnBotBa4.js";import{O as m}from"./OrganizationPaperFeed-D52-PjRU.js";import p from"./NotFound-B8QVsf71.js";import"./ResearchFollowButton-CIKuncTY.js";import"./useQuery-C8pfCInN.js";import"./useMutation-YEvFXzv3.js";import"./research-DhkAyrPi.js";import"./plus-DTSO60Ls.js";import"./components-CSFfzsKt.js";import"./paperQueryKeys-BP2E-0yf.js";import"./LatexTitle-B1D_EqzJ.js";import"./transform-DMbrhcTx.js";import"./papers-DkTdvzl4.js";import"./safeExternalHref-CkBrsh84.js";import"./MarkdownText-BAS9zVyW.js";/* empty css */import"./PaperPreviewLink-ChJBLunV.js";import"./index-DxRopg3G.js";import"./index-DLNxIk77.js";import"./katex-DkKDou_j.js";import"./hover-card-CkboGKdu.js";import"./OrganizationContributionGraph-DMjwvdOh.js";import"./skeleton-DuOQBmSr.js";import"./catalog-mND3MerS.js";import"./PaperFeedFilters-DBRREw9D.js";import"./PaperDateFilter-DMplC82d.js";import"./popover-BvojInsz.js";import"./alert-B0qZtPeK.js";import"./searchable-select-Dky9Eonk.js";import"./button-DNii_czO.js";import"./dialog-mXYRHqz9.js";import"./loader-circle-zwM3ton0.js";import"./useIntersectionObserver-WHgviHIR.js";import"./usePapers-fw4Ivp2T.js";import"./useInfiniteQuery-DUlXElgD.js";const I=()=>{const{orgSlug:o,taskSlug:r}=i();return o&&r?t.jsx(m,{organizationSlug:o,taskSlug:r}):t.jsx(p,{})};export{I as default}; diff --git a/assets/OrganizationTaskView-Dwg_gI-Q.js b/assets/OrganizationTaskView-Dwg_gI-Q.js new file mode 100644 index 0000000000000000000000000000000000000000..adad940fd3e87127c4e673c6adcbe18504208e95 --- /dev/null +++ b/assets/OrganizationTaskView-Dwg_gI-Q.js @@ -0,0 +1 @@ +import{u as i,j as t}from"./index-hxawG6mk.js";import{O as m}from"./OrganizationPaperFeed-CfEifyNO.js";import p from"./NotFound-B1i1qS3r.js";import"./ResearchFollowButton-uts1MEpQ.js";import"./useQuery-B7vCF2Os.js";import"./useMutation-gPqxjZGO.js";import"./research-25A5rLuK.js";import"./plus-C1naIkSJ.js";import"./components-Djdw_Z-e.js";import"./paperQueryKeys-BP2E-0yf.js";import"./LatexTitle-QTkECjbh.js";import"./transform-DfrN0kQW.js";import"./papers-B0ysePyJ.js";import"./safeExternalHref-CkBrsh84.js";import"./MarkdownText-C2hX4LYt.js";/* empty css */import"./PaperPreviewLink-BJhSzNVs.js";import"./index-CaRYlo5c.js";import"./index-Ddr0k9KU.js";import"./katex-DkKDou_j.js";import"./hover-card-DEHIu6q-.js";import"./OrganizationContributionGraph-C-95DVgW.js";import"./skeleton-CRfsRMNe.js";import"./catalog-ePebz7GX.js";import"./PaperFeedFilters-BsWw60hu.js";import"./PaperDateFilter-CmJ1wf5w.js";import"./popover-BEdoEHfx.js";import"./alert-2LCyXuCE.js";import"./searchable-select-cLm40hhL.js";import"./button-DR59q2Iu.js";import"./dialog-D2TDqr0v.js";import"./loader-circle-CXb3415J.js";import"./useIntersectionObserver-rTEWxOEQ.js";import"./usePapers-K74IxnFM.js";import"./useInfiniteQuery-BIEmOe8z.js";const I=()=>{const{orgSlug:o,taskSlug:r}=i();return o&&r?t.jsx(m,{organizationSlug:o,taskSlug:r}):t.jsx(p,{})};export{I as default}; diff --git a/assets/OrganizationsIndexView-CBIhplks.js b/assets/OrganizationsIndexView-DcJVnqrq.js similarity index 94% rename from assets/OrganizationsIndexView-CBIhplks.js rename to assets/OrganizationsIndexView-DcJVnqrq.js index 2214e1f72f17496a27f99ad2ca4777f5233e25d1..c97915cfb86256b0437112a84848e968a443c38e 100644 --- a/assets/OrganizationsIndexView-CBIhplks.js +++ b/assets/OrganizationsIndexView-DcJVnqrq.js @@ -1 +1 @@ -import{d as u,r as g,j as e,L as x}from"./index-CnBotBa4.js";import{u as j}from"./useQuery-C8pfCInN.js";import{A as y,a as f}from"./alert-B0qZtPeK.js";import{S as _}from"./skeleton-DuOQBmSr.js";import{c as N}from"./catalog-mND3MerS.js";const v=n=>n==="papers"||n==="name"?n:"trending",S=({organization:n})=>{const[d,t]=g.useState(!1);return!n.logo_url||d?e.jsx("span",{className:"organization-logo organization-logo--fallback","aria-hidden":"true",children:n.name.slice(0,1).toUpperCase()}):e.jsx("span",{className:"organization-logo",children:e.jsx("img",{src:n.logo_url,alt:"",width:48,height:48,onError:()=>t(!0)})})},A=()=>{var h;const[n,d]=u(),t=v(n.get("sort")),c=n.get("q")??"",o=j({queryKey:["organizations","featured"],queryFn:()=>N.organizationIndex(),staleTime:10*60*1e3}),p=s=>{const a=new URLSearchParams(n),i=s.sort??t,r=s.query??c;i==="trending"?a.delete("sort"):a.set("sort",i),r.trim()?a.set("q",r):a.delete("q"),d(a)},m=g.useMemo(()=>{var i;const s=c.trim().toLocaleLowerCase(),a=(((i=o.data)==null?void 0:i.results)??[]).filter(r=>[r.name,r.slug,r.hf_slug??""].join(" ").toLocaleLowerCase().includes(s));return t==="papers"?[...a].sort((r,l)=>(l.paper_count??0)-(r.paper_count??0)||r.name.localeCompare(l.name)||r.slug.localeCompare(l.slug)):t==="name"?[...a].sort((r,l)=>r.name.localeCompare(l.name)||r.slug.localeCompare(l.slug)):a},[o.data,c,t]);return e.jsxs("div",{className:"page organizations-page",children:[e.jsx("div",{className:"feed-header",children:e.jsxs("div",{children:[e.jsxs("h1",{className:"feed-title",children:["AI ",e.jsx("em",{children:"Organizations"})]}),e.jsx("div",{className:"feed-subtitle",children:"Explore papers from leading AI organizations, ranked by sustained community momentum over the past 30 days."})]})}),e.jsxs("section",{"aria-labelledby":"organizations-heading",children:[e.jsxs("div",{className:"organizations-section-heading",children:[e.jsxs("h2",{id:"organizations-heading",children:[((h=o.data)==null?void 0:h.count)??21," organizations"]}),e.jsx("span",{children:t==="trending"?"Ranked by 30-day momentum":t==="papers"?"Sorted by linked papers":"Sorted A–Z"})]}),e.jsxs("div",{className:"organizations-controls",children:[e.jsxs("label",{children:[e.jsx("span",{className:"sr-only",children:"Search organizations"}),e.jsx("input",{type:"search",value:c,onChange:s=>p({query:s.target.value}),placeholder:"Search organizations"})]}),e.jsx("div",{className:"organizations-sort","aria-label":"Sort organizations",children:[["trending","Trending"],["papers","Most papers"],["name","A–Z"]].map(([s,a])=>e.jsx("button",{type:"button",className:t===s?"active":"","aria-pressed":t===s,onClick:()=>p({sort:s}),children:a},s))})]}),o.isLoading?e.jsx("div",{className:"organizations-grid","aria-busy":"true",children:Array.from({length:6}).map((s,a)=>e.jsx(_,{className:"organization-card-skeleton"},a))}):o.error?e.jsx(y,{variant:"destructive",children:e.jsxs(f,{children:["Failed to load organizations."," ",e.jsx("button",{type:"button",onClick:()=>o.refetch(),children:"Try again"})]})}):m.length===0?e.jsxs("div",{className:"organizations-empty",children:["No organizations match “",c,"”."]}):e.jsx("div",{className:"organizations-grid",children:m.map(s=>{var r;const a=s.paper_count??0,i=s.first_paper_year&&s.latest_paper_year?s.first_paper_year===s.latest_paper_year?String(s.first_paper_year):`${s.first_paper_year}–${s.latest_paper_year}`:null;return e.jsxs(x,{to:`/orgs/${s.slug}`,className:"organization-card","aria-label":a?`Browse ${a.toLocaleString()} ${s.name} papers`:`Browse ${s.name} papers`,children:[e.jsxs("div",{className:"organization-card-header",children:[e.jsx(S,{organization:s}),e.jsxs("div",{children:[e.jsx("h3",{children:s.name}),e.jsxs("span",{children:["@",s.hf_slug??s.slug]})]})]}),e.jsxs("div",{className:"organization-card-metrics",children:[e.jsx("strong",{children:a.toLocaleString()}),e.jsx("span",{children:a===1?"paper":"papers"}),t==="trending"&&s.trending_rank&&e.jsxs("span",{className:"organization-rank",children:["#",s.trending_rank]})]}),e.jsxs("div",{className:"organization-highlight",children:[e.jsx("span",{children:"Trending paper"}),e.jsx("strong",{children:((r=s.top_trending_paper)==null?void 0:r.title)??"No papers indexed yet"})]}),e.jsxs("div",{className:"organization-card-footer",children:[i?`Publishing ${i}`:"Research archive ready",e.jsx("span",{"aria-hidden":"true",children:"↗"})]})]},s.id)})})]})]})};export{A as default}; +import{d as u,r as g,j as e,L as x}from"./index-hxawG6mk.js";import{u as j}from"./useQuery-B7vCF2Os.js";import{A as y,a as f}from"./alert-2LCyXuCE.js";import{S as _}from"./skeleton-CRfsRMNe.js";import{c as N}from"./catalog-ePebz7GX.js";const v=n=>n==="papers"||n==="name"?n:"trending",S=({organization:n})=>{const[d,t]=g.useState(!1);return!n.logo_url||d?e.jsx("span",{className:"organization-logo organization-logo--fallback","aria-hidden":"true",children:n.name.slice(0,1).toUpperCase()}):e.jsx("span",{className:"organization-logo",children:e.jsx("img",{src:n.logo_url,alt:"",width:48,height:48,onError:()=>t(!0)})})},A=()=>{var h;const[n,d]=u(),t=v(n.get("sort")),c=n.get("q")??"",o=j({queryKey:["organizations","featured"],queryFn:()=>N.organizationIndex(),staleTime:10*60*1e3}),p=s=>{const a=new URLSearchParams(n),i=s.sort??t,r=s.query??c;i==="trending"?a.delete("sort"):a.set("sort",i),r.trim()?a.set("q",r):a.delete("q"),d(a)},m=g.useMemo(()=>{var i;const s=c.trim().toLocaleLowerCase(),a=(((i=o.data)==null?void 0:i.results)??[]).filter(r=>[r.name,r.slug,r.hf_slug??""].join(" ").toLocaleLowerCase().includes(s));return t==="papers"?[...a].sort((r,l)=>(l.paper_count??0)-(r.paper_count??0)||r.name.localeCompare(l.name)||r.slug.localeCompare(l.slug)):t==="name"?[...a].sort((r,l)=>r.name.localeCompare(l.name)||r.slug.localeCompare(l.slug)):a},[o.data,c,t]);return e.jsxs("div",{className:"page organizations-page",children:[e.jsx("div",{className:"feed-header",children:e.jsxs("div",{children:[e.jsxs("h1",{className:"feed-title",children:["AI ",e.jsx("em",{children:"Organizations"})]}),e.jsx("div",{className:"feed-subtitle",children:"Explore papers from leading AI organizations, ranked by sustained community momentum over the past 30 days."})]})}),e.jsxs("section",{"aria-labelledby":"organizations-heading",children:[e.jsxs("div",{className:"organizations-section-heading",children:[e.jsxs("h2",{id:"organizations-heading",children:[((h=o.data)==null?void 0:h.count)??21," organizations"]}),e.jsx("span",{children:t==="trending"?"Ranked by 30-day momentum":t==="papers"?"Sorted by linked papers":"Sorted A–Z"})]}),e.jsxs("div",{className:"organizations-controls",children:[e.jsxs("label",{children:[e.jsx("span",{className:"sr-only",children:"Search organizations"}),e.jsx("input",{type:"search",value:c,onChange:s=>p({query:s.target.value}),placeholder:"Search organizations"})]}),e.jsx("div",{className:"organizations-sort","aria-label":"Sort organizations",children:[["trending","Trending"],["papers","Most papers"],["name","A–Z"]].map(([s,a])=>e.jsx("button",{type:"button",className:t===s?"active":"","aria-pressed":t===s,onClick:()=>p({sort:s}),children:a},s))})]}),o.isLoading?e.jsx("div",{className:"organizations-grid","aria-busy":"true",children:Array.from({length:6}).map((s,a)=>e.jsx(_,{className:"organization-card-skeleton"},a))}):o.error?e.jsx(y,{variant:"destructive",children:e.jsxs(f,{children:["Failed to load organizations."," ",e.jsx("button",{type:"button",onClick:()=>o.refetch(),children:"Try again"})]})}):m.length===0?e.jsxs("div",{className:"organizations-empty",children:["No organizations match “",c,"”."]}):e.jsx("div",{className:"organizations-grid",children:m.map(s=>{var r;const a=s.paper_count??0,i=s.first_paper_year&&s.latest_paper_year?s.first_paper_year===s.latest_paper_year?String(s.first_paper_year):`${s.first_paper_year}–${s.latest_paper_year}`:null;return e.jsxs(x,{to:`/orgs/${s.slug}`,className:"organization-card","aria-label":a?`Browse ${a.toLocaleString()} ${s.name} papers`:`Browse ${s.name} papers`,children:[e.jsxs("div",{className:"organization-card-header",children:[e.jsx(S,{organization:s}),e.jsxs("div",{children:[e.jsx("h3",{children:s.name}),e.jsxs("span",{children:["@",s.hf_slug??s.slug]})]})]}),e.jsxs("div",{className:"organization-card-metrics",children:[e.jsx("strong",{children:a.toLocaleString()}),e.jsx("span",{children:a===1?"paper":"papers"}),t==="trending"&&s.trending_rank&&e.jsxs("span",{className:"organization-rank",children:["#",s.trending_rank]})]}),e.jsxs("div",{className:"organization-highlight",children:[e.jsx("span",{children:"Trending paper"}),e.jsx("strong",{children:((r=s.top_trending_paper)==null?void 0:r.title)??"No papers indexed yet"})]}),e.jsxs("div",{className:"organization-card-footer",children:[i?`Publishing ${i}`:"Research archive ready",e.jsx("span",{"aria-hidden":"true",children:"↗"})]})]},s.id)})})]})]})};export{A as default}; diff --git a/assets/PaperDateFilter-DMplC82d.js b/assets/PaperDateFilter-CmJ1wf5w.js similarity index 98% rename from assets/PaperDateFilter-DMplC82d.js rename to assets/PaperDateFilter-CmJ1wf5w.js index 0c253c195a66762164ce0c70a038853f83dc0549..dd0ff40843a38576ed642edae45683d76afbb516 100644 --- a/assets/PaperDateFilter-DMplC82d.js +++ b/assets/PaperDateFilter-CmJ1wf5w.js @@ -1 +1 @@ -import{r as p,j as n}from"./index-CnBotBa4.js";import{P as q,a as G,b as Q}from"./popover-BvojInsz.js";const E=(e,t)=>{const a=new Date(t),s=new Date(a);return s.setUTCDate(a.getUTCDate()-(e==="week"?6:29)),{startDate:s.toISOString().slice(0,10),endDate:a.toISOString().slice(0,10)}},z=e=>({startDate:e.get("start_date")||void 0,endDate:e.get("end_date")||void 0}),oe=(e,t=new Date,a="week")=>{const s=z(e);if(s.startDate||s.endDate||e.get("time")==="all_time")return s;const c=new Date(Date.UTC(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()));return E(a,c)},J=(e,t)=>{const a=new URLSearchParams(e);return t.startDate?a.set("start_date",t.startDate):a.delete("start_date"),t.endDate?a.set("end_date",t.endDate):a.delete("end_date"),a.delete("time"),a},ie=(e,t)=>{const a=J(e,t);return!t.startDate&&!t.endDate&&a.set("time","all_time"),a},K=new Intl.DateTimeFormat("en",{month:"long",year:"numeric",timeZone:"UTC"}),O=new Intl.DateTimeFormat("en",{month:"short",timeZone:"UTC"}),L="(max-width: 640px)",X=()=>{const[e,t]=p.useState(()=>typeof window<"u"&&window.matchMedia(L).matches);return p.useEffect(()=>{const a=window.matchMedia(L),s=c=>t(c.matches);return t(a.matches),a.addEventListener("change",s),()=>a.removeEventListener("change",s)},[]),e},V=e=>e.toISOString().slice(0,10),b=e=>new Date(`${e}T00:00:00Z`),ee=()=>{const e=new Date;return new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()))},R=(e,t)=>new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth()+t,1)),M=e=>new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),1)),te=(e,t)=>new Date(Date.UTC(t,e.getUTCMonth(),1)),w=(e,t)=>e.startDate===t.startDate&&e.endDate===t.endDate,ae=(e,t)=>{const a=b(e),s=b(t),c=O.format(a),l=O.format(s),g=a.getUTCDate(),d=s.getUTCDate(),o=a.getUTCFullYear(),u=s.getUTCFullYear();return e===t?`${c} ${g}, ${o}`:o===u&&a.getUTCMonth()===s.getUTCMonth()?`${c} ${g}–${d}, ${o}`:o===u?`${c} ${g}–${l} ${d}, ${o}`:`${c} ${g}, ${o}–${l} ${d}, ${u}`},ne=e=>{const t=e.getUTCFullYear(),a=e.getUTCMonth(),s=new Date(Date.UTC(t,a,1)),c=(s.getUTCDay()+6)%7,l=new Date(s);return l.setUTCDate(s.getUTCDate()-c),Array.from({length:42},(g,d)=>{const o=new Date(l);return o.setUTCDate(l.getUTCDate()+d),{iso:V(o),day:o.getUTCDate(),outsideMonth:o.getUTCMonth()!==a}})},A=({month:e,today:t,startDate:a,endDate:s,onSelect:c,yearLabel:l,yearValue:g,onYearChange:d,secondary:o=!1})=>{const u=p.useMemo(()=>ne(e),[e]);return n.jsxs("section",{className:`paper-date-calendar${o?" paper-date-calendar-secondary":""}`,children:[n.jsxs("label",{className:"paper-date-year",children:[n.jsx("span",{children:l}),n.jsx("input",{type:"number",inputMode:"numeric",min:"1900",max:t.slice(0,4),step:"1",value:g,onChange:r=>d(r.target.value)})]}),n.jsx("h3",{children:K.format(e)}),n.jsx("div",{className:"paper-date-weekdays","aria-hidden":"true",children:["Mon","Tue","Wed","Thu","Fri","Sat","Sun"].map(r=>n.jsx("span",{children:r},r))}),n.jsx("div",{className:"paper-date-days",children:u.map(r=>{const h=r.iso===a||r.iso===s,T=!!(a&&s&&r.iso>a&&r.isot;return n.jsx("button",{type:"button","aria-label":r.iso,"aria-selected":h,disabled:m,className:["paper-date-day",r.outsideMonth?"outside":"",h?"selected":"",T?"in-range":"",r.iso===t?"today":""].filter(Boolean).join(" "),onClick:()=>c(r.iso),children:r.day},r.iso)})})]})},I=({calendar:e,onPrevious:t,onNext:a,secondary:s=!1})=>n.jsxs("div",{className:`paper-date-navigation-group${s?" paper-date-navigation-group-secondary":""}`,children:[n.jsx("button",{type:"button","aria-label":`Previous ${e} month`,onClick:t,children:"←"}),n.jsx("button",{type:"button","aria-label":`Next ${e} month`,onClick:a,children:"→"})]}),ce=({startDate:e,endDate:t,onChange:a,currentDate:s})=>{const c=X(),l=s?b(s):ee(),[g,d]=p.useState(!1),[o,u]=p.useState(),[r,h]=p.useState(),[T,m]=p.useState(()=>M(l)),[$,D]=p.useState(()=>R(M(l),1)),[H,y]=p.useState(()=>String(l.getUTCFullYear())),[B,U]=p.useState(()=>String(l.getUTCFullYear())),f={startDate:e,endDate:t},N=E("week",l),Y=E("month",l),P=V(l),v=!!(e&&t&&!w(f,N)&&!w(f,Y)),Z=()=>{u(e),h(t);const i=M(e?b(e):l),C=M(t?b(t):R(i,1));m(i),D(C),y(String(i.getUTCFullYear())),U(String(C.getUTCFullYear())),d(!0)},k=(i,C,F)=>{if(C(i),!/^\d{4}$/.test(i))return;const x=Number(i);x>=1900&&x<=l.getUTCFullYear()&&F(j=>te(j,x))},S=(i,C,F,x)=>{const j=R(i,C);F(j),x(String(j.getUTCFullYear()))},_=i=>{!o||r?(u(i),h(void 0)):i{a({}),d(!1)};return n.jsxs("div",{className:`paper-date-filter${c?" paper-date-filter-single-calendar":""}`,role:"group","aria-label":"Publication date",children:[n.jsx("button",{type:"button",className:`sort-btn sort-btn-time${w(f,N)?" active":""}`,onClick:()=>a(N),children:"Last Week"}),n.jsx("button",{type:"button",className:`sort-btn sort-btn-time${w(f,Y)?" active":""}`,onClick:()=>a(Y),children:"Last Month"}),n.jsx("button",{type:"button",className:`sort-btn sort-btn-time${!e&&!t?" active":""}`,onClick:()=>a({}),children:"All Time"}),n.jsxs(q,{open:g,onOpenChange:i=>{i?Z():d(!1)},children:[n.jsx(G,{asChild:!0,children:n.jsx("button",{type:"button",className:`sort-btn sort-btn-time${v?" active":""}`,"aria-label":v?"Change date range":"Select a range",children:v&&e&&t?ae(e,t):"Select a range"})}),n.jsxs(Q,{align:"end",className:`paper-date-popover${c?" paper-date-popover-single-calendar":""}`,role:"dialog","aria-label":"Select a date range",children:[n.jsxs("div",{className:"paper-date-popover-header",children:[n.jsx("h2",{children:"Select a date range"}),n.jsx("p",{children:"Choose an inclusive start and end publication date."})]}),n.jsxs("div",{className:"paper-date-navigation",children:[n.jsx(I,{calendar:"start",onPrevious:()=>S(T,-1,m,y),onNext:()=>S(T,1,m,y)}),!c&&n.jsx(I,{calendar:"end",onPrevious:()=>S($,-1,D,U),onNext:()=>S($,1,D,U),secondary:!0})]}),n.jsxs("div",{className:"paper-date-calendars",children:[n.jsx(A,{month:T,today:P,startDate:o,endDate:r,onSelect:_,yearLabel:c?"Year":"Start year",yearValue:H,onYearChange:i=>k(i,y,m)}),!c&&n.jsx(A,{month:$,today:P,startDate:o,endDate:r,onSelect:_,yearLabel:"End year",yearValue:B,onYearChange:i=>k(i,U,D),secondary:!0})]}),n.jsxs("div",{className:"paper-date-actions",children:[n.jsx("button",{type:"button",className:"paper-date-clear",onClick:W,children:"Clear range"}),n.jsxs("div",{children:[n.jsx("button",{type:"button",onClick:()=>d(!1),children:"Cancel"}),n.jsx("button",{type:"button",className:"paper-date-apply",disabled:!o||!r,onClick:()=>{o&&r&&a({startDate:o,endDate:r}),d(!1)},children:"Apply"})]})]})]})]})]})};export{ce as P,z as a,J as b,oe as r,ie as w}; +import{r as p,j as n}from"./index-hxawG6mk.js";import{P as q,a as G,b as Q}from"./popover-BEdoEHfx.js";const E=(e,t)=>{const a=new Date(t),s=new Date(a);return s.setUTCDate(a.getUTCDate()-(e==="week"?6:29)),{startDate:s.toISOString().slice(0,10),endDate:a.toISOString().slice(0,10)}},z=e=>({startDate:e.get("start_date")||void 0,endDate:e.get("end_date")||void 0}),oe=(e,t=new Date,a="week")=>{const s=z(e);if(s.startDate||s.endDate||e.get("time")==="all_time")return s;const c=new Date(Date.UTC(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()));return E(a,c)},J=(e,t)=>{const a=new URLSearchParams(e);return t.startDate?a.set("start_date",t.startDate):a.delete("start_date"),t.endDate?a.set("end_date",t.endDate):a.delete("end_date"),a.delete("time"),a},ie=(e,t)=>{const a=J(e,t);return!t.startDate&&!t.endDate&&a.set("time","all_time"),a},K=new Intl.DateTimeFormat("en",{month:"long",year:"numeric",timeZone:"UTC"}),O=new Intl.DateTimeFormat("en",{month:"short",timeZone:"UTC"}),L="(max-width: 640px)",X=()=>{const[e,t]=p.useState(()=>typeof window<"u"&&window.matchMedia(L).matches);return p.useEffect(()=>{const a=window.matchMedia(L),s=c=>t(c.matches);return t(a.matches),a.addEventListener("change",s),()=>a.removeEventListener("change",s)},[]),e},V=e=>e.toISOString().slice(0,10),b=e=>new Date(`${e}T00:00:00Z`),ee=()=>{const e=new Date;return new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()))},R=(e,t)=>new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth()+t,1)),M=e=>new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),1)),te=(e,t)=>new Date(Date.UTC(t,e.getUTCMonth(),1)),w=(e,t)=>e.startDate===t.startDate&&e.endDate===t.endDate,ae=(e,t)=>{const a=b(e),s=b(t),c=O.format(a),l=O.format(s),g=a.getUTCDate(),d=s.getUTCDate(),o=a.getUTCFullYear(),u=s.getUTCFullYear();return e===t?`${c} ${g}, ${o}`:o===u&&a.getUTCMonth()===s.getUTCMonth()?`${c} ${g}–${d}, ${o}`:o===u?`${c} ${g}–${l} ${d}, ${o}`:`${c} ${g}, ${o}–${l} ${d}, ${u}`},ne=e=>{const t=e.getUTCFullYear(),a=e.getUTCMonth(),s=new Date(Date.UTC(t,a,1)),c=(s.getUTCDay()+6)%7,l=new Date(s);return l.setUTCDate(s.getUTCDate()-c),Array.from({length:42},(g,d)=>{const o=new Date(l);return o.setUTCDate(l.getUTCDate()+d),{iso:V(o),day:o.getUTCDate(),outsideMonth:o.getUTCMonth()!==a}})},A=({month:e,today:t,startDate:a,endDate:s,onSelect:c,yearLabel:l,yearValue:g,onYearChange:d,secondary:o=!1})=>{const u=p.useMemo(()=>ne(e),[e]);return n.jsxs("section",{className:`paper-date-calendar${o?" paper-date-calendar-secondary":""}`,children:[n.jsxs("label",{className:"paper-date-year",children:[n.jsx("span",{children:l}),n.jsx("input",{type:"number",inputMode:"numeric",min:"1900",max:t.slice(0,4),step:"1",value:g,onChange:r=>d(r.target.value)})]}),n.jsx("h3",{children:K.format(e)}),n.jsx("div",{className:"paper-date-weekdays","aria-hidden":"true",children:["Mon","Tue","Wed","Thu","Fri","Sat","Sun"].map(r=>n.jsx("span",{children:r},r))}),n.jsx("div",{className:"paper-date-days",children:u.map(r=>{const h=r.iso===a||r.iso===s,T=!!(a&&s&&r.iso>a&&r.isot;return n.jsx("button",{type:"button","aria-label":r.iso,"aria-selected":h,disabled:m,className:["paper-date-day",r.outsideMonth?"outside":"",h?"selected":"",T?"in-range":"",r.iso===t?"today":""].filter(Boolean).join(" "),onClick:()=>c(r.iso),children:r.day},r.iso)})})]})},I=({calendar:e,onPrevious:t,onNext:a,secondary:s=!1})=>n.jsxs("div",{className:`paper-date-navigation-group${s?" paper-date-navigation-group-secondary":""}`,children:[n.jsx("button",{type:"button","aria-label":`Previous ${e} month`,onClick:t,children:"←"}),n.jsx("button",{type:"button","aria-label":`Next ${e} month`,onClick:a,children:"→"})]}),ce=({startDate:e,endDate:t,onChange:a,currentDate:s})=>{const c=X(),l=s?b(s):ee(),[g,d]=p.useState(!1),[o,u]=p.useState(),[r,h]=p.useState(),[T,m]=p.useState(()=>M(l)),[$,D]=p.useState(()=>R(M(l),1)),[H,y]=p.useState(()=>String(l.getUTCFullYear())),[B,U]=p.useState(()=>String(l.getUTCFullYear())),f={startDate:e,endDate:t},N=E("week",l),Y=E("month",l),P=V(l),v=!!(e&&t&&!w(f,N)&&!w(f,Y)),Z=()=>{u(e),h(t);const i=M(e?b(e):l),C=M(t?b(t):R(i,1));m(i),D(C),y(String(i.getUTCFullYear())),U(String(C.getUTCFullYear())),d(!0)},k=(i,C,F)=>{if(C(i),!/^\d{4}$/.test(i))return;const x=Number(i);x>=1900&&x<=l.getUTCFullYear()&&F(j=>te(j,x))},S=(i,C,F,x)=>{const j=R(i,C);F(j),x(String(j.getUTCFullYear()))},_=i=>{!o||r?(u(i),h(void 0)):i{a({}),d(!1)};return n.jsxs("div",{className:`paper-date-filter${c?" paper-date-filter-single-calendar":""}`,role:"group","aria-label":"Publication date",children:[n.jsx("button",{type:"button",className:`sort-btn sort-btn-time${w(f,N)?" active":""}`,onClick:()=>a(N),children:"Last Week"}),n.jsx("button",{type:"button",className:`sort-btn sort-btn-time${w(f,Y)?" active":""}`,onClick:()=>a(Y),children:"Last Month"}),n.jsx("button",{type:"button",className:`sort-btn sort-btn-time${!e&&!t?" active":""}`,onClick:()=>a({}),children:"All Time"}),n.jsxs(q,{open:g,onOpenChange:i=>{i?Z():d(!1)},children:[n.jsx(G,{asChild:!0,children:n.jsx("button",{type:"button",className:`sort-btn sort-btn-time${v?" active":""}`,"aria-label":v?"Change date range":"Select a range",children:v&&e&&t?ae(e,t):"Select a range"})}),n.jsxs(Q,{align:"end",className:`paper-date-popover${c?" paper-date-popover-single-calendar":""}`,role:"dialog","aria-label":"Select a date range",children:[n.jsxs("div",{className:"paper-date-popover-header",children:[n.jsx("h2",{children:"Select a date range"}),n.jsx("p",{children:"Choose an inclusive start and end publication date."})]}),n.jsxs("div",{className:"paper-date-navigation",children:[n.jsx(I,{calendar:"start",onPrevious:()=>S(T,-1,m,y),onNext:()=>S(T,1,m,y)}),!c&&n.jsx(I,{calendar:"end",onPrevious:()=>S($,-1,D,U),onNext:()=>S($,1,D,U),secondary:!0})]}),n.jsxs("div",{className:"paper-date-calendars",children:[n.jsx(A,{month:T,today:P,startDate:o,endDate:r,onSelect:_,yearLabel:c?"Year":"Start year",yearValue:H,onYearChange:i=>k(i,y,m)}),!c&&n.jsx(A,{month:$,today:P,startDate:o,endDate:r,onSelect:_,yearLabel:"End year",yearValue:B,onYearChange:i=>k(i,U,D),secondary:!0})]}),n.jsxs("div",{className:"paper-date-actions",children:[n.jsx("button",{type:"button",className:"paper-date-clear",onClick:W,children:"Clear range"}),n.jsxs("div",{children:[n.jsx("button",{type:"button",onClick:()=>d(!1),children:"Cancel"}),n.jsx("button",{type:"button",className:"paper-date-apply",disabled:!o||!r,onClick:()=>{o&&r&&a({startDate:o,endDate:r}),d(!1)},children:"Apply"})]})]})]})]})]})};export{ce as P,z as a,J as b,oe as r,ie as w}; diff --git a/assets/PaperDetailView-CQHPB8st.js b/assets/PaperDetailView-CQHPB8st.js deleted file mode 100644 index 11f5e317a1379323d57c9298d7e78caa20695186..0000000000000000000000000000000000000000 --- a/assets/PaperDetailView-CQHPB8st.js +++ /dev/null @@ -1,39 +0,0 @@ -import{g as Re,n as Fs,b as Xt,h as ie,k as As,r as u,j as e,l as me,m as he,o as ge,P as Qt,p as ke,q as Wt,s as Fe,t as Ie,v as Zt,w as vt,x as ze,X as wt,L as fe,y as Ts,z as Us,R as Ds,I as Bs,B as Yt,D as Hs,E as zs,T as Ms,A as ht,a as Oe,F as Me,G as pt,J as Jt,K as Os,u as qs,M as Ks,f as Gs,N as Vs,O as Xs,Q as Qs,S as Ws,U as Zs}from"./index-CnBotBa4.js";import{I as Z,T as Ys,M as Js,S as ea,a as ta}from"./components-CSFfzsKt.js";import{L as He,a as sa}from"./LatexTitle-B1D_EqzJ.js";import{e as qe,C as aa,E as ra}from"./ExternalSourceEvalBadge-B3diD7Bx.js";import{p as W}from"./papers-DkTdvzl4.js";import{s as de}from"./safeExternalHref-CkBrsh84.js";import{p as ye}from"./paperQueryKeys-BP2E-0yf.js";import{u as ue}from"./useQuery-C8pfCInN.js";import{b as na}from"./usePapers-fw4Ivp2T.js";import{f as ia,D as oa}from"./latexPlainText-DI8YEXVe.js";import{s as la}from"./transform-DMbrhcTx.js";import{S as $e}from"./skeleton-DuOQBmSr.js";import{A as ca,a as da}from"./alert-B0qZtPeK.js";import{B as F}from"./button-DNii_czO.js";import{D as ee,a as te,b as se,c as ae,d as re,e as oe}from"./dialog-mXYRHqz9.js";import{u as ua}from"./useInfiniteQuery-DUlXElgD.js";import{p as ma}from"./paperEdits-C4mFP78Y.js";import{C as ha}from"./copy-0hFmISJO.js";import{I as Q}from"./input-fzMY4SDb.js";import{S as Ft,a as Le}from"./searchable-select-Dky9Eonk.js";import{u as le}from"./useMutation-YEvFXzv3.js";import{c as _e}from"./catalog-mND3MerS.js";import{s as pe,p as pa}from"./submissions-BXysTHzU.js";import{e as fa,r as ga,a as ve}from"./evaluationQueryInvalidation-CC5JhGiX.js";import{S as yt,L as ce,a as xa}from"./SignInToEditDialog-Nxaw2Fu9.js";import{L as ne}from"./loader-circle-zwM3ton0.js";import{T as Ae,n as Ye,g as At}from"./github-D6RT7m6V.js";import{D as ba,c as ja,g as va,s as wa,a as ya,b as _a,d as ka,i as Na,e as Ca}from"./codexAddEvals-vDBuZ5Km.js";import{P as Te}from"./plus-DTSO60Ls.js";import{u as es}from"./index-C2-TgiAT.js";import{B as ts}from"./badge-CW-eQ3eC.js";import{G as Tt}from"./github-DFkgF81-.js";import{M as Ea}from"./index-DxRopg3G.js";import{r as Sa}from"./index-DLNxIk77.js";import{u as Pa}from"./useIntersectionObserver-WHgviHIR.js";import{S as Ut,s as $a}from"./savedPapersAuth-C_nw2twk.js";import"./hover-card-CkboGKdu.js";import"./popover-BvojInsz.js";import"./textarea-D8TA8f9X.js";/** - * @license lucide-react v0.462.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Ia=Re("ArrowDown",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);/** - * @license lucide-react v0.462.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const La=Re("ArrowUp",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);/** - * @license lucide-react v0.462.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Dt=Re("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"}]]);/** - * @license lucide-react v0.462.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Ra=Re("History",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]]);/** - * @license lucide-react v0.462.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const ss=Re("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"}]]);function Fa(t){return t!=null&&t.can_directly_edit_catalog?"direct":"pending"}function Aa(t){return(t??[]).filter(s=>!!(s.dataset_slug&&s.task_slug))}function Ta(t,s,a="https://paperswithcode.co"){return s.map(r=>{const n=encodeURIComponent(r.evaluation_id),d=`${a}/api/v1/papers/${encodeURIComponent(t)}/leaderboard-badge.svg?eval=${n}&live=1`,l=`${a}/api/v1/papers/${encodeURIComponent(t)}/leaderboard-badge-link?eval=${n}`;return`[![${`Papers with Code: ${r.best_rank===1?"SOTA":`#${r.best_rank}`} on ${r.dataset_name}`}](${d})](${l})`}).join(` -`)}function Ua(t){const s=de(t);if(!s)return!1;const a=new URL(s);return`${a.pathname}?${a.search}`.toLowerCase().includes(".pdf")||a.pathname.toLowerCase().includes("/pdf")}function Da(t,s){if(t.source==="external")return(Ua(t.source_url)||!!de(t.conference_url_pdf))&&t.id?`/pdf/${t.id}`:null;const a=(t.arxiv_id||s).replace(/v\d+$/i,"");return de(t.url_pdf)&&a?`/pdf/${a}`:null}function Ba(t,s=!0){return ue({queryKey:["evaluations","paper",t],queryFn:()=>{if(!t)throw new Error("Paper ID is required");return qe.byPaper(t)},enabled:s&&!!t,staleTime:0,refetchOnMount:"always"})}const as=t=>t.replace(/v\d+$/,""),Ha={models:"https://huggingface.co/",datasets:"https://huggingface.co/datasets/",spaces:"https://huggingface.co/spaces/"},Je=(t,s)=>{const a=(t[s]||[]).length;return a<100?{count:a,isLimited:!1}:{count:a,isLimited:!0}},et=(t,s)=>{const a=t[s];return Array.isArray(a)?a.map(r=>{if(typeof r=="string")return r;if(r&&typeof r=="object"){const n=r;return n.id||n.repoId||null}return null}).filter(r=>!!r).map(r=>`${Ha[s]}${r}`):[]},za=async t=>{try{return(await fetch(`https://huggingface.co/api/papers/${as(t)}`)).ok}catch{return!1}},Ma=async t=>{const s=as(t),[a,r]=await Promise.all([fetch(`https://huggingface.co/api/arxiv/${s}/repos`).then(async o=>o.ok?o.json():(console.warn(`Failed to fetch repos for arXiv:${s}, status: ${o.status}`),null)).catch(o=>(console.warn(`Failed to fetch repos for arXiv:${s}:`,o),null)),za(s)]);if(!a)return{models:0,datasets:0,spaces:0,modelUrls:[],datasetUrls:[],spaceUrls:[],isLimited:!1,paperExists:r};const n=Je(a,"models"),d=Je(a,"datasets"),l=Je(a,"spaces");return{models:n.count,datasets:d.count,spaces:l.count,modelUrls:et(a,"models"),datasetUrls:et(a,"datasets"),spaceUrls:et(a,"spaces"),isLimited:n.isLimited||d.isLimited||l.isLimited,paperExists:r}},Oa=t=>ue({queryKey:["huggingface-repos",t],queryFn:()=>Ma(t),enabled:!!t,staleTime:10*60*1e3,retry:1});function qa(t,s){try{const a=new URL(t),r=a.pathname.replace(/\/$/,"").split("/").filter(Boolean).at(-1);return(r==null?void 0:r.replace(/[-_]+/g," "))||a.hostname.replace(/^www\./,"")}catch{return s}}function tt(t,s,a){return[...new Set([...t,...s??[]])].map(r=>({href:r,label:qa(r,a)}))}function st(t,s,a){if(a==null&&t.length===0&&!(s!=null&&s.length))return;const r=new Set([...t,...s??[]]);return Math.max(r.size,a??0)}function at(t){return t[0]??"https://huggingface.co"}function rt(t,s){return s[0]??t}function Ka(t){const s=`${t.title.slice(0,60)}${t.title.length>60?"…":""}`,a=`${t.authors[0]||""}${t.authors.length>1?" et al.":""}`,r=t.authors.join(" and "),n=(t.published||"").slice(0,4)||"—",d=(l,o)=>t.arxiv_id?`@article{${t.arxiv_id.replace(".","")}, - title={{${l}}}, - author=${o}, - year={{${n}}}, - eprint={{${t.arxiv_id}}}, - archivePrefix={{arXiv}} -}`:`@misc{paper${t.id}, - title={{${l}}}, - author=${o}, - year={{${n}}}, - url={{${t.source_url||t.url_abs||""}}} -}`;return{citationDisplay:d(s,`{{${a}}}`),citationCopy:d(t.title,`{${r}}`)}}function Ga(t,s,a){var g,b,y,j;const r={models:t.hf_models??[],datasets:t.hf_datasets??[],spaces:t.hf_spaces??[]},n={models:tt(r.models,s==null?void 0:s.modelUrls,"Model"),datasets:tt(r.datasets,s==null?void 0:s.datasetUrls,"Dataset"),spaces:tt(r.spaces,s==null?void 0:s.spaceUrls,"Space")},d={models:n.models.map(({href:v})=>v),datasets:n.datasets.map(({href:v})=>v),spaces:n.spaces.map(({href:v})=>v)},l=((g=t.arxiv_id)==null?void 0:g.replace(/v\d+$/,""))??null,o=t.arxiv_id?{isLoading:a,paperHref:`https://huggingface.co/papers/${l}`,rows:[{label:"Models",href:rt(`https://huggingface.co/models?other=arxiv:${t.arxiv_id}`,r.models),count:st(r.models,s==null?void 0:s.modelUrls,s==null?void 0:s.models),isLimited:s==null?void 0:s.isLimited,links:n.models},{label:"Datasets",href:rt(`https://huggingface.co/datasets?other=arxiv:${t.arxiv_id}`,r.datasets),count:st(r.datasets,s==null?void 0:s.datasetUrls,s==null?void 0:s.datasets),isLimited:s==null?void 0:s.isLimited,links:n.datasets},{label:"Spaces",href:rt(`https://huggingface.co/papers/${l}`,r.spaces),count:st(r.spaces,s==null?void 0:s.spaceUrls,s==null?void 0:s.spaces),isLimited:s==null?void 0:s.isLimited,links:n.spaces}],footer:`Cite arxiv.org/abs/${l} in a HF README to link it here.`}:{isLoading:!1,paperHref:null,rows:[{label:"Models",href:at(r.models),count:r.models.length,links:n.models},{label:"Datasets",href:at(r.datasets),count:r.datasets.length,links:n.datasets},{label:"Spaces",href:at(r.spaces),count:r.spaces.length,links:n.spaces}],footer:null},c=(t.methods??[]).filter(({source_paper_id:v})=>v===t.id),h=t.introduced_benchmarks??[],f=t.introduced_frameworks??[],i=[c.length&&(c.length===1?"this method":"these methods"),h.length&&(h.length===1?"this benchmark":"these benchmarks"),f.length&&(f.length===1?"this framework":"these frameworks")].filter(v=>!!v);return{...Ka(t),allHfArtifactUrls:d,authorEntries:t.authors.map((v,C)=>{var P,I,S,_;return{name:v,id:((I=(P=t.author_links)==null?void 0:P[C])==null?void 0:I.id)??null,hf_username:((_=(S=t.author_links)==null?void 0:S[C])==null?void 0:_.hf_username)??null}}),copyableRanks:Aa(t.leaderboard_ranks),hasIntroducedItems:i.length>0,hasLineageItems:!!((b=t.predecessor_papers)!=null&&b.length||(y=t.successor_papers)!=null&&y.length),hfArtifactViewer:o,hfPaperExists:!!(s!=null&&s.paperExists),introducedBenchmarks:h,introducedFrameworks:f,introducedMethods:c,introducedSummary:i.join(" and "),numPages:t.num_pages||null,paperSourceLabel:t.arxiv_id?`arXiv:${t.arxiv_id}`:"External resource",predecessorPapers:t.predecessor_papers??[],projectPages:((j=t.project_pages)==null?void 0:j.filter(({url:v})=>v).map(v=>({...v,safeHref:de(v.url)})))??[],repoSummary:la(t.repositories),safeAbstractUrl:de(t.url_abs),safeConferenceUrl:de(t.conference_url_abs),safePdfUrl:de(t.url_pdf),sourceActionLabel:t.source==="external"?"Source page":"arXiv page",successorPapers:t.successor_papers??[]}}const Va=["tldr","abstract","tasks","methods","results"];function Xa(t){if(!t)return{section:null,resultsTaskSlug:null};const[s,a]=t.split("?",2);if(!Va.includes(s))return{section:null,resultsTaskSlug:null};const r=s;return r!=="results"||!a?{section:r,resultsTaskSlug:null}:{section:r,resultsTaskSlug:new URLSearchParams(a).get("task")}}const rs=t=>`results-task-${t}`,Qa=t=>`#results?task=${encodeURIComponent(t)}`;function Wa(t,s){return t&&!!s}function Za({direct:t,paperId:s,refetchEvaluations:a,refetchPaper:r}){r(),a(),!(!t||!s)&&(W.primeCurationState(s,!0).catch(()=>{}),qe.primeCurationState(s,!0).catch(()=>{}))}function Ya(t,s){const a=t?Fs(t):"",r=Xt(),{toast:n}=ie(),{preferences:d}=As(),l=na(a,!!a),o=l.data,[c,h]=u.useState(!1);u.useEffect(()=>{!t||t===a||r(`/paper/${a}${window.location.search}${window.location.hash}`,{replace:!0})},[a,r,t]),u.useEffect(()=>{if(o!=null&&o.title)return document.title=ia(o.title),()=>{document.title=oa}},[o==null?void 0:o.title]),u.useEffect(()=>{if(h(!1),!(o!=null&&o.id))return;const S=window.setTimeout(()=>h(!0),0);return()=>window.clearTimeout(S)},[o==null?void 0:o.id]);const f=Wa(c,o==null?void 0:o.id),i=Oa(c?o==null?void 0:o.arxiv_id:void 0),g=Ba(o==null?void 0:o.id,f),b=ue({queryKey:[...ye.feeds.versions,o==null?void 0:o.arxiv_id],queryFn:()=>W.versions(o.arxiv_id.replace(/v\d+$/,"")),enabled:f&&!!(o!=null&&o.arxiv_id),staleTime:10*60*1e3}),y=ue({queryKey:[...ye.feeds.related,o==null?void 0:o.id],queryFn:()=>W.related(o.arxiv_id||o.id,4),enabled:f,staleTime:10*60*1e3});u.useEffect(()=>{const S=()=>{Za({direct:s==="direct",paperId:o==null?void 0:o.id,refetchEvaluations:g.refetch,refetchPaper:l.refetch}),n({title:"This section changed",description:"The latest state has been reloaded. Review your changes before submitting again.",variant:"destructive"})};return window.addEventListener("pwc:catalog-conflict",S),()=>window.removeEventListener("pwc:catalog-conflict",S)},[s,g.refetch,o==null?void 0:o.id,l.refetch,n]);const j=u.useMemo(()=>{const S=g.data;return!S||!d.hide_closed_source_evals?S:S.filter(_=>_.is_open!==!1)},[g.data,d.hide_closed_source_evals]),v=u.useMemo(()=>{if(!j)return[];const S=new Map;for(const _ of j){const m=S.get(_.task_id);m?m.rows.push(_):S.set(_.task_id,{taskId:_.task_id,taskName:_.task_name||"—",taskSlug:_.task_slug,rows:[_]})}return[...S.values()]},[j]),C=u.useMemo(()=>v.map(({taskSlug:S})=>S??"").join("|"),[v]),P=u.useMemo(()=>o?Ga(o,i.data,i.isLoading):null,[i.data,i.isLoading,o]),I=u.useRef(!1);return u.useEffect(()=>{I.current=!1},[a]),u.useEffect(()=>{let S=0;const _=(x=!1,E=!1)=>{const{section:A,resultsTaskSlug:M}=Xa(window.location.hash.slice(1));if(!A||!o||A==="tldr"&&!o.tldr||A==="results"&&(!f||g.isLoading)||!x&&I.current)return;let q=A==="results"&&M?document.getElementById(rs(M)):document.getElementById(A);if(!q&&A==="results"&&M){if(v.some(({taskSlug:K})=>K===M))return;q=document.getElementById("results")}q&&(S=window.requestAnimationFrame(()=>{I.current=!0,q.scrollIntoView({block:"start",behavior:E?"smooth":"auto"})}))};_();const m=()=>{I.current=!1,_(!0,!0)};return window.addEventListener("hashchange",m),()=>{window.removeEventListener("hashchange",m),S&&window.cancelAnimationFrame(S)}},[v,g.isLoading,o,C,f]),{arxivId:a,evaluations:g.data,evaluationsByTask:v,evaluationsLoading:g.isLoading,hfLoading:i.isLoading,hfRepos:i.data,paper:o,paperError:l.error,paperLoading:l.isLoading,presentation:P,refetchEvaluations:g.refetch,refetchPaper:l.refetch,relatedQuery:y,versions:b.data??[],visibleEvaluations:j}}const Ja={tasks:"tasks",methods:"methods",evaluations:"results",repositories:"repositories",project_pages:"project-pages",hf_artifacts:"hf-artifacts",organizations:"organizations",source_url:"source-url",x_threads:"x-threads"};function er(t){return Ja[t]??null}function tr(){const[t,s]=u.useState(null),a=u.useCallback(n=>{s(n)},[]),r=u.useCallback((n,d)=>{s(l=>d?n:l===n?null:l)},[]);return{activeEditor:t,openEditor:a,setEditorOpen:r}}const sr="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='256'%20height='257'%20preserveAspectRatio='xMidYMid'%20viewBox='0%200%20256%20257'%3e%3cpath%20fill='%23D97757'%20d='m50.228%20170.321%2050.357-28.257.843-2.463-.843-1.361h-2.462l-8.426-.518-28.775-.778-24.952-1.037-24.175-1.296-6.092-1.297L0%20125.796l.583-3.759%205.12-3.434%207.324.648%2016.202%201.101%2024.304%201.685%2017.629%201.037%2026.118%202.722h4.148l.583-1.685-1.426-1.037-1.101-1.037-25.147-17.045-27.22-18.017-14.258-10.37-7.713-5.25-3.888-4.925-1.685-10.758%207-7.713%209.397.649%202.398.648%209.527%207.323%2020.35%2015.75L94.817%2091.9l3.889%203.24%201.555-1.102.195-.777-1.75-2.917-14.453-26.118-15.425-26.572-6.87-11.018-1.814-6.61c-.648-2.723-1.102-4.991-1.102-7.778l7.972-10.823L71.42%200%2082.05%201.426l4.472%203.888%206.61%2015.101%2010.694%2023.786%2016.591%2032.34%204.861%209.592%202.592%208.879.973%202.722h1.685v-1.556l1.36-18.211%202.528-22.36%202.463-28.776.843-8.1%204.018-9.722%207.971-5.25%206.222%202.981%205.12%207.324-.713%204.73-3.046%2019.768-5.962%2030.98-3.889%2020.739h2.268l2.593-2.593%2010.499-13.934%2017.628-22.036%207.778-8.749%209.073-9.657%205.833-4.601h11.018l8.1%2012.055-3.628%2012.443-11.342%2014.388-9.398%2012.184-13.48%2018.147-8.426%2014.518.778%201.166%202.01-.194%2030.46-6.481%2016.462-2.982%2019.637-3.37%208.88%204.148.971%204.213-3.5%208.62-20.998%205.184-24.628%204.926-36.682%208.685-.454.324.519.648%2016.526%201.555%207.065.389h17.304l32.21%202.398%208.426%205.574%205.055%206.805-.843%205.184-12.962%206.611-17.498-4.148-40.83-9.721-14-3.5h-1.944v1.167l11.666%2011.406%2021.387%2019.314%2026.767%2024.887%201.36%206.157-3.434%204.86-3.63-.518-23.526-17.693-9.073-7.972-20.545-17.304h-1.36v1.814l4.73%206.935%2025.017%2037.59%201.296%2011.536-1.814%203.76-6.481%202.268-7.13-1.297-14.647-20.544-15.1-23.138-12.185-20.739-1.49.843-7.194%2077.448-3.37%203.953-7.778%202.981-6.48-4.925-3.436-7.972%203.435-15.749%204.148-20.544%203.37-16.333%203.046-20.285%201.815-6.74-.13-.454-1.49.194-15.295%2020.999-23.267%2031.433-18.406%2019.702-4.407%201.75-7.648-3.954.713-7.064%204.277-6.286%2025.47-32.405%2015.36-20.092%209.917-11.6-.065-1.686h-.583L44.07%20198.125l-12.055%201.555-5.185-4.86.648-7.972%202.463-2.593%2020.35-13.999-.064.065Z'/%3e%3c/svg%3e",ar="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='256'%20height='257'%20preserveAspectRatio='xMidYMid'%20viewBox='0%200%20256%20257'%3e%3cpath%20fill='%23D97757'%20d='m50.228%20170.321%2050.357-28.257.843-2.463-.843-1.361h-2.462l-8.426-.518-28.775-.778-24.952-1.037-24.175-1.296-6.092-1.297L0%20125.796l.583-3.759%205.12-3.434%207.324.648%2016.202%201.101%2024.304%201.685%2017.629%201.037%2026.118%202.722h4.148l.583-1.685-1.426-1.037-1.101-1.037-25.147-17.045-27.22-18.017-14.258-10.37-7.713-5.25-3.888-4.925-1.685-10.758%207-7.713%209.397.649%202.398.648%209.527%207.323%2020.35%2015.75L94.817%2091.9l3.889%203.24%201.555-1.102.195-.777-1.75-2.917-14.453-26.118-15.425-26.572-6.87-11.018-1.814-6.61c-.648-2.723-1.102-4.991-1.102-7.778l7.972-10.823L71.42%200%2082.05%201.426l4.472%203.888%206.61%2015.101%2010.694%2023.786%2016.591%2032.34%204.861%209.592%202.592%208.879.973%202.722h1.685v-1.556l1.36-18.211%202.528-22.36%202.463-28.776.843-8.1%204.018-9.722%207.971-5.25%206.222%202.981%205.12%207.324-.713%204.73-3.046%2019.768-5.962%2030.98-3.889%2020.739h2.268l2.593-2.593%2010.499-13.934%2017.628-22.036%207.778-8.749%209.073-9.657%205.833-4.601h11.018l8.1%2012.055-3.628%2012.443-11.342%2014.388-9.398%2012.184-13.48%2018.147-8.426%2014.518.778%201.166%202.01-.194%2030.46-6.481%2016.462-2.982%2019.637-3.37%208.88%204.148.971%204.213-3.5%208.62-20.998%205.184-24.628%204.926-36.682%208.685-.454.324.519.648%2016.526%201.555%207.065.389h17.304l32.21%202.398%208.426%205.574%205.055%206.805-.843%205.184-12.962%206.611-17.498-4.148-40.83-9.721-14-3.5h-1.944v1.167l11.666%2011.406%2021.387%2019.314%2026.767%2024.887%201.36%206.157-3.434%204.86-3.63-.518-23.526-17.693-9.073-7.972-20.545-17.304h-1.36v1.814l4.73%206.935%2025.017%2037.59%201.296%2011.536-1.814%203.76-6.481%202.268-7.13-1.297-14.647-20.544-15.1-23.138-12.185-20.739-1.49.843-7.194%2077.448-3.37%203.953-7.778%202.981-6.48-4.925-3.436-7.972%203.435-15.749%204.148-20.544%203.37-16.333%203.046-20.285%201.815-6.74-.13-.454-1.49.194-15.295%2020.999-23.267%2031.433-18.406%2019.702-4.407%201.75-7.648-3.954.713-7.064%204.277-6.286%2025.47-32.405%2015.36-20.092%209.917-11.6-.065-1.686h-.583L44.07%20198.125l-12.055%201.555-5.185-4.86.648-7.972%202.463-2.593%2020.35-13.999-.064.065Z'/%3e%3c/svg%3e",rr="data:image/svg+xml,%3csvg%20fill='%23111'%20fill-rule='evenodd'%20height='1em'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='1em'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eCodex%3c/title%3e%3cpath%20clip-rule='evenodd'%20d='M8.086.457a6.105%206.105%200%20013.046-.415c1.333.153%202.521.72%203.564%201.7a.117.117%200%2000.107.029c1.408-.346%202.762-.224%204.061.366l.063.03.154.076c1.357.703%202.33%201.77%202.918%203.198.278.679.418%201.388.421%202.126a5.655%205.655%200%2001-.18%201.631.167.167%200%2000.04.155%205.982%205.982%200%20011.578%202.891c.385%201.901-.01%203.615-1.183%205.14l-.182.22a6.063%206.063%200%2001-2.934%201.851.162.162%200%2000-.108.102c-.255.736-.511%201.364-.987%201.992-1.199%201.582-2.962%202.462-4.948%202.451-1.583-.008-2.986-.587-4.21-1.736a.145.145%200%2000-.14-.032c-.518.167-1.04.191-1.604.185a5.924%205.924%200%2001-2.595-.622%206.058%206.058%200%2001-2.146-1.781c-.203-.269-.404-.522-.551-.821a7.74%207.74%200%2001-.495-1.283%206.11%206.11%200%2001-.017-3.064.166.166%200%2000.008-.074.115.115%200%2000-.037-.064%205.958%205.958%200%2001-1.38-2.202%205.196%205.196%200%2001-.333-1.589%206.915%206.915%200%2001.188-2.132c.45-1.484%201.309-2.648%202.577-3.493.282-.188.55-.334.802-.438.286-.12.573-.22.861-.304a.129.129%200%2000.087-.087A6.016%206.016%200%20015.635%202.31C6.315%201.464%207.132.846%208.086.457zm-.804%207.85a.848.848%200%2000-1.473.842l1.694%202.965-1.688%202.848a.849.849%200%20001.46.864l1.94-3.272a.849.849%200%2000.007-.854l-1.94-3.393zm5.446%206.24a.849.849%200%20000%201.695h4.848a.849.849%200%20000-1.696h-4.848z'%3e%3c/path%3e%3c/svg%3e",nr="data:image/svg+xml,%3csvg%20fill='%23fff'%20fill-rule='evenodd'%20height='1em'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='1em'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eCodex%3c/title%3e%3cpath%20clip-rule='evenodd'%20d='M8.086.457a6.105%206.105%200%20013.046-.415c1.333.153%202.521.72%203.564%201.7a.117.117%200%2000.107.029c1.408-.346%202.762-.224%204.061.366l.063.03.154.076c1.357.703%202.33%201.77%202.918%203.198.278.679.418%201.388.421%202.126a5.655%205.655%200%2001-.18%201.631.167.167%200%2000.04.155%205.982%205.982%200%20011.578%202.891c.385%201.901-.01%203.615-1.183%205.14l-.182.22a6.063%206.063%200%2001-2.934%201.851.162.162%200%2000-.108.102c-.255.736-.511%201.364-.987%201.992-1.199%201.582-2.962%202.462-4.948%202.451-1.583-.008-2.986-.587-4.21-1.736a.145.145%200%2000-.14-.032c-.518.167-1.04.191-1.604.185a5.924%205.924%200%2001-2.595-.622%206.058%206.058%200%2001-2.146-1.781c-.203-.269-.404-.522-.551-.821a7.74%207.74%200%2001-.495-1.283%206.11%206.11%200%2001-.017-3.064.166.166%200%2000.008-.074.115.115%200%2000-.037-.064%205.958%205.958%200%2001-1.38-2.202%205.196%205.196%200%2001-.333-1.589%206.915%206.915%200%2001.188-2.132c.45-1.484%201.309-2.648%202.577-3.493.282-.188.55-.334.802-.438.286-.12.573-.22.861-.304a.129.129%200%2000.087-.087A6.016%206.016%200%20015.635%202.31C6.315%201.464%207.132.846%208.086.457zm-.804%207.85a.848.848%200%2000-1.473.842l1.694%202.965-1.688%202.848a.849.849%200%20001.46.864l1.94-3.272a.849.849%200%2000.007-.854l-1.94-3.393zm5.446%206.24a.849.849%200%20000%201.695h4.848a.849.849%200%20000-1.696h-4.848z'%3e%3c/path%3e%3c/svg%3e",ir="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20id='cursor_light__Ebene_1'%20xmlns='http://www.w3.org/2000/svg'%20version='1.1'%20viewBox='0%200%20466.73%20532.09'%3e%3c!--Generator:%20Adobe%20Illustrator%2029.6.1,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%202.1.1%20Build%209)--%3e%3cdefs%3e%3cstyle%3e.cursor_light__st0{fill:%2326251e}%3c/style%3e%3c/defs%3e%3cpath%20class='cursor_light__st0'%20d='M457.43,125.94L244.42,2.96c-6.84-3.95-15.28-3.95-22.12,0L9.3,125.94c-5.75,3.32-9.3,9.46-9.3,16.11v247.99c0,6.65,3.55,12.79,9.3,16.11l213.01,122.98c6.84,3.95,15.28,3.95,22.12,0l213.01-122.98c5.75-3.32,9.3-9.46,9.3-16.11v-247.99c0-6.65-3.55-12.79-9.3-16.11h-.01ZM444.05,151.99l-205.63,356.16c-1.39,2.4-5.06,1.42-5.06-1.36v-233.21c0-4.66-2.49-8.97-6.53-11.31L24.87,145.67c-2.4-1.39-1.42-5.06,1.36-5.06h411.26c5.84,0,9.49,6.33,6.57,11.39h-.01Z'/%3e%3c/svg%3e",or="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20id='cursor_dark__Ebene_1'%20xmlns='http://www.w3.org/2000/svg'%20version='1.1'%20viewBox='0%200%20466.73%20532.09'%3e%3c!--Generator:%20Adobe%20Illustrator%2029.6.1,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%202.1.1%20Build%209)--%3e%3cdefs%3e%3cstyle%3e.cursor_dark__st0{fill:%23edecec}%3c/style%3e%3c/defs%3e%3cpath%20class='cursor_dark__st0'%20d='M457.43,125.94L244.42,2.96c-6.84-3.95-15.28-3.95-22.12,0L9.3,125.94c-5.75,3.32-9.3,9.46-9.3,16.11v247.99c0,6.65,3.55,12.79,9.3,16.11l213.01,122.98c6.84,3.95,15.28,3.95,22.12,0l213.01-122.98c5.75-3.32,9.3-9.46,9.3-16.11v-247.99c0-6.65-3.55-12.79-9.3-16.11h-.01ZM444.05,151.99l-205.63,356.16c-1.39,2.4-5.06,1.42-5.06-1.36v-233.21c0-4.66-2.49-8.97-6.53-11.31L24.87,145.67c-2.4-1.39-1.42-5.06,1.36-5.06h411.26c5.84,0,9.49,6.33,6.57,11.39h-.01Z'/%3e%3c/svg%3e",lr="data:image/svg+xml,%3csvg%20width='512'%20height='512'%20viewBox='0%200%20512%20512'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20width='512'%20height='512'%20fill='%23FDFCFC'/%3e%3cpath%20d='M320%20224V352H192V224H320Z'%20fill='%23E6E5E6'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M384%20416H128V96H384V416ZM320%20160H192V352H320V160Z'%20fill='%2317181C'/%3e%3c/svg%3e",cr="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20version='1.1'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='512'%20height='512'%3e%3csvg%20width='512'%20height='512'%20viewBox='0%200%20512%20512'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20width='512'%20height='512'%20fill='%23131010'%3e%3c/rect%3e%3cpath%20d='M320%20224V352H192V224H320Z'%20fill='%235A5858'%3e%3c/path%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M384%20416H128V96H384V416ZM320%20160H192V352H320V160Z'%20fill='white'%3e%3c/path%3e%3c/svg%3e%3cstyle%3e@media%20(prefers-color-scheme:%20light)%20{%20:root%20{%20filter:%20none;%20}%20}%20@media%20(prefers-color-scheme:%20dark)%20{%20:root%20{%20filter:%20none;%20}%20}%20%3c/style%3e%3c/svg%3e",ns=[{name:"Claude",light:sr,dark:ar},{name:"Codex",light:rr,dark:nr},{name:"Cursor",light:ir,dark:or},{name:"OpenCode",light:lr,dark:cr}];function dr(){return e.jsx("span",{className:"ml-1 inline-flex shrink-0 items-center gap-1.5","aria-hidden":"true",children:ns.map(({name:t,light:s,dark:a})=>e.jsxs("span",{title:t,className:"inline-flex h-[18px] w-[18px]",children:[e.jsx("img",{src:s,alt:"",width:18,height:18,className:"h-full w-full object-contain dark:hidden"}),e.jsx("img",{src:a,alt:"",width:18,height:18,className:"hidden h-full w-full object-contain dark:block"})]},t))})}function ur(){return e.jsx("ul",{className:"flex flex-wrap gap-2","aria-label":"Supported coding agents",children:ns.map(({name:t,light:s,dark:a})=>e.jsxs("li",{className:"inline-flex items-center gap-2 rounded-full border px-3 py-1 text-sm",children:[e.jsx("img",{src:s,alt:"",width:18,height:18,className:"h-[18px] w-[18px] object-contain dark:hidden"}),e.jsx("img",{src:a,alt:"",width:18,height:18,className:"hidden h-[18px] w-[18px] object-contain dark:block"}),t]},t))})}function mr({paperId:t,isAdmin:s}){var g;const[a,r]=u.useState(!1),[n,d]=u.useState(!1),[l,o]=u.useState(!1),[c,h]=u.useState(()=>window.location.hash.startsWith("#edit")),f=ua({queryKey:["paper-edit-history",t],queryFn:({pageParam:b})=>ma.history(t,b),initialPageParam:void 0,getNextPageParam:b=>b.next_cursor??void 0,enabled:s&&c}),i=`Help me edit https://paperswithcode.co/paper/${t} using the public pwc CLI from https://github.com/huggingface/pwc-cli. Install or update the CLI following its README, then run pwc skills add to load its instructions. Run pwc auth login --paper ${t}; I will authorize this paper in my browser. Export with pwc paper edit export ${t} --output edits.json, make explicit operations for the corrections I request, and preview before submitting. For organization changes, use an organizations operation with payload {"organization_ids": [existing organization IDs]}; this replaces the paper’s organization links and publishes directly. Use existing organizations, benchmark and metric definitions, preserve unrelated entries, and cite source URLs where available. Never print or copy credentials. Ask me what to change if I have not specified it.`;return e.jsxs(e.Fragment,{children:[e.jsxs("button",{type:"button",className:"action-btn",title:"Edit this paper page with Claude, Codex, Cursor, or OpenCode",onClick:()=>{r(!1),d(!1),o(!0)},children:["Edit with your agent",e.jsx(dr,{})]}),s&&e.jsxs("button",{type:"button",className:"action-btn",onClick:()=>h(!0),children:[e.jsx(Ra,{size:12})," View edit history"]}),e.jsx(ee,{open:l,onOpenChange:o,children:e.jsxs(te,{className:"max-w-2xl",children:[e.jsxs(se,{children:[e.jsx(ae,{children:"Edit this paper with your agent"}),e.jsx(re,{children:"Spotted a missing code link, a wrong task, or a missing benchmark result? Your favorite coding agent can fix it for you."})]}),e.jsx(ur,{}),e.jsxs("ol",{className:"list-decimal space-y-1 pl-5 text-sm text-muted-foreground",children:[e.jsx("li",{children:"Copy the prompt below."}),e.jsx("li",{children:"Paste it into Claude Code, Codex, Cursor, OpenCode, or another coding agent, and tell it what to change."}),e.jsxs("li",{children:["The agent installs the ",e.jsx("a",{className:"underline",href:"https://github.com/huggingface/pwc-cli",target:"_blank",rel:"noreferrer",children:"pwc CLI"}),", asks you to authorize this paper with your Hugging Face account, and previews the edits before submitting them."]})]}),e.jsx("textarea",{"aria-label":"Paper edit prompt",readOnly:!0,value:i,className:"h-48 w-full resize-none rounded border bg-muted/40 p-3 font-mono text-xs",onFocus:b=>b.currentTarget.select()}),n&&e.jsx("p",{role:"alert",className:"text-sm text-destructive",children:"Could not copy automatically. Select the prompt above and copy it manually."}),e.jsxs(F,{className:"justify-self-end",onClick:async()=>{try{await navigator.clipboard.writeText(i),r(!0),d(!1)}catch{d(!0)}},children:[a?e.jsx(me,{size:14}):e.jsx(ha,{size:14}),a?"Prompt copied":"Copy prompt"]})]})}),e.jsx(ee,{open:s&&c,onOpenChange:h,children:e.jsxs(te,{className:"max-h-[85vh] max-w-3xl overflow-y-auto",id:"edit-history",children:[e.jsxs(se,{children:[e.jsx(ae,{children:"Paper edit history"}),e.jsx(re,{children:"Published changes and their contributors."})]}),e.jsxs("div",{className:"space-y-3",children:[f.isLoading&&e.jsx("p",{children:"Loading edit history…"}),f.error&&e.jsx("p",{role:"alert",children:"Could not load edit history."}),f.data&&!f.data.pages[0].events.length&&e.jsx("p",{className:"text-sm text-muted-foreground",children:"No edits have been recorded here yet."}),(g=f.data)==null?void 0:g.pages.flatMap(b=>b.events).map(b=>e.jsxs("article",{id:`edit-${b.id}`,className:"rounded border p-3",children:[e.jsxs("p",{className:"text-sm",children:[b.actor_username?e.jsxs("a",{className:"underline",href:`https://huggingface.co/${encodeURIComponent(b.actor_username)}`,children:["@",b.actor_username]}):"Catalog administrator"," · ",new Date(b.created_at).toLocaleString()," · ",b.operation==="rollback"?"Reverted an edit":"Updated this paper"]}),e.jsxs("details",{children:[e.jsx("summary",{className:"cursor-pointer text-sm",children:"View changes"}),e.jsx("pre",{className:"max-h-80 overflow-auto whitespace-pre-wrap text-xs",children:JSON.stringify({before:b.before,after:b.after},null,2)})]})]},b.id)),f.hasNextPage&&e.jsx(F,{variant:"outline",disabled:f.isFetchingNextPage,onClick:()=>void f.fetchNextPage(),children:"Load older edits"})]})]})})]})}function hr(t){return t.map(s=>{const a=s.best_metric||Object.keys(s.metrics)[0]||"";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(s.metrics[a]??""),original_metrics:{...s.metrics},original_metric_name:a,best_rank:s.best_rank!=null?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 pr(t,s){const a={...t.original_metrics},r=a[t.original_metric_name];return t.original_metric_name!==s&&delete a[t.original_metric_name],a[s]=r!=null&&t.metric_value===String(r)?r:t.metric_value,a}function fr(t){const s=t==null?void 0:t.trim();return s?Number(s):void 0}function Bt(t){const s=t.trim();return s?Number(s):null}function nt(t){return t.trim()||null}function it(t){return!!(t&&/^\d+$/.test(t.trim())&&Number.isSafeInteger(Number(t))&&Number(t)>0)}function is(t){const s=[];return t.forEach((a,r)=>{var l;if(!a.operation||a.operation==="unchanged")return;const n=(o,c)=>{s.push({rowIndex:r,field:o,message:c})};if(a.operation!=="create"&&!it(a.id)&&n("id","This result has no valid evaluation ID. Reload the paper before editing it."),a.operation==="delete")return;it(a.task_id)||n("task_id","Select a valid task."),it(a.dataset_id)||n("dataset_id","Select a valid dataset.");const d=a.metric_name.trim();d?d!==a.original_metric_name&&Object.prototype.hasOwnProperty.call(a.original_metrics,d)&&n("metric_name",`Cannot rename a metric to "${d}": this evaluation already has that score.`):n("metric_name","Select a metric."),(l=a.best_rank)!=null&&l.trim()&&!Number.isSafeInteger(Number(a.best_rank))&&n("best_rank","Enter a whole-number rank."),a.num_parameters.trim()&&(!Number.isSafeInteger(Number(a.num_parameters))||Number(a.num_parameters)<0)&&n("num_parameters","Enter a non-negative whole-number parameter count."),a.metric_value.trim()||n("metric_value","Enter a metric value.")}),s}function gr(t,s){const a=is(t);return a.length?{valid:!1,errors:a}:{valid:!0,operations:xr(t,s)}}function xr(t,s){const a=[];for(const r of t){if(r.operation==="delete"){a.push({kind:"delete",evaluationId:Number(r.id)});continue}if(r.operation!=="create"&&r.operation!=="update")continue;const n=r.metric_name.trim(),d=s(r.task_id,r.dataset_id),l={task_id:Number(r.task_id),dataset_id:Number(r.dataset_id),metrics:pr(r,n),best_metric:n,is_open:r.is_open},o=r.model_name.trim(),c=fr(r.best_rank);if(r.operation==="create"){const h=Bt(r.num_parameters),f=nt(r.hf_model_url);a.push({kind:"create",data:{...l,...o?{model_name:o}:{},...d&&r.harness.trim()?{harness:r.harness.trim()}:{},...c!==void 0?{best_rank:c}:{},...h!==null?{num_parameters:h}:{},...f!==null?{hf_model_url:f}:{}}});continue}a.push({kind:"update",evaluationId:Number(r.id),data:{...l,...o?{model_name:o}:{},harness:d?nt(r.harness):null,...c!==void 0?{best_rank:c}:{},num_parameters:Bt(r.num_parameters),hf_model_url:nt(r.hf_model_url)}})}return a}function br(t,s){return s.map(a=>a.kind==="delete"?{operation:"delete",evaluation_id:a.evaluationId}:{operation:a.kind,...a.kind==="update"?{evaluation_id:a.evaluationId}:{},payload:a.kind==="create"?{paper_id:t,...a.data}:a.data})}function jr(t){return t.map(s=>s.kind==="delete"?{op:"delete",evaluation_id:s.evaluationId}:s.kind==="update"?{op:"update",evaluation_id:s.evaluationId,data:s.data}:{op:"create",data:s.data})}function xe({isAuthor:t=!1}){const s=typeof window<"u"&&window.location.hostname==="staging.paperswithcode.co";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:s?"Test-only: this change stays on staging.":"Your changes will be reviewed by an admin."}),e.jsx("p",{className:"mt-1 leading-snug",children:s?"This exercises staging-local pending behavior and is not queued for production review.":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."})]})}const ot=100;function vr(t){return(t??[]).some(s=>s.slug==="coding-agents"||s.name.trim().toLowerCase()==="coding agents")}function wr(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 yr(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 Ht(t,s){return`${t}:${s}`}function _r({open:t,onOpenChange:s,paperId:a,arxivId:r,initialEvaluations:n,paperTasks:d,onSuccess:l,submitMode:o="direct",isAdmin:c=!1,isAuthor:h=!1}){const f=u.useId(),i=vr(d),[g,b]=u.useState([]),[y,j]=u.useState(!1),v=y?is(g):[],[C,P]=u.useState(null),[I,S]=u.useState(new Map),[_,m]=u.useState(new Map),x=he(),{toast:E}=ie(),A=u.useRef(!1),M=u.useRef(!1);u.useEffect(()=>{if(!t){j(!1),A.current=!1,M.current=!1;return}A.current||M.current||n.length!==0&&(A.current=!0,b(hr(n)),S(wr(n)),m(yr(n)))},[t,n]);const q=u.useMemo(()=>Array.from(new Set(g.map(w=>w.task_id).filter(w=>w&&w!==""))),[g]),K=u.useMemo(()=>{const w=new Set;return g.forEach(k=>{k.task_id&&k.dataset_id&&w.add(Ht(k.task_id,k.dataset_id))}),Array.from(w)},[g]),G=ue({queryKey:["datasets-by-tasks-for-eval-edit",q,t],queryFn:async()=>{const w={};return await Promise.all(q.map(async k=>{try{const R=await _e.listDatasets({task_id:parseInt(k),page_size:ot});w[k]=R.results}catch(R){console.error(`Error fetching datasets for task ${k}:`,R),w[k]=[]}})),w},enabled:t&&q.length>0});u.useEffect(()=>{G.data&&m(w=>{const k=new Map(w);return Object.values(G.data).forEach(R=>{R.forEach(D=>{k.set(D.id,D)})}),k})},[G.data]);const p=ue({queryKey:["leaderboard-metrics-for-eval-edit",K,t],queryFn:async()=>{const w={};return await Promise.all(K.map(async k=>{const[R,D]=k.split(":");try{w[k]=await _e.leaderboardMetrics(D,R)}catch(X){console.error(`Error fetching metrics for leaderboard ${k}:`,X),w[k]=[]}})),w},enabled:t&&K.length>0}),$=async w=>{const k=await _e.listTasks({page_size:ot,...w?{q:w}:{}});return S(R=>{const D=new Map(R);return k.results.forEach(X=>D.set(X.id,X)),D}),k.results.map(R=>{var D;return{value:R.id,label:R.name,description:(D=R.description)==null?void 0:D.slice(0,100)}})},L=w=>async k=>{const R=await _e.listDatasets({task_id:parseInt(w),page_size:ot,...k?{q:k}:{}});return m(D=>{const X=new Map(D);return R.results.forEach(V=>X.set(V.id,V)),X}),R.results.map(D=>({value:D.id,label:D.name,description:D.full_name}))},T=(w,k)=>{if(!w||!k)return!1;const R=_.get(k);return!!(R!=null&&R.supports_harness)},U=(w,k,R)=>{var V;if(!w||!k)return[];const X=(((V=p.data)==null?void 0:V[Ht(w,k)])||[]).map(B=>({value:B.metric_name,label:B.metric_name,description:B.metric_direction==="higher_is_better"?"Higher is better":"Lower is better"}));return R&&!X.some(B=>B.value===R)&&X.unshift({value:R,label:`${R} (legacy)`}),X},H=le({mutationFn:async({paperId:w,canonical:k})=>{if(!c&&o==="direct"&&k.length>50)throw new Error("Contributor evaluation batches are limited to 50 operations; contact an admin.");const R=Number.parseInt(w,10);if(o==="pending")await pe.submit({paper_id:R,edit_type:"evaluations",proposed_payload:{operations:jr(k)}});else{const D=fa(w,n,k,r);await qe.batch(R,br(R,k)),ga(x,D)}},onSuccess:()=>{if(o==="pending"){E({title:"Edit submitted for review",description:"Thanks! An admin will review your proposed evaluation changes shortly."}),l==null||l(),s(!1);return}l==null||l(),s(!1)},onError:w=>{const k=ge(w,o==="pending"?"Failed to submit your edit. Please try again.":"Failed to update evaluations.");E({title:o==="pending"?"Could not submit edit":"Could not save evaluations",description:k,variant:"destructive"})}}),z=()=>{M.current=!0,b([...g,{task_id:"",dataset_id:"",model_name:"",harness:"",metric_name:"",metric_value:"",original_metrics:{},original_metric_name:"",best_rank:"",num_parameters:"",hf_model_url:"",is_open:!0,operation:"create"}])},Y=w=>{if(M.current=!0,g[w].id){if(!window.confirm("Delete this evaluation? You will be asked to sign in again if your session is older than 15 minutes."))return;b(g.map((R,D)=>D===w?{...R,operation:"delete"}:R))}else b(g.filter((R,D)=>D!==w))},J=(w,k,R)=>{M.current=!0,b(g.map((D,X)=>{if(X!==w||D[k]===R)return D;const V={...D,[k]:R};return(k==="task_id"||k==="dataset_id")&&(V.original_metrics={},V.original_metric_name="",V.metric_value="",V.best_rank=""),k==="task_id"&&(V.dataset_id="",V.metric_name="",V.harness=""),k==="dataset_id"&&(V.metric_name="",R&&!T(V.task_id,R)&&(V.harness="")),D.operation==="unchanged"&&(V.operation="update"),V}))},Xe=(w,k)=>{M.current=!0,b(g.map((R,D)=>{if(D!==w)return R;const X={...R,is_open:k};return R.operation==="unchanged"&&(X.operation="update"),X}))},Ue=()=>{j(!0);const w=gr(g,T);if(w.valid){if(w.operations.length===0){E({title:"No changes to submit",description:"Your evaluation list matches the existing data."});return}H.mutate({paperId:a,canonical:w.operations})}},we=(w,k)=>{const R=v.find(D=>D.rowIndex===w&&D.field===k);return R?e.jsx("p",{id:`${f}-${w}-${k}-error`,className:"text-xs text-destructive",children:R.message}):null};return e.jsxs(ee,{open:t,onOpenChange:s,children:[e.jsxs(te,{className:"max-w-6xl max-h-[800px]",children:[e.jsxs(se,{children:[e.jsx(ae,{children:"Edit Evaluation Results"}),e.jsx(re,{children:"Add, edit, or remove evaluation results for this paper. Each row represents a benchmark result."})]}),o==="pending"&&e.jsx(xe,{isAuthor:h}),v.length>0&&e.jsxs("div",{role:"alert",className:"text-sm text-destructive",children:["Fix the following errors before saving. No changes have been submitted.",e.jsx("ul",{children:v.map(w=>e.jsxs("li",{children:["Row ",g.slice(0,w.rowIndex+1).filter(k=>k.operation!=="delete").length,": ",w.message]},`${w.rowIndex}-${w.field}`))})]}),e.jsxs("div",{className:"py-4 overflow-y-auto max-h-[600px]",children:[g.filter(w=>w.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 ${i?"min-w-[140px]":"min-w-[240px]"}`,children:"Model"}),i&&e.jsx("th",{className:"text-left py-2 px-2 font-medium text-sm min-w-[140px]",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:g.map((w,k)=>{if(w.operation==="delete")return null;const R=I.get(w.task_id),D=_.get(w.dataset_id),X=U(w.task_id,w.dataset_id,w.metric_name),V=!!(w.task_id&&w.dataset_id)&&p.isFetching;return e.jsxs("tr",{className:"border-b border-border",children:[e.jsx("td",{className:"py-2 px-2",children:e.jsxs("div",{role:"group","aria-label":"Task","aria-describedby":`${f}-${k}-task_id-error`,children:[e.jsx(Ft,{value:w.task_id,onChange:B=>J(k,"task_id",B),placeholder:"Select task",searchPlaceholder:"Search tasks...",emptyMessage:"No tasks found.",selectedOption:R?{value:R.id,label:R.name}:null,queryKey:["eval-edit-task-search"],queryFn:$,enabled:t}),we(k,"task_id")]})}),e.jsx("td",{className:"py-2 px-2",children:e.jsxs("div",{role:"group","aria-label":"Dataset","aria-describedby":`${f}-${k}-dataset_id-error`,children:[e.jsx(Ft,{value:w.dataset_id,onChange:B=>J(k,"dataset_id",B),placeholder:w.task_id?"Select dataset":"Select task first",searchPlaceholder:"Search datasets...",emptyMessage:w.task_id?"No datasets found for this task.":"Select a task first.",disabled:!w.task_id,selectedOption:D?{value:D.id,label:D.name}:null,queryKey:["eval-edit-dataset-search",w.task_id],queryFn:L(w.task_id),enabled:t&&!!w.task_id}),we(k,"dataset_id")]})}),e.jsx("td",{className:"py-2 px-2",children:e.jsx(Q,{type:"text",className:"w-full text-sm",placeholder:"Model name",value:w.model_name,onChange:B=>J(k,"model_name",B.target.value)})}),i&&e.jsx("td",{className:"py-2 px-2",children:T(w.task_id,w.dataset_id)?e.jsx(Q,{type:"text",className:"w-full text-sm",placeholder:"Claude Code, Terminus, ...",value:w.harness,onChange:B=>J(k,"harness",B.target.value)}):e.jsx("span",{className:"text-xs text-muted-foreground",children:"Not supported"})}),e.jsxs("td",{className:"py-2 px-2",children:[!w.task_id||!w.dataset_id?e.jsx("span",{className:"text-xs text-muted-foreground",children:"Select task + dataset"}):V?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..."]}):X.length>0?e.jsxs("select",{className:"w-full rounded-md border border-border bg-background px-2 py-1 text-sm",id:`${f}-${k}-metric_name`,"aria-invalid":v.some(B=>B.rowIndex===k&&B.field==="metric_name"),"aria-describedby":`${f}-${k}-metric_name-error`,value:w.metric_name,onChange:B=>J(k,"metric_name",B.target.value),children:[e.jsx("option",{value:"",children:"Select metric"}),X.map(B=>e.jsx("option",{value:B.value,children:B.label},B.value))]}):e.jsx("span",{className:"text-xs text-muted-foreground",children:"No configured metrics"}),we(k,"metric_name")]}),e.jsxs("td",{className:"py-2 px-2",children:[e.jsx(Q,{type:"text",className:"w-full text-sm",placeholder:"44.9",id:`${f}-${k}-metric_value`,"aria-invalid":v.some(B=>B.rowIndex===k&&B.field==="metric_value"),"aria-describedby":`${f}-${k}-metric_value-error`,value:w.metric_value,onChange:B=>J(k,"metric_value",B.target.value)}),we(k,"metric_value")]}),e.jsxs("td",{className:"py-2 px-2",children:[e.jsx(Q,{type:"number",min:0,step:1,className:"w-full text-sm",placeholder:"e.g. 7000000000",id:`${f}-${k}-num_parameters`,"aria-invalid":v.some(B=>B.rowIndex===k&&B.field==="num_parameters"),"aria-describedby":`${f}-${k}-num_parameters-error`,value:w.num_parameters,onChange:B=>J(k,"num_parameters",B.target.value),title:"Raw model parameter count (e.g. 7000000000 for a 7B model). Leave blank if unknown."}),we(k,"num_parameters")]}),e.jsx("td",{className:"py-2 px-2",children:e.jsx(Q,{type:"url",className:"w-full text-sm",placeholder:"https://huggingface.co/org/model",value:w.hf_model_url,onChange:B=>J(k,"hf_model_url",B.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:w.is_open,onChange:B=>Xe(k,B.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(F,{variant:"ghost",size:"sm",onClick:()=>Y(k),className:"h-8 w-8 p-0 text-destructive hover:text-destructive",title:w.id&&!c?"Only administrators can delete published results":"Remove row",disabled:!!w.id&&!c,children:e.jsx(Ae,{className:"w-4 h-4"})})})]},k)})})]})}):e.jsxs("div",{className:"text-center py-8 text-muted-foreground",children:[e.jsx(ba,{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(F,{variant:"outline",size:"sm",onClick:z,className:"flex items-center space-x-2",children:[e.jsx(Te,{className:"w-4 h-4"}),e.jsx("span",{children:"Add Row"})]})})]}),e.jsxs(oe,{children:[e.jsxs("div",{className:"flex flex-wrap gap-2 sm:mr-auto",children:[e.jsx(F,{variant:"ghost",onClick:()=>P("benchmark"),children:"Suggest a new benchmark"}),e.jsx(F,{variant:"ghost",onClick:()=>P("metric"),children:"Suggest a new metric"})]}),e.jsx(F,{variant:"outline",onClick:()=>s(!1),children:"Cancel"}),e.jsx(F,{onClick:Ue,disabled:H.isPending,children:H.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(me,{className:"w-4 h-4 mr-2"}),o==="pending"?"Submit for review":"Save Changes"]})})]})]}),e.jsx(yt,{open:C!==null,onOpenChange:w=>{w||P(null)},paperId:a,kind:C??"benchmark"})]})}const lt=[{key:"hf_models",label:"Models",placeholder:"https://huggingface.co/org/model"},{key:"hf_datasets",label:"Datasets",placeholder:"https://huggingface.co/datasets/org/data"},{key:"hf_spaces",label:"Spaces",placeholder:"https://huggingface.co/spaces/org/demo"}];function zt(t){return t.map(s=>s.trim()).filter(Boolean)}function ct(t,s){const a=zt(t).sort(),r=zt(s).sort();return a.length!==r.length?!1:a.every((n,d)=>n===r[d])}function kr(t,s){return ct(t.hf_models,s.hf_models)&&ct(t.hf_datasets,s.hf_datasets)&&ct(t.hf_spaces,s.hf_spaces)}function Nr({open:t,onOpenChange:s,paperId:a,arxivId:r,initialArtifacts:n,onSuccess:d,submitMode:l="direct",isAuthor:o=!1}){const[c,h]=u.useState(n),[f,i]=u.useState({hf_models:"",hf_datasets:"",hf_spaces:""}),g=he(),{toast:b}=ie(),y=u.useRef(!1);u.useEffect(()=>{if(!t){y.current=!1;return}y.current||(y.current=!0,h(n),i({hf_models:"",hf_datasets:"",hf_spaces:""}))},[t,n]);const j=le({mutationFn:async({paperId:_,artifacts:m})=>l==="pending"?(await pe.submit({paper_id:parseInt(_),edit_type:"hf_artifacts",proposed_payload:m}),null):W.updateHfArtifacts(_,m),onSuccess:_=>{if(l==="pending"){b({title:"Edit submitted for review",description:"Thanks! An admin will review your proposed Hugging Face artifact changes shortly."}),d==null||d(),s(!1),i({hf_models:"",hf_datasets:"",hf_spaces:""});return}_&&ve(g,_,[a,r]),d==null||d(),s(!1),i({hf_models:"",hf_datasets:"",hf_spaces:""})},onError:_=>{const m=ge(_,l==="pending"?"Failed to submit your edit. Please try again.":"Failed to update Hugging Face artifacts.");b({title:l==="pending"?"Could not submit edit":"Could not save Hugging Face artifacts",description:m,variant:"destructive"})}}),v=()=>{const _={hf_models:[...c.hf_models],hf_datasets:[...c.hf_datasets],hf_spaces:[...c.hf_spaces]};for(const{key:m}of lt){const x=f[m].trim();if(x){if(_[m].some(E=>E.trim()===x))return alert(`This ${m.replace("hf_","")} URL is already added`),null;_[m]=[..._[m],x]}}return _},C=_=>{const m=f[_].trim();if(m){if(c[_].some(x=>x.trim()===m)){alert(`This ${_.replace("hf_","")} URL is already added`);return}h(x=>({...x,[_]:[...x[_],m]})),i(x=>({...x,[_]:""}))}},P=(_,m)=>{h(x=>({...x,[_]:x[_].filter(E=>E!==m)}))},I=()=>{const _=v();if(_===null)return;const m=Object.keys(n).some(x=>n[x].some(E=>!_[x].includes(E)));l==="direct"&&m&&!window.confirm("Remove one or more Hugging Face artifact links?")||j.mutate({paperId:a,artifacts:_})},S=u.useMemo(()=>{const _={hf_models:[...c.hf_models],hf_datasets:[...c.hf_datasets],hf_spaces:[...c.hf_spaces]};for(const{key:m}of lt){const x=f[m].trim();if(x){if(_[m].some(E=>E.trim()===x))return!1;_[m]=[..._[m],x]}}return!kr(_,n)},[c,f,n]);return e.jsx(ee,{open:t,onOpenChange:s,children:e.jsxs(te,{className:"max-w-2xl max-h-[700px]",children:[e.jsxs(se,{children:[e.jsx(ae,{children:"Edit Hugging Face Artifacts"}),e.jsx(re,{children:"Add or remove linked Hugging Face models, datasets, and Spaces for this paper."})]}),l==="pending"&&e.jsx(xe,{isAuthor:o}),e.jsx("div",{className:"space-y-6 py-2 overflow-y-auto max-h-[460px]",children:lt.map(({key:_,label:m,placeholder:x})=>e.jsxs("div",{className:"space-y-2",children:[e.jsx("label",{className:"text-sm font-medium",children:m}),e.jsxs("div",{className:"flex space-x-2",children:[e.jsx(Q,{type:"url",placeholder:x,value:f[_],onChange:E=>i(A=>({...A,[_]:E.target.value})),onKeyPress:E=>{E.key==="Enter"&&(E.preventDefault(),C(_))},className:"flex-1"}),e.jsxs(F,{onClick:()=>C(_),size:"sm",disabled:!f[_].trim(),children:[e.jsx(Te,{className:"w-4 h-4 mr-1"}),"Add"]})]}),c[_].length>0?e.jsx("div",{className:"space-y-2",children:c[_].map(E=>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("span",{className:"text-sm font-medium text-paper-blue truncate flex-1",children:E}),e.jsx(F,{variant:"ghost",size:"sm",onClick:()=>P(_,E),className:"h-8 px-2 text-destructive hover:text-destructive",title:`Remove ${m.toLowerCase()} URL`,children:e.jsx(Ae,{className:"w-4 h-4"})})]},E))}):e.jsxs("div",{className:"text-xs text-muted-foreground",children:["No ",m.toLowerCase()," linked yet."]})]},_))}),e.jsxs(oe,{children:[e.jsx(F,{variant:"outline",onClick:()=>s(!1),children:"Cancel"}),e.jsx(F,{onClick:I,disabled:j.isPending||!S,children:j.isPending?e.jsxs(e.Fragment,{children:[e.jsx(ne,{className:"w-4 h-4 mr-2 animate-spin"}),l==="pending"?"Submitting...":"Saving..."]}):e.jsxs(e.Fragment,{children:[e.jsx(me,{className:"w-4 h-4 mr-2"}),l==="pending"?"Submit for review":"Save Changes"]})})]})]})})}var Ke="Checkbox",[Cr]=vt(Ke),[Er,_t]=Cr(Ke);function Sr(t){const{__scopeCheckbox:s,checked:a,children:r,defaultChecked:n,disabled:d,form:l,name:o,onCheckedChange:c,required:h,value:f="on",internal_do_not_use_render:i}=t,[g,b]=Wt({prop:a,defaultProp:n??!1,onChange:c,caller:Ke}),[y,j]=u.useState(null),[v,C]=u.useState(null),P=u.useRef(!1),I=y?!!l||!!y.closest("form"):!0,S={checked:g,disabled:d,setChecked:b,control:y,setControl:j,name:o,form:l,value:f,hasConsumerStoppedPropagationRef:P,required:h,defaultChecked:je(n)?!1:n,isFormControl:I,bubbleInput:v,setBubbleInput:C};return e.jsx(Er,{scope:s,...S,children:Pr(i)?i(S):r})}var os="CheckboxTrigger",ls=u.forwardRef(({__scopeCheckbox:t,onKeyDown:s,onClick:a,...r},n)=>{const{control:d,value:l,disabled:o,checked:c,required:h,setControl:f,setChecked:i,hasConsumerStoppedPropagationRef:g,isFormControl:b,bubbleInput:y}=_t(os,t),j=Fe(n,f),v=u.useRef(c);return u.useEffect(()=>{const C=d==null?void 0:d.form;if(C){const P=()=>i(v.current);return C.addEventListener("reset",P),()=>C.removeEventListener("reset",P)}},[d,i]),e.jsx(ke.button,{type:"button",role:"checkbox","aria-checked":je(c)?"mixed":c,"aria-required":h,"data-state":hs(c),"data-disabled":o?"":void 0,disabled:o,value:l,...r,ref:j,onKeyDown:Ie(s,C=>{C.key==="Enter"&&C.preventDefault()}),onClick:Ie(a,C=>{i(P=>je(P)?!0:!P),y&&b&&(g.current=C.isPropagationStopped(),g.current||C.stopPropagation())})})});ls.displayName=os;var kt=u.forwardRef((t,s)=>{const{__scopeCheckbox:a,name:r,checked:n,defaultChecked:d,required:l,disabled:o,value:c,onCheckedChange:h,form:f,...i}=t;return e.jsx(Sr,{__scopeCheckbox:a,checked:n,defaultChecked:d,disabled:o,required:l,onCheckedChange:h,name:r,form:f,value:c,internal_do_not_use_render:({isFormControl:g})=>e.jsxs(e.Fragment,{children:[e.jsx(ls,{...i,ref:s,__scopeCheckbox:a}),g&&e.jsx(ms,{__scopeCheckbox:a})]})})});kt.displayName=Ke;var cs="CheckboxIndicator",ds=u.forwardRef((t,s)=>{const{__scopeCheckbox:a,forceMount:r,...n}=t,d=_t(cs,a);return e.jsx(Qt,{present:r||je(d.checked)||d.checked===!0,children:e.jsx(ke.span,{"data-state":hs(d.checked),"data-disabled":d.disabled?"":void 0,...n,ref:s,style:{pointerEvents:"none",...t.style}})})});ds.displayName=cs;var us="CheckboxBubbleInput",ms=u.forwardRef(({__scopeCheckbox:t,...s},a)=>{const{control:r,hasConsumerStoppedPropagationRef:n,checked:d,defaultChecked:l,required:o,disabled:c,name:h,value:f,form:i,bubbleInput:g,setBubbleInput:b}=_t(us,t),y=Fe(a,b),j=es(d),v=Zt(r);u.useEffect(()=>{const P=g;if(!P)return;const I=window.HTMLInputElement.prototype,_=Object.getOwnPropertyDescriptor(I,"checked").set,m=!n.current;if(j!==d&&_){const x=new Event("click",{bubbles:m});P.indeterminate=je(d),_.call(P,je(d)?!1:d),P.dispatchEvent(x)}},[g,j,d,n]);const C=u.useRef(je(d)?!1:d);return e.jsx(ke.input,{type:"checkbox","aria-hidden":!0,defaultChecked:l??C.current,required:o,disabled:c,name:h,value:f,form:i,...s,tabIndex:-1,ref:y,style:{...s.style,...v,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});ms.displayName=us;function Pr(t){return typeof t=="function"}function je(t){return t==="indeterminate"}function hs(t){return je(t)?"indeterminate":t?"checked":"unchecked"}const Ge=u.forwardRef(({className:t,style:s,...a},r)=>e.jsx(kt,{ref:r,className:ze("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(ds,{className:ze("flex items-center justify-center text-current"),children:e.jsx(me,{className:"h-4 w-4"})})}));Ge.displayName=kt.displayName;const $r=250,Ir=100;function Lr({open:t,onOpenChange:s,paperId:a,arxivId:r,initialMethodIds:n,initialMethods:d,onSuccess:l,submitMode:o="direct",isAuthor:c=!1}){const[h,f]=u.useState(n),[i,g]=u.useState(!1),[b,y]=u.useState(""),[j,v]=u.useState(""),[C,P]=u.useState(new Map),I=he(),{toast:S}=ie(),_=u.useRef(!1);u.useEffect(()=>{if(!t){_.current=!1;return}if(_.current)return;_.current=!0,f(n),y(""),v("");const p=new Map;(d||[]).forEach($=>{const L=parseInt($.id);Number.isNaN(L)||p.set(L,$)}),P(p)},[t,n,d]),u.useEffect(()=>{const p=window.setTimeout(()=>{v(b.trim())},$r);return()=>window.clearTimeout(p)},[b]);const{data:m,isFetching:x}=ue({queryKey:["methods-search",j],queryFn:()=>_e.listMethods({page_size:Ir,...j?{q:j}:{}}),enabled:t});u.useEffect(()=>{var p;(p=m==null?void 0:m.results)!=null&&p.length&&P($=>{const L=new Map($);return m.results.forEach(T=>{const U=parseInt(T.id);Number.isNaN(U)||L.set(U,T)}),L})},[m]);const E=u.useMemo(()=>{const p=(m==null?void 0:m.results)||[],$=new Set,L=[],T=(z,Y)=>{!Y||Number.isNaN(z)||$.has(z)||(L.push(Y),$.add(z))},U=()=>h.forEach(z=>T(z,C.get(z))),H=()=>p.forEach(z=>T(parseInt(z.id),z));return j?(H(),U()):(U(),H()),L},[m,h,C,j]),A=le({mutationFn:async({paperId:p,methodIds:$})=>o==="pending"?(await pe.submit({paper_id:parseInt(p),edit_type:"methods",proposed_payload:{method_ids:$}}),null):W.updateMethods(p,$),onSuccess:p=>{if(o==="pending"){S({title:"Edit submitted for review",description:"Thanks! An admin will review your proposed method changes shortly."}),l==null||l(),s(!1);return}p&&ve(I,p,[a,r]),S({title:"Methods updated",description:`Saved ${h.length} method${h.length===1?"":"s"} for this paper.`}),l==null||l(),s(!1)},onError:p=>{const $=ge(p,o==="pending"?"Failed to submit your edit. Please try again.":"Failed to update paper methods.");S({title:o==="pending"?"Could not submit edit":"Could not save methods",description:$,variant:"destructive"})}}),M=()=>{o==="direct"&&n.some(p=>!h.includes(p))&&!window.confirm("Remove one or more method links from this paper?")||A.mutate({paperId:a,methodIds:h})},q=u.useMemo(()=>{if(h.length!==n.length)return!0;const p=new Set(n);return h.some($=>!p.has($))},[h,n]),K=(p,$)=>{f(L=>$?L.includes(p)?L:[...L,p]:L.filter(T=>T!==p))},G=()=>y("");return e.jsxs(ee,{open:t,onOpenChange:s,children:[e.jsxs(te,{className:"max-w-2xl max-h-[600px]",children:[e.jsxs(se,{children:[e.jsx(ae,{children:"Edit Paper Methods"}),e.jsx(re,{children:"Select the methods and techniques used in this paper. You can select multiple methods."})]}),o==="pending"&&e.jsx(xe,{isAuthor:c}),e.jsxs("div",{className:"relative mb-4",children:[e.jsx(Le,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground"}),e.jsx(Q,{type:"text",placeholder:"Search methods...",value:b,onChange:p=>y(p.target.value),className:"pl-9 pr-9"}),b&&e.jsx("button",{type:"button",onClick:G,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(wt,{className:"w-4 h-4"})})]}),e.jsx("div",{className:"py-4 overflow-y-auto max-h-[400px]",children:E.length>0?e.jsx("div",{className:"space-y-2",children:E.map(p=>{const $=parseInt(p.id),L=h.includes($);return e.jsxs("div",{className:"flex items-center space-x-2 p-2 hover:bg-muted/50 rounded-md",children:[e.jsx(Ge,{id:`method-${p.id}`,checked:L,onCheckedChange:T=>K($,T===!0),className:"!border !border-black data-[state=checked]:!bg-black data-[state=checked]:!text-white"}),e.jsxs("label",{htmlFor:`method-${p.id}`,className:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 cursor-pointer flex-1",children:[p.name,p.full_name&&p.full_name!==p.name&&e.jsx("span",{className:"block text-xs text-muted-foreground font-normal",children:p.full_name}),p.description&&e.jsxs("span",{className:"block text-xs text-muted-foreground font-normal mt-1",children:[p.description.substring(0,100),p.description.length>100?"...":""]})]})]},p.id)})}):x?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(Le,{className:"w-8 h-8 mx-auto mb-2 opacity-50"}),e.jsx("p",{children:j?`No methods found matching "${j}"`:"No methods available"})]})}),e.jsxs(oe,{children:[e.jsx(F,{variant:"ghost",className:"sm:mr-auto",onClick:()=>g(!0),children:"Suggest a new method"}),e.jsx(F,{variant:"outline",onClick:()=>s(!1),children:"Cancel"}),e.jsx(F,{onClick:M,disabled:A.isPending||!q,children:A.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(me,{className:"w-4 h-4 mr-2"}),o==="pending"?"Submit for review":"Save Changes"]})})]})]}),e.jsx(yt,{open:i,onOpenChange:g,paperId:a,kind:"method"})]})}const ps=["image/jpeg","image/png","image/webp","image/gif"],Rr=2*1024*1024;function Fr(t){return ps.includes(t.type)?t.size>Rr?Promise.reject(new Error("Logo must be 2 MB or smaller.")):new Promise((s,a)=>{const r=new FileReader;r.onload=()=>s({file_name:t.name,mime_type:t.type,data_url:String(r.result)}),r.onerror=()=>a(new Error("Could not read that logo.")),r.readAsDataURL(t)}):Promise.reject(new Error("Choose a JPEG, PNG, WebP, or GIF logo."))}function Ar({paperId:t,initialName:s}){const[a,r]=u.useState(s),[n,d]=u.useState(""),[l,o]=u.useState(""),[c,h]=u.useState(null),[f,i]=u.useState(""),g=le({mutationFn:()=>pe.submit(pa(Number(t),"new_organization",{name:a.trim(),...n.trim()?{hf_slug:n.trim()}:{},...l.trim()?{website_url:l.trim()}:{},...c?{image:c}:{}}))});return g.isSuccess?e.jsxs("p",{className:"rounded border p-3 text-sm",children:['Thanks! "',a.trim(),'" was submitted for review. Once an admin approves it, the organization is created and added to this paper.']}):e.jsxs("form",{className:"space-y-2 rounded border p-3",onSubmit:b=>{b.preventDefault(),g.mutate()},children:[e.jsx("p",{className:"text-sm font-medium",children:"Suggest a new organization"}),e.jsx(Q,{"aria-label":"Organization name",placeholder:"Name",value:a,maxLength:200,onChange:b=>r(b.target.value)}),e.jsx(Q,{"aria-label":"Hugging Face organization",placeholder:"Hugging Face organization (e.g. https://huggingface.co/PrimeIntellect)",value:n,onChange:b=>d(b.target.value)}),e.jsx(Q,{"aria-label":"Website",type:"url",placeholder:"Website (e.g. https://www.primeintellect.ai)",value:l,onChange:b=>o(b.target.value)}),e.jsxs("label",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:["Logo (optional)",e.jsx("input",{"aria-label":"Logo",type:"file",accept:ps.join(","),onChange:b=>{var j;const y=(j=b.target.files)==null?void 0:j[0];h(null),i(""),y&&Fr(y).then(h,v=>i(v.message))}})]}),c&&e.jsx("img",{src:c.data_url,alt:"Selected logo",className:"h-12 w-12 rounded border object-contain"}),f&&e.jsx("p",{className:"text-sm text-destructive",children:f}),e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsx("p",{className:"text-xs text-muted-foreground",children:"An admin reviews every new organization."}),e.jsx(F,{type:"submit",variant:"outline",disabled:!a.trim()||!n.trim()&&!l.trim()||g.isPending,children:g.isPending?"Submitting...":"Submit for review"})]}),g.error&&e.jsx("p",{className:"text-sm text-destructive",children:ge(g.error,"Could not submit this organization.")})]})}const Tr=({open:t,onOpenChange:s,paperId:a,initialOrganizationIds:r,submitMode:n,isAuthor:d})=>{var y;const[l,o]=u.useState(r),[c,h]=u.useState(""),f=he();u.useEffect(()=>{t&&(o(r),h(""))},[r,t]);const i=ue({queryKey:["organizations","curation"],queryFn:()=>_e.organizations(!1),enabled:t}),g=u.useMemo(()=>{var C,P;const j=c.trim().toLocaleLowerCase();if(!j)return((C=i.data)==null?void 0:C.results)??[];const v=I=>I===j?0:I.startsWith(j)?1:I.split(/[^\p{L}\p{N}]+/u).some(S=>S.startsWith(j))?2:3;return(((P=i.data)==null?void 0:P.results)??[]).map(I=>({organization:I,name:I.name.toLocaleLowerCase()})).filter(({name:I})=>I.includes(j)).sort((I,S)=>v(I.name)-v(S.name)).map(({organization:I})=>I)},[(y=i.data)==null?void 0:y.results,c]),b=le({mutationFn:async()=>{if(!(r.some(v=>!l.includes(v))&&!window.confirm("Remove one or more organizations from this paper? Destructive edits may require a fresh sign-in.")))return n==="pending"?(await pe.submit({paper_id:Number(a),edit_type:"organizations",proposed_payload:{organization_ids:l}}),null):W.updateOrganizations(a,l)},onSuccess:j=>{j!==void 0&&(j&&ve(f,j,[a]),s(!1))}});return e.jsx(ee,{open:t,onOpenChange:s,children:e.jsxs(te,{children:[e.jsxs(se,{children:[e.jsx(ae,{children:"Edit organizations"}),e.jsx(re,{children:"Associate organizations with this paper. If one is missing, search for it and suggest it for review."})]}),n==="pending"&&e.jsx(xe,{isAuthor:d}),e.jsxs("div",{className:"relative",children:[e.jsx(Le,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),e.jsx(Q,{type:"search","aria-label":"Search organizations",placeholder:"Search organizations...",value:c,onChange:j=>h(j.target.value),className:"pl-9 pr-9"}),c&&e.jsx("button",{type:"button",onClick:()=>h(""),className:"absolute right-2 top-1/2 -translate-y-1/2 p-1 text-muted-foreground hover:text-foreground","aria-label":"Clear organization search",children:e.jsx(wt,{className:"h-4 w-4"})})]}),e.jsxs("div",{className:"max-h-80 space-y-2 overflow-auto",children:[g.map(j=>{const v=Number(j.id);return e.jsxs("label",{className:"flex items-center gap-2 rounded border p-2",children:[e.jsx("input",{type:"checkbox",checked:l.includes(v),onChange:C=>o(P=>C.target.checked?[...P,v]:P.filter(I=>I!==v))}),j.name]},j.id)}),!i.isLoading&&g.length===0&&e.jsx("p",{className:"py-8 text-center text-sm text-muted-foreground",children:c.trim()?`No organizations found matching "${c.trim()}"`:"No organizations available"})]}),!i.isLoading&&g.length===0&&c.trim()&&e.jsx(Ar,{paperId:a,initialName:c.trim()},c.trim()),e.jsxs(oe,{children:[e.jsx(F,{variant:"outline",onClick:()=>s(!1),children:"Cancel"}),e.jsx(F,{onClick:()=>b.mutate(),disabled:b.isPending,children:n==="pending"?"Submit test edit":"Save changes"})]})]})})};function Ur({open:t,onOpenChange:s,paperId:a,arxivId:r,initialProjectPages:n,onSuccess:d,submitMode:l="direct",isAuthor:o=!1}){const[c,h]=u.useState(n),[f,i]=u.useState(""),g=he(),{toast:b}=ie(),y=u.useRef(!1);u.useEffect(()=>{if(!t){y.current=!1;return}y.current||(y.current=!0,h(n),i(""))},[t,n]);const j=le({mutationFn:async({paperId:m,projectPages:x})=>l==="pending"?(await pe.submit({paper_id:parseInt(m),edit_type:"project_pages",proposed_payload:{project_pages:x}}),null):W.updateProjectPages(m,x),onSuccess:m=>{if(l==="pending"){b({title:"Edit submitted for review",description:"Thanks! An admin will review your proposed project page changes shortly."}),d==null||d(),s(!1),i("");return}m&&ve(g,m,[a,r]),d==null||d(),s(!1),i("")},onError:m=>{const x=ge(m,l==="pending"?"Failed to submit your edit. Please try again.":"Failed to update project pages.");b({title:l==="pending"?"Could not submit edit":"Could not save project pages",description:x,variant:"destructive"})}}),v=()=>{const m=f.trim();return m?c.some(x=>x.url===m)?(alert("This project page URL is already added"),null):[...c,{url:m,is_official:!1}]:c},C=()=>{const m=v();m!==null&&m.length!==c.length&&(h(m),i(""))},P=m=>{h(c.filter(x=>x.url!==m))},I=m=>{h(c.map(x=>x.url===m?{...x,is_official:!x.is_official}:x))},S=()=>{const m=v();m!==null&&(l==="direct"&&n.some(x=>!m.some(E=>E.url===x.url))&&!window.confirm("Remove one or more project pages from this paper?")||j.mutate({paperId:a,projectPages:m}))},_=u.useMemo(()=>{const m=f.trim(),x=m?[...c,{url:m,is_official:!1}]:c;if(x.length!==n.length)return!0;const E=new Map(n.map(A=>[A.url.trim(),!!A.is_official]));return x.some(A=>{const M=E.get(A.url.trim());return M===void 0||M!==!!A.is_official})},[c,f,n]);return e.jsx(ee,{open:t,onOpenChange:s,children:e.jsxs(te,{className:"max-w-2xl max-h-[600px]",children:[e.jsxs(se,{children:[e.jsx(ae,{children:"Edit Paper Project Pages"}),e.jsx(re,{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."})]}),l==="pending"&&e.jsx(xe,{isAuthor:o}),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(Q,{type:"url",placeholder:"https://example.com/project",value:f,onChange:m=>i(m.target.value),onKeyPress:m=>{m.key==="Enter"&&(m.preventDefault(),C())},className:"flex-1"}),e.jsxs(F,{onClick:C,size:"sm",disabled:!f.trim(),children:[e.jsx(Te,{className:"w-4 h-4 mr-1"}),"Add"]})]})]}),e.jsx("div",{className:"py-4 overflow-y-auto max-h-[350px]",children:c.length>0?e.jsx("div",{className:"space-y-2",children:c.map((m,x)=>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(Dt,{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:m.url}),m.is_official&&e.jsx(ts,{variant:"secondary",className:"text-xs",children:"Official"})]})}),e.jsxs("div",{className:"flex items-center space-x-1",children:[e.jsxs(F,{variant:m.is_official?"default":"outline",size:"sm",onClick:()=>I(m.url),className:"h-8 px-2 text-xs",title:m.is_official?"Click to unmark as official (created by paper authors)":"Click to mark as official (created by paper authors)",children:[e.jsx(ss,{className:`w-3.5 h-3.5 mr-1 ${m.is_official?"fill-current":""}`}),m.is_official?"Official":"Mark official"]}),e.jsx(F,{variant:"ghost",size:"sm",onClick:()=>P(m.url),className:"h-8 px-2 text-destructive hover:text-destructive",title:"Remove project page",children:e.jsx(Ae,{className:"w-4 h-4"})})]})]},x))}):e.jsxs("div",{className:"text-center py-8 text-muted-foreground",children:[e.jsx(Dt,{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(oe,{children:[e.jsx(F,{variant:"outline",onClick:()=>s(!1),children:"Cancel"}),e.jsx(F,{onClick:S,disabled:j.isPending||!_,children:j.isPending?e.jsxs(e.Fragment,{children:[e.jsx(ne,{className:"w-4 h-4 mr-2 animate-spin"}),l==="pending"?"Submitting...":"Saving..."]}):e.jsxs(e.Fragment,{children:[e.jsx(me,{className:"w-4 h-4 mr-2"}),l==="pending"?"Submit for review":"Save Changes"]})})]})]})})}function Dr({open:t,onOpenChange:s,paperId:a,arxivId:r,initialRepositories:n,onSuccess:d,submitMode:l="direct",isAuthor:o=!1}){const[c,h]=u.useState(n),[f,i]=u.useState(""),g=he(),{toast:b}=ie(),y=u.useRef(!1);u.useEffect(()=>{if(!t){y.current=!1;return}y.current||(y.current=!0,h(n),i(""))},[t,n]);const j=le({mutationFn:async({paperId:x,repositories:E})=>l==="pending"?(await pe.submit({paper_id:parseInt(x),edit_type:"repositories",proposed_payload:{repositories:E}}),null):W.updateRepositories(x,E),onSuccess:x=>{if(l==="pending"){b({title:"Edit submitted for review",description:"Thanks! An admin will review your proposed repository changes shortly."}),d==null||d(),s(!1),i("");return}x&&ve(g,x,[a,r]),d==null||d(),s(!1),i("")},onError:x=>{const E=ge(x,l==="pending"?"Failed to submit your edit. Please try again.":"Failed to update paper repositories.");b({title:l==="pending"?"Could not submit edit":"Could not save repositories",description:E,variant:"destructive"})}}),v=x=>{const E=[];for(const A of x){const M=E.find(q=>At(q.url,A.url));if(M)M.is_official=M.is_official||A.is_official;else{const q=Ye(A.url);E.push({url:q??A.url.trim(),is_official:A.is_official})}}return E},C=()=>{const x=f.trim(),E=x?[...c,{url:x,is_official:!1}]:c;return x&&c.some(A=>At(A.url,x))?(alert("This repository URL is already added"),null):v(E)},P=()=>{const x=C();x!==null&&x.length!==c.length&&(h(x),i(""))},I=x=>{h(c.filter(E=>E.url!==x))},S=x=>{h(c.map(E=>E.url===x?{...E,is_official:!E.is_official}:E))},_=()=>{const x=C();x!==null&&(l==="direct"&&n.some(E=>!x.some(A=>A.url===E.url))&&!window.confirm("Remove one or more repositories from this paper?")||j.mutate({paperId:a,repositories:x}))},m=u.useMemo(()=>{const x=f.trim(),E=x?[...c,{url:x,is_official:!1}]:c;if(E.length!==n.length)return!0;const A=v(n),M=v(E);if(M.length!==A.length)return!0;const q=new Map(A.map(K=>[Ye(K.url)??K.url.trim(),!!K.is_official]));return M.some(K=>{const G=Ye(K.url)??K.url.trim(),p=q.get(G);return p===void 0||p!==!!K.is_official})},[c,f,n]);return e.jsx(ee,{open:t,onOpenChange:s,children:e.jsxs(te,{className:"max-w-2xl max-h-[600px]",children:[e.jsxs(se,{children:[e.jsx(ae,{children:"Edit Paper Repositories"}),e.jsx(re,{children:"Add or remove GitHub repository URLs associated with this paper. Mark repositories as official if they are created by the paper authors."})]}),l==="pending"&&e.jsx(xe,{isAuthor:o}),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(Q,{type:"url",placeholder:"https://github.com/owner/repo",value:f,onChange:x=>i(x.target.value),onKeyPress:x=>{x.key==="Enter"&&(x.preventDefault(),P())},className:"flex-1"}),e.jsxs(F,{onClick:P,size:"sm",disabled:!f.trim(),children:[e.jsx(Te,{className:"w-4 h-4 mr-1"}),"Add"]})]})]}),e.jsx("div",{className:"py-4 overflow-y-auto max-h-[350px]",children:c.length>0?e.jsx("div",{className:"space-y-2",children:c.map((x,E)=>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(Tt,{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:x.url}),x.is_official&&e.jsx(ts,{variant:"secondary",className:"text-xs",children:"Official"})]})}),e.jsxs("div",{className:"flex items-center space-x-1",children:[e.jsxs(F,{variant:x.is_official?"default":"outline",size:"sm",onClick:()=>S(x.url),className:"h-8 px-2 text-xs",title:x.is_official?"Click to unmark as official (created by paper authors)":"Click to mark as official (created by paper authors)",children:[e.jsx(ss,{className:`w-3.5 h-3.5 mr-1 ${x.is_official?"fill-current":""}`}),x.is_official?"Official":"Mark official"]}),e.jsx(F,{variant:"ghost",size:"sm",onClick:()=>I(x.url),className:"h-8 px-2 text-destructive hover:text-destructive",title:"Remove repository",children:e.jsx(Ae,{className:"w-4 h-4"})})]})]},E))}):e.jsxs("div",{className:"text-center py-8 text-muted-foreground",children:[e.jsx(Tt,{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(oe,{children:[e.jsx(F,{variant:"outline",onClick:()=>s(!1),children:"Cancel"}),e.jsx(F,{onClick:_,disabled:j.isPending||!m,children:j.isPending?e.jsxs(e.Fragment,{children:[e.jsx(ne,{className:"w-4 h-4 mr-2 animate-spin"}),l==="pending"?"Submitting...":"Saving..."]}):e.jsxs(e.Fragment,{children:[e.jsx(me,{className:"w-4 h-4 mr-2"}),l==="pending"?"Submit for review":"Save Changes"]})})]})]})})}function Br({open:t,onOpenChange:s,paperId:a,arxivId:r,initialUrl:n,onSuccess:d,submitMode:l="direct",isAuthor:o=!1}){const[c,h]=u.useState(n),f=he(),{toast:i}=ie(),g=u.useRef(!1);u.useEffect(()=>{if(!t){g.current=!1;return}g.current||(g.current=!0,h(n))},[t,n]);const b=le({mutationFn:async({paperId:P,sourceUrl:I})=>l==="pending"?(await pe.submit({paper_id:parseInt(P),edit_type:"source_url",proposed_payload:{source_url:I}}),null):W.updateSourceUrl(P,I),onSuccess:P=>{if(l==="pending"){i({title:"Edit submitted for review",description:"Thanks! An admin will review your proposed source URL change shortly."}),d==null||d(),s(!1);return}P&&ve(f,P,[a,r]),d==null||d(),s(!1)},onError:P=>{const I=ge(P,l==="pending"?"Failed to submit your edit. Please try again.":"Failed to update source URL.");i({title:l==="pending"?"Could not submit edit":"Could not save source URL",description:I,variant:"destructive"})}}),y=c.trim(),j=/^https?:\/\//i.test(y),v=y!==(n||"").trim(),C=()=>{j&&b.mutate({paperId:a,sourceUrl:y})};return e.jsx(ee,{open:t,onOpenChange:s,children:e.jsxs(te,{className:"max-w-2xl",children:[e.jsxs(se,{children:[e.jsx(ae,{children:"Edit Source URL"}),e.jsxs(re,{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."]})]}),l==="pending"&&e.jsx(xe,{isAuthor:o}),e.jsxs("div",{className:"space-y-2 py-2",children:[e.jsx("label",{className:"text-sm font-medium",children:"Source URL"}),e.jsx(Q,{type:"url",placeholder:"https://example.com/paper",value:c,onChange:P=>h(P.target.value),onKeyPress:P=>{P.key==="Enter"&&j&&v&&(P.preventDefault(),C())}}),!j&&y.length>0&&e.jsx("p",{className:"text-xs text-destructive",children:"URL must start with http:// or https://"})]}),e.jsxs(oe,{children:[e.jsx(F,{variant:"outline",onClick:()=>s(!1),children:"Cancel"}),e.jsx(F,{onClick:C,disabled:b.isPending||!j||!v,children:b.isPending?e.jsxs(e.Fragment,{children:[e.jsx(ne,{className:"w-4 h-4 mr-2 animate-spin"}),l==="pending"?"Submitting...":"Saving..."]}):e.jsxs(e.Fragment,{children:[e.jsx(me,{className:"w-4 h-4 mr-2"}),l==="pending"?"Submit for review":"Save Changes"]})})]})]})})}const Hr=250,zr=100;function Mr({open:t,onOpenChange:s,paperId:a,arxivId:r,initialTaskIds:n,initialTasks:d,onSuccess:l,submitMode:o="direct",isAuthor:c=!1}){const[h,f]=u.useState(n),[i,g]=u.useState(!1),[b,y]=u.useState(""),[j,v]=u.useState(""),[C,P]=u.useState(new Map),I=he(),{toast:S}=ie(),_=u.useRef(!1);u.useEffect(()=>{if(!t){_.current=!1;return}if(_.current)return;_.current=!0,f(n),y(""),v("");const p=new Map;(d||[]).forEach($=>{const L=parseInt($.id);Number.isNaN(L)||p.set(L,$)}),P(p)},[t,n,d]),u.useEffect(()=>{const p=window.setTimeout(()=>{v(b.trim())},Hr);return()=>window.clearTimeout(p)},[b]);const{data:m,isFetching:x}=ue({queryKey:["tasks-search",j],queryFn:()=>_e.listTasks({page_size:zr,...j?{q:j}:{}}),enabled:t});u.useEffect(()=>{var p;(p=m==null?void 0:m.results)!=null&&p.length&&P($=>{const L=new Map($);return m.results.forEach(T=>{const U=parseInt(T.id);Number.isNaN(U)||L.set(U,T)}),L})},[m]);const E=u.useMemo(()=>{const p=(m==null?void 0:m.results)||[],$=new Set,L=[],T=(z,Y)=>{!Y||Number.isNaN(z)||$.has(z)||(L.push(Y),$.add(z))},U=()=>h.forEach(z=>T(z,C.get(z))),H=()=>p.forEach(z=>T(parseInt(z.id),z));return j?(H(),U()):(U(),H()),L},[m,h,C,j]),A=le({mutationFn:async({paperId:p,taskIds:$})=>o==="pending"?(await pe.submit({paper_id:parseInt(p),edit_type:"tasks",proposed_payload:{task_ids:$}}),null):W.updateTasks(p,$),onMutate:async({taskIds:p})=>{if(o==="pending")return{snapshots:[]};const $=p.map(U=>C.get(U)).filter(U=>!!U).map(U=>({id:U.id,name:U.name,slug:U.slug})).sort((U,H)=>U.name.localeCompare(H.name)),L=Array.from(new Set([a,r].filter(U=>!!U)));await Promise.all(L.flatMap(U=>[I.cancelQueries({queryKey:ye.detail(U)}),I.cancelQueries({queryKey:ye.arxiv(U)})]));const T=[];return L.forEach(U=>{[ye.detail(U),ye.arxiv(U)].forEach(H=>{const z=I.getQueryData(H);T.push({key:H,data:z}),z&&I.setQueryData(H,{...z,tasks:$})})}),S({title:"Tasks updated",description:`Saved ${p.length} task${p.length===1?"":"s"} for this paper.`}),l==null||l(),s(!1),{snapshots:T}},onSuccess:p=>{if(o==="pending"){S({title:"Edit submitted for review",description:"Thanks! An admin will review your proposed task changes shortly."}),l==null||l(),s(!1);return}p&&ve(I,p,[a,r])},onError:(p,$,L)=>{var U;(U=L==null?void 0:L.snapshots)==null||U.forEach(({key:H,data:z})=>{I.setQueryData(H,z)});const T=ge(p,o==="pending"?"Failed to submit your edit. Please try again.":"Failed to update paper tasks.");S({title:o==="pending"?"Could not submit edit":"Could not save tasks",description:T,variant:"destructive"})}}),M=()=>{o==="direct"&&n.some(p=>!h.includes(p))&&!window.confirm("Remove one or more task links from this paper?")||A.mutate({paperId:a,taskIds:h})},q=u.useMemo(()=>{if(h.length!==n.length)return!0;const p=new Set(n);return h.some($=>!p.has($))},[h,n]),K=(p,$)=>{f(L=>$?L.includes(p)?L:[...L,p]:L.filter(T=>T!==p))},G=()=>y("");return e.jsxs(ee,{open:t,onOpenChange:s,children:[e.jsxs(te,{className:"max-w-2xl max-h-[600px]",children:[e.jsxs(se,{children:[e.jsx(ae,{children:"Edit Paper Tasks"}),e.jsx(re,{children:"Select the tasks that this paper addresses. You can select multiple tasks."})]}),o==="pending"&&e.jsx(xe,{isAuthor:c}),e.jsxs("div",{className:"relative mb-4",children:[e.jsx(Le,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground"}),e.jsx(Q,{type:"text",placeholder:"Search tasks...",value:b,onChange:p=>y(p.target.value),className:"pl-9 pr-9"}),b&&e.jsx("button",{type:"button",onClick:G,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(wt,{className:"w-4 h-4"})})]}),e.jsx("div",{className:"py-4 overflow-y-auto max-h-[400px]",children:E.length>0?e.jsx("div",{className:"space-y-2",children:E.map(p=>{const $=parseInt(p.id),L=h.includes($);return e.jsxs("div",{className:"flex items-center space-x-2 p-2 hover:bg-muted/50 rounded-md",children:[e.jsx(Ge,{id:`task-${p.id}`,checked:L,onCheckedChange:T=>K($,T===!0),className:"!border !border-black data-[state=checked]:!bg-black data-[state=checked]:!text-white"}),e.jsxs("label",{htmlFor:`task-${p.id}`,className:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 cursor-pointer flex-1",children:[p.name,p.description&&e.jsxs("span",{className:"block text-xs text-muted-foreground font-normal mt-1",children:[p.description.substring(0,100),p.description.length>100?"...":""]})]})]},p.id)})}):x?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(Le,{className:"w-8 h-8 mx-auto mb-2 opacity-50"}),e.jsx("p",{children:j?`No tasks found matching "${j}"`:"No tasks available"})]})}),e.jsxs(oe,{children:[e.jsx(F,{variant:"ghost",className:"sm:mr-auto",onClick:()=>g(!0),children:"Suggest a new task"}),e.jsx(F,{variant:"outline",onClick:()=>s(!1),children:"Cancel"}),e.jsx(F,{onClick:M,disabled:A.isPending||!q,children:A.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(me,{className:"w-4 h-4 mr-2"}),o==="pending"?"Submit for review":"Save Changes"]})})]})]}),e.jsx(yt,{open:i,onOpenChange:g,paperId:a,kind:"task"})]})}const Mt=10,Or=/^https?:\/\/(?:www\.|mobile\.)?(?:x|twitter)\.com\/(?:[A-Za-z0-9_]{1,15}|i\/web|i)\/status(?:es)?\/(\d{1,25})(?:[/?#].*)?$/;function Ne(t){var s;return((s=Or.exec(t.trim()))==null?void 0:s[1])??null}function qr({open:t,onOpenChange:s,paperId:a,arxivId:r,initialUrls:n,submitMode:d="direct",isAuthor:l=!1}){const[o,c]=u.useState(n),[h,f]=u.useState(""),[i,g]=u.useState(null),b=he(),{toast:y}=ie(),j=u.useRef(!1);u.useEffect(()=>{if(!t){j.current=!1;return}j.current||(j.current=!0,c(n),f(""),g(null))},[t,n]);const v=le({mutationFn:async m=>d==="pending"?(await pe.submit({paper_id:parseInt(a),edit_type:"x_threads",proposed_payload:{x_threads:m}}),null):W.updateXThreads(a,m),onSuccess:m=>{d==="pending"?y({title:"Edit submitted for review",description:"Thanks! An admin will review your proposed X threads shortly."}):m&&ve(b,m,[a,r]),s(!1)},onError:m=>{y({title:d==="pending"?"Could not submit edit":"Could not save X threads",description:ge(m,d==="pending"?"Failed to submit your edit. Please try again.":"Failed to update X threads."),variant:"destructive"})}}),C=()=>{const m=h.trim();if(!m)return o;const x=Ne(m);return x?o.some(E=>Ne(E)===x)?(g("This post is already listed."),null):o.length>=Mt?(g(`A paper can link at most ${Mt} X threads.`),null):[...o,m]:(g("Paste a post URL such as https://x.com/user/status/123…"),null)},P=()=>{const m=C();m!==null&&(c(m),f(""),g(null))},I=(m,x)=>{const E=[...o];[E[m],E[m+x]]=[E[m+x],E[m]],c(E)},S=()=>{const m=C();m!==null&&(d==="direct"&&n.some(x=>!m.some(E=>Ne(E)===Ne(x)))&&!window.confirm("Remove one or more X threads from this paper?")||v.mutate(m))},_=u.useMemo(()=>(h.trim()?[...o,h.trim()]:o).map(Ne).join()!==n.map(Ne).join(),[o,h,n]);return e.jsx(ee,{open:t,onOpenChange:s,children:e.jsxs(te,{className:"max-w-2xl max-h-[600px]",children:[e.jsxs(se,{children:[e.jsx(ae,{children:"Edit X threads"}),e.jsx(re,{children:"Link posts on X (formerly Twitter) in which the authors introduce this paper. A preview of each post is shown on the paper page."})]}),d==="pending"&&e.jsx(xe,{isAuthor:l}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("label",{className:"text-sm font-medium",htmlFor:"x-thread-url",children:"Add X post URL"}),e.jsxs("div",{className:"flex space-x-2",children:[e.jsx(Q,{id:"x-thread-url",type:"url",placeholder:"https://x.com/user/status/1234567890",value:h,onChange:m=>{f(m.target.value),g(null)},onKeyDown:m=>{m.key==="Enter"&&(m.preventDefault(),P())},"aria-invalid":!!i,className:"flex-1"}),e.jsxs(F,{onClick:P,size:"sm",disabled:!h.trim(),children:[e.jsx(Te,{className:"w-4 h-4 mr-1"}),"Add"]})]}),i&&e.jsx("p",{className:"text-xs text-destructive",children:i})]}),e.jsx("div",{className:"py-4 overflow-y-auto max-h-[350px]",children:o.length>0?e.jsx("div",{className:"space-y-2",children:o.map((m,x)=>e.jsxs("div",{className:"flex items-center space-x-2 p-3 bg-muted/30 rounded-lg",children:[e.jsx("span",{className:"flex-1 min-w-0 truncate text-sm font-medium",children:m}),e.jsx(F,{variant:"ghost",size:"sm",className:"h-8 px-2",disabled:x===0,onClick:()=>I(x,-1),"aria-label":"Move up",children:e.jsx(La,{className:"w-4 h-4"})}),e.jsx(F,{variant:"ghost",size:"sm",className:"h-8 px-2",disabled:x===o.length-1,onClick:()=>I(x,1),"aria-label":"Move down",children:e.jsx(Ia,{className:"w-4 h-4"})}),e.jsx(F,{variant:"ghost",size:"sm",className:"h-8 px-2 text-destructive hover:text-destructive",onClick:()=>c(o.filter(E=>E!==m)),"aria-label":"Remove X thread",children:e.jsx(Ae,{className:"w-4 h-4"})})]},m))}):e.jsx("p",{className:"text-center py-8 text-sm text-muted-foreground",children:"No X threads linked yet"})}),e.jsxs(oe,{children:[e.jsx(F,{variant:"outline",onClick:()=>s(!1),children:"Cancel"}),e.jsx(F,{onClick:S,disabled:v.isPending||!_,children:v.isPending?e.jsxs(e.Fragment,{children:[e.jsx(ne,{className:"w-4 h-4 mr-2 animate-spin"}),d==="pending"?"Submitting...":"Saving..."]}):e.jsxs(e.Fragment,{children:[e.jsx(me,{className:"w-4 h-4 mr-2"}),d==="pending"?"Submit for review":"Save Changes"]})})]})]})})}function Kr({activeEditor:t,arxivId:s,editSubmitMode:a,evaluations:r,isAdmin:n,isLinkedAuthor:d,onOpenChange:l,paper:o}){if(!t)return null;const c={open:!0,paperId:o.id,arxivId:s,submitMode:a,isAuthor:d},h=i=>g=>l(i,g);return{tasks:()=>{var i;return e.jsx(Mr,{...c,onOpenChange:h("tasks"),initialTaskIds:((i=o.tasks)==null?void 0:i.map(g=>Number(g.id)))??[],initialTasks:o.tasks??[]})},methods:()=>{var i;return e.jsx(Lr,{...c,onOpenChange:h("methods"),initialMethodIds:((i=o.methods)==null?void 0:i.map(g=>Number(g.id)))??[],initialMethods:o.methods??[]})},repositories:()=>{var i;return e.jsx(Dr,{...c,onOpenChange:h("repositories"),initialRepositories:((i=o.repositories)==null?void 0:i.map(({url:g,is_official:b})=>({url:g,is_official:!!b})))??[]})},"project-pages":()=>{var i;return e.jsx(Ur,{...c,onOpenChange:h("project-pages"),initialProjectPages:((i=o.project_pages)==null?void 0:i.map(({url:g,is_official:b})=>({url:g,is_official:!!b})))??[]})},results:()=>e.jsx(_r,{...c,onOpenChange:h("results"),initialEvaluations:r,paperTasks:o.tasks??[],isAdmin:n}),"source-url":()=>e.jsx(Br,{...c,onOpenChange:h("source-url"),initialUrl:o.source_url??o.url_abs??""}),"hf-artifacts":()=>e.jsx(Nr,{...c,onOpenChange:h("hf-artifacts"),initialArtifacts:{hf_models:o.hf_models??[],hf_datasets:o.hf_datasets??[],hf_spaces:o.hf_spaces??[]}}),"x-threads":()=>{var i;return e.jsx(qr,{...c,onOpenChange:h("x-threads"),initialUrls:((i=o.x_threads)==null?void 0:i.map(({url:g})=>g))??[]})},organizations:()=>e.jsx(Tr,{open:!0,paperId:o.id,onOpenChange:h("organizations"),initialOrganizationIds:(o.organizations??[]).map(({id:i})=>Number(i)),submitMode:a,isAuthor:d})}[t]()}const Gr={"add-evals":{trigger:"add evals",running:"adding evals…",complete:"add evals ✓",title:"Add evaluations with Codex",description:t=>e.jsxs(e.Fragment,{children:["Codex will run the repository’s add-evals skill for “",t,"”. It will import only paper-native results onto existing, metric-compatible leaderboards. Accepted rows are written directly to the live database."]}),notice:"Comparator rows, unknown benchmarks, and unconfigured metrics will be skipped. Jobs run one at a time in submission order.",progress:"Codex is researching the paper and validating results against the configured leaderboards.",action:"Run add-evals",start:ka,get:_a,cancel:ya},"enrich-paper":{trigger:"enrich paper",running:"enriching…",complete:"enriched ✓",title:"Enrich paper with Codex",description:t=>e.jsxs(e.Fragment,{children:["Codex will run the repository’s enrich-paper skill for “",t,"”. It will validate official code and project links, merge high-confidence taxonomy tags, and check the paper thumbnail. Accepted changes are written directly to the live database."]}),notice:"Uncertain URLs and missing taxonomy concepts will be reported rather than guessed. Jobs run one at a time in submission order.",progress:"Codex is validating artifacts, taxonomy tags, and thumbnail quality for this paper.",action:"Run enrich-paper",start:wa,get:va,cancel:ja}};function Vr({report:t}){return e.jsx("div",{className:"min-w-0 max-h-[50vh] overflow-y-auto overflow-x-hidden rounded-md border bg-muted/40 p-4 text-sm leading-relaxed",children:e.jsx(Ea,{remarkPlugins:[Sa],components:{a:({children:s,...a})=>e.jsx("a",{...a,className:"break-all underline underline-offset-2",target:"_blank",rel:"noreferrer",children:s}),p:({children:s})=>e.jsx("p",{className:"mb-3 break-words last:mb-0",children:s}),ul:({children:s})=>e.jsx("ul",{className:"mb-3 list-disc space-y-1 pl-5 last:mb-0",children:s}),ol:({children:s})=>e.jsx("ol",{className:"mb-3 list-decimal space-y-1 pl-5 last:mb-0",children:s}),h1:({children:s})=>e.jsx("h3",{className:"mb-2 font-semibold",children:s}),h2:({children:s})=>e.jsx("h3",{className:"mb-2 font-semibold",children:s}),h3:({children:s})=>e.jsx("h3",{className:"mb-2 font-semibold",children:s}),code:({children:s})=>e.jsx("code",{className:"break-all rounded bg-background/80 px-1 py-0.5 font-mono text-xs",children:s}),pre:({children:s})=>e.jsx("pre",{className:"mb-3 max-w-full overflow-x-auto whitespace-pre-wrap break-words rounded bg-background/80 p-3 font-mono text-xs last:mb-0",children:s})},children:t})})}function fs({kind:t,paperId:s,paperTitle:a,triggerClassName:r,onComplete:n}){const d=Gr[t],[l,o]=u.useState(!1),[c,h]=u.useState(null),[f,i]=u.useState(!1),[g,b]=u.useState(null),y=u.useRef(null),j=(c==null?void 0:c.status)==="queued"||(c==null?void 0:c.status)==="dispatching"||(c==null?void 0:c.status)==="running",v=c==null?void 0:c.id;u.useEffect(()=>{if(!j||!v)return;let S=!1;const _=window.setInterval(async()=>{try{const m=await d.get(v);S||(h(m),b(null))}catch(m){S||b(m instanceof Error?m.message:"Could not check job status.")}},2e3);return()=>{S=!0,window.clearInterval(_)}},[j,d,v]),u.useEffect(()=>{(c==null?void 0:c.status)!=="completed"||y.current===c.id||(y.current=c.id,n())},[c,n]);const C=async()=>{i(!0),b(null);try{h(await d.start(s))}catch(S){b(S instanceof Error?S.message:"Could not start Codex.")}finally{i(!1)}},P=()=>{h(null),b(null),y.current=null},I=async()=>{if(c){b(null);try{h(await d.cancel(c.id))}catch(S){b(S instanceof Error?S.message:"Could not cancel Codex.")}}};return e.jsxs(ee,{open:l,onOpenChange:o,children:[e.jsx("button",{type:"button",className:r,onClick:()=>o(!0),children:j?d.running:(c==null?void 0:c.status)==="completed"?d.complete:d.trigger}),e.jsxs(te,{className:"max-h-[90vh] w-[calc(100vw-2rem)] min-w-0 max-w-2xl overflow-hidden",children:[e.jsxs(se,{className:"min-w-0",children:[e.jsx(ae,{children:d.title}),e.jsx(re,{children:d.description(a)})]}),c?e.jsxs("div",{className:"min-w-0 space-y-3 overflow-hidden",children:[e.jsxs("div",{className:"font-mono text-xs uppercase tracking-wide text-muted-foreground",children:["Status: ",c.status]}),c.hf_job_url&&e.jsx("a",{className:"text-sm underline",href:c.hf_job_url,target:"_blank",rel:"noreferrer",children:"View Hugging Face Job"}),j&&e.jsxs("div",{className:"rounded-md border bg-muted/40 p-3 text-sm",children:[c.status==="queued"?"This job is queued and will start after the current Codex job finishes.":d.progress," ","This can take several minutes; you can close this window and return."]}),c.report&&e.jsx(Vr,{report:c.report}),c.error&&e.jsx("div",{className:"rounded-md border border-destructive/40 bg-destructive/10 p-3 text-sm text-destructive",children:c.error})]}):e.jsx("div",{className:"rounded-md border bg-muted/40 p-3 text-sm text-muted-foreground",children:d.notice}),g&&e.jsx("div",{className:"rounded-md border border-destructive/40 bg-destructive/10 p-3 text-sm text-destructive",children:g}),e.jsxs(oe,{children:[e.jsx(F,{variant:"outline",onClick:()=>o(!1),children:j?"Close":"Cancel"}),j&&e.jsx(F,{variant:"outline",onClick:()=>void I(),children:"Cancel job"}),!c&&e.jsx(F,{onClick:C,disabled:f,children:f?"Starting…":d.action}),c&&!j&&e.jsx(F,{variant:"outline",onClick:P,children:"Run again"})]})]})]})}function Xr(t){return e.jsx(fs,{...t,kind:"add-evals",triggerClassName:"edit-link"})}function Se({accent:t,id:s,label:a}){return e.jsxs("div",{className:"section-rule paper-section-anchor",id:s,children:[e.jsx("span",{children:e.jsx("a",{href:`#${s}`,className:"section-anchor-link",children:a})}),t]})}function Qr({canCopyBadge:t,canEdit:s,evaluationsByTask:a,evaluationsLoading:r,isAdmin:n,onCopyBadge:d,onEdit:l,onRefresh:o,paper:c,visibleEvaluationCount:h}){return e.jsxs(e.Fragment,{children:[e.jsx(Se,{id:"results",label:"Results",accent:e.jsxs("span",{className:"accent",children:[h," benchmarks",t&&e.jsxs("button",{type:"button",className:"edit-link results-badge-copy",onClick:d,title:"Copy live leaderboard badges for your repository README",children:[e.jsx(Z,{name:"copy",size:10})," Copy PwC badge"]}),n&&Na()&&e.jsx(Xr,{paperId:Number(c.id),paperTitle:c.title,onComplete:o}),s&&e.jsx("button",{type:"button",onClick:l,className:"edit-link",children:"edit"})]})}),r?e.jsx($e,{className:"h-32 w-full"}):a.length>0?a.map(f=>e.jsxs("div",{className:f.taskSlug?"paper-section-anchor":void 0,id:f.taskSlug?rs(f.taskSlug):void 0,children:[e.jsxs("div",{className:"section-rule",children:[e.jsx("span",{children:f.taskSlug?e.jsxs(e.Fragment,{children:[e.jsx(fe,{to:`/tasks/${f.taskSlug}`,children:f.taskName}),e.jsx("a",{href:Qa(f.taskSlug),className:"section-anchor-link results-task-permalink","aria-label":`Permalink to ${f.taskName} results on this paper`,title:"Link to this task's results",children:"#"})]}):f.taskName}),e.jsxs("span",{className:"accent",children:[f.rows.length," ",f.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",{children:"Compare"})]})}),e.jsx("tbody",{children:f.rows.map(i=>{var g;return e.jsxs("tr",{children:[e.jsx("td",{className:"benchmark",children:i.dataset_slug?e.jsx(fe,{to:`/benchmark/${i.dataset_slug}`,children:i.dataset_name||"—"}):i.dataset_name||"—"}),e.jsxs("td",{className:"model",title:i.model_name||void 0,children:[i.hf_model_url?e.jsx("a",{href:i.hf_model_url,target:"_blank",rel:"noopener noreferrer",className:"model-hf-link",title:`Open ${i.model_name||"model"} on Hugging Face`,children:i.model_name||"—"}):i.model_name||"—",i.is_open===!1&&e.jsx(aa,{}),(i.external??i.is_external)&&e.jsx(ra,{sourceUrl:i.source_url||i.external_source_url||i.result_url})]}),e.jsx("td",{className:"metric",children:i.best_metric}),e.jsx("td",{className:"value",children:Ts((g=i.metrics)==null?void 0:g[i.best_metric||""])}),e.jsx("td",{className:"rank",children:i.best_rank!=null?`#${i.best_rank}`:"—"}),e.jsx("td",{className:"compare",children:i.dataset_slug&&e.jsx(fe,{to:`/benchmark/${i.dataset_slug}?${[i.task_slug?`task=${encodeURIComponent(i.task_slug)}`:"",`eval=${encodeURIComponent(i.id)}`].filter(Boolean).join("&")}`,children:"Compare →"})})]},i.id)})})]})]},f.taskId)):e.jsx("p",{style:{fontFamily:"var(--mono)",fontSize:12,color:"var(--ink-faint)"},children:"No benchmark results recorded yet."})]})}var Nt="Radio",[Wr,gs]=vt(Nt),[Zr,Yr]=Wr(Nt),xs=u.forwardRef((t,s)=>{const{__scopeRadio:a,name:r,checked:n=!1,required:d,disabled:l,value:o="on",onCheck:c,form:h,...f}=t,[i,g]=u.useState(null),b=Fe(s,v=>g(v)),y=u.useRef(!1),j=i?h||!!i.closest("form"):!0;return e.jsxs(Zr,{scope:a,checked:n,disabled:l,children:[e.jsx(ke.button,{type:"button",role:"radio","aria-checked":n,"data-state":ws(n),"data-disabled":l?"":void 0,disabled:l,value:o,...f,ref:b,onClick:Ie(t.onClick,v=>{n||c==null||c(),j&&(y.current=v.isPropagationStopped(),y.current||v.stopPropagation())})}),j&&e.jsx(vs,{control:i,bubbles:!y.current,name:r,value:o,checked:n,required:d,disabled:l,form:h,style:{transform:"translateX(-100%)"}})]})});xs.displayName=Nt;var bs="RadioIndicator",js=u.forwardRef((t,s)=>{const{__scopeRadio:a,forceMount:r,...n}=t,d=Yr(bs,a);return e.jsx(Qt,{present:r||d.checked,children:e.jsx(ke.span,{"data-state":ws(d.checked),"data-disabled":d.disabled?"":void 0,...n,ref:s})})});js.displayName=bs;var Jr="RadioBubbleInput",vs=u.forwardRef(({__scopeRadio:t,control:s,checked:a,bubbles:r=!0,...n},d)=>{const l=u.useRef(null),o=Fe(l,d),c=es(a),h=Zt(s);return u.useEffect(()=>{const f=l.current;if(!f)return;const i=window.HTMLInputElement.prototype,b=Object.getOwnPropertyDescriptor(i,"checked").set;if(c!==a&&b){const y=new Event("click",{bubbles:r});b.call(f,a),f.dispatchEvent(y)}},[c,a,r]),e.jsx(ke.input,{type:"radio","aria-hidden":!0,defaultChecked:a,...n,tabIndex:-1,ref:o,style:{...n.style,...h,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});vs.displayName=Jr;function ws(t){return t?"checked":"unchecked"}var en=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Ve="RadioGroup",[tn]=vt(Ve,[Yt,gs]),ys=Yt(),_s=gs(),[sn,an]=tn(Ve),ks=u.forwardRef((t,s)=>{const{__scopeRadioGroup:a,name:r,defaultValue:n,value:d,required:l=!1,disabled:o=!1,orientation:c,dir:h,loop:f=!0,onValueChange:i,...g}=t,b=ys(a),y=Us(h),[j,v]=Wt({prop:d,defaultProp:n??null,onChange:i,caller:Ve});return e.jsx(sn,{scope:a,name:r,required:l,disabled:o,value:j,onValueChange:v,children:e.jsx(Ds,{asChild:!0,...b,orientation:c,dir:y,loop:f,children:e.jsx(ke.div,{role:"radiogroup","aria-required":l,"aria-orientation":c,"data-disabled":o?"":void 0,dir:y,...g,ref:s})})})});ks.displayName=Ve;var Ns="RadioGroupItem",Cs=u.forwardRef((t,s)=>{const{__scopeRadioGroup:a,disabled:r,...n}=t,d=an(Ns,a),l=d.disabled||r,o=ys(a),c=_s(a),h=u.useRef(null),f=Fe(s,h),i=d.value===n.value,g=u.useRef(!1);return u.useEffect(()=>{const b=j=>{en.includes(j.key)&&(g.current=!0)},y=()=>g.current=!1;return document.addEventListener("keydown",b),document.addEventListener("keyup",y),()=>{document.removeEventListener("keydown",b),document.removeEventListener("keyup",y)}},[]),e.jsx(Bs,{asChild:!0,...o,focusable:!l,active:i,children:e.jsx(xs,{disabled:l,required:d.required,checked:i,...c,...n,name:d.name,ref:f,onCheck:()=>d.onValueChange(n.value),onKeyDown:Ie(b=>{b.key==="Enter"&&b.preventDefault()}),onFocus:Ie(n.onFocus,()=>{var b;g.current&&((b=h.current)==null||b.click())})})})});Cs.displayName=Ns;var rn="RadioGroupIndicator",Es=u.forwardRef((t,s)=>{const{__scopeRadioGroup:a,...r}=t,n=_s(a);return e.jsx(js,{...n,...r,ref:s})});Es.displayName=rn;var Ss=ks,Ps=Cs,nn=Es;const ft=u.forwardRef(({className:t,...s},a)=>e.jsx(Ss,{className:ze("grid gap-2",t),...s,ref:a}));ft.displayName=Ss.displayName;const Pe=u.forwardRef(({className:t,...s},a)=>e.jsx(Ps,{ref:a,className:ze("aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",t),...s,children:e.jsx(nn,{className:"flex items-center justify-center",children:e.jsx(Hs,{className:"h-2.5 w-2.5 fill-current text-current"})})}));Pe.displayName=Ps.displayName;const on={pdf:"PDF",model:"Model",dataset:"Dataset",space:"Space",github:"GitHub"},gt=/^[A-Za-z0-9][A-Za-z0-9._-]*$/,ln=/^[A-Za-z0-9][\w.-]*\/[A-Za-z0-9][\w.-]*$/,cn=20,xt="copy_to_bucket";function dn(t){const s=t.trim();if(!ln.test(s))return null;const[a,r]=s.split("/");return`https://huggingface.co/buckets/${encodeURIComponent(a)}/${encodeURIComponent(r)}`}function bt(t){return`pwc:bucket-copy:${t}`}function un(t){if(typeof window>"u"||new URL(window.location.href).searchParams.get(xt)!==t)return null;try{const a=window.sessionStorage.getItem(bt(t));if(!a)return null;const r=JSON.parse(a);return r.paperId!==t||typeof r.bucketId!="string"||!["new","existing"].includes(r.destinationMode)||!["public","private"].includes(r.visibility)||!Array.isArray(r.selectedIds)||r.selectedIds.some(n=>typeof n!="string")?null:r}catch{return null}}function mn(t,s=cn){if(s<1)throw new Error("Bucket copy batch size must be positive");const a=[];for(let r=0;r!gt.test(c)))return null;const l=d.join("/"),o=s==="model"?"":`${s}s/`;return{id:`${s}:${l}`,kind:s,label:l,url:`https://huggingface.co/${o}${l}`,source:`hf://${o}${l}/`,destination:`${s}s/${l}/`,repoId:l}}catch{return null}}function hn(t){try{const s=new URL(t);if(s.hostname!=="github.com"&&s.hostname!=="www.github.com")return null;const a=s.pathname.split("/").filter(Boolean);if(a.length<2)return null;const r=a[0],n=a[1].replace(/\.git$/,"");if(!gt.test(r)||!gt.test(n))return null;const d=`${r}/${n}`;return{id:`github:${d}`,kind:"github",label:d,url:`https://github.com/${d}`,source:`https://github.com/${d}.git`,destination:`github/${d}/`}}catch{return null}}function pn({githubUrls:t,hfModelUrls:s,hfDatasetUrls:a,hfSpaceUrls:r,paperId:n,pdfName:d,pdfUrl:l}){const o=[l?{id:"pdf",kind:"pdf",label:"Paper PDF",url:l,source:l,destination:`paper/${d||n}.pdf`}:null,...s.map(h=>dt(h,"model")),...a.map(h=>dt(h,"dataset")),...r.map(h=>dt(h,"space")),...t.map(hn)],c=new Set;return o.filter(h=>!h||c.has(h.id)?!1:(c.add(h.id),!0))}function fn(t,s,a){const r=["# Requires the Hugging Face CLI: https://huggingface.co/docs/huggingface_hub/guides/cli",`HF_BUCKET=${Be(t.trim())}`];a.create&&r.push(`hf buckets create "$HF_BUCKET" --exist-ok${a.isPrivate?" --private":""}`);for(const l of s.filter(o=>o.kind!=="github"&&o.kind!=="pdf"))r.push(`hf cp ${Be(l.source)} "hf://buckets/$HF_BUCKET/${l.destination}"`);const n=s.find(l=>l.kind==="pdf");n&&r.push('PWC_PDF="$(mktemp)"',`trap 'rm -f "$PWC_PDF"' EXIT`,`curl --fail --location ${Be(n.source)} --output "$PWC_PDF"`,`hf cp "$PWC_PDF" "hf://buckets/$HF_BUCKET/${n.destination}"`);const d=s.filter(l=>l.kind==="github");if(d.length){r.push('PWC_COPY_DIR="$(mktemp -d)"',`trap 'rm -rf "$PWC_COPY_DIR"' EXIT`);for(const l of d){const o=`$PWC_COPY_DIR/${l.destination.replace(/\/$/,"")}`;r.push(`git clone --depth 1 -- ${Be(l.source)} "${o}"`,`hf sync "${o}" "hf://buckets/$HF_BUCKET/${l.destination}" --exclude '.git/**'`)}}return r.join(` -`)}function gn(t){return`${(t.split(/[:|–—]/,1)[0]||t).normalize("NFKD").replace(/[\u0300-\u036f]/g,"").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"").slice(0,48).replace(/-+$/g,"")||"paper"}-artifacts`}function xn(t){const{toast:s}=ie(),a=u.useMemo(()=>pn({githubUrls:t.githubUrls,hfDatasetUrls:t.hfDatasetUrls,hfModelUrls:t.hfModelUrls,hfSpaceUrls:t.hfSpaceUrls,paperId:t.paperId,pdfName:t.pdfName,pdfUrl:t.pdfUrl}),[t.githubUrls,t.hfDatasetUrls,t.hfModelUrls,t.hfSpaceUrls,t.paperId,t.pdfName,t.pdfUrl]),r=u.useMemo(()=>un(t.paperId),[t.paperId]),[n,d]=u.useState(!!r),[l,o]=u.useState((r==null?void 0:r.destinationMode)??"new"),[c,h]=u.useState((r==null?void 0:r.bucketId)??""),[f,i]=u.useState((r==null?void 0:r.visibility)??"public"),[g,b]=u.useState(()=>new Set((r==null?void 0:r.selectedIds)??a.map(p=>p.id))),[y,j]=u.useState(!1),[v,C]=u.useState(null),[P,I]=u.useState(!!r),S=a.filter(p=>g.has(p.id)),_=S.length===a.length,m=dn(c),x=m!==null,E=fn(c,S,{create:l==="new",isPrivate:f==="private"}),A=(p,$)=>{b(L=>{const T=new Set(L);return $?T.add(p):T.delete(p),T})},M=async()=>{try{await navigator.clipboard.writeText(E),s({title:"Bucket copy commands copied",description:"Run them in a terminal where the Hugging Face CLI is signed in."})}catch{s({title:"Copy failed",description:"Could not access the clipboard. Select and copy the commands manually.",variant:"destructive"})}},q=u.useCallback(()=>{const p=zs("/api/v1/auth/hf/login"),$=new URL(window.location.href);$.searchParams.set(xt,t.paperId),window.sessionStorage.setItem(bt(t.paperId),JSON.stringify({paperId:t.paperId,bucketId:c.trim(),destinationMode:l,visibility:f,selectedIds:Array.from(g)}));const L=new URLSearchParams({return_to:$.toString(),authorize_bucket:"true"});l==="new"&&L.set("bucket_create","true"),window.location.assign(`${p}?${L.toString()}`)},[c,l,t.paperId,g,f]),K=u.useCallback(async()=>{if(!t.isSignedIn){q();return}j(!0);let p=0,$=0;try{const L=S.filter(H=>H.kind!=="pdf"&&H.kind!=="github"&&!!H.repoId).map(H=>({kind:H.kind,repo_id:H.repoId})),T=mn(L);T.length||T.push([]);for(const[H,z]of T.entries()){C({current:H+1,total:T.length});const Y=await W.copyToBucket(t.paperId,{bucket_id:c.trim(),create:H===0&&l==="new",private:f==="private",include_pdf:H===0&&S.some(J=>J.kind==="pdf"),artifacts:z});p+=Y.copied.length,$+=Y.errors.length}const U=S.filter(H=>H.kind==="github").length;s({title:$?"Bucket copy partially completed":"Copied to bucket",description:[`${p} item${p===1?"":"s"} copied.`,$?`${$} item${$===1?"":"s"} failed.`:"",U?"Use the generated commands below to copy GitHub repositories.":""].filter(Boolean).join(" "),variant:$?"destructive":void 0,action:m?e.jsx(Ms,{altText:"Open destination bucket",asChild:!0,children:e.jsx("a",{href:m,target:"_blank",rel:"noopener noreferrer",children:"Open bucket"})}):void 0}),!$&&!U&&d(!1)}catch(L){if(L instanceof ht&&L.code==="bucket_authorization_required"){q();return}s({title:p?"Bucket copy partially completed":"Bucket copy failed",description:p?`${p} item${p===1?"":"s"} copied before the request failed. You can retry or use the CLI commands below.`:L instanceof ht&&typeof L.detail=="string"?L.detail:"Hugging Face could not complete the copy. You can still use the CLI commands below.",variant:"destructive"})}finally{j(!1),C(null)}},[q,c,m,l,t.isSignedIn,t.paperId,S,s,f]);u.useEffect(()=>{if(!P||!t.isSignedIn)return;I(!1),window.sessionStorage.removeItem(bt(t.paperId));const p=new URL(window.location.href);p.searchParams.delete(xt),window.history.replaceState({},"",`${p.pathname}${p.search}${p.hash}`),K()},[K,t.isSignedIn,t.paperId,P]);const G=()=>{b(new Set(a.map(p=>p.id))),!c&&t.suggestedBucketId&&h(t.suggestedBucketId),d(!0)};return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"sidebar-card copy-to-bucket-card",children:[e.jsxs("button",{type:"button",className:"copy-to-bucket-trigger",onClick:G,children:[e.jsx("span",{className:"copy-to-bucket-arrow","aria-hidden":"true",children:"→"}),e.jsx("span",{className:"copy-to-bucket-title",children:"Copy to bucket"}),e.jsx("span",{className:"copy-to-bucket-new",children:"New"})]}),e.jsx("div",{className:"copy-to-bucket-meta",children:a.length?`${a.length} linked artifact${a.length===1?"":"s"}`:"No linked artifacts yet"})]}),e.jsx(ee,{open:n,onOpenChange:d,children:e.jsxs(te,{className:"max-h-[90vh] max-w-2xl grid-rows-[auto_minmax(0,1fr)_auto] overflow-hidden",children:[e.jsxs(se,{children:[e.jsxs(ae,{className:"flex items-center gap-2",children:[e.jsx("span",{className:"copy-to-bucket-dialog-arrow","aria-hidden":"true",children:"→"}),"Copy to bucket"]}),e.jsx(re,{children:"Keep your own copy of this paper's PDF, linked code, and Hugging Face artifacts. Hub repositories use Xet's server-side copy; GitHub repositories use the generated CLI fallback."})]}),e.jsx("div",{className:"-mx-6 min-h-0 overflow-y-auto px-6",children:a.length?e.jsxs("div",{className:"space-y-5",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(ce,{children:"Choose your destination"}),e.jsxs(ft,{value:l,onValueChange:p=>o(p),className:"grid grid-cols-2 gap-2",children:[e.jsxs(ce,{className:"bucket-choice",children:[e.jsx(Pe,{value:"new"}),"New bucket"]}),e.jsxs(ce,{className:"bucket-choice",children:[e.jsx(Pe,{value:"existing"}),"Existing bucket"]})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(ce,{htmlFor:"bucket-id",children:"Bucket name"}),e.jsx(Q,{id:"bucket-id",value:c,onChange:p=>h(p.target.value),placeholder:t.suggestedBucketId||"username/paper-artifacts","aria-invalid":c.length>0&&!x}),e.jsxs("div",{className:"flex items-center justify-between gap-3 text-xs",children:[e.jsx("p",{className:"text-muted-foreground",children:"Use the full Hugging Face bucket ID: namespace/name."}),m&&e.jsxs("a",{href:m,target:"_blank",rel:"noopener noreferrer",className:"inline-flex shrink-0 items-center gap-1 underline underline-offset-4",children:["View bucket",e.jsx(Z,{name:"external",size:10})]})]})]}),l==="new"&&e.jsxs("div",{className:"space-y-2",children:[e.jsx(ce,{children:"Bucket visibility"}),e.jsxs(ft,{value:f,onValueChange:p=>i(p),className:"flex gap-5",children:[e.jsxs(ce,{className:"flex items-center gap-2 font-normal",children:[e.jsx(Pe,{value:"public"}),"Public"]}),e.jsxs(ce,{className:"flex items-center gap-2 font-normal",children:[e.jsx(Pe,{value:"private"}),"Private"]})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center justify-between gap-3",children:[e.jsx(ce,{children:"Artifacts"}),e.jsx(F,{type:"button",variant:"outline",size:"sm",className:"h-7 px-2 text-xs",onClick:()=>b(_?new Set:new Set(a.map(p=>p.id))),children:_?"Deselect all":"Select all"})]}),e.jsx("div",{className:"bucket-artifact-list",children:a.map(p=>e.jsxs("div",{className:"bucket-artifact-row",children:[e.jsx(Ge,{id:`bucket-artifact-${p.id}`,checked:g.has(p.id),onCheckedChange:$=>A(p.id,$===!0)}),e.jsxs(ce,{htmlFor:`bucket-artifact-${p.id}`,className:"min-w-0 flex-1 cursor-pointer font-normal",children:[e.jsx("span",{className:"bucket-artifact-kind",children:on[p.kind]}),e.jsx("span",{className:"bucket-artifact-name",children:p.label})]}),e.jsxs("a",{href:de(p.url)??void 0,target:"_blank",rel:"noopener noreferrer",className:"bucket-artifact-open",children:["Open",e.jsx(Z,{name:"external",size:10})]})]},p.id))}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"The PDF and Hugging Face artifacts can be copied directly. GitHub repositories require the CLI workflow below."})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(ce,{htmlFor:"bucket-copy-commands",children:"CLI fallback"}),e.jsx("pre",{id:"bucket-copy-commands",className:"bucket-copy-commands h-[190px]",children:x?E:"Enter a bucket name above to prepare the copy commands."})]})]}):e.jsx("p",{className:"py-5 text-sm text-muted-foreground",children:"This paper does not have a linked GitHub repository or Hugging Face artifact to copy yet."})}),e.jsxs(oe,{children:[e.jsx("a",{href:"https://huggingface.co/docs/huggingface_hub/en/guides/buckets",target:"_blank",rel:"noopener noreferrer",className:"mr-auto text-sm text-muted-foreground underline underline-offset-4",children:"About Hugging Face Buckets"}),e.jsxs(F,{type:"button",onClick:M,variant:"outline",disabled:!x||S.length===0,children:[e.jsx(Z,{name:"copy",size:12}),"Copy commands"]}),e.jsx(F,{type:"button",onClick:K,disabled:y||t.isSignedIn&&(!x||!S.some(p=>p.kind!=="github")),children:y?v&&v.total>1?`Copying ${v.current}/${v.total}…`:"Copying…":t.isSignedIn?"Copy now":"Sign in & copy"})]})]})})]})}function bn({isLoading:t,papers:s}){return t?e.jsxs("div",{className:"sidebar-card","aria-busy":"true",children:[e.jsx("div",{className:"sidebar-card-title",children:"Related papers"}),e.jsx("div",{className:"related-meta",children:"Finding related work…"})]}):s!=null&&s.length?e.jsxs("div",{className:"sidebar-card",children:[e.jsx("div",{className:"sidebar-card-title",children:"Related papers"}),s.map(a=>e.jsxs(fe,{to:`/paper/${a.arxiv_id||a.id}`,target:"_blank",rel:"noopener noreferrer",className:"related-paper",style:{textDecoration:"none",color:"inherit"},children:[e.jsx("div",{className:"related-title",children:e.jsx(He,{title:a.title})}),e.jsxs("div",{className:"related-meta",children:[e.jsx("span",{children:a.arxiv_id?`arXiv:${a.arxiv_id}`:"External resource"}),a.citation_count!=null&&e.jsxs("span",{children:[a.citation_count.toLocaleString()," cites"]})]})]},a.id))]}):null}const jn=/(https?:\/\/[^\s]+)/g;function vn({size:t=12}){return e.jsx("svg",{width:t,height:t,viewBox:"0 0 24 24","aria-hidden":"true",focusable:"false",children:e.jsx("path",{fill:"currentColor",d:"M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"})})}function Ot(t){return t>=1e6?`${(t/1e6).toFixed(1)}M`:t>=1e3?`${(t/1e3).toFixed(1)}k`:String(t)}function wn(t){return new Date(t).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"})}function yn({text:t}){return e.jsx("p",{className:"x-thread-text",children:t.split(jn).map((s,a)=>a%2===1?e.jsx("span",{className:"x-thread-link",children:s.replace(/^https?:\/\/(www\.)?/,"").replace(/\/$/,"")},a):e.jsx(u.Fragment,{children:s},a))})}function _n({thread:t}){const[s,a]=u.useState(!1);return!t.author_avatar_url||s?e.jsx("span",{className:"x-thread-avatar x-thread-avatar--fallback","aria-hidden":"true",children:t.author_name.charAt(0).toUpperCase()}):e.jsx("img",{className:"x-thread-avatar",src:t.author_avatar_url,alt:"",loading:"lazy",referrerPolicy:"no-referrer",onError:()=>a(!0)})}function kn(){var t;return((t=window.matchMedia)==null?void 0:t.call(window,"(prefers-reduced-motion: reduce)").matches)??!1}function Nn({thread:t}){const[s,a]=u.useState(!1),[r,n]=u.useState(null),[d,l]=u.useState(!1),o=u.useRef(null),{targetRef:c,isIntersecting:h}=Pa({rootMargin:"200px"}),f=t.video_url;if(u.useEffect(()=>{if(!f||r||d||!h||kn())return;const g=new AbortController;return fetch(f,{referrerPolicy:"no-referrer",signal:g.signal}).then(b=>{if(!b.ok)throw new Error(`HTTP ${b.status}`);return b.blob()}).then(b=>n(URL.createObjectURL(b))).catch(()=>{g.signal.aborted||l(!0)}),()=>g.abort()},[f,r,d,h]),u.useEffect(()=>()=>{r&&URL.revokeObjectURL(r)},[r]),u.useEffect(()=>{const g=o.current;g&&(h?g.play().catch(()=>{}):g.pause())},[h,r]),!t.media_url||s)return null;const i=r&&!d;return e.jsx("div",{className:"x-thread-media",ref:c,children:i?e.jsx("video",{ref:o,src:r,poster:t.media_url,muted:!0,loop:!0,playsInline:!0,autoPlay:!0,"aria-label":"Video",onError:()=>l(!0)}):e.jsxs(e.Fragment,{children:[e.jsx("img",{src:t.media_url,alt:"",loading:"lazy",referrerPolicy:"no-referrer",onError:()=>a(!0)}),t.media_type==="video"&&e.jsx("span",{className:"x-thread-play","aria-label":"Video",children:"▶"})]})})}function Cn({thread:t}){const s=de(t.url);return s?e.jsxs("a",{href:s,target:"_blank",rel:"noopener noreferrer",className:"x-thread",children:[e.jsxs("div",{className:"x-thread-header",children:[e.jsx(_n,{thread:t}),e.jsxs("span",{className:"x-thread-author",children:[e.jsx("span",{className:"x-thread-name",children:t.author_name}),e.jsxs("span",{className:"x-thread-handle",children:["@",t.author_handle]})]}),e.jsx("span",{className:"x-thread-logo",children:e.jsx(vn,{})})]}),e.jsx(yn,{text:t.text}),e.jsx(Nn,{thread:t}),e.jsxs("div",{className:"x-thread-meta",children:[t.posted_at&&e.jsx("time",{dateTime:t.posted_at,children:wn(t.posted_at)}),t.like_count!=null&&e.jsxs("span",{children:["♥ ",Ot(t.like_count)]}),t.reply_count!=null&&t.reply_count>0&&e.jsxs("span",{children:[Ot(t.reply_count)," ",t.reply_count===1?"reply":"replies"]}),e.jsx("span",{className:"x-thread-read",children:"Read on X →"})]})]}):null}function En({onEdit:t,threads:s}){return e.jsxs("div",{className:"sidebar-card",children:[e.jsxs("div",{className:"sidebar-card-title",children:[e.jsx("span",{children:"X threads"}),e.jsxs("span",{className:"badge",children:[s.length," post",s.length===1?"":"s",e.jsx("button",{type:"button",onClick:t,className:"edit-link",children:"edit"})]})]}),s.length>0?e.jsx("div",{className:"x-thread-list",children:s.map(a=>e.jsx(Cn,{thread:a},a.tweet_id))}):e.jsx("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",padding:"6px 0"},children:"No author threads linked yet."})]})}const ut=3,qt=3;function Sn(t){return t>=1e3?`${(t/1e3).toFixed(1)}k`:String(t)}function Pn({allHfArtifactUrls:t,citationCopied:s,citationDisplay:a,hfArtifactViewer:r,onCopyCitation:n,onEditHfArtifacts:d,onEditRepositories:l,onEditXThreads:o,paper:c,relatedIsLoading:h,relatedPapers:f,user:i}){var v;const[g,b]=u.useState(!1),y=[...c.repositories??[]].sort((C,P)=>Number(P.is_official)-Number(C.is_official)||(P.num_stars||0)-(C.num_stars||0)),j=(g?y:y.slice(0,ut)).map(C=>({...C,safeHref:de(C.url)}));return 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:[y.length," repo",y.length===1?"":"s",e.jsx("button",{type:"button",onClick:l,className:"edit-link",children:"edit"})]})]}),j.filter(({safeHref:C})=>C).map(C=>e.jsxs("a",{href:C.safeHref??void 0,target:"_blank",rel:"noopener noreferrer",className:"code-line",style:{textDecoration:"none"},children:[e.jsxs("span",{className:"code-line-repo",children:[e.jsx(Z,{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:["★ ",Sn(C.num_stars)]})]},C.id)),y.length===0&&e.jsx("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",padding:"6px 0"},children:"No GitHub repositories linked yet."}),y.length>ut&&e.jsx("button",{type:"button",className:"bench-show-more",onClick:()=>b(C=>!C),children:g?"− show top 3":`+ show ${y.length-ut} more repos`})]}),e.jsx($n,{viewer:r,onEdit:d}),e.jsx(En,{threads:c.x_threads??[],onEdit:o}),e.jsx(xn,{githubUrls:y.map(({url:C})=>C),hfModelUrls:t.models,hfDatasetUrls:t.datasets,hfSpaceUrls:t.spaces,paperId:c.id,pdfName:((v=c.arxiv_id)==null?void 0:v.replace("/","-"))||c.id,pdfUrl:c.url_pdf,isSignedIn:!!i,suggestedBucketId:i?`${i.username}/${gn(c.title)}`:void 0}),e.jsx(bn,{isLoading:h,papers:f}),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:n,"aria-label":"Copy citation to clipboard",title:"Copy citation to clipboard",children:[e.jsx(Z,{name:"copy",size:11}),s?"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:a})]})]})}function $n({onEdit:t,viewer:s}){return e.jsxs("div",{className:"sidebar-card",children:[e.jsxs("div",{className:"sidebar-card-title",children:[s.paperHref?e.jsx("a",{href:s.paperHref,target:"_blank",rel:"noopener noreferrer",style:{color:"inherit",textDecoration:"none"},children:"🤗 Hugging Face"}):e.jsx("span",{children:"🤗 Hugging Face"}),e.jsx("button",{type:"button",onClick:t,className:"edit-link",children:"edit"})]}),s.isLoading?e.jsx($e,{className:"h-16 w-full"}):e.jsxs(e.Fragment,{children:[s.rows.map(a=>e.jsx(In,{...a},a.label)),s.footer&&e.jsx("div",{style:{fontFamily:"var(--mono)",fontSize:10,color:"var(--ink-faint)",marginTop:12},children:s.footer})]})]})}function In({count:t,href:s,isLimited:a,label:r,links:n}){const[d,l]=u.useState(!1),o=((n==null?void 0:n.length)??0)>qt,c=d?n:n==null?void 0:n.slice(0,qt),h=t!=null?`${t}${a?"+":""}`:"—";return e.jsxs("div",{className:"hf-artifact-row",children:[e.jsxs("div",{className:"hf-artifact-row-header",children:[e.jsx("span",{children:r}),t?e.jsx("a",{href:s,target:"_blank",rel:"noopener noreferrer",className:"hf-artifact-count",children:h}):e.jsx("span",{className:"hf-artifact-count hf-artifact-count--empty",children:h})]}),c!=null&&c.length?e.jsxs("div",{className:"hf-artifact-links",children:[c.map(f=>e.jsx("a",{href:f.href,target:"_blank",rel:"noopener noreferrer",children:f.label},f.href)),o&&e.jsx("button",{type:"button",className:"hf-artifact-toggle","aria-expanded":d,onClick:()=>l(f=>!f),children:d?"Show fewer":`View all ${n.length}`})]}):null]})}const Kt=360;function Ln({canEdit:t,onEditMethods:s,onEditTasks:a,paper:r}){var h,f;const[n,d]=u.useState(!1),l=r.abstract||"",o=l.length>Kt,c=n||!o?l:`${l.slice(0,Kt)}…`;return e.jsxs(e.Fragment,{children:[r.tldr&&e.jsxs(e.Fragment,{children:[e.jsx(Se,{id:"tldr",label:"TL;DR"}),e.jsx("div",{className:"tldr-box",children:r.tldr})]}),e.jsx(Se,{id:"abstract",label:"Abstract"}),e.jsx("p",{className:"abstract-text",style:{marginBottom:8},children:e.jsx(sa,{text:c})}),o&&e.jsx("button",{type:"button",className:"read-full",onClick:()=>d(i=>!i),children:n?"− collapse abstract":"+ read full abstract"}),e.jsx(Se,{id:"tasks",label:"Tasks",accent:e.jsxs("span",{className:"accent",children:[((h=r.tasks)==null?void 0:h.length)||0," tagged",t&&e.jsx("button",{type:"button",onClick:a,className:"edit-link",children:"edit"})]})}),e.jsx("div",{className:"paper-tags",style:{marginBottom:8},children:(r.tasks??[]).map(i=>e.jsx(Ys,{slug:i.slug||"",label:i.name},i.id))}),e.jsx(Se,{id:"methods",label:"Methods",accent:e.jsxs("span",{className:"accent",children:[((f=r.methods)==null?void 0:f.length)||0," used",t&&e.jsx("button",{type:"button",onClick:s,className:"edit-link",children:"edit"})]})}),e.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:6,marginBottom:8},children:(r.methods??[]).map(i=>e.jsx(Js,{method:i},i.id))})]})}const Ce=["my-bookmark-ids"],jt="pwc:pending-bookmark";function Rn(t){window.sessionStorage.setItem(jt,JSON.stringify(t)),window.location.assign($a(!0))}function Fn(){var r,n;const{user:t}=Oe(),s=ue({queryKey:Ce,queryFn:()=>pt.getBookmarkIds(),enabled:!!t,staleTime:60*1e3,refetchOnWindowFocus:!1}),a=Me.useMemo(()=>{var d;return new Set(((d=s.data)==null?void 0:d.paper_ids)??[])},[(r=s.data)==null?void 0:r.paper_ids]);return{ids:((n=s.data)==null?void 0:n.paper_ids)??[],idSet:a,isLoading:s.isLoading,isError:s.isError}}function An(){const{user:t}=Oe(),s=he(),a=le({mutationFn:async({paperId:n,isBookmarked:d})=>{d?await pt.removeBookmark(n):await pt.addBookmark(n)},onMutate:async({paperId:n,isBookmarked:d})=>{await s.cancelQueries({queryKey:Ce});const l=s.getQueryData(Ce),o=typeof n=="string"?Number(n):n,c=(l==null?void 0:l.paper_ids)??[],h=d?c.filter(f=>f!==o):[o,...c.filter(f=>f!==o)];return s.setQueryData(Ce,{paper_ids:h}),{previous:l}},onError:(n,d,l)=>{l!=null&&l.previous&&s.setQueryData(Ce,l.previous),n instanceof ht&&n.code==="saved_papers_bucket_authorization_required"&&Rn(d)},onSettled:()=>{s.invalidateQueries({queryKey:Ce}),s.invalidateQueries({queryKey:[...ye.feeds.saved]})}});return Me.useEffect(()=>{if(!t||a.isPending)return;const n=new URL(window.location.href);if(n.searchParams.get(Ut)!=="1")return;n.searchParams.delete(Ut),window.history.replaceState({},"",`${n.pathname}${n.search}${n.hash}`);const d=window.sessionStorage.getItem(jt);if(d){window.sessionStorage.removeItem(jt);try{const l=JSON.parse(d);(typeof l.paperId=="number"||typeof l.paperId=="string")&&typeof l.isBookmarked=="boolean"&&a.mutate(l)}catch{}}},[a,t]),{toggle:Me.useCallback((n,d)=>{if(!t){if(Jt())return;const l=typeof window<"u"?window.location.pathname+window.location.search:"/";window.location.href=Os(`/api/v1/auth/hf/login?return_to=${encodeURIComponent(l)}`);return}a.mutate({paperId:n,isBookmarked:d})},[a,t]),isPending:a.isPending}}const Tn=({paperId:t})=>{const{user:s}=Oe(),{idSet:a}=Fn(),{toggle:r,isPending:n}=An();if(Jt())return null;const d=Number(t),l=!!s&&a.has(d),o=()=>{Number.isFinite(d)&&r(d,l)},c=s&&l?"Saved":"Save",h=s?l?"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${l?" is-saved":""}`,onClick:o,disabled:n,"aria-pressed":l,"aria-label":h,title:h,children:[e.jsx(Z,{name:"bookmark",size:12}),c]})};function mt({children:t,showEdit:s=!1,onEdit:a,editAriaLabel:r}){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":r,children:"edit"})]}):t}function Un(t){return e.jsx(fs,{...t,kind:"enrich-paper",triggerClassName:"action-btn"})}const Dn={tasks:"tasks",methods:"methods",results:"evaluation results",repositories:"GitHub repositories","project-pages":"project pages","hf-artifacts":"Hugging Face artifacts",organizations:"organizations","source-url":"source URL","x-threads":"X threads"};function Gt(t){if(!t)return"—";try{return new Date(t).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"})}catch{return"—"}}function Vt(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 ki=()=>{const{arxivId:t}=qs(),s=Xt(),{toast:a}=ie(),{user:r}=Oe(),n=(r==null?void 0:r.is_admin)??!1,d=!!r,l=Fa(r),{arxivId:o,evaluations:c,evaluationsByTask:h,evaluationsLoading:f,paper:i,paperError:g,paperLoading:b,presentation:y,refetchEvaluations:j,refetchPaper:v,relatedQuery:C,versions:P,visibleEvaluations:I}=Ya(t,l),[S,_]=u.useState(!1),{activeEditor:m,openEditor:x,setEditorOpen:E}=tr();u.useEffect(()=>{l!=="direct"||!(i!=null&&i.id)||(m&&m!=="results"&&W.primeCurationState(i.id).catch(()=>{}),m==="results"&&qe.primeCurationState(i.id).catch(()=>{}))},[m,l,i==null?void 0:i.id]);const[A,M]=u.useState(null),q=u.useRef(!1);u.useEffect(()=>{if(!r||!i||q.current)return;const N=sessionStorage.getItem("pwc:fresh-auth-edit");if(!N)return;q.current=!0;const O=er(N);if(!W.freshAuthMutationDraft()){sessionStorage.removeItem("pwc:fresh-auth-edit"),O&&x(O);return}if(!window.confirm("You signed in again. Apply the saved destructive catalog edit now? The server will recheck the current catalog version before changing anything.")){a({title:"Edit kept locally",description:"Nothing was changed. Reload this paper when you are ready to confirm the saved edit."});return}W.resumeFreshAuthMutation().then(()=>{a({title:"Edit applied",description:"The restored catalog edit was applied."}),window.location.reload()}).catch(Rt=>{a({variant:"destructive",title:"Could not apply the saved edit",description:Rt instanceof Error?Rt.message:"Please reload and review the edit again."})})},[x,i,a,r]);const K=u.useMemo(()=>{if(!r||!(i!=null&&i.author_links))return!1;const N=r.username.toLowerCase();return i.author_links.some(O=>!!O.hf_username&&O.hf_username.toLowerCase()===N)},[r,i==null?void 0:i.author_links]),G=N=>{if(!d){M(N);return}x(N)},[p,$]=u.useState("idle"),[L,T]=u.useState(null),[U,H]=u.useState(null),z=async()=>{if(o){$("indexing"),T(null),H(null);try{await W.indexFromArxiv(o),a({title:"Indexed",description:"Paper added to database."}),setTimeout(()=>v(),1200),$("idle")}catch(N){const O=N;let be=O.message||"Failed to index paper";if(O.response)try{be=JSON.parse(O.response).detail||be}catch{be=O.response}T(be),(O.status===429||O.status===503)&&H("Try again later after arXiv has lifted the temporary limit."),$("idle")}}},Y=(y==null?void 0:y.citationCopy)??"",J=(y==null?void 0:y.copyableRanks)??[],[Xe,Ue]=u.useState(!1),we=async()=>{if(Y)try{await navigator.clipboard.writeText(Y),Ue(!0),a({title:"Citation copied",description:"BibTeX entry copied to clipboard."}),window.setTimeout(()=>Ue(!1),1500)}catch{a({title:"Copy failed",description:"Could not access the clipboard. Please copy manually.",variant:"destructive"})}},w=async()=>{if(!i)return;const N=i.arxiv_id||i.id,O=Ta(N,J);if(O)try{await navigator.clipboard.writeText(O),a({title:"PwC badges copied",description:"Each badge follows its current leaderboard result."})}catch{a({title:"Copy failed",description:"Could not access the clipboard. Please try again.",variant:"destructive"})}};if(b)return e.jsxs("div",{className:"page",children:[e.jsx($e,{className:"h-12 w-3/4 mb-4"}),e.jsx($e,{className:"h-6 w-1/3 mb-8"}),e.jsx($e,{className:"h-64 w-full"})]});if(g||!i)return e.jsxs("div",{className:"page",children:[e.jsxs("div",{className:"breadcrumb",children:[e.jsx(fe,{to:"/papers",children:"Papers"}),e.jsx("span",{className:"sep",children:"/"}),e.jsxs("span",{style:{color:"var(--ink)"},children:["arXiv:",o]})]}),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:",o]})," in the database. You can index it from arXiv right now."]}),L&&e.jsx(ca,{variant:"destructive",className:"mt-4 max-w-xl",children:e.jsxs(da,{children:[e.jsx("div",{children:L}),U&&e.jsx("div",{className:"mt-2",children:U})]})}),e.jsxs("div",{className:"action-row",children:[n&&e.jsxs("button",{className:"action-btn",onClick:z,disabled:p==="indexing",children:[e.jsx(Z,{name:"sparkle",size:12}),p==="indexing"?"Indexing…":"Index from arXiv"]}),e.jsx(F,{variant:"outline",onClick:()=>s("/papers"),children:"Browse Papers"})]})]});if(!y)return null;const{allHfArtifactUrls:k,authorEntries:R,citationDisplay:D,hasIntroducedItems:X,hasLineageItems:V,hfArtifactViewer:B,introducedBenchmarks:$s,introducedFrameworks:Ct,introducedMethods:Is,introducedSummary:Ls,numPages:Et,paperSourceLabel:St,predecessorPapers:Qe,projectPages:Ee,safeAbstractUrl:Pt,safeConferenceUrl:$t,safePdfUrl:It,sourceActionLabel:Rs,successorPapers:We}=y,De=12,Ze=Da(i,o),Lt=S||R.length<=De?R:R.slice(0,De);return e.jsxs("div",{className:"page",children:[e.jsxs("div",{className:"breadcrumb",children:[e.jsx(fe,{to:"/",children:"Trending"}),e.jsx("span",{className:"sep",children:"/"}),e.jsx("span",{children:St})]}),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.jsxs("h1",{className:"detail-title",children:[e.jsx(He,{title:i.title}),(i.organizations||[]).map(N=>e.jsx(fe,{to:`/orgs/${N.slug}`,className:`detail-title-org${N.logo_url?" detail-title-org--logo":""}`,title:N.name,"aria-label":N.name,children:N.logo_url?e.jsx("img",{src:N.logo_url,alt:"",onError:O=>{var be;(be=O.currentTarget.parentElement)==null||be.classList.remove("detail-title-org--logo"),O.currentTarget.replaceWith(N.name)}}):N.name},N.id))]}),e.jsxs("div",{className:"detail-meta",children:[e.jsx("span",{children:St}),e.jsx("span",{children:"·"}),e.jsxs("span",{children:["Submitted ",Gt(i.published)]}),Et&&e.jsxs(e.Fragment,{children:[e.jsx("span",{children:"·"}),e.jsxs("span",{children:[Et," pages"]})]}),i.citation_count!=null&&e.jsxs(e.Fragment,{children:[e.jsx("span",{children:"·"}),e.jsxs("span",{children:[i.citation_count.toLocaleString()," citations"]})]}),(i.proceeding||i.conference_slug)&&e.jsxs(e.Fragment,{children:[e.jsx("span",{children:"·"}),i.conference_slug?e.jsx("a",{href:`/conferences/${i.conference_slug}`,target:"_blank",rel:"noopener noreferrer",style:{color:"var(--accent-text)"},children:(i.proceeding||i.conference_name||"").replace(/\s+\d{1,2}$/,"")}):e.jsx("span",{children:i.proceeding.replace(/\s+\d{1,2}$/,"")})]}),P.length>1&&e.jsxs(e.Fragment,{children:[e.jsx("span",{children:"·"}),e.jsx("select",{className:"version-select",value:i.version,onChange:N=>{const O=N.target.value;i.arxiv_id&&s(`/paper/${i.arxiv_id.replace(/v\d+$/,"")}${O?`?version=${O}`:""}`)},children:P.map(N=>e.jsxs("option",{value:N.version,children:[N.version," — ",Gt(N.published)]},N.version))})]})]}),e.jsxs("div",{className:"detail-authors",children:[Lt.map((N,O)=>e.jsxs(Me.Fragment,{children:[N.id?e.jsx(fe,{to:`/authors/${N.id}`,children:N.name}):N.hf_username?e.jsx("a",{href:`https://huggingface.co/${N.hf_username}`,target:"_blank",rel:"noopener noreferrer",title:`@${N.hf_username} on Hugging Face`,children:N.name}):e.jsx("a",{children:N.name}),ODe&&e.jsx("button",{className:"show-more-authors",onClick:()=>_(N=>!N),style:{marginLeft:8,background:"none",border:"none",cursor:"pointer",color:"var(--accent-text)",fontFamily:"var(--mono)",fontSize:12},children:S?"show fewer":`+${i.authors.length-De} more`})]}),e.jsxs("div",{className:"action-row",children:[Ze&&Ks()&&(!Gs()||r!=null&&r.is_admin)?e.jsxs(fe,{className:"action-btn",to:Ze,onClick:()=>{const N=Ze.slice(5);sessionStorage.removeItem(`pwc:reader:session:${N}`),sessionStorage.removeItem(`pwc:reader:assistant-collapsed:${N}`),sessionStorage.removeItem(`pwc:reader:page:${N}`)},children:[e.jsx(Z,{name:"pdf",size:12})," Read paper",e.jsx("span",{className:"nav-new-badge","aria-hidden":"true",children:"New"})]}):It?e.jsxs("a",{className:"action-btn",href:It,target:"_blank",rel:"noopener noreferrer",children:[e.jsx(Z,{name:"pdf",size:12})," View PDF"]}):null,Pt&&e.jsx(mt,{showEdit:i.source==="external",onEdit:()=>G("source-url"),editAriaLabel:"Edit source URL",children:e.jsxs("a",{className:i.source==="external"?"action-btn-segment action-btn-main":"action-btn",href:Pt,target:"_blank",rel:"noopener noreferrer",children:[e.jsx(Z,{name:"external",size:12})," ",Rs]})}),Ee.length===1?e.jsx(mt,{showEdit:!0,onEdit:()=>G("project-pages"),editAriaLabel:"Edit project pages",children:e.jsxs("a",{className:"action-btn-segment action-btn-main",href:Ee[0].safeHref??void 0,target:"_blank",rel:"noopener noreferrer",children:[e.jsx(Z,{name:"globe",size:12})," Project page"]})}):null,Ee.length>1?e.jsx(mt,{showEdit:!0,onEdit:()=>G("project-pages"),editAriaLabel:"Edit project pages",children:e.jsxs(Vs,{children:[e.jsx(Xs,{asChild:!0,children:e.jsxs("button",{type:"button",className:"action-btn-segment action-btn-main",children:[e.jsx(Z,{name:"globe",size:12})," Project page"]})}),e.jsx(Qs,{align:"start",className:"project-page-menu",children:Ee.map((N,O)=>e.jsx(Ws,{asChild:!0,children:N.safeHref?e.jsx("a",{href:N.safeHref,target:"_blank",rel:"noopener noreferrer",children:Vt(N.url,`Project page ${O+1}`)}):e.jsx("span",{children:Vt(N.url,`Project page ${O+1}`)})},N.url))})]})}):null,Ee.length===0&&d?e.jsxs("button",{type:"button",className:"action-btn",onClick:()=>G("project-pages"),title:"Add project page",children:[e.jsx(Z,{name:"globe",size:12})," Add project page"]}):null,$t&&e.jsxs("a",{className:"action-btn",href:$t,target:"_blank",rel:"noopener noreferrer",children:[e.jsx(Z,{name:"external",size:12})," Conference"]}),e.jsx("button",{type:"button",className:"action-btn",onClick:()=>G("organizations"),children:"Edit organizations"}),e.jsx(mr,{paperId:Number(i.id),isAdmin:n}),n&&Ca()&&e.jsx(Un,{paperId:Number(i.id),paperTitle:i.title,onComplete:()=>void v()}),e.jsx(Tn,{paperId:i.id})]}),i.leaderboard_ranks&&i.leaderboard_ranks.length>0&&e.jsx(ea,{wrap:!0,paperHref:`/paper/${i.arxiv_id||i.id}`,ranks:i.leaderboard_ranks.filter(N=>N.best_rank>=1&&N.best_rank<=3).map(N=>({name:N.dataset_name,slug:N.dataset_slug||null,rank:N.best_rank}))})]}),e.jsx("div",{className:"detail-hero-thumb detail-thumb-wrap",children:e.jsx(ta,{paperId:i.arxiv_id||i.id,title:i.title,thumbnailUrl:Zs(i.thumbnail_url),priority:!0})})]}),X&&e.jsxs("div",{className:`introduced-banner${Ct.length>0?" introduced-banner--framework":""}`,children:[e.jsx("span",{className:"introduced-label",children:"Introduced"}),e.jsxs("div",{className:"introduced-methods",children:[Is.map(N=>e.jsxs("button",{type:"button",className:"introduced-pill",onClick:()=>s(`/methods/${N.slug||N.id}`),children:[N.name,e.jsx("span",{className:"introduced-arrow",children:"→"})]},`method-${N.id}`)),$s.map(N=>e.jsxs("button",{type:"button",className:"introduced-pill",onClick:()=>s(`/benchmark/${N.slug||N.id}`),children:[N.name,e.jsx("span",{className:"introduced-arrow",children:"→"})]},`benchmark-${N.id}`)),Ct.map(N=>e.jsxs("button",{type:"button",className:"introduced-pill",onClick:()=>s(`/frameworks#framework-${N.slug}`),children:[N.name,e.jsx("span",{className:"introduced-arrow",children:"→"})]},`framework-${N.slug}`))]}),e.jsxs("span",{className:"introduced-note",children:["This paper is the canonical source for ",Ls,"."]})]}),V&&e.jsxs("div",{className:"introduced-banner lineage-banner",children:[We.length>0&&e.jsxs("div",{className:"lineage-row",children:[e.jsx("span",{className:"introduced-label lineage-label",children:We.length===1?"Follow-up paper":"Follow-up papers"}),e.jsx("div",{className:"introduced-methods",children:We.map(N=>e.jsxs("button",{type:"button",className:"introduced-pill lineage-pill",onClick:()=>s(`/paper/${N.route_identifier}`),children:[e.jsx(He,{title:N.title}),e.jsx("span",{className:"introduced-arrow",children:"→"})]},`successor-${N.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(N=>e.jsxs("button",{type:"button",className:"introduced-pill lineage-pill",onClick:()=>s(`/paper/${N.route_identifier}`),children:[e.jsx("span",{className:"introduced-arrow lineage-arrow-back",children:"←"}),e.jsx(He,{title:N.title})]},`predecessor-${N.id}`))})]})]}),e.jsx(Ln,{canEdit:!0,onEditMethods:()=>G("methods"),onEditTasks:()=>G("tasks"),paper:i}),e.jsx(Qr,{canCopyBadge:J.length>0,canEdit:!0,evaluationsByTask:h,evaluationsLoading:f,isAdmin:n,onCopyBadge:w,onEdit:()=>G("results"),onRefresh:()=>void j(),paper:i,visibleEvaluationCount:(I==null?void 0:I.length)??0})]}),e.jsx(Pn,{allHfArtifactUrls:k,citationCopied:Xe,citationDisplay:D,hfArtifactViewer:B,onCopyCitation:we,onEditHfArtifacts:()=>G("hf-artifacts"),onEditRepositories:()=>G("repositories"),onEditXThreads:()=>G("x-threads"),paper:i,relatedIsLoading:C.isLoading,relatedPapers:C.data,user:r})]}),e.jsx(Kr,{activeEditor:m,arxivId:o,editSubmitMode:l,evaluations:c??[],isAdmin:n,isLinkedAuthor:K,onOpenChange:E,paper:i}),e.jsx(xa,{open:A!==null,onOpenChange:N=>{N||M(null)},sectionLabel:A?Dn[A]:"this paper",returnTo:typeof window<"u"?window.location.pathname:"/"})]})};export{ki as default}; diff --git a/assets/PaperDetailView-CYodx_mg.css b/assets/PaperDetailView-CYodx_mg.css deleted file mode 100644 index 3361d968a15c083878d9cbaf6769194bf9060ff2..0000000000000000000000000000000000000000 --- a/assets/PaperDetailView-CYodx_mg.css +++ /dev/null @@ -1 +0,0 @@ -.detail-grid{display:grid;grid-template-columns:1fr 320px;gap:56px;align-items:start}.detail-meta{display:flex;align-items:center;gap:16px;flex-wrap:wrap;font-family:var(--mono);font-size:11px;color:var(--ink-faint);margin-bottom:16px;padding-bottom:16px;border-bottom:1px solid var(--hairline)}.detail-authors{font-family:var(--serif);font-size:15px;color:var(--ink-soft);margin-bottom:8px;line-height:1.5}.detail-authors a{color:var(--ink);border-bottom:1px dotted var(--hairline-strong)}.detail-authors a:hover{border-bottom-color:var(--ink)}.abstract-text{font-family:var(--serif);font-size:16px;line-height:1.65;color:var(--ink);text-wrap:pretty;margin-bottom:32px}.abstract-text .first-letter:first-letter{font-size:3.2em;line-height:.9;float:left;margin:4px 8px 0 0;font-weight:600;font-family:var(--serif);color:var(--accent-text)}.project-page-menu{max-width:min(360px,calc(100vw - 24px))}.project-page-menu a{max-width:320px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.detail-hero{display:grid;grid-template-columns:minmax(0,1fr) 200px;gap:32px;align-items:stretch;margin-bottom:32px}.detail-hero-main{min-width:0}.detail-hero .action-row{margin-bottom:0}.detail-hero-thumb{display:flex;justify-content:center;align-self:stretch;min-height:0}.detail-hero-thumb>div{width:100%!important;max-width:200px;height:auto!important;aspect-ratio:160 / 220}.detail-hero-thumb>div>img,.detail-hero-thumb>div>svg{width:100%!important;height:100%!important}.detail-sidebar{font-size:13px}.sidebar-card{background:var(--bg-elevated);border:1px solid var(--hairline);border-radius:8px;padding:20px;margin-bottom:16px}.sidebar-card-title{font-family:var(--serif);font-size:15px;font-weight:600;margin-bottom:12px;display:flex;justify-content:space-between;align-items:baseline}.hf-artifact-row{display:block;padding:6px 0;border-bottom:1px dashed var(--hairline);font-family:var(--mono);font-size:11px;color:var(--ink-soft);text-decoration:none}.hf-artifact-row-header{display:flex;justify-content:space-between;align-items:center;gap:12px}.hf-artifact-count{font-weight:600;color:var(--ink);text-decoration:none}.hf-artifact-count:hover{text-decoration:underline}.hf-artifact-count--empty{color:var(--ink-faint)}.hf-artifact-links{display:flex;flex-direction:column;gap:4px;margin-top:6px;padding-left:10px}.hf-artifact-links a{color:var(--accent-text);text-decoration:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.hf-artifact-links a:hover{text-decoration:underline}.hf-artifact-toggle{align-self:flex-start;margin-top:2px;padding:0;border:0;background:transparent;color:var(--ink-faint);font:inherit;cursor:pointer}.hf-artifact-toggle:hover{color:var(--accent-text)}.sidebar-card-title .badge{font-family:var(--mono);font-size:10px;font-weight:500;color:var(--ink-faint);background:var(--bg-subtle);padding:2px 6px;border-radius:3px}.x-thread-list{display:flex;flex-direction:column;gap:10px}.x-thread{display:block;padding:12px;border:1px solid var(--hairline);border-radius:8px;background:var(--bg);color:var(--ink);text-decoration:none;transition:border-color .15s}.x-thread:hover{border-color:var(--hairline-strong)}.x-thread:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.x-thread-header{display:flex;align-items:center;gap:8px;min-width:0}.x-thread-avatar{width:28px;height:28px;border-radius:50%;flex-shrink:0;-o-object-fit:cover;object-fit:cover;background:var(--bg-subtle)}.x-thread-avatar--fallback{display:inline-flex;align-items:center;justify-content:center;font-family:var(--sans);font-size:12px;font-weight:600;color:var(--ink-soft)}.x-thread-author{display:flex;flex-direction:column;min-width:0;flex:1 1 auto;line-height:1.25}.x-thread-name{font-family:var(--sans);font-size:12.5px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.x-thread-handle{font-family:var(--mono);font-size:10.5px;color:var(--ink-faint);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.x-thread-logo{flex-shrink:0;color:var(--ink-soft);display:inline-flex}.x-thread-text{margin:10px 0 0;font-family:var(--sans);font-size:12.5px;line-height:1.5;color:var(--ink);white-space:pre-line;overflow-wrap:anywhere;display:-webkit-box;-webkit-line-clamp:7;-webkit-box-orient:vertical;overflow:hidden}.x-thread-link{color:var(--accent-text)}.x-thread-media{position:relative;margin-top:10px;border-radius:6px;overflow:hidden;border:1px solid var(--hairline);background:var(--bg-subtle);aspect-ratio:16 / 9}.x-thread-media img,.x-thread-media video{width:100%;height:100%;-o-object-fit:cover;object-fit:cover;display:block}.x-thread-play{position:absolute;inset:50% auto auto 50%;transform:translate(-50%,-50%);width:36px;height:36px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;padding-left:3px;font-size:13px;color:#fff;background:#0009}.x-thread-meta{display:flex;flex-wrap:wrap;align-items:center;gap:4px 10px;margin-top:10px;font-family:var(--mono);font-size:10.5px;color:var(--ink-faint)}.x-thread-read{margin-left:auto;color:var(--accent-text)}.citation-copy-btn{display:inline-flex;align-items:center;gap:4px;font-family:var(--mono);font-size:10px;font-weight:500;color:var(--ink-faint);background:var(--bg-subtle);border:1px solid var(--hairline);padding:2px 8px;border-radius:3px;cursor:pointer;transition:color .15s,border-color .15s,background .15s}.citation-copy-btn:hover{color:var(--ink);border-color:var(--ink)}.citation-copy-btn:focus-visible{outline:none;border-color:var(--ink);color:var(--ink)}.copy-to-bucket-card{padding:0;overflow:hidden}.copy-to-bucket-trigger{display:flex;align-items:center;gap:8px;width:100%;padding:13px 14px 8px;border:0;background:transparent;color:var(--ink);font-family:var(--sans);font-size:14px;font-weight:650;text-align:left;cursor:pointer}.copy-to-bucket-trigger:hover{color:var(--accent)}.copy-to-bucket-title{font-family:var(--serif);font-size:15px;font-weight:600}.copy-to-bucket-arrow{font-family:var(--sans);font-size:20px;font-weight:400;line-height:.75}.copy-to-bucket-dialog-arrow{font-family:var(--sans);font-size:26px;font-weight:400;line-height:1}.copy-to-bucket-new{margin-left:auto;padding:2px 5px;border-radius:4px;background:color-mix(in srgb,#2563eb 14%,transparent);color:#2563eb;font-size:9px;font-weight:800;letter-spacing:.04em;text-transform:uppercase}.copy-to-bucket-meta{padding:0 14px 12px 37px;color:var(--ink-faint);font-family:var(--mono);font-size:10px}.bucket-choice{display:flex;align-items:center;justify-content:center;gap:8px;min-height:46px;border:1px solid var(--hairline);border-radius:6px;font-weight:500;cursor:pointer}.bucket-choice:has([data-state=checked]){border-color:var(--ink-soft);box-shadow:inset 0 0 0 1px var(--ink-soft)}.bucket-artifact-list{max-height:168px;overflow-y:auto;border:1px solid var(--hairline);border-radius:6px}.bucket-artifact-row{display:flex;align-items:center;gap:9px;min-height:42px;padding:7px 10px;border-bottom:1px solid var(--hairline)}.bucket-artifact-row:last-child{border-bottom:0}.bucket-artifact-kind{display:inline-block;width:52px;color:var(--ink-faint);font-family:var(--mono);font-size:9px;text-transform:uppercase}.bucket-artifact-name{overflow-wrap:anywhere;color:var(--ink);font-family:var(--mono);font-size:11px}.bucket-artifact-open{display:flex;flex:none;align-items:center;gap:4px;color:var(--ink-soft);font-size:11px;text-decoration:none}.bucket-artifact-open:hover{color:var(--accent);text-decoration:underline}.bucket-copy-commands{max-height:190px;overflow:auto;margin:0;padding:12px;border:1px solid var(--hairline);border-radius:6px;background:var(--bg-subtle);color:var(--ink-soft);font-family:var(--mono);font-size:10px;line-height:1.5;white-space:pre-wrap;word-break:break-word}.code-line{font-family:var(--mono);font-size:11px;background:var(--bg);padding:8px 10px;border-radius:4px;border:1px solid var(--hairline);display:flex;justify-content:space-between;align-items:center;gap:10px;color:var(--ink-soft);margin-bottom:8px;min-width:0}.code-line-repo{display:flex;align-items:center;gap:8px;min-width:0;flex:1 1 auto}.code-line-repo-name{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.code-line-official{flex-shrink:0;font-family:var(--mono);font-size:10px;color:var(--accent-text)}.code-line-stars{flex-shrink:0;font-family:var(--mono);font-size:11px}.code-line .copy{color:var(--ink-faint);cursor:pointer;padding:2px 4px}.code-line .copy:hover{color:var(--ink)}.related-paper{display:block;padding:12px 0;border-bottom:1px solid var(--hairline);cursor:pointer}.related-paper:last-child{border-bottom:none;padding-bottom:0}.related-paper:first-child{padding-top:0}.related-title{font-family:var(--serif);font-size:13.5px;font-weight:500;line-height:1.3;margin-bottom:6px;color:var(--ink)}.related-paper:hover .related-title{color:var(--accent-text)}.related-meta{font-family:var(--mono);font-size:10px;color:var(--ink-faint);display:flex;gap:10px}.introduced-banner{display:flex;flex-wrap:wrap;align-items:center;gap:10px 14px;margin-top:18px;margin-bottom:8px;padding:12px 14px;background:var(--highlight-bg);border:1px solid var(--highlight-border);border-radius:3px}.introduced-label{font-family:var(--mono);font-size:10px;letter-spacing:.14em;text-transform:uppercase;color:var(--highlight-text);font-weight:600}.introduced-methods{display:flex;flex-wrap:wrap;gap:6px}.introduced-pill{display:inline-flex;align-items:center;gap:6px;padding:5px 11px;background:var(--bg-elevated);border:1px solid var(--highlight-border);border-radius:999px;font-family:var(--mono);font-size:12px;font-weight:500;color:var(--ink);cursor:pointer;transition:background .12s,border-color .12s}.introduced-pill:hover{background:var(--bg-subtle);border-color:var(--highlight-text)}.introduced-banner--framework{--highlight-bg: oklch(.97 .035 295);--highlight-text: oklch(.42 .1 295);--highlight-border: oklch(.85 .07 295)}.dark .introduced-banner--framework{--highlight-bg: oklch(.27 .04 295);--highlight-text: oklch(.82 .1 295);--highlight-border: oklch(.46 .07 295)}.introduced-arrow{font-family:var(--mono);color:var(--ink-faint);font-size:12px}.introduced-note{font-family:var(--serif);font-style:italic;font-size:13px;color:var(--ink-soft)}.lineage-banner{background:var(--info-bg);border-color:var(--info-border);flex-direction:column;align-items:stretch;gap:8px}.lineage-row{display:flex;flex-wrap:wrap;align-items:center;gap:10px 14px}.lineage-label{color:var(--info-text)}.lineage-pill{border-color:var(--info-border)}.lineage-pill:hover{background:var(--bg-subtle);border-color:var(--info-text)}.lineage-arrow-back{margin-right:-2px}.results-table{width:100%;border-collapse:collapse;font-size:13px;margin-bottom:32px;table-layout:fixed}.results-table th{text-align:left;font-family:var(--mono);font-size:10px;letter-spacing:.12em;text-transform:uppercase;color:var(--ink-faint);font-weight:500;padding:10px 6px;border-bottom:1px solid var(--hairline-strong);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.results-table th:first-child,.results-table td:first-child{padding-left:0}.results-table th:last-child,.results-table td:last-child{padding-right:0}.results-table td{padding:14px 6px;border-bottom:1px solid var(--hairline);font-family:var(--serif);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.results-table tr:last-child td{border-bottom:none}.results-table .task-link{color:var(--accent-text);font-family:var(--mono);font-size:11px;cursor:pointer}.results-table .task-link:hover{text-decoration:underline;text-underline-offset:3px}.results-table .model{color:var(--ink)}.results-table .model-hf-link{display:inline-flex;align-items:center;gap:4px;color:inherit;text-decoration:none}.results-table .model-hf-link:hover{text-decoration:underline;text-underline-offset:3px}.results-table .model-hf-link svg{opacity:.6;flex-shrink:0}.results-table .benchmark{color:var(--ink)}.results-table .benchmark a{color:inherit;text-decoration:none}.results-table .benchmark a:hover{color:var(--accent-text);text-decoration:underline;text-underline-offset:3px}.results-table .metric{font-family:var(--mono);font-size:11px;color:var(--ink-soft);text-transform:uppercase;letter-spacing:.05em}.results-table .value{font-family:var(--mono);font-size:13px;font-weight:600;color:var(--ink);font-feature-settings:"tnum"}.results-table .rank{font-family:var(--mono);font-size:12px;color:var(--ink-soft);font-feature-settings:"tnum"}.results-table .compare{font-family:var(--mono);font-size:11px;text-align:right}.results-table .compare a{color:var(--accent-text);cursor:pointer;white-space:nowrap}.results-table .compare a:hover{text-decoration:underline;text-underline-offset:3px}.tldr-box{position:relative;padding:18px 22px 18px 24px;background:var(--bg-elevated);border:1px solid var(--hairline);border-left:3px solid var(--accent);border-radius:4px;margin-bottom:32px;font-family:var(--serif);font-size:15px;line-height:1.6;color:var(--ink)}.tldr-box .model-stamp{position:absolute;top:18px;right:22px;font-family:var(--mono);font-size:9px;letter-spacing:.08em;color:var(--ink-faint)}.section-rule{font-family:var(--mono);font-size:10px;letter-spacing:.12em;text-transform:uppercase;color:var(--ink-faint);padding-bottom:10px;border-bottom:1px solid var(--hairline);margin-bottom:18px;margin-top:32px;display:flex;align-items:baseline;justify-content:space-between}.section-rule .accent{color:var(--ink-soft);font-family:var(--serif);font-style:italic;text-transform:none;letter-spacing:0;font-size:12px}.section-rule a:hover{color:var(--accent-text);text-decoration:underline;text-underline-offset:3px}.paper-section-anchor{scroll-margin-top:80px}.section-anchor-link{color:inherit;text-decoration:none}.section-anchor-link:hover{color:var(--accent-text);text-decoration:underline;text-underline-offset:3px}.results-task-permalink{margin-left:6px;font-size:11px;opacity:.55}.results-task-permalink:hover{opacity:1}.edit-link{margin-left:8px;background:none;border:none;cursor:pointer;color:var(--accent-text);text-decoration:underline;font-family:var(--mono);font-size:11px;padding:0}.edit-link:hover{opacity:.85}.results-badge-copy{position:relative;padding-left:16px;white-space:nowrap}.results-badge-copy svg{position:absolute;top:50%;left:0;transform:translateY(-50%)}.read-full{font-family:var(--mono);font-size:11px;color:var(--ink-faint);cursor:pointer;margin-top:12px}.read-full:hover{color:var(--accent-text)}.version-select{font-family:var(--mono);font-size:11px;background:var(--bg-elevated);border:1px solid var(--hairline-strong);border-radius:3px;padding:2px 6px;color:var(--ink);cursor:pointer}.version-select:hover{border-color:var(--accent)}@media (max-width: 880px){.detail-grid{grid-template-columns:minmax(0,1fr);gap:32px}.detail-grid>*{min-width:0}.detail-hero{grid-template-columns:minmax(0,1fr);gap:24px}.detail-hero .action-row>*{min-width:0;max-width:100%}.detail-hero .action-btn,.detail-hero .action-btn-segment.action-btn-main,.detail-hero .bm-action-btn{max-width:100%;white-space:normal;overflow-wrap:anywhere}.detail-hero-thumb{justify-content:flex-start}.detail-hero-thumb>div{max-width:200px;min-height:0;aspect-ratio:160 / 220;height:auto!important}.detail-sidebar{font-size:13px}}@media (max-width: 640px){.detail-hero-thumb{justify-content:center}.results-table{font-size:12px}.results-table th,.results-table td{padding:10px 4px}}.action-row{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:32px}.action-btn-composite{display:inline-flex;align-items:stretch;overflow:hidden;border:1px solid var(--hairline);border-radius:6px;background:var(--bg-elevated)}.action-btn-segment.action-btn-main{display:inline-flex;align-items:center;gap:6px;padding:7px 12px;border:0;background:transparent;color:var(--ink);font-size:12px;font-weight:500;text-decoration:none;cursor:pointer;transition:background .15s}.action-btn-segment.action-btn-main:hover,.action-btn-segment.action-btn-edit:hover{background:var(--bg-subtle)}.action-btn-segment.action-btn-edit{padding:7px 10px;border:0;border-left:1px solid var(--hairline);background:transparent;color:var(--accent-text);font-family:var(--mono);font-size:11px;font-weight:400;cursor:pointer;transition:background .15s} diff --git a/assets/PaperDetailView-Cug3AJDs.css b/assets/PaperDetailView-Cug3AJDs.css new file mode 100644 index 0000000000000000000000000000000000000000..197bc508e3dcc6990f42f300c40a799fc539b8e6 --- /dev/null +++ b/assets/PaperDetailView-Cug3AJDs.css @@ -0,0 +1 @@ +.detail-grid{display:grid;grid-template-columns:1fr 320px;gap:56px;align-items:start}.detail-meta{display:flex;align-items:center;gap:16px;flex-wrap:wrap;font-family:var(--mono);font-size:11px;color:var(--ink-faint);margin-bottom:16px;padding-bottom:16px;border-bottom:1px solid var(--hairline)}.detail-authors{font-family:var(--serif);font-size:15px;color:var(--ink-soft);margin-bottom:8px;line-height:1.5}.detail-authors a{color:var(--ink);border-bottom:1px dotted var(--hairline-strong)}.detail-authors a:hover{border-bottom-color:var(--ink)}.detail-author-avatar{display:inline-block;margin-right:5px;vertical-align:-5px;border-radius:50%;border:1px solid var(--hairline);-o-object-fit:cover;object-fit:cover}.abstract-text{font-family:var(--serif);font-size:16px;line-height:1.65;color:var(--ink);text-wrap:pretty;margin-bottom:32px}.abstract-text .first-letter:first-letter{font-size:3.2em;line-height:.9;float:left;margin:4px 8px 0 0;font-weight:600;font-family:var(--serif);color:var(--accent-text)}.project-page-menu{max-width:min(360px,calc(100vw - 24px))}.project-page-menu a{max-width:320px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.detail-hero{display:grid;grid-template-columns:minmax(0,1fr) 200px;gap:32px;align-items:stretch;margin-bottom:32px}.detail-hero-main{min-width:0}.detail-hero .action-row{margin-bottom:0}.detail-hero-thumb{display:flex;justify-content:center;align-self:stretch;min-height:0}.detail-hero-thumb>div{width:100%!important;max-width:200px;height:auto!important;aspect-ratio:160 / 220}.detail-hero-thumb>div>img,.detail-hero-thumb>div>svg{width:100%!important;height:100%!important}.detail-sidebar{font-size:13px}.sidebar-card{background:var(--bg-elevated);border:1px solid var(--hairline);border-radius:8px;padding:20px;margin-bottom:16px}.sidebar-card-title{font-family:var(--serif);font-size:15px;font-weight:600;margin-bottom:12px;display:flex;justify-content:space-between;align-items:baseline}.hf-artifact-row{display:block;padding:6px 0;border-bottom:1px dashed var(--hairline);font-family:var(--mono);font-size:11px;color:var(--ink-soft);text-decoration:none}.hf-artifact-row-header{display:flex;justify-content:space-between;align-items:center;gap:12px}.hf-artifact-count{font-weight:600;color:var(--ink);text-decoration:none}.hf-artifact-count:hover{text-decoration:underline}.hf-artifact-count--empty{color:var(--ink-faint)}.hf-artifact-links{display:flex;flex-direction:column;gap:4px;margin-top:6px;padding-left:10px}.hf-artifact-links a{color:var(--accent-text);text-decoration:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.hf-artifact-links a:hover{text-decoration:underline}.hf-artifact-toggle{align-self:flex-start;margin-top:2px;padding:0;border:0;background:transparent;color:var(--ink-faint);font:inherit;cursor:pointer}.hf-artifact-toggle:hover{color:var(--accent-text)}.sidebar-card-title .badge{font-family:var(--mono);font-size:10px;font-weight:500;color:var(--ink-faint);background:var(--bg-subtle);padding:2px 6px;border-radius:3px}.x-thread-list{display:flex;flex-direction:column;gap:10px}.x-thread{display:block;padding:12px;border:1px solid var(--hairline);border-radius:8px;background:var(--bg);color:var(--ink);text-decoration:none;transition:border-color .15s}.x-thread:hover{border-color:var(--hairline-strong)}.x-thread:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.x-thread-header{display:flex;align-items:center;gap:8px;min-width:0}.x-thread-avatar{width:28px;height:28px;border-radius:50%;flex-shrink:0;-o-object-fit:cover;object-fit:cover;background:var(--bg-subtle)}.x-thread-avatar--fallback{display:inline-flex;align-items:center;justify-content:center;font-family:var(--sans);font-size:12px;font-weight:600;color:var(--ink-soft)}.x-thread-author{display:flex;flex-direction:column;min-width:0;flex:1 1 auto;line-height:1.25}.x-thread-name{font-family:var(--sans);font-size:12.5px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.x-thread-handle{font-family:var(--mono);font-size:10.5px;color:var(--ink-faint);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.x-thread-logo{flex-shrink:0;color:var(--ink-soft);display:inline-flex}.x-thread-text{margin:10px 0 0;font-family:var(--sans);font-size:12.5px;line-height:1.5;color:var(--ink);white-space:pre-line;overflow-wrap:anywhere;display:-webkit-box;-webkit-line-clamp:7;-webkit-box-orient:vertical;overflow:hidden}.x-thread-link{color:var(--accent-text)}.x-thread-media{position:relative;margin-top:10px;border-radius:6px;overflow:hidden;border:1px solid var(--hairline);background:var(--bg-subtle);aspect-ratio:16 / 9}.x-thread-media img,.x-thread-media video{width:100%;height:100%;-o-object-fit:cover;object-fit:cover;display:block}.x-thread-play{position:absolute;inset:50% auto auto 50%;transform:translate(-50%,-50%);width:36px;height:36px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;padding-left:3px;font-size:13px;color:#fff;background:#0009}.x-thread-meta{display:flex;flex-wrap:wrap;align-items:center;gap:4px 10px;margin-top:10px;font-family:var(--mono);font-size:10.5px;color:var(--ink-faint)}.x-thread-read{margin-left:auto;color:var(--accent-text)}.citation-copy-btn{display:inline-flex;align-items:center;gap:4px;font-family:var(--mono);font-size:10px;font-weight:500;color:var(--ink-faint);background:var(--bg-subtle);border:1px solid var(--hairline);padding:2px 8px;border-radius:3px;cursor:pointer;transition:color .15s,border-color .15s,background .15s}.citation-copy-btn:hover{color:var(--ink);border-color:var(--ink)}.citation-copy-btn:focus-visible{outline:none;border-color:var(--ink);color:var(--ink)}.copy-to-bucket-card{padding:0;overflow:hidden}.copy-to-bucket-trigger{display:flex;align-items:center;gap:8px;width:100%;padding:13px 14px 8px;border:0;background:transparent;color:var(--ink);font-family:var(--sans);font-size:14px;font-weight:650;text-align:left;cursor:pointer}.copy-to-bucket-trigger:hover{color:var(--accent)}.copy-to-bucket-title{font-family:var(--serif);font-size:15px;font-weight:600}.copy-to-bucket-arrow{font-family:var(--sans);font-size:20px;font-weight:400;line-height:.75}.copy-to-bucket-dialog-arrow{font-family:var(--sans);font-size:26px;font-weight:400;line-height:1}.copy-to-bucket-new{margin-left:auto;padding:2px 5px;border-radius:4px;background:color-mix(in srgb,#2563eb 14%,transparent);color:#2563eb;font-size:9px;font-weight:800;letter-spacing:.04em;text-transform:uppercase}.copy-to-bucket-meta{padding:0 14px 12px 37px;color:var(--ink-faint);font-family:var(--mono);font-size:10px}.bucket-choice{display:flex;align-items:center;justify-content:center;gap:8px;min-height:46px;border:1px solid var(--hairline);border-radius:6px;font-weight:500;cursor:pointer}.bucket-choice:has([data-state=checked]){border-color:var(--ink-soft);box-shadow:inset 0 0 0 1px var(--ink-soft)}.bucket-artifact-list{max-height:168px;overflow-y:auto;border:1px solid var(--hairline);border-radius:6px}.bucket-artifact-row{display:flex;align-items:center;gap:9px;min-height:42px;padding:7px 10px;border-bottom:1px solid var(--hairline)}.bucket-artifact-row:last-child{border-bottom:0}.bucket-artifact-kind{display:inline-block;width:52px;color:var(--ink-faint);font-family:var(--mono);font-size:9px;text-transform:uppercase}.bucket-artifact-name{overflow-wrap:anywhere;color:var(--ink);font-family:var(--mono);font-size:11px}.bucket-artifact-open{display:flex;flex:none;align-items:center;gap:4px;color:var(--ink-soft);font-size:11px;text-decoration:none}.bucket-artifact-open:hover{color:var(--accent);text-decoration:underline}.bucket-copy-commands{max-height:190px;overflow:auto;margin:0;padding:12px;border:1px solid var(--hairline);border-radius:6px;background:var(--bg-subtle);color:var(--ink-soft);font-family:var(--mono);font-size:10px;line-height:1.5;white-space:pre-wrap;word-break:break-word}.code-line{font-family:var(--mono);font-size:11px;background:var(--bg);padding:8px 10px;border-radius:4px;border:1px solid var(--hairline);display:flex;justify-content:space-between;align-items:center;gap:10px;color:var(--ink-soft);margin-bottom:8px;min-width:0}.code-line-repo{display:flex;align-items:center;gap:8px;min-width:0;flex:1 1 auto}.code-line-repo-name{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.code-line-official{flex-shrink:0;font-family:var(--mono);font-size:10px;color:var(--accent-text)}.code-line-stars{flex-shrink:0;font-family:var(--mono);font-size:11px}.code-line .copy{color:var(--ink-faint);cursor:pointer;padding:2px 4px}.code-line .copy:hover{color:var(--ink)}.related-paper{display:block;padding:12px 0;border-bottom:1px solid var(--hairline);cursor:pointer}.related-paper:last-child{border-bottom:none;padding-bottom:0}.related-paper:first-child{padding-top:0}.related-title{font-family:var(--serif);font-size:13.5px;font-weight:500;line-height:1.3;margin-bottom:6px;color:var(--ink)}.related-paper:hover .related-title{color:var(--accent-text)}.related-meta{font-family:var(--mono);font-size:10px;color:var(--ink-faint);display:flex;gap:10px}.introduced-banner{display:flex;flex-wrap:wrap;align-items:center;gap:10px 14px;margin-top:18px;margin-bottom:8px;padding:12px 14px;background:var(--highlight-bg);border:1px solid var(--highlight-border);border-radius:3px}.introduced-label{font-family:var(--mono);font-size:10px;letter-spacing:.14em;text-transform:uppercase;color:var(--highlight-text);font-weight:600}.introduced-methods{display:flex;flex-wrap:wrap;gap:6px}.introduced-pill{display:inline-flex;align-items:center;gap:6px;padding:5px 11px;background:var(--bg-elevated);border:1px solid var(--highlight-border);border-radius:999px;font-family:var(--mono);font-size:12px;font-weight:500;color:var(--ink);cursor:pointer;transition:background .12s,border-color .12s}.introduced-pill:hover{background:var(--bg-subtle);border-color:var(--highlight-text)}.introduced-banner--framework{--highlight-bg: oklch(.97 .035 295);--highlight-text: oklch(.42 .1 295);--highlight-border: oklch(.85 .07 295)}.dark .introduced-banner--framework{--highlight-bg: oklch(.27 .04 295);--highlight-text: oklch(.82 .1 295);--highlight-border: oklch(.46 .07 295)}.introduced-arrow{font-family:var(--mono);color:var(--ink-faint);font-size:12px}.introduced-note{font-family:var(--serif);font-style:italic;font-size:13px;color:var(--ink-soft)}.lineage-banner{background:var(--info-bg);border-color:var(--info-border);flex-direction:column;align-items:stretch;gap:8px}.lineage-row{display:flex;flex-wrap:wrap;align-items:center;gap:10px 14px}.lineage-label{color:var(--info-text)}.lineage-pill{border-color:var(--info-border)}.lineage-pill:hover{background:var(--bg-subtle);border-color:var(--info-text)}.lineage-arrow-back{margin-right:-2px}.results-table{width:100%;border-collapse:collapse;font-size:13px;margin-bottom:32px;table-layout:fixed}.results-table th{text-align:left;font-family:var(--mono);font-size:10px;letter-spacing:.12em;text-transform:uppercase;color:var(--ink-faint);font-weight:500;padding:10px 6px;border-bottom:1px solid var(--hairline-strong);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.results-table th:first-child,.results-table td:first-child{padding-left:0}.results-table th:last-child,.results-table td:last-child{padding-right:0}.results-table td{padding:14px 6px;border-bottom:1px solid var(--hairline);font-family:var(--serif);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.results-table tr:last-child td{border-bottom:none}.results-table .task-link{color:var(--accent-text);font-family:var(--mono);font-size:11px;cursor:pointer}.results-table .task-link:hover{text-decoration:underline;text-underline-offset:3px}.results-table .model{color:var(--ink)}.results-table .model-hf-link{display:inline-flex;align-items:center;gap:4px;color:inherit;text-decoration:none}.results-table .model-hf-link:hover{text-decoration:underline;text-underline-offset:3px}.results-table .model-hf-link svg{opacity:.6;flex-shrink:0}.results-table .benchmark{color:var(--ink)}.results-table .benchmark a{color:inherit;text-decoration:none}.results-table .benchmark a:hover{color:var(--accent-text);text-decoration:underline;text-underline-offset:3px}.results-table .metric{font-family:var(--mono);font-size:11px;color:var(--ink-soft);text-transform:uppercase;letter-spacing:.05em}.results-table .value{font-family:var(--mono);font-size:13px;font-weight:600;color:var(--ink);font-feature-settings:"tnum"}.results-table .rank{font-family:var(--mono);font-size:12px;color:var(--ink-soft);font-feature-settings:"tnum"}.results-table .compare{font-family:var(--mono);font-size:11px;text-align:right}.results-table .compare a{color:var(--accent-text);cursor:pointer;white-space:nowrap}.results-table .compare a:hover{text-decoration:underline;text-underline-offset:3px}.tldr-box{position:relative;padding:18px 22px 18px 24px;background:var(--bg-elevated);border:1px solid var(--hairline);border-left:3px solid var(--accent);border-radius:4px;margin-bottom:32px;font-family:var(--serif);font-size:15px;line-height:1.6;color:var(--ink)}.tldr-box .model-stamp{position:absolute;top:18px;right:22px;font-family:var(--mono);font-size:9px;letter-spacing:.08em;color:var(--ink-faint)}.section-rule{font-family:var(--mono);font-size:10px;letter-spacing:.12em;text-transform:uppercase;color:var(--ink-faint);padding-bottom:10px;border-bottom:1px solid var(--hairline);margin-bottom:18px;margin-top:32px;display:flex;align-items:baseline;justify-content:space-between}.section-rule .accent{color:var(--ink-soft);font-family:var(--serif);font-style:italic;text-transform:none;letter-spacing:0;font-size:12px}.section-rule a:hover{color:var(--accent-text);text-decoration:underline;text-underline-offset:3px}.paper-section-anchor{scroll-margin-top:80px}.section-anchor-link{color:inherit;text-decoration:none}.section-anchor-link:hover{color:var(--accent-text);text-decoration:underline;text-underline-offset:3px}.results-task-permalink{margin-left:6px;font-size:11px;opacity:.55}.results-task-permalink:hover{opacity:1}.edit-link{margin-left:8px;background:none;border:none;cursor:pointer;color:var(--accent-text);text-decoration:underline;font-family:var(--mono);font-size:11px;padding:0}.edit-link:hover{opacity:.85}.results-badge-copy{position:relative;padding-left:16px;white-space:nowrap}.results-badge-copy svg{position:absolute;top:50%;left:0;transform:translateY(-50%)}.read-full{font-family:var(--mono);font-size:11px;color:var(--ink-faint);cursor:pointer;margin-top:12px}.read-full:hover{color:var(--accent-text)}.version-select{font-family:var(--mono);font-size:11px;background:var(--bg-elevated);border:1px solid var(--hairline-strong);border-radius:3px;padding:2px 6px;color:var(--ink);cursor:pointer}.version-select:hover{border-color:var(--accent)}@media (max-width: 880px){.detail-grid{grid-template-columns:minmax(0,1fr);gap:32px}.detail-grid>*{min-width:0}.detail-hero{grid-template-columns:minmax(0,1fr);gap:24px}.detail-hero .action-row>*{min-width:0;max-width:100%}.detail-hero .action-btn,.detail-hero .action-btn-segment.action-btn-main,.detail-hero .bm-action-btn{max-width:100%;white-space:normal;overflow-wrap:anywhere}.detail-hero-thumb{justify-content:flex-start}.detail-hero-thumb>div{max-width:200px;min-height:0;aspect-ratio:160 / 220;height:auto!important}.detail-sidebar{font-size:13px}}@media (max-width: 640px){.detail-hero-thumb{justify-content:center}.results-table{font-size:12px}.results-table th,.results-table td{padding:10px 4px}}.action-row{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:32px}.action-btn-composite{display:inline-flex;align-items:stretch;overflow:hidden;border:1px solid var(--hairline);border-radius:6px;background:var(--bg-elevated)}.action-btn-segment.action-btn-main{display:inline-flex;align-items:center;gap:6px;padding:7px 12px;border:0;background:transparent;color:var(--ink);font-size:12px;font-weight:500;text-decoration:none;cursor:pointer;transition:background .15s}.action-btn-segment.action-btn-main:hover,.action-btn-segment.action-btn-edit:hover{background:var(--bg-subtle)}.action-btn-segment.action-btn-edit{padding:7px 10px;border:0;border-left:1px solid var(--hairline);background:transparent;color:var(--accent-text);font-family:var(--mono);font-size:11px;font-weight:400;cursor:pointer;transition:background .15s} diff --git a/assets/PaperDetailView-lyG_Wyk5.js b/assets/PaperDetailView-lyG_Wyk5.js new file mode 100644 index 0000000000000000000000000000000000000000..3d1e66cf14529e25df517b0235d79749a4a9d2ef --- /dev/null +++ b/assets/PaperDetailView-lyG_Wyk5.js @@ -0,0 +1,39 @@ +import{g as Re,n as Fs,b as Xt,h as ie,k as As,r as m,j as e,l as me,m as he,o as ge,P as Qt,p as ke,q as Wt,s as Fe,t as Ie,v as Zt,w as vt,x as ze,X as wt,L as fe,y as Ts,z as Us,R as Ds,I as Bs,B as Yt,D as Hs,E as zs,T as Ms,A as ht,a as Oe,F as Me,G as pt,J as Jt,K as Os,u as qs,M as Ks,f as Gs,N as Vs,O as Xs,Q as Qs,S as Ws,U as Zs}from"./index-hxawG6mk.js";import{I as Z,T as Ys,M as Js,S as ea,a as ta}from"./components-Djdw_Z-e.js";import{L as He,a as sa}from"./LatexTitle-QTkECjbh.js";import{e as qe,C as aa,E as ra}from"./ExternalSourceEvalBadge-CxgGG_57.js";import{p as W}from"./papers-B0ysePyJ.js";import{s as de}from"./safeExternalHref-CkBrsh84.js";import{p as ye}from"./paperQueryKeys-BP2E-0yf.js";import{u as ue}from"./useQuery-B7vCF2Os.js";import{b as na}from"./usePapers-K74IxnFM.js";import{f as ia,D as oa}from"./latexPlainText-DI8YEXVe.js";import{s as la}from"./transform-DfrN0kQW.js";import{S as $e}from"./skeleton-CRfsRMNe.js";import{A as ca,a as da}from"./alert-2LCyXuCE.js";import{B as F}from"./button-DR59q2Iu.js";import{D as ee,a as te,b as se,c as ae,d as re,e as oe}from"./dialog-D2TDqr0v.js";import{u as ua}from"./useInfiniteQuery-BIEmOe8z.js";import{p as ma}from"./paperEdits-B1ZmleCA.js";import{C as ha}from"./copy-B2wC0pMM.js";import{I as Q}from"./input-BOLTsgbP.js";import{S as Ft,a as Le}from"./searchable-select-cLm40hhL.js";import{u as le}from"./useMutation-gPqxjZGO.js";import{c as _e}from"./catalog-ePebz7GX.js";import{s as pe,p as pa}from"./submissions-DgbzmxlX.js";import{e as fa,r as ga,a as ve}from"./evaluationQueryInvalidation-CC5JhGiX.js";import{S as yt,L as ce,a as xa}from"./SignInToEditDialog-4j2lLlXQ.js";import{L as ne}from"./loader-circle-CXb3415J.js";import{T as Ae,n as Ye,g as At}from"./github-Bf2b_Y1p.js";import{D as ba,c as ja,g as va,s as wa,a as ya,b as _a,d as ka,i as Na,e as Ca}from"./codexAddEvals-BJRRv0q0.js";import{P as Te}from"./plus-C1naIkSJ.js";import{u as es}from"./index-DvHdqmQp.js";import{B as ts}from"./badge-GWSoUTqe.js";import{G as Tt}from"./github-C-cqt6uw.js";import{M as Ea}from"./index-CaRYlo5c.js";import{r as Sa}from"./index-Ddr0k9KU.js";import{u as Pa}from"./useIntersectionObserver-rTEWxOEQ.js";import{S as Ut,s as $a}from"./savedPapersAuth-BIdugktw.js";import{h as Ia}from"./hfAvatar-CpaIt9Yp.js";import"./hover-card-DEHIu6q-.js";import"./popover-BEdoEHfx.js";import"./textarea-DzlRNXqF.js";/** + * @license lucide-react v0.462.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const La=Re("ArrowDown",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);/** + * @license lucide-react v0.462.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Ra=Re("ArrowUp",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);/** + * @license lucide-react v0.462.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Dt=Re("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"}]]);/** + * @license lucide-react v0.462.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Fa=Re("History",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]]);/** + * @license lucide-react v0.462.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const ss=Re("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"}]]);function Aa(t){return t!=null&&t.can_directly_edit_catalog?"direct":"pending"}function Ta(t){return(t??[]).filter(s=>!!(s.dataset_slug&&s.task_slug))}function Ua(t,s,a="https://paperswithcode.co"){return s.map(r=>{const n=encodeURIComponent(r.evaluation_id),d=`${a}/api/v1/papers/${encodeURIComponent(t)}/leaderboard-badge.svg?eval=${n}&live=1`,l=`${a}/api/v1/papers/${encodeURIComponent(t)}/leaderboard-badge-link?eval=${n}`;return`[![${`Papers with Code: ${r.best_rank===1?"SOTA":`#${r.best_rank}`} on ${r.dataset_name}`}](${d})](${l})`}).join(` +`)}function Da(t){const s=de(t);if(!s)return!1;const a=new URL(s);return`${a.pathname}?${a.search}`.toLowerCase().includes(".pdf")||a.pathname.toLowerCase().includes("/pdf")}function Ba(t,s){if(t.source==="external")return(Da(t.source_url)||!!de(t.conference_url_pdf))&&t.id?`/pdf/${t.id}`:null;const a=(t.arxiv_id||s).replace(/v\d+$/i,"");return de(t.url_pdf)&&a?`/pdf/${a}`:null}function Ha(t,s=!0){return ue({queryKey:["evaluations","paper",t],queryFn:()=>{if(!t)throw new Error("Paper ID is required");return qe.byPaper(t)},enabled:s&&!!t,staleTime:0,refetchOnMount:"always"})}const as=t=>t.replace(/v\d+$/,""),za={models:"https://huggingface.co/",datasets:"https://huggingface.co/datasets/",spaces:"https://huggingface.co/spaces/"},Je=(t,s)=>{const a=(t[s]||[]).length;return a<100?{count:a,isLimited:!1}:{count:a,isLimited:!0}},et=(t,s)=>{const a=t[s];return Array.isArray(a)?a.map(r=>{if(typeof r=="string")return r;if(r&&typeof r=="object"){const n=r;return n.id||n.repoId||null}return null}).filter(r=>!!r).map(r=>`${za[s]}${r}`):[]},Ma=async t=>{try{return(await fetch(`https://huggingface.co/api/papers/${as(t)}`)).ok}catch{return!1}},Oa=async t=>{const s=as(t),[a,r]=await Promise.all([fetch(`https://huggingface.co/api/arxiv/${s}/repos`).then(async o=>o.ok?o.json():(console.warn(`Failed to fetch repos for arXiv:${s}, status: ${o.status}`),null)).catch(o=>(console.warn(`Failed to fetch repos for arXiv:${s}:`,o),null)),Ma(s)]);if(!a)return{models:0,datasets:0,spaces:0,modelUrls:[],datasetUrls:[],spaceUrls:[],isLimited:!1,paperExists:r};const n=Je(a,"models"),d=Je(a,"datasets"),l=Je(a,"spaces");return{models:n.count,datasets:d.count,spaces:l.count,modelUrls:et(a,"models"),datasetUrls:et(a,"datasets"),spaceUrls:et(a,"spaces"),isLimited:n.isLimited||d.isLimited||l.isLimited,paperExists:r}},qa=t=>ue({queryKey:["huggingface-repos",t],queryFn:()=>Oa(t),enabled:!!t,staleTime:10*60*1e3,retry:1});function Ka(t,s){try{const a=new URL(t),r=a.pathname.replace(/\/$/,"").split("/").filter(Boolean).at(-1);return(r==null?void 0:r.replace(/[-_]+/g," "))||a.hostname.replace(/^www\./,"")}catch{return s}}function tt(t,s,a){return[...new Set([...t,...s??[]])].map(r=>({href:r,label:Ka(r,a)}))}function st(t,s,a){if(a==null&&t.length===0&&!(s!=null&&s.length))return;const r=new Set([...t,...s??[]]);return Math.max(r.size,a??0)}function at(t){return t[0]??"https://huggingface.co"}function rt(t,s){return s[0]??t}function Ga(t){const s=`${t.title.slice(0,60)}${t.title.length>60?"…":""}`,a=`${t.authors[0]||""}${t.authors.length>1?" et al.":""}`,r=t.authors.join(" and "),n=(t.published||"").slice(0,4)||"—",d=(l,o)=>t.arxiv_id?`@article{${t.arxiv_id.replace(".","")}, + title={{${l}}}, + author=${o}, + year={{${n}}}, + eprint={{${t.arxiv_id}}}, + archivePrefix={{arXiv}} +}`:`@misc{paper${t.id}, + title={{${l}}}, + author=${o}, + year={{${n}}}, + url={{${t.source_url||t.url_abs||""}}} +}`;return{citationDisplay:d(s,`{{${a}}}`),citationCopy:d(t.title,`{${r}}`)}}function Va(t,s,a){var x,b,y,j;const r={models:t.hf_models??[],datasets:t.hf_datasets??[],spaces:t.hf_spaces??[]},n={models:tt(r.models,s==null?void 0:s.modelUrls,"Model"),datasets:tt(r.datasets,s==null?void 0:s.datasetUrls,"Dataset"),spaces:tt(r.spaces,s==null?void 0:s.spaceUrls,"Space")},d={models:n.models.map(({href:v})=>v),datasets:n.datasets.map(({href:v})=>v),spaces:n.spaces.map(({href:v})=>v)},l=((x=t.arxiv_id)==null?void 0:x.replace(/v\d+$/,""))??null,o=t.arxiv_id?{isLoading:a,paperHref:`https://huggingface.co/papers/${l}`,rows:[{label:"Models",href:rt(`https://huggingface.co/models?other=arxiv:${t.arxiv_id}`,r.models),count:st(r.models,s==null?void 0:s.modelUrls,s==null?void 0:s.models),isLimited:s==null?void 0:s.isLimited,links:n.models},{label:"Datasets",href:rt(`https://huggingface.co/datasets?other=arxiv:${t.arxiv_id}`,r.datasets),count:st(r.datasets,s==null?void 0:s.datasetUrls,s==null?void 0:s.datasets),isLimited:s==null?void 0:s.isLimited,links:n.datasets},{label:"Spaces",href:rt(`https://huggingface.co/papers/${l}`,r.spaces),count:st(r.spaces,s==null?void 0:s.spaceUrls,s==null?void 0:s.spaces),isLimited:s==null?void 0:s.isLimited,links:n.spaces}],footer:`Cite arxiv.org/abs/${l} in a HF README to link it here.`}:{isLoading:!1,paperHref:null,rows:[{label:"Models",href:at(r.models),count:r.models.length,links:n.models},{label:"Datasets",href:at(r.datasets),count:r.datasets.length,links:n.datasets},{label:"Spaces",href:at(r.spaces),count:r.spaces.length,links:n.spaces}],footer:null},c=(t.methods??[]).filter(({source_paper_id:v})=>v===t.id),h=t.introduced_benchmarks??[],f=t.introduced_frameworks??[],i=[c.length&&(c.length===1?"this method":"these methods"),h.length&&(h.length===1?"this benchmark":"these benchmarks"),f.length&&(f.length===1?"this framework":"these frameworks")].filter(v=>!!v);return{...Ga(t),allHfArtifactUrls:d,authorEntries:t.authors.map((v,C)=>{var P,I,S,_,u,g;return{name:v,id:((I=(P=t.author_links)==null?void 0:P[C])==null?void 0:I.id)??null,hf_username:((_=(S=t.author_links)==null?void 0:S[C])==null?void 0:_.hf_username)??null,hf_avatar_url:((g=(u=t.author_links)==null?void 0:u[C])==null?void 0:g.hf_avatar_url)??null}}),copyableRanks:Ta(t.leaderboard_ranks),hasIntroducedItems:i.length>0,hasLineageItems:!!((b=t.predecessor_papers)!=null&&b.length||(y=t.successor_papers)!=null&&y.length),hfArtifactViewer:o,hfPaperExists:!!(s!=null&&s.paperExists),introducedBenchmarks:h,introducedFrameworks:f,introducedMethods:c,introducedSummary:i.join(" and "),numPages:t.num_pages||null,paperSourceLabel:t.arxiv_id?`arXiv:${t.arxiv_id}`:"External resource",predecessorPapers:t.predecessor_papers??[],projectPages:((j=t.project_pages)==null?void 0:j.filter(({url:v})=>v).map(v=>({...v,safeHref:de(v.url)})))??[],repoSummary:la(t.repositories),safeAbstractUrl:de(t.url_abs),safeConferenceUrl:de(t.conference_url_abs),safePdfUrl:de(t.url_pdf),sourceActionLabel:t.source==="external"?"Source page":"arXiv page",successorPapers:t.successor_papers??[]}}const Xa=["tldr","abstract","tasks","methods","results"];function Qa(t){if(!t)return{section:null,resultsTaskSlug:null};const[s,a]=t.split("?",2);if(!Xa.includes(s))return{section:null,resultsTaskSlug:null};const r=s;return r!=="results"||!a?{section:r,resultsTaskSlug:null}:{section:r,resultsTaskSlug:new URLSearchParams(a).get("task")}}const rs=t=>`results-task-${t}`,Wa=t=>`#results?task=${encodeURIComponent(t)}`;function Za(t,s){return t&&!!s}function Ya({direct:t,paperId:s,refetchEvaluations:a,refetchPaper:r}){r(),a(),!(!t||!s)&&(W.primeCurationState(s,!0).catch(()=>{}),qe.primeCurationState(s,!0).catch(()=>{}))}function Ja(t,s){const a=t?Fs(t):"",r=Xt(),{toast:n}=ie(),{preferences:d}=As(),l=na(a,!!a),o=l.data,[c,h]=m.useState(!1);m.useEffect(()=>{!t||t===a||r(`/paper/${a}${window.location.search}${window.location.hash}`,{replace:!0})},[a,r,t]),m.useEffect(()=>{if(o!=null&&o.title)return document.title=ia(o.title),()=>{document.title=oa}},[o==null?void 0:o.title]),m.useEffect(()=>{if(h(!1),!(o!=null&&o.id))return;const S=window.setTimeout(()=>h(!0),0);return()=>window.clearTimeout(S)},[o==null?void 0:o.id]);const f=Za(c,o==null?void 0:o.id),i=qa(c?o==null?void 0:o.arxiv_id:void 0),x=Ha(o==null?void 0:o.id,f),b=ue({queryKey:[...ye.feeds.versions,o==null?void 0:o.arxiv_id],queryFn:()=>W.versions(o.arxiv_id.replace(/v\d+$/,"")),enabled:f&&!!(o!=null&&o.arxiv_id),staleTime:10*60*1e3}),y=ue({queryKey:[...ye.feeds.related,o==null?void 0:o.id],queryFn:()=>W.related(o.arxiv_id||o.id,4),enabled:f,staleTime:10*60*1e3});m.useEffect(()=>{const S=()=>{Ya({direct:s==="direct",paperId:o==null?void 0:o.id,refetchEvaluations:x.refetch,refetchPaper:l.refetch}),n({title:"This section changed",description:"The latest state has been reloaded. Review your changes before submitting again.",variant:"destructive"})};return window.addEventListener("pwc:catalog-conflict",S),()=>window.removeEventListener("pwc:catalog-conflict",S)},[s,x.refetch,o==null?void 0:o.id,l.refetch,n]);const j=m.useMemo(()=>{const S=x.data;return!S||!d.hide_closed_source_evals?S:S.filter(_=>_.is_open!==!1)},[x.data,d.hide_closed_source_evals]),v=m.useMemo(()=>{if(!j)return[];const S=new Map;for(const _ of j){const u=S.get(_.task_id);u?u.rows.push(_):S.set(_.task_id,{taskId:_.task_id,taskName:_.task_name||"—",taskSlug:_.task_slug,rows:[_]})}return[...S.values()]},[j]),C=m.useMemo(()=>v.map(({taskSlug:S})=>S??"").join("|"),[v]),P=m.useMemo(()=>o?Va(o,i.data,i.isLoading):null,[i.data,i.isLoading,o]),I=m.useRef(!1);return m.useEffect(()=>{I.current=!1},[a]),m.useEffect(()=>{let S=0;const _=(g=!1,E=!1)=>{const{section:A,resultsTaskSlug:M}=Qa(window.location.hash.slice(1));if(!A||!o||A==="tldr"&&!o.tldr||A==="results"&&(!f||x.isLoading)||!g&&I.current)return;let q=A==="results"&&M?document.getElementById(rs(M)):document.getElementById(A);if(!q&&A==="results"&&M){if(v.some(({taskSlug:K})=>K===M))return;q=document.getElementById("results")}q&&(S=window.requestAnimationFrame(()=>{I.current=!0,q.scrollIntoView({block:"start",behavior:E?"smooth":"auto"})}))};_();const u=()=>{I.current=!1,_(!0,!0)};return window.addEventListener("hashchange",u),()=>{window.removeEventListener("hashchange",u),S&&window.cancelAnimationFrame(S)}},[v,x.isLoading,o,C,f]),{arxivId:a,evaluations:x.data,evaluationsByTask:v,evaluationsLoading:x.isLoading,hfLoading:i.isLoading,hfRepos:i.data,paper:o,paperError:l.error,paperLoading:l.isLoading,presentation:P,refetchEvaluations:x.refetch,refetchPaper:l.refetch,relatedQuery:y,versions:b.data??[],visibleEvaluations:j}}const er={tasks:"tasks",methods:"methods",evaluations:"results",repositories:"repositories",project_pages:"project-pages",hf_artifacts:"hf-artifacts",organizations:"organizations",source_url:"source-url",x_threads:"x-threads"};function tr(t){return er[t]??null}function sr(){const[t,s]=m.useState(null),a=m.useCallback(n=>{s(n)},[]),r=m.useCallback((n,d)=>{s(l=>d?n:l===n?null:l)},[]);return{activeEditor:t,openEditor:a,setEditorOpen:r}}const ar="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='256'%20height='257'%20preserveAspectRatio='xMidYMid'%20viewBox='0%200%20256%20257'%3e%3cpath%20fill='%23D97757'%20d='m50.228%20170.321%2050.357-28.257.843-2.463-.843-1.361h-2.462l-8.426-.518-28.775-.778-24.952-1.037-24.175-1.296-6.092-1.297L0%20125.796l.583-3.759%205.12-3.434%207.324.648%2016.202%201.101%2024.304%201.685%2017.629%201.037%2026.118%202.722h4.148l.583-1.685-1.426-1.037-1.101-1.037-25.147-17.045-27.22-18.017-14.258-10.37-7.713-5.25-3.888-4.925-1.685-10.758%207-7.713%209.397.649%202.398.648%209.527%207.323%2020.35%2015.75L94.817%2091.9l3.889%203.24%201.555-1.102.195-.777-1.75-2.917-14.453-26.118-15.425-26.572-6.87-11.018-1.814-6.61c-.648-2.723-1.102-4.991-1.102-7.778l7.972-10.823L71.42%200%2082.05%201.426l4.472%203.888%206.61%2015.101%2010.694%2023.786%2016.591%2032.34%204.861%209.592%202.592%208.879.973%202.722h1.685v-1.556l1.36-18.211%202.528-22.36%202.463-28.776.843-8.1%204.018-9.722%207.971-5.25%206.222%202.981%205.12%207.324-.713%204.73-3.046%2019.768-5.962%2030.98-3.889%2020.739h2.268l2.593-2.593%2010.499-13.934%2017.628-22.036%207.778-8.749%209.073-9.657%205.833-4.601h11.018l8.1%2012.055-3.628%2012.443-11.342%2014.388-9.398%2012.184-13.48%2018.147-8.426%2014.518.778%201.166%202.01-.194%2030.46-6.481%2016.462-2.982%2019.637-3.37%208.88%204.148.971%204.213-3.5%208.62-20.998%205.184-24.628%204.926-36.682%208.685-.454.324.519.648%2016.526%201.555%207.065.389h17.304l32.21%202.398%208.426%205.574%205.055%206.805-.843%205.184-12.962%206.611-17.498-4.148-40.83-9.721-14-3.5h-1.944v1.167l11.666%2011.406%2021.387%2019.314%2026.767%2024.887%201.36%206.157-3.434%204.86-3.63-.518-23.526-17.693-9.073-7.972-20.545-17.304h-1.36v1.814l4.73%206.935%2025.017%2037.59%201.296%2011.536-1.814%203.76-6.481%202.268-7.13-1.297-14.647-20.544-15.1-23.138-12.185-20.739-1.49.843-7.194%2077.448-3.37%203.953-7.778%202.981-6.48-4.925-3.436-7.972%203.435-15.749%204.148-20.544%203.37-16.333%203.046-20.285%201.815-6.74-.13-.454-1.49.194-15.295%2020.999-23.267%2031.433-18.406%2019.702-4.407%201.75-7.648-3.954.713-7.064%204.277-6.286%2025.47-32.405%2015.36-20.092%209.917-11.6-.065-1.686h-.583L44.07%20198.125l-12.055%201.555-5.185-4.86.648-7.972%202.463-2.593%2020.35-13.999-.064.065Z'/%3e%3c/svg%3e",rr="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='256'%20height='257'%20preserveAspectRatio='xMidYMid'%20viewBox='0%200%20256%20257'%3e%3cpath%20fill='%23D97757'%20d='m50.228%20170.321%2050.357-28.257.843-2.463-.843-1.361h-2.462l-8.426-.518-28.775-.778-24.952-1.037-24.175-1.296-6.092-1.297L0%20125.796l.583-3.759%205.12-3.434%207.324.648%2016.202%201.101%2024.304%201.685%2017.629%201.037%2026.118%202.722h4.148l.583-1.685-1.426-1.037-1.101-1.037-25.147-17.045-27.22-18.017-14.258-10.37-7.713-5.25-3.888-4.925-1.685-10.758%207-7.713%209.397.649%202.398.648%209.527%207.323%2020.35%2015.75L94.817%2091.9l3.889%203.24%201.555-1.102.195-.777-1.75-2.917-14.453-26.118-15.425-26.572-6.87-11.018-1.814-6.61c-.648-2.723-1.102-4.991-1.102-7.778l7.972-10.823L71.42%200%2082.05%201.426l4.472%203.888%206.61%2015.101%2010.694%2023.786%2016.591%2032.34%204.861%209.592%202.592%208.879.973%202.722h1.685v-1.556l1.36-18.211%202.528-22.36%202.463-28.776.843-8.1%204.018-9.722%207.971-5.25%206.222%202.981%205.12%207.324-.713%204.73-3.046%2019.768-5.962%2030.98-3.889%2020.739h2.268l2.593-2.593%2010.499-13.934%2017.628-22.036%207.778-8.749%209.073-9.657%205.833-4.601h11.018l8.1%2012.055-3.628%2012.443-11.342%2014.388-9.398%2012.184-13.48%2018.147-8.426%2014.518.778%201.166%202.01-.194%2030.46-6.481%2016.462-2.982%2019.637-3.37%208.88%204.148.971%204.213-3.5%208.62-20.998%205.184-24.628%204.926-36.682%208.685-.454.324.519.648%2016.526%201.555%207.065.389h17.304l32.21%202.398%208.426%205.574%205.055%206.805-.843%205.184-12.962%206.611-17.498-4.148-40.83-9.721-14-3.5h-1.944v1.167l11.666%2011.406%2021.387%2019.314%2026.767%2024.887%201.36%206.157-3.434%204.86-3.63-.518-23.526-17.693-9.073-7.972-20.545-17.304h-1.36v1.814l4.73%206.935%2025.017%2037.59%201.296%2011.536-1.814%203.76-6.481%202.268-7.13-1.297-14.647-20.544-15.1-23.138-12.185-20.739-1.49.843-7.194%2077.448-3.37%203.953-7.778%202.981-6.48-4.925-3.436-7.972%203.435-15.749%204.148-20.544%203.37-16.333%203.046-20.285%201.815-6.74-.13-.454-1.49.194-15.295%2020.999-23.267%2031.433-18.406%2019.702-4.407%201.75-7.648-3.954.713-7.064%204.277-6.286%2025.47-32.405%2015.36-20.092%209.917-11.6-.065-1.686h-.583L44.07%20198.125l-12.055%201.555-5.185-4.86.648-7.972%202.463-2.593%2020.35-13.999-.064.065Z'/%3e%3c/svg%3e",nr="data:image/svg+xml,%3csvg%20fill='%23111'%20fill-rule='evenodd'%20height='1em'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='1em'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eCodex%3c/title%3e%3cpath%20clip-rule='evenodd'%20d='M8.086.457a6.105%206.105%200%20013.046-.415c1.333.153%202.521.72%203.564%201.7a.117.117%200%2000.107.029c1.408-.346%202.762-.224%204.061.366l.063.03.154.076c1.357.703%202.33%201.77%202.918%203.198.278.679.418%201.388.421%202.126a5.655%205.655%200%2001-.18%201.631.167.167%200%2000.04.155%205.982%205.982%200%20011.578%202.891c.385%201.901-.01%203.615-1.183%205.14l-.182.22a6.063%206.063%200%2001-2.934%201.851.162.162%200%2000-.108.102c-.255.736-.511%201.364-.987%201.992-1.199%201.582-2.962%202.462-4.948%202.451-1.583-.008-2.986-.587-4.21-1.736a.145.145%200%2000-.14-.032c-.518.167-1.04.191-1.604.185a5.924%205.924%200%2001-2.595-.622%206.058%206.058%200%2001-2.146-1.781c-.203-.269-.404-.522-.551-.821a7.74%207.74%200%2001-.495-1.283%206.11%206.11%200%2001-.017-3.064.166.166%200%2000.008-.074.115.115%200%2000-.037-.064%205.958%205.958%200%2001-1.38-2.202%205.196%205.196%200%2001-.333-1.589%206.915%206.915%200%2001.188-2.132c.45-1.484%201.309-2.648%202.577-3.493.282-.188.55-.334.802-.438.286-.12.573-.22.861-.304a.129.129%200%2000.087-.087A6.016%206.016%200%20015.635%202.31C6.315%201.464%207.132.846%208.086.457zm-.804%207.85a.848.848%200%2000-1.473.842l1.694%202.965-1.688%202.848a.849.849%200%20001.46.864l1.94-3.272a.849.849%200%2000.007-.854l-1.94-3.393zm5.446%206.24a.849.849%200%20000%201.695h4.848a.849.849%200%20000-1.696h-4.848z'%3e%3c/path%3e%3c/svg%3e",ir="data:image/svg+xml,%3csvg%20fill='%23fff'%20fill-rule='evenodd'%20height='1em'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='1em'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eCodex%3c/title%3e%3cpath%20clip-rule='evenodd'%20d='M8.086.457a6.105%206.105%200%20013.046-.415c1.333.153%202.521.72%203.564%201.7a.117.117%200%2000.107.029c1.408-.346%202.762-.224%204.061.366l.063.03.154.076c1.357.703%202.33%201.77%202.918%203.198.278.679.418%201.388.421%202.126a5.655%205.655%200%2001-.18%201.631.167.167%200%2000.04.155%205.982%205.982%200%20011.578%202.891c.385%201.901-.01%203.615-1.183%205.14l-.182.22a6.063%206.063%200%2001-2.934%201.851.162.162%200%2000-.108.102c-.255.736-.511%201.364-.987%201.992-1.199%201.582-2.962%202.462-4.948%202.451-1.583-.008-2.986-.587-4.21-1.736a.145.145%200%2000-.14-.032c-.518.167-1.04.191-1.604.185a5.924%205.924%200%2001-2.595-.622%206.058%206.058%200%2001-2.146-1.781c-.203-.269-.404-.522-.551-.821a7.74%207.74%200%2001-.495-1.283%206.11%206.11%200%2001-.017-3.064.166.166%200%2000.008-.074.115.115%200%2000-.037-.064%205.958%205.958%200%2001-1.38-2.202%205.196%205.196%200%2001-.333-1.589%206.915%206.915%200%2001.188-2.132c.45-1.484%201.309-2.648%202.577-3.493.282-.188.55-.334.802-.438.286-.12.573-.22.861-.304a.129.129%200%2000.087-.087A6.016%206.016%200%20015.635%202.31C6.315%201.464%207.132.846%208.086.457zm-.804%207.85a.848.848%200%2000-1.473.842l1.694%202.965-1.688%202.848a.849.849%200%20001.46.864l1.94-3.272a.849.849%200%2000.007-.854l-1.94-3.393zm5.446%206.24a.849.849%200%20000%201.695h4.848a.849.849%200%20000-1.696h-4.848z'%3e%3c/path%3e%3c/svg%3e",or="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20id='cursor_light__Ebene_1'%20xmlns='http://www.w3.org/2000/svg'%20version='1.1'%20viewBox='0%200%20466.73%20532.09'%3e%3c!--Generator:%20Adobe%20Illustrator%2029.6.1,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%202.1.1%20Build%209)--%3e%3cdefs%3e%3cstyle%3e.cursor_light__st0{fill:%2326251e}%3c/style%3e%3c/defs%3e%3cpath%20class='cursor_light__st0'%20d='M457.43,125.94L244.42,2.96c-6.84-3.95-15.28-3.95-22.12,0L9.3,125.94c-5.75,3.32-9.3,9.46-9.3,16.11v247.99c0,6.65,3.55,12.79,9.3,16.11l213.01,122.98c6.84,3.95,15.28,3.95,22.12,0l213.01-122.98c5.75-3.32,9.3-9.46,9.3-16.11v-247.99c0-6.65-3.55-12.79-9.3-16.11h-.01ZM444.05,151.99l-205.63,356.16c-1.39,2.4-5.06,1.42-5.06-1.36v-233.21c0-4.66-2.49-8.97-6.53-11.31L24.87,145.67c-2.4-1.39-1.42-5.06,1.36-5.06h411.26c5.84,0,9.49,6.33,6.57,11.39h-.01Z'/%3e%3c/svg%3e",lr="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20id='cursor_dark__Ebene_1'%20xmlns='http://www.w3.org/2000/svg'%20version='1.1'%20viewBox='0%200%20466.73%20532.09'%3e%3c!--Generator:%20Adobe%20Illustrator%2029.6.1,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%202.1.1%20Build%209)--%3e%3cdefs%3e%3cstyle%3e.cursor_dark__st0{fill:%23edecec}%3c/style%3e%3c/defs%3e%3cpath%20class='cursor_dark__st0'%20d='M457.43,125.94L244.42,2.96c-6.84-3.95-15.28-3.95-22.12,0L9.3,125.94c-5.75,3.32-9.3,9.46-9.3,16.11v247.99c0,6.65,3.55,12.79,9.3,16.11l213.01,122.98c6.84,3.95,15.28,3.95,22.12,0l213.01-122.98c5.75-3.32,9.3-9.46,9.3-16.11v-247.99c0-6.65-3.55-12.79-9.3-16.11h-.01ZM444.05,151.99l-205.63,356.16c-1.39,2.4-5.06,1.42-5.06-1.36v-233.21c0-4.66-2.49-8.97-6.53-11.31L24.87,145.67c-2.4-1.39-1.42-5.06,1.36-5.06h411.26c5.84,0,9.49,6.33,6.57,11.39h-.01Z'/%3e%3c/svg%3e",cr="data:image/svg+xml,%3csvg%20width='512'%20height='512'%20viewBox='0%200%20512%20512'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20width='512'%20height='512'%20fill='%23FDFCFC'/%3e%3cpath%20d='M320%20224V352H192V224H320Z'%20fill='%23E6E5E6'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M384%20416H128V96H384V416ZM320%20160H192V352H320V160Z'%20fill='%2317181C'/%3e%3c/svg%3e",dr="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20version='1.1'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='512'%20height='512'%3e%3csvg%20width='512'%20height='512'%20viewBox='0%200%20512%20512'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20width='512'%20height='512'%20fill='%23131010'%3e%3c/rect%3e%3cpath%20d='M320%20224V352H192V224H320Z'%20fill='%235A5858'%3e%3c/path%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M384%20416H128V96H384V416ZM320%20160H192V352H320V160Z'%20fill='white'%3e%3c/path%3e%3c/svg%3e%3cstyle%3e@media%20(prefers-color-scheme:%20light)%20{%20:root%20{%20filter:%20none;%20}%20}%20@media%20(prefers-color-scheme:%20dark)%20{%20:root%20{%20filter:%20none;%20}%20}%20%3c/style%3e%3c/svg%3e",ns=[{name:"Claude",light:ar,dark:rr},{name:"Codex",light:nr,dark:ir},{name:"Cursor",light:or,dark:lr},{name:"OpenCode",light:cr,dark:dr}];function ur(){return e.jsx("span",{className:"ml-1 inline-flex shrink-0 items-center gap-1.5","aria-hidden":"true",children:ns.map(({name:t,light:s,dark:a})=>e.jsxs("span",{title:t,className:"inline-flex h-[18px] w-[18px]",children:[e.jsx("img",{src:s,alt:"",width:18,height:18,className:"h-full w-full object-contain dark:hidden"}),e.jsx("img",{src:a,alt:"",width:18,height:18,className:"hidden h-full w-full object-contain dark:block"})]},t))})}function mr(){return e.jsx("ul",{className:"flex flex-wrap gap-2","aria-label":"Supported coding agents",children:ns.map(({name:t,light:s,dark:a})=>e.jsxs("li",{className:"inline-flex items-center gap-2 rounded-full border px-3 py-1 text-sm",children:[e.jsx("img",{src:s,alt:"",width:18,height:18,className:"h-[18px] w-[18px] object-contain dark:hidden"}),e.jsx("img",{src:a,alt:"",width:18,height:18,className:"hidden h-[18px] w-[18px] object-contain dark:block"}),t]},t))})}function hr({paperId:t,isAdmin:s}){var x;const[a,r]=m.useState(!1),[n,d]=m.useState(!1),[l,o]=m.useState(!1),[c,h]=m.useState(()=>window.location.hash.startsWith("#edit")),f=ua({queryKey:["paper-edit-history",t],queryFn:({pageParam:b})=>ma.history(t,b),initialPageParam:void 0,getNextPageParam:b=>b.next_cursor??void 0,enabled:s&&c}),i=`Help me edit https://paperswithcode.co/paper/${t} using the public pwc CLI from https://github.com/huggingface/pwc-cli. Install or update the CLI following its README, then run pwc skills add to load its instructions. Run pwc auth login --paper ${t}; I will authorize this paper in my browser. Export with pwc paper edit export ${t} --output edits.json, make explicit operations for the corrections I request, and preview before submitting. For organization changes, use an organizations operation with payload {"organization_ids": [existing organization IDs]}; this replaces the paper’s organization links and publishes directly. Use existing organizations, benchmark and metric definitions, preserve unrelated entries, and cite source URLs where available. Never print or copy credentials. Ask me what to change if I have not specified it.`;return e.jsxs(e.Fragment,{children:[e.jsxs("button",{type:"button",className:"action-btn",title:"Edit this paper page with Claude, Codex, Cursor, or OpenCode",onClick:()=>{r(!1),d(!1),o(!0)},children:["Edit with your agent",e.jsx(ur,{})]}),s&&e.jsxs("button",{type:"button",className:"action-btn",onClick:()=>h(!0),children:[e.jsx(Fa,{size:12})," View edit history"]}),e.jsx(ee,{open:l,onOpenChange:o,children:e.jsxs(te,{className:"max-w-2xl",children:[e.jsxs(se,{children:[e.jsx(ae,{children:"Edit this paper with your agent"}),e.jsx(re,{children:"Spotted a missing code link, a wrong task, or a missing benchmark result? Your favorite coding agent can fix it for you."})]}),e.jsx(mr,{}),e.jsxs("ol",{className:"list-decimal space-y-1 pl-5 text-sm text-muted-foreground",children:[e.jsx("li",{children:"Copy the prompt below."}),e.jsx("li",{children:"Paste it into Claude Code, Codex, Cursor, OpenCode, or another coding agent, and tell it what to change."}),e.jsxs("li",{children:["The agent installs the ",e.jsx("a",{className:"underline",href:"https://github.com/huggingface/pwc-cli",target:"_blank",rel:"noreferrer",children:"pwc CLI"}),", asks you to authorize this paper with your Hugging Face account, and previews the edits before submitting them."]})]}),e.jsx("textarea",{"aria-label":"Paper edit prompt",readOnly:!0,value:i,className:"h-48 w-full resize-none rounded border bg-muted/40 p-3 font-mono text-xs",onFocus:b=>b.currentTarget.select()}),n&&e.jsx("p",{role:"alert",className:"text-sm text-destructive",children:"Could not copy automatically. Select the prompt above and copy it manually."}),e.jsxs(F,{className:"justify-self-end",onClick:async()=>{try{await navigator.clipboard.writeText(i),r(!0),d(!1)}catch{d(!0)}},children:[a?e.jsx(me,{size:14}):e.jsx(ha,{size:14}),a?"Prompt copied":"Copy prompt"]})]})}),e.jsx(ee,{open:s&&c,onOpenChange:h,children:e.jsxs(te,{className:"max-h-[85vh] max-w-3xl overflow-y-auto",id:"edit-history",children:[e.jsxs(se,{children:[e.jsx(ae,{children:"Paper edit history"}),e.jsx(re,{children:"Published changes and their contributors."})]}),e.jsxs("div",{className:"space-y-3",children:[f.isLoading&&e.jsx("p",{children:"Loading edit history…"}),f.error&&e.jsx("p",{role:"alert",children:"Could not load edit history."}),f.data&&!f.data.pages[0].events.length&&e.jsx("p",{className:"text-sm text-muted-foreground",children:"No edits have been recorded here yet."}),(x=f.data)==null?void 0:x.pages.flatMap(b=>b.events).map(b=>e.jsxs("article",{id:`edit-${b.id}`,className:"rounded border p-3",children:[e.jsxs("p",{className:"text-sm",children:[b.actor_username?e.jsxs("a",{className:"underline",href:`https://huggingface.co/${encodeURIComponent(b.actor_username)}`,children:["@",b.actor_username]}):"Catalog administrator"," · ",new Date(b.created_at).toLocaleString()," · ",b.operation==="rollback"?"Reverted an edit":"Updated this paper"]}),e.jsxs("details",{children:[e.jsx("summary",{className:"cursor-pointer text-sm",children:"View changes"}),e.jsx("pre",{className:"max-h-80 overflow-auto whitespace-pre-wrap text-xs",children:JSON.stringify({before:b.before,after:b.after},null,2)})]})]},b.id)),f.hasNextPage&&e.jsx(F,{variant:"outline",disabled:f.isFetchingNextPage,onClick:()=>void f.fetchNextPage(),children:"Load older edits"})]})]})})]})}function pr(t){return t.map(s=>{const a=s.best_metric||Object.keys(s.metrics)[0]||"";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(s.metrics[a]??""),original_metrics:{...s.metrics},original_metric_name:a,best_rank:s.best_rank!=null?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 fr(t,s){const a={...t.original_metrics},r=a[t.original_metric_name];return t.original_metric_name!==s&&delete a[t.original_metric_name],a[s]=r!=null&&t.metric_value===String(r)?r:t.metric_value,a}function gr(t){const s=t==null?void 0:t.trim();return s?Number(s):void 0}function Bt(t){const s=t.trim();return s?Number(s):null}function nt(t){return t.trim()||null}function it(t){return!!(t&&/^\d+$/.test(t.trim())&&Number.isSafeInteger(Number(t))&&Number(t)>0)}function is(t){const s=[];return t.forEach((a,r)=>{var l;if(!a.operation||a.operation==="unchanged")return;const n=(o,c)=>{s.push({rowIndex:r,field:o,message:c})};if(a.operation!=="create"&&!it(a.id)&&n("id","This result has no valid evaluation ID. Reload the paper before editing it."),a.operation==="delete")return;it(a.task_id)||n("task_id","Select a valid task."),it(a.dataset_id)||n("dataset_id","Select a valid dataset.");const d=a.metric_name.trim();d?d!==a.original_metric_name&&Object.prototype.hasOwnProperty.call(a.original_metrics,d)&&n("metric_name",`Cannot rename a metric to "${d}": this evaluation already has that score.`):n("metric_name","Select a metric."),(l=a.best_rank)!=null&&l.trim()&&!Number.isSafeInteger(Number(a.best_rank))&&n("best_rank","Enter a whole-number rank."),a.num_parameters.trim()&&(!Number.isSafeInteger(Number(a.num_parameters))||Number(a.num_parameters)<0)&&n("num_parameters","Enter a non-negative whole-number parameter count."),a.metric_value.trim()||n("metric_value","Enter a metric value.")}),s}function xr(t,s){const a=is(t);return a.length?{valid:!1,errors:a}:{valid:!0,operations:br(t,s)}}function br(t,s){const a=[];for(const r of t){if(r.operation==="delete"){a.push({kind:"delete",evaluationId:Number(r.id)});continue}if(r.operation!=="create"&&r.operation!=="update")continue;const n=r.metric_name.trim(),d=s(r.task_id,r.dataset_id),l={task_id:Number(r.task_id),dataset_id:Number(r.dataset_id),metrics:fr(r,n),best_metric:n,is_open:r.is_open},o=r.model_name.trim(),c=gr(r.best_rank);if(r.operation==="create"){const h=Bt(r.num_parameters),f=nt(r.hf_model_url);a.push({kind:"create",data:{...l,...o?{model_name:o}:{},...d&&r.harness.trim()?{harness:r.harness.trim()}:{},...c!==void 0?{best_rank:c}:{},...h!==null?{num_parameters:h}:{},...f!==null?{hf_model_url:f}:{}}});continue}a.push({kind:"update",evaluationId:Number(r.id),data:{...l,...o?{model_name:o}:{},harness:d?nt(r.harness):null,...c!==void 0?{best_rank:c}:{},num_parameters:Bt(r.num_parameters),hf_model_url:nt(r.hf_model_url)}})}return a}function jr(t,s){return s.map(a=>a.kind==="delete"?{operation:"delete",evaluation_id:a.evaluationId}:{operation:a.kind,...a.kind==="update"?{evaluation_id:a.evaluationId}:{},payload:a.kind==="create"?{paper_id:t,...a.data}:a.data})}function vr(t){return t.map(s=>s.kind==="delete"?{op:"delete",evaluation_id:s.evaluationId}:s.kind==="update"?{op:"update",evaluation_id:s.evaluationId,data:s.data}:{op:"create",data:s.data})}function xe({isAuthor:t=!1}){const s=typeof window<"u"&&window.location.hostname==="staging.paperswithcode.co";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:s?"Test-only: this change stays on staging.":"Your changes will be reviewed by an admin."}),e.jsx("p",{className:"mt-1 leading-snug",children:s?"This exercises staging-local pending behavior and is not queued for production review.":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."})]})}const ot=100;function wr(t){return(t??[]).some(s=>s.slug==="coding-agents"||s.name.trim().toLowerCase()==="coding agents")}function yr(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 _r(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 Ht(t,s){return`${t}:${s}`}function kr({open:t,onOpenChange:s,paperId:a,arxivId:r,initialEvaluations:n,paperTasks:d,onSuccess:l,submitMode:o="direct",isAdmin:c=!1,isAuthor:h=!1}){const f=m.useId(),i=wr(d),[x,b]=m.useState([]),[y,j]=m.useState(!1),v=y?is(x):[],[C,P]=m.useState(null),[I,S]=m.useState(new Map),[_,u]=m.useState(new Map),g=he(),{toast:E}=ie(),A=m.useRef(!1),M=m.useRef(!1);m.useEffect(()=>{if(!t){j(!1),A.current=!1,M.current=!1;return}A.current||M.current||n.length!==0&&(A.current=!0,b(pr(n)),S(yr(n)),u(_r(n)))},[t,n]);const q=m.useMemo(()=>Array.from(new Set(x.map(w=>w.task_id).filter(w=>w&&w!==""))),[x]),K=m.useMemo(()=>{const w=new Set;return x.forEach(N=>{N.task_id&&N.dataset_id&&w.add(Ht(N.task_id,N.dataset_id))}),Array.from(w)},[x]),G=ue({queryKey:["datasets-by-tasks-for-eval-edit",q,t],queryFn:async()=>{const w={};return await Promise.all(q.map(async N=>{try{const R=await _e.listDatasets({task_id:parseInt(N),page_size:ot});w[N]=R.results}catch(R){console.error(`Error fetching datasets for task ${N}:`,R),w[N]=[]}})),w},enabled:t&&q.length>0});m.useEffect(()=>{G.data&&u(w=>{const N=new Map(w);return Object.values(G.data).forEach(R=>{R.forEach(D=>{N.set(D.id,D)})}),N})},[G.data]);const p=ue({queryKey:["leaderboard-metrics-for-eval-edit",K,t],queryFn:async()=>{const w={};return await Promise.all(K.map(async N=>{const[R,D]=N.split(":");try{w[N]=await _e.leaderboardMetrics(D,R)}catch(X){console.error(`Error fetching metrics for leaderboard ${N}:`,X),w[N]=[]}})),w},enabled:t&&K.length>0}),$=async w=>{const N=await _e.listTasks({page_size:ot,...w?{q:w}:{}});return S(R=>{const D=new Map(R);return N.results.forEach(X=>D.set(X.id,X)),D}),N.results.map(R=>{var D;return{value:R.id,label:R.name,description:(D=R.description)==null?void 0:D.slice(0,100)}})},L=w=>async N=>{const R=await _e.listDatasets({task_id:parseInt(w),page_size:ot,...N?{q:N}:{}});return u(D=>{const X=new Map(D);return R.results.forEach(V=>X.set(V.id,V)),X}),R.results.map(D=>({value:D.id,label:D.name,description:D.full_name}))},T=(w,N)=>{if(!w||!N)return!1;const R=_.get(N);return!!(R!=null&&R.supports_harness)},U=(w,N,R)=>{var V;if(!w||!N)return[];const X=(((V=p.data)==null?void 0:V[Ht(w,N)])||[]).map(B=>({value:B.metric_name,label:B.metric_name,description:B.metric_direction==="higher_is_better"?"Higher is better":"Lower is better"}));return R&&!X.some(B=>B.value===R)&&X.unshift({value:R,label:`${R} (legacy)`}),X},H=le({mutationFn:async({paperId:w,canonical:N})=>{if(!c&&o==="direct"&&N.length>50)throw new Error("Contributor evaluation batches are limited to 50 operations; contact an admin.");const R=Number.parseInt(w,10);if(o==="pending")await pe.submit({paper_id:R,edit_type:"evaluations",proposed_payload:{operations:vr(N)}});else{const D=fa(w,n,N,r);await qe.batch(R,jr(R,N)),ga(g,D)}},onSuccess:()=>{if(o==="pending"){E({title:"Edit submitted for review",description:"Thanks! An admin will review your proposed evaluation changes shortly."}),l==null||l(),s(!1);return}l==null||l(),s(!1)},onError:w=>{const N=ge(w,o==="pending"?"Failed to submit your edit. Please try again.":"Failed to update evaluations.");E({title:o==="pending"?"Could not submit edit":"Could not save evaluations",description:N,variant:"destructive"})}}),z=()=>{M.current=!0,b([...x,{task_id:"",dataset_id:"",model_name:"",harness:"",metric_name:"",metric_value:"",original_metrics:{},original_metric_name:"",best_rank:"",num_parameters:"",hf_model_url:"",is_open:!0,operation:"create"}])},Y=w=>{if(M.current=!0,x[w].id){if(!window.confirm("Delete this evaluation? You will be asked to sign in again if your session is older than 15 minutes."))return;b(x.map((R,D)=>D===w?{...R,operation:"delete"}:R))}else b(x.filter((R,D)=>D!==w))},J=(w,N,R)=>{M.current=!0,b(x.map((D,X)=>{if(X!==w||D[N]===R)return D;const V={...D,[N]:R};return(N==="task_id"||N==="dataset_id")&&(V.original_metrics={},V.original_metric_name="",V.metric_value="",V.best_rank=""),N==="task_id"&&(V.dataset_id="",V.metric_name="",V.harness=""),N==="dataset_id"&&(V.metric_name="",R&&!T(V.task_id,R)&&(V.harness="")),D.operation==="unchanged"&&(V.operation="update"),V}))},Xe=(w,N)=>{M.current=!0,b(x.map((R,D)=>{if(D!==w)return R;const X={...R,is_open:N};return R.operation==="unchanged"&&(X.operation="update"),X}))},Ue=()=>{j(!0);const w=xr(x,T);if(w.valid){if(w.operations.length===0){E({title:"No changes to submit",description:"Your evaluation list matches the existing data."});return}H.mutate({paperId:a,canonical:w.operations})}},we=(w,N)=>{const R=v.find(D=>D.rowIndex===w&&D.field===N);return R?e.jsx("p",{id:`${f}-${w}-${N}-error`,className:"text-xs text-destructive",children:R.message}):null};return e.jsxs(ee,{open:t,onOpenChange:s,children:[e.jsxs(te,{className:"max-w-6xl max-h-[800px]",children:[e.jsxs(se,{children:[e.jsx(ae,{children:"Edit Evaluation Results"}),e.jsx(re,{children:"Add, edit, or remove evaluation results for this paper. Each row represents a benchmark result."})]}),o==="pending"&&e.jsx(xe,{isAuthor:h}),v.length>0&&e.jsxs("div",{role:"alert",className:"text-sm text-destructive",children:["Fix the following errors before saving. No changes have been submitted.",e.jsx("ul",{children:v.map(w=>e.jsxs("li",{children:["Row ",x.slice(0,w.rowIndex+1).filter(N=>N.operation!=="delete").length,": ",w.message]},`${w.rowIndex}-${w.field}`))})]}),e.jsxs("div",{className:"py-4 overflow-y-auto max-h-[600px]",children:[x.filter(w=>w.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 ${i?"min-w-[140px]":"min-w-[240px]"}`,children:"Model"}),i&&e.jsx("th",{className:"text-left py-2 px-2 font-medium text-sm min-w-[140px]",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:x.map((w,N)=>{if(w.operation==="delete")return null;const R=I.get(w.task_id),D=_.get(w.dataset_id),X=U(w.task_id,w.dataset_id,w.metric_name),V=!!(w.task_id&&w.dataset_id)&&p.isFetching;return e.jsxs("tr",{className:"border-b border-border",children:[e.jsx("td",{className:"py-2 px-2",children:e.jsxs("div",{role:"group","aria-label":"Task","aria-describedby":`${f}-${N}-task_id-error`,children:[e.jsx(Ft,{value:w.task_id,onChange:B=>J(N,"task_id",B),placeholder:"Select task",searchPlaceholder:"Search tasks...",emptyMessage:"No tasks found.",selectedOption:R?{value:R.id,label:R.name}:null,queryKey:["eval-edit-task-search"],queryFn:$,enabled:t}),we(N,"task_id")]})}),e.jsx("td",{className:"py-2 px-2",children:e.jsxs("div",{role:"group","aria-label":"Dataset","aria-describedby":`${f}-${N}-dataset_id-error`,children:[e.jsx(Ft,{value:w.dataset_id,onChange:B=>J(N,"dataset_id",B),placeholder:w.task_id?"Select dataset":"Select task first",searchPlaceholder:"Search datasets...",emptyMessage:w.task_id?"No datasets found for this task.":"Select a task first.",disabled:!w.task_id,selectedOption:D?{value:D.id,label:D.name}:null,queryKey:["eval-edit-dataset-search",w.task_id],queryFn:L(w.task_id),enabled:t&&!!w.task_id}),we(N,"dataset_id")]})}),e.jsx("td",{className:"py-2 px-2",children:e.jsx(Q,{type:"text",className:"w-full text-sm",placeholder:"Model name",value:w.model_name,onChange:B=>J(N,"model_name",B.target.value)})}),i&&e.jsx("td",{className:"py-2 px-2",children:T(w.task_id,w.dataset_id)?e.jsx(Q,{type:"text",className:"w-full text-sm",placeholder:"Claude Code, Terminus, ...",value:w.harness,onChange:B=>J(N,"harness",B.target.value)}):e.jsx("span",{className:"text-xs text-muted-foreground",children:"Not supported"})}),e.jsxs("td",{className:"py-2 px-2",children:[!w.task_id||!w.dataset_id?e.jsx("span",{className:"text-xs text-muted-foreground",children:"Select task + dataset"}):V?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..."]}):X.length>0?e.jsxs("select",{className:"w-full rounded-md border border-border bg-background px-2 py-1 text-sm",id:`${f}-${N}-metric_name`,"aria-invalid":v.some(B=>B.rowIndex===N&&B.field==="metric_name"),"aria-describedby":`${f}-${N}-metric_name-error`,value:w.metric_name,onChange:B=>J(N,"metric_name",B.target.value),children:[e.jsx("option",{value:"",children:"Select metric"}),X.map(B=>e.jsx("option",{value:B.value,children:B.label},B.value))]}):e.jsx("span",{className:"text-xs text-muted-foreground",children:"No configured metrics"}),we(N,"metric_name")]}),e.jsxs("td",{className:"py-2 px-2",children:[e.jsx(Q,{type:"text",className:"w-full text-sm",placeholder:"44.9",id:`${f}-${N}-metric_value`,"aria-invalid":v.some(B=>B.rowIndex===N&&B.field==="metric_value"),"aria-describedby":`${f}-${N}-metric_value-error`,value:w.metric_value,onChange:B=>J(N,"metric_value",B.target.value)}),we(N,"metric_value")]}),e.jsxs("td",{className:"py-2 px-2",children:[e.jsx(Q,{type:"number",min:0,step:1,className:"w-full text-sm",placeholder:"e.g. 7000000000",id:`${f}-${N}-num_parameters`,"aria-invalid":v.some(B=>B.rowIndex===N&&B.field==="num_parameters"),"aria-describedby":`${f}-${N}-num_parameters-error`,value:w.num_parameters,onChange:B=>J(N,"num_parameters",B.target.value),title:"Raw model parameter count (e.g. 7000000000 for a 7B model). Leave blank if unknown."}),we(N,"num_parameters")]}),e.jsx("td",{className:"py-2 px-2",children:e.jsx(Q,{type:"url",className:"w-full text-sm",placeholder:"https://huggingface.co/org/model",value:w.hf_model_url,onChange:B=>J(N,"hf_model_url",B.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:w.is_open,onChange:B=>Xe(N,B.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(F,{variant:"ghost",size:"sm",onClick:()=>Y(N),className:"h-8 w-8 p-0 text-destructive hover:text-destructive",title:w.id&&!c?"Only administrators can delete published results":"Remove row",disabled:!!w.id&&!c,children:e.jsx(Ae,{className:"w-4 h-4"})})})]},N)})})]})}):e.jsxs("div",{className:"text-center py-8 text-muted-foreground",children:[e.jsx(ba,{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(F,{variant:"outline",size:"sm",onClick:z,className:"flex items-center space-x-2",children:[e.jsx(Te,{className:"w-4 h-4"}),e.jsx("span",{children:"Add Row"})]})})]}),e.jsxs(oe,{children:[e.jsxs("div",{className:"flex flex-wrap gap-2 sm:mr-auto",children:[e.jsx(F,{variant:"ghost",onClick:()=>P("benchmark"),children:"Suggest a new benchmark"}),e.jsx(F,{variant:"ghost",onClick:()=>P("metric"),children:"Suggest a new metric"})]}),e.jsx(F,{variant:"outline",onClick:()=>s(!1),children:"Cancel"}),e.jsx(F,{onClick:Ue,disabled:H.isPending,children:H.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(me,{className:"w-4 h-4 mr-2"}),o==="pending"?"Submit for review":"Save Changes"]})})]})]}),e.jsx(yt,{open:C!==null,onOpenChange:w=>{w||P(null)},paperId:a,kind:C??"benchmark"})]})}const lt=[{key:"hf_models",label:"Models",placeholder:"https://huggingface.co/org/model"},{key:"hf_datasets",label:"Datasets",placeholder:"https://huggingface.co/datasets/org/data"},{key:"hf_spaces",label:"Spaces",placeholder:"https://huggingface.co/spaces/org/demo"}];function zt(t){return t.map(s=>s.trim()).filter(Boolean)}function ct(t,s){const a=zt(t).sort(),r=zt(s).sort();return a.length!==r.length?!1:a.every((n,d)=>n===r[d])}function Nr(t,s){return ct(t.hf_models,s.hf_models)&&ct(t.hf_datasets,s.hf_datasets)&&ct(t.hf_spaces,s.hf_spaces)}function Cr({open:t,onOpenChange:s,paperId:a,arxivId:r,initialArtifacts:n,onSuccess:d,submitMode:l="direct",isAuthor:o=!1}){const[c,h]=m.useState(n),[f,i]=m.useState({hf_models:"",hf_datasets:"",hf_spaces:""}),x=he(),{toast:b}=ie(),y=m.useRef(!1);m.useEffect(()=>{if(!t){y.current=!1;return}y.current||(y.current=!0,h(n),i({hf_models:"",hf_datasets:"",hf_spaces:""}))},[t,n]);const j=le({mutationFn:async({paperId:_,artifacts:u})=>l==="pending"?(await pe.submit({paper_id:parseInt(_),edit_type:"hf_artifacts",proposed_payload:u}),null):W.updateHfArtifacts(_,u),onSuccess:_=>{if(l==="pending"){b({title:"Edit submitted for review",description:"Thanks! An admin will review your proposed Hugging Face artifact changes shortly."}),d==null||d(),s(!1),i({hf_models:"",hf_datasets:"",hf_spaces:""});return}_&&ve(x,_,[a,r]),d==null||d(),s(!1),i({hf_models:"",hf_datasets:"",hf_spaces:""})},onError:_=>{const u=ge(_,l==="pending"?"Failed to submit your edit. Please try again.":"Failed to update Hugging Face artifacts.");b({title:l==="pending"?"Could not submit edit":"Could not save Hugging Face artifacts",description:u,variant:"destructive"})}}),v=()=>{const _={hf_models:[...c.hf_models],hf_datasets:[...c.hf_datasets],hf_spaces:[...c.hf_spaces]};for(const{key:u}of lt){const g=f[u].trim();if(g){if(_[u].some(E=>E.trim()===g))return alert(`This ${u.replace("hf_","")} URL is already added`),null;_[u]=[..._[u],g]}}return _},C=_=>{const u=f[_].trim();if(u){if(c[_].some(g=>g.trim()===u)){alert(`This ${_.replace("hf_","")} URL is already added`);return}h(g=>({...g,[_]:[...g[_],u]})),i(g=>({...g,[_]:""}))}},P=(_,u)=>{h(g=>({...g,[_]:g[_].filter(E=>E!==u)}))},I=()=>{const _=v();if(_===null)return;const u=Object.keys(n).some(g=>n[g].some(E=>!_[g].includes(E)));l==="direct"&&u&&!window.confirm("Remove one or more Hugging Face artifact links?")||j.mutate({paperId:a,artifacts:_})},S=m.useMemo(()=>{const _={hf_models:[...c.hf_models],hf_datasets:[...c.hf_datasets],hf_spaces:[...c.hf_spaces]};for(const{key:u}of lt){const g=f[u].trim();if(g){if(_[u].some(E=>E.trim()===g))return!1;_[u]=[..._[u],g]}}return!Nr(_,n)},[c,f,n]);return e.jsx(ee,{open:t,onOpenChange:s,children:e.jsxs(te,{className:"max-w-2xl max-h-[700px]",children:[e.jsxs(se,{children:[e.jsx(ae,{children:"Edit Hugging Face Artifacts"}),e.jsx(re,{children:"Add or remove linked Hugging Face models, datasets, and Spaces for this paper."})]}),l==="pending"&&e.jsx(xe,{isAuthor:o}),e.jsx("div",{className:"space-y-6 py-2 overflow-y-auto max-h-[460px]",children:lt.map(({key:_,label:u,placeholder:g})=>e.jsxs("div",{className:"space-y-2",children:[e.jsx("label",{className:"text-sm font-medium",children:u}),e.jsxs("div",{className:"flex space-x-2",children:[e.jsx(Q,{type:"url",placeholder:g,value:f[_],onChange:E=>i(A=>({...A,[_]:E.target.value})),onKeyPress:E=>{E.key==="Enter"&&(E.preventDefault(),C(_))},className:"flex-1"}),e.jsxs(F,{onClick:()=>C(_),size:"sm",disabled:!f[_].trim(),children:[e.jsx(Te,{className:"w-4 h-4 mr-1"}),"Add"]})]}),c[_].length>0?e.jsx("div",{className:"space-y-2",children:c[_].map(E=>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("span",{className:"text-sm font-medium text-paper-blue truncate flex-1",children:E}),e.jsx(F,{variant:"ghost",size:"sm",onClick:()=>P(_,E),className:"h-8 px-2 text-destructive hover:text-destructive",title:`Remove ${u.toLowerCase()} URL`,children:e.jsx(Ae,{className:"w-4 h-4"})})]},E))}):e.jsxs("div",{className:"text-xs text-muted-foreground",children:["No ",u.toLowerCase()," linked yet."]})]},_))}),e.jsxs(oe,{children:[e.jsx(F,{variant:"outline",onClick:()=>s(!1),children:"Cancel"}),e.jsx(F,{onClick:I,disabled:j.isPending||!S,children:j.isPending?e.jsxs(e.Fragment,{children:[e.jsx(ne,{className:"w-4 h-4 mr-2 animate-spin"}),l==="pending"?"Submitting...":"Saving..."]}):e.jsxs(e.Fragment,{children:[e.jsx(me,{className:"w-4 h-4 mr-2"}),l==="pending"?"Submit for review":"Save Changes"]})})]})]})})}var Ke="Checkbox",[Er]=vt(Ke),[Sr,_t]=Er(Ke);function Pr(t){const{__scopeCheckbox:s,checked:a,children:r,defaultChecked:n,disabled:d,form:l,name:o,onCheckedChange:c,required:h,value:f="on",internal_do_not_use_render:i}=t,[x,b]=Wt({prop:a,defaultProp:n??!1,onChange:c,caller:Ke}),[y,j]=m.useState(null),[v,C]=m.useState(null),P=m.useRef(!1),I=y?!!l||!!y.closest("form"):!0,S={checked:x,disabled:d,setChecked:b,control:y,setControl:j,name:o,form:l,value:f,hasConsumerStoppedPropagationRef:P,required:h,defaultChecked:je(n)?!1:n,isFormControl:I,bubbleInput:v,setBubbleInput:C};return e.jsx(Sr,{scope:s,...S,children:$r(i)?i(S):r})}var os="CheckboxTrigger",ls=m.forwardRef(({__scopeCheckbox:t,onKeyDown:s,onClick:a,...r},n)=>{const{control:d,value:l,disabled:o,checked:c,required:h,setControl:f,setChecked:i,hasConsumerStoppedPropagationRef:x,isFormControl:b,bubbleInput:y}=_t(os,t),j=Fe(n,f),v=m.useRef(c);return m.useEffect(()=>{const C=d==null?void 0:d.form;if(C){const P=()=>i(v.current);return C.addEventListener("reset",P),()=>C.removeEventListener("reset",P)}},[d,i]),e.jsx(ke.button,{type:"button",role:"checkbox","aria-checked":je(c)?"mixed":c,"aria-required":h,"data-state":hs(c),"data-disabled":o?"":void 0,disabled:o,value:l,...r,ref:j,onKeyDown:Ie(s,C=>{C.key==="Enter"&&C.preventDefault()}),onClick:Ie(a,C=>{i(P=>je(P)?!0:!P),y&&b&&(x.current=C.isPropagationStopped(),x.current||C.stopPropagation())})})});ls.displayName=os;var kt=m.forwardRef((t,s)=>{const{__scopeCheckbox:a,name:r,checked:n,defaultChecked:d,required:l,disabled:o,value:c,onCheckedChange:h,form:f,...i}=t;return e.jsx(Pr,{__scopeCheckbox:a,checked:n,defaultChecked:d,disabled:o,required:l,onCheckedChange:h,name:r,form:f,value:c,internal_do_not_use_render:({isFormControl:x})=>e.jsxs(e.Fragment,{children:[e.jsx(ls,{...i,ref:s,__scopeCheckbox:a}),x&&e.jsx(ms,{__scopeCheckbox:a})]})})});kt.displayName=Ke;var cs="CheckboxIndicator",ds=m.forwardRef((t,s)=>{const{__scopeCheckbox:a,forceMount:r,...n}=t,d=_t(cs,a);return e.jsx(Qt,{present:r||je(d.checked)||d.checked===!0,children:e.jsx(ke.span,{"data-state":hs(d.checked),"data-disabled":d.disabled?"":void 0,...n,ref:s,style:{pointerEvents:"none",...t.style}})})});ds.displayName=cs;var us="CheckboxBubbleInput",ms=m.forwardRef(({__scopeCheckbox:t,...s},a)=>{const{control:r,hasConsumerStoppedPropagationRef:n,checked:d,defaultChecked:l,required:o,disabled:c,name:h,value:f,form:i,bubbleInput:x,setBubbleInput:b}=_t(us,t),y=Fe(a,b),j=es(d),v=Zt(r);m.useEffect(()=>{const P=x;if(!P)return;const I=window.HTMLInputElement.prototype,_=Object.getOwnPropertyDescriptor(I,"checked").set,u=!n.current;if(j!==d&&_){const g=new Event("click",{bubbles:u});P.indeterminate=je(d),_.call(P,je(d)?!1:d),P.dispatchEvent(g)}},[x,j,d,n]);const C=m.useRef(je(d)?!1:d);return e.jsx(ke.input,{type:"checkbox","aria-hidden":!0,defaultChecked:l??C.current,required:o,disabled:c,name:h,value:f,form:i,...s,tabIndex:-1,ref:y,style:{...s.style,...v,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});ms.displayName=us;function $r(t){return typeof t=="function"}function je(t){return t==="indeterminate"}function hs(t){return je(t)?"indeterminate":t?"checked":"unchecked"}const Ge=m.forwardRef(({className:t,style:s,...a},r)=>e.jsx(kt,{ref:r,className:ze("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(ds,{className:ze("flex items-center justify-center text-current"),children:e.jsx(me,{className:"h-4 w-4"})})}));Ge.displayName=kt.displayName;const Ir=250,Lr=100;function Rr({open:t,onOpenChange:s,paperId:a,arxivId:r,initialMethodIds:n,initialMethods:d,onSuccess:l,submitMode:o="direct",isAuthor:c=!1}){const[h,f]=m.useState(n),[i,x]=m.useState(!1),[b,y]=m.useState(""),[j,v]=m.useState(""),[C,P]=m.useState(new Map),I=he(),{toast:S}=ie(),_=m.useRef(!1);m.useEffect(()=>{if(!t){_.current=!1;return}if(_.current)return;_.current=!0,f(n),y(""),v("");const p=new Map;(d||[]).forEach($=>{const L=parseInt($.id);Number.isNaN(L)||p.set(L,$)}),P(p)},[t,n,d]),m.useEffect(()=>{const p=window.setTimeout(()=>{v(b.trim())},Ir);return()=>window.clearTimeout(p)},[b]);const{data:u,isFetching:g}=ue({queryKey:["methods-search",j],queryFn:()=>_e.listMethods({page_size:Lr,...j?{q:j}:{}}),enabled:t});m.useEffect(()=>{var p;(p=u==null?void 0:u.results)!=null&&p.length&&P($=>{const L=new Map($);return u.results.forEach(T=>{const U=parseInt(T.id);Number.isNaN(U)||L.set(U,T)}),L})},[u]);const E=m.useMemo(()=>{const p=(u==null?void 0:u.results)||[],$=new Set,L=[],T=(z,Y)=>{!Y||Number.isNaN(z)||$.has(z)||(L.push(Y),$.add(z))},U=()=>h.forEach(z=>T(z,C.get(z))),H=()=>p.forEach(z=>T(parseInt(z.id),z));return j?(H(),U()):(U(),H()),L},[u,h,C,j]),A=le({mutationFn:async({paperId:p,methodIds:$})=>o==="pending"?(await pe.submit({paper_id:parseInt(p),edit_type:"methods",proposed_payload:{method_ids:$}}),null):W.updateMethods(p,$),onSuccess:p=>{if(o==="pending"){S({title:"Edit submitted for review",description:"Thanks! An admin will review your proposed method changes shortly."}),l==null||l(),s(!1);return}p&&ve(I,p,[a,r]),S({title:"Methods updated",description:`Saved ${h.length} method${h.length===1?"":"s"} for this paper.`}),l==null||l(),s(!1)},onError:p=>{const $=ge(p,o==="pending"?"Failed to submit your edit. Please try again.":"Failed to update paper methods.");S({title:o==="pending"?"Could not submit edit":"Could not save methods",description:$,variant:"destructive"})}}),M=()=>{o==="direct"&&n.some(p=>!h.includes(p))&&!window.confirm("Remove one or more method links from this paper?")||A.mutate({paperId:a,methodIds:h})},q=m.useMemo(()=>{if(h.length!==n.length)return!0;const p=new Set(n);return h.some($=>!p.has($))},[h,n]),K=(p,$)=>{f(L=>$?L.includes(p)?L:[...L,p]:L.filter(T=>T!==p))},G=()=>y("");return e.jsxs(ee,{open:t,onOpenChange:s,children:[e.jsxs(te,{className:"max-w-2xl max-h-[600px]",children:[e.jsxs(se,{children:[e.jsx(ae,{children:"Edit Paper Methods"}),e.jsx(re,{children:"Select the methods and techniques used in this paper. You can select multiple methods."})]}),o==="pending"&&e.jsx(xe,{isAuthor:c}),e.jsxs("div",{className:"relative mb-4",children:[e.jsx(Le,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground"}),e.jsx(Q,{type:"text",placeholder:"Search methods...",value:b,onChange:p=>y(p.target.value),className:"pl-9 pr-9"}),b&&e.jsx("button",{type:"button",onClick:G,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(wt,{className:"w-4 h-4"})})]}),e.jsx("div",{className:"py-4 overflow-y-auto max-h-[400px]",children:E.length>0?e.jsx("div",{className:"space-y-2",children:E.map(p=>{const $=parseInt(p.id),L=h.includes($);return e.jsxs("div",{className:"flex items-center space-x-2 p-2 hover:bg-muted/50 rounded-md",children:[e.jsx(Ge,{id:`method-${p.id}`,checked:L,onCheckedChange:T=>K($,T===!0),className:"!border !border-black data-[state=checked]:!bg-black data-[state=checked]:!text-white"}),e.jsxs("label",{htmlFor:`method-${p.id}`,className:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 cursor-pointer flex-1",children:[p.name,p.full_name&&p.full_name!==p.name&&e.jsx("span",{className:"block text-xs text-muted-foreground font-normal",children:p.full_name}),p.description&&e.jsxs("span",{className:"block text-xs text-muted-foreground font-normal mt-1",children:[p.description.substring(0,100),p.description.length>100?"...":""]})]})]},p.id)})}):g?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(Le,{className:"w-8 h-8 mx-auto mb-2 opacity-50"}),e.jsx("p",{children:j?`No methods found matching "${j}"`:"No methods available"})]})}),e.jsxs(oe,{children:[e.jsx(F,{variant:"ghost",className:"sm:mr-auto",onClick:()=>x(!0),children:"Suggest a new method"}),e.jsx(F,{variant:"outline",onClick:()=>s(!1),children:"Cancel"}),e.jsx(F,{onClick:M,disabled:A.isPending||!q,children:A.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(me,{className:"w-4 h-4 mr-2"}),o==="pending"?"Submit for review":"Save Changes"]})})]})]}),e.jsx(yt,{open:i,onOpenChange:x,paperId:a,kind:"method"})]})}const ps=["image/jpeg","image/png","image/webp","image/gif"],Fr=2*1024*1024;function Ar(t){return ps.includes(t.type)?t.size>Fr?Promise.reject(new Error("Logo must be 2 MB or smaller.")):new Promise((s,a)=>{const r=new FileReader;r.onload=()=>s({file_name:t.name,mime_type:t.type,data_url:String(r.result)}),r.onerror=()=>a(new Error("Could not read that logo.")),r.readAsDataURL(t)}):Promise.reject(new Error("Choose a JPEG, PNG, WebP, or GIF logo."))}function Tr({paperId:t,initialName:s}){const[a,r]=m.useState(s),[n,d]=m.useState(""),[l,o]=m.useState(""),[c,h]=m.useState(null),[f,i]=m.useState(""),x=le({mutationFn:()=>pe.submit(pa(Number(t),"new_organization",{name:a.trim(),...n.trim()?{hf_slug:n.trim()}:{},...l.trim()?{website_url:l.trim()}:{},...c?{image:c}:{}}))});return x.isSuccess?e.jsxs("p",{className:"rounded border p-3 text-sm",children:['Thanks! "',a.trim(),'" was submitted for review. Once an admin approves it, the organization is created and added to this paper.']}):e.jsxs("form",{className:"space-y-2 rounded border p-3",onSubmit:b=>{b.preventDefault(),x.mutate()},children:[e.jsx("p",{className:"text-sm font-medium",children:"Suggest a new organization"}),e.jsx(Q,{"aria-label":"Organization name",placeholder:"Name",value:a,maxLength:200,onChange:b=>r(b.target.value)}),e.jsx(Q,{"aria-label":"Hugging Face organization",placeholder:"Hugging Face organization (e.g. https://huggingface.co/PrimeIntellect)",value:n,onChange:b=>d(b.target.value)}),e.jsx(Q,{"aria-label":"Website",type:"url",placeholder:"Website (e.g. https://www.primeintellect.ai)",value:l,onChange:b=>o(b.target.value)}),e.jsxs("label",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:["Logo (optional)",e.jsx("input",{"aria-label":"Logo",type:"file",accept:ps.join(","),onChange:b=>{var j;const y=(j=b.target.files)==null?void 0:j[0];h(null),i(""),y&&Ar(y).then(h,v=>i(v.message))}})]}),c&&e.jsx("img",{src:c.data_url,alt:"Selected logo",className:"h-12 w-12 rounded border object-contain"}),f&&e.jsx("p",{className:"text-sm text-destructive",children:f}),e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsx("p",{className:"text-xs text-muted-foreground",children:"An admin reviews every new organization."}),e.jsx(F,{type:"submit",variant:"outline",disabled:!a.trim()||!n.trim()&&!l.trim()||x.isPending,children:x.isPending?"Submitting...":"Submit for review"})]}),x.error&&e.jsx("p",{className:"text-sm text-destructive",children:ge(x.error,"Could not submit this organization.")})]})}const Ur=({open:t,onOpenChange:s,paperId:a,initialOrganizationIds:r,submitMode:n,isAuthor:d})=>{var y;const[l,o]=m.useState(r),[c,h]=m.useState(""),f=he();m.useEffect(()=>{t&&(o(r),h(""))},[r,t]);const i=ue({queryKey:["organizations","curation"],queryFn:()=>_e.organizations(!1),enabled:t}),x=m.useMemo(()=>{var C,P;const j=c.trim().toLocaleLowerCase();if(!j)return((C=i.data)==null?void 0:C.results)??[];const v=I=>I===j?0:I.startsWith(j)?1:I.split(/[^\p{L}\p{N}]+/u).some(S=>S.startsWith(j))?2:3;return(((P=i.data)==null?void 0:P.results)??[]).map(I=>({organization:I,name:I.name.toLocaleLowerCase()})).filter(({name:I})=>I.includes(j)).sort((I,S)=>v(I.name)-v(S.name)).map(({organization:I})=>I)},[(y=i.data)==null?void 0:y.results,c]),b=le({mutationFn:async()=>{if(!(r.some(v=>!l.includes(v))&&!window.confirm("Remove one or more organizations from this paper? Destructive edits may require a fresh sign-in.")))return n==="pending"?(await pe.submit({paper_id:Number(a),edit_type:"organizations",proposed_payload:{organization_ids:l}}),null):W.updateOrganizations(a,l)},onSuccess:j=>{j!==void 0&&(j&&ve(f,j,[a]),s(!1))}});return e.jsx(ee,{open:t,onOpenChange:s,children:e.jsxs(te,{children:[e.jsxs(se,{children:[e.jsx(ae,{children:"Edit organizations"}),e.jsx(re,{children:"Associate organizations with this paper. If one is missing, search for it and suggest it for review."})]}),n==="pending"&&e.jsx(xe,{isAuthor:d}),e.jsxs("div",{className:"relative",children:[e.jsx(Le,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),e.jsx(Q,{type:"search","aria-label":"Search organizations",placeholder:"Search organizations...",value:c,onChange:j=>h(j.target.value),className:"pl-9 pr-9"}),c&&e.jsx("button",{type:"button",onClick:()=>h(""),className:"absolute right-2 top-1/2 -translate-y-1/2 p-1 text-muted-foreground hover:text-foreground","aria-label":"Clear organization search",children:e.jsx(wt,{className:"h-4 w-4"})})]}),e.jsxs("div",{className:"max-h-80 space-y-2 overflow-auto",children:[x.map(j=>{const v=Number(j.id);return e.jsxs("label",{className:"flex items-center gap-2 rounded border p-2",children:[e.jsx("input",{type:"checkbox",checked:l.includes(v),onChange:C=>o(P=>C.target.checked?[...P,v]:P.filter(I=>I!==v))}),j.name]},j.id)}),!i.isLoading&&x.length===0&&e.jsx("p",{className:"py-8 text-center text-sm text-muted-foreground",children:c.trim()?`No organizations found matching "${c.trim()}"`:"No organizations available"})]}),!i.isLoading&&x.length===0&&c.trim()&&e.jsx(Tr,{paperId:a,initialName:c.trim()},c.trim()),e.jsxs(oe,{children:[e.jsx(F,{variant:"outline",onClick:()=>s(!1),children:"Cancel"}),e.jsx(F,{onClick:()=>b.mutate(),disabled:b.isPending,children:n==="pending"?"Submit test edit":"Save changes"})]})]})})};function Dr({open:t,onOpenChange:s,paperId:a,arxivId:r,initialProjectPages:n,onSuccess:d,submitMode:l="direct",isAuthor:o=!1}){const[c,h]=m.useState(n),[f,i]=m.useState(""),x=he(),{toast:b}=ie(),y=m.useRef(!1);m.useEffect(()=>{if(!t){y.current=!1;return}y.current||(y.current=!0,h(n),i(""))},[t,n]);const j=le({mutationFn:async({paperId:u,projectPages:g})=>l==="pending"?(await pe.submit({paper_id:parseInt(u),edit_type:"project_pages",proposed_payload:{project_pages:g}}),null):W.updateProjectPages(u,g),onSuccess:u=>{if(l==="pending"){b({title:"Edit submitted for review",description:"Thanks! An admin will review your proposed project page changes shortly."}),d==null||d(),s(!1),i("");return}u&&ve(x,u,[a,r]),d==null||d(),s(!1),i("")},onError:u=>{const g=ge(u,l==="pending"?"Failed to submit your edit. Please try again.":"Failed to update project pages.");b({title:l==="pending"?"Could not submit edit":"Could not save project pages",description:g,variant:"destructive"})}}),v=()=>{const u=f.trim();return u?c.some(g=>g.url===u)?(alert("This project page URL is already added"),null):[...c,{url:u,is_official:!1}]:c},C=()=>{const u=v();u!==null&&u.length!==c.length&&(h(u),i(""))},P=u=>{h(c.filter(g=>g.url!==u))},I=u=>{h(c.map(g=>g.url===u?{...g,is_official:!g.is_official}:g))},S=()=>{const u=v();u!==null&&(l==="direct"&&n.some(g=>!u.some(E=>E.url===g.url))&&!window.confirm("Remove one or more project pages from this paper?")||j.mutate({paperId:a,projectPages:u}))},_=m.useMemo(()=>{const u=f.trim(),g=u?[...c,{url:u,is_official:!1}]:c;if(g.length!==n.length)return!0;const E=new Map(n.map(A=>[A.url.trim(),!!A.is_official]));return g.some(A=>{const M=E.get(A.url.trim());return M===void 0||M!==!!A.is_official})},[c,f,n]);return e.jsx(ee,{open:t,onOpenChange:s,children:e.jsxs(te,{className:"max-w-2xl max-h-[600px]",children:[e.jsxs(se,{children:[e.jsx(ae,{children:"Edit Paper Project Pages"}),e.jsx(re,{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."})]}),l==="pending"&&e.jsx(xe,{isAuthor:o}),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(Q,{type:"url",placeholder:"https://example.com/project",value:f,onChange:u=>i(u.target.value),onKeyPress:u=>{u.key==="Enter"&&(u.preventDefault(),C())},className:"flex-1"}),e.jsxs(F,{onClick:C,size:"sm",disabled:!f.trim(),children:[e.jsx(Te,{className:"w-4 h-4 mr-1"}),"Add"]})]})]}),e.jsx("div",{className:"py-4 overflow-y-auto max-h-[350px]",children:c.length>0?e.jsx("div",{className:"space-y-2",children:c.map((u,g)=>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(Dt,{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:u.url}),u.is_official&&e.jsx(ts,{variant:"secondary",className:"text-xs",children:"Official"})]})}),e.jsxs("div",{className:"flex items-center space-x-1",children:[e.jsxs(F,{variant:u.is_official?"default":"outline",size:"sm",onClick:()=>I(u.url),className:"h-8 px-2 text-xs",title:u.is_official?"Click to unmark as official (created by paper authors)":"Click to mark as official (created by paper authors)",children:[e.jsx(ss,{className:`w-3.5 h-3.5 mr-1 ${u.is_official?"fill-current":""}`}),u.is_official?"Official":"Mark official"]}),e.jsx(F,{variant:"ghost",size:"sm",onClick:()=>P(u.url),className:"h-8 px-2 text-destructive hover:text-destructive",title:"Remove project page",children:e.jsx(Ae,{className:"w-4 h-4"})})]})]},g))}):e.jsxs("div",{className:"text-center py-8 text-muted-foreground",children:[e.jsx(Dt,{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(oe,{children:[e.jsx(F,{variant:"outline",onClick:()=>s(!1),children:"Cancel"}),e.jsx(F,{onClick:S,disabled:j.isPending||!_,children:j.isPending?e.jsxs(e.Fragment,{children:[e.jsx(ne,{className:"w-4 h-4 mr-2 animate-spin"}),l==="pending"?"Submitting...":"Saving..."]}):e.jsxs(e.Fragment,{children:[e.jsx(me,{className:"w-4 h-4 mr-2"}),l==="pending"?"Submit for review":"Save Changes"]})})]})]})})}function Br({open:t,onOpenChange:s,paperId:a,arxivId:r,initialRepositories:n,onSuccess:d,submitMode:l="direct",isAuthor:o=!1}){const[c,h]=m.useState(n),[f,i]=m.useState(""),x=he(),{toast:b}=ie(),y=m.useRef(!1);m.useEffect(()=>{if(!t){y.current=!1;return}y.current||(y.current=!0,h(n),i(""))},[t,n]);const j=le({mutationFn:async({paperId:g,repositories:E})=>l==="pending"?(await pe.submit({paper_id:parseInt(g),edit_type:"repositories",proposed_payload:{repositories:E}}),null):W.updateRepositories(g,E),onSuccess:g=>{if(l==="pending"){b({title:"Edit submitted for review",description:"Thanks! An admin will review your proposed repository changes shortly."}),d==null||d(),s(!1),i("");return}g&&ve(x,g,[a,r]),d==null||d(),s(!1),i("")},onError:g=>{const E=ge(g,l==="pending"?"Failed to submit your edit. Please try again.":"Failed to update paper repositories.");b({title:l==="pending"?"Could not submit edit":"Could not save repositories",description:E,variant:"destructive"})}}),v=g=>{const E=[];for(const A of g){const M=E.find(q=>At(q.url,A.url));if(M)M.is_official=M.is_official||A.is_official;else{const q=Ye(A.url);E.push({url:q??A.url.trim(),is_official:A.is_official})}}return E},C=()=>{const g=f.trim(),E=g?[...c,{url:g,is_official:!1}]:c;return g&&c.some(A=>At(A.url,g))?(alert("This repository URL is already added"),null):v(E)},P=()=>{const g=C();g!==null&&g.length!==c.length&&(h(g),i(""))},I=g=>{h(c.filter(E=>E.url!==g))},S=g=>{h(c.map(E=>E.url===g?{...E,is_official:!E.is_official}:E))},_=()=>{const g=C();g!==null&&(l==="direct"&&n.some(E=>!g.some(A=>A.url===E.url))&&!window.confirm("Remove one or more repositories from this paper?")||j.mutate({paperId:a,repositories:g}))},u=m.useMemo(()=>{const g=f.trim(),E=g?[...c,{url:g,is_official:!1}]:c;if(E.length!==n.length)return!0;const A=v(n),M=v(E);if(M.length!==A.length)return!0;const q=new Map(A.map(K=>[Ye(K.url)??K.url.trim(),!!K.is_official]));return M.some(K=>{const G=Ye(K.url)??K.url.trim(),p=q.get(G);return p===void 0||p!==!!K.is_official})},[c,f,n]);return e.jsx(ee,{open:t,onOpenChange:s,children:e.jsxs(te,{className:"max-w-2xl max-h-[600px]",children:[e.jsxs(se,{children:[e.jsx(ae,{children:"Edit Paper Repositories"}),e.jsx(re,{children:"Add or remove GitHub repository URLs associated with this paper. Mark repositories as official if they are created by the paper authors."})]}),l==="pending"&&e.jsx(xe,{isAuthor:o}),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(Q,{type:"url",placeholder:"https://github.com/owner/repo",value:f,onChange:g=>i(g.target.value),onKeyPress:g=>{g.key==="Enter"&&(g.preventDefault(),P())},className:"flex-1"}),e.jsxs(F,{onClick:P,size:"sm",disabled:!f.trim(),children:[e.jsx(Te,{className:"w-4 h-4 mr-1"}),"Add"]})]})]}),e.jsx("div",{className:"py-4 overflow-y-auto max-h-[350px]",children:c.length>0?e.jsx("div",{className:"space-y-2",children:c.map((g,E)=>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(Tt,{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(ts,{variant:"secondary",className:"text-xs",children:"Official"})]})}),e.jsxs("div",{className:"flex items-center space-x-1",children:[e.jsxs(F,{variant:g.is_official?"default":"outline",size:"sm",onClick:()=>S(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(ss,{className:`w-3.5 h-3.5 mr-1 ${g.is_official?"fill-current":""}`}),g.is_official?"Official":"Mark official"]}),e.jsx(F,{variant:"ghost",size:"sm",onClick:()=>I(g.url),className:"h-8 px-2 text-destructive hover:text-destructive",title:"Remove repository",children:e.jsx(Ae,{className:"w-4 h-4"})})]})]},E))}):e.jsxs("div",{className:"text-center py-8 text-muted-foreground",children:[e.jsx(Tt,{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(oe,{children:[e.jsx(F,{variant:"outline",onClick:()=>s(!1),children:"Cancel"}),e.jsx(F,{onClick:_,disabled:j.isPending||!u,children:j.isPending?e.jsxs(e.Fragment,{children:[e.jsx(ne,{className:"w-4 h-4 mr-2 animate-spin"}),l==="pending"?"Submitting...":"Saving..."]}):e.jsxs(e.Fragment,{children:[e.jsx(me,{className:"w-4 h-4 mr-2"}),l==="pending"?"Submit for review":"Save Changes"]})})]})]})})}function Hr({open:t,onOpenChange:s,paperId:a,arxivId:r,initialUrl:n,onSuccess:d,submitMode:l="direct",isAuthor:o=!1}){const[c,h]=m.useState(n),f=he(),{toast:i}=ie(),x=m.useRef(!1);m.useEffect(()=>{if(!t){x.current=!1;return}x.current||(x.current=!0,h(n))},[t,n]);const b=le({mutationFn:async({paperId:P,sourceUrl:I})=>l==="pending"?(await pe.submit({paper_id:parseInt(P),edit_type:"source_url",proposed_payload:{source_url:I}}),null):W.updateSourceUrl(P,I),onSuccess:P=>{if(l==="pending"){i({title:"Edit submitted for review",description:"Thanks! An admin will review your proposed source URL change shortly."}),d==null||d(),s(!1);return}P&&ve(f,P,[a,r]),d==null||d(),s(!1)},onError:P=>{const I=ge(P,l==="pending"?"Failed to submit your edit. Please try again.":"Failed to update source URL.");i({title:l==="pending"?"Could not submit edit":"Could not save source URL",description:I,variant:"destructive"})}}),y=c.trim(),j=/^https?:\/\//i.test(y),v=y!==(n||"").trim(),C=()=>{j&&b.mutate({paperId:a,sourceUrl:y})};return e.jsx(ee,{open:t,onOpenChange:s,children:e.jsxs(te,{className:"max-w-2xl",children:[e.jsxs(se,{children:[e.jsx(ae,{children:"Edit Source URL"}),e.jsxs(re,{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."]})]}),l==="pending"&&e.jsx(xe,{isAuthor:o}),e.jsxs("div",{className:"space-y-2 py-2",children:[e.jsx("label",{className:"text-sm font-medium",children:"Source URL"}),e.jsx(Q,{type:"url",placeholder:"https://example.com/paper",value:c,onChange:P=>h(P.target.value),onKeyPress:P=>{P.key==="Enter"&&j&&v&&(P.preventDefault(),C())}}),!j&&y.length>0&&e.jsx("p",{className:"text-xs text-destructive",children:"URL must start with http:// or https://"})]}),e.jsxs(oe,{children:[e.jsx(F,{variant:"outline",onClick:()=>s(!1),children:"Cancel"}),e.jsx(F,{onClick:C,disabled:b.isPending||!j||!v,children:b.isPending?e.jsxs(e.Fragment,{children:[e.jsx(ne,{className:"w-4 h-4 mr-2 animate-spin"}),l==="pending"?"Submitting...":"Saving..."]}):e.jsxs(e.Fragment,{children:[e.jsx(me,{className:"w-4 h-4 mr-2"}),l==="pending"?"Submit for review":"Save Changes"]})})]})]})})}const zr=250,Mr=100;function Or({open:t,onOpenChange:s,paperId:a,arxivId:r,initialTaskIds:n,initialTasks:d,onSuccess:l,submitMode:o="direct",isAuthor:c=!1}){const[h,f]=m.useState(n),[i,x]=m.useState(!1),[b,y]=m.useState(""),[j,v]=m.useState(""),[C,P]=m.useState(new Map),I=he(),{toast:S}=ie(),_=m.useRef(!1);m.useEffect(()=>{if(!t){_.current=!1;return}if(_.current)return;_.current=!0,f(n),y(""),v("");const p=new Map;(d||[]).forEach($=>{const L=parseInt($.id);Number.isNaN(L)||p.set(L,$)}),P(p)},[t,n,d]),m.useEffect(()=>{const p=window.setTimeout(()=>{v(b.trim())},zr);return()=>window.clearTimeout(p)},[b]);const{data:u,isFetching:g}=ue({queryKey:["tasks-search",j],queryFn:()=>_e.listTasks({page_size:Mr,...j?{q:j}:{}}),enabled:t});m.useEffect(()=>{var p;(p=u==null?void 0:u.results)!=null&&p.length&&P($=>{const L=new Map($);return u.results.forEach(T=>{const U=parseInt(T.id);Number.isNaN(U)||L.set(U,T)}),L})},[u]);const E=m.useMemo(()=>{const p=(u==null?void 0:u.results)||[],$=new Set,L=[],T=(z,Y)=>{!Y||Number.isNaN(z)||$.has(z)||(L.push(Y),$.add(z))},U=()=>h.forEach(z=>T(z,C.get(z))),H=()=>p.forEach(z=>T(parseInt(z.id),z));return j?(H(),U()):(U(),H()),L},[u,h,C,j]),A=le({mutationFn:async({paperId:p,taskIds:$})=>o==="pending"?(await pe.submit({paper_id:parseInt(p),edit_type:"tasks",proposed_payload:{task_ids:$}}),null):W.updateTasks(p,$),onMutate:async({taskIds:p})=>{if(o==="pending")return{snapshots:[]};const $=p.map(U=>C.get(U)).filter(U=>!!U).map(U=>({id:U.id,name:U.name,slug:U.slug})).sort((U,H)=>U.name.localeCompare(H.name)),L=Array.from(new Set([a,r].filter(U=>!!U)));await Promise.all(L.flatMap(U=>[I.cancelQueries({queryKey:ye.detail(U)}),I.cancelQueries({queryKey:ye.arxiv(U)})]));const T=[];return L.forEach(U=>{[ye.detail(U),ye.arxiv(U)].forEach(H=>{const z=I.getQueryData(H);T.push({key:H,data:z}),z&&I.setQueryData(H,{...z,tasks:$})})}),S({title:"Tasks updated",description:`Saved ${p.length} task${p.length===1?"":"s"} for this paper.`}),l==null||l(),s(!1),{snapshots:T}},onSuccess:p=>{if(o==="pending"){S({title:"Edit submitted for review",description:"Thanks! An admin will review your proposed task changes shortly."}),l==null||l(),s(!1);return}p&&ve(I,p,[a,r])},onError:(p,$,L)=>{var U;(U=L==null?void 0:L.snapshots)==null||U.forEach(({key:H,data:z})=>{I.setQueryData(H,z)});const T=ge(p,o==="pending"?"Failed to submit your edit. Please try again.":"Failed to update paper tasks.");S({title:o==="pending"?"Could not submit edit":"Could not save tasks",description:T,variant:"destructive"})}}),M=()=>{o==="direct"&&n.some(p=>!h.includes(p))&&!window.confirm("Remove one or more task links from this paper?")||A.mutate({paperId:a,taskIds:h})},q=m.useMemo(()=>{if(h.length!==n.length)return!0;const p=new Set(n);return h.some($=>!p.has($))},[h,n]),K=(p,$)=>{f(L=>$?L.includes(p)?L:[...L,p]:L.filter(T=>T!==p))},G=()=>y("");return e.jsxs(ee,{open:t,onOpenChange:s,children:[e.jsxs(te,{className:"max-w-2xl max-h-[600px]",children:[e.jsxs(se,{children:[e.jsx(ae,{children:"Edit Paper Tasks"}),e.jsx(re,{children:"Select the tasks that this paper addresses. You can select multiple tasks."})]}),o==="pending"&&e.jsx(xe,{isAuthor:c}),e.jsxs("div",{className:"relative mb-4",children:[e.jsx(Le,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground"}),e.jsx(Q,{type:"text",placeholder:"Search tasks...",value:b,onChange:p=>y(p.target.value),className:"pl-9 pr-9"}),b&&e.jsx("button",{type:"button",onClick:G,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(wt,{className:"w-4 h-4"})})]}),e.jsx("div",{className:"py-4 overflow-y-auto max-h-[400px]",children:E.length>0?e.jsx("div",{className:"space-y-2",children:E.map(p=>{const $=parseInt(p.id),L=h.includes($);return e.jsxs("div",{className:"flex items-center space-x-2 p-2 hover:bg-muted/50 rounded-md",children:[e.jsx(Ge,{id:`task-${p.id}`,checked:L,onCheckedChange:T=>K($,T===!0),className:"!border !border-black data-[state=checked]:!bg-black data-[state=checked]:!text-white"}),e.jsxs("label",{htmlFor:`task-${p.id}`,className:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 cursor-pointer flex-1",children:[p.name,p.description&&e.jsxs("span",{className:"block text-xs text-muted-foreground font-normal mt-1",children:[p.description.substring(0,100),p.description.length>100?"...":""]})]})]},p.id)})}):g?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(Le,{className:"w-8 h-8 mx-auto mb-2 opacity-50"}),e.jsx("p",{children:j?`No tasks found matching "${j}"`:"No tasks available"})]})}),e.jsxs(oe,{children:[e.jsx(F,{variant:"ghost",className:"sm:mr-auto",onClick:()=>x(!0),children:"Suggest a new task"}),e.jsx(F,{variant:"outline",onClick:()=>s(!1),children:"Cancel"}),e.jsx(F,{onClick:M,disabled:A.isPending||!q,children:A.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(me,{className:"w-4 h-4 mr-2"}),o==="pending"?"Submit for review":"Save Changes"]})})]})]}),e.jsx(yt,{open:i,onOpenChange:x,paperId:a,kind:"task"})]})}const Mt=10,qr=/^https?:\/\/(?:www\.|mobile\.)?(?:x|twitter)\.com\/(?:[A-Za-z0-9_]{1,15}|i\/web|i)\/status(?:es)?\/(\d{1,25})(?:[/?#].*)?$/;function Ne(t){var s;return((s=qr.exec(t.trim()))==null?void 0:s[1])??null}function Kr({open:t,onOpenChange:s,paperId:a,arxivId:r,initialUrls:n,submitMode:d="direct",isAuthor:l=!1}){const[o,c]=m.useState(n),[h,f]=m.useState(""),[i,x]=m.useState(null),b=he(),{toast:y}=ie(),j=m.useRef(!1);m.useEffect(()=>{if(!t){j.current=!1;return}j.current||(j.current=!0,c(n),f(""),x(null))},[t,n]);const v=le({mutationFn:async u=>d==="pending"?(await pe.submit({paper_id:parseInt(a),edit_type:"x_threads",proposed_payload:{x_threads:u}}),null):W.updateXThreads(a,u),onSuccess:u=>{d==="pending"?y({title:"Edit submitted for review",description:"Thanks! An admin will review your proposed X threads shortly."}):u&&ve(b,u,[a,r]),s(!1)},onError:u=>{y({title:d==="pending"?"Could not submit edit":"Could not save X threads",description:ge(u,d==="pending"?"Failed to submit your edit. Please try again.":"Failed to update X threads."),variant:"destructive"})}}),C=()=>{const u=h.trim();if(!u)return o;const g=Ne(u);return g?o.some(E=>Ne(E)===g)?(x("This post is already listed."),null):o.length>=Mt?(x(`A paper can link at most ${Mt} X threads.`),null):[...o,u]:(x("Paste a post URL such as https://x.com/user/status/123…"),null)},P=()=>{const u=C();u!==null&&(c(u),f(""),x(null))},I=(u,g)=>{const E=[...o];[E[u],E[u+g]]=[E[u+g],E[u]],c(E)},S=()=>{const u=C();u!==null&&(d==="direct"&&n.some(g=>!u.some(E=>Ne(E)===Ne(g)))&&!window.confirm("Remove one or more X threads from this paper?")||v.mutate(u))},_=m.useMemo(()=>(h.trim()?[...o,h.trim()]:o).map(Ne).join()!==n.map(Ne).join(),[o,h,n]);return e.jsx(ee,{open:t,onOpenChange:s,children:e.jsxs(te,{className:"max-w-2xl max-h-[600px]",children:[e.jsxs(se,{children:[e.jsx(ae,{children:"Edit X threads"}),e.jsx(re,{children:"Link posts on X (formerly Twitter) in which the authors introduce this paper. A preview of each post is shown on the paper page."})]}),d==="pending"&&e.jsx(xe,{isAuthor:l}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("label",{className:"text-sm font-medium",htmlFor:"x-thread-url",children:"Add X post URL"}),e.jsxs("div",{className:"flex space-x-2",children:[e.jsx(Q,{id:"x-thread-url",type:"url",placeholder:"https://x.com/user/status/1234567890",value:h,onChange:u=>{f(u.target.value),x(null)},onKeyDown:u=>{u.key==="Enter"&&(u.preventDefault(),P())},"aria-invalid":!!i,className:"flex-1"}),e.jsxs(F,{onClick:P,size:"sm",disabled:!h.trim(),children:[e.jsx(Te,{className:"w-4 h-4 mr-1"}),"Add"]})]}),i&&e.jsx("p",{className:"text-xs text-destructive",children:i})]}),e.jsx("div",{className:"py-4 overflow-y-auto max-h-[350px]",children:o.length>0?e.jsx("div",{className:"space-y-2",children:o.map((u,g)=>e.jsxs("div",{className:"flex items-center space-x-2 p-3 bg-muted/30 rounded-lg",children:[e.jsx("span",{className:"flex-1 min-w-0 truncate text-sm font-medium",children:u}),e.jsx(F,{variant:"ghost",size:"sm",className:"h-8 px-2",disabled:g===0,onClick:()=>I(g,-1),"aria-label":"Move up",children:e.jsx(Ra,{className:"w-4 h-4"})}),e.jsx(F,{variant:"ghost",size:"sm",className:"h-8 px-2",disabled:g===o.length-1,onClick:()=>I(g,1),"aria-label":"Move down",children:e.jsx(La,{className:"w-4 h-4"})}),e.jsx(F,{variant:"ghost",size:"sm",className:"h-8 px-2 text-destructive hover:text-destructive",onClick:()=>c(o.filter(E=>E!==u)),"aria-label":"Remove X thread",children:e.jsx(Ae,{className:"w-4 h-4"})})]},u))}):e.jsx("p",{className:"text-center py-8 text-sm text-muted-foreground",children:"No X threads linked yet"})}),e.jsxs(oe,{children:[e.jsx(F,{variant:"outline",onClick:()=>s(!1),children:"Cancel"}),e.jsx(F,{onClick:S,disabled:v.isPending||!_,children:v.isPending?e.jsxs(e.Fragment,{children:[e.jsx(ne,{className:"w-4 h-4 mr-2 animate-spin"}),d==="pending"?"Submitting...":"Saving..."]}):e.jsxs(e.Fragment,{children:[e.jsx(me,{className:"w-4 h-4 mr-2"}),d==="pending"?"Submit for review":"Save Changes"]})})]})]})})}function Gr({activeEditor:t,arxivId:s,editSubmitMode:a,evaluations:r,isAdmin:n,isLinkedAuthor:d,onOpenChange:l,paper:o}){if(!t)return null;const c={open:!0,paperId:o.id,arxivId:s,submitMode:a,isAuthor:d},h=i=>x=>l(i,x);return{tasks:()=>{var i;return e.jsx(Or,{...c,onOpenChange:h("tasks"),initialTaskIds:((i=o.tasks)==null?void 0:i.map(x=>Number(x.id)))??[],initialTasks:o.tasks??[]})},methods:()=>{var i;return e.jsx(Rr,{...c,onOpenChange:h("methods"),initialMethodIds:((i=o.methods)==null?void 0:i.map(x=>Number(x.id)))??[],initialMethods:o.methods??[]})},repositories:()=>{var i;return e.jsx(Br,{...c,onOpenChange:h("repositories"),initialRepositories:((i=o.repositories)==null?void 0:i.map(({url:x,is_official:b})=>({url:x,is_official:!!b})))??[]})},"project-pages":()=>{var i;return e.jsx(Dr,{...c,onOpenChange:h("project-pages"),initialProjectPages:((i=o.project_pages)==null?void 0:i.map(({url:x,is_official:b})=>({url:x,is_official:!!b})))??[]})},results:()=>e.jsx(kr,{...c,onOpenChange:h("results"),initialEvaluations:r,paperTasks:o.tasks??[],isAdmin:n}),"source-url":()=>e.jsx(Hr,{...c,onOpenChange:h("source-url"),initialUrl:o.source_url??o.url_abs??""}),"hf-artifacts":()=>e.jsx(Cr,{...c,onOpenChange:h("hf-artifacts"),initialArtifacts:{hf_models:o.hf_models??[],hf_datasets:o.hf_datasets??[],hf_spaces:o.hf_spaces??[]}}),"x-threads":()=>{var i;return e.jsx(Kr,{...c,onOpenChange:h("x-threads"),initialUrls:((i=o.x_threads)==null?void 0:i.map(({url:x})=>x))??[]})},organizations:()=>e.jsx(Ur,{open:!0,paperId:o.id,onOpenChange:h("organizations"),initialOrganizationIds:(o.organizations??[]).map(({id:i})=>Number(i)),submitMode:a,isAuthor:d})}[t]()}const Vr={"add-evals":{trigger:"add evals",running:"adding evals…",complete:"add evals ✓",title:"Add evaluations with Codex",description:t=>e.jsxs(e.Fragment,{children:["Codex will run the repository’s add-evals skill for “",t,"”. It will import only paper-native results onto existing, metric-compatible leaderboards. Accepted rows are written directly to the live database."]}),notice:"Comparator rows, unknown benchmarks, and unconfigured metrics will be skipped. Jobs run one at a time in submission order.",progress:"Codex is researching the paper and validating results against the configured leaderboards.",action:"Run add-evals",start:ka,get:_a,cancel:ya},"enrich-paper":{trigger:"enrich paper",running:"enriching…",complete:"enriched ✓",title:"Enrich paper with Codex",description:t=>e.jsxs(e.Fragment,{children:["Codex will run the repository’s enrich-paper skill for “",t,"”. It will validate official code and project links, merge high-confidence taxonomy tags, and check the paper thumbnail. Accepted changes are written directly to the live database."]}),notice:"Uncertain URLs and missing taxonomy concepts will be reported rather than guessed. Jobs run one at a time in submission order.",progress:"Codex is validating artifacts, taxonomy tags, and thumbnail quality for this paper.",action:"Run enrich-paper",start:wa,get:va,cancel:ja}};function Xr({report:t}){return e.jsx("div",{className:"min-w-0 max-h-[50vh] overflow-y-auto overflow-x-hidden rounded-md border bg-muted/40 p-4 text-sm leading-relaxed",children:e.jsx(Ea,{remarkPlugins:[Sa],components:{a:({children:s,...a})=>e.jsx("a",{...a,className:"break-all underline underline-offset-2",target:"_blank",rel:"noreferrer",children:s}),p:({children:s})=>e.jsx("p",{className:"mb-3 break-words last:mb-0",children:s}),ul:({children:s})=>e.jsx("ul",{className:"mb-3 list-disc space-y-1 pl-5 last:mb-0",children:s}),ol:({children:s})=>e.jsx("ol",{className:"mb-3 list-decimal space-y-1 pl-5 last:mb-0",children:s}),h1:({children:s})=>e.jsx("h3",{className:"mb-2 font-semibold",children:s}),h2:({children:s})=>e.jsx("h3",{className:"mb-2 font-semibold",children:s}),h3:({children:s})=>e.jsx("h3",{className:"mb-2 font-semibold",children:s}),code:({children:s})=>e.jsx("code",{className:"break-all rounded bg-background/80 px-1 py-0.5 font-mono text-xs",children:s}),pre:({children:s})=>e.jsx("pre",{className:"mb-3 max-w-full overflow-x-auto whitespace-pre-wrap break-words rounded bg-background/80 p-3 font-mono text-xs last:mb-0",children:s})},children:t})})}function fs({kind:t,paperId:s,paperTitle:a,triggerClassName:r,onComplete:n}){const d=Vr[t],[l,o]=m.useState(!1),[c,h]=m.useState(null),[f,i]=m.useState(!1),[x,b]=m.useState(null),y=m.useRef(null),j=(c==null?void 0:c.status)==="queued"||(c==null?void 0:c.status)==="dispatching"||(c==null?void 0:c.status)==="running",v=c==null?void 0:c.id;m.useEffect(()=>{if(!j||!v)return;let S=!1;const _=window.setInterval(async()=>{try{const u=await d.get(v);S||(h(u),b(null))}catch(u){S||b(u instanceof Error?u.message:"Could not check job status.")}},2e3);return()=>{S=!0,window.clearInterval(_)}},[j,d,v]),m.useEffect(()=>{(c==null?void 0:c.status)!=="completed"||y.current===c.id||(y.current=c.id,n())},[c,n]);const C=async()=>{i(!0),b(null);try{h(await d.start(s))}catch(S){b(S instanceof Error?S.message:"Could not start Codex.")}finally{i(!1)}},P=()=>{h(null),b(null),y.current=null},I=async()=>{if(c){b(null);try{h(await d.cancel(c.id))}catch(S){b(S instanceof Error?S.message:"Could not cancel Codex.")}}};return e.jsxs(ee,{open:l,onOpenChange:o,children:[e.jsx("button",{type:"button",className:r,onClick:()=>o(!0),children:j?d.running:(c==null?void 0:c.status)==="completed"?d.complete:d.trigger}),e.jsxs(te,{className:"max-h-[90vh] w-[calc(100vw-2rem)] min-w-0 max-w-2xl overflow-hidden",children:[e.jsxs(se,{className:"min-w-0",children:[e.jsx(ae,{children:d.title}),e.jsx(re,{children:d.description(a)})]}),c?e.jsxs("div",{className:"min-w-0 space-y-3 overflow-hidden",children:[e.jsxs("div",{className:"font-mono text-xs uppercase tracking-wide text-muted-foreground",children:["Status: ",c.status]}),c.hf_job_url&&e.jsx("a",{className:"text-sm underline",href:c.hf_job_url,target:"_blank",rel:"noreferrer",children:"View Hugging Face Job"}),j&&e.jsxs("div",{className:"rounded-md border bg-muted/40 p-3 text-sm",children:[c.status==="queued"?"This job is queued and will start after the current Codex job finishes.":d.progress," ","This can take several minutes; you can close this window and return."]}),c.report&&e.jsx(Xr,{report:c.report}),c.error&&e.jsx("div",{className:"rounded-md border border-destructive/40 bg-destructive/10 p-3 text-sm text-destructive",children:c.error})]}):e.jsx("div",{className:"rounded-md border bg-muted/40 p-3 text-sm text-muted-foreground",children:d.notice}),x&&e.jsx("div",{className:"rounded-md border border-destructive/40 bg-destructive/10 p-3 text-sm text-destructive",children:x}),e.jsxs(oe,{children:[e.jsx(F,{variant:"outline",onClick:()=>o(!1),children:j?"Close":"Cancel"}),j&&e.jsx(F,{variant:"outline",onClick:()=>void I(),children:"Cancel job"}),!c&&e.jsx(F,{onClick:C,disabled:f,children:f?"Starting…":d.action}),c&&!j&&e.jsx(F,{variant:"outline",onClick:P,children:"Run again"})]})]})]})}function Qr(t){return e.jsx(fs,{...t,kind:"add-evals",triggerClassName:"edit-link"})}function Se({accent:t,id:s,label:a}){return e.jsxs("div",{className:"section-rule paper-section-anchor",id:s,children:[e.jsx("span",{children:e.jsx("a",{href:`#${s}`,className:"section-anchor-link",children:a})}),t]})}function Wr({canCopyBadge:t,canEdit:s,evaluationsByTask:a,evaluationsLoading:r,isAdmin:n,onCopyBadge:d,onEdit:l,onRefresh:o,paper:c,visibleEvaluationCount:h}){return e.jsxs(e.Fragment,{children:[e.jsx(Se,{id:"results",label:"Results",accent:e.jsxs("span",{className:"accent",children:[h," benchmarks",t&&e.jsxs("button",{type:"button",className:"edit-link results-badge-copy",onClick:d,title:"Copy live leaderboard badges for your repository README",children:[e.jsx(Z,{name:"copy",size:10})," Copy PwC badge"]}),n&&Na()&&e.jsx(Qr,{paperId:Number(c.id),paperTitle:c.title,onComplete:o}),s&&e.jsx("button",{type:"button",onClick:l,className:"edit-link",children:"edit"})]})}),r?e.jsx($e,{className:"h-32 w-full"}):a.length>0?a.map(f=>e.jsxs("div",{className:f.taskSlug?"paper-section-anchor":void 0,id:f.taskSlug?rs(f.taskSlug):void 0,children:[e.jsxs("div",{className:"section-rule",children:[e.jsx("span",{children:f.taskSlug?e.jsxs(e.Fragment,{children:[e.jsx(fe,{to:`/tasks/${f.taskSlug}`,children:f.taskName}),e.jsx("a",{href:Wa(f.taskSlug),className:"section-anchor-link results-task-permalink","aria-label":`Permalink to ${f.taskName} results on this paper`,title:"Link to this task's results",children:"#"})]}):f.taskName}),e.jsxs("span",{className:"accent",children:[f.rows.length," ",f.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",{children:"Compare"})]})}),e.jsx("tbody",{children:f.rows.map(i=>{var x;return e.jsxs("tr",{children:[e.jsx("td",{className:"benchmark",children:i.dataset_slug?e.jsx(fe,{to:`/benchmark/${i.dataset_slug}`,children:i.dataset_name||"—"}):i.dataset_name||"—"}),e.jsxs("td",{className:"model",title:i.model_name||void 0,children:[i.hf_model_url?e.jsx("a",{href:i.hf_model_url,target:"_blank",rel:"noopener noreferrer",className:"model-hf-link",title:`Open ${i.model_name||"model"} on Hugging Face`,children:i.model_name||"—"}):i.model_name||"—",i.is_open===!1&&e.jsx(aa,{}),(i.external??i.is_external)&&e.jsx(ra,{sourceUrl:i.source_url||i.external_source_url||i.result_url})]}),e.jsx("td",{className:"metric",children:i.best_metric}),e.jsx("td",{className:"value",children:Ts((x=i.metrics)==null?void 0:x[i.best_metric||""])}),e.jsx("td",{className:"rank",children:i.best_rank!=null?`#${i.best_rank}`:"—"}),e.jsx("td",{className:"compare",children:i.dataset_slug&&e.jsx(fe,{to:`/benchmark/${i.dataset_slug}?${[i.task_slug?`task=${encodeURIComponent(i.task_slug)}`:"",`eval=${encodeURIComponent(i.id)}`].filter(Boolean).join("&")}`,children:"Compare →"})})]},i.id)})})]})]},f.taskId)):e.jsx("p",{style:{fontFamily:"var(--mono)",fontSize:12,color:"var(--ink-faint)"},children:"No benchmark results recorded yet."})]})}var Nt="Radio",[Zr,gs]=vt(Nt),[Yr,Jr]=Zr(Nt),xs=m.forwardRef((t,s)=>{const{__scopeRadio:a,name:r,checked:n=!1,required:d,disabled:l,value:o="on",onCheck:c,form:h,...f}=t,[i,x]=m.useState(null),b=Fe(s,v=>x(v)),y=m.useRef(!1),j=i?h||!!i.closest("form"):!0;return e.jsxs(Yr,{scope:a,checked:n,disabled:l,children:[e.jsx(ke.button,{type:"button",role:"radio","aria-checked":n,"data-state":ws(n),"data-disabled":l?"":void 0,disabled:l,value:o,...f,ref:b,onClick:Ie(t.onClick,v=>{n||c==null||c(),j&&(y.current=v.isPropagationStopped(),y.current||v.stopPropagation())})}),j&&e.jsx(vs,{control:i,bubbles:!y.current,name:r,value:o,checked:n,required:d,disabled:l,form:h,style:{transform:"translateX(-100%)"}})]})});xs.displayName=Nt;var bs="RadioIndicator",js=m.forwardRef((t,s)=>{const{__scopeRadio:a,forceMount:r,...n}=t,d=Jr(bs,a);return e.jsx(Qt,{present:r||d.checked,children:e.jsx(ke.span,{"data-state":ws(d.checked),"data-disabled":d.disabled?"":void 0,...n,ref:s})})});js.displayName=bs;var en="RadioBubbleInput",vs=m.forwardRef(({__scopeRadio:t,control:s,checked:a,bubbles:r=!0,...n},d)=>{const l=m.useRef(null),o=Fe(l,d),c=es(a),h=Zt(s);return m.useEffect(()=>{const f=l.current;if(!f)return;const i=window.HTMLInputElement.prototype,b=Object.getOwnPropertyDescriptor(i,"checked").set;if(c!==a&&b){const y=new Event("click",{bubbles:r});b.call(f,a),f.dispatchEvent(y)}},[c,a,r]),e.jsx(ke.input,{type:"radio","aria-hidden":!0,defaultChecked:a,...n,tabIndex:-1,ref:o,style:{...n.style,...h,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});vs.displayName=en;function ws(t){return t?"checked":"unchecked"}var tn=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Ve="RadioGroup",[sn]=vt(Ve,[Yt,gs]),ys=Yt(),_s=gs(),[an,rn]=sn(Ve),ks=m.forwardRef((t,s)=>{const{__scopeRadioGroup:a,name:r,defaultValue:n,value:d,required:l=!1,disabled:o=!1,orientation:c,dir:h,loop:f=!0,onValueChange:i,...x}=t,b=ys(a),y=Us(h),[j,v]=Wt({prop:d,defaultProp:n??null,onChange:i,caller:Ve});return e.jsx(an,{scope:a,name:r,required:l,disabled:o,value:j,onValueChange:v,children:e.jsx(Ds,{asChild:!0,...b,orientation:c,dir:y,loop:f,children:e.jsx(ke.div,{role:"radiogroup","aria-required":l,"aria-orientation":c,"data-disabled":o?"":void 0,dir:y,...x,ref:s})})})});ks.displayName=Ve;var Ns="RadioGroupItem",Cs=m.forwardRef((t,s)=>{const{__scopeRadioGroup:a,disabled:r,...n}=t,d=rn(Ns,a),l=d.disabled||r,o=ys(a),c=_s(a),h=m.useRef(null),f=Fe(s,h),i=d.value===n.value,x=m.useRef(!1);return m.useEffect(()=>{const b=j=>{tn.includes(j.key)&&(x.current=!0)},y=()=>x.current=!1;return document.addEventListener("keydown",b),document.addEventListener("keyup",y),()=>{document.removeEventListener("keydown",b),document.removeEventListener("keyup",y)}},[]),e.jsx(Bs,{asChild:!0,...o,focusable:!l,active:i,children:e.jsx(xs,{disabled:l,required:d.required,checked:i,...c,...n,name:d.name,ref:f,onCheck:()=>d.onValueChange(n.value),onKeyDown:Ie(b=>{b.key==="Enter"&&b.preventDefault()}),onFocus:Ie(n.onFocus,()=>{var b;x.current&&((b=h.current)==null||b.click())})})})});Cs.displayName=Ns;var nn="RadioGroupIndicator",Es=m.forwardRef((t,s)=>{const{__scopeRadioGroup:a,...r}=t,n=_s(a);return e.jsx(js,{...n,...r,ref:s})});Es.displayName=nn;var Ss=ks,Ps=Cs,on=Es;const ft=m.forwardRef(({className:t,...s},a)=>e.jsx(Ss,{className:ze("grid gap-2",t),...s,ref:a}));ft.displayName=Ss.displayName;const Pe=m.forwardRef(({className:t,...s},a)=>e.jsx(Ps,{ref:a,className:ze("aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",t),...s,children:e.jsx(on,{className:"flex items-center justify-center",children:e.jsx(Hs,{className:"h-2.5 w-2.5 fill-current text-current"})})}));Pe.displayName=Ps.displayName;const ln={pdf:"PDF",model:"Model",dataset:"Dataset",space:"Space",github:"GitHub"},gt=/^[A-Za-z0-9][A-Za-z0-9._-]*$/,cn=/^[A-Za-z0-9][\w.-]*\/[A-Za-z0-9][\w.-]*$/,dn=20,xt="copy_to_bucket";function un(t){const s=t.trim();if(!cn.test(s))return null;const[a,r]=s.split("/");return`https://huggingface.co/buckets/${encodeURIComponent(a)}/${encodeURIComponent(r)}`}function bt(t){return`pwc:bucket-copy:${t}`}function mn(t){if(typeof window>"u"||new URL(window.location.href).searchParams.get(xt)!==t)return null;try{const a=window.sessionStorage.getItem(bt(t));if(!a)return null;const r=JSON.parse(a);return r.paperId!==t||typeof r.bucketId!="string"||!["new","existing"].includes(r.destinationMode)||!["public","private"].includes(r.visibility)||!Array.isArray(r.selectedIds)||r.selectedIds.some(n=>typeof n!="string")?null:r}catch{return null}}function hn(t,s=dn){if(s<1)throw new Error("Bucket copy batch size must be positive");const a=[];for(let r=0;r!gt.test(c)))return null;const l=d.join("/"),o=s==="model"?"":`${s}s/`;return{id:`${s}:${l}`,kind:s,label:l,url:`https://huggingface.co/${o}${l}`,source:`hf://${o}${l}/`,destination:`${s}s/${l}/`,repoId:l}}catch{return null}}function pn(t){try{const s=new URL(t);if(s.hostname!=="github.com"&&s.hostname!=="www.github.com")return null;const a=s.pathname.split("/").filter(Boolean);if(a.length<2)return null;const r=a[0],n=a[1].replace(/\.git$/,"");if(!gt.test(r)||!gt.test(n))return null;const d=`${r}/${n}`;return{id:`github:${d}`,kind:"github",label:d,url:`https://github.com/${d}`,source:`https://github.com/${d}.git`,destination:`github/${d}/`}}catch{return null}}function fn({githubUrls:t,hfModelUrls:s,hfDatasetUrls:a,hfSpaceUrls:r,paperId:n,pdfName:d,pdfUrl:l}){const o=[l?{id:"pdf",kind:"pdf",label:"Paper PDF",url:l,source:l,destination:`paper/${d||n}.pdf`}:null,...s.map(h=>dt(h,"model")),...a.map(h=>dt(h,"dataset")),...r.map(h=>dt(h,"space")),...t.map(pn)],c=new Set;return o.filter(h=>!h||c.has(h.id)?!1:(c.add(h.id),!0))}function gn(t,s,a){const r=["# Requires the Hugging Face CLI: https://huggingface.co/docs/huggingface_hub/guides/cli",`HF_BUCKET=${Be(t.trim())}`];a.create&&r.push(`hf buckets create "$HF_BUCKET" --exist-ok${a.isPrivate?" --private":""}`);for(const l of s.filter(o=>o.kind!=="github"&&o.kind!=="pdf"))r.push(`hf cp ${Be(l.source)} "hf://buckets/$HF_BUCKET/${l.destination}"`);const n=s.find(l=>l.kind==="pdf");n&&r.push('PWC_PDF="$(mktemp)"',`trap 'rm -f "$PWC_PDF"' EXIT`,`curl --fail --location ${Be(n.source)} --output "$PWC_PDF"`,`hf cp "$PWC_PDF" "hf://buckets/$HF_BUCKET/${n.destination}"`);const d=s.filter(l=>l.kind==="github");if(d.length){r.push('PWC_COPY_DIR="$(mktemp -d)"',`trap 'rm -rf "$PWC_COPY_DIR"' EXIT`);for(const l of d){const o=`$PWC_COPY_DIR/${l.destination.replace(/\/$/,"")}`;r.push(`git clone --depth 1 -- ${Be(l.source)} "${o}"`,`hf sync "${o}" "hf://buckets/$HF_BUCKET/${l.destination}" --exclude '.git/**'`)}}return r.join(` +`)}function xn(t){return`${(t.split(/[:|–—]/,1)[0]||t).normalize("NFKD").replace(/[\u0300-\u036f]/g,"").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"").slice(0,48).replace(/-+$/g,"")||"paper"}-artifacts`}function bn(t){const{toast:s}=ie(),a=m.useMemo(()=>fn({githubUrls:t.githubUrls,hfDatasetUrls:t.hfDatasetUrls,hfModelUrls:t.hfModelUrls,hfSpaceUrls:t.hfSpaceUrls,paperId:t.paperId,pdfName:t.pdfName,pdfUrl:t.pdfUrl}),[t.githubUrls,t.hfDatasetUrls,t.hfModelUrls,t.hfSpaceUrls,t.paperId,t.pdfName,t.pdfUrl]),r=m.useMemo(()=>mn(t.paperId),[t.paperId]),[n,d]=m.useState(!!r),[l,o]=m.useState((r==null?void 0:r.destinationMode)??"new"),[c,h]=m.useState((r==null?void 0:r.bucketId)??""),[f,i]=m.useState((r==null?void 0:r.visibility)??"public"),[x,b]=m.useState(()=>new Set((r==null?void 0:r.selectedIds)??a.map(p=>p.id))),[y,j]=m.useState(!1),[v,C]=m.useState(null),[P,I]=m.useState(!!r),S=a.filter(p=>x.has(p.id)),_=S.length===a.length,u=un(c),g=u!==null,E=gn(c,S,{create:l==="new",isPrivate:f==="private"}),A=(p,$)=>{b(L=>{const T=new Set(L);return $?T.add(p):T.delete(p),T})},M=async()=>{try{await navigator.clipboard.writeText(E),s({title:"Bucket copy commands copied",description:"Run them in a terminal where the Hugging Face CLI is signed in."})}catch{s({title:"Copy failed",description:"Could not access the clipboard. Select and copy the commands manually.",variant:"destructive"})}},q=m.useCallback(()=>{const p=zs("/api/v1/auth/hf/login"),$=new URL(window.location.href);$.searchParams.set(xt,t.paperId),window.sessionStorage.setItem(bt(t.paperId),JSON.stringify({paperId:t.paperId,bucketId:c.trim(),destinationMode:l,visibility:f,selectedIds:Array.from(x)}));const L=new URLSearchParams({return_to:$.toString(),authorize_bucket:"true"});l==="new"&&L.set("bucket_create","true"),window.location.assign(`${p}?${L.toString()}`)},[c,l,t.paperId,x,f]),K=m.useCallback(async()=>{if(!t.isSignedIn){q();return}j(!0);let p=0,$=0;try{const L=S.filter(H=>H.kind!=="pdf"&&H.kind!=="github"&&!!H.repoId).map(H=>({kind:H.kind,repo_id:H.repoId})),T=hn(L);T.length||T.push([]);for(const[H,z]of T.entries()){C({current:H+1,total:T.length});const Y=await W.copyToBucket(t.paperId,{bucket_id:c.trim(),create:H===0&&l==="new",private:f==="private",include_pdf:H===0&&S.some(J=>J.kind==="pdf"),artifacts:z});p+=Y.copied.length,$+=Y.errors.length}const U=S.filter(H=>H.kind==="github").length;s({title:$?"Bucket copy partially completed":"Copied to bucket",description:[`${p} item${p===1?"":"s"} copied.`,$?`${$} item${$===1?"":"s"} failed.`:"",U?"Use the generated commands below to copy GitHub repositories.":""].filter(Boolean).join(" "),variant:$?"destructive":void 0,action:u?e.jsx(Ms,{altText:"Open destination bucket",asChild:!0,children:e.jsx("a",{href:u,target:"_blank",rel:"noopener noreferrer",children:"Open bucket"})}):void 0}),!$&&!U&&d(!1)}catch(L){if(L instanceof ht&&L.code==="bucket_authorization_required"){q();return}s({title:p?"Bucket copy partially completed":"Bucket copy failed",description:p?`${p} item${p===1?"":"s"} copied before the request failed. You can retry or use the CLI commands below.`:L instanceof ht&&typeof L.detail=="string"?L.detail:"Hugging Face could not complete the copy. You can still use the CLI commands below.",variant:"destructive"})}finally{j(!1),C(null)}},[q,c,u,l,t.isSignedIn,t.paperId,S,s,f]);m.useEffect(()=>{if(!P||!t.isSignedIn)return;I(!1),window.sessionStorage.removeItem(bt(t.paperId));const p=new URL(window.location.href);p.searchParams.delete(xt),window.history.replaceState({},"",`${p.pathname}${p.search}${p.hash}`),K()},[K,t.isSignedIn,t.paperId,P]);const G=()=>{b(new Set(a.map(p=>p.id))),!c&&t.suggestedBucketId&&h(t.suggestedBucketId),d(!0)};return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"sidebar-card copy-to-bucket-card",children:[e.jsxs("button",{type:"button",className:"copy-to-bucket-trigger",onClick:G,children:[e.jsx("span",{className:"copy-to-bucket-arrow","aria-hidden":"true",children:"→"}),e.jsx("span",{className:"copy-to-bucket-title",children:"Copy to bucket"}),e.jsx("span",{className:"copy-to-bucket-new",children:"New"})]}),e.jsx("div",{className:"copy-to-bucket-meta",children:a.length?`${a.length} linked artifact${a.length===1?"":"s"}`:"No linked artifacts yet"})]}),e.jsx(ee,{open:n,onOpenChange:d,children:e.jsxs(te,{className:"max-h-[90vh] max-w-2xl grid-rows-[auto_minmax(0,1fr)_auto] overflow-hidden",children:[e.jsxs(se,{children:[e.jsxs(ae,{className:"flex items-center gap-2",children:[e.jsx("span",{className:"copy-to-bucket-dialog-arrow","aria-hidden":"true",children:"→"}),"Copy to bucket"]}),e.jsx(re,{children:"Keep your own copy of this paper's PDF, linked code, and Hugging Face artifacts. Hub repositories use Xet's server-side copy; GitHub repositories use the generated CLI fallback."})]}),e.jsx("div",{className:"-mx-6 min-h-0 overflow-y-auto px-6",children:a.length?e.jsxs("div",{className:"space-y-5",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(ce,{children:"Choose your destination"}),e.jsxs(ft,{value:l,onValueChange:p=>o(p),className:"grid grid-cols-2 gap-2",children:[e.jsxs(ce,{className:"bucket-choice",children:[e.jsx(Pe,{value:"new"}),"New bucket"]}),e.jsxs(ce,{className:"bucket-choice",children:[e.jsx(Pe,{value:"existing"}),"Existing bucket"]})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(ce,{htmlFor:"bucket-id",children:"Bucket name"}),e.jsx(Q,{id:"bucket-id",value:c,onChange:p=>h(p.target.value),placeholder:t.suggestedBucketId||"username/paper-artifacts","aria-invalid":c.length>0&&!g}),e.jsxs("div",{className:"flex items-center justify-between gap-3 text-xs",children:[e.jsx("p",{className:"text-muted-foreground",children:"Use the full Hugging Face bucket ID: namespace/name."}),u&&e.jsxs("a",{href:u,target:"_blank",rel:"noopener noreferrer",className:"inline-flex shrink-0 items-center gap-1 underline underline-offset-4",children:["View bucket",e.jsx(Z,{name:"external",size:10})]})]})]}),l==="new"&&e.jsxs("div",{className:"space-y-2",children:[e.jsx(ce,{children:"Bucket visibility"}),e.jsxs(ft,{value:f,onValueChange:p=>i(p),className:"flex gap-5",children:[e.jsxs(ce,{className:"flex items-center gap-2 font-normal",children:[e.jsx(Pe,{value:"public"}),"Public"]}),e.jsxs(ce,{className:"flex items-center gap-2 font-normal",children:[e.jsx(Pe,{value:"private"}),"Private"]})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center justify-between gap-3",children:[e.jsx(ce,{children:"Artifacts"}),e.jsx(F,{type:"button",variant:"outline",size:"sm",className:"h-7 px-2 text-xs",onClick:()=>b(_?new Set:new Set(a.map(p=>p.id))),children:_?"Deselect all":"Select all"})]}),e.jsx("div",{className:"bucket-artifact-list",children:a.map(p=>e.jsxs("div",{className:"bucket-artifact-row",children:[e.jsx(Ge,{id:`bucket-artifact-${p.id}`,checked:x.has(p.id),onCheckedChange:$=>A(p.id,$===!0)}),e.jsxs(ce,{htmlFor:`bucket-artifact-${p.id}`,className:"min-w-0 flex-1 cursor-pointer font-normal",children:[e.jsx("span",{className:"bucket-artifact-kind",children:ln[p.kind]}),e.jsx("span",{className:"bucket-artifact-name",children:p.label})]}),e.jsxs("a",{href:de(p.url)??void 0,target:"_blank",rel:"noopener noreferrer",className:"bucket-artifact-open",children:["Open",e.jsx(Z,{name:"external",size:10})]})]},p.id))}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"The PDF and Hugging Face artifacts can be copied directly. GitHub repositories require the CLI workflow below."})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(ce,{htmlFor:"bucket-copy-commands",children:"CLI fallback"}),e.jsx("pre",{id:"bucket-copy-commands",className:"bucket-copy-commands h-[190px]",children:g?E:"Enter a bucket name above to prepare the copy commands."})]})]}):e.jsx("p",{className:"py-5 text-sm text-muted-foreground",children:"This paper does not have a linked GitHub repository or Hugging Face artifact to copy yet."})}),e.jsxs(oe,{children:[e.jsx("a",{href:"https://huggingface.co/docs/huggingface_hub/en/guides/buckets",target:"_blank",rel:"noopener noreferrer",className:"mr-auto text-sm text-muted-foreground underline underline-offset-4",children:"About Hugging Face Buckets"}),e.jsxs(F,{type:"button",onClick:M,variant:"outline",disabled:!g||S.length===0,children:[e.jsx(Z,{name:"copy",size:12}),"Copy commands"]}),e.jsx(F,{type:"button",onClick:K,disabled:y||t.isSignedIn&&(!g||!S.some(p=>p.kind!=="github")),children:y?v&&v.total>1?`Copying ${v.current}/${v.total}…`:"Copying…":t.isSignedIn?"Copy now":"Sign in & copy"})]})]})})]})}function jn({isLoading:t,papers:s}){return t?e.jsxs("div",{className:"sidebar-card","aria-busy":"true",children:[e.jsx("div",{className:"sidebar-card-title",children:"Related papers"}),e.jsx("div",{className:"related-meta",children:"Finding related work…"})]}):s!=null&&s.length?e.jsxs("div",{className:"sidebar-card",children:[e.jsx("div",{className:"sidebar-card-title",children:"Related papers"}),s.map(a=>e.jsxs(fe,{to:`/paper/${a.arxiv_id||a.id}`,target:"_blank",rel:"noopener noreferrer",className:"related-paper",style:{textDecoration:"none",color:"inherit"},children:[e.jsx("div",{className:"related-title",children:e.jsx(He,{title:a.title})}),e.jsxs("div",{className:"related-meta",children:[e.jsx("span",{children:a.arxiv_id?`arXiv:${a.arxiv_id}`:"External resource"}),a.citation_count!=null&&e.jsxs("span",{children:[a.citation_count.toLocaleString()," cites"]})]})]},a.id))]}):null}const vn=/(https?:\/\/[^\s]+)/g;function wn({size:t=12}){return e.jsx("svg",{width:t,height:t,viewBox:"0 0 24 24","aria-hidden":"true",focusable:"false",children:e.jsx("path",{fill:"currentColor",d:"M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"})})}function Ot(t){return t>=1e6?`${(t/1e6).toFixed(1)}M`:t>=1e3?`${(t/1e3).toFixed(1)}k`:String(t)}function yn(t){return new Date(t).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"})}function _n({text:t}){return e.jsx("p",{className:"x-thread-text",children:t.split(vn).map((s,a)=>a%2===1?e.jsx("span",{className:"x-thread-link",children:s.replace(/^https?:\/\/(www\.)?/,"").replace(/\/$/,"")},a):e.jsx(m.Fragment,{children:s},a))})}function kn({thread:t}){const[s,a]=m.useState(!1);return!t.author_avatar_url||s?e.jsx("span",{className:"x-thread-avatar x-thread-avatar--fallback","aria-hidden":"true",children:t.author_name.charAt(0).toUpperCase()}):e.jsx("img",{className:"x-thread-avatar",src:t.author_avatar_url,alt:"",loading:"lazy",referrerPolicy:"no-referrer",onError:()=>a(!0)})}function Nn(){var t;return((t=window.matchMedia)==null?void 0:t.call(window,"(prefers-reduced-motion: reduce)").matches)??!1}function Cn({thread:t}){const[s,a]=m.useState(!1),[r,n]=m.useState(null),[d,l]=m.useState(!1),o=m.useRef(null),{targetRef:c,isIntersecting:h}=Pa({rootMargin:"200px"}),f=t.video_url;if(m.useEffect(()=>{if(!f||r||d||!h||Nn())return;const x=new AbortController;return fetch(f,{referrerPolicy:"no-referrer",signal:x.signal}).then(b=>{if(!b.ok)throw new Error(`HTTP ${b.status}`);return b.blob()}).then(b=>n(URL.createObjectURL(b))).catch(()=>{x.signal.aborted||l(!0)}),()=>x.abort()},[f,r,d,h]),m.useEffect(()=>()=>{r&&URL.revokeObjectURL(r)},[r]),m.useEffect(()=>{const x=o.current;x&&(h?x.play().catch(()=>{}):x.pause())},[h,r]),!t.media_url||s)return null;const i=r&&!d;return e.jsx("div",{className:"x-thread-media",ref:c,children:i?e.jsx("video",{ref:o,src:r,poster:t.media_url,muted:!0,loop:!0,playsInline:!0,autoPlay:!0,"aria-label":"Video",onError:()=>l(!0)}):e.jsxs(e.Fragment,{children:[e.jsx("img",{src:t.media_url,alt:"",loading:"lazy",referrerPolicy:"no-referrer",onError:()=>a(!0)}),t.media_type==="video"&&e.jsx("span",{className:"x-thread-play","aria-label":"Video",children:"▶"})]})})}function En({thread:t}){const s=de(t.url);return s?e.jsxs("a",{href:s,target:"_blank",rel:"noopener noreferrer",className:"x-thread",children:[e.jsxs("div",{className:"x-thread-header",children:[e.jsx(kn,{thread:t}),e.jsxs("span",{className:"x-thread-author",children:[e.jsx("span",{className:"x-thread-name",children:t.author_name}),e.jsxs("span",{className:"x-thread-handle",children:["@",t.author_handle]})]}),e.jsx("span",{className:"x-thread-logo",children:e.jsx(wn,{})})]}),e.jsx(_n,{text:t.text}),e.jsx(Cn,{thread:t}),e.jsxs("div",{className:"x-thread-meta",children:[t.posted_at&&e.jsx("time",{dateTime:t.posted_at,children:yn(t.posted_at)}),t.like_count!=null&&e.jsxs("span",{children:["♥ ",Ot(t.like_count)]}),t.reply_count!=null&&t.reply_count>0&&e.jsxs("span",{children:[Ot(t.reply_count)," ",t.reply_count===1?"reply":"replies"]}),e.jsx("span",{className:"x-thread-read",children:"Read on X →"})]})]}):null}function Sn({onEdit:t,threads:s}){return e.jsxs("div",{className:"sidebar-card",children:[e.jsxs("div",{className:"sidebar-card-title",children:[e.jsx("span",{children:"X threads"}),e.jsxs("span",{className:"badge",children:[s.length," post",s.length===1?"":"s",e.jsx("button",{type:"button",onClick:t,className:"edit-link",children:"edit"})]})]}),s.length>0?e.jsx("div",{className:"x-thread-list",children:s.map(a=>e.jsx(En,{thread:a},a.tweet_id))}):e.jsx("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",padding:"6px 0"},children:"No author threads linked yet."})]})}const ut=3,qt=3;function Pn(t){return t>=1e3?`${(t/1e3).toFixed(1)}k`:String(t)}function $n({allHfArtifactUrls:t,citationCopied:s,citationDisplay:a,hfArtifactViewer:r,onCopyCitation:n,onEditHfArtifacts:d,onEditRepositories:l,onEditXThreads:o,paper:c,relatedIsLoading:h,relatedPapers:f,user:i}){var v;const[x,b]=m.useState(!1),y=[...c.repositories??[]].sort((C,P)=>Number(P.is_official)-Number(C.is_official)||(P.num_stars||0)-(C.num_stars||0)),j=(x?y:y.slice(0,ut)).map(C=>({...C,safeHref:de(C.url)}));return 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:[y.length," repo",y.length===1?"":"s",e.jsx("button",{type:"button",onClick:l,className:"edit-link",children:"edit"})]})]}),j.filter(({safeHref:C})=>C).map(C=>e.jsxs("a",{href:C.safeHref??void 0,target:"_blank",rel:"noopener noreferrer",className:"code-line",style:{textDecoration:"none"},children:[e.jsxs("span",{className:"code-line-repo",children:[e.jsx(Z,{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:["★ ",Pn(C.num_stars)]})]},C.id)),y.length===0&&e.jsx("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",padding:"6px 0"},children:"No GitHub repositories linked yet."}),y.length>ut&&e.jsx("button",{type:"button",className:"bench-show-more",onClick:()=>b(C=>!C),children:x?"− show top 3":`+ show ${y.length-ut} more repos`})]}),e.jsx(In,{viewer:r,onEdit:d}),e.jsx(Sn,{threads:c.x_threads??[],onEdit:o}),e.jsx(bn,{githubUrls:y.map(({url:C})=>C),hfModelUrls:t.models,hfDatasetUrls:t.datasets,hfSpaceUrls:t.spaces,paperId:c.id,pdfName:((v=c.arxiv_id)==null?void 0:v.replace("/","-"))||c.id,pdfUrl:c.url_pdf,isSignedIn:!!i,suggestedBucketId:i?`${i.username}/${xn(c.title)}`:void 0}),e.jsx(jn,{isLoading:h,papers:f}),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:n,"aria-label":"Copy citation to clipboard",title:"Copy citation to clipboard",children:[e.jsx(Z,{name:"copy",size:11}),s?"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:a})]})]})}function In({onEdit:t,viewer:s}){return e.jsxs("div",{className:"sidebar-card",children:[e.jsxs("div",{className:"sidebar-card-title",children:[s.paperHref?e.jsx("a",{href:s.paperHref,target:"_blank",rel:"noopener noreferrer",style:{color:"inherit",textDecoration:"none"},children:"🤗 Hugging Face"}):e.jsx("span",{children:"🤗 Hugging Face"}),e.jsx("button",{type:"button",onClick:t,className:"edit-link",children:"edit"})]}),s.isLoading?e.jsx($e,{className:"h-16 w-full"}):e.jsxs(e.Fragment,{children:[s.rows.map(a=>e.jsx(Ln,{...a},a.label)),s.footer&&e.jsx("div",{style:{fontFamily:"var(--mono)",fontSize:10,color:"var(--ink-faint)",marginTop:12},children:s.footer})]})]})}function Ln({count:t,href:s,isLimited:a,label:r,links:n}){const[d,l]=m.useState(!1),o=((n==null?void 0:n.length)??0)>qt,c=d?n:n==null?void 0:n.slice(0,qt),h=t!=null?`${t}${a?"+":""}`:"—";return e.jsxs("div",{className:"hf-artifact-row",children:[e.jsxs("div",{className:"hf-artifact-row-header",children:[e.jsx("span",{children:r}),t?e.jsx("a",{href:s,target:"_blank",rel:"noopener noreferrer",className:"hf-artifact-count",children:h}):e.jsx("span",{className:"hf-artifact-count hf-artifact-count--empty",children:h})]}),c!=null&&c.length?e.jsxs("div",{className:"hf-artifact-links",children:[c.map(f=>e.jsx("a",{href:f.href,target:"_blank",rel:"noopener noreferrer",children:f.label},f.href)),o&&e.jsx("button",{type:"button",className:"hf-artifact-toggle","aria-expanded":d,onClick:()=>l(f=>!f),children:d?"Show fewer":`View all ${n.length}`})]}):null]})}const Kt=360;function Rn({canEdit:t,onEditMethods:s,onEditTasks:a,paper:r}){var h,f;const[n,d]=m.useState(!1),l=r.abstract||"",o=l.length>Kt,c=n||!o?l:`${l.slice(0,Kt)}…`;return e.jsxs(e.Fragment,{children:[r.tldr&&e.jsxs(e.Fragment,{children:[e.jsx(Se,{id:"tldr",label:"TL;DR"}),e.jsx("div",{className:"tldr-box",children:r.tldr})]}),e.jsx(Se,{id:"abstract",label:"Abstract"}),e.jsx("p",{className:"abstract-text",style:{marginBottom:8},children:e.jsx(sa,{text:c})}),o&&e.jsx("button",{type:"button",className:"read-full",onClick:()=>d(i=>!i),children:n?"− collapse abstract":"+ read full abstract"}),e.jsx(Se,{id:"tasks",label:"Tasks",accent:e.jsxs("span",{className:"accent",children:[((h=r.tasks)==null?void 0:h.length)||0," tagged",t&&e.jsx("button",{type:"button",onClick:a,className:"edit-link",children:"edit"})]})}),e.jsx("div",{className:"paper-tags",style:{marginBottom:8},children:(r.tasks??[]).map(i=>e.jsx(Ys,{slug:i.slug||"",label:i.name},i.id))}),e.jsx(Se,{id:"methods",label:"Methods",accent:e.jsxs("span",{className:"accent",children:[((f=r.methods)==null?void 0:f.length)||0," used",t&&e.jsx("button",{type:"button",onClick:s,className:"edit-link",children:"edit"})]})}),e.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:6,marginBottom:8},children:(r.methods??[]).map(i=>e.jsx(Js,{method:i},i.id))})]})}const Ce=["my-bookmark-ids"],jt="pwc:pending-bookmark";function Fn(t){window.sessionStorage.setItem(jt,JSON.stringify(t)),window.location.assign($a(!0))}function An(){var r,n;const{user:t}=Oe(),s=ue({queryKey:Ce,queryFn:()=>pt.getBookmarkIds(),enabled:!!t,staleTime:60*1e3,refetchOnWindowFocus:!1}),a=Me.useMemo(()=>{var d;return new Set(((d=s.data)==null?void 0:d.paper_ids)??[])},[(r=s.data)==null?void 0:r.paper_ids]);return{ids:((n=s.data)==null?void 0:n.paper_ids)??[],idSet:a,isLoading:s.isLoading,isError:s.isError}}function Tn(){const{user:t}=Oe(),s=he(),a=le({mutationFn:async({paperId:n,isBookmarked:d})=>{d?await pt.removeBookmark(n):await pt.addBookmark(n)},onMutate:async({paperId:n,isBookmarked:d})=>{await s.cancelQueries({queryKey:Ce});const l=s.getQueryData(Ce),o=typeof n=="string"?Number(n):n,c=(l==null?void 0:l.paper_ids)??[],h=d?c.filter(f=>f!==o):[o,...c.filter(f=>f!==o)];return s.setQueryData(Ce,{paper_ids:h}),{previous:l}},onError:(n,d,l)=>{l!=null&&l.previous&&s.setQueryData(Ce,l.previous),n instanceof ht&&n.code==="saved_papers_bucket_authorization_required"&&Fn(d)},onSettled:()=>{s.invalidateQueries({queryKey:Ce}),s.invalidateQueries({queryKey:[...ye.feeds.saved]})}});return Me.useEffect(()=>{if(!t||a.isPending)return;const n=new URL(window.location.href);if(n.searchParams.get(Ut)!=="1")return;n.searchParams.delete(Ut),window.history.replaceState({},"",`${n.pathname}${n.search}${n.hash}`);const d=window.sessionStorage.getItem(jt);if(d){window.sessionStorage.removeItem(jt);try{const l=JSON.parse(d);(typeof l.paperId=="number"||typeof l.paperId=="string")&&typeof l.isBookmarked=="boolean"&&a.mutate(l)}catch{}}},[a,t]),{toggle:Me.useCallback((n,d)=>{if(!t){if(Jt())return;const l=typeof window<"u"?window.location.pathname+window.location.search:"/";window.location.href=Os(`/api/v1/auth/hf/login?return_to=${encodeURIComponent(l)}`);return}a.mutate({paperId:n,isBookmarked:d})},[a,t]),isPending:a.isPending}}const Un=({paperId:t})=>{const{user:s}=Oe(),{idSet:a}=An(),{toggle:r,isPending:n}=Tn();if(Jt())return null;const d=Number(t),l=!!s&&a.has(d),o=()=>{Number.isFinite(d)&&r(d,l)},c=s&&l?"Saved":"Save",h=s?l?"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${l?" is-saved":""}`,onClick:o,disabled:n,"aria-pressed":l,"aria-label":h,title:h,children:[e.jsx(Z,{name:"bookmark",size:12}),c]})};function mt({children:t,showEdit:s=!1,onEdit:a,editAriaLabel:r}){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":r,children:"edit"})]}):t}function Dn(t){return e.jsx(fs,{...t,kind:"enrich-paper",triggerClassName:"action-btn"})}const Bn={tasks:"tasks",methods:"methods",results:"evaluation results",repositories:"GitHub repositories","project-pages":"project pages","hf-artifacts":"Hugging Face artifacts",organizations:"organizations","source-url":"source URL","x-threads":"X threads"};function Gt(t){if(!t)return"—";try{return new Date(t).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"})}catch{return"—"}}function Vt(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 Ci=()=>{const{arxivId:t}=qs(),s=Xt(),{toast:a}=ie(),{user:r}=Oe(),n=(r==null?void 0:r.is_admin)??!1,d=!!r,l=Aa(r),{arxivId:o,evaluations:c,evaluationsByTask:h,evaluationsLoading:f,paper:i,paperError:x,paperLoading:b,presentation:y,refetchEvaluations:j,refetchPaper:v,relatedQuery:C,versions:P,visibleEvaluations:I}=Ja(t,l),[S,_]=m.useState(!1),{activeEditor:u,openEditor:g,setEditorOpen:E}=sr();m.useEffect(()=>{l!=="direct"||!(i!=null&&i.id)||(u&&u!=="results"&&W.primeCurationState(i.id).catch(()=>{}),u==="results"&&qe.primeCurationState(i.id).catch(()=>{}))},[u,l,i==null?void 0:i.id]);const[A,M]=m.useState(null),q=m.useRef(!1);m.useEffect(()=>{if(!r||!i||q.current)return;const k=sessionStorage.getItem("pwc:fresh-auth-edit");if(!k)return;q.current=!0;const O=tr(k);if(!W.freshAuthMutationDraft()){sessionStorage.removeItem("pwc:fresh-auth-edit"),O&&g(O);return}if(!window.confirm("You signed in again. Apply the saved destructive catalog edit now? The server will recheck the current catalog version before changing anything.")){a({title:"Edit kept locally",description:"Nothing was changed. Reload this paper when you are ready to confirm the saved edit."});return}W.resumeFreshAuthMutation().then(()=>{a({title:"Edit applied",description:"The restored catalog edit was applied."}),window.location.reload()}).catch(Rt=>{a({variant:"destructive",title:"Could not apply the saved edit",description:Rt instanceof Error?Rt.message:"Please reload and review the edit again."})})},[g,i,a,r]);const K=m.useMemo(()=>{if(!r||!(i!=null&&i.author_links))return!1;const k=r.username.toLowerCase();return i.author_links.some(O=>!!O.hf_username&&O.hf_username.toLowerCase()===k)},[r,i==null?void 0:i.author_links]),G=k=>{if(!d){M(k);return}g(k)},[p,$]=m.useState("idle"),[L,T]=m.useState(null),[U,H]=m.useState(null),z=async()=>{if(o){$("indexing"),T(null),H(null);try{await W.indexFromArxiv(o),a({title:"Indexed",description:"Paper added to database."}),setTimeout(()=>v(),1200),$("idle")}catch(k){const O=k;let be=O.message||"Failed to index paper";if(O.response)try{be=JSON.parse(O.response).detail||be}catch{be=O.response}T(be),(O.status===429||O.status===503)&&H("Try again later after arXiv has lifted the temporary limit."),$("idle")}}},Y=(y==null?void 0:y.citationCopy)??"",J=(y==null?void 0:y.copyableRanks)??[],[Xe,Ue]=m.useState(!1),we=async()=>{if(Y)try{await navigator.clipboard.writeText(Y),Ue(!0),a({title:"Citation copied",description:"BibTeX entry copied to clipboard."}),window.setTimeout(()=>Ue(!1),1500)}catch{a({title:"Copy failed",description:"Could not access the clipboard. Please copy manually.",variant:"destructive"})}},w=async()=>{if(!i)return;const k=i.arxiv_id||i.id,O=Ua(k,J);if(O)try{await navigator.clipboard.writeText(O),a({title:"PwC badges copied",description:"Each badge follows its current leaderboard result."})}catch{a({title:"Copy failed",description:"Could not access the clipboard. Please try again.",variant:"destructive"})}};if(b)return e.jsxs("div",{className:"page",children:[e.jsx($e,{className:"h-12 w-3/4 mb-4"}),e.jsx($e,{className:"h-6 w-1/3 mb-8"}),e.jsx($e,{className:"h-64 w-full"})]});if(x||!i)return e.jsxs("div",{className:"page",children:[e.jsxs("div",{className:"breadcrumb",children:[e.jsx(fe,{to:"/papers",children:"Papers"}),e.jsx("span",{className:"sep",children:"/"}),e.jsxs("span",{style:{color:"var(--ink)"},children:["arXiv:",o]})]}),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:",o]})," in the database. You can index it from arXiv right now."]}),L&&e.jsx(ca,{variant:"destructive",className:"mt-4 max-w-xl",children:e.jsxs(da,{children:[e.jsx("div",{children:L}),U&&e.jsx("div",{className:"mt-2",children:U})]})}),e.jsxs("div",{className:"action-row",children:[n&&e.jsxs("button",{className:"action-btn",onClick:z,disabled:p==="indexing",children:[e.jsx(Z,{name:"sparkle",size:12}),p==="indexing"?"Indexing…":"Index from arXiv"]}),e.jsx(F,{variant:"outline",onClick:()=>s("/papers"),children:"Browse Papers"})]})]});if(!y)return null;const{allHfArtifactUrls:N,authorEntries:R,citationDisplay:D,hasIntroducedItems:X,hasLineageItems:V,hfArtifactViewer:B,introducedBenchmarks:$s,introducedFrameworks:Ct,introducedMethods:Is,introducedSummary:Ls,numPages:Et,paperSourceLabel:St,predecessorPapers:Qe,projectPages:Ee,safeAbstractUrl:Pt,safeConferenceUrl:$t,safePdfUrl:It,sourceActionLabel:Rs,successorPapers:We}=y,De=12,Ze=Ba(i,o),Lt=S||R.length<=De?R:R.slice(0,De);return e.jsxs("div",{className:"page",children:[e.jsxs("div",{className:"breadcrumb",children:[e.jsx(fe,{to:"/",children:"Trending"}),e.jsx("span",{className:"sep",children:"/"}),e.jsx("span",{children:St})]}),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.jsxs("h1",{className:"detail-title",children:[e.jsx(He,{title:i.title}),(i.organizations||[]).map(k=>e.jsx(fe,{to:`/orgs/${k.slug}`,className:`detail-title-org${k.logo_url?" detail-title-org--logo":""}`,title:k.name,"aria-label":k.name,children:k.logo_url?e.jsx("img",{src:k.logo_url,alt:"",onError:O=>{var be;(be=O.currentTarget.parentElement)==null||be.classList.remove("detail-title-org--logo"),O.currentTarget.replaceWith(k.name)}}):k.name},k.id))]}),e.jsxs("div",{className:"detail-meta",children:[e.jsx("span",{children:St}),e.jsx("span",{children:"·"}),e.jsxs("span",{children:["Submitted ",Gt(i.published)]}),Et&&e.jsxs(e.Fragment,{children:[e.jsx("span",{children:"·"}),e.jsxs("span",{children:[Et," pages"]})]}),i.citation_count!=null&&e.jsxs(e.Fragment,{children:[e.jsx("span",{children:"·"}),e.jsxs("span",{children:[i.citation_count.toLocaleString()," citations"]})]}),(i.proceeding||i.conference_slug)&&e.jsxs(e.Fragment,{children:[e.jsx("span",{children:"·"}),i.conference_slug?e.jsx("a",{href:`/conferences/${i.conference_slug}`,target:"_blank",rel:"noopener noreferrer",style:{color:"var(--accent-text)"},children:(i.proceeding||i.conference_name||"").replace(/\s+\d{1,2}$/,"")}):e.jsx("span",{children:i.proceeding.replace(/\s+\d{1,2}$/,"")})]}),P.length>1&&e.jsxs(e.Fragment,{children:[e.jsx("span",{children:"·"}),e.jsx("select",{className:"version-select",value:i.version,onChange:k=>{const O=k.target.value;i.arxiv_id&&s(`/paper/${i.arxiv_id.replace(/v\d+$/,"")}${O?`?version=${O}`:""}`)},children:P.map(k=>e.jsxs("option",{value:k.version,children:[k.version," — ",Gt(k.published)]},k.version))})]})]}),e.jsxs("div",{className:"detail-authors",children:[Lt.map((k,O)=>e.jsxs(Me.Fragment,{children:[k.hf_avatar_url&&e.jsx("img",{className:"detail-author-avatar",src:Ia(k.hf_avatar_url),alt:"",width:22,height:22,loading:"lazy"}),k.id?e.jsx(fe,{to:`/authors/${k.id}`,children:k.name}):k.hf_username?e.jsx("a",{href:`https://huggingface.co/${k.hf_username}`,target:"_blank",rel:"noopener noreferrer",title:`@${k.hf_username} on Hugging Face`,children:k.name}):e.jsx("a",{children:k.name}),ODe&&e.jsx("button",{className:"show-more-authors",onClick:()=>_(k=>!k),style:{marginLeft:8,background:"none",border:"none",cursor:"pointer",color:"var(--accent-text)",fontFamily:"var(--mono)",fontSize:12},children:S?"show fewer":`+${i.authors.length-De} more`})]}),e.jsxs("div",{className:"action-row",children:[Ze&&Ks()&&(!Gs()||r!=null&&r.is_admin)?e.jsxs(fe,{className:"action-btn",to:Ze,onClick:()=>{const k=Ze.slice(5);sessionStorage.removeItem(`pwc:reader:session:${k}`),sessionStorage.removeItem(`pwc:reader:assistant-collapsed:${k}`),sessionStorage.removeItem(`pwc:reader:page:${k}`)},children:[e.jsx(Z,{name:"pdf",size:12})," Read paper",e.jsx("span",{className:"nav-new-badge","aria-hidden":"true",children:"New"})]}):It?e.jsxs("a",{className:"action-btn",href:It,target:"_blank",rel:"noopener noreferrer",children:[e.jsx(Z,{name:"pdf",size:12})," View PDF"]}):null,Pt&&e.jsx(mt,{showEdit:i.source==="external",onEdit:()=>G("source-url"),editAriaLabel:"Edit source URL",children:e.jsxs("a",{className:i.source==="external"?"action-btn-segment action-btn-main":"action-btn",href:Pt,target:"_blank",rel:"noopener noreferrer",children:[e.jsx(Z,{name:"external",size:12})," ",Rs]})}),Ee.length===1?e.jsx(mt,{showEdit:!0,onEdit:()=>G("project-pages"),editAriaLabel:"Edit project pages",children:e.jsxs("a",{className:"action-btn-segment action-btn-main",href:Ee[0].safeHref??void 0,target:"_blank",rel:"noopener noreferrer",children:[e.jsx(Z,{name:"globe",size:12})," Project page"]})}):null,Ee.length>1?e.jsx(mt,{showEdit:!0,onEdit:()=>G("project-pages"),editAriaLabel:"Edit project pages",children:e.jsxs(Vs,{children:[e.jsx(Xs,{asChild:!0,children:e.jsxs("button",{type:"button",className:"action-btn-segment action-btn-main",children:[e.jsx(Z,{name:"globe",size:12})," Project page"]})}),e.jsx(Qs,{align:"start",className:"project-page-menu",children:Ee.map((k,O)=>e.jsx(Ws,{asChild:!0,children:k.safeHref?e.jsx("a",{href:k.safeHref,target:"_blank",rel:"noopener noreferrer",children:Vt(k.url,`Project page ${O+1}`)}):e.jsx("span",{children:Vt(k.url,`Project page ${O+1}`)})},k.url))})]})}):null,Ee.length===0&&d?e.jsxs("button",{type:"button",className:"action-btn",onClick:()=>G("project-pages"),title:"Add project page",children:[e.jsx(Z,{name:"globe",size:12})," Add project page"]}):null,$t&&e.jsxs("a",{className:"action-btn",href:$t,target:"_blank",rel:"noopener noreferrer",children:[e.jsx(Z,{name:"external",size:12})," Conference"]}),e.jsx("button",{type:"button",className:"action-btn",onClick:()=>G("organizations"),children:"Edit organizations"}),e.jsx(hr,{paperId:Number(i.id),isAdmin:n}),n&&Ca()&&e.jsx(Dn,{paperId:Number(i.id),paperTitle:i.title,onComplete:()=>void v()}),e.jsx(Un,{paperId:i.id})]}),i.leaderboard_ranks&&i.leaderboard_ranks.length>0&&e.jsx(ea,{wrap:!0,paperHref:`/paper/${i.arxiv_id||i.id}`,ranks:i.leaderboard_ranks.filter(k=>k.best_rank>=1&&k.best_rank<=3).map(k=>({name:k.dataset_name,slug:k.dataset_slug||null,rank:k.best_rank}))})]}),e.jsx("div",{className:"detail-hero-thumb detail-thumb-wrap",children:e.jsx(ta,{paperId:i.arxiv_id||i.id,title:i.title,thumbnailUrl:Zs(i.thumbnail_url),priority:!0})})]}),X&&e.jsxs("div",{className:`introduced-banner${Ct.length>0?" introduced-banner--framework":""}`,children:[e.jsx("span",{className:"introduced-label",children:"Introduced"}),e.jsxs("div",{className:"introduced-methods",children:[Is.map(k=>e.jsxs("button",{type:"button",className:"introduced-pill",onClick:()=>s(`/methods/${k.slug||k.id}`),children:[k.name,e.jsx("span",{className:"introduced-arrow",children:"→"})]},`method-${k.id}`)),$s.map(k=>e.jsxs("button",{type:"button",className:"introduced-pill",onClick:()=>s(`/benchmark/${k.slug||k.id}`),children:[k.name,e.jsx("span",{className:"introduced-arrow",children:"→"})]},`benchmark-${k.id}`)),Ct.map(k=>e.jsxs("button",{type:"button",className:"introduced-pill",onClick:()=>s(`/frameworks#framework-${k.slug}`),children:[k.name,e.jsx("span",{className:"introduced-arrow",children:"→"})]},`framework-${k.slug}`))]}),e.jsxs("span",{className:"introduced-note",children:["This paper is the canonical source for ",Ls,"."]})]}),V&&e.jsxs("div",{className:"introduced-banner lineage-banner",children:[We.length>0&&e.jsxs("div",{className:"lineage-row",children:[e.jsx("span",{className:"introduced-label lineage-label",children:We.length===1?"Follow-up paper":"Follow-up papers"}),e.jsx("div",{className:"introduced-methods",children:We.map(k=>e.jsxs("button",{type:"button",className:"introduced-pill lineage-pill",onClick:()=>s(`/paper/${k.route_identifier}`),children:[e.jsx(He,{title:k.title}),e.jsx("span",{className:"introduced-arrow",children:"→"})]},`successor-${k.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(k=>e.jsxs("button",{type:"button",className:"introduced-pill lineage-pill",onClick:()=>s(`/paper/${k.route_identifier}`),children:[e.jsx("span",{className:"introduced-arrow lineage-arrow-back",children:"←"}),e.jsx(He,{title:k.title})]},`predecessor-${k.id}`))})]})]}),e.jsx(Rn,{canEdit:!0,onEditMethods:()=>G("methods"),onEditTasks:()=>G("tasks"),paper:i}),e.jsx(Wr,{canCopyBadge:J.length>0,canEdit:!0,evaluationsByTask:h,evaluationsLoading:f,isAdmin:n,onCopyBadge:w,onEdit:()=>G("results"),onRefresh:()=>void j(),paper:i,visibleEvaluationCount:(I==null?void 0:I.length)??0})]}),e.jsx($n,{allHfArtifactUrls:N,citationCopied:Xe,citationDisplay:D,hfArtifactViewer:B,onCopyCitation:we,onEditHfArtifacts:()=>G("hf-artifacts"),onEditRepositories:()=>G("repositories"),onEditXThreads:()=>G("x-threads"),paper:i,relatedIsLoading:C.isLoading,relatedPapers:C.data,user:r})]}),e.jsx(Gr,{activeEditor:u,arxivId:o,editSubmitMode:l,evaluations:c??[],isAdmin:n,isLinkedAuthor:K,onOpenChange:E,paper:i}),e.jsx(xa,{open:A!==null,onOpenChange:k=>{k||M(null)},sectionLabel:A?Bn[A]:"this paper",returnTo:typeof window<"u"?window.location.pathname:"/"})]})};export{Ci as default}; diff --git a/assets/PaperFeedFilters-DBRREw9D.js b/assets/PaperFeedFilters-BsWw60hu.js similarity index 90% rename from assets/PaperFeedFilters-DBRREw9D.js rename to assets/PaperFeedFilters-BsWw60hu.js index 63cbb24a74c1d1f96a6970142395744ecb003de0..8101ad9a1dc06ebcbb938a2d9ea7d648076cd29c 100644 --- a/assets/PaperFeedFilters-DBRREw9D.js +++ b/assets/PaperFeedFilters-BsWw60hu.js @@ -1 +1 @@ -import{j as e}from"./index-CnBotBa4.js";import{I as n}from"./components-CSFfzsKt.js";const t=()=>e.jsxs("span",{className:"hf-resource-logo",children:[e.jsx("img",{className:"hf-resource-logo-black",src:"/hf-logo-monochrome-black.svg?v=20260729",alt:""}),e.jsx("img",{className:"hf-resource-logo-white",src:"/hf-logo-monochrome-white.svg?v=20260729",alt:""})]}),l=({checked:s,icon:a,label:r,onChange:o})=>e.jsxs("button",{type:"button",className:`paper-feed-filter ${s?"active":""}`,"aria-pressed":s,onClick:()=>o(!s),children:[e.jsxs("span",{className:"paper-feed-filter-content",children:[e.jsx("span",{className:"paper-feed-filter-icon","aria-hidden":"true",children:a}),r]}),s&&e.jsx("span",{className:"paper-feed-filter-check","aria-hidden":"true",children:"✓"})]}),h=({hasCode:s,hasHfArtifacts:a,onHasCodeChange:r,onHasHfArtifactsChange:o,showDivider:c=!0,showHasCode:i=!0})=>e.jsxs("div",{className:"paper-feed-resource-controls",role:"group","aria-label":"Resource filters",children:[c&&e.jsx("span",{className:"paper-feed-resource-divider","aria-hidden":"true"}),e.jsxs("div",{className:"paper-feed-filter-options",children:[i&&e.jsx(l,{checked:s,icon:e.jsx(n,{name:"github",size:14}),label:"Has code",onChange:r}),e.jsx(l,{checked:a,icon:e.jsx(t,{}),label:"Has artifacts",onChange:o})]})]});export{h as P}; +import{j as e}from"./index-hxawG6mk.js";import{I as n}from"./components-Djdw_Z-e.js";const t=()=>e.jsxs("span",{className:"hf-resource-logo",children:[e.jsx("img",{className:"hf-resource-logo-black",src:"/hf-logo-monochrome-black.svg?v=20260729",alt:""}),e.jsx("img",{className:"hf-resource-logo-white",src:"/hf-logo-monochrome-white.svg?v=20260729",alt:""})]}),l=({checked:s,icon:a,label:r,onChange:o})=>e.jsxs("button",{type:"button",className:`paper-feed-filter ${s?"active":""}`,"aria-pressed":s,onClick:()=>o(!s),children:[e.jsxs("span",{className:"paper-feed-filter-content",children:[e.jsx("span",{className:"paper-feed-filter-icon","aria-hidden":"true",children:a}),r]}),s&&e.jsx("span",{className:"paper-feed-filter-check","aria-hidden":"true",children:"✓"})]}),h=({hasCode:s,hasHfArtifacts:a,onHasCodeChange:r,onHasHfArtifactsChange:o,showDivider:c=!0,showHasCode:i=!0})=>e.jsxs("div",{className:"paper-feed-resource-controls",role:"group","aria-label":"Resource filters",children:[c&&e.jsx("span",{className:"paper-feed-resource-divider","aria-hidden":"true"}),e.jsxs("div",{className:"paper-feed-filter-options",children:[i&&e.jsx(l,{checked:s,icon:e.jsx(n,{name:"github",size:14}),label:"Has code",onChange:r}),e.jsx(l,{checked:a,icon:e.jsx(t,{}),label:"Has artifacts",onChange:o})]})]});export{h as P}; diff --git a/assets/PaperPreviewLink-ChJBLunV.js b/assets/PaperPreviewLink-BJhSzNVs.js similarity index 97% rename from assets/PaperPreviewLink-ChJBLunV.js rename to assets/PaperPreviewLink-BJhSzNVs.js index 1ce183063ca0e0eebb2fc50aa45c7da282de554a..f5da249336401482d717022a67c2dc8cd0481b00 100644 --- a/assets/PaperPreviewLink-ChJBLunV.js +++ b/assets/PaperPreviewLink-BJhSzNVs.js @@ -1,4 +1,4 @@ -import{o as k,f as F,m as b,a as oe,p as L,b as O,n as z,h as le,s as ce,c as ue,v as he,S as pe}from"./index-DxRopg3G.js";import{l as me}from"./index-DLNxIk77.js";import D from"./katex-DkKDou_j.js";import{j as m,F as M,U as fe,n as j,c as de,m as ge,L as E,A as xe}from"./index-CnBotBa4.js";import{u as ye}from"./useQuery-C8pfCInN.js";import{H as we,a as be,b as Ne}from"./hover-card-CkboGKdu.js";import{p as ve}from"./paperQueryKeys-BP2E-0yf.js";import{p as P}from"./papers-DkTdvzl4.js";import{u as ke}from"./useMutation-YEvFXzv3.js";function Fe(){return{enter:{mathFlow:e,mathFlowFenceMeta:t,mathText:s},exit:{mathFlow:i,mathFlowFence:n,mathFlowFenceMeta:r,mathFlowValue:l,mathText:o,mathTextData:l}};function e(a){const c={type:"element",tagName:"code",properties:{className:["language-math","math-display"]},children:[]};this.enter({type:"math",meta:null,value:"",data:{hName:"pre",hChildren:[c]}},a)}function t(){this.buffer()}function r(){const a=this.resume(),c=this.stack[this.stack.length-1];k(c.type==="math"),c.meta=a}function n(){this.data.mathFlowInside||(this.buffer(),this.data.mathFlowInside=!0)}function i(a){const c=this.resume().replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),h=this.stack[this.stack.length-1];k(h.type==="math"),this.exit(a),h.value=c;const f=h.data.hChildren[0];k(f.type==="element"),k(f.tagName==="code"),f.children.push({type:"text",value:c}),this.data.mathFlowInside=void 0}function s(a){this.enter({type:"inlineMath",value:"",data:{hName:"code",hProperties:{className:["language-math","math-inline"]},hChildren:[]}},a),this.buffer()}function o(a){const c=this.resume(),h=this.stack[this.stack.length-1];k(h.type==="inlineMath"),this.exit(a),h.value=c,h.data.hChildren.push({type:"text",value:c})}function l(a){this.config.enter.data.call(this,a),this.config.exit.data.call(this,a)}}function je(e){let t=(e||{}).singleDollarTextMath;return t==null&&(t=!0),n.peek=i,{unsafe:[{character:"\r",inConstruct:"mathFlowMeta"},{character:` +import{o as k,f as F,m as b,a as oe,p as L,b as O,n as z,h as le,s as ce,c as ue,v as he,S as pe}from"./index-CaRYlo5c.js";import{l as me}from"./index-Ddr0k9KU.js";import D from"./katex-DkKDou_j.js";import{j as m,F as M,U as fe,n as j,c as de,m as ge,L as E,A as xe}from"./index-hxawG6mk.js";import{u as ye}from"./useQuery-B7vCF2Os.js";import{H as we,a as be,b as Ne}from"./hover-card-DEHIu6q-.js";import{p as ve}from"./paperQueryKeys-BP2E-0yf.js";import{p as P}from"./papers-B0ysePyJ.js";import{u as ke}from"./useMutation-gPqxjZGO.js";function Fe(){return{enter:{mathFlow:e,mathFlowFenceMeta:t,mathText:s},exit:{mathFlow:i,mathFlowFence:n,mathFlowFenceMeta:r,mathFlowValue:l,mathText:o,mathTextData:l}};function e(a){const c={type:"element",tagName:"code",properties:{className:["language-math","math-display"]},children:[]};this.enter({type:"math",meta:null,value:"",data:{hName:"pre",hChildren:[c]}},a)}function t(){this.buffer()}function r(){const a=this.resume(),c=this.stack[this.stack.length-1];k(c.type==="math"),c.meta=a}function n(){this.data.mathFlowInside||(this.buffer(),this.data.mathFlowInside=!0)}function i(a){const c=this.resume().replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),h=this.stack[this.stack.length-1];k(h.type==="math"),this.exit(a),h.value=c;const f=h.data.hChildren[0];k(f.type==="element"),k(f.tagName==="code"),f.children.push({type:"text",value:c}),this.data.mathFlowInside=void 0}function s(a){this.enter({type:"inlineMath",value:"",data:{hName:"code",hProperties:{className:["language-math","math-inline"]},hChildren:[]}},a),this.buffer()}function o(a){const c=this.resume(),h=this.stack[this.stack.length-1];k(h.type==="inlineMath"),this.exit(a),h.value=c,h.data.hChildren.push({type:"text",value:c})}function l(a){this.config.enter.data.call(this,a),this.config.exit.data.call(this,a)}}function je(e){let t=(e||{}).singleDollarTextMath;return t==null&&(t=!0),n.peek=i,{unsafe:[{character:"\r",inConstruct:"mathFlowMeta"},{character:` `,inConstruct:"mathFlowMeta"},{character:"$",after:t?void 0:"\\$",inConstruct:"phrasing"},{character:"$",inConstruct:"mathFlowMeta"},{atBreak:!0,character:"$",after:"\\$"}],handlers:{math:r,inlineMath:n}};function r(s,o,l,a){const c=s.value||"",h=l.createTracker(a),f="$".repeat(Math.max(me(c,"$")+1,2)),g=l.enter("mathFlow");let x=h.move(f);if(s.meta){const d=l.enter("mathFlowMeta");x+=h.move(l.safe(s.meta,{after:` `,before:x,encode:["$"],...h.current()})),d()}return x+=h.move(` `),c&&(x+=h.move(c+` diff --git a/assets/PaperReaderView-DFTrr534.js b/assets/PaperReaderView-BEFvhx80.js similarity index 91% rename from assets/PaperReaderView-DFTrr534.js rename to assets/PaperReaderView-BEFvhx80.js index 14186c4a9cc91c3a6ea89798c4c4f84e4c7060ea..514f71474dc6724f8476a351f6aa2556908a9f17 100644 --- a/assets/PaperReaderView-DFTrr534.js +++ b/assets/PaperReaderView-BEFvhx80.js @@ -1 +1 @@ -import{u as oe,j as o,b as je,n as $e,U as ie,r as s,V as Ie,L as K}from"./index-CnBotBa4.js";import{u as Ae}from"./useQuery-C8pfCInN.js";import{A as ke,u as Ne,a as Ee,P as Te}from"./ArtifactWorkspace-C7nTcvIL.js";import{b as ze}from"./usePapers-fw4Ivp2T.js";import{c as Le}from"./chat-B0u4w1H2.js";import{s as q}from"./safeExternalHref-CkBrsh84.js";import{ChatExperience as Ue}from"./ChatView-Buo8RKMA.js";import"./chatLaunch-CptFdc8a.js";import"./chevron-down-IUgkNqZp.js";import"./papers-DkTdvzl4.js";/* empty css */import"./hover-card-CkboGKdu.js";import"./github-D6RT7m6V.js";import"./github-DFkgF81-.js";import"./catalog-mND3MerS.js";import"./PaperPreviewLink-ChJBLunV.js";import"./index-DxRopg3G.js";import"./index-DLNxIk77.js";import"./katex-DkKDou_j.js";import"./paperQueryKeys-BP2E-0yf.js";import"./useMutation-YEvFXzv3.js";import"./copy-0hFmISJO.js";import"./file-text-BZVTM8hV.js";import"./external-link-C_QBJuYU.js";import"./useInfiniteQuery-DUlXElgD.js";import"./chatPrompts-DypmWIqx.js";import"./openrouter-BMS0vcTS.js";import"./queryOptions-C9woPjwX.js";const ce=66,Fe=240,V="pwc:reader:split-ratio",k=r=>`pwc:reader:session:${r}`,B=r=>`pwc:reader:assistant-collapsed:${r}`,le=r=>`pwc:reader:page:${r}`;function D(r){const i=Number(sessionStorage.getItem(le(r)));return Number.isInteger(i)&&i>0?i:1}function He(){const r=Number(localStorage.getItem(V));return Number.isFinite(r)&&r>=45&&r<=75?r:ce}function Me(r){const i=q(r);if(!i)return null;const n=new URL(i);return(n.hostname==="arxiv.org"||n.hostname==="www.arxiv.org")&&n.pathname.startsWith("/pdf/")&&n.pathname.endsWith(".pdf")&&(n.pathname=n.pathname.slice(0,-4)),n.href}const We=/^\/pdf\/(\d{4}\.\d{4,5}(?:v\d{1,3})?|[a-z]+(?:-[a-z]+)*(?:\.[A-Z]{2})?\/\d{7}(?:v\d{1,3})?)$/;function Ke(r){const i=new URL(r),n=i.pathname.match(We);return(i.hostname==="arxiv.org"||i.hostname==="www.arxiv.org")&&n&&!i.search?ie(`/paper-assets/arxiv-pdf/${n[1]}`)??r:r}function Be(r){return new URL(r).hostname.replace(/^www\./,"")}function De(r){if(!r)return{};const i={};for(const u of r.repositories??[]){if(!u.is_official)continue;const t=q(u.url);if(!t)continue;const m=new URL(t),w=m.pathname.split("/").filter(Boolean);if((m.hostname==="github.com"||m.hostname==="www.github.com")&&w.length>=2){i.repository={href:t,stars:u.num_stars||0};break}}const n=[...r.project_pages??[]].sort((u,t)=>Number(t.is_official)-Number(u.is_official));for(const u of n){const t=q(u.url);if(t){i.projectPage={href:t,label:Be(t)};break}}const v=r.hf_artifact_summary?r.hf_artifact_summary.model_count+r.hf_artifact_summary.dataset_count+r.hf_artifact_summary.space_count:new Set([...r.hf_models??[],...r.hf_datasets??[],...r.hf_spaces??[]]).size;return v>0&&r.arxiv_id&&(i.huggingFace={href:`https://huggingface.co/papers/${r.arxiv_id.replace(/v\d+$/i,"")}`,count:v}),i}function qe(){var re,ae,se,ne;const r=je(),{paperId:i}=oe(),n=$e(i??"").replace(/v\d+$/i,""),v=ze(n,!!n),u=Ae({queryKey:["chatAvailability"],queryFn:()=>Le.getAvailability(),refetchInterval:3e4,retry:!1}),t=v.data,m=(t==null?void 0:t.source)==="external"?ie(`/paper-assets/external/${t.id}/paper.pdf`):Me(t==null?void 0:t.url_pdf),w=m&&(t==null?void 0:t.source)!=="external"?Ke(m):m,de=De(t),f=((re=t==null?void 0:t.arxiv_id)==null?void 0:re.replace(/v\d+$/i,""))||n,ue=s.useCallback(()=>r(`/paper/${f}`),[f,r]),[y,N]=s.useState(()=>sessionStorage.getItem(k(n))||void 0),[R,E]=s.useState(He),[p,O]=s.useState(()=>sessionStorage.getItem(B(n))==="1"),[h,C]=s.useState("paper"),[T,x]=s.useState(),[pe,b]=s.useState(""),[fe,me]=s.useState(()=>D(n)),[P,he]=s.useState(0),[X,Q]=s.useState(!1),[ge,z]=s.useState(!1),_=s.useRef(null),L=s.useRef(null),U=s.useRef(null),Y=s.useRef(null),j=s.useRef(!1),$=s.useRef(0),g=s.useRef(0),F=s.useRef(0),S=s.useRef(R),H=s.useRef(D(n)),M=s.useRef(t==null?void 0:t.version),Z=Ne().reset,G=s.useRef(`${n}:${y??"new"}`),c=P>=840;s.useEffect(()=>{const e=`${n}:${y??"new"}`;G.current!==e&&(G.current=e,Z())},[y,Z,n]),s.useEffect(()=>{t!=null&&t.version&&M.current&&t.version!==M.current&&(x(void 0),b("")),M.current=t==null?void 0:t.version},[t==null?void 0:t.version]),s.useEffect(()=>{window.clearTimeout($.current),z(!1);const e=sessionStorage.getItem(k(n));N(e||void 0),O(sessionStorage.getItem(B(n))==="1"),C("paper"),x(void 0),b("");const a=D(n);H.current=a,me(a)},[n]),s.useEffect(()=>()=>{window.clearTimeout($.current),cancelAnimationFrame(g.current)},[]),s.useLayoutEffect(()=>{const e=_.current;if(!e)return;const a=()=>he(e.clientWidth);a();const l=new ResizeObserver(a);return l.observe(e),()=>l.disconnect()},[t]),s.useEffect(()=>{if(!t)return;document.title=`${t.title} — Papers With Code reader`;let e=document.querySelector('meta[name="robots"]');const a=!e;e||(e=document.createElement("meta"),e.name="robots",document.head.appendChild(e));const l=e.content;e.content="noindex, nofollow";let d=document.querySelector('link[rel="canonical"]');const Ce=!d;d||(d=document.createElement("link"),d.rel="canonical",document.head.appendChild(d));const _e=d.href;return d.href=`${window.location.origin}/paper/${f}`,()=>{document.title="Papers With Code",a?e==null||e.remove():e&&(e.content=l),Ce?d==null||d.remove():d&&(d.href=_e)}},[f,t]);const I=s.useCallback(e=>{if(!P)return Math.max(45,Math.min(75,e));const a=480/P*100,l=100-360/P*100;return Math.max(a,Math.min(l,e))},[P]);s.useEffect(()=>E(e=>{const a=I(e);return S.current=a,a}),[I]);const A=e=>{const a=I(e);S.current=a,E(a),localStorage.setItem(V,String(a))},J=e=>{var l;const a=I(e);S.current=a,L.current&&(L.current.style.width=`${a}%`),U.current&&(U.current.style.width=`${100-a}%`),(l=Y.current)==null||l.setAttribute("aria-valuenow",String(Math.round(a)))},ee=e=>{F.current=e,!g.current&&(g.current=requestAnimationFrame(()=>{var l;g.current=0;const a=(l=_.current)==null?void 0:l.getBoundingClientRect();a!=null&&a.width&&J((F.current-a.left)/a.width*100)}))},ve=e=>{j.current=!0,Q(!0),e.currentTarget.setPointerCapture(e.pointerId),ee(e.clientX)},W=()=>{var e;if(j.current){if(g.current){cancelAnimationFrame(g.current),g.current=0;const a=(e=_.current)==null?void 0:e.getBoundingClientRect();a!=null&&a.width&&J((F.current-a.left)/a.width*100)}j.current=!1,E(S.current),localStorage.setItem(V,String(S.current)),Q(!1)}},te=e=>{window.clearTimeout($.current),z(!0),O(e),sessionStorage.setItem(B(n),e?"1":"0"),$.current=window.setTimeout(()=>z(!1),Fe+40)},be=e=>{N(e),sessionStorage.setItem(k(n),e)},we=()=>{N(void 0),sessionStorage.removeItem(k(n)),x(void 0),b("")},Re=((ae=u.data)==null?void 0:ae.paper_reader_selection_enabled)===!0,xe=e=>{x(e),b(`Selection from page ${e.page} added to chat`),c&&p&&te(!1)},Pe=s.useCallback(e=>{x(e),e||b("")},[]),Se=Ie()&&((se=u.data)==null?void 0:se.paper_reader_chat_enabled)!==!1,ye=t&&Se?o.jsx(Ue,{mode:"paper",routeSessionId:y,primaryPaper:{id:t.id,routeId:f,title:t.title},currentPage:()=>H.current,paperSelection:T,onPaperSelectionChange:Pe,onSessionId:be,onReaderSubmit:()=>C("assistant"),onReaderNewChat:we}):o.jsx("div",{className:"reader-chat-unavailable",children:"Chat is not enabled for this preview."});return v.isLoading?o.jsx("div",{className:"reader-status",role:"status",children:"Loading paper…"}):v.error||!t?o.jsxs("div",{className:"reader-status",role:"alert",children:[o.jsx("p",{children:"Paper not found."}),o.jsx(K,{to:"/papers",children:"Browse papers"})]}):((ne=u.data)==null?void 0:ne.native_pdf_reader_enabled)===!1?o.jsxs("div",{className:"reader-status",role:"alert",children:[o.jsx("p",{children:"The native reader is currently unavailable."}),o.jsx(K,{to:`/paper/${f}`,children:"Back to paper"})]}):w?o.jsxs("div",{className:"paper-reader-shell",children:[!c&&o.jsxs("div",{className:"reader-tabs",role:"tablist","aria-label":"Reader panels",children:[o.jsx("button",{type:"button",role:"tab","aria-selected":h==="paper",onClick:()=>C("paper"),children:"Paper"}),o.jsxs("button",{type:"button",role:"tab","aria-selected":h==="assistant","aria-label":T&&h!=="assistant"?"Chat, selection attached":"Chat",onClick:()=>C("assistant"),children:["Chat",T&&h!=="assistant"&&o.jsx("span",{className:"reader-tab-pending","aria-hidden":"true"})]})]}),o.jsx(Ee,{variant:"reader",children:o.jsxs("div",{ref:_,className:`reader-workspace${c?" is-desktop":" is-tabs"}${p?" is-assistant-collapsed":""}${X?" is-resizing":""}`,"data-testid":"paper-chat-workspace",children:[o.jsx("section",{ref:L,className:`reader-paper-pane${!c&&h!=="paper"?" is-hidden":""}`,style:c?{width:p?"100%":`${R}%`}:void 0,role:"tabpanel","aria-label":"Paper","aria-hidden":!c&&h!=="paper",children:o.jsx(Te,{url:w,downloadUrl:m??w,paperKey:f,paperTitle:t.title,paperHref:`/paper/${f}`,onClose:ue,resources:de,initialPage:fe,resizeActive:X||ge,selectionEnabled:Re,paperVersion:t.version,loadErrorMessage:t.source==="external"?"Paper content is still being prepared. Please try again later.":void 0,onPaperSelection:xe,onPaperSelectionError:b,onPageChange:e=>{H.current=e,sessionStorage.setItem(le(n),String(e))}})}),c&&!p&&o.jsx("div",{ref:Y,className:"reader-resize-handle",role:"separator","aria-label":"Resize paper and Chat panels","aria-orientation":"vertical","aria-valuemin":45,"aria-valuemax":75,"aria-valuenow":Math.round(R),tabIndex:0,onPointerDown:ve,onPointerMove:e=>{j.current&&ee(e.clientX)},onPointerUp:W,onPointerCancel:W,onLostPointerCapture:W,onDoubleClick:()=>A(ce),onKeyDown:e=>{(e.key==="ArrowLeft"||e.key==="ArrowRight")&&(e.preventDefault(),A(R+(e.key==="ArrowRight"?2:-2))),e.key==="Home"&&A(45),e.key==="End"&&A(75)}}),o.jsx("aside",{ref:U,id:"reader-chat-panel",className:`reader-assistant-pane${!c&&h!=="assistant"?" is-hidden":""}${c&&p?" is-collapsed":""}`,style:c?{width:p?0:`${100-R}%`}:void 0,role:"tabpanel","aria-label":"Chat","aria-hidden":!c&&h!=="assistant"||p,children:ye}),o.jsx("div",{className:"sr-only","aria-live":"polite",children:pe}),c&&o.jsx("button",{type:"button",className:"reader-collapse-assistant","aria-controls":"reader-chat-panel","aria-expanded":!p,onClick:()=>te(!p),children:p?"Open chat":"Hide chat"})]})})]}):o.jsxs("div",{className:"reader-status",role:"alert",children:[o.jsx("p",{children:"Native reading is unavailable for this resource."}),o.jsx(K,{to:`/paper/${f}`,children:"Back to paper"})]})}function xt(){const{paperId:r=""}=oe();return o.jsx(ke,{workspaceKey:`reader:${r}`,children:o.jsx(qe,{})})}export{xt as default,De as readerToolbarResources}; +import{u as oe,j as o,b as je,n as $e,U as ie,r as s,V as Ie,L as K}from"./index-hxawG6mk.js";import{u as Ae}from"./useQuery-B7vCF2Os.js";import{A as ke,u as Ne,a as Ee,P as Te}from"./ArtifactWorkspace-CCP7C86X.js";import{b as ze}from"./usePapers-K74IxnFM.js";import{c as Le}from"./chat-DJiy7CbR.js";import{s as q}from"./safeExternalHref-CkBrsh84.js";import{ChatExperience as Ue}from"./ChatView-DOWTcGaK.js";import"./chatLaunch-DrTVeX4t.js";import"./chevron-down-dhq7I8yA.js";import"./papers-B0ysePyJ.js";/* empty css */import"./hover-card-DEHIu6q-.js";import"./github-Bf2b_Y1p.js";import"./github-C-cqt6uw.js";import"./catalog-ePebz7GX.js";import"./PaperPreviewLink-BJhSzNVs.js";import"./index-CaRYlo5c.js";import"./index-Ddr0k9KU.js";import"./katex-DkKDou_j.js";import"./paperQueryKeys-BP2E-0yf.js";import"./useMutation-gPqxjZGO.js";import"./copy-B2wC0pMM.js";import"./file-text-DIeliPoM.js";import"./external-link-CWzYMTrZ.js";import"./useInfiniteQuery-BIEmOe8z.js";import"./chatPrompts-DypmWIqx.js";import"./openrouter-CJoBewhx.js";import"./queryOptions-C9woPjwX.js";const ce=66,Fe=240,V="pwc:reader:split-ratio",k=r=>`pwc:reader:session:${r}`,B=r=>`pwc:reader:assistant-collapsed:${r}`,le=r=>`pwc:reader:page:${r}`;function D(r){const i=Number(sessionStorage.getItem(le(r)));return Number.isInteger(i)&&i>0?i:1}function He(){const r=Number(localStorage.getItem(V));return Number.isFinite(r)&&r>=45&&r<=75?r:ce}function Me(r){const i=q(r);if(!i)return null;const n=new URL(i);return(n.hostname==="arxiv.org"||n.hostname==="www.arxiv.org")&&n.pathname.startsWith("/pdf/")&&n.pathname.endsWith(".pdf")&&(n.pathname=n.pathname.slice(0,-4)),n.href}const We=/^\/pdf\/(\d{4}\.\d{4,5}(?:v\d{1,3})?|[a-z]+(?:-[a-z]+)*(?:\.[A-Z]{2})?\/\d{7}(?:v\d{1,3})?)$/;function Ke(r){const i=new URL(r),n=i.pathname.match(We);return(i.hostname==="arxiv.org"||i.hostname==="www.arxiv.org")&&n&&!i.search?ie(`/paper-assets/arxiv-pdf/${n[1]}`)??r:r}function Be(r){return new URL(r).hostname.replace(/^www\./,"")}function De(r){if(!r)return{};const i={};for(const u of r.repositories??[]){if(!u.is_official)continue;const t=q(u.url);if(!t)continue;const m=new URL(t),w=m.pathname.split("/").filter(Boolean);if((m.hostname==="github.com"||m.hostname==="www.github.com")&&w.length>=2){i.repository={href:t,stars:u.num_stars||0};break}}const n=[...r.project_pages??[]].sort((u,t)=>Number(t.is_official)-Number(u.is_official));for(const u of n){const t=q(u.url);if(t){i.projectPage={href:t,label:Be(t)};break}}const v=r.hf_artifact_summary?r.hf_artifact_summary.model_count+r.hf_artifact_summary.dataset_count+r.hf_artifact_summary.space_count:new Set([...r.hf_models??[],...r.hf_datasets??[],...r.hf_spaces??[]]).size;return v>0&&r.arxiv_id&&(i.huggingFace={href:`https://huggingface.co/papers/${r.arxiv_id.replace(/v\d+$/i,"")}`,count:v}),i}function qe(){var re,ae,se,ne;const r=je(),{paperId:i}=oe(),n=$e(i??"").replace(/v\d+$/i,""),v=ze(n,!!n),u=Ae({queryKey:["chatAvailability"],queryFn:()=>Le.getAvailability(),refetchInterval:3e4,retry:!1}),t=v.data,m=(t==null?void 0:t.source)==="external"?ie(`/paper-assets/external/${t.id}/paper.pdf`):Me(t==null?void 0:t.url_pdf),w=m&&(t==null?void 0:t.source)!=="external"?Ke(m):m,de=De(t),f=((re=t==null?void 0:t.arxiv_id)==null?void 0:re.replace(/v\d+$/i,""))||n,ue=s.useCallback(()=>r(`/paper/${f}`),[f,r]),[y,N]=s.useState(()=>sessionStorage.getItem(k(n))||void 0),[R,E]=s.useState(He),[p,O]=s.useState(()=>sessionStorage.getItem(B(n))==="1"),[h,C]=s.useState("paper"),[T,x]=s.useState(),[pe,b]=s.useState(""),[fe,me]=s.useState(()=>D(n)),[P,he]=s.useState(0),[X,Q]=s.useState(!1),[ge,z]=s.useState(!1),_=s.useRef(null),L=s.useRef(null),U=s.useRef(null),Y=s.useRef(null),j=s.useRef(!1),$=s.useRef(0),g=s.useRef(0),F=s.useRef(0),S=s.useRef(R),H=s.useRef(D(n)),M=s.useRef(t==null?void 0:t.version),Z=Ne().reset,G=s.useRef(`${n}:${y??"new"}`),c=P>=840;s.useEffect(()=>{const e=`${n}:${y??"new"}`;G.current!==e&&(G.current=e,Z())},[y,Z,n]),s.useEffect(()=>{t!=null&&t.version&&M.current&&t.version!==M.current&&(x(void 0),b("")),M.current=t==null?void 0:t.version},[t==null?void 0:t.version]),s.useEffect(()=>{window.clearTimeout($.current),z(!1);const e=sessionStorage.getItem(k(n));N(e||void 0),O(sessionStorage.getItem(B(n))==="1"),C("paper"),x(void 0),b("");const a=D(n);H.current=a,me(a)},[n]),s.useEffect(()=>()=>{window.clearTimeout($.current),cancelAnimationFrame(g.current)},[]),s.useLayoutEffect(()=>{const e=_.current;if(!e)return;const a=()=>he(e.clientWidth);a();const l=new ResizeObserver(a);return l.observe(e),()=>l.disconnect()},[t]),s.useEffect(()=>{if(!t)return;document.title=`${t.title} — Papers With Code reader`;let e=document.querySelector('meta[name="robots"]');const a=!e;e||(e=document.createElement("meta"),e.name="robots",document.head.appendChild(e));const l=e.content;e.content="noindex, nofollow";let d=document.querySelector('link[rel="canonical"]');const Ce=!d;d||(d=document.createElement("link"),d.rel="canonical",document.head.appendChild(d));const _e=d.href;return d.href=`${window.location.origin}/paper/${f}`,()=>{document.title="Papers With Code",a?e==null||e.remove():e&&(e.content=l),Ce?d==null||d.remove():d&&(d.href=_e)}},[f,t]);const I=s.useCallback(e=>{if(!P)return Math.max(45,Math.min(75,e));const a=480/P*100,l=100-360/P*100;return Math.max(a,Math.min(l,e))},[P]);s.useEffect(()=>E(e=>{const a=I(e);return S.current=a,a}),[I]);const A=e=>{const a=I(e);S.current=a,E(a),localStorage.setItem(V,String(a))},J=e=>{var l;const a=I(e);S.current=a,L.current&&(L.current.style.width=`${a}%`),U.current&&(U.current.style.width=`${100-a}%`),(l=Y.current)==null||l.setAttribute("aria-valuenow",String(Math.round(a)))},ee=e=>{F.current=e,!g.current&&(g.current=requestAnimationFrame(()=>{var l;g.current=0;const a=(l=_.current)==null?void 0:l.getBoundingClientRect();a!=null&&a.width&&J((F.current-a.left)/a.width*100)}))},ve=e=>{j.current=!0,Q(!0),e.currentTarget.setPointerCapture(e.pointerId),ee(e.clientX)},W=()=>{var e;if(j.current){if(g.current){cancelAnimationFrame(g.current),g.current=0;const a=(e=_.current)==null?void 0:e.getBoundingClientRect();a!=null&&a.width&&J((F.current-a.left)/a.width*100)}j.current=!1,E(S.current),localStorage.setItem(V,String(S.current)),Q(!1)}},te=e=>{window.clearTimeout($.current),z(!0),O(e),sessionStorage.setItem(B(n),e?"1":"0"),$.current=window.setTimeout(()=>z(!1),Fe+40)},be=e=>{N(e),sessionStorage.setItem(k(n),e)},we=()=>{N(void 0),sessionStorage.removeItem(k(n)),x(void 0),b("")},Re=((ae=u.data)==null?void 0:ae.paper_reader_selection_enabled)===!0,xe=e=>{x(e),b(`Selection from page ${e.page} added to chat`),c&&p&&te(!1)},Pe=s.useCallback(e=>{x(e),e||b("")},[]),Se=Ie()&&((se=u.data)==null?void 0:se.paper_reader_chat_enabled)!==!1,ye=t&&Se?o.jsx(Ue,{mode:"paper",routeSessionId:y,primaryPaper:{id:t.id,routeId:f,title:t.title},currentPage:()=>H.current,paperSelection:T,onPaperSelectionChange:Pe,onSessionId:be,onReaderSubmit:()=>C("assistant"),onReaderNewChat:we}):o.jsx("div",{className:"reader-chat-unavailable",children:"Chat is not enabled for this preview."});return v.isLoading?o.jsx("div",{className:"reader-status",role:"status",children:"Loading paper…"}):v.error||!t?o.jsxs("div",{className:"reader-status",role:"alert",children:[o.jsx("p",{children:"Paper not found."}),o.jsx(K,{to:"/papers",children:"Browse papers"})]}):((ne=u.data)==null?void 0:ne.native_pdf_reader_enabled)===!1?o.jsxs("div",{className:"reader-status",role:"alert",children:[o.jsx("p",{children:"The native reader is currently unavailable."}),o.jsx(K,{to:`/paper/${f}`,children:"Back to paper"})]}):w?o.jsxs("div",{className:"paper-reader-shell",children:[!c&&o.jsxs("div",{className:"reader-tabs",role:"tablist","aria-label":"Reader panels",children:[o.jsx("button",{type:"button",role:"tab","aria-selected":h==="paper",onClick:()=>C("paper"),children:"Paper"}),o.jsxs("button",{type:"button",role:"tab","aria-selected":h==="assistant","aria-label":T&&h!=="assistant"?"Chat, selection attached":"Chat",onClick:()=>C("assistant"),children:["Chat",T&&h!=="assistant"&&o.jsx("span",{className:"reader-tab-pending","aria-hidden":"true"})]})]}),o.jsx(Ee,{variant:"reader",children:o.jsxs("div",{ref:_,className:`reader-workspace${c?" is-desktop":" is-tabs"}${p?" is-assistant-collapsed":""}${X?" is-resizing":""}`,"data-testid":"paper-chat-workspace",children:[o.jsx("section",{ref:L,className:`reader-paper-pane${!c&&h!=="paper"?" is-hidden":""}`,style:c?{width:p?"100%":`${R}%`}:void 0,role:"tabpanel","aria-label":"Paper","aria-hidden":!c&&h!=="paper",children:o.jsx(Te,{url:w,downloadUrl:m??w,paperKey:f,paperTitle:t.title,paperHref:`/paper/${f}`,onClose:ue,resources:de,initialPage:fe,resizeActive:X||ge,selectionEnabled:Re,paperVersion:t.version,loadErrorMessage:t.source==="external"?"Paper content is still being prepared. Please try again later.":void 0,onPaperSelection:xe,onPaperSelectionError:b,onPageChange:e=>{H.current=e,sessionStorage.setItem(le(n),String(e))}})}),c&&!p&&o.jsx("div",{ref:Y,className:"reader-resize-handle",role:"separator","aria-label":"Resize paper and Chat panels","aria-orientation":"vertical","aria-valuemin":45,"aria-valuemax":75,"aria-valuenow":Math.round(R),tabIndex:0,onPointerDown:ve,onPointerMove:e=>{j.current&&ee(e.clientX)},onPointerUp:W,onPointerCancel:W,onLostPointerCapture:W,onDoubleClick:()=>A(ce),onKeyDown:e=>{(e.key==="ArrowLeft"||e.key==="ArrowRight")&&(e.preventDefault(),A(R+(e.key==="ArrowRight"?2:-2))),e.key==="Home"&&A(45),e.key==="End"&&A(75)}}),o.jsx("aside",{ref:U,id:"reader-chat-panel",className:`reader-assistant-pane${!c&&h!=="assistant"?" is-hidden":""}${c&&p?" is-collapsed":""}`,style:c?{width:p?0:`${100-R}%`}:void 0,role:"tabpanel","aria-label":"Chat","aria-hidden":!c&&h!=="assistant"||p,children:ye}),o.jsx("div",{className:"sr-only","aria-live":"polite",children:pe}),c&&o.jsx("button",{type:"button",className:"reader-collapse-assistant","aria-controls":"reader-chat-panel","aria-expanded":!p,onClick:()=>te(!p),children:p?"Open chat":"Hide chat"})]})})]}):o.jsxs("div",{className:"reader-status",role:"alert",children:[o.jsx("p",{children:"Native reading is unavailable for this resource."}),o.jsx(K,{to:`/paper/${f}`,children:"Back to paper"})]})}function xt(){const{paperId:r=""}=oe();return o.jsx(ke,{workspaceKey:`reader:${r}`,children:o.jsx(qe,{})})}export{xt as default,De as readerToolbarResources}; diff --git a/assets/PapersListView-B0JcRl4T.js b/assets/PapersListView-Bfx03Ep_.js similarity index 90% rename from assets/PapersListView-B0JcRl4T.js rename to assets/PapersListView-Bfx03Ep_.js index b90c15a3ebf79ffbae0a432bd0f6b324c7582117..2d8be16f1b07af7b34a63fb8810d266ffe87aef0 100644 --- a/assets/PapersListView-B0JcRl4T.js +++ b/assets/PapersListView-Bfx03Ep_.js @@ -1 +1 @@ -import{d as X,r as x,A as J,j as e,L as j,i as W}from"./index-CnBotBa4.js";import{I as U,T as Y,P as Z}from"./components-CSFfzsKt.js";import{c as ee}from"./catalog-mND3MerS.js";import{t as se,d as ae}from"./transform-DMbrhcTx.js";import{u as re,a as te}from"./usePapers-fw4Ivp2T.js";import{u as ne}from"./useDebounce-Bw5By0Qg.js";import{u as ie}from"./useIntersectionObserver-WHgviHIR.js";import{S as _}from"./skeleton-DuOQBmSr.js";import{A as oe,a as ce}from"./alert-B0qZtPeK.js";import{u as le}from"./useQuery-C8pfCInN.js";import{P as de}from"./PaperFeedFilters-DBRREw9D.js";import{a as me,P as he,b as pe}from"./PaperDateFilter-DMplC82d.js";import"./paperQueryKeys-BP2E-0yf.js";import"./LatexTitle-B1D_EqzJ.js";import"./papers-DkTdvzl4.js";import"./safeExternalHref-CkBrsh84.js";import"./useInfiniteQuery-DUlXElgD.js";import"./popover-BvojInsz.js";const v=360;function ue(a,o){const m=a.toLocaleLowerCase();return o.trim().split(/\s+/).filter(Boolean).reduce((c,t)=>{const l=m.indexOf(t.toLocaleLowerCase());return l>=0&&(c<0||l=0?t+1:o}function fe(a,o){if(a.length<=v)return a;const m=ue(a,o);if(m<0||m0?"…":""}${a.slice(c,t).trim()}${tnew Intl.NumberFormat("en",{notation:a>=1e3?"compact":"standard",maximumFractionDigits:1}).format(a),Oe=()=>{var I,$,T,O,B,H,M,q,G;const[a,o]=X(),m=a.get("framework")||void 0,c=a.get("repository")||void 0,t=!!(m||c),l=a.get("search")||"",[F,C]=x.useState(l),p=ne(F,300),n=!t&&l.trim().length>0;x.useEffect(()=>C(l),[l]),x.useEffect(()=>{if(p===l)return;const s=new URLSearchParams(a);p?s.set("search",p):s.delete("search"),o(s,{replace:!0})},[p]),x.useEffect(()=>{const s=a.get("order_by"),i=new URLSearchParams(a);n&&!["relevance","date_published","citation_count"].includes(s||"")?(i.set("order_by","relevance"),o(i,{replace:!0})):!n&&s==="relevance"&&(i.delete("order_by"),o(i,{replace:!0}))},[n,a,o]);const L=a.get("order_by"),g=L==="citation_count"?"cited":L==="date_published"?"new":n?"relevance":"trending",u=me(a),w=a.get("has_hf_artifacts")==="true",k=!t&&a.get("has_code")==="true",y=(s,i)=>{const h=new URLSearchParams(a);i?h.set(s,i):h.delete(s),o(h)},Q=s=>{y("order_by",s==="cited"?"citation_count":s==="new"?"date_published":s)},b=re({page_size:20,order_by:g==="trending"?"trending":g==="cited"?"citation_count":"date_published",order_dir:"desc",search:t&&p||void 0,start_date:u.startDate,end_date:u.endDate,include_resources:!0,conference:a.get("conference")||void 0,latest_only:a.get("latest_only")!=="false",has_code:k,has_hf_artifacts:w,framework:m,repository:c,enabled:!n}),R=te({q:p.trim(),order_by:g==="cited"?"citation_count":g==="new"?"date_published":"relevance",start_date:u.startDate,end_date:u.endDate,has_code:k,has_hf_artifacts:w,enabled:n}),d=n?R:b,A=le({queryKey:["top-tasks-sidebar"],queryFn:()=>ee.topTasks(8),enabled:!t&&!n,staleTime:10*60*1e3}),N=x.useMemo(()=>{var i;return(((i=d.data)==null?void 0:i.pages.flatMap(h=>h.results))||[]).map(h=>{const S=se(h);return n?{...S,abstract:fe(S.abstract,l)}:S})},[d.data,n,l]),{targetRef:K,isIntersecting:D}=ie({rootMargin:"200px"});x.useEffect(()=>{D&&d.hasNextPage&&!d.isFetchingNextPage&&d.fetchNextPage()},[D,d.hasNextPage,d.isFetchingNextPage]);const f=((T=($=(I=b.data)==null?void 0:I.pages)==null?void 0:$[0])==null?void 0:T.count)??0,r=(H=(B=(O=b.data)==null?void 0:O.pages)==null?void 0:B[0])==null?void 0:H.scope,P=(q=(M=R.data)==null?void 0:M.pages)==null?void 0:q.at(-1),E=m&&d.error instanceof J&&d.error.status===404,V=(r==null?void 0:r.kind)==="framework"?r.framework_name:r==null?void 0:r.repository;return e.jsxs("div",{className:"page",children:[(r==null?void 0:r.kind)==="framework"&&e.jsxs("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:[e.jsx(j,{to:"/",children:"Papers"}),e.jsx("span",{className:"sep",children:"/"}),e.jsx(j,{to:"/frameworks",children:"Frameworks"}),e.jsx("span",{className:"sep",children:"/"}),e.jsx("span",{style:{color:"var(--ink)"},children:r.framework_name})]}),e.jsxs("div",{className:"feed-header",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"feed-title",children:t?e.jsxs(e.Fragment,{children:["Papers implemented by ",e.jsx("em",{children:V||m||c})]}):n?e.jsxs(e.Fragment,{children:["Search results for ",e.jsxs("em",{children:["“",l,"”"]})]}):e.jsxs(e.Fragment,{children:["All ",e.jsx("em",{children:"Papers"})]})}),e.jsx("div",{className:"feed-subtitle",children:t?(r==null?void 0:r.kind)==="framework"?f>0&&`${f.toLocaleString()} papers.`:r!=null&&r.repository?e.jsxs(e.Fragment,{children:["GitHub repository ",e.jsx("strong",{children:r.repository}),". ",f>0&&`${f.toLocaleString()} papers.`]}):"Repository-scoped paper feed.":n?`${N.length} loaded from the most relevant results.`:e.jsxs(e.Fragment,{children:["Search the full corpus. ",f>0&&`${f.toLocaleString()} papers indexed.`]})}),t&&r&&e.jsxs("div",{className:"paper-feed-scope-links",children:[e.jsxs("div",{className:"paper-feed-primary-links",children:[r.github_url&&e.jsxs("a",{href:r.github_url,target:"_blank",rel:"noopener noreferrer",className:r.kind==="framework"?"task-framework-link":"framework-link",children:[e.jsx(U,{name:"github",size:13}),r.kind==="framework"?e.jsxs(e.Fragment,{children:[e.jsx("span",{children:r.repository||"GitHub"}),r.num_stars!=null&&e.jsxs("span",{className:"task-framework-link-stars",children:["★ ",je(r.num_stars)]})]}):"GitHub"]}),r.kind==="framework"&&r.introducing_paper_arxiv_id&&e.jsx(j,{to:`/paper/${r.introducing_paper_arxiv_id}`,className:"framework-link",children:"Introducing paper"})]}),r.kind==="framework"&&r.recommended_tasks&&r.recommended_tasks.length>0&&e.jsx("div",{className:"paper-feed-task-tags",children:r.recommended_tasks.map(s=>s.slug?e.jsx(Y,{slug:s.slug,label:s.name},s.id):null)})]})]}),e.jsx(he,{startDate:u.startDate,endDate:u.endDate,onChange:s=>o(pe(a,s))})]}),e.jsx("div",{className:"papers-search-row",children:e.jsxs("div",{className:"papers-search-input-wrap",children:[e.jsx(U,{name:"search",size:14}),e.jsx("input",{className:"papers-search-input",placeholder:"Search title or abstract…",value:F,onChange:s=>C(s.target.value)})]})}),e.jsxs("div",{className:t||n?"papers-feed-layout-scoped":"layout-with-sidebar",children:[!t&&!n&&e.jsx("aside",{className:"sidebar",children:e.jsxs("div",{className:"sidebar-section",children:[e.jsx("div",{className:"sidebar-label",children:"Top Domains"}),A.isLoading&&e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:Array.from({length:6}).map((s,i)=>e.jsx(_,{className:"h-5 w-full"},i))}),(G=A.data)==null?void 0:G.map(s=>e.jsxs(j,{to:`/tasks/${s.slug}`,className:"sidebar-link",children:[ae(s.name,s.slug),s.paper_count!=null&&e.jsx("span",{className:"count",children:s.paper_count})]},s.id))]})}),e.jsxs("div",{children:[e.jsxs("div",{className:"sort-bar",children:[e.jsxs("div",{className:"paper-feed-toolbar-controls",children:[e.jsx("div",{className:"sort-options",children:(n?ge:xe).map(([s,i])=>e.jsx("button",{className:`sort-btn ${g===s?"active":""}`,onClick:()=>Q(s),children:i},s))}),e.jsx(de,{hasCode:k,hasHfArtifacts:w,onHasCodeChange:s=>y("has_code",s?"true":void 0),onHasHfArtifactsChange:s=>y("has_hf_artifacts",s?"true":void 0),showHasCode:!t})]}),e.jsxs("div",{className:"results-count",children:[N.length," loaded"]})]}),E?e.jsx("div",{className:"no-results",children:"Framework not found."}):d.error&&e.jsx(oe,{variant:"destructive",className:"mb-4",children:e.jsx(ce,{children:"Failed to load papers. Please try again."})}),!E&&(d.isLoading?e.jsx("div",{className:"paper-list",children:Array.from({length:6}).map((s,i)=>e.jsxs("div",{className:"paper-card",children:[e.jsx(_,{className:"h-[220px] w-[160px]"}),e.jsxs("div",{className:"paper-body",style:{flex:1,gap:12},children:[e.jsx(_,{className:"h-6 w-3/4"}),e.jsx(_,{className:"h-4 w-1/2"}),e.jsx(_,{className:"h-12 w-full"})]})]},i))}):N.length===0?e.jsxs("div",{className:"no-results",children:[e.jsx("p",{children:"No matching papers."}),n&&W()&&e.jsx(j,{to:`/chat?q=${encodeURIComponent(l.trim())}`,children:"Ask the assistant instead"})]}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"paper-list",children:N.map((s,i)=>e.jsx(Z,{paper:s,rank:i+1,highlightQuery:n?l:void 0},s.id))}),e.jsx("div",{ref:K,style:{height:1}}),d.isFetchingNextPage&&e.jsx("div",{style:{padding:"20px 0",textAlign:"center",color:"var(--ink-faint)"},children:"Loading more…"}),!d.hasNextPage&&!d.isFetchingNextPage&&n&&e.jsx("div",{className:"search-results-end",children:P!=null&&P.cap_reached?"End of the top 100 results":"End of results"})]}))]})]})]})};export{Oe as default}; +import{d as X,r as x,A as J,j as e,L as j,i as W}from"./index-hxawG6mk.js";import{I as U,T as Y,P as Z}from"./components-Djdw_Z-e.js";import{c as ee}from"./catalog-ePebz7GX.js";import{t as se,d as ae}from"./transform-DfrN0kQW.js";import{u as re,a as te}from"./usePapers-K74IxnFM.js";import{u as ne}from"./useDebounce-lGdHpcfR.js";import{u as ie}from"./useIntersectionObserver-rTEWxOEQ.js";import{S as _}from"./skeleton-CRfsRMNe.js";import{A as oe,a as ce}from"./alert-2LCyXuCE.js";import{u as le}from"./useQuery-B7vCF2Os.js";import{P as de}from"./PaperFeedFilters-BsWw60hu.js";import{a as me,P as he,b as pe}from"./PaperDateFilter-CmJ1wf5w.js";import"./paperQueryKeys-BP2E-0yf.js";import"./LatexTitle-QTkECjbh.js";import"./papers-B0ysePyJ.js";import"./safeExternalHref-CkBrsh84.js";import"./useInfiniteQuery-BIEmOe8z.js";import"./popover-BEdoEHfx.js";const v=360;function ue(a,o){const m=a.toLocaleLowerCase();return o.trim().split(/\s+/).filter(Boolean).reduce((c,t)=>{const l=m.indexOf(t.toLocaleLowerCase());return l>=0&&(c<0||l=0?t+1:o}function fe(a,o){if(a.length<=v)return a;const m=ue(a,o);if(m<0||m0?"…":""}${a.slice(c,t).trim()}${tnew Intl.NumberFormat("en",{notation:a>=1e3?"compact":"standard",maximumFractionDigits:1}).format(a),Oe=()=>{var I,$,T,O,B,H,M,q,G;const[a,o]=X(),m=a.get("framework")||void 0,c=a.get("repository")||void 0,t=!!(m||c),l=a.get("search")||"",[F,C]=x.useState(l),p=ne(F,300),n=!t&&l.trim().length>0;x.useEffect(()=>C(l),[l]),x.useEffect(()=>{if(p===l)return;const s=new URLSearchParams(a);p?s.set("search",p):s.delete("search"),o(s,{replace:!0})},[p]),x.useEffect(()=>{const s=a.get("order_by"),i=new URLSearchParams(a);n&&!["relevance","date_published","citation_count"].includes(s||"")?(i.set("order_by","relevance"),o(i,{replace:!0})):!n&&s==="relevance"&&(i.delete("order_by"),o(i,{replace:!0}))},[n,a,o]);const L=a.get("order_by"),g=L==="citation_count"?"cited":L==="date_published"?"new":n?"relevance":"trending",u=me(a),w=a.get("has_hf_artifacts")==="true",k=!t&&a.get("has_code")==="true",y=(s,i)=>{const h=new URLSearchParams(a);i?h.set(s,i):h.delete(s),o(h)},Q=s=>{y("order_by",s==="cited"?"citation_count":s==="new"?"date_published":s)},b=re({page_size:20,order_by:g==="trending"?"trending":g==="cited"?"citation_count":"date_published",order_dir:"desc",search:t&&p||void 0,start_date:u.startDate,end_date:u.endDate,include_resources:!0,conference:a.get("conference")||void 0,latest_only:a.get("latest_only")!=="false",has_code:k,has_hf_artifacts:w,framework:m,repository:c,enabled:!n}),R=te({q:p.trim(),order_by:g==="cited"?"citation_count":g==="new"?"date_published":"relevance",start_date:u.startDate,end_date:u.endDate,has_code:k,has_hf_artifacts:w,enabled:n}),d=n?R:b,A=le({queryKey:["top-tasks-sidebar"],queryFn:()=>ee.topTasks(8),enabled:!t&&!n,staleTime:10*60*1e3}),N=x.useMemo(()=>{var i;return(((i=d.data)==null?void 0:i.pages.flatMap(h=>h.results))||[]).map(h=>{const S=se(h);return n?{...S,abstract:fe(S.abstract,l)}:S})},[d.data,n,l]),{targetRef:K,isIntersecting:D}=ie({rootMargin:"200px"});x.useEffect(()=>{D&&d.hasNextPage&&!d.isFetchingNextPage&&d.fetchNextPage()},[D,d.hasNextPage,d.isFetchingNextPage]);const f=((T=($=(I=b.data)==null?void 0:I.pages)==null?void 0:$[0])==null?void 0:T.count)??0,r=(H=(B=(O=b.data)==null?void 0:O.pages)==null?void 0:B[0])==null?void 0:H.scope,P=(q=(M=R.data)==null?void 0:M.pages)==null?void 0:q.at(-1),E=m&&d.error instanceof J&&d.error.status===404,V=(r==null?void 0:r.kind)==="framework"?r.framework_name:r==null?void 0:r.repository;return e.jsxs("div",{className:"page",children:[(r==null?void 0:r.kind)==="framework"&&e.jsxs("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:[e.jsx(j,{to:"/",children:"Papers"}),e.jsx("span",{className:"sep",children:"/"}),e.jsx(j,{to:"/frameworks",children:"Frameworks"}),e.jsx("span",{className:"sep",children:"/"}),e.jsx("span",{style:{color:"var(--ink)"},children:r.framework_name})]}),e.jsxs("div",{className:"feed-header",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"feed-title",children:t?e.jsxs(e.Fragment,{children:["Papers implemented by ",e.jsx("em",{children:V||m||c})]}):n?e.jsxs(e.Fragment,{children:["Search results for ",e.jsxs("em",{children:["“",l,"”"]})]}):e.jsxs(e.Fragment,{children:["All ",e.jsx("em",{children:"Papers"})]})}),e.jsx("div",{className:"feed-subtitle",children:t?(r==null?void 0:r.kind)==="framework"?f>0&&`${f.toLocaleString()} papers.`:r!=null&&r.repository?e.jsxs(e.Fragment,{children:["GitHub repository ",e.jsx("strong",{children:r.repository}),". ",f>0&&`${f.toLocaleString()} papers.`]}):"Repository-scoped paper feed.":n?`${N.length} loaded from the most relevant results.`:e.jsxs(e.Fragment,{children:["Search the full corpus. ",f>0&&`${f.toLocaleString()} papers indexed.`]})}),t&&r&&e.jsxs("div",{className:"paper-feed-scope-links",children:[e.jsxs("div",{className:"paper-feed-primary-links",children:[r.github_url&&e.jsxs("a",{href:r.github_url,target:"_blank",rel:"noopener noreferrer",className:r.kind==="framework"?"task-framework-link":"framework-link",children:[e.jsx(U,{name:"github",size:13}),r.kind==="framework"?e.jsxs(e.Fragment,{children:[e.jsx("span",{children:r.repository||"GitHub"}),r.num_stars!=null&&e.jsxs("span",{className:"task-framework-link-stars",children:["★ ",je(r.num_stars)]})]}):"GitHub"]}),r.kind==="framework"&&r.introducing_paper_arxiv_id&&e.jsx(j,{to:`/paper/${r.introducing_paper_arxiv_id}`,className:"framework-link",children:"Introducing paper"})]}),r.kind==="framework"&&r.recommended_tasks&&r.recommended_tasks.length>0&&e.jsx("div",{className:"paper-feed-task-tags",children:r.recommended_tasks.map(s=>s.slug?e.jsx(Y,{slug:s.slug,label:s.name},s.id):null)})]})]}),e.jsx(he,{startDate:u.startDate,endDate:u.endDate,onChange:s=>o(pe(a,s))})]}),e.jsx("div",{className:"papers-search-row",children:e.jsxs("div",{className:"papers-search-input-wrap",children:[e.jsx(U,{name:"search",size:14}),e.jsx("input",{className:"papers-search-input",placeholder:"Search title or abstract…",value:F,onChange:s=>C(s.target.value)})]})}),e.jsxs("div",{className:t||n?"papers-feed-layout-scoped":"layout-with-sidebar",children:[!t&&!n&&e.jsx("aside",{className:"sidebar",children:e.jsxs("div",{className:"sidebar-section",children:[e.jsx("div",{className:"sidebar-label",children:"Top Domains"}),A.isLoading&&e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:Array.from({length:6}).map((s,i)=>e.jsx(_,{className:"h-5 w-full"},i))}),(G=A.data)==null?void 0:G.map(s=>e.jsxs(j,{to:`/tasks/${s.slug}`,className:"sidebar-link",children:[ae(s.name,s.slug),s.paper_count!=null&&e.jsx("span",{className:"count",children:s.paper_count})]},s.id))]})}),e.jsxs("div",{children:[e.jsxs("div",{className:"sort-bar",children:[e.jsxs("div",{className:"paper-feed-toolbar-controls",children:[e.jsx("div",{className:"sort-options",children:(n?ge:xe).map(([s,i])=>e.jsx("button",{className:`sort-btn ${g===s?"active":""}`,onClick:()=>Q(s),children:i},s))}),e.jsx(de,{hasCode:k,hasHfArtifacts:w,onHasCodeChange:s=>y("has_code",s?"true":void 0),onHasHfArtifactsChange:s=>y("has_hf_artifacts",s?"true":void 0),showHasCode:!t})]}),e.jsxs("div",{className:"results-count",children:[N.length," loaded"]})]}),E?e.jsx("div",{className:"no-results",children:"Framework not found."}):d.error&&e.jsx(oe,{variant:"destructive",className:"mb-4",children:e.jsx(ce,{children:"Failed to load papers. Please try again."})}),!E&&(d.isLoading?e.jsx("div",{className:"paper-list",children:Array.from({length:6}).map((s,i)=>e.jsxs("div",{className:"paper-card",children:[e.jsx(_,{className:"h-[220px] w-[160px]"}),e.jsxs("div",{className:"paper-body",style:{flex:1,gap:12},children:[e.jsx(_,{className:"h-6 w-3/4"}),e.jsx(_,{className:"h-4 w-1/2"}),e.jsx(_,{className:"h-12 w-full"})]})]},i))}):N.length===0?e.jsxs("div",{className:"no-results",children:[e.jsx("p",{children:"No matching papers."}),n&&W()&&e.jsx(j,{to:`/chat?q=${encodeURIComponent(l.trim())}`,children:"Ask the assistant instead"})]}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"paper-list",children:N.map((s,i)=>e.jsx(Z,{paper:s,rank:i+1,highlightQuery:n?l:void 0},s.id))}),e.jsx("div",{ref:K,style:{height:1}}),d.isFetchingNextPage&&e.jsx("div",{style:{padding:"20px 0",textAlign:"center",color:"var(--ink-faint)"},children:"Loading more…"}),!d.hasNextPage&&!d.isFetchingNextPage&&n&&e.jsx("div",{className:"search-results-end",children:P!=null&&P.cap_reached?"End of the top 100 results":"End of results"})]}))]})]})]})};export{Oe as default}; diff --git a/assets/PrivacyView-CGg-BccQ.js b/assets/PrivacyView-CDKix7GX.js similarity index 99% rename from assets/PrivacyView-CGg-BccQ.js rename to assets/PrivacyView-CDKix7GX.js index 1c2e4c032968c8d8744e624b7bcf23456a826d33..832d516b283dbebb31bb9d0c68c550cdf5d9ce1a 100644 --- a/assets/PrivacyView-CGg-BccQ.js +++ b/assets/PrivacyView-CDKix7GX.js @@ -1 +1 @@ -import{F as s,j as e}from"./index-CnBotBa4.js";import{f as i,D as r}from"./latexPlainText-DI8YEXVe.js";const n=()=>(s.useEffect(()=>(document.title=i("Privacy Policy"),()=>{document.title=r}),[]),e.jsxs("article",{className:"page legal-page",children:[e.jsxs("header",{className:"legal-header",children:[e.jsx("p",{className:"legal-kicker",children:"Legal"}),e.jsx("h1",{children:"Privacy Policy"}),e.jsx("p",{className:"legal-effective-date",children:"Effective August 11, 2026"})]}),e.jsx("p",{children:"This Privacy Policy explains how Hugging Face, Inc. (“Hugging Face,” “we,” or “us”) collects, uses, and shares information when you use Papers With Code, including its website, research assistant, APIs, and related services (the “Service”)."}),e.jsxs("section",{children:[e.jsx("h2",{children:"1. Information we collect"}),e.jsx("h3",{children:"Information you provide"}),e.jsxs("ul",{children:[e.jsxs("li",{children:[e.jsx("strong",{children:"Account information."})," If you sign in with Hugging Face, we receive account identifiers and profile details needed to authenticate you, such as your user ID, username, and avatar. If you request contributor access, we also receive and retain the verified email address associated with your Hugging Face account so we can review and communicate about your request."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Contributions and preferences."})," We collect information you submit or save, such as paper submissions and edits, bookmarks, display preferences, feedback, and communications with us. Material you submit to a public research page may be publicly visible."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Research assistant content."})," We collect your questions, conversation history, generated answers, citations, tool calls and results, and feedback about answers. Chats are private to your account unless you choose to create a share link; anyone with that link may be able to view the shared chat."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Provider and billing information."})," If you enable a model provider, we process the authorization or API credentials needed to make requests on your behalf. Hugging Face or another provider processes its own billing information under its terms. Papers With Code does not collect your payment-card details."]})]}),e.jsx("h3",{children:"Information collected automatically"}),e.jsx("p",{children:"We collect technical and usage information such as IP address, browser and device type, operating system, pages or features used, dates and times, referring pages, request identifiers, cookies, logs, and diagnostic data. For research-assistant requests, this may include the selected model, token and cost details, latency, errors, and other operational metadata."}),e.jsx("h3",{children:"Research assistant tracing"}),e.jsxs("p",{children:["To evaluate, debug, secure, and improve the research assistant, we use Langfuse to record traces. A trace may contain the complete text of your question and the assistant's answer, as well as tool inputs, tool outputs, retrieved research material, model details, usage data, and related operational metadata.",e.jsx("strong",{children:" This trace content is not redacted before it is sent to Langfuse."})]}),e.jsx("p",{children:"Papers With Code is designed for questions about research literature. Do not put passwords, API keys, confidential information, health or financial data, or other sensitive personal information in research-assistant prompts."})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"2. How we use information"}),e.jsx("p",{children:"We use information to:"}),e.jsxs("ul",{children:[e.jsx("li",{children:"provide, personalize, maintain, and operate the Service;"}),e.jsx("li",{children:"authenticate users and keep accounts and the Service secure;"}),e.jsx("li",{children:"run research-assistant requests and preserve conversation history;"}),e.jsx("li",{children:"measure performance, troubleshoot failures, and improve quality;"}),e.jsx("li",{children:"review contributions, prevent abuse, and enforce applicable terms;"}),e.jsx("li",{children:"communicate with you and respond to requests; and"}),e.jsx("li",{children:"comply with law and protect users, Hugging Face, and the public."})]})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"3. How we share information"}),e.jsx("p",{children:"We may share information in these circumstances:"}),e.jsxs("ul",{children:[e.jsxs("li",{children:[e.jsx("strong",{children:"Service providers."})," Vendors process information for hosting, authentication, analytics, observability, security, and support. These include Hugging Face services, Langfuse for research-assistant tracing, Plausible for website analytics, and infrastructure providers."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Model providers."})," Research-assistant content is sent to the model provider you use, such as Hugging Face Inference Providers or OpenRouter, so it can generate a response. That provider's privacy terms also apply to its processing."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Public and shared content."})," Contributions intended for public pages are public. A chat is disclosed through the Service when you create and distribute a share link."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Legal, safety, and corporate events."})," We may disclose information when reasonably necessary to comply with law, protect rights and safety, investigate abuse, or complete a merger, acquisition, financing, or transfer of assets."]})]}),e.jsx("p",{children:"We do not sell your personal information."})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"4. Cookies and analytics"}),e.jsx("p",{children:"We use cookies and similar storage when needed for sign-in, security, preferences, and operation of the Service. We also use Plausible to understand aggregate website usage. You can control cookies through your browser, but disabling necessary cookies may prevent account features from working."})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"5. Legal bases"}),e.jsx("p",{children:"Where applicable law requires a legal basis, we process information as needed to perform our agreement with you, with your consent, to comply with legal obligations, and for legitimate interests such as operating, securing, and improving the Service. You may withdraw consent where consent is the basis for processing, without affecting earlier processing."})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"6. Retention and deletion"}),e.jsx("p",{children:"Private chats are retained until you delete them, subject to limits of 500 active chats and 100 MB of chat data per user. Archiving hides a chat and frees active-chat quota but does not delete it. You may deliberately share an unlisted snapshot; deleting its private chat removes the durable transcript, workspace reference, and share link after deletion is verified. No dedicated private-chat export format is currently offered."}),e.jsx("p",{children:"We keep information for as long as reasonably needed for the purposes described here, including providing the Service, maintaining security and audit records, resolving disputes, and meeting legal obligations. Retention periods vary by data type and service provider. You can delete individual chats in the Service. Deletion may not immediately remove information from backups, security logs, or third-party systems where limited retention is required."})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"7. Security and international transfers"}),e.jsx("p",{children:"We use reasonable administrative, technical, and organizational safeguards, but no internet service can guarantee absolute security. We and our service providers may process information in the United States and other countries, which may have different data-protection laws from your country. Where required, we use appropriate safeguards for international transfers."})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"8. Your privacy rights"}),e.jsx("p",{children:"Depending on where you live, you may have rights to access, correct, delete, or receive a copy of your personal information; object to or restrict processing; withdraw consent; or appeal a decision about a request. You may also have the right to complain to a data-protection authority. We may need to verify your identity before fulfilling a request."})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"9. Children"}),e.jsx("p",{children:"The Service is not directed to children under 13, and we do not knowingly collect personal information from children under 13. If you believe a child has provided personal information, please contact us."})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"10. Changes to this policy"}),e.jsx("p",{children:"We may update this policy as the Service changes. We will post the revised policy here and update its effective date. If a change is material, we will provide additional notice when appropriate."})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"11. Contact us"}),e.jsxs("p",{children:["For questions or privacy requests, contact"," ",e.jsx("a",{href:"mailto:privacy@huggingface.co",children:"privacy@huggingface.co"}),". Please do not include passwords, API keys, or other sensitive credentials in your message."]})]})]}));export{n as default}; +import{F as s,j as e}from"./index-hxawG6mk.js";import{f as i,D as r}from"./latexPlainText-DI8YEXVe.js";const n=()=>(s.useEffect(()=>(document.title=i("Privacy Policy"),()=>{document.title=r}),[]),e.jsxs("article",{className:"page legal-page",children:[e.jsxs("header",{className:"legal-header",children:[e.jsx("p",{className:"legal-kicker",children:"Legal"}),e.jsx("h1",{children:"Privacy Policy"}),e.jsx("p",{className:"legal-effective-date",children:"Effective August 11, 2026"})]}),e.jsx("p",{children:"This Privacy Policy explains how Hugging Face, Inc. (“Hugging Face,” “we,” or “us”) collects, uses, and shares information when you use Papers With Code, including its website, research assistant, APIs, and related services (the “Service”)."}),e.jsxs("section",{children:[e.jsx("h2",{children:"1. Information we collect"}),e.jsx("h3",{children:"Information you provide"}),e.jsxs("ul",{children:[e.jsxs("li",{children:[e.jsx("strong",{children:"Account information."})," If you sign in with Hugging Face, we receive account identifiers and profile details needed to authenticate you, such as your user ID, username, and avatar. If you request contributor access, we also receive and retain the verified email address associated with your Hugging Face account so we can review and communicate about your request."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Contributions and preferences."})," We collect information you submit or save, such as paper submissions and edits, bookmarks, display preferences, feedback, and communications with us. Material you submit to a public research page may be publicly visible."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Research assistant content."})," We collect your questions, conversation history, generated answers, citations, tool calls and results, and feedback about answers. Chats are private to your account unless you choose to create a share link; anyone with that link may be able to view the shared chat."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Provider and billing information."})," If you enable a model provider, we process the authorization or API credentials needed to make requests on your behalf. Hugging Face or another provider processes its own billing information under its terms. Papers With Code does not collect your payment-card details."]})]}),e.jsx("h3",{children:"Information collected automatically"}),e.jsx("p",{children:"We collect technical and usage information such as IP address, browser and device type, operating system, pages or features used, dates and times, referring pages, request identifiers, cookies, logs, and diagnostic data. For research-assistant requests, this may include the selected model, token and cost details, latency, errors, and other operational metadata."}),e.jsx("h3",{children:"Research assistant tracing"}),e.jsxs("p",{children:["To evaluate, debug, secure, and improve the research assistant, we use Langfuse to record traces. A trace may contain the complete text of your question and the assistant's answer, as well as tool inputs, tool outputs, retrieved research material, model details, usage data, and related operational metadata.",e.jsx("strong",{children:" This trace content is not redacted before it is sent to Langfuse."})]}),e.jsx("p",{children:"Papers With Code is designed for questions about research literature. Do not put passwords, API keys, confidential information, health or financial data, or other sensitive personal information in research-assistant prompts."})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"2. How we use information"}),e.jsx("p",{children:"We use information to:"}),e.jsxs("ul",{children:[e.jsx("li",{children:"provide, personalize, maintain, and operate the Service;"}),e.jsx("li",{children:"authenticate users and keep accounts and the Service secure;"}),e.jsx("li",{children:"run research-assistant requests and preserve conversation history;"}),e.jsx("li",{children:"measure performance, troubleshoot failures, and improve quality;"}),e.jsx("li",{children:"review contributions, prevent abuse, and enforce applicable terms;"}),e.jsx("li",{children:"communicate with you and respond to requests; and"}),e.jsx("li",{children:"comply with law and protect users, Hugging Face, and the public."})]})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"3. How we share information"}),e.jsx("p",{children:"We may share information in these circumstances:"}),e.jsxs("ul",{children:[e.jsxs("li",{children:[e.jsx("strong",{children:"Service providers."})," Vendors process information for hosting, authentication, analytics, observability, security, and support. These include Hugging Face services, Langfuse for research-assistant tracing, Plausible for website analytics, and infrastructure providers."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Model providers."})," Research-assistant content is sent to the model provider you use, such as Hugging Face Inference Providers or OpenRouter, so it can generate a response. That provider's privacy terms also apply to its processing."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Public and shared content."})," Contributions intended for public pages are public. A chat is disclosed through the Service when you create and distribute a share link."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Legal, safety, and corporate events."})," We may disclose information when reasonably necessary to comply with law, protect rights and safety, investigate abuse, or complete a merger, acquisition, financing, or transfer of assets."]})]}),e.jsx("p",{children:"We do not sell your personal information."})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"4. Cookies and analytics"}),e.jsx("p",{children:"We use cookies and similar storage when needed for sign-in, security, preferences, and operation of the Service. We also use Plausible to understand aggregate website usage. You can control cookies through your browser, but disabling necessary cookies may prevent account features from working."})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"5. Legal bases"}),e.jsx("p",{children:"Where applicable law requires a legal basis, we process information as needed to perform our agreement with you, with your consent, to comply with legal obligations, and for legitimate interests such as operating, securing, and improving the Service. You may withdraw consent where consent is the basis for processing, without affecting earlier processing."})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"6. Retention and deletion"}),e.jsx("p",{children:"Private chats are retained until you delete them, subject to limits of 500 active chats and 100 MB of chat data per user. Archiving hides a chat and frees active-chat quota but does not delete it. You may deliberately share an unlisted snapshot; deleting its private chat removes the durable transcript, workspace reference, and share link after deletion is verified. No dedicated private-chat export format is currently offered."}),e.jsx("p",{children:"We keep information for as long as reasonably needed for the purposes described here, including providing the Service, maintaining security and audit records, resolving disputes, and meeting legal obligations. Retention periods vary by data type and service provider. You can delete individual chats in the Service. Deletion may not immediately remove information from backups, security logs, or third-party systems where limited retention is required."})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"7. Security and international transfers"}),e.jsx("p",{children:"We use reasonable administrative, technical, and organizational safeguards, but no internet service can guarantee absolute security. We and our service providers may process information in the United States and other countries, which may have different data-protection laws from your country. Where required, we use appropriate safeguards for international transfers."})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"8. Your privacy rights"}),e.jsx("p",{children:"Depending on where you live, you may have rights to access, correct, delete, or receive a copy of your personal information; object to or restrict processing; withdraw consent; or appeal a decision about a request. You may also have the right to complain to a data-protection authority. We may need to verify your identity before fulfilling a request."})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"9. Children"}),e.jsx("p",{children:"The Service is not directed to children under 13, and we do not knowingly collect personal information from children under 13. If you believe a child has provided personal information, please contact us."})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"10. Changes to this policy"}),e.jsx("p",{children:"We may update this policy as the Service changes. We will post the revised policy here and update its effective date. If a change is material, we will provide additional notice when appropriate."})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"11. Contact us"}),e.jsxs("p",{children:["For questions or privacy requests, contact"," ",e.jsx("a",{href:"mailto:privacy@huggingface.co",children:"privacy@huggingface.co"}),". Please do not include passwords, API keys, or other sensitive credentials in your message."]})]})]}));export{n as default}; diff --git a/assets/RateLimitsView-BXs-74zu.js b/assets/RateLimitsView-2wnotSf7.js similarity index 87% rename from assets/RateLimitsView-BXs-74zu.js rename to assets/RateLimitsView-2wnotSf7.js index 0b86260abbbdd028a2f49b4bb46ba9a23ee70755..511486df733182dde91dcbebb65fe82740e264f4 100644 --- a/assets/RateLimitsView-BXs-74zu.js +++ b/assets/RateLimitsView-2wnotSf7.js @@ -1 +1 @@ -import{j as e,G as t}from"./index-CnBotBa4.js";import{u as s}from"./useQuery-C8pfCInN.js";const n=()=>{const i=s({queryKey:["submission-rate-limit-policy"],queryFn:()=>t.getRateLimitPolicy()}).data;return e.jsxs("div",{className:"page",style:{maxWidth:760},children:[e.jsx("h1",{children:"Submission and rate-limit policy"}),i?e.jsxs(e.Fragment,{children:[e.jsxs("p",{children:["Each account may have up to ",i.active_pending," active submissions."]}),e.jsxs("p",{children:["New submissions are limited to ",i.subject_per_hour," per account and ",i.ip_per_hour," per source network in a rolling hour."]})]}):e.jsx("p",{children:"Loading current limits…"}),e.jsx("p",{children:"Duplicate, no-op, and idempotently replayed requests do not consume creation quota."}),e.jsx("p",{children:"Rate-limited responses use HTTP 429 with Retry-After, RateLimit, and RateLimit-Policy headers."}),e.jsx("p",{children:"Good-faith contributors who are blocked should contact the Papers with Code maintainers with their Hugging Face username."})]})};export{n as default}; +import{j as e,G as t}from"./index-hxawG6mk.js";import{u as s}from"./useQuery-B7vCF2Os.js";const n=()=>{const i=s({queryKey:["submission-rate-limit-policy"],queryFn:()=>t.getRateLimitPolicy()}).data;return e.jsxs("div",{className:"page",style:{maxWidth:760},children:[e.jsx("h1",{children:"Submission and rate-limit policy"}),i?e.jsxs(e.Fragment,{children:[e.jsxs("p",{children:["Each account may have up to ",i.active_pending," active submissions."]}),e.jsxs("p",{children:["New submissions are limited to ",i.subject_per_hour," per account and ",i.ip_per_hour," per source network in a rolling hour."]})]}):e.jsx("p",{children:"Loading current limits…"}),e.jsx("p",{children:"Duplicate, no-op, and idempotently replayed requests do not consume creation quota."}),e.jsx("p",{children:"Rate-limited responses use HTTP 429 with Retry-After, RateLimit, and RateLimit-Policy headers."}),e.jsx("p",{children:"Good-faith contributors who are blocked should contact the Papers with Code maintainers with their Hugging Face username."})]})};export{n as default}; diff --git a/assets/ResearchFollowButton-CIKuncTY.js b/assets/ResearchFollowButton-uts1MEpQ.js similarity index 89% rename from assets/ResearchFollowButton-CIKuncTY.js rename to assets/ResearchFollowButton-uts1MEpQ.js index edf98c60828a338f2d58f85193112b3637c4b475..5abda0d69f98a4ea435bc7ddaf25d9b8c9d33a38 100644 --- a/assets/ResearchFollowButton-CIKuncTY.js +++ b/assets/ResearchFollowButton-uts1MEpQ.js @@ -1 +1 @@ -import{c as y,ar as F,m as N,r as S,J as L,j as e,Y as v,l as C,L as i}from"./index-CnBotBa4.js";import{u as G}from"./useQuery-C8pfCInN.js";import{u as k}from"./useMutation-YEvFXzv3.js";import{r as m}from"./research-DhkAyrPi.js";import{P as p}from"./plus-DTSO60Ls.js";const j={task:"Get new papers on this task",method:"Get new papers using this method",benchmark:"Get new results on this benchmark",author:"Get new papers by this author",organization:"Get new papers from this organization"};function R({kind:a,entityId:n}){var f;const l=y(),s=l==null?void 0:l.user,c=F(),h=N(),[x,g]=S.useState(null),u=`${a}:${n}`,d=["research-follows",s==null?void 0:s.hf_subject],r=G({queryKey:d,queryFn:m.follows,enabled:!!s}),o=((f=r.data)==null?void 0:f.some(w=>w.kind===a&&String(w.entity_id)===String(n)))??!1,t=k({mutationFn:()=>m.setFollow(a,n,!o),onSuccess:async()=>{g(o?null:u),await h.invalidateQueries({queryKey:d}),await h.invalidateQueries({queryKey:["research-feed",s==null?void 0:s.hf_subject]})}});if(!l||!s&&L())return null;if(!s)return e.jsxs("div",{className:"research-follow",children:[e.jsxs("a",{className:"research-follow-btn",href:v(c.pathname+c.search),children:[e.jsx(p,{"aria-hidden":"true"}),"Follow"]}),e.jsxs("span",{className:"research-follow-hint",children:["Sign in to ",j[a].toLowerCase(),"."]})]});const b=t.error||r.error;return e.jsxs("div",{className:"research-follow",children:[e.jsx("button",{type:"button",className:o?"research-follow-btn is-following":"research-follow-btn",disabled:r.isLoading||!!r.error||t.isPending,"aria-pressed":o,"aria-label":o?"Unfollow":"Follow",onClick:()=>t.mutate(),children:o?e.jsxs(e.Fragment,{children:[e.jsx(C,{"aria-hidden":"true"}),e.jsx("span",{className:"research-follow-label",children:"Following"}),e.jsx("span",{className:"research-follow-label-hover",children:"Unfollow"})]}):e.jsxs(e.Fragment,{children:[e.jsx(p,{"aria-hidden":"true"}),"Follow"]})}),b?e.jsx("span",{className:"research-follow-hint is-error",role:"alert",children:"Could not update follows. Please try again."}):o?x===u&&e.jsxs("span",{className:"research-follow-hint",role:"status",children:["Added to ",e.jsx(i,{to:"/following",children:"your Following feed"})," · ",e.jsx(i,{to:"/settings",children:"Manage in Settings"})]}):e.jsxs("span",{className:"research-follow-hint",children:[j[a]," in ",e.jsx(i,{to:"/following",children:"your Following feed"}),"."]})]})}export{R}; +import{c as y,ar as F,m as N,r as S,J as L,j as e,Y as v,l as C,L as i}from"./index-hxawG6mk.js";import{u as G}from"./useQuery-B7vCF2Os.js";import{u as k}from"./useMutation-gPqxjZGO.js";import{r as m}from"./research-25A5rLuK.js";import{P as p}from"./plus-C1naIkSJ.js";const j={task:"Get new papers on this task",method:"Get new papers using this method",benchmark:"Get new results on this benchmark",author:"Get new papers by this author",organization:"Get new papers from this organization"};function R({kind:a,entityId:n}){var f;const l=y(),s=l==null?void 0:l.user,c=F(),h=N(),[x,g]=S.useState(null),u=`${a}:${n}`,d=["research-follows",s==null?void 0:s.hf_subject],r=G({queryKey:d,queryFn:m.follows,enabled:!!s}),o=((f=r.data)==null?void 0:f.some(w=>w.kind===a&&String(w.entity_id)===String(n)))??!1,t=k({mutationFn:()=>m.setFollow(a,n,!o),onSuccess:async()=>{g(o?null:u),await h.invalidateQueries({queryKey:d}),await h.invalidateQueries({queryKey:["research-feed",s==null?void 0:s.hf_subject]})}});if(!l||!s&&L())return null;if(!s)return e.jsxs("div",{className:"research-follow",children:[e.jsxs("a",{className:"research-follow-btn",href:v(c.pathname+c.search),children:[e.jsx(p,{"aria-hidden":"true"}),"Follow"]}),e.jsxs("span",{className:"research-follow-hint",children:["Sign in to ",j[a].toLowerCase(),"."]})]});const b=t.error||r.error;return e.jsxs("div",{className:"research-follow",children:[e.jsx("button",{type:"button",className:o?"research-follow-btn is-following":"research-follow-btn",disabled:r.isLoading||!!r.error||t.isPending,"aria-pressed":o,"aria-label":o?"Unfollow":"Follow",onClick:()=>t.mutate(),children:o?e.jsxs(e.Fragment,{children:[e.jsx(C,{"aria-hidden":"true"}),e.jsx("span",{className:"research-follow-label",children:"Following"}),e.jsx("span",{className:"research-follow-label-hover",children:"Unfollow"})]}):e.jsxs(e.Fragment,{children:[e.jsx(p,{"aria-hidden":"true"}),"Follow"]})}),b?e.jsx("span",{className:"research-follow-hint is-error",role:"alert",children:"Could not update follows. Please try again."}):o?x===u&&e.jsxs("span",{className:"research-follow-hint",role:"status",children:["Added to ",e.jsx(i,{to:"/following",children:"your Following feed"})," · ",e.jsx(i,{to:"/settings",children:"Manage in Settings"})]}):e.jsxs("span",{className:"research-follow-hint",children:[j[a]," in ",e.jsx(i,{to:"/following",children:"your Following feed"}),"."]})]})}export{R}; diff --git a/assets/SavedPapersView-B5BI5ZMF.js b/assets/SavedPapersView-CL0ptv0l.js similarity index 88% rename from assets/SavedPapersView-B5BI5ZMF.js rename to assets/SavedPapersView-CL0ptv0l.js index 7b090d22e8c359ef920d41baca1002c274277722..e25376c49c63980611df8d22578b1414a6bf49f2 100644 --- a/assets/SavedPapersView-B5BI5ZMF.js +++ b/assets/SavedPapersView-CL0ptv0l.js @@ -1 +1 @@ -import{a as h,A as g,j as e,H as v,L as x,G as j}from"./index-CnBotBa4.js";import{p as f}from"./paperQueryKeys-BP2E-0yf.js";import{u as N}from"./useQuery-C8pfCInN.js";import{T as b,P as k}from"./components-CSFfzsKt.js";import{S as r}from"./skeleton-DuOQBmSr.js";import{A as y,a as w}from"./alert-B0qZtPeK.js";import{t as A}from"./transform-DMbrhcTx.js";import{s as B}from"./savedPapersAuth-C_nw2twk.js";import"./LatexTitle-B1D_EqzJ.js";import"./papers-DkTdvzl4.js";import"./safeExternalHref-CkBrsh84.js";const W=()=>{var c,o;const{user:t,isLoading:u}=h(),a=N({queryKey:[...f.feeds.saved],queryFn:()=>j.getBookmarks(),enabled:!!t,staleTime:30*1e3,refetchOnWindowFocus:!1}),n=a.error instanceof g&&a.error.code==="saved_papers_bucket_authorization_required",m=!!a.data&&!a.data.bucket_connected,d=()=>{window.location.assign(B())};return u?e.jsxs("div",{className:"page",children:[e.jsx(r,{className:"h-10 w-1/3 mb-4"}),e.jsx(r,{className:"h-6 w-1/2 mb-8"})]}):t?e.jsxs("div",{className:"page",children:[e.jsx("div",{className:"feed-header",children:e.jsxs("div",{children:[e.jsxs("h1",{className:"feed-title",children:["Saved ",e.jsx("em",{children:"Papers"})]}),e.jsxs("div",{className:"feed-subtitle",children:[(c=a.data)!=null&&c.count?`${a.data.count.toLocaleString()} saved · grouped by domain`:"Your bookmarked papers, grouped by domain.",(o=a.data)!=null&&o.bucket_connected?e.jsxs(e.Fragment,{children:[" · ",e.jsx("a",{href:`https://huggingface.co/buckets/${t.username}/pwc-saved-papers`,target:"_blank",rel:"noopener noreferrer",children:"Open your Hugging Face Bucket"})]}):null]})]})}),n?e.jsxs("div",{className:"saved-bucket-migration",children:[e.jsx("p",{children:"Your saved papers are still safe in Papers With Code. Approve Bucket access to copy them into a private Hugging Face Bucket that belongs to you."}),e.jsx("button",{type:"button",className:"hf-signin-btn",onClick:d,children:"Approve and migrate saved papers"})]}):a.error?e.jsx(y,{variant:"destructive",className:"mb-4",children:e.jsx(w,{children:"Failed to load your saved papers. Please try again."})}):null,m?e.jsxs("div",{className:"saved-bucket-migration",children:[e.jsxs("p",{children:[a.data.count?`Your ${a.data.count.toLocaleString()} saved ${a.data.count===1?"paper is":"papers are"} still available below. `:"When you save your first paper, ","Approve Bucket access to copy saved papers into a private Hugging Face Bucket that belongs to you. The existing data is kept until the copy is verified."]}),e.jsx("button",{type:"button",className:"hf-signin-btn",onClick:d,children:a.data.count?"Approve and migrate saved papers":"Use a Hugging Face Bucket"})]}):null,n||a.error?null:a.isLoading?e.jsx("div",{className:"paper-list",children:Array.from({length:4}).map((i,s)=>e.jsxs("div",{className:"paper-card",children:[e.jsx(r,{className:"h-[220px] w-[160px]"}),e.jsxs("div",{className:"paper-body",style:{flex:1,gap:12},children:[e.jsx(r,{className:"h-6 w-3/4"}),e.jsx(r,{className:"h-4 w-1/2"}),e.jsx(r,{className:"h-12 w-full"})]})]},s))}):!a.data||a.data.count===0?e.jsxs("div",{className:"no-results",children:["No saved papers yet."," ",e.jsx(x,{to:"/papers",className:"sidebar-link",style:{display:"inline"},children:"Browse papers →"})]}):a.data.areas.map(i=>e.jsxs("section",{className:"saved-area-section",children:[e.jsx("h2",{className:"saved-area-heading",children:i.name}),i.tasks.map(s=>{const l=s.papers.length;return e.jsxs("div",{className:"saved-task-block",children:[e.jsxs("div",{className:"saved-task-row",children:[s.slug?e.jsx(b,{slug:s.slug,label:s.name}):e.jsx("span",{className:"tag-chip",style:{background:"var(--surface)"},children:s.name}),e.jsxs("span",{className:"saved-task-count",children:[l," ",l===1?"paper":"papers"]})]}),e.jsx("div",{className:"paper-list",children:s.papers.map(p=>e.jsx(k,{paper:A(p),rank:1},p.id))})]},`task-${i.id??"other"}-${s.id??"untagged"}`)})]},`area-${i.id??"other"}`))]}):e.jsxs("div",{className:"page",children:[e.jsx("div",{className:"feed-header",children:e.jsxs("div",{children:[e.jsxs("h1",{className:"feed-title",children:["Saved ",e.jsx("em",{children:"Papers"})]}),e.jsx("div",{className:"feed-subtitle",children:"Sign in with Hugging Face to save papers and revisit them later."})]})}),e.jsx("div",{className:"saved-signin-panel",children:e.jsx(v,{returnTo:"/saved"})})]})};export{W as default}; +import{a as h,A as g,j as e,H as v,L as x,G as j}from"./index-hxawG6mk.js";import{p as f}from"./paperQueryKeys-BP2E-0yf.js";import{u as N}from"./useQuery-B7vCF2Os.js";import{T as b,P as k}from"./components-Djdw_Z-e.js";import{S as r}from"./skeleton-CRfsRMNe.js";import{A as y,a as w}from"./alert-2LCyXuCE.js";import{t as A}from"./transform-DfrN0kQW.js";import{s as B}from"./savedPapersAuth-BIdugktw.js";import"./LatexTitle-QTkECjbh.js";import"./papers-B0ysePyJ.js";import"./safeExternalHref-CkBrsh84.js";const W=()=>{var c,o;const{user:t,isLoading:u}=h(),a=N({queryKey:[...f.feeds.saved],queryFn:()=>j.getBookmarks(),enabled:!!t,staleTime:30*1e3,refetchOnWindowFocus:!1}),n=a.error instanceof g&&a.error.code==="saved_papers_bucket_authorization_required",m=!!a.data&&!a.data.bucket_connected,d=()=>{window.location.assign(B())};return u?e.jsxs("div",{className:"page",children:[e.jsx(r,{className:"h-10 w-1/3 mb-4"}),e.jsx(r,{className:"h-6 w-1/2 mb-8"})]}):t?e.jsxs("div",{className:"page",children:[e.jsx("div",{className:"feed-header",children:e.jsxs("div",{children:[e.jsxs("h1",{className:"feed-title",children:["Saved ",e.jsx("em",{children:"Papers"})]}),e.jsxs("div",{className:"feed-subtitle",children:[(c=a.data)!=null&&c.count?`${a.data.count.toLocaleString()} saved · grouped by domain`:"Your bookmarked papers, grouped by domain.",(o=a.data)!=null&&o.bucket_connected?e.jsxs(e.Fragment,{children:[" · ",e.jsx("a",{href:`https://huggingface.co/buckets/${t.username}/pwc-saved-papers`,target:"_blank",rel:"noopener noreferrer",children:"Open your Hugging Face Bucket"})]}):null]})]})}),n?e.jsxs("div",{className:"saved-bucket-migration",children:[e.jsx("p",{children:"Your saved papers are still safe in Papers With Code. Approve Bucket access to copy them into a private Hugging Face Bucket that belongs to you."}),e.jsx("button",{type:"button",className:"hf-signin-btn",onClick:d,children:"Approve and migrate saved papers"})]}):a.error?e.jsx(y,{variant:"destructive",className:"mb-4",children:e.jsx(w,{children:"Failed to load your saved papers. Please try again."})}):null,m?e.jsxs("div",{className:"saved-bucket-migration",children:[e.jsxs("p",{children:[a.data.count?`Your ${a.data.count.toLocaleString()} saved ${a.data.count===1?"paper is":"papers are"} still available below. `:"When you save your first paper, ","Approve Bucket access to copy saved papers into a private Hugging Face Bucket that belongs to you. The existing data is kept until the copy is verified."]}),e.jsx("button",{type:"button",className:"hf-signin-btn",onClick:d,children:a.data.count?"Approve and migrate saved papers":"Use a Hugging Face Bucket"})]}):null,n||a.error?null:a.isLoading?e.jsx("div",{className:"paper-list",children:Array.from({length:4}).map((i,s)=>e.jsxs("div",{className:"paper-card",children:[e.jsx(r,{className:"h-[220px] w-[160px]"}),e.jsxs("div",{className:"paper-body",style:{flex:1,gap:12},children:[e.jsx(r,{className:"h-6 w-3/4"}),e.jsx(r,{className:"h-4 w-1/2"}),e.jsx(r,{className:"h-12 w-full"})]})]},s))}):!a.data||a.data.count===0?e.jsxs("div",{className:"no-results",children:["No saved papers yet."," ",e.jsx(x,{to:"/papers",className:"sidebar-link",style:{display:"inline"},children:"Browse papers →"})]}):a.data.areas.map(i=>e.jsxs("section",{className:"saved-area-section",children:[e.jsx("h2",{className:"saved-area-heading",children:i.name}),i.tasks.map(s=>{const l=s.papers.length;return e.jsxs("div",{className:"saved-task-block",children:[e.jsxs("div",{className:"saved-task-row",children:[s.slug?e.jsx(b,{slug:s.slug,label:s.name}):e.jsx("span",{className:"tag-chip",style:{background:"var(--surface)"},children:s.name}),e.jsxs("span",{className:"saved-task-count",children:[l," ",l===1?"paper":"papers"]})]}),e.jsx("div",{className:"paper-list",children:s.papers.map(p=>e.jsx(k,{paper:A(p),rank:1},p.id))})]},`task-${i.id??"other"}-${s.id??"untagged"}`)})]},`area-${i.id??"other"}`))]}):e.jsxs("div",{className:"page",children:[e.jsx("div",{className:"feed-header",children:e.jsxs("div",{children:[e.jsxs("h1",{className:"feed-title",children:["Saved ",e.jsx("em",{children:"Papers"})]}),e.jsx("div",{className:"feed-subtitle",children:"Sign in with Hugging Face to save papers and revisit them later."})]})}),e.jsx("div",{className:"saved-signin-panel",children:e.jsx(v,{returnTo:"/saved"})})]})};export{W as default}; diff --git a/assets/SearchOverlay-BUsQ4KSW.js b/assets/SearchOverlay-C_z_mnYo.js similarity index 93% rename from assets/SearchOverlay-BUsQ4KSW.js rename to assets/SearchOverlay-C_z_mnYo.js index f2165f3f892290821367c87f641cd27672f3ec96..a3312f8332766a5b1b1ca55b47f21d59939ffbaf 100644 --- a/assets/SearchOverlay-BUsQ4KSW.js +++ b/assets/SearchOverlay-C_z_mnYo.js @@ -1 +1 @@ -import{r as C,b as Q,F as S,i as D,j as e}from"./index-CnBotBa4.js";import{p as K}from"./paperQueryKeys-BP2E-0yf.js";import{u}from"./useQuery-C8pfCInN.js";import{L as $}from"./LatexTitle-B1D_EqzJ.js";import{c as j}from"./catalog-mND3MerS.js";import{p as L}from"./papers-DkTdvzl4.js";import{u as M}from"./useDebounce-Bw5By0Qg.js";import{c as I,h as z,d as B}from"./transform-DMbrhcTx.js";const H=10,O=350,y=3,ss=({open:t,onClose:i})=>{var E,F,q,w;const v=C.useRef(null),T=Q(),[r,A]=S.useState(""),a=M(r,O),p=r.trim(),c=a.length>=y,x=D();C.useEffect(()=>{var n;if(!t)return;(n=v.current)==null||n.focus();const s=g=>{g.key==="Escape"&&(g.preventDefault(),g.stopPropagation(),i())};return window.addEventListener("keydown",s,!0),()=>window.removeEventListener("keydown",s,!0)},[t,i]);const f=u({queryKey:[...K.feeds.searchOverlay,a],queryFn:()=>L.search(a,1,H),enabled:t&&c,staleTime:6e4,retry:!1}),k=u({queryKey:["search-tasks",a],queryFn:()=>j.listTasks({q:a,page_size:6}),enabled:t&&c,staleTime:6e4,retry:!1}),N=u({queryKey:["search-methods",a],queryFn:()=>j.listMethods({q:a,page_size:6}),enabled:t&&c,staleTime:6e4,retry:!1}),b=u({queryKey:["search-benchmarks",a],queryFn:()=>j.listDatasets({q:a,page_size:6}),enabled:t&&c,staleTime:6e4,retry:!1});if(!t)return null;const o=((E=k.data)==null?void 0:E.results)||[],h=((F=N.data)==null?void 0:F.results)||[],d=((q=b.data)==null?void 0:q.results)||[],m=((w=f.data)==null?void 0:w.results)||[],P=f.isFetching||k.isFetching||N.isFetching||b.isFetching,R=o.length||m.length||h.length||d.length,l=s=>{i(),T(s)},_=()=>{const s=r.trim();s&&l(`/chat?q=${encodeURIComponent(s)}`)};return e.jsx("div",{className:"search-overlay",onClick:i,children:e.jsxs("div",{className:"search-modal",onClick:s=>s.stopPropagation(),children:[e.jsx("input",{ref:v,className:"search-modal-input",placeholder:"Search papers, tasks, methods, or benchmarks…",value:r,onChange:s=>A(s.target.value),onKeyDown:s=>{x&&s.key==="Enter"&&(s.preventDefault(),_())}}),e.jsxs("div",{className:"search-results",children:[x&&r.trim()&&e.jsxs("button",{type:"button",className:"search-ask-row",onClick:_,children:[e.jsx("span",{className:"search-ask-chip",children:"assistant"}),e.jsxs("span",{className:"search-ask-text",children:["Ask: “",r.trim(),"”"]}),e.jsx("kbd",{children:"↵"})]}),!a&&e.jsxs("div",{className:"search-empty",children:["Try “diffusion”, “object detection”, or an arXiv id.",x&&e.jsx("span",{className:"search-empty-sub",children:"Press Enter to ask the assistant"})]}),a&&!c&&e.jsxs("div",{className:"search-empty",children:["Keep typing: results appear from ",y," characters."]}),c&&!P&&!R&&e.jsxs("div",{className:"search-empty",children:['No matches for "',r,'"']}),o.length>0&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"search-section-label",children:["Tasks · ",o.length]}),o.map(s=>{const n=I(z(s.slug||""));return e.jsxs("div",{className:"search-result-tag",onClick:()=>l(`/tasks/${s.slug}`),children:[e.jsx("span",{className:"dot",style:{width:6,height:6,borderRadius:"50%",background:n.dot}}),e.jsx("span",{className:"name",children:B(s.name,s.slug)}),s.paper_count!=null&&e.jsxs("span",{className:"count",children:[s.paper_count," papers"]})]},s.id)})]}),h.length>0&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"search-section-label",children:["Methods · ",h.length]}),h.map(s=>e.jsxs("div",{className:"search-result-tag",onClick:()=>l(`/methods/${s.slug||s.id}`),children:[e.jsx("span",{style:{fontFamily:"var(--mono)",fontWeight:600},children:s.name}),s.paper_count!=null&&e.jsxs("span",{className:"count",children:[s.paper_count," papers"]})]},s.id))]}),d.length>0&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"search-section-label",children:["Benchmarks · ",d.length]}),d.map(s=>e.jsxs("div",{className:"search-result-tag",onClick:()=>l(`/benchmark/${s.slug||s.id}`),children:[e.jsx("span",{className:"name",children:s.name}),s.paper_count!=null&&s.paper_count>0&&e.jsxs("span",{className:"count",children:[s.paper_count," entries"]})]},s.id))]}),m.length>0&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"search-section-label",children:["Papers · ",m.length]}),m.map(s=>{var n;return e.jsxs("div",{className:"search-result",onClick:()=>l(`/paper/${s.arxiv_id||s.id}`),children:[e.jsx("div",{className:"search-result-title",children:e.jsx($,{title:s.title})}),e.jsxs("div",{className:"search-result-meta",children:[e.jsx("span",{children:s.arxiv_id?`arXiv:${s.arxiv_id}`:"External resource"}),((n=s.authors)==null?void 0:n[0])&&e.jsxs(e.Fragment,{children:[e.jsx("span",{children:"·"}),e.jsxs("span",{children:[s.authors[0],s.authors.length>1?" et al.":""]})]}),s.citation_count!=null&&e.jsxs(e.Fragment,{children:[e.jsx("span",{children:"·"}),e.jsxs("span",{children:["↑ ",s.citation_count.toLocaleString()]})]})]})]},s.id)})]}),p.length>=y&&e.jsxs("button",{type:"button",className:"search-view-all-row",onClick:()=>l(`/papers?search=${encodeURIComponent(p)}`),children:["View all paper results for “",p,"”"]})]})]})})};export{ss as default}; +import{r as C,b as Q,F as S,i as D,j as e}from"./index-hxawG6mk.js";import{p as K}from"./paperQueryKeys-BP2E-0yf.js";import{u}from"./useQuery-B7vCF2Os.js";import{L as $}from"./LatexTitle-QTkECjbh.js";import{c as j}from"./catalog-ePebz7GX.js";import{p as L}from"./papers-B0ysePyJ.js";import{u as M}from"./useDebounce-lGdHpcfR.js";import{c as I,h as z,d as B}from"./transform-DfrN0kQW.js";const H=10,O=350,y=3,ss=({open:t,onClose:i})=>{var E,F,q,w;const v=C.useRef(null),T=Q(),[r,A]=S.useState(""),a=M(r,O),p=r.trim(),c=a.length>=y,x=D();C.useEffect(()=>{var n;if(!t)return;(n=v.current)==null||n.focus();const s=g=>{g.key==="Escape"&&(g.preventDefault(),g.stopPropagation(),i())};return window.addEventListener("keydown",s,!0),()=>window.removeEventListener("keydown",s,!0)},[t,i]);const f=u({queryKey:[...K.feeds.searchOverlay,a],queryFn:()=>L.search(a,1,H),enabled:t&&c,staleTime:6e4,retry:!1}),k=u({queryKey:["search-tasks",a],queryFn:()=>j.listTasks({q:a,page_size:6}),enabled:t&&c,staleTime:6e4,retry:!1}),N=u({queryKey:["search-methods",a],queryFn:()=>j.listMethods({q:a,page_size:6}),enabled:t&&c,staleTime:6e4,retry:!1}),b=u({queryKey:["search-benchmarks",a],queryFn:()=>j.listDatasets({q:a,page_size:6}),enabled:t&&c,staleTime:6e4,retry:!1});if(!t)return null;const o=((E=k.data)==null?void 0:E.results)||[],h=((F=N.data)==null?void 0:F.results)||[],d=((q=b.data)==null?void 0:q.results)||[],m=((w=f.data)==null?void 0:w.results)||[],P=f.isFetching||k.isFetching||N.isFetching||b.isFetching,R=o.length||m.length||h.length||d.length,l=s=>{i(),T(s)},_=()=>{const s=r.trim();s&&l(`/chat?q=${encodeURIComponent(s)}`)};return e.jsx("div",{className:"search-overlay",onClick:i,children:e.jsxs("div",{className:"search-modal",onClick:s=>s.stopPropagation(),children:[e.jsx("input",{ref:v,className:"search-modal-input",placeholder:"Search papers, tasks, methods, or benchmarks…",value:r,onChange:s=>A(s.target.value),onKeyDown:s=>{x&&s.key==="Enter"&&(s.preventDefault(),_())}}),e.jsxs("div",{className:"search-results",children:[x&&r.trim()&&e.jsxs("button",{type:"button",className:"search-ask-row",onClick:_,children:[e.jsx("span",{className:"search-ask-chip",children:"assistant"}),e.jsxs("span",{className:"search-ask-text",children:["Ask: “",r.trim(),"”"]}),e.jsx("kbd",{children:"↵"})]}),!a&&e.jsxs("div",{className:"search-empty",children:["Try “diffusion”, “object detection”, or an arXiv id.",x&&e.jsx("span",{className:"search-empty-sub",children:"Press Enter to ask the assistant"})]}),a&&!c&&e.jsxs("div",{className:"search-empty",children:["Keep typing: results appear from ",y," characters."]}),c&&!P&&!R&&e.jsxs("div",{className:"search-empty",children:['No matches for "',r,'"']}),o.length>0&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"search-section-label",children:["Tasks · ",o.length]}),o.map(s=>{const n=I(z(s.slug||""));return e.jsxs("div",{className:"search-result-tag",onClick:()=>l(`/tasks/${s.slug}`),children:[e.jsx("span",{className:"dot",style:{width:6,height:6,borderRadius:"50%",background:n.dot}}),e.jsx("span",{className:"name",children:B(s.name,s.slug)}),s.paper_count!=null&&e.jsxs("span",{className:"count",children:[s.paper_count," papers"]})]},s.id)})]}),h.length>0&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"search-section-label",children:["Methods · ",h.length]}),h.map(s=>e.jsxs("div",{className:"search-result-tag",onClick:()=>l(`/methods/${s.slug||s.id}`),children:[e.jsx("span",{style:{fontFamily:"var(--mono)",fontWeight:600},children:s.name}),s.paper_count!=null&&e.jsxs("span",{className:"count",children:[s.paper_count," papers"]})]},s.id))]}),d.length>0&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"search-section-label",children:["Benchmarks · ",d.length]}),d.map(s=>e.jsxs("div",{className:"search-result-tag",onClick:()=>l(`/benchmark/${s.slug||s.id}`),children:[e.jsx("span",{className:"name",children:s.name}),s.paper_count!=null&&s.paper_count>0&&e.jsxs("span",{className:"count",children:[s.paper_count," entries"]})]},s.id))]}),m.length>0&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"search-section-label",children:["Papers · ",m.length]}),m.map(s=>{var n;return e.jsxs("div",{className:"search-result",onClick:()=>l(`/paper/${s.arxiv_id||s.id}`),children:[e.jsx("div",{className:"search-result-title",children:e.jsx($,{title:s.title})}),e.jsxs("div",{className:"search-result-meta",children:[e.jsx("span",{children:s.arxiv_id?`arXiv:${s.arxiv_id}`:"External resource"}),((n=s.authors)==null?void 0:n[0])&&e.jsxs(e.Fragment,{children:[e.jsx("span",{children:"·"}),e.jsxs("span",{children:[s.authors[0],s.authors.length>1?" et al.":""]})]}),s.citation_count!=null&&e.jsxs(e.Fragment,{children:[e.jsx("span",{children:"·"}),e.jsxs("span",{children:["↑ ",s.citation_count.toLocaleString()]})]})]})]},s.id)})]}),p.length>=y&&e.jsxs("button",{type:"button",className:"search-view-all-row",onClick:()=>l(`/papers?search=${encodeURIComponent(p)}`),children:["View all paper results for “",p,"”"]})]})]})})};export{ss as default}; diff --git a/assets/SettingsView-D9lZ__FE.js b/assets/SettingsView-Es37mows.js similarity index 97% rename from assets/SettingsView-D9lZ__FE.js rename to assets/SettingsView-Es37mows.js index 63431451e11c69c32da2dabc488aa7f9e199ffd3..b65a6dd8d6f56711bfd7ce682558b4ebdfd281a4 100644 --- a/assets/SettingsView-D9lZ__FE.js +++ b/assets/SettingsView-Es37mows.js @@ -1,4 +1,4 @@ -import{g as f,a as B,m as Y,j as e,L as Q,H as w,Y as le,r as re,k as oe,as as ce,i as de,F as C,A as ee}from"./index-CnBotBa4.js";import{u as P}from"./useQuery-C8pfCInN.js";import{u as N}from"./useMutation-YEvFXzv3.js";import{r as O}from"./research-DhkAyrPi.js";import{S as U}from"./switch-D71Zro87.js";import{A as he,T as ue}from"./trophy-CO9jGMPk.js";import{c as k}from"./chat-B0u4w1H2.js";import{f as ge,D as me}from"./latexPlainText-DI8YEXVe.js";import{a as pe,u as ye,r as xe,O as H}from"./openrouter-BMS0vcTS.js";import{E as J}from"./external-link-C_QBJuYU.js";import"./index-C2-TgiAT.js";/** +import{g as f,a as B,m as Y,j as e,L as Q,H as w,Y as le,r as re,k as oe,as as ce,i as de,F as C,A as ee}from"./index-hxawG6mk.js";import{u as P}from"./useQuery-B7vCF2Os.js";import{u as N}from"./useMutation-gPqxjZGO.js";import{r as O}from"./research-25A5rLuK.js";import{S as U}from"./switch-BC-W3U4C.js";import{A as he,T as ue}from"./trophy-DQthGapR.js";import{c as k}from"./chat-DJiy7CbR.js";import{f as ge,D as me}from"./latexPlainText-DI8YEXVe.js";import{a as pe,u as ye,r as xe,O as H}from"./openrouter-CJoBewhx.js";import{E as J}from"./external-link-CWzYMTrZ.js";import"./index-DvHdqmQp.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/SharedChatView-BfRtRLJI.js b/assets/SharedChatView-BxIYSQhH.js similarity index 83% rename from assets/SharedChatView-BfRtRLJI.js rename to assets/SharedChatView-BxIYSQhH.js index 556d83b03c98478e12a72d51da6c986bf3f69d0d..bcc617b15b8f4cf245cc97ee3e43b9e0a3c68148 100644 --- a/assets/SharedChatView-BfRtRLJI.js +++ b/assets/SharedChatView-BxIYSQhH.js @@ -1 +1 @@ -import{u as f,b as x,r as h,j as e,f as g}from"./index-CnBotBa4.js";import{u as v}from"./useQuery-C8pfCInN.js";import{A as j,a as b,C as y,U as S,b as k}from"./ArtifactWorkspace-C7nTcvIL.js";import{C as m,d as w,p as N,q as C,g as q}from"./chatLaunch-CptFdc8a.js";/* empty css */import"./hover-card-CkboGKdu.js";import"./github-D6RT7m6V.js";import"./github-DFkgF81-.js";import"./catalog-mND3MerS.js";import"./PaperPreviewLink-ChJBLunV.js";import"./index-DxRopg3G.js";import"./index-DLNxIk77.js";import"./katex-DkKDou_j.js";import"./paperQueryKeys-BP2E-0yf.js";import"./papers-DkTdvzl4.js";import"./useMutation-YEvFXzv3.js";import"./chat-B0u4w1H2.js";import"./copy-0hFmISJO.js";import"./file-text-BZVTM8hV.js";import"./external-link-C_QBJuYU.js";import"./chevron-down-IUgkNqZp.js";const _=({detail:i})=>{const[d,l]=h.useState(()=>N(i)),p=h.useMemo(()=>{const t={};for(const c of d)for(const n of c.blocks??[])if(n.kind==="tool")for(const r of n.results??[])t[r.route_id]=r;return t},[d]),u=(t,c)=>{l(n=>n.map(r=>{var a;return r.id!==t?r:{...r,blocks:(a=r.blocks)==null?void 0:a.map((s,o)=>o===c&&(s.kind==="reasoning"||s.kind==="tool")?{...s,open:!s.open}:s)}}))};return e.jsx("div",{className:"shared-chat-transcript",children:d.map(t=>t.role==="user"?e.jsx(S,{id:t.id,text:t.text??"",paperMentions:t.paperMentions??[],paperSelection:t.paperSelection},t.id):e.jsx(k,{msg:t,papers:p,onToggleBlock:u},t.id))})},D=()=>{const{shareId:i=""}=f(),d=x(),l=g(),[p,u]=h.useState(60),t=v({queryKey:["shared-chat",i],queryFn:()=>q(i),retry:(r,a)=>!(a instanceof m&&a.status===404)&&r<1});h.useEffect(()=>{const r=document.title,a=document.head.querySelector('meta[name="robots"]'),s=a==null?void 0:a.content,o=a??document.createElement("meta");return o.name="robots",o.content="noindex,nofollow",a||document.head.appendChild(o),document.title="Shared conversation",()=>{document.title=r,a?a.content=s??"":o.remove()}},[]),h.useLayoutEffect(()=>{const r=document.querySelector(".app-header");if(!r)return;const a=()=>u(r.offsetHeight);a();const s=new ResizeObserver(a);return s.observe(r),()=>s.disconnect()},[]);const c=r=>{C(r,void 0,{autoSend:!1}),d("/chat")},n=t.error instanceof m&&t.error.status===404;return t.isLoading?e.jsxs("div",{className:"shared-chat-state",role:"status",children:[e.jsx(w,{})," Loading shared conversation…"]}):n?e.jsxs("div",{className:"shared-chat-state shared-chat-not-found",children:[e.jsx("h1",{children:"Shared conversation not found"}),e.jsx("p",{children:"This link is invalid or is no longer available."})]}):t.isError||!t.data?e.jsxs("div",{className:"shared-chat-state",role:"alert",children:[e.jsx("h1",{children:"Couldn’t load this conversation"}),e.jsx("p",{children:"Please check your connection and try again."}),e.jsx("button",{type:"button",onClick:()=>void t.refetch(),children:"Try again"})]}):e.jsx(j,{workspaceKey:`share:${i}:${t.data.updated_at}`,autoOpenOnMount:!0,children:e.jsxs("div",{className:"shared-chat-page",style:{height:`calc(100dvh - ${p}px)`},children:[e.jsxs("div",{className:"shared-chat-heading",children:[e.jsx("h1",{children:"Shared conversation"}),l&&e.jsx("span",{className:"chat-staging-badge",children:"Staging"})]}),e.jsx(b,{variant:"shared",children:e.jsxs("div",{className:"shared-chat-content","data-testid":"shared-conversation-pane",children:[e.jsx(_,{detail:t.data},t.data.updated_at),t.data.model_label&&e.jsxs("div",{className:"shared-chat-attribution",children:[e.jsxs("span",{children:["Generated with ",t.data.model_label]}),t.data.model_provider==="huggingface"&&e.jsxs("span",{children:["Powered by ",e.jsx("span",{"aria-hidden":"true",children:"🤗"})," ",e.jsx("a",{href:"https://huggingface.co/docs/inference-providers/en/index",target:"_blank",rel:"noreferrer",children:"Inference Providers"})]}),t.data.model_provider==="openrouter"&&e.jsxs("span",{children:["Powered by ",e.jsx("a",{href:"https://openrouter.ai",target:"_blank",rel:"noreferrer",children:"OpenRouter"})]}),t.data.model_provider==="openai"&&e.jsx("span",{children:"Powered by OpenAI"})]}),e.jsxs("section",{className:"shared-chat-fresh","aria-labelledby":"shared-chat-fresh-title",children:[e.jsx("h2",{id:"shared-chat-fresh-title",children:"Start a new conversation"}),e.jsx("p",{children:"Your new question starts with an empty context."}),l&&e.jsxs("div",{className:"shared-chat-access-note",role:"note",children:[e.jsx("strong",{children:"Limited staging preview."})," Starting a chat is available only to approved Hugging Face users."]}),e.jsx(y,{onSend:r=>c(r.text),placeholder:"Ask a new research question…"})]})]})})]})})};export{D as default}; +import{u as f,b as x,r as h,j as e,f as g}from"./index-hxawG6mk.js";import{u as v}from"./useQuery-B7vCF2Os.js";import{A as j,a as b,C as y,U as S,b as k}from"./ArtifactWorkspace-CCP7C86X.js";import{C as m,d as w,p as N,q as C,g as q}from"./chatLaunch-DrTVeX4t.js";/* empty css */import"./hover-card-DEHIu6q-.js";import"./github-Bf2b_Y1p.js";import"./github-C-cqt6uw.js";import"./catalog-ePebz7GX.js";import"./PaperPreviewLink-BJhSzNVs.js";import"./index-CaRYlo5c.js";import"./index-Ddr0k9KU.js";import"./katex-DkKDou_j.js";import"./paperQueryKeys-BP2E-0yf.js";import"./papers-B0ysePyJ.js";import"./useMutation-gPqxjZGO.js";import"./chat-DJiy7CbR.js";import"./copy-B2wC0pMM.js";import"./file-text-DIeliPoM.js";import"./external-link-CWzYMTrZ.js";import"./chevron-down-dhq7I8yA.js";const _=({detail:i})=>{const[d,l]=h.useState(()=>N(i)),p=h.useMemo(()=>{const t={};for(const c of d)for(const n of c.blocks??[])if(n.kind==="tool")for(const r of n.results??[])t[r.route_id]=r;return t},[d]),u=(t,c)=>{l(n=>n.map(r=>{var a;return r.id!==t?r:{...r,blocks:(a=r.blocks)==null?void 0:a.map((s,o)=>o===c&&(s.kind==="reasoning"||s.kind==="tool")?{...s,open:!s.open}:s)}}))};return e.jsx("div",{className:"shared-chat-transcript",children:d.map(t=>t.role==="user"?e.jsx(S,{id:t.id,text:t.text??"",paperMentions:t.paperMentions??[],paperSelection:t.paperSelection},t.id):e.jsx(k,{msg:t,papers:p,onToggleBlock:u},t.id))})},D=()=>{const{shareId:i=""}=f(),d=x(),l=g(),[p,u]=h.useState(60),t=v({queryKey:["shared-chat",i],queryFn:()=>q(i),retry:(r,a)=>!(a instanceof m&&a.status===404)&&r<1});h.useEffect(()=>{const r=document.title,a=document.head.querySelector('meta[name="robots"]'),s=a==null?void 0:a.content,o=a??document.createElement("meta");return o.name="robots",o.content="noindex,nofollow",a||document.head.appendChild(o),document.title="Shared conversation",()=>{document.title=r,a?a.content=s??"":o.remove()}},[]),h.useLayoutEffect(()=>{const r=document.querySelector(".app-header");if(!r)return;const a=()=>u(r.offsetHeight);a();const s=new ResizeObserver(a);return s.observe(r),()=>s.disconnect()},[]);const c=r=>{C(r,void 0,{autoSend:!1}),d("/chat")},n=t.error instanceof m&&t.error.status===404;return t.isLoading?e.jsxs("div",{className:"shared-chat-state",role:"status",children:[e.jsx(w,{})," Loading shared conversation…"]}):n?e.jsxs("div",{className:"shared-chat-state shared-chat-not-found",children:[e.jsx("h1",{children:"Shared conversation not found"}),e.jsx("p",{children:"This link is invalid or is no longer available."})]}):t.isError||!t.data?e.jsxs("div",{className:"shared-chat-state",role:"alert",children:[e.jsx("h1",{children:"Couldn’t load this conversation"}),e.jsx("p",{children:"Please check your connection and try again."}),e.jsx("button",{type:"button",onClick:()=>void t.refetch(),children:"Try again"})]}):e.jsx(j,{workspaceKey:`share:${i}:${t.data.updated_at}`,autoOpenOnMount:!0,children:e.jsxs("div",{className:"shared-chat-page",style:{height:`calc(100dvh - ${p}px)`},children:[e.jsxs("div",{className:"shared-chat-heading",children:[e.jsx("h1",{children:"Shared conversation"}),l&&e.jsx("span",{className:"chat-staging-badge",children:"Staging"})]}),e.jsx(b,{variant:"shared",children:e.jsxs("div",{className:"shared-chat-content","data-testid":"shared-conversation-pane",children:[e.jsx(_,{detail:t.data},t.data.updated_at),t.data.model_label&&e.jsxs("div",{className:"shared-chat-attribution",children:[e.jsxs("span",{children:["Generated with ",t.data.model_label]}),t.data.model_provider==="huggingface"&&e.jsxs("span",{children:["Powered by ",e.jsx("span",{"aria-hidden":"true",children:"🤗"})," ",e.jsx("a",{href:"https://huggingface.co/docs/inference-providers/en/index",target:"_blank",rel:"noreferrer",children:"Inference Providers"})]}),t.data.model_provider==="openrouter"&&e.jsxs("span",{children:["Powered by ",e.jsx("a",{href:"https://openrouter.ai",target:"_blank",rel:"noreferrer",children:"OpenRouter"})]}),t.data.model_provider==="openai"&&e.jsx("span",{children:"Powered by OpenAI"})]}),e.jsxs("section",{className:"shared-chat-fresh","aria-labelledby":"shared-chat-fresh-title",children:[e.jsx("h2",{id:"shared-chat-fresh-title",children:"Start a new conversation"}),e.jsx("p",{children:"Your new question starts with an empty context."}),l&&e.jsxs("div",{className:"shared-chat-access-note",role:"note",children:[e.jsx("strong",{children:"Limited staging preview."})," Starting a chat is available only to approved Hugging Face users."]}),e.jsx(y,{onSend:r=>c(r.text),placeholder:"Ask a new research question…"})]})]})})]})})};export{D as default}; diff --git a/assets/SignInToEditDialog-Nxaw2Fu9.js b/assets/SignInToEditDialog-4j2lLlXQ.js similarity index 95% rename from assets/SignInToEditDialog-Nxaw2Fu9.js rename to assets/SignInToEditDialog-4j2lLlXQ.js index 963448fc17c5fc260ce67526e89d27aaf731f3be..007fdc7eaa4f632ec1947f5b5ecfb17b4d30caba 100644 --- a/assets/SignInToEditDialog-Nxaw2Fu9.js +++ b/assets/SignInToEditDialog-4j2lLlXQ.js @@ -1,4 +1,4 @@ -import{g as be,r as a,j as e,a5 as je,x as fe,a6 as ye,h as Ne,o as we,X as Se,l as _e,H as ke}from"./index-CnBotBa4.js";import{B as P}from"./button-DNii_czO.js";import{I as u}from"./input-fzMY4SDb.js";import{T as Ce}from"./textarea-D8TA8f9X.js";import{S as se}from"./searchable-select-Dky9Eonk.js";import{D as ie,a as oe,b as le,c as ce,d as de,e as De}from"./dialog-mXYRHqz9.js";import{u as Ie}from"./useMutation-YEvFXzv3.js";import{s as b,p as j}from"./submissions-BXysTHzU.js";import{c as te}from"./catalog-mND3MerS.js";import{L as Ee}from"./loader-circle-zwM3ton0.js";/** +import{g as be,r as a,j as e,a5 as je,x as fe,a6 as ye,h as Ne,o as we,X as Se,l as _e,H as ke}from"./index-hxawG6mk.js";import{B as P}from"./button-DR59q2Iu.js";import{I as u}from"./input-BOLTsgbP.js";import{T as Ce}from"./textarea-DzlRNXqF.js";import{S as se}from"./searchable-select-cLm40hhL.js";import{D as ie,a as oe,b as le,c as ce,d as de,e as De}from"./dialog-D2TDqr0v.js";import{u as Ie}from"./useMutation-gPqxjZGO.js";import{s as b,p as j}from"./submissions-DgbzmxlX.js";import{c as te}from"./catalog-ePebz7GX.js";import{L as Ee}from"./loader-circle-CXb3415J.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/StagingAccessRequestView-B_iGF8VX.js b/assets/StagingAccessRequestView-c98FyqK_.js similarity index 95% rename from assets/StagingAccessRequestView-B_iGF8VX.js rename to assets/StagingAccessRequestView-c98FyqK_.js index 7d25f4f3e5e1836eadf456f5d7bacad481dab53a..419612515de5e3e9b94cb543bc3fd7ca4297560b 100644 --- a/assets/StagingAccessRequestView-B_iGF8VX.js +++ b/assets/StagingAccessRequestView-c98FyqK_.js @@ -1 +1 @@ -import{a as m,F as a,j as e,H as g,aU as p}from"./index-CnBotBa4.js";import{C as j}from"./circle-check-BBMzXw2d.js";const f=()=>{const{user:s,isLoading:u}=m(),[l,d]=a.useState(!1),[r,t]=a.useState(!1),[c,i]=a.useState(null),o=async h=>{h.preventDefault(),t(!0),i(null);try{await p.requestStagingAccess(),d(!0)}catch(n){i(n instanceof Error?n.message:"Could not submit your request.")}finally{t(!1)}};return e.jsx("main",{className:"access-request-page",children:e.jsxs("section",{className:"access-request-card","aria-labelledby":"access-request-title",children:[e.jsxs("a",{className:"access-request-brand",href:"https://paperswithcode.co",children:[e.jsx("span",{className:"brand-mark","aria-hidden":"true"}),e.jsxs("span",{className:"brand-name",children:["Papers ",e.jsx("em",{children:"with"})," Code"]})]}),l?e.jsxs("div",{className:"access-request-success",role:"status",children:[e.jsx(j,{size:34,strokeWidth:1.6,"aria-hidden":"true"}),e.jsx("h1",{id:"access-request-title",children:"Request received"}),e.jsxs("p",{children:["Thanks, @",s==null?void 0:s.username,". We’ll review your contributor access request."]})]}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"access-request-heading",children:[e.jsx("p",{className:"access-request-eyebrow",children:"Staging preview"}),e.jsx("h1",{id:"access-request-title",children:"Request access"}),e.jsx("p",{children:"This preview is limited to project contributors. Send us your verified Hugging Face username and email address to request access."})]}),u?e.jsx("p",{className:"access-request-status",role:"status",children:"Checking your Hugging Face account…"}):s?e.jsxs("form",{className:"access-request-form",onSubmit:o,children:[e.jsx("label",{htmlFor:"hf-username",children:"Hugging Face username"}),e.jsxs("div",{className:"access-request-input-wrap",children:[e.jsx("span",{"aria-hidden":"true",children:"@"}),e.jsx("input",{id:"hf-username",name:"hf_username",value:s.username,readOnly:!0,autoComplete:"username"})]}),e.jsxs("p",{className:"access-request-verified",children:["Username and email verified through Hugging Face sign-in. See our"," ",e.jsx("a",{href:"https://paperswithcode.co/privacy",children:"Privacy Policy"}),"."]}),c&&e.jsx("p",{className:"access-request-error",role:"alert",children:c}),e.jsx("button",{className:"access-request-submit",type:"submit",disabled:r,children:r?"Sending…":"Request access"})]}):e.jsxs("div",{className:"access-request-signin",children:[e.jsx("p",{children:"Sign in first so we can verify the account you’re requesting access for."}),e.jsx(g,{returnTo:"/request-access",label:"Sign in with Hugging Face",collectEmail:!0})]})]})]})})};export{f as default}; +import{a as m,F as a,j as e,H as g,aU as p}from"./index-hxawG6mk.js";import{C as j}from"./circle-check-Cs0UNhNB.js";const f=()=>{const{user:s,isLoading:u}=m(),[l,d]=a.useState(!1),[r,t]=a.useState(!1),[c,i]=a.useState(null),o=async h=>{h.preventDefault(),t(!0),i(null);try{await p.requestStagingAccess(),d(!0)}catch(n){i(n instanceof Error?n.message:"Could not submit your request.")}finally{t(!1)}};return e.jsx("main",{className:"access-request-page",children:e.jsxs("section",{className:"access-request-card","aria-labelledby":"access-request-title",children:[e.jsxs("a",{className:"access-request-brand",href:"https://paperswithcode.co",children:[e.jsx("span",{className:"brand-mark","aria-hidden":"true"}),e.jsxs("span",{className:"brand-name",children:["Papers ",e.jsx("em",{children:"with"})," Code"]})]}),l?e.jsxs("div",{className:"access-request-success",role:"status",children:[e.jsx(j,{size:34,strokeWidth:1.6,"aria-hidden":"true"}),e.jsx("h1",{id:"access-request-title",children:"Request received"}),e.jsxs("p",{children:["Thanks, @",s==null?void 0:s.username,". We’ll review your contributor access request."]})]}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"access-request-heading",children:[e.jsx("p",{className:"access-request-eyebrow",children:"Staging preview"}),e.jsx("h1",{id:"access-request-title",children:"Request access"}),e.jsx("p",{children:"This preview is limited to project contributors. Send us your verified Hugging Face username and email address to request access."})]}),u?e.jsx("p",{className:"access-request-status",role:"status",children:"Checking your Hugging Face account…"}):s?e.jsxs("form",{className:"access-request-form",onSubmit:o,children:[e.jsx("label",{htmlFor:"hf-username",children:"Hugging Face username"}),e.jsxs("div",{className:"access-request-input-wrap",children:[e.jsx("span",{"aria-hidden":"true",children:"@"}),e.jsx("input",{id:"hf-username",name:"hf_username",value:s.username,readOnly:!0,autoComplete:"username"})]}),e.jsxs("p",{className:"access-request-verified",children:["Username and email verified through Hugging Face sign-in. See our"," ",e.jsx("a",{href:"https://paperswithcode.co/privacy",children:"Privacy Policy"}),"."]}),c&&e.jsx("p",{className:"access-request-error",role:"alert",children:c}),e.jsx("button",{className:"access-request-submit",type:"submit",disabled:r,children:r?"Sending…":"Request access"})]}):e.jsxs("div",{className:"access-request-signin",children:[e.jsx("p",{children:"Sign in first so we can verify the account you’re requesting access for."}),e.jsx(g,{returnTo:"/request-access",label:"Sign in with Hugging Face",collectEmail:!0})]})]})]})})};export{f as default}; diff --git a/assets/SubmissionsDashboard-Bpzyogxo.js b/assets/SubmissionsDashboard-DpmxpqNk.js similarity index 98% rename from assets/SubmissionsDashboard-Bpzyogxo.js rename to assets/SubmissionsDashboard-DpmxpqNk.js index bac4f2b490789383da312cb3acd048584cfe166d..bf13b8e5bcb8a6fdb6f6d60fb3308c6fe7d84305 100644 --- a/assets/SubmissionsDashboard-Bpzyogxo.js +++ b/assets/SubmissionsDashboard-DpmxpqNk.js @@ -1,4 +1,4 @@ -var be=s=>{throw TypeError(s)};var ne=(s,t,i)=>t.has(s)||be("Cannot "+i);var g=(s,t,i)=>(ne(s,t,"read from private field"),i?i.call(s):t.get(s)),C=(s,t,i)=>t.has(s)?be("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(s):t.set(s,i),k=(s,t,i,n)=>(ne(s,t,"write to private field"),n?n.call(s,i):t.set(s,i),i),O=(s,t,i)=>(ne(s,t,"access private method"),i);import{aw as Oe,aJ as ae,az as Me,aP as Te,m as we,r as P,aB as Ie,g as Ae,j as e,U as Se,x as L,F as w,a as Fe,h as Ee,aQ as Ue,aR as Le,aS as Qe}from"./index-CnBotBa4.js";import{i as De,r as qe,e as ze,b as $e}from"./evaluationQueryInvalidation-CC5JhGiX.js";import{p as He}from"./paperQueryKeys-BP2E-0yf.js";import{Q as Re,b as Be,c as Pe,e as Je,d as Ke,f as Ge,s as xe,g as We,h as Ve,u as oe}from"./useQuery-C8pfCInN.js";import{u as je}from"./useMutation-YEvFXzv3.js";import{c as Q}from"./catalog-mND3MerS.js";import{s as q}from"./safeExternalHref-CkBrsh84.js";import{p as Ye}from"./papers-DkTdvzl4.js";import{s as G}from"./submissions-BXysTHzU.js";import{R as Xe,C as Ze}from"./refresh-cw-B16d_5-C.js";import{L as W}from"./loader-circle-zwM3ton0.js";import{S as es}from"./shield-alert-B-esZpK3.js";import{C as ss}from"./circle-check-BBMzXw2d.js";function _e(s,t){const i=new Set(t);return s.filter(n=>!i.has(n))}function ts(s,t,i){const n=s.slice(0);return n[t]=i,n}var $,E,H,D,R,U,V,Y,X,Z,N,le,ce,Ce,de,ue,me,ke,is=(ke=class extends Oe{constructor(t,i,n){super();C(this,N);C(this,$);C(this,E);C(this,H);C(this,D);C(this,R);C(this,U);C(this,V);C(this,Y);C(this,X);C(this,Z,[]);k(this,$,t),k(this,D,n),k(this,H,[]),k(this,R,[]),k(this,E,[]),this.setQueries(i)}onSubscribe(){this.listeners.size===1&&g(this,R).forEach(t=>{t.subscribe(i=>{O(this,N,ue).call(this,t,i)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,g(this,R).forEach(t=>{t.destroy()})}setQueries(t,i){k(this,H,t),k(this,D,i),ae.batch(()=>{const n=g(this,R),r=O(this,N,de).call(this,g(this,H));r.forEach(a=>a.observer.setOptions(a.defaultedQueryOptions));const l=r.map(a=>a.observer),o=l.map(a=>a.getCurrentResult()),d=n.length!==l.length,m=l.some((a,h)=>a!==n[h]),f=d||m,_=f?!0:o.some((a,h)=>{const c=g(this,E)[h];return!c||!Me(a,c)});!f&&!_||(f&&(k(this,Z,r),k(this,R,l)),k(this,E,o),this.hasListeners()&&(f&&(_e(n,l).forEach(a=>{a.destroy()}),_e(l,n).forEach(a=>{a.subscribe(h=>{O(this,N,ue).call(this,a,h)})})),O(this,N,me).call(this)))})}getCurrentResult(){return g(this,E)}getQueries(){return g(this,R).map(t=>t.getCurrentQuery())}getObservers(){return g(this,R)}getOptimisticResult(t,i){const n=O(this,N,de).call(this,t),r=n.map(o=>o.observer.getOptimisticResult(o.defaultedQueryOptions)),l=n.map(o=>o.defaultedQueryOptions.queryHash);return[r,o=>O(this,N,ce).call(this,o??r,i,l),()=>O(this,N,le).call(this,r,n)]}},$=new WeakMap,E=new WeakMap,H=new WeakMap,D=new WeakMap,R=new WeakMap,U=new WeakMap,V=new WeakMap,Y=new WeakMap,X=new WeakMap,Z=new WeakMap,N=new WeakSet,le=function(t,i){return i.map((n,r)=>{const l=t[r];return n.defaultedQueryOptions.notifyOnChangeProps?l:n.observer.trackResult(l,o=>{i.forEach(d=>{d.observer.trackProp(o)})})})},ce=function(t,i,n){if(i){const r=g(this,X),l=n!==void 0&&r!==void 0&&(r.length!==n.length||n.some((o,d)=>o!==r[d]));return(!g(this,U)||g(this,E)!==g(this,Y)||l||i!==g(this,V))&&(k(this,V,i),k(this,Y,g(this,E)),n!==void 0&&k(this,X,n),k(this,U,Te(g(this,U),i(t)))),g(this,U)}return t},Ce=function(){var t;return((t=g(this,D))==null?void 0:t.combine)!==void 0&&g(this,R).some((i,n)=>{var r;return i.options.suspense&&((r=g(this,E)[n])==null?void 0:r.data)===void 0})},de=function(t){const i=new Map;g(this,R).forEach(r=>{const l=r.options.queryHash;if(!l)return;const o=i.get(l);o?o.push(r):i.set(l,[r])});const n=[];return t.forEach(r=>{var m;const l=g(this,$).defaultQueryOptions(r),d=((m=i.get(l.queryHash))==null?void 0:m.shift())??new Re(g(this,$),l);n.push({defaultedQueryOptions:l,observer:d})}),n},ue=function(t,i){const n=g(this,R).indexOf(t);n!==-1&&(k(this,E,ts(g(this,E),n,i)),O(this,N,me).call(this))},me=function(){var t;if(this.hasListeners()){const i=O(this,N,le).call(this,g(this,E),g(this,Z)),n=O(this,N,Ce).call(this),r=g(this,U),l=n?r:O(this,N,ce).call(this,i,(t=g(this,D))==null?void 0:t.combine);(n||r!==l)&&ae.batch(()=>{this.listeners.forEach(o=>{o(g(this,E))})})}},ke);function te({queries:s,...t},i){const n=we(),r=Be(),l=Pe(),o=P.useMemo(()=>s.map(u=>{const v=n.defaultQueryOptions(u);return v._optimisticResults=r?"isRestoring":"optimistic",v}),[s,n,r]);o.forEach(u=>{Je(u);const v=n.getQueryCache().get(u.queryHash);Ke(u,l,v)}),Ge(l);const[d]=P.useState(()=>new is(n,o,t)),[m,f,_]=d.getOptimisticResult(o,t.combine),a=!r&&t.subscribed!==!1;P.useSyncExternalStore(P.useCallback(u=>a?d.subscribe(ae.batchCalls(u)):Ie,[d,a]),()=>d.getCurrentResult(),()=>d.getCurrentResult()),P.useEffect(()=>{d.setQueries(o,t)},[o,t,d]);const c=m.some((u,v)=>xe(o[v],u))?m.flatMap((u,v)=>{const S=o[v];if(S&&xe(S,u)){const M=new Re(n,S);return We(S,M,l)}return[]}):[];if(c.length>0)throw Promise.all(c);const p=m.find((u,v)=>{const S=o[v];return S&&Ve({result:u,errorResetBoundary:l,throwOnError:S.throwOnError,query:n.getQueryCache().get(S.queryHash),suspense:S.suspense})});if(p!=null&&p.error)throw p.error;return f(_())}/** +var be=s=>{throw TypeError(s)};var ne=(s,t,i)=>t.has(s)||be("Cannot "+i);var g=(s,t,i)=>(ne(s,t,"read from private field"),i?i.call(s):t.get(s)),C=(s,t,i)=>t.has(s)?be("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(s):t.set(s,i),k=(s,t,i,n)=>(ne(s,t,"write to private field"),n?n.call(s,i):t.set(s,i),i),O=(s,t,i)=>(ne(s,t,"access private method"),i);import{aw as Oe,aJ as ae,az as Me,aP as Te,m as we,r as P,aB as Ie,g as Ae,j as e,U as Se,x as L,F as w,a as Fe,h as Ee,aQ as Ue,aR as Le,aS as Qe}from"./index-hxawG6mk.js";import{i as De,r as qe,e as ze,b as $e}from"./evaluationQueryInvalidation-CC5JhGiX.js";import{p as He}from"./paperQueryKeys-BP2E-0yf.js";import{Q as Re,b as Be,c as Pe,e as Je,d as Ke,f as Ge,s as xe,g as We,h as Ve,u as oe}from"./useQuery-B7vCF2Os.js";import{u as je}from"./useMutation-gPqxjZGO.js";import{c as Q}from"./catalog-ePebz7GX.js";import{s as q}from"./safeExternalHref-CkBrsh84.js";import{p as Ye}from"./papers-B0ysePyJ.js";import{s as G}from"./submissions-DgbzmxlX.js";import{R as Xe,C as Ze}from"./refresh-cw-Dg-Q2M4w.js";import{L as W}from"./loader-circle-CXb3415J.js";import{S as es}from"./shield-alert-DrzIR1qR.js";import{C as ss}from"./circle-check-Cs0UNhNB.js";function _e(s,t){const i=new Set(t);return s.filter(n=>!i.has(n))}function ts(s,t,i){const n=s.slice(0);return n[t]=i,n}var $,E,H,D,R,U,V,Y,X,Z,N,le,ce,Ce,de,ue,me,ke,is=(ke=class extends Oe{constructor(t,i,n){super();C(this,N);C(this,$);C(this,E);C(this,H);C(this,D);C(this,R);C(this,U);C(this,V);C(this,Y);C(this,X);C(this,Z,[]);k(this,$,t),k(this,D,n),k(this,H,[]),k(this,R,[]),k(this,E,[]),this.setQueries(i)}onSubscribe(){this.listeners.size===1&&g(this,R).forEach(t=>{t.subscribe(i=>{O(this,N,ue).call(this,t,i)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,g(this,R).forEach(t=>{t.destroy()})}setQueries(t,i){k(this,H,t),k(this,D,i),ae.batch(()=>{const n=g(this,R),r=O(this,N,de).call(this,g(this,H));r.forEach(a=>a.observer.setOptions(a.defaultedQueryOptions));const l=r.map(a=>a.observer),o=l.map(a=>a.getCurrentResult()),d=n.length!==l.length,m=l.some((a,h)=>a!==n[h]),f=d||m,_=f?!0:o.some((a,h)=>{const c=g(this,E)[h];return!c||!Me(a,c)});!f&&!_||(f&&(k(this,Z,r),k(this,R,l)),k(this,E,o),this.hasListeners()&&(f&&(_e(n,l).forEach(a=>{a.destroy()}),_e(l,n).forEach(a=>{a.subscribe(h=>{O(this,N,ue).call(this,a,h)})})),O(this,N,me).call(this)))})}getCurrentResult(){return g(this,E)}getQueries(){return g(this,R).map(t=>t.getCurrentQuery())}getObservers(){return g(this,R)}getOptimisticResult(t,i){const n=O(this,N,de).call(this,t),r=n.map(o=>o.observer.getOptimisticResult(o.defaultedQueryOptions)),l=n.map(o=>o.defaultedQueryOptions.queryHash);return[r,o=>O(this,N,ce).call(this,o??r,i,l),()=>O(this,N,le).call(this,r,n)]}},$=new WeakMap,E=new WeakMap,H=new WeakMap,D=new WeakMap,R=new WeakMap,U=new WeakMap,V=new WeakMap,Y=new WeakMap,X=new WeakMap,Z=new WeakMap,N=new WeakSet,le=function(t,i){return i.map((n,r)=>{const l=t[r];return n.defaultedQueryOptions.notifyOnChangeProps?l:n.observer.trackResult(l,o=>{i.forEach(d=>{d.observer.trackProp(o)})})})},ce=function(t,i,n){if(i){const r=g(this,X),l=n!==void 0&&r!==void 0&&(r.length!==n.length||n.some((o,d)=>o!==r[d]));return(!g(this,U)||g(this,E)!==g(this,Y)||l||i!==g(this,V))&&(k(this,V,i),k(this,Y,g(this,E)),n!==void 0&&k(this,X,n),k(this,U,Te(g(this,U),i(t)))),g(this,U)}return t},Ce=function(){var t;return((t=g(this,D))==null?void 0:t.combine)!==void 0&&g(this,R).some((i,n)=>{var r;return i.options.suspense&&((r=g(this,E)[n])==null?void 0:r.data)===void 0})},de=function(t){const i=new Map;g(this,R).forEach(r=>{const l=r.options.queryHash;if(!l)return;const o=i.get(l);o?o.push(r):i.set(l,[r])});const n=[];return t.forEach(r=>{var m;const l=g(this,$).defaultQueryOptions(r),d=((m=i.get(l.queryHash))==null?void 0:m.shift())??new Re(g(this,$),l);n.push({defaultedQueryOptions:l,observer:d})}),n},ue=function(t,i){const n=g(this,R).indexOf(t);n!==-1&&(k(this,E,ts(g(this,E),n,i)),O(this,N,me).call(this))},me=function(){var t;if(this.hasListeners()){const i=O(this,N,le).call(this,g(this,E),g(this,Z)),n=O(this,N,Ce).call(this),r=g(this,U),l=n?r:O(this,N,ce).call(this,i,(t=g(this,D))==null?void 0:t.combine);(n||r!==l)&&ae.batch(()=>{this.listeners.forEach(o=>{o(g(this,E))})})}},ke);function te({queries:s,...t},i){const n=we(),r=Be(),l=Pe(),o=P.useMemo(()=>s.map(u=>{const v=n.defaultQueryOptions(u);return v._optimisticResults=r?"isRestoring":"optimistic",v}),[s,n,r]);o.forEach(u=>{Je(u);const v=n.getQueryCache().get(u.queryHash);Ke(u,l,v)}),Ge(l);const[d]=P.useState(()=>new is(n,o,t)),[m,f,_]=d.getOptimisticResult(o,t.combine),a=!r&&t.subscribed!==!1;P.useSyncExternalStore(P.useCallback(u=>a?d.subscribe(ae.batchCalls(u)):Ie,[d,a]),()=>d.getCurrentResult(),()=>d.getCurrentResult()),P.useEffect(()=>{d.setQueries(o,t)},[o,t,d]);const c=m.some((u,v)=>xe(o[v],u))?m.flatMap((u,v)=>{const S=o[v];if(S&&xe(S,u)){const M=new Re(n,S);return We(S,M,l)}return[]}):[];if(c.length>0)throw Promise.all(c);const p=m.find((u,v)=>{const S=o[v];return S&&Ve({result:u,errorResetBoundary:l,throwOnError:S.throwOnError,query:n.getQueryCache().get(S.queryHash),suspense:S.suspense})});if(p!=null&&p.error)throw p.error;return f(_())}/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/SubmitView-CXqn57JU.js b/assets/SubmitView-DKPeFmsA.js similarity index 94% rename from assets/SubmitView-CXqn57JU.js rename to assets/SubmitView-DKPeFmsA.js index baada373ab9c25316b6fc21575ef9505f840f454..fb2ef18c686147cce907bf7eda1235ae6bca0e30 100644 --- a/assets/SubmitView-CXqn57JU.js +++ b/assets/SubmitView-DKPeFmsA.js @@ -1 +1 @@ -import{b as k,m as C,h as F,a as L,d as z,F as d,j as e,E as X}from"./index-CnBotBa4.js";import{u as q}from"./useMutation-YEvFXzv3.js";import{A as N,a as U}from"./alert-B0qZtPeK.js";import{B as P}from"./button-DNii_czO.js";import{I as g}from"./input-fzMY4SDb.js";import{T as $}from"./textarea-D8TA8f9X.js";import{p as O}from"./papers-DkTdvzl4.js";const S="pwc:paper-submit-draft",B=/^\d{4}\.\d{4,5}(v\d+)?$/i,J=/^[a-z-]+(\.[A-Z]{2})?\/\d{7}$/,V=/^https?:\/\/(?:www\.)?arxiv\.org\//i;function R(n){const i=n.trim();return i?B.test(i)||J.test(i)||V.test(i)?"arxiv":/^https?:\/\//i.test(i)?"external":"arxiv":"empty"}function K(n,i){const a=n.trim();if(R(a)==="arxiv")return/^https?:\/\//i.test(a)?{source_url:a}:{arxiv_id:a};const o={source_url:a},c=i.title.trim();c&&(o.title=c);const u=i.abstract.trim();u&&(o.abstract=u);const l=i.authors.split(/[,\n]/).map(m=>m.trim()).filter(Boolean);return l.length>0&&(o.authors=l),i.datePublished&&(o.date_published=i.datePublished),o}function M(n){var a;const i=n;if(!i)return"Submission failed";if(i.response)try{const s=JSON.parse(i.response);if(typeof s.detail=="string")return s.detail;if((a=s.detail)!=null&&a.message)return`${s.detail.message} See ${s.detail.help||"/rate-limits"} for help.`}catch{return i.response}return i.message||"Submission failed"}const te=()=>{const n=k(),i=C(),{toast:a}=F(),{user:s,isLoading:o}=L(),[c]=z(),u=c.get("arxiv_id")??"",[l,m]=d.useState(u),[f,j]=d.useState(""),[x,w]=d.useState(""),[b,I]=d.useState(""),[y,_]=d.useState(""),[A,v]=d.useState(null);d.useEffect(()=>{if(u)return;const t=sessionStorage.getItem(S);if(t){sessionStorage.removeItem(S);try{const r=JSON.parse(t);m(r.input??""),j(r.title??""),w(r.abstract??""),I(r.authors??""),_(r.datePublished??"")}catch{}}},[u]);const h=R(l),T=h==="external",p=q({mutationFn:t=>O.submit(t),onSuccess:t=>{if(t.pending_review){a({title:"Submission queued for review",description:"No source page was fetched and no catalog row was changed."}),p.reset();return}i.invalidateQueries({queryKey:["papers"],refetchType:"none"}),i.invalidateQueries({queryKey:["papers-infinite"],refetchType:"none"}),i.invalidateQueries({queryKey:["trending-papers"],refetchType:"none"});const r=t.refreshed&&t.created&&t.latest_version;a({title:r?`Paper updated to ${t.latest_version}`:t.created?"Paper submitted":"Paper already indexed",description:r?"Opening the updated paper page…":t.created?"Opening the paper page…":"Opening the existing paper page…"}),t.route_identifier&&n(`/paper/${t.route_identifier}`)},onError:t=>{v(M(t))}}),D=t=>{if(t.preventDefault(),v(null),h==="empty"){v("Enter an arXiv ID or a paper URL to submit.");return}if(!s){sessionStorage.setItem(S,JSON.stringify({input:l,title:f,abstract:x,authors:b,datePublished:y}));const E=X("/api/v1/auth/hf/login");window.location.assign(`${E}?return_to=${encodeURIComponent(window.location.href)}`);return}const r=K(l,{title:f,abstract:x,authors:b,datePublished:y});p.mutate(r)};return e.jsxs("div",{className:"page",style:{maxWidth:720},children:[e.jsx("h1",{className:"detail-title",children:"Submit a paper"}),e.jsxs("p",{style:{fontFamily:"var(--serif)",color:"var(--ink-soft)",marginTop:12,lineHeight:1.55},children:["Index an arXiv paper or propose a non-arXiv paper (blog post, technical report, model release page). External papers enter the submission queue and appear only after review."," ",e.jsx("a",{href:"/rate-limits",children:"Read the submission and rate-limit policy."})]}),e.jsxs("form",{onSubmit:D,style:{marginTop:28,display:"grid",gap:20},children:[e.jsxs("div",{style:{display:"grid",gap:8},children:[e.jsx("label",{htmlFor:"submit-input",style:{fontWeight:600,fontSize:14},children:"arXiv ID or paper URL"}),e.jsx(g,{id:"submit-input",value:l,onChange:t=>m(t.target.value),placeholder:"2501.12345 · https://arxiv.org/abs/2501.12345 · https://blog.example.com/release",autoFocus:!0,required:!0}),e.jsx("div",{style:{fontSize:12,color:"var(--ink-soft)",minHeight:18},children:h==="arxiv"?"Detected: arXiv paper — metadata will be fetched automatically.":h==="external"?"Detected: external URL — we'll extract metadata and you can override below.":"Paste an arXiv ID like 2501.12345 or any paper/blog URL."})]}),T&&e.jsxs("fieldset",{style:{border:"1px solid var(--rule)",borderRadius:8,padding:"16px 20px 20px",display:"grid",gap:16},children:[e.jsx("legend",{style:{padding:"0 8px",fontSize:12,color:"var(--ink-soft)",textTransform:"uppercase",letterSpacing:.5},children:"External paper details (optional)"}),e.jsxs("div",{style:{display:"grid",gap:8},children:[e.jsx("label",{htmlFor:"submit-title",style:{fontSize:13},children:"Title"}),e.jsx(g,{id:"submit-title",value:f,onChange:t=>j(t.target.value),placeholder:"Leave blank to extract automatically"})]}),e.jsxs("div",{style:{display:"grid",gap:8},children:[e.jsx("label",{htmlFor:"submit-abstract",style:{fontSize:13},children:"Abstract or summary"}),e.jsx($,{id:"submit-abstract",value:x,onChange:t=>w(t.target.value),rows:4,placeholder:"Leave blank to extract automatically"})]}),e.jsxs("div",{style:{display:"grid",gap:8},children:[e.jsx("label",{htmlFor:"submit-authors",style:{fontSize:13},children:"Authors (comma-separated)"}),e.jsx(g,{id:"submit-authors",value:b,onChange:t=>I(t.target.value),placeholder:"Jane Smith, John Doe"})]}),e.jsxs("div",{style:{display:"grid",gap:8},children:[e.jsx("label",{htmlFor:"submit-date",style:{fontSize:13},children:"Publication date"}),e.jsx(g,{id:"submit-date",type:"date",value:y,onChange:t=>_(t.target.value),style:{maxWidth:220}}),e.jsx("div",{style:{fontSize:12,color:"var(--ink-soft)"},children:"Required only if we cannot infer a date from the page."})]})]}),A&&e.jsx(N,{variant:"destructive",children:e.jsx(U,{children:A})}),e.jsxs("div",{style:{display:"flex",gap:12,alignItems:"center"},children:[e.jsx(P,{type:"submit",disabled:p.isPending||o,children:o?"Checking sign-in…":p.isPending?"Submitting…":s?"Submit paper":"Sign in to submit"}),e.jsx(P,{type:"button",variant:"outline",onClick:()=>n(-1),disabled:p.isPending,children:"Cancel"})]})]})]})};export{te as default}; +import{b as k,m as C,h as F,a as L,d as z,F as d,j as e,E as X}from"./index-hxawG6mk.js";import{u as q}from"./useMutation-gPqxjZGO.js";import{A as N,a as U}from"./alert-2LCyXuCE.js";import{B as P}from"./button-DR59q2Iu.js";import{I as g}from"./input-BOLTsgbP.js";import{T as $}from"./textarea-DzlRNXqF.js";import{p as O}from"./papers-B0ysePyJ.js";const S="pwc:paper-submit-draft",B=/^\d{4}\.\d{4,5}(v\d+)?$/i,J=/^[a-z-]+(\.[A-Z]{2})?\/\d{7}$/,V=/^https?:\/\/(?:www\.)?arxiv\.org\//i;function R(n){const i=n.trim();return i?B.test(i)||J.test(i)||V.test(i)?"arxiv":/^https?:\/\//i.test(i)?"external":"arxiv":"empty"}function K(n,i){const a=n.trim();if(R(a)==="arxiv")return/^https?:\/\//i.test(a)?{source_url:a}:{arxiv_id:a};const o={source_url:a},c=i.title.trim();c&&(o.title=c);const u=i.abstract.trim();u&&(o.abstract=u);const l=i.authors.split(/[,\n]/).map(m=>m.trim()).filter(Boolean);return l.length>0&&(o.authors=l),i.datePublished&&(o.date_published=i.datePublished),o}function M(n){var a;const i=n;if(!i)return"Submission failed";if(i.response)try{const s=JSON.parse(i.response);if(typeof s.detail=="string")return s.detail;if((a=s.detail)!=null&&a.message)return`${s.detail.message} See ${s.detail.help||"/rate-limits"} for help.`}catch{return i.response}return i.message||"Submission failed"}const te=()=>{const n=k(),i=C(),{toast:a}=F(),{user:s,isLoading:o}=L(),[c]=z(),u=c.get("arxiv_id")??"",[l,m]=d.useState(u),[f,j]=d.useState(""),[x,w]=d.useState(""),[b,I]=d.useState(""),[y,_]=d.useState(""),[A,v]=d.useState(null);d.useEffect(()=>{if(u)return;const t=sessionStorage.getItem(S);if(t){sessionStorage.removeItem(S);try{const r=JSON.parse(t);m(r.input??""),j(r.title??""),w(r.abstract??""),I(r.authors??""),_(r.datePublished??"")}catch{}}},[u]);const h=R(l),T=h==="external",p=q({mutationFn:t=>O.submit(t),onSuccess:t=>{if(t.pending_review){a({title:"Submission queued for review",description:"No source page was fetched and no catalog row was changed."}),p.reset();return}i.invalidateQueries({queryKey:["papers"],refetchType:"none"}),i.invalidateQueries({queryKey:["papers-infinite"],refetchType:"none"}),i.invalidateQueries({queryKey:["trending-papers"],refetchType:"none"});const r=t.refreshed&&t.created&&t.latest_version;a({title:r?`Paper updated to ${t.latest_version}`:t.created?"Paper submitted":"Paper already indexed",description:r?"Opening the updated paper page…":t.created?"Opening the paper page…":"Opening the existing paper page…"}),t.route_identifier&&n(`/paper/${t.route_identifier}`)},onError:t=>{v(M(t))}}),D=t=>{if(t.preventDefault(),v(null),h==="empty"){v("Enter an arXiv ID or a paper URL to submit.");return}if(!s){sessionStorage.setItem(S,JSON.stringify({input:l,title:f,abstract:x,authors:b,datePublished:y}));const E=X("/api/v1/auth/hf/login");window.location.assign(`${E}?return_to=${encodeURIComponent(window.location.href)}`);return}const r=K(l,{title:f,abstract:x,authors:b,datePublished:y});p.mutate(r)};return e.jsxs("div",{className:"page",style:{maxWidth:720},children:[e.jsx("h1",{className:"detail-title",children:"Submit a paper"}),e.jsxs("p",{style:{fontFamily:"var(--serif)",color:"var(--ink-soft)",marginTop:12,lineHeight:1.55},children:["Index an arXiv paper or propose a non-arXiv paper (blog post, technical report, model release page). External papers enter the submission queue and appear only after review."," ",e.jsx("a",{href:"/rate-limits",children:"Read the submission and rate-limit policy."})]}),e.jsxs("form",{onSubmit:D,style:{marginTop:28,display:"grid",gap:20},children:[e.jsxs("div",{style:{display:"grid",gap:8},children:[e.jsx("label",{htmlFor:"submit-input",style:{fontWeight:600,fontSize:14},children:"arXiv ID or paper URL"}),e.jsx(g,{id:"submit-input",value:l,onChange:t=>m(t.target.value),placeholder:"2501.12345 · https://arxiv.org/abs/2501.12345 · https://blog.example.com/release",autoFocus:!0,required:!0}),e.jsx("div",{style:{fontSize:12,color:"var(--ink-soft)",minHeight:18},children:h==="arxiv"?"Detected: arXiv paper — metadata will be fetched automatically.":h==="external"?"Detected: external URL — we'll extract metadata and you can override below.":"Paste an arXiv ID like 2501.12345 or any paper/blog URL."})]}),T&&e.jsxs("fieldset",{style:{border:"1px solid var(--rule)",borderRadius:8,padding:"16px 20px 20px",display:"grid",gap:16},children:[e.jsx("legend",{style:{padding:"0 8px",fontSize:12,color:"var(--ink-soft)",textTransform:"uppercase",letterSpacing:.5},children:"External paper details (optional)"}),e.jsxs("div",{style:{display:"grid",gap:8},children:[e.jsx("label",{htmlFor:"submit-title",style:{fontSize:13},children:"Title"}),e.jsx(g,{id:"submit-title",value:f,onChange:t=>j(t.target.value),placeholder:"Leave blank to extract automatically"})]}),e.jsxs("div",{style:{display:"grid",gap:8},children:[e.jsx("label",{htmlFor:"submit-abstract",style:{fontSize:13},children:"Abstract or summary"}),e.jsx($,{id:"submit-abstract",value:x,onChange:t=>w(t.target.value),rows:4,placeholder:"Leave blank to extract automatically"})]}),e.jsxs("div",{style:{display:"grid",gap:8},children:[e.jsx("label",{htmlFor:"submit-authors",style:{fontSize:13},children:"Authors (comma-separated)"}),e.jsx(g,{id:"submit-authors",value:b,onChange:t=>I(t.target.value),placeholder:"Jane Smith, John Doe"})]}),e.jsxs("div",{style:{display:"grid",gap:8},children:[e.jsx("label",{htmlFor:"submit-date",style:{fontSize:13},children:"Publication date"}),e.jsx(g,{id:"submit-date",type:"date",value:y,onChange:t=>_(t.target.value),style:{maxWidth:220}}),e.jsx("div",{style:{fontSize:12,color:"var(--ink-soft)"},children:"Required only if we cannot infer a date from the page."})]})]}),A&&e.jsx(N,{variant:"destructive",children:e.jsx(U,{children:A})}),e.jsxs("div",{style:{display:"flex",gap:12,alignItems:"center"},children:[e.jsx(P,{type:"submit",disabled:p.isPending||o,children:o?"Checking sign-in…":p.isPending?"Submitting…":s?"Submit paper":"Sign in to submit"}),e.jsx(P,{type:"button",variant:"outline",onClick:()=>n(-1),disabled:p.isPending,children:"Cancel"})]})]})]})};export{te as default}; diff --git a/assets/TagBrowseView-CuEeo3AM.js b/assets/TagBrowseView-1K_yjVN1.js similarity index 94% rename from assets/TagBrowseView-CuEeo3AM.js rename to assets/TagBrowseView-1K_yjVN1.js index e5656103ab75da83c0829cb7f6d8858974d2a2e3..de11741094cefa829cf73272cf45c67e115bda85 100644 --- a/assets/TagBrowseView-CuEeo3AM.js +++ b/assets/TagBrowseView-1K_yjVN1.js @@ -1 +1 @@ -import{j as e,L as C,r as u,q as ae,p as H,a1 as ke,t as Ne,P as ts,w as we,s as Ce,a2 as rs,F as k,a3 as ns,z as os,x as te,u as cs,b as is,d as ls,k as ds,U as ms}from"./index-CnBotBa4.js";import{R as ps}from"./ResearchFollowButton-CIKuncTY.js";import{u as je}from"./useQuery-C8pfCInN.js";import{P as hs,M as us}from"./components-CSFfzsKt.js";import{A as re,T as gs}from"./trophy-CO9jGMPk.js";import{B as xs}from"./BenchmarkTrendSparkline-CLoJOqdn.js";import{P as bs}from"./PaperFeedFilters-DBRREw9D.js";import{a as fs,P as js,b as _s}from"./PaperDateFilter-DMplC82d.js";import{M as Z}from"./MarkdownText-BAS9zVyW.js";import{c as _e}from"./catalog-mND3MerS.js";import{s as vs}from"./slug-BpH-Nkvz.js";import{d as O,t as ks}from"./transform-DMbrhcTx.js";import{c as Ns}from"./usePapers-fw4Ivp2T.js";import{u as ws}from"./useIntersectionObserver-WHgviHIR.js";import{S as U}from"./skeleton-DuOQBmSr.js";import{A as Cs,a as ys}from"./alert-B0qZtPeK.js";import{C as As}from"./chevron-down-IUgkNqZp.js";import{G as Ss}from"./github-DFkgF81-.js";import"./useMutation-YEvFXzv3.js";import"./research-DhkAyrPi.js";import"./plus-DTSO60Ls.js";import"./paperQueryKeys-BP2E-0yf.js";import"./LatexTitle-B1D_EqzJ.js";import"./papers-DkTdvzl4.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-BvojInsz.js";/* empty css */import"./PaperPreviewLink-ChJBLunV.js";import"./index-DxRopg3G.js";import"./index-DLNxIk77.js";import"./katex-DkKDou_j.js";import"./hover-card-CkboGKdu.js";import"./useInfiniteQuery-DUlXElgD.js";const Ps=()=>e.jsxs(C,{to:"/astra-for-robotics",className:"task-featured-collection","aria-label":"Featured collection: GPT-6 Astra for Robotics",children:[e.jsx("span",{className:"task-featured-collection-eyebrow",children:"Featured collection"}),e.jsx("strong",{children:"GPT-6 Astra for Robotics"}),e.jsx("span",{className:"task-featured-collection-description",children:"Papers and demos that put GPT-6 Astra in control of real and simulated robots, as the policy itself or as an agent orchestrating the stack."}),e.jsxs("span",{className:"task-featured-collection-meta",children:["Explore the collection",e.jsx(re,{size:14,"aria-hidden":"true"})]})]}),ve=a=>{const c=a.match(/\(([^()]*)\)\s*$/);return c?c[1].split(",").map(r=>r.trim()).filter(Boolean):[]};function Rs(a,c){const r=ve(a);if(c===void 0)return"standard";const n=new Set(ve(c).map(o=>o.toLowerCase())),i=r.filter(o=>!n.has(o.toLowerCase()));return i.length?i.join(", "):a}function Is(a,c){const r=new Map(a.map(o=>[o.id,o])),n=o=>{const m=new Set([o.id]);let p=o;for(;;){const b=c(p),x=b?r.get(b):void 0;if(!x)return p.id;if(m.has(x.id))return o.id;m.add(x.id),p=x}},i=new Map;return a.forEach(o=>{const m=n(o);i.set(m,[...i.get(m)||[],o])}),[...i].map(([o,m])=>({key:o,members:[r.get(o),...m.filter(p=>p.id!==o)]}))}var G="Collapsible",[Es,ye]=we(G),[Ts,ne]=Es(G),Ae=u.forwardRef((a,c)=>{const{__scopeCollapsible:r,open:n,defaultOpen:i,disabled:o,onOpenChange:m,...p}=a,[b,x]=ae({prop:n,defaultProp:i??!1,onChange:m,caller:G});return e.jsx(Ts,{scope:r,disabled:o,contentId:ke(),open:b,onOpenToggle:u.useCallback(()=>x(N=>!N),[x]),children:e.jsx(H.div,{"data-state":ce(b),"data-disabled":o?"":void 0,...p,ref:c})})});Ae.displayName=G;var Se="CollapsibleTrigger",Pe=u.forwardRef((a,c)=>{const{__scopeCollapsible:r,...n}=a,i=ne(Se,r);return e.jsx(H.button,{type:"button","aria-controls":i.contentId,"aria-expanded":i.open||!1,"data-state":ce(i.open),"data-disabled":i.disabled?"":void 0,disabled:i.disabled,...n,ref:c,onClick:Ne(a.onClick,i.onOpenToggle)})});Pe.displayName=Se;var oe="CollapsibleContent",Re=u.forwardRef((a,c)=>{const{forceMount:r,...n}=a,i=ne(oe,a.__scopeCollapsible);return e.jsx(ts,{present:r||i.open,children:({present:o})=>e.jsx(Ms,{...n,ref:c,present:o})})});Re.displayName=oe;var Ms=u.forwardRef((a,c)=>{const{__scopeCollapsible:r,present:n,children:i,...o}=a,m=ne(oe,r),[p,b]=u.useState(n),x=u.useRef(null),N=Ce(c,x),j=u.useRef(0),T=j.current,P=u.useRef(0),$=P.current,R=m.open||p,I=u.useRef(R),E=u.useRef(void 0);return u.useEffect(()=>{const h=requestAnimationFrame(()=>I.current=!1);return()=>cancelAnimationFrame(h)},[]),rs(()=>{const h=x.current;if(h){E.current=E.current||{transitionDuration:h.style.transitionDuration,animationName:h.style.animationName},h.style.transitionDuration="0s",h.style.animationName="none";const y=h.getBoundingClientRect();j.current=y.height,P.current=y.width,I.current||(h.style.transitionDuration=E.current.transitionDuration,h.style.animationName=E.current.animationName),b(n)}},[m.open,n]),e.jsx(H.div,{"data-state":ce(m.open),"data-disabled":m.disabled?"":void 0,id:m.contentId,hidden:!R,...o,ref:N,style:{"--radix-collapsible-content-height":T?`${T}px`:void 0,"--radix-collapsible-content-width":$?`${$}px`:void 0,...a.style},children:R&&i})});function ce(a){return a?"open":"closed"}var $s=Ae,Ds=Pe,Bs=Re,A="Accordion",Fs=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[ie,Ls,Os]=ns(A),[K]=we(A,[Os,ye]),le=ye(),Ie=k.forwardRef((a,c)=>{const{type:r,...n}=a,i=n,o=n;return e.jsx(ie.Provider,{scope:a.__scopeAccordion,children:r==="multiple"?e.jsx(Us,{...o,ref:c}):e.jsx(qs,{...i,ref:c})})});Ie.displayName=A;var[Ee,Hs]=K(A),[Te,Vs]=K(A,{collapsible:!1}),qs=k.forwardRef((a,c)=>{const{value:r,defaultValue:n,onValueChange:i=()=>{},collapsible:o=!1,...m}=a,[p,b]=ae({prop:r,defaultProp:n??"",onChange:i,caller:A});return e.jsx(Ee,{scope:a.__scopeAccordion,value:k.useMemo(()=>p?[p]:[],[p]),onItemOpen:b,onItemClose:k.useCallback(()=>o&&b(""),[o,b]),children:e.jsx(Te,{scope:a.__scopeAccordion,collapsible:o,children:e.jsx(Me,{...m,ref:c})})})}),Us=k.forwardRef((a,c)=>{const{value:r,defaultValue:n,onValueChange:i=()=>{},...o}=a,[m,p]=ae({prop:r,defaultProp:n??[],onChange:i,caller:A}),b=k.useCallback(N=>p((j=[])=>[...j,N]),[p]),x=k.useCallback(N=>p((j=[])=>j.filter(T=>T!==N)),[p]);return e.jsx(Ee,{scope:a.__scopeAccordion,value:m,onItemOpen:b,onItemClose:x,children:e.jsx(Te,{scope:a.__scopeAccordion,collapsible:!0,children:e.jsx(Me,{...o,ref:c})})})}),[zs,Q]=K(A),Me=k.forwardRef((a,c)=>{const{__scopeAccordion:r,disabled:n,dir:i,orientation:o="vertical",...m}=a,p=k.useRef(null),b=Ce(p,c),x=Ls(r),j=os(i)==="ltr",T=Ne(a.onKeyDown,P=>{var _;if(!Fs.includes(P.key))return;const $=P.target,R=x().filter(B=>{var F;return!((F=B.ref.current)!=null&&F.disabled)}),I=R.findIndex(B=>B.ref.current===$),E=R.length;if(I===-1)return;P.preventDefault();let h=I;const y=0,f=E-1,D=()=>{h=I+1,h>f&&(h=y)},M=()=>{h=I-1,h{const{__scopeAccordion:r,value:n,...i}=a,o=Q(z,r),m=Hs(z,r),p=le(r),b=ke(),x=n&&m.value.includes(n)||!1,N=o.disabled||a.disabled;return e.jsx(Gs,{scope:r,open:x,disabled:N,triggerId:b,children:e.jsx($s,{"data-orientation":o.orientation,"data-state":He(x),...p,...i,ref:c,disabled:N,open:x,onOpenChange:j=>{j?m.onItemOpen(n):m.onItemClose(n)}})})});$e.displayName=z;var De="AccordionHeader",Be=k.forwardRef((a,c)=>{const{__scopeAccordion:r,...n}=a,i=Q(A,r),o=de(De,r);return e.jsx(H.h3,{"data-orientation":i.orientation,"data-state":He(o.open),"data-disabled":o.disabled?"":void 0,...n,ref:c})});Be.displayName=De;var se="AccordionTrigger",Fe=k.forwardRef((a,c)=>{const{__scopeAccordion:r,...n}=a,i=Q(A,r),o=de(se,r),m=Vs(se,r),p=le(r);return e.jsx(ie.ItemSlot,{scope:r,children:e.jsx(Ds,{"aria-disabled":o.open&&!m.collapsible||void 0,"data-orientation":i.orientation,id:o.triggerId,...p,...n,ref:c})})});Fe.displayName=se;var Le="AccordionContent",Oe=k.forwardRef((a,c)=>{const{__scopeAccordion:r,...n}=a,i=Q(A,r),o=de(Le,r),m=le(r);return e.jsx(Bs,{role:"region","aria-labelledby":o.triggerId,"data-orientation":i.orientation,...m,...n,ref:c,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...a.style}})});Oe.displayName=Le;function He(a){return a?"open":"closed"}var Ks=Ie,Qs=$e,Ws=Be,Ve=Fe,qe=Oe;const Ys=Ks,Ue=u.forwardRef(({className:a,...c},r)=>e.jsx(Qs,{ref:r,className:te("border-b",a),...c}));Ue.displayName="AccordionItem";const ze=u.forwardRef(({className:a,children:c,...r},n)=>e.jsx(Ws,{className:"flex",children:e.jsxs(Ve,{ref:n,className:te("flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",a),...r,children:[c,e.jsx(As,{className:"h-4 w-4 shrink-0 transition-transform duration-200"})]})}));ze.displayName=Ve.displayName;const Ge=u.forwardRef(({className:a,children:c,...r},n)=>e.jsx(qe,{ref:n,className:"overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...r,children:e.jsx("div",{className:te("pb-4 pt-0",a),children:c})}));Ge.displayName=qe.displayName;const Js=[["trending","trending"],["date_published","newest"],["citation_count","most cited"]],Xs=a=>a==="trending"||a==="date_published"||a==="citation_count"?a:"trending",ee=3,Zs=[{slug:"healthcare",eyebrow:"Clinical systems",title:"Clinical AI & Healthcare",description:"Agents, clinical workflows, medical calculators, safety, and decision support.",href:"#benchmarks"},{slug:"medical-question-answering",eyebrow:"Language & reasoning",title:"Medical Question Answering",description:"Medical exams, biomedical evidence, clinical comprehension, and explanations.",href:"/tasks/medical-question-answering"},{slug:"medical-imaging",eyebrow:"Vision",title:"Medical Imaging",description:"Radiology, pathology, ophthalmology, ultrasound, and diagnostic imaging.",href:"/tasks/medical-imaging"},{slug:"medical-visual-question-answering",eyebrow:"Multimodal",title:"Medical Visual Question Answering",description:"Questions grounded in radiology, pathology, and other biomedical images.",href:"/tasks/medical-visual-question-answering"}],ea=a=>new Intl.NumberFormat("en",{notation:a>=1e3?"compact":"standard",maximumFractionDigits:1}).format(a),sa=({frameworks:a})=>a.length===0?null:e.jsxs("div",{className:"task-framework-links",children:[e.jsx("span",{className:"task-framework-links-label",children:"Recommended frameworks"}),a.map(c=>e.jsxs(C,{to:`/papers?framework=${encodeURIComponent(c.framework_slug)}`,className:"task-framework-link",children:[e.jsx("span",{children:c.framework_name}),e.jsxs("span",{className:"task-framework-link-stars",children:["★ ",ea(c.num_stars)]})]},c.framework_id))]}),aa=({task:a,area:c,parents:r})=>e.jsxs("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:[e.jsx(C,{to:"/tasks",children:"Tasks"}),c&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"sep",children:"/"}),e.jsx(C,{to:`/tasks#area-${vs(c.name)}`,children:c.name})]}),[...r].reverse().map(n=>e.jsxs(k.Fragment,{children:[e.jsx("span",{className:"sep",children:"/"}),e.jsx(C,{to:`/tasks/${n.slug||n.id}`,children:O(n.name,n.slug)})]},n.id)),e.jsx("span",{className:"sep",children:"/"}),e.jsx("span",{style:{color:"var(--accent-text)"},children:O(a.name,a.slug)})]}),ta=({task:a,relatedTasks:c})=>{const r=new Map([a,...c].map(n=>[n.slug,n]));return e.jsxs("section",{className:"medical-ai-hub","aria-labelledby":"medical-ai-hub-title",children:[e.jsxs("div",{className:"medical-ai-hub-heading",children:[e.jsx("span",{children:"Medical AI directory"}),e.jsx("h2",{id:"medical-ai-hub-title",children:"Explore Healthcare & Medical AI"}),e.jsx("p",{children:"Browse the field by clinical application, language, vision, or multimodal reasoning."})]}),e.jsx("div",{className:"medical-ai-hub-grid",children:Zs.map(n=>{const i=r.get(n.slug),o=e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"medical-ai-hub-card-eyebrow",children:n.eyebrow}),e.jsx("strong",{children:n.title}),e.jsx("span",{className:"medical-ai-hub-card-description",children:n.description}),e.jsxs("span",{className:"medical-ai-hub-card-meta",children:[(i==null?void 0:i.paper_count)!=null?`${i.paper_count.toLocaleString()} papers`:"Explore task",e.jsx(re,{size:14,"aria-hidden":"true"})]})]});return n.slug==="healthcare"?e.jsx("a",{href:n.href,className:"medical-ai-hub-card",children:o},n.slug):e.jsx(C,{to:n.href,className:"medical-ai-hub-card",children:o},n.slug)})})]})},ra=a=>[...a].sort((c,r)=>{const n=c.slug==="classic-language-modeling",i=r.slug==="classic-language-modeling";return n!==i?n?1:-1:0}),Fa=()=>{var xe,be,fe;const{taskSlug:a}=cs(),c=is(),[r,n]=ls(),i=Xs(r.get("order_by")),o=r.get("has_code")==="true",m=r.get("has_hf_artifacts")==="true",p=fs(r),b=s=>{const t=new URLSearchParams(r);t.set("order_by",s),n(t)},x=s=>{const t=new URLSearchParams(r);s?t.set("has_code","true"):t.delete("has_code"),n(t)},N=s=>{const t=new URLSearchParams(r);s?t.set("has_hf_artifacts","true"):t.delete("has_hf_artifacts"),n(t)},[j,T]=u.useState(!1),[P,$]=u.useState({}),[R,I]=u.useState(()=>new Set),{preferences:E}=ds(),h=(s,t)=>{const d=s||"";return t?`/benchmark/${d}?task=${encodeURIComponent(t)}`:`/benchmark/${d}`},y=E.hide_closed_source_evals?!0:void 0,f=je({queryKey:["task-page",a,y],queryFn:()=>_e.taskPage(a,{is_open:y}),enabled:!!a,staleTime:10*60*1e3});u.useEffect(()=>{var d;const s=(d=f.data)==null?void 0:d.task.slug;if(!a||!s||s===a)return;const t=r.toString();c(`/tasks/${s}${t?`?${t}`:""}`,{replace:!0})},[c,(xe=f.data)==null?void 0:xe.task.slug,r,a]);const D=je({queryKey:["task-benchmark-trends",a,y],queryFn:()=>_e.trendingBenchmarks(a,{limit:100,min_recent_papers:0,is_open:y}),enabled:!!a,staleTime:10*60*1e3}),M=u.useMemo(()=>{var s;return ra(((s=f.data)==null?void 0:s.children)||[])},[f.data]),L=u.useMemo(()=>{var t;const s=new Map;return(((t=f.data)==null?void 0:t.subtask_benchmarks)||[]).forEach(d=>{s.set(d.subtask_id,d.benchmarks||[])}),s},[f.data]),_=Ns({taskId:a||"",page_size:20,order_by:i,order_dir:"desc",include_resources:!0,has_code:o,has_hf_artifacts:m,start_date:p.startDate,end_date:p.endDate,enabled:!!a}),B=u.useMemo(()=>{var t;return(((t=_.data)==null?void 0:t.pages.flatMap(d=>d.results))||[]).map(ks)},[_.data]),F=u.useMemo(()=>{var t;const s={};return(t=_.data)==null||t.pages.forEach(d=>d.results.forEach(S=>(S.methods||[]).forEach(w=>{const l=w.slug||w.id;s[l]||(s[l]={id:w.id,name:w.name,slug:w.slug||"",count:0}),s[l].count++}))),Object.values(s).sort((d,S)=>S.count-d.count).slice(0,8)},[_.data]),{targetRef:Ke,isIntersecting:me}=ws({rootMargin:"200px"});if(u.useEffect(()=>{me&&_.hasNextPage&&!_.isFetchingNextPage&&_.fetchNextPage()},[me,_.hasNextPage,_.isFetchingNextPage]),f.isLoading)return e.jsxs("div",{className:"page",children:[e.jsx(U,{className:"h-12 w-1/2 mb-4"}),e.jsx(U,{className:"h-6 w-1/3 mb-8"}),e.jsx(U,{className:"h-64 w-full"})]});if(f.error||!f.data)return e.jsx("div",{className:"page",children:e.jsx(Cs,{variant:"destructive",children:e.jsx(ys,{children:"Task not found."})})});const g=f.data.task,Qe=f.data.parents||[],W=O(g.name,g.slug),Y=(f.data.sisters||[]).filter(s=>s.id!==g.id),We=f.data.recommended_frameworks||[],V=f.data.benchmarks||[],pe=new Map(V.map(s=>[s.id,s])),Ye=new Set(V.map(s=>s.id)),he=(((be=D.data)==null?void 0:be.results)||[]).filter(s=>Ye.has(s.id)).map(s=>{const t=pe.get(s.id);return{...s,best_model_name:(t==null?void 0:t.best_model_name)??s.best_model_name,best_paper_route:t==null?void 0:t.best_paper_route,best_paper_title:t==null?void 0:t.best_paper_title,best_code_url:t==null?void 0:t.best_code_url}}),J=he.length?he:V.map(s=>({id:s.id,name:s.name,slug:s.slug,full_name:s.full_name,recent_paper_count:0,baseline_paper_count:0,all_time_paper_count:s.paper_count||0,trend_score:0,support_weighted_score:0,rate_change:null,latest_reported_on:null,best_model_name:s.best_model_name,best_paper_route:s.best_paper_route,best_paper_title:s.best_paper_title,best_code_url:s.best_code_url,history:[]})),q=Is(J,s=>{var t;return(t=pe.get(s.id))==null?void 0:t.parent_dataset_id}),Je=j?q:q.slice(0,5),Xe=q.slice(5).reduce((s,t)=>s+t.members.length,0),ue=((fe=D.data)==null?void 0:fe.recent_days)||90,Ze=M.some(s=>(L.get(s.id)||[]).length>0),es=M.length>0,ge=J.length>0,ss=(()=>{const s=new Set;return V.forEach(t=>s.add(t.id)),L.forEach(t=>t.forEach(d=>s.add(d.id))),s.size})(),as=s=>{I(t=>{const d=new Set(t);return d.has(s)?d.delete(s):d.add(s),d})};return e.jsxs("div",{className:"page",children:[e.jsx(aa,{task:g,area:f.data.area,parents:Qe}),e.jsxs("div",{className:g.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:"TASK"}),e.jsx("h1",{className:"domain-mega-title",children:W}),e.jsx(ps,{kind:"task",entityId:g.id}),g.description&&e.jsx(Z,{className:"task-explainer",text:g.description}),g.research_trends&&g.research_trends.length>0&&e.jsx(Ys,{className:"task-research-trends",type:"single",collapsible:!0,children:e.jsxs(Ue,{className:"task-research-trends-item",value:"key-trends",children:[e.jsx(ze,{className:"task-research-trends-trigger",children:e.jsx("span",{className:"task-research-trends-title",children:"Key trends"})}),e.jsx(Ge,{className:"task-research-trends-content",children:e.jsx("ul",{children:g.research_trends.map((s,t)=>e.jsx("li",{children:e.jsx(Z,{text:s})},t))})})]})}),e.jsxs("div",{className:"task-quickstats",children:[e.jsxs("span",{children:[e.jsx("span",{className:"num",children:(g.paper_count??0).toLocaleString()}),"PAPERS"]}),e.jsxs("span",{children:[e.jsx("span",{className:"num",children:ss}),"BENCHMARKS"]}),e.jsxs("span",{children:[e.jsxs("span",{className:"num",children:[F.length,"+"]}),"METHODS USED"]})]}),e.jsx(sa,{frameworks:We})]}),g.image_url&&e.jsxs("figure",{className:`task-figure-card${g.slug==="omni-models"?" task-figure-card--compact":""}`,children:[e.jsx("div",{className:"task-figure-img-wrap",children:e.jsx("img",{className:"task-figure-img",src:ms(g.image_url)??void 0,alt:`${W} schematic`,onError:s=>{var t,d;(d=(t=s.currentTarget.parentElement)==null?void 0:t.parentElement)==null||d.style.setProperty("display","none")}})}),e.jsxs("figcaption",{children:["Figure · ",W,g.image_credit&&e.jsxs(e.Fragment,{children:[e.jsx("br",{}),e.jsx(Z,{className:"task-image-credit",text:g.image_credit})]})]})]})]}),g.slug==="healthcare"&&e.jsx(ta,{task:g,relatedTasks:Y}),g.slug==="robotics"&&e.jsx(Ps,{}),e.jsxs("div",{className:"task-page-grid",style:{marginTop:28},children:[e.jsxs("div",{children:[ge&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"task-section-head",id:"benchmarks",children:[e.jsxs("div",{className:"task-section-eyebrow",children:[ue,"-day reporting activity · select a benchmark"]}),e.jsxs("div",{className:"task-section-title",children:["Benchmarks ",e.jsxs("span",{className:"meta",children:["[",J.length,"]"]})]})]}),e.jsxs("div",{className:"benchmark-trend-table",role:"table","aria-label":"Trending benchmarks",children:[e.jsxs("div",{className:"benchmark-trend-head",role:"row",children:[e.jsx("span",{role:"columnheader",children:"Trend"}),e.jsx("span",{role:"columnheader",children:"Benchmark"}),e.jsx("span",{role:"columnheader",children:"Best model"}),e.jsx("span",{role:"columnheader",children:"Paper title"}),e.jsx("span",{role:"columnheader",children:"Code"}),e.jsx("span",{role:"columnheader",children:"Compare"})]}),Je.map(({key:s,members:t})=>{const d=t[0],S=v=>v===d?"standard":Rs(v.name,d.name),w=[d,...t.slice(1).sort((v,X)=>S(v).localeCompare(S(X),void 0,{sensitivity:"base"}))],l=w.find(v=>v.id===P[s])??d;return e.jsxs("div",{className:"benchmark-trend-row",role:"row",children:[e.jsxs("div",{className:"benchmark-trend-cell",role:"cell",children:[e.jsx(xs,{history:l.history,benchmarkName:l.name}),e.jsxs("div",{className:"benchmark-trend-meta",children:[e.jsxs("span",{children:[e.jsx("strong",{children:l.recent_paper_count})," ",l.recent_paper_count===1?"paper":"papers"," /"," ",ue,"d"]}),l.rate_change==null?l.recent_paper_count>0&&e.jsx("span",{className:"benchmark-trend-change is-new",children:"new"}):e.jsxs("span",{className:`benchmark-trend-change ${l.rate_change>=1?"is-up":"is-down"}`,children:[l.rate_change>=1?"↑":"↓"," ",l.rate_change.toFixed(1),"×"]})]})]}),e.jsxs("div",{className:"benchmark-trend-benchmark",role:"cell",children:[e.jsx(C,{className:"bench-row-name",to:h(l.slug||l.id,a),children:l.name}),w.length>1&&e.jsx("div",{className:"bench-row-variants",role:"group","aria-label":`Evaluation protocols for ${d.name}`,children:w.map(v=>e.jsx("button",{type:"button",className:"bench-row-variant","aria-pressed":v.id===l.id,title:v.name,onClick:()=>$(X=>({...X,[s]:v.id})),children:S(v)},v.id))}),e.jsx("div",{className:"bench-row-sub",children:e.jsxs("span",{children:[e.jsx("strong",{children:l.all_time_paper_count})," reporting papers"]})})]}),e.jsx("div",{className:"bench-row-best",role:"cell",children:l.best_model_name?e.jsxs(e.Fragment,{children:[e.jsx(gs,{size:13,className:"bench-row-best-icon"}),e.jsx("span",{className:"bench-row-best-name",children:l.best_model_name})]}):e.jsx("span",{className:"bench-row-best-empty",children:"—"})}),e.jsx("div",{className:"bench-row-paper",role:"cell",children:l.best_paper_route&&l.best_paper_title?e.jsx(C,{to:`/paper/${encodeURIComponent(l.best_paper_route)}`,children:l.best_paper_title}):e.jsx("span",{className:"bench-row-best-empty",children:"—"})}),e.jsx("div",{className:"bench-row-code",role:"cell",children:l.best_code_url?e.jsx("a",{href:l.best_code_url,target:"_blank",rel:"noopener noreferrer","aria-label":`Code for ${l.best_paper_title||l.best_model_name}`,children:e.jsx(Ss,{size:18,strokeWidth:1.8,"aria-hidden":"true"})}):e.jsx("span",{className:"bench-row-best-empty",children:"—"})}),e.jsx("div",{className:"bench-row-compare",role:"cell",children:e.jsxs(C,{to:h(l.slug||l.id,a),"aria-label":`Compare ${l.best_model_name||"the best model"} with all results on ${l.name}`,children:[e.jsx("span",{children:"See all"}),e.jsx(re,{size:11,strokeWidth:2,"aria-hidden":"true"})]})})]},s)})]}),q.length>5&&e.jsx("button",{type:"button",className:"bench-show-more",onClick:()=>T(s=>!s),children:j?"− show top 5":`+ show ${Xe} more benchmarks`})]}),es&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"task-section-head",style:ge?{marginTop:36}:void 0,children:[e.jsx("div",{className:"task-section-eyebrow",children:Ze?"Benchmarks by capability":"Task hierarchy"}),e.jsxs("div",{className:"task-section-title",children:["Subtasks ",e.jsxs("span",{className:"meta",children:["[",M.length,"]"]})]})]}),e.jsx("div",{className:"subtask-grid",children:M.map(s=>{const t=L.get(s.id)||[],d=R.has(s.id),S=d?t:t.slice(0,ee),w=t.length-ee;return e.jsxs("div",{className:"subtask-section",children:[e.jsxs("div",{className:"subtask-head",children:[e.jsx(C,{to:`/tasks/${s.slug||s.id}`,className:"subtask-head-name",children:O(s.name,s.slug)}),e.jsx("span",{className:"subtask-head-meta",children:t.length>0?`[${t.length} benchmark${t.length===1?"":"s"}]`:`[${(s.paper_count??0).toLocaleString()} papers]`})]}),S.length>0?S.map((l,v)=>e.jsxs("div",{className:"bench-row",onClick:()=>c(h(l.slug||l.id,s.slug||s.id)),children:[e.jsx("div",{className:"bench-row-num",children:String(v+1).padStart(2,"0")}),e.jsxs("div",{className:"bench-row-main",children:[e.jsx("div",{className:"bench-row-name",children:l.name}),e.jsx("div",{className:"bench-row-sub",children:l.paper_count!=null&&e.jsxs("span",{children:[e.jsx("strong",{children:l.paper_count})," ENTRIES"]})})]}),e.jsx("div",{className:"bench-row-arrow",children:"→"})]},l.id)):e.jsxs(C,{to:`/tasks/${s.slug||s.id}`,className:"subtask-summary",children:[e.jsxs("span",{children:[(s.paper_count??0).toLocaleString()," papers"]}),s.description&&e.jsx("span",{className:"subtask-summary-desc",children:s.description})]}),w>0&&e.jsx("button",{type:"button",className:"bench-show-more",onClick:()=>as(s.id),children:d?`− show top ${ee}`:`+ show ${w} more benchmark${w===1?"":"s"}`})]},s.id)})})]}),e.jsxs("div",{className:"task-section-head",style:{marginTop:36},children:[e.jsx("div",{className:"task-section-eyebrow",children:"Top trending · sort below"}),e.jsxs("div",{className:"task-section-title",children:["Papers ",e.jsxs("span",{className:"meta",children:["[",(g.paper_count??0).toLocaleString(),"]"]})]})]}),e.jsxs("div",{className:"sort-bar",children:[e.jsxs("div",{className:"paper-feed-toolbar-controls",children:[e.jsx("div",{className:"sort-options",children:Js.map(([s,t])=>e.jsx("button",{className:`sort-btn ${i===s?"active":""}`,onClick:()=>b(s),children:t},s))}),e.jsx(bs,{hasCode:o,hasHfArtifacts:m,onHasCodeChange:x,onHasHfArtifactsChange:N})]}),e.jsx(js,{startDate:p.startDate,endDate:p.endDate,onChange:s=>n(_s(r,s))})]}),_.isLoading?e.jsx("div",{className:"paper-list",children:Array.from({length:4}).map((s,t)=>e.jsx(U,{className:"h-40 w-full"},t))}):B.length===0?e.jsx("div",{className:"no-results",children:"No papers in this task yet."}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"paper-list",children:B.map((s,t)=>e.jsx(hs,{paper:s,rank:t+1},s.id))}),e.jsx("div",{ref:Ke,style:{height:1}}),_.isFetchingNextPage&&e.jsx("div",{style:{padding:"20px 0",textAlign:"center",color:"var(--ink-faint)"},children:"Loading more…"})]})]}),e.jsxs("aside",{className:"task-side",children:[Y.length>0&&g.slug!=="healthcare"&&e.jsxs("div",{className:"side-block",children:[e.jsx("div",{className:"side-block-num",children:"01/"}),e.jsx("div",{className:"side-block-label",children:"Sister Tasks"}),Y.slice(0,8).map(s=>e.jsxs(C,{to:`/tasks/${s.slug||s.id}`,className:"side-link-row",children:[e.jsx("span",{children:O(s.name,s.slug)}),s.paper_count!=null&&e.jsx("span",{className:"count",children:s.paper_count.toLocaleString()})]},s.id))]}),F.length>0&&e.jsxs("div",{className:"side-block",children:[e.jsx("div",{className:"side-block-num",children:"02/"}),e.jsx("div",{className:"side-block-label",children:"Common Methods"}),F.map(s=>e.jsxs("div",{className:"side-method-row",children:[e.jsx(us,{method:{slug:s.slug,name:s.name}}),e.jsxs("span",{className:"num",children:["·",s.count]})]},s.id))]})]})]})]})};export{ta as HealthcareMedicalAiHub,sa as RecommendedFrameworkLinks,aa as TaskBreadcrumb,Fa as default}; +import{j as e,L as C,r as u,q as ae,p as H,a1 as ke,t as Ne,P as ts,w as we,s as Ce,a2 as rs,F as k,a3 as ns,z as os,x as te,u as cs,b as is,d as ls,k as ds,U as ms}from"./index-hxawG6mk.js";import{R as ps}from"./ResearchFollowButton-uts1MEpQ.js";import{u as je}from"./useQuery-B7vCF2Os.js";import{P as hs,M as us}from"./components-Djdw_Z-e.js";import{A as re,T as gs}from"./trophy-DQthGapR.js";import{B as xs}from"./BenchmarkTrendSparkline-CKdWZt_L.js";import{P as bs}from"./PaperFeedFilters-BsWw60hu.js";import{a as fs,P as js,b as _s}from"./PaperDateFilter-CmJ1wf5w.js";import{M as Z}from"./MarkdownText-C2hX4LYt.js";import{c as _e}from"./catalog-ePebz7GX.js";import{s as vs}from"./slug-BpH-Nkvz.js";import{d as O,t as ks}from"./transform-DfrN0kQW.js";import{c as Ns}from"./usePapers-K74IxnFM.js";import{u as ws}from"./useIntersectionObserver-rTEWxOEQ.js";import{S as U}from"./skeleton-CRfsRMNe.js";import{A as Cs,a as ys}from"./alert-2LCyXuCE.js";import{C as As}from"./chevron-down-dhq7I8yA.js";import{G as Ss}from"./github-C-cqt6uw.js";import"./useMutation-gPqxjZGO.js";import"./research-25A5rLuK.js";import"./plus-C1naIkSJ.js";import"./paperQueryKeys-BP2E-0yf.js";import"./LatexTitle-QTkECjbh.js";import"./papers-B0ysePyJ.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-BEdoEHfx.js";/* empty css */import"./PaperPreviewLink-BJhSzNVs.js";import"./index-CaRYlo5c.js";import"./index-Ddr0k9KU.js";import"./katex-DkKDou_j.js";import"./hover-card-DEHIu6q-.js";import"./useInfiniteQuery-BIEmOe8z.js";const Ps=()=>e.jsxs(C,{to:"/astra-for-robotics",className:"task-featured-collection","aria-label":"Featured collection: GPT-6 Astra for Robotics",children:[e.jsx("span",{className:"task-featured-collection-eyebrow",children:"Featured collection"}),e.jsx("strong",{children:"GPT-6 Astra for Robotics"}),e.jsx("span",{className:"task-featured-collection-description",children:"Papers and demos that put GPT-6 Astra in control of real and simulated robots, as the policy itself or as an agent orchestrating the stack."}),e.jsxs("span",{className:"task-featured-collection-meta",children:["Explore the collection",e.jsx(re,{size:14,"aria-hidden":"true"})]})]}),ve=a=>{const c=a.match(/\(([^()]*)\)\s*$/);return c?c[1].split(",").map(r=>r.trim()).filter(Boolean):[]};function Rs(a,c){const r=ve(a);if(c===void 0)return"standard";const n=new Set(ve(c).map(o=>o.toLowerCase())),i=r.filter(o=>!n.has(o.toLowerCase()));return i.length?i.join(", "):a}function Is(a,c){const r=new Map(a.map(o=>[o.id,o])),n=o=>{const m=new Set([o.id]);let p=o;for(;;){const b=c(p),x=b?r.get(b):void 0;if(!x)return p.id;if(m.has(x.id))return o.id;m.add(x.id),p=x}},i=new Map;return a.forEach(o=>{const m=n(o);i.set(m,[...i.get(m)||[],o])}),[...i].map(([o,m])=>({key:o,members:[r.get(o),...m.filter(p=>p.id!==o)]}))}var G="Collapsible",[Es,ye]=we(G),[Ts,ne]=Es(G),Ae=u.forwardRef((a,c)=>{const{__scopeCollapsible:r,open:n,defaultOpen:i,disabled:o,onOpenChange:m,...p}=a,[b,x]=ae({prop:n,defaultProp:i??!1,onChange:m,caller:G});return e.jsx(Ts,{scope:r,disabled:o,contentId:ke(),open:b,onOpenToggle:u.useCallback(()=>x(N=>!N),[x]),children:e.jsx(H.div,{"data-state":ce(b),"data-disabled":o?"":void 0,...p,ref:c})})});Ae.displayName=G;var Se="CollapsibleTrigger",Pe=u.forwardRef((a,c)=>{const{__scopeCollapsible:r,...n}=a,i=ne(Se,r);return e.jsx(H.button,{type:"button","aria-controls":i.contentId,"aria-expanded":i.open||!1,"data-state":ce(i.open),"data-disabled":i.disabled?"":void 0,disabled:i.disabled,...n,ref:c,onClick:Ne(a.onClick,i.onOpenToggle)})});Pe.displayName=Se;var oe="CollapsibleContent",Re=u.forwardRef((a,c)=>{const{forceMount:r,...n}=a,i=ne(oe,a.__scopeCollapsible);return e.jsx(ts,{present:r||i.open,children:({present:o})=>e.jsx(Ms,{...n,ref:c,present:o})})});Re.displayName=oe;var Ms=u.forwardRef((a,c)=>{const{__scopeCollapsible:r,present:n,children:i,...o}=a,m=ne(oe,r),[p,b]=u.useState(n),x=u.useRef(null),N=Ce(c,x),j=u.useRef(0),T=j.current,P=u.useRef(0),$=P.current,R=m.open||p,I=u.useRef(R),E=u.useRef(void 0);return u.useEffect(()=>{const h=requestAnimationFrame(()=>I.current=!1);return()=>cancelAnimationFrame(h)},[]),rs(()=>{const h=x.current;if(h){E.current=E.current||{transitionDuration:h.style.transitionDuration,animationName:h.style.animationName},h.style.transitionDuration="0s",h.style.animationName="none";const y=h.getBoundingClientRect();j.current=y.height,P.current=y.width,I.current||(h.style.transitionDuration=E.current.transitionDuration,h.style.animationName=E.current.animationName),b(n)}},[m.open,n]),e.jsx(H.div,{"data-state":ce(m.open),"data-disabled":m.disabled?"":void 0,id:m.contentId,hidden:!R,...o,ref:N,style:{"--radix-collapsible-content-height":T?`${T}px`:void 0,"--radix-collapsible-content-width":$?`${$}px`:void 0,...a.style},children:R&&i})});function ce(a){return a?"open":"closed"}var $s=Ae,Ds=Pe,Bs=Re,A="Accordion",Fs=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[ie,Ls,Os]=ns(A),[K]=we(A,[Os,ye]),le=ye(),Ie=k.forwardRef((a,c)=>{const{type:r,...n}=a,i=n,o=n;return e.jsx(ie.Provider,{scope:a.__scopeAccordion,children:r==="multiple"?e.jsx(Us,{...o,ref:c}):e.jsx(qs,{...i,ref:c})})});Ie.displayName=A;var[Ee,Hs]=K(A),[Te,Vs]=K(A,{collapsible:!1}),qs=k.forwardRef((a,c)=>{const{value:r,defaultValue:n,onValueChange:i=()=>{},collapsible:o=!1,...m}=a,[p,b]=ae({prop:r,defaultProp:n??"",onChange:i,caller:A});return e.jsx(Ee,{scope:a.__scopeAccordion,value:k.useMemo(()=>p?[p]:[],[p]),onItemOpen:b,onItemClose:k.useCallback(()=>o&&b(""),[o,b]),children:e.jsx(Te,{scope:a.__scopeAccordion,collapsible:o,children:e.jsx(Me,{...m,ref:c})})})}),Us=k.forwardRef((a,c)=>{const{value:r,defaultValue:n,onValueChange:i=()=>{},...o}=a,[m,p]=ae({prop:r,defaultProp:n??[],onChange:i,caller:A}),b=k.useCallback(N=>p((j=[])=>[...j,N]),[p]),x=k.useCallback(N=>p((j=[])=>j.filter(T=>T!==N)),[p]);return e.jsx(Ee,{scope:a.__scopeAccordion,value:m,onItemOpen:b,onItemClose:x,children:e.jsx(Te,{scope:a.__scopeAccordion,collapsible:!0,children:e.jsx(Me,{...o,ref:c})})})}),[zs,Q]=K(A),Me=k.forwardRef((a,c)=>{const{__scopeAccordion:r,disabled:n,dir:i,orientation:o="vertical",...m}=a,p=k.useRef(null),b=Ce(p,c),x=Ls(r),j=os(i)==="ltr",T=Ne(a.onKeyDown,P=>{var _;if(!Fs.includes(P.key))return;const $=P.target,R=x().filter(B=>{var F;return!((F=B.ref.current)!=null&&F.disabled)}),I=R.findIndex(B=>B.ref.current===$),E=R.length;if(I===-1)return;P.preventDefault();let h=I;const y=0,f=E-1,D=()=>{h=I+1,h>f&&(h=y)},M=()=>{h=I-1,h{const{__scopeAccordion:r,value:n,...i}=a,o=Q(z,r),m=Hs(z,r),p=le(r),b=ke(),x=n&&m.value.includes(n)||!1,N=o.disabled||a.disabled;return e.jsx(Gs,{scope:r,open:x,disabled:N,triggerId:b,children:e.jsx($s,{"data-orientation":o.orientation,"data-state":He(x),...p,...i,ref:c,disabled:N,open:x,onOpenChange:j=>{j?m.onItemOpen(n):m.onItemClose(n)}})})});$e.displayName=z;var De="AccordionHeader",Be=k.forwardRef((a,c)=>{const{__scopeAccordion:r,...n}=a,i=Q(A,r),o=de(De,r);return e.jsx(H.h3,{"data-orientation":i.orientation,"data-state":He(o.open),"data-disabled":o.disabled?"":void 0,...n,ref:c})});Be.displayName=De;var se="AccordionTrigger",Fe=k.forwardRef((a,c)=>{const{__scopeAccordion:r,...n}=a,i=Q(A,r),o=de(se,r),m=Vs(se,r),p=le(r);return e.jsx(ie.ItemSlot,{scope:r,children:e.jsx(Ds,{"aria-disabled":o.open&&!m.collapsible||void 0,"data-orientation":i.orientation,id:o.triggerId,...p,...n,ref:c})})});Fe.displayName=se;var Le="AccordionContent",Oe=k.forwardRef((a,c)=>{const{__scopeAccordion:r,...n}=a,i=Q(A,r),o=de(Le,r),m=le(r);return e.jsx(Bs,{role:"region","aria-labelledby":o.triggerId,"data-orientation":i.orientation,...m,...n,ref:c,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...a.style}})});Oe.displayName=Le;function He(a){return a?"open":"closed"}var Ks=Ie,Qs=$e,Ws=Be,Ve=Fe,qe=Oe;const Ys=Ks,Ue=u.forwardRef(({className:a,...c},r)=>e.jsx(Qs,{ref:r,className:te("border-b",a),...c}));Ue.displayName="AccordionItem";const ze=u.forwardRef(({className:a,children:c,...r},n)=>e.jsx(Ws,{className:"flex",children:e.jsxs(Ve,{ref:n,className:te("flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",a),...r,children:[c,e.jsx(As,{className:"h-4 w-4 shrink-0 transition-transform duration-200"})]})}));ze.displayName=Ve.displayName;const Ge=u.forwardRef(({className:a,children:c,...r},n)=>e.jsx(qe,{ref:n,className:"overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...r,children:e.jsx("div",{className:te("pb-4 pt-0",a),children:c})}));Ge.displayName=qe.displayName;const Js=[["trending","trending"],["date_published","newest"],["citation_count","most cited"]],Xs=a=>a==="trending"||a==="date_published"||a==="citation_count"?a:"trending",ee=3,Zs=[{slug:"healthcare",eyebrow:"Clinical systems",title:"Clinical AI & Healthcare",description:"Agents, clinical workflows, medical calculators, safety, and decision support.",href:"#benchmarks"},{slug:"medical-question-answering",eyebrow:"Language & reasoning",title:"Medical Question Answering",description:"Medical exams, biomedical evidence, clinical comprehension, and explanations.",href:"/tasks/medical-question-answering"},{slug:"medical-imaging",eyebrow:"Vision",title:"Medical Imaging",description:"Radiology, pathology, ophthalmology, ultrasound, and diagnostic imaging.",href:"/tasks/medical-imaging"},{slug:"medical-visual-question-answering",eyebrow:"Multimodal",title:"Medical Visual Question Answering",description:"Questions grounded in radiology, pathology, and other biomedical images.",href:"/tasks/medical-visual-question-answering"}],ea=a=>new Intl.NumberFormat("en",{notation:a>=1e3?"compact":"standard",maximumFractionDigits:1}).format(a),sa=({frameworks:a})=>a.length===0?null:e.jsxs("div",{className:"task-framework-links",children:[e.jsx("span",{className:"task-framework-links-label",children:"Recommended frameworks"}),a.map(c=>e.jsxs(C,{to:`/papers?framework=${encodeURIComponent(c.framework_slug)}`,className:"task-framework-link",children:[e.jsx("span",{children:c.framework_name}),e.jsxs("span",{className:"task-framework-link-stars",children:["★ ",ea(c.num_stars)]})]},c.framework_id))]}),aa=({task:a,area:c,parents:r})=>e.jsxs("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:[e.jsx(C,{to:"/tasks",children:"Tasks"}),c&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"sep",children:"/"}),e.jsx(C,{to:`/tasks#area-${vs(c.name)}`,children:c.name})]}),[...r].reverse().map(n=>e.jsxs(k.Fragment,{children:[e.jsx("span",{className:"sep",children:"/"}),e.jsx(C,{to:`/tasks/${n.slug||n.id}`,children:O(n.name,n.slug)})]},n.id)),e.jsx("span",{className:"sep",children:"/"}),e.jsx("span",{style:{color:"var(--accent-text)"},children:O(a.name,a.slug)})]}),ta=({task:a,relatedTasks:c})=>{const r=new Map([a,...c].map(n=>[n.slug,n]));return e.jsxs("section",{className:"medical-ai-hub","aria-labelledby":"medical-ai-hub-title",children:[e.jsxs("div",{className:"medical-ai-hub-heading",children:[e.jsx("span",{children:"Medical AI directory"}),e.jsx("h2",{id:"medical-ai-hub-title",children:"Explore Healthcare & Medical AI"}),e.jsx("p",{children:"Browse the field by clinical application, language, vision, or multimodal reasoning."})]}),e.jsx("div",{className:"medical-ai-hub-grid",children:Zs.map(n=>{const i=r.get(n.slug),o=e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"medical-ai-hub-card-eyebrow",children:n.eyebrow}),e.jsx("strong",{children:n.title}),e.jsx("span",{className:"medical-ai-hub-card-description",children:n.description}),e.jsxs("span",{className:"medical-ai-hub-card-meta",children:[(i==null?void 0:i.paper_count)!=null?`${i.paper_count.toLocaleString()} papers`:"Explore task",e.jsx(re,{size:14,"aria-hidden":"true"})]})]});return n.slug==="healthcare"?e.jsx("a",{href:n.href,className:"medical-ai-hub-card",children:o},n.slug):e.jsx(C,{to:n.href,className:"medical-ai-hub-card",children:o},n.slug)})})]})},ra=a=>[...a].sort((c,r)=>{const n=c.slug==="classic-language-modeling",i=r.slug==="classic-language-modeling";return n!==i?n?1:-1:0}),Fa=()=>{var xe,be,fe;const{taskSlug:a}=cs(),c=is(),[r,n]=ls(),i=Xs(r.get("order_by")),o=r.get("has_code")==="true",m=r.get("has_hf_artifacts")==="true",p=fs(r),b=s=>{const t=new URLSearchParams(r);t.set("order_by",s),n(t)},x=s=>{const t=new URLSearchParams(r);s?t.set("has_code","true"):t.delete("has_code"),n(t)},N=s=>{const t=new URLSearchParams(r);s?t.set("has_hf_artifacts","true"):t.delete("has_hf_artifacts"),n(t)},[j,T]=u.useState(!1),[P,$]=u.useState({}),[R,I]=u.useState(()=>new Set),{preferences:E}=ds(),h=(s,t)=>{const d=s||"";return t?`/benchmark/${d}?task=${encodeURIComponent(t)}`:`/benchmark/${d}`},y=E.hide_closed_source_evals?!0:void 0,f=je({queryKey:["task-page",a,y],queryFn:()=>_e.taskPage(a,{is_open:y}),enabled:!!a,staleTime:10*60*1e3});u.useEffect(()=>{var d;const s=(d=f.data)==null?void 0:d.task.slug;if(!a||!s||s===a)return;const t=r.toString();c(`/tasks/${s}${t?`?${t}`:""}`,{replace:!0})},[c,(xe=f.data)==null?void 0:xe.task.slug,r,a]);const D=je({queryKey:["task-benchmark-trends",a,y],queryFn:()=>_e.trendingBenchmarks(a,{limit:100,min_recent_papers:0,is_open:y}),enabled:!!a,staleTime:10*60*1e3}),M=u.useMemo(()=>{var s;return ra(((s=f.data)==null?void 0:s.children)||[])},[f.data]),L=u.useMemo(()=>{var t;const s=new Map;return(((t=f.data)==null?void 0:t.subtask_benchmarks)||[]).forEach(d=>{s.set(d.subtask_id,d.benchmarks||[])}),s},[f.data]),_=Ns({taskId:a||"",page_size:20,order_by:i,order_dir:"desc",include_resources:!0,has_code:o,has_hf_artifacts:m,start_date:p.startDate,end_date:p.endDate,enabled:!!a}),B=u.useMemo(()=>{var t;return(((t=_.data)==null?void 0:t.pages.flatMap(d=>d.results))||[]).map(ks)},[_.data]),F=u.useMemo(()=>{var t;const s={};return(t=_.data)==null||t.pages.forEach(d=>d.results.forEach(S=>(S.methods||[]).forEach(w=>{const l=w.slug||w.id;s[l]||(s[l]={id:w.id,name:w.name,slug:w.slug||"",count:0}),s[l].count++}))),Object.values(s).sort((d,S)=>S.count-d.count).slice(0,8)},[_.data]),{targetRef:Ke,isIntersecting:me}=ws({rootMargin:"200px"});if(u.useEffect(()=>{me&&_.hasNextPage&&!_.isFetchingNextPage&&_.fetchNextPage()},[me,_.hasNextPage,_.isFetchingNextPage]),f.isLoading)return e.jsxs("div",{className:"page",children:[e.jsx(U,{className:"h-12 w-1/2 mb-4"}),e.jsx(U,{className:"h-6 w-1/3 mb-8"}),e.jsx(U,{className:"h-64 w-full"})]});if(f.error||!f.data)return e.jsx("div",{className:"page",children:e.jsx(Cs,{variant:"destructive",children:e.jsx(ys,{children:"Task not found."})})});const g=f.data.task,Qe=f.data.parents||[],W=O(g.name,g.slug),Y=(f.data.sisters||[]).filter(s=>s.id!==g.id),We=f.data.recommended_frameworks||[],V=f.data.benchmarks||[],pe=new Map(V.map(s=>[s.id,s])),Ye=new Set(V.map(s=>s.id)),he=(((be=D.data)==null?void 0:be.results)||[]).filter(s=>Ye.has(s.id)).map(s=>{const t=pe.get(s.id);return{...s,best_model_name:(t==null?void 0:t.best_model_name)??s.best_model_name,best_paper_route:t==null?void 0:t.best_paper_route,best_paper_title:t==null?void 0:t.best_paper_title,best_code_url:t==null?void 0:t.best_code_url}}),J=he.length?he:V.map(s=>({id:s.id,name:s.name,slug:s.slug,full_name:s.full_name,recent_paper_count:0,baseline_paper_count:0,all_time_paper_count:s.paper_count||0,trend_score:0,support_weighted_score:0,rate_change:null,latest_reported_on:null,best_model_name:s.best_model_name,best_paper_route:s.best_paper_route,best_paper_title:s.best_paper_title,best_code_url:s.best_code_url,history:[]})),q=Is(J,s=>{var t;return(t=pe.get(s.id))==null?void 0:t.parent_dataset_id}),Je=j?q:q.slice(0,5),Xe=q.slice(5).reduce((s,t)=>s+t.members.length,0),ue=((fe=D.data)==null?void 0:fe.recent_days)||90,Ze=M.some(s=>(L.get(s.id)||[]).length>0),es=M.length>0,ge=J.length>0,ss=(()=>{const s=new Set;return V.forEach(t=>s.add(t.id)),L.forEach(t=>t.forEach(d=>s.add(d.id))),s.size})(),as=s=>{I(t=>{const d=new Set(t);return d.has(s)?d.delete(s):d.add(s),d})};return e.jsxs("div",{className:"page",children:[e.jsx(aa,{task:g,area:f.data.area,parents:Qe}),e.jsxs("div",{className:g.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:"TASK"}),e.jsx("h1",{className:"domain-mega-title",children:W}),e.jsx(ps,{kind:"task",entityId:g.id}),g.description&&e.jsx(Z,{className:"task-explainer",text:g.description}),g.research_trends&&g.research_trends.length>0&&e.jsx(Ys,{className:"task-research-trends",type:"single",collapsible:!0,children:e.jsxs(Ue,{className:"task-research-trends-item",value:"key-trends",children:[e.jsx(ze,{className:"task-research-trends-trigger",children:e.jsx("span",{className:"task-research-trends-title",children:"Key trends"})}),e.jsx(Ge,{className:"task-research-trends-content",children:e.jsx("ul",{children:g.research_trends.map((s,t)=>e.jsx("li",{children:e.jsx(Z,{text:s})},t))})})]})}),e.jsxs("div",{className:"task-quickstats",children:[e.jsxs("span",{children:[e.jsx("span",{className:"num",children:(g.paper_count??0).toLocaleString()}),"PAPERS"]}),e.jsxs("span",{children:[e.jsx("span",{className:"num",children:ss}),"BENCHMARKS"]}),e.jsxs("span",{children:[e.jsxs("span",{className:"num",children:[F.length,"+"]}),"METHODS USED"]})]}),e.jsx(sa,{frameworks:We})]}),g.image_url&&e.jsxs("figure",{className:`task-figure-card${g.slug==="omni-models"?" task-figure-card--compact":""}`,children:[e.jsx("div",{className:"task-figure-img-wrap",children:e.jsx("img",{className:"task-figure-img",src:ms(g.image_url)??void 0,alt:`${W} schematic`,onError:s=>{var t,d;(d=(t=s.currentTarget.parentElement)==null?void 0:t.parentElement)==null||d.style.setProperty("display","none")}})}),e.jsxs("figcaption",{children:["Figure · ",W,g.image_credit&&e.jsxs(e.Fragment,{children:[e.jsx("br",{}),e.jsx(Z,{className:"task-image-credit",text:g.image_credit})]})]})]})]}),g.slug==="healthcare"&&e.jsx(ta,{task:g,relatedTasks:Y}),g.slug==="robotics"&&e.jsx(Ps,{}),e.jsxs("div",{className:"task-page-grid",style:{marginTop:28},children:[e.jsxs("div",{children:[ge&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"task-section-head",id:"benchmarks",children:[e.jsxs("div",{className:"task-section-eyebrow",children:[ue,"-day reporting activity · select a benchmark"]}),e.jsxs("div",{className:"task-section-title",children:["Benchmarks ",e.jsxs("span",{className:"meta",children:["[",J.length,"]"]})]})]}),e.jsxs("div",{className:"benchmark-trend-table",role:"table","aria-label":"Trending benchmarks",children:[e.jsxs("div",{className:"benchmark-trend-head",role:"row",children:[e.jsx("span",{role:"columnheader",children:"Trend"}),e.jsx("span",{role:"columnheader",children:"Benchmark"}),e.jsx("span",{role:"columnheader",children:"Best model"}),e.jsx("span",{role:"columnheader",children:"Paper title"}),e.jsx("span",{role:"columnheader",children:"Code"}),e.jsx("span",{role:"columnheader",children:"Compare"})]}),Je.map(({key:s,members:t})=>{const d=t[0],S=v=>v===d?"standard":Rs(v.name,d.name),w=[d,...t.slice(1).sort((v,X)=>S(v).localeCompare(S(X),void 0,{sensitivity:"base"}))],l=w.find(v=>v.id===P[s])??d;return e.jsxs("div",{className:"benchmark-trend-row",role:"row",children:[e.jsxs("div",{className:"benchmark-trend-cell",role:"cell",children:[e.jsx(xs,{history:l.history,benchmarkName:l.name}),e.jsxs("div",{className:"benchmark-trend-meta",children:[e.jsxs("span",{children:[e.jsx("strong",{children:l.recent_paper_count})," ",l.recent_paper_count===1?"paper":"papers"," /"," ",ue,"d"]}),l.rate_change==null?l.recent_paper_count>0&&e.jsx("span",{className:"benchmark-trend-change is-new",children:"new"}):e.jsxs("span",{className:`benchmark-trend-change ${l.rate_change>=1?"is-up":"is-down"}`,children:[l.rate_change>=1?"↑":"↓"," ",l.rate_change.toFixed(1),"×"]})]})]}),e.jsxs("div",{className:"benchmark-trend-benchmark",role:"cell",children:[e.jsx(C,{className:"bench-row-name",to:h(l.slug||l.id,a),children:l.name}),w.length>1&&e.jsx("div",{className:"bench-row-variants",role:"group","aria-label":`Evaluation protocols for ${d.name}`,children:w.map(v=>e.jsx("button",{type:"button",className:"bench-row-variant","aria-pressed":v.id===l.id,title:v.name,onClick:()=>$(X=>({...X,[s]:v.id})),children:S(v)},v.id))}),e.jsx("div",{className:"bench-row-sub",children:e.jsxs("span",{children:[e.jsx("strong",{children:l.all_time_paper_count})," reporting papers"]})})]}),e.jsx("div",{className:"bench-row-best",role:"cell",children:l.best_model_name?e.jsxs(e.Fragment,{children:[e.jsx(gs,{size:13,className:"bench-row-best-icon"}),e.jsx("span",{className:"bench-row-best-name",children:l.best_model_name})]}):e.jsx("span",{className:"bench-row-best-empty",children:"—"})}),e.jsx("div",{className:"bench-row-paper",role:"cell",children:l.best_paper_route&&l.best_paper_title?e.jsx(C,{to:`/paper/${encodeURIComponent(l.best_paper_route)}`,children:l.best_paper_title}):e.jsx("span",{className:"bench-row-best-empty",children:"—"})}),e.jsx("div",{className:"bench-row-code",role:"cell",children:l.best_code_url?e.jsx("a",{href:l.best_code_url,target:"_blank",rel:"noopener noreferrer","aria-label":`Code for ${l.best_paper_title||l.best_model_name}`,children:e.jsx(Ss,{size:18,strokeWidth:1.8,"aria-hidden":"true"})}):e.jsx("span",{className:"bench-row-best-empty",children:"—"})}),e.jsx("div",{className:"bench-row-compare",role:"cell",children:e.jsxs(C,{to:h(l.slug||l.id,a),"aria-label":`Compare ${l.best_model_name||"the best model"} with all results on ${l.name}`,children:[e.jsx("span",{children:"See all"}),e.jsx(re,{size:11,strokeWidth:2,"aria-hidden":"true"})]})})]},s)})]}),q.length>5&&e.jsx("button",{type:"button",className:"bench-show-more",onClick:()=>T(s=>!s),children:j?"− show top 5":`+ show ${Xe} more benchmarks`})]}),es&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"task-section-head",style:ge?{marginTop:36}:void 0,children:[e.jsx("div",{className:"task-section-eyebrow",children:Ze?"Benchmarks by capability":"Task hierarchy"}),e.jsxs("div",{className:"task-section-title",children:["Subtasks ",e.jsxs("span",{className:"meta",children:["[",M.length,"]"]})]})]}),e.jsx("div",{className:"subtask-grid",children:M.map(s=>{const t=L.get(s.id)||[],d=R.has(s.id),S=d?t:t.slice(0,ee),w=t.length-ee;return e.jsxs("div",{className:"subtask-section",children:[e.jsxs("div",{className:"subtask-head",children:[e.jsx(C,{to:`/tasks/${s.slug||s.id}`,className:"subtask-head-name",children:O(s.name,s.slug)}),e.jsx("span",{className:"subtask-head-meta",children:t.length>0?`[${t.length} benchmark${t.length===1?"":"s"}]`:`[${(s.paper_count??0).toLocaleString()} papers]`})]}),S.length>0?S.map((l,v)=>e.jsxs("div",{className:"bench-row",onClick:()=>c(h(l.slug||l.id,s.slug||s.id)),children:[e.jsx("div",{className:"bench-row-num",children:String(v+1).padStart(2,"0")}),e.jsxs("div",{className:"bench-row-main",children:[e.jsx("div",{className:"bench-row-name",children:l.name}),e.jsx("div",{className:"bench-row-sub",children:l.paper_count!=null&&e.jsxs("span",{children:[e.jsx("strong",{children:l.paper_count})," ENTRIES"]})})]}),e.jsx("div",{className:"bench-row-arrow",children:"→"})]},l.id)):e.jsxs(C,{to:`/tasks/${s.slug||s.id}`,className:"subtask-summary",children:[e.jsxs("span",{children:[(s.paper_count??0).toLocaleString()," papers"]}),s.description&&e.jsx("span",{className:"subtask-summary-desc",children:s.description})]}),w>0&&e.jsx("button",{type:"button",className:"bench-show-more",onClick:()=>as(s.id),children:d?`− show top ${ee}`:`+ show ${w} more benchmark${w===1?"":"s"}`})]},s.id)})})]}),e.jsxs("div",{className:"task-section-head",style:{marginTop:36},children:[e.jsx("div",{className:"task-section-eyebrow",children:"Top trending · sort below"}),e.jsxs("div",{className:"task-section-title",children:["Papers ",e.jsxs("span",{className:"meta",children:["[",(g.paper_count??0).toLocaleString(),"]"]})]})]}),e.jsxs("div",{className:"sort-bar",children:[e.jsxs("div",{className:"paper-feed-toolbar-controls",children:[e.jsx("div",{className:"sort-options",children:Js.map(([s,t])=>e.jsx("button",{className:`sort-btn ${i===s?"active":""}`,onClick:()=>b(s),children:t},s))}),e.jsx(bs,{hasCode:o,hasHfArtifacts:m,onHasCodeChange:x,onHasHfArtifactsChange:N})]}),e.jsx(js,{startDate:p.startDate,endDate:p.endDate,onChange:s=>n(_s(r,s))})]}),_.isLoading?e.jsx("div",{className:"paper-list",children:Array.from({length:4}).map((s,t)=>e.jsx(U,{className:"h-40 w-full"},t))}):B.length===0?e.jsx("div",{className:"no-results",children:"No papers in this task yet."}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"paper-list",children:B.map((s,t)=>e.jsx(hs,{paper:s,rank:t+1},s.id))}),e.jsx("div",{ref:Ke,style:{height:1}}),_.isFetchingNextPage&&e.jsx("div",{style:{padding:"20px 0",textAlign:"center",color:"var(--ink-faint)"},children:"Loading more…"})]})]}),e.jsxs("aside",{className:"task-side",children:[Y.length>0&&g.slug!=="healthcare"&&e.jsxs("div",{className:"side-block",children:[e.jsx("div",{className:"side-block-num",children:"01/"}),e.jsx("div",{className:"side-block-label",children:"Sister Tasks"}),Y.slice(0,8).map(s=>e.jsxs(C,{to:`/tasks/${s.slug||s.id}`,className:"side-link-row",children:[e.jsx("span",{children:O(s.name,s.slug)}),s.paper_count!=null&&e.jsx("span",{className:"count",children:s.paper_count.toLocaleString()})]},s.id))]}),F.length>0&&e.jsxs("div",{className:"side-block",children:[e.jsx("div",{className:"side-block-num",children:"02/"}),e.jsx("div",{className:"side-block-label",children:"Common Methods"}),F.map(s=>e.jsxs("div",{className:"side-method-row",children:[e.jsx(us,{method:{slug:s.slug,name:s.name}}),e.jsxs("span",{className:"num",children:["·",s.count]})]},s.id))]})]})]})]})};export{ta as HealthcareMedicalAiHub,sa as RecommendedFrameworkLinks,aa as TaskBreadcrumb,Fa as default}; diff --git a/assets/TagsIndexView-D4bDJ7n8.js b/assets/TagsIndexView-B2e1rTXa.js similarity index 79% rename from assets/TagsIndexView-D4bDJ7n8.js rename to assets/TagsIndexView-B2e1rTXa.js index 076bcbcd3dc59c813a2ef06e4db0ab19cd473662..c6b56a5aca309fb9b8dccb8d6222b699bbbb8e03 100644 --- a/assets/TagsIndexView-D4bDJ7n8.js +++ b/assets/TagsIndexView-B2e1rTXa.js @@ -1 +1 @@ -import{r as c,j as s,L as p}from"./index-CnBotBa4.js";import{u as h}from"./useQuery-C8pfCInN.js";import{c as g}from"./catalog-mND3MerS.js";import{c as x,h as f,d as u}from"./transform-DMbrhcTx.js";import{s as j}from"./slug-BpH-Nkvz.js";import{S as d}from"./skeleton-DuOQBmSr.js";import{A as y,a as k}from"./alert-B0qZtPeK.js";import{T as v}from"./TaxonomySuggestionTile-FyHlZUAE.js";import"./SignInToEditDialog-Nxaw2Fu9.js";import"./button-DNii_czO.js";import"./input-fzMY4SDb.js";import"./textarea-D8TA8f9X.js";import"./searchable-select-Dky9Eonk.js";import"./popover-BvojInsz.js";import"./dialog-mXYRHqz9.js";import"./loader-circle-zwM3ton0.js";import"./useMutation-YEvFXzv3.js";import"./submissions-BXysTHzU.js";import"./plus-DTSO60Ls.js";const N=r=>(r==null?void 0:r.trim().toLowerCase().replace(/[\s_]+/g,"-"))??"",Q=()=>{const r=h({queryKey:["areas-with-tasks"],queryFn:()=>g.areasWithTasks(),staleTime:6e5}),n=c.useMemo(()=>{if(!r.data)return[];const e={general:0,vision:1,video:2,language:3,audio:4,other:5},t=o=>e[N(o)]??999;return[...r.data.results].sort((o,a)=>{const i=t(o.name),l=t(a.name);return i!==l?i-l:o.name.localeCompare(a.name)})},[r.data]),m=c.useMemo(()=>n.reduce((e,t)=>e+t.tasks.length,0),[n]);return r.error?s.jsx("div",{className:"page",children:s.jsx(y,{variant:"destructive",children:s.jsx(k,{children:"Failed to load taxonomy. Please try again."})})}):s.jsxs("div",{className:"page",children:[s.jsx("div",{className:"feed-header",children:s.jsxs("div",{children:[s.jsxs("h1",{className:"feed-title",children:["All ",s.jsx("em",{children:"Domains"})]}),s.jsx("div",{className:"feed-subtitle",children:"Browse research by area. Click any task to see trending work."})]})}),r.isLoading?s.jsx("div",{style:{display:"flex",flexDirection:"column",gap:32},children:Array.from({length:4}).map((e,t)=>s.jsxs("div",{children:[s.jsx(d,{className:"h-8 w-1/3 mb-4"}),s.jsx("div",{className:"tag-grid",children:Array.from({length:6}).map((o,a)=>s.jsx(d,{className:"h-24"},a))})]},t))}):n.map(e=>{const t=e.tasks;if(t.length===0)return null;const o=t.reduce((a,i)=>a+(i.paper_count||0),0);return s.jsxs("section",{id:`area-${j(e.name)}`,style:{marginBottom:48},children:[s.jsxs("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:24,paddingBottom:12,borderBottom:"1px solid var(--hairline-strong)"},children:[s.jsxs("div",{children:[s.jsx("h2",{style:{fontFamily:"var(--serif)",fontSize:26,fontWeight:500,letterSpacing:"-0.02em",marginBottom:4},children:e.name}),e.description&&s.jsx("div",{style:{fontFamily:"var(--serif)",fontStyle:"italic",fontSize:13,color:"var(--ink-soft)"},children:e.description})]}),s.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",whiteSpace:"nowrap"},children:[t.length," ",t.length===1?"task":"tasks"," · ",o.toLocaleString()," papers"]})]}),s.jsxs("div",{className:"tag-grid",children:[t.map(a=>{const i=a.slug||"",l=x(f(i));return s.jsxs(p,{to:`/tasks/${i}`,className:"tag-cell",children:[s.jsxs("div",{className:"name",children:[s.jsx("span",{className:"dot",style:{background:l.dot}}),u(a.name,i)]}),s.jsx("div",{className:"meta",children:s.jsxs("span",{children:[(a.paper_count??0).toLocaleString()," papers"]})})]},a.id)}),s.jsx(v,{kind:"task"})]})]},e.id)}),m>0&&s.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",marginTop:24},children:[m," tasks across ",n.filter(e=>e.tasks.length>0).length," areas."]})]})};export{Q as default}; +import{r as c,j as s,L as p}from"./index-hxawG6mk.js";import{u as h}from"./useQuery-B7vCF2Os.js";import{c as g}from"./catalog-ePebz7GX.js";import{c as x,h as f,d as u}from"./transform-DfrN0kQW.js";import{s as j}from"./slug-BpH-Nkvz.js";import{S as d}from"./skeleton-CRfsRMNe.js";import{A as y,a as k}from"./alert-2LCyXuCE.js";import{T as v}from"./TaxonomySuggestionTile-DiI1TNoC.js";import"./SignInToEditDialog-4j2lLlXQ.js";import"./button-DR59q2Iu.js";import"./input-BOLTsgbP.js";import"./textarea-DzlRNXqF.js";import"./searchable-select-cLm40hhL.js";import"./popover-BEdoEHfx.js";import"./dialog-D2TDqr0v.js";import"./loader-circle-CXb3415J.js";import"./useMutation-gPqxjZGO.js";import"./submissions-DgbzmxlX.js";import"./plus-C1naIkSJ.js";const N=r=>(r==null?void 0:r.trim().toLowerCase().replace(/[\s_]+/g,"-"))??"",Q=()=>{const r=h({queryKey:["areas-with-tasks"],queryFn:()=>g.areasWithTasks(),staleTime:6e5}),n=c.useMemo(()=>{if(!r.data)return[];const e={general:0,vision:1,video:2,language:3,audio:4,other:5},t=o=>e[N(o)]??999;return[...r.data.results].sort((o,a)=>{const i=t(o.name),l=t(a.name);return i!==l?i-l:o.name.localeCompare(a.name)})},[r.data]),m=c.useMemo(()=>n.reduce((e,t)=>e+t.tasks.length,0),[n]);return r.error?s.jsx("div",{className:"page",children:s.jsx(y,{variant:"destructive",children:s.jsx(k,{children:"Failed to load taxonomy. Please try again."})})}):s.jsxs("div",{className:"page",children:[s.jsx("div",{className:"feed-header",children:s.jsxs("div",{children:[s.jsxs("h1",{className:"feed-title",children:["All ",s.jsx("em",{children:"Domains"})]}),s.jsx("div",{className:"feed-subtitle",children:"Browse research by area. Click any task to see trending work."})]})}),r.isLoading?s.jsx("div",{style:{display:"flex",flexDirection:"column",gap:32},children:Array.from({length:4}).map((e,t)=>s.jsxs("div",{children:[s.jsx(d,{className:"h-8 w-1/3 mb-4"}),s.jsx("div",{className:"tag-grid",children:Array.from({length:6}).map((o,a)=>s.jsx(d,{className:"h-24"},a))})]},t))}):n.map(e=>{const t=e.tasks;if(t.length===0)return null;const o=t.reduce((a,i)=>a+(i.paper_count||0),0);return s.jsxs("section",{id:`area-${j(e.name)}`,style:{marginBottom:48},children:[s.jsxs("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:24,paddingBottom:12,borderBottom:"1px solid var(--hairline-strong)"},children:[s.jsxs("div",{children:[s.jsx("h2",{style:{fontFamily:"var(--serif)",fontSize:26,fontWeight:500,letterSpacing:"-0.02em",marginBottom:4},children:e.name}),e.description&&s.jsx("div",{style:{fontFamily:"var(--serif)",fontStyle:"italic",fontSize:13,color:"var(--ink-soft)"},children:e.description})]}),s.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",whiteSpace:"nowrap"},children:[t.length," ",t.length===1?"task":"tasks"," · ",o.toLocaleString()," papers"]})]}),s.jsxs("div",{className:"tag-grid",children:[t.map(a=>{const i=a.slug||"",l=x(f(i));return s.jsxs(p,{to:`/tasks/${i}`,className:"tag-cell",children:[s.jsxs("div",{className:"name",children:[s.jsx("span",{className:"dot",style:{background:l.dot}}),u(a.name,i)]}),s.jsx("div",{className:"meta",children:s.jsxs("span",{children:[(a.paper_count??0).toLocaleString()," papers"]})})]},a.id)}),s.jsx(v,{kind:"task"})]})]},e.id)}),m>0&&s.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",marginTop:24},children:[m," tasks across ",n.filter(e=>e.tasks.length>0).length," areas."]})]})};export{Q as default}; diff --git a/assets/TaxonomySuggestionTile-FyHlZUAE.js b/assets/TaxonomySuggestionTile-DiI1TNoC.js similarity index 76% rename from assets/TaxonomySuggestionTile-FyHlZUAE.js rename to assets/TaxonomySuggestionTile-DiI1TNoC.js index 572042390d77483b141a90e6f81221a53f54eaee..34b1c03554a64a16a6864b3c5ae98e802d50d962 100644 --- a/assets/TaxonomySuggestionTile-FyHlZUAE.js +++ b/assets/TaxonomySuggestionTile-DiI1TNoC.js @@ -1 +1 @@ -import{a as u,r as t,j as e}from"./index-CnBotBa4.js";import{S as c,a as m}from"./SignInToEditDialog-Nxaw2Fu9.js";import{P as p}from"./plus-DTSO60Ls.js";function j({kind:s}){const{user:a}=u(),[i,n]=t.useState(!1),[r,o]=t.useState(!1),l=`Suggest a new ${s}...`,g=()=>{a?n(!0):o(!0)};return e.jsxs(e.Fragment,{children:[e.jsxs("button",{type:"button",className:"tag-cell taxonomy-suggestion-cell",onClick:g,children:[e.jsxs("div",{className:"name",children:[e.jsx(p,{className:"taxonomy-suggestion-icon","aria-hidden":"true"}),l]}),e.jsx("div",{className:"meta",children:e.jsx("span",{children:"Propose an addition"})})]}),e.jsx(c,{open:i,onOpenChange:n,kind:s}),e.jsx(m,{open:r,onOpenChange:o,sectionLabel:`${s}s`,returnTo:typeof window<"u"?window.location.pathname:`/${s}s`,taxonomySuggestion:!0})]})}export{j as T}; +import{a as u,r as t,j as e}from"./index-hxawG6mk.js";import{S as c,a as m}from"./SignInToEditDialog-4j2lLlXQ.js";import{P as p}from"./plus-C1naIkSJ.js";function j({kind:s}){const{user:a}=u(),[i,n]=t.useState(!1),[r,o]=t.useState(!1),l=`Suggest a new ${s}...`,g=()=>{a?n(!0):o(!0)};return e.jsxs(e.Fragment,{children:[e.jsxs("button",{type:"button",className:"tag-cell taxonomy-suggestion-cell",onClick:g,children:[e.jsxs("div",{className:"name",children:[e.jsx(p,{className:"taxonomy-suggestion-icon","aria-hidden":"true"}),l]}),e.jsx("div",{className:"meta",children:e.jsx("span",{children:"Propose an addition"})})]}),e.jsx(c,{open:i,onOpenChange:n,kind:s}),e.jsx(m,{open:r,onOpenChange:o,sectionLabel:`${s}s`,returnTo:typeof window<"u"?window.location.pathname:`/${s}s`,taxonomySuggestion:!0})]})}export{j as T}; diff --git a/assets/TrendsView-BmouqTke.js b/assets/TrendsView-DmKtcGTI.js similarity index 97% rename from assets/TrendsView-BmouqTke.js rename to assets/TrendsView-DmKtcGTI.js index 6ac040a2e83dc78695911967a4af40fc591e79e3..fc60ce72105a05cdb6313f47970b244c61753440 100644 --- a/assets/TrendsView-BmouqTke.js +++ b/assets/TrendsView-DmKtcGTI.js @@ -1 +1 @@ -import{a4 as I,F as X,j as e}from"./index-CnBotBa4.js";import{u as G}from"./useQuery-C8pfCInN.js";import{A as J,a as E}from"./alert-B0qZtPeK.js";import{S as P}from"./skeleton-DuOQBmSr.js";class Q{constructor(r){this.request=r}trends(){return this.request("/stats/trends")}}const V=new Q(I),m=t=>{const r=/^(\d{4})-(0[1-9]|1[0-2])$/.exec(t);if(!r)return t;const[,s,l]=r;return`${["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"][Number(l)-1]} '${s.slice(2)}`},Y=()=>V.trends(),f=980,j=400,x=62,B=26,g=30,K=58,u=f-x-B,F=j-g-K,v=g+F,Z=t=>{if(t.length<3)return t.map((s,l)=>`${l?"L":"M"}${s[0]} ${s[1]}`).join(" ");let r=`M${t[0][0]} ${t[0][1]}`;for(let s=0;s{const[a,y]=X.useState(null),i=r.length,b=l[l.length-1],d=n=>x+u*(i===1?0:n/(i-1)),p=n=>g+F*(1-n/b);if(i===0)return null;const R=r.map((n,h)=>[d(h),p(n.percent)]),A=Z(R),_=`${A} L ${d(i-1)} ${v} L ${x} ${v} Z`,w=i<=12?1:Math.ceil(i/8),O=n=>{const h=n.currentTarget.getBoundingClientRect(),S=(n.clientX-h.left)/h.width*f,k=i>1?u/(i-1):u,q=Math.max(0,Math.min(i-1,Math.round((S-x)/k)));y(q)},H=`trend-gradient-${t}`;return e.jsxs("figure",{className:"trend-chart",children:[e.jsxs("div",{className:"trend-chart-visual",children:[e.jsxs("svg",{viewBox:`0 0 ${f} ${j}`,width:"100%",role:"img","aria-label":`${c} by ${o.toLowerCase()}, from ${m(r[0].month)} (${r[0].percent}%) to ${m(r[i-1].month)} (${r[i-1].percent}%)`,style:{display:"block",overflow:"visible",cursor:"crosshair"},onPointerMove:O,onPointerLeave:()=>y(null),children:[e.jsx("defs",{children:e.jsxs("linearGradient",{id:H,x1:"0",y1:"0",x2:"0",y2:"1",children:[e.jsx("stop",{offset:"0%",style:{stopColor:s,stopOpacity:.26}}),e.jsx("stop",{offset:"100%",style:{stopColor:s,stopOpacity:.02}})]})}),l.map(n=>e.jsxs("g",{children:[e.jsx("line",{x1:x,x2:f-B,y1:p(n),y2:p(n),stroke:"var(--hairline)",strokeWidth:1}),e.jsxs("text",{x:x-14,y:p(n)+4,textAnchor:"end",style:W,children:[n,"%"]})]},n)),e.jsx("path",{d:_,fill:`url(#${H})`}),e.jsx("path",{d:A,fill:"none",stroke:s,strokeWidth:2,strokeLinejoin:"round",strokeLinecap:"round"}),r.map((n,h)=>{const S=h===i-1,k=h%w===0&&i-1-h>=w/2;return!S&&!k?null:e.jsx("text",{x:d(h),y:v+24,textAnchor:"middle",style:W,children:m(n.month)},n.month)}),e.jsx("text",{x:x+u/2,y:j-4,textAnchor:"middle",style:z,children:o}),e.jsx("text",{transform:`translate(16 ${g+F/2}) rotate(-90)`,textAnchor:"middle",style:z,children:c}),a!=null&&e.jsxs(e.Fragment,{children:[e.jsx("line",{x1:d(a),x2:d(a),y1:g,y2:v,stroke:s,strokeWidth:1,strokeDasharray:"3 4",opacity:.5}),e.jsx("circle",{cx:d(a),cy:p(r[a].percent),r:5,fill:"var(--bg)",stroke:s,strokeWidth:2})]})]}),a!=null&&e.jsxs("div",{style:{position:"absolute",left:`${d(a)/f*100}%`,top:`${p(r[a].percent)/j*100}%`,transform:"translate(-50%, calc(-100% - 14px))",background:"var(--bg-elevated)",border:"1px solid var(--hairline)",borderRadius:6,boxShadow:"0 8px 26px rgba(0,0,0,.13)",padding:"7px 12px",pointerEvents:"none",whiteSpace:"nowrap",zIndex:3},children:[e.jsx("div",{style:{fontFamily:"var(--serif)",fontStyle:"italic",color:"var(--ink-faint)",fontSize:13,marginBottom:2},children:m(r[a].month)}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:7,fontFamily:"var(--mono)",fontWeight:600,fontSize:15,color:"var(--ink)"},children:[e.jsx("span",{style:{width:8,height:8,borderRadius:2,background:s,display:"inline-block"}}),r[a].percent,"%"]})]})]}),e.jsxs("details",{className:"trend-chart-table",children:[e.jsx("summary",{style:{fontFamily:"var(--mono)",fontSize:11,letterSpacing:"0.04em",color:"var(--ink-faint)",cursor:"pointer"},children:"View data table"}),e.jsxs("table",{style:{marginTop:8,borderCollapse:"collapse",fontFamily:"var(--mono)",fontSize:12,color:"var(--ink-soft)"},children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{style:{textAlign:"left",padding:"3px 18px 3px 0"},children:o}),e.jsx("th",{style:{textAlign:"right",padding:"3px 0"},children:c})]})}),e.jsx("tbody",{children:r.map(n=>e.jsxs("tr",{children:[e.jsx("td",{style:{padding:"2px 18px 2px 0"},children:m(n.month)}),e.jsxs("td",{style:{textAlign:"right",padding:"2px 0"},children:[n.percent,"%"]})]},n.month))})]})]})]})},$={maxWidth:960,padding:"48px 0 8px",borderTop:"1px solid var(--hairline)",marginTop:48},T={fontFamily:"var(--serif)",fontSize:34,fontWeight:500,letterSpacing:"-0.02em",margin:"0 0 10px",color:"var(--ink)"},M={fontFamily:"var(--serif)",fontSize:18,lineHeight:1.55,color:"var(--ink-soft)",maxWidth:620,margin:"0 0 8px"},C={fontFamily:"var(--mono)",fontSize:12,fontWeight:600,letterSpacing:"0.14em",textTransform:"uppercase",color:"var(--ink-faint)",marginBottom:8},N={fontFamily:"var(--serif)",fontSize:17,lineHeight:1.6,color:"var(--ink-soft)",margin:0},D={height:320,marginTop:26},re=()=>{const t=G({queryKey:["research-trends"],queryFn:Y,staleTime:36e5});return e.jsxs("div",{className:"page",children:[e.jsx("div",{className:"feed-header",children:e.jsxs("div",{children:[e.jsxs("h1",{className:"feed-title",children:["Research ",e.jsx("em",{children:"Trends"})]}),e.jsx("div",{className:"feed-subtitle",children:"How open science is changing across machine learning — tracked over time from arXiv and the Hugging Face Hub."})]})}),t.error&&e.jsx(J,{variant:"destructive",children:e.jsx(E,{children:"Failed to load research trends. Please try again."})}),e.jsxs("section",{style:$,children:[e.jsx("h2",{style:T,children:"Code Availability"}),e.jsx("p",{style:M,children:"The percentage of published papers that have at least one official code implementation on GitHub."}),e.jsx("div",{style:{marginTop:26},children:t.data?e.jsx(L,{id:"code",data:t.data.code_availability,color:"var(--trend-code)",yTicks:[0,20,40,60,80],yLabel:"Code Availability",xLabel:"Paper Publication Date"}):!t.error&&e.jsx(P,{style:D})})]}),e.jsxs("section",{style:$,children:[e.jsx("h2",{style:T,children:"Papers with Hugging Face artifacts"}),e.jsx("p",{style:M,children:"The percentage of published papers linked to at least one Hugging Face artifact — a model, dataset or Space — making the work directly runnable and reusable."}),e.jsx("div",{style:{marginTop:26},children:t.data?e.jsx(L,{id:"hf",data:t.data.hf_artifacts,color:"var(--trend-hf)",yTicks:[0,10,20,30,40,50],yLabel:"HF Artifact Coverage",xLabel:"Paper Publication Date"}):!t.error&&e.jsx(P,{style:D})})]}),e.jsxs("section",{style:{...$,paddingBottom:72},children:[e.jsx("h2",{style:{...T,fontSize:27},children:"How the data is collected"}),e.jsxs("div",{style:{display:"grid",gap:24,maxWidth:680},children:[e.jsxs("div",{children:[e.jsx("div",{style:C,children:"Code Availability"}),e.jsx("p",{style:N,children:"For every open-access machine learning paper, we check whether an official code implementation is linked on GitHub. The date axis is the paper's publication date."})]}),e.jsxs("div",{children:[e.jsx("div",{style:C,children:"Hugging Face artifacts"}),e.jsx("p",{style:N,children:"We resolve links between papers and the Hugging Face Hub, counting a paper as covered when it references at least one model, dataset or Space. The date axis is the paper's publication date."})]}),e.jsx("p",{style:{fontFamily:"var(--mono)",fontSize:12,lineHeight:1.6,color:"var(--ink-faint)",margin:"8px 0 0",letterSpacing:"0.02em"},children:"Figures use complete publication months. Historical Hugging Face coverage reflects artifacts currently linked in the catalog."})]})]})]})};export{re as default}; +import{a4 as I,F as X,j as e}from"./index-hxawG6mk.js";import{u as G}from"./useQuery-B7vCF2Os.js";import{A as J,a as E}from"./alert-2LCyXuCE.js";import{S as P}from"./skeleton-CRfsRMNe.js";class Q{constructor(r){this.request=r}trends(){return this.request("/stats/trends")}}const V=new Q(I),m=t=>{const r=/^(\d{4})-(0[1-9]|1[0-2])$/.exec(t);if(!r)return t;const[,s,l]=r;return`${["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"][Number(l)-1]} '${s.slice(2)}`},Y=()=>V.trends(),f=980,j=400,x=62,B=26,g=30,K=58,u=f-x-B,F=j-g-K,v=g+F,Z=t=>{if(t.length<3)return t.map((s,l)=>`${l?"L":"M"}${s[0]} ${s[1]}`).join(" ");let r=`M${t[0][0]} ${t[0][1]}`;for(let s=0;s{const[a,y]=X.useState(null),i=r.length,b=l[l.length-1],d=n=>x+u*(i===1?0:n/(i-1)),p=n=>g+F*(1-n/b);if(i===0)return null;const R=r.map((n,h)=>[d(h),p(n.percent)]),A=Z(R),_=`${A} L ${d(i-1)} ${v} L ${x} ${v} Z`,w=i<=12?1:Math.ceil(i/8),O=n=>{const h=n.currentTarget.getBoundingClientRect(),S=(n.clientX-h.left)/h.width*f,k=i>1?u/(i-1):u,q=Math.max(0,Math.min(i-1,Math.round((S-x)/k)));y(q)},H=`trend-gradient-${t}`;return e.jsxs("figure",{className:"trend-chart",children:[e.jsxs("div",{className:"trend-chart-visual",children:[e.jsxs("svg",{viewBox:`0 0 ${f} ${j}`,width:"100%",role:"img","aria-label":`${c} by ${o.toLowerCase()}, from ${m(r[0].month)} (${r[0].percent}%) to ${m(r[i-1].month)} (${r[i-1].percent}%)`,style:{display:"block",overflow:"visible",cursor:"crosshair"},onPointerMove:O,onPointerLeave:()=>y(null),children:[e.jsx("defs",{children:e.jsxs("linearGradient",{id:H,x1:"0",y1:"0",x2:"0",y2:"1",children:[e.jsx("stop",{offset:"0%",style:{stopColor:s,stopOpacity:.26}}),e.jsx("stop",{offset:"100%",style:{stopColor:s,stopOpacity:.02}})]})}),l.map(n=>e.jsxs("g",{children:[e.jsx("line",{x1:x,x2:f-B,y1:p(n),y2:p(n),stroke:"var(--hairline)",strokeWidth:1}),e.jsxs("text",{x:x-14,y:p(n)+4,textAnchor:"end",style:W,children:[n,"%"]})]},n)),e.jsx("path",{d:_,fill:`url(#${H})`}),e.jsx("path",{d:A,fill:"none",stroke:s,strokeWidth:2,strokeLinejoin:"round",strokeLinecap:"round"}),r.map((n,h)=>{const S=h===i-1,k=h%w===0&&i-1-h>=w/2;return!S&&!k?null:e.jsx("text",{x:d(h),y:v+24,textAnchor:"middle",style:W,children:m(n.month)},n.month)}),e.jsx("text",{x:x+u/2,y:j-4,textAnchor:"middle",style:z,children:o}),e.jsx("text",{transform:`translate(16 ${g+F/2}) rotate(-90)`,textAnchor:"middle",style:z,children:c}),a!=null&&e.jsxs(e.Fragment,{children:[e.jsx("line",{x1:d(a),x2:d(a),y1:g,y2:v,stroke:s,strokeWidth:1,strokeDasharray:"3 4",opacity:.5}),e.jsx("circle",{cx:d(a),cy:p(r[a].percent),r:5,fill:"var(--bg)",stroke:s,strokeWidth:2})]})]}),a!=null&&e.jsxs("div",{style:{position:"absolute",left:`${d(a)/f*100}%`,top:`${p(r[a].percent)/j*100}%`,transform:"translate(-50%, calc(-100% - 14px))",background:"var(--bg-elevated)",border:"1px solid var(--hairline)",borderRadius:6,boxShadow:"0 8px 26px rgba(0,0,0,.13)",padding:"7px 12px",pointerEvents:"none",whiteSpace:"nowrap",zIndex:3},children:[e.jsx("div",{style:{fontFamily:"var(--serif)",fontStyle:"italic",color:"var(--ink-faint)",fontSize:13,marginBottom:2},children:m(r[a].month)}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:7,fontFamily:"var(--mono)",fontWeight:600,fontSize:15,color:"var(--ink)"},children:[e.jsx("span",{style:{width:8,height:8,borderRadius:2,background:s,display:"inline-block"}}),r[a].percent,"%"]})]})]}),e.jsxs("details",{className:"trend-chart-table",children:[e.jsx("summary",{style:{fontFamily:"var(--mono)",fontSize:11,letterSpacing:"0.04em",color:"var(--ink-faint)",cursor:"pointer"},children:"View data table"}),e.jsxs("table",{style:{marginTop:8,borderCollapse:"collapse",fontFamily:"var(--mono)",fontSize:12,color:"var(--ink-soft)"},children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{style:{textAlign:"left",padding:"3px 18px 3px 0"},children:o}),e.jsx("th",{style:{textAlign:"right",padding:"3px 0"},children:c})]})}),e.jsx("tbody",{children:r.map(n=>e.jsxs("tr",{children:[e.jsx("td",{style:{padding:"2px 18px 2px 0"},children:m(n.month)}),e.jsxs("td",{style:{textAlign:"right",padding:"2px 0"},children:[n.percent,"%"]})]},n.month))})]})]})]})},$={maxWidth:960,padding:"48px 0 8px",borderTop:"1px solid var(--hairline)",marginTop:48},T={fontFamily:"var(--serif)",fontSize:34,fontWeight:500,letterSpacing:"-0.02em",margin:"0 0 10px",color:"var(--ink)"},M={fontFamily:"var(--serif)",fontSize:18,lineHeight:1.55,color:"var(--ink-soft)",maxWidth:620,margin:"0 0 8px"},C={fontFamily:"var(--mono)",fontSize:12,fontWeight:600,letterSpacing:"0.14em",textTransform:"uppercase",color:"var(--ink-faint)",marginBottom:8},N={fontFamily:"var(--serif)",fontSize:17,lineHeight:1.6,color:"var(--ink-soft)",margin:0},D={height:320,marginTop:26},re=()=>{const t=G({queryKey:["research-trends"],queryFn:Y,staleTime:36e5});return e.jsxs("div",{className:"page",children:[e.jsx("div",{className:"feed-header",children:e.jsxs("div",{children:[e.jsxs("h1",{className:"feed-title",children:["Research ",e.jsx("em",{children:"Trends"})]}),e.jsx("div",{className:"feed-subtitle",children:"How open science is changing across machine learning — tracked over time from arXiv and the Hugging Face Hub."})]})}),t.error&&e.jsx(J,{variant:"destructive",children:e.jsx(E,{children:"Failed to load research trends. Please try again."})}),e.jsxs("section",{style:$,children:[e.jsx("h2",{style:T,children:"Code Availability"}),e.jsx("p",{style:M,children:"The percentage of published papers that have at least one official code implementation on GitHub."}),e.jsx("div",{style:{marginTop:26},children:t.data?e.jsx(L,{id:"code",data:t.data.code_availability,color:"var(--trend-code)",yTicks:[0,20,40,60,80],yLabel:"Code Availability",xLabel:"Paper Publication Date"}):!t.error&&e.jsx(P,{style:D})})]}),e.jsxs("section",{style:$,children:[e.jsx("h2",{style:T,children:"Papers with Hugging Face artifacts"}),e.jsx("p",{style:M,children:"The percentage of published papers linked to at least one Hugging Face artifact — a model, dataset or Space — making the work directly runnable and reusable."}),e.jsx("div",{style:{marginTop:26},children:t.data?e.jsx(L,{id:"hf",data:t.data.hf_artifacts,color:"var(--trend-hf)",yTicks:[0,10,20,30,40,50],yLabel:"HF Artifact Coverage",xLabel:"Paper Publication Date"}):!t.error&&e.jsx(P,{style:D})})]}),e.jsxs("section",{style:{...$,paddingBottom:72},children:[e.jsx("h2",{style:{...T,fontSize:27},children:"How the data is collected"}),e.jsxs("div",{style:{display:"grid",gap:24,maxWidth:680},children:[e.jsxs("div",{children:[e.jsx("div",{style:C,children:"Code Availability"}),e.jsx("p",{style:N,children:"For every open-access machine learning paper, we check whether an official code implementation is linked on GitHub. The date axis is the paper's publication date."})]}),e.jsxs("div",{children:[e.jsx("div",{style:C,children:"Hugging Face artifacts"}),e.jsx("p",{style:N,children:"We resolve links between papers and the Hugging Face Hub, counting a paper as covered when it references at least one model, dataset or Space. The date axis is the paper's publication date."})]}),e.jsx("p",{style:{fontFamily:"var(--mono)",fontSize:12,lineHeight:1.6,color:"var(--ink-faint)",margin:"8px 0 0",letterSpacing:"0.02em"},children:"Figures use complete publication months. Historical Hugging Face coverage reflects artifacts currently linked in the catalog."})]})]})]})};export{re as default}; diff --git a/assets/UserProfileView-lXRCWyDX.js b/assets/UserProfileView-B0R2tXq1.js similarity index 87% rename from assets/UserProfileView-lXRCWyDX.js rename to assets/UserProfileView-B0R2tXq1.js index f14a58b9396208460e41797f544b35c2448fd502..1b12b19c06f9722e8ba6669bcfce3116e04adcbc 100644 --- a/assets/UserProfileView-lXRCWyDX.js +++ b/assets/UserProfileView-B0R2tXq1.js @@ -1 +1 @@ -import{au as i,A as n,u as o,j as e,aT as d}from"./index-CnBotBa4.js";import{u as l}from"./useQuery-C8pfCInN.js";import{C as c}from"./OrganizationContributionGraph-DMjwvdOh.js";import"./skeleton-DuOQBmSr.js";import"./catalog-mND3MerS.js";const p={async get(t){const a=await i(`/profiles/${encodeURIComponent(t)}`);if(!a.ok)throw new n(a,await a.text());const r=await a.json();if(!a.redirected)return r;const s=decodeURIComponent(new URL(a.url).pathname.split("/").pop()||r.username);return{...r,username:s,redirected_from_alias:!0}}},f=()=>{const{username:t=""}=o(),a=l({queryKey:["user-profile",t.toLowerCase()],queryFn:()=>p.get(t)});return a.isLoading?e.jsx("div",{className:"page",children:"Loading profile…"}):a.data?a.data.redirected_from_alias?e.jsx(d,{to:`/${a.data.username}`,replace:!0}):e.jsxs("div",{className:"page",style:{maxWidth:960},children:[e.jsxs("h1",{children:["@",a.data.username]}),e.jsx("p",{children:"Canonical Papers with Code contributions"}),e.jsx(c,{data:a.data.calendar,organizationName:`@${a.data.username}`,title:"Canonical contributions",noun:"contribution"}),a.data.is_owner&&e.jsxs("section",{className:"mt-10",children:[e.jsx("h2",{children:"Your submissions"}),e.jsxs("p",{className:"text-sm text-muted-foreground",children:["Limits and duplicate behavior are documented on ",e.jsx("a",{href:"/rate-limits",children:"the policy page"}),"."]}),e.jsx("div",{className:"mt-4 space-y-3",children:a.data.submissions.map(r=>e.jsxs("article",{className:"rounded-md border p-4",children:[e.jsx("strong",{children:r.edit_type})," · ",r.status,e.jsxs("details",{className:"mt-2 text-xs",children:[e.jsx("summary",{children:"Original and applied payload"}),e.jsx("pre",{children:JSON.stringify({proposed:r.proposed_payload,applied:r.applied_payload},null,2)})]}),r.review_reason&&e.jsx("p",{children:r.review_reason})]},r.id))})]})]}):e.jsx("div",{className:"page",children:e.jsx("h1",{children:"Profile not found"})})};export{f as default}; +import{au as i,A as n,u as o,j as e,aT as d}from"./index-hxawG6mk.js";import{u as l}from"./useQuery-B7vCF2Os.js";import{C as c}from"./OrganizationContributionGraph-C-95DVgW.js";import"./skeleton-CRfsRMNe.js";import"./catalog-ePebz7GX.js";const p={async get(t){const a=await i(`/profiles/${encodeURIComponent(t)}`);if(!a.ok)throw new n(a,await a.text());const r=await a.json();if(!a.redirected)return r;const s=decodeURIComponent(new URL(a.url).pathname.split("/").pop()||r.username);return{...r,username:s,redirected_from_alias:!0}}},f=()=>{const{username:t=""}=o(),a=l({queryKey:["user-profile",t.toLowerCase()],queryFn:()=>p.get(t)});return a.isLoading?e.jsx("div",{className:"page",children:"Loading profile…"}):a.data?a.data.redirected_from_alias?e.jsx(d,{to:`/${a.data.username}`,replace:!0}):e.jsxs("div",{className:"page",style:{maxWidth:960},children:[e.jsxs("h1",{children:["@",a.data.username]}),e.jsx("p",{children:"Canonical Papers with Code contributions"}),e.jsx(c,{data:a.data.calendar,organizationName:`@${a.data.username}`,title:"Canonical contributions",noun:"contribution"}),a.data.is_owner&&e.jsxs("section",{className:"mt-10",children:[e.jsx("h2",{children:"Your submissions"}),e.jsxs("p",{className:"text-sm text-muted-foreground",children:["Limits and duplicate behavior are documented on ",e.jsx("a",{href:"/rate-limits",children:"the policy page"}),"."]}),e.jsx("div",{className:"mt-4 space-y-3",children:a.data.submissions.map(r=>e.jsxs("article",{className:"rounded-md border p-4",children:[e.jsx("strong",{children:r.edit_type})," · ",r.status,e.jsxs("details",{className:"mt-2 text-xs",children:[e.jsx("summary",{children:"Original and applied payload"}),e.jsx("pre",{children:JSON.stringify({proposed:r.proposed_payload,applied:r.applied_payload},null,2)})]}),r.review_reason&&e.jsx("p",{children:r.review_reason})]},r.id))})]})]}):e.jsx("div",{className:"page",children:e.jsx("h1",{children:"Profile not found"})})};export{f as default}; diff --git a/assets/alert-B0qZtPeK.js b/assets/alert-2LCyXuCE.js similarity index 92% rename from assets/alert-B0qZtPeK.js rename to assets/alert-2LCyXuCE.js index 56f3ed33b1ef62040587473e929b043fa4ad1315..326fd46293471c4653963064bd538f1e12735a2a 100644 --- a/assets/alert-B0qZtPeK.js +++ b/assets/alert-2LCyXuCE.js @@ -1 +1 @@ -import{r as a,j as s,x as l,a6 as i}from"./index-CnBotBa4.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}; +import{r as a,j as s,x as l,a6 as i}from"./index-hxawG6mk.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}; diff --git a/assets/badge-CW-eQ3eC.js b/assets/badge-GWSoUTqe.js similarity index 90% rename from assets/badge-CW-eQ3eC.js rename to assets/badge-GWSoUTqe.js index d9ed4ff2e1dd539f1d128c8767ecd4ebb7cd284a..4a4a3a313e854580462360ffda26c8db78045acb 100644 --- a/assets/badge-CW-eQ3eC.js +++ b/assets/badge-GWSoUTqe.js @@ -1 +1 @@ -import{j as n,x as o,a6 as a}from"./index-CnBotBa4.js";const s=a("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function d({className:r,variant:e,...t}){return n.jsx("div",{className:o(s({variant:e}),r),...t})}export{d as B}; +import{j as n,x as o,a6 as a}from"./index-hxawG6mk.js";const s=a("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function d({className:r,variant:e,...t}){return n.jsx("div",{className:o(s({variant:e}),r),...t})}export{d as B}; diff --git a/assets/button-DNii_czO.js b/assets/button-DR59q2Iu.js similarity index 89% rename from assets/button-DNii_czO.js rename to assets/button-DR59q2Iu.js index 74b56c0bbff169e04ee9a38eecddd4d7876f21b9..f483a5c68daa5865788b02bd43562e42db9a7b0b 100644 --- a/assets/button-DNii_czO.js +++ b/assets/button-DR59q2Iu.js @@ -1 +1 @@ -import{r as a,j as d,av as u,x as c,a6 as f}from"./index-CnBotBa4.js";const g=f("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),v=a.forwardRef(({className:e,variant:t,size:r,asChild:n=!1,...o},s)=>{const i=n?u:"button";return d.jsx(i,{className:c(g({variant:t,size:r,className:e})),ref:s,...o})});v.displayName="Button";export{v as B}; +import{r as a,j as d,av as u,x as c,a6 as f}from"./index-hxawG6mk.js";const g=f("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),v=a.forwardRef(({className:e,variant:t,size:r,asChild:n=!1,...o},s)=>{const i=n?u:"button";return d.jsx(i,{className:c(g({variant:t,size:r,className:e})),ref:s,...o})});v.displayName="Button";export{v as B}; diff --git a/assets/catalog-mND3MerS.js b/assets/catalog-ePebz7GX.js similarity index 97% rename from assets/catalog-mND3MerS.js rename to assets/catalog-ePebz7GX.js index 53932dbde72527991f870c02883d0c65632356ec..3232008b54cc7a42eefe4608cb290e4f6c331066 100644 --- a/assets/catalog-mND3MerS.js +++ b/assets/catalog-ePebz7GX.js @@ -1 +1 @@ -import{a4 as o}from"./index-CnBotBa4.js";function s(n,e){const t=new URLSearchParams;for(const[i,a]of Object.entries(e??{}))a!==void 0&&a!==""&&t.set(i,String(a));const r=t.toString();return`${n}${r?`?${r}`:""}`}class u{constructor(e){this.request=e}listAreas(e){return this.request(s("/areas/",e))}getArea(e){return this.request(`/areas/${e}`)}areasWithTasks(){return this.request("/areas/with-tasks/")}listTasks(e){return this.request(s("/tasks/",e))}getTask(e){return this.request(`/tasks/${e}`)}topTasks(e){return this.request(s("/tasks/top",{limit:e}))}trendingTasks(e){return this.request(s("/tasks/trending",e))}taskChildren(e,t){return this.request(s(`/tasks/${e}/children`,t))}taskParents(e){return this.request(`/tasks/${e}/parents`)}taskPage(e,t){return this.request(s(`/tasks/${e}/page`,t))}trendingBenchmarks(e,t){return this.request(s(`/tasks/${encodeURIComponent(e)}/trending-benchmarks`,t))}frameworkCatalog(){return this.request("/frameworks/")}listMethods(e){return this.request(s("/methods/",e))}methodIndex(){return this.request("/methods/index/cards")}getMethod(e){return this.request(`/methods/${encodeURIComponent(e)}`)}methodTrend(e,t){return this.request(s(`/methods/${encodeURIComponent(e)}/trend`,t))}listDatasets(e){const{task_id:t,...r}=e??{};return this.request(s("/datasets/",{...r,task:r.task??t}))}getDataset(e){return this.request(`/datasets/${e}`)}getDatasetBySlug(e,t){return this.request(s(`/datasets/${e}`,t))}async datasetTasks(e){return(await this.request(`/datasets/${e}/tasks/`)).results}async leaderboardMetrics(e,t){return(await this.request(`/datasets/${e}/tasks/${t}/metrics`)).metrics}metricDirections(){return this.request("/metrics/directions")}conferences(){return this.request("/conferences/")}conferenceDeadlines(){return this.request("/conferences/deadlines")}getConference(e){return this.request(`/conferences/${e}`)}conferenceAreasWithTasks(e){return this.request(`/conferences/${e}/areas-with-tasks`)}organizations(e=!1){return this.request(`/organizations/${e?"?featured_only=true":""}`)}organizationIndex(){return this.request("/organizations/index/cards")}getOrganization(e){return this.request(`/organizations/${e}`)}organizationContributions(e){return this.request(`/organizations/${e}/contributions`)}organizationAreasWithTasks(e){return this.request(`/organizations/${e}/areas-with-tasks`)}audit(e){return this.request(s("/admin/catalog-audit",{cursor:e}))}acknowledgeAudit(){return this.request("/admin/catalog-audit/acknowledge",{method:"POST"})}rollbackEvent(e){return this.request(`/admin/catalog-audit/${e}/rollback`,{method:"POST"})}}const c=new u(o);export{c}; +import{a4 as o}from"./index-hxawG6mk.js";function s(n,e){const t=new URLSearchParams;for(const[i,a]of Object.entries(e??{}))a!==void 0&&a!==""&&t.set(i,String(a));const r=t.toString();return`${n}${r?`?${r}`:""}`}class u{constructor(e){this.request=e}listAreas(e){return this.request(s("/areas/",e))}getArea(e){return this.request(`/areas/${e}`)}areasWithTasks(){return this.request("/areas/with-tasks/")}listTasks(e){return this.request(s("/tasks/",e))}getTask(e){return this.request(`/tasks/${e}`)}topTasks(e){return this.request(s("/tasks/top",{limit:e}))}trendingTasks(e){return this.request(s("/tasks/trending",e))}taskChildren(e,t){return this.request(s(`/tasks/${e}/children`,t))}taskParents(e){return this.request(`/tasks/${e}/parents`)}taskPage(e,t){return this.request(s(`/tasks/${e}/page`,t))}trendingBenchmarks(e,t){return this.request(s(`/tasks/${encodeURIComponent(e)}/trending-benchmarks`,t))}frameworkCatalog(){return this.request("/frameworks/")}listMethods(e){return this.request(s("/methods/",e))}methodIndex(){return this.request("/methods/index/cards")}getMethod(e){return this.request(`/methods/${encodeURIComponent(e)}`)}methodTrend(e,t){return this.request(s(`/methods/${encodeURIComponent(e)}/trend`,t))}listDatasets(e){const{task_id:t,...r}=e??{};return this.request(s("/datasets/",{...r,task:r.task??t}))}getDataset(e){return this.request(`/datasets/${e}`)}getDatasetBySlug(e,t){return this.request(s(`/datasets/${e}`,t))}async datasetTasks(e){return(await this.request(`/datasets/${e}/tasks/`)).results}async leaderboardMetrics(e,t){return(await this.request(`/datasets/${e}/tasks/${t}/metrics`)).metrics}metricDirections(){return this.request("/metrics/directions")}conferences(){return this.request("/conferences/")}conferenceDeadlines(){return this.request("/conferences/deadlines")}getConference(e){return this.request(`/conferences/${e}`)}conferenceAreasWithTasks(e){return this.request(`/conferences/${e}/areas-with-tasks`)}organizations(e=!1){return this.request(`/organizations/${e?"?featured_only=true":""}`)}organizationIndex(){return this.request("/organizations/index/cards")}getOrganization(e){return this.request(`/organizations/${e}`)}organizationContributions(e){return this.request(`/organizations/${e}/contributions`)}organizationAreasWithTasks(e){return this.request(`/organizations/${e}/areas-with-tasks`)}audit(e){return this.request(s("/admin/catalog-audit",{cursor:e}))}acknowledgeAudit(){return this.request("/admin/catalog-audit/acknowledge",{method:"POST"})}rollbackEvent(e){return this.request(`/admin/catalog-audit/${e}/rollback`,{method:"POST"})}}const c=new u(o);export{c}; diff --git a/assets/chat-B0u4w1H2.js b/assets/chat-DJiy7CbR.js similarity index 97% rename from assets/chat-B0u4w1H2.js rename to assets/chat-DJiy7CbR.js index 7a7a2a91eac138fa9bce6ae9667abb02bc389469..9ee18d1624b4bba0dac08ce36ef6ad25fc86ce01 100644 --- a/assets/chat-B0u4w1H2.js +++ b/assets/chat-DJiy7CbR.js @@ -1 +1 @@ -import{a4 as n,au as r}from"./index-CnBotBa4.js";class o{constructor(e){this.request=e}listSessions(e){const t=new URLSearchParams({limit:"50"});return e&&t.set("cursor",e),this.request(`/chat/sessions?${t.toString()}`)}createSession(e,t="low"){return this.request("/chat/sessions",{method:"POST",body:JSON.stringify({selected_model:e||null,reasoning_effort:t})})}getSession(e){return this.request(`/chat/sessions/${e}`)}updateSession(e,t){return this.request(`/chat/sessions/${e}`,{method:"PATCH",body:JSON.stringify(t)})}removeSession(e){return this.request(`/chat/sessions/${e}`,{method:"DELETE"})}archiveOldChats(){return this.request("/chat/sessions/archive-old",{method:"POST"})}archiveOldestChats(){return this.request("/chat/sessions/archive-oldest",{method:"POST"})}cancelSession(e){return this.request(`/chat/sessions/${e}/cancel`,{method:"POST"})}createOrRefreshShare(e){return this.request(`/chat/sessions/${e}/share`,{method:"POST"})}getSharedChat(e){return this.request(`/chat/shares/${encodeURIComponent(e)}`,{credentials:"omit"})}getModels(){return this.request("/chat/models")}getUsage(){return this.request("/chat/usage",{cache:"no-store"})}getOpenAIUsage(){return this.request("/chat/openai-usage",{cache:"no-store"})}getAvailability(){return this.request("/chat/availability",{cache:"no-store"})}getInferenceBilling(){return this.request("/me/inference-billing",{cache:"no-store"})}selectInferenceBillingAccount(e){return this.request("/me/inference-billing",{method:"PATCH",body:JSON.stringify({bill_to:e})})}prewarmPaperContext(e){return this.request("/chat/paper-context/prewarm",{method:"POST",body:JSON.stringify({route_id:e}),credentials:"omit",cache:"no-store"})}getSandboxSpend(e){const t=e?`?environment=${encodeURIComponent(e)}`:"";return this.request(`/chat/admin/sandbox-spend${t}`,{cache:"no-store"})}getWebSearchBudget(){return this.request("/chat/admin/web-search-budget",{cache:"no-store"})}getOpenRouterCredential(){return this.request("/chat/openrouter-key",{cache:"no-store"})}connectOpenRouterCredential(e){return this.request("/chat/openrouter-key",{method:"PUT",body:JSON.stringify({api_key:e})})}setOpenRouterFallback(e){return this.request("/chat/openrouter-key",{method:"PATCH",body:JSON.stringify({enabled:e})})}disconnectOpenRouterCredential(){return this.request("/chat/openrouter-key",{method:"DELETE"})}reportLatency(e,t){return r(`/chat/latency/${encodeURIComponent(e)}`,{method:"POST",keepalive:!0,body:JSON.stringify(t)})}reportFeedback(e,t,s){return this.request(`/chat/messages/${encodeURIComponent(e)}/feedback`,{method:"POST",body:JSON.stringify({value:t,...s?{comment:s}:{}})})}stream(e,t){return r("/chat/stream",{method:"POST",headers:{Accept:"text/event-stream"},body:JSON.stringify(e),signal:t})}resumeStream(e,t,s){return r(`/chat/sessions/${encodeURIComponent(e)}/stream`,{method:"GET",headers:{Accept:"text/event-stream",...s&&s>0?{"Last-Event-ID":String(s)}:{}},signal:t})}}const h=new o(n);export{h as c}; +import{a4 as n,au as r}from"./index-hxawG6mk.js";class o{constructor(e){this.request=e}listSessions(e){const t=new URLSearchParams({limit:"50"});return e&&t.set("cursor",e),this.request(`/chat/sessions?${t.toString()}`)}createSession(e,t="low"){return this.request("/chat/sessions",{method:"POST",body:JSON.stringify({selected_model:e||null,reasoning_effort:t})})}getSession(e){return this.request(`/chat/sessions/${e}`)}updateSession(e,t){return this.request(`/chat/sessions/${e}`,{method:"PATCH",body:JSON.stringify(t)})}removeSession(e){return this.request(`/chat/sessions/${e}`,{method:"DELETE"})}archiveOldChats(){return this.request("/chat/sessions/archive-old",{method:"POST"})}archiveOldestChats(){return this.request("/chat/sessions/archive-oldest",{method:"POST"})}cancelSession(e){return this.request(`/chat/sessions/${e}/cancel`,{method:"POST"})}createOrRefreshShare(e){return this.request(`/chat/sessions/${e}/share`,{method:"POST"})}getSharedChat(e){return this.request(`/chat/shares/${encodeURIComponent(e)}`,{credentials:"omit"})}getModels(){return this.request("/chat/models")}getUsage(){return this.request("/chat/usage",{cache:"no-store"})}getOpenAIUsage(){return this.request("/chat/openai-usage",{cache:"no-store"})}getAvailability(){return this.request("/chat/availability",{cache:"no-store"})}getInferenceBilling(){return this.request("/me/inference-billing",{cache:"no-store"})}selectInferenceBillingAccount(e){return this.request("/me/inference-billing",{method:"PATCH",body:JSON.stringify({bill_to:e})})}prewarmPaperContext(e){return this.request("/chat/paper-context/prewarm",{method:"POST",body:JSON.stringify({route_id:e}),credentials:"omit",cache:"no-store"})}getSandboxSpend(e){const t=e?`?environment=${encodeURIComponent(e)}`:"";return this.request(`/chat/admin/sandbox-spend${t}`,{cache:"no-store"})}getWebSearchBudget(){return this.request("/chat/admin/web-search-budget",{cache:"no-store"})}getOpenRouterCredential(){return this.request("/chat/openrouter-key",{cache:"no-store"})}connectOpenRouterCredential(e){return this.request("/chat/openrouter-key",{method:"PUT",body:JSON.stringify({api_key:e})})}setOpenRouterFallback(e){return this.request("/chat/openrouter-key",{method:"PATCH",body:JSON.stringify({enabled:e})})}disconnectOpenRouterCredential(){return this.request("/chat/openrouter-key",{method:"DELETE"})}reportLatency(e,t){return r(`/chat/latency/${encodeURIComponent(e)}`,{method:"POST",keepalive:!0,body:JSON.stringify(t)})}reportFeedback(e,t,s){return this.request(`/chat/messages/${encodeURIComponent(e)}/feedback`,{method:"POST",body:JSON.stringify({value:t,...s?{comment:s}:{}})})}stream(e,t){return r("/chat/stream",{method:"POST",headers:{Accept:"text/event-stream"},body:JSON.stringify(e),signal:t})}resumeStream(e,t,s){return r(`/chat/sessions/${encodeURIComponent(e)}/stream`,{method:"GET",headers:{Accept:"text/event-stream",...s&&s>0?{"Last-Event-ID":String(s)}:{}},signal:t})}}const h=new o(n);export{h as c}; diff --git a/assets/chatLaunch-CptFdc8a.js b/assets/chatLaunch-DrTVeX4t.js similarity index 99% rename from assets/chatLaunch-CptFdc8a.js rename to assets/chatLaunch-DrTVeX4t.js index 24129d4c72719074423148b9bb61ac8eff5804e9..437d1070767a94db12b0ebb8fc22050dc64e38ff 100644 --- a/assets/chatLaunch-CptFdc8a.js +++ b/assets/chatLaunch-DrTVeX4t.js @@ -1,4 +1,4 @@ -import{g as ae,j as a,A as ce,r as P,l as le,F as h}from"./index-CnBotBa4.js";import{c as m}from"./chat-B0u4w1H2.js";import{C as ue}from"./chevron-down-IUgkNqZp.js";import{u as pe}from"./useQuery-C8pfCInN.js";import{p as de}from"./papers-DkTdvzl4.js";/** +import{g as ae,j as a,A as ce,r as P,l as le,F as h}from"./index-hxawG6mk.js";import{c as m}from"./chat-DJiy7CbR.js";import{C as ue}from"./chevron-down-dhq7I8yA.js";import{u as pe}from"./useQuery-B7vCF2Os.js";import{p as de}from"./papers-B0ysePyJ.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/chevron-down-IUgkNqZp.js b/assets/chevron-down-dhq7I8yA.js similarity index 85% rename from assets/chevron-down-IUgkNqZp.js rename to assets/chevron-down-dhq7I8yA.js index 0182ec250f88748b78fe6e2780e8e9e77a7085d5..3fe2292e30f6435d8da24ca67f709751209a3e13 100644 --- a/assets/chevron-down-IUgkNqZp.js +++ b/assets/chevron-down-dhq7I8yA.js @@ -1,4 +1,4 @@ -import{g as o}from"./index-CnBotBa4.js";/** +import{g as o}from"./index-hxawG6mk.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/circle-check-BBMzXw2d.js b/assets/circle-check-Cs0UNhNB.js similarity index 87% rename from assets/circle-check-BBMzXw2d.js rename to assets/circle-check-Cs0UNhNB.js index 36042721275997445c336463a1a5462c6ff497f3..5b7b1aac653f3ae1d7d291de3b2c47802646ae56 100644 --- a/assets/circle-check-BBMzXw2d.js +++ b/assets/circle-check-Cs0UNhNB.js @@ -1,4 +1,4 @@ -import{g as c}from"./index-CnBotBa4.js";/** +import{g as c}from"./index-hxawG6mk.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/codexAddEvals-vDBuZ5Km.js b/assets/codexAddEvals-BJRRv0q0.js similarity index 98% rename from assets/codexAddEvals-vDBuZ5Km.js rename to assets/codexAddEvals-BJRRv0q0.js index 16bf5ef1af53a1d65a672ea1b5e9d00682874e68..bbbdfad231c433947f66a78f5fa29389197160dd 100644 --- a/assets/codexAddEvals-vDBuZ5Km.js +++ b/assets/codexAddEvals-BJRRv0q0.js @@ -1,4 +1,4 @@ -import{g as d,K as t}from"./index-CnBotBa4.js";/** +import{g as d,K as t}from"./index-hxawG6mk.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/components-CSFfzsKt.js b/assets/components-Djdw_Z-e.js similarity index 98% rename from assets/components-CSFfzsKt.js rename to assets/components-Djdw_Z-e.js index e267d6da49c297df8db876f96c2e32e2b99b45e0..baeea5ff2718c394b3459ef3b6bd8fe5a0e2f053 100644 --- a/assets/components-CSFfzsKt.js +++ b/assets/components-Djdw_Z-e.js @@ -1 +1 @@ -import{m as E,F as p,j as e,L as y,b as S}from"./index-CnBotBa4.js";import{p as R}from"./paperQueryKeys-BP2E-0yf.js";import{L as T,a as P}from"./LatexTitle-B1D_EqzJ.js";import{h as Z,d as H,a as B,c as D}from"./transform-DMbrhcTx.js";import{p as G}from"./papers-DkTdvzl4.js";import{s as C}from"./safeExternalHref-CkBrsh84.js";const I=({slug:t,label:s,onClick:r})=>{const a=S(),f=Z(t),l=D(f),u=i=>{if(i.stopPropagation(),r){r(t);return}a(`/tasks/${t}`)};return e.jsxs("span",{className:"tag-chip",style:{background:l.bg,color:l.text},onClick:u,children:[e.jsx("span",{className:"dot",style:{background:l.dot}}),H(s||B(t),t)]})},O=({method:t,onClick:s})=>{const r=S(),a=t.slug||t.id||"";if(!a)return null;const f=l=>{if(l.stopPropagation(),s){s(a);return}r(`/methods/${a}`)};return e.jsx("span",{className:"method-chip",onClick:f,children:t.name})},F={1:"SOTA 🏆",2:"#2",3:"#3"},$=({units:t,paperHref:s})=>{const r=p.useRef(null),a=p.useRef(null),[f,l]=p.useState(t.length);if(p.useLayoutEffect(()=>{const o=r.current,c=a.current;if(!o||!c||t.length===0)return;const m=x=>(c.textContent=x,c.scrollWidth),n=()=>{const x=o.clientWidth;if(x<=0)return;let h=0,g=0;for(const N of t){const j=m(N.measureText);if(h+j<=x)h+=j,g+=1;else break}if(g0&&h+m(` · +${t.length-g} more`)>x;)g-=1,h-=m(t[g].measureText);g===0&&(g=1)}l(g)};n();const d=new ResizeObserver(n);return d.observe(o),()=>d.disconnect()},[t]),t.length===0)return null;const u=t.slice(0,Math.max(1,Math.min(f,t.length))),i=t.length-u.length;return e.jsxs("div",{className:"paper-sota",ref:r,children:[e.jsx("span",{ref:a,className:"paper-sota-measure","aria-hidden":"true"}),u.map((o,c)=>e.jsxs(p.Fragment,{children:[o.isGroupStart?e.jsxs(e.Fragment,{children:[c>0&&e.jsx("span",{className:"paper-sota-sep",children:" · "}),e.jsx("span",{className:`paper-sota-label${o.rank===1?" paper-sota-label--sota":""}`,children:F[o.rank]}),e.jsx("span",{className:"paper-sota-on",children:" on "})]}):e.jsx("span",{className:"paper-sota-sep",children:", "}),o.slug?e.jsx(y,{to:`/benchmark/${o.slug}`,className:"paper-sota-name",onClick:m=>m.stopPropagation(),children:o.name}):e.jsx("span",{className:"paper-sota-name",children:o.name})]},`${o.slug||o.name}-${c}`)),i>0&&e.jsxs(y,{to:`${s}#results`,className:"paper-sota-more",onClick:o=>o.stopPropagation(),children:[" · +",i," more"]})]})},K=({ranks:t,paperHref:s,wrap:r=!1})=>{const a=p.useMemo(()=>{const l=[];let u=!0;for(const i of[1,2,3]){const o=t.filter(c=>c.rank===i);o.forEach((c,m)=>{const n=m===0,d=n?`${u?"":" · "}${F[i]} on `:", ";l.push({name:c.name,slug:c.slug,rank:i,isGroupStart:n,measureText:d+c.name})}),o.length>0&&(u=!1)}return l},[t]),f=p.useMemo(()=>[1,2,3].map(l=>t.filter(i=>i.rank===l).map((i,o)=>({name:i.name,slug:i.slug,rank:l,isGroupStart:o===0,measureText:(o===0?`${F[l]} on `:", ")+i.name}))).filter(l=>l.length>0),[t]);return r?f.length===0?null:e.jsx("div",{className:"paper-sota-stack",children:f.map(l=>e.jsx($,{units:l,paperHref:s},l[0].rank))}):a.length===0?null:e.jsx($,{units:a,paperHref:s})},U=({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]})},_=({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"})]}),V=t=>{let s=2166136261;for(let r=0;r(s=Math.imul(s^s>>>15,2246822507),s=Math.imul(s^s>>>13,3266489909),s^=s>>>16,(s>>>0)%1e4/1e4)},q=({paperId:t})=>{const s=V(t),r=160,a=220,f=[.85+s()*.1,.55+s()*.25],l=.45+s()*.3,u=[],i=9+Math.floor(s()*3);for(let M=0;M.3,c=Math.floor(s()*3),m=[],n=6+Math.floor(s()*3);for(let M=0;Me.jsx("rect",{x:h+(r-h*2)*(1-M)/2,y:z+v*2.4,width:(r-h*2)*M,height:1.4,fill:x,rx:.3},`t${v}`)),e.jsx("rect",{x:h+(r-h*2)*(1-l)/2,y:W,width:(r-h*2)*l,height:.9,fill:d,opacity:.7,rx:.2}),e.jsx("rect",{x:h,y:A,width:6,height:1,fill:x,opacity:.6}),u.map((M,v)=>{const L=k+v*2.1;return L>a-h-1?null:e.jsx("rect",{x:N,y:L,width:g*M,height:.8,fill:d,opacity:.55,rx:.2},`l${v}`)}),o&&e.jsxs("g",{children:[e.jsx("rect",{x:j,y:k,width:g,height:14,fill:"#F0EBE0",stroke:d,strokeWidth:.3,opacity:.9}),c===0&&e.jsx("g",{stroke:x,strokeWidth:.4,fill:"none",opacity:.6,children:e.jsx("polyline",{points:`${j+2},${k+11} ${j+6},${k+8} ${j+10},${k+9} ${j+14},${k+5} ${j+18},${k+6} ${j+22},${k+3}`})}),c===1&&e.jsxs("g",{opacity:.55,children:[e.jsx("circle",{cx:j+g/2,cy:k+7,r:3.5,fill:x}),e.jsx("rect",{x:j+2,y:k+11,width:g-4,height:1.5,fill:d})]}),c===2&&e.jsxs("g",{opacity:.55,children:[e.jsx("rect",{x:j+3,y:k+5,width:g-6,height:1,fill:x}),e.jsx("rect",{x:j+6,y:k+8,width:g-12,height:.8,fill:x})]})]}),m.map((M,v)=>{const L=k+(o?16:0)+v*2.1;return L>a-h-1?null:e.jsx("rect",{x:j,y:L,width:g*M,height:.8,fill:d,opacity:.55,rx:.2},`r${v}`)})]})})},Y=({paperId:t,title:s,thumbnailUrl:r,priority:a=!1})=>{const[f,l]=p.useState(!1),[u,i]=p.useState(0),[o,c]=p.useState(a),m=p.useRef(null);p.useEffect(()=>{l(!1),i(0)},[r]);const n=p.useMemo(()=>{if(!r)return null;if(u===0)return r;const d=r.includes("?")?"&":"?";return`${r}${d}retry=${u}`},[r,u]);return p.useEffect(()=>{if(a||o)return;const d=m.current;if(!d)return;const x=new IntersectionObserver(([h])=>{h.isIntersecting&&(c(!0),x.disconnect())},{rootMargin:"250px"});return x.observe(d),()=>x.disconnect()},[a,o]),r&&!f?e.jsx("div",{ref:m,style:{width:160,height:220,background:"#FDFCF9",border:"1px solid var(--hairline-strong)",borderRadius:2,boxShadow:"0 1px 0 rgba(0,0,0,0.04), 0 4px 8px -4px rgba(0,0,0,0.08)",flexShrink:0,overflow:"hidden",position:"relative"},children:(a||o)&&n&&e.jsx("img",{src:n,alt:`Thumbnail for ${s}`,loading:a?"eager":"lazy",decoding:"async",fetchPriority:a?"high":"auto",style:{width:"100%",height:"100%",objectFit:"contain",display:"block"},onError:()=>{if(u<1){i(d=>d+1);return}l(!0)}},n)}):e.jsx(q,{paperId:t})},Q="language-modeling";function w(t){return t?t.toLowerCase().replace(/\(.*?\)/g," ").replace(/[^a-z]+/g," ").replace(/\bllm\b/g," ").replace(/\s+/g," ").trim().replace(/s$/,""):""}function J(t){return w(t.slug)==="large language model"||w(t.name)==="large language model"}function X(t){return t.tags.includes(Q)?t.methods.filter(s=>!J(s)):t.methods}const ee=({name:t,slug:s,logoUrl:r})=>{const[a,f]=p.useState(!1);return!r||a?null:e.jsx(y,{to:`/orgs/${s}`,className:"paper-organization-logo","aria-label":`View ${t} organization`,title:t,children:e.jsx("img",{src:r,alt:"",onError:()=>f(!0)})})},ie=({paper:t,rank:s,showInstitution:r=!0,onClickTag:a,highlightQuery:f})=>{const l=E(),u=`/paper/${t.id}`,i=p.useCallback(()=>{l.prefetchQuery({queryKey:R.detail(t.id),queryFn:()=>G.get(t.id,!0),staleTime:10*60*1e3})},[t.id,l]),o=t.authors.slice(0,3).map((n,d)=>{var h;const x=(h=t.authorIds)==null?void 0:h[d];return e.jsxs(p.Fragment,{children:[d>0&&", ",x?e.jsx(y,{to:`/authors/${x}`,children:n}):n]},d)}),c=t.authors.length,m=X(t);return e.jsxs("article",{className:"paper-card",children:[s!=null&&e.jsx(y,{to:u,className:"paper-thumb-wrap",onFocus:i,onMouseEnter:i,children:e.jsx(Y,{paperId:t.id,title:t.title,thumbnailUrl:t.thumbnailUrl,priority:s<=3})}),e.jsxs("div",{className:"paper-body",children:[e.jsxs("div",{className:"paper-body-main",children:[e.jsxs("h3",{className:"paper-title",children:[e.jsx(y,{to:u,onFocus:i,onMouseEnter:i,children:e.jsx(T,{title:t.title,highlight:f})}),r&&t.organizations.length>0&&e.jsx("span",{className:"paper-organization-logos",children:t.organizations.map(n=>e.jsx(ee,{...n},n.slug))})]}),e.jsxs("div",{className:"paper-authors",children:[o,c>3&&e.jsxs("span",{children:[", ","+",c-3," authors"]}),t.date&&e.jsxs(e.Fragment,{children:[c>0?" · ":"",e.jsx("span",{children:t.date})]}),t.citations>0&&e.jsxs(e.Fragment,{children:[c>0||t.date?" · ":"",e.jsxs("span",{children:[t.citations.toLocaleString()," citations"]})]})]}),t.abstract&&e.jsx("p",{className:"paper-abstract",children:e.jsx(P,{text:t.abstract,highlight:f})}),t.sotaRanks.length>0&&e.jsx(K,{ranks:t.sotaRanks,paperHref:u}),(t.tags.length>0||m.length>0)&&e.jsxs("div",{className:"paper-tags paper-tags--clamped",children:[t.tags.map(n=>e.jsx(I,{slug:n,onClick:a},n)),m.map(n=>e.jsx(O,{method:n},n.id||n.slug||n.name))]})]}),(t.githubUrl||t.hfUrl)&&e.jsxs("div",{className:"paper-resources",children:[C(t.githubUrl)&&e.jsxs("a",{className:"paper-resource is-link",href:C(t.githubUrl)??void 0,target:"_blank",rel:"noopener noreferrer","aria-label":"Open GitHub repository",onClick:n=>n.stopPropagation(),children:[e.jsx(U,{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:"↑"}),te(t.velocity24h)]}),e.jsx("span",{className:"resource-label",children:"stars / hr"})]})]}),C(t.hfUrl)&&t.hfKind&&e.jsxs("a",{className:"paper-resource is-link",href:C(t.hfUrl)??void 0,target:"_blank",rel:"noopener noreferrer","aria-label":`Open Hugging Face ${t.hfKind}`,onClick:n=>n.stopPropagation(),children:[e.jsx(_,{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 te(t){return t.toFixed(1)}export{U as I,O as M,ie as P,K as S,I as T,Y as a}; +import{m as E,F as p,j as e,L as y,b as S}from"./index-hxawG6mk.js";import{p as R}from"./paperQueryKeys-BP2E-0yf.js";import{L as T,a as P}from"./LatexTitle-QTkECjbh.js";import{h as Z,d as H,a as B,c as D}from"./transform-DfrN0kQW.js";import{p as G}from"./papers-B0ysePyJ.js";import{s as C}from"./safeExternalHref-CkBrsh84.js";const I=({slug:t,label:s,onClick:r})=>{const a=S(),f=Z(t),l=D(f),u=i=>{if(i.stopPropagation(),r){r(t);return}a(`/tasks/${t}`)};return e.jsxs("span",{className:"tag-chip",style:{background:l.bg,color:l.text},onClick:u,children:[e.jsx("span",{className:"dot",style:{background:l.dot}}),H(s||B(t),t)]})},O=({method:t,onClick:s})=>{const r=S(),a=t.slug||t.id||"";if(!a)return null;const f=l=>{if(l.stopPropagation(),s){s(a);return}r(`/methods/${a}`)};return e.jsx("span",{className:"method-chip",onClick:f,children:t.name})},F={1:"SOTA 🏆",2:"#2",3:"#3"},$=({units:t,paperHref:s})=>{const r=p.useRef(null),a=p.useRef(null),[f,l]=p.useState(t.length);if(p.useLayoutEffect(()=>{const o=r.current,c=a.current;if(!o||!c||t.length===0)return;const m=x=>(c.textContent=x,c.scrollWidth),n=()=>{const x=o.clientWidth;if(x<=0)return;let h=0,g=0;for(const N of t){const j=m(N.measureText);if(h+j<=x)h+=j,g+=1;else break}if(g0&&h+m(` · +${t.length-g} more`)>x;)g-=1,h-=m(t[g].measureText);g===0&&(g=1)}l(g)};n();const d=new ResizeObserver(n);return d.observe(o),()=>d.disconnect()},[t]),t.length===0)return null;const u=t.slice(0,Math.max(1,Math.min(f,t.length))),i=t.length-u.length;return e.jsxs("div",{className:"paper-sota",ref:r,children:[e.jsx("span",{ref:a,className:"paper-sota-measure","aria-hidden":"true"}),u.map((o,c)=>e.jsxs(p.Fragment,{children:[o.isGroupStart?e.jsxs(e.Fragment,{children:[c>0&&e.jsx("span",{className:"paper-sota-sep",children:" · "}),e.jsx("span",{className:`paper-sota-label${o.rank===1?" paper-sota-label--sota":""}`,children:F[o.rank]}),e.jsx("span",{className:"paper-sota-on",children:" on "})]}):e.jsx("span",{className:"paper-sota-sep",children:", "}),o.slug?e.jsx(y,{to:`/benchmark/${o.slug}`,className:"paper-sota-name",onClick:m=>m.stopPropagation(),children:o.name}):e.jsx("span",{className:"paper-sota-name",children:o.name})]},`${o.slug||o.name}-${c}`)),i>0&&e.jsxs(y,{to:`${s}#results`,className:"paper-sota-more",onClick:o=>o.stopPropagation(),children:[" · +",i," more"]})]})},K=({ranks:t,paperHref:s,wrap:r=!1})=>{const a=p.useMemo(()=>{const l=[];let u=!0;for(const i of[1,2,3]){const o=t.filter(c=>c.rank===i);o.forEach((c,m)=>{const n=m===0,d=n?`${u?"":" · "}${F[i]} on `:", ";l.push({name:c.name,slug:c.slug,rank:i,isGroupStart:n,measureText:d+c.name})}),o.length>0&&(u=!1)}return l},[t]),f=p.useMemo(()=>[1,2,3].map(l=>t.filter(i=>i.rank===l).map((i,o)=>({name:i.name,slug:i.slug,rank:l,isGroupStart:o===0,measureText:(o===0?`${F[l]} on `:", ")+i.name}))).filter(l=>l.length>0),[t]);return r?f.length===0?null:e.jsx("div",{className:"paper-sota-stack",children:f.map(l=>e.jsx($,{units:l,paperHref:s},l[0].rank))}):a.length===0?null:e.jsx($,{units:a,paperHref:s})},U=({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]})},_=({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"})]}),V=t=>{let s=2166136261;for(let r=0;r(s=Math.imul(s^s>>>15,2246822507),s=Math.imul(s^s>>>13,3266489909),s^=s>>>16,(s>>>0)%1e4/1e4)},q=({paperId:t})=>{const s=V(t),r=160,a=220,f=[.85+s()*.1,.55+s()*.25],l=.45+s()*.3,u=[],i=9+Math.floor(s()*3);for(let M=0;M.3,c=Math.floor(s()*3),m=[],n=6+Math.floor(s()*3);for(let M=0;Me.jsx("rect",{x:h+(r-h*2)*(1-M)/2,y:z+v*2.4,width:(r-h*2)*M,height:1.4,fill:x,rx:.3},`t${v}`)),e.jsx("rect",{x:h+(r-h*2)*(1-l)/2,y:W,width:(r-h*2)*l,height:.9,fill:d,opacity:.7,rx:.2}),e.jsx("rect",{x:h,y:A,width:6,height:1,fill:x,opacity:.6}),u.map((M,v)=>{const L=k+v*2.1;return L>a-h-1?null:e.jsx("rect",{x:N,y:L,width:g*M,height:.8,fill:d,opacity:.55,rx:.2},`l${v}`)}),o&&e.jsxs("g",{children:[e.jsx("rect",{x:j,y:k,width:g,height:14,fill:"#F0EBE0",stroke:d,strokeWidth:.3,opacity:.9}),c===0&&e.jsx("g",{stroke:x,strokeWidth:.4,fill:"none",opacity:.6,children:e.jsx("polyline",{points:`${j+2},${k+11} ${j+6},${k+8} ${j+10},${k+9} ${j+14},${k+5} ${j+18},${k+6} ${j+22},${k+3}`})}),c===1&&e.jsxs("g",{opacity:.55,children:[e.jsx("circle",{cx:j+g/2,cy:k+7,r:3.5,fill:x}),e.jsx("rect",{x:j+2,y:k+11,width:g-4,height:1.5,fill:d})]}),c===2&&e.jsxs("g",{opacity:.55,children:[e.jsx("rect",{x:j+3,y:k+5,width:g-6,height:1,fill:x}),e.jsx("rect",{x:j+6,y:k+8,width:g-12,height:.8,fill:x})]})]}),m.map((M,v)=>{const L=k+(o?16:0)+v*2.1;return L>a-h-1?null:e.jsx("rect",{x:j,y:L,width:g*M,height:.8,fill:d,opacity:.55,rx:.2},`r${v}`)})]})})},Y=({paperId:t,title:s,thumbnailUrl:r,priority:a=!1})=>{const[f,l]=p.useState(!1),[u,i]=p.useState(0),[o,c]=p.useState(a),m=p.useRef(null);p.useEffect(()=>{l(!1),i(0)},[r]);const n=p.useMemo(()=>{if(!r)return null;if(u===0)return r;const d=r.includes("?")?"&":"?";return`${r}${d}retry=${u}`},[r,u]);return p.useEffect(()=>{if(a||o)return;const d=m.current;if(!d)return;const x=new IntersectionObserver(([h])=>{h.isIntersecting&&(c(!0),x.disconnect())},{rootMargin:"250px"});return x.observe(d),()=>x.disconnect()},[a,o]),r&&!f?e.jsx("div",{ref:m,style:{width:160,height:220,background:"#FDFCF9",border:"1px solid var(--hairline-strong)",borderRadius:2,boxShadow:"0 1px 0 rgba(0,0,0,0.04), 0 4px 8px -4px rgba(0,0,0,0.08)",flexShrink:0,overflow:"hidden",position:"relative"},children:(a||o)&&n&&e.jsx("img",{src:n,alt:`Thumbnail for ${s}`,loading:a?"eager":"lazy",decoding:"async",fetchPriority:a?"high":"auto",style:{width:"100%",height:"100%",objectFit:"contain",display:"block"},onError:()=>{if(u<1){i(d=>d+1);return}l(!0)}},n)}):e.jsx(q,{paperId:t})},Q="language-modeling";function w(t){return t?t.toLowerCase().replace(/\(.*?\)/g," ").replace(/[^a-z]+/g," ").replace(/\bllm\b/g," ").replace(/\s+/g," ").trim().replace(/s$/,""):""}function J(t){return w(t.slug)==="large language model"||w(t.name)==="large language model"}function X(t){return t.tags.includes(Q)?t.methods.filter(s=>!J(s)):t.methods}const ee=({name:t,slug:s,logoUrl:r})=>{const[a,f]=p.useState(!1);return!r||a?null:e.jsx(y,{to:`/orgs/${s}`,className:"paper-organization-logo","aria-label":`View ${t} organization`,title:t,children:e.jsx("img",{src:r,alt:"",onError:()=>f(!0)})})},ie=({paper:t,rank:s,showInstitution:r=!0,onClickTag:a,highlightQuery:f})=>{const l=E(),u=`/paper/${t.id}`,i=p.useCallback(()=>{l.prefetchQuery({queryKey:R.detail(t.id),queryFn:()=>G.get(t.id,!0),staleTime:10*60*1e3})},[t.id,l]),o=t.authors.slice(0,3).map((n,d)=>{var h;const x=(h=t.authorIds)==null?void 0:h[d];return e.jsxs(p.Fragment,{children:[d>0&&", ",x?e.jsx(y,{to:`/authors/${x}`,children:n}):n]},d)}),c=t.authors.length,m=X(t);return e.jsxs("article",{className:"paper-card",children:[s!=null&&e.jsx(y,{to:u,className:"paper-thumb-wrap",onFocus:i,onMouseEnter:i,children:e.jsx(Y,{paperId:t.id,title:t.title,thumbnailUrl:t.thumbnailUrl,priority:s<=3})}),e.jsxs("div",{className:"paper-body",children:[e.jsxs("div",{className:"paper-body-main",children:[e.jsxs("h3",{className:"paper-title",children:[e.jsx(y,{to:u,onFocus:i,onMouseEnter:i,children:e.jsx(T,{title:t.title,highlight:f})}),r&&t.organizations.length>0&&e.jsx("span",{className:"paper-organization-logos",children:t.organizations.map(n=>e.jsx(ee,{...n},n.slug))})]}),e.jsxs("div",{className:"paper-authors",children:[o,c>3&&e.jsxs("span",{children:[", ","+",c-3," authors"]}),t.date&&e.jsxs(e.Fragment,{children:[c>0?" · ":"",e.jsx("span",{children:t.date})]}),t.citations>0&&e.jsxs(e.Fragment,{children:[c>0||t.date?" · ":"",e.jsxs("span",{children:[t.citations.toLocaleString()," citations"]})]})]}),t.abstract&&e.jsx("p",{className:"paper-abstract",children:e.jsx(P,{text:t.abstract,highlight:f})}),t.sotaRanks.length>0&&e.jsx(K,{ranks:t.sotaRanks,paperHref:u}),(t.tags.length>0||m.length>0)&&e.jsxs("div",{className:"paper-tags paper-tags--clamped",children:[t.tags.map(n=>e.jsx(I,{slug:n,onClick:a},n)),m.map(n=>e.jsx(O,{method:n},n.id||n.slug||n.name))]})]}),(t.githubUrl||t.hfUrl)&&e.jsxs("div",{className:"paper-resources",children:[C(t.githubUrl)&&e.jsxs("a",{className:"paper-resource is-link",href:C(t.githubUrl)??void 0,target:"_blank",rel:"noopener noreferrer","aria-label":"Open GitHub repository",onClick:n=>n.stopPropagation(),children:[e.jsx(U,{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:"↑"}),te(t.velocity24h)]}),e.jsx("span",{className:"resource-label",children:"stars / hr"})]})]}),C(t.hfUrl)&&t.hfKind&&e.jsxs("a",{className:"paper-resource is-link",href:C(t.hfUrl)??void 0,target:"_blank",rel:"noopener noreferrer","aria-label":`Open Hugging Face ${t.hfKind}`,onClick:n=>n.stopPropagation(),children:[e.jsx(_,{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 te(t){return t.toFixed(1)}export{U as I,O as M,ie as P,K as S,I as T,Y as a}; diff --git a/assets/copy-0hFmISJO.js b/assets/copy-B2wC0pMM.js similarity index 89% rename from assets/copy-0hFmISJO.js rename to assets/copy-B2wC0pMM.js index 6b9816ba027aacb8bbb97338f82b2846700bdc0f..7910b4a41839b98ef25e8f5062760a812fd33a39 100644 --- a/assets/copy-0hFmISJO.js +++ b/assets/copy-B2wC0pMM.js @@ -1,4 +1,4 @@ -import{g as e}from"./index-CnBotBa4.js";/** +import{g as e}from"./index-hxawG6mk.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/dialog-mXYRHqz9.js b/assets/dialog-D2TDqr0v.js similarity index 96% rename from assets/dialog-mXYRHqz9.js rename to assets/dialog-D2TDqr0v.js index bf4a9569926fb601ae1b44198c6a09ad71b8a2e6..9cf3e3a86916b9ff3828a9a1ce9e971f2daf79b4 100644 --- a/assets/dialog-mXYRHqz9.js +++ b/assets/dialog-D2TDqr0v.js @@ -1 +1 @@ -import{a7 as f,r as l,j as t,a8 as p,aa as d,ac as g,X as x,x as o,ad as n,ae as i,a9 as r}from"./index-CnBotBa4.js";const w=f,u=p,c=l.forwardRef(({className:a,...e},s)=>t.jsx(r,{ref:s,className:o("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",a),...e}));c.displayName=r.displayName;const y=l.forwardRef(({className:a,children:e,...s},m)=>t.jsxs(u,{children:[t.jsx(c,{}),t.jsxs(d,{ref:m,className:o("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",a),...s,children:[e,t.jsxs(g,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity data-[state=open]:bg-accent data-[state=open]:text-muted-foreground hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none",children:[t.jsx(x,{className:"h-4 w-4"}),t.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));y.displayName=d.displayName;const N=({className:a,...e})=>t.jsx("div",{className:o("flex flex-col space-y-1.5 text-center sm:text-left",a),...e});N.displayName="DialogHeader";const j=({className:a,...e})=>t.jsx("div",{className:o("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",a),...e});j.displayName="DialogFooter";const D=l.forwardRef(({className:a,...e},s)=>t.jsx(n,{ref:s,className:o("text-lg font-semibold leading-none tracking-tight",a),...e}));D.displayName=n.displayName;const b=l.forwardRef(({className:a,...e},s)=>t.jsx(i,{ref:s,className:o("text-sm text-muted-foreground",a),...e}));b.displayName=i.displayName;export{w as D,y as a,N as b,D as c,b as d,j as e}; +import{a7 as f,r as l,j as t,a8 as p,aa as d,ac as g,X as x,x as o,ad as n,ae as i,a9 as r}from"./index-hxawG6mk.js";const w=f,u=p,c=l.forwardRef(({className:a,...e},s)=>t.jsx(r,{ref:s,className:o("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",a),...e}));c.displayName=r.displayName;const y=l.forwardRef(({className:a,children:e,...s},m)=>t.jsxs(u,{children:[t.jsx(c,{}),t.jsxs(d,{ref:m,className:o("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",a),...s,children:[e,t.jsxs(g,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity data-[state=open]:bg-accent data-[state=open]:text-muted-foreground hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none",children:[t.jsx(x,{className:"h-4 w-4"}),t.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));y.displayName=d.displayName;const N=({className:a,...e})=>t.jsx("div",{className:o("flex flex-col space-y-1.5 text-center sm:text-left",a),...e});N.displayName="DialogHeader";const j=({className:a,...e})=>t.jsx("div",{className:o("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",a),...e});j.displayName="DialogFooter";const D=l.forwardRef(({className:a,...e},s)=>t.jsx(n,{ref:s,className:o("text-lg font-semibold leading-none tracking-tight",a),...e}));D.displayName=n.displayName;const b=l.forwardRef(({className:a,...e},s)=>t.jsx(i,{ref:s,className:o("text-sm text-muted-foreground",a),...e}));b.displayName=i.displayName;export{w as D,y as a,N as b,D as c,b as d,j as e}; diff --git a/assets/external-link-C_QBJuYU.js b/assets/external-link-CWzYMTrZ.js similarity index 89% rename from assets/external-link-C_QBJuYU.js rename to assets/external-link-CWzYMTrZ.js index 7fd5e201be055f8a20f3572619515d93a6f09428..3c6b467869bccc8877531133ffc0eff52ef4cfb6 100644 --- a/assets/external-link-C_QBJuYU.js +++ b/assets/external-link-CWzYMTrZ.js @@ -1,4 +1,4 @@ -import{g as a}from"./index-CnBotBa4.js";/** +import{g as a}from"./index-hxawG6mk.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/file-text-BZVTM8hV.js b/assets/file-text-DIeliPoM.js similarity index 91% rename from assets/file-text-BZVTM8hV.js rename to assets/file-text-DIeliPoM.js index afaf6ee9bf8ec087b3784942d220e9f4ae48b43e..ce821b52087c1dc463ba9f90777b48a65173fb5a 100644 --- a/assets/file-text-BZVTM8hV.js +++ b/assets/file-text-DIeliPoM.js @@ -1,4 +1,4 @@ -import{g as e}from"./index-CnBotBa4.js";/** +import{g as e}from"./index-hxawG6mk.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/github-D6RT7m6V.js b/assets/github-Bf2b_Y1p.js similarity index 97% rename from assets/github-D6RT7m6V.js rename to assets/github-Bf2b_Y1p.js index e3a6538bfab5239181dfcb647321799cde66dc5d..cdd122f2bc5576ce47661b22e20a8a2b264ce74d 100644 --- a/assets/github-D6RT7m6V.js +++ b/assets/github-Bf2b_Y1p.js @@ -1,4 +1,4 @@ -import{g as l,K as u}from"./index-CnBotBa4.js";/** +import{g as l,K as u}from"./index-hxawG6mk.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/github-DFkgF81-.js b/assets/github-C-cqt6uw.js similarity index 92% rename from assets/github-DFkgF81-.js rename to assets/github-C-cqt6uw.js index 31c2e4c518267310ab7939cae205f7b58b92e36e..9d0bcae1895800715352e3081878d3c48af76feb 100644 --- a/assets/github-DFkgF81-.js +++ b/assets/github-C-cqt6uw.js @@ -1,4 +1,4 @@ -import{g as c}from"./index-CnBotBa4.js";/** +import{g as c}from"./index-hxawG6mk.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/hfAvatar-CpaIt9Yp.js b/assets/hfAvatar-CpaIt9Yp.js new file mode 100644 index 0000000000000000000000000000000000000000..c120cd18c058a96302c15657a4089c010fe7a10e --- /dev/null +++ b/assets/hfAvatar-CpaIt9Yp.js @@ -0,0 +1 @@ +const a=t=>t.startsWith("/")?`https://huggingface.co${t}`:t;export{a as h}; diff --git a/assets/hover-card-CkboGKdu.js b/assets/hover-card-DEHIu6q-.js similarity index 98% rename from assets/hover-card-CkboGKdu.js rename to assets/hover-card-DEHIu6q-.js index e57aaeaf6c85c392e16d2dc0e341446bec49c6d7..067f0a96fc0da9744f9205fb4a96e4b443fede93 100644 --- a/assets/hover-card-CkboGKdu.js +++ b/assets/hover-card-DEHIu6q-.js @@ -1 +1 @@ -import{r as n,q as k,j as i,ag as F,ah as I,p as U,t as l,ai as T,P as O,aj as $,w as W,s as z,ao as B,ap as q,aq as G,x as K}from"./index-CnBotBa4.js";var E,w="HoverCard",[y]=W(w,[T]),b=T(),[V,S]=y(w),N=e=>{const{__scopeHoverCard:o,children:r,open:s,defaultOpen:a,onOpenChange:c,openDelay:f=700,closeDelay:v=300}=e,d=b(o),C=n.useRef(0),u=n.useRef(0),h=n.useRef(!1),p=n.useRef(!1),[m,t]=k({prop:s,defaultProp:a??!1,onChange:c,caller:w}),x=n.useCallback(()=>{clearTimeout(u.current),C.current=window.setTimeout(()=>t(!0),f)},[f,t]),P=n.useCallback(()=>{clearTimeout(C.current),!h.current&&!p.current&&(u.current=window.setTimeout(()=>t(!1),v))},[v,t]),M=n.useCallback(()=>t(!1),[t]);return n.useEffect(()=>()=>{clearTimeout(C.current),clearTimeout(u.current)},[]),i.jsx(V,{scope:o,open:m,onOpenChange:t,onOpen:x,onClose:P,onDismiss:M,hasSelectionRef:h,isPointerDownOnContentRef:p,children:i.jsx(F,{...d,children:r})})};N.displayName=w;var _="HoverCardTrigger",D=n.forwardRef((e,o)=>{const{__scopeHoverCard:r,...s}=e,a=S(_,r),c=b(r);return i.jsx(I,{asChild:!0,...c,children:i.jsx(U.a,{"data-state":a.open?"open":"closed",...s,ref:o,onPointerEnter:l(e.onPointerEnter,g(a.onOpen)),onPointerLeave:l(e.onPointerLeave,g(a.onClose)),onFocus:l(e.onFocus,a.onOpen),onBlur:l(e.onBlur,a.onClose),onTouchStart:l(e.onTouchStart,f=>f.preventDefault())})})});D.displayName=_;var H="HoverCardPortal",[J,Q]=y(H,{forceMount:void 0}),j=e=>{const{__scopeHoverCard:o,forceMount:r,children:s,container:a}=e,c=S(H,o);return i.jsx(J,{scope:o,forceMount:r,children:i.jsx(O,{present:r||c.open,children:i.jsx($,{asChild:!0,container:a,children:s})})})};j.displayName=H;var R="HoverCardContent",A=n.forwardRef((e,o)=>{const r=Q(R,e.__scopeHoverCard),{forceMount:s=r.forceMount,...a}=e,c=S(R,e.__scopeHoverCard);return i.jsx(O,{present:s||c.open,children:i.jsx(X,{"data-state":c.open?"open":"closed",...a,onPointerEnter:l(e.onPointerEnter,g(c.onOpen)),onPointerLeave:l(e.onPointerLeave,g(c.onClose)),ref:o})})});A.displayName=R;var X=n.forwardRef((e,o)=>{const{__scopeHoverCard:r,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:c,onInteractOutside:f,...v}=e,d=S(R,r),C=b(r),u=n.useRef(null),h=z(o,u),[p,m]=n.useState(!1);return n.useEffect(()=>{if(p){const t=document.body;return E=t.style.userSelect||t.style.webkitUserSelect,t.style.userSelect="none",t.style.webkitUserSelect="none",()=>{t.style.userSelect=E,t.style.webkitUserSelect=E}}},[p]),n.useEffect(()=>{if(u.current){const t=()=>{m(!1),d.isPointerDownOnContentRef.current=!1,setTimeout(()=>{var P;((P=document.getSelection())==null?void 0:P.toString())!==""&&(d.hasSelectionRef.current=!0)})};return document.addEventListener("pointerup",t),()=>{document.removeEventListener("pointerup",t),d.hasSelectionRef.current=!1,d.isPointerDownOnContentRef.current=!1}}},[d.isPointerDownOnContentRef,d.hasSelectionRef]),n.useEffect(()=>{u.current&&ee(u.current).forEach(x=>x.setAttribute("tabindex","-1"))}),i.jsx(B,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:f,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:l(c,t=>{t.preventDefault()}),onDismiss:d.onDismiss,children:i.jsx(q,{...C,...v,onPointerDown:l(v.onPointerDown,t=>{t.currentTarget.contains(t.target)&&m(!0),d.hasSelectionRef.current=!1,d.isPointerDownOnContentRef.current=!0}),ref:h,style:{...v.style,userSelect:p?"text":void 0,WebkitUserSelect:p?"text":void 0,"--radix-hover-card-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-hover-card-content-available-width":"var(--radix-popper-available-width)","--radix-hover-card-content-available-height":"var(--radix-popper-available-height)","--radix-hover-card-trigger-width":"var(--radix-popper-anchor-width)","--radix-hover-card-trigger-height":"var(--radix-popper-anchor-height)"}})})}),Y="HoverCardArrow",Z=n.forwardRef((e,o)=>{const{__scopeHoverCard:r,...s}=e,a=b(r);return i.jsx(G,{...a,...s,ref:o})});Z.displayName=Y;function g(e){return o=>o.pointerType==="touch"?void 0:e()}function ee(e){const o=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:s=>s.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});for(;r.nextNode();)o.push(r.currentNode);return o}var te=N,oe=D,re=j,L=A;const se=te,ie=oe,ne=n.forwardRef(({className:e,align:o="center",sideOffset:r=4,...s},a)=>i.jsx(re,{children:i.jsx(L,{ref:a,align:o,sideOffset:r,className:K("z-50 w-64 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...s})}));ne.displayName=L.displayName;export{se as H,ie as a,ne as b}; +import{r as n,q as k,j as i,ag as F,ah as I,p as U,t as l,ai as T,P as O,aj as $,w as W,s as z,ao as B,ap as q,aq as G,x as K}from"./index-hxawG6mk.js";var E,w="HoverCard",[y]=W(w,[T]),b=T(),[V,S]=y(w),N=e=>{const{__scopeHoverCard:o,children:r,open:s,defaultOpen:a,onOpenChange:c,openDelay:f=700,closeDelay:v=300}=e,d=b(o),C=n.useRef(0),u=n.useRef(0),h=n.useRef(!1),p=n.useRef(!1),[m,t]=k({prop:s,defaultProp:a??!1,onChange:c,caller:w}),x=n.useCallback(()=>{clearTimeout(u.current),C.current=window.setTimeout(()=>t(!0),f)},[f,t]),P=n.useCallback(()=>{clearTimeout(C.current),!h.current&&!p.current&&(u.current=window.setTimeout(()=>t(!1),v))},[v,t]),M=n.useCallback(()=>t(!1),[t]);return n.useEffect(()=>()=>{clearTimeout(C.current),clearTimeout(u.current)},[]),i.jsx(V,{scope:o,open:m,onOpenChange:t,onOpen:x,onClose:P,onDismiss:M,hasSelectionRef:h,isPointerDownOnContentRef:p,children:i.jsx(F,{...d,children:r})})};N.displayName=w;var _="HoverCardTrigger",D=n.forwardRef((e,o)=>{const{__scopeHoverCard:r,...s}=e,a=S(_,r),c=b(r);return i.jsx(I,{asChild:!0,...c,children:i.jsx(U.a,{"data-state":a.open?"open":"closed",...s,ref:o,onPointerEnter:l(e.onPointerEnter,g(a.onOpen)),onPointerLeave:l(e.onPointerLeave,g(a.onClose)),onFocus:l(e.onFocus,a.onOpen),onBlur:l(e.onBlur,a.onClose),onTouchStart:l(e.onTouchStart,f=>f.preventDefault())})})});D.displayName=_;var H="HoverCardPortal",[J,Q]=y(H,{forceMount:void 0}),j=e=>{const{__scopeHoverCard:o,forceMount:r,children:s,container:a}=e,c=S(H,o);return i.jsx(J,{scope:o,forceMount:r,children:i.jsx(O,{present:r||c.open,children:i.jsx($,{asChild:!0,container:a,children:s})})})};j.displayName=H;var R="HoverCardContent",A=n.forwardRef((e,o)=>{const r=Q(R,e.__scopeHoverCard),{forceMount:s=r.forceMount,...a}=e,c=S(R,e.__scopeHoverCard);return i.jsx(O,{present:s||c.open,children:i.jsx(X,{"data-state":c.open?"open":"closed",...a,onPointerEnter:l(e.onPointerEnter,g(c.onOpen)),onPointerLeave:l(e.onPointerLeave,g(c.onClose)),ref:o})})});A.displayName=R;var X=n.forwardRef((e,o)=>{const{__scopeHoverCard:r,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:c,onInteractOutside:f,...v}=e,d=S(R,r),C=b(r),u=n.useRef(null),h=z(o,u),[p,m]=n.useState(!1);return n.useEffect(()=>{if(p){const t=document.body;return E=t.style.userSelect||t.style.webkitUserSelect,t.style.userSelect="none",t.style.webkitUserSelect="none",()=>{t.style.userSelect=E,t.style.webkitUserSelect=E}}},[p]),n.useEffect(()=>{if(u.current){const t=()=>{m(!1),d.isPointerDownOnContentRef.current=!1,setTimeout(()=>{var P;((P=document.getSelection())==null?void 0:P.toString())!==""&&(d.hasSelectionRef.current=!0)})};return document.addEventListener("pointerup",t),()=>{document.removeEventListener("pointerup",t),d.hasSelectionRef.current=!1,d.isPointerDownOnContentRef.current=!1}}},[d.isPointerDownOnContentRef,d.hasSelectionRef]),n.useEffect(()=>{u.current&&ee(u.current).forEach(x=>x.setAttribute("tabindex","-1"))}),i.jsx(B,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:f,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:l(c,t=>{t.preventDefault()}),onDismiss:d.onDismiss,children:i.jsx(q,{...C,...v,onPointerDown:l(v.onPointerDown,t=>{t.currentTarget.contains(t.target)&&m(!0),d.hasSelectionRef.current=!1,d.isPointerDownOnContentRef.current=!0}),ref:h,style:{...v.style,userSelect:p?"text":void 0,WebkitUserSelect:p?"text":void 0,"--radix-hover-card-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-hover-card-content-available-width":"var(--radix-popper-available-width)","--radix-hover-card-content-available-height":"var(--radix-popper-available-height)","--radix-hover-card-trigger-width":"var(--radix-popper-anchor-width)","--radix-hover-card-trigger-height":"var(--radix-popper-anchor-height)"}})})}),Y="HoverCardArrow",Z=n.forwardRef((e,o)=>{const{__scopeHoverCard:r,...s}=e,a=b(r);return i.jsx(G,{...a,...s,ref:o})});Z.displayName=Y;function g(e){return o=>o.pointerType==="touch"?void 0:e()}function ee(e){const o=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:s=>s.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});for(;r.nextNode();)o.push(r.currentNode);return o}var te=N,oe=D,re=j,L=A;const se=te,ie=oe,ne=n.forwardRef(({className:e,align:o="center",sideOffset:r=4,...s},a)=>i.jsx(re,{children:i.jsx(L,{ref:a,align:o,sideOffset:r,className:K("z-50 w-64 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...s})}));ne.displayName=L.displayName;export{se as H,ie as a,ne as b}; diff --git a/assets/index-DxRopg3G.js b/assets/index-CaRYlo5c.js similarity index 99% rename from assets/index-DxRopg3G.js rename to assets/index-CaRYlo5c.js index eefb47c6f353e545d93d97ec47a804d4557bac57..e1a0e3723ac5755912b463d027921b6ad72034f3 100644 --- a/assets/index-DxRopg3G.js +++ b/assets/index-CaRYlo5c.js @@ -1,4 +1,4 @@ -import{at as We,Z as Ot,j as Ze}from"./index-CnBotBa4.js";function hu(){}function mu(e){const n=[],t=String(e||"");let r=t.indexOf(","),i=0,l=!1;for(;!l;){r===-1&&(r=t.length,l=!0);const o=t.slice(i,r).trim();(o||!l)&&n.push(o),i=r+1,r=t.indexOf(",",i)}return n}function Ir(e,n){const t={};return(e[e.length-1]===""?[...e,""]:e).join((t.padRight?" ":"")+","+(t.padLeft===!1?"":" ")).trim()}const Tr=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Ar=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Pr={};function Vn(e,n){return(Pr.jsx?Ar:Tr).test(e)}const zr=/[ \t\n\f\r]/g;function Lr(e){return typeof e=="object"?e.type==="text"?qn(e.value):!1:qn(e)}function qn(e){return e.replace(zr,"")===""}class Me{constructor(n,t,r){this.normal=t,this.property=n,r&&(this.space=r)}}Me.prototype.normal={};Me.prototype.property={};Me.prototype.space=void 0;function _t(e,n){const t={},r={};for(const i of e)Object.assign(t,i.property),Object.assign(r,i.normal);return new Me(t,r,n)}function fn(e){return e.toLowerCase()}class J{constructor(n,t){this.attribute=t,this.property=n}}J.prototype.attribute="";J.prototype.booleanish=!1;J.prototype.boolean=!1;J.prototype.commaOrSpaceSeparated=!1;J.prototype.commaSeparated=!1;J.prototype.defined=!1;J.prototype.mustUseProperty=!1;J.prototype.number=!1;J.prototype.overloadedBoolean=!1;J.prototype.property="";J.prototype.spaceSeparated=!1;J.prototype.space=void 0;let vr=0;const z=be(),$=be(),hn=be(),k=be(),R=be(),Ie=be(),ee=be();function be(){return 2**++vr}const mn=Object.freeze(Object.defineProperty({__proto__:null,boolean:z,booleanish:$,commaOrSpaceSeparated:ee,commaSeparated:Ie,number:k,overloadedBoolean:hn,spaceSeparated:R},Symbol.toStringTag,{value:"Module"})),en=Object.keys(mn);class En extends J{constructor(n,t,r,i){let l=-1;if(super(n,t),$n(this,"space",i),typeof r=="number")for(;++l4&&t.slice(0,4)==="data"&&Fr.test(n)){if(n.charAt(4)==="-"){const l=n.slice(5).replace(Wn,Br);r="data"+l.charAt(0).toUpperCase()+l.slice(1)}else{const l=n.slice(4);if(!Wn.test(l)){let o=l.replace(Nr,Mr);o.charAt(0)!=="-"&&(o="-"+o),n="data"+o}}i=En}return new i(r,n)}function Mr(e){return"-"+e.toLowerCase()}function Br(e){return e.charAt(1).toUpperCase()}const jr=_t([Nt,Dr,Mt,Bt,jt],"html"),Cn=_t([Nt,Or,Mt,Bt,jt],"svg");function du(e){const n=String(e||"").trim();return n?n.split(/[ \t\n\r\f]+/g):[]}function Hr(e){return e.join(" ").trim()}var In={},Yn=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,Ur=/\n/g,Vr=/^\s*/,qr=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,$r=/^:\s*/,Wr=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,Yr=/^[;\s]*/,Xr=/^\s+|\s+$/g,Qr=` +import{at as We,Z as Ot,j as Ze}from"./index-hxawG6mk.js";function hu(){}function mu(e){const n=[],t=String(e||"");let r=t.indexOf(","),i=0,l=!1;for(;!l;){r===-1&&(r=t.length,l=!0);const o=t.slice(i,r).trim();(o||!l)&&n.push(o),i=r+1,r=t.indexOf(",",i)}return n}function Ir(e,n){const t={};return(e[e.length-1]===""?[...e,""]:e).join((t.padRight?" ":"")+","+(t.padLeft===!1?"":" ")).trim()}const Tr=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Ar=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Pr={};function Vn(e,n){return(Pr.jsx?Ar:Tr).test(e)}const zr=/[ \t\n\f\r]/g;function Lr(e){return typeof e=="object"?e.type==="text"?qn(e.value):!1:qn(e)}function qn(e){return e.replace(zr,"")===""}class Me{constructor(n,t,r){this.normal=t,this.property=n,r&&(this.space=r)}}Me.prototype.normal={};Me.prototype.property={};Me.prototype.space=void 0;function _t(e,n){const t={},r={};for(const i of e)Object.assign(t,i.property),Object.assign(r,i.normal);return new Me(t,r,n)}function fn(e){return e.toLowerCase()}class J{constructor(n,t){this.attribute=t,this.property=n}}J.prototype.attribute="";J.prototype.booleanish=!1;J.prototype.boolean=!1;J.prototype.commaOrSpaceSeparated=!1;J.prototype.commaSeparated=!1;J.prototype.defined=!1;J.prototype.mustUseProperty=!1;J.prototype.number=!1;J.prototype.overloadedBoolean=!1;J.prototype.property="";J.prototype.spaceSeparated=!1;J.prototype.space=void 0;let vr=0;const z=be(),$=be(),hn=be(),k=be(),R=be(),Ie=be(),ee=be();function be(){return 2**++vr}const mn=Object.freeze(Object.defineProperty({__proto__:null,boolean:z,booleanish:$,commaOrSpaceSeparated:ee,commaSeparated:Ie,number:k,overloadedBoolean:hn,spaceSeparated:R},Symbol.toStringTag,{value:"Module"})),en=Object.keys(mn);class En extends J{constructor(n,t,r,i){let l=-1;if(super(n,t),$n(this,"space",i),typeof r=="number")for(;++l4&&t.slice(0,4)==="data"&&Fr.test(n)){if(n.charAt(4)==="-"){const l=n.slice(5).replace(Wn,Br);r="data"+l.charAt(0).toUpperCase()+l.slice(1)}else{const l=n.slice(4);if(!Wn.test(l)){let o=l.replace(Nr,Mr);o.charAt(0)!=="-"&&(o="-"+o),n="data"+o}}i=En}return new i(r,n)}function Mr(e){return"-"+e.toLowerCase()}function Br(e){return e.charAt(1).toUpperCase()}const jr=_t([Nt,Dr,Mt,Bt,jt],"html"),Cn=_t([Nt,Or,Mt,Bt,jt],"svg");function du(e){const n=String(e||"").trim();return n?n.split(/[ \t\n\r\f]+/g):[]}function Hr(e){return e.join(" ").trim()}var In={},Yn=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,Ur=/\n/g,Vr=/^\s*/,qr=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,$r=/^:\s*/,Wr=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,Yr=/^[;\s]*/,Xr=/^\s+|\s+$/g,Qr=` `,Xn="/",Qn="*",ke="",Gr="comment",Kr="declaration";function Jr(e,n){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];n=n||{};var t=1,r=1;function i(y){var b=y.match(Ur);b&&(t+=b.length);var T=y.lastIndexOf(Qr);r=~T?y.length-T:r+y.length}function l(){var y={line:t,column:r};return function(b){return b.position=new o(y),c(),b}}function o(y){this.start=y,this.end={line:t,column:r},this.source=n.source}o.prototype.content=e;function a(y){var b=new Error(n.source+":"+t+":"+r+": "+y);if(b.reason=y,b.filename=n.source,b.line=t,b.column=r,b.source=e,!n.silent)throw b}function u(y){var b=y.exec(e);if(b){var T=b[0];return i(T),e=e.slice(T.length),b}}function c(){u(Vr)}function s(y){var b;for(y=y||[];b=f();)b!==!1&&y.push(b);return y}function f(){var y=l();if(!(Xn!=e.charAt(0)||Qn!=e.charAt(1))){for(var b=2;ke!=e.charAt(b)&&(Qn!=e.charAt(b)||Xn!=e.charAt(b+1));)++b;if(b+=2,ke===e.charAt(b-1))return a("End of comment missing");var T=e.slice(2,b-2);return r+=2,i(T),e=e.slice(b),r+=2,y({type:Gr,comment:T})}}function d(){var y=l(),b=u(qr);if(b){if(f(),!u($r))return a("property missing ':'");var T=u(Wr),w=y({type:Kr,property:Gn(b[0].replace(Yn,ke)),value:T?Gn(T[0].replace(Yn,ke)):ke});return u(Yr),w}}function p(){var y=[];s(y);for(var b;b=d();)b!==!1&&(y.push(b),s(y));return y}return c(),p()}function Gn(e){return e?e.replace(Xr,ke):ke}var Zr=Jr,ei=We&&We.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(In,"__esModule",{value:!0});In.default=ti;const ni=ei(Zr);function ti(e,n){let t=null;if(!e||typeof e!="string")return t;const r=(0,ni.default)(e),i=typeof n=="function";return r.forEach(l=>{if(l.type!=="declaration")return;const{property:o,value:a}=l;i?n(o,a,l):a&&(t=t||{},t[o]=a)}),t}var Qe={};Object.defineProperty(Qe,"__esModule",{value:!0});Qe.camelCase=void 0;var ri=/^--[a-zA-Z0-9_-]+$/,ii=/-([a-z])/g,li=/^[^-]+$/,oi=/^-(webkit|moz|ms|o|khtml)-/,ai=/^-(ms)-/,ui=function(e){return!e||li.test(e)||ri.test(e)},si=function(e,n){return n.toUpperCase()},Kn=function(e,n){return"".concat(n,"-")},ci=function(e,n){return n===void 0&&(n={}),ui(e)?e:(e=e.toLowerCase(),n.reactCompat?e=e.replace(ai,Kn):e=e.replace(oi,Kn),e.replace(ii,si))};Qe.camelCase=ci;var pi=We&&We.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},fi=pi(In),hi=Qe;function dn(e,n){var t={};return!e||typeof e!="string"||(0,fi.default)(e,function(r,i){r&&i&&(t[(0,hi.camelCase)(r,n)]=i)}),t}dn.default=dn;var mi=dn;const di=Ot(mi),Ht=Ut("end"),Tn=Ut("start");function Ut(e){return n;function n(t){const r=t&&t.position&&t.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function gi(e){const n=Tn(e),t=Ht(e);if(n&&t)return{start:n,end:t}}function _e(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Jn(e.position):"start"in e||"end"in e?Jn(e):"line"in e||"column"in e?gn(e):""}function gn(e){return Zn(e&&e.line)+":"+Zn(e&&e.column)}function Jn(e){return gn(e&&e.start)+"-"+gn(e&&e.end)}function Zn(e){return e&&typeof e=="number"?e:1}class Q extends Error{constructor(n,t,r){super(),typeof t=="string"&&(r=t,t=void 0);let i="",l={},o=!1;if(t&&("line"in t&&"column"in t?l={place:t}:"start"in t&&"end"in t?l={place:t}:"type"in t?l={ancestors:[t],place:t.position}:l={...t}),typeof n=="string"?i=n:!l.cause&&n&&(o=!0,i=n.message,l.cause=n),!l.ruleId&&!l.source&&typeof r=="string"){const u=r.indexOf(":");u===-1?l.ruleId=r:(l.source=r.slice(0,u),l.ruleId=r.slice(u+1))}if(!l.place&&l.ancestors&&l.ancestors){const u=l.ancestors[l.ancestors.length-1];u&&(l.place=u.position)}const a=l.place&&"start"in l.place?l.place.start:l.place;this.ancestors=l.ancestors||void 0,this.cause=l.cause||void 0,this.column=a?a.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=a?a.line:void 0,this.name=_e(l.place)||"1:1",this.place=l.place||void 0,this.reason=this.message,this.ruleId=l.ruleId||void 0,this.source=l.source||void 0,this.stack=o&&l.cause&&typeof l.cause.stack=="string"?l.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Q.prototype.file="";Q.prototype.name="";Q.prototype.reason="";Q.prototype.message="";Q.prototype.stack="";Q.prototype.column=void 0;Q.prototype.line=void 0;Q.prototype.ancestors=void 0;Q.prototype.cause=void 0;Q.prototype.fatal=void 0;Q.prototype.place=void 0;Q.prototype.ruleId=void 0;Q.prototype.source=void 0;const An={}.hasOwnProperty,yi=new Map,xi=/[A-Z]/g,ki=new Set(["table","tbody","thead","tfoot","tr"]),bi=new Set(["td","th"]),Vt="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function wi(e,n){if(!n||n.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const t=n.filePath||void 0;let r;if(n.development){if(typeof n.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=zi(t,n.jsxDEV)}else{if(typeof n.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof n.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=Pi(t,n.jsx,n.jsxs)}const i={Fragment:n.Fragment,ancestors:[],components:n.components||{},create:r,elementAttributeNameCase:n.elementAttributeNameCase||"react",evaluater:n.createEvaluater?n.createEvaluater():void 0,filePath:t,ignoreInvalidStyle:n.ignoreInvalidStyle||!1,passKeys:n.passKeys!==!1,passNode:n.passNode||!1,schema:n.space==="svg"?Cn:jr,stylePropertyNameCase:n.stylePropertyNameCase||"dom",tableCellAlignToStyle:n.tableCellAlignToStyle!==!1},l=qt(i,e,void 0);return l&&typeof l!="string"?l:i.create(e,i.Fragment,{children:l||void 0},void 0)}function qt(e,n,t){if(n.type==="element")return Si(e,n,t);if(n.type==="mdxFlowExpression"||n.type==="mdxTextExpression")return Ei(e,n);if(n.type==="mdxJsxFlowElement"||n.type==="mdxJsxTextElement")return Ii(e,n,t);if(n.type==="mdxjsEsm")return Ci(e,n);if(n.type==="root")return Ti(e,n,t);if(n.type==="text")return Ai(e,n)}function Si(e,n,t){const r=e.schema;let i=r;n.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=Cn,e.schema=i),e.ancestors.push(n);const l=Wt(e,n.tagName,!1),o=Li(e,n);let a=zn(e,n);return ki.has(n.tagName)&&(a=a.filter(function(u){return typeof u=="string"?!Lr(u):!0})),$t(e,o,l,n),Pn(o,a),e.ancestors.pop(),e.schema=r,e.create(n,l,o,t)}function Ei(e,n){if(n.data&&n.data.estree&&e.evaluater){const r=n.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}Re(e,n.position)}function Ci(e,n){if(n.data&&n.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(n.data.estree);Re(e,n.position)}function Ii(e,n,t){const r=e.schema;let i=r;n.name==="svg"&&r.space==="html"&&(i=Cn,e.schema=i),e.ancestors.push(n);const l=n.name===null?e.Fragment:Wt(e,n.name,!0),o=vi(e,n),a=zn(e,n);return $t(e,o,l,n),Pn(o,a),e.ancestors.pop(),e.schema=r,e.create(n,l,o,t)}function Ti(e,n,t){const r={};return Pn(r,zn(e,n)),e.create(n,e.Fragment,r,t)}function Ai(e,n){return n.value}function $t(e,n,t,r){typeof t!="string"&&t!==e.Fragment&&e.passNode&&(n.node=r)}function Pn(e,n){if(n.length>0){const t=n.length>1?n:n[0];t&&(e.children=t)}}function Pi(e,n,t){return r;function r(i,l,o,a){const c=Array.isArray(o.children)?t:n;return a?c(l,o,a):c(l,o)}}function zi(e,n){return t;function t(r,i,l,o){const a=Array.isArray(l.children),u=Tn(r);return n(i,l,o,a,{columnNumber:u?u.column-1:void 0,fileName:e,lineNumber:u?u.line:void 0},void 0)}}function Li(e,n){const t={};let r,i;for(i in n.properties)if(i!=="children"&&An.call(n.properties,i)){const l=Di(e,i,n.properties[i]);if(l){const[o,a]=l;e.tableCellAlignToStyle&&o==="align"&&typeof a=="string"&&bi.has(n.tagName)?r=a:t[o]=a}}if(r){const l=t.style||(t.style={});l[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return t}function vi(e,n){const t={};for(const r of n.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const l=r.data.estree.body[0];l.type;const o=l.expression;o.type;const a=o.properties[0];a.type,Object.assign(t,e.evaluater.evaluateExpression(a.argument))}else Re(e,n.position);else{const i=r.name;let l;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const a=r.value.data.estree.body[0];a.type,l=e.evaluater.evaluateExpression(a.expression)}else Re(e,n.position);else l=r.value===null?!0:r.value;t[i]=l}return t}function zn(e,n){const t=[];let r=-1;const i=e.passKeys?new Map:yi;for(;++ri?0:i+n:n=n>i?i:n,t=t>0?t:0,r.length<1e4)o=Array.from(r),o.unshift(n,t),e.splice(...o);else for(t&&e.splice(n,t);l0?(se(e,e.length,0,n),e):n}const tt={}.hasOwnProperty;function ji(e){const n={};let t=-1;for(;++t13&&t<32||t>126&&t<160||t>55295&&t<57344||t>64975&&t<65008||(t&65535)===65535||(t&65535)===65534||t>1114111?"�":String.fromCodePoint(t)}function Te(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const ue=ge(/[A-Za-z]/),ne=ge(/[\dA-Za-z]/),Vi=ge(/[#-'*+\--9=?A-Z^-~]/);function yn(e){return e!==null&&(e<32||e===127)}const xn=ge(/\d/),qi=ge(/[\dA-Fa-f]/),$i=ge(/[!-/:-@[-`{-~]/);function A(e){return e!==null&&e<-2}function K(e){return e!==null&&(e<0||e===32)}function O(e){return e===-2||e===-1||e===32}const Wi=ge(new RegExp("\\p{P}|\\p{S}","u")),Yi=ge(/\s/);function ge(e){return n;function n(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function Pe(e){const n=[];let t=-1,r=0,i=0;for(;++t55295&&l<57344){const a=e.charCodeAt(t+1);l<56320&&a>56319&&a<57344?(o=String.fromCharCode(l,a),i=1):o="�"}else o=String.fromCharCode(l);o&&(n.push(e.slice(r,t),encodeURIComponent(o)),r=t+i+1,o=""),i&&(t+=i,i=0)}return n.join("")+e.slice(r)}function M(e,n,t,r){const i=r?r-1:Number.POSITIVE_INFINITY;let l=0;return o;function o(u){return O(u)?(e.enter(t),a(u)):n(u)}function a(u){return O(u)&&l++o))return;const _=n.events.length;let V=_,N,B;for(;V--;)if(n.events[V][0]==="exit"&&n.events[V][1].type==="chunkFlow"){if(N){B=n.events[V][1].end;break}N=!0}for(w(r),x=_;xE;){const U=t[j];n.containerState=U[1],U[0].exit.call(n,e)}t.length=E}function L(){i.write([null]),l=void 0,i=void 0,n.containerState._closeFlow=void 0}}function Ji(e,n,t){return M(e,e.attempt(this.parser.constructs.document,n,t),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function it(e){if(e===null||K(e)||Yi(e))return 1;if(Wi(e))return 2}function vn(e,n,t){const r=[];let i=-1;for(;++i1&&e[t][1].end.offset-e[t][1].start.offset>1?2:1;const f={...e[r][1].end},d={...e[t][1].start};lt(f,-u),lt(d,u),o={type:u>1?"strongSequence":"emphasisSequence",start:f,end:{...e[r][1].end}},a={type:u>1?"strongSequence":"emphasisSequence",start:{...e[t][1].start},end:d},l={type:u>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[t][1].start}},i={type:u>1?"strong":"emphasis",start:{...o.start},end:{...a.end}},e[r][1].end={...o.start},e[t][1].start={...a.end},c=[],e[r][1].end.offset-e[r][1].start.offset&&(c=te(c,[["enter",e[r][1],n],["exit",e[r][1],n]])),c=te(c,[["enter",i,n],["enter",o,n],["exit",o,n],["enter",l,n]]),c=te(c,vn(n.parser.constructs.insideSpan.null,e.slice(r+1,t),n)),c=te(c,[["exit",l,n],["enter",a,n],["exit",a,n],["exit",i,n]]),e[t][1].end.offset-e[t][1].start.offset?(s=2,c=te(c,[["enter",e[t][1],n],["exit",e[t][1],n]])):s=0,se(e,r-1,t-r+3,c),t=r+c.length-s-2;break}}for(t=-1;++t0&&O(x)?M(e,L,"linePrefix",l+1)(x):L(x)}function L(x){return x===null||A(x)?e.check(ot,b,j)(x):(e.enter("codeFlowValue"),E(x))}function E(x){return x===null||A(x)?(e.exit("codeFlowValue"),L(x)):(e.consume(x),E)}function j(x){return e.exit("codeFenced"),n(x)}function U(x,_,V){let N=0;return B;function B(D){return x.enter("lineEnding"),x.consume(D),x.exit("lineEnding"),I}function I(D){return x.enter("codeFencedFence"),O(D)?M(x,C,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(D):C(D)}function C(D){return D===a?(x.enter("codeFencedFenceSequence"),H(D)):V(D)}function H(D){return D===a?(N++,x.consume(D),H):N>=o?(x.exit("codeFencedFenceSequence"),O(D)?M(x,q,"whitespace")(D):q(D)):V(D)}function q(D){return D===null||A(D)?(x.exit("codeFencedFence"),_(D)):V(D)}}}function cl(e,n,t){const r=this;return i;function i(o){return o===null?t(o):(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),l)}function l(o){return r.parser.lazy[r.now().line]?t(o):n(o)}}const tn={name:"codeIndented",tokenize:fl},pl={partial:!0,tokenize:hl};function fl(e,n,t){const r=this;return i;function i(c){return e.enter("codeIndented"),M(e,l,"linePrefix",5)(c)}function l(c){const s=r.events[r.events.length-1];return s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?o(c):t(c)}function o(c){return c===null?u(c):A(c)?e.attempt(pl,o,u)(c):(e.enter("codeFlowValue"),a(c))}function a(c){return c===null||A(c)?(e.exit("codeFlowValue"),o(c)):(e.consume(c),a)}function u(c){return e.exit("codeIndented"),n(c)}}function hl(e,n,t){const r=this;return i;function i(o){return r.parser.lazy[r.now().line]?t(o):A(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),i):M(e,l,"linePrefix",5)(o)}function l(o){const a=r.events[r.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?n(o):A(o)?i(o):t(o)}}const ml={name:"codeText",previous:gl,resolve:dl,tokenize:yl};function dl(e){let n=e.length-4,t=3,r,i;if((e[t][1].type==="lineEnding"||e[t][1].type==="space")&&(e[n][1].type==="lineEnding"||e[n][1].type==="space")){for(r=t;++r=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+n+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return nthis.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-n+this.left.length).reverse():this.left.slice(n).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(n,t,r){const i=t||0;this.setCursor(Math.trunc(n));const l=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&De(this.left,r),l.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(n){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(n)}pushMany(n){this.setCursor(Number.POSITIVE_INFINITY),De(this.left,n)}unshift(n){this.setCursor(0),this.right.push(n)}unshiftMany(n){this.setCursor(0),De(this.right,n.reverse())}setCursor(n){if(!(n===this.left.length||n>this.left.length&&this.right.length===0||n<0&&this.left.length===0))if(n=4?n(o):e.interrupt(r.parser.constructs.flow,t,n)(o)}}function Zt(e,n,t,r,i,l,o,a,u){const c=u||Number.POSITIVE_INFINITY;let s=0;return f;function f(w){return w===60?(e.enter(r),e.enter(i),e.enter(l),e.consume(w),e.exit(l),d):w===null||w===32||w===41||yn(w)?t(w):(e.enter(r),e.enter(o),e.enter(a),e.enter("chunkString",{contentType:"string"}),b(w))}function d(w){return w===62?(e.enter(l),e.consume(w),e.exit(l),e.exit(i),e.exit(r),n):(e.enter(a),e.enter("chunkString",{contentType:"string"}),p(w))}function p(w){return w===62?(e.exit("chunkString"),e.exit(a),d(w)):w===null||w===60||A(w)?t(w):(e.consume(w),w===92?y:p)}function y(w){return w===60||w===62||w===92?(e.consume(w),p):p(w)}function b(w){return!s&&(w===null||w===41||K(w))?(e.exit("chunkString"),e.exit(a),e.exit(o),e.exit(r),n(w)):s999||p===null||p===91||p===93&&!u||p===94&&!a&&"_hiddenFootnoteSupport"in o.parser.constructs?t(p):p===93?(e.exit(l),e.enter(i),e.consume(p),e.exit(i),e.exit(r),n):A(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),s):(e.enter("chunkString",{contentType:"string"}),f(p))}function f(p){return p===null||p===91||p===93||A(p)||a++>999?(e.exit("chunkString"),s(p)):(e.consume(p),u||(u=!O(p)),p===92?d:f)}function d(p){return p===91||p===92||p===93?(e.consume(p),a++,f):f(p)}}function nr(e,n,t,r,i,l){let o;return a;function a(d){return d===34||d===39||d===40?(e.enter(r),e.enter(i),e.consume(d),e.exit(i),o=d===40?41:d,u):t(d)}function u(d){return d===o?(e.enter(i),e.consume(d),e.exit(i),e.exit(r),n):(e.enter(l),c(d))}function c(d){return d===o?(e.exit(l),u(o)):d===null?t(d):A(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),M(e,c,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),s(d))}function s(d){return d===o||d===null||A(d)?(e.exit("chunkString"),c(d)):(e.consume(d),d===92?f:s)}function f(d){return d===o||d===92?(e.consume(d),s):s(d)}}function Ne(e,n){let t;return r;function r(i){return A(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),t=!0,r):O(i)?M(e,r,t?"linePrefix":"lineSuffix")(i):n(i)}}const Il={name:"definition",tokenize:Al},Tl={partial:!0,tokenize:Pl};function Al(e,n,t){const r=this;let i;return l;function l(p){return e.enter("definition"),o(p)}function o(p){return er.call(r,e,a,t,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function a(p){return i=Te(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),u):t(p)}function u(p){return K(p)?Ne(e,c)(p):c(p)}function c(p){return Zt(e,s,t,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function s(p){return e.attempt(Tl,f,f)(p)}function f(p){return O(p)?M(e,d,"whitespace")(p):d(p)}function d(p){return p===null||A(p)?(e.exit("definition"),r.parser.defined.push(i),n(p)):t(p)}}function Pl(e,n,t){return r;function r(a){return K(a)?Ne(e,i)(a):t(a)}function i(a){return nr(e,l,t,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function l(a){return O(a)?M(e,o,"whitespace")(a):o(a)}function o(a){return a===null||A(a)?n(a):t(a)}}const zl={name:"hardBreakEscape",tokenize:Ll};function Ll(e,n,t){return r;function r(l){return e.enter("hardBreakEscape"),e.consume(l),i}function i(l){return A(l)?(e.exit("hardBreakEscape"),n(l)):t(l)}}const vl={name:"headingAtx",resolve:Dl,tokenize:Ol};function Dl(e,n){let t=e.length-2,r=3,i,l;return e[r][1].type==="whitespace"&&(r+=2),t-2>r&&e[t][1].type==="whitespace"&&(t-=2),e[t][1].type==="atxHeadingSequence"&&(r===t-1||t-4>r&&e[t-2][1].type==="whitespace")&&(t-=r+1===t?2:4),t>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[t][1].end},l={type:"chunkText",start:e[r][1].start,end:e[t][1].end,contentType:"text"},se(e,r,t-r+1,[["enter",i,n],["enter",l,n],["exit",l,n],["exit",i,n]])),e}function Ol(e,n,t){let r=0;return i;function i(s){return e.enter("atxHeading"),l(s)}function l(s){return e.enter("atxHeadingSequence"),o(s)}function o(s){return s===35&&r++<6?(e.consume(s),o):s===null||K(s)?(e.exit("atxHeadingSequence"),a(s)):t(s)}function a(s){return s===35?(e.enter("atxHeadingSequence"),u(s)):s===null||A(s)?(e.exit("atxHeading"),n(s)):O(s)?M(e,a,"whitespace")(s):(e.enter("atxHeadingText"),c(s))}function u(s){return s===35?(e.consume(s),u):(e.exit("atxHeadingSequence"),a(s))}function c(s){return s===null||s===35||K(s)?(e.exit("atxHeadingText"),a(s)):(e.consume(s),c)}}const _l=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],ut=["pre","script","style","textarea"],Nl={concrete:!0,name:"htmlFlow",resolveTo:Ml,tokenize:Bl},Fl={partial:!0,tokenize:Hl},Rl={partial:!0,tokenize:jl};function Ml(e){let n=e.length;for(;n--&&!(e[n][0]==="enter"&&e[n][1].type==="htmlFlow"););return n>1&&e[n-2][1].type==="linePrefix"&&(e[n][1].start=e[n-2][1].start,e[n+1][1].start=e[n-2][1].start,e.splice(n-2,2)),e}function Bl(e,n,t){const r=this;let i,l,o,a,u;return c;function c(m){return s(m)}function s(m){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(m),f}function f(m){return m===33?(e.consume(m),d):m===47?(e.consume(m),l=!0,b):m===63?(e.consume(m),i=3,r.interrupt?n:h):ue(m)?(e.consume(m),o=String.fromCharCode(m),T):t(m)}function d(m){return m===45?(e.consume(m),i=2,p):m===91?(e.consume(m),i=5,a=0,y):ue(m)?(e.consume(m),i=4,r.interrupt?n:h):t(m)}function p(m){return m===45?(e.consume(m),r.interrupt?n:h):t(m)}function y(m){const le="CDATA[";return m===le.charCodeAt(a++)?(e.consume(m),a===le.length?r.interrupt?n:C:y):t(m)}function b(m){return ue(m)?(e.consume(m),o=String.fromCharCode(m),T):t(m)}function T(m){if(m===null||m===47||m===62||K(m)){const le=m===47,ye=o.toLowerCase();return!le&&!l&&ut.includes(ye)?(i=1,r.interrupt?n(m):C(m)):_l.includes(o.toLowerCase())?(i=6,le?(e.consume(m),w):r.interrupt?n(m):C(m)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?t(m):l?L(m):E(m))}return m===45||ne(m)?(e.consume(m),o+=String.fromCharCode(m),T):t(m)}function w(m){return m===62?(e.consume(m),r.interrupt?n:C):t(m)}function L(m){return O(m)?(e.consume(m),L):B(m)}function E(m){return m===47?(e.consume(m),B):m===58||m===95||ue(m)?(e.consume(m),j):O(m)?(e.consume(m),E):B(m)}function j(m){return m===45||m===46||m===58||m===95||ne(m)?(e.consume(m),j):U(m)}function U(m){return m===61?(e.consume(m),x):O(m)?(e.consume(m),U):E(m)}function x(m){return m===null||m===60||m===61||m===62||m===96?t(m):m===34||m===39?(e.consume(m),u=m,_):O(m)?(e.consume(m),x):V(m)}function _(m){return m===u?(e.consume(m),u=null,N):m===null||A(m)?t(m):(e.consume(m),_)}function V(m){return m===null||m===34||m===39||m===47||m===60||m===61||m===62||m===96||K(m)?U(m):(e.consume(m),V)}function N(m){return m===47||m===62||O(m)?E(m):t(m)}function B(m){return m===62?(e.consume(m),I):t(m)}function I(m){return m===null||A(m)?C(m):O(m)?(e.consume(m),I):t(m)}function C(m){return m===45&&i===2?(e.consume(m),X):m===60&&i===1?(e.consume(m),W):m===62&&i===4?(e.consume(m),ie):m===63&&i===3?(e.consume(m),h):m===93&&i===5?(e.consume(m),ce):A(m)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(Fl,pe,H)(m)):m===null||A(m)?(e.exit("htmlFlowData"),H(m)):(e.consume(m),C)}function H(m){return e.check(Rl,q,pe)(m)}function q(m){return e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),D}function D(m){return m===null||A(m)?H(m):(e.enter("htmlFlowData"),C(m))}function X(m){return m===45?(e.consume(m),h):C(m)}function W(m){return m===47?(e.consume(m),o="",re):C(m)}function re(m){if(m===62){const le=o.toLowerCase();return ut.includes(le)?(e.consume(m),ie):C(m)}return ue(m)&&o.length<8?(e.consume(m),o+=String.fromCharCode(m),re):C(m)}function ce(m){return m===93?(e.consume(m),h):C(m)}function h(m){return m===62?(e.consume(m),ie):m===45&&i===2?(e.consume(m),h):C(m)}function ie(m){return m===null||A(m)?(e.exit("htmlFlowData"),pe(m)):(e.consume(m),ie)}function pe(m){return e.exit("htmlFlow"),n(m)}}function jl(e,n,t){const r=this;return i;function i(o){return A(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),l):t(o)}function l(o){return r.parser.lazy[r.now().line]?t(o):n(o)}}function Hl(e,n,t){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Ge,n,t)}}const Ul={name:"htmlText",tokenize:Vl};function Vl(e,n,t){const r=this;let i,l,o;return a;function a(h){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(h),u}function u(h){return h===33?(e.consume(h),c):h===47?(e.consume(h),U):h===63?(e.consume(h),E):ue(h)?(e.consume(h),V):t(h)}function c(h){return h===45?(e.consume(h),s):h===91?(e.consume(h),l=0,y):ue(h)?(e.consume(h),L):t(h)}function s(h){return h===45?(e.consume(h),p):t(h)}function f(h){return h===null?t(h):h===45?(e.consume(h),d):A(h)?(o=f,W(h)):(e.consume(h),f)}function d(h){return h===45?(e.consume(h),p):f(h)}function p(h){return h===62?X(h):h===45?d(h):f(h)}function y(h){const ie="CDATA[";return h===ie.charCodeAt(l++)?(e.consume(h),l===ie.length?b:y):t(h)}function b(h){return h===null?t(h):h===93?(e.consume(h),T):A(h)?(o=b,W(h)):(e.consume(h),b)}function T(h){return h===93?(e.consume(h),w):b(h)}function w(h){return h===62?X(h):h===93?(e.consume(h),w):b(h)}function L(h){return h===null||h===62?X(h):A(h)?(o=L,W(h)):(e.consume(h),L)}function E(h){return h===null?t(h):h===63?(e.consume(h),j):A(h)?(o=E,W(h)):(e.consume(h),E)}function j(h){return h===62?X(h):E(h)}function U(h){return ue(h)?(e.consume(h),x):t(h)}function x(h){return h===45||ne(h)?(e.consume(h),x):_(h)}function _(h){return A(h)?(o=_,W(h)):O(h)?(e.consume(h),_):X(h)}function V(h){return h===45||ne(h)?(e.consume(h),V):h===47||h===62||K(h)?N(h):t(h)}function N(h){return h===47?(e.consume(h),X):h===58||h===95||ue(h)?(e.consume(h),B):A(h)?(o=N,W(h)):O(h)?(e.consume(h),N):X(h)}function B(h){return h===45||h===46||h===58||h===95||ne(h)?(e.consume(h),B):I(h)}function I(h){return h===61?(e.consume(h),C):A(h)?(o=I,W(h)):O(h)?(e.consume(h),I):N(h)}function C(h){return h===null||h===60||h===61||h===62||h===96?t(h):h===34||h===39?(e.consume(h),i=h,H):A(h)?(o=C,W(h)):O(h)?(e.consume(h),C):(e.consume(h),q)}function H(h){return h===i?(e.consume(h),i=void 0,D):h===null?t(h):A(h)?(o=H,W(h)):(e.consume(h),H)}function q(h){return h===null||h===34||h===39||h===60||h===61||h===96?t(h):h===47||h===62||K(h)?N(h):(e.consume(h),q)}function D(h){return h===47||h===62||K(h)?N(h):t(h)}function X(h){return h===62?(e.consume(h),e.exit("htmlTextData"),e.exit("htmlText"),n):t(h)}function W(h){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),re}function re(h){return O(h)?M(e,ce,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(h):ce(h)}function ce(h){return e.enter("htmlTextData"),o(h)}}const Dn={name:"labelEnd",resolveAll:Yl,resolveTo:Xl,tokenize:Ql},ql={tokenize:Gl},$l={tokenize:Kl},Wl={tokenize:Jl};function Yl(e){let n=-1;const t=[];for(;++n=3&&(c===null||A(c))?(e.exit("thematicBreak"),n(c)):t(c)}function u(c){return c===i?(e.consume(c),r++,u):(e.exit("thematicBreakSequence"),O(c)?M(e,a,"whitespace")(c):a(c))}}const G={continuation:{tokenize:uo},exit:co,name:"list",tokenize:ao},lo={partial:!0,tokenize:po},oo={partial:!0,tokenize:so};function ao(e,n,t){const r=this,i=r.events[r.events.length-1];let l=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,o=0;return a;function a(p){const y=r.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(y==="listUnordered"?!r.containerState.marker||p===r.containerState.marker:xn(p)){if(r.containerState.type||(r.containerState.type=y,e.enter(y,{_container:!0})),y==="listUnordered")return e.enter("listItemPrefix"),p===42||p===45?e.check(qe,t,c)(p):c(p);if(!r.interrupt||p===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),u(p)}return t(p)}function u(p){return xn(p)&&++o<10?(e.consume(p),u):(!r.interrupt||o<2)&&(r.containerState.marker?p===r.containerState.marker:p===41||p===46)?(e.exit("listItemValue"),c(p)):t(p)}function c(p){return e.enter("listItemMarker"),e.consume(p),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||p,e.check(Ge,r.interrupt?t:s,e.attempt(lo,d,f))}function s(p){return r.containerState.initialBlankLine=!0,l++,d(p)}function f(p){return O(p)?(e.enter("listItemPrefixWhitespace"),e.consume(p),e.exit("listItemPrefixWhitespace"),d):t(p)}function d(p){return r.containerState.size=l+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,n(p)}}function uo(e,n,t){const r=this;return r.containerState._closeFlow=void 0,e.check(Ge,i,l);function i(a){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,M(e,n,"listItemIndent",r.containerState.size+1)(a)}function l(a){return r.containerState.furtherBlankLines||!O(a)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(a)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(oo,n,o)(a))}function o(a){return r.containerState._closeFlow=!0,r.interrupt=void 0,M(e,e.attempt(G,n,t),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function so(e,n,t){const r=this;return M(e,i,"listItemIndent",r.containerState.size+1);function i(l){const o=r.events[r.events.length-1];return o&&o[1].type==="listItemIndent"&&o[2].sliceSerialize(o[1],!0).length===r.containerState.size?n(l):t(l)}}function co(e){e.exit(this.containerState.type)}function po(e,n,t){const r=this;return M(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(l){const o=r.events[r.events.length-1];return!O(l)&&o&&o[1].type==="listItemPrefixWhitespace"?n(l):t(l)}}const st={name:"setextUnderline",resolveTo:fo,tokenize:ho};function fo(e,n){let t=e.length,r,i,l;for(;t--;)if(e[t][0]==="enter"){if(e[t][1].type==="content"){r=t;break}e[t][1].type==="paragraph"&&(i=t)}else e[t][1].type==="content"&&e.splice(t,1),!l&&e[t][1].type==="definition"&&(l=t);const o={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",l?(e.splice(i,0,["enter",o,n]),e.splice(l+1,0,["exit",e[r][1],n]),e[r][1].end={...e[l][1].end}):e[r][1]=o,e.push(["exit",o,n]),e}function ho(e,n,t){const r=this;let i;return l;function l(c){let s=r.events.length,f;for(;s--;)if(r.events[s][1].type!=="lineEnding"&&r.events[s][1].type!=="linePrefix"&&r.events[s][1].type!=="content"){f=r.events[s][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||f)?(e.enter("setextHeadingLine"),i=c,o(c)):t(c)}function o(c){return e.enter("setextHeadingLineSequence"),a(c)}function a(c){return c===i?(e.consume(c),a):(e.exit("setextHeadingLineSequence"),O(c)?M(e,u,"lineSuffix")(c):u(c))}function u(c){return c===null||A(c)?(e.exit("setextHeadingLine"),n(c)):t(c)}}const mo={tokenize:go};function go(e){const n=this,t=e.attempt(Ge,r,e.attempt(this.parser.constructs.flowInitial,i,M(e,e.attempt(this.parser.constructs.flow,i,e.attempt(bl,i)),"linePrefix")));return t;function r(l){if(l===null){e.consume(l);return}return e.enter("lineEndingBlank"),e.consume(l),e.exit("lineEndingBlank"),n.currentConstruct=void 0,t}function i(l){if(l===null){e.consume(l);return}return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),n.currentConstruct=void 0,t}}const yo={resolveAll:rr()},xo=tr("string"),ko=tr("text");function tr(e){return{resolveAll:rr(e==="text"?bo:void 0),tokenize:n};function n(t){const r=this,i=this.parser.constructs[e],l=t.attempt(i,o,a);return o;function o(s){return c(s)?l(s):a(s)}function a(s){if(s===null){t.consume(s);return}return t.enter("data"),t.consume(s),u}function u(s){return c(s)?(t.exit("data"),l(s)):(t.consume(s),u)}function c(s){if(s===null)return!0;const f=i[s];let d=-1;if(f)for(;++d-1){const a=o[0];typeof a=="string"?o[0]=a.slice(r):o.shift()}l>0&&o.push(e[i].slice(0,l))}return o}function Oo(e,n){let t=-1;const r=[];let i;for(;++t0){const oe=P.tokenStack[P.tokenStack.length-1];(oe[1]||pt).call(P,void 0,oe[0])}for(S.position={start:de(g.length>0?g[0][1].start:{line:1,column:1,offset:0}),end:de(g.length>0?g[g.length-2][1].end:{line:1,column:1,offset:0})},F=-1;++F:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.25rem * var(--tw-space-x-reverse));margin-left:calc(.25rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(1rem * var(--tw-space-x-reverse));margin-left:calc(1rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-1\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.375rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.375rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.25rem * var(--tw-space-y-reverse))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * var(--tw-space-y-reverse))}.justify-self-end{justify-self:end}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.overscroll-contain{overscroll-behavior:contain}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-sm{border-radius:calc(var(--radius) - 4px)}.\!border{border-width:1px!important}.border{border-width:1px}.border-2{border-width:2px}.border-b{border-bottom-width:1px}.border-t{border-top-width:1px}.border-dashed{border-style:dashed}.\!border-black{--tw-border-opacity: 1 !important;border-color:rgb(0 0 0 / var(--tw-border-opacity, 1))!important}.border-amber-200{--tw-border-opacity: 1;border-color:rgb(253 230 138 / var(--tw-border-opacity, 1))}.border-amber-500{--tw-border-opacity: 1;border-color:rgb(245 158 11 / var(--tw-border-opacity, 1))}.border-border{border-color:hsl(var(--border))}.border-destructive{border-color:hsl(var(--destructive))}.border-destructive\/40{border-color:hsl(var(--destructive) / .4)}.border-destructive\/50{border-color:hsl(var(--destructive) / .5)}.border-input{border-color:hsl(var(--input))}.border-primary{border-color:hsl(var(--primary))}.border-red-500{--tw-border-opacity: 1;border-color:rgb(239 68 68 / var(--tw-border-opacity, 1))}.border-transparent{border-color:transparent}.bg-accent{background-color:hsl(var(--accent-tw))}.bg-amber-100{--tw-bg-opacity: 1;background-color:rgb(254 243 199 / var(--tw-bg-opacity, 1))}.bg-amber-50{--tw-bg-opacity: 1;background-color:rgb(255 251 235 / var(--tw-bg-opacity, 1))}.bg-background{background-color:hsl(var(--background))}.bg-background\/80{background-color:hsl(var(--background) / .8)}.bg-black\/80{background-color:#000c}.bg-blue-100{--tw-bg-opacity: 1;background-color:rgb(219 234 254 / var(--tw-bg-opacity, 1))}.bg-border{background-color:hsl(var(--border))}.bg-card{background-color:hsl(var(--card))}.bg-destructive{background-color:hsl(var(--destructive))}.bg-destructive\/10{background-color:hsl(var(--destructive) / .1)}.bg-muted{background-color:hsl(var(--muted))}.bg-muted\/30{background-color:hsl(var(--muted) / .3)}.bg-muted\/40{background-color:hsl(var(--muted) / .4)}.bg-muted\/50{background-color:hsl(var(--muted) / .5)}.bg-popover{background-color:hsl(var(--popover))}.bg-primary{background-color:hsl(var(--primary))}.bg-red-50\/50{background-color:#fef2f280}.bg-secondary{background-color:hsl(var(--secondary))}.bg-transparent{background-color:transparent}.fill-current{fill:currentColor}.object-contain{-o-object-fit:contain;object-fit:contain}.p-0{padding:0}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-8{padding-left:2rem;padding-right:2rem}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-10{padding-top:2.5rem;padding-bottom:2.5rem}.py-12{padding-top:3rem;padding-bottom:3rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-5{padding-top:1.25rem;padding-bottom:1.25rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.py-8{padding-top:2rem;padding-bottom:2rem}.pb-2{padding-bottom:.5rem}.pb-4{padding-bottom:1rem}.pl-4{padding-left:1rem}.pl-5{padding-left:1.25rem}.pl-8{padding-left:2rem}.pl-9{padding-left:2.25rem}.pr-16{padding-right:4rem}.pr-2{padding-right:.5rem}.pr-9{padding-right:2.25rem}.pt-0{padding-top:0}.pt-2{padding-top:.5rem}.pt-6{padding-top:1.5rem}.text-left{text-align:left}.text-center{text-align:center}.align-top{vertical-align:top}.align-middle{vertical-align:middle}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-\[10px\]{font-size:10px}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.lowercase{text-transform:lowercase}.capitalize{text-transform:capitalize}.italic{font-style:italic}.leading-none{line-height:1}.leading-relaxed{line-height:1.625}.leading-snug{line-height:1.375}.leading-tight{line-height:1.25}.tracking-tight{letter-spacing:-.025em}.tracking-wide{letter-spacing:.025em}.tracking-widest{letter-spacing:.1em}.text-amber-900{--tw-text-opacity: 1;color:rgb(120 53 15 / var(--tw-text-opacity, 1))}.text-blue-900{--tw-text-opacity: 1;color:rgb(30 58 138 / var(--tw-text-opacity, 1))}.text-card-foreground{color:hsl(var(--card-foreground))}.text-current{color:currentColor}.text-destructive{color:hsl(var(--destructive))}.text-destructive-foreground{color:hsl(var(--destructive-foreground))}.text-foreground{color:hsl(var(--foreground))}.text-muted-foreground{color:hsl(var(--muted-foreground))}.text-popover-foreground{color:hsl(var(--popover-foreground))}.text-primary{color:hsl(var(--primary))}.text-primary-foreground{color:hsl(var(--primary-foreground))}.text-red-700{--tw-text-opacity: 1;color:rgb(185 28 28 / var(--tw-text-opacity, 1))}.text-secondary-foreground{color:hsl(var(--secondary-foreground))}.underline{text-decoration-line:underline}.underline-offset-2{text-underline-offset:2px}.underline-offset-4{text-underline-offset:4px}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-30{opacity:.3}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.opacity-90{opacity:.9}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.ring-0{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-offset-background{--tw-ring-offset-color: hsl(var(--background))}.blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.drop-shadow{--tw-drop-shadow: drop-shadow(0 1px 2px rgb(0 0 0 / .1)) drop-shadow(0 1px 1px rgb(0 0 0 / .06));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-200{transition-duration:.2s}@keyframes enter{0%{opacity:var(--tw-enter-opacity, 1);transform:translate3d(var(--tw-enter-translate-x, 0),var(--tw-enter-translate-y, 0),0) scale3d(var(--tw-enter-scale, 1),var(--tw-enter-scale, 1),var(--tw-enter-scale, 1)) rotate(var(--tw-enter-rotate, 0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity, 1);transform:translate3d(var(--tw-exit-translate-x, 0),var(--tw-exit-translate-y, 0),0) scale3d(var(--tw-exit-scale, 1),var(--tw-exit-scale, 1),var(--tw-exit-scale, 1)) rotate(var(--tw-exit-rotate, 0))}}.animate-in{animation-name:enter;animation-duration:.15s;--tw-enter-opacity: initial;--tw-enter-scale: initial;--tw-enter-rotate: initial;--tw-enter-translate-x: initial;--tw-enter-translate-y: initial}.fade-in-0{--tw-enter-opacity: 0}.zoom-in-95{--tw-enter-scale: .95}.duration-200{animation-duration:.2s}.\!running{animation-play-state:running!important}.running{animation-play-state:running}.paused{animation-play-state:paused}.file\:border-0::file-selector-button{border-width:0px}.file\:bg-transparent::file-selector-button{background-color:transparent}.file\:text-sm::file-selector-button{font-size:.875rem;line-height:1.25rem}.file\:font-medium::file-selector-button{font-weight:500}.file\:text-foreground::file-selector-button{color:hsl(var(--foreground))}.placeholder\:text-muted-foreground::-moz-placeholder{color:hsl(var(--muted-foreground))}.placeholder\:text-muted-foreground::placeholder{color:hsl(var(--muted-foreground))}.last\:mb-0:last-child{margin-bottom:0}.hover\:border-foreground\/50:hover{border-color:hsl(var(--foreground) / .5)}.hover\:bg-accent:hover{background-color:hsl(var(--accent-tw))}.hover\:bg-destructive\/80:hover{background-color:hsl(var(--destructive) / .8)}.hover\:bg-destructive\/90:hover{background-color:hsl(var(--destructive) / .9)}.hover\:bg-muted:hover{background-color:hsl(var(--muted))}.hover\:bg-muted\/50:hover{background-color:hsl(var(--muted) / .5)}.hover\:bg-primary\/80:hover{background-color:hsl(var(--primary) / .8)}.hover\:bg-primary\/90:hover{background-color:hsl(var(--primary) / .9)}.hover\:bg-secondary:hover{background-color:hsl(var(--secondary))}.hover\:bg-secondary\/80:hover{background-color:hsl(var(--secondary) / .8)}.hover\:text-accent-foreground:hover{color:hsl(var(--accent-foreground))}.hover\:text-destructive:hover{color:hsl(var(--destructive))}.hover\:text-foreground:hover{color:hsl(var(--foreground))}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-100:hover{opacity:1}.focus\:bg-accent:focus{background-color:hsl(var(--accent-tw))}.focus\:text-accent-foreground:focus{color:hsl(var(--accent-foreground))}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-ring:focus{--tw-ring-color: hsl(var(--ring))}.focus\:ring-offset-2:focus{--tw-ring-offset-width: 2px}.focus-visible\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\:ring-2:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-visible\:ring-ring:focus-visible{--tw-ring-color: hsl(var(--ring))}.focus-visible\:ring-offset-2:focus-visible{--tw-ring-offset-width: 2px}.focus-visible\:ring-offset-background:focus-visible{--tw-ring-offset-color: hsl(var(--background))}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-50:disabled{opacity:.5}.group.destructive .group-\[\.destructive\]\:border-muted\/40{border-color:hsl(var(--muted) / .4)}.group.toaster .group-\[\.toaster\]\:border-border{border-color:hsl(var(--border))}.group.toast .group-\[\.toast\]\:bg-muted{background-color:hsl(var(--muted))}.group.toast .group-\[\.toast\]\:bg-primary{background-color:hsl(var(--primary))}.group.toaster .group-\[\.toaster\]\:bg-background{background-color:hsl(var(--background))}.group.destructive .group-\[\.destructive\]\:text-destructive-foreground{color:hsl(var(--destructive-foreground))}.group.toast .group-\[\.toast\]\:text-muted-foreground{color:hsl(var(--muted-foreground))}.group.toast .group-\[\.toast\]\:text-primary-foreground{color:hsl(var(--primary-foreground))}.group.toaster .group-\[\.toaster\]\:text-foreground{color:hsl(var(--foreground))}.group.toaster .group-\[\.toaster\]\:shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.group.destructive .group-\[\.destructive\]\:hover\:border-destructive\/30:hover{border-color:hsl(var(--destructive) / .3)}.group.destructive .group-\[\.destructive\]\:hover\:bg-destructive:hover{background-color:hsl(var(--destructive))}.group.destructive .group-\[\.destructive\]\:hover\:bg-destructive-foreground\/10:hover{background-color:hsl(var(--destructive-foreground) / .1)}.group.destructive .group-\[\.destructive\]\:hover\:text-destructive-foreground:hover{color:hsl(var(--destructive-foreground))}.group.destructive .group-\[\.destructive\]\:focus\:ring-destructive:focus{--tw-ring-color: hsl(var(--destructive))}.group.destructive .group-\[\.destructive\]\:focus\:ring-destructive-foreground:focus{--tw-ring-color: hsl(var(--destructive-foreground))}.peer:disabled~.peer-disabled\:cursor-not-allowed{cursor:not-allowed}.peer:disabled~.peer-disabled\:opacity-70{opacity:.7}.data-\[disabled\=true\]\:pointer-events-none[data-disabled=true],.data-\[disabled\]\:pointer-events-none[data-disabled]{pointer-events:none}.data-\[state\=checked\]\:translate-x-5[data-state=checked]{--tw-translate-x: 1.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[state\=unchecked\]\:translate-x-0[data-state=unchecked],.data-\[swipe\=cancel\]\:translate-x-0[data-swipe=cancel]{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[swipe\=end\]\:translate-x-\[var\(--radix-toast-swipe-end-x\)\][data-swipe=end]{--tw-translate-x: var(--radix-toast-swipe-end-x);transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[swipe\=move\]\:translate-x-\[var\(--radix-toast-swipe-move-x\)\][data-swipe=move]{--tw-translate-x: var(--radix-toast-swipe-move-x);transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes accordion-up{0%{height:var(--radix-accordion-content-height)}to{height:0}}.data-\[state\=closed\]\:animate-accordion-up[data-state=closed]{animation:accordion-up .2s ease-out}@keyframes accordion-down{0%{height:0}to{height:var(--radix-accordion-content-height)}}.data-\[state\=open\]\:animate-accordion-down[data-state=open]{animation:accordion-down .2s ease-out}.data-\[selected\=\'true\'\]\:bg-accent[data-selected=true]{background-color:hsl(var(--accent-tw))}.data-\[state\=active\]\:bg-background[data-state=active]{background-color:hsl(var(--background))}.data-\[state\=checked\]\:\!bg-black[data-state=checked]{--tw-bg-opacity: 1 !important;background-color:rgb(0 0 0 / var(--tw-bg-opacity, 1))!important}.data-\[state\=checked\]\:bg-primary[data-state=checked]{background-color:hsl(var(--primary))}.data-\[state\=open\]\:bg-accent[data-state=open]{background-color:hsl(var(--accent-tw))}.data-\[state\=selected\]\:bg-muted[data-state=selected]{background-color:hsl(var(--muted))}.data-\[state\=unchecked\]\:bg-input[data-state=unchecked]{background-color:hsl(var(--input))}.data-\[selected\=true\]\:text-accent-foreground[data-selected=true]{color:hsl(var(--accent-foreground))}.data-\[state\=active\]\:text-foreground[data-state=active]{color:hsl(var(--foreground))}.data-\[state\=checked\]\:\!text-white[data-state=checked]{--tw-text-opacity: 1 !important;color:rgb(255 255 255 / var(--tw-text-opacity, 1))!important}.data-\[state\=open\]\:text-muted-foreground[data-state=open]{color:hsl(var(--muted-foreground))}.data-\[disabled\=true\]\:opacity-50[data-disabled=true],.data-\[disabled\]\:opacity-50[data-disabled]{opacity:.5}.data-\[state\=active\]\:shadow-sm[data-state=active]{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.data-\[swipe\=move\]\:transition-none[data-swipe=move]{transition-property:none}.data-\[state\=open\]\:animate-in[data-state=open]{animation-name:enter;animation-duration:.15s;--tw-enter-opacity: initial;--tw-enter-scale: initial;--tw-enter-rotate: initial;--tw-enter-translate-x: initial;--tw-enter-translate-y: initial}.data-\[state\=closed\]\:animate-out[data-state=closed],.data-\[swipe\=end\]\:animate-out[data-swipe=end]{animation-name:exit;animation-duration:.15s;--tw-exit-opacity: initial;--tw-exit-scale: initial;--tw-exit-rotate: initial;--tw-exit-translate-x: initial;--tw-exit-translate-y: initial}.data-\[state\=closed\]\:fade-out-0[data-state=closed]{--tw-exit-opacity: 0}.data-\[state\=closed\]\:fade-out-80[data-state=closed]{--tw-exit-opacity: .8}.data-\[state\=open\]\:fade-in-0[data-state=open]{--tw-enter-opacity: 0}.data-\[state\=closed\]\:zoom-out-95[data-state=closed]{--tw-exit-scale: .95}.data-\[state\=open\]\:zoom-in-95[data-state=open]{--tw-enter-scale: .95}.data-\[side\=bottom\]\:slide-in-from-top-2[data-side=bottom]{--tw-enter-translate-y: -.5rem}.data-\[side\=left\]\:slide-in-from-right-2[data-side=left]{--tw-enter-translate-x: .5rem}.data-\[side\=right\]\:slide-in-from-left-2[data-side=right]{--tw-enter-translate-x: -.5rem}.data-\[side\=top\]\:slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y: .5rem}.data-\[state\=closed\]\:slide-out-to-left-1\/2[data-state=closed]{--tw-exit-translate-x: -50%}.data-\[state\=closed\]\:slide-out-to-right-full[data-state=closed]{--tw-exit-translate-x: 100%}.data-\[state\=closed\]\:slide-out-to-top-\[48\%\][data-state=closed]{--tw-exit-translate-y: -48%}.data-\[state\=open\]\:slide-in-from-left-1\/2[data-state=open]{--tw-enter-translate-x: -50%}.data-\[state\=open\]\:slide-in-from-top-\[48\%\][data-state=open]{--tw-enter-translate-y: -48%}.data-\[state\=open\]\:slide-in-from-top-full[data-state=open]{--tw-enter-translate-y: -100%}.dark\:block:is(.dark *){display:block}.dark\:hidden:is(.dark *){display:none}.dark\:border-amber-900:is(.dark *){--tw-border-opacity: 1;border-color:rgb(120 53 15 / var(--tw-border-opacity, 1))}.dark\:border-destructive:is(.dark *){border-color:hsl(var(--destructive))}.dark\:bg-amber-950\/40:is(.dark *){background-color:#451a0366}.dark\:text-amber-100:is(.dark *){--tw-text-opacity: 1;color:rgb(254 243 199 / var(--tw-text-opacity, 1))}@media (min-width: 640px){.sm\:bottom-0{bottom:0}.sm\:right-0{right:0}.sm\:top-auto{top:auto}.sm\:mr-auto{margin-right:auto}.sm\:w-auto{width:auto}.sm\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.sm\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.sm\:flex-row{flex-direction:row}.sm\:flex-col{flex-direction:column}.sm\:justify-end{justify-content:flex-end}.sm\:space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.sm\:rounded-lg{border-radius:var(--radius)}.sm\:px-6{padding-left:1.5rem;padding-right:1.5rem}.sm\:text-left{text-align:left}.data-\[state\=open\]\:sm\:slide-in-from-bottom-full[data-state=open]{--tw-enter-translate-y: 100%}}@media (min-width: 768px){.md\:col-span-2{grid-column:span 2 / span 2}.md\:max-w-\[420px\]{max-width:420px}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.md\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.md\:grid-cols-\[1fr_1fr_auto\]{grid-template-columns:1fr 1fr auto}.md\:text-sm{font-size:.875rem;line-height:1.25rem}}@media (min-width: 1024px){.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.lg\:grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}.lg\:grid-cols-7{grid-template-columns:repeat(7,minmax(0,1fr))}.lg\:px-8{padding-left:2rem;padding-right:2rem}}@media (min-width: 1280px){.xl\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.xl\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}}.\[\&\:has\(\[role\=checkbox\]\)\]\:pr-0:has([role=checkbox]){padding-right:0}.\[\&\>svg\+div\]\:translate-y-\[-3px\]>svg+div{--tw-translate-y: -3px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.\[\&\>svg\]\:absolute>svg{position:absolute}.\[\&\>svg\]\:left-4>svg{left:1rem}.\[\&\>svg\]\:top-4>svg{top:1rem}.\[\&\>svg\]\:text-destructive>svg{color:hsl(var(--destructive))}.\[\&\>svg\]\:text-foreground>svg{color:hsl(var(--foreground))}.\[\&\>svg\~\*\]\:pl-7>svg~*{padding-left:1.75rem}.\[\&\>tr\]\:last\:border-b-0:last-child>tr{border-bottom-width:0px}.\[\&\[data-state\=open\]\>svg\]\:rotate-180[data-state=open]>svg{--tw-rotate: 180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.\[\&_\[cmdk-group-heading\]\]\:px-2 [cmdk-group-heading]{padding-left:.5rem;padding-right:.5rem}.\[\&_\[cmdk-group-heading\]\]\:py-1\.5 [cmdk-group-heading]{padding-top:.375rem;padding-bottom:.375rem}.\[\&_\[cmdk-group-heading\]\]\:text-xs [cmdk-group-heading]{font-size:.75rem;line-height:1rem}.\[\&_\[cmdk-group-heading\]\]\:font-medium [cmdk-group-heading]{font-weight:500}.\[\&_\[cmdk-group-heading\]\]\:text-muted-foreground [cmdk-group-heading]{color:hsl(var(--muted-foreground))}.\[\&_\[cmdk-group\]\:not\(\[hidden\]\)_\~\[cmdk-group\]\]\:pt-0 [cmdk-group]:not([hidden])~[cmdk-group]{padding-top:0}.\[\&_\[cmdk-group\]\]\:px-2 [cmdk-group]{padding-left:.5rem;padding-right:.5rem}.\[\&_\[cmdk-input-wrapper\]_svg\]\:h-5 [cmdk-input-wrapper] svg{height:1.25rem}.\[\&_\[cmdk-input-wrapper\]_svg\]\:w-5 [cmdk-input-wrapper] svg{width:1.25rem}.\[\&_\[cmdk-input\]\]\:h-12 [cmdk-input]{height:3rem}.\[\&_\[cmdk-item\]\]\:px-2 [cmdk-item]{padding-left:.5rem;padding-right:.5rem}.\[\&_\[cmdk-item\]\]\:py-3 [cmdk-item]{padding-top:.75rem;padding-bottom:.75rem}.\[\&_\[cmdk-item\]_svg\]\:h-5 [cmdk-item] svg{height:1.25rem}.\[\&_\[cmdk-item\]_svg\]\:w-5 [cmdk-item] svg{width:1.25rem}.\[\&_p\]\:leading-relaxed p{line-height:1.625}.\[\&_svg\]\:pointer-events-none svg{pointer-events:none}.\[\&_svg\]\:size-4 svg{width:1rem;height:1rem}.\[\&_svg\]\:shrink-0 svg{flex-shrink:0}.\[\&_tr\:last-child\]\:border-0 tr:last-child{border-width:0px}.\[\&_tr\]\:border-b tr{border-bottom-width:1px}:root{--bg: #FAF8F4;--bg-elevated: #FFFFFF;--bg-subtle: #F2EFE8;--ink: #1A1814;--ink-soft: #5A554C;--ink-faint: #8E8678;--hairline: #E4DFD4;--hairline-strong: #C8C2B3;--accent: oklch(.45 .08 250);--accent-soft: oklch(.92 .03 250);--accent-text: oklch(.35 .1 250);--warn: oklch(.55 .12 30);--positive-bg: oklch(.96 .03 145);--positive-text: oklch(.34 .1 145);--positive-border: oklch(.86 .06 145);--negative-bg: oklch(.96 .03 25);--negative-text: oklch(.4 .12 25);--negative-border: oklch(.86 .06 25);--highlight-bg: oklch(.97 .04 70);--highlight-text: oklch(.42 .1 60);--highlight-border: oklch(.85 .07 70);--info-bg: oklch(.97 .04 230);--info-text: oklch(.42 .1 240);--info-border: oklch(.86 .07 230);--trend-code: #33639E;--trend-hf: #AA7D24;--app-leading-column-width: 280px;--serif: "Newsreader", Georgia, serif;--sans: "Inter", -apple-system, sans-serif;--mono: "JetBrains Mono", ui-monospace, monospace;color-scheme:light}.dark{--bg: #11100E;--bg-elevated: #1A1815;--bg-subtle: #24211D;--ink: #F3EFE7;--ink-soft: #B9B2A6;--ink-faint: #989084;--hairline: #332F29;--hairline-strong: #514A40;--accent: oklch(.72 .09 250);--accent-soft: oklch(.28 .04 250);--accent-text: oklch(.8 .08 250);--warn: oklch(.72 .12 30);--positive-bg: oklch(.25 .035 145);--positive-text: oklch(.79 .1 145);--positive-border: oklch(.43 .06 145);--negative-bg: oklch(.25 .04 25);--negative-text: oklch(.79 .1 25);--negative-border: oklch(.43 .06 25);--highlight-bg: oklch(.27 .04 70);--highlight-text: oklch(.82 .1 70);--highlight-border: oklch(.46 .07 70);--info-bg: oklch(.25 .04 230);--info-text: oklch(.8 .08 235);--info-border: oklch(.43 .07 230);--trend-code: #5C8FD6;--trend-hf: #B3831F;color-scheme:dark}*{box-sizing:border-box;margin:0;padding:0}html,body{background:var(--bg);color:var(--ink);font-family:var(--sans);font-size:14px;line-height:1.5;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}a{color:inherit;text-decoration:none}button{font-family:inherit;cursor:pointer;border:none;background:none;color:inherit}.app-header{border-bottom:1px solid var(--hairline);background:var(--bg);position:sticky;top:0;z-index:50}.app-header-inner{max-width:calc(50vw + 640px);margin:0 auto;padding:18px 32px;display:flex;align-items:center;gap:24px;min-width:0}.site-announcement{position:relative;min-height:28px;padding:5px 52px 6px;border-top:1px solid var(--hairline);background:var(--bg-subtle);color:var(--ink-soft);font-size:12px;line-height:16px;text-align:center}.site-announcement a{color:var(--accent-text);font-weight:600;text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:2px}.site-announcement a:hover{color:var(--ink)}.site-announcement-close{position:absolute;top:50%;right:20px;display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;padding:0;border:0;border-radius:4px;background:transparent;color:var(--ink-soft);cursor:pointer;transform:translateY(-50%)}.site-announcement-close:hover{background:var(--hairline);color:var(--ink)}.site-announcement-close:focus-visible{outline:2px solid var(--accent-text);outline-offset:1px}.brand{display:flex;align-items:baseline;gap:10px;font-family:var(--serif);cursor:pointer}.brand-mark{width:22px;height:22px;background:var(--ink);position:relative;align-self:center;flex-shrink:0}.brand-mark:after{content:"";position:absolute;top:4px;left:4px;right:4px;bottom:4px;background:var(--bg)}.brand-mark:before{content:"";position:absolute;top:8px;left:8px;width:6px;height:6px;background:var(--ink);z-index:1}.brand-name{font-size:20px;font-weight:600;letter-spacing:-.02em;white-space:nowrap}.brand-name em{font-style:italic;font-weight:400;color:var(--ink-soft)}.nav{display:flex;gap:24px;margin-left:8px;flex-shrink:0;position:relative}@media (min-width: 901px){.app-header-inner{max-width:none;padding-left:0}.brand{width:var(--app-leading-column-width);flex:none;justify-content:center}.nav{margin-left:0}}@media (max-width: 1100px){.nav{gap:18px}.nav-item:nth-child(n+4){display:none}}@media (max-width: 920px){.search-trigger kbd{display:none}}.nav-item{font-size:13px;color:var(--ink-soft);padding:4px 0;transition:color .15s}.nav-indicator{position:absolute;bottom:0;left:0;height:1px;background:var(--ink);pointer-events:none;will-change:transform,width}.nav-indicator-ready{transition:transform .22s cubic-bezier(.4,0,.2,1),width .22s cubic-bezier(.4,0,.2,1),opacity .12s ease}.nav-item-with-badge{display:inline-flex;align-items:center;gap:5px}.nav-new-badge{display:inline-flex;align-items:center;min-height:17px;padding:1px 5px;border-radius:5px;background:#dfe7ff;color:#1458e8;font-size:9px;font-weight:700;line-height:1;letter-spacing:.02em;text-transform:uppercase}.nav-item:hover,.nav-item.active{color:var(--ink)}@media (prefers-reduced-motion: reduce){.nav-indicator-ready{transition:none}}.header-spacer{flex:1}.search-trigger{display:flex;align-items:center;gap:8px;padding:7px 12px;border:1px solid var(--hairline);border-radius:6px;background:var(--bg-elevated);font-size:13px;color:var(--ink-faint);width:240px;min-width:0;flex-shrink:1;transition:border-color .15s;overflow:hidden}.search-trigger>span:not(:first-child){white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}.search-trigger:hover{border-color:var(--hairline-strong)}.search-trigger kbd{margin-left:auto;font-family:var(--mono);font-size:11px;padding:1px 5px;border:1px solid var(--hairline);border-radius:3px;background:var(--bg-subtle);color:var(--ink-soft)}.icon-btn{width:32px;height:32px;display:flex;align-items:center;justify-content:center;border:1px solid var(--hairline);border-radius:6px;background:var(--bg-elevated);transition:border-color .15s}.icon-btn:hover{border-color:var(--hairline-strong)}.hf-signin-btn{display:inline-flex;align-items:center;gap:8px;max-width:100%;min-height:32px;padding:5px 12px;border:1px solid var(--hairline);border-radius:6px;background:var(--bg-elevated);font-size:13px;color:var(--ink);line-height:20px;white-space:normal;overflow-wrap:anywhere;transition:border-color .15s,background .15s}.hf-signin-btn>img{flex-shrink:0}.app-header .hf-signin-btn{flex-shrink:0;white-space:nowrap;overflow-wrap:normal}.hf-signin-btn:hover{border-color:var(--hairline-strong);background:var(--bg-subtle)}.user-avatar-btn{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;border:1px solid var(--hairline);border-radius:999px;background:var(--bg-elevated);padding:0;overflow:hidden;transition:border-color .15s}.user-avatar-btn:hover{border-color:var(--hairline-strong)}.user-avatar-btn:focus-visible{outline:2px solid var(--hairline-strong);outline-offset:2px}.page{max-width:calc(50vw + 640px);margin:0 auto;padding:32px}.site-footer{border-top:1px solid var(--hairline);color:var(--ink-faint);font-size:12px}.site-footer-inner{display:flex;flex-wrap:wrap;gap:14px;max-width:calc(50vw + 640px);margin:0 auto;padding:20px 32px 28px}.site-footer a{color:var(--ink-soft)}.site-footer a:hover{color:var(--ink)}.layout-with-sidebar{display:grid;grid-template-columns:220px 1fr;gap:48px;align-items:start}.sidebar{position:sticky;top:100px}.sidebar-section{margin-bottom:28px}.sidebar-label{font-family:var(--mono);font-size:10px;letter-spacing:.1em;text-transform:uppercase;color:var(--ink-faint);margin-bottom:12px}.sidebar-link{display:block;font-size:13px;color:var(--ink-soft);padding:5px 0;border-bottom:1px dotted transparent;transition:color .15s}.sidebar-link:hover{color:var(--ink)}.sidebar-link.active{color:var(--ink);font-weight:500}.sidebar-link .count{font-family:var(--mono);font-size:11px;color:var(--ink-faint);margin-left:6px}.breadcrumb{display:flex;align-items:center;gap:8px;font-family:var(--mono);font-size:11px;color:var(--ink-faint);margin-bottom:24px}.breadcrumb a{color:var(--ink-soft)}.breadcrumb a:hover{color:var(--ink)}.breadcrumb .sep{color:var(--hairline-strong)}.detail-title{font-family:var(--serif);font-size:38px;font-weight:500;line-height:1.15;letter-spacing:-.02em;margin-bottom:16px;text-wrap:balance}.detail-title-org{margin-left:.6em;font-family:var(--mono);font-size:13px;letter-spacing:0;color:var(--accent-text);white-space:nowrap}.detail-title-org--logo{display:inline-flex;align-items:center;justify-content:center;margin-left:.3em;font-size:inherit;width:.8em;height:.8em;border-radius:4px;overflow:hidden;vertical-align:-.05em}.detail-title-org--logo img{width:100%;height:100%;-o-object-fit:contain;object-fit:contain}.action-btn{display:inline-flex;align-items:center;gap:6px;padding:7px 12px;border:1px solid var(--hairline);border-radius:6px;background:var(--bg-elevated);font-size:12px;font-weight:500;color:var(--ink);transition:all .15s}.action-btn:hover{border-color:var(--ink)}.action-btn.primary{background:var(--ink);color:var(--bg);border-color:var(--ink)}.action-btn.primary:hover{background:color-mix(in oklch,var(--ink) 88%,var(--accent))}.no-results{padding:80px 0;text-align:center;font-family:var(--serif);color:var(--ink-faint);font-style:italic}.icon{width:14px;height:14px;flex-shrink:0}.icon-sm{width:11px;height:11px;flex-shrink:0}html{scroll-behavior:smooth}::-moz-selection{background:var(--accent-soft);color:var(--accent-text)}::selection{background:var(--accent-soft);color:var(--accent-text)}.mobile-menu-btn,.mobile-search-btn{display:none;width:36px;height:36px;align-items:center;justify-content:center;border-radius:4px;flex-shrink:0}.mobile-menu-btn:hover,.mobile-search-btn:hover{background:var(--bg-subtle)}.mobile-nav-drawer{position:fixed;top:0;right:0;bottom:0;left:0;background:#1a181466;z-index:100;display:flex;justify-content:flex-end}.mobile-nav-panel{width:min(320px,80vw);background:var(--bg-elevated);border-left:1px solid var(--hairline-strong);padding:16px 24px max(32px,env(safe-area-inset-bottom));display:flex;flex-direction:column;gap:4px;height:100%;min-height:0;overscroll-behavior-y:contain;overflow-y:auto;box-shadow:-8px 0 24px #0000000f}.mobile-nav-close{align-self:flex-end;min-width:44px;min-height:44px}.mobile-nav-link{flex-shrink:0;font-family:var(--serif);font-size:17px;padding:12px 4px;color:var(--ink);border-bottom:1px solid var(--hairline)}.mobile-nav-link-with-badge{display:flex;align-items:center;gap:6px}.mobile-nav-link.active{color:var(--accent-text);font-style:italic}.mobile-nav-search{display:flex;align-items:center;gap:10px;width:100%;font-family:var(--sans);font-size:14px;color:var(--ink-faint);background:var(--bg-subtle);border:1px solid var(--hairline);border-radius:6px;padding:10px 12px;margin-bottom:8px;text-align:left}.mobile-nav-search:hover{border-color:var(--hairline-strong);color:var(--ink)}@media (max-width: 880px){.nav,.search-trigger,.app-header .header-feedback-link{display:none}.mobile-menu-btn,.mobile-search-btn{display:inline-flex}}@media (max-width: 640px){.app-header-inner,.brand{gap:8px}.brand-mark{width:20px;height:20px}.brand-name{font-size:18px}.header-bookmark-btn{display:none}.app-header .hf-signin-btn{width:36px;height:36px;padding:0;gap:0;justify-content:center;flex-shrink:0}.app-header .hf-signin-btn>span{display:none}}@media (max-width: 880px){.app-header-inner{padding:14px 16px;gap:12px}.page{padding:24px 16px}.layout-with-sidebar{grid-template-columns:1fr;gap:24px}.layout-with-sidebar .sidebar{position:static;top:auto}.detail-title{font-size:28px}}@media (max-width: 640px){.app-header-inner{padding:12px 14px;gap:8px}.page{padding:20px 14px}.detail-title{font-size:24px}.brand-name{font-size:17px}}.access-request-page{min-height:100vh;min-height:100svh;display:grid;place-items:center;padding:32px 20px;background:radial-gradient(circle at 50% 8%,color-mix(in srgb,var(--accent-soft) 60%,transparent),transparent 42%),var(--bg)}.access-request-card{width:min(100%,470px);padding:38px;border:1px solid var(--hairline);border-radius:12px;background:color-mix(in srgb,var(--bg-elevated) 94%,transparent);box-shadow:0 20px 60px #1a181414}.access-request-brand{display:inline-flex;align-items:center;gap:10px;margin-bottom:42px;font-family:var(--serif)}.access-request-heading h1,.access-request-success h1{margin-bottom:12px;font-family:var(--serif);font-size:clamp(36px,8vw,48px);font-weight:500;line-height:1;letter-spacing:-.035em}.access-request-heading>p:last-child,.access-request-success p,.access-request-signin>p{color:var(--ink-soft);font-size:15px;line-height:1.65}.access-request-eyebrow{margin-bottom:10px;color:var(--accent-text);font-size:11px;font-weight:700;letter-spacing:.12em;text-transform:uppercase}.access-request-form,.access-request-signin{margin-top:30px}.access-request-form label{display:block;margin-bottom:8px;font-size:12px;font-weight:600}.access-request-input-wrap{display:flex;align-items:center;border:1px solid var(--hairline-strong);border-radius:7px;background:var(--bg);color:var(--ink-faint);transition:border-color .15s,box-shadow .15s}.access-request-input-wrap:focus-within{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-soft)}.access-request-input-wrap>span{padding-left:13px;font-size:15px}.access-request-input-wrap input{width:100%;padding:11px 13px 11px 3px;border:0;outline:0;background:transparent;color:var(--ink);font:500 14px var(--sans)}.access-request-verified{margin-top:7px;color:var(--ink-faint);font-size:11px}.access-request-submit{width:100%;margin-top:20px;padding:12px 18px;border-radius:7px;background:var(--ink);color:var(--bg);font-size:13px;font-weight:600;transition:opacity .15s,transform .15s}.access-request-submit:hover:not(:disabled){transform:translateY(-1px)}.access-request-submit:disabled{cursor:wait;opacity:.6}.access-request-error{margin-top:12px;color:var(--negative-text);font-size:12px}.access-request-status{margin-top:30px;color:var(--ink-soft)}.access-request-signin .hf-signin-btn{margin-top:18px}.access-request-success svg{margin-bottom:24px;color:var(--positive-text)}@media (max-width: 520px){.access-request-card{padding:28px 24px}.access-request-brand{margin-bottom:34px}}.legal-page{max-width:880px;padding-bottom:72px;color:var(--ink-soft);font-family:var(--sans);font-size:15px;line-height:1.7}.legal-header{margin-bottom:34px;padding-bottom:24px;border-bottom:1px solid var(--hairline)}.legal-kicker{margin:0 0 6px;color:var(--accent-text);font-size:11px;font-weight:700;letter-spacing:.1em;text-transform:uppercase}.legal-header h1{margin:0;color:var(--ink);font-family:var(--serif);font-size:clamp(38px,6vw,56px);font-weight:500;letter-spacing:-.025em;line-height:1.05}.legal-effective-date{margin:12px 0 0;color:var(--ink-faint)}.legal-page section{margin-top:34px}.legal-page h2{margin:0 0 10px;color:var(--ink);font-family:var(--serif);font-size:25px;font-weight:600;line-height:1.25}.legal-page h3{margin:22px 0 6px;color:var(--ink);font-size:15px;font-weight:700}.legal-page p{margin:0 0 14px}.legal-page ul{margin:8px 0 16px;padding-left:22px}.legal-page li{margin:7px 0}.legal-page a{color:var(--accent-text);text-decoration:underline}.legal-page strong{color:var(--ink)}.feed-header{display:flex;align-items:flex-end;justify-content:space-between;margin-bottom:32px;gap:24px;flex-wrap:wrap}.feed-title{font-family:var(--serif);font-size:44px;font-weight:500;letter-spacing:-.025em;line-height:1}.feed-title em{font-style:italic;font-weight:400;color:var(--accent)}.feed-subtitle{font-size:13px;color:var(--ink-soft);margin-top:8px;font-family:var(--serif);font-style:italic}.conference-deadlines-link{font-size:16px;color:var(--ink-soft);margin-top:12px}.trend-chart{margin:0;width:100%}.trend-chart-visual{position:relative;min-width:0}.trend-chart-table{margin-top:10px}.feedback-link{display:inline-flex;align-items:center;height:32px;padding:0 12px;border:1px solid var(--hairline);border-radius:6px;background:var(--bg-elevated);color:var(--ink-soft);font-size:13px;font-weight:500;white-space:nowrap;transition:border-color .15s,color .15s,background .15s}.feedback-link:hover{border-color:var(--hairline-strong);background:var(--bg-subtle);color:var(--ink)}.period-switch{display:flex;align-items:center;gap:2px;background:var(--bg-elevated);border:1px solid var(--hairline);border-radius:6px;padding:3px}.period-btn{padding:5px 12px;font-size:12px;font-weight:500;color:var(--ink-soft);border-radius:4px;transition:all .15s}.period-btn.active{background:var(--ink);color:var(--bg)}.period-btn:not(.active):hover{background:var(--bg-subtle);color:var(--ink)}.date-nav{display:flex;align-items:center;gap:12px;font-family:var(--mono);font-size:12px;color:var(--ink-soft)}.date-nav button{width:26px;height:26px;border:1px solid var(--hairline);border-radius:4px;display:flex;align-items:center;justify-content:center;background:var(--bg-elevated)}.date-nav button:hover{background:var(--bg-subtle)}.paper-list{display:flex;flex-direction:column}.paper-card{display:grid;grid-template-columns:170px 1fr;gap:28px;padding:24px 0;border-bottom:1px solid var(--hairline);align-items:stretch}.paper-thumb-wrap{transition:transform .15s;display:flex;align-items:flex-end;justify-content:flex-start}.paper-thumb-wrap:hover{transform:translateY(-2px)}.paper-thumb-skeleton{width:160px;height:220px}.paper-card:first-child{padding-top:0}.paper-rank{font-family:var(--serif);font-size:32px;font-weight:500;color:var(--ink-faint);font-feature-settings:"tnum";line-height:.9;font-style:italic}.paper-body{min-width:0;display:flex;align-items:stretch;gap:28px}.paper-body-main{min-width:0;flex:1}.paper-resources{display:flex;flex-direction:column;justify-content:center;align-items:center;gap:18px;flex:0 0 auto;width:92px;border-left:1px solid var(--hairline);padding-left:20px}.paper-resource{display:flex;flex-direction:column;align-items:center;gap:4px;color:inherit}a.paper-resource.is-link{text-decoration:none;cursor:pointer;border-radius:4px;transition:transform .15s}a.paper-resource.is-link:hover{transform:translateY(-1px)}a.paper-resource.is-link:hover .resource-value{text-decoration:underline;text-underline-offset:2px}a.paper-resource.is-link:focus-visible{outline:2px solid var(--ink);outline-offset:2px}.paper-resource .resource-stat{display:flex;flex-direction:column;align-items:center;gap:2px}.paper-resource .resource-value{display:inline-flex;align-items:center;gap:3px;font-family:var(--mono);font-size:14px;color:var(--ink);font-weight:500;font-variant-numeric:tabular-nums;letter-spacing:-.01em}.paper-resource .resource-label{font-family:var(--mono);font-size:10px;letter-spacing:.06em;text-transform:uppercase;color:var(--ink-faint)}.paper-resource .gh-rate-arrow{color:var(--accent-text);font-size:13px;transform:translateY(-.5px)}.paper-meta-line{display:flex;align-items:center;gap:12px;font-family:var(--mono);font-size:11px;color:var(--ink-faint);margin-bottom:6px}.paper-meta-line .sep{color:var(--hairline-strong)}.paper-title{font-family:var(--serif);font-size:22px;font-weight:500;line-height:1.2;letter-spacing:-.015em;margin-bottom:6px;color:var(--ink);cursor:pointer;text-wrap:pretty}.paper-title:hover{color:var(--accent-text)}.paper-organization-logos{display:inline-flex;align-items:center;gap:4px;margin-left:7px;vertical-align:-4px}.paper-organization-logo{display:inline-grid;width:24px;height:24px;flex:0 0 24px;place-items:center;overflow:hidden;border:1px solid var(--hairline);border-radius:4px;background:var(--bg)}.paper-organization-logo:hover{border-color:var(--hairline-strong)}.paper-organization-logo img{width:100%;height:100%;padding:2px;-o-object-fit:contain;object-fit:contain}.paper-authors{font-size:13px;color:var(--ink-soft);margin-bottom:10px;font-family:var(--serif)}.paper-authors a{color:inherit;text-decoration:none}.paper-authors a:hover{color:var(--accent-text);text-decoration:underline;text-underline-offset:2px}.paper-abstract{font-size:13.5px;color:var(--ink-soft);line-height:1.55;max-height:4.65em;margin-bottom:12px;font-family:var(--serif);text-wrap:pretty;display:-webkit-box;line-clamp:3;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}.paper-title mark,.paper-abstract mark{background:color-mix(in srgb,var(--accent) 24%,transparent);color:inherit;border-radius:2px;padding:0 1px}.search-results-end{padding:24px 0;text-align:center;color:var(--ink-faint);font:11px var(--mono)}.paper-tags{display:flex;flex-wrap:wrap;gap:6px}.paper-tags--clamped{--tag-row-height: 26px;max-height:calc(var(--tag-row-height) * 2 + 6px);overflow:hidden}.paper-sota{position:relative;white-space:nowrap;overflow:hidden;margin-bottom:12px;font-family:var(--mono);font-size:12px;line-height:1.6}.paper-sota-stack{margin-top:16px;padding-top:16px;border-top:1px solid var(--hairline)}.paper-sota-stack .paper-sota{margin-bottom:4px}.paper-sota-stack .paper-sota:last-child{margin-bottom:0}.paper-sota-measure{position:absolute;left:-9999px;top:0;visibility:hidden;white-space:pre;pointer-events:none}.paper-sota-label{font-weight:500;color:var(--ink-faint)}.paper-sota-label--sota{color:#b8860b}.paper-sota-sep,.paper-sota-on{color:var(--ink-faint)}.paper-sota-name{color:var(--accent-text)}.paper-sota-name:hover{text-decoration:underline}.paper-sota-more{font-size:11px;color:var(--ink-faint);cursor:pointer}.paper-sota-more:hover{color:var(--accent-text);text-decoration:underline}.paper-stats{display:flex;flex-direction:column;align-items:flex-end;gap:8px;font-family:var(--mono);font-size:11px;color:var(--ink-soft)}.upvote-btn{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:8px 14px;border:1px solid var(--hairline);border-radius:6px;background:var(--bg-elevated);font-family:var(--mono);font-size:13px;font-weight:500;min-width:56px;transition:all .15s}.upvote-btn:hover{border-color:var(--ink)}.upvote-btn.upvoted{background:var(--accent-soft);border-color:var(--accent);color:var(--accent-text)}.upvote-btn .arrow{font-size:9px;line-height:1;margin-bottom:2px}.upvote-btn .count{font-feature-settings:"tnum"}.stat-line{display:flex;align-items:center;gap:5px}.sort-bar{display:flex;align-items:center;justify-content:space-between;padding-bottom:16px;border-bottom:1px solid var(--hairline);margin-bottom:16px}.sort-options{display:flex;gap:4px}.sort-btn{padding:4px 10px;font-family:var(--mono);font-size:11px;font-weight:500;letter-spacing:.02em;color:var(--ink-soft);border-radius:4px;transition:all .15s;text-transform:lowercase}.sort-btn.active{background:var(--ink);color:var(--bg)}.sort-btn:not(.active):hover{background:var(--bg-subtle);color:var(--ink)}.paper-feed-toolbar-controls,.paper-feed-resource-controls,.paper-feed-filter-options{display:flex;align-items:center}.paper-feed-toolbar-controls{gap:14px;flex-wrap:wrap}.paper-feed-resource-controls{gap:10px}.paper-feed-resource-divider{width:1px;height:22px;background:var(--hairline)}.paper-feed-filter-options{gap:6px;flex-wrap:wrap}.paper-feed-filter{display:inline-flex;align-items:center;gap:6px;min-height:30px;padding:5px 10px;border:1px solid var(--hairline);border-radius:999px;background:var(--bg);color:var(--ink-soft);font-family:var(--mono);font-size:11px;letter-spacing:.01em;cursor:pointer;transition:border-color .15s,background .15s,color .15s}.paper-feed-filter-content{display:inline-flex;align-items:center;gap:6px}.paper-feed-filter:hover{border-color:var(--ink-faint);color:var(--ink)}.paper-feed-filter.active{border-color:var(--ink);background:var(--ink);color:var(--bg)}.paper-feed-filter:focus-visible{outline:2px solid var(--ink);outline-offset:2px}.paper-feed-filter-icon{display:inline-flex;color:currentColor;filter:grayscale(1)}.hf-resource-logo{position:relative;display:inline-flex;width:15px;height:15px}.hf-resource-logo img{position:absolute;top:0;right:0;bottom:0;left:0;display:block;width:15px;height:15px}.hf-resource-logo-white,.paper-feed-filter.active .hf-resource-logo-black{visibility:hidden}.paper-feed-filter.active .hf-resource-logo-white{visibility:visible}.paper-feed-filter-check{display:inline-flex;align-items:center;justify-content:center;width:17px;height:17px;border-radius:50%;background:color-mix(in srgb,var(--bg) 18%,transparent);color:currentColor;font-size:10px;line-height:1}.home-feed-sort-bar{flex-wrap:wrap;row-gap:10px}.results-count{font-family:var(--mono);font-size:11px;color:var(--ink-faint)}.paper-feed-scope-links{margin-top:12px;display:flex;flex-direction:column;align-items:flex-start;gap:8px}.paper-feed-primary-links,.paper-feed-task-tags{display:flex;flex-wrap:wrap;align-items:center;gap:10px}.papers-feed-layout-scoped{display:block}.paper-thumb{display:none}.papers-search-row{display:flex;margin-top:12px;margin-bottom:24px}.papers-search-input-wrap{display:flex;align-items:center;gap:8px;border:1px solid var(--hairline-strong);background:var(--bg-elevated);padding:10px 14px;border-radius:4px;flex:1;max-width:600px;color:var(--ink-faint)}.papers-search-input-wrap:focus-within{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-soft)}.papers-search-input{flex:1;border:none;outline:none;background:transparent;font-family:var(--sans);font-size:14px;color:var(--ink)}.papers-search-input::-moz-placeholder{color:var(--ink-faint)}.papers-search-input::placeholder{color:var(--ink-faint)}@media (max-width: 880px){.feed-title{font-size:32px}.paper-card{grid-template-columns:120px 1fr;gap:16px;padding:20px 0}.paper-body{flex-direction:column;align-items:stretch;gap:12px}.paper-resources{width:auto;flex-direction:row;align-items:center;justify-content:flex-start;gap:24px;border-left:none;border-top:1px solid var(--hairline);padding-left:0;padding-top:12px}.paper-resource{flex-direction:row;gap:8px}.paper-resource .resource-stat{align-items:flex-start}}@media (min-width: 641px) and (max-width: 880px){.paper-thumb-wrap{min-width:0}.paper-thumb-wrap>div{width:100%!important;max-width:120px;height:auto!important;aspect-ratio:160 / 220}.paper-thumb-wrap>div>img,.paper-thumb-wrap>div>svg{width:100%!important;height:100%!important}.paper-thumb-skeleton{width:100%;max-width:120px;height:auto;aspect-ratio:160 / 220}}@media (max-width: 640px){.feed-header{margin-bottom:24px;gap:16px}.feed-title{font-size:26px}.paper-card{grid-template-columns:1fr;gap:12px}.paper-resources{border-top:none;padding-top:0}.paper-thumb-wrap{align-self:flex-start}.paper-title{font-size:19px}.paper-abstract{max-height:6.2em;-webkit-line-clamp:4;line-clamp:4}}.sort-options-time{margin-left:auto}.sort-btn-time{text-transform:none}@media (max-width: 900px){.sort-bar{flex-wrap:wrap;gap:8px}.sort-options-time{margin-left:0}}@media (max-width: 560px){.paper-feed-resource-divider{display:none}.paper-feed-resource-controls{gap:0}}.paper-date-filter{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:4px}.paper-date-popover{width:min(760px,calc(100vw - 32px));max-width:760px;padding:14px 18px;max-height:calc(100vh - 24px);overflow-y:auto}.paper-date-popover-header{margin-bottom:8px}.paper-date-popover-header h2{margin:0;font-family:var(--serif);font-size:21px}.paper-date-popover-header p{margin:5px 0 0;color:var(--ink-soft)}.paper-date-navigation{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:36px;margin-bottom:-38px;pointer-events:none;position:relative;z-index:1}.paper-date-navigation-group{display:flex;justify-content:space-between}.paper-date-navigation button{pointer-events:auto}.paper-date-navigation button,.paper-date-actions button{border:1px solid var(--hairline);border-radius:6px;background:var(--bg-elevated);color:var(--ink);padding:7px 11px;font:inherit;cursor:pointer}.paper-date-calendars{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:36px}.paper-date-year{display:flex;align-items:center;justify-content:center;gap:8px;margin-bottom:6px;color:var(--ink-soft);font-size:13px;font-weight:600}.paper-date-year input{width:5.5rem;border:1px solid var(--hairline);border-radius:5px;background:var(--bg-elevated);color:var(--ink);padding:5px 7px;font:inherit}.paper-date-year input:focus-visible{outline:2px solid var(--accent);outline-offset:1px}.paper-date-calendar h3{margin:0 0 10px;text-align:center;font-family:var(--serif);font-size:17px}.paper-date-weekdays,.paper-date-days{display:grid;grid-template-columns:repeat(7,minmax(0,1fr))}.paper-date-weekdays span{padding:3px 0 4px;color:var(--ink-faint);text-align:center;font-size:11px;font-weight:600}.paper-date-day{width:28px;height:28px;justify-self:center;border:0;border-radius:999px;background:transparent;color:var(--ink);font:inherit;cursor:pointer}.paper-date-day:hover:not(:disabled),.paper-date-day:focus-visible{background:var(--bg-subtle);outline:2px solid var(--accent);outline-offset:-2px}.paper-date-day.in-range{border-radius:0;background:color-mix(in srgb,var(--accent) 14%,transparent)}.paper-date-day.selected{background:var(--accent);color:#fff;font-weight:700}.paper-date-day.today:not(.selected){box-shadow:inset 0 0 0 1px var(--accent)}.paper-date-day:disabled{color:var(--ink-faint);cursor:not-allowed;opacity:.42}.paper-date-day.outside{visibility:hidden}.paper-date-actions{display:flex;align-items:center;justify-content:space-between;gap:12px;padding-top:10px;border-top:1px solid var(--hairline)}.paper-date-actions>div{display:flex;gap:8px}.paper-date-actions .paper-date-clear{border-color:transparent;color:var(--ink-soft)}.paper-date-actions .paper-date-apply{border-color:var(--accent);background:var(--accent);color:#fff}.paper-date-actions button:disabled{cursor:not-allowed;opacity:.45}.paper-date-filter-single-calendar{justify-content:flex-start}.paper-date-popover-single-calendar{width:calc(100vw - 20px);padding:20px 14px}.paper-date-popover-single-calendar .paper-date-calendars,.paper-date-popover-single-calendar .paper-date-navigation{display:block}.paper-date-popover-single-calendar .paper-date-day{width:36px;height:36px}.organization-hero{display:grid;grid-template-columns:minmax(260px,.34fr) minmax(0,1fr);align-items:center;gap:48px;margin:24px 0 32px}.organization-hero-profile{min-width:0}.organization-hero-title{display:flex;align-items:center;gap:14px}.organization-hero-title img{flex:none;-o-object-fit:contain;object-fit:contain}.organization-hero-links{display:flex;flex-wrap:wrap;gap:12px;margin-top:12px}.organization-contributions{width:100%;min-width:0}.organization-contributions-header{margin-bottom:12px}.organization-contributions-title{font-family:var(--serif);font-size:20px;font-weight:600;line-height:1.2}.organization-contributions-summary{margin-top:3px;color:var(--ink-soft);font-size:12px}.organization-contributions-legend{display:flex;align-items:center;justify-content:flex-start;gap:4px;margin-top:8px;color:var(--ink-faint);font-family:var(--mono);font-size:10px;white-space:nowrap}.organization-contributions-legend span:first-child{margin-right:3px}.organization-contributions-legend span:last-child{margin-left:3px}.organization-contributions-scroll{width:calc(100% + 34px);max-width:none;margin-left:-34px;overflow-x:auto;padding:2px 0;scrollbar-width:thin;scrollbar-color:var(--hairline-strong) transparent}.organization-contributions-plot{display:grid;grid-template-columns:25px auto;gap:9px;margin:0}.organization-contributions-weekdays{display:grid;grid-template-rows:repeat(7,12px);gap:3px;padding-top:24px;color:var(--ink-faint);font-family:var(--mono);font-size:9px;line-height:12px;text-align:right}.organization-contributions-months{display:grid;gap:3px;height:20px;color:var(--ink-faint);font-family:var(--mono);font-size:9px;line-height:12px}.organization-contributions-months span{grid-row:1;white-space:nowrap}.organization-contributions-grid{display:grid;grid-template-rows:repeat(7,12px);grid-auto-flow:column;gap:3px}.organization-contribution-cell{display:block;width:12px;height:12px;border:1px solid color-mix(in srgb,var(--hairline) 78%,transparent);border-radius:2px;background:var(--bg-subtle)}.organization-contribution-cell.level-1{border-color:color-mix(in srgb,var(--positive-border) 60%,transparent);background:color-mix(in srgb,var(--positive-bg) 65%,var(--positive-border))}.organization-contribution-cell.level-2{border-color:transparent;background:color-mix(in srgb,var(--positive-text) 35%,var(--positive-bg))}.organization-contribution-cell.level-3{border-color:transparent;background:color-mix(in srgb,var(--positive-text) 60%,var(--positive-bg))}.organization-contribution-cell.level-4{border-color:transparent;background:var(--positive-text)}.organization-contribution-cell.is-outside{visibility:hidden}.organization-contributions-skeleton{width:100%;height:154px;border-radius:6px}@media (max-width: 960px){.organization-hero{grid-template-columns:1fr;align-items:start;gap:28px}.organization-contributions-plot{margin:0 auto}.organization-contributions-scroll{width:100%;max-width:100%;margin-left:0}.organization-contributions-legend{justify-content:center;width:min(100%,826px);margin:8px auto 0}}@media (max-width: 640px){.organization-hero{margin-bottom:28px}.organization-contributions{max-width:calc(100vw - 28px)}}.author-hero{margin:8px 0 20px}.author-hero-title{display:flex;align-items:center;gap:14px}.author-avatar{display:block;flex:none;border-radius:50%;border:1px solid var(--border);background:var(--surface);-o-object-fit:cover;object-fit:cover}.author-hero .feed-subtitle a{color:var(--accent-text);text-decoration:none}.author-hero .feed-subtitle a:hover{text-decoration:underline;text-underline-offset:2px}.tag-chip{display:inline-flex;align-items:center;gap:5px;padding:3px 9px;font-family:var(--mono);font-size:11px;font-weight:500;border-radius:4px;cursor:pointer;transition:filter .15s,transform .15s;white-space:nowrap;border:1px solid transparent}.tag-chip:hover{filter:brightness(.96);transform:translateY(-1px)}.tag-chip .dot{width:5px;height:5px;border-radius:50%}.paper-tags--clamped .tag-chip{line-height:16px}.tag-hero{padding:48px 0 32px;border-bottom:1px solid var(--hairline);margin-bottom:32px}.tag-hero-eyebrow{font-family:var(--mono);font-size:11px;letter-spacing:.12em;text-transform:uppercase;color:var(--ink-faint);margin-bottom:12px;display:flex;align-items:center;gap:8px}.tag-hero-title{font-family:var(--serif);font-size:56px;font-weight:500;letter-spacing:-.025em;line-height:1;margin-bottom:16px;overflow-wrap:break-word}.tag-hero-meta{display:flex;gap:32px;margin-top:24px;font-family:var(--mono);font-size:12px;color:var(--ink-soft)}.tag-hero-meta .stat{display:flex;flex-direction:column;gap:4px}.tag-hero-meta .stat .label{font-size:10px;letter-spacing:.1em;text-transform:uppercase;color:var(--ink-faint)}.tag-hero-meta .stat .value{font-family:var(--serif);font-size:22px;font-weight:500;color:var(--ink)}.tag-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:0;border-top:1px solid var(--hairline)}.tag-cell{padding:20px 24px;border-bottom:1px solid var(--hairline);border-right:1px solid var(--hairline);cursor:pointer;transition:background .15s;display:flex;flex-direction:column;gap:8px}.tag-cell:nth-child(3n){border-right:none}.tag-cell:hover{background:var(--bg-elevated)}.tag-cell .name{font-family:var(--serif);font-size:18px;font-weight:500;display:flex;align-items:center;gap:8px}.tag-cell .name .dot{width:8px;height:8px;border-radius:50%}.tag-cell .meta{font-family:var(--mono);font-size:11px;color:var(--ink-faint);display:flex;gap:12px}.tag-hero-meta .stat .value small{margin-left:2px;font-family:var(--mono);font-size:10px;font-weight:500;color:var(--ink-faint)}.framework-category{margin-top:32px}.framework-category-head{display:flex;align-items:flex-start;justify-content:space-between;gap:24px;margin-bottom:16px}.framework-category-blurb{font-family:var(--serif);font-size:14px;line-height:1.55;color:var(--ink-soft);max-width:720px;margin:0}.framework-category-meta{font-family:var(--mono);font-size:11px;color:var(--ink-faint);white-space:nowrap}.framework-guide-link{display:inline-block;margin-top:8px;font-family:var(--mono);font-size:11px;color:var(--accent-text);text-decoration:none}.framework-guide-link:hover{text-decoration:underline}.framework-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:14px}.framework-card{border:1px solid var(--hairline);background:var(--bg-elevated);border-radius:6px;padding:18px 22px;scroll-margin-top:24px;display:flex;flex-direction:column;gap:12px;transition:border-color .15s}.framework-card:hover{border-color:var(--ink)}.framework-card-clickable{cursor:pointer}.framework-card-clickable:focus-visible{border-color:var(--ink);outline:2px solid var(--accent);outline-offset:2px}.framework-card-head{display:flex;justify-content:space-between;align-items:flex-start;gap:16px}.framework-card-name{font-family:var(--serif);font-size:20px;font-weight:500;letter-spacing:-.01em;margin:0;color:var(--ink)}.framework-card-org{font-family:var(--mono);font-size:11px;color:var(--ink-faint);margin-top:4px}.framework-platform-row{display:flex;flex-wrap:wrap;gap:6px;justify-content:flex-end}.framework-platform-chip{font-family:var(--mono);font-size:10px;letter-spacing:.03em;text-transform:uppercase;padding:3px 8px;border-radius:3px;white-space:nowrap}.framework-card-desc{font-family:var(--sans);font-size:14px;line-height:1.55;color:var(--ink-soft);margin:0}.framework-card-when{font-family:var(--serif);font-style:italic;font-size:13px;line-height:1.5;color:var(--ink-soft);padding-top:4px;border-top:1px solid var(--hairline)}.framework-card-when-label{display:block;font-family:var(--mono);font-size:10px;font-style:normal;letter-spacing:.06em;text-transform:uppercase;color:var(--ink-faint);margin-bottom:4px}.framework-card-links{display:flex;flex-wrap:wrap;gap:10px;margin-top:auto}.framework-link{display:inline-flex;align-items:center;gap:6px;font-family:var(--mono);font-size:11px;color:var(--accent-text);text-decoration:none;padding:4px 10px;border:1px solid var(--hairline);border-radius:4px;transition:border-color .15s,background .15s}.framework-link:hover{border-color:var(--ink);background:var(--bg-subtle)}.framework-link-disabled,.framework-link-disabled:hover{color:var(--ink-faint);background:transparent;border-color:var(--hairline);cursor:not-allowed}@media (max-width: 880px){.tag-grid{grid-template-columns:repeat(2,1fr)}.tag-cell:nth-child(3n){border-right:1px solid var(--hairline)}.tag-cell:nth-child(2n){border-right:none}.framework-category-head{flex-direction:column;gap:8px}.framework-card-head{flex-direction:column;gap:10px}.framework-platform-row{justify-content:flex-start}.tag-hero-title{font-size:40px}}@media (max-width: 640px){.tag-hero{padding:32px 0 24px;margin-bottom:24px}.tag-hero-title{font-size:30px}.tag-grid{grid-template-columns:1fr}.tag-cell{padding:16px;border-right:none!important}.framework-grid{grid-template-columns:1fr}.tag-hero-meta{gap:20px;flex-wrap:wrap}}.task-hero-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(320px,480px);gap:48px;align-items:start}.task-figure-card{background:var(--bg-elevated);border:1px solid var(--hairline);border-radius:6px;padding:16px 16px 12px;margin:0;box-shadow:0 1px #00000005}.task-figure-img-wrap{width:100%;background:var(--bg);border-radius:4px;overflow:hidden;line-height:0}.task-figure-img{width:100%;height:auto;display:block}.task-figure-card--compact .task-figure-img{width:50%;margin:0 auto}.task-figure-card figcaption{font-family:var(--serif);font-style:italic;font-size:12px;color:var(--ink-faint);text-align:center;margin-top:10px;border-top:1px solid var(--hairline);padding-top:10px}.task-image-credit{color:var(--ink-faint);font-family:var(--mono);font-size:10px;font-style:normal}.task-image-credit p{margin:0}.task-image-credit a{color:inherit;text-decoration:underline;text-underline-offset:2px}.task-image-credit a:hover{color:var(--accent-text)}@media (max-width: 900px){.task-hero-grid{grid-template-columns:1fr;gap:24px}}.taxonomy-suggestion-cell{-webkit-appearance:none;-moz-appearance:none;appearance:none;width:100%;border-top:0;border-left:0;background:transparent;color:var(--ink-soft);text-align:left}.taxonomy-suggestion-cell .name{font-style:italic}.taxonomy-suggestion-icon{width:14px;height:14px}.task-page-grid{display:grid;grid-template-columns:1fr 260px;gap:56px;align-items:start}.task-featured-collection{display:grid;grid-template-columns:1fr auto;gap:4px 24px;align-items:center;margin-top:32px;padding:18px 24px;border:1px solid var(--hairline);border-left:3px solid var(--accent);border-radius:6px;background:var(--bg-elevated);color:var(--ink);text-decoration:none;transition:border-color .15s}.task-featured-collection:hover{border-color:var(--accent)}.task-featured-collection-eyebrow{grid-column:1;font-family:var(--mono);font-size:10px;font-weight:600;letter-spacing:.12em;text-transform:uppercase;color:var(--accent-text)}.task-featured-collection strong{grid-column:1;font-family:var(--serif);font-size:22px;line-height:1.2}.task-featured-collection-description{grid-column:1;color:var(--ink-soft);font-size:14px;line-height:1.45}.task-featured-collection-meta{grid-column:2;grid-row:1 / span 3;display:inline-flex;align-items:center;gap:6px;font-family:var(--mono);font-size:11px;letter-spacing:.08em;text-transform:uppercase;color:var(--accent-text);white-space:nowrap}.medical-ai-hub{margin-top:32px;padding:24px;border:1px solid var(--hairline);border-top:3px solid var(--accent);border-radius:6px;background:var(--bg-elevated)}.medical-ai-hub-heading>span,.medical-ai-hub-card-eyebrow{display:block;font-family:var(--mono);font-size:10px;font-weight:600;letter-spacing:.12em;text-transform:uppercase;color:var(--accent-text)}.medical-ai-hub-heading h2{margin:6px 0 4px;font-family:var(--serif);font-size:26px;line-height:1.2;color:var(--ink)}.medical-ai-hub-heading p{margin:0;color:var(--ink-soft);font-size:14px}.medical-ai-hub-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-top:20px}.medical-ai-hub-card{display:flex;min-width:0;min-height:176px;flex-direction:column;padding:16px;border:1px solid var(--hairline);border-radius:5px;background:var(--bg);color:var(--ink);text-decoration:none;transition:border-color .15s,transform .15s}.medical-ai-hub-card:hover{border-color:var(--accent);transform:translateY(-2px)}.medical-ai-hub-card strong{margin-top:10px;font-family:var(--serif);font-size:18px;line-height:1.2}.medical-ai-hub-card-description{margin-top:8px;color:var(--ink-soft);font-size:13px;line-height:1.45}.medical-ai-hub-card-meta{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:auto;padding-top:16px;font-family:var(--mono);font-size:10px;letter-spacing:.04em;text-transform:uppercase;color:var(--ink-faint)}.task-explainer{font-family:var(--serif);font-size:17px;line-height:1.55;color:var(--ink);max-width:720px;margin-top:16px;margin-bottom:28px;text-wrap:pretty}.task-explainer p{margin:0 0 12px}.task-explainer p:last-child{margin-bottom:0}.task-explainer a{color:var(--accent-text);text-decoration:underline;text-underline-offset:2px;text-decoration-thickness:1px}.task-explainer a:hover{color:var(--accent)}.task-explainer strong{color:var(--ink);font-weight:600}.task-explainer em{font-style:italic}.task-explainer code{font-family:var(--mono);font-size:.9em;background:var(--bg-elevated);padding:1px 5px;border-radius:3px}.task-research-trends{max-width:760px;margin:-8px 0 28px;border-left:2px solid var(--accent);background:var(--bg-elevated)}.task-research-trends-item{border-bottom:0}.task-research-trends-trigger{padding:18px 20px;color:var(--accent-text)}.task-research-trends-trigger:hover{text-decoration:none}.task-research-trends-trigger svg{width:16px;height:16px}.task-research-trends-title{font-family:var(--mono);font-size:11px;font-weight:600;letter-spacing:.08em;text-transform:uppercase;color:var(--accent-text)}.task-research-trends-content{padding:0 20px 16px}.task-research-trends ul{margin:0;padding-left:19px}.task-research-trends li{padding-left:4px;font-family:var(--serif);font-size:15px;line-height:1.5;color:var(--ink)}.task-research-trends li+li{margin-top:8px}.task-research-trends li::marker{color:var(--accent-text)}.task-research-trends p{margin:0}.task-research-trends a{color:var(--accent-text);text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:2px}.task-quickstats{display:flex;gap:28px;font-family:var(--mono);font-size:11px;color:var(--ink-faint);letter-spacing:.05em;padding-bottom:14px;margin-bottom:0;border-bottom:1px solid var(--accent)}.task-quickstats .num{color:var(--ink);font-weight:600;font-size:12px;margin-right:5px;font-feature-settings:"tnum"}.task-framework-links{display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px;margin-top:14px}.task-framework-links-label{font-family:var(--mono);font-size:10px;letter-spacing:.12em;text-transform:uppercase;color:var(--ink-faint);font-weight:600}.task-framework-link{display:inline-flex;align-items:center;gap:6px;font-family:var(--mono);font-size:12px;color:var(--ink);text-decoration:none;padding:4px 10px;border:1px solid var(--hairline);border-radius:999px;background:var(--bg-elevated);transition:color .15s,border-color .15s}.task-framework-link:hover{color:var(--accent-text);border-color:var(--accent)}.task-framework-link-stars{color:var(--ink-faint);font-size:11px}.task-side{position:sticky;top:100px;font-size:13px}.side-block{margin-bottom:28px}.side-block-num{font-family:var(--mono);font-size:10px;color:var(--accent-text);letter-spacing:.1em;margin-bottom:4px}.side-block-label{font-family:var(--mono);font-size:12px;letter-spacing:.12em;text-transform:uppercase;color:var(--ink);font-weight:600;padding-bottom:8px;border-bottom:1px solid var(--hairline);margin-bottom:10px}.side-link-row{display:flex;justify-content:space-between;align-items:baseline;padding:5px 0;cursor:pointer;font-family:var(--serif);font-size:14px}.side-link-row:hover{color:var(--accent-text)}.side-link-row .count{font-family:var(--mono);font-size:11px;color:var(--ink-faint)}.side-domain-pill{font-family:var(--mono);font-size:11px;color:var(--accent-text);padding:6px 0}.side-method-row{display:flex;justify-content:space-between;align-items:center;padding:4px 0}.side-method-row .num{font-family:var(--mono);font-size:10.5px;color:var(--ink-faint)}.task-section-head{scroll-margin-top:96px;margin-top:28px;margin-bottom:14px}.task-section-eyebrow{font-family:var(--mono);font-size:10px;letter-spacing:.12em;text-transform:uppercase;color:var(--accent-text);margin-bottom:6px}.task-section-title{font-family:var(--mono);font-size:18px;font-weight:600;color:var(--ink);letter-spacing:.04em;text-transform:uppercase;display:flex;align-items:baseline;gap:10px}.task-section-title .meta{font-family:var(--mono);font-size:11px;color:var(--ink-faint);font-weight:400;letter-spacing:.05em;text-transform:none}.subtask-section{margin-bottom:24px}.subtask-section+.subtask-section{margin-top:8px}.subtask-head{display:flex;align-items:baseline;gap:10px;margin:18px 0 10px}.subtask-head-name{font-family:var(--mono);font-size:14px;font-weight:600;color:var(--ink);letter-spacing:.04em;text-transform:uppercase;text-decoration:none;transition:color .15s}.subtask-head-name:hover{color:var(--accent-text)}.subtask-head-meta{font-family:var(--mono);font-size:11px;color:var(--ink-faint);letter-spacing:.05em}.subtask-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;align-items:start}.subtask-grid .subtask-section{margin-bottom:0;border:1px solid var(--hairline);background:var(--bg-elevated);border-radius:6px;padding:12px 14px 10px}.subtask-grid .subtask-section+.subtask-section{margin-top:0}.subtask-grid .subtask-head{margin:0 0 8px;padding-bottom:8px;border-bottom:1px solid var(--hairline)}.subtask-grid .subtask-head-name{font-size:12px}.subtask-grid .subtask-head-meta{font-size:10px}.subtask-summary{display:flex;flex-direction:column;gap:7px;min-height:86px;color:var(--ink-soft);text-decoration:none;font-family:var(--mono);font-size:10px;line-height:1.4;letter-spacing:.05em;text-transform:uppercase}.subtask-summary:hover{color:var(--ink)}.subtask-summary-desc{display:-webkit-box;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:3;font-family:var(--serif);font-size:13px;line-height:1.35;letter-spacing:0;text-transform:none;color:var(--ink-soft)}.subtask-grid .bench-row{display:grid;grid-template-columns:22px 1fr 16px;gap:10px;align-items:center;border:0;background:transparent;border-radius:0;padding:8px 0;margin-bottom:0;border-bottom:1px dashed var(--hairline);transition:none}.subtask-grid .bench-row:last-of-type{border-bottom:0}.subtask-grid .bench-row:hover{border-color:transparent}.subtask-grid .bench-row:hover .bench-row-name{color:var(--accent-text)}.subtask-grid .bench-row-num{font-size:10px}.subtask-grid .bench-row-name{font-size:13.5px;margin-bottom:2px;line-height:1.2}.subtask-grid .bench-row-sub{font-size:9.5px;letter-spacing:.06em}.subtask-grid .bench-row-arrow{font-size:14px}.subtask-grid .bench-show-more{font-size:10px;padding:6px 0 0;margin-top:2px}.bench-card{border:1px solid var(--hairline);background:var(--bg-elevated);border-radius:6px;padding:18px 22px;margin-bottom:14px;cursor:pointer;transition:border-color .15s}.bench-card:hover{border-color:var(--ink)}.bench-head{display:flex;justify-content:space-between;align-items:baseline;margin-bottom:14px;gap:16px}.bench-name{font-family:var(--mono);font-size:14px;font-weight:600;letter-spacing:.02em;text-transform:uppercase;color:var(--ink)}.bench-sub{font-family:var(--mono);font-size:10px;letter-spacing:.1em;text-transform:uppercase;color:var(--ink-faint);margin-top:4px}.bench-sota-value{font-family:var(--serif);font-size:36px;font-weight:500;color:var(--accent);font-feature-settings:"tnum";line-height:1}.bench-sota-tag{font-family:var(--mono);font-size:10px;letter-spacing:.08em;text-transform:uppercase;color:var(--ink-faint);text-align:right;margin-top:4px}.bench-task-tag{font-family:var(--mono);font-size:10px;letter-spacing:.08em;text-transform:uppercase;color:var(--accent-text)}.domain-mega-title{font-family:var(--mono);font-size:56px;font-weight:600;letter-spacing:-.01em;line-height:1;text-transform:uppercase;margin-bottom:0;color:var(--ink);overflow-wrap:break-word}.benchmark-trend-table{border-top:1px solid var(--hairline)}.benchmark-trend-head,.benchmark-trend-row{display:grid;grid-template-columns:124px minmax(150px,.8fr) minmax(150px,.9fr) minmax(200px,1.3fr) 44px 78px;gap:20px;align-items:center}.benchmark-trend-head{padding:9px 16px;border-bottom:1px solid var(--hairline);font-family:var(--mono);font-size:9.5px;font-weight:600;letter-spacing:.1em;text-transform:uppercase;color:var(--ink-faint)}.benchmark-trend-row{min-height:92px;padding:12px 16px;border-bottom:1px solid var(--hairline);background:transparent;transition:background .15s,border-color .15s}.benchmark-trend-row:hover{background:var(--bg-elevated);border-color:var(--hairline-strong)}.benchmark-trend-row:hover .bench-row-name{color:var(--accent-text)}.benchmark-trend-cell{min-width:0}.benchmark-trend-sparkline{display:block;width:112px;height:42px;overflow:visible}.benchmark-trend-axis{stroke:var(--hairline-strong);stroke-width:.8;stroke-dasharray:1.5 2.5;vector-effect:non-scaling-stroke}.benchmark-trend-area{fill:var(--accent-soft);opacity:.68}.benchmark-trend-line{fill:none;stroke:var(--accent);stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round;vector-effect:non-scaling-stroke}.benchmark-trend-dot{fill:var(--bg-elevated);stroke:var(--accent);stroke-width:1.8;vector-effect:non-scaling-stroke}.benchmark-trend-point{cursor:crosshair;outline:none}.benchmark-trend-point-hit{fill:transparent}.benchmark-trend-point-mark{fill:var(--bg-elevated);stroke:var(--accent);stroke-width:1.25;opacity:0;transition:opacity .12s,r .12s;vector-effect:non-scaling-stroke}.benchmark-trend-point:hover .benchmark-trend-point-mark,.benchmark-trend-point:focus .benchmark-trend-point-mark{opacity:1;r:2.3px}.benchmark-trend-tooltip rect{fill:var(--ink);opacity:.94}.benchmark-trend-tooltip text{fill:var(--bg);font-family:var(--mono);font-size:3.2px;letter-spacing:.01em}.benchmark-trend-tooltip .benchmark-trend-tooltip-value{font-weight:700}.benchmark-trend-meta{display:flex;align-items:center;gap:6px;margin-top:3px;font-family:var(--mono);font-size:8.5px;letter-spacing:.035em;color:var(--ink-faint);white-space:nowrap}.benchmark-trend-meta strong{color:var(--ink-soft);font-weight:600}.benchmark-trend-change{padding:1px 4px;border-radius:999px;font-size:8px;font-weight:600}.benchmark-trend-change.is-up,.benchmark-trend-change.is-new{color:var(--positive-text);background:var(--positive-bg)}.benchmark-trend-change.is-down{color:var(--negative-text);background:var(--negative-bg)}.benchmark-trend-benchmark{min-width:0}.benchmark-trend-row .bench-row-name{display:block;margin-bottom:5px}.benchmark-trend-row .bench-row-best{width:100%;justify-content:flex-start;text-align:left}.bench-row-best-empty{color:var(--ink-faint);font-family:var(--mono)}.bench-row-paper{min-width:0;font-family:var(--serif);font-size:14px;line-height:1.35}.bench-row-paper a{color:var(--accent-text)}.bench-row-paper a:hover{text-decoration:underline}.bench-row-code{display:flex;justify-content:center}.bench-row-code a{display:inline-flex;color:var(--ink-soft);transition:color .15s,transform .15s}.bench-row-code a:hover{color:var(--accent-text);transform:translateY(-1px)}.bench-row-compare{display:flex;justify-content:center}.bench-row-compare a{display:inline-flex;align-items:center;justify-content:center;gap:5px;min-height:30px;padding:0 10px;border:1px solid var(--accent);border-radius:999px;color:var(--accent-text);font-family:var(--mono);font-size:9px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;white-space:nowrap;transition:color .15s,background .15s}.bench-row-compare a svg{transition:transform .15s}.bench-row-compare a:hover{color:var(--bg);background:var(--accent)}.bench-row-compare a:hover svg{transform:translate(2px)}.bench-row-compare a:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.bench-row{display:grid;grid-template-columns:36px 1fr auto 28px;gap:18px;align-items:center;padding:16px 18px;border:1px solid var(--hairline);background:var(--bg-elevated);border-radius:6px;margin-bottom:8px;cursor:pointer;transition:border-color .15s,transform .15s}.bench-row:hover{border-color:var(--ink)}.bench-row:hover .bench-row-arrow{color:var(--accent-text);transform:translate(3px)}.bench-row-num{font-family:var(--mono);font-size:11px;color:var(--ink-faint);letter-spacing:.05em;font-feature-settings:"tnum"}.bench-row-name{font-family:var(--serif);font-size:18px;font-weight:500;color:var(--ink);letter-spacing:-.005em;margin-bottom:4px}.bench-row-sub{display:flex;align-items:center;gap:8px;font-family:var(--mono);font-size:10px;letter-spacing:.08em;text-transform:uppercase;color:var(--ink-faint)}.bench-row-sub strong{color:var(--ink-soft);font-weight:600}.bench-row-variants{display:flex;flex-wrap:wrap;gap:4px;margin:2px 0 6px}.bench-row-variant{font-family:var(--mono);font-size:9.5px;letter-spacing:.02em;white-space:nowrap;padding:1px 5px;border:1px solid var(--hairline);border-radius:3px;background:transparent;color:var(--ink-faint);cursor:pointer;transition:border-color .15s,color .15s}.bench-row-variant:hover{border-color:var(--ink);color:var(--ink)}.bench-row-variant[aria-pressed=true]{border-color:var(--accent);color:var(--accent-text)}.bench-row-variant:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.bench-row-sub .dot-sep{color:var(--hairline-strong)}.bench-row-sota{text-align:right}.bench-row-sota-value{font-family:var(--serif);font-size:22px;font-weight:500;color:var(--accent-text);font-feature-settings:"tnum";line-height:1}.bench-row-sota-tag{font-family:var(--mono);font-size:9.5px;letter-spacing:.08em;text-transform:uppercase;color:var(--ink-faint);margin-top:4px}.bench-row-arrow{font-family:var(--serif);font-size:18px;color:var(--hairline-strong);text-align:center;transition:color .15s,transform .15s}.bench-row-best{display:flex;align-items:center;justify-content:flex-end;gap:6px;max-width:240px;text-align:right}.bench-row-best-icon{color:var(--accent-text);flex:0 0 auto}.bench-row-best-name{font-family:var(--serif);font-size:14px;color:var(--ink-soft);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.bench-show-more{font-family:var(--mono);font-size:11px;letter-spacing:.05em;color:var(--ink-faint);background:transparent;border:0;padding:8px 2px 2px;margin-top:4px;cursor:pointer;text-transform:lowercase;transition:color .15s}.bench-show-more:hover{color:var(--accent-text)}.bm-action-btn{display:inline-flex;align-items:center;gap:8px;padding:8px 14px;border:1px solid var(--hairline);border-radius:6px;background:var(--bg-elevated);font-family:var(--sans);font-size:13px;font-style:normal;color:var(--ink);cursor:pointer;transition:border-color .15s}.bm-action-btn:hover{border-color:var(--ink)}.bm-action-btn svg{display:block}@media (max-width: 880px){.task-page-grid{grid-template-columns:1fr;gap:32px}.task-side{position:static;top:auto;order:-1}.subtask-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.medical-ai-hub-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.domain-mega-title{font-size:40px}.bench-row{grid-template-columns:28px 1fr auto;gap:12px;padding:14px}.bench-row>.bench-row-arrow{display:none}.bench-row-best{max-width:130px}.bench-row-best-name{font-size:12.5px}.benchmark-trend-head,.benchmark-trend-row{grid-template-columns:112px minmax(130px,.8fr) minmax(120px,.8fr) minmax(160px,1.2fr) 36px 72px;gap:14px}.benchmark-trend-sparkline{width:104px}}@media (max-width: 640px){.domain-mega-title{font-size:30px}.subtask-grid{grid-template-columns:1fr}.medical-ai-hub{padding:18px}.task-featured-collection{grid-template-columns:1fr;padding:16px 18px}.task-featured-collection-meta{grid-column:1;grid-row:auto;margin-top:8px}.medical-ai-hub-grid{grid-template-columns:1fr}.medical-ai-hub-card{min-height:0}.benchmark-trend-head{display:none}.benchmark-trend-row{grid-template-columns:100px minmax(0,1fr) 28px;grid-template-areas:"trend benchmark code" "trend best code" "trend paper paper" "trend compare compare";gap:4px 12px;min-height:120px;padding:12px 4px}.benchmark-trend-cell{grid-area:trend}.benchmark-trend-benchmark{grid-area:benchmark}.benchmark-trend-row .bench-row-best{grid-area:best;justify-content:flex-start;max-width:none;text-align:left}.benchmark-trend-row .bench-row-paper{grid-area:paper}.benchmark-trend-row .bench-row-code{grid-area:code}.benchmark-trend-row .bench-row-compare{grid-area:compare;justify-content:flex-start;margin-top:4px}.bench-row-compare a{min-height:26px;padding:0 9px;font-size:8.5px}.benchmark-trend-sparkline{width:96px}.benchmark-trend-meta{flex-wrap:wrap;gap:3px;white-space:normal}.task-quickstats{flex-wrap:wrap;gap:16px}}.paper-meta-line .arxiv-id{color:var(--accent-text)}.paper-authors .institution{font-style:italic;color:var(--ink-faint)}.paper-tags--clamped .method-chip{line-height:16px}.method-hero-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(360px,560px);gap:56px;align-items:start}.method-hero-grid--wide-figure{grid-template-columns:minmax(0,1fr) minmax(480px,640px)}.method-figure-card{background:var(--bg-elevated);border:1px solid var(--hairline);border-radius:6px;padding:16px 16px 12px;margin:0;box-shadow:0 1px #00000005;align-self:center}.method-figure-svg{width:100%;display:block}.method-figure-svg--schematic{aspect-ratio:360 / 420}.method-figure-img{width:100%;height:auto;display:block}.method-figure-svg--compact .method-figure-img{width:50%;margin:0 auto}.method-figure-svg--scaled-80 .method-figure-img{width:80%;margin:0 auto}.method-figure-card figcaption{font-family:var(--serif);font-style:italic;font-size:12px;color:var(--ink-faint);text-align:center;margin-top:10px;border-top:1px solid var(--hairline);padding-top:10px}.method-image-credit{color:var(--ink-faint);font-family:var(--mono);font-size:10px;font-style:normal}.method-image-credit p{margin:0}.method-image-credit a{color:inherit;text-decoration:underline;text-underline-offset:2px}.method-image-credit a:hover{color:var(--accent-text)}.method-description{font-family:var(--serif);font-size:17px;color:var(--ink-soft);max-width:720px;line-height:1.6;margin-top:16px;text-wrap:pretty}.method-description p{margin:0 0 12px}.method-description p:last-child{margin-bottom:0}.method-description a{color:var(--accent-text);text-decoration:underline;text-underline-offset:2px;text-decoration-thickness:1px}.method-description a:hover{color:var(--accent)}.method-description strong{color:var(--ink);font-weight:600}.method-description code{font-family:var(--mono);font-size:.9em;background:var(--bg-elevated);padding:1px 5px;border-radius:3px}.method-description ul,.method-description ol{padding-left:22px;margin:0 0 12px}.method-description ul{list-style-type:disc}.method-description ol{list-style-type:decimal}.method-description li{margin-bottom:4px}.method-description .katex-display{margin:14px 0;overflow-x:auto;overflow-y:hidden;padding:4px 0}.method-description .katex{font-size:1em}.method-source{margin-top:22px;display:flex;flex-direction:column;gap:6px;max-width:720px}.method-source-label{font-family:var(--mono);font-size:10px;letter-spacing:.14em;text-transform:uppercase;color:var(--ink-faint)}.method-source-link{display:flex;flex-direction:column;gap:2px;padding:12px 14px;background:var(--bg-elevated);border:1px solid var(--hairline);border-left:3px solid var(--accent-text);border-radius:3px;cursor:pointer;transition:background .12s,border-color .12s;text-decoration:none}.method-source-link:not(.is-static):hover{background:var(--bg-subtle);border-color:var(--hairline-strong);border-left-color:var(--accent)}.method-source-link.is-static{cursor:default}.method-source-title{font-family:var(--serif);font-size:17px;font-weight:500;color:var(--ink);letter-spacing:-.005em}.method-source-link:not(.is-static):hover .method-source-title{text-decoration:underline;text-underline-offset:3px;text-decoration-thickness:1px}.method-source-meta{font-family:var(--mono);font-size:11px;color:var(--ink-faint)}@media (max-width: 1024px){.method-hero-grid{grid-template-columns:1fr;gap:24px}.method-figure-card{max-width:560px}.method-hero-grid--wide-figure .method-figure-card{max-width:640px}}.method-hero-title{font-family:var(--mono);font-size:48px;letter-spacing:-.01em}.method-trending-icon{flex:0 0 auto;color:var(--accent-text);fill:color-mix(in srgb,var(--accent-text) 18%,transparent)}.method-trend-score{color:var(--accent-text);font-weight:600}.method-trend-panel{margin-top:20px;padding-top:14px;border-top:1px solid var(--hairline-strong)}.method-trend-header{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;margin-bottom:4px}.method-trend-eyebrow{margin-bottom:5px;font-family:var(--mono);font-size:10px;letter-spacing:.1em;text-transform:uppercase;color:var(--accent-text)}.method-trend-header p{margin:3px 0 0;font-family:var(--mono);font-size:11px;color:var(--ink-faint)}.method-trend-summary{display:flex;flex-direction:column;align-items:flex-end;flex:0 0 auto;font-family:var(--mono);font-size:10px;color:var(--ink-faint)}.method-trend-summary>strong{font-family:var(--serif);font-size:19px;font-weight:500;line-height:1;color:var(--ink)}.method-usage-chart-wrap{position:relative;width:100%}.method-usage-chart{display:block;width:100%;height:auto;overflow:visible}.method-usage-gridline{stroke:var(--hairline);stroke-width:1}.method-usage-y-label,.method-usage-x-label{fill:var(--ink-faint);font-family:var(--mono);font-size:9px}.method-usage-bar-hit{fill:transparent}.method-usage-bar-mark{fill:color-mix(in srgb,var(--accent-text) 48%,var(--bg));transition:fill .12s}.method-usage-bar.is-current .method-usage-bar-mark{opacity:.55}.method-usage-bar:hover .method-usage-bar-mark,.method-usage-bar:focus .method-usage-bar-mark,.method-usage-bar.is-active .method-usage-bar-mark{fill:var(--accent-text)}.method-usage-bar:focus{outline:none}.method-usage-tooltip{position:absolute;top:4px;right:8px;display:flex;gap:8px;padding:5px 8px;border:1px solid var(--hairline-strong);background:var(--bg);font-family:var(--mono);font-size:10px;color:var(--ink-soft);pointer-events:none}.method-trend-skeleton{margin-top:20px}.method-trend-note{margin:6px 0 0;color:var(--ink-faint);font-family:var(--mono);font-size:10px}@media (max-width: 640px){.method-trend-header{flex-direction:column;gap:12px}.method-trend-summary{align-items:flex-start}}.method-chip{display:inline-flex;align-items:center;padding:4px 10px;font-family:var(--mono);font-size:11px;font-weight:500;color:var(--ink);background:var(--bg-elevated);border:1px solid var(--hairline);border-radius:4px;cursor:pointer;transition:all .15s;white-space:nowrap}.method-chip:hover{border-color:var(--ink);background:var(--bg-subtle)}.side-method-row .method-chip{font-size:10.5px;padding:3px 8px}@media (max-width: 880px){.method-hero-title{font-size:40px}}@media (max-width: 640px){.method-hero-title{font-size:30px}}.filter-row{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin-bottom:24px;padding:12px 16px;border:1px solid var(--hairline);border-radius:8px;background:var(--bg-elevated)}.filter-row .label{margin-right:8px;color:var(--ink-faint);font-family:var(--mono);font-size:10px;letter-spacing:.1em;text-transform:uppercase}.search-overlay{position:fixed;top:0;right:0;bottom:0;left:0;background:#1a181466;-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px);z-index:100;display:flex;align-items:flex-start;justify-content:center;padding-top:100px}.search-modal{width:640px;max-width:calc(100vw - 32px);background:var(--bg);border:1px solid var(--hairline-strong);border-radius:12px;box-shadow:0 20px 60px #00000026;overflow:hidden}.search-modal-input{width:100%;padding:18px 20px;font-size:16px;font-family:var(--serif);border:none;background:transparent;outline:none;border-bottom:1px solid var(--hairline);color:var(--ink)}.search-modal-input::-moz-placeholder{color:var(--ink-faint);font-style:italic}.search-modal-input::placeholder{color:var(--ink-faint);font-style:italic}.search-results{max-height:480px;overflow-y:auto;padding:8px}.search-empty{padding:32px;text-align:center;color:var(--ink-faint);font-family:var(--serif);font-style:italic}.search-section-label{font-family:var(--mono);font-size:10px;letter-spacing:.12em;text-transform:uppercase;color:var(--ink-faint);padding:10px 12px 6px}.search-result{display:flex;flex-direction:column;padding:10px 12px;border-radius:6px;cursor:pointer;gap:4px}.search-result:hover,.search-result.focused{background:var(--bg-subtle)}.search-result-title{font-family:var(--serif);font-size:14.5px;font-weight:500;line-height:1.3}.search-result-meta{font-family:var(--mono);font-size:10.5px;color:var(--ink-faint);display:flex;gap:10px}.search-result-tag{display:flex;align-items:center;gap:8px;padding:8px 12px;border-radius:6px;cursor:pointer}.search-result-tag:hover,.search-result-tag.focused{background:var(--bg-subtle)}.search-result-tag .name{font-family:var(--mono);font-size:12px}.search-result-tag .count{margin-left:auto;font-family:var(--mono);font-size:10px;color:var(--ink-faint)}.search-view-all-row{width:100%;border:0;border-top:1px solid var(--hairline);background:var(--bg-subtle);color:var(--accent-text);padding:12px;text-align:left;font:600 11px var(--mono);cursor:pointer}.search-view-all-row:hover,.search-view-all-row:focus-visible{background:var(--bg-subtle);outline:2px solid var(--accent);outline-offset:-2px}@media (max-width: 640px){.search-modal-input{font-size:16px;padding:14px 16px}}.search-ask-row{display:flex;align-items:center;gap:10px;width:100%;padding:10px 12px;border-radius:6px;text-align:left;color:var(--ink)}.search-ask-row:hover{background:var(--bg-subtle)}.search-ask-chip{display:inline-flex;align-items:center;font-family:var(--mono);font-size:10.5px;color:var(--accent-text);background:var(--accent-soft);border-radius:5px;padding:2px 7px;flex:none}.search-ask-text{flex:1;min-width:0;font-family:var(--serif);font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.search-ask-row kbd{font-family:var(--sans);font-size:11px;color:var(--ink-faint);border:1px solid var(--hairline);border-radius:5px;padding:1px 6px}.search-empty-sub{display:block;margin-top:10px;font-family:var(--sans);font-style:normal;font-size:12px;color:var(--ink-faint)}.settings-page-content,.settings-page-loading{min-height:min(680px,calc(100vh - 180px))}.settings-section{border:1px solid var(--hairline);border-radius:10px;padding:20px 22px;margin-top:8px;max-width:760px}.settings-section-title{font-size:12px;font-weight:600;text-transform:uppercase;letter-spacing:.06em;color:var(--ink-faint);margin:0 0 14px}.settings-note.settings-note-flush{margin-top:0;padding-top:0;border-top:0}.settings-billing-loading{color:var(--ink-soft);font-size:13px}.settings-billing,.settings-billing-connect{display:flex;flex-direction:column;gap:14px}.settings-provider-grid{display:grid;gap:14px}.settings-provider-card{display:flex;flex-direction:column;gap:14px;padding:16px;border:1px solid var(--hairline);border-radius:8px;background:var(--bg-subtle)}.settings-provider-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}.settings-provider-heading h3{margin:0;color:var(--ink);font-size:16px;font-weight:650}.settings-provider-heading p{margin:3px 0 0;color:var(--ink-soft);font-size:12px}.settings-usage-row{display:flex;flex-direction:column;gap:9px;padding:13px;border:1px solid var(--hairline);border-radius:7px;background:var(--bg-elevated)}.settings-usage-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}.settings-usage-heading strong{flex-shrink:0;color:var(--ink);font-size:14px}.settings-usage-track{height:7px;overflow:hidden;border-radius:999px;background:var(--hairline)}.settings-usage-track>span{display:block;height:100%;border-radius:inherit;background:var(--accent)}.settings-limit-note{margin:0;color:var(--danger, #b42318);font-size:12px;line-height:1.45}.settings-byok-controls{display:flex;flex-direction:column;gap:10px;padding-top:2px}.settings-byok-controls form{display:flex;flex-direction:column;gap:10px}.settings-byok-controls input{width:100%;border:1px solid var(--hairline-strong);border-radius:7px;padding:10px 12px;color:var(--ink);background:var(--bg-elevated);font:inherit}.settings-fallback-control{display:flex;align-items:flex-start;gap:11px;cursor:pointer}.settings-fallback-control>span{display:flex;flex-direction:column;gap:4px}.settings-fallback-control strong{color:var(--ink);font-size:12px;line-height:1.4}.settings-fallback-control small{color:var(--ink-soft);font-size:11px;line-height:1.45}.settings-plan-row{display:flex;justify-content:space-between;align-items:flex-start;gap:20px}.settings-connected-badge{border-radius:999px;padding:4px 9px;color:var(--accent-text);background:var(--accent-soft);font-size:11px;font-weight:600}.settings-billing-help{color:var(--ink-soft);font-size:11px;margin:0;line-height:1.5}.settings-billing-actions{display:flex;flex-wrap:wrap;gap:8px}.settings-billing-actions .button{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:34px;padding:7px 11px;border:1px solid var(--hairline-strong);border-radius:7px;color:var(--ink);background:var(--bg-elevated);font-size:12px;font-weight:600;text-decoration:none}.settings-billing-actions .button:hover{background:var(--bg-subtle)}.settings-billing-actions .button-primary{border-color:var(--accent);color:var(--accent-text);background:var(--accent-soft)}.settings-billing-actions .button:disabled{cursor:not-allowed;opacity:.55}.settings-billing-actions svg{width:12px;height:12px}.settings-token-label{color:var(--ink);font-size:12px;font-weight:600;margin-bottom:-8px}.settings-billing-connect input{width:100%;border:1px solid var(--hairline-strong);border-radius:7px;padding:10px 12px;color:var(--ink);background:var(--bg-elevated);font:inherit}.settings-billing-select{width:100%;min-height:42px;padding:9px 34px 9px 12px;border:1px solid var(--border);border-radius:7px;background:var(--bg-elevated);color:var(--ink);font:inherit}.settings-billing-select:focus{outline:2px solid var(--accent);outline-offset:1px}.settings-billing-select:disabled{cursor:wait;opacity:.7}.settings-billing-connect input:focus{border-color:var(--accent);outline:2px solid var(--accent-soft)}.settings-token-error{color:var(--danger, #b42318);font-size:12px}.theme-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.theme-option{display:flex;align-items:flex-start;gap:10px;min-width:0;padding:12px;border:1px solid var(--hairline);border-radius:7px;background:var(--bg-elevated);color:var(--ink-soft);text-align:left;transition:background .15s,border-color .15s,color .15s}.theme-option:hover{border-color:var(--hairline-strong);background:var(--bg-subtle);color:var(--ink)}.theme-option.is-selected{border-color:var(--accent);background:var(--accent-soft);color:var(--accent-text)}.theme-option:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.theme-option>svg{width:16px;height:16px;margin-top:1px;flex-shrink:0}.theme-option-copy{display:flex;flex-direction:column;gap:2px;min-width:0}.theme-option-label{color:var(--ink);font-size:13px;font-weight:600}.theme-option-desc{color:var(--ink-soft);font-size:11px;line-height:1.35}.theme-option.is-selected .theme-option-label,.theme-option.is-selected .theme-option-desc{color:var(--accent-text)}.settings-row{display:flex;align-items:flex-start;justify-content:space-between;gap:24px}.settings-row-text{display:flex;flex-direction:column;gap:4px;cursor:pointer}.settings-row-label{font-size:15px;font-weight:500;color:var(--ink)}.settings-row-desc{font-size:13px;color:var(--ink-soft);line-height:1.5;max-width:460px}.settings-note{margin-top:16px;padding-top:16px;border-top:1px solid var(--hairline);font-size:13px;color:var(--ink-soft);line-height:1.5}.settings-note-action{margin-top:10px}.research-section-heading{display:flex;align-items:baseline;justify-content:space-between;gap:16px}.research-section-heading .settings-section-title{display:inline-flex;align-items:center;gap:8px}.research-follow-count{border-radius:999px;padding:1px 7px;color:var(--ink-soft);background:var(--bg-subtle);font-size:11px;letter-spacing:0}.research-feed-link{display:inline-flex;align-items:center;gap:5px;flex-shrink:0;color:var(--accent-text);font-size:13px;font-weight:600;text-decoration:none}.research-feed-link:hover{text-decoration:underline;text-underline-offset:2px}.research-feed-link svg{width:14px;height:14px}.research-section-intro{margin:-6px 0 6px}.research-follow-group{margin-top:16px}.research-follow-group-title{display:flex;align-items:center;gap:6px;margin:0 0 6px;color:var(--ink-soft);font-size:12px;font-weight:600}.research-follow-group-title svg{width:14px;height:14px}.research-follow-list{margin:0;padding:0;list-style:none;border:1px solid var(--hairline);border-radius:8px;background:var(--bg-elevated)}.research-follow-row{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:52px;padding:8px 8px 8px 14px}.research-follow-row+.research-follow-row{border-top:1px solid var(--hairline)}.research-follow-text{display:flex;flex-direction:column;gap:1px;min-width:0}.research-follow-text a{overflow:hidden;color:var(--ink);font-size:14px;font-weight:500;text-overflow:ellipsis;white-space:nowrap;text-decoration:none}.research-follow-text a:hover{color:var(--accent-text);text-decoration:underline;text-underline-offset:2px}.research-follow-text span{color:var(--ink-faint);font-size:12px}.research-follow-row.is-unfollowed .research-follow-text a{color:var(--ink-faint);text-decoration:line-through}.research-follow-action{flex-shrink:0;min-height:30px;padding:5px 10px;border:1px solid transparent;border-radius:6px;color:var(--ink-soft);background:transparent;font-size:12px;font-weight:600}.research-follow-action:hover{border-color:var(--hairline-strong);color:var(--danger, #b42318);background:var(--bg-subtle)}.research-follow-action.is-refollow{border-color:var(--accent);color:var(--accent-text);background:var(--accent-soft)}.research-follow-action:disabled{cursor:wait;opacity:.55}.research-follow-action:focus-visible{outline:2px solid var(--accent);outline-offset:1px}.research-follow-empty{margin-top:14px;padding:18px;border:1px dashed var(--hairline-strong);border-radius:8px;color:var(--ink-soft);font-size:13px;line-height:1.5}.research-follow-empty p{margin:0}.research-follow-empty strong{color:var(--ink);font-weight:600}.research-follow-browse{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}.research-follow-browse a{display:inline-flex;align-items:center;gap:6px;padding:6px 10px;border:1px solid var(--hairline-strong);border-radius:7px;color:var(--ink);background:var(--bg-elevated);font-size:12px;font-weight:600;text-decoration:none}.research-follow-browse a:hover{background:var(--bg-subtle)}.research-follow-browse svg{width:13px;height:13px}.research-email-destination{display:flex;flex-wrap:wrap;align-items:center;gap:8px 10px;margin-top:16px;padding:10px 12px;border:1px solid var(--hairline);border-radius:8px;color:var(--ink-soft);background:var(--bg-subtle);font-size:13px}.research-email-destination>svg{width:15px;height:15px;flex-shrink:0}.research-email-destination strong{color:var(--ink);font-weight:600;overflow-wrap:anywhere}.research-email-destination>span{flex:1 1 220px}.research-email-destination a{color:var(--accent-text);font-size:12px;font-weight:600;text-decoration:none}.research-email-destination a:hover{text-decoration:underline;text-underline-offset:2px}.research-email-status{margin:10px 0 0;color:var(--ink-soft);font-size:12px;line-height:1.5}.research-email-status.is-warning{color:var(--danger, #b42318)}.closed-eval-tooltip-link,.external-eval-tooltip-link{font-weight:600;text-decoration:underline;text-underline-offset:2px}@media (max-width: 640px){.theme-options{grid-template-columns:1fr}}.research-follow{display:flex;flex-wrap:wrap;align-items:center;gap:6px 12px;margin:14px 0 18px}.research-follow-btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-width:112px;min-height:36px;padding:7px 16px 7px 13px;border:1px solid var(--accent);border-radius:999px;color:var(--bg);background:var(--accent);font-family:var(--sans);font-size:14px;font-weight:600;line-height:1;text-decoration:none;cursor:pointer;box-shadow:0 1px 2px #00000014;transition:background .15s,border-color .15s,color .15s,filter .15s}.research-follow-btn:hover{filter:brightness(1.1)}.research-follow-btn:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.research-follow-btn:disabled{cursor:wait;opacity:.6}.research-follow-btn svg{width:16px;height:16px;flex-shrink:0}.research-follow-btn.is-following{border-color:var(--hairline-strong);color:var(--ink);background:var(--bg-elevated);box-shadow:none}.research-follow-btn.is-following svg{color:var(--accent-text)}.research-follow-label-hover{display:none}@media (hover: hover){.research-follow-btn.is-following:hover{filter:none;border-color:var(--danger, #b42318);color:var(--danger, #b42318)}.research-follow-btn.is-following:hover svg,.research-follow-btn.is-following:hover .research-follow-label{display:none}.research-follow-btn.is-following:hover .research-follow-label-hover{display:inline}}.research-follow-hint{color:var(--ink-soft);font-family:var(--sans);font-size:13px;line-height:1.4}.research-follow-hint a{color:var(--accent-text);font-weight:600;text-decoration:none}.research-follow-hint a:hover{text-decoration:underline;text-underline-offset:2px}.research-follow-hint.is-error{color:var(--danger, #b42318)}.reader-route-shell{height:100dvh;min-height:0;display:flex;flex-direction:column;overflow:hidden}.reader-route-shell>.app-header{position:static;flex:0 0 auto}.reader-route-content{min-height:0;flex:1}.paper-reader-shell{height:100%;min-height:0;display:flex;flex-direction:column;background:var(--bg);color:var(--ink);overflow:hidden}.reader-workspace{position:relative;min-height:0;flex:1;display:flex;overflow:hidden}.reader-paper-pane,.reader-assistant-pane{min-width:0;min-height:0;display:flex;flex-direction:column;overflow:hidden}.reader-paper-pane{background:#fff;transition:width .24s cubic-bezier(.22,1,.36,1)}.reader-assistant-pane{visibility:visible;background:var(--bg);opacity:1;transform:translate(0);transition:width .24s cubic-bezier(.22,1,.36,1),opacity .18s ease,transform .24s cubic-bezier(.22,1,.36,1),visibility 0s}.reader-assistant-pane.is-collapsed{visibility:hidden;opacity:0;transform:translate(28px);pointer-events:none;transition:width .24s cubic-bezier(.22,1,.36,1),opacity .14s ease,transform .24s cubic-bezier(.22,1,.36,1),visibility 0s linear .24s}.reader-workspace.is-resizing{cursor:col-resize;-webkit-user-select:none;-moz-user-select:none;user-select:none}.reader-workspace.is-resizing .reader-paper-pane,.reader-workspace.is-resizing .reader-assistant-pane{transition:none}.reader-resize-handle{position:relative;z-index:5;width:1px;flex:0 0 1px;cursor:col-resize;background:var(--hairline-strong);touch-action:none;outline:none}.reader-resize-handle:before{content:"";position:absolute;top:0;right:-8px;bottom:0;left:0}.reader-resize-handle:focus-visible{box-shadow:0 0 0 2px var(--accent)}.reader-collapse-assistant{position:absolute;z-index:8;top:0;right:16px;height:48px;display:flex;align-items:center;border:0;padding:0;background:transparent;color:var(--ink);font-size:12px;line-height:1.5}.reader-workspace.is-assistant-collapsed .pdf-toolbar{padding-right:96px}.reader-tabs{height:40px;flex:0 0 auto;display:flex;border-bottom:1px solid var(--border);background:var(--surface)}.reader-tabs button{flex:1;border:0;border-bottom:2px solid transparent;background:transparent;color:var(--ink-muted)}.reader-tabs button[aria-selected=true]{border-bottom-color:var(--accent);color:var(--ink);font-weight:600}.reader-tab-pending{display:inline-block;width:7px;height:7px;margin-left:6px;border-radius:50%;background:var(--accent);vertical-align:1px}@media (forced-colors: active){.reader-tab-pending{border:1px solid ButtonText}}.reader-workspace .is-hidden{position:absolute!important;top:0;right:0;bottom:0;left:0;width:100%!important;visibility:hidden;pointer-events:none}.reader-workspace.is-tabs>.reader-paper-pane,.reader-workspace.is-tabs>.reader-assistant-pane{width:100%}.reader-status{min-height:100dvh;display:grid;place-content:center;gap:12px;text-align:center}.reader-chat-unavailable{height:100%;display:grid;place-content:center;color:var(--ink-muted);padding:24px;text-align:center}.pdf-viewer{min-height:0;flex:1;display:flex;flex-direction:column}.pdf-toolbar{position:relative;min-height:48px;flex:0 0 auto;display:flex;align-items:center;gap:16px;padding:7px 10px 7px var(--reader-title-inset, 32px);border-bottom:1px solid var(--hairline);background:var(--bg);color:var(--ink);font-size:12px}.pdf-toolbar-paper{min-width:0;flex:1;display:flex;align-items:center;gap:8px;overflow:hidden}.pdf-toolbar-back{flex:0 0 auto;min-height:30px;border:1px solid var(--hairline);border-radius:5px;padding:4px 8px;background:var(--bg-elevated);color:var(--ink);line-height:20px;text-decoration:none;white-space:nowrap}.pdf-toolbar-back:hover{border-color:var(--hairline-strong);background:var(--bg-subtle);color:var(--ink);text-decoration:none}.pdf-toolbar-title{min-width:0;overflow:hidden;color:var(--ink);font-size:14px;font-weight:600;text-overflow:ellipsis;white-space:nowrap}.pdf-toolbar-title:hover{color:var(--accent-text);text-decoration:underline;text-underline-offset:3px}.pdf-toolbar-resource{flex:0 0 auto;display:inline-flex;align-items:center;gap:4px;color:var(--ink-soft);font-size:11px;white-space:nowrap}.pdf-toolbar-resource:before{content:"|";margin-right:4px;color:var(--hairline-strong)}.pdf-toolbar-resource:hover{color:var(--ink);text-decoration:none}.pdf-toolbar-controls{flex:0 0 auto;display:flex;align-items:center;gap:10px}.pdf-toolbar-group{display:flex;align-items:center;gap:5px}.pdf-toolbar button,.pdf-toolbar-controls a{min-height:30px;border:1px solid var(--hairline);border-radius:5px;padding:4px 8px;background:var(--bg-elevated);color:var(--ink);text-decoration:none}.pdf-toolbar button:hover:not(:disabled),.pdf-toolbar-controls a:hover{border-color:var(--hairline-strong);background:var(--bg-subtle)}.pdf-toolbar button:focus-visible,.pdf-toolbar a:focus-visible,.pdf-search-controls input:focus-visible{outline:2px solid var(--accent);outline-offset:1px}.pdf-toolbar button:disabled{opacity:.45}.pdf-page-form{display:flex;align-items:center;gap:4px}.pdf-page-form input{width:32px;height:30px;-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield;border:1px solid var(--hairline);border-radius:5px;padding:0 3px;background:var(--bg-elevated);color:var(--ink);text-align:center}.pdf-page-form input::-webkit-inner-spin-button,.pdf-page-form input::-webkit-outer-spin-button{margin:0;-webkit-appearance:none;-moz-appearance:none;appearance:none}.pdf-zoom-value{width:52px;height:30px;border:1px solid transparent;border-radius:5px;padding:0 3px;background:transparent;color:var(--ink);text-align:center;font:inherit;font-variant-numeric:tabular-nums}.pdf-zoom-value:hover,.pdf-zoom-value:focus{border-color:var(--hairline);background:var(--bg-elevated)}.pdf-search-controls{position:absolute;z-index:10;right:8px;top:calc(100% + 5px);display:flex;align-items:center;gap:5px;padding:7px;border:1px solid var(--hairline);border-radius:6px;background:var(--bg-elevated);box-shadow:0 5px 20px #0003}.pdf-search-controls input{width:min(260px,45vw);min-height:30px;border:1px solid var(--hairline);border-radius:4px;padding:4px 7px;background:var(--bg);color:var(--ink)}.pdf-search-controls span{min-width:70px;color:var(--ink-soft);text-align:center}.pdf-search-controls button{display:inline-flex;align-items:center;justify-content:center}.pdf-scroll-frame{position:relative;min-height:0;flex:1;display:flex;flex-direction:column}.pdf-scroll{min-height:0;flex:1;overflow:auto;overscroll-behavior:contain;background:#fff;scrollbar-color:var(--ink-faint) var(--bg-subtle);scrollbar-gutter:stable}.pdf-scroll::-webkit-scrollbar{width:12px;height:12px}.pdf-scroll::-webkit-scrollbar-track{background:var(--bg-subtle)}.pdf-scroll::-webkit-scrollbar-thumb{border:3px solid var(--bg-subtle);border-radius:999px;background:var(--ink-faint)}.pdf-pages{display:flex;width:-moz-max-content;width:max-content;min-width:100%;flex-direction:column;align-items:center;gap:8px;zoom:var(--pdf-live-scale, 1)}.pdf-page{position:relative;background:#fff}.pdf-page-layer{zoom:var(--pdf-layer-scale, 1)}.pdf-page-layer.is-pending{position:absolute;top:0;left:0;visibility:hidden;pointer-events:none}.pdf-page .react-pdf__Page{margin:0}.pdf-page .textLayer ::-moz-selection{background:#2d7dff4d;color:transparent}.pdf-page .textLayer ::selection{background:#2d7dff4d;color:transparent}.pdf-search-highlight{border-radius:1px;background:#2d7dff57;color:inherit;box-shadow:0 0 0 1px #2d7dff2e}.pdf-search-highlight.is-active{background:#1c68ef85;box-shadow:0 0 0 1px #1c68ef57}.pdf-outline{position:absolute;z-index:9;top:0;right:14px;bottom:0;display:flex;align-items:center;pointer-events:none}.pdf-outline-rail{display:flex;flex-direction:column;align-items:flex-end;justify-content:center;gap:5px;max-height:100%;overflow:hidden;border:0;padding:12px 6px 12px 10px;background:transparent;cursor:pointer;pointer-events:auto}.pdf-outline-rail:focus-visible{outline:2px solid var(--accent);outline-offset:-2px;border-radius:6px}.pdf-outline-tick{display:block;width:18px;height:2px;border-radius:1px;background:var(--ink-faint);transition:background .12s ease,width .12s ease}.pdf-outline-tick.level-1{width:10px}.pdf-outline-tick.is-active{width:22px;background:var(--accent)}.pdf-outline-panel{position:absolute;right:100%;top:50%;width:min(320px,60vw);max-height:min(70vh,100%);overflow-y:auto;margin-right:-6px;padding:10px 6px;border:1px solid var(--hairline);border-radius:12px;background:var(--bg-elevated);color:var(--ink);box-shadow:0 8px 28px #0003;font-size:14px;line-height:1.35;opacity:0;visibility:hidden;transform:translate(6px,-50%);transition:opacity .12s ease,transform .12s ease,visibility 0s linear .12s;pointer-events:none}.pdf-outline:hover .pdf-outline-panel,.pdf-outline:focus-within .pdf-outline-panel,.pdf-outline.is-pinned .pdf-outline-panel{opacity:1;visibility:visible;transform:translateY(-50%);transition-delay:0s;pointer-events:auto}.pdf-outline-panel ol{margin:0;padding:0;list-style:none}.pdf-outline-panel li.level-1 a{padding-left:32px;font-size:13px;color:var(--ink-soft)}.pdf-outline-panel a{display:block;padding:7px 16px;border-radius:6px;color:var(--ink-muted);text-decoration:none;overflow-wrap:anywhere}.pdf-outline-panel a:hover{background:var(--bg-subtle);color:var(--ink);text-decoration:none}.pdf-outline-panel a:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}.pdf-outline-panel a[aria-current=location]{color:var(--accent-text);font-weight:600}@media (hover: none){.pdf-outline:hover:not(.is-pinned) .pdf-outline-panel{opacity:0;visibility:hidden;pointer-events:none}}@media (forced-colors: active){.pdf-outline-tick{background:ButtonText}.pdf-outline-tick.is-active{background:Highlight}}@media (prefers-reduced-motion: reduce){.pdf-outline-panel,.pdf-outline-tick{transition:none}}.pdf-loading,.pdf-error{min-height:50vh;display:grid;place-content:center;color:var(--ink);text-align:center;padding:24px}.pdf-error a,.pdf-error button{color:inherit}.chat-page--reader .chat-main{min-width:0}.chat-page--reader .chat-topbar{min-height:48px;padding:7px 112px 7px 20px}.chat-page--reader .chat-empty-inner{width:min(100%,560px);padding-inline:16px}.chat-page--reader .chat-examples{width:min(100%,300px);margin-inline:auto;flex-direction:column;align-items:stretch}.chat-page--reader .chat-example{width:100%}.chat-reader-action{border:0;background:transparent;color:var(--accent-text);text-decoration:none;font-size:12px;white-space:nowrap}@media (max-width: 880px){.pdf-toolbar{padding-left:16px}}@media (max-width: 640px){.pdf-zoom-value{display:none}.pdf-toolbar{gap:8px;overflow-x:auto;padding-left:14px}.pdf-toolbar-paper{min-width:150px}.pdf-toolbar-group{gap:3px}.pdf-toolbar button,.pdf-toolbar a{padding-inline:6px}}@media (forced-colors: active){.reader-resize-handle,.pdf-toolbar button,.pdf-toolbar a{border:1px solid ButtonText}}@media (prefers-reduced-motion: reduce){.paper-reader-shell *{scroll-behavior:auto!important}.reader-paper-pane,.reader-assistant-pane{transition-duration:.01ms!important}}.pdf-page .linkAnnotation>.pdf-paper-preview-link{position:absolute;top:0;right:0;bottom:0;left:0;display:block;width:100%;height:100%}.pdf-paper-preview-actions{display:flex;justify-content:space-between;gap:12px;padding:10px 14px;border-top:1px solid var(--hairline);font-size:12px}.pdf-paper-preview-actions a,.pdf-paper-preview-actions button{color:var(--accent)}.pdf-paper-preview-actions button{border:0;background:transparent;cursor:pointer;padding:0;font:inherit}.pdf-paper-preview-actions a:focus-visible,.pdf-paper-preview-actions button:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.saved-area-section{margin-top:28px}.saved-area-section:first-of-type{margin-top:4px}.saved-area-heading{font-family:var(--serif);font-size:22px;font-weight:500;color:var(--ink);margin:0 0 6px;padding-bottom:6px;border-bottom:1px solid var(--hairline-strong)}.saved-task-block{margin-top:16px}.saved-task-row{display:flex;align-items:center;gap:10px;margin-bottom:6px}.saved-task-count{font-size:12px;color:var(--ink-faint)}.saved-signin-panel{display:flex;justify-content:center;padding:80px 0}.saved-bucket-migration{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:24px;padding:14px 16px;border:1px solid var(--info-border);border-radius:6px;background:var(--info-bg);color:var(--info-text)}.saved-bucket-migration p{max-width:760px;font-size:13px;line-height:1.5}.saved-bucket-migration .hf-signin-btn{flex-shrink:0;max-width:100%;height:auto;min-height:36px;padding:8px 12px;white-space:normal;overflow-wrap:anywhere}@media (max-width: 700px){.saved-bucket-migration{align-items:flex-start;flex-direction:column}}.action-btn.is-saved{background:var(--ink);color:var(--bg);border-color:var(--ink)}.action-btn.is-saved:hover{background:color-mix(in oklch,var(--ink) 88%,var(--accent))}.ask-home-new{max-width:640px;margin:0 auto 6px;padding-left:9px;color:var(--ink-faint);font-size:14px;font-weight:700}.ask-home{position:relative;max-width:640px;margin:0 auto 36px;background:var(--bg-elevated);border:1px solid var(--hairline);border-radius:14px;box-shadow:0 1px 2px #1e1c140a,0 12px 34px -18px #1e1c1447;padding:8px}.ask-home-textarea-wrap{position:relative}.ask-home textarea{position:relative;z-index:1;width:100%;border:0;outline:0;resize:none;background:transparent;font-family:var(--serif);font-size:17px;line-height:1.45;color:transparent;caret-color:var(--ink);padding:12px 12px 4px}.ask-home textarea::-moz-placeholder{color:var(--ink-faint)}.ask-home textarea::placeholder{color:var(--ink-faint)}.ask-home-foot{display:flex;align-items:center;justify-content:space-between;padding:4px 6px 4px 12px}.ask-home-provider-tools{display:flex;align-items:center;gap:10px;flex-wrap:wrap}@media (max-width: 880px){.layout-with-sidebar>.sidebar,.layout-with-sidebar>.feed-main{display:contents}.feed-chat{order:1}.sidebar-section-top-domains{order:2}.sidebar-section-trending-domains{order:3}.feed-content{order:4}}.chat-page{position:relative;display:flex;overflow:hidden;background:var(--bg)}.chat-main{flex:1;display:flex;flex-direction:column;min-width:0;background:var(--bg)}.chat-topbar{display:flex;align-items:center;gap:14px;padding:10px 24px;border-bottom:1px solid var(--hairline)}.chat-topbar-title{flex:1;min-width:0;font-family:var(--serif);font-size:14px;color:var(--ink-soft);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.chat-empty{flex:1;display:flex;align-items:flex-start;justify-content:center;padding:40px 24px;overflow-y:auto}.chat-empty-inner{max-width:680px;width:100%;margin-block:auto;text-align:center}.chat-empty-eyebrow{font-family:var(--mono);font-size:11px;letter-spacing:.16em;text-transform:uppercase;color:var(--ink-faint);margin-bottom:18px}.chat-empty-title{font-family:var(--serif);font-weight:500;font-size:44px;line-height:1.05;letter-spacing:-.02em;margin-bottom:14px}.chat-empty-title em{font-style:italic;font-weight:400;color:var(--accent)}.chat-empty-sub{font-family:var(--serif);font-size:16px;line-height:1.5;color:var(--ink-soft);max-width:520px;margin:0 auto 26px;text-wrap:pretty}.chat-staging-access-note{max-width:560px;margin:-12px auto 18px;color:var(--ink-soft);font-size:13px;line-height:1.45}.chat-staging-badge{flex:none;border:1px solid color-mix(in oklch,var(--accent) 36%,var(--hairline));border-radius:999px;padding:3px 7px;color:var(--accent-text);background:color-mix(in oklch,var(--accent) 7%,var(--bg-elevated));font-family:var(--mono);font-size:10px;font-weight:700;letter-spacing:.08em;line-height:1;text-transform:uppercase}.chat-examples{display:flex;flex-wrap:wrap;gap:10px;justify-content:center;margin-top:24px}.chat-example{font-family:var(--serif);font-size:14px;color:var(--ink-soft);background:var(--bg-elevated);border:1px solid var(--hairline);border-radius:999px;padding:8px 16px;transition:border-color .15s,color .15s}.chat-example:hover{border-color:var(--hairline-strong);color:var(--ink)}.chat-paper-inline-highlight{color:var(--accent-text);text-decoration-line:underline;text-decoration-color:color-mix(in oklch,var(--accent) 40%,transparent);text-decoration-thickness:1px;text-underline-offset:2px}.chat-paper-inline-highlight.is-unavailable{color:var(--negative-text);text-decoration-color:var(--negative-border)}@media (max-width: 900px){.chat-empty-title{font-size:34px}}@media (forced-colors: active){.chat-paper-inline-highlight{outline:1px solid CanvasText}}@media (max-width: 560px){.chat-topbar{padding-inline:14px}}.chat-credits-notice{position:relative;display:flex;align-items:center;justify-content:center;min-height:28px;padding:5px 52px 6px;border-bottom:1px solid var(--hairline);background:var(--bg-subtle);color:var(--ink-soft);font-size:12px;line-height:16px;text-align:center}.chat-credits-notice-close{position:absolute;top:50%;right:20px;display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;padding:0;border:0;border-radius:4px;background:transparent;color:var(--ink-soft);font-size:16px;line-height:1;cursor:pointer;transform:translateY(-50%)}.chat-credits-notice-close:hover{background:var(--hairline);color:var(--ink)}.chat-credits-notice-close:focus-visible{outline:2px solid var(--accent-text);outline-offset:1px}.chat-sidebar{position:relative;width:var(--chat-sidebar-width, var(--app-leading-column-width));flex:none;background:var(--bg-subtle);border-right:1px solid var(--hairline);display:flex;flex-direction:column;transition:margin-left .2s ease}.chat-sidebar-resize-handle{position:absolute;top:0;right:-4px;bottom:0;z-index:2;width:8px;cursor:col-resize;touch-action:none}.chat-sidebar-resize-handle:after{content:"";position:absolute;top:0;right:3px;bottom:0;left:3px;background:var(--hairline-strong);opacity:0;transition:opacity .15s}.chat-sidebar-resize-handle:hover:after,.chat-sidebar-resize-handle:focus-visible:after{opacity:1}.chat-sidebar-resize-handle:focus-visible{outline:2px solid var(--link);outline-offset:-3px}.chat-sidebar-closed{margin-left:calc(-1 * (var(--chat-sidebar-width, var(--app-leading-column-width)) + 1px))}.chat-sidebar-top{display:flex;align-items:center;gap:8px;padding:14px 12px 8px}.chat-sidebar-top .icon-btn{flex:none}.chat-new-chat{flex:1;display:flex;align-items:center;justify-content:center;gap:8px;padding:9px;background:var(--bg-elevated);border:1px solid var(--hairline);border-radius:8px;font-size:13px;font-weight:500;color:var(--ink);transition:border-color .15s}.chat-new-chat:hover{border-color:var(--hairline-strong)}.chat-sessions{flex:1;overflow-y:auto;padding:4px 8px 20px}.chat-sessions-empty{padding:18px 10px;font-family:var(--serif);font-style:italic;font-size:13px;color:var(--ink-faint)}.chat-session-group{margin-top:14px}.chat-session-group-label{font-family:var(--mono);font-size:10px;letter-spacing:.12em;text-transform:uppercase;color:var(--ink-faint);padding:6px 10px}.chat-session{display:flex;align-items:center;gap:6px;width:100%;text-align:left;padding:7px 10px;border-radius:7px;font-size:13px;color:var(--ink-soft);transition:background .12s,color .12s}.chat-session:hover{background:var(--hairline);color:var(--ink)}.chat-session-active{background:var(--hairline);color:var(--ink);font-weight:500}.chat-session-title{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.chat-session-delete{display:inline-flex;align-items:center;color:var(--ink-faint);padding:2px;border-radius:4px;flex:none}.chat-session-delete:hover{color:var(--negative-text)}.chat-session-menu{display:inline-flex;border:0;background:transparent;color:inherit;cursor:pointer;padding:0 3px;font-size:17px;line-height:1}@media (hover: hover) and (pointer: fine){.chat-session-delete,.chat-session-menu{display:none}.chat-session:hover .chat-session-delete,.chat-session:hover .chat-session-menu,.chat-session:focus-within .chat-session-delete,.chat-session:focus-within .chat-session-menu{display:inline-flex}}.chat-session-title-input{min-width:0;flex:1;border:1px solid var(--border);border-radius:4px;background:var(--surface);color:var(--ink);font:inherit;padding:2px 4px}.chat-session-context-menu{position:fixed;z-index:1000;width:150px;padding:4px;border:1px solid var(--border);border-radius:7px;background:var(--surface);box-shadow:0 8px 24px #00000029}.chat-session-context-menu button{width:100%;border:0;border-radius:4px;background:transparent;color:var(--ink);padding:7px 9px;text-align:left;cursor:pointer}.chat-session-context-menu button:hover,.chat-session-context-menu button:focus{background:var(--hairline)}.chat-session-loading,.chat-session-load-error{flex:1;display:flex;align-items:center;justify-content:center;gap:10px;color:var(--ink-soft);font-family:var(--serif);font-size:14px}.chat-session-load-error{flex-direction:column}.chat-session-load-error p{margin:0}.chat-session-load-error button{border:1px solid var(--border);border-radius:5px;padding:7px 12px;background:var(--surface);color:var(--ink);cursor:pointer}.chat-session-load-error button:hover{background:var(--bg-subtle)}@media (max-width: 900px){.chat-sidebar{position:absolute;top:0;bottom:0;left:0;z-index:60;box-shadow:0 0 40px #0003;width:var(--app-leading-column-width)}.chat-sidebar-resize-handle{display:none}.chat-sidebar-closed{margin-left:0;transform:translate(-101%);box-shadow:none}}.chat-share-button{flex:none;display:inline-flex;align-items:center;gap:7px;min-height:34px;padding:6px 11px;border:1px solid var(--hairline-strong);border-radius:8px;background:var(--bg-elevated);color:var(--ink);font-size:13px;font-weight:600}.chat-share-button:hover:not(:disabled){background:var(--bg-subtle)}.chat-share-button:disabled{cursor:not-allowed;opacity:.55}.chat-share-button:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.chat-share-button svg{width:15px;height:15px}.chat-share-toast{position:fixed;top:18px;left:50%;width:min(420px,calc(100vw - 32px));transform:translate(-50%)}.chat-share-dialog-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:110;display:grid;place-items:center;padding:20px;background:#0000006b}.chat-share-dialog{width:min(520px,100%);padding:22px;border:1px solid var(--hairline-strong);border-radius:12px;background:var(--bg-elevated);box-shadow:0 18px 60px #00000038}.chat-share-dialog h2{margin:0 0 8px;font-family:var(--serif);font-size:21px}.chat-share-dialog p{margin:0 0 14px;color:var(--ink-soft)}.chat-share-dialog input{width:100%;padding:9px 10px;border:1px solid var(--hairline-strong);border-radius:7px;background:var(--bg);color:var(--ink);font-family:var(--mono);font-size:12px}.chat-share-dialog input:focus{outline:2px solid var(--accent);outline-offset:2px}.chat-share-dialog button{display:block;margin:16px 0 0 auto;padding:7px 14px;border-radius:7px;background:var(--accent);color:#fff;font-weight:600}@media (max-width: 560px){.chat-share-button{width:34px;padding:6px;justify-content:center}.chat-share-button span{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}}.chat-capacity-dialog-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:120;display:grid;place-items:center;padding:20px;background:#0000007a}.chat-capacity-dialog{width:min(500px,100%);padding:24px;border:1px solid var(--hairline-strong);border-radius:12px;background:var(--bg-elevated);box-shadow:0 18px 60px #0000003d}.chat-capacity-dialog h2{margin:0 0 9px;font-family:var(--serif);font-size:22px}.chat-capacity-dialog p{margin:0;color:var(--ink-soft);line-height:1.5}.chat-capacity-countdown{min-height:24px;padding-top:12px;font-size:13px}.chat-capacity-dialog-actions{display:flex;justify-content:flex-end;gap:9px;margin-top:20px}.chat-capacity-dialog-actions button{padding:8px 14px;border-radius:7px;font-weight:600}.chat-capacity-cancel{border:1px solid var(--hairline-strong);background:var(--bg);color:var(--ink)}.chat-capacity-retry{background:var(--accent);color:#fff}.chat-capacity-retry:disabled{cursor:not-allowed;opacity:.5}.chat-capacity-dialog-actions button:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.chat-paused-banner{margin-bottom:.75rem;border:1px solid var(--border);border-radius:.65rem;background:var(--muted);padding:.7rem .85rem;color:var(--muted-foreground);font-size:.875rem;line-height:1.4}.chat-composer-error{margin-bottom:.75rem;border:1px solid color-mix(in oklch,#c33 35%,var(--hairline));border-radius:.65rem;background:color-mix(in oklch,#c33 8%,var(--bg-elevated));padding:.7rem .85rem;color:var(--ink);font-size:.875rem;line-height:1.4}.chat-billing-notice{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px;margin:0 0 10px;padding:9px 11px;border:1px solid color-mix(in oklch,var(--accent) 24%,var(--hairline));border-radius:9px;color:var(--ink-soft);background:color-mix(in oklch,var(--accent) 5%,var(--bg-elevated));font-size:12px;line-height:1.4}.chat-billing-notice a{flex:none;color:var(--accent-text);font-weight:600;text-decoration:none}.chat-billing-notice a:hover{text-decoration:underline}.chat-billing-notice-actions{display:flex;align-items:center;gap:10px;flex:none}.chat-billing-notice-dismiss{display:inline-flex;align-items:center;justify-content:center;width:26px;height:26px;padding:0;border:0;border-radius:6px;color:var(--ink-soft);background:transparent;cursor:pointer}.chat-billing-notice-dismiss:hover{color:var(--ink);background:color-mix(in oklch,var(--ink) 7%,transparent)}.chat-billing-notice-dismiss:focus-visible{outline:2px solid var(--accent);outline-offset:1px}.ask-home>.chat-paper-picker{top:calc(100% + 6px);bottom:auto}.chat-model-picker{position:relative;display:inline-grid;max-width:190px;flex:0 0 auto}.chat-model-picker-sizer,.chat-model-select{min-width:0;max-width:190px;padding:3px 22px 3px 8px;font-family:var(--mono);font-size:11px}.chat-model-picker-sizer{visibility:hidden;overflow:hidden;white-space:nowrap}.chat-model-select{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;height:100%;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:0;border-radius:6px;background:var(--accent-soft);color:var(--accent-text);cursor:pointer}.chat-model-picker-chevron{position:absolute;top:50%;right:6px;width:10px;height:7px;transform:translateY(-50%);fill:none;stroke:var(--accent-text);stroke-linecap:round;stroke-linejoin:round;stroke-width:1.75;pointer-events:none}.chat-model-picker.is-disabled{opacity:.65}.chat-model-select:disabled{cursor:default}.chat-model-label{max-width:190px;border-radius:6px;background:var(--accent-soft);color:var(--accent-text);padding:3px 8px;font-family:var(--mono);font-size:11px}.chat-empty .chat-composer{text-align:left}.chat-composer-wrap{border-top:1px solid var(--hairline);background:var(--bg);padding:14px 28px 16px}.chat-composer-inner{max-width:820px;margin:0 auto}.chat-composer{position:relative;background:var(--bg-elevated);border:1px solid var(--hairline);border-radius:14px;box-shadow:0 1px 2px #1e1c140a,0 10px 30px -20px #1e1c144d;padding:6px}.chat-composer-textarea-wrap{position:relative}.chat-paper-highlight-layer{position:absolute;z-index:0;top:0;right:0;bottom:0;left:0;box-sizing:border-box;overflow:hidden;pointer-events:none;color:transparent}.chat-paper-highlight-layer>div{min-height:100%;white-space:pre-wrap;overflow-wrap:break-word;word-break:break-word;color:var(--ink)}.chat-paper-highlight-layer-composer{padding:12px 12px 4px;font-family:var(--serif);font-size:16px;line-height:1.45}.chat-paper-highlight-layer-editor{padding:9px 11px;font-family:var(--serif);font-size:16px;line-height:1.45}.chat-paper-highlight-layer-home{padding:12px 12px 4px;font-family:var(--serif);font-size:17px;line-height:1.45}.chat-paper-picker{position:absolute;z-index:50;left:8px;bottom:calc(100% + 6px);width:min(560px,calc(100vw - 48px));max-height:384px;overflow-y:auto;border:1px solid var(--hairline-strong);border-radius:11px;background:var(--bg-elevated);box-shadow:0 16px 38px -16px #1e1c1473}.chat-slash-command{position:absolute;z-index:50;left:8px;bottom:calc(100% + 6px);display:flex;width:min(560px,calc(100vw - 48px));min-height:52px;align-items:center;gap:10px;padding:9px 12px;border:1px solid var(--hairline-strong);border-radius:11px;color:var(--ink);background:var(--bg-elevated);box-shadow:0 16px 38px -16px #1e1c1473;text-align:left}.chat-slash-command:hover{background:var(--accent-soft)}.chat-slash-command span{color:var(--ink-faint);font-size:12px}.chat-paper-picker-status{padding:10px 12px;color:var(--ink-faint);font-size:12px}.chat-paper-option{display:flex;width:100%;min-height:64px;flex-direction:column;justify-content:center;gap:3px;padding:9px 12px;border:0;border-top:1px solid var(--hairline);color:var(--ink);background:transparent;text-align:left}.chat-paper-option.is-active,.chat-paper-option:hover{background:var(--accent-soft)}.chat-paper-option-title{font-family:var(--serif);font-size:14px;line-height:1.25}.chat-paper-option-meta{color:var(--ink-faint);font-family:var(--mono);font-size:10.5px}.chat-paper-mention-message{padding:3px 12px;color:var(--negative-text);font-size:11.5px}.chat-inline-paper-mention{display:inline}.chat-inline-paper-mention svg{display:inline-block;margin-right:3px;color:var(--accent-text);vertical-align:-.12em}.chat-inline-paper-link{color:var(--accent-text);font-weight:600;text-decoration-line:underline;text-decoration-color:color-mix(in oklch,var(--accent) 40%,transparent);text-decoration-thickness:1px;text-underline-offset:2px}.chat-inline-paper-link:hover{text-decoration-color:var(--accent-text)}.chat-composer textarea{position:relative;z-index:1;width:100%;border:0;outline:0;resize:none;background:transparent;font-family:var(--serif);font-size:16px;line-height:1.45;color:transparent;caret-color:var(--ink);padding:12px 12px 4px}.chat-composer textarea::-moz-placeholder{color:var(--ink-faint)}.chat-composer textarea::placeholder{color:var(--ink-faint)}.chat-composer-row{display:flex;align-items:center;justify-content:space-between;padding:2px 6px 4px}.chat-composer-tools{display:flex;align-items:center;flex-wrap:wrap;gap:12px}.chat-web-search-toggle{display:inline-flex;align-items:center;gap:5px;min-height:30px;padding:4px 9px;border:1px solid var(--hairline);border-radius:8px;background:transparent;color:var(--ink-muted);font:inherit;font-size:12px;cursor:pointer}.chat-web-search-toggle:hover:not(:disabled){border-color:var(--hairline-strong);color:var(--ink)}.chat-web-search-toggle.is-enabled{border-color:var(--accent);background:var(--accent-soft);color:var(--accent-text)}.chat-web-search-toggle:disabled{cursor:default;opacity:.55}.chat-effort-picker{position:relative}.chat-effort-trigger{display:inline-flex;align-items:center;gap:4px;min-height:30px;padding:4px 8px 4px 10px;border:1px solid var(--hairline);border-radius:8px;background:transparent;color:var(--ink-muted);font:inherit;font-size:12px;cursor:pointer}.chat-effort-trigger:hover:not(:disabled){border-color:var(--hairline-strong);color:var(--ink)}.chat-effort-trigger:disabled{cursor:default;opacity:.55}.chat-effort-menu{position:absolute;z-index:40;left:0;bottom:calc(100% + 7px);width:220px;padding:6px;border:1px solid var(--hairline);border-radius:11px;background:var(--bg-elevated);box-shadow:0 14px 36px -14px #1e1c1473}.ask-home .chat-effort-menu{top:calc(100% + 7px);bottom:auto}.chat-effort-menu-label{padding:5px 10px 6px;color:var(--ink-faint);font-size:11px;font-weight:600;letter-spacing:.02em}.chat-effort-option{display:flex;align-items:center;justify-content:space-between;gap:10px;width:100%;padding:9px 10px;border:0;border-radius:7px;background:transparent;color:var(--ink);text-align:left;cursor:pointer}.chat-effort-option:hover,.chat-effort-option.is-selected{background:var(--bg-subtle)}.chat-effort-option-copy{display:flex;flex-direction:column;gap:2px}.chat-effort-option-copy strong{font-size:13px;font-weight:600}.chat-effort-option-copy small{color:var(--ink-faint);font-size:11px}.chat-composer-hint{font-size:11.5px;color:var(--ink-faint)}.chat-composer-foot{display:flex;align-items:center;justify-content:center;gap:6px;text-align:center;font-size:11.5px;color:var(--ink-faint);margin-top:9px}.chat-provider-attribution{white-space:nowrap}.chat-send{display:flex;align-items:center;justify-content:center;width:38px;height:38px;border-radius:10px;background:var(--hairline);color:var(--bg-elevated);cursor:not-allowed;transition:background .15s;flex:none}.chat-send-on{background:var(--ink);cursor:pointer}.chat-send-on:hover{background:color-mix(in oklch,var(--ink) 88%,var(--accent))}@media (max-width: 900px){.chat-composer-wrap{padding:12px 16px 14px}.chat-composer-foot,.chat-composer-hint{display:none}}@media (prefers-reduced-motion: reduce){.chat-paper-option{scroll-behavior:auto}}@media (forced-colors: active){.chat-paper-option.is-active,.chat-inline-paper-link{outline:1px solid CanvasText}.chat-paper-selection,.chat-paper-selection-remove,.chat-paper-selection-toggle{border:1px solid ButtonText}}.chat-paper-selection{margin:6px 6px 0;padding:8px 10px;border:1px solid var(--hairline);border-radius:10px;background:var(--bg-subtle);text-align:left}.chat-paper-selection-header{display:flex;align-items:center;justify-content:space-between;gap:8px}.chat-paper-selection-label{color:var(--ink-soft);font-size:11px;font-weight:600;letter-spacing:.02em;text-transform:uppercase}.chat-paper-selection-actions{display:flex;align-items:center;gap:6px}.chat-paper-selection-toggle,.chat-paper-selection-remove{border:0;padding:2px 6px;background:transparent;color:var(--accent-text);font-size:11.5px}.chat-paper-selection-quote{display:-webkit-box;max-height:4.35em;margin:6px 0 0;overflow:hidden;color:var(--ink);font-family:var(--serif);font-size:13px;line-height:1.45;white-space:pre-wrap;-webkit-box-orient:vertical;-webkit-line-clamp:3}.chat-paper-selection-quote.is-expanded{display:block;max-height:8.5em;overflow:auto;-webkit-line-clamp:unset}.chat-paper-selection-disabled{padding:4px 12px 0;color:var(--negative-text);font-size:11.5px}.chat-paper-link{color:var(--accent-text);border-bottom:1px solid color-mix(in oklch,var(--accent-text) 35%,transparent);white-space:normal}.chat-paper-link:hover{border-bottom-color:var(--accent-text)}.chat-hf-link:after{content:" 🤗";font-size:.85em;white-space:nowrap}.chat-github-link{color:var(--accent-text);border-bottom:1px solid color-mix(in oklch,var(--accent-text) 35%,transparent)}.chat-github-link:hover{border-bottom-color:var(--accent-text)}.chat-github-link svg{display:inline-block;width:1em;height:1em;margin-right:.3em;vertical-align:-.14em}.chat-external-link{color:var(--accent-text);text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:2px}.chat-external-link:hover{text-decoration-thickness:2px}.chat-web-citation{color:var(--accent-text);text-decoration:underline;text-decoration-style:dotted;text-underline-offset:2px}.chat-external-paper-citation{color:var(--chat-link);text-decoration:underline;text-decoration-color:color-mix(in srgb,var(--chat-link) 35%,transparent);text-underline-offset:2px}.external-paper-preview-pop.external-paper-preview-pop{width:min(390px,calc(100vw - 24px));padding:0;overflow:hidden;border-color:var(--chat-border);background:var(--chat-surface);color:var(--chat-text)}.external-paper-preview-card{padding:14px}.external-paper-preview-source{display:flex;gap:6px;margin-bottom:7px;color:var(--chat-muted);font-size:12px}.external-paper-preview-card strong{display:block;color:var(--chat-text);font-size:14px;line-height:1.35}.external-paper-preview-card p{margin:7px 0 0;color:var(--chat-muted);font-size:12px;line-height:1.45;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:4;overflow:hidden}.external-paper-preview-authors{-webkit-line-clamp:2!important}.external-paper-preview-citations{display:block;margin-top:9px;color:var(--chat-muted);font-size:11px}.web-preview-pop.web-preview-pop{width:min(360px,calc(100vw - 24px));padding:0;overflow:hidden;border:1px solid var(--hairline);border-radius:12px;background:var(--bg-elevated);color:var(--ink);box-shadow:0 14px 44px -12px #1e1c1466}.web-preview-card{display:flex;flex-direction:column}.web-preview-image{display:block;width:100%;height:174px;-o-object-fit:cover;object-fit:cover;background:var(--bg-subtle);border-bottom:1px solid var(--hairline)}.web-preview-meta{padding:13px 14px 14px;min-width:0}.web-preview-source{display:flex;align-items:center;gap:5px;margin-bottom:6px;color:var(--ink-faint);font-size:11px}.web-preview-source img{width:14px;height:14px;border-radius:3px}.web-preview-meta strong{display:block;font-family:var(--serif);font-size:15px;font-weight:500;line-height:1.3}.web-preview-meta p{display:-webkit-box;overflow:hidden;margin:7px 0 0;color:var(--ink-soft);font-size:12px;line-height:1.4;-webkit-box-orient:vertical;-webkit-line-clamp:3}.paper-preview-pop.paper-preview-pop{width:min(344px,calc(100vw - 24px));padding:0;border:1px solid var(--hairline);border-radius:12px;background:var(--bg-elevated);color:var(--ink);box-shadow:0 14px 44px -12px #1e1c1466;overflow:hidden}.paper-preview-inner{display:flex;gap:14px;padding:14px}.paper-preview-meta{min-width:0;flex:1}.paper-preview-title{font-family:var(--serif);font-weight:500;font-size:15px;line-height:1.25;margin-bottom:5px}.paper-preview-auth{font-size:12px;color:var(--ink-soft);line-height:1.35}.paper-preview-venue{font-size:11.5px;color:var(--ink-faint);margin-top:3px;font-variant-numeric:tabular-nums}.paper-preview-tags{display:flex;flex-wrap:wrap;gap:5px;margin:9px 0}.paper-preview-tag{font-size:10.5px;font-family:var(--mono);background:var(--positive-bg);color:var(--positive-text);border-radius:5px;padding:2px 7px}.paper-preview-status{min-height:48px;padding:14px;display:flex;align-items:center;color:var(--ink-soft);font-size:12px}.paper-preview-index-request{flex-wrap:wrap;gap:6px 12px}.paper-preview-index-request a,.paper-preview-index-request button{color:var(--accent);font:inherit;border:0;background:transparent;padding:0;cursor:pointer}.paper-preview-index-request button:disabled{color:var(--ink-soft);cursor:default}.paper-preview-index-request a:focus-visible,.paper-preview-index-request button:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.paper-preview-index-request [role=alert]{flex-basis:100%;color:var(--negative-text, var(--ink-soft))}.paper-preview-thumb{position:relative;width:96px;height:124px;flex:none;background:var(--bg-elevated);border:1px solid var(--hairline);border-radius:3px;box-shadow:0 1px 3px #1e1c1414;overflow:hidden;padding:11px 10px}.paper-preview-thumb-real{padding:0}.paper-preview-thumb-real img{display:block;width:100%;height:100%;-o-object-fit:contain;object-fit:contain}.paper-preview-thumb-title{display:flex;flex-direction:column;align-items:center;gap:3px;margin-bottom:8px}.paper-preview-thumb-title span{height:3px;background:var(--ink);border-radius:2px}.paper-preview-thumb-title span:first-child{width:70%}.paper-preview-thumb-title span:last-child{width:52%}.paper-preview-thumb-auth{height:2px;width:40%;margin:0 auto 9px;background:var(--ink-faint);border-radius:2px}.paper-preview-thumb-cols{display:flex;gap:7px}.paper-preview-thumb-col{flex:1;height:74px;background:repeating-linear-gradient(var(--hairline-strong) 0 2px,transparent 2px 5px);opacity:.7}.paper-preview-thumb-fig{position:absolute;left:14px;right:14px;height:22px;background:var(--bg-subtle);border:1px solid var(--hairline);border-radius:2px}.hf-preview-pop.hf-preview-pop{width:min(172px,calc(100vw - 24px));padding:0;border:1px solid var(--hairline);border-radius:12px;background:var(--bg-elevated);color:var(--ink);box-shadow:0 14px 44px -12px #1e1c1466;overflow:hidden}.hf-preview-card{display:grid}.hf-preview-image,.hf-preview-fallback{display:block;width:100%;aspect-ratio:2 / 1;-o-object-fit:cover;object-fit:cover;background:var(--bg-subtle)}.hf-preview-fallback{display:grid;place-items:center;font-size:48px;background:radial-gradient(circle at 70% 35%,rgba(84,104,255,.4),transparent 45%),linear-gradient(135deg,#0f6d79,#d18a48)}.hf-preview-meta{display:grid;gap:3px;padding:12px 14px 14px}.hf-preview-meta strong{overflow-wrap:anywhere;font-size:14px}.hf-preview-kind,.hf-preview-meta>span:last-child{color:var(--ink-faint);font-size:11.5px}.github-preview-pop.github-preview-pop{width:min(344px,calc(100vw - 24px));padding:0;border:1px solid var(--hairline);border-radius:12px;background:var(--bg-elevated);color:var(--ink);box-shadow:0 14px 44px -12px #1e1c1466;overflow:hidden}.github-preview-card{display:flex;gap:14px;padding:14px}.github-preview-image,.github-preview-fallback{display:block;width:72px;height:72px;flex:none;-o-object-fit:cover;object-fit:cover;border-radius:12px;background:var(--bg-subtle)}.github-preview-fallback{display:grid;place-items:center;color:#fff;background:linear-gradient(135deg,#24292f,#57606a)}.github-preview-fallback svg{width:36px;height:36px}.github-preview-meta{display:grid;gap:3px;min-width:0}.github-preview-meta strong{overflow-wrap:anywhere;font-size:14px}.github-preview-kind,.github-preview-meta>span:last-child{color:var(--ink-faint);font-size:11.5px}.github-preview-description{display:-webkit-box;overflow:hidden;color:var(--ink-soft);font-size:12px;line-height:1.35;-webkit-box-orient:vertical;-webkit-line-clamp:2}.github-preview-stats{font-variant-numeric:tabular-nums}.catalog-preview-pop.catalog-preview-pop{width:min(320px,calc(100vw - 24px));padding:0;border:1px solid var(--hairline);border-radius:12px;background:var(--bg-elevated);color:var(--ink);box-shadow:0 14px 44px -12px #1e1c1466;overflow:hidden}.catalog-preview-card{display:grid}.catalog-preview-image{display:block;width:100%;aspect-ratio:2 / 1;-o-object-fit:cover;object-fit:cover;background:var(--bg-subtle);border-bottom:1px solid var(--hairline)}.catalog-preview-meta{display:grid;gap:3px;padding:12px 14px 14px}.catalog-preview-meta strong{font-family:var(--serif);font-weight:500;font-size:15px;line-height:1.25}.catalog-preview-meta p{display:-webkit-box;overflow:hidden;margin:3px 0 0;color:var(--ink-soft);font-size:12px;line-height:1.4;-webkit-box-orient:vertical;-webkit-line-clamp:3}.catalog-preview-kind,.catalog-preview-stats{color:var(--ink-faint);font-size:11.5px;font-variant-numeric:tabular-nums}.catalog-preview-stats{margin-top:4px}.chat-artifact-card{width:min(100%,620px);display:flex;gap:14px;align-items:stretch;padding:0;overflow:hidden;text-align:left;color:var(--chat-text, #182230);background:#fff;border:1px solid #d8dee8;border-radius:14px;box-shadow:0 5px 18px #0f172a12}button.chat-artifact-card{cursor:pointer}.chat-artifact-card.is-selected{border-color:var(--accent);box-shadow:0 0 0 2px color-mix(in oklch,var(--accent) 22%,transparent)}.chat-artifact-card>img{width:190px;aspect-ratio:5 / 3;-o-object-fit:cover;object-fit:cover;background:#eef1f5}.chat-artifact-card-copy{display:flex;min-width:0;flex:1;flex-direction:column;justify-content:center;gap:7px;padding:14px 14px 14px 0}.chat-artifact-card-copy strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.chat-artifact-kicker{display:flex;align-items:center;gap:6px;color:#637083;font-size:12px}.chat-artifact-kicker svg{width:14px;height:14px}.chat-artifact-gate{width:-moz-fit-content;width:fit-content;padding:3px 8px;border-radius:999px;color:#11643b;background:#e7f7ee;font-size:11px;font-weight:650}.chat-artifact-gate-warnings{color:#7a4a00;background:#fff3d6}.chat-artifact-gate-failed{color:#9b2c2c;background:#fee9e7}.chat-artifact-generating,.chat-artifact-error{align-items:center;padding:16px}.chat-artifact-generating span:not(.chat-artifact-pulse),.chat-artifact-error span{display:flex;flex-direction:column;gap:3px}.chat-artifact-generating small,.chat-artifact-error small{color:#687386}.chat-artifact-error{border-color:#efb7b1}.chat-artifact-error>svg{width:24px;color:#b3372d}.chat-artifact-pulse{width:22px;height:22px;border:3px solid #d7dde8;border-top-color:#5367d9;border-radius:50%;animation:chat-artifact-spin .8s linear infinite}@keyframes chat-artifact-spin{to{transform:rotate(360deg)}}.chat-artifact-workspace{position:relative;min-width:0;min-height:0;flex:1;display:flex;overflow:hidden}.chat-artifact-workspace-content{min-width:0;min-height:0;flex:1;display:flex;overflow:hidden}.chat-artifact-workspace-chat>.chat-artifact-workspace-content>.chat-main{width:100%}.chat-artifact-workspace-shared{min-height:0}.chat-artifact-workspace-shared>.chat-artifact-workspace-content{overflow:auto}.chat-artifact-workspace-reader{height:100%}.chat-artifact-workspace-reader>.chat-artifact-workspace-content>.reader-workspace{width:100%}.chat-artifact-workspace-pane{min-width:0;min-height:0;flex:none;display:flex;overflow:hidden}.chat-artifact-resize-handle{position:relative;z-index:7;width:1px;flex:0 0 1px;cursor:col-resize;background:var(--hairline-strong);touch-action:none;outline:none}.chat-artifact-resize-handle:before{content:"";position:absolute;top:0;right:-8px;bottom:0;left:-8px}.chat-artifact-resize-handle:focus-visible{box-shadow:0 0 0 2px var(--accent)}.chat-artifact-panel{width:100%;height:100%;min-width:0;min-height:0;display:grid;grid-template-rows:auto auto minmax(0,1fr) auto;overflow:hidden;color:var(--ink);background:#f6f7f9;border-left:1px solid var(--hairline)}.chat-artifact-panel.is-dialog{position:fixed;z-index:1200;top:0;right:0;bottom:0;left:0;border:0}.chat-artifact-panel.is-reader-fallback{position:absolute}.chat-artifact-panel header{display:flex;align-items:center;justify-content:space-between;padding:16px 20px;background:#fff;border-bottom:1px solid #dce1e8}.chat-artifact-panel header span{color:#6d7788;font-size:12px;text-transform:uppercase;letter-spacing:.06em}.chat-artifact-panel h2{margin:2px 0 0;font-size:18px}.chat-artifact-panel header button{display:grid;place-items:center;width:36px;height:36px;border:0;border-radius:8px;background:transparent;cursor:pointer}.chat-paper-status{margin:4px 0 0;color:#687386;font-size:12px}.chat-artifact-header-actions{display:flex;align-items:center;gap:6px}.chat-artifact-header-actions>button:first-child{width:auto;min-height:36px;padding:7px 10px;border:1px solid #cfd6e4;color:#253143;background:#fff;font-size:12px}.chat-artifact-version{display:flex;align-items:center;gap:7px;margin-left:auto;margin-right:8px;color:#687386;font-size:12px}.chat-artifact-version select{padding:6px 8px;border:1px solid #cfd6e4;border-radius:7px;background:#fff}.chat-artifact-panel>nav{position:sticky;z-index:1;top:0;display:flex;gap:4px;padding:8px 18px 0;background:#fff}.chat-artifact-panel nav button{padding:9px 14px;border:0;border-bottom:2px solid transparent;color:#667085;background:transparent;cursor:pointer}.chat-artifact-panel nav button.active{color:#273a91;border-bottom-color:#5367d9;font-weight:650}.chat-artifact-panel button:focus-visible,.chat-artifact-panel a:focus-visible,.chat-artifact-panel input:focus-visible,.latex-source-editor .cm-content:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.chat-artifact-panel-body{min-height:0;display:grid;place-items:center;overflow:auto;padding:20px}.chat-artifact-panel-body>.pdf-viewer{align-self:stretch;justify-self:stretch;width:100%;height:100%}.chat-artifact-panel-body>img{max-width:100%;max-height:100%;-o-object-fit:contain;object-fit:contain;background:#fff;box-shadow:0 4px 22px #0f172a1f}.chat-artifact-panel-body>pre{align-self:stretch;justify-self:stretch;overflow:auto;margin:0;padding:18px;color:#d8dee9;background:#18202c;border-radius:10px;font-size:12px;white-space:pre-wrap}.chat-artifact-source-workspace{width:100%;height:100%;min-height:0;display:flex;overflow:hidden;border-radius:10px;background:#18202c}.chat-artifact-source-workspace>nav{width:min(180px,28%);flex:none;display:flex;flex-direction:column;overflow:auto;padding:10px;border-right:1px solid #ffffff24}.chat-artifact-source-workspace>nav button{overflow:hidden;border:0;padding:7px 8px;color:#aeb8c8;background:transparent;text-align:left;text-overflow:ellipsis;white-space:nowrap}.chat-artifact-source-workspace>nav button[aria-pressed=true]{color:#fff;background:#ffffff14}.chat-artifact-source-workspace>pre{min-width:0;flex:1;overflow:auto;margin:0;padding:18px;color:#d8dee9;font-size:12px;white-space:pre-wrap}.latex-editor-column{min-width:0;flex:1;display:flex;flex-direction:column;color:#d8dee9}.latex-source-editor{min-width:0;min-height:0;flex:1;overflow:auto}.latex-source-editor .cm-editor{height:100%;min-height:320px;font-size:13px}.latex-source-editor .cm-scroller{overflow:auto;font-family:ui-monospace,SFMono-Regular,Menlo,monospace}.latex-file-action{display:flex;align-items:center;gap:6px;margin-top:8px}.latex-file-action svg,.latex-file-buttons svg{width:14px;height:14px}.latex-file-buttons{display:flex;gap:8px;padding:8px;border-top:1px solid #ffffff24}.latex-file-buttons button,.chat-artifact-actions button{display:inline-flex;align-items:center;gap:7px;border:0;border-radius:7px;padding:8px 10px;cursor:pointer}.chat-artifact-actions button:disabled{cursor:not-allowed;opacity:.55}.chat-artifact-panel footer{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;padding:14px 20px;background:#fff;border-top:1px solid #dce1e8}.chat-artifact-metadata{display:flex;min-width:0;flex-direction:column;gap:3px;color:#687386;font-size:12px}.chat-artifact-metadata strong{color:#253143}.chat-artifact-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:8px}.chat-artifact-actions a{display:inline-flex;align-items:center;gap:5px;padding:8px 10px;color:#263b94;border:1px solid #cfd6e4;border-radius:8px;text-decoration:none;font-size:12px;font-weight:600}.chat-artifact-actions svg{width:14px;height:14px}.paper-pdf-toolbar{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px;width:100%;padding:8px;border-bottom:1px solid #dce1e8;background:#fff}.paper-pdf-toolbar-group{display:flex;align-items:center;gap:6px}.paper-pdf-toolbar button,.paper-pdf-toolbar input,.paper-pdf-toolbar a{min-height:32px;border:1px solid #cfd6e4;border-radius:7px;padding:5px 8px;color:#253143;background:#fff;font-size:12px;text-decoration:none}.paper-pdf-toolbar input{width:56px}.paper-pdf-toolbar button:disabled{cursor:not-allowed;opacity:.55}@media (max-width: 700px){.chat-artifact-card>img{width:120px}.chat-artifact-panel{width:100vw;height:100dvh}.chat-artifact-panel footer{align-items:stretch;flex-direction:column}.chat-artifact-actions{justify-content:flex-start}.chat-artifact-panel header{padding:12px 14px}.chat-artifact-header-actions>button:first-child{padding-inline:8px}.paper-pdf-toolbar{align-items:flex-start;flex-direction:column}}@media (forced-colors: active){.chat-artifact-resize-handle,.chat-artifact-card.is-selected{border:1px solid ButtonText}}@media (prefers-reduced-motion: reduce){.chat-artifact-pulse{animation-duration:.01ms}}.chat-ghost-link{color:var(--ink-soft);font-size:13px;padding:6px 10px;border-radius:6px}.chat-ghost-link:hover{color:var(--ink);background:var(--bg-subtle)}.chat-conversation-viewport{position:relative;display:flex;flex-direction:column;flex:1;min-height:0}.chat-conversation{flex:1;min-height:0;overflow-y:auto}.chat-jump-latest{position:absolute;bottom:12px;left:50%;transform:translate(-50%);border:1px solid var(--border);border-radius:20px;padding:8px 14px;background:var(--bg);color:var(--ink);box-shadow:0 2px 8px #0000001f;white-space:nowrap;cursor:pointer}.chat-conversation-inner{max-width:820px;margin:0 auto;padding:30px 28px 40px}.chat-msg{margin-bottom:26px}.chat-msg-user{display:flex;justify-content:flex-end}.chat-user-message-wrap{display:flex;flex-direction:column;align-items:flex-end;max-width:74%}.chat-bubble{background:var(--accent-soft);color:var(--ink);border:1px solid color-mix(in oklch,var(--accent-soft) 70%,var(--hairline));border-radius:16px 16px 4px;padding:12px 18px;font-family:var(--serif);font-size:16px;line-height:1.45;max-width:100%;white-space:pre-wrap;overflow-wrap:anywhere;-webkit-user-select:text;-moz-user-select:text;user-select:text;cursor:text}.chat-bubble::-moz-selection,.chat-bubble *::-moz-selection{background:var(--accent);color:var(--bg)}.chat-bubble::selection,.chat-bubble *::selection{background:var(--accent);color:var(--bg)}.chat-user-actions{display:flex;justify-content:flex-end;gap:2px;min-height:30px;padding:4px 2px 0;opacity:0;transform:translateY(-2px);transition:opacity .14s ease,transform .14s ease;-webkit-user-select:none;-moz-user-select:none;user-select:none}.chat-msg-user:hover .chat-user-actions,.chat-msg-user:focus-within .chat-user-actions{opacity:1;transform:translateY(0)}.chat-user-action{width:28px;height:28px;display:inline-flex;align-items:center;justify-content:center;border:1px solid transparent;border-radius:999px;color:var(--ink-soft);background:transparent}.chat-user-action:hover{color:var(--ink);background:var(--bg-elevated);border-color:var(--hairline)}.chat-user-action:focus-visible{outline:2px solid var(--accent);outline-offset:2px;opacity:1}.chat-user-action svg{width:14px;height:14px}.chat-inline-editor{width:min(620px,74%);min-width:min(360px,100%);padding:12px;border:1px solid color-mix(in oklch,var(--accent) 45%,var(--hairline));border-radius:16px 16px 4px;background:var(--accent-soft);box-shadow:0 8px 28px #00000014}.chat-inline-editor-textarea{position:relative;z-index:1;display:block;width:100%;min-height:72px;padding:8px 10px;resize:none;border:1px solid var(--hairline-strong);border-radius:10px;color:var(--ink);background:transparent;font-family:var(--serif);font-size:16px;line-height:1.45;white-space:pre-wrap}.chat-inline-editor-textarea-wrap{position:relative;background:var(--bg-elevated);border-radius:10px}.chat-inline-editor-textarea-wrap .chat-inline-editor-textarea{color:transparent;caret-color:var(--ink)}.chat-inline-editor-textarea:focus{outline:2px solid var(--accent);outline-offset:1px}.chat-inline-editor-notice{margin:8px 2px 0;color:var(--ink-soft);font-size:12.5px;line-height:1.4}.chat-inline-editor-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:10px}.chat-inline-editor-actions button{min-height:34px;padding:6px 14px;border:1px solid var(--hairline-strong);border-radius:999px;color:var(--ink);background:var(--bg-elevated);font-size:13px;font-weight:600}.chat-inline-editor-actions button:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.chat-inline-editor-actions .chat-inline-editor-send{color:#fff;border-color:var(--accent);background:var(--accent)}.chat-inline-editor-actions button:disabled{cursor:not-allowed;opacity:.5}.chat-msg-blocks{display:flex;flex-direction:column;gap:14px}.chat-waiting{min-height:20px;display:flex;align-items:center;font-size:13px;font-weight:600}.chat-thinking{color:transparent;background:linear-gradient(100deg,var(--ink-faint) 30%,var(--accent-text) 50%,var(--ink-faint) 70%);background-size:220% 100%;background-clip:text;-webkit-background-clip:text;animation:chat-thinking-glow 1.8s ease-in-out infinite}@keyframes chat-thinking-glow{0%{background-position:100% 0}to{background-position:-100% 0}}@media (prefers-reduced-motion: reduce){.chat-thinking{color:var(--accent-text);background:none;animation:none}}.chat-reason-live{border:1px solid var(--hairline);border-left:2px solid var(--accent);background:var(--bg-elevated);border-radius:10px;padding:14px 16px}.chat-reason-live-head{display:flex;align-items:center;gap:9px;font-size:12.5px;font-weight:600;color:var(--accent-text)}.chat-reason-live-body{margin-top:9px;font-family:var(--serif);font-size:14.5px;line-height:1.6;color:var(--ink-soft)}.chat-reason-done{border:1px solid var(--hairline);border-radius:10px;background:var(--bg-elevated);overflow:hidden}.chat-reason-done-head{display:flex;align-items:center;gap:9px;width:100%;padding:11px 15px;font-size:13px;color:var(--ink-soft);font-weight:500;text-align:left}.chat-reason-done-head svg:first-child{color:var(--positive-text);flex:none}.chat-reason-done-head .chat-chev{margin-left:auto}.chat-reason-done-head:hover{color:var(--ink)}.chat-reason-done-body{padding:2px 16px 16px 39px;font-family:var(--serif);font-size:14px;line-height:1.65;color:var(--ink-soft)}.chat-answer.chat-reason-markdown{padding-top:0;padding-right:0;padding-bottom:0;font-size:inherit;line-height:inherit;color:inherit;white-space:normal}.chat-answer.chat-reason-live-body{padding-left:23px}.chat-answer.chat-reason-done-body{padding:2px 16px 16px 39px}.chat-tool{border:1px solid var(--hairline);border-radius:10px;background:var(--bg-elevated);overflow:hidden}.chat-tool-running{border-color:color-mix(in oklch,var(--accent) 35%,var(--hairline))}.chat-tool-failed{border-color:color-mix(in oklch,#b42318 55%,var(--hairline))}.chat-tool-failed .chat-tool-status{color:#b42318;font-weight:600}.chat-tool-head{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;padding:11px 15px;text-align:left}.chat-tool-head:disabled{cursor:default}.chat-tool-head-left{display:flex;align-items:center;gap:9px;min-width:0}.chat-tool-head-left>svg{color:var(--accent-text);flex:none}.chat-tool-name{font-family:var(--mono);font-size:12px;font-weight:600;color:var(--ink);background:var(--bg-subtle);border:1px solid var(--hairline);border-radius:5px;padding:2px 7px;flex:none}.chat-tool-query{font-family:var(--serif);font-style:italic;font-size:13.5px;color:var(--ink-soft);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.chat-tool-head-right{display:flex;align-items:center;gap:10px;flex:none}.chat-tool-status{font-size:11.5px;color:var(--ink-soft);font-variant-numeric:tabular-nums}.chat-tool-body{padding:4px 16px 16px;border-top:1px solid var(--hairline)}.chat-tool-args{margin:12px 0 4px}.chat-tool-label{display:block;font-family:var(--mono);font-size:10px;letter-spacing:.1em;text-transform:uppercase;color:var(--ink-faint);margin-bottom:6px}.chat-tool-args pre{margin:0;background:var(--bg-subtle);border:1px solid var(--hairline);border-radius:8px;padding:10px 12px;font-family:var(--mono);font-size:11.5px;line-height:1.5;color:var(--ink-soft);overflow-x:auto}.chat-tool-results-label{margin-top:16px}.chat-tool-output-head{display:flex;align-items:center;justify-content:space-between;margin-top:14px}.chat-tool-output-head .chat-tool-label{margin-bottom:0}.chat-tool-copy{color:var(--accent-text);font-family:var(--mono);font-size:11px}.chat-tool-output{max-height:320px;margin:7px 0 0;overflow:auto;white-space:pre;-moz-tab-size:4;-o-tab-size:4;tab-size:4;border:1px solid var(--hairline);border-radius:8px;background:var(--bg-subtle);padding:11px 12px;color:var(--ink);font-family:var(--mono);font-size:11.5px;line-height:1.5}.chat-tool-truncated{margin-top:7px;color:var(--ink-faint);font-size:11px}.chat-mcp-app{border:1px solid var(--chat-border, #d8d8de);border-radius:12px;overflow:hidden;background:var(--chat-surface, #fff)}.chat-mcp-app>header{display:flex;justify-content:flex-end;padding:8px 10px 0}.chat-mcp-app button{border:0;border-radius:6px;background:#eef1f5;padding:5px 8px;cursor:pointer}.chat-mcp-app iframe{display:block;width:100%;border:0;background:#fff;aspect-ratio:4 / 3}.chat-mcp-loading,.chat-mcp-error{min-height:180px;aspect-ratio:4 / 3;display:grid;place-items:center;padding:18px;color:#52606d;text-align:center}.chat-mcp-error{gap:12px}.chat-mcp-app-fullscreen{position:fixed;top:16px;right:16px;bottom:16px;left:16px;z-index:1000}.chat-mcp-app-fullscreen iframe{height:calc(100vh - 72px)!important;aspect-ratio:auto}.chat-tool-results{list-style:none;margin:0;padding:0}.chat-hit{padding:11px 0;border-top:1px solid var(--hairline)}.chat-hit:first-child{border-top:0}.chat-hit-top{display:flex;align-items:baseline;gap:12px}.chat-hit-title{font-family:var(--serif);font-size:14.5px;font-weight:600;color:var(--accent-text);flex:1;line-height:1.3}.chat-hit-title:hover{text-decoration:underline}.chat-hit-meta{font-size:12px;color:var(--ink-faint);margin-top:2px}.chat-hit-truncated{color:var(--ink-faint);font-style:italic}.chat-hit-snippet{font-family:var(--serif);font-size:13.5px;line-height:1.5;color:var(--ink-soft);margin-top:5px;text-wrap:pretty}.chat-answer{font-family:var(--serif);font-size:16.5px;line-height:1.65;color:var(--ink);text-wrap:pretty;padding:2px}.chat-answer>:first-child{margin-top:0}.chat-answer>:last-child{margin-bottom:0}.chat-answer p{margin:0 0 .9em}.chat-answer h1,.chat-answer h2,.chat-answer h3,.chat-answer h4{font-family:var(--sans);font-weight:600;line-height:1.3;margin:1.35em 0 .5em}.chat-answer h1{font-size:1.45em}.chat-answer h2{font-size:1.25em}.chat-answer h3{font-size:1.08em}.chat-answer h4{font-size:1em}.chat-answer ul,.chat-answer ol{margin:0 0 .9em;padding-left:1.5em}.chat-answer ul{list-style-type:disc}.chat-answer ol{list-style-type:decimal}.chat-answer ul ul{list-style-type:circle}.chat-answer ul ul ul{list-style-type:square}.chat-answer li{margin:.2em 0}.chat-answer li>p{margin:0}.chat-answer blockquote{margin:0 0 .9em;padding-left:1em;border-left:3px solid var(--hairline-strong);color:var(--ink-soft)}.chat-answer code{font-family:var(--mono);font-size:.84em;background:var(--bg-subtle);border:1px solid var(--hairline);border-radius:4px;padding:.1em .3em}.chat-answer pre{margin:0 0 1em;padding:12px 14px;overflow-x:auto;background:var(--bg-subtle);border:1px solid var(--hairline);border-radius:8px;line-height:1.5}.chat-answer pre code{background:none;border:0;padding:0}.chat-answer table{display:block;width:-moz-max-content;width:max-content;max-width:100%;overflow-x:auto;border-collapse:collapse;margin:0 0 1em;font-family:var(--sans);font-size:.88em}.chat-answer th,.chat-answer td{border:1px solid var(--hairline);padding:6px 10px;text-align:left}.chat-answer th{background:var(--bg-subtle);font-weight:600}.chat-answer hr{border:0;border-top:1px solid var(--hairline);margin:1.25em 0}.chat-answer input[type=checkbox]{margin-right:.4em}.chat-answer strong{font-weight:600}.chat-error{display:flex;flex-wrap:wrap;align-items:flex-start;justify-content:space-between;gap:12px;border:1px solid var(--negative-border);background:var(--negative-bg);color:var(--negative-text);border-radius:10px;padding:12px 16px;font-size:13.5px;overflow-wrap:anywhere}.chat-error>span:first-child{flex:1 1 280px;min-width:0}.chat-finish-note{font-family:var(--serif);font-style:italic;font-size:13px;color:var(--ink-faint)}.chat-feedback{display:flex;align-items:center;gap:4px;min-height:30px;margin-top:8px;color:var(--ink-faint);font-size:12px}.chat-feedback-label{margin-right:2px}.chat-feedback-action{width:28px;height:28px;display:inline-flex;align-items:center;justify-content:center;border:1px solid transparent;border-radius:999px;color:var(--ink-soft);background:transparent}.chat-feedback-action:hover:not(:disabled),.chat-feedback-action-selected{color:var(--accent-text);background:var(--accent-soft);border-color:color-mix(in oklch,var(--accent) 35%,var(--hairline))}.chat-feedback-action:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.chat-feedback-action:disabled{cursor:wait}.chat-feedback-action svg{width:14px;height:14px}.chat-feedback-error{color:var(--negative-text);margin-left:4px}.chat-feedback-panel{width:min(460px,100%);margin-top:8px;padding:16px;border:1px solid var(--hairline);border-radius:12px;background:var(--bg-elevated);box-shadow:0 10px 30px #0000001a}.chat-feedback-panel-title{color:var(--ink);font-size:15px;font-weight:600}.chat-feedback-panel-label{display:block;margin-top:4px;color:var(--ink-soft);font-size:13px}.chat-feedback-comment{display:block;width:100%;min-height:92px;margin-top:12px;padding:10px 12px;resize:vertical;border:1px solid var(--hairline-strong);border-radius:8px;color:var(--ink);background:var(--bg);font:14px/1.45 var(--sans)}.chat-feedback-comment:focus{border-color:var(--accent);outline:2px solid color-mix(in oklch,var(--accent) 25%,transparent);outline-offset:1px}.chat-feedback-panel-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:12px}.chat-feedback-panel-actions button{min-width:72px;padding:8px 14px;border-radius:8px;font:600 13px var(--sans)}.chat-feedback-skip{border:1px solid transparent;color:var(--ink-soft);background:transparent}.chat-feedback-submit{border:1px solid var(--ink);color:var(--bg);background:var(--ink)}.chat-feedback-panel-actions button:disabled{cursor:wait;opacity:.65}.chat-error a,.chat-error button{flex:none;max-width:100%;color:var(--accent-text);font-weight:600;text-decoration:none}.chat-error button{border:0;padding:0;background:transparent;cursor:pointer;font:inherit;text-align:left;white-space:normal}.chat-error button:disabled{cursor:wait;opacity:.65}.chat-error-actions{display:flex;flex:0 1 auto;min-width:0;max-width:100%;flex-wrap:wrap;justify-content:flex-start;gap:8px 16px}.chat-error a:hover,.chat-error button:hover:not(:disabled){text-decoration:underline}@media (max-width: 900px){.chat-user-message-wrap{max-width:90%}.chat-inline-editor{width:90%;min-width:0}.chat-conversation-inner{padding:22px 16px 32px}}@media (max-width: 560px){.shared-chat-content .chat-user-message-wrap{max-width:88%}}@media (hover: none),(pointer: coarse){.chat-user-actions{opacity:1;transform:none}}.chat-compaction-status{flex-direction:column;align-items:flex-start}.chat-compaction-explanation{margin-top:4px;color:var(--ink-faint);font-weight:400}.chat-caret{display:inline-block;width:7px;height:1.05em;background:var(--accent);margin-left:1px;vertical-align:text-bottom;animation:chat-blink 1s steps(1) infinite}@keyframes chat-blink{50%{opacity:0}}.chat-chev{transition:transform .18s;color:var(--ink-faint)}.chat-chev-open{transform:rotate(180deg)}.chat-spinner{width:14px;height:14px;border:2px solid color-mix(in oklch,var(--accent) 25%,transparent);border-top-color:var(--accent);border-radius:50%;display:inline-block;animation:chat-spin .7s linear infinite;flex:none}.chat-spinner-light{border-color:#fff6;border-top-color:#fff}@keyframes chat-spin{to{transform:rotate(360deg)}}.shared-chat-page{min-height:0;display:flex;flex-direction:column;overflow:hidden;background:var(--bg)}.shared-chat-heading{flex:none;border-bottom:1px solid var(--hairline);display:flex;align-items:center;gap:10px}.shared-chat-heading h1{max-width:calc(50vw + 640px);margin:0 auto;padding:13px 32px;color:var(--ink);font-family:var(--serif);font-size:20px;font-weight:600;line-height:1.1}.shared-chat-content{width:min(876px,100%);margin:0 auto;padding:34px 28px 64px}.shared-chat-transcript{padding:0 0 26px}.shared-chat-attribution{display:flex;flex-wrap:wrap;justify-content:center;gap:5px 12px;color:var(--ink-faint);font-size:12px;line-height:1.5}.shared-chat-attribution a{color:inherit;font-weight:600;text-decoration:none}.shared-chat-attribution a:hover{color:var(--accent-text);text-decoration:underline}.shared-chat-fresh{margin-top:26px;padding-top:28px;border-top:1px solid var(--hairline)}.shared-chat-fresh h2{margin:0 0 6px;font-family:var(--serif);font-size:21px;font-weight:600}.shared-chat-fresh>p{margin:0 0 16px;color:var(--ink-soft);font-family:var(--serif)}.shared-chat-access-note{margin:-6px 0 16px;padding:10px 12px;border:1px solid color-mix(in oklch,var(--accent) 24%,var(--hairline));border-radius:9px;color:var(--ink-soft);background:color-mix(in oklch,var(--accent) 5%,var(--bg-elevated));font-size:13px;line-height:1.45}.shared-chat-access-note a{color:var(--accent-text);font-weight:600}.shared-chat-state{min-height:55vh;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;padding:48px 24px;text-align:center;color:var(--ink-soft)}.shared-chat-state h1{margin:0;color:var(--ink);font-family:var(--serif);font-size:27px}.shared-chat-state p{margin:0}.shared-chat-state button{margin-top:8px;padding:7px 13px;border:1px solid var(--hairline-strong);border-radius:7px;background:var(--bg-elevated);color:var(--ink)}@media (max-width: 900px){.shared-chat-heading h1{padding-inline:16px}}@media (max-width: 640px){.shared-chat-heading h1{padding-inline:14px}}@media (max-width: 560px){.shared-chat-content{padding:26px 16px 48px}} diff --git a/assets/index-DLNxIk77.js b/assets/index-Ddr0k9KU.js similarity index 99% rename from assets/index-DLNxIk77.js rename to assets/index-Ddr0k9KU.js index 78d26b8da36b46c45d98b190654cf41ef9ae7f00..29a84175fa5f278ab51bc26fa896762bcc6b360a 100644 --- a/assets/index-DLNxIk77.js +++ b/assets/index-Ddr0k9KU.js @@ -1,4 +1,4 @@ -import{c as ce,v as _e,o as E,u as I,e as Z,g as O,i as W,j as Oe,t as fe,E as je,k as J,l as M,q as A,r as Be,w as qe,f as S,x as H,y as We,m as P,z as T,A as $e}from"./index-DxRopg3G.js";function re(e,n){const t=String(e);if(typeof n!="string")throw new TypeError("Expected character");let i=0,o=t.indexOf(n);for(;o!==-1;)i++,o=t.indexOf(n,o+n.length);return i}function He(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function Ue(e,n,t){const o=ce((t||{}).ignore||[]),a=Ve(n);let r=-1;for(;++r0?{type:"text",value:y}:void 0),y===!1?p.lastIndex=v+1:(m!==v&&w.push({type:"text",value:s.value.slice(m,v)}),Array.isArray(y)?w.push(...y):y&&w.push(y),m=v+d[0].length,k=!0),!p.global)break;d=p.exec(s.value)}return k?(m?\]}]+$/.exec(e);if(!n)return[e,void 0];e=e.slice(0,n.index);let t=n[0],i=t.indexOf(")");const o=re(e,"(");let a=re(e,")");for(;i!==-1&&o>a;)e+=t.slice(0,i+1),t=t.slice(i+1),i=t.indexOf(")"),a++;return[e,t]}function he(e,n){const t=e.input.charCodeAt(e.index-1);return(e.index===0||I(t)||Z(t))&&(!n||t!==47)}me.peek=pt;function ot(){this.buffer()}function at(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function ut(){this.buffer()}function st(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function ct(e){const n=this.resume(),t=this.stack[this.stack.length-1];E(t.type==="footnoteReference"),t.identifier=O(this.sliceSerialize(e)).toLowerCase(),t.label=n}function ft(e){this.exit(e)}function ht(e){const n=this.resume(),t=this.stack[this.stack.length-1];E(t.type==="footnoteDefinition"),t.identifier=O(this.sliceSerialize(e)).toLowerCase(),t.label=n}function mt(e){this.exit(e)}function pt(){return"["}function me(e,n,t,i){const o=t.createTracker(i);let a=o.move("[^");const r=t.enter("footnoteReference"),u=t.enter("reference");return a+=o.move(t.safe(t.associationId(e),{after:"]",before:a})),u(),r(),a+=o.move("]"),a}function gt(){return{enter:{gfmFootnoteCallString:ot,gfmFootnoteCall:at,gfmFootnoteDefinitionLabelString:ut,gfmFootnoteDefinition:st},exit:{gfmFootnoteCallString:ct,gfmFootnoteCall:ft,gfmFootnoteDefinitionLabelString:ht,gfmFootnoteDefinition:mt}}}function kt(e){let n=!1;return e&&e.firstLineBlank&&(n=!0),{handlers:{footnoteDefinition:t,footnoteReference:me},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function t(i,o,a,r){const u=a.createTracker(r);let l=u.move("[^");const s=a.enter("footnoteDefinition"),h=a.enter("label");return l+=u.move(a.safe(a.associationId(i),{before:l,after:"]"})),h(),l+=u.move("]:"),i.children&&i.children.length>0&&(u.shift(4),l+=u.move((n?` +import{c as ce,v as _e,o as E,u as I,e as Z,g as O,i as W,j as Oe,t as fe,E as je,k as J,l as M,q as A,r as Be,w as qe,f as S,x as H,y as We,m as P,z as T,A as $e}from"./index-CaRYlo5c.js";function re(e,n){const t=String(e);if(typeof n!="string")throw new TypeError("Expected character");let i=0,o=t.indexOf(n);for(;o!==-1;)i++,o=t.indexOf(n,o+n.length);return i}function He(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function Ue(e,n,t){const o=ce((t||{}).ignore||[]),a=Ve(n);let r=-1;for(;++r0?{type:"text",value:y}:void 0),y===!1?p.lastIndex=v+1:(m!==v&&w.push({type:"text",value:s.value.slice(m,v)}),Array.isArray(y)?w.push(...y):y&&w.push(y),m=v+d[0].length,k=!0),!p.global)break;d=p.exec(s.value)}return k?(m?\]}]+$/.exec(e);if(!n)return[e,void 0];e=e.slice(0,n.index);let t=n[0],i=t.indexOf(")");const o=re(e,"(");let a=re(e,")");for(;i!==-1&&o>a;)e+=t.slice(0,i+1),t=t.slice(i+1),i=t.indexOf(")"),a++;return[e,t]}function he(e,n){const t=e.input.charCodeAt(e.index-1);return(e.index===0||I(t)||Z(t))&&(!n||t!==47)}me.peek=pt;function ot(){this.buffer()}function at(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function ut(){this.buffer()}function st(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function ct(e){const n=this.resume(),t=this.stack[this.stack.length-1];E(t.type==="footnoteReference"),t.identifier=O(this.sliceSerialize(e)).toLowerCase(),t.label=n}function ft(e){this.exit(e)}function ht(e){const n=this.resume(),t=this.stack[this.stack.length-1];E(t.type==="footnoteDefinition"),t.identifier=O(this.sliceSerialize(e)).toLowerCase(),t.label=n}function mt(e){this.exit(e)}function pt(){return"["}function me(e,n,t,i){const o=t.createTracker(i);let a=o.move("[^");const r=t.enter("footnoteReference"),u=t.enter("reference");return a+=o.move(t.safe(t.associationId(e),{after:"]",before:a})),u(),r(),a+=o.move("]"),a}function gt(){return{enter:{gfmFootnoteCallString:ot,gfmFootnoteCall:at,gfmFootnoteDefinitionLabelString:ut,gfmFootnoteDefinition:st},exit:{gfmFootnoteCallString:ct,gfmFootnoteCall:ft,gfmFootnoteDefinitionLabelString:ht,gfmFootnoteDefinition:mt}}}function kt(e){let n=!1;return e&&e.firstLineBlank&&(n=!0),{handlers:{footnoteDefinition:t,footnoteReference:me},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function t(i,o,a,r){const u=a.createTracker(r);let l=u.move("[^");const s=a.enter("footnoteDefinition"),h=a.enter("label");return l+=u.move(a.safe(a.associationId(i),{before:l,after:"]"})),h(),l+=u.move("]:"),i.children&&i.children.length>0&&(u.shift(4),l+=u.move((n?` `:" ")+a.indentLines(a.containerFlow(i,u.current()),n?pe:bt))),s(),l}}function bt(e,n,t){return n===0?e:pe(e,n,t)}function pe(e,n,t){return(t?"":" ")+e}const xt=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];ge.peek=vt;function wt(){return{canContainEols:["delete"],enter:{strikethrough:yt},exit:{strikethrough:Ct}}}function dt(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:xt}],handlers:{delete:ge}}}function yt(e){this.enter({type:"delete",children:[]},e)}function Ct(e){this.exit(e)}function ge(e,n,t,i){const o=t.createTracker(i),a=t.enter("strikethrough");let r=o.move("~~");return r+=t.containerPhrasing(e,{...o.current(),before:r,after:"~"}),r+=o.move("~~"),a(),r}function vt(){return"~"}function At(e){return e.length}function Dt(e,n){const t=n||{},i=(t.align||[]).concat(),o=t.stringLength||At,a=[],r=[],u=[],l=[];let s=0,h=-1;for(;++hs&&(s=e[h].length);++kl[k])&&(l[k]=d)}b.push(w)}r[h]=b,u[h]=x}let c=-1;if(typeof i=="object"&&"length"in i)for(;++cl[c]&&(l[c]=w),g[c]=w),p[c]=d}r.splice(1,0,p),u.splice(1,0,g),h=-1;const m=[];for(;++h "),a.shift(2);const r=t.indentLines(t.containerFlow(e,a.current()),Lt);return o(),r}function Lt(e,n,t){return">"+(t?"":" ")+e}function Tt(e,n){return le(e,n.inConstruct,!0)&&!le(e,n.notInConstruct,!1)}function le(e,n,t){if(typeof n=="string"&&(n=[n]),!n||n.length===0)return t;let i=-1;for(;++i:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.25rem * var(--tw-space-x-reverse));margin-left:calc(.25rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(1rem * var(--tw-space-x-reverse));margin-left:calc(1rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-1\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.375rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.375rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.25rem * var(--tw-space-y-reverse))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * var(--tw-space-y-reverse))}.justify-self-end{justify-self:end}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.overscroll-contain{overscroll-behavior:contain}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-sm{border-radius:calc(var(--radius) - 4px)}.\!border{border-width:1px!important}.border{border-width:1px}.border-2{border-width:2px}.border-b{border-bottom-width:1px}.border-t{border-top-width:1px}.border-dashed{border-style:dashed}.\!border-black{--tw-border-opacity: 1 !important;border-color:rgb(0 0 0 / var(--tw-border-opacity, 1))!important}.border-amber-200{--tw-border-opacity: 1;border-color:rgb(253 230 138 / var(--tw-border-opacity, 1))}.border-amber-500{--tw-border-opacity: 1;border-color:rgb(245 158 11 / var(--tw-border-opacity, 1))}.border-border{border-color:hsl(var(--border))}.border-destructive{border-color:hsl(var(--destructive))}.border-destructive\/40{border-color:hsl(var(--destructive) / .4)}.border-destructive\/50{border-color:hsl(var(--destructive) / .5)}.border-input{border-color:hsl(var(--input))}.border-primary{border-color:hsl(var(--primary))}.border-red-500{--tw-border-opacity: 1;border-color:rgb(239 68 68 / var(--tw-border-opacity, 1))}.border-transparent{border-color:transparent}.bg-accent{background-color:hsl(var(--accent-tw))}.bg-amber-100{--tw-bg-opacity: 1;background-color:rgb(254 243 199 / var(--tw-bg-opacity, 1))}.bg-amber-50{--tw-bg-opacity: 1;background-color:rgb(255 251 235 / var(--tw-bg-opacity, 1))}.bg-background{background-color:hsl(var(--background))}.bg-background\/80{background-color:hsl(var(--background) / .8)}.bg-black\/80{background-color:#000c}.bg-blue-100{--tw-bg-opacity: 1;background-color:rgb(219 234 254 / var(--tw-bg-opacity, 1))}.bg-border{background-color:hsl(var(--border))}.bg-card{background-color:hsl(var(--card))}.bg-destructive{background-color:hsl(var(--destructive))}.bg-destructive\/10{background-color:hsl(var(--destructive) / .1)}.bg-muted{background-color:hsl(var(--muted))}.bg-muted\/30{background-color:hsl(var(--muted) / .3)}.bg-muted\/40{background-color:hsl(var(--muted) / .4)}.bg-muted\/50{background-color:hsl(var(--muted) / .5)}.bg-popover{background-color:hsl(var(--popover))}.bg-primary{background-color:hsl(var(--primary))}.bg-red-50\/50{background-color:#fef2f280}.bg-secondary{background-color:hsl(var(--secondary))}.bg-transparent{background-color:transparent}.fill-current{fill:currentColor}.object-contain{-o-object-fit:contain;object-fit:contain}.p-0{padding:0}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-8{padding-left:2rem;padding-right:2rem}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-10{padding-top:2.5rem;padding-bottom:2.5rem}.py-12{padding-top:3rem;padding-bottom:3rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-5{padding-top:1.25rem;padding-bottom:1.25rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.py-8{padding-top:2rem;padding-bottom:2rem}.pb-2{padding-bottom:.5rem}.pb-4{padding-bottom:1rem}.pl-4{padding-left:1rem}.pl-5{padding-left:1.25rem}.pl-8{padding-left:2rem}.pl-9{padding-left:2.25rem}.pr-16{padding-right:4rem}.pr-2{padding-right:.5rem}.pr-9{padding-right:2.25rem}.pt-0{padding-top:0}.pt-2{padding-top:.5rem}.pt-6{padding-top:1.5rem}.text-left{text-align:left}.text-center{text-align:center}.align-top{vertical-align:top}.align-middle{vertical-align:middle}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-\[10px\]{font-size:10px}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.lowercase{text-transform:lowercase}.capitalize{text-transform:capitalize}.italic{font-style:italic}.leading-none{line-height:1}.leading-relaxed{line-height:1.625}.leading-snug{line-height:1.375}.leading-tight{line-height:1.25}.tracking-tight{letter-spacing:-.025em}.tracking-wide{letter-spacing:.025em}.tracking-widest{letter-spacing:.1em}.text-amber-900{--tw-text-opacity: 1;color:rgb(120 53 15 / var(--tw-text-opacity, 1))}.text-blue-900{--tw-text-opacity: 1;color:rgb(30 58 138 / var(--tw-text-opacity, 1))}.text-card-foreground{color:hsl(var(--card-foreground))}.text-current{color:currentColor}.text-destructive{color:hsl(var(--destructive))}.text-destructive-foreground{color:hsl(var(--destructive-foreground))}.text-foreground{color:hsl(var(--foreground))}.text-muted-foreground{color:hsl(var(--muted-foreground))}.text-popover-foreground{color:hsl(var(--popover-foreground))}.text-primary{color:hsl(var(--primary))}.text-primary-foreground{color:hsl(var(--primary-foreground))}.text-red-700{--tw-text-opacity: 1;color:rgb(185 28 28 / var(--tw-text-opacity, 1))}.text-secondary-foreground{color:hsl(var(--secondary-foreground))}.underline{text-decoration-line:underline}.underline-offset-2{text-underline-offset:2px}.underline-offset-4{text-underline-offset:4px}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-30{opacity:.3}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.opacity-90{opacity:.9}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.ring-0{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-offset-background{--tw-ring-offset-color: hsl(var(--background))}.blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.drop-shadow{--tw-drop-shadow: drop-shadow(0 1px 2px rgb(0 0 0 / .1)) drop-shadow(0 1px 1px rgb(0 0 0 / .06));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-200{transition-duration:.2s}@keyframes enter{0%{opacity:var(--tw-enter-opacity, 1);transform:translate3d(var(--tw-enter-translate-x, 0),var(--tw-enter-translate-y, 0),0) scale3d(var(--tw-enter-scale, 1),var(--tw-enter-scale, 1),var(--tw-enter-scale, 1)) rotate(var(--tw-enter-rotate, 0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity, 1);transform:translate3d(var(--tw-exit-translate-x, 0),var(--tw-exit-translate-y, 0),0) scale3d(var(--tw-exit-scale, 1),var(--tw-exit-scale, 1),var(--tw-exit-scale, 1)) rotate(var(--tw-exit-rotate, 0))}}.animate-in{animation-name:enter;animation-duration:.15s;--tw-enter-opacity: initial;--tw-enter-scale: initial;--tw-enter-rotate: initial;--tw-enter-translate-x: initial;--tw-enter-translate-y: initial}.fade-in-0{--tw-enter-opacity: 0}.zoom-in-95{--tw-enter-scale: .95}.duration-200{animation-duration:.2s}.\!running{animation-play-state:running!important}.running{animation-play-state:running}.paused{animation-play-state:paused}.file\:border-0::file-selector-button{border-width:0px}.file\:bg-transparent::file-selector-button{background-color:transparent}.file\:text-sm::file-selector-button{font-size:.875rem;line-height:1.25rem}.file\:font-medium::file-selector-button{font-weight:500}.file\:text-foreground::file-selector-button{color:hsl(var(--foreground))}.placeholder\:text-muted-foreground::-moz-placeholder{color:hsl(var(--muted-foreground))}.placeholder\:text-muted-foreground::placeholder{color:hsl(var(--muted-foreground))}.last\:mb-0:last-child{margin-bottom:0}.hover\:border-foreground\/50:hover{border-color:hsl(var(--foreground) / .5)}.hover\:bg-accent:hover{background-color:hsl(var(--accent-tw))}.hover\:bg-destructive\/80:hover{background-color:hsl(var(--destructive) / .8)}.hover\:bg-destructive\/90:hover{background-color:hsl(var(--destructive) / .9)}.hover\:bg-muted:hover{background-color:hsl(var(--muted))}.hover\:bg-muted\/50:hover{background-color:hsl(var(--muted) / .5)}.hover\:bg-primary\/80:hover{background-color:hsl(var(--primary) / .8)}.hover\:bg-primary\/90:hover{background-color:hsl(var(--primary) / .9)}.hover\:bg-secondary:hover{background-color:hsl(var(--secondary))}.hover\:bg-secondary\/80:hover{background-color:hsl(var(--secondary) / .8)}.hover\:text-accent-foreground:hover{color:hsl(var(--accent-foreground))}.hover\:text-destructive:hover{color:hsl(var(--destructive))}.hover\:text-foreground:hover{color:hsl(var(--foreground))}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-100:hover{opacity:1}.focus\:bg-accent:focus{background-color:hsl(var(--accent-tw))}.focus\:text-accent-foreground:focus{color:hsl(var(--accent-foreground))}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-ring:focus{--tw-ring-color: hsl(var(--ring))}.focus\:ring-offset-2:focus{--tw-ring-offset-width: 2px}.focus-visible\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\:ring-2:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-visible\:ring-ring:focus-visible{--tw-ring-color: hsl(var(--ring))}.focus-visible\:ring-offset-2:focus-visible{--tw-ring-offset-width: 2px}.focus-visible\:ring-offset-background:focus-visible{--tw-ring-offset-color: hsl(var(--background))}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-50:disabled{opacity:.5}.group.destructive .group-\[\.destructive\]\:border-muted\/40{border-color:hsl(var(--muted) / .4)}.group.toaster .group-\[\.toaster\]\:border-border{border-color:hsl(var(--border))}.group.toast .group-\[\.toast\]\:bg-muted{background-color:hsl(var(--muted))}.group.toast .group-\[\.toast\]\:bg-primary{background-color:hsl(var(--primary))}.group.toaster .group-\[\.toaster\]\:bg-background{background-color:hsl(var(--background))}.group.destructive .group-\[\.destructive\]\:text-destructive-foreground{color:hsl(var(--destructive-foreground))}.group.toast .group-\[\.toast\]\:text-muted-foreground{color:hsl(var(--muted-foreground))}.group.toast .group-\[\.toast\]\:text-primary-foreground{color:hsl(var(--primary-foreground))}.group.toaster .group-\[\.toaster\]\:text-foreground{color:hsl(var(--foreground))}.group.toaster .group-\[\.toaster\]\:shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.group.destructive .group-\[\.destructive\]\:hover\:border-destructive\/30:hover{border-color:hsl(var(--destructive) / .3)}.group.destructive .group-\[\.destructive\]\:hover\:bg-destructive:hover{background-color:hsl(var(--destructive))}.group.destructive .group-\[\.destructive\]\:hover\:bg-destructive-foreground\/10:hover{background-color:hsl(var(--destructive-foreground) / .1)}.group.destructive .group-\[\.destructive\]\:hover\:text-destructive-foreground:hover{color:hsl(var(--destructive-foreground))}.group.destructive .group-\[\.destructive\]\:focus\:ring-destructive:focus{--tw-ring-color: hsl(var(--destructive))}.group.destructive .group-\[\.destructive\]\:focus\:ring-destructive-foreground:focus{--tw-ring-color: hsl(var(--destructive-foreground))}.peer:disabled~.peer-disabled\:cursor-not-allowed{cursor:not-allowed}.peer:disabled~.peer-disabled\:opacity-70{opacity:.7}.data-\[disabled\=true\]\:pointer-events-none[data-disabled=true],.data-\[disabled\]\:pointer-events-none[data-disabled]{pointer-events:none}.data-\[state\=checked\]\:translate-x-5[data-state=checked]{--tw-translate-x: 1.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[state\=unchecked\]\:translate-x-0[data-state=unchecked],.data-\[swipe\=cancel\]\:translate-x-0[data-swipe=cancel]{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[swipe\=end\]\:translate-x-\[var\(--radix-toast-swipe-end-x\)\][data-swipe=end]{--tw-translate-x: var(--radix-toast-swipe-end-x);transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[swipe\=move\]\:translate-x-\[var\(--radix-toast-swipe-move-x\)\][data-swipe=move]{--tw-translate-x: var(--radix-toast-swipe-move-x);transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes accordion-up{0%{height:var(--radix-accordion-content-height)}to{height:0}}.data-\[state\=closed\]\:animate-accordion-up[data-state=closed]{animation:accordion-up .2s ease-out}@keyframes accordion-down{0%{height:0}to{height:var(--radix-accordion-content-height)}}.data-\[state\=open\]\:animate-accordion-down[data-state=open]{animation:accordion-down .2s ease-out}.data-\[selected\=\'true\'\]\:bg-accent[data-selected=true]{background-color:hsl(var(--accent-tw))}.data-\[state\=active\]\:bg-background[data-state=active]{background-color:hsl(var(--background))}.data-\[state\=checked\]\:\!bg-black[data-state=checked]{--tw-bg-opacity: 1 !important;background-color:rgb(0 0 0 / var(--tw-bg-opacity, 1))!important}.data-\[state\=checked\]\:bg-primary[data-state=checked]{background-color:hsl(var(--primary))}.data-\[state\=open\]\:bg-accent[data-state=open]{background-color:hsl(var(--accent-tw))}.data-\[state\=selected\]\:bg-muted[data-state=selected]{background-color:hsl(var(--muted))}.data-\[state\=unchecked\]\:bg-input[data-state=unchecked]{background-color:hsl(var(--input))}.data-\[selected\=true\]\:text-accent-foreground[data-selected=true]{color:hsl(var(--accent-foreground))}.data-\[state\=active\]\:text-foreground[data-state=active]{color:hsl(var(--foreground))}.data-\[state\=checked\]\:\!text-white[data-state=checked]{--tw-text-opacity: 1 !important;color:rgb(255 255 255 / var(--tw-text-opacity, 1))!important}.data-\[state\=open\]\:text-muted-foreground[data-state=open]{color:hsl(var(--muted-foreground))}.data-\[disabled\=true\]\:opacity-50[data-disabled=true],.data-\[disabled\]\:opacity-50[data-disabled]{opacity:.5}.data-\[state\=active\]\:shadow-sm[data-state=active]{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.data-\[swipe\=move\]\:transition-none[data-swipe=move]{transition-property:none}.data-\[state\=open\]\:animate-in[data-state=open]{animation-name:enter;animation-duration:.15s;--tw-enter-opacity: initial;--tw-enter-scale: initial;--tw-enter-rotate: initial;--tw-enter-translate-x: initial;--tw-enter-translate-y: initial}.data-\[state\=closed\]\:animate-out[data-state=closed],.data-\[swipe\=end\]\:animate-out[data-swipe=end]{animation-name:exit;animation-duration:.15s;--tw-exit-opacity: initial;--tw-exit-scale: initial;--tw-exit-rotate: initial;--tw-exit-translate-x: initial;--tw-exit-translate-y: initial}.data-\[state\=closed\]\:fade-out-0[data-state=closed]{--tw-exit-opacity: 0}.data-\[state\=closed\]\:fade-out-80[data-state=closed]{--tw-exit-opacity: .8}.data-\[state\=open\]\:fade-in-0[data-state=open]{--tw-enter-opacity: 0}.data-\[state\=closed\]\:zoom-out-95[data-state=closed]{--tw-exit-scale: .95}.data-\[state\=open\]\:zoom-in-95[data-state=open]{--tw-enter-scale: .95}.data-\[side\=bottom\]\:slide-in-from-top-2[data-side=bottom]{--tw-enter-translate-y: -.5rem}.data-\[side\=left\]\:slide-in-from-right-2[data-side=left]{--tw-enter-translate-x: .5rem}.data-\[side\=right\]\:slide-in-from-left-2[data-side=right]{--tw-enter-translate-x: -.5rem}.data-\[side\=top\]\:slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y: .5rem}.data-\[state\=closed\]\:slide-out-to-left-1\/2[data-state=closed]{--tw-exit-translate-x: -50%}.data-\[state\=closed\]\:slide-out-to-right-full[data-state=closed]{--tw-exit-translate-x: 100%}.data-\[state\=closed\]\:slide-out-to-top-\[48\%\][data-state=closed]{--tw-exit-translate-y: -48%}.data-\[state\=open\]\:slide-in-from-left-1\/2[data-state=open]{--tw-enter-translate-x: -50%}.data-\[state\=open\]\:slide-in-from-top-\[48\%\][data-state=open]{--tw-enter-translate-y: -48%}.data-\[state\=open\]\:slide-in-from-top-full[data-state=open]{--tw-enter-translate-y: -100%}.dark\:block:is(.dark *){display:block}.dark\:hidden:is(.dark *){display:none}.dark\:border-amber-900:is(.dark *){--tw-border-opacity: 1;border-color:rgb(120 53 15 / var(--tw-border-opacity, 1))}.dark\:border-destructive:is(.dark *){border-color:hsl(var(--destructive))}.dark\:bg-amber-950\/40:is(.dark *){background-color:#451a0366}.dark\:text-amber-100:is(.dark *){--tw-text-opacity: 1;color:rgb(254 243 199 / var(--tw-text-opacity, 1))}@media (min-width: 640px){.sm\:bottom-0{bottom:0}.sm\:right-0{right:0}.sm\:top-auto{top:auto}.sm\:mr-auto{margin-right:auto}.sm\:w-auto{width:auto}.sm\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.sm\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.sm\:flex-row{flex-direction:row}.sm\:flex-col{flex-direction:column}.sm\:justify-end{justify-content:flex-end}.sm\:space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.sm\:rounded-lg{border-radius:var(--radius)}.sm\:px-6{padding-left:1.5rem;padding-right:1.5rem}.sm\:text-left{text-align:left}.data-\[state\=open\]\:sm\:slide-in-from-bottom-full[data-state=open]{--tw-enter-translate-y: 100%}}@media (min-width: 768px){.md\:col-span-2{grid-column:span 2 / span 2}.md\:max-w-\[420px\]{max-width:420px}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.md\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.md\:grid-cols-\[1fr_1fr_auto\]{grid-template-columns:1fr 1fr auto}.md\:text-sm{font-size:.875rem;line-height:1.25rem}}@media (min-width: 1024px){.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.lg\:grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}.lg\:grid-cols-7{grid-template-columns:repeat(7,minmax(0,1fr))}.lg\:px-8{padding-left:2rem;padding-right:2rem}}@media (min-width: 1280px){.xl\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.xl\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}}.\[\&\:has\(\[role\=checkbox\]\)\]\:pr-0:has([role=checkbox]){padding-right:0}.\[\&\>svg\+div\]\:translate-y-\[-3px\]>svg+div{--tw-translate-y: -3px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.\[\&\>svg\]\:absolute>svg{position:absolute}.\[\&\>svg\]\:left-4>svg{left:1rem}.\[\&\>svg\]\:top-4>svg{top:1rem}.\[\&\>svg\]\:text-destructive>svg{color:hsl(var(--destructive))}.\[\&\>svg\]\:text-foreground>svg{color:hsl(var(--foreground))}.\[\&\>svg\~\*\]\:pl-7>svg~*{padding-left:1.75rem}.\[\&\>tr\]\:last\:border-b-0:last-child>tr{border-bottom-width:0px}.\[\&\[data-state\=open\]\>svg\]\:rotate-180[data-state=open]>svg{--tw-rotate: 180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.\[\&_\[cmdk-group-heading\]\]\:px-2 [cmdk-group-heading]{padding-left:.5rem;padding-right:.5rem}.\[\&_\[cmdk-group-heading\]\]\:py-1\.5 [cmdk-group-heading]{padding-top:.375rem;padding-bottom:.375rem}.\[\&_\[cmdk-group-heading\]\]\:text-xs [cmdk-group-heading]{font-size:.75rem;line-height:1rem}.\[\&_\[cmdk-group-heading\]\]\:font-medium [cmdk-group-heading]{font-weight:500}.\[\&_\[cmdk-group-heading\]\]\:text-muted-foreground [cmdk-group-heading]{color:hsl(var(--muted-foreground))}.\[\&_\[cmdk-group\]\:not\(\[hidden\]\)_\~\[cmdk-group\]\]\:pt-0 [cmdk-group]:not([hidden])~[cmdk-group]{padding-top:0}.\[\&_\[cmdk-group\]\]\:px-2 [cmdk-group]{padding-left:.5rem;padding-right:.5rem}.\[\&_\[cmdk-input-wrapper\]_svg\]\:h-5 [cmdk-input-wrapper] svg{height:1.25rem}.\[\&_\[cmdk-input-wrapper\]_svg\]\:w-5 [cmdk-input-wrapper] svg{width:1.25rem}.\[\&_\[cmdk-input\]\]\:h-12 [cmdk-input]{height:3rem}.\[\&_\[cmdk-item\]\]\:px-2 [cmdk-item]{padding-left:.5rem;padding-right:.5rem}.\[\&_\[cmdk-item\]\]\:py-3 [cmdk-item]{padding-top:.75rem;padding-bottom:.75rem}.\[\&_\[cmdk-item\]_svg\]\:h-5 [cmdk-item] svg{height:1.25rem}.\[\&_\[cmdk-item\]_svg\]\:w-5 [cmdk-item] svg{width:1.25rem}.\[\&_p\]\:leading-relaxed p{line-height:1.625}.\[\&_svg\]\:pointer-events-none svg{pointer-events:none}.\[\&_svg\]\:size-4 svg{width:1rem;height:1rem}.\[\&_svg\]\:shrink-0 svg{flex-shrink:0}.\[\&_tr\:last-child\]\:border-0 tr:last-child{border-width:0px}.\[\&_tr\]\:border-b tr{border-bottom-width:1px}:root{--bg: #FAF8F4;--bg-elevated: #FFFFFF;--bg-subtle: #F2EFE8;--ink: #1A1814;--ink-soft: #5A554C;--ink-faint: #8E8678;--hairline: #E4DFD4;--hairline-strong: #C8C2B3;--accent: oklch(.45 .08 250);--accent-soft: oklch(.92 .03 250);--accent-text: oklch(.35 .1 250);--warn: oklch(.55 .12 30);--positive-bg: oklch(.96 .03 145);--positive-text: oklch(.34 .1 145);--positive-border: oklch(.86 .06 145);--negative-bg: oklch(.96 .03 25);--negative-text: oklch(.4 .12 25);--negative-border: oklch(.86 .06 25);--highlight-bg: oklch(.97 .04 70);--highlight-text: oklch(.42 .1 60);--highlight-border: oklch(.85 .07 70);--info-bg: oklch(.97 .04 230);--info-text: oklch(.42 .1 240);--info-border: oklch(.86 .07 230);--trend-code: #33639E;--trend-hf: #AA7D24;--app-leading-column-width: 280px;--serif: "Newsreader", Georgia, serif;--sans: "Inter", -apple-system, sans-serif;--mono: "JetBrains Mono", ui-monospace, monospace;color-scheme:light}.dark{--bg: #11100E;--bg-elevated: #1A1815;--bg-subtle: #24211D;--ink: #F3EFE7;--ink-soft: #B9B2A6;--ink-faint: #989084;--hairline: #332F29;--hairline-strong: #514A40;--accent: oklch(.72 .09 250);--accent-soft: oklch(.28 .04 250);--accent-text: oklch(.8 .08 250);--warn: oklch(.72 .12 30);--positive-bg: oklch(.25 .035 145);--positive-text: oklch(.79 .1 145);--positive-border: oklch(.43 .06 145);--negative-bg: oklch(.25 .04 25);--negative-text: oklch(.79 .1 25);--negative-border: oklch(.43 .06 25);--highlight-bg: oklch(.27 .04 70);--highlight-text: oklch(.82 .1 70);--highlight-border: oklch(.46 .07 70);--info-bg: oklch(.25 .04 230);--info-text: oklch(.8 .08 235);--info-border: oklch(.43 .07 230);--trend-code: #5C8FD6;--trend-hf: #B3831F;color-scheme:dark}*{box-sizing:border-box;margin:0;padding:0}html,body{background:var(--bg);color:var(--ink);font-family:var(--sans);font-size:14px;line-height:1.5;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}a{color:inherit;text-decoration:none}button{font-family:inherit;cursor:pointer;border:none;background:none;color:inherit}.app-header{border-bottom:1px solid var(--hairline);background:var(--bg);position:sticky;top:0;z-index:50}.app-header-inner{max-width:calc(50vw + 640px);margin:0 auto;padding:18px 32px;display:flex;align-items:center;gap:24px;min-width:0}.site-announcement{position:relative;min-height:28px;padding:5px 52px 6px;border-top:1px solid var(--hairline);background:var(--bg-subtle);color:var(--ink-soft);font-size:12px;line-height:16px;text-align:center}.site-announcement a{color:var(--accent-text);font-weight:600;text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:2px}.site-announcement a:hover{color:var(--ink)}.site-announcement-close{position:absolute;top:50%;right:20px;display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;padding:0;border:0;border-radius:4px;background:transparent;color:var(--ink-soft);cursor:pointer;transform:translateY(-50%)}.site-announcement-close:hover{background:var(--hairline);color:var(--ink)}.site-announcement-close:focus-visible{outline:2px solid var(--accent-text);outline-offset:1px}.brand{display:flex;align-items:baseline;gap:10px;font-family:var(--serif);cursor:pointer}.brand-mark{width:22px;height:22px;background:var(--ink);position:relative;align-self:center;flex-shrink:0}.brand-mark:after{content:"";position:absolute;top:4px;left:4px;right:4px;bottom:4px;background:var(--bg)}.brand-mark:before{content:"";position:absolute;top:8px;left:8px;width:6px;height:6px;background:var(--ink);z-index:1}.brand-name{font-size:20px;font-weight:600;letter-spacing:-.02em;white-space:nowrap}.brand-name em{font-style:italic;font-weight:400;color:var(--ink-soft)}.nav{display:flex;gap:24px;margin-left:8px;flex-shrink:0;position:relative}@media (min-width: 901px){.app-header-inner{max-width:none;padding-left:0}.brand{width:var(--app-leading-column-width);flex:none;justify-content:center}.nav{margin-left:0}}@media (max-width: 1100px){.nav{gap:18px}.nav-item:nth-child(n+4){display:none}}@media (max-width: 920px){.search-trigger kbd{display:none}}.nav-item{font-size:13px;color:var(--ink-soft);padding:4px 0;transition:color .15s}.nav-indicator{position:absolute;bottom:0;left:0;height:1px;background:var(--ink);pointer-events:none;will-change:transform,width}.nav-indicator-ready{transition:transform .22s cubic-bezier(.4,0,.2,1),width .22s cubic-bezier(.4,0,.2,1),opacity .12s ease}.nav-item-with-badge{display:inline-flex;align-items:center;gap:5px}.nav-new-badge{display:inline-flex;align-items:center;min-height:17px;padding:1px 5px;border-radius:5px;background:#dfe7ff;color:#1458e8;font-size:9px;font-weight:700;line-height:1;letter-spacing:.02em;text-transform:uppercase}.nav-item:hover,.nav-item.active{color:var(--ink)}@media (prefers-reduced-motion: reduce){.nav-indicator-ready{transition:none}}.header-spacer{flex:1}.search-trigger{display:flex;align-items:center;gap:8px;padding:7px 12px;border:1px solid var(--hairline);border-radius:6px;background:var(--bg-elevated);font-size:13px;color:var(--ink-faint);width:240px;min-width:0;flex-shrink:1;transition:border-color .15s;overflow:hidden}.search-trigger>span:not(:first-child){white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}.search-trigger:hover{border-color:var(--hairline-strong)}.search-trigger kbd{margin-left:auto;font-family:var(--mono);font-size:11px;padding:1px 5px;border:1px solid var(--hairline);border-radius:3px;background:var(--bg-subtle);color:var(--ink-soft)}.icon-btn{width:32px;height:32px;display:flex;align-items:center;justify-content:center;border:1px solid var(--hairline);border-radius:6px;background:var(--bg-elevated);transition:border-color .15s}.icon-btn:hover{border-color:var(--hairline-strong)}.hf-signin-btn{display:inline-flex;align-items:center;gap:8px;max-width:100%;min-height:32px;padding:5px 12px;border:1px solid var(--hairline);border-radius:6px;background:var(--bg-elevated);font-size:13px;color:var(--ink);line-height:20px;white-space:normal;overflow-wrap:anywhere;transition:border-color .15s,background .15s}.hf-signin-btn>img{flex-shrink:0}.app-header .hf-signin-btn{flex-shrink:0;white-space:nowrap;overflow-wrap:normal}.hf-signin-btn:hover{border-color:var(--hairline-strong);background:var(--bg-subtle)}.user-avatar-btn{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;border:1px solid var(--hairline);border-radius:999px;background:var(--bg-elevated);padding:0;overflow:hidden;transition:border-color .15s}.user-avatar-btn:hover{border-color:var(--hairline-strong)}.user-avatar-btn:focus-visible{outline:2px solid var(--hairline-strong);outline-offset:2px}.page{max-width:calc(50vw + 640px);margin:0 auto;padding:32px}.site-footer{border-top:1px solid var(--hairline);color:var(--ink-faint);font-size:12px}.site-footer-inner{display:flex;flex-wrap:wrap;gap:14px;max-width:calc(50vw + 640px);margin:0 auto;padding:20px 32px 28px}.site-footer a{color:var(--ink-soft)}.site-footer a:hover{color:var(--ink)}.layout-with-sidebar{display:grid;grid-template-columns:220px 1fr;gap:48px;align-items:start}.sidebar{position:sticky;top:100px}.sidebar-section{margin-bottom:28px}.sidebar-label{font-family:var(--mono);font-size:10px;letter-spacing:.1em;text-transform:uppercase;color:var(--ink-faint);margin-bottom:12px}.sidebar-link{display:block;font-size:13px;color:var(--ink-soft);padding:5px 0;border-bottom:1px dotted transparent;transition:color .15s}.sidebar-link:hover{color:var(--ink)}.sidebar-link.active{color:var(--ink);font-weight:500}.sidebar-link .count{font-family:var(--mono);font-size:11px;color:var(--ink-faint);margin-left:6px}.breadcrumb{display:flex;align-items:center;gap:8px;font-family:var(--mono);font-size:11px;color:var(--ink-faint);margin-bottom:24px}.breadcrumb a{color:var(--ink-soft)}.breadcrumb a:hover{color:var(--ink)}.breadcrumb .sep{color:var(--hairline-strong)}.detail-title{font-family:var(--serif);font-size:38px;font-weight:500;line-height:1.15;letter-spacing:-.02em;margin-bottom:16px;text-wrap:balance}.detail-title-org{margin-left:.6em;font-family:var(--mono);font-size:13px;letter-spacing:0;color:var(--accent-text);white-space:nowrap}.detail-title-org--logo{display:inline-flex;align-items:center;justify-content:center;margin-left:.3em;font-size:inherit;width:.8em;height:.8em;border-radius:4px;overflow:hidden;vertical-align:-.05em}.detail-title-org--logo img{width:100%;height:100%;-o-object-fit:contain;object-fit:contain}.action-btn{display:inline-flex;align-items:center;gap:6px;padding:7px 12px;border:1px solid var(--hairline);border-radius:6px;background:var(--bg-elevated);font-size:12px;font-weight:500;color:var(--ink);transition:all .15s}.action-btn:hover{border-color:var(--ink)}.action-btn.primary{background:var(--ink);color:var(--bg);border-color:var(--ink)}.action-btn.primary:hover{background:color-mix(in oklch,var(--ink) 88%,var(--accent))}.no-results{padding:80px 0;text-align:center;font-family:var(--serif);color:var(--ink-faint);font-style:italic}.icon{width:14px;height:14px;flex-shrink:0}.icon-sm{width:11px;height:11px;flex-shrink:0}html{scroll-behavior:smooth}::-moz-selection{background:var(--accent-soft);color:var(--accent-text)}::selection{background:var(--accent-soft);color:var(--accent-text)}.mobile-menu-btn,.mobile-search-btn{display:none;width:36px;height:36px;align-items:center;justify-content:center;border-radius:4px;flex-shrink:0}.mobile-menu-btn:hover,.mobile-search-btn:hover{background:var(--bg-subtle)}.mobile-nav-drawer{position:fixed;top:0;right:0;bottom:0;left:0;background:#1a181466;z-index:100;display:flex;justify-content:flex-end}.mobile-nav-panel{width:min(320px,80vw);background:var(--bg-elevated);border-left:1px solid var(--hairline-strong);padding:16px 24px max(32px,env(safe-area-inset-bottom));display:flex;flex-direction:column;gap:4px;height:100%;min-height:0;overscroll-behavior-y:contain;overflow-y:auto;box-shadow:-8px 0 24px #0000000f}.mobile-nav-close{align-self:flex-end;min-width:44px;min-height:44px}.mobile-nav-link{flex-shrink:0;font-family:var(--serif);font-size:17px;padding:12px 4px;color:var(--ink);border-bottom:1px solid var(--hairline)}.mobile-nav-link-with-badge{display:flex;align-items:center;gap:6px}.mobile-nav-link.active{color:var(--accent-text);font-style:italic}.mobile-nav-search{display:flex;align-items:center;gap:10px;width:100%;font-family:var(--sans);font-size:14px;color:var(--ink-faint);background:var(--bg-subtle);border:1px solid var(--hairline);border-radius:6px;padding:10px 12px;margin-bottom:8px;text-align:left}.mobile-nav-search:hover{border-color:var(--hairline-strong);color:var(--ink)}@media (max-width: 880px){.nav,.search-trigger,.app-header .header-feedback-link{display:none}.mobile-menu-btn,.mobile-search-btn{display:inline-flex}}@media (max-width: 640px){.app-header-inner,.brand{gap:8px}.brand-mark{width:20px;height:20px}.brand-name{font-size:18px}.header-bookmark-btn{display:none}.app-header .hf-signin-btn{width:36px;height:36px;padding:0;gap:0;justify-content:center;flex-shrink:0}.app-header .hf-signin-btn>span{display:none}}@media (max-width: 880px){.app-header-inner{padding:14px 16px;gap:12px}.page{padding:24px 16px}.layout-with-sidebar{grid-template-columns:1fr;gap:24px}.layout-with-sidebar .sidebar{position:static;top:auto}.detail-title{font-size:28px}}@media (max-width: 640px){.app-header-inner{padding:12px 14px;gap:8px}.page{padding:20px 14px}.detail-title{font-size:24px}.brand-name{font-size:17px}}.access-request-page{min-height:100vh;min-height:100svh;display:grid;place-items:center;padding:32px 20px;background:radial-gradient(circle at 50% 8%,color-mix(in srgb,var(--accent-soft) 60%,transparent),transparent 42%),var(--bg)}.access-request-card{width:min(100%,470px);padding:38px;border:1px solid var(--hairline);border-radius:12px;background:color-mix(in srgb,var(--bg-elevated) 94%,transparent);box-shadow:0 20px 60px #1a181414}.access-request-brand{display:inline-flex;align-items:center;gap:10px;margin-bottom:42px;font-family:var(--serif)}.access-request-heading h1,.access-request-success h1{margin-bottom:12px;font-family:var(--serif);font-size:clamp(36px,8vw,48px);font-weight:500;line-height:1;letter-spacing:-.035em}.access-request-heading>p:last-child,.access-request-success p,.access-request-signin>p{color:var(--ink-soft);font-size:15px;line-height:1.65}.access-request-eyebrow{margin-bottom:10px;color:var(--accent-text);font-size:11px;font-weight:700;letter-spacing:.12em;text-transform:uppercase}.access-request-form,.access-request-signin{margin-top:30px}.access-request-form label{display:block;margin-bottom:8px;font-size:12px;font-weight:600}.access-request-input-wrap{display:flex;align-items:center;border:1px solid var(--hairline-strong);border-radius:7px;background:var(--bg);color:var(--ink-faint);transition:border-color .15s,box-shadow .15s}.access-request-input-wrap:focus-within{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-soft)}.access-request-input-wrap>span{padding-left:13px;font-size:15px}.access-request-input-wrap input{width:100%;padding:11px 13px 11px 3px;border:0;outline:0;background:transparent;color:var(--ink);font:500 14px var(--sans)}.access-request-verified{margin-top:7px;color:var(--ink-faint);font-size:11px}.access-request-submit{width:100%;margin-top:20px;padding:12px 18px;border-radius:7px;background:var(--ink);color:var(--bg);font-size:13px;font-weight:600;transition:opacity .15s,transform .15s}.access-request-submit:hover:not(:disabled){transform:translateY(-1px)}.access-request-submit:disabled{cursor:wait;opacity:.6}.access-request-error{margin-top:12px;color:var(--negative-text);font-size:12px}.access-request-status{margin-top:30px;color:var(--ink-soft)}.access-request-signin .hf-signin-btn{margin-top:18px}.access-request-success svg{margin-bottom:24px;color:var(--positive-text)}@media (max-width: 520px){.access-request-card{padding:28px 24px}.access-request-brand{margin-bottom:34px}}.legal-page{max-width:880px;padding-bottom:72px;color:var(--ink-soft);font-family:var(--sans);font-size:15px;line-height:1.7}.legal-header{margin-bottom:34px;padding-bottom:24px;border-bottom:1px solid var(--hairline)}.legal-kicker{margin:0 0 6px;color:var(--accent-text);font-size:11px;font-weight:700;letter-spacing:.1em;text-transform:uppercase}.legal-header h1{margin:0;color:var(--ink);font-family:var(--serif);font-size:clamp(38px,6vw,56px);font-weight:500;letter-spacing:-.025em;line-height:1.05}.legal-effective-date{margin:12px 0 0;color:var(--ink-faint)}.legal-page section{margin-top:34px}.legal-page h2{margin:0 0 10px;color:var(--ink);font-family:var(--serif);font-size:25px;font-weight:600;line-height:1.25}.legal-page h3{margin:22px 0 6px;color:var(--ink);font-size:15px;font-weight:700}.legal-page p{margin:0 0 14px}.legal-page ul{margin:8px 0 16px;padding-left:22px}.legal-page li{margin:7px 0}.legal-page a{color:var(--accent-text);text-decoration:underline}.legal-page strong{color:var(--ink)}.feed-header{display:flex;align-items:flex-end;justify-content:space-between;margin-bottom:32px;gap:24px;flex-wrap:wrap}.feed-title{font-family:var(--serif);font-size:44px;font-weight:500;letter-spacing:-.025em;line-height:1}.feed-title em{font-style:italic;font-weight:400;color:var(--accent)}.feed-subtitle{font-size:13px;color:var(--ink-soft);margin-top:8px;font-family:var(--serif);font-style:italic}.conference-deadlines-link{font-size:16px;color:var(--ink-soft);margin-top:12px}.trend-chart{margin:0;width:100%}.trend-chart-visual{position:relative;min-width:0}.trend-chart-table{margin-top:10px}.feedback-link{display:inline-flex;align-items:center;height:32px;padding:0 12px;border:1px solid var(--hairline);border-radius:6px;background:var(--bg-elevated);color:var(--ink-soft);font-size:13px;font-weight:500;white-space:nowrap;transition:border-color .15s,color .15s,background .15s}.feedback-link:hover{border-color:var(--hairline-strong);background:var(--bg-subtle);color:var(--ink)}.period-switch{display:flex;align-items:center;gap:2px;background:var(--bg-elevated);border:1px solid var(--hairline);border-radius:6px;padding:3px}.period-btn{padding:5px 12px;font-size:12px;font-weight:500;color:var(--ink-soft);border-radius:4px;transition:all .15s}.period-btn.active{background:var(--ink);color:var(--bg)}.period-btn:not(.active):hover{background:var(--bg-subtle);color:var(--ink)}.date-nav{display:flex;align-items:center;gap:12px;font-family:var(--mono);font-size:12px;color:var(--ink-soft)}.date-nav button{width:26px;height:26px;border:1px solid var(--hairline);border-radius:4px;display:flex;align-items:center;justify-content:center;background:var(--bg-elevated)}.date-nav button:hover{background:var(--bg-subtle)}.paper-list{display:flex;flex-direction:column}.paper-card{display:grid;grid-template-columns:170px 1fr;gap:28px;padding:24px 0;border-bottom:1px solid var(--hairline);align-items:stretch}.paper-thumb-wrap{transition:transform .15s;display:flex;align-items:flex-end;justify-content:flex-start}.paper-thumb-wrap:hover{transform:translateY(-2px)}.paper-thumb-skeleton{width:160px;height:220px}.paper-card:first-child{padding-top:0}.paper-rank{font-family:var(--serif);font-size:32px;font-weight:500;color:var(--ink-faint);font-feature-settings:"tnum";line-height:.9;font-style:italic}.paper-body{min-width:0;display:flex;align-items:stretch;gap:28px}.paper-body-main{min-width:0;flex:1}.paper-resources{display:flex;flex-direction:column;justify-content:center;align-items:center;gap:18px;flex:0 0 auto;width:92px;border-left:1px solid var(--hairline);padding-left:20px}.paper-resource{display:flex;flex-direction:column;align-items:center;gap:4px;color:inherit}a.paper-resource.is-link{text-decoration:none;cursor:pointer;border-radius:4px;transition:transform .15s}a.paper-resource.is-link:hover{transform:translateY(-1px)}a.paper-resource.is-link:hover .resource-value{text-decoration:underline;text-underline-offset:2px}a.paper-resource.is-link:focus-visible{outline:2px solid var(--ink);outline-offset:2px}.paper-resource .resource-stat{display:flex;flex-direction:column;align-items:center;gap:2px}.paper-resource .resource-value{display:inline-flex;align-items:center;gap:3px;font-family:var(--mono);font-size:14px;color:var(--ink);font-weight:500;font-variant-numeric:tabular-nums;letter-spacing:-.01em}.paper-resource .resource-label{font-family:var(--mono);font-size:10px;letter-spacing:.06em;text-transform:uppercase;color:var(--ink-faint)}.paper-resource .gh-rate-arrow{color:var(--accent-text);font-size:13px;transform:translateY(-.5px)}.paper-meta-line{display:flex;align-items:center;gap:12px;font-family:var(--mono);font-size:11px;color:var(--ink-faint);margin-bottom:6px}.paper-meta-line .sep{color:var(--hairline-strong)}.paper-title{font-family:var(--serif);font-size:22px;font-weight:500;line-height:1.2;letter-spacing:-.015em;margin-bottom:6px;color:var(--ink);cursor:pointer;text-wrap:pretty}.paper-title:hover{color:var(--accent-text)}.paper-organization-logos{display:inline-flex;align-items:center;gap:4px;margin-left:7px;vertical-align:-4px}.paper-organization-logo{display:inline-grid;width:24px;height:24px;flex:0 0 24px;place-items:center;overflow:hidden;border:1px solid var(--hairline);border-radius:4px;background:var(--bg)}.paper-organization-logo:hover{border-color:var(--hairline-strong)}.paper-organization-logo img{width:100%;height:100%;padding:2px;-o-object-fit:contain;object-fit:contain}.paper-authors{font-size:13px;color:var(--ink-soft);margin-bottom:10px;font-family:var(--serif)}.paper-authors a{color:inherit;text-decoration:none}.paper-authors a:hover{color:var(--accent-text);text-decoration:underline;text-underline-offset:2px}.paper-abstract{font-size:13.5px;color:var(--ink-soft);line-height:1.55;max-height:4.65em;margin-bottom:12px;font-family:var(--serif);text-wrap:pretty;display:-webkit-box;line-clamp:3;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}.paper-title mark,.paper-abstract mark{background:color-mix(in srgb,var(--accent) 24%,transparent);color:inherit;border-radius:2px;padding:0 1px}.search-results-end{padding:24px 0;text-align:center;color:var(--ink-faint);font:11px var(--mono)}.paper-tags{display:flex;flex-wrap:wrap;gap:6px}.paper-tags--clamped{--tag-row-height: 26px;max-height:calc(var(--tag-row-height) * 2 + 6px);overflow:hidden}.paper-sota{position:relative;white-space:nowrap;overflow:hidden;margin-bottom:12px;font-family:var(--mono);font-size:12px;line-height:1.6}.paper-sota-stack{margin-top:16px;padding-top:16px;border-top:1px solid var(--hairline)}.paper-sota-stack .paper-sota{margin-bottom:4px}.paper-sota-stack .paper-sota:last-child{margin-bottom:0}.paper-sota-measure{position:absolute;left:-9999px;top:0;visibility:hidden;white-space:pre;pointer-events:none}.paper-sota-label{font-weight:500;color:var(--ink-faint)}.paper-sota-label--sota{color:#b8860b}.paper-sota-sep,.paper-sota-on{color:var(--ink-faint)}.paper-sota-name{color:var(--accent-text)}.paper-sota-name:hover{text-decoration:underline}.paper-sota-more{font-size:11px;color:var(--ink-faint);cursor:pointer}.paper-sota-more:hover{color:var(--accent-text);text-decoration:underline}.paper-stats{display:flex;flex-direction:column;align-items:flex-end;gap:8px;font-family:var(--mono);font-size:11px;color:var(--ink-soft)}.upvote-btn{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:8px 14px;border:1px solid var(--hairline);border-radius:6px;background:var(--bg-elevated);font-family:var(--mono);font-size:13px;font-weight:500;min-width:56px;transition:all .15s}.upvote-btn:hover{border-color:var(--ink)}.upvote-btn.upvoted{background:var(--accent-soft);border-color:var(--accent);color:var(--accent-text)}.upvote-btn .arrow{font-size:9px;line-height:1;margin-bottom:2px}.upvote-btn .count{font-feature-settings:"tnum"}.stat-line{display:flex;align-items:center;gap:5px}.sort-bar{display:flex;align-items:center;justify-content:space-between;padding-bottom:16px;border-bottom:1px solid var(--hairline);margin-bottom:16px}.sort-options{display:flex;gap:4px}.sort-btn{padding:4px 10px;font-family:var(--mono);font-size:11px;font-weight:500;letter-spacing:.02em;color:var(--ink-soft);border-radius:4px;transition:all .15s;text-transform:lowercase}.sort-btn.active{background:var(--ink);color:var(--bg)}.sort-btn:not(.active):hover{background:var(--bg-subtle);color:var(--ink)}.paper-feed-toolbar-controls,.paper-feed-resource-controls,.paper-feed-filter-options{display:flex;align-items:center}.paper-feed-toolbar-controls{gap:14px;flex-wrap:wrap}.paper-feed-resource-controls{gap:10px}.paper-feed-resource-divider{width:1px;height:22px;background:var(--hairline)}.paper-feed-filter-options{gap:6px;flex-wrap:wrap}.paper-feed-filter{display:inline-flex;align-items:center;gap:6px;min-height:30px;padding:5px 10px;border:1px solid var(--hairline);border-radius:999px;background:var(--bg);color:var(--ink-soft);font-family:var(--mono);font-size:11px;letter-spacing:.01em;cursor:pointer;transition:border-color .15s,background .15s,color .15s}.paper-feed-filter-content{display:inline-flex;align-items:center;gap:6px}.paper-feed-filter:hover{border-color:var(--ink-faint);color:var(--ink)}.paper-feed-filter.active{border-color:var(--ink);background:var(--ink);color:var(--bg)}.paper-feed-filter:focus-visible{outline:2px solid var(--ink);outline-offset:2px}.paper-feed-filter-icon{display:inline-flex;color:currentColor;filter:grayscale(1)}.hf-resource-logo{position:relative;display:inline-flex;width:15px;height:15px}.hf-resource-logo img{position:absolute;top:0;right:0;bottom:0;left:0;display:block;width:15px;height:15px}.hf-resource-logo-white,.paper-feed-filter.active .hf-resource-logo-black{visibility:hidden}.paper-feed-filter.active .hf-resource-logo-white{visibility:visible}.paper-feed-filter-check{display:inline-flex;align-items:center;justify-content:center;width:17px;height:17px;border-radius:50%;background:color-mix(in srgb,var(--bg) 18%,transparent);color:currentColor;font-size:10px;line-height:1}.home-feed-sort-bar{flex-wrap:wrap;row-gap:10px}.results-count{font-family:var(--mono);font-size:11px;color:var(--ink-faint)}.paper-feed-scope-links{margin-top:12px;display:flex;flex-direction:column;align-items:flex-start;gap:8px}.paper-feed-primary-links,.paper-feed-task-tags{display:flex;flex-wrap:wrap;align-items:center;gap:10px}.papers-feed-layout-scoped{display:block}.paper-thumb{display:none}.papers-search-row{display:flex;margin-top:12px;margin-bottom:24px}.papers-search-input-wrap{display:flex;align-items:center;gap:8px;border:1px solid var(--hairline-strong);background:var(--bg-elevated);padding:10px 14px;border-radius:4px;flex:1;max-width:600px;color:var(--ink-faint)}.papers-search-input-wrap:focus-within{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-soft)}.papers-search-input{flex:1;border:none;outline:none;background:transparent;font-family:var(--sans);font-size:14px;color:var(--ink)}.papers-search-input::-moz-placeholder{color:var(--ink-faint)}.papers-search-input::placeholder{color:var(--ink-faint)}@media (max-width: 880px){.feed-title{font-size:32px}.paper-card{grid-template-columns:120px 1fr;gap:16px;padding:20px 0}.paper-body{flex-direction:column;align-items:stretch;gap:12px}.paper-resources{width:auto;flex-direction:row;align-items:center;justify-content:flex-start;gap:24px;border-left:none;border-top:1px solid var(--hairline);padding-left:0;padding-top:12px}.paper-resource{flex-direction:row;gap:8px}.paper-resource .resource-stat{align-items:flex-start}}@media (min-width: 641px) and (max-width: 880px){.paper-thumb-wrap{min-width:0}.paper-thumb-wrap>div{width:100%!important;max-width:120px;height:auto!important;aspect-ratio:160 / 220}.paper-thumb-wrap>div>img,.paper-thumb-wrap>div>svg{width:100%!important;height:100%!important}.paper-thumb-skeleton{width:100%;max-width:120px;height:auto;aspect-ratio:160 / 220}}@media (max-width: 640px){.feed-header{margin-bottom:24px;gap:16px}.feed-title{font-size:26px}.paper-card{grid-template-columns:1fr;gap:12px}.paper-resources{border-top:none;padding-top:0}.paper-thumb-wrap{align-self:flex-start}.paper-title{font-size:19px}.paper-abstract{max-height:6.2em;-webkit-line-clamp:4;line-clamp:4}}.sort-options-time{margin-left:auto}.sort-btn-time{text-transform:none}@media (max-width: 900px){.sort-bar{flex-wrap:wrap;gap:8px}.sort-options-time{margin-left:0}}@media (max-width: 560px){.paper-feed-resource-divider{display:none}.paper-feed-resource-controls{gap:0}}.paper-date-filter{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:4px}.paper-date-popover{width:min(760px,calc(100vw - 32px));max-width:760px;padding:14px 18px;max-height:calc(100vh - 24px);overflow-y:auto}.paper-date-popover-header{margin-bottom:8px}.paper-date-popover-header h2{margin:0;font-family:var(--serif);font-size:21px}.paper-date-popover-header p{margin:5px 0 0;color:var(--ink-soft)}.paper-date-navigation{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:36px;margin-bottom:-38px;pointer-events:none;position:relative;z-index:1}.paper-date-navigation-group{display:flex;justify-content:space-between}.paper-date-navigation button{pointer-events:auto}.paper-date-navigation button,.paper-date-actions button{border:1px solid var(--hairline);border-radius:6px;background:var(--bg-elevated);color:var(--ink);padding:7px 11px;font:inherit;cursor:pointer}.paper-date-calendars{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:36px}.paper-date-year{display:flex;align-items:center;justify-content:center;gap:8px;margin-bottom:6px;color:var(--ink-soft);font-size:13px;font-weight:600}.paper-date-year input{width:5.5rem;border:1px solid var(--hairline);border-radius:5px;background:var(--bg-elevated);color:var(--ink);padding:5px 7px;font:inherit}.paper-date-year input:focus-visible{outline:2px solid var(--accent);outline-offset:1px}.paper-date-calendar h3{margin:0 0 10px;text-align:center;font-family:var(--serif);font-size:17px}.paper-date-weekdays,.paper-date-days{display:grid;grid-template-columns:repeat(7,minmax(0,1fr))}.paper-date-weekdays span{padding:3px 0 4px;color:var(--ink-faint);text-align:center;font-size:11px;font-weight:600}.paper-date-day{width:28px;height:28px;justify-self:center;border:0;border-radius:999px;background:transparent;color:var(--ink);font:inherit;cursor:pointer}.paper-date-day:hover:not(:disabled),.paper-date-day:focus-visible{background:var(--bg-subtle);outline:2px solid var(--accent);outline-offset:-2px}.paper-date-day.in-range{border-radius:0;background:color-mix(in srgb,var(--accent) 14%,transparent)}.paper-date-day.selected{background:var(--accent);color:#fff;font-weight:700}.paper-date-day.today:not(.selected){box-shadow:inset 0 0 0 1px var(--accent)}.paper-date-day:disabled{color:var(--ink-faint);cursor:not-allowed;opacity:.42}.paper-date-day.outside{visibility:hidden}.paper-date-actions{display:flex;align-items:center;justify-content:space-between;gap:12px;padding-top:10px;border-top:1px solid var(--hairline)}.paper-date-actions>div{display:flex;gap:8px}.paper-date-actions .paper-date-clear{border-color:transparent;color:var(--ink-soft)}.paper-date-actions .paper-date-apply{border-color:var(--accent);background:var(--accent);color:#fff}.paper-date-actions button:disabled{cursor:not-allowed;opacity:.45}.paper-date-filter-single-calendar{justify-content:flex-start}.paper-date-popover-single-calendar{width:calc(100vw - 20px);padding:20px 14px}.paper-date-popover-single-calendar .paper-date-calendars,.paper-date-popover-single-calendar .paper-date-navigation{display:block}.paper-date-popover-single-calendar .paper-date-day{width:36px;height:36px}.organization-hero{display:grid;grid-template-columns:minmax(260px,.34fr) minmax(0,1fr);align-items:center;gap:48px;margin:24px 0 32px}.organization-hero-profile{min-width:0}.organization-hero-title{display:flex;align-items:center;gap:14px}.organization-hero-title img{flex:none;-o-object-fit:contain;object-fit:contain}.organization-hero-links{display:flex;flex-wrap:wrap;gap:12px;margin-top:12px}.organization-contributions{width:100%;min-width:0}.organization-contributions-header{margin-bottom:12px}.organization-contributions-title{font-family:var(--serif);font-size:20px;font-weight:600;line-height:1.2}.organization-contributions-summary{margin-top:3px;color:var(--ink-soft);font-size:12px}.organization-contributions-legend{display:flex;align-items:center;justify-content:flex-start;gap:4px;margin-top:8px;color:var(--ink-faint);font-family:var(--mono);font-size:10px;white-space:nowrap}.organization-contributions-legend span:first-child{margin-right:3px}.organization-contributions-legend span:last-child{margin-left:3px}.organization-contributions-scroll{width:calc(100% + 34px);max-width:none;margin-left:-34px;overflow-x:auto;padding:2px 0;scrollbar-width:thin;scrollbar-color:var(--hairline-strong) transparent}.organization-contributions-plot{display:grid;grid-template-columns:25px auto;gap:9px;margin:0}.organization-contributions-weekdays{display:grid;grid-template-rows:repeat(7,12px);gap:3px;padding-top:24px;color:var(--ink-faint);font-family:var(--mono);font-size:9px;line-height:12px;text-align:right}.organization-contributions-months{display:grid;gap:3px;height:20px;color:var(--ink-faint);font-family:var(--mono);font-size:9px;line-height:12px}.organization-contributions-months span{grid-row:1;white-space:nowrap}.organization-contributions-grid{display:grid;grid-template-rows:repeat(7,12px);grid-auto-flow:column;gap:3px}.organization-contribution-cell{display:block;width:12px;height:12px;border:1px solid color-mix(in srgb,var(--hairline) 78%,transparent);border-radius:2px;background:var(--bg-subtle)}.organization-contribution-cell.level-1{border-color:color-mix(in srgb,var(--positive-border) 60%,transparent);background:color-mix(in srgb,var(--positive-bg) 65%,var(--positive-border))}.organization-contribution-cell.level-2{border-color:transparent;background:color-mix(in srgb,var(--positive-text) 35%,var(--positive-bg))}.organization-contribution-cell.level-3{border-color:transparent;background:color-mix(in srgb,var(--positive-text) 60%,var(--positive-bg))}.organization-contribution-cell.level-4{border-color:transparent;background:var(--positive-text)}.organization-contribution-cell.is-outside{visibility:hidden}.organization-contributions-skeleton{width:100%;height:154px;border-radius:6px}@media (max-width: 960px){.organization-hero{grid-template-columns:1fr;align-items:start;gap:28px}.organization-contributions-plot{margin:0 auto}.organization-contributions-scroll{width:100%;max-width:100%;margin-left:0}.organization-contributions-legend{justify-content:center;width:min(100%,826px);margin:8px auto 0}}@media (max-width: 640px){.organization-hero{margin-bottom:28px}.organization-contributions{max-width:calc(100vw - 28px)}}.author-hero{margin:8px 0 20px}.author-hero-title{display:flex;align-items:center;gap:20px}.author-avatar{display:block;flex:none;border-radius:50%;border:1px solid var(--border);background:var(--surface);-o-object-fit:cover;object-fit:cover}@media (max-width: 640px){.author-avatar{width:64px;height:64px}}.author-hero .feed-subtitle a{color:var(--accent-text);text-decoration:none}.author-hero .feed-subtitle a:hover{text-decoration:underline;text-underline-offset:2px}.tag-chip{display:inline-flex;align-items:center;gap:5px;padding:3px 9px;font-family:var(--mono);font-size:11px;font-weight:500;border-radius:4px;cursor:pointer;transition:filter .15s,transform .15s;white-space:nowrap;border:1px solid transparent}.tag-chip:hover{filter:brightness(.96);transform:translateY(-1px)}.tag-chip .dot{width:5px;height:5px;border-radius:50%}.paper-tags--clamped .tag-chip{line-height:16px}.tag-hero{padding:48px 0 32px;border-bottom:1px solid var(--hairline);margin-bottom:32px}.tag-hero-eyebrow{font-family:var(--mono);font-size:11px;letter-spacing:.12em;text-transform:uppercase;color:var(--ink-faint);margin-bottom:12px;display:flex;align-items:center;gap:8px}.tag-hero-title{font-family:var(--serif);font-size:56px;font-weight:500;letter-spacing:-.025em;line-height:1;margin-bottom:16px;overflow-wrap:break-word}.tag-hero-meta{display:flex;gap:32px;margin-top:24px;font-family:var(--mono);font-size:12px;color:var(--ink-soft)}.tag-hero-meta .stat{display:flex;flex-direction:column;gap:4px}.tag-hero-meta .stat .label{font-size:10px;letter-spacing:.1em;text-transform:uppercase;color:var(--ink-faint)}.tag-hero-meta .stat .value{font-family:var(--serif);font-size:22px;font-weight:500;color:var(--ink)}.tag-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:0;border-top:1px solid var(--hairline)}.tag-cell{padding:20px 24px;border-bottom:1px solid var(--hairline);border-right:1px solid var(--hairline);cursor:pointer;transition:background .15s;display:flex;flex-direction:column;gap:8px}.tag-cell:nth-child(3n){border-right:none}.tag-cell:hover{background:var(--bg-elevated)}.tag-cell .name{font-family:var(--serif);font-size:18px;font-weight:500;display:flex;align-items:center;gap:8px}.tag-cell .name .dot{width:8px;height:8px;border-radius:50%}.tag-cell .meta{font-family:var(--mono);font-size:11px;color:var(--ink-faint);display:flex;gap:12px}.tag-hero-meta .stat .value small{margin-left:2px;font-family:var(--mono);font-size:10px;font-weight:500;color:var(--ink-faint)}.framework-category{margin-top:32px}.framework-category-head{display:flex;align-items:flex-start;justify-content:space-between;gap:24px;margin-bottom:16px}.framework-category-blurb{font-family:var(--serif);font-size:14px;line-height:1.55;color:var(--ink-soft);max-width:720px;margin:0}.framework-category-meta{font-family:var(--mono);font-size:11px;color:var(--ink-faint);white-space:nowrap}.framework-guide-link{display:inline-block;margin-top:8px;font-family:var(--mono);font-size:11px;color:var(--accent-text);text-decoration:none}.framework-guide-link:hover{text-decoration:underline}.framework-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:14px}.framework-card{border:1px solid var(--hairline);background:var(--bg-elevated);border-radius:6px;padding:18px 22px;scroll-margin-top:24px;display:flex;flex-direction:column;gap:12px;transition:border-color .15s}.framework-card:hover{border-color:var(--ink)}.framework-card-clickable{cursor:pointer}.framework-card-clickable:focus-visible{border-color:var(--ink);outline:2px solid var(--accent);outline-offset:2px}.framework-card-head{display:flex;justify-content:space-between;align-items:flex-start;gap:16px}.framework-card-name{font-family:var(--serif);font-size:20px;font-weight:500;letter-spacing:-.01em;margin:0;color:var(--ink)}.framework-card-org{font-family:var(--mono);font-size:11px;color:var(--ink-faint);margin-top:4px}.framework-platform-row{display:flex;flex-wrap:wrap;gap:6px;justify-content:flex-end}.framework-platform-chip{font-family:var(--mono);font-size:10px;letter-spacing:.03em;text-transform:uppercase;padding:3px 8px;border-radius:3px;white-space:nowrap}.framework-card-desc{font-family:var(--sans);font-size:14px;line-height:1.55;color:var(--ink-soft);margin:0}.framework-card-when{font-family:var(--serif);font-style:italic;font-size:13px;line-height:1.5;color:var(--ink-soft);padding-top:4px;border-top:1px solid var(--hairline)}.framework-card-when-label{display:block;font-family:var(--mono);font-size:10px;font-style:normal;letter-spacing:.06em;text-transform:uppercase;color:var(--ink-faint);margin-bottom:4px}.framework-card-links{display:flex;flex-wrap:wrap;gap:10px;margin-top:auto}.framework-link{display:inline-flex;align-items:center;gap:6px;font-family:var(--mono);font-size:11px;color:var(--accent-text);text-decoration:none;padding:4px 10px;border:1px solid var(--hairline);border-radius:4px;transition:border-color .15s,background .15s}.framework-link:hover{border-color:var(--ink);background:var(--bg-subtle)}.framework-link-disabled,.framework-link-disabled:hover{color:var(--ink-faint);background:transparent;border-color:var(--hairline);cursor:not-allowed}@media (max-width: 880px){.tag-grid{grid-template-columns:repeat(2,1fr)}.tag-cell:nth-child(3n){border-right:1px solid var(--hairline)}.tag-cell:nth-child(2n){border-right:none}.framework-category-head{flex-direction:column;gap:8px}.framework-card-head{flex-direction:column;gap:10px}.framework-platform-row{justify-content:flex-start}.tag-hero-title{font-size:40px}}@media (max-width: 640px){.tag-hero{padding:32px 0 24px;margin-bottom:24px}.tag-hero-title{font-size:30px}.tag-grid{grid-template-columns:1fr}.tag-cell{padding:16px;border-right:none!important}.framework-grid{grid-template-columns:1fr}.tag-hero-meta{gap:20px;flex-wrap:wrap}}.task-hero-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(320px,480px);gap:48px;align-items:start}.task-figure-card{background:var(--bg-elevated);border:1px solid var(--hairline);border-radius:6px;padding:16px 16px 12px;margin:0;box-shadow:0 1px #00000005}.task-figure-img-wrap{width:100%;background:var(--bg);border-radius:4px;overflow:hidden;line-height:0}.task-figure-img{width:100%;height:auto;display:block}.task-figure-card--compact .task-figure-img{width:50%;margin:0 auto}.task-figure-card figcaption{font-family:var(--serif);font-style:italic;font-size:12px;color:var(--ink-faint);text-align:center;margin-top:10px;border-top:1px solid var(--hairline);padding-top:10px}.task-image-credit{color:var(--ink-faint);font-family:var(--mono);font-size:10px;font-style:normal}.task-image-credit p{margin:0}.task-image-credit a{color:inherit;text-decoration:underline;text-underline-offset:2px}.task-image-credit a:hover{color:var(--accent-text)}@media (max-width: 900px){.task-hero-grid{grid-template-columns:1fr;gap:24px}}.taxonomy-suggestion-cell{-webkit-appearance:none;-moz-appearance:none;appearance:none;width:100%;border-top:0;border-left:0;background:transparent;color:var(--ink-soft);text-align:left}.taxonomy-suggestion-cell .name{font-style:italic}.taxonomy-suggestion-icon{width:14px;height:14px}.task-page-grid{display:grid;grid-template-columns:1fr 260px;gap:56px;align-items:start}.task-featured-collection{display:grid;grid-template-columns:1fr auto;gap:4px 24px;align-items:center;margin-top:32px;padding:18px 24px;border:1px solid var(--hairline);border-left:3px solid var(--accent);border-radius:6px;background:var(--bg-elevated);color:var(--ink);text-decoration:none;transition:border-color .15s}.task-featured-collection:hover{border-color:var(--accent)}.task-featured-collection-eyebrow{grid-column:1;font-family:var(--mono);font-size:10px;font-weight:600;letter-spacing:.12em;text-transform:uppercase;color:var(--accent-text)}.task-featured-collection strong{grid-column:1;font-family:var(--serif);font-size:22px;line-height:1.2}.task-featured-collection-description{grid-column:1;color:var(--ink-soft);font-size:14px;line-height:1.45}.task-featured-collection-meta{grid-column:2;grid-row:1 / span 3;display:inline-flex;align-items:center;gap:6px;font-family:var(--mono);font-size:11px;letter-spacing:.08em;text-transform:uppercase;color:var(--accent-text);white-space:nowrap}.medical-ai-hub{margin-top:32px;padding:24px;border:1px solid var(--hairline);border-top:3px solid var(--accent);border-radius:6px;background:var(--bg-elevated)}.medical-ai-hub-heading>span,.medical-ai-hub-card-eyebrow{display:block;font-family:var(--mono);font-size:10px;font-weight:600;letter-spacing:.12em;text-transform:uppercase;color:var(--accent-text)}.medical-ai-hub-heading h2{margin:6px 0 4px;font-family:var(--serif);font-size:26px;line-height:1.2;color:var(--ink)}.medical-ai-hub-heading p{margin:0;color:var(--ink-soft);font-size:14px}.medical-ai-hub-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-top:20px}.medical-ai-hub-card{display:flex;min-width:0;min-height:176px;flex-direction:column;padding:16px;border:1px solid var(--hairline);border-radius:5px;background:var(--bg);color:var(--ink);text-decoration:none;transition:border-color .15s,transform .15s}.medical-ai-hub-card:hover{border-color:var(--accent);transform:translateY(-2px)}.medical-ai-hub-card strong{margin-top:10px;font-family:var(--serif);font-size:18px;line-height:1.2}.medical-ai-hub-card-description{margin-top:8px;color:var(--ink-soft);font-size:13px;line-height:1.45}.medical-ai-hub-card-meta{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:auto;padding-top:16px;font-family:var(--mono);font-size:10px;letter-spacing:.04em;text-transform:uppercase;color:var(--ink-faint)}.task-explainer{font-family:var(--serif);font-size:17px;line-height:1.55;color:var(--ink);max-width:720px;margin-top:16px;margin-bottom:28px;text-wrap:pretty}.task-explainer p{margin:0 0 12px}.task-explainer p:last-child{margin-bottom:0}.task-explainer a{color:var(--accent-text);text-decoration:underline;text-underline-offset:2px;text-decoration-thickness:1px}.task-explainer a:hover{color:var(--accent)}.task-explainer strong{color:var(--ink);font-weight:600}.task-explainer em{font-style:italic}.task-explainer code{font-family:var(--mono);font-size:.9em;background:var(--bg-elevated);padding:1px 5px;border-radius:3px}.task-research-trends{max-width:760px;margin:-8px 0 28px;border-left:2px solid var(--accent);background:var(--bg-elevated)}.task-research-trends-item{border-bottom:0}.task-research-trends-trigger{padding:18px 20px;color:var(--accent-text)}.task-research-trends-trigger:hover{text-decoration:none}.task-research-trends-trigger svg{width:16px;height:16px}.task-research-trends-title{font-family:var(--mono);font-size:11px;font-weight:600;letter-spacing:.08em;text-transform:uppercase;color:var(--accent-text)}.task-research-trends-content{padding:0 20px 16px}.task-research-trends ul{margin:0;padding-left:19px}.task-research-trends li{padding-left:4px;font-family:var(--serif);font-size:15px;line-height:1.5;color:var(--ink)}.task-research-trends li+li{margin-top:8px}.task-research-trends li::marker{color:var(--accent-text)}.task-research-trends p{margin:0}.task-research-trends a{color:var(--accent-text);text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:2px}.task-quickstats{display:flex;gap:28px;font-family:var(--mono);font-size:11px;color:var(--ink-faint);letter-spacing:.05em;padding-bottom:14px;margin-bottom:0;border-bottom:1px solid var(--accent)}.task-quickstats .num{color:var(--ink);font-weight:600;font-size:12px;margin-right:5px;font-feature-settings:"tnum"}.task-framework-links{display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px;margin-top:14px}.task-framework-links-label{font-family:var(--mono);font-size:10px;letter-spacing:.12em;text-transform:uppercase;color:var(--ink-faint);font-weight:600}.task-framework-link{display:inline-flex;align-items:center;gap:6px;font-family:var(--mono);font-size:12px;color:var(--ink);text-decoration:none;padding:4px 10px;border:1px solid var(--hairline);border-radius:999px;background:var(--bg-elevated);transition:color .15s,border-color .15s}.task-framework-link:hover{color:var(--accent-text);border-color:var(--accent)}.task-framework-link-stars{color:var(--ink-faint);font-size:11px}.task-side{position:sticky;top:100px;font-size:13px}.side-block{margin-bottom:28px}.side-block-num{font-family:var(--mono);font-size:10px;color:var(--accent-text);letter-spacing:.1em;margin-bottom:4px}.side-block-label{font-family:var(--mono);font-size:12px;letter-spacing:.12em;text-transform:uppercase;color:var(--ink);font-weight:600;padding-bottom:8px;border-bottom:1px solid var(--hairline);margin-bottom:10px}.side-link-row{display:flex;justify-content:space-between;align-items:baseline;padding:5px 0;cursor:pointer;font-family:var(--serif);font-size:14px}.side-link-row:hover{color:var(--accent-text)}.side-link-row .count{font-family:var(--mono);font-size:11px;color:var(--ink-faint)}.side-domain-pill{font-family:var(--mono);font-size:11px;color:var(--accent-text);padding:6px 0}.side-method-row{display:flex;justify-content:space-between;align-items:center;padding:4px 0}.side-method-row .num{font-family:var(--mono);font-size:10.5px;color:var(--ink-faint)}.task-section-head{scroll-margin-top:96px;margin-top:28px;margin-bottom:14px}.task-section-eyebrow{font-family:var(--mono);font-size:10px;letter-spacing:.12em;text-transform:uppercase;color:var(--accent-text);margin-bottom:6px}.task-section-title{font-family:var(--mono);font-size:18px;font-weight:600;color:var(--ink);letter-spacing:.04em;text-transform:uppercase;display:flex;align-items:baseline;gap:10px}.task-section-title .meta{font-family:var(--mono);font-size:11px;color:var(--ink-faint);font-weight:400;letter-spacing:.05em;text-transform:none}.subtask-section{margin-bottom:24px}.subtask-section+.subtask-section{margin-top:8px}.subtask-head{display:flex;align-items:baseline;gap:10px;margin:18px 0 10px}.subtask-head-name{font-family:var(--mono);font-size:14px;font-weight:600;color:var(--ink);letter-spacing:.04em;text-transform:uppercase;text-decoration:none;transition:color .15s}.subtask-head-name:hover{color:var(--accent-text)}.subtask-head-meta{font-family:var(--mono);font-size:11px;color:var(--ink-faint);letter-spacing:.05em}.subtask-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;align-items:start}.subtask-grid .subtask-section{margin-bottom:0;border:1px solid var(--hairline);background:var(--bg-elevated);border-radius:6px;padding:12px 14px 10px}.subtask-grid .subtask-section+.subtask-section{margin-top:0}.subtask-grid .subtask-head{margin:0 0 8px;padding-bottom:8px;border-bottom:1px solid var(--hairline)}.subtask-grid .subtask-head-name{font-size:12px}.subtask-grid .subtask-head-meta{font-size:10px}.subtask-summary{display:flex;flex-direction:column;gap:7px;min-height:86px;color:var(--ink-soft);text-decoration:none;font-family:var(--mono);font-size:10px;line-height:1.4;letter-spacing:.05em;text-transform:uppercase}.subtask-summary:hover{color:var(--ink)}.subtask-summary-desc{display:-webkit-box;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:3;font-family:var(--serif);font-size:13px;line-height:1.35;letter-spacing:0;text-transform:none;color:var(--ink-soft)}.subtask-grid .bench-row{display:grid;grid-template-columns:22px 1fr 16px;gap:10px;align-items:center;border:0;background:transparent;border-radius:0;padding:8px 0;margin-bottom:0;border-bottom:1px dashed var(--hairline);transition:none}.subtask-grid .bench-row:last-of-type{border-bottom:0}.subtask-grid .bench-row:hover{border-color:transparent}.subtask-grid .bench-row:hover .bench-row-name{color:var(--accent-text)}.subtask-grid .bench-row-num{font-size:10px}.subtask-grid .bench-row-name{font-size:13.5px;margin-bottom:2px;line-height:1.2}.subtask-grid .bench-row-sub{font-size:9.5px;letter-spacing:.06em}.subtask-grid .bench-row-arrow{font-size:14px}.subtask-grid .bench-show-more{font-size:10px;padding:6px 0 0;margin-top:2px}.bench-card{border:1px solid var(--hairline);background:var(--bg-elevated);border-radius:6px;padding:18px 22px;margin-bottom:14px;cursor:pointer;transition:border-color .15s}.bench-card:hover{border-color:var(--ink)}.bench-head{display:flex;justify-content:space-between;align-items:baseline;margin-bottom:14px;gap:16px}.bench-name{font-family:var(--mono);font-size:14px;font-weight:600;letter-spacing:.02em;text-transform:uppercase;color:var(--ink)}.bench-sub{font-family:var(--mono);font-size:10px;letter-spacing:.1em;text-transform:uppercase;color:var(--ink-faint);margin-top:4px}.bench-sota-value{font-family:var(--serif);font-size:36px;font-weight:500;color:var(--accent);font-feature-settings:"tnum";line-height:1}.bench-sota-tag{font-family:var(--mono);font-size:10px;letter-spacing:.08em;text-transform:uppercase;color:var(--ink-faint);text-align:right;margin-top:4px}.bench-task-tag{font-family:var(--mono);font-size:10px;letter-spacing:.08em;text-transform:uppercase;color:var(--accent-text)}.domain-mega-title{font-family:var(--mono);font-size:56px;font-weight:600;letter-spacing:-.01em;line-height:1;text-transform:uppercase;margin-bottom:0;color:var(--ink);overflow-wrap:break-word}.benchmark-trend-table{border-top:1px solid var(--hairline)}.benchmark-trend-head,.benchmark-trend-row{display:grid;grid-template-columns:124px minmax(150px,.8fr) minmax(150px,.9fr) minmax(200px,1.3fr) 44px 78px;gap:20px;align-items:center}.benchmark-trend-head{padding:9px 16px;border-bottom:1px solid var(--hairline);font-family:var(--mono);font-size:9.5px;font-weight:600;letter-spacing:.1em;text-transform:uppercase;color:var(--ink-faint)}.benchmark-trend-row{min-height:92px;padding:12px 16px;border-bottom:1px solid var(--hairline);background:transparent;transition:background .15s,border-color .15s}.benchmark-trend-row:hover{background:var(--bg-elevated);border-color:var(--hairline-strong)}.benchmark-trend-row:hover .bench-row-name{color:var(--accent-text)}.benchmark-trend-cell{min-width:0}.benchmark-trend-sparkline{display:block;width:112px;height:42px;overflow:visible}.benchmark-trend-axis{stroke:var(--hairline-strong);stroke-width:.8;stroke-dasharray:1.5 2.5;vector-effect:non-scaling-stroke}.benchmark-trend-area{fill:var(--accent-soft);opacity:.68}.benchmark-trend-line{fill:none;stroke:var(--accent);stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round;vector-effect:non-scaling-stroke}.benchmark-trend-dot{fill:var(--bg-elevated);stroke:var(--accent);stroke-width:1.8;vector-effect:non-scaling-stroke}.benchmark-trend-point{cursor:crosshair;outline:none}.benchmark-trend-point-hit{fill:transparent}.benchmark-trend-point-mark{fill:var(--bg-elevated);stroke:var(--accent);stroke-width:1.25;opacity:0;transition:opacity .12s,r .12s;vector-effect:non-scaling-stroke}.benchmark-trend-point:hover .benchmark-trend-point-mark,.benchmark-trend-point:focus .benchmark-trend-point-mark{opacity:1;r:2.3px}.benchmark-trend-tooltip rect{fill:var(--ink);opacity:.94}.benchmark-trend-tooltip text{fill:var(--bg);font-family:var(--mono);font-size:3.2px;letter-spacing:.01em}.benchmark-trend-tooltip .benchmark-trend-tooltip-value{font-weight:700}.benchmark-trend-meta{display:flex;align-items:center;gap:6px;margin-top:3px;font-family:var(--mono);font-size:8.5px;letter-spacing:.035em;color:var(--ink-faint);white-space:nowrap}.benchmark-trend-meta strong{color:var(--ink-soft);font-weight:600}.benchmark-trend-change{padding:1px 4px;border-radius:999px;font-size:8px;font-weight:600}.benchmark-trend-change.is-up,.benchmark-trend-change.is-new{color:var(--positive-text);background:var(--positive-bg)}.benchmark-trend-change.is-down{color:var(--negative-text);background:var(--negative-bg)}.benchmark-trend-benchmark{min-width:0}.benchmark-trend-row .bench-row-name{display:block;margin-bottom:5px}.benchmark-trend-row .bench-row-best{width:100%;justify-content:flex-start;text-align:left}.bench-row-best-empty{color:var(--ink-faint);font-family:var(--mono)}.bench-row-paper{min-width:0;font-family:var(--serif);font-size:14px;line-height:1.35}.bench-row-paper a{color:var(--accent-text)}.bench-row-paper a:hover{text-decoration:underline}.bench-row-code{display:flex;justify-content:center}.bench-row-code a{display:inline-flex;color:var(--ink-soft);transition:color .15s,transform .15s}.bench-row-code a:hover{color:var(--accent-text);transform:translateY(-1px)}.bench-row-compare{display:flex;justify-content:center}.bench-row-compare a{display:inline-flex;align-items:center;justify-content:center;gap:5px;min-height:30px;padding:0 10px;border:1px solid var(--accent);border-radius:999px;color:var(--accent-text);font-family:var(--mono);font-size:9px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;white-space:nowrap;transition:color .15s,background .15s}.bench-row-compare a svg{transition:transform .15s}.bench-row-compare a:hover{color:var(--bg);background:var(--accent)}.bench-row-compare a:hover svg{transform:translate(2px)}.bench-row-compare a:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.bench-row{display:grid;grid-template-columns:36px 1fr auto 28px;gap:18px;align-items:center;padding:16px 18px;border:1px solid var(--hairline);background:var(--bg-elevated);border-radius:6px;margin-bottom:8px;cursor:pointer;transition:border-color .15s,transform .15s}.bench-row:hover{border-color:var(--ink)}.bench-row:hover .bench-row-arrow{color:var(--accent-text);transform:translate(3px)}.bench-row-num{font-family:var(--mono);font-size:11px;color:var(--ink-faint);letter-spacing:.05em;font-feature-settings:"tnum"}.bench-row-name{font-family:var(--serif);font-size:18px;font-weight:500;color:var(--ink);letter-spacing:-.005em;margin-bottom:4px}.bench-row-sub{display:flex;align-items:center;gap:8px;font-family:var(--mono);font-size:10px;letter-spacing:.08em;text-transform:uppercase;color:var(--ink-faint)}.bench-row-sub strong{color:var(--ink-soft);font-weight:600}.bench-row-variants{display:flex;flex-wrap:wrap;gap:4px;margin:2px 0 6px}.bench-row-variant{font-family:var(--mono);font-size:9.5px;letter-spacing:.02em;white-space:nowrap;padding:1px 5px;border:1px solid var(--hairline);border-radius:3px;background:transparent;color:var(--ink-faint);cursor:pointer;transition:border-color .15s,color .15s}.bench-row-variant:hover{border-color:var(--ink);color:var(--ink)}.bench-row-variant[aria-pressed=true]{border-color:var(--accent);color:var(--accent-text)}.bench-row-variant:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.bench-row-sub .dot-sep{color:var(--hairline-strong)}.bench-row-sota{text-align:right}.bench-row-sota-value{font-family:var(--serif);font-size:22px;font-weight:500;color:var(--accent-text);font-feature-settings:"tnum";line-height:1}.bench-row-sota-tag{font-family:var(--mono);font-size:9.5px;letter-spacing:.08em;text-transform:uppercase;color:var(--ink-faint);margin-top:4px}.bench-row-arrow{font-family:var(--serif);font-size:18px;color:var(--hairline-strong);text-align:center;transition:color .15s,transform .15s}.bench-row-best{display:flex;align-items:center;justify-content:flex-end;gap:6px;max-width:240px;text-align:right}.bench-row-best-icon{color:var(--accent-text);flex:0 0 auto}.bench-row-best-name{font-family:var(--serif);font-size:14px;color:var(--ink-soft);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.bench-show-more{font-family:var(--mono);font-size:11px;letter-spacing:.05em;color:var(--ink-faint);background:transparent;border:0;padding:8px 2px 2px;margin-top:4px;cursor:pointer;text-transform:lowercase;transition:color .15s}.bench-show-more:hover{color:var(--accent-text)}.bm-action-btn{display:inline-flex;align-items:center;gap:8px;padding:8px 14px;border:1px solid var(--hairline);border-radius:6px;background:var(--bg-elevated);font-family:var(--sans);font-size:13px;font-style:normal;color:var(--ink);cursor:pointer;transition:border-color .15s}.bm-action-btn:hover{border-color:var(--ink)}.bm-action-btn svg{display:block}@media (max-width: 880px){.task-page-grid{grid-template-columns:1fr;gap:32px}.task-side{position:static;top:auto;order:-1}.subtask-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.medical-ai-hub-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.domain-mega-title{font-size:40px}.bench-row{grid-template-columns:28px 1fr auto;gap:12px;padding:14px}.bench-row>.bench-row-arrow{display:none}.bench-row-best{max-width:130px}.bench-row-best-name{font-size:12.5px}.benchmark-trend-head,.benchmark-trend-row{grid-template-columns:112px minmax(130px,.8fr) minmax(120px,.8fr) minmax(160px,1.2fr) 36px 72px;gap:14px}.benchmark-trend-sparkline{width:104px}}@media (max-width: 640px){.domain-mega-title{font-size:30px}.subtask-grid{grid-template-columns:1fr}.medical-ai-hub{padding:18px}.task-featured-collection{grid-template-columns:1fr;padding:16px 18px}.task-featured-collection-meta{grid-column:1;grid-row:auto;margin-top:8px}.medical-ai-hub-grid{grid-template-columns:1fr}.medical-ai-hub-card{min-height:0}.benchmark-trend-head{display:none}.benchmark-trend-row{grid-template-columns:100px minmax(0,1fr) 28px;grid-template-areas:"trend benchmark code" "trend best code" "trend paper paper" "trend compare compare";gap:4px 12px;min-height:120px;padding:12px 4px}.benchmark-trend-cell{grid-area:trend}.benchmark-trend-benchmark{grid-area:benchmark}.benchmark-trend-row .bench-row-best{grid-area:best;justify-content:flex-start;max-width:none;text-align:left}.benchmark-trend-row .bench-row-paper{grid-area:paper}.benchmark-trend-row .bench-row-code{grid-area:code}.benchmark-trend-row .bench-row-compare{grid-area:compare;justify-content:flex-start;margin-top:4px}.bench-row-compare a{min-height:26px;padding:0 9px;font-size:8.5px}.benchmark-trend-sparkline{width:96px}.benchmark-trend-meta{flex-wrap:wrap;gap:3px;white-space:normal}.task-quickstats{flex-wrap:wrap;gap:16px}}.paper-meta-line .arxiv-id{color:var(--accent-text)}.paper-authors .institution{font-style:italic;color:var(--ink-faint)}.paper-tags--clamped .method-chip{line-height:16px}.method-hero-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(360px,560px);gap:56px;align-items:start}.method-hero-grid--wide-figure{grid-template-columns:minmax(0,1fr) minmax(480px,640px)}.method-figure-card{background:var(--bg-elevated);border:1px solid var(--hairline);border-radius:6px;padding:16px 16px 12px;margin:0;box-shadow:0 1px #00000005;align-self:center}.method-figure-svg{width:100%;display:block}.method-figure-svg--schematic{aspect-ratio:360 / 420}.method-figure-img{width:100%;height:auto;display:block}.method-figure-svg--compact .method-figure-img{width:50%;margin:0 auto}.method-figure-svg--scaled-80 .method-figure-img{width:80%;margin:0 auto}.method-figure-card figcaption{font-family:var(--serif);font-style:italic;font-size:12px;color:var(--ink-faint);text-align:center;margin-top:10px;border-top:1px solid var(--hairline);padding-top:10px}.method-image-credit{color:var(--ink-faint);font-family:var(--mono);font-size:10px;font-style:normal}.method-image-credit p{margin:0}.method-image-credit a{color:inherit;text-decoration:underline;text-underline-offset:2px}.method-image-credit a:hover{color:var(--accent-text)}.method-description{font-family:var(--serif);font-size:17px;color:var(--ink-soft);max-width:720px;line-height:1.6;margin-top:16px;text-wrap:pretty}.method-description p{margin:0 0 12px}.method-description p:last-child{margin-bottom:0}.method-description a{color:var(--accent-text);text-decoration:underline;text-underline-offset:2px;text-decoration-thickness:1px}.method-description a:hover{color:var(--accent)}.method-description strong{color:var(--ink);font-weight:600}.method-description code{font-family:var(--mono);font-size:.9em;background:var(--bg-elevated);padding:1px 5px;border-radius:3px}.method-description ul,.method-description ol{padding-left:22px;margin:0 0 12px}.method-description ul{list-style-type:disc}.method-description ol{list-style-type:decimal}.method-description li{margin-bottom:4px}.method-description .katex-display{margin:14px 0;overflow-x:auto;overflow-y:hidden;padding:4px 0}.method-description .katex{font-size:1em}.method-source{margin-top:22px;display:flex;flex-direction:column;gap:6px;max-width:720px}.method-source-label{font-family:var(--mono);font-size:10px;letter-spacing:.14em;text-transform:uppercase;color:var(--ink-faint)}.method-source-link{display:flex;flex-direction:column;gap:2px;padding:12px 14px;background:var(--bg-elevated);border:1px solid var(--hairline);border-left:3px solid var(--accent-text);border-radius:3px;cursor:pointer;transition:background .12s,border-color .12s;text-decoration:none}.method-source-link:not(.is-static):hover{background:var(--bg-subtle);border-color:var(--hairline-strong);border-left-color:var(--accent)}.method-source-link.is-static{cursor:default}.method-source-title{font-family:var(--serif);font-size:17px;font-weight:500;color:var(--ink);letter-spacing:-.005em}.method-source-link:not(.is-static):hover .method-source-title{text-decoration:underline;text-underline-offset:3px;text-decoration-thickness:1px}.method-source-meta{font-family:var(--mono);font-size:11px;color:var(--ink-faint)}@media (max-width: 1024px){.method-hero-grid{grid-template-columns:1fr;gap:24px}.method-figure-card{max-width:560px}.method-hero-grid--wide-figure .method-figure-card{max-width:640px}}.method-hero-title{font-family:var(--mono);font-size:48px;letter-spacing:-.01em}.method-trending-icon{flex:0 0 auto;color:var(--accent-text);fill:color-mix(in srgb,var(--accent-text) 18%,transparent)}.method-trend-score{color:var(--accent-text);font-weight:600}.method-trend-panel{margin-top:20px;padding-top:14px;border-top:1px solid var(--hairline-strong)}.method-trend-header{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;margin-bottom:4px}.method-trend-eyebrow{margin-bottom:5px;font-family:var(--mono);font-size:10px;letter-spacing:.1em;text-transform:uppercase;color:var(--accent-text)}.method-trend-header p{margin:3px 0 0;font-family:var(--mono);font-size:11px;color:var(--ink-faint)}.method-trend-summary{display:flex;flex-direction:column;align-items:flex-end;flex:0 0 auto;font-family:var(--mono);font-size:10px;color:var(--ink-faint)}.method-trend-summary>strong{font-family:var(--serif);font-size:19px;font-weight:500;line-height:1;color:var(--ink)}.method-usage-chart-wrap{position:relative;width:100%}.method-usage-chart{display:block;width:100%;height:auto;overflow:visible}.method-usage-gridline{stroke:var(--hairline);stroke-width:1}.method-usage-y-label,.method-usage-x-label{fill:var(--ink-faint);font-family:var(--mono);font-size:9px}.method-usage-bar-hit{fill:transparent}.method-usage-bar-mark{fill:color-mix(in srgb,var(--accent-text) 48%,var(--bg));transition:fill .12s}.method-usage-bar.is-current .method-usage-bar-mark{opacity:.55}.method-usage-bar:hover .method-usage-bar-mark,.method-usage-bar:focus .method-usage-bar-mark,.method-usage-bar.is-active .method-usage-bar-mark{fill:var(--accent-text)}.method-usage-bar:focus{outline:none}.method-usage-tooltip{position:absolute;top:4px;right:8px;display:flex;gap:8px;padding:5px 8px;border:1px solid var(--hairline-strong);background:var(--bg);font-family:var(--mono);font-size:10px;color:var(--ink-soft);pointer-events:none}.method-trend-skeleton{margin-top:20px}.method-trend-note{margin:6px 0 0;color:var(--ink-faint);font-family:var(--mono);font-size:10px}@media (max-width: 640px){.method-trend-header{flex-direction:column;gap:12px}.method-trend-summary{align-items:flex-start}}.method-chip{display:inline-flex;align-items:center;padding:4px 10px;font-family:var(--mono);font-size:11px;font-weight:500;color:var(--ink);background:var(--bg-elevated);border:1px solid var(--hairline);border-radius:4px;cursor:pointer;transition:all .15s;white-space:nowrap}.method-chip:hover{border-color:var(--ink);background:var(--bg-subtle)}.side-method-row .method-chip{font-size:10.5px;padding:3px 8px}@media (max-width: 880px){.method-hero-title{font-size:40px}}@media (max-width: 640px){.method-hero-title{font-size:30px}}.filter-row{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin-bottom:24px;padding:12px 16px;border:1px solid var(--hairline);border-radius:8px;background:var(--bg-elevated)}.filter-row .label{margin-right:8px;color:var(--ink-faint);font-family:var(--mono);font-size:10px;letter-spacing:.1em;text-transform:uppercase}.search-overlay{position:fixed;top:0;right:0;bottom:0;left:0;background:#1a181466;-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px);z-index:100;display:flex;align-items:flex-start;justify-content:center;padding-top:100px}.search-modal{width:640px;max-width:calc(100vw - 32px);background:var(--bg);border:1px solid var(--hairline-strong);border-radius:12px;box-shadow:0 20px 60px #00000026;overflow:hidden}.search-modal-input{width:100%;padding:18px 20px;font-size:16px;font-family:var(--serif);border:none;background:transparent;outline:none;border-bottom:1px solid var(--hairline);color:var(--ink)}.search-modal-input::-moz-placeholder{color:var(--ink-faint);font-style:italic}.search-modal-input::placeholder{color:var(--ink-faint);font-style:italic}.search-results{max-height:480px;overflow-y:auto;padding:8px}.search-empty{padding:32px;text-align:center;color:var(--ink-faint);font-family:var(--serif);font-style:italic}.search-section-label{font-family:var(--mono);font-size:10px;letter-spacing:.12em;text-transform:uppercase;color:var(--ink-faint);padding:10px 12px 6px}.search-result{display:flex;flex-direction:column;padding:10px 12px;border-radius:6px;cursor:pointer;gap:4px}.search-result:hover,.search-result.focused{background:var(--bg-subtle)}.search-result-title{font-family:var(--serif);font-size:14.5px;font-weight:500;line-height:1.3}.search-result-meta{font-family:var(--mono);font-size:10.5px;color:var(--ink-faint);display:flex;gap:10px}.search-result-tag{display:flex;align-items:center;gap:8px;padding:8px 12px;border-radius:6px;cursor:pointer}.search-result-tag:hover,.search-result-tag.focused{background:var(--bg-subtle)}.search-result-tag .name{font-family:var(--mono);font-size:12px}.search-result-tag .count{margin-left:auto;font-family:var(--mono);font-size:10px;color:var(--ink-faint)}.search-view-all-row{width:100%;border:0;border-top:1px solid var(--hairline);background:var(--bg-subtle);color:var(--accent-text);padding:12px;text-align:left;font:600 11px var(--mono);cursor:pointer}.search-view-all-row:hover,.search-view-all-row:focus-visible{background:var(--bg-subtle);outline:2px solid var(--accent);outline-offset:-2px}@media (max-width: 640px){.search-modal-input{font-size:16px;padding:14px 16px}}.search-ask-row{display:flex;align-items:center;gap:10px;width:100%;padding:10px 12px;border-radius:6px;text-align:left;color:var(--ink)}.search-ask-row:hover{background:var(--bg-subtle)}.search-ask-chip{display:inline-flex;align-items:center;font-family:var(--mono);font-size:10.5px;color:var(--accent-text);background:var(--accent-soft);border-radius:5px;padding:2px 7px;flex:none}.search-ask-text{flex:1;min-width:0;font-family:var(--serif);font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.search-ask-row kbd{font-family:var(--sans);font-size:11px;color:var(--ink-faint);border:1px solid var(--hairline);border-radius:5px;padding:1px 6px}.search-empty-sub{display:block;margin-top:10px;font-family:var(--sans);font-style:normal;font-size:12px;color:var(--ink-faint)}.settings-page-content,.settings-page-loading{min-height:min(680px,calc(100vh - 180px))}.settings-section{border:1px solid var(--hairline);border-radius:10px;padding:20px 22px;margin-top:8px;max-width:760px}.settings-section-title{font-size:12px;font-weight:600;text-transform:uppercase;letter-spacing:.06em;color:var(--ink-faint);margin:0 0 14px}.settings-note.settings-note-flush{margin-top:0;padding-top:0;border-top:0}.settings-billing-loading{color:var(--ink-soft);font-size:13px}.settings-billing,.settings-billing-connect{display:flex;flex-direction:column;gap:14px}.settings-provider-grid{display:grid;gap:14px}.settings-provider-card{display:flex;flex-direction:column;gap:14px;padding:16px;border:1px solid var(--hairline);border-radius:8px;background:var(--bg-subtle)}.settings-provider-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}.settings-provider-heading h3{margin:0;color:var(--ink);font-size:16px;font-weight:650}.settings-provider-heading p{margin:3px 0 0;color:var(--ink-soft);font-size:12px}.settings-usage-row{display:flex;flex-direction:column;gap:9px;padding:13px;border:1px solid var(--hairline);border-radius:7px;background:var(--bg-elevated)}.settings-usage-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}.settings-usage-heading strong{flex-shrink:0;color:var(--ink);font-size:14px}.settings-usage-track{height:7px;overflow:hidden;border-radius:999px;background:var(--hairline)}.settings-usage-track>span{display:block;height:100%;border-radius:inherit;background:var(--accent)}.settings-limit-note{margin:0;color:var(--danger, #b42318);font-size:12px;line-height:1.45}.settings-byok-controls{display:flex;flex-direction:column;gap:10px;padding-top:2px}.settings-byok-controls form{display:flex;flex-direction:column;gap:10px}.settings-byok-controls input{width:100%;border:1px solid var(--hairline-strong);border-radius:7px;padding:10px 12px;color:var(--ink);background:var(--bg-elevated);font:inherit}.settings-fallback-control{display:flex;align-items:flex-start;gap:11px;cursor:pointer}.settings-fallback-control>span{display:flex;flex-direction:column;gap:4px}.settings-fallback-control strong{color:var(--ink);font-size:12px;line-height:1.4}.settings-fallback-control small{color:var(--ink-soft);font-size:11px;line-height:1.45}.settings-plan-row{display:flex;justify-content:space-between;align-items:flex-start;gap:20px}.settings-connected-badge{border-radius:999px;padding:4px 9px;color:var(--accent-text);background:var(--accent-soft);font-size:11px;font-weight:600}.settings-billing-help{color:var(--ink-soft);font-size:11px;margin:0;line-height:1.5}.settings-billing-actions{display:flex;flex-wrap:wrap;gap:8px}.settings-billing-actions .button{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:34px;padding:7px 11px;border:1px solid var(--hairline-strong);border-radius:7px;color:var(--ink);background:var(--bg-elevated);font-size:12px;font-weight:600;text-decoration:none}.settings-billing-actions .button:hover{background:var(--bg-subtle)}.settings-billing-actions .button-primary{border-color:var(--accent);color:var(--accent-text);background:var(--accent-soft)}.settings-billing-actions .button:disabled{cursor:not-allowed;opacity:.55}.settings-billing-actions svg{width:12px;height:12px}.settings-token-label{color:var(--ink);font-size:12px;font-weight:600;margin-bottom:-8px}.settings-billing-connect input{width:100%;border:1px solid var(--hairline-strong);border-radius:7px;padding:10px 12px;color:var(--ink);background:var(--bg-elevated);font:inherit}.settings-billing-select{width:100%;min-height:42px;padding:9px 34px 9px 12px;border:1px solid var(--border);border-radius:7px;background:var(--bg-elevated);color:var(--ink);font:inherit}.settings-billing-select:focus{outline:2px solid var(--accent);outline-offset:1px}.settings-billing-select:disabled{cursor:wait;opacity:.7}.settings-billing-connect input:focus{border-color:var(--accent);outline:2px solid var(--accent-soft)}.settings-token-error{color:var(--danger, #b42318);font-size:12px}.theme-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.theme-option{display:flex;align-items:flex-start;gap:10px;min-width:0;padding:12px;border:1px solid var(--hairline);border-radius:7px;background:var(--bg-elevated);color:var(--ink-soft);text-align:left;transition:background .15s,border-color .15s,color .15s}.theme-option:hover{border-color:var(--hairline-strong);background:var(--bg-subtle);color:var(--ink)}.theme-option.is-selected{border-color:var(--accent);background:var(--accent-soft);color:var(--accent-text)}.theme-option:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.theme-option>svg{width:16px;height:16px;margin-top:1px;flex-shrink:0}.theme-option-copy{display:flex;flex-direction:column;gap:2px;min-width:0}.theme-option-label{color:var(--ink);font-size:13px;font-weight:600}.theme-option-desc{color:var(--ink-soft);font-size:11px;line-height:1.35}.theme-option.is-selected .theme-option-label,.theme-option.is-selected .theme-option-desc{color:var(--accent-text)}.settings-row{display:flex;align-items:flex-start;justify-content:space-between;gap:24px}.settings-row-text{display:flex;flex-direction:column;gap:4px;cursor:pointer}.settings-row-label{font-size:15px;font-weight:500;color:var(--ink)}.settings-row-desc{font-size:13px;color:var(--ink-soft);line-height:1.5;max-width:460px}.settings-note{margin-top:16px;padding-top:16px;border-top:1px solid var(--hairline);font-size:13px;color:var(--ink-soft);line-height:1.5}.settings-note-action{margin-top:10px}.research-section-heading{display:flex;align-items:baseline;justify-content:space-between;gap:16px}.research-section-heading .settings-section-title{display:inline-flex;align-items:center;gap:8px}.research-follow-count{border-radius:999px;padding:1px 7px;color:var(--ink-soft);background:var(--bg-subtle);font-size:11px;letter-spacing:0}.research-feed-link{display:inline-flex;align-items:center;gap:5px;flex-shrink:0;color:var(--accent-text);font-size:13px;font-weight:600;text-decoration:none}.research-feed-link:hover{text-decoration:underline;text-underline-offset:2px}.research-feed-link svg{width:14px;height:14px}.research-section-intro{margin:-6px 0 6px}.research-follow-group{margin-top:16px}.research-follow-group-title{display:flex;align-items:center;gap:6px;margin:0 0 6px;color:var(--ink-soft);font-size:12px;font-weight:600}.research-follow-group-title svg{width:14px;height:14px}.research-follow-list{margin:0;padding:0;list-style:none;border:1px solid var(--hairline);border-radius:8px;background:var(--bg-elevated)}.research-follow-row{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:52px;padding:8px 8px 8px 14px}.research-follow-row+.research-follow-row{border-top:1px solid var(--hairline)}.research-follow-text{display:flex;flex-direction:column;gap:1px;min-width:0}.research-follow-text a{overflow:hidden;color:var(--ink);font-size:14px;font-weight:500;text-overflow:ellipsis;white-space:nowrap;text-decoration:none}.research-follow-text a:hover{color:var(--accent-text);text-decoration:underline;text-underline-offset:2px}.research-follow-text span{color:var(--ink-faint);font-size:12px}.research-follow-row.is-unfollowed .research-follow-text a{color:var(--ink-faint);text-decoration:line-through}.research-follow-action{flex-shrink:0;min-height:30px;padding:5px 10px;border:1px solid transparent;border-radius:6px;color:var(--ink-soft);background:transparent;font-size:12px;font-weight:600}.research-follow-action:hover{border-color:var(--hairline-strong);color:var(--danger, #b42318);background:var(--bg-subtle)}.research-follow-action.is-refollow{border-color:var(--accent);color:var(--accent-text);background:var(--accent-soft)}.research-follow-action:disabled{cursor:wait;opacity:.55}.research-follow-action:focus-visible{outline:2px solid var(--accent);outline-offset:1px}.research-follow-empty{margin-top:14px;padding:18px;border:1px dashed var(--hairline-strong);border-radius:8px;color:var(--ink-soft);font-size:13px;line-height:1.5}.research-follow-empty p{margin:0}.research-follow-empty strong{color:var(--ink);font-weight:600}.research-follow-browse{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}.research-follow-browse a{display:inline-flex;align-items:center;gap:6px;padding:6px 10px;border:1px solid var(--hairline-strong);border-radius:7px;color:var(--ink);background:var(--bg-elevated);font-size:12px;font-weight:600;text-decoration:none}.research-follow-browse a:hover{background:var(--bg-subtle)}.research-follow-browse svg{width:13px;height:13px}.research-email-destination{display:flex;flex-wrap:wrap;align-items:center;gap:8px 10px;margin-top:16px;padding:10px 12px;border:1px solid var(--hairline);border-radius:8px;color:var(--ink-soft);background:var(--bg-subtle);font-size:13px}.research-email-destination>svg{width:15px;height:15px;flex-shrink:0}.research-email-destination strong{color:var(--ink);font-weight:600;overflow-wrap:anywhere}.research-email-destination>span{flex:1 1 220px}.research-email-destination a{color:var(--accent-text);font-size:12px;font-weight:600;text-decoration:none}.research-email-destination a:hover{text-decoration:underline;text-underline-offset:2px}.research-email-status{margin:10px 0 0;color:var(--ink-soft);font-size:12px;line-height:1.5}.research-email-status.is-warning{color:var(--danger, #b42318)}.closed-eval-tooltip-link,.external-eval-tooltip-link{font-weight:600;text-decoration:underline;text-underline-offset:2px}@media (max-width: 640px){.theme-options{grid-template-columns:1fr}}.research-follow{display:flex;flex-wrap:wrap;align-items:center;gap:6px 12px;margin:14px 0 18px}.research-follow-btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-width:112px;min-height:36px;padding:7px 16px 7px 13px;border:1px solid var(--accent);border-radius:999px;color:var(--bg);background:var(--accent);font-family:var(--sans);font-size:14px;font-weight:600;line-height:1;text-decoration:none;cursor:pointer;box-shadow:0 1px 2px #00000014;transition:background .15s,border-color .15s,color .15s,filter .15s}.research-follow-btn:hover{filter:brightness(1.1)}.research-follow-btn:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.research-follow-btn:disabled{cursor:wait;opacity:.6}.research-follow-btn svg{width:16px;height:16px;flex-shrink:0}.research-follow-btn.is-following{border-color:var(--hairline-strong);color:var(--ink);background:var(--bg-elevated);box-shadow:none}.research-follow-btn.is-following svg{color:var(--accent-text)}.research-follow-label-hover{display:none}@media (hover: hover){.research-follow-btn.is-following:hover{filter:none;border-color:var(--danger, #b42318);color:var(--danger, #b42318)}.research-follow-btn.is-following:hover svg,.research-follow-btn.is-following:hover .research-follow-label{display:none}.research-follow-btn.is-following:hover .research-follow-label-hover{display:inline}}.research-follow-hint{color:var(--ink-soft);font-family:var(--sans);font-size:13px;line-height:1.4}.research-follow-hint a{color:var(--accent-text);font-weight:600;text-decoration:none}.research-follow-hint a:hover{text-decoration:underline;text-underline-offset:2px}.research-follow-hint.is-error{color:var(--danger, #b42318)}.reader-route-shell{height:100dvh;min-height:0;display:flex;flex-direction:column;overflow:hidden}.reader-route-shell>.app-header{position:static;flex:0 0 auto}.reader-route-content{min-height:0;flex:1}.paper-reader-shell{height:100%;min-height:0;display:flex;flex-direction:column;background:var(--bg);color:var(--ink);overflow:hidden}.reader-workspace{position:relative;min-height:0;flex:1;display:flex;overflow:hidden}.reader-paper-pane,.reader-assistant-pane{min-width:0;min-height:0;display:flex;flex-direction:column;overflow:hidden}.reader-paper-pane{background:#fff;transition:width .24s cubic-bezier(.22,1,.36,1)}.reader-assistant-pane{visibility:visible;background:var(--bg);opacity:1;transform:translate(0);transition:width .24s cubic-bezier(.22,1,.36,1),opacity .18s ease,transform .24s cubic-bezier(.22,1,.36,1),visibility 0s}.reader-assistant-pane.is-collapsed{visibility:hidden;opacity:0;transform:translate(28px);pointer-events:none;transition:width .24s cubic-bezier(.22,1,.36,1),opacity .14s ease,transform .24s cubic-bezier(.22,1,.36,1),visibility 0s linear .24s}.reader-workspace.is-resizing{cursor:col-resize;-webkit-user-select:none;-moz-user-select:none;user-select:none}.reader-workspace.is-resizing .reader-paper-pane,.reader-workspace.is-resizing .reader-assistant-pane{transition:none}.reader-resize-handle{position:relative;z-index:5;width:1px;flex:0 0 1px;cursor:col-resize;background:var(--hairline-strong);touch-action:none;outline:none}.reader-resize-handle:before{content:"";position:absolute;top:0;right:-8px;bottom:0;left:0}.reader-resize-handle:focus-visible{box-shadow:0 0 0 2px var(--accent)}.reader-collapse-assistant{position:absolute;z-index:8;top:0;right:16px;height:48px;display:flex;align-items:center;border:0;padding:0;background:transparent;color:var(--ink);font-size:12px;line-height:1.5}.reader-workspace.is-assistant-collapsed .pdf-toolbar{padding-right:96px}.reader-tabs{height:40px;flex:0 0 auto;display:flex;border-bottom:1px solid var(--border);background:var(--surface)}.reader-tabs button{flex:1;border:0;border-bottom:2px solid transparent;background:transparent;color:var(--ink-muted)}.reader-tabs button[aria-selected=true]{border-bottom-color:var(--accent);color:var(--ink);font-weight:600}.reader-tab-pending{display:inline-block;width:7px;height:7px;margin-left:6px;border-radius:50%;background:var(--accent);vertical-align:1px}@media (forced-colors: active){.reader-tab-pending{border:1px solid ButtonText}}.reader-workspace .is-hidden{position:absolute!important;top:0;right:0;bottom:0;left:0;width:100%!important;visibility:hidden;pointer-events:none}.reader-workspace.is-tabs>.reader-paper-pane,.reader-workspace.is-tabs>.reader-assistant-pane{width:100%}.reader-status{min-height:100dvh;display:grid;place-content:center;gap:12px;text-align:center}.reader-chat-unavailable{height:100%;display:grid;place-content:center;color:var(--ink-muted);padding:24px;text-align:center}.pdf-viewer{min-height:0;flex:1;display:flex;flex-direction:column}.pdf-toolbar{position:relative;min-height:48px;flex:0 0 auto;display:flex;align-items:center;gap:16px;padding:7px 10px 7px var(--reader-title-inset, 32px);border-bottom:1px solid var(--hairline);background:var(--bg);color:var(--ink);font-size:12px}.pdf-toolbar-paper{min-width:0;flex:1;display:flex;align-items:center;gap:8px;overflow:hidden}.pdf-toolbar-back{flex:0 0 auto;min-height:30px;border:1px solid var(--hairline);border-radius:5px;padding:4px 8px;background:var(--bg-elevated);color:var(--ink);line-height:20px;text-decoration:none;white-space:nowrap}.pdf-toolbar-back:hover{border-color:var(--hairline-strong);background:var(--bg-subtle);color:var(--ink);text-decoration:none}.pdf-toolbar-title{min-width:0;overflow:hidden;color:var(--ink);font-size:14px;font-weight:600;text-overflow:ellipsis;white-space:nowrap}.pdf-toolbar-title:hover{color:var(--accent-text);text-decoration:underline;text-underline-offset:3px}.pdf-toolbar-resource{flex:0 0 auto;display:inline-flex;align-items:center;gap:4px;color:var(--ink-soft);font-size:11px;white-space:nowrap}.pdf-toolbar-resource:before{content:"|";margin-right:4px;color:var(--hairline-strong)}.pdf-toolbar-resource:hover{color:var(--ink);text-decoration:none}.pdf-toolbar-controls{flex:0 0 auto;display:flex;align-items:center;gap:10px}.pdf-toolbar-group{display:flex;align-items:center;gap:5px}.pdf-toolbar button,.pdf-toolbar-controls a{min-height:30px;border:1px solid var(--hairline);border-radius:5px;padding:4px 8px;background:var(--bg-elevated);color:var(--ink);text-decoration:none}.pdf-toolbar button:hover:not(:disabled),.pdf-toolbar-controls a:hover{border-color:var(--hairline-strong);background:var(--bg-subtle)}.pdf-toolbar button:focus-visible,.pdf-toolbar a:focus-visible,.pdf-search-controls input:focus-visible{outline:2px solid var(--accent);outline-offset:1px}.pdf-toolbar button:disabled{opacity:.45}.pdf-page-form{display:flex;align-items:center;gap:4px}.pdf-page-form input{width:32px;height:30px;-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield;border:1px solid var(--hairline);border-radius:5px;padding:0 3px;background:var(--bg-elevated);color:var(--ink);text-align:center}.pdf-page-form input::-webkit-inner-spin-button,.pdf-page-form input::-webkit-outer-spin-button{margin:0;-webkit-appearance:none;-moz-appearance:none;appearance:none}.pdf-zoom-value{width:52px;height:30px;border:1px solid transparent;border-radius:5px;padding:0 3px;background:transparent;color:var(--ink);text-align:center;font:inherit;font-variant-numeric:tabular-nums}.pdf-zoom-value:hover,.pdf-zoom-value:focus{border-color:var(--hairline);background:var(--bg-elevated)}.pdf-search-controls{position:absolute;z-index:10;right:8px;top:calc(100% + 5px);display:flex;align-items:center;gap:5px;padding:7px;border:1px solid var(--hairline);border-radius:6px;background:var(--bg-elevated);box-shadow:0 5px 20px #0003}.pdf-search-controls input{width:min(260px,45vw);min-height:30px;border:1px solid var(--hairline);border-radius:4px;padding:4px 7px;background:var(--bg);color:var(--ink)}.pdf-search-controls span{min-width:70px;color:var(--ink-soft);text-align:center}.pdf-search-controls button{display:inline-flex;align-items:center;justify-content:center}.pdf-scroll-frame{position:relative;min-height:0;flex:1;display:flex;flex-direction:column}.pdf-scroll{min-height:0;flex:1;overflow:auto;overscroll-behavior:contain;background:#fff;scrollbar-color:var(--ink-faint) var(--bg-subtle);scrollbar-gutter:stable}.pdf-scroll::-webkit-scrollbar{width:12px;height:12px}.pdf-scroll::-webkit-scrollbar-track{background:var(--bg-subtle)}.pdf-scroll::-webkit-scrollbar-thumb{border:3px solid var(--bg-subtle);border-radius:999px;background:var(--ink-faint)}.pdf-pages{display:flex;width:-moz-max-content;width:max-content;min-width:100%;flex-direction:column;align-items:center;gap:8px;zoom:var(--pdf-live-scale, 1)}.pdf-page{position:relative;background:#fff}.pdf-page-layer{zoom:var(--pdf-layer-scale, 1)}.pdf-page-layer.is-pending{position:absolute;top:0;left:0;visibility:hidden;pointer-events:none}.pdf-page .react-pdf__Page{margin:0}.pdf-page .textLayer ::-moz-selection{background:#2d7dff4d;color:transparent}.pdf-page .textLayer ::selection{background:#2d7dff4d;color:transparent}.pdf-search-highlight{border-radius:1px;background:#2d7dff57;color:inherit;box-shadow:0 0 0 1px #2d7dff2e}.pdf-search-highlight.is-active{background:#1c68ef85;box-shadow:0 0 0 1px #1c68ef57}.pdf-outline{position:absolute;z-index:9;top:0;right:14px;bottom:0;display:flex;align-items:center;pointer-events:none}.pdf-outline-rail{display:flex;flex-direction:column;align-items:flex-end;justify-content:center;gap:5px;max-height:100%;overflow:hidden;border:0;padding:12px 6px 12px 10px;background:transparent;cursor:pointer;pointer-events:auto}.pdf-outline-rail:focus-visible{outline:2px solid var(--accent);outline-offset:-2px;border-radius:6px}.pdf-outline-tick{display:block;width:18px;height:2px;border-radius:1px;background:var(--ink-faint);transition:background .12s ease,width .12s ease}.pdf-outline-tick.level-1{width:10px}.pdf-outline-tick.is-active{width:22px;background:var(--accent)}.pdf-outline-panel{position:absolute;right:100%;top:50%;width:min(320px,60vw);max-height:min(70vh,100%);overflow-y:auto;margin-right:-6px;padding:10px 6px;border:1px solid var(--hairline);border-radius:12px;background:var(--bg-elevated);color:var(--ink);box-shadow:0 8px 28px #0003;font-size:14px;line-height:1.35;opacity:0;visibility:hidden;transform:translate(6px,-50%);transition:opacity .12s ease,transform .12s ease,visibility 0s linear .12s;pointer-events:none}.pdf-outline:hover .pdf-outline-panel,.pdf-outline:focus-within .pdf-outline-panel,.pdf-outline.is-pinned .pdf-outline-panel{opacity:1;visibility:visible;transform:translateY(-50%);transition-delay:0s;pointer-events:auto}.pdf-outline-panel ol{margin:0;padding:0;list-style:none}.pdf-outline-panel li.level-1 a{padding-left:32px;font-size:13px;color:var(--ink-soft)}.pdf-outline-panel a{display:block;padding:7px 16px;border-radius:6px;color:var(--ink-muted);text-decoration:none;overflow-wrap:anywhere}.pdf-outline-panel a:hover{background:var(--bg-subtle);color:var(--ink);text-decoration:none}.pdf-outline-panel a:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}.pdf-outline-panel a[aria-current=location]{color:var(--accent-text);font-weight:600}@media (hover: none){.pdf-outline:hover:not(.is-pinned) .pdf-outline-panel{opacity:0;visibility:hidden;pointer-events:none}}@media (forced-colors: active){.pdf-outline-tick{background:ButtonText}.pdf-outline-tick.is-active{background:Highlight}}@media (prefers-reduced-motion: reduce){.pdf-outline-panel,.pdf-outline-tick{transition:none}}.pdf-loading,.pdf-error{min-height:50vh;display:grid;place-content:center;color:var(--ink);text-align:center;padding:24px}.pdf-error a,.pdf-error button{color:inherit}.chat-page--reader .chat-main{min-width:0}.chat-page--reader .chat-topbar{min-height:48px;padding:7px 112px 7px 20px}.chat-page--reader .chat-empty-inner{width:min(100%,560px);padding-inline:16px}.chat-page--reader .chat-examples{width:min(100%,300px);margin-inline:auto;flex-direction:column;align-items:stretch}.chat-page--reader .chat-example{width:100%}.chat-reader-action{border:0;background:transparent;color:var(--accent-text);text-decoration:none;font-size:12px;white-space:nowrap}@media (max-width: 880px){.pdf-toolbar{padding-left:16px}}@media (max-width: 640px){.pdf-zoom-value{display:none}.pdf-toolbar{gap:8px;overflow-x:auto;padding-left:14px}.pdf-toolbar-paper{min-width:150px}.pdf-toolbar-group{gap:3px}.pdf-toolbar button,.pdf-toolbar a{padding-inline:6px}}@media (forced-colors: active){.reader-resize-handle,.pdf-toolbar button,.pdf-toolbar a{border:1px solid ButtonText}}@media (prefers-reduced-motion: reduce){.paper-reader-shell *{scroll-behavior:auto!important}.reader-paper-pane,.reader-assistant-pane{transition-duration:.01ms!important}}.pdf-page .linkAnnotation>.pdf-paper-preview-link{position:absolute;top:0;right:0;bottom:0;left:0;display:block;width:100%;height:100%}.pdf-paper-preview-actions{display:flex;justify-content:space-between;gap:12px;padding:10px 14px;border-top:1px solid var(--hairline);font-size:12px}.pdf-paper-preview-actions a,.pdf-paper-preview-actions button{color:var(--accent)}.pdf-paper-preview-actions button{border:0;background:transparent;cursor:pointer;padding:0;font:inherit}.pdf-paper-preview-actions a:focus-visible,.pdf-paper-preview-actions button:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.saved-area-section{margin-top:28px}.saved-area-section:first-of-type{margin-top:4px}.saved-area-heading{font-family:var(--serif);font-size:22px;font-weight:500;color:var(--ink);margin:0 0 6px;padding-bottom:6px;border-bottom:1px solid var(--hairline-strong)}.saved-task-block{margin-top:16px}.saved-task-row{display:flex;align-items:center;gap:10px;margin-bottom:6px}.saved-task-count{font-size:12px;color:var(--ink-faint)}.saved-signin-panel{display:flex;justify-content:center;padding:80px 0}.saved-bucket-migration{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:24px;padding:14px 16px;border:1px solid var(--info-border);border-radius:6px;background:var(--info-bg);color:var(--info-text)}.saved-bucket-migration p{max-width:760px;font-size:13px;line-height:1.5}.saved-bucket-migration .hf-signin-btn{flex-shrink:0;max-width:100%;height:auto;min-height:36px;padding:8px 12px;white-space:normal;overflow-wrap:anywhere}@media (max-width: 700px){.saved-bucket-migration{align-items:flex-start;flex-direction:column}}.action-btn.is-saved{background:var(--ink);color:var(--bg);border-color:var(--ink)}.action-btn.is-saved:hover{background:color-mix(in oklch,var(--ink) 88%,var(--accent))}.ask-home-new{max-width:640px;margin:0 auto 6px;padding-left:9px;color:var(--ink-faint);font-size:14px;font-weight:700}.ask-home{position:relative;max-width:640px;margin:0 auto 36px;background:var(--bg-elevated);border:1px solid var(--hairline);border-radius:14px;box-shadow:0 1px 2px #1e1c140a,0 12px 34px -18px #1e1c1447;padding:8px}.ask-home-textarea-wrap{position:relative}.ask-home textarea{position:relative;z-index:1;width:100%;border:0;outline:0;resize:none;background:transparent;font-family:var(--serif);font-size:17px;line-height:1.45;color:transparent;caret-color:var(--ink);padding:12px 12px 4px}.ask-home textarea::-moz-placeholder{color:var(--ink-faint)}.ask-home textarea::placeholder{color:var(--ink-faint)}.ask-home-foot{display:flex;align-items:center;justify-content:space-between;padding:4px 6px 4px 12px}.ask-home-provider-tools{display:flex;align-items:center;gap:10px;flex-wrap:wrap}@media (max-width: 880px){.layout-with-sidebar>.sidebar,.layout-with-sidebar>.feed-main{display:contents}.feed-chat{order:1}.sidebar-section-top-domains{order:2}.sidebar-section-trending-domains{order:3}.feed-content{order:4}}.chat-page{position:relative;display:flex;overflow:hidden;background:var(--bg)}.chat-main{flex:1;display:flex;flex-direction:column;min-width:0;background:var(--bg)}.chat-topbar{display:flex;align-items:center;gap:14px;padding:10px 24px;border-bottom:1px solid var(--hairline)}.chat-topbar-title{flex:1;min-width:0;font-family:var(--serif);font-size:14px;color:var(--ink-soft);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.chat-empty{flex:1;display:flex;align-items:flex-start;justify-content:center;padding:40px 24px;overflow-y:auto}.chat-empty-inner{max-width:680px;width:100%;margin-block:auto;text-align:center}.chat-empty-eyebrow{font-family:var(--mono);font-size:11px;letter-spacing:.16em;text-transform:uppercase;color:var(--ink-faint);margin-bottom:18px}.chat-empty-title{font-family:var(--serif);font-weight:500;font-size:44px;line-height:1.05;letter-spacing:-.02em;margin-bottom:14px}.chat-empty-title em{font-style:italic;font-weight:400;color:var(--accent)}.chat-empty-sub{font-family:var(--serif);font-size:16px;line-height:1.5;color:var(--ink-soft);max-width:520px;margin:0 auto 26px;text-wrap:pretty}.chat-staging-access-note{max-width:560px;margin:-12px auto 18px;color:var(--ink-soft);font-size:13px;line-height:1.45}.chat-staging-badge{flex:none;border:1px solid color-mix(in oklch,var(--accent) 36%,var(--hairline));border-radius:999px;padding:3px 7px;color:var(--accent-text);background:color-mix(in oklch,var(--accent) 7%,var(--bg-elevated));font-family:var(--mono);font-size:10px;font-weight:700;letter-spacing:.08em;line-height:1;text-transform:uppercase}.chat-examples{display:flex;flex-wrap:wrap;gap:10px;justify-content:center;margin-top:24px}.chat-example{font-family:var(--serif);font-size:14px;color:var(--ink-soft);background:var(--bg-elevated);border:1px solid var(--hairline);border-radius:999px;padding:8px 16px;transition:border-color .15s,color .15s}.chat-example:hover{border-color:var(--hairline-strong);color:var(--ink)}.chat-paper-inline-highlight{color:var(--accent-text);text-decoration-line:underline;text-decoration-color:color-mix(in oklch,var(--accent) 40%,transparent);text-decoration-thickness:1px;text-underline-offset:2px}.chat-paper-inline-highlight.is-unavailable{color:var(--negative-text);text-decoration-color:var(--negative-border)}@media (max-width: 900px){.chat-empty-title{font-size:34px}}@media (forced-colors: active){.chat-paper-inline-highlight{outline:1px solid CanvasText}}@media (max-width: 560px){.chat-topbar{padding-inline:14px}}.chat-credits-notice{position:relative;display:flex;align-items:center;justify-content:center;min-height:28px;padding:5px 52px 6px;border-bottom:1px solid var(--hairline);background:var(--bg-subtle);color:var(--ink-soft);font-size:12px;line-height:16px;text-align:center}.chat-credits-notice-close{position:absolute;top:50%;right:20px;display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;padding:0;border:0;border-radius:4px;background:transparent;color:var(--ink-soft);font-size:16px;line-height:1;cursor:pointer;transform:translateY(-50%)}.chat-credits-notice-close:hover{background:var(--hairline);color:var(--ink)}.chat-credits-notice-close:focus-visible{outline:2px solid var(--accent-text);outline-offset:1px}.chat-sidebar{position:relative;width:var(--chat-sidebar-width, var(--app-leading-column-width));flex:none;background:var(--bg-subtle);border-right:1px solid var(--hairline);display:flex;flex-direction:column;transition:margin-left .2s ease}.chat-sidebar-resize-handle{position:absolute;top:0;right:-4px;bottom:0;z-index:2;width:8px;cursor:col-resize;touch-action:none}.chat-sidebar-resize-handle:after{content:"";position:absolute;top:0;right:3px;bottom:0;left:3px;background:var(--hairline-strong);opacity:0;transition:opacity .15s}.chat-sidebar-resize-handle:hover:after,.chat-sidebar-resize-handle:focus-visible:after{opacity:1}.chat-sidebar-resize-handle:focus-visible{outline:2px solid var(--link);outline-offset:-3px}.chat-sidebar-closed{margin-left:calc(-1 * (var(--chat-sidebar-width, var(--app-leading-column-width)) + 1px))}.chat-sidebar-top{display:flex;align-items:center;gap:8px;padding:14px 12px 8px}.chat-sidebar-top .icon-btn{flex:none}.chat-new-chat{flex:1;display:flex;align-items:center;justify-content:center;gap:8px;padding:9px;background:var(--bg-elevated);border:1px solid var(--hairline);border-radius:8px;font-size:13px;font-weight:500;color:var(--ink);transition:border-color .15s}.chat-new-chat:hover{border-color:var(--hairline-strong)}.chat-sessions{flex:1;overflow-y:auto;padding:4px 8px 20px}.chat-sessions-empty{padding:18px 10px;font-family:var(--serif);font-style:italic;font-size:13px;color:var(--ink-faint)}.chat-session-group{margin-top:14px}.chat-session-group-label{font-family:var(--mono);font-size:10px;letter-spacing:.12em;text-transform:uppercase;color:var(--ink-faint);padding:6px 10px}.chat-session{display:flex;align-items:center;gap:6px;width:100%;text-align:left;padding:7px 10px;border-radius:7px;font-size:13px;color:var(--ink-soft);transition:background .12s,color .12s}.chat-session:hover{background:var(--hairline);color:var(--ink)}.chat-session-active{background:var(--hairline);color:var(--ink);font-weight:500}.chat-session-title{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.chat-session-delete{display:inline-flex;align-items:center;color:var(--ink-faint);padding:2px;border-radius:4px;flex:none}.chat-session-delete:hover{color:var(--negative-text)}.chat-session-menu{display:inline-flex;border:0;background:transparent;color:inherit;cursor:pointer;padding:0 3px;font-size:17px;line-height:1}@media (hover: hover) and (pointer: fine){.chat-session-delete,.chat-session-menu{display:none}.chat-session:hover .chat-session-delete,.chat-session:hover .chat-session-menu,.chat-session:focus-within .chat-session-delete,.chat-session:focus-within .chat-session-menu{display:inline-flex}}.chat-session-title-input{min-width:0;flex:1;border:1px solid var(--border);border-radius:4px;background:var(--surface);color:var(--ink);font:inherit;padding:2px 4px}.chat-session-context-menu{position:fixed;z-index:1000;width:150px;padding:4px;border:1px solid var(--border);border-radius:7px;background:var(--surface);box-shadow:0 8px 24px #00000029}.chat-session-context-menu button{width:100%;border:0;border-radius:4px;background:transparent;color:var(--ink);padding:7px 9px;text-align:left;cursor:pointer}.chat-session-context-menu button:hover,.chat-session-context-menu button:focus{background:var(--hairline)}.chat-session-loading,.chat-session-load-error{flex:1;display:flex;align-items:center;justify-content:center;gap:10px;color:var(--ink-soft);font-family:var(--serif);font-size:14px}.chat-session-load-error{flex-direction:column}.chat-session-load-error p{margin:0}.chat-session-load-error button{border:1px solid var(--border);border-radius:5px;padding:7px 12px;background:var(--surface);color:var(--ink);cursor:pointer}.chat-session-load-error button:hover{background:var(--bg-subtle)}@media (max-width: 900px){.chat-sidebar{position:absolute;top:0;bottom:0;left:0;z-index:60;box-shadow:0 0 40px #0003;width:var(--app-leading-column-width)}.chat-sidebar-resize-handle{display:none}.chat-sidebar-closed{margin-left:0;transform:translate(-101%);box-shadow:none}}.chat-share-button{flex:none;display:inline-flex;align-items:center;gap:7px;min-height:34px;padding:6px 11px;border:1px solid var(--hairline-strong);border-radius:8px;background:var(--bg-elevated);color:var(--ink);font-size:13px;font-weight:600}.chat-share-button:hover:not(:disabled){background:var(--bg-subtle)}.chat-share-button:disabled{cursor:not-allowed;opacity:.55}.chat-share-button:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.chat-share-button svg{width:15px;height:15px}.chat-share-toast{position:fixed;top:18px;left:50%;width:min(420px,calc(100vw - 32px));transform:translate(-50%)}.chat-share-dialog-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:110;display:grid;place-items:center;padding:20px;background:#0000006b}.chat-share-dialog{width:min(520px,100%);padding:22px;border:1px solid var(--hairline-strong);border-radius:12px;background:var(--bg-elevated);box-shadow:0 18px 60px #00000038}.chat-share-dialog h2{margin:0 0 8px;font-family:var(--serif);font-size:21px}.chat-share-dialog p{margin:0 0 14px;color:var(--ink-soft)}.chat-share-dialog input{width:100%;padding:9px 10px;border:1px solid var(--hairline-strong);border-radius:7px;background:var(--bg);color:var(--ink);font-family:var(--mono);font-size:12px}.chat-share-dialog input:focus{outline:2px solid var(--accent);outline-offset:2px}.chat-share-dialog button{display:block;margin:16px 0 0 auto;padding:7px 14px;border-radius:7px;background:var(--accent);color:#fff;font-weight:600}@media (max-width: 560px){.chat-share-button{width:34px;padding:6px;justify-content:center}.chat-share-button span{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}}.chat-capacity-dialog-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:120;display:grid;place-items:center;padding:20px;background:#0000007a}.chat-capacity-dialog{width:min(500px,100%);padding:24px;border:1px solid var(--hairline-strong);border-radius:12px;background:var(--bg-elevated);box-shadow:0 18px 60px #0000003d}.chat-capacity-dialog h2{margin:0 0 9px;font-family:var(--serif);font-size:22px}.chat-capacity-dialog p{margin:0;color:var(--ink-soft);line-height:1.5}.chat-capacity-countdown{min-height:24px;padding-top:12px;font-size:13px}.chat-capacity-dialog-actions{display:flex;justify-content:flex-end;gap:9px;margin-top:20px}.chat-capacity-dialog-actions button{padding:8px 14px;border-radius:7px;font-weight:600}.chat-capacity-cancel{border:1px solid var(--hairline-strong);background:var(--bg);color:var(--ink)}.chat-capacity-retry{background:var(--accent);color:#fff}.chat-capacity-retry:disabled{cursor:not-allowed;opacity:.5}.chat-capacity-dialog-actions button:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.chat-paused-banner{margin-bottom:.75rem;border:1px solid var(--border);border-radius:.65rem;background:var(--muted);padding:.7rem .85rem;color:var(--muted-foreground);font-size:.875rem;line-height:1.4}.chat-composer-error{margin-bottom:.75rem;border:1px solid color-mix(in oklch,#c33 35%,var(--hairline));border-radius:.65rem;background:color-mix(in oklch,#c33 8%,var(--bg-elevated));padding:.7rem .85rem;color:var(--ink);font-size:.875rem;line-height:1.4}.chat-billing-notice{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px;margin:0 0 10px;padding:9px 11px;border:1px solid color-mix(in oklch,var(--accent) 24%,var(--hairline));border-radius:9px;color:var(--ink-soft);background:color-mix(in oklch,var(--accent) 5%,var(--bg-elevated));font-size:12px;line-height:1.4}.chat-billing-notice a{flex:none;color:var(--accent-text);font-weight:600;text-decoration:none}.chat-billing-notice a:hover{text-decoration:underline}.chat-billing-notice-actions{display:flex;align-items:center;gap:10px;flex:none}.chat-billing-notice-dismiss{display:inline-flex;align-items:center;justify-content:center;width:26px;height:26px;padding:0;border:0;border-radius:6px;color:var(--ink-soft);background:transparent;cursor:pointer}.chat-billing-notice-dismiss:hover{color:var(--ink);background:color-mix(in oklch,var(--ink) 7%,transparent)}.chat-billing-notice-dismiss:focus-visible{outline:2px solid var(--accent);outline-offset:1px}.ask-home>.chat-paper-picker{top:calc(100% + 6px);bottom:auto}.chat-model-picker{position:relative;display:inline-grid;max-width:190px;flex:0 0 auto}.chat-model-picker-sizer,.chat-model-select{min-width:0;max-width:190px;padding:3px 22px 3px 8px;font-family:var(--mono);font-size:11px}.chat-model-picker-sizer{visibility:hidden;overflow:hidden;white-space:nowrap}.chat-model-select{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;height:100%;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:0;border-radius:6px;background:var(--accent-soft);color:var(--accent-text);cursor:pointer}.chat-model-picker-chevron{position:absolute;top:50%;right:6px;width:10px;height:7px;transform:translateY(-50%);fill:none;stroke:var(--accent-text);stroke-linecap:round;stroke-linejoin:round;stroke-width:1.75;pointer-events:none}.chat-model-picker.is-disabled{opacity:.65}.chat-model-select:disabled{cursor:default}.chat-model-label{max-width:190px;border-radius:6px;background:var(--accent-soft);color:var(--accent-text);padding:3px 8px;font-family:var(--mono);font-size:11px}.chat-empty .chat-composer{text-align:left}.chat-composer-wrap{border-top:1px solid var(--hairline);background:var(--bg);padding:14px 28px 16px}.chat-composer-inner{max-width:820px;margin:0 auto}.chat-composer{position:relative;background:var(--bg-elevated);border:1px solid var(--hairline);border-radius:14px;box-shadow:0 1px 2px #1e1c140a,0 10px 30px -20px #1e1c144d;padding:6px}.chat-composer-textarea-wrap{position:relative}.chat-paper-highlight-layer{position:absolute;z-index:0;top:0;right:0;bottom:0;left:0;box-sizing:border-box;overflow:hidden;pointer-events:none;color:transparent}.chat-paper-highlight-layer>div{min-height:100%;white-space:pre-wrap;overflow-wrap:break-word;word-break:break-word;color:var(--ink)}.chat-paper-highlight-layer-composer{padding:12px 12px 4px;font-family:var(--serif);font-size:16px;line-height:1.45}.chat-paper-highlight-layer-editor{padding:9px 11px;font-family:var(--serif);font-size:16px;line-height:1.45}.chat-paper-highlight-layer-home{padding:12px 12px 4px;font-family:var(--serif);font-size:17px;line-height:1.45}.chat-paper-picker{position:absolute;z-index:50;left:8px;bottom:calc(100% + 6px);width:min(560px,calc(100vw - 48px));max-height:384px;overflow-y:auto;border:1px solid var(--hairline-strong);border-radius:11px;background:var(--bg-elevated);box-shadow:0 16px 38px -16px #1e1c1473}.chat-slash-command{position:absolute;z-index:50;left:8px;bottom:calc(100% + 6px);display:flex;width:min(560px,calc(100vw - 48px));min-height:52px;align-items:center;gap:10px;padding:9px 12px;border:1px solid var(--hairline-strong);border-radius:11px;color:var(--ink);background:var(--bg-elevated);box-shadow:0 16px 38px -16px #1e1c1473;text-align:left}.chat-slash-command:hover{background:var(--accent-soft)}.chat-slash-command span{color:var(--ink-faint);font-size:12px}.chat-paper-picker-status{padding:10px 12px;color:var(--ink-faint);font-size:12px}.chat-paper-option{display:flex;width:100%;min-height:64px;flex-direction:column;justify-content:center;gap:3px;padding:9px 12px;border:0;border-top:1px solid var(--hairline);color:var(--ink);background:transparent;text-align:left}.chat-paper-option.is-active,.chat-paper-option:hover{background:var(--accent-soft)}.chat-paper-option-title{font-family:var(--serif);font-size:14px;line-height:1.25}.chat-paper-option-meta{color:var(--ink-faint);font-family:var(--mono);font-size:10.5px}.chat-paper-mention-message{padding:3px 12px;color:var(--negative-text);font-size:11.5px}.chat-inline-paper-mention{display:inline}.chat-inline-paper-mention svg{display:inline-block;margin-right:3px;color:var(--accent-text);vertical-align:-.12em}.chat-inline-paper-link{color:var(--accent-text);font-weight:600;text-decoration-line:underline;text-decoration-color:color-mix(in oklch,var(--accent) 40%,transparent);text-decoration-thickness:1px;text-underline-offset:2px}.chat-inline-paper-link:hover{text-decoration-color:var(--accent-text)}.chat-composer textarea{position:relative;z-index:1;width:100%;border:0;outline:0;resize:none;background:transparent;font-family:var(--serif);font-size:16px;line-height:1.45;color:transparent;caret-color:var(--ink);padding:12px 12px 4px}.chat-composer textarea::-moz-placeholder{color:var(--ink-faint)}.chat-composer textarea::placeholder{color:var(--ink-faint)}.chat-composer-row{display:flex;align-items:center;justify-content:space-between;padding:2px 6px 4px}.chat-composer-tools{display:flex;align-items:center;flex-wrap:wrap;gap:12px}.chat-web-search-toggle{display:inline-flex;align-items:center;gap:5px;min-height:30px;padding:4px 9px;border:1px solid var(--hairline);border-radius:8px;background:transparent;color:var(--ink-muted);font:inherit;font-size:12px;cursor:pointer}.chat-web-search-toggle:hover:not(:disabled){border-color:var(--hairline-strong);color:var(--ink)}.chat-web-search-toggle.is-enabled{border-color:var(--accent);background:var(--accent-soft);color:var(--accent-text)}.chat-web-search-toggle:disabled{cursor:default;opacity:.55}.chat-effort-picker{position:relative}.chat-effort-trigger{display:inline-flex;align-items:center;gap:4px;min-height:30px;padding:4px 8px 4px 10px;border:1px solid var(--hairline);border-radius:8px;background:transparent;color:var(--ink-muted);font:inherit;font-size:12px;cursor:pointer}.chat-effort-trigger:hover:not(:disabled){border-color:var(--hairline-strong);color:var(--ink)}.chat-effort-trigger:disabled{cursor:default;opacity:.55}.chat-effort-menu{position:absolute;z-index:40;left:0;bottom:calc(100% + 7px);width:220px;padding:6px;border:1px solid var(--hairline);border-radius:11px;background:var(--bg-elevated);box-shadow:0 14px 36px -14px #1e1c1473}.ask-home .chat-effort-menu{top:calc(100% + 7px);bottom:auto}.chat-effort-menu-label{padding:5px 10px 6px;color:var(--ink-faint);font-size:11px;font-weight:600;letter-spacing:.02em}.chat-effort-option{display:flex;align-items:center;justify-content:space-between;gap:10px;width:100%;padding:9px 10px;border:0;border-radius:7px;background:transparent;color:var(--ink);text-align:left;cursor:pointer}.chat-effort-option:hover,.chat-effort-option.is-selected{background:var(--bg-subtle)}.chat-effort-option-copy{display:flex;flex-direction:column;gap:2px}.chat-effort-option-copy strong{font-size:13px;font-weight:600}.chat-effort-option-copy small{color:var(--ink-faint);font-size:11px}.chat-composer-hint{font-size:11.5px;color:var(--ink-faint)}.chat-composer-foot{display:flex;align-items:center;justify-content:center;gap:6px;text-align:center;font-size:11.5px;color:var(--ink-faint);margin-top:9px}.chat-provider-attribution{white-space:nowrap}.chat-send{display:flex;align-items:center;justify-content:center;width:38px;height:38px;border-radius:10px;background:var(--hairline);color:var(--bg-elevated);cursor:not-allowed;transition:background .15s;flex:none}.chat-send-on{background:var(--ink);cursor:pointer}.chat-send-on:hover{background:color-mix(in oklch,var(--ink) 88%,var(--accent))}@media (max-width: 900px){.chat-composer-wrap{padding:12px 16px 14px}.chat-composer-foot,.chat-composer-hint{display:none}}@media (prefers-reduced-motion: reduce){.chat-paper-option{scroll-behavior:auto}}@media (forced-colors: active){.chat-paper-option.is-active,.chat-inline-paper-link{outline:1px solid CanvasText}.chat-paper-selection,.chat-paper-selection-remove,.chat-paper-selection-toggle{border:1px solid ButtonText}}.chat-paper-selection{margin:6px 6px 0;padding:8px 10px;border:1px solid var(--hairline);border-radius:10px;background:var(--bg-subtle);text-align:left}.chat-paper-selection-header{display:flex;align-items:center;justify-content:space-between;gap:8px}.chat-paper-selection-label{color:var(--ink-soft);font-size:11px;font-weight:600;letter-spacing:.02em;text-transform:uppercase}.chat-paper-selection-actions{display:flex;align-items:center;gap:6px}.chat-paper-selection-toggle,.chat-paper-selection-remove{border:0;padding:2px 6px;background:transparent;color:var(--accent-text);font-size:11.5px}.chat-paper-selection-quote{display:-webkit-box;max-height:4.35em;margin:6px 0 0;overflow:hidden;color:var(--ink);font-family:var(--serif);font-size:13px;line-height:1.45;white-space:pre-wrap;-webkit-box-orient:vertical;-webkit-line-clamp:3}.chat-paper-selection-quote.is-expanded{display:block;max-height:8.5em;overflow:auto;-webkit-line-clamp:unset}.chat-paper-selection-disabled{padding:4px 12px 0;color:var(--negative-text);font-size:11.5px}.chat-paper-link{color:var(--accent-text);border-bottom:1px solid color-mix(in oklch,var(--accent-text) 35%,transparent);white-space:normal}.chat-paper-link:hover{border-bottom-color:var(--accent-text)}.chat-hf-link:after{content:" 🤗";font-size:.85em;white-space:nowrap}.chat-github-link{color:var(--accent-text);border-bottom:1px solid color-mix(in oklch,var(--accent-text) 35%,transparent)}.chat-github-link:hover{border-bottom-color:var(--accent-text)}.chat-github-link svg{display:inline-block;width:1em;height:1em;margin-right:.3em;vertical-align:-.14em}.chat-external-link{color:var(--accent-text);text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:2px}.chat-external-link:hover{text-decoration-thickness:2px}.chat-web-citation{color:var(--accent-text);text-decoration:underline;text-decoration-style:dotted;text-underline-offset:2px}.chat-external-paper-citation{color:var(--chat-link);text-decoration:underline;text-decoration-color:color-mix(in srgb,var(--chat-link) 35%,transparent);text-underline-offset:2px}.external-paper-preview-pop.external-paper-preview-pop{width:min(390px,calc(100vw - 24px));padding:0;overflow:hidden;border-color:var(--chat-border);background:var(--chat-surface);color:var(--chat-text)}.external-paper-preview-card{padding:14px}.external-paper-preview-source{display:flex;gap:6px;margin-bottom:7px;color:var(--chat-muted);font-size:12px}.external-paper-preview-card strong{display:block;color:var(--chat-text);font-size:14px;line-height:1.35}.external-paper-preview-card p{margin:7px 0 0;color:var(--chat-muted);font-size:12px;line-height:1.45;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:4;overflow:hidden}.external-paper-preview-authors{-webkit-line-clamp:2!important}.external-paper-preview-citations{display:block;margin-top:9px;color:var(--chat-muted);font-size:11px}.web-preview-pop.web-preview-pop{width:min(360px,calc(100vw - 24px));padding:0;overflow:hidden;border:1px solid var(--hairline);border-radius:12px;background:var(--bg-elevated);color:var(--ink);box-shadow:0 14px 44px -12px #1e1c1466}.web-preview-card{display:flex;flex-direction:column}.web-preview-image{display:block;width:100%;height:174px;-o-object-fit:cover;object-fit:cover;background:var(--bg-subtle);border-bottom:1px solid var(--hairline)}.web-preview-meta{padding:13px 14px 14px;min-width:0}.web-preview-source{display:flex;align-items:center;gap:5px;margin-bottom:6px;color:var(--ink-faint);font-size:11px}.web-preview-source img{width:14px;height:14px;border-radius:3px}.web-preview-meta strong{display:block;font-family:var(--serif);font-size:15px;font-weight:500;line-height:1.3}.web-preview-meta p{display:-webkit-box;overflow:hidden;margin:7px 0 0;color:var(--ink-soft);font-size:12px;line-height:1.4;-webkit-box-orient:vertical;-webkit-line-clamp:3}.paper-preview-pop.paper-preview-pop{width:min(344px,calc(100vw - 24px));padding:0;border:1px solid var(--hairline);border-radius:12px;background:var(--bg-elevated);color:var(--ink);box-shadow:0 14px 44px -12px #1e1c1466;overflow:hidden}.paper-preview-inner{display:flex;gap:14px;padding:14px}.paper-preview-meta{min-width:0;flex:1}.paper-preview-title{font-family:var(--serif);font-weight:500;font-size:15px;line-height:1.25;margin-bottom:5px}.paper-preview-auth{font-size:12px;color:var(--ink-soft);line-height:1.35}.paper-preview-venue{font-size:11.5px;color:var(--ink-faint);margin-top:3px;font-variant-numeric:tabular-nums}.paper-preview-tags{display:flex;flex-wrap:wrap;gap:5px;margin:9px 0}.paper-preview-tag{font-size:10.5px;font-family:var(--mono);background:var(--positive-bg);color:var(--positive-text);border-radius:5px;padding:2px 7px}.paper-preview-status{min-height:48px;padding:14px;display:flex;align-items:center;color:var(--ink-soft);font-size:12px}.paper-preview-index-request{flex-wrap:wrap;gap:6px 12px}.paper-preview-index-request a,.paper-preview-index-request button{color:var(--accent);font:inherit;border:0;background:transparent;padding:0;cursor:pointer}.paper-preview-index-request button:disabled{color:var(--ink-soft);cursor:default}.paper-preview-index-request a:focus-visible,.paper-preview-index-request button:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.paper-preview-index-request [role=alert]{flex-basis:100%;color:var(--negative-text, var(--ink-soft))}.paper-preview-thumb{position:relative;width:96px;height:124px;flex:none;background:var(--bg-elevated);border:1px solid var(--hairline);border-radius:3px;box-shadow:0 1px 3px #1e1c1414;overflow:hidden;padding:11px 10px}.paper-preview-thumb-real{padding:0}.paper-preview-thumb-real img{display:block;width:100%;height:100%;-o-object-fit:contain;object-fit:contain}.paper-preview-thumb-title{display:flex;flex-direction:column;align-items:center;gap:3px;margin-bottom:8px}.paper-preview-thumb-title span{height:3px;background:var(--ink);border-radius:2px}.paper-preview-thumb-title span:first-child{width:70%}.paper-preview-thumb-title span:last-child{width:52%}.paper-preview-thumb-auth{height:2px;width:40%;margin:0 auto 9px;background:var(--ink-faint);border-radius:2px}.paper-preview-thumb-cols{display:flex;gap:7px}.paper-preview-thumb-col{flex:1;height:74px;background:repeating-linear-gradient(var(--hairline-strong) 0 2px,transparent 2px 5px);opacity:.7}.paper-preview-thumb-fig{position:absolute;left:14px;right:14px;height:22px;background:var(--bg-subtle);border:1px solid var(--hairline);border-radius:2px}.hf-preview-pop.hf-preview-pop{width:min(172px,calc(100vw - 24px));padding:0;border:1px solid var(--hairline);border-radius:12px;background:var(--bg-elevated);color:var(--ink);box-shadow:0 14px 44px -12px #1e1c1466;overflow:hidden}.hf-preview-card{display:grid}.hf-preview-image,.hf-preview-fallback{display:block;width:100%;aspect-ratio:2 / 1;-o-object-fit:cover;object-fit:cover;background:var(--bg-subtle)}.hf-preview-fallback{display:grid;place-items:center;font-size:48px;background:radial-gradient(circle at 70% 35%,rgba(84,104,255,.4),transparent 45%),linear-gradient(135deg,#0f6d79,#d18a48)}.hf-preview-meta{display:grid;gap:3px;padding:12px 14px 14px}.hf-preview-meta strong{overflow-wrap:anywhere;font-size:14px}.hf-preview-kind,.hf-preview-meta>span:last-child{color:var(--ink-faint);font-size:11.5px}.github-preview-pop.github-preview-pop{width:min(344px,calc(100vw - 24px));padding:0;border:1px solid var(--hairline);border-radius:12px;background:var(--bg-elevated);color:var(--ink);box-shadow:0 14px 44px -12px #1e1c1466;overflow:hidden}.github-preview-card{display:flex;gap:14px;padding:14px}.github-preview-image,.github-preview-fallback{display:block;width:72px;height:72px;flex:none;-o-object-fit:cover;object-fit:cover;border-radius:12px;background:var(--bg-subtle)}.github-preview-fallback{display:grid;place-items:center;color:#fff;background:linear-gradient(135deg,#24292f,#57606a)}.github-preview-fallback svg{width:36px;height:36px}.github-preview-meta{display:grid;gap:3px;min-width:0}.github-preview-meta strong{overflow-wrap:anywhere;font-size:14px}.github-preview-kind,.github-preview-meta>span:last-child{color:var(--ink-faint);font-size:11.5px}.github-preview-description{display:-webkit-box;overflow:hidden;color:var(--ink-soft);font-size:12px;line-height:1.35;-webkit-box-orient:vertical;-webkit-line-clamp:2}.github-preview-stats{font-variant-numeric:tabular-nums}.catalog-preview-pop.catalog-preview-pop{width:min(320px,calc(100vw - 24px));padding:0;border:1px solid var(--hairline);border-radius:12px;background:var(--bg-elevated);color:var(--ink);box-shadow:0 14px 44px -12px #1e1c1466;overflow:hidden}.catalog-preview-card{display:grid}.catalog-preview-image{display:block;width:100%;aspect-ratio:2 / 1;-o-object-fit:cover;object-fit:cover;background:var(--bg-subtle);border-bottom:1px solid var(--hairline)}.catalog-preview-meta{display:grid;gap:3px;padding:12px 14px 14px}.catalog-preview-meta strong{font-family:var(--serif);font-weight:500;font-size:15px;line-height:1.25}.catalog-preview-meta p{display:-webkit-box;overflow:hidden;margin:3px 0 0;color:var(--ink-soft);font-size:12px;line-height:1.4;-webkit-box-orient:vertical;-webkit-line-clamp:3}.catalog-preview-kind,.catalog-preview-stats{color:var(--ink-faint);font-size:11.5px;font-variant-numeric:tabular-nums}.catalog-preview-stats{margin-top:4px}.chat-artifact-card{width:min(100%,620px);display:flex;gap:14px;align-items:stretch;padding:0;overflow:hidden;text-align:left;color:var(--chat-text, #182230);background:#fff;border:1px solid #d8dee8;border-radius:14px;box-shadow:0 5px 18px #0f172a12}button.chat-artifact-card{cursor:pointer}.chat-artifact-card.is-selected{border-color:var(--accent);box-shadow:0 0 0 2px color-mix(in oklch,var(--accent) 22%,transparent)}.chat-artifact-card>img{width:190px;aspect-ratio:5 / 3;-o-object-fit:cover;object-fit:cover;background:#eef1f5}.chat-artifact-card-copy{display:flex;min-width:0;flex:1;flex-direction:column;justify-content:center;gap:7px;padding:14px 14px 14px 0}.chat-artifact-card-copy strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.chat-artifact-kicker{display:flex;align-items:center;gap:6px;color:#637083;font-size:12px}.chat-artifact-kicker svg{width:14px;height:14px}.chat-artifact-gate{width:-moz-fit-content;width:fit-content;padding:3px 8px;border-radius:999px;color:#11643b;background:#e7f7ee;font-size:11px;font-weight:650}.chat-artifact-gate-warnings{color:#7a4a00;background:#fff3d6}.chat-artifact-gate-failed{color:#9b2c2c;background:#fee9e7}.chat-artifact-generating,.chat-artifact-error{align-items:center;padding:16px}.chat-artifact-generating span:not(.chat-artifact-pulse),.chat-artifact-error span{display:flex;flex-direction:column;gap:3px}.chat-artifact-generating small,.chat-artifact-error small{color:#687386}.chat-artifact-error{border-color:#efb7b1}.chat-artifact-error>svg{width:24px;color:#b3372d}.chat-artifact-pulse{width:22px;height:22px;border:3px solid #d7dde8;border-top-color:#5367d9;border-radius:50%;animation:chat-artifact-spin .8s linear infinite}@keyframes chat-artifact-spin{to{transform:rotate(360deg)}}.chat-artifact-workspace{position:relative;min-width:0;min-height:0;flex:1;display:flex;overflow:hidden}.chat-artifact-workspace-content{min-width:0;min-height:0;flex:1;display:flex;overflow:hidden}.chat-artifact-workspace-chat>.chat-artifact-workspace-content>.chat-main{width:100%}.chat-artifact-workspace-shared{min-height:0}.chat-artifact-workspace-shared>.chat-artifact-workspace-content{overflow:auto}.chat-artifact-workspace-reader{height:100%}.chat-artifact-workspace-reader>.chat-artifact-workspace-content>.reader-workspace{width:100%}.chat-artifact-workspace-pane{min-width:0;min-height:0;flex:none;display:flex;overflow:hidden}.chat-artifact-resize-handle{position:relative;z-index:7;width:1px;flex:0 0 1px;cursor:col-resize;background:var(--hairline-strong);touch-action:none;outline:none}.chat-artifact-resize-handle:before{content:"";position:absolute;top:0;right:-8px;bottom:0;left:-8px}.chat-artifact-resize-handle:focus-visible{box-shadow:0 0 0 2px var(--accent)}.chat-artifact-panel{width:100%;height:100%;min-width:0;min-height:0;display:grid;grid-template-rows:auto auto minmax(0,1fr) auto;overflow:hidden;color:var(--ink);background:#f6f7f9;border-left:1px solid var(--hairline)}.chat-artifact-panel.is-dialog{position:fixed;z-index:1200;top:0;right:0;bottom:0;left:0;border:0}.chat-artifact-panel.is-reader-fallback{position:absolute}.chat-artifact-panel header{display:flex;align-items:center;justify-content:space-between;padding:16px 20px;background:#fff;border-bottom:1px solid #dce1e8}.chat-artifact-panel header span{color:#6d7788;font-size:12px;text-transform:uppercase;letter-spacing:.06em}.chat-artifact-panel h2{margin:2px 0 0;font-size:18px}.chat-artifact-panel header button{display:grid;place-items:center;width:36px;height:36px;border:0;border-radius:8px;background:transparent;cursor:pointer}.chat-paper-status{margin:4px 0 0;color:#687386;font-size:12px}.chat-artifact-header-actions{display:flex;align-items:center;gap:6px}.chat-artifact-header-actions>button:first-child{width:auto;min-height:36px;padding:7px 10px;border:1px solid #cfd6e4;color:#253143;background:#fff;font-size:12px}.chat-artifact-version{display:flex;align-items:center;gap:7px;margin-left:auto;margin-right:8px;color:#687386;font-size:12px}.chat-artifact-version select{padding:6px 8px;border:1px solid #cfd6e4;border-radius:7px;background:#fff}.chat-artifact-panel>nav{position:sticky;z-index:1;top:0;display:flex;gap:4px;padding:8px 18px 0;background:#fff}.chat-artifact-panel nav button{padding:9px 14px;border:0;border-bottom:2px solid transparent;color:#667085;background:transparent;cursor:pointer}.chat-artifact-panel nav button.active{color:#273a91;border-bottom-color:#5367d9;font-weight:650}.chat-artifact-panel button:focus-visible,.chat-artifact-panel a:focus-visible,.chat-artifact-panel input:focus-visible,.latex-source-editor .cm-content:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.chat-artifact-panel-body{min-height:0;display:grid;place-items:center;overflow:auto;padding:20px}.chat-artifact-panel-body>.pdf-viewer{align-self:stretch;justify-self:stretch;width:100%;height:100%}.chat-artifact-panel-body>img{max-width:100%;max-height:100%;-o-object-fit:contain;object-fit:contain;background:#fff;box-shadow:0 4px 22px #0f172a1f}.chat-artifact-panel-body>pre{align-self:stretch;justify-self:stretch;overflow:auto;margin:0;padding:18px;color:#d8dee9;background:#18202c;border-radius:10px;font-size:12px;white-space:pre-wrap}.chat-artifact-source-workspace{width:100%;height:100%;min-height:0;display:flex;overflow:hidden;border-radius:10px;background:#18202c}.chat-artifact-source-workspace>nav{width:min(180px,28%);flex:none;display:flex;flex-direction:column;overflow:auto;padding:10px;border-right:1px solid #ffffff24}.chat-artifact-source-workspace>nav button{overflow:hidden;border:0;padding:7px 8px;color:#aeb8c8;background:transparent;text-align:left;text-overflow:ellipsis;white-space:nowrap}.chat-artifact-source-workspace>nav button[aria-pressed=true]{color:#fff;background:#ffffff14}.chat-artifact-source-workspace>pre{min-width:0;flex:1;overflow:auto;margin:0;padding:18px;color:#d8dee9;font-size:12px;white-space:pre-wrap}.latex-editor-column{min-width:0;flex:1;display:flex;flex-direction:column;color:#d8dee9}.latex-source-editor{min-width:0;min-height:0;flex:1;overflow:auto}.latex-source-editor .cm-editor{height:100%;min-height:320px;font-size:13px}.latex-source-editor .cm-scroller{overflow:auto;font-family:ui-monospace,SFMono-Regular,Menlo,monospace}.latex-file-action{display:flex;align-items:center;gap:6px;margin-top:8px}.latex-file-action svg,.latex-file-buttons svg{width:14px;height:14px}.latex-file-buttons{display:flex;gap:8px;padding:8px;border-top:1px solid #ffffff24}.latex-file-buttons button,.chat-artifact-actions button{display:inline-flex;align-items:center;gap:7px;border:0;border-radius:7px;padding:8px 10px;cursor:pointer}.chat-artifact-actions button:disabled{cursor:not-allowed;opacity:.55}.chat-artifact-panel footer{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;padding:14px 20px;background:#fff;border-top:1px solid #dce1e8}.chat-artifact-metadata{display:flex;min-width:0;flex-direction:column;gap:3px;color:#687386;font-size:12px}.chat-artifact-metadata strong{color:#253143}.chat-artifact-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:8px}.chat-artifact-actions a{display:inline-flex;align-items:center;gap:5px;padding:8px 10px;color:#263b94;border:1px solid #cfd6e4;border-radius:8px;text-decoration:none;font-size:12px;font-weight:600}.chat-artifact-actions svg{width:14px;height:14px}.paper-pdf-toolbar{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px;width:100%;padding:8px;border-bottom:1px solid #dce1e8;background:#fff}.paper-pdf-toolbar-group{display:flex;align-items:center;gap:6px}.paper-pdf-toolbar button,.paper-pdf-toolbar input,.paper-pdf-toolbar a{min-height:32px;border:1px solid #cfd6e4;border-radius:7px;padding:5px 8px;color:#253143;background:#fff;font-size:12px;text-decoration:none}.paper-pdf-toolbar input{width:56px}.paper-pdf-toolbar button:disabled{cursor:not-allowed;opacity:.55}@media (max-width: 700px){.chat-artifact-card>img{width:120px}.chat-artifact-panel{width:100vw;height:100dvh}.chat-artifact-panel footer{align-items:stretch;flex-direction:column}.chat-artifact-actions{justify-content:flex-start}.chat-artifact-panel header{padding:12px 14px}.chat-artifact-header-actions>button:first-child{padding-inline:8px}.paper-pdf-toolbar{align-items:flex-start;flex-direction:column}}@media (forced-colors: active){.chat-artifact-resize-handle,.chat-artifact-card.is-selected{border:1px solid ButtonText}}@media (prefers-reduced-motion: reduce){.chat-artifact-pulse{animation-duration:.01ms}}.chat-ghost-link{color:var(--ink-soft);font-size:13px;padding:6px 10px;border-radius:6px}.chat-ghost-link:hover{color:var(--ink);background:var(--bg-subtle)}.chat-conversation-viewport{position:relative;display:flex;flex-direction:column;flex:1;min-height:0}.chat-conversation{flex:1;min-height:0;overflow-y:auto}.chat-jump-latest{position:absolute;bottom:12px;left:50%;transform:translate(-50%);border:1px solid var(--border);border-radius:20px;padding:8px 14px;background:var(--bg);color:var(--ink);box-shadow:0 2px 8px #0000001f;white-space:nowrap;cursor:pointer}.chat-conversation-inner{max-width:820px;margin:0 auto;padding:30px 28px 40px}.chat-msg{margin-bottom:26px}.chat-msg-user{display:flex;justify-content:flex-end}.chat-user-message-wrap{display:flex;flex-direction:column;align-items:flex-end;max-width:74%}.chat-bubble{background:var(--accent-soft);color:var(--ink);border:1px solid color-mix(in oklch,var(--accent-soft) 70%,var(--hairline));border-radius:16px 16px 4px;padding:12px 18px;font-family:var(--serif);font-size:16px;line-height:1.45;max-width:100%;white-space:pre-wrap;overflow-wrap:anywhere;-webkit-user-select:text;-moz-user-select:text;user-select:text;cursor:text}.chat-bubble::-moz-selection,.chat-bubble *::-moz-selection{background:var(--accent);color:var(--bg)}.chat-bubble::selection,.chat-bubble *::selection{background:var(--accent);color:var(--bg)}.chat-user-actions{display:flex;justify-content:flex-end;gap:2px;min-height:30px;padding:4px 2px 0;opacity:0;transform:translateY(-2px);transition:opacity .14s ease,transform .14s ease;-webkit-user-select:none;-moz-user-select:none;user-select:none}.chat-msg-user:hover .chat-user-actions,.chat-msg-user:focus-within .chat-user-actions{opacity:1;transform:translateY(0)}.chat-user-action{width:28px;height:28px;display:inline-flex;align-items:center;justify-content:center;border:1px solid transparent;border-radius:999px;color:var(--ink-soft);background:transparent}.chat-user-action:hover{color:var(--ink);background:var(--bg-elevated);border-color:var(--hairline)}.chat-user-action:focus-visible{outline:2px solid var(--accent);outline-offset:2px;opacity:1}.chat-user-action svg{width:14px;height:14px}.chat-inline-editor{width:min(620px,74%);min-width:min(360px,100%);padding:12px;border:1px solid color-mix(in oklch,var(--accent) 45%,var(--hairline));border-radius:16px 16px 4px;background:var(--accent-soft);box-shadow:0 8px 28px #00000014}.chat-inline-editor-textarea{position:relative;z-index:1;display:block;width:100%;min-height:72px;padding:8px 10px;resize:none;border:1px solid var(--hairline-strong);border-radius:10px;color:var(--ink);background:transparent;font-family:var(--serif);font-size:16px;line-height:1.45;white-space:pre-wrap}.chat-inline-editor-textarea-wrap{position:relative;background:var(--bg-elevated);border-radius:10px}.chat-inline-editor-textarea-wrap .chat-inline-editor-textarea{color:transparent;caret-color:var(--ink)}.chat-inline-editor-textarea:focus{outline:2px solid var(--accent);outline-offset:1px}.chat-inline-editor-notice{margin:8px 2px 0;color:var(--ink-soft);font-size:12.5px;line-height:1.4}.chat-inline-editor-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:10px}.chat-inline-editor-actions button{min-height:34px;padding:6px 14px;border:1px solid var(--hairline-strong);border-radius:999px;color:var(--ink);background:var(--bg-elevated);font-size:13px;font-weight:600}.chat-inline-editor-actions button:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.chat-inline-editor-actions .chat-inline-editor-send{color:#fff;border-color:var(--accent);background:var(--accent)}.chat-inline-editor-actions button:disabled{cursor:not-allowed;opacity:.5}.chat-msg-blocks{display:flex;flex-direction:column;gap:14px}.chat-waiting{min-height:20px;display:flex;align-items:center;font-size:13px;font-weight:600}.chat-thinking{color:transparent;background:linear-gradient(100deg,var(--ink-faint) 30%,var(--accent-text) 50%,var(--ink-faint) 70%);background-size:220% 100%;background-clip:text;-webkit-background-clip:text;animation:chat-thinking-glow 1.8s ease-in-out infinite}@keyframes chat-thinking-glow{0%{background-position:100% 0}to{background-position:-100% 0}}@media (prefers-reduced-motion: reduce){.chat-thinking{color:var(--accent-text);background:none;animation:none}}.chat-reason-live{border:1px solid var(--hairline);border-left:2px solid var(--accent);background:var(--bg-elevated);border-radius:10px;padding:14px 16px}.chat-reason-live-head{display:flex;align-items:center;gap:9px;font-size:12.5px;font-weight:600;color:var(--accent-text)}.chat-reason-live-body{margin-top:9px;font-family:var(--serif);font-size:14.5px;line-height:1.6;color:var(--ink-soft)}.chat-reason-done{border:1px solid var(--hairline);border-radius:10px;background:var(--bg-elevated);overflow:hidden}.chat-reason-done-head{display:flex;align-items:center;gap:9px;width:100%;padding:11px 15px;font-size:13px;color:var(--ink-soft);font-weight:500;text-align:left}.chat-reason-done-head svg:first-child{color:var(--positive-text);flex:none}.chat-reason-done-head .chat-chev{margin-left:auto}.chat-reason-done-head:hover{color:var(--ink)}.chat-reason-done-body{padding:2px 16px 16px 39px;font-family:var(--serif);font-size:14px;line-height:1.65;color:var(--ink-soft)}.chat-answer.chat-reason-markdown{padding-top:0;padding-right:0;padding-bottom:0;font-size:inherit;line-height:inherit;color:inherit;white-space:normal}.chat-answer.chat-reason-live-body{padding-left:23px}.chat-answer.chat-reason-done-body{padding:2px 16px 16px 39px}.chat-tool{border:1px solid var(--hairline);border-radius:10px;background:var(--bg-elevated);overflow:hidden}.chat-tool-running{border-color:color-mix(in oklch,var(--accent) 35%,var(--hairline))}.chat-tool-failed{border-color:color-mix(in oklch,#b42318 55%,var(--hairline))}.chat-tool-failed .chat-tool-status{color:#b42318;font-weight:600}.chat-tool-head{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;padding:11px 15px;text-align:left}.chat-tool-head:disabled{cursor:default}.chat-tool-head-left{display:flex;align-items:center;gap:9px;min-width:0}.chat-tool-head-left>svg{color:var(--accent-text);flex:none}.chat-tool-name{font-family:var(--mono);font-size:12px;font-weight:600;color:var(--ink);background:var(--bg-subtle);border:1px solid var(--hairline);border-radius:5px;padding:2px 7px;flex:none}.chat-tool-query{font-family:var(--serif);font-style:italic;font-size:13.5px;color:var(--ink-soft);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.chat-tool-head-right{display:flex;align-items:center;gap:10px;flex:none}.chat-tool-status{font-size:11.5px;color:var(--ink-soft);font-variant-numeric:tabular-nums}.chat-tool-body{padding:4px 16px 16px;border-top:1px solid var(--hairline)}.chat-tool-args{margin:12px 0 4px}.chat-tool-label{display:block;font-family:var(--mono);font-size:10px;letter-spacing:.1em;text-transform:uppercase;color:var(--ink-faint);margin-bottom:6px}.chat-tool-args pre{margin:0;background:var(--bg-subtle);border:1px solid var(--hairline);border-radius:8px;padding:10px 12px;font-family:var(--mono);font-size:11.5px;line-height:1.5;color:var(--ink-soft);overflow-x:auto}.chat-tool-results-label{margin-top:16px}.chat-tool-output-head{display:flex;align-items:center;justify-content:space-between;margin-top:14px}.chat-tool-output-head .chat-tool-label{margin-bottom:0}.chat-tool-copy{color:var(--accent-text);font-family:var(--mono);font-size:11px}.chat-tool-output{max-height:320px;margin:7px 0 0;overflow:auto;white-space:pre;-moz-tab-size:4;-o-tab-size:4;tab-size:4;border:1px solid var(--hairline);border-radius:8px;background:var(--bg-subtle);padding:11px 12px;color:var(--ink);font-family:var(--mono);font-size:11.5px;line-height:1.5}.chat-tool-truncated{margin-top:7px;color:var(--ink-faint);font-size:11px}.chat-mcp-app{border:1px solid var(--chat-border, #d8d8de);border-radius:12px;overflow:hidden;background:var(--chat-surface, #fff)}.chat-mcp-app>header{display:flex;justify-content:flex-end;padding:8px 10px 0}.chat-mcp-app button{border:0;border-radius:6px;background:#eef1f5;padding:5px 8px;cursor:pointer}.chat-mcp-app iframe{display:block;width:100%;border:0;background:#fff;aspect-ratio:4 / 3}.chat-mcp-loading,.chat-mcp-error{min-height:180px;aspect-ratio:4 / 3;display:grid;place-items:center;padding:18px;color:#52606d;text-align:center}.chat-mcp-error{gap:12px}.chat-mcp-app-fullscreen{position:fixed;top:16px;right:16px;bottom:16px;left:16px;z-index:1000}.chat-mcp-app-fullscreen iframe{height:calc(100vh - 72px)!important;aspect-ratio:auto}.chat-tool-results{list-style:none;margin:0;padding:0}.chat-hit{padding:11px 0;border-top:1px solid var(--hairline)}.chat-hit:first-child{border-top:0}.chat-hit-top{display:flex;align-items:baseline;gap:12px}.chat-hit-title{font-family:var(--serif);font-size:14.5px;font-weight:600;color:var(--accent-text);flex:1;line-height:1.3}.chat-hit-title:hover{text-decoration:underline}.chat-hit-meta{font-size:12px;color:var(--ink-faint);margin-top:2px}.chat-hit-truncated{color:var(--ink-faint);font-style:italic}.chat-hit-snippet{font-family:var(--serif);font-size:13.5px;line-height:1.5;color:var(--ink-soft);margin-top:5px;text-wrap:pretty}.chat-answer{font-family:var(--serif);font-size:16.5px;line-height:1.65;color:var(--ink);text-wrap:pretty;padding:2px}.chat-answer>:first-child{margin-top:0}.chat-answer>:last-child{margin-bottom:0}.chat-answer p{margin:0 0 .9em}.chat-answer h1,.chat-answer h2,.chat-answer h3,.chat-answer h4{font-family:var(--sans);font-weight:600;line-height:1.3;margin:1.35em 0 .5em}.chat-answer h1{font-size:1.45em}.chat-answer h2{font-size:1.25em}.chat-answer h3{font-size:1.08em}.chat-answer h4{font-size:1em}.chat-answer ul,.chat-answer ol{margin:0 0 .9em;padding-left:1.5em}.chat-answer ul{list-style-type:disc}.chat-answer ol{list-style-type:decimal}.chat-answer ul ul{list-style-type:circle}.chat-answer ul ul ul{list-style-type:square}.chat-answer li{margin:.2em 0}.chat-answer li>p{margin:0}.chat-answer blockquote{margin:0 0 .9em;padding-left:1em;border-left:3px solid var(--hairline-strong);color:var(--ink-soft)}.chat-answer code{font-family:var(--mono);font-size:.84em;background:var(--bg-subtle);border:1px solid var(--hairline);border-radius:4px;padding:.1em .3em}.chat-answer pre{margin:0 0 1em;padding:12px 14px;overflow-x:auto;background:var(--bg-subtle);border:1px solid var(--hairline);border-radius:8px;line-height:1.5}.chat-answer pre code{background:none;border:0;padding:0}.chat-answer table{display:block;width:-moz-max-content;width:max-content;max-width:100%;overflow-x:auto;border-collapse:collapse;margin:0 0 1em;font-family:var(--sans);font-size:.88em}.chat-answer th,.chat-answer td{border:1px solid var(--hairline);padding:6px 10px;text-align:left}.chat-answer th{background:var(--bg-subtle);font-weight:600}.chat-answer hr{border:0;border-top:1px solid var(--hairline);margin:1.25em 0}.chat-answer input[type=checkbox]{margin-right:.4em}.chat-answer strong{font-weight:600}.chat-error{display:flex;flex-wrap:wrap;align-items:flex-start;justify-content:space-between;gap:12px;border:1px solid var(--negative-border);background:var(--negative-bg);color:var(--negative-text);border-radius:10px;padding:12px 16px;font-size:13.5px;overflow-wrap:anywhere}.chat-error>span:first-child{flex:1 1 280px;min-width:0}.chat-finish-note{font-family:var(--serif);font-style:italic;font-size:13px;color:var(--ink-faint)}.chat-feedback{display:flex;align-items:center;gap:4px;min-height:30px;margin-top:8px;color:var(--ink-faint);font-size:12px}.chat-feedback-label{margin-right:2px}.chat-feedback-action{width:28px;height:28px;display:inline-flex;align-items:center;justify-content:center;border:1px solid transparent;border-radius:999px;color:var(--ink-soft);background:transparent}.chat-feedback-action:hover:not(:disabled),.chat-feedback-action-selected{color:var(--accent-text);background:var(--accent-soft);border-color:color-mix(in oklch,var(--accent) 35%,var(--hairline))}.chat-feedback-action:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.chat-feedback-action:disabled{cursor:wait}.chat-feedback-action svg{width:14px;height:14px}.chat-feedback-error{color:var(--negative-text);margin-left:4px}.chat-feedback-panel{width:min(460px,100%);margin-top:8px;padding:16px;border:1px solid var(--hairline);border-radius:12px;background:var(--bg-elevated);box-shadow:0 10px 30px #0000001a}.chat-feedback-panel-title{color:var(--ink);font-size:15px;font-weight:600}.chat-feedback-panel-label{display:block;margin-top:4px;color:var(--ink-soft);font-size:13px}.chat-feedback-comment{display:block;width:100%;min-height:92px;margin-top:12px;padding:10px 12px;resize:vertical;border:1px solid var(--hairline-strong);border-radius:8px;color:var(--ink);background:var(--bg);font:14px/1.45 var(--sans)}.chat-feedback-comment:focus{border-color:var(--accent);outline:2px solid color-mix(in oklch,var(--accent) 25%,transparent);outline-offset:1px}.chat-feedback-panel-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:12px}.chat-feedback-panel-actions button{min-width:72px;padding:8px 14px;border-radius:8px;font:600 13px var(--sans)}.chat-feedback-skip{border:1px solid transparent;color:var(--ink-soft);background:transparent}.chat-feedback-submit{border:1px solid var(--ink);color:var(--bg);background:var(--ink)}.chat-feedback-panel-actions button:disabled{cursor:wait;opacity:.65}.chat-error a,.chat-error button{flex:none;max-width:100%;color:var(--accent-text);font-weight:600;text-decoration:none}.chat-error button{border:0;padding:0;background:transparent;cursor:pointer;font:inherit;text-align:left;white-space:normal}.chat-error button:disabled{cursor:wait;opacity:.65}.chat-error-actions{display:flex;flex:0 1 auto;min-width:0;max-width:100%;flex-wrap:wrap;justify-content:flex-start;gap:8px 16px}.chat-error a:hover,.chat-error button:hover:not(:disabled){text-decoration:underline}@media (max-width: 900px){.chat-user-message-wrap{max-width:90%}.chat-inline-editor{width:90%;min-width:0}.chat-conversation-inner{padding:22px 16px 32px}}@media (max-width: 560px){.shared-chat-content .chat-user-message-wrap{max-width:88%}}@media (hover: none),(pointer: coarse){.chat-user-actions{opacity:1;transform:none}}.chat-compaction-status{flex-direction:column;align-items:flex-start}.chat-compaction-explanation{margin-top:4px;color:var(--ink-faint);font-weight:400}.chat-caret{display:inline-block;width:7px;height:1.05em;background:var(--accent);margin-left:1px;vertical-align:text-bottom;animation:chat-blink 1s steps(1) infinite}@keyframes chat-blink{50%{opacity:0}}.chat-chev{transition:transform .18s;color:var(--ink-faint)}.chat-chev-open{transform:rotate(180deg)}.chat-spinner{width:14px;height:14px;border:2px solid color-mix(in oklch,var(--accent) 25%,transparent);border-top-color:var(--accent);border-radius:50%;display:inline-block;animation:chat-spin .7s linear infinite;flex:none}.chat-spinner-light{border-color:#fff6;border-top-color:#fff}@keyframes chat-spin{to{transform:rotate(360deg)}}.shared-chat-page{min-height:0;display:flex;flex-direction:column;overflow:hidden;background:var(--bg)}.shared-chat-heading{flex:none;border-bottom:1px solid var(--hairline);display:flex;align-items:center;gap:10px}.shared-chat-heading h1{max-width:calc(50vw + 640px);margin:0 auto;padding:13px 32px;color:var(--ink);font-family:var(--serif);font-size:20px;font-weight:600;line-height:1.1}.shared-chat-content{width:min(876px,100%);margin:0 auto;padding:34px 28px 64px}.shared-chat-transcript{padding:0 0 26px}.shared-chat-attribution{display:flex;flex-wrap:wrap;justify-content:center;gap:5px 12px;color:var(--ink-faint);font-size:12px;line-height:1.5}.shared-chat-attribution a{color:inherit;font-weight:600;text-decoration:none}.shared-chat-attribution a:hover{color:var(--accent-text);text-decoration:underline}.shared-chat-fresh{margin-top:26px;padding-top:28px;border-top:1px solid var(--hairline)}.shared-chat-fresh h2{margin:0 0 6px;font-family:var(--serif);font-size:21px;font-weight:600}.shared-chat-fresh>p{margin:0 0 16px;color:var(--ink-soft);font-family:var(--serif)}.shared-chat-access-note{margin:-6px 0 16px;padding:10px 12px;border:1px solid color-mix(in oklch,var(--accent) 24%,var(--hairline));border-radius:9px;color:var(--ink-soft);background:color-mix(in oklch,var(--accent) 5%,var(--bg-elevated));font-size:13px;line-height:1.45}.shared-chat-access-note a{color:var(--accent-text);font-weight:600}.shared-chat-state{min-height:55vh;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;padding:48px 24px;text-align:center;color:var(--ink-soft)}.shared-chat-state h1{margin:0;color:var(--ink);font-family:var(--serif);font-size:27px}.shared-chat-state p{margin:0}.shared-chat-state button{margin-top:8px;padding:7px 13px;border:1px solid var(--hairline-strong);border-radius:7px;background:var(--bg-elevated);color:var(--ink)}@media (max-width: 900px){.shared-chat-heading h1{padding-inline:16px}}@media (max-width: 640px){.shared-chat-heading h1{padding-inline:14px}}@media (max-width: 560px){.shared-chat-content{padding:26px 16px 48px}} diff --git a/assets/index-C2-TgiAT.js b/assets/index-DvHdqmQp.js similarity index 72% rename from assets/index-C2-TgiAT.js rename to assets/index-DvHdqmQp.js index 4f9d3f410a118345a13d89a069affc863b46140c..155c14c334a1331c2821b58268a38faa6d406227 100644 --- a/assets/index-C2-TgiAT.js +++ b/assets/index-DvHdqmQp.js @@ -1 +1 @@ -import{r as u}from"./index-CnBotBa4.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}; +import{r as u}from"./index-hxawG6mk.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}; diff --git a/assets/index-CnBotBa4.js b/assets/index-hxawG6mk.js similarity index 97% rename from assets/index-CnBotBa4.js rename to assets/index-hxawG6mk.js index 7980b12c7baf191af148d169324fceb2218c0dfe..3831a48ba71b0b577efede031e1962480085fd42 100644 --- a/assets/index-CnBotBa4.js +++ b/assets/index-hxawG6mk.js @@ -1,4 +1,4 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/AuthorizePaperEditView-D4j-P-8L.js","assets/useQuery-C8pfCInN.js","assets/useMutation-YEvFXzv3.js","assets/button-DNii_czO.js","assets/paperEdits-C4mFP78Y.js","assets/FollowingView-NGImDHBL.js","assets/FeedView-CNbdpALd.js","assets/research-DhkAyrPi.js","assets/components-CSFfzsKt.js","assets/paperQueryKeys-BP2E-0yf.js","assets/LatexTitle-B1D_EqzJ.js","assets/transform-DMbrhcTx.js","assets/papers-DkTdvzl4.js","assets/safeExternalHref-CkBrsh84.js","assets/PaperFeedFilters-DBRREw9D.js","assets/PaperDateFilter-DMplC82d.js","assets/popover-BvojInsz.js","assets/chatLaunch-CptFdc8a.js","assets/chat-B0u4w1H2.js","assets/chevron-down-IUgkNqZp.js","assets/catalog-mND3MerS.js","assets/chatPrompts-DypmWIqx.js","assets/usePapers-fw4Ivp2T.js","assets/useInfiniteQuery-DUlXElgD.js","assets/useIntersectionObserver-WHgviHIR.js","assets/skeleton-DuOQBmSr.js","assets/alert-B0qZtPeK.js","assets/ChatView-Buo8RKMA.js","assets/ArtifactWorkspace-C7nTcvIL.js","assets/hover-card-CkboGKdu.js","assets/github-D6RT7m6V.js","assets/github-DFkgF81-.js","assets/PaperPreviewLink-ChJBLunV.js","assets/index-DxRopg3G.js","assets/index-DLNxIk77.js","assets/katex-DkKDou_j.js","assets/copy-0hFmISJO.js","assets/file-text-BZVTM8hV.js","assets/external-link-C_QBJuYU.js","assets/ArtifactWorkspace-Lr_OJaUk.css","assets/katex-wklAmtGL.css","assets/openrouter-BMS0vcTS.js","assets/queryOptions-C9woPjwX.js","assets/SharedChatView-BfRtRLJI.js","assets/PapersListView-B0JcRl4T.js","assets/useDebounce-Bw5By0Qg.js","assets/PaperDetailView-CQHPB8st.js","assets/ExternalSourceEvalBadge-B3diD7Bx.js","assets/ExternalSourceEvalBadge-DXfuqNnO.css","assets/latexPlainText-DI8YEXVe.js","assets/dialog-mXYRHqz9.js","assets/input-fzMY4SDb.js","assets/searchable-select-Dky9Eonk.js","assets/loader-circle-zwM3ton0.js","assets/submissions-BXysTHzU.js","assets/evaluationQueryInvalidation-CC5JhGiX.js","assets/SignInToEditDialog-Nxaw2Fu9.js","assets/textarea-D8TA8f9X.js","assets/codexAddEvals-vDBuZ5Km.js","assets/plus-DTSO60Ls.js","assets/index-C2-TgiAT.js","assets/badge-CW-eQ3eC.js","assets/savedPapersAuth-C_nw2twk.js","assets/PaperDetailView-CYodx_mg.css","assets/PaperReaderView-DFTrr534.js","assets/TagsIndexView-D4bDJ7n8.js","assets/slug-BpH-Nkvz.js","assets/TaxonomySuggestionTile-FyHlZUAE.js","assets/TagBrowseView-CuEeo3AM.js","assets/ResearchFollowButton-CIKuncTY.js","assets/trophy-CO9jGMPk.js","assets/BenchmarkTrendSparkline-CLoJOqdn.js","assets/MarkdownText-BAS9zVyW.js","assets/MethodsIndexView-wGGaknFx.js","assets/FrameworksIndexView-D1-Xne_s.js","assets/TrendsView-BmouqTke.js","assets/ConferencesIndexView-BdHp1p-m.js","assets/AiDeadlinesView-IO9EVzyU.js","assets/switch-D71Zro87.js","assets/ConferenceDetailView-C8yZCkY3.js","assets/ConferenceTaskView-DDjlbbXm.js","assets/OrganizationsIndexView-CBIhplks.js","assets/OrganizationsIndexView-dniuSNch.css","assets/OrganizationDetailView-cony7X_q.js","assets/OrganizationPaperFeed-D52-PjRU.js","assets/OrganizationContributionGraph-DMjwvdOh.js","assets/NotFound-B8QVsf71.js","assets/OrganizationTaskView-CjhWSvD0.js","assets/AuthorDetailView-Dv6cMldc.js","assets/MethodDetailView-QzkjVHR9.js","assets/BenchmarkDetailView-BOxa_K-Z.js","assets/BenchmarkDetailView-qL8oJ-Im.css","assets/SavedPapersView-B5BI5ZMF.js","assets/SettingsView-D9lZ__FE.js","assets/PrivacyView-CGg-BccQ.js","assets/ApiDocsView-B7dp0r07.js","assets/ApiDocsView-DPuMdYvY.css","assets/McpView-cPV088fi.js","assets/McpView-x81xs7uB.css","assets/SubmitView-CXqn57JU.js","assets/CronDashboard-BXgFsRKT.js","assets/operations-scUEWit-.js","assets/shield-alert-B-esZpK3.js","assets/refresh-cw-B16d_5-C.js","assets/circle-check-BBMzXw2d.js","assets/CronDashboard-DwChfW9h.css","assets/AutonomousOperations-BY3hlf53.js","assets/SubmissionsDashboard-Bpzyogxo.js","assets/SubmissionsDashboard-2iSRk_ue.css","assets/UserProfileView-lXRCWyDX.js","assets/RateLimitsView-BXs-74zu.js","assets/AstraForRoboticsView-D-23yXHI.js","assets/AstraForRoboticsView-C_lTF_XB.css","assets/SearchOverlay-BUsQ4KSW.js","assets/StagingAccessRequestView-B_iGF8VX.js"])))=>i.map(i=>d[i]); +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/AuthorizePaperEditView-CfwqJzqG.js","assets/useQuery-B7vCF2Os.js","assets/useMutation-gPqxjZGO.js","assets/button-DR59q2Iu.js","assets/paperEdits-B1ZmleCA.js","assets/FollowingView-CwwmbQtN.js","assets/FeedView-BTDU8K4n.js","assets/research-25A5rLuK.js","assets/components-Djdw_Z-e.js","assets/paperQueryKeys-BP2E-0yf.js","assets/LatexTitle-QTkECjbh.js","assets/transform-DfrN0kQW.js","assets/papers-B0ysePyJ.js","assets/safeExternalHref-CkBrsh84.js","assets/PaperFeedFilters-BsWw60hu.js","assets/PaperDateFilter-CmJ1wf5w.js","assets/popover-BEdoEHfx.js","assets/chatLaunch-DrTVeX4t.js","assets/chat-DJiy7CbR.js","assets/chevron-down-dhq7I8yA.js","assets/catalog-ePebz7GX.js","assets/chatPrompts-DypmWIqx.js","assets/usePapers-K74IxnFM.js","assets/useInfiniteQuery-BIEmOe8z.js","assets/useIntersectionObserver-rTEWxOEQ.js","assets/skeleton-CRfsRMNe.js","assets/alert-2LCyXuCE.js","assets/ChatView-DOWTcGaK.js","assets/ArtifactWorkspace-CCP7C86X.js","assets/hover-card-DEHIu6q-.js","assets/github-Bf2b_Y1p.js","assets/github-C-cqt6uw.js","assets/PaperPreviewLink-BJhSzNVs.js","assets/index-CaRYlo5c.js","assets/index-Ddr0k9KU.js","assets/katex-DkKDou_j.js","assets/copy-B2wC0pMM.js","assets/file-text-DIeliPoM.js","assets/external-link-CWzYMTrZ.js","assets/ArtifactWorkspace-Lr_OJaUk.css","assets/katex-wklAmtGL.css","assets/openrouter-CJoBewhx.js","assets/queryOptions-C9woPjwX.js","assets/SharedChatView-BxIYSQhH.js","assets/PapersListView-Bfx03Ep_.js","assets/useDebounce-lGdHpcfR.js","assets/PaperDetailView-lyG_Wyk5.js","assets/ExternalSourceEvalBadge-CxgGG_57.js","assets/ExternalSourceEvalBadge-DXfuqNnO.css","assets/latexPlainText-DI8YEXVe.js","assets/dialog-D2TDqr0v.js","assets/input-BOLTsgbP.js","assets/searchable-select-cLm40hhL.js","assets/loader-circle-CXb3415J.js","assets/submissions-DgbzmxlX.js","assets/evaluationQueryInvalidation-CC5JhGiX.js","assets/SignInToEditDialog-4j2lLlXQ.js","assets/textarea-DzlRNXqF.js","assets/codexAddEvals-BJRRv0q0.js","assets/plus-C1naIkSJ.js","assets/index-DvHdqmQp.js","assets/badge-GWSoUTqe.js","assets/savedPapersAuth-BIdugktw.js","assets/hfAvatar-CpaIt9Yp.js","assets/PaperDetailView-Cug3AJDs.css","assets/PaperReaderView-BEFvhx80.js","assets/TagsIndexView-B2e1rTXa.js","assets/slug-BpH-Nkvz.js","assets/TaxonomySuggestionTile-DiI1TNoC.js","assets/TagBrowseView-1K_yjVN1.js","assets/ResearchFollowButton-uts1MEpQ.js","assets/trophy-DQthGapR.js","assets/BenchmarkTrendSparkline-CKdWZt_L.js","assets/MarkdownText-C2hX4LYt.js","assets/MethodsIndexView-BCYbsfhj.js","assets/FrameworksIndexView-PzvCSGNE.js","assets/TrendsView-DmKtcGTI.js","assets/ConferencesIndexView-8nxxIGFL.js","assets/AiDeadlinesView-DSFbzhXI.js","assets/switch-BC-W3U4C.js","assets/ConferenceDetailView-B6G28Pgh.js","assets/ConferenceTaskView-DNX01Fcj.js","assets/OrganizationsIndexView-DcJVnqrq.js","assets/OrganizationsIndexView-dniuSNch.css","assets/OrganizationDetailView-BY-TbtJS.js","assets/OrganizationPaperFeed-CfEifyNO.js","assets/OrganizationContributionGraph-C-95DVgW.js","assets/NotFound-B1i1qS3r.js","assets/OrganizationTaskView-Dwg_gI-Q.js","assets/AuthorDetailView-DYFlBbTQ.js","assets/MethodDetailView-DuhUpcku.js","assets/BenchmarkDetailView-CYl_W7HU.js","assets/BenchmarkDetailView-qL8oJ-Im.css","assets/SavedPapersView-CL0ptv0l.js","assets/SettingsView-Es37mows.js","assets/PrivacyView-CDKix7GX.js","assets/ApiDocsView-CyWlcUYZ.js","assets/ApiDocsView-DPuMdYvY.css","assets/McpView-C4J0oV-e.js","assets/McpView-x81xs7uB.css","assets/SubmitView-DKPeFmsA.js","assets/CronDashboard-BtWUYdS2.js","assets/operations-DFo5ls8Y.js","assets/shield-alert-DrzIR1qR.js","assets/refresh-cw-Dg-Q2M4w.js","assets/circle-check-Cs0UNhNB.js","assets/CronDashboard-DwChfW9h.css","assets/AutonomousOperations-DOs7X7Qx.js","assets/SubmissionsDashboard-DpmxpqNk.js","assets/SubmissionsDashboard-2iSRk_ue.css","assets/UserProfileView-B0R2tXq1.js","assets/RateLimitsView-2wnotSf7.js","assets/AstraForRoboticsView-Cw29Eva6.js","assets/AstraForRoboticsView-C_lTF_XB.css","assets/SearchOverlay-C_z_mnYo.js","assets/StagingAccessRequestView-c98FyqK_.js"])))=>i.map(i=>d[i]); var tP=Object.defineProperty;var vm=t=>{throw TypeError(t)};var nP=(t,e,n)=>e in t?tP(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var Fr=(t,e,n)=>nP(t,typeof e!="symbol"?e+"":e,n),jd=(t,e,n)=>e.has(t)||vm("Cannot "+n);var A=(t,e,n)=>(jd(t,e,"read from private field"),n?n.call(t):e.get(t)),fe=(t,e,n)=>e.has(t)?vm("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),ne=(t,e,n,r)=>(jd(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n),ut=(t,e,n)=>(jd(t,e,"access private method"),n);var Rl=(t,e,n,r)=>({set _(s){ne(t,e,s,n)},get _(){return A(t,e,r)}});function rP(t,e){for(var n=0;nr[s]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const i of s)if(i.type==="childList")for(const o of i.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(s){const i={};return s.integrity&&(i.integrity=s.integrity),s.referrerPolicy&&(i.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?i.credentials="include":s.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(s){if(s.ep)return;s.ep=!0;const i=n(s);fetch(s.href,i)}})();var Zz=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function iw(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var ow={exports:{}},Wc={},aw={exports:{}},de={};/** * @license React * react.production.min.js @@ -160,4 +160,4 @@ For more information, see https://radix-ui.com/primitives/docs/components/${e.do * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const cD=Id("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),dD=tD,fD=nD,hD=g.forwardRef(({className:t,inset:e,children:n,...r},s)=>w.jsxs(ik,{ref:s,className:at("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[state=open]:bg-accent focus:bg-accent",e&&"pl-8",t),...r,children:[n,w.jsx(lD,{className:"ml-auto h-4 w-4"})]}));hD.displayName=ik.displayName;const pD=g.forwardRef(({className:t,...e},n)=>w.jsx(ok,{ref:n,className:at("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg 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),...e}));pD.displayName=ok.displayName;const lk=g.forwardRef(({className:t,sideOffset:e=4,...n},r)=>w.jsx(rD,{children:w.jsx(JC,{ref:r,sideOffset:e,className:at("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md 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),...n})}));lk.displayName=JC.displayName;const lr=g.forwardRef(({className:t,inset:e,...n},r)=>w.jsx(ek,{ref:r,className:at("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",e&&"pl-8",t),...n}));lr.displayName=ek.displayName;const vD=g.forwardRef(({className:t,children:e,checked:n,...r},s)=>w.jsxs(tk,{ref:s,className:at("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",t),checked:n,...r,children:[w.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:w.jsx(rk,{children:w.jsx(aD,{className:"h-4 w-4"})})}),e]}));vD.displayName=tk.displayName;const gD=g.forwardRef(({className:t,children:e,...n},r)=>w.jsxs(nk,{ref:r,className:at("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",t),...n,children:[w.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:w.jsx(rk,{children:w.jsx(uD,{className:"h-2 w-2 fill-current"})})}),e]}));gD.displayName=nk.displayName;const uk=g.forwardRef(({className:t,inset:e,...n},r)=>w.jsx(ZC,{ref:r,className:at("px-2 py-1.5 text-sm font-semibold",e&&"pl-8",t),...n}));uk.displayName=ZC.displayName;const sv=g.forwardRef(({className:t,...e},n)=>w.jsx(sk,{ref:n,className:at("-mx-1 my-1 h-px bg-muted",t),...e}));sv.displayName=sk.displayName;function mD(t){const n=(t.name||t.username||"?").trim().split(/\s+/).filter(Boolean);return n.length===0?"?":n.length===1?n[0][0].toUpperCase():(n[0][0]+n[n.length-1][0]).toUpperCase()}const yD=({user:t,onLogout:e})=>w.jsxs(dD,{children:[w.jsx(fD,{asChild:!0,children:w.jsx("button",{type:"button",className:"user-avatar-btn","aria-label":`Account menu for ${t.username}`,children:w.jsxs(AS,{className:"h-8 w-8",children:[t.avatar_url&&w.jsx($S,{src:t.avatar_url,alt:t.username}),w.jsx(LS,{className:"text-xs",children:mD(t)})]})})}),w.jsxs(lk,{align:"end",className:"w-56",children:[w.jsxs(uk,{className:"flex flex-col gap-0.5 py-2",children:[w.jsx("span",{className:"text-sm font-medium leading-tight",children:t.name||t.username}),w.jsxs("span",{className:"text-xs font-normal text-muted-foreground",children:["@",t.username]}),t.is_admin&&w.jsx("span",{className:"mt-1 inline-flex w-fit items-center rounded-full bg-amber-100 px-2 py-0.5 text-[10px] font-medium uppercase tracking-wide text-amber-900",children:"Admin"}),t.role==="contributor"&&w.jsx("span",{className:"mt-1 inline-flex w-fit items-center rounded-full bg-blue-100 px-2 py-0.5 text-[10px] font-medium uppercase tracking-wide text-blue-900",children:"Contributor"})]}),w.jsx(sv,{}),w.jsx(lr,{asChild:!0,children:w.jsx("a",{href:`https://huggingface.co/${encodeURIComponent(t.username)}`,target:"_blank",rel:"noopener noreferrer",children:"Hugging Face profile"})}),w.jsx(lr,{asChild:!0,children:w.jsx(Wn,{to:"/frameworks",children:"Frameworks"})}),w.jsx(lr,{asChild:!0,children:w.jsx(Wn,{to:"/trends",children:"Trends"})}),t.is_admin&&w.jsxs(w.Fragment,{children:[w.jsx(lr,{asChild:!0,children:w.jsx(Wn,{to:"/admin-dashboard",children:"Admin dashboard"})}),w.jsx(lr,{asChild:!0,children:w.jsx(Wn,{to:"/submissions",children:"Review submissions"})})]}),w.jsx(lr,{asChild:!0,children:w.jsx(Wn,{to:`/${encodeURIComponent(t.username)}`,children:"My contributions"})}),w.jsx(lr,{asChild:!0,children:w.jsx(Wn,{to:"/settings",children:"Settings"})}),w.jsx(sv,{}),w.jsx(lr,{onSelect:n=>{n.preventDefault(),e()},children:"Log out"})]})]}),_D="cronAdminToken";function wD(){var t;return typeof window>"u"?"":((t=window.localStorage.getItem(_D))==null?void 0:t.trim())??""}const xD=!1;class sm extends Error{constructor(n,r){var s;super(`API request failed: ${n.status} ${n.statusText}`);Fr(this,"status");Fr(this,"statusText");Fr(this,"response");Fr(this,"detail");Fr(this,"code");Fr(this,"displayMessage");this.name="ApiError",this.status=n.status,this.statusText=n.statusText,this.response=r;try{if(this.detail=(s=JSON.parse(r))==null?void 0:s.detail,typeof this.detail=="string"&&(this.message=this.detail),Array.isArray(this.detail)){const i=this.detail[0];typeof i=="object"&&i!==null&&"msg"in i&&typeof i.msg=="string"&&(this.message=i.msg)}if(typeof this.detail=="object"&&this.detail!==null&&"code"in this.detail&&typeof this.detail.code=="string"&&(this.code=this.detail.code),typeof this.detail=="object"&&this.detail!==null&&"message"in this.detail&&typeof this.detail.message=="string"){const i="help"in this.detail&&typeof this.detail.help=="string"?` See ${this.detail.help} for help.`:"";this.message=`${this.detail.message}${i}`}}catch{this.detail=void 0,this.displayMessage=r||this.message;return}this.displayMessage=this.message}}function g4(t,e){return t instanceof sm?t.displayMessage||e:typeof t=="object"&&t!==null&&"message"in t&&typeof t.message=="string"&&t.message||e}class bD{constructor(e){this.baseUrl=e}async fetch(e,n){const r=`${this.baseUrl}${e}`;try{const{headers:s,...i}=n??{},a=(i.method??"GET").toUpperCase()==="GET"?"default":"no-store",l=wD(),u=new Headers(s);return u.has("Content-Type")||u.set("Content-Type","application/json"),l&&!u.has("X-Admin-Token")&&u.set("X-Admin-Token",l),await fetch(r,{...i,cache:i.cache??a,credentials:i.credentials??"include",headers:u})}catch(s){throw console.error(`[API] Request to ${r} failed:`,s),s}}async request(e,n){const r=await this.fetch(e,n);if(!r.ok){const i=new sm(r,await r.text());throw console.error("[API] Error response:",i.response),i}return r.status===204?void 0:await r.json()}}function ED(t){t instanceof sm&&t.status===401&&t.code!=="fresh_auth_required"&&t.code!=="saved_papers_bucket_authorization_required"&&typeof window<"u"&&window.dispatchEvent(new CustomEvent("pwc:auth-stale"))}async function SD(t){try{return await t()}catch(e){throw ED(e),e}}const ck=new bD(`${jg()}/api/v1`),CD=(t,e)=>ck.fetch(t,e),iv=(t,e)=>SD(()=>ck.request(t,e)),$0={async getCurrentUser(){if(jo())return null;const t=await CD("/auth/me",{cache:"no-store"});return t.status===401||!t.ok?null:t.json()},async logout(){await iv("/auth/logout",{method:"POST"})},async requestStagingAccess(){await iv("/staging-access-request",{method:"POST"})}},im=R.createContext(null),L0="pwc:auth-stale",kD=({children:t})=>{const[e,n]=R.useState(null),[r,s]=R.useState(!0),i=R.useCallback(async()=>{s(!0);const l=await $0.getCurrentUser();n(l),s(!1)},[]),o=R.useCallback(async()=>{const l=Fg("/api/v1/auth/logout");if(new URL(l,window.location.origin).origin!==window.location.origin){const u=document.createElement("form");u.method="POST",u.action=`${l}?return_to=${encodeURIComponent(window.location.href)}`,document.body.appendChild(u),u.submit();return}await $0.logout(),n(null)},[]);R.useEffect(()=>{i()},[i]),R.useEffect(()=>{},[e]),R.useEffect(()=>{const l=()=>{n(null)};return window.addEventListener(L0,l),()=>window.removeEventListener(L0,l)},[]);const a=R.useMemo(()=>({user:e,isLoading:r,refresh:i,logout:o}),[e,r,i,o]);return w.jsx(im.Provider,{value:a,children:t})};function om(){const t=R.useContext(im);if(!t)throw new Error("useAuth must be used inside an ");return t}function m4(){return R.useContext(im)}const Os=({name:t,size:e=14})=>{const n={search:w.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"}),bookmark:w.jsx("path",{d:"M4 2h8v12l-4-3-4 3V2z",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinejoin:"round"}),menu:w.jsx("path",{d:"M2 4h12M2 8h12M2 12h12",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"}),close:w.jsx("path",{d:"M3 3l10 10M13 3L3 13",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"})};return w.jsx("svg",{className:e===11?"icon-sm":"icon",viewBox:"0 0 16 16",width:e,height:e,children:n[t]})},j0="https://github.com/huggingface/paperswithcode-feedback/issues",PD="https://github.com/huggingface/pwc-cli#mcp-server",F0="pwc:announcement:pwc-mcp:v1:dismissed",sh=[{to:"/",label:"Trending",end:!0},{to:"/tasks",label:"Browse state-of-the-art",end:!1},{to:"/methods",label:"Methods",end:!1},{to:"/conferences",label:"Conferences",end:!1},{to:"/organizations",label:"Organizations",end:!1},{to:"/submit",label:"Submit",end:!1}],RD=()=>{if(typeof navigator>"u")return!1;const t=navigator.userAgentData,e=(t==null?void 0:t.platform)||navigator.platform||navigator.userAgent||"";return/Mac|iPhone|iPad|iPod/i.test(e)},TD=()=>{const[t,e]=R.useState(!1);return R.useEffect(()=>{e(RD())},[]),w.jsx("kbd",{children:t?"⌘K":"Ctrl K"})},D0=({onOpenSearch:t})=>{const[e,n]=R.useState(!1),[r,s]=R.useState(()=>localStorage.getItem(F0)!=="1"),i=R.useRef(null),o=R.useRef(null),a=()=>n(!1),{user:l,logout:u}=om(),c=An(),d=c.pathname.startsWith("/pdf/"),f=`${c.pathname}${c.search}`||"/",h=jo(),_=al()?{to:"/chat",label:"Chat",end:!1,badge:"New"}:rL()?{to:"/chat",label:"Chat",end:!1,badge:"New",href:nL}:null,p=_?[sh[0],_,...sh.slice(1)]:sh;return R.useLayoutEffect(()=>{var S;const y=i.current,v=o.current;if(!y||!v)return;let m=!1;const x=()=>{if(m)return;const k=y.querySelector(".nav-item.active"),C=(k==null?void 0:k.offsetWidth)??0;v.style.width=`${C}px`,v.style.transform=`translateX(${(k==null?void 0:k.offsetLeft)??0}px)`,v.style.opacity=C>0?"1":"0"};x();const b=window.requestAnimationFrame(()=>{v.classList.add("nav-indicator-ready")}),E=typeof ResizeObserver>"u"?null:new ResizeObserver(x);return E==null||E.observe(y),window.addEventListener("resize",x),(S=document.fonts)==null||S.ready.then(x),()=>{m=!0,window.cancelAnimationFrame(b),E==null||E.disconnect(),window.removeEventListener("resize",x)}},[c.pathname,p.length]),w.jsxs(G$,{open:e,onOpenChange:n,children:[w.jsxs("header",{className:"app-header",children:[w.jsxs("div",{className:"app-header-inner",children:[w.jsxs(bi,{to:"/",className:"brand",onClick:a,children:[w.jsx("span",{className:"brand-mark"}),w.jsxs("span",{className:"brand-name",children:["Papers ",w.jsx("em",{children:"With Code"})]})]}),w.jsxs("nav",{className:"nav",ref:i,children:[p.map(({to:y,label:v,end:m,badge:x,href:b})=>{const E=w.jsxs(w.Fragment,{children:[w.jsx("span",{children:v}),x&&w.jsx("span",{className:"nav-new-badge","aria-hidden":"true",children:x})]});return b?w.jsx("a",{href:b,target:"_blank",rel:"noreferrer",className:`nav-item${x?" nav-item-with-badge":""}`,children:E},y):w.jsx(bi,{to:y,end:m,className:({isActive:S})=>`nav-item${x?" nav-item-with-badge":""}${S?" active":""}`,children:E},y)}),w.jsx("span",{ref:o,className:"nav-indicator","aria-hidden":"true"})]}),w.jsx("div",{className:"header-spacer"}),w.jsx("a",{className:"feedback-link header-feedback-link",href:j0,target:"_blank",rel:"noreferrer",children:"Submit feedback"}),w.jsxs("button",{className:"search-trigger",onClick:t,children:[w.jsx(Os,{name:"search",size:13}),w.jsx("span",{children:"Search papers, authors, domains…"}),w.jsx(TD,{})]}),w.jsx("button",{className:"icon-btn mobile-search-btn","aria-label":"Search",onClick:t,children:w.jsx(Os,{name:"search",size:14})}),!h&&w.jsx(bi,{to:"/saved",className:"icon-btn header-bookmark-btn","aria-label":"Saved papers",title:"Saved papers",children:w.jsx(Os,{name:"bookmark",size:13})}),h?null:l?w.jsx(yD,{user:l,onLogout:u}):w.jsx(hS,{returnTo:f}),w.jsx(K$,{asChild:!0,children:w.jsx("button",{className:"icon-btn mobile-menu-btn","aria-label":"Open menu",children:w.jsx(Os,{name:"menu",size:14})})})]}),!d&&r&&w.jsxs("div",{className:"site-announcement",role:"status",children:[w.jsx("span",{children:"New: Papers with Code "}),w.jsx("a",{href:PD,target:"_blank",rel:"noreferrer",children:"MCP"}),w.jsx("span",{children:" now available"}),w.jsx("button",{type:"button",className:"site-announcement-close","aria-label":"Dismiss announcement",onClick:()=>{localStorage.setItem(F0,"1"),s(!1)},children:w.jsx(Os,{name:"close",size:11})})]})]}),w.jsx(Q$,{children:w.jsx(Y$,{className:"mobile-nav-drawer",children:w.jsxs(X$,{className:"mobile-nav-panel","aria-describedby":void 0,children:[w.jsx(J$,{className:"sr-only",children:"Navigation menu"}),w.jsx(Z$,{className:"icon-btn mobile-nav-close","aria-label":"Close menu",children:w.jsx(Os,{name:"close",size:14})}),w.jsxs("button",{type:"button",className:"mobile-nav-link mobile-nav-search",onClick:()=>{a(),t()},children:[w.jsx(Os,{name:"search",size:14}),w.jsx("span",{children:"Search papers, authors, domains…"})]}),p.map(({to:y,label:v,end:m,badge:x,href:b})=>{const E=`mobile-nav-link${x?" mobile-nav-link-with-badge":""}`,S=w.jsxs(w.Fragment,{children:[w.jsx("span",{children:v}),x&&w.jsx("span",{className:"nav-new-badge","aria-hidden":"true",children:x})]});return b?w.jsx("a",{href:b,target:"_blank",rel:"noreferrer",className:E,onClick:a,children:S},y):w.jsx(bi,{to:y,end:m,className:E,onClick:a,children:S},y)}),w.jsx("a",{className:"mobile-nav-link",href:j0,target:"_blank",rel:"noreferrer",onClick:a,children:"Submit feedback"}),!h&&w.jsx(bi,{to:"/saved",className:"mobile-nav-link",onClick:a,children:"Saved papers"}),!h&&(l==null?void 0:l.is_admin)&&w.jsx(bi,{to:"/admin-dashboard",className:"mobile-nav-link",onClick:a,children:"Admin dashboard"})]})})})]})},ID=()=>{const{pathname:t}=An();return t==="/chat"||t.startsWith("/chat/")||t.startsWith("/pdf/")?null:w.jsx("footer",{className:"site-footer",children:w.jsxs("div",{className:"site-footer-inner",children:[w.jsxs("span",{children:["© ",new Date().getFullYear()," Hugging Face"]}),w.jsx(Wn,{to:"/docs/api",children:"API"}),w.jsx(Wn,{to:"/mcp",children:"MCP"}),w.jsx(Wn,{to:"/privacy",children:"Privacy"}),w.jsx("a",{href:"https://github.com/huggingface/paperswithcode-feedback/issues",target:"_blank",rel:"noreferrer",children:"Feedback"})]})})},OD=1,MD=1e6;let ih=0;function ND(){return ih=(ih+1)%Number.MAX_SAFE_INTEGER,ih.toString()}const oh=new Map,z0=t=>{if(oh.has(t))return;const e=setTimeout(()=>{oh.delete(t),Oa({type:"REMOVE_TOAST",toastId:t})},MD);oh.set(t,e)},AD=(t,e)=>{switch(e.type){case"ADD_TOAST":return{...t,toasts:[e.toast,...t.toasts].slice(0,OD)};case"UPDATE_TOAST":return{...t,toasts:t.toasts.map(n=>n.id===e.toast.id?{...n,...e.toast}:n)};case"DISMISS_TOAST":{const{toastId:n}=e;return n?z0(n):t.toasts.forEach(r=>{z0(r.id)}),{...t,toasts:t.toasts.map(r=>r.id===n||n===void 0?{...r,open:!1}:r)}}case"REMOVE_TOAST":return e.toastId===void 0?{...t,toasts:[]}:{...t,toasts:t.toasts.filter(n=>n.id!==e.toastId)}}},Lu=[];let ju={toasts:[]};function Oa(t){ju=AD(ju,t),Lu.forEach(e=>{e(ju)})}function $D({...t}){const e=ND(),n=s=>Oa({type:"UPDATE_TOAST",toast:{...s,id:e}}),r=()=>Oa({type:"DISMISS_TOAST",toastId:e});return Oa({type:"ADD_TOAST",toast:{...t,id:e,open:!0,onOpenChange:s=>{s||r()}}}),{id:e,dismiss:r,update:n}}function LD(){const[t,e]=g.useState(ju);return g.useEffect(()=>(Lu.push(e),()=>{const n=Lu.indexOf(e);n>-1&&Lu.splice(n,1)}),[t]),{...t,toast:$D,dismiss:n=>Oa({type:"DISMISS_TOAST",toastId:n})}}var jD=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),FD="VisuallyHidden",Od=g.forwardRef((t,e)=>w.jsx(Re.span,{...t,ref:e,style:{...jD,...t.style}}));Od.displayName=FD;var DD=Od,am="ToastProvider",[lm,zD,BD]=Ug("Toast"),[dk]=Ss("Toast",[BD]),[UD,Md]=dk(am),fk=t=>{const{__scopeToast:e,label:n="Notification",duration:r=5e3,swipeDirection:s="right",swipeThreshold:i=50,children:o}=t,[a,l]=g.useState(null),[u,c]=g.useState(0),d=g.useRef(!1),f=g.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${am}\`. Expected non-empty \`string\`.`),w.jsx(lm.Provider,{scope:e,children:w.jsx(UD,{scope:e,label:n,duration:r,swipeDirection:s,swipeThreshold:i,toastCount:u,viewport:a,onViewportChange:l,onToastAdd:g.useCallback(()=>c(h=>h+1),[]),onToastRemove:g.useCallback(()=>c(h=>h-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:f,children:o})})};fk.displayName=am;var hk="ToastViewport",VD=["F8"],ov="toast.viewportPause",av="toast.viewportResume",pk=g.forwardRef((t,e)=>{const{__scopeToast:n,hotkey:r=VD,label:s="Notifications ({hotkey})",...i}=t,o=Md(hk,n),a=zD(n),l=g.useRef(null),u=g.useRef(null),c=g.useRef(null),d=g.useRef(null),f=Xe(e,d,o.onViewportChange),h=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),_=o.toastCount>0;g.useEffect(()=>{const y=v=>{var x;r.length!==0&&r.every(b=>v[b]||v.code===b)&&((x=d.current)==null||x.focus())};return document.addEventListener("keydown",y),()=>document.removeEventListener("keydown",y)},[r]),g.useEffect(()=>{const y=l.current,v=d.current;if(_&&y&&v){const m=()=>{if(!o.isClosePausedRef.current){const S=new CustomEvent(ov);v.dispatchEvent(S),o.isClosePausedRef.current=!0}},x=()=>{if(o.isClosePausedRef.current){const S=new CustomEvent(av);v.dispatchEvent(S),o.isClosePausedRef.current=!1}},b=S=>{!y.contains(S.relatedTarget)&&x()},E=()=>{y.contains(document.activeElement)||x()};return y.addEventListener("focusin",m),y.addEventListener("focusout",b),y.addEventListener("pointermove",m),y.addEventListener("pointerleave",E),window.addEventListener("blur",m),window.addEventListener("focus",x),()=>{y.removeEventListener("focusin",m),y.removeEventListener("focusout",b),y.removeEventListener("pointermove",m),y.removeEventListener("pointerleave",E),window.removeEventListener("blur",m),window.removeEventListener("focus",x)}}},[_,o.isClosePausedRef]);const p=g.useCallback(({tabbingDirection:y})=>{const m=a().map(x=>{const b=x.ref.current,E=[b,...n3(b)];return y==="forwards"?E:E.reverse()});return(y==="forwards"?m.reverse():m).flat()},[a]);return g.useEffect(()=>{const y=d.current;if(y){const v=m=>{var E,S,k;const x=m.altKey||m.ctrlKey||m.metaKey;if(m.key==="Tab"&&!x){const C=document.activeElement,I=m.shiftKey;if(m.target===y&&I){(E=u.current)==null||E.focus();return}const N=p({tabbingDirection:I?"backwards":"forwards"}),B=N.findIndex(j=>j===C);ah(N.slice(B+1))?m.preventDefault():I?(S=u.current)==null||S.focus():(k=c.current)==null||k.focus()}};return y.addEventListener("keydown",v),()=>y.removeEventListener("keydown",v)}},[a,p]),w.jsxs($A,{ref:l,role:"region","aria-label":s.replace("{hotkey}",h),tabIndex:-1,style:{pointerEvents:_?void 0:"none"},children:[_&&w.jsx(lv,{ref:u,onFocusFromOutsideViewport:()=>{const y=p({tabbingDirection:"forwards"});ah(y)}}),w.jsx(lm.Slot,{scope:n,children:w.jsx(Re.ol,{tabIndex:-1,...i,ref:f})}),_&&w.jsx(lv,{ref:c,onFocusFromOutsideViewport:()=>{const y=p({tabbingDirection:"backwards"});ah(y)}})]})});pk.displayName=hk;var vk="ToastFocusProxy",lv=g.forwardRef((t,e)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...s}=t,i=Md(vk,n);return w.jsx(Od,{tabIndex:0,...s,ref:e,style:{position:"fixed"},onFocus:o=>{var u;const a=o.relatedTarget;!((u=i.viewport)!=null&&u.contains(a))&&r()}})});lv.displayName=vk;var kl="Toast",qD="toast.swipeStart",HD="toast.swipeMove",WD="toast.swipeCancel",GD="toast.swipeEnd",gk=g.forwardRef((t,e)=>{const{forceMount:n,open:r,defaultOpen:s,onOpenChange:i,...o}=t,[a,l]=yd({prop:r,defaultProp:s??!0,onChange:i,caller:kl});return w.jsx(er,{present:n||a,children:w.jsx(YD,{open:a,...o,ref:e,onClose:()=>l(!1),onPause:Bt(t.onPause),onResume:Bt(t.onResume),onSwipeStart:Z(t.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:Z(t.onSwipeMove,u=>{const{x:c,y:d}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","move"),u.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${c}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${d}px`)}),onSwipeCancel:Z(t.onSwipeCancel,u=>{u.currentTarget.setAttribute("data-swipe","cancel"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:Z(t.onSwipeEnd,u=>{const{x:c,y:d}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","end"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${c}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${d}px`),l(!1)})})})});gk.displayName=kl;var[KD,QD]=dk(kl,{onClose(){}}),YD=g.forwardRef((t,e)=>{const{__scopeToast:n,type:r="foreground",duration:s,open:i,onClose:o,onEscapeKeyDown:a,onPause:l,onResume:u,onSwipeStart:c,onSwipeMove:d,onSwipeCancel:f,onSwipeEnd:h,..._}=t,p=Md(kl,n),[y,v]=g.useState(null),m=Xe(e,j=>v(j)),x=g.useRef(null),b=g.useRef(null),E=s||p.duration,S=g.useRef(0),k=g.useRef(E),C=g.useRef(0),{onToastAdd:I,onToastRemove:P}=p,$=Bt(()=>{var W;(y==null?void 0:y.contains(document.activeElement))&&((W=p.viewport)==null||W.focus()),o()}),N=g.useCallback(j=>{!j||j===1/0||(window.clearTimeout(C.current),S.current=new Date().getTime(),C.current=window.setTimeout($,j))},[$]);g.useEffect(()=>{const j=p.viewport;if(j){const W=()=>{N(k.current),u==null||u()},q=()=>{const G=new Date().getTime()-S.current;k.current=k.current-G,window.clearTimeout(C.current),l==null||l()};return j.addEventListener(ov,q),j.addEventListener(av,W),()=>{j.removeEventListener(ov,q),j.removeEventListener(av,W)}}},[p.viewport,E,l,u,N]),g.useEffect(()=>{i&&!p.isClosePausedRef.current&&N(E)},[i,E,p.isClosePausedRef,N]),g.useEffect(()=>(I(),()=>P()),[I,P]);const B=g.useMemo(()=>y?Ek(y):null,[y]);return p.viewport?w.jsxs(w.Fragment,{children:[B&&w.jsx(XD,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite",children:B}),w.jsx(KD,{scope:n,onClose:$,children:_l.createPortal(w.jsx(lm.ItemSlot,{scope:n,children:w.jsx(AA,{asChild:!0,onEscapeKeyDown:Z(a,()=>{p.isFocusedToastEscapeKeyDownRef.current||$(),p.isFocusedToastEscapeKeyDownRef.current=!1}),children:w.jsx(Re.li,{tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":p.swipeDirection,..._,ref:m,style:{userSelect:"none",touchAction:"none",...t.style},onKeyDown:Z(t.onKeyDown,j=>{j.key==="Escape"&&(a==null||a(j.nativeEvent),j.nativeEvent.defaultPrevented||(p.isFocusedToastEscapeKeyDownRef.current=!0,$()))}),onPointerDown:Z(t.onPointerDown,j=>{j.button===0&&(x.current={x:j.clientX,y:j.clientY})}),onPointerMove:Z(t.onPointerMove,j=>{if(!x.current)return;const W=j.clientX-x.current.x,q=j.clientY-x.current.y,G=!!b.current,M=["left","right"].includes(p.swipeDirection),T=["left","up"].includes(p.swipeDirection)?Math.min:Math.max,z=M?T(0,W):0,K=M?0:T(0,q),H=j.pointerType==="touch"?10:2,Q={x:z,y:K},X={originalEvent:j,delta:Q};G?(b.current=Q,fu(HD,d,X,{discrete:!1})):B0(Q,p.swipeDirection,H)?(b.current=Q,fu(qD,c,X,{discrete:!1}),j.target.setPointerCapture(j.pointerId)):(Math.abs(W)>H||Math.abs(q)>H)&&(x.current=null)}),onPointerUp:Z(t.onPointerUp,j=>{const W=b.current,q=j.target;if(q.hasPointerCapture(j.pointerId)&&q.releasePointerCapture(j.pointerId),b.current=null,x.current=null,W){const G=j.currentTarget,M={originalEvent:j,delta:W};B0(W,p.swipeDirection,p.swipeThreshold)?fu(GD,h,M,{discrete:!0}):fu(WD,f,M,{discrete:!0}),G.addEventListener("click",T=>T.preventDefault(),{once:!0})}})})})}),p.viewport)})]}):null}),XD=t=>{const{__scopeToast:e,children:n,...r}=t,s=Md(kl,e),[i,o]=g.useState(!1),[a,l]=g.useState(!1);return e3(()=>o(!0)),g.useEffect(()=>{const u=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(u)},[]),a?null:w.jsx(_d,{asChild:!0,children:w.jsx(Od,{...r,children:i&&w.jsxs(w.Fragment,{children:[s.label," ",n]})})})},JD="ToastTitle",mk=g.forwardRef((t,e)=>{const{__scopeToast:n,...r}=t;return w.jsx(Re.div,{...r,ref:e})});mk.displayName=JD;var ZD="ToastDescription",yk=g.forwardRef((t,e)=>{const{__scopeToast:n,...r}=t;return w.jsx(Re.div,{...r,ref:e})});yk.displayName=ZD;var _k="ToastAction",wk=g.forwardRef((t,e)=>{const{altText:n,...r}=t;return n.trim()?w.jsx(bk,{altText:n,asChild:!0,children:w.jsx(um,{...r,ref:e})}):(console.error(`Invalid prop \`altText\` supplied to \`${_k}\`. Expected non-empty \`string\`.`),null)});wk.displayName=_k;var xk="ToastClose",um=g.forwardRef((t,e)=>{const{__scopeToast:n,...r}=t,s=QD(xk,n);return w.jsx(bk,{asChild:!0,children:w.jsx(Re.button,{type:"button",...r,ref:e,onClick:Z(t.onClick,s.onClose)})})});um.displayName=xk;var bk=g.forwardRef((t,e)=>{const{__scopeToast:n,altText:r,...s}=t;return w.jsx(Re.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...s,ref:e})});function Ek(t){const e=[];return Array.from(t.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&e.push(r.textContent),t3(r)){const s=r.ariaHidden||r.hidden||r.style.display==="none",i=r.dataset.radixToastAnnounceExclude==="";if(!s)if(i){const o=r.dataset.radixToastAnnounceAlt;o&&e.push(o)}else e.push(...Ek(r))}}),e}function fu(t,e,n,{discrete:r}){const s=n.originalEvent.currentTarget,i=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:n});e&&s.addEventListener(t,e,{once:!0}),r?Og(s,i):s.dispatchEvent(i)}var B0=(t,e,n=0)=>{const r=Math.abs(t.x),s=Math.abs(t.y),i=r>s;return e==="left"||e==="right"?i&&r>n:!i&&s>n};function e3(t=()=>{}){const e=Bt(t);pn(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(e)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[e])}function t3(t){return t.nodeType===t.ELEMENT_NODE}function n3(t){const e=[],n=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const s=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||s?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)e.push(n.currentNode);return e}function ah(t){const e=document.activeElement;return t.some(n=>n===e?!0:(n.focus(),document.activeElement!==e))}var r3=fk,Sk=pk,Ck=gk,kk=mk,Pk=yk,Rk=wk,Tk=um;const U0=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,V0=RS,s3=(t,e)=>n=>{var r;if((e==null?void 0:e.variants)==null)return V0(t,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:s,defaultVariants:i}=e,o=Object.keys(s).map(u=>{const c=n==null?void 0:n[u],d=i==null?void 0:i[u];if(c===null)return null;const f=U0(c)||U0(d);return s[u][f]}),a=n&&Object.entries(n).reduce((u,c)=>{let[d,f]=c;return f===void 0||(u[d]=f),u},{}),l=e==null||(r=e.compoundVariants)===null||r===void 0?void 0:r.reduce((u,c)=>{let{class:d,className:f,...h}=c;return Object.entries(h).every(_=>{let[p,y]=_;return Array.isArray(y)?y.includes({...i,...a}[p]):{...i,...a}[p]===y})?[...u,d,f]:u},[]);return V0(t,o,l,n==null?void 0:n.class,n==null?void 0:n.className)},i3=r3,Ik=g.forwardRef(({className:t,...e},n)=>w.jsx(Sk,{ref:n,className:at("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",t),...e}));Ik.displayName=Sk.displayName;const o3=s3("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-16 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),Ok=g.forwardRef(({className:t,variant:e,...n},r)=>w.jsx(Ck,{ref:r,className:at(o3({variant:e}),t),...n}));Ok.displayName=Ck.displayName;const a3=g.forwardRef(({className:t,...e},n)=>w.jsx(Rk,{ref:n,className:at("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors group-[.destructive]:border-muted/40 hover:bg-secondary group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 group-[.destructive]:focus:ring-destructive disabled:pointer-events-none disabled:opacity-50",t),...e}));a3.displayName=Rk.displayName;const Mk=g.forwardRef(({className:t,...e},n)=>w.jsx(Tk,{ref:n,className:at("absolute right-2 top-2 inline-flex h-11 w-11 items-center justify-center rounded-md text-foreground transition-colors hover:bg-muted focus:outline-none focus:ring-2 focus:ring-ring group-[.destructive]:text-destructive-foreground group-[.destructive]:hover:bg-destructive-foreground/10 group-[.destructive]:focus:ring-destructive-foreground",t),"aria-label":"Dismiss notification","toast-close":"",...e,children:w.jsx(cD,{className:"h-4 w-4"})}));Mk.displayName=Tk.displayName;const Nk=g.forwardRef(({className:t,...e},n)=>w.jsx(kk,{ref:n,className:at("text-sm font-semibold",t),...e}));Nk.displayName=kk.displayName;const Ak=g.forwardRef(({className:t,...e},n)=>w.jsx(Pk,{ref:n,className:at("text-sm opacity-90",t),...e}));Ak.displayName=Pk.displayName;function l3(){const{toasts:t}=LD();return w.jsxs(i3,{children:[t.map(function({id:e,title:n,description:r,action:s,...i}){return w.jsxs(Ok,{...i,children:[w.jsxs("div",{className:"grid gap-1",children:[n&&w.jsx(Nk,{children:n}),r&&w.jsx(Ak,{children:r})]}),s,w.jsx(Mk,{})]},e)}),w.jsx(Ik,{})]})}var u3=t=>{switch(t){case"success":return f3;case"info":return p3;case"warning":return h3;case"error":return v3;default:return null}},c3=Array(12).fill(0),d3=({visible:t,className:e})=>R.createElement("div",{className:["sonner-loading-wrapper",e].filter(Boolean).join(" "),"data-visible":t},R.createElement("div",{className:"sonner-spinner"},c3.map((n,r)=>R.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),f3=R.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},R.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),h3=R.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},R.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),p3=R.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},R.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),v3=R.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},R.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),g3=R.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},R.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),R.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),m3=()=>{let[t,e]=R.useState(document.hidden);return R.useEffect(()=>{let n=()=>{e(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),t},uv=1,y3=class{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{let e=this.subscribers.indexOf(t);this.subscribers.splice(e,1)}),this.publish=t=>{this.subscribers.forEach(e=>e(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var e;let{message:n,...r}=t,s=typeof(t==null?void 0:t.id)=="number"||((e=t.id)==null?void 0:e.length)>0?t.id:uv++,i=this.toasts.find(a=>a.id===s),o=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(s)&&this.dismissedToasts.delete(s),i?this.toasts=this.toasts.map(a=>a.id===s?(this.publish({...a,...t,id:s,title:n}),{...a,...t,id:s,dismissible:o,title:n}):a):this.addToast({title:n,...r,dismissible:o,id:s}),s},this.dismiss=t=>(this.dismissedToasts.add(t),t||this.toasts.forEach(e=>{this.subscribers.forEach(n=>n({id:e.id,dismiss:!0}))}),this.subscribers.forEach(e=>e({id:t,dismiss:!0})),t),this.message=(t,e)=>this.create({...e,message:t}),this.error=(t,e)=>this.create({...e,message:t,type:"error"}),this.success=(t,e)=>this.create({...e,type:"success",message:t}),this.info=(t,e)=>this.create({...e,type:"info",message:t}),this.warning=(t,e)=>this.create({...e,type:"warning",message:t}),this.loading=(t,e)=>this.create({...e,type:"loading",message:t}),this.promise=(t,e)=>{if(!e)return;let n;e.loading!==void 0&&(n=this.create({...e,promise:t,type:"loading",message:e.loading,description:typeof e.description!="function"?e.description:void 0}));let r=t instanceof Promise?t:t(),s=n!==void 0,i,o=r.then(async l=>{if(i=["resolve",l],R.isValidElement(l))s=!1,this.create({id:n,type:"default",message:l});else if(w3(l)&&!l.ok){s=!1;let u=typeof e.error=="function"?await e.error(`HTTP error! status: ${l.status}`):e.error,c=typeof e.description=="function"?await e.description(`HTTP error! status: ${l.status}`):e.description;this.create({id:n,type:"error",message:u,description:c})}else if(e.success!==void 0){s=!1;let u=typeof e.success=="function"?await e.success(l):e.success,c=typeof e.description=="function"?await e.description(l):e.description;this.create({id:n,type:"success",message:u,description:c})}}).catch(async l=>{if(i=["reject",l],e.error!==void 0){s=!1;let u=typeof e.error=="function"?await e.error(l):e.error,c=typeof e.description=="function"?await e.description(l):e.description;this.create({id:n,type:"error",message:u,description:c})}}).finally(()=>{var l;s&&(this.dismiss(n),n=void 0),(l=e.finally)==null||l.call(e)}),a=()=>new Promise((l,u)=>o.then(()=>i[0]==="reject"?u(i[1]):l(i[1])).catch(u));return typeof n!="string"&&typeof n!="number"?{unwrap:a}:Object.assign(n,{unwrap:a})},this.custom=(t,e)=>{let n=(e==null?void 0:e.id)||uv++;return this.create({jsx:t(n),id:n,...e}),n},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},Nt=new y3,_3=(t,e)=>{let n=(e==null?void 0:e.id)||uv++;return Nt.addToast({title:t,...e,id:n}),n},w3=t=>t&&typeof t=="object"&&"ok"in t&&typeof t.ok=="boolean"&&"status"in t&&typeof t.status=="number",x3=_3,b3=()=>Nt.toasts,E3=()=>Nt.getActiveToasts();Object.assign(x3,{success:Nt.success,info:Nt.info,warning:Nt.warning,error:Nt.error,custom:Nt.custom,message:Nt.message,promise:Nt.promise,dismiss:Nt.dismiss,loading:Nt.loading},{getHistory:b3,getToasts:E3});function S3(t,{insertAt:e}={}){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",e==="top"&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=t:r.appendChild(document.createTextNode(t))}S3(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:var(--offset-right)}:where([data-sonner-toaster][data-x-position="left"]){left:var(--offset-left)}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:var(--offset-top)}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:var(--offset-bottom)}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:-50%;right:-50%;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y, 0px)) translate(var(--swipe-amount-x, 0px));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-bg-hover: hsl(0, 0%, 12%);--normal-border: hsl(0, 0%, 20%);--normal-border-hover: hsl(0, 0%, 25%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);--error-text: hsl(358, 100%, 81%)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)} -`);function hu(t){return t.label!==void 0}var C3=3,k3="32px",P3="16px",q0=4e3,R3=356,T3=14,I3=20,O3=200;function xn(...t){return t.filter(Boolean).join(" ")}function M3(t){let[e,n]=t.split("-"),r=[];return e&&r.push(e),n&&r.push(n),r}var N3=t=>{var e,n,r,s,i,o,a,l,u,c,d;let{invert:f,toast:h,unstyled:_,interacting:p,setHeights:y,visibleToasts:v,heights:m,index:x,toasts:b,expanded:E,removeToast:S,defaultRichColors:k,closeButton:C,style:I,cancelButtonStyle:P,actionButtonStyle:$,className:N="",descriptionClassName:B="",duration:j,position:W,gap:q,loadingIcon:G,expandByDefault:M,classNames:T,icons:z,closeButtonAriaLabel:K="Close toast",pauseWhenPageIsHidden:H}=t,[Q,X]=R.useState(null),[ie,pe]=R.useState(null),[se,ve]=R.useState(!1),[_e,Ze]=R.useState(!1),[Ot,et]=R.useState(!1),[ze,nr]=R.useState(!1),[Or,lt]=R.useState(!1),[Mr,tn]=R.useState(0),[Ut,Nr]=R.useState(0),Ar=R.useRef(h.duration||j||q0),Bo=R.useRef(null),vn=R.useRef(null),Wk=x===0,Gk=x+1<=v,nn=h.type,hi=h.dismissible!==!1,Kk=h.className||"",Qk=h.descriptionClassName||"",Pl=R.useMemo(()=>m.findIndex(oe=>oe.toastId===h.id)||0,[m,h.id]),Yk=R.useMemo(()=>{var oe;return(oe=h.closeButton)!=null?oe:C},[h.closeButton,C]),dm=R.useMemo(()=>h.duration||j||q0,[h.duration,j]),$d=R.useRef(0),pi=R.useRef(0),fm=R.useRef(0),vi=R.useRef(null),[Xk,Jk]=W.split("-"),hm=R.useMemo(()=>m.reduce((oe,Se,je)=>je>=Pl?oe:oe+Se.height,0),[m,Pl]),pm=m3(),Zk=h.invert||f,Ld=nn==="loading";pi.current=R.useMemo(()=>Pl*q+hm,[Pl,hm]),R.useEffect(()=>{Ar.current=dm},[dm]),R.useEffect(()=>{ve(!0)},[]),R.useEffect(()=>{let oe=vn.current;if(oe){let Se=oe.getBoundingClientRect().height;return Nr(Se),y(je=>[{toastId:h.id,height:Se,position:h.position},...je]),()=>y(je=>je.filter(gn=>gn.toastId!==h.id))}},[y,h.id]),R.useLayoutEffect(()=>{if(!se)return;let oe=vn.current,Se=oe.style.height;oe.style.height="auto";let je=oe.getBoundingClientRect().height;oe.style.height=Se,Nr(je),y(gn=>gn.find(mn=>mn.toastId===h.id)?gn.map(mn=>mn.toastId===h.id?{...mn,height:je}:mn):[{toastId:h.id,height:je,position:h.position},...gn])},[se,h.title,h.description,y,h.id]);let $r=R.useCallback(()=>{Ze(!0),tn(pi.current),y(oe=>oe.filter(Se=>Se.toastId!==h.id)),setTimeout(()=>{S(h)},O3)},[h,S,y,pi]);R.useEffect(()=>{if(h.promise&&nn==="loading"||h.duration===1/0||h.type==="loading")return;let oe;return E||p||H&&pm?(()=>{if(fm.current<$d.current){let Se=new Date().getTime()-$d.current;Ar.current=Ar.current-Se}fm.current=new Date().getTime()})():Ar.current!==1/0&&($d.current=new Date().getTime(),oe=setTimeout(()=>{var Se;(Se=h.onAutoClose)==null||Se.call(h,h),$r()},Ar.current)),()=>clearTimeout(oe)},[E,p,h,nn,H,pm,$r]),R.useEffect(()=>{h.delete&&$r()},[$r,h.delete]);function eP(){var oe,Se,je;return z!=null&&z.loading?R.createElement("div",{className:xn(T==null?void 0:T.loader,(oe=h==null?void 0:h.classNames)==null?void 0:oe.loader,"sonner-loader"),"data-visible":nn==="loading"},z.loading):G?R.createElement("div",{className:xn(T==null?void 0:T.loader,(Se=h==null?void 0:h.classNames)==null?void 0:Se.loader,"sonner-loader"),"data-visible":nn==="loading"},G):R.createElement(d3,{className:xn(T==null?void 0:T.loader,(je=h==null?void 0:h.classNames)==null?void 0:je.loader),visible:nn==="loading"})}return R.createElement("li",{tabIndex:0,ref:vn,className:xn(N,Kk,T==null?void 0:T.toast,(e=h==null?void 0:h.classNames)==null?void 0:e.toast,T==null?void 0:T.default,T==null?void 0:T[nn],(n=h==null?void 0:h.classNames)==null?void 0:n[nn]),"data-sonner-toast":"","data-rich-colors":(r=h.richColors)!=null?r:k,"data-styled":!(h.jsx||h.unstyled||_),"data-mounted":se,"data-promise":!!h.promise,"data-swiped":Or,"data-removed":_e,"data-visible":Gk,"data-y-position":Xk,"data-x-position":Jk,"data-index":x,"data-front":Wk,"data-swiping":Ot,"data-dismissible":hi,"data-type":nn,"data-invert":Zk,"data-swipe-out":ze,"data-swipe-direction":ie,"data-expanded":!!(E||M&&se),style:{"--index":x,"--toasts-before":x,"--z-index":b.length-x,"--offset":`${_e?Mr:pi.current}px`,"--initial-height":M?"auto":`${Ut}px`,...I,...h.style},onDragEnd:()=>{et(!1),X(null),vi.current=null},onPointerDown:oe=>{Ld||!hi||(Bo.current=new Date,tn(pi.current),oe.target.setPointerCapture(oe.pointerId),oe.target.tagName!=="BUTTON"&&(et(!0),vi.current={x:oe.clientX,y:oe.clientY}))},onPointerUp:()=>{var oe,Se,je,gn;if(ze||!hi)return;vi.current=null;let mn=Number(((oe=vn.current)==null?void 0:oe.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Lr=Number(((Se=vn.current)==null?void 0:Se.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Cs=new Date().getTime()-((je=Bo.current)==null?void 0:je.getTime()),yn=Q==="x"?mn:Lr,jr=Math.abs(yn)/Cs;if(Math.abs(yn)>=I3||jr>.11){tn(pi.current),(gn=h.onDismiss)==null||gn.call(h,h),pe(Q==="x"?mn>0?"right":"left":Lr>0?"down":"up"),$r(),nr(!0),lt(!1);return}et(!1),X(null)},onPointerMove:oe=>{var Se,je,gn,mn;if(!vi.current||!hi||((Se=window.getSelection())==null?void 0:Se.toString().length)>0)return;let Lr=oe.clientY-vi.current.y,Cs=oe.clientX-vi.current.x,yn=(je=t.swipeDirections)!=null?je:M3(W);!Q&&(Math.abs(Cs)>1||Math.abs(Lr)>1)&&X(Math.abs(Cs)>Math.abs(Lr)?"x":"y");let jr={x:0,y:0};Q==="y"?(yn.includes("top")||yn.includes("bottom"))&&(yn.includes("top")&&Lr<0||yn.includes("bottom")&&Lr>0)&&(jr.y=Lr):Q==="x"&&(yn.includes("left")||yn.includes("right"))&&(yn.includes("left")&&Cs<0||yn.includes("right")&&Cs>0)&&(jr.x=Cs),(Math.abs(jr.x)>0||Math.abs(jr.y)>0)&<(!0),(gn=vn.current)==null||gn.style.setProperty("--swipe-amount-x",`${jr.x}px`),(mn=vn.current)==null||mn.style.setProperty("--swipe-amount-y",`${jr.y}px`)}},Yk&&!h.jsx?R.createElement("button",{"aria-label":K,"data-disabled":Ld,"data-close-button":!0,onClick:Ld||!hi?()=>{}:()=>{var oe;$r(),(oe=h.onDismiss)==null||oe.call(h,h)},className:xn(T==null?void 0:T.closeButton,(s=h==null?void 0:h.classNames)==null?void 0:s.closeButton)},(i=z==null?void 0:z.close)!=null?i:g3):null,h.jsx||g.isValidElement(h.title)?h.jsx?h.jsx:typeof h.title=="function"?h.title():h.title:R.createElement(R.Fragment,null,nn||h.icon||h.promise?R.createElement("div",{"data-icon":"",className:xn(T==null?void 0:T.icon,(o=h==null?void 0:h.classNames)==null?void 0:o.icon)},h.promise||h.type==="loading"&&!h.icon?h.icon||eP():null,h.type!=="loading"?h.icon||(z==null?void 0:z[nn])||u3(nn):null):null,R.createElement("div",{"data-content":"",className:xn(T==null?void 0:T.content,(a=h==null?void 0:h.classNames)==null?void 0:a.content)},R.createElement("div",{"data-title":"",className:xn(T==null?void 0:T.title,(l=h==null?void 0:h.classNames)==null?void 0:l.title)},typeof h.title=="function"?h.title():h.title),h.description?R.createElement("div",{"data-description":"",className:xn(B,Qk,T==null?void 0:T.description,(u=h==null?void 0:h.classNames)==null?void 0:u.description)},typeof h.description=="function"?h.description():h.description):null),g.isValidElement(h.cancel)?h.cancel:h.cancel&&hu(h.cancel)?R.createElement("button",{"data-button":!0,"data-cancel":!0,style:h.cancelButtonStyle||P,onClick:oe=>{var Se,je;hu(h.cancel)&&hi&&((je=(Se=h.cancel).onClick)==null||je.call(Se,oe),$r())},className:xn(T==null?void 0:T.cancelButton,(c=h==null?void 0:h.classNames)==null?void 0:c.cancelButton)},h.cancel.label):null,g.isValidElement(h.action)?h.action:h.action&&hu(h.action)?R.createElement("button",{"data-button":!0,"data-action":!0,style:h.actionButtonStyle||$,onClick:oe=>{var Se,je;hu(h.action)&&((je=(Se=h.action).onClick)==null||je.call(Se,oe),!oe.defaultPrevented&&$r())},className:xn(T==null?void 0:T.actionButton,(d=h==null?void 0:h.classNames)==null?void 0:d.actionButton)},h.action.label):null))};function H0(){if(typeof window>"u"||typeof document>"u")return"ltr";let t=document.documentElement.getAttribute("dir");return t==="auto"||!t?window.getComputedStyle(document.documentElement).direction:t}function A3(t,e){let n={};return[t,e].forEach((r,s)=>{let i=s===1,o=i?"--mobile-offset":"--offset",a=i?P3:k3;function l(u){["top","right","bottom","left"].forEach(c=>{n[`${o}-${c}`]=typeof u=="number"?`${u}px`:u})}typeof r=="number"||typeof r=="string"?l(r):typeof r=="object"?["top","right","bottom","left"].forEach(u=>{r[u]===void 0?n[`${o}-${u}`]=a:n[`${o}-${u}`]=typeof r[u]=="number"?`${r[u]}px`:r[u]}):l(a)}),n}var $3=g.forwardRef(function(t,e){let{invert:n,position:r="bottom-right",hotkey:s=["altKey","KeyT"],expand:i,closeButton:o,className:a,offset:l,mobileOffset:u,theme:c="light",richColors:d,duration:f,style:h,visibleToasts:_=C3,toastOptions:p,dir:y=H0(),gap:v=T3,loadingIcon:m,icons:x,containerAriaLabel:b="Notifications",pauseWhenPageIsHidden:E}=t,[S,k]=R.useState([]),C=R.useMemo(()=>Array.from(new Set([r].concat(S.filter(H=>H.position).map(H=>H.position)))),[S,r]),[I,P]=R.useState([]),[$,N]=R.useState(!1),[B,j]=R.useState(!1),[W,q]=R.useState(c!=="system"?c:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),G=R.useRef(null),M=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),T=R.useRef(null),z=R.useRef(!1),K=R.useCallback(H=>{k(Q=>{var X;return(X=Q.find(ie=>ie.id===H.id))!=null&&X.delete||Nt.dismiss(H.id),Q.filter(({id:ie})=>ie!==H.id)})},[]);return R.useEffect(()=>Nt.subscribe(H=>{if(H.dismiss){k(Q=>Q.map(X=>X.id===H.id?{...X,delete:!0}:X));return}setTimeout(()=>{yb.flushSync(()=>{k(Q=>{let X=Q.findIndex(ie=>ie.id===H.id);return X!==-1?[...Q.slice(0,X),{...Q[X],...H},...Q.slice(X+1)]:[H,...Q]})})})}),[]),R.useEffect(()=>{if(c!=="system"){q(c);return}if(c==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?q("dark"):q("light")),typeof window>"u")return;let H=window.matchMedia("(prefers-color-scheme: dark)");try{H.addEventListener("change",({matches:Q})=>{q(Q?"dark":"light")})}catch{H.addListener(({matches:X})=>{try{q(X?"dark":"light")}catch(ie){console.error(ie)}})}},[c]),R.useEffect(()=>{S.length<=1&&N(!1)},[S]),R.useEffect(()=>{let H=Q=>{var X,ie;s.every(pe=>Q[pe]||Q.code===pe)&&(N(!0),(X=G.current)==null||X.focus()),Q.code==="Escape"&&(document.activeElement===G.current||(ie=G.current)!=null&&ie.contains(document.activeElement))&&N(!1)};return document.addEventListener("keydown",H),()=>document.removeEventListener("keydown",H)},[s]),R.useEffect(()=>{if(G.current)return()=>{T.current&&(T.current.focus({preventScroll:!0}),T.current=null,z.current=!1)}},[G.current]),R.createElement("section",{ref:e,"aria-label":`${b} ${M}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},C.map((H,Q)=>{var X;let[ie,pe]=H.split("-");return S.length?R.createElement("ol",{key:H,dir:y==="auto"?H0():y,tabIndex:-1,ref:G,className:a,"data-sonner-toaster":!0,"data-theme":W,"data-y-position":ie,"data-lifted":$&&S.length>1&&!i,"data-x-position":pe,style:{"--front-toast-height":`${((X=I[0])==null?void 0:X.height)||0}px`,"--width":`${R3}px`,"--gap":`${v}px`,...h,...A3(l,u)},onBlur:se=>{z.current&&!se.currentTarget.contains(se.relatedTarget)&&(z.current=!1,T.current&&(T.current.focus({preventScroll:!0}),T.current=null))},onFocus:se=>{se.target instanceof HTMLElement&&se.target.dataset.dismissible==="false"||z.current||(z.current=!0,T.current=se.relatedTarget)},onMouseEnter:()=>N(!0),onMouseMove:()=>N(!0),onMouseLeave:()=>{B||N(!1)},onDragEnd:()=>N(!1),onPointerDown:se=>{se.target instanceof HTMLElement&&se.target.dataset.dismissible==="false"||j(!0)},onPointerUp:()=>j(!1)},S.filter(se=>!se.position&&Q===0||se.position===H).map((se,ve)=>{var _e,Ze;return R.createElement(N3,{key:se.id,icons:x,index:ve,toast:se,defaultRichColors:d,duration:(_e=p==null?void 0:p.duration)!=null?_e:f,className:p==null?void 0:p.className,descriptionClassName:p==null?void 0:p.descriptionClassName,invert:n,visibleToasts:_,closeButton:(Ze=p==null?void 0:p.closeButton)!=null?Ze:o,interacting:B,position:H,style:p==null?void 0:p.style,unstyled:p==null?void 0:p.unstyled,classNames:p==null?void 0:p.classNames,cancelButtonStyle:p==null?void 0:p.cancelButtonStyle,actionButtonStyle:p==null?void 0:p.actionButtonStyle,removeToast:K,toasts:S.filter(Ot=>Ot.position==se.position),heights:I.filter(Ot=>Ot.position==se.position),setHeights:P,expandByDefault:i,gap:v,loadingIcon:m,expanded:$,pauseWhenPageIsHidden:E,swipeDirections:t.swipeDirections})})):null}))});const L3=({...t})=>{const{theme:e="system"}=OT();return w.jsx($3,{theme:e,className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...t})};var j3=Symbol("radix.slottable");function F3(t){const e=({children:n})=>w.jsx(w.Fragment,{children:n});return e.displayName=`${t}.Slottable`,e.__radixId=j3,e}var[Nd]=Ss("Tooltip",[kd]),cm=kd(),$k="TooltipProvider",D3=700,W0="tooltip.open",[z3,Lk]=Nd($k),jk=t=>{const{__scopeTooltip:e,delayDuration:n=D3,skipDelayDuration:r=300,disableHoverableContent:s=!1,children:i}=t,o=g.useRef(!0),a=g.useRef(!1),l=g.useRef(0);return g.useEffect(()=>{const u=l.current;return()=>window.clearTimeout(u)},[]),w.jsx(z3,{scope:e,isOpenDelayedRef:o,delayDuration:n,onOpen:g.useCallback(()=>{window.clearTimeout(l.current),o.current=!1},[]),onClose:g.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>o.current=!0,r)},[r]),isPointerInTransitRef:a,onPointerInTransitChange:g.useCallback(u=>{a.current=u},[]),disableHoverableContent:s,children:i})};jk.displayName=$k;var Fk="Tooltip",[y4,Ad]=Nd(Fk),cv="TooltipTrigger",B3=g.forwardRef((t,e)=>{const{__scopeTooltip:n,...r}=t,s=Ad(cv,n),i=Lk(cv,n),o=cm(n),a=g.useRef(null),l=Xe(e,a,s.onTriggerChange),u=g.useRef(!1),c=g.useRef(!1),d=g.useCallback(()=>u.current=!1,[]);return g.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),w.jsx(iC,{asChild:!0,...o,children:w.jsx(Re.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...r,ref:l,onPointerMove:Z(t.onPointerMove,f=>{f.pointerType!=="touch"&&!c.current&&!i.isPointerInTransitRef.current&&(s.onTriggerEnter(),c.current=!0)}),onPointerLeave:Z(t.onPointerLeave,()=>{s.onTriggerLeave(),c.current=!1}),onPointerDown:Z(t.onPointerDown,()=>{s.open&&s.onClose(),u.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:Z(t.onFocus,()=>{u.current||s.onOpen()}),onBlur:Z(t.onBlur,s.onClose),onClick:Z(t.onClick,s.onClose)})})});B3.displayName=cv;var U3="TooltipPortal",[_4,V3]=Nd(U3,{forceMount:void 0}),Mo="TooltipContent",Dk=g.forwardRef((t,e)=>{const n=V3(Mo,t.__scopeTooltip),{forceMount:r=n.forceMount,side:s="top",...i}=t,o=Ad(Mo,t.__scopeTooltip);return w.jsx(er,{present:r||o.open,children:o.disableHoverableContent?w.jsx(zk,{side:s,...i,ref:e}):w.jsx(q3,{side:s,...i,ref:e})})}),q3=g.forwardRef((t,e)=>{const n=Ad(Mo,t.__scopeTooltip),r=Lk(Mo,t.__scopeTooltip),s=g.useRef(null),i=Xe(e,s),[o,a]=g.useState(null),{trigger:l,onClose:u}=n,c=s.current,{onPointerInTransitChange:d}=r,f=g.useCallback(()=>{a(null),d(!1)},[d]),h=g.useCallback((_,p)=>{const y=_.currentTarget,v={x:_.clientX,y:_.clientY},m=Q3(v,y.getBoundingClientRect()),x=Y3(v,m),b=X3(p.getBoundingClientRect()),E=Z3([...x,...b]);a(E),d(!0)},[d]);return g.useEffect(()=>()=>f(),[f]),g.useEffect(()=>{if(l&&c){const _=y=>h(y,c),p=y=>h(y,l);return l.addEventListener("pointerleave",_),c.addEventListener("pointerleave",p),()=>{l.removeEventListener("pointerleave",_),c.removeEventListener("pointerleave",p)}}},[l,c,h,f]),g.useEffect(()=>{if(o){const _=p=>{const y=p.target,v={x:p.clientX,y:p.clientY},m=(l==null?void 0:l.contains(y))||(c==null?void 0:c.contains(y)),x=!J3(v,o);m?f():x&&(f(),u())};return document.addEventListener("pointermove",_),()=>document.removeEventListener("pointermove",_)}},[l,c,o,u,f]),w.jsx(zk,{...t,ref:i})}),[H3,W3]=Nd(Fk,{isInside:!1}),G3=F3("TooltipContent"),zk=g.forwardRef((t,e)=>{const{__scopeTooltip:n,children:r,"aria-label":s,onEscapeKeyDown:i,onPointerDownOutside:o,...a}=t,l=Ad(Mo,n),u=cm(n),{onClose:c}=l;return g.useEffect(()=>(document.addEventListener(W0,c),()=>document.removeEventListener(W0,c)),[c]),g.useEffect(()=>{if(l.trigger){const d=f=>{const h=f.target;h!=null&&h.contains(l.trigger)&&c()};return window.addEventListener("scroll",d,{capture:!0}),()=>window.removeEventListener("scroll",d,{capture:!0})}},[l.trigger,c]),w.jsx(xl,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:d=>d.preventDefault(),onDismiss:c,children:w.jsxs(oC,{"data-state":l.stateAttribute,...u,...a,ref:e,style:{...a.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[w.jsx(G3,{children:r}),w.jsx(H3,{scope:n,isInside:!0,children:w.jsx(DD,{id:l.contentId,role:"tooltip",children:s||r})})]})})});Dk.displayName=Mo;var Bk="TooltipArrow",K3=g.forwardRef((t,e)=>{const{__scopeTooltip:n,...r}=t,s=cm(n);return W3(Bk,n).isInside?null:w.jsx(aC,{...s,...r,ref:e})});K3.displayName=Bk;function Q3(t,e){const n=Math.abs(e.top-t.y),r=Math.abs(e.bottom-t.y),s=Math.abs(e.right-t.x),i=Math.abs(e.left-t.x);switch(Math.min(n,r,s,i)){case i:return"left";case s:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function Y3(t,e,n=5){const r=[];switch(e){case"top":r.push({x:t.x-n,y:t.y+n},{x:t.x+n,y:t.y+n});break;case"bottom":r.push({x:t.x-n,y:t.y-n},{x:t.x+n,y:t.y-n});break;case"left":r.push({x:t.x+n,y:t.y-n},{x:t.x+n,y:t.y+n});break;case"right":r.push({x:t.x-n,y:t.y-n},{x:t.x-n,y:t.y+n});break}return r}function X3(t){const{top:e,right:n,bottom:r,left:s}=t;return[{x:s,y:e},{x:n,y:e},{x:n,y:r},{x:s,y:r}]}function J3(t,e){const{x:n,y:r}=t;let s=!1;for(let i=0,o=e.length-1;ir!=f>r&&n<(d-u)*(r-c)/(f-c)+u&&(s=!s)}return s}function Z3(t){const e=t.slice();return e.sort((n,r)=>n.xr.x?1:n.yr.y?1:0),ez(e)}function ez(t){if(t.length<=1)return t.slice();const e=[];for(let r=0;r=2;){const i=e[e.length-1],o=e[e.length-2];if((i.x-o.x)*(s.y-o.y)>=(i.y-o.y)*(s.x-o.x))e.pop();else break}e.push(s)}e.pop();const n=[];for(let r=t.length-1;r>=0;r--){const s=t[r];for(;n.length>=2;){const i=n[n.length-1],o=n[n.length-2];if((i.x-o.x)*(s.y-o.y)>=(i.y-o.y)*(s.x-o.x))n.pop();else break}n.push(s)}return n.pop(),e.length===1&&n.length===1&&e[0].x===n[0].x&&e[0].y===n[0].y?e:e.concat(n)}var tz=jk,Uk=Dk;const nz=tz,rz=g.forwardRef(({className:t,sideOffset:e=4,...n},r)=>w.jsx(Uk,{ref:r,sideOffset:e,className:at("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-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),...n}));rz.displayName=Uk.displayName;function sz(){const{pathname:t,hash:e}=An();g.useLayoutEffect(()=>{e||window.scrollTo({top:0,left:0,behavior:"instant"})},[t,e])}class iz{constructor(e){this.request=e}getPreferences(){return this.request("/me/preferences")}updatePreferences(e){return this.request("/me/preferences",{method:"PUT",body:JSON.stringify(e)})}getRateLimitPolicy(){return this.request("/rate-limits",{credentials:"omit"})}getBookmarkIds(){return this.request("/me/bookmarks/ids")}getBookmarks(){return this.request("/me/bookmarks")}addBookmark(e){return this.request(`/me/bookmarks/${e}`,{method:"POST"})}removeBookmark(e){return this.request(`/me/bookmarks/${e}`,{method:"DELETE"})}}const G0=new iz(iv),lh={hide_closed_source_evals:!1},Vk=R.createContext(null),oz=({children:t})=>{const{user:e}=om(),[n,r]=R.useState(lh),[s,i]=R.useState(!1);R.useEffect(()=>{let l=!1;if(!e){r(lh);return}return i(!0),G0.getPreferences().then(u=>{l||r(u)}).catch(()=>{l||r(lh)}).finally(()=>{l||i(!1)}),()=>{l=!0}},[e]);const o=R.useCallback(async l=>{const u={...n,hide_closed_source_evals:l};if(r(u),!!e)try{const c=await G0.updatePreferences(u);r(c)}catch{r(n)}},[n,e]),a=R.useMemo(()=>({preferences:n,canPersist:!!e,isLoading:s,setHideClosedSourceEvals:o}),[n,e,s,o]);return w.jsx(Vk.Provider,{value:a,children:t})};function w4(){const t=R.useContext(Vk);if(!t)throw new Error("usePreferences must be used inside a ");return t}const qk=iL(),az=qk?MN:ON;if(!qk&&typeof window<"u"){const t=window.location.hash;t.startsWith("#/")&&!t.startsWith("#//")&&window.history.replaceState(null,"",t.slice(1))}const lz=R.lazy(()=>ce(()=>import("./AuthorizePaperEditView-D4j-P-8L.js"),__vite__mapDeps([0,1,2,3,4]))),uz=R.lazy(()=>ce(()=>import("./FollowingView-NGImDHBL.js"),__vite__mapDeps([5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,1,20,21,22,23,24,25,26]))),cz=R.lazy(()=>ce(()=>import("./FeedView-CNbdpALd.js"),__vite__mapDeps([6,7,8,9,10,11,12,13,14,15,16,17,18,19,1,20,21,22,23,24,25,26]))),dz=R.lazy(()=>ce(()=>import("./ChatView-Buo8RKMA.js"),__vite__mapDeps([27,1,28,17,18,19,12,29,30,31,20,32,33,34,35,9,2,36,37,38,39,40,21,41,42]))),fz=R.lazy(()=>ce(()=>import("./SharedChatView-BfRtRLJI.js"),__vite__mapDeps([43,1,28,17,18,19,12,29,30,31,20,32,33,34,35,9,2,36,37,38,39,40]))),hz=R.lazy(()=>ce(()=>import("./PapersListView-B0JcRl4T.js"),__vite__mapDeps([44,8,9,10,11,12,13,20,22,1,23,45,24,25,26,14,15,16]))),pz=R.lazy(()=>ce(()=>import("./PaperDetailView-CQHPB8st.js"),__vite__mapDeps([46,8,9,10,11,12,13,47,29,48,1,22,23,49,25,26,3,50,4,36,51,52,16,53,2,20,54,55,56,57,30,58,59,60,61,31,33,34,24,62,63]))),vz=R.lazy(()=>ce(()=>import("./PaperReaderView-DFTrr534.js"),__vite__mapDeps([64,1,28,17,18,19,12,29,30,31,20,32,33,34,35,9,2,36,37,38,39,40,22,23,13,27,21,41,42]))),gz=R.lazy(()=>ce(()=>import("./TagsIndexView-D4bDJ7n8.js"),__vite__mapDeps([65,1,20,11,66,25,26,67,56,3,51,57,52,16,50,53,2,54,59]))),mz=R.lazy(()=>ce(()=>import("./TagBrowseView-CuEeo3AM.js"),__vite__mapDeps([68,69,1,2,7,59,8,9,10,11,12,13,70,71,14,15,16,72,32,33,34,35,29,40,20,66,22,23,24,25,26,19,31]))),yz=R.lazy(()=>ce(()=>import("./MethodsIndexView-wGGaknFx.js"),__vite__mapDeps([73,1,20,66,25,26,67,56,3,51,57,52,16,50,53,2,54,59]))),_z=R.lazy(()=>ce(()=>import("./FrameworksIndexView-D1-Xne_s.js"),__vite__mapDeps([74,1,8,9,10,11,12,13,20]))),wz=R.lazy(()=>ce(()=>import("./TrendsView-BmouqTke.js"),__vite__mapDeps([75,1,26,25]))),xz=R.lazy(()=>ce(()=>import("./ConferencesIndexView-BdHp1p-m.js"),__vite__mapDeps([76,1,20,25,26,67,56,3,51,57,52,16,50,53,2,54,59]))),bz=R.lazy(()=>ce(()=>import("./AiDeadlinesView-IO9EVzyU.js"),__vite__mapDeps([77,1,20,78,60,25,26,13,50]))),Ez=R.lazy(()=>ce(()=>import("./ConferenceDetailView-C8yZCkY3.js"),__vite__mapDeps([79,1,72,32,33,34,35,29,9,12,2,40,20,11,25,26,13]))),Sz=R.lazy(()=>ce(()=>import("./ConferenceTaskView-DDjlbbXm.js"),__vite__mapDeps([80,1,8,9,10,11,12,13,14,15,16,72,32,33,34,35,29,2,40,20,22,23,24,25,26]))),Cz=R.lazy(()=>ce(()=>import("./OrganizationsIndexView-CBIhplks.js"),__vite__mapDeps([81,1,26,25,20,82]))),kz=R.lazy(()=>ce(()=>import("./OrganizationDetailView-cony7X_q.js"),__vite__mapDeps([83,84,69,1,2,7,59,8,9,10,11,12,13,72,32,33,34,35,29,40,85,25,20,14,15,16,26,52,3,50,53,24,22,23,86]))),Pz=R.lazy(()=>ce(()=>import("./OrganizationTaskView-CjhWSvD0.js"),__vite__mapDeps([87,84,69,1,2,7,59,8,9,10,11,12,13,72,32,33,34,35,29,40,85,25,20,14,15,16,26,52,3,50,53,24,22,23,86]))),Rz=R.lazy(()=>ce(()=>import("./AuthorDetailView-Dv6cMldc.js"),__vite__mapDeps([88,1,8,9,10,11,12,13,15,16,14,69,2,7,59,26,25,24,22,23,86]))),Tz=R.lazy(()=>ce(()=>import("./MethodDetailView-QzkjVHR9.js"),__vite__mapDeps([89,69,1,2,7,59,9,23,8,10,11,12,13,14,15,16,72,32,33,34,35,29,40,20,66,24,25,26]))),Iz=R.lazy(()=>ce(()=>import("./BenchmarkDetailView-BOxa_K-Z.js"),__vite__mapDeps([90,69,1,2,7,59,20,47,12,29,13,48,10,78,60,8,9,11,25,26,71,66,91]))),Oz=R.lazy(()=>ce(()=>import("./SavedPapersView-B5BI5ZMF.js"),__vite__mapDeps([92,9,1,8,10,11,12,13,25,26,62]))),Mz=R.lazy(()=>ce(()=>import("./SettingsView-D9lZ__FE.js"),__vite__mapDeps([93,1,2,7,78,60,70,18,49,41,38]))),Nz=R.lazy(()=>ce(()=>import("./PrivacyView-CGg-BccQ.js"),__vite__mapDeps([94,49]))),Az=R.lazy(()=>ce(()=>import("./ApiDocsView-B7dp0r07.js"),__vite__mapDeps([95,1,33,96]))),$z=R.lazy(()=>ce(()=>import("./McpView-cPV088fi.js"),__vite__mapDeps([97,1,49,42,38,36,98]))),Lz=R.lazy(()=>ce(()=>import("./SubmitView-CXqn57JU.js"),__vite__mapDeps([99,2,26,3,51,57,12]))),jz=R.lazy(()=>ce(()=>import("./CronDashboard-BXgFsRKT.js"),__vite__mapDeps([100,1,101,61,3,19,58,37,102,38,103,53,104,2,23,4,20,18,105]))),Fz=R.lazy(()=>ce(()=>import("./AutonomousOperations-BY3hlf53.js"),__vite__mapDeps([106,1,2,61,3,101,51,102]))),Dz=R.lazy(()=>ce(()=>import("./SubmissionsDashboard-Bpzyogxo.js"),__vite__mapDeps([107,55,9,1,2,20,13,12,54,103,53,102,104,108]))),zz=R.lazy(()=>ce(()=>import("./UserProfileView-lXRCWyDX.js"),__vite__mapDeps([109,1,85,25,20]))),Bz=R.lazy(()=>ce(()=>import("./RateLimitsView-BXs-74zu.js"),__vite__mapDeps([110,1]))),Uz=R.lazy(()=>ce(()=>import("./AstraForRoboticsView-D-23yXHI.js"),__vite__mapDeps([111,8,9,10,11,12,13,14,26,25,24,22,1,23,49,112]))),uh=R.lazy(()=>ce(()=>import("./NotFound-B8QVsf71.js"),[])),K0=R.lazy(()=>ce(()=>import("./SearchOverlay-BUsQ4KSW.js"),__vite__mapDeps([113,9,1,10,20,12,45,11]))),Vz=R.lazy(()=>ce(()=>import("./StagingAccessRequestView-B_iGF8VX.js"),__vite__mapDeps([114,104]))),ch=()=>w.jsxs("div",{className:"page","aria-busy":"true","aria-live":"polite",children:[w.jsx("div",{className:"animate-pulse rounded-md bg-muted",style:{height:24,width:"30%",marginBottom:24}}),w.jsx("div",{className:"animate-pulse rounded-md bg-muted",style:{height:64,width:"60%",marginBottom:32}}),w.jsxs("div",{className:"paper-list",style:{display:"grid",gap:16},children:[w.jsx("div",{className:"animate-pulse rounded-md bg-muted",style:{height:96}}),w.jsx("div",{className:"animate-pulse rounded-md bg-muted",style:{height:96}}),w.jsx("div",{className:"animate-pulse rounded-md bg-muted",style:{height:96}})]})]}),qz=new dA({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:1}}}),Hz=()=>{const{arxivId:t}=_1();return w.jsx(To,{to:t?`/paper/${t}`:"/papers",replace:!0})},Wz=()=>{const{taskSlug:t}=_1();return w.jsx(To,{to:t?`/tasks/${t}`:"/tasks",replace:!0})},Q0=({element:t})=>jo()?w.jsx(To,{to:"/",replace:!0}):w.jsx(w.Fragment,{children:t}),Hk=({element:t})=>{const{user:e,isLoading:n}=om();return jo()?w.jsx(To,{to:"/",replace:!0}):n?w.jsx("div",{className:"page",children:w.jsx("div",{className:"submission-loading",children:w.jsx("span",{children:"Checking admin session..."})})}):e?e.is_admin?w.jsx(w.Fragment,{children:t}):w.jsx("div",{className:"page",children:w.jsxs("div",{className:"submission-empty submission-empty-warn",children:[w.jsx("h1",{children:"Admin access required"}),w.jsxs("p",{children:["Signed in as @",e.username,". This dashboard is limited to allowlisted admin accounts."]})]})}):w.jsx("div",{className:"page",children:w.jsxs("div",{className:"submission-empty submission-empty-warn",children:[w.jsx("h1",{children:"Sign in required"}),w.jsx("p",{children:"Sign in with an allowlisted Hugging Face admin account to view admin operations."}),w.jsx(hS,{returnTo:"/admin-dashboard"})]})})},Gz=()=>{const t=tL(),e=typeof window<"u"&&new URL(t,window.location.origin).origin!==window.location.origin;return R.useEffect(()=>{e&&window.location.replace(t)},[t,e]),e?w.jsx("div",{className:"page",children:w.jsxs("div",{className:"submission-loading",children:[w.jsx("span",{children:"Opening the production admin dashboard..."}),w.jsx("a",{href:t,children:"Continue"})]})}):w.jsx(Hk,{element:w.jsx(jz,{})})},Kz=()=>{const[t,e]=R.useState(!1),n=An();return sz(),R.useLayoutEffect(()=>{var r;(r=document.getElementById("initial-discovery-footer"))==null||r.remove()},[]),R.useEffect(()=>{const r=s=>{(s.metaKey||s.ctrlKey)&&s.key==="k"&&(s.preventDefault(),e(!0))};return window.addEventListener("keydown",r),()=>window.removeEventListener("keydown",r)},[]),n.pathname==="/request-access"?w.jsx(R.Suspense,{fallback:w.jsx(ch,{}),children:w.jsx(Vz,{})}):n.pathname.startsWith("/pdf/")?w.jsxs("div",{className:"reader-route-shell",children:[w.jsx(D0,{onOpenSearch:()=>e(!0)}),w.jsx("div",{className:"reader-route-content",children:w.jsx(R.Suspense,{fallback:w.jsx(ch,{}),children:w.jsx(Y_,{children:w.jsx(ue,{path:"/pdf/:paperId",element:sL()?w.jsx(vz,{}):w.jsx(uh,{})})})})}),t&&w.jsx(R.Suspense,{fallback:null,children:w.jsx(K0,{open:t,onClose:()=>e(!1)})})]}):w.jsxs(w.Fragment,{children:[w.jsx(D0,{onOpenSearch:()=>e(!0)}),w.jsx("main",{children:w.jsx(R.Suspense,{fallback:w.jsx(ch,{}),children:w.jsxs(Y_,{children:[w.jsx(ue,{path:"/",element:w.jsx(cz,{})}),w.jsx(ue,{path:"/following",element:w.jsx(uz,{})}),w.jsx(ue,{path:"/chat/:sessionId?",element:al()?w.jsx(dz,{}):w.jsx(To,{to:"/",replace:!0})}),w.jsx(ue,{path:"/share/:shareId",element:al()?w.jsx(fz,{}):w.jsx(uh,{})}),w.jsx(ue,{path:"/papers",element:w.jsx(hz,{})}),w.jsx(ue,{path:"/papers/:arxivId",element:w.jsx(Hz,{})}),w.jsx(ue,{path:"/paper/:arxivId",element:w.jsx(pz,{})}),w.jsx(ue,{path:"/tasks",element:w.jsx(gz,{})}),w.jsx(ue,{path:"/tasks/:taskSlug",element:w.jsx(mz,{})}),w.jsx(ue,{path:"/task/:taskSlug",element:w.jsx(Wz,{})}),w.jsx(ue,{path:"/methods",element:w.jsx(yz,{})}),w.jsx(ue,{path:"/methods/:methodSlug",element:w.jsx(Tz,{})}),w.jsx(ue,{path:"/frameworks",element:w.jsx(_z,{})}),w.jsx(ue,{path:"/trends",element:w.jsx(wz,{})}),w.jsx(ue,{path:"/conferences",element:w.jsx(xz,{})}),w.jsx(ue,{path:"/ai-deadlines",element:w.jsx(bz,{})}),w.jsx(ue,{path:"/conferences/:confSlug",element:w.jsx(Ez,{})}),w.jsx(ue,{path:"/conferences/:confSlug/:taskSlug",element:w.jsx(Sz,{})}),w.jsx(ue,{path:"/organizations",element:w.jsx(Cz,{})}),w.jsx(ue,{path:"/orgs/:orgSlug",element:w.jsx(kz,{})}),w.jsx(ue,{path:"/orgs/:orgSlug/:taskSlug",element:w.jsx(Pz,{})}),w.jsx(ue,{path:"/authors/:authorId",element:w.jsx(Rz,{})}),w.jsx(ue,{path:"/benchmark/:datasetSlug",element:w.jsx(Iz,{})}),w.jsx(ue,{path:"/authorize-paper-edit/:authorizationId",element:w.jsx(lz,{})}),w.jsx(ue,{path:"/submit",element:w.jsx(Lz,{})}),w.jsx(ue,{path:"/saved",element:w.jsx(Q0,{element:w.jsx(Oz,{})})}),w.jsx(ue,{path:"/settings",element:w.jsx(Mz,{})}),w.jsx(ue,{path:"/privacy",element:w.jsx(Nz,{})}),w.jsx(ue,{path:"/docs/api",element:w.jsx(Az,{})}),w.jsx(ue,{path:"/mcp",element:w.jsx($z,{})}),w.jsx(ue,{path:"/admin-dashboard",element:w.jsx(Gz,{})}),w.jsx(ue,{path:"/autonomous-operations",element:w.jsx(Hk,{element:w.jsx(Fz,{})})}),w.jsx(ue,{path:"/cron-dashboard",element:w.jsx(To,{to:"/admin-dashboard",replace:!0})}),w.jsx(ue,{path:"/submissions",element:w.jsx(Q0,{element:w.jsx(Dz,{})})}),w.jsx(ue,{path:"/rate-limits",element:w.jsx(Bz,{})}),w.jsx(ue,{path:"/astra-for-robotics",element:w.jsx(Uz,{})}),w.jsx(ue,{path:"/:username",element:w.jsx(zz,{})}),w.jsx(ue,{path:"*",element:w.jsx(uh,{})})]})})}),w.jsx(ID,{}),t&&w.jsx(R.Suspense,{fallback:null,children:w.jsx(K0,{open:t,onClose:()=>e(!1)})})]})},Qz=()=>w.jsx(fA,{client:qz,children:w.jsx(kD,{children:w.jsx(oz,{children:w.jsxs(nz,{children:[w.jsx(az,{children:w.jsx(Kz,{})}),w.jsx(l3,{}),w.jsx(L3,{}),!1]})})})});NM();const Yz=w.jsx(MT,{attribute:"class",defaultTheme:"system",enableSystem:!0,disableTransitionOnChange:!0,storageKey:"pwc-theme",children:w.jsx(OM,{children:w.jsx(Qz,{})})}),Xz=_b(document.getElementById("root"));Xz.render(w.jsx(R.StrictMode,{children:Yz}));export{RS as $,sm as A,uC as B,nL as C,uD as D,Fg as E,R as F,G0 as G,hS as H,UF as I,jo as J,eL as K,Wn as L,sL as M,dD as N,fD as O,er as P,lk as Q,BF as R,lr as S,a3 as T,u4 as U,c4 as V,ED as W,cD as X,aL as Y,iw as Z,ce as _,om as a,_l as a0,eo as a1,pn as a2,Ug as a3,iv as a4,vS as a5,s3 as a6,G$ as a7,Q$ as a8,Y$ as a9,Wp as aA,Sn as aB,T1 as aC,qN as aD,HN as aE,Hp as aF,k1 as aG,oA as aH,QN as aI,Ct as aJ,r4 as aK,il as aL,lA as aM,i4 as aN,s4 as aO,P1 as aP,AS as aQ,$S as aR,LS as aS,To as aT,$0 as aU,X$ as aa,Es as ab,Z$ as ac,J$ as ad,l4 as ae,n4 as af,IF as ag,iC as ah,kd as ai,_d as aj,Q1 as ak,Ng as al,z1 as am,Mg as an,xl as ao,oC as ap,aC as aq,An as ar,OT as as,Zz as at,CD as au,f4 as av,md as aw,ZN as ax,WN as ay,t4 as az,Rg as b,m4 as c,e4 as d,rL as e,d4 as f,Id as g,LD as h,al as i,w as j,w4 as k,aD as l,o4 as m,h4 as n,g4 as o,Re as p,yd as q,g as r,Xe as s,Z as t,_1 as u,EF as v,Ss as w,at as x,p4 as y,jS as z}; +`);function hu(t){return t.label!==void 0}var C3=3,k3="32px",P3="16px",q0=4e3,R3=356,T3=14,I3=20,O3=200;function xn(...t){return t.filter(Boolean).join(" ")}function M3(t){let[e,n]=t.split("-"),r=[];return e&&r.push(e),n&&r.push(n),r}var N3=t=>{var e,n,r,s,i,o,a,l,u,c,d;let{invert:f,toast:h,unstyled:_,interacting:p,setHeights:y,visibleToasts:v,heights:m,index:x,toasts:b,expanded:E,removeToast:S,defaultRichColors:k,closeButton:C,style:I,cancelButtonStyle:P,actionButtonStyle:$,className:N="",descriptionClassName:B="",duration:j,position:W,gap:q,loadingIcon:G,expandByDefault:M,classNames:T,icons:z,closeButtonAriaLabel:K="Close toast",pauseWhenPageIsHidden:H}=t,[Q,X]=R.useState(null),[ie,pe]=R.useState(null),[se,ve]=R.useState(!1),[_e,Ze]=R.useState(!1),[Ot,et]=R.useState(!1),[ze,nr]=R.useState(!1),[Or,lt]=R.useState(!1),[Mr,tn]=R.useState(0),[Ut,Nr]=R.useState(0),Ar=R.useRef(h.duration||j||q0),Bo=R.useRef(null),vn=R.useRef(null),Wk=x===0,Gk=x+1<=v,nn=h.type,hi=h.dismissible!==!1,Kk=h.className||"",Qk=h.descriptionClassName||"",Pl=R.useMemo(()=>m.findIndex(oe=>oe.toastId===h.id)||0,[m,h.id]),Yk=R.useMemo(()=>{var oe;return(oe=h.closeButton)!=null?oe:C},[h.closeButton,C]),dm=R.useMemo(()=>h.duration||j||q0,[h.duration,j]),$d=R.useRef(0),pi=R.useRef(0),fm=R.useRef(0),vi=R.useRef(null),[Xk,Jk]=W.split("-"),hm=R.useMemo(()=>m.reduce((oe,Se,je)=>je>=Pl?oe:oe+Se.height,0),[m,Pl]),pm=m3(),Zk=h.invert||f,Ld=nn==="loading";pi.current=R.useMemo(()=>Pl*q+hm,[Pl,hm]),R.useEffect(()=>{Ar.current=dm},[dm]),R.useEffect(()=>{ve(!0)},[]),R.useEffect(()=>{let oe=vn.current;if(oe){let Se=oe.getBoundingClientRect().height;return Nr(Se),y(je=>[{toastId:h.id,height:Se,position:h.position},...je]),()=>y(je=>je.filter(gn=>gn.toastId!==h.id))}},[y,h.id]),R.useLayoutEffect(()=>{if(!se)return;let oe=vn.current,Se=oe.style.height;oe.style.height="auto";let je=oe.getBoundingClientRect().height;oe.style.height=Se,Nr(je),y(gn=>gn.find(mn=>mn.toastId===h.id)?gn.map(mn=>mn.toastId===h.id?{...mn,height:je}:mn):[{toastId:h.id,height:je,position:h.position},...gn])},[se,h.title,h.description,y,h.id]);let $r=R.useCallback(()=>{Ze(!0),tn(pi.current),y(oe=>oe.filter(Se=>Se.toastId!==h.id)),setTimeout(()=>{S(h)},O3)},[h,S,y,pi]);R.useEffect(()=>{if(h.promise&&nn==="loading"||h.duration===1/0||h.type==="loading")return;let oe;return E||p||H&&pm?(()=>{if(fm.current<$d.current){let Se=new Date().getTime()-$d.current;Ar.current=Ar.current-Se}fm.current=new Date().getTime()})():Ar.current!==1/0&&($d.current=new Date().getTime(),oe=setTimeout(()=>{var Se;(Se=h.onAutoClose)==null||Se.call(h,h),$r()},Ar.current)),()=>clearTimeout(oe)},[E,p,h,nn,H,pm,$r]),R.useEffect(()=>{h.delete&&$r()},[$r,h.delete]);function eP(){var oe,Se,je;return z!=null&&z.loading?R.createElement("div",{className:xn(T==null?void 0:T.loader,(oe=h==null?void 0:h.classNames)==null?void 0:oe.loader,"sonner-loader"),"data-visible":nn==="loading"},z.loading):G?R.createElement("div",{className:xn(T==null?void 0:T.loader,(Se=h==null?void 0:h.classNames)==null?void 0:Se.loader,"sonner-loader"),"data-visible":nn==="loading"},G):R.createElement(d3,{className:xn(T==null?void 0:T.loader,(je=h==null?void 0:h.classNames)==null?void 0:je.loader),visible:nn==="loading"})}return R.createElement("li",{tabIndex:0,ref:vn,className:xn(N,Kk,T==null?void 0:T.toast,(e=h==null?void 0:h.classNames)==null?void 0:e.toast,T==null?void 0:T.default,T==null?void 0:T[nn],(n=h==null?void 0:h.classNames)==null?void 0:n[nn]),"data-sonner-toast":"","data-rich-colors":(r=h.richColors)!=null?r:k,"data-styled":!(h.jsx||h.unstyled||_),"data-mounted":se,"data-promise":!!h.promise,"data-swiped":Or,"data-removed":_e,"data-visible":Gk,"data-y-position":Xk,"data-x-position":Jk,"data-index":x,"data-front":Wk,"data-swiping":Ot,"data-dismissible":hi,"data-type":nn,"data-invert":Zk,"data-swipe-out":ze,"data-swipe-direction":ie,"data-expanded":!!(E||M&&se),style:{"--index":x,"--toasts-before":x,"--z-index":b.length-x,"--offset":`${_e?Mr:pi.current}px`,"--initial-height":M?"auto":`${Ut}px`,...I,...h.style},onDragEnd:()=>{et(!1),X(null),vi.current=null},onPointerDown:oe=>{Ld||!hi||(Bo.current=new Date,tn(pi.current),oe.target.setPointerCapture(oe.pointerId),oe.target.tagName!=="BUTTON"&&(et(!0),vi.current={x:oe.clientX,y:oe.clientY}))},onPointerUp:()=>{var oe,Se,je,gn;if(ze||!hi)return;vi.current=null;let mn=Number(((oe=vn.current)==null?void 0:oe.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Lr=Number(((Se=vn.current)==null?void 0:Se.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Cs=new Date().getTime()-((je=Bo.current)==null?void 0:je.getTime()),yn=Q==="x"?mn:Lr,jr=Math.abs(yn)/Cs;if(Math.abs(yn)>=I3||jr>.11){tn(pi.current),(gn=h.onDismiss)==null||gn.call(h,h),pe(Q==="x"?mn>0?"right":"left":Lr>0?"down":"up"),$r(),nr(!0),lt(!1);return}et(!1),X(null)},onPointerMove:oe=>{var Se,je,gn,mn;if(!vi.current||!hi||((Se=window.getSelection())==null?void 0:Se.toString().length)>0)return;let Lr=oe.clientY-vi.current.y,Cs=oe.clientX-vi.current.x,yn=(je=t.swipeDirections)!=null?je:M3(W);!Q&&(Math.abs(Cs)>1||Math.abs(Lr)>1)&&X(Math.abs(Cs)>Math.abs(Lr)?"x":"y");let jr={x:0,y:0};Q==="y"?(yn.includes("top")||yn.includes("bottom"))&&(yn.includes("top")&&Lr<0||yn.includes("bottom")&&Lr>0)&&(jr.y=Lr):Q==="x"&&(yn.includes("left")||yn.includes("right"))&&(yn.includes("left")&&Cs<0||yn.includes("right")&&Cs>0)&&(jr.x=Cs),(Math.abs(jr.x)>0||Math.abs(jr.y)>0)&<(!0),(gn=vn.current)==null||gn.style.setProperty("--swipe-amount-x",`${jr.x}px`),(mn=vn.current)==null||mn.style.setProperty("--swipe-amount-y",`${jr.y}px`)}},Yk&&!h.jsx?R.createElement("button",{"aria-label":K,"data-disabled":Ld,"data-close-button":!0,onClick:Ld||!hi?()=>{}:()=>{var oe;$r(),(oe=h.onDismiss)==null||oe.call(h,h)},className:xn(T==null?void 0:T.closeButton,(s=h==null?void 0:h.classNames)==null?void 0:s.closeButton)},(i=z==null?void 0:z.close)!=null?i:g3):null,h.jsx||g.isValidElement(h.title)?h.jsx?h.jsx:typeof h.title=="function"?h.title():h.title:R.createElement(R.Fragment,null,nn||h.icon||h.promise?R.createElement("div",{"data-icon":"",className:xn(T==null?void 0:T.icon,(o=h==null?void 0:h.classNames)==null?void 0:o.icon)},h.promise||h.type==="loading"&&!h.icon?h.icon||eP():null,h.type!=="loading"?h.icon||(z==null?void 0:z[nn])||u3(nn):null):null,R.createElement("div",{"data-content":"",className:xn(T==null?void 0:T.content,(a=h==null?void 0:h.classNames)==null?void 0:a.content)},R.createElement("div",{"data-title":"",className:xn(T==null?void 0:T.title,(l=h==null?void 0:h.classNames)==null?void 0:l.title)},typeof h.title=="function"?h.title():h.title),h.description?R.createElement("div",{"data-description":"",className:xn(B,Qk,T==null?void 0:T.description,(u=h==null?void 0:h.classNames)==null?void 0:u.description)},typeof h.description=="function"?h.description():h.description):null),g.isValidElement(h.cancel)?h.cancel:h.cancel&&hu(h.cancel)?R.createElement("button",{"data-button":!0,"data-cancel":!0,style:h.cancelButtonStyle||P,onClick:oe=>{var Se,je;hu(h.cancel)&&hi&&((je=(Se=h.cancel).onClick)==null||je.call(Se,oe),$r())},className:xn(T==null?void 0:T.cancelButton,(c=h==null?void 0:h.classNames)==null?void 0:c.cancelButton)},h.cancel.label):null,g.isValidElement(h.action)?h.action:h.action&&hu(h.action)?R.createElement("button",{"data-button":!0,"data-action":!0,style:h.actionButtonStyle||$,onClick:oe=>{var Se,je;hu(h.action)&&((je=(Se=h.action).onClick)==null||je.call(Se,oe),!oe.defaultPrevented&&$r())},className:xn(T==null?void 0:T.actionButton,(d=h==null?void 0:h.classNames)==null?void 0:d.actionButton)},h.action.label):null))};function H0(){if(typeof window>"u"||typeof document>"u")return"ltr";let t=document.documentElement.getAttribute("dir");return t==="auto"||!t?window.getComputedStyle(document.documentElement).direction:t}function A3(t,e){let n={};return[t,e].forEach((r,s)=>{let i=s===1,o=i?"--mobile-offset":"--offset",a=i?P3:k3;function l(u){["top","right","bottom","left"].forEach(c=>{n[`${o}-${c}`]=typeof u=="number"?`${u}px`:u})}typeof r=="number"||typeof r=="string"?l(r):typeof r=="object"?["top","right","bottom","left"].forEach(u=>{r[u]===void 0?n[`${o}-${u}`]=a:n[`${o}-${u}`]=typeof r[u]=="number"?`${r[u]}px`:r[u]}):l(a)}),n}var $3=g.forwardRef(function(t,e){let{invert:n,position:r="bottom-right",hotkey:s=["altKey","KeyT"],expand:i,closeButton:o,className:a,offset:l,mobileOffset:u,theme:c="light",richColors:d,duration:f,style:h,visibleToasts:_=C3,toastOptions:p,dir:y=H0(),gap:v=T3,loadingIcon:m,icons:x,containerAriaLabel:b="Notifications",pauseWhenPageIsHidden:E}=t,[S,k]=R.useState([]),C=R.useMemo(()=>Array.from(new Set([r].concat(S.filter(H=>H.position).map(H=>H.position)))),[S,r]),[I,P]=R.useState([]),[$,N]=R.useState(!1),[B,j]=R.useState(!1),[W,q]=R.useState(c!=="system"?c:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),G=R.useRef(null),M=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),T=R.useRef(null),z=R.useRef(!1),K=R.useCallback(H=>{k(Q=>{var X;return(X=Q.find(ie=>ie.id===H.id))!=null&&X.delete||Nt.dismiss(H.id),Q.filter(({id:ie})=>ie!==H.id)})},[]);return R.useEffect(()=>Nt.subscribe(H=>{if(H.dismiss){k(Q=>Q.map(X=>X.id===H.id?{...X,delete:!0}:X));return}setTimeout(()=>{yb.flushSync(()=>{k(Q=>{let X=Q.findIndex(ie=>ie.id===H.id);return X!==-1?[...Q.slice(0,X),{...Q[X],...H},...Q.slice(X+1)]:[H,...Q]})})})}),[]),R.useEffect(()=>{if(c!=="system"){q(c);return}if(c==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?q("dark"):q("light")),typeof window>"u")return;let H=window.matchMedia("(prefers-color-scheme: dark)");try{H.addEventListener("change",({matches:Q})=>{q(Q?"dark":"light")})}catch{H.addListener(({matches:X})=>{try{q(X?"dark":"light")}catch(ie){console.error(ie)}})}},[c]),R.useEffect(()=>{S.length<=1&&N(!1)},[S]),R.useEffect(()=>{let H=Q=>{var X,ie;s.every(pe=>Q[pe]||Q.code===pe)&&(N(!0),(X=G.current)==null||X.focus()),Q.code==="Escape"&&(document.activeElement===G.current||(ie=G.current)!=null&&ie.contains(document.activeElement))&&N(!1)};return document.addEventListener("keydown",H),()=>document.removeEventListener("keydown",H)},[s]),R.useEffect(()=>{if(G.current)return()=>{T.current&&(T.current.focus({preventScroll:!0}),T.current=null,z.current=!1)}},[G.current]),R.createElement("section",{ref:e,"aria-label":`${b} ${M}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},C.map((H,Q)=>{var X;let[ie,pe]=H.split("-");return S.length?R.createElement("ol",{key:H,dir:y==="auto"?H0():y,tabIndex:-1,ref:G,className:a,"data-sonner-toaster":!0,"data-theme":W,"data-y-position":ie,"data-lifted":$&&S.length>1&&!i,"data-x-position":pe,style:{"--front-toast-height":`${((X=I[0])==null?void 0:X.height)||0}px`,"--width":`${R3}px`,"--gap":`${v}px`,...h,...A3(l,u)},onBlur:se=>{z.current&&!se.currentTarget.contains(se.relatedTarget)&&(z.current=!1,T.current&&(T.current.focus({preventScroll:!0}),T.current=null))},onFocus:se=>{se.target instanceof HTMLElement&&se.target.dataset.dismissible==="false"||z.current||(z.current=!0,T.current=se.relatedTarget)},onMouseEnter:()=>N(!0),onMouseMove:()=>N(!0),onMouseLeave:()=>{B||N(!1)},onDragEnd:()=>N(!1),onPointerDown:se=>{se.target instanceof HTMLElement&&se.target.dataset.dismissible==="false"||j(!0)},onPointerUp:()=>j(!1)},S.filter(se=>!se.position&&Q===0||se.position===H).map((se,ve)=>{var _e,Ze;return R.createElement(N3,{key:se.id,icons:x,index:ve,toast:se,defaultRichColors:d,duration:(_e=p==null?void 0:p.duration)!=null?_e:f,className:p==null?void 0:p.className,descriptionClassName:p==null?void 0:p.descriptionClassName,invert:n,visibleToasts:_,closeButton:(Ze=p==null?void 0:p.closeButton)!=null?Ze:o,interacting:B,position:H,style:p==null?void 0:p.style,unstyled:p==null?void 0:p.unstyled,classNames:p==null?void 0:p.classNames,cancelButtonStyle:p==null?void 0:p.cancelButtonStyle,actionButtonStyle:p==null?void 0:p.actionButtonStyle,removeToast:K,toasts:S.filter(Ot=>Ot.position==se.position),heights:I.filter(Ot=>Ot.position==se.position),setHeights:P,expandByDefault:i,gap:v,loadingIcon:m,expanded:$,pauseWhenPageIsHidden:E,swipeDirections:t.swipeDirections})})):null}))});const L3=({...t})=>{const{theme:e="system"}=OT();return w.jsx($3,{theme:e,className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...t})};var j3=Symbol("radix.slottable");function F3(t){const e=({children:n})=>w.jsx(w.Fragment,{children:n});return e.displayName=`${t}.Slottable`,e.__radixId=j3,e}var[Nd]=Ss("Tooltip",[kd]),cm=kd(),$k="TooltipProvider",D3=700,W0="tooltip.open",[z3,Lk]=Nd($k),jk=t=>{const{__scopeTooltip:e,delayDuration:n=D3,skipDelayDuration:r=300,disableHoverableContent:s=!1,children:i}=t,o=g.useRef(!0),a=g.useRef(!1),l=g.useRef(0);return g.useEffect(()=>{const u=l.current;return()=>window.clearTimeout(u)},[]),w.jsx(z3,{scope:e,isOpenDelayedRef:o,delayDuration:n,onOpen:g.useCallback(()=>{window.clearTimeout(l.current),o.current=!1},[]),onClose:g.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>o.current=!0,r)},[r]),isPointerInTransitRef:a,onPointerInTransitChange:g.useCallback(u=>{a.current=u},[]),disableHoverableContent:s,children:i})};jk.displayName=$k;var Fk="Tooltip",[y4,Ad]=Nd(Fk),cv="TooltipTrigger",B3=g.forwardRef((t,e)=>{const{__scopeTooltip:n,...r}=t,s=Ad(cv,n),i=Lk(cv,n),o=cm(n),a=g.useRef(null),l=Xe(e,a,s.onTriggerChange),u=g.useRef(!1),c=g.useRef(!1),d=g.useCallback(()=>u.current=!1,[]);return g.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),w.jsx(iC,{asChild:!0,...o,children:w.jsx(Re.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...r,ref:l,onPointerMove:Z(t.onPointerMove,f=>{f.pointerType!=="touch"&&!c.current&&!i.isPointerInTransitRef.current&&(s.onTriggerEnter(),c.current=!0)}),onPointerLeave:Z(t.onPointerLeave,()=>{s.onTriggerLeave(),c.current=!1}),onPointerDown:Z(t.onPointerDown,()=>{s.open&&s.onClose(),u.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:Z(t.onFocus,()=>{u.current||s.onOpen()}),onBlur:Z(t.onBlur,s.onClose),onClick:Z(t.onClick,s.onClose)})})});B3.displayName=cv;var U3="TooltipPortal",[_4,V3]=Nd(U3,{forceMount:void 0}),Mo="TooltipContent",Dk=g.forwardRef((t,e)=>{const n=V3(Mo,t.__scopeTooltip),{forceMount:r=n.forceMount,side:s="top",...i}=t,o=Ad(Mo,t.__scopeTooltip);return w.jsx(er,{present:r||o.open,children:o.disableHoverableContent?w.jsx(zk,{side:s,...i,ref:e}):w.jsx(q3,{side:s,...i,ref:e})})}),q3=g.forwardRef((t,e)=>{const n=Ad(Mo,t.__scopeTooltip),r=Lk(Mo,t.__scopeTooltip),s=g.useRef(null),i=Xe(e,s),[o,a]=g.useState(null),{trigger:l,onClose:u}=n,c=s.current,{onPointerInTransitChange:d}=r,f=g.useCallback(()=>{a(null),d(!1)},[d]),h=g.useCallback((_,p)=>{const y=_.currentTarget,v={x:_.clientX,y:_.clientY},m=Q3(v,y.getBoundingClientRect()),x=Y3(v,m),b=X3(p.getBoundingClientRect()),E=Z3([...x,...b]);a(E),d(!0)},[d]);return g.useEffect(()=>()=>f(),[f]),g.useEffect(()=>{if(l&&c){const _=y=>h(y,c),p=y=>h(y,l);return l.addEventListener("pointerleave",_),c.addEventListener("pointerleave",p),()=>{l.removeEventListener("pointerleave",_),c.removeEventListener("pointerleave",p)}}},[l,c,h,f]),g.useEffect(()=>{if(o){const _=p=>{const y=p.target,v={x:p.clientX,y:p.clientY},m=(l==null?void 0:l.contains(y))||(c==null?void 0:c.contains(y)),x=!J3(v,o);m?f():x&&(f(),u())};return document.addEventListener("pointermove",_),()=>document.removeEventListener("pointermove",_)}},[l,c,o,u,f]),w.jsx(zk,{...t,ref:i})}),[H3,W3]=Nd(Fk,{isInside:!1}),G3=F3("TooltipContent"),zk=g.forwardRef((t,e)=>{const{__scopeTooltip:n,children:r,"aria-label":s,onEscapeKeyDown:i,onPointerDownOutside:o,...a}=t,l=Ad(Mo,n),u=cm(n),{onClose:c}=l;return g.useEffect(()=>(document.addEventListener(W0,c),()=>document.removeEventListener(W0,c)),[c]),g.useEffect(()=>{if(l.trigger){const d=f=>{const h=f.target;h!=null&&h.contains(l.trigger)&&c()};return window.addEventListener("scroll",d,{capture:!0}),()=>window.removeEventListener("scroll",d,{capture:!0})}},[l.trigger,c]),w.jsx(xl,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:d=>d.preventDefault(),onDismiss:c,children:w.jsxs(oC,{"data-state":l.stateAttribute,...u,...a,ref:e,style:{...a.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[w.jsx(G3,{children:r}),w.jsx(H3,{scope:n,isInside:!0,children:w.jsx(DD,{id:l.contentId,role:"tooltip",children:s||r})})]})})});Dk.displayName=Mo;var Bk="TooltipArrow",K3=g.forwardRef((t,e)=>{const{__scopeTooltip:n,...r}=t,s=cm(n);return W3(Bk,n).isInside?null:w.jsx(aC,{...s,...r,ref:e})});K3.displayName=Bk;function Q3(t,e){const n=Math.abs(e.top-t.y),r=Math.abs(e.bottom-t.y),s=Math.abs(e.right-t.x),i=Math.abs(e.left-t.x);switch(Math.min(n,r,s,i)){case i:return"left";case s:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function Y3(t,e,n=5){const r=[];switch(e){case"top":r.push({x:t.x-n,y:t.y+n},{x:t.x+n,y:t.y+n});break;case"bottom":r.push({x:t.x-n,y:t.y-n},{x:t.x+n,y:t.y-n});break;case"left":r.push({x:t.x+n,y:t.y-n},{x:t.x+n,y:t.y+n});break;case"right":r.push({x:t.x-n,y:t.y-n},{x:t.x-n,y:t.y+n});break}return r}function X3(t){const{top:e,right:n,bottom:r,left:s}=t;return[{x:s,y:e},{x:n,y:e},{x:n,y:r},{x:s,y:r}]}function J3(t,e){const{x:n,y:r}=t;let s=!1;for(let i=0,o=e.length-1;ir!=f>r&&n<(d-u)*(r-c)/(f-c)+u&&(s=!s)}return s}function Z3(t){const e=t.slice();return e.sort((n,r)=>n.xr.x?1:n.yr.y?1:0),ez(e)}function ez(t){if(t.length<=1)return t.slice();const e=[];for(let r=0;r=2;){const i=e[e.length-1],o=e[e.length-2];if((i.x-o.x)*(s.y-o.y)>=(i.y-o.y)*(s.x-o.x))e.pop();else break}e.push(s)}e.pop();const n=[];for(let r=t.length-1;r>=0;r--){const s=t[r];for(;n.length>=2;){const i=n[n.length-1],o=n[n.length-2];if((i.x-o.x)*(s.y-o.y)>=(i.y-o.y)*(s.x-o.x))n.pop();else break}n.push(s)}return n.pop(),e.length===1&&n.length===1&&e[0].x===n[0].x&&e[0].y===n[0].y?e:e.concat(n)}var tz=jk,Uk=Dk;const nz=tz,rz=g.forwardRef(({className:t,sideOffset:e=4,...n},r)=>w.jsx(Uk,{ref:r,sideOffset:e,className:at("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-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),...n}));rz.displayName=Uk.displayName;function sz(){const{pathname:t,hash:e}=An();g.useLayoutEffect(()=>{e||window.scrollTo({top:0,left:0,behavior:"instant"})},[t,e])}class iz{constructor(e){this.request=e}getPreferences(){return this.request("/me/preferences")}updatePreferences(e){return this.request("/me/preferences",{method:"PUT",body:JSON.stringify(e)})}getRateLimitPolicy(){return this.request("/rate-limits",{credentials:"omit"})}getBookmarkIds(){return this.request("/me/bookmarks/ids")}getBookmarks(){return this.request("/me/bookmarks")}addBookmark(e){return this.request(`/me/bookmarks/${e}`,{method:"POST"})}removeBookmark(e){return this.request(`/me/bookmarks/${e}`,{method:"DELETE"})}}const G0=new iz(iv),lh={hide_closed_source_evals:!1},Vk=R.createContext(null),oz=({children:t})=>{const{user:e}=om(),[n,r]=R.useState(lh),[s,i]=R.useState(!1);R.useEffect(()=>{let l=!1;if(!e){r(lh);return}return i(!0),G0.getPreferences().then(u=>{l||r(u)}).catch(()=>{l||r(lh)}).finally(()=>{l||i(!1)}),()=>{l=!0}},[e]);const o=R.useCallback(async l=>{const u={...n,hide_closed_source_evals:l};if(r(u),!!e)try{const c=await G0.updatePreferences(u);r(c)}catch{r(n)}},[n,e]),a=R.useMemo(()=>({preferences:n,canPersist:!!e,isLoading:s,setHideClosedSourceEvals:o}),[n,e,s,o]);return w.jsx(Vk.Provider,{value:a,children:t})};function w4(){const t=R.useContext(Vk);if(!t)throw new Error("usePreferences must be used inside a ");return t}const qk=iL(),az=qk?MN:ON;if(!qk&&typeof window<"u"){const t=window.location.hash;t.startsWith("#/")&&!t.startsWith("#//")&&window.history.replaceState(null,"",t.slice(1))}const lz=R.lazy(()=>ce(()=>import("./AuthorizePaperEditView-CfwqJzqG.js"),__vite__mapDeps([0,1,2,3,4]))),uz=R.lazy(()=>ce(()=>import("./FollowingView-CwwmbQtN.js"),__vite__mapDeps([5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,1,20,21,22,23,24,25,26]))),cz=R.lazy(()=>ce(()=>import("./FeedView-BTDU8K4n.js"),__vite__mapDeps([6,7,8,9,10,11,12,13,14,15,16,17,18,19,1,20,21,22,23,24,25,26]))),dz=R.lazy(()=>ce(()=>import("./ChatView-DOWTcGaK.js"),__vite__mapDeps([27,1,28,17,18,19,12,29,30,31,20,32,33,34,35,9,2,36,37,38,39,40,21,41,42]))),fz=R.lazy(()=>ce(()=>import("./SharedChatView-BxIYSQhH.js"),__vite__mapDeps([43,1,28,17,18,19,12,29,30,31,20,32,33,34,35,9,2,36,37,38,39,40]))),hz=R.lazy(()=>ce(()=>import("./PapersListView-Bfx03Ep_.js"),__vite__mapDeps([44,8,9,10,11,12,13,20,22,1,23,45,24,25,26,14,15,16]))),pz=R.lazy(()=>ce(()=>import("./PaperDetailView-lyG_Wyk5.js"),__vite__mapDeps([46,8,9,10,11,12,13,47,29,48,1,22,23,49,25,26,3,50,4,36,51,52,16,53,2,20,54,55,56,57,30,58,59,60,61,31,33,34,24,62,63,64]))),vz=R.lazy(()=>ce(()=>import("./PaperReaderView-BEFvhx80.js"),__vite__mapDeps([65,1,28,17,18,19,12,29,30,31,20,32,33,34,35,9,2,36,37,38,39,40,22,23,13,27,21,41,42]))),gz=R.lazy(()=>ce(()=>import("./TagsIndexView-B2e1rTXa.js"),__vite__mapDeps([66,1,20,11,67,25,26,68,56,3,51,57,52,16,50,53,2,54,59]))),mz=R.lazy(()=>ce(()=>import("./TagBrowseView-1K_yjVN1.js"),__vite__mapDeps([69,70,1,2,7,59,8,9,10,11,12,13,71,72,14,15,16,73,32,33,34,35,29,40,20,67,22,23,24,25,26,19,31]))),yz=R.lazy(()=>ce(()=>import("./MethodsIndexView-BCYbsfhj.js"),__vite__mapDeps([74,1,20,67,25,26,68,56,3,51,57,52,16,50,53,2,54,59]))),_z=R.lazy(()=>ce(()=>import("./FrameworksIndexView-PzvCSGNE.js"),__vite__mapDeps([75,1,8,9,10,11,12,13,20]))),wz=R.lazy(()=>ce(()=>import("./TrendsView-DmKtcGTI.js"),__vite__mapDeps([76,1,26,25]))),xz=R.lazy(()=>ce(()=>import("./ConferencesIndexView-8nxxIGFL.js"),__vite__mapDeps([77,1,20,25,26,68,56,3,51,57,52,16,50,53,2,54,59]))),bz=R.lazy(()=>ce(()=>import("./AiDeadlinesView-DSFbzhXI.js"),__vite__mapDeps([78,1,20,79,60,25,26,13,50]))),Ez=R.lazy(()=>ce(()=>import("./ConferenceDetailView-B6G28Pgh.js"),__vite__mapDeps([80,1,73,32,33,34,35,29,9,12,2,40,20,11,25,26,13]))),Sz=R.lazy(()=>ce(()=>import("./ConferenceTaskView-DNX01Fcj.js"),__vite__mapDeps([81,1,8,9,10,11,12,13,14,15,16,73,32,33,34,35,29,2,40,20,22,23,24,25,26]))),Cz=R.lazy(()=>ce(()=>import("./OrganizationsIndexView-DcJVnqrq.js"),__vite__mapDeps([82,1,26,25,20,83]))),kz=R.lazy(()=>ce(()=>import("./OrganizationDetailView-BY-TbtJS.js"),__vite__mapDeps([84,85,70,1,2,7,59,8,9,10,11,12,13,73,32,33,34,35,29,40,86,25,20,14,15,16,26,52,3,50,53,24,22,23,87]))),Pz=R.lazy(()=>ce(()=>import("./OrganizationTaskView-Dwg_gI-Q.js"),__vite__mapDeps([88,85,70,1,2,7,59,8,9,10,11,12,13,73,32,33,34,35,29,40,86,25,20,14,15,16,26,52,3,50,53,24,22,23,87]))),Rz=R.lazy(()=>ce(()=>import("./AuthorDetailView-DYFlBbTQ.js"),__vite__mapDeps([89,1,8,9,10,11,12,13,15,16,14,70,2,7,59,26,25,24,22,23,63,87]))),Tz=R.lazy(()=>ce(()=>import("./MethodDetailView-DuhUpcku.js"),__vite__mapDeps([90,70,1,2,7,59,9,23,8,10,11,12,13,14,15,16,73,32,33,34,35,29,40,20,67,24,25,26]))),Iz=R.lazy(()=>ce(()=>import("./BenchmarkDetailView-CYl_W7HU.js"),__vite__mapDeps([91,70,1,2,7,59,20,47,12,29,13,48,10,79,60,8,9,11,25,26,72,67,92]))),Oz=R.lazy(()=>ce(()=>import("./SavedPapersView-CL0ptv0l.js"),__vite__mapDeps([93,9,1,8,10,11,12,13,25,26,62]))),Mz=R.lazy(()=>ce(()=>import("./SettingsView-Es37mows.js"),__vite__mapDeps([94,1,2,7,79,60,71,18,49,41,38]))),Nz=R.lazy(()=>ce(()=>import("./PrivacyView-CDKix7GX.js"),__vite__mapDeps([95,49]))),Az=R.lazy(()=>ce(()=>import("./ApiDocsView-CyWlcUYZ.js"),__vite__mapDeps([96,1,33,97]))),$z=R.lazy(()=>ce(()=>import("./McpView-C4J0oV-e.js"),__vite__mapDeps([98,1,49,42,38,36,99]))),Lz=R.lazy(()=>ce(()=>import("./SubmitView-DKPeFmsA.js"),__vite__mapDeps([100,2,26,3,51,57,12]))),jz=R.lazy(()=>ce(()=>import("./CronDashboard-BtWUYdS2.js"),__vite__mapDeps([101,1,102,61,3,19,58,37,103,38,104,53,105,2,23,4,20,18,106]))),Fz=R.lazy(()=>ce(()=>import("./AutonomousOperations-DOs7X7Qx.js"),__vite__mapDeps([107,1,2,61,3,102,51,103]))),Dz=R.lazy(()=>ce(()=>import("./SubmissionsDashboard-DpmxpqNk.js"),__vite__mapDeps([108,55,9,1,2,20,13,12,54,104,53,103,105,109]))),zz=R.lazy(()=>ce(()=>import("./UserProfileView-B0R2tXq1.js"),__vite__mapDeps([110,1,86,25,20]))),Bz=R.lazy(()=>ce(()=>import("./RateLimitsView-2wnotSf7.js"),__vite__mapDeps([111,1]))),Uz=R.lazy(()=>ce(()=>import("./AstraForRoboticsView-Cw29Eva6.js"),__vite__mapDeps([112,8,9,10,11,12,13,14,26,25,24,22,1,23,49,113]))),uh=R.lazy(()=>ce(()=>import("./NotFound-B1i1qS3r.js"),[])),K0=R.lazy(()=>ce(()=>import("./SearchOverlay-C_z_mnYo.js"),__vite__mapDeps([114,9,1,10,20,12,45,11]))),Vz=R.lazy(()=>ce(()=>import("./StagingAccessRequestView-c98FyqK_.js"),__vite__mapDeps([115,105]))),ch=()=>w.jsxs("div",{className:"page","aria-busy":"true","aria-live":"polite",children:[w.jsx("div",{className:"animate-pulse rounded-md bg-muted",style:{height:24,width:"30%",marginBottom:24}}),w.jsx("div",{className:"animate-pulse rounded-md bg-muted",style:{height:64,width:"60%",marginBottom:32}}),w.jsxs("div",{className:"paper-list",style:{display:"grid",gap:16},children:[w.jsx("div",{className:"animate-pulse rounded-md bg-muted",style:{height:96}}),w.jsx("div",{className:"animate-pulse rounded-md bg-muted",style:{height:96}}),w.jsx("div",{className:"animate-pulse rounded-md bg-muted",style:{height:96}})]})]}),qz=new dA({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:1}}}),Hz=()=>{const{arxivId:t}=_1();return w.jsx(To,{to:t?`/paper/${t}`:"/papers",replace:!0})},Wz=()=>{const{taskSlug:t}=_1();return w.jsx(To,{to:t?`/tasks/${t}`:"/tasks",replace:!0})},Q0=({element:t})=>jo()?w.jsx(To,{to:"/",replace:!0}):w.jsx(w.Fragment,{children:t}),Hk=({element:t})=>{const{user:e,isLoading:n}=om();return jo()?w.jsx(To,{to:"/",replace:!0}):n?w.jsx("div",{className:"page",children:w.jsx("div",{className:"submission-loading",children:w.jsx("span",{children:"Checking admin session..."})})}):e?e.is_admin?w.jsx(w.Fragment,{children:t}):w.jsx("div",{className:"page",children:w.jsxs("div",{className:"submission-empty submission-empty-warn",children:[w.jsx("h1",{children:"Admin access required"}),w.jsxs("p",{children:["Signed in as @",e.username,". This dashboard is limited to allowlisted admin accounts."]})]})}):w.jsx("div",{className:"page",children:w.jsxs("div",{className:"submission-empty submission-empty-warn",children:[w.jsx("h1",{children:"Sign in required"}),w.jsx("p",{children:"Sign in with an allowlisted Hugging Face admin account to view admin operations."}),w.jsx(hS,{returnTo:"/admin-dashboard"})]})})},Gz=()=>{const t=tL(),e=typeof window<"u"&&new URL(t,window.location.origin).origin!==window.location.origin;return R.useEffect(()=>{e&&window.location.replace(t)},[t,e]),e?w.jsx("div",{className:"page",children:w.jsxs("div",{className:"submission-loading",children:[w.jsx("span",{children:"Opening the production admin dashboard..."}),w.jsx("a",{href:t,children:"Continue"})]})}):w.jsx(Hk,{element:w.jsx(jz,{})})},Kz=()=>{const[t,e]=R.useState(!1),n=An();return sz(),R.useLayoutEffect(()=>{var r;(r=document.getElementById("initial-discovery-footer"))==null||r.remove()},[]),R.useEffect(()=>{const r=s=>{(s.metaKey||s.ctrlKey)&&s.key==="k"&&(s.preventDefault(),e(!0))};return window.addEventListener("keydown",r),()=>window.removeEventListener("keydown",r)},[]),n.pathname==="/request-access"?w.jsx(R.Suspense,{fallback:w.jsx(ch,{}),children:w.jsx(Vz,{})}):n.pathname.startsWith("/pdf/")?w.jsxs("div",{className:"reader-route-shell",children:[w.jsx(D0,{onOpenSearch:()=>e(!0)}),w.jsx("div",{className:"reader-route-content",children:w.jsx(R.Suspense,{fallback:w.jsx(ch,{}),children:w.jsx(Y_,{children:w.jsx(ue,{path:"/pdf/:paperId",element:sL()?w.jsx(vz,{}):w.jsx(uh,{})})})})}),t&&w.jsx(R.Suspense,{fallback:null,children:w.jsx(K0,{open:t,onClose:()=>e(!1)})})]}):w.jsxs(w.Fragment,{children:[w.jsx(D0,{onOpenSearch:()=>e(!0)}),w.jsx("main",{children:w.jsx(R.Suspense,{fallback:w.jsx(ch,{}),children:w.jsxs(Y_,{children:[w.jsx(ue,{path:"/",element:w.jsx(cz,{})}),w.jsx(ue,{path:"/following",element:w.jsx(uz,{})}),w.jsx(ue,{path:"/chat/:sessionId?",element:al()?w.jsx(dz,{}):w.jsx(To,{to:"/",replace:!0})}),w.jsx(ue,{path:"/share/:shareId",element:al()?w.jsx(fz,{}):w.jsx(uh,{})}),w.jsx(ue,{path:"/papers",element:w.jsx(hz,{})}),w.jsx(ue,{path:"/papers/:arxivId",element:w.jsx(Hz,{})}),w.jsx(ue,{path:"/paper/:arxivId",element:w.jsx(pz,{})}),w.jsx(ue,{path:"/tasks",element:w.jsx(gz,{})}),w.jsx(ue,{path:"/tasks/:taskSlug",element:w.jsx(mz,{})}),w.jsx(ue,{path:"/task/:taskSlug",element:w.jsx(Wz,{})}),w.jsx(ue,{path:"/methods",element:w.jsx(yz,{})}),w.jsx(ue,{path:"/methods/:methodSlug",element:w.jsx(Tz,{})}),w.jsx(ue,{path:"/frameworks",element:w.jsx(_z,{})}),w.jsx(ue,{path:"/trends",element:w.jsx(wz,{})}),w.jsx(ue,{path:"/conferences",element:w.jsx(xz,{})}),w.jsx(ue,{path:"/ai-deadlines",element:w.jsx(bz,{})}),w.jsx(ue,{path:"/conferences/:confSlug",element:w.jsx(Ez,{})}),w.jsx(ue,{path:"/conferences/:confSlug/:taskSlug",element:w.jsx(Sz,{})}),w.jsx(ue,{path:"/organizations",element:w.jsx(Cz,{})}),w.jsx(ue,{path:"/orgs/:orgSlug",element:w.jsx(kz,{})}),w.jsx(ue,{path:"/orgs/:orgSlug/:taskSlug",element:w.jsx(Pz,{})}),w.jsx(ue,{path:"/authors/:authorId",element:w.jsx(Rz,{})}),w.jsx(ue,{path:"/benchmark/:datasetSlug",element:w.jsx(Iz,{})}),w.jsx(ue,{path:"/authorize-paper-edit/:authorizationId",element:w.jsx(lz,{})}),w.jsx(ue,{path:"/submit",element:w.jsx(Lz,{})}),w.jsx(ue,{path:"/saved",element:w.jsx(Q0,{element:w.jsx(Oz,{})})}),w.jsx(ue,{path:"/settings",element:w.jsx(Mz,{})}),w.jsx(ue,{path:"/privacy",element:w.jsx(Nz,{})}),w.jsx(ue,{path:"/docs/api",element:w.jsx(Az,{})}),w.jsx(ue,{path:"/mcp",element:w.jsx($z,{})}),w.jsx(ue,{path:"/admin-dashboard",element:w.jsx(Gz,{})}),w.jsx(ue,{path:"/autonomous-operations",element:w.jsx(Hk,{element:w.jsx(Fz,{})})}),w.jsx(ue,{path:"/cron-dashboard",element:w.jsx(To,{to:"/admin-dashboard",replace:!0})}),w.jsx(ue,{path:"/submissions",element:w.jsx(Q0,{element:w.jsx(Dz,{})})}),w.jsx(ue,{path:"/rate-limits",element:w.jsx(Bz,{})}),w.jsx(ue,{path:"/astra-for-robotics",element:w.jsx(Uz,{})}),w.jsx(ue,{path:"/:username",element:w.jsx(zz,{})}),w.jsx(ue,{path:"*",element:w.jsx(uh,{})})]})})}),w.jsx(ID,{}),t&&w.jsx(R.Suspense,{fallback:null,children:w.jsx(K0,{open:t,onClose:()=>e(!1)})})]})},Qz=()=>w.jsx(fA,{client:qz,children:w.jsx(kD,{children:w.jsx(oz,{children:w.jsxs(nz,{children:[w.jsx(az,{children:w.jsx(Kz,{})}),w.jsx(l3,{}),w.jsx(L3,{}),!1]})})})});NM();const Yz=w.jsx(MT,{attribute:"class",defaultTheme:"system",enableSystem:!0,disableTransitionOnChange:!0,storageKey:"pwc-theme",children:w.jsx(OM,{children:w.jsx(Qz,{})})}),Xz=_b(document.getElementById("root"));Xz.render(w.jsx(R.StrictMode,{children:Yz}));export{RS as $,sm as A,uC as B,nL as C,uD as D,Fg as E,R as F,G0 as G,hS as H,UF as I,jo as J,eL as K,Wn as L,sL as M,dD as N,fD as O,er as P,lk as Q,BF as R,lr as S,a3 as T,u4 as U,c4 as V,ED as W,cD as X,aL as Y,iw as Z,ce as _,om as a,_l as a0,eo as a1,pn as a2,Ug as a3,iv as a4,vS as a5,s3 as a6,G$ as a7,Q$ as a8,Y$ as a9,Wp as aA,Sn as aB,T1 as aC,qN as aD,HN as aE,Hp as aF,k1 as aG,oA as aH,QN as aI,Ct as aJ,r4 as aK,il as aL,lA as aM,i4 as aN,s4 as aO,P1 as aP,AS as aQ,$S as aR,LS as aS,To as aT,$0 as aU,X$ as aa,Es as ab,Z$ as ac,J$ as ad,l4 as ae,n4 as af,IF as ag,iC as ah,kd as ai,_d as aj,Q1 as ak,Ng as al,z1 as am,Mg as an,xl as ao,oC as ap,aC as aq,An as ar,OT as as,Zz as at,CD as au,f4 as av,md as aw,ZN as ax,WN as ay,t4 as az,Rg as b,m4 as c,e4 as d,rL as e,d4 as f,Id as g,LD as h,al as i,w as j,w4 as k,aD as l,o4 as m,h4 as n,g4 as o,Re as p,yd as q,g as r,Xe as s,Z as t,_1 as u,EF as v,Ss as w,at as x,p4 as y,jS as z}; diff --git a/assets/input-fzMY4SDb.js b/assets/input-BOLTsgbP.js similarity index 88% rename from assets/input-fzMY4SDb.js rename to assets/input-BOLTsgbP.js index f447c0a6cf207a89633819cca056cddc3e1b0786..6e0d8346fc0d10725ea79d4f01fc825db7c71f90 100644 --- a/assets/input-fzMY4SDb.js +++ b/assets/input-BOLTsgbP.js @@ -1 +1 @@ -import{r as s,j as i,x as n}from"./index-CnBotBa4.js";const d=s.forwardRef(({className:e,type:r,...o},t)=>i.jsx("input",{type:r,className:n("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:t,...o}));d.displayName="Input";export{d as I}; +import{r as s,j as i,x as n}from"./index-hxawG6mk.js";const d=s.forwardRef(({className:e,type:r,...o},t)=>i.jsx("input",{type:r,className:n("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:t,...o}));d.displayName="Input";export{d as I}; diff --git a/assets/loader-circle-zwM3ton0.js b/assets/loader-circle-CXb3415J.js similarity index 85% rename from assets/loader-circle-zwM3ton0.js rename to assets/loader-circle-CXb3415J.js index 2d3bd22f0246495e569ff272cab425e53074380f..abcfa2ffb7a8d57e4883418b088c4bdbd398f685 100644 --- a/assets/loader-circle-zwM3ton0.js +++ b/assets/loader-circle-CXb3415J.js @@ -1,4 +1,4 @@ -import{g as e}from"./index-CnBotBa4.js";/** +import{g as e}from"./index-hxawG6mk.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/openrouter-BMS0vcTS.js b/assets/openrouter-CJoBewhx.js similarity index 82% rename from assets/openrouter-BMS0vcTS.js rename to assets/openrouter-CJoBewhx.js index 0876ba4569a4e6af202436703abfe789db93cb0a..c72aa379997fd4f40cbbbf6295d7c2f269ec8047 100644 --- a/assets/openrouter-BMS0vcTS.js +++ b/assets/openrouter-CJoBewhx.js @@ -1 +1 @@ -import{u as r}from"./useQuery-C8pfCInN.js";import{c as n}from"./chat-B0u4w1H2.js";const u=["chat","openrouter","usage"],o=["chat","openrouter","credential"];function s(e=!0){return r({queryKey:u,queryFn:()=>n.getUsage(),enabled:e,staleTime:3e4,refetchOnWindowFocus:!0})}function c(e=!0){return r({queryKey:o,queryFn:()=>n.getOpenRouterCredential(),enabled:e,refetchOnWindowFocus:!0})}function m(e){const t=new Date(e);return{local:new Intl.DateTimeFormat(void 0,{year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"2-digit",timeZoneName:"short"}).format(t),utc:`${t.toLocaleString("en-GB",{timeZone:"UTC",year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})} UTC`}}export{o as O,s as a,m as r,c as u}; +import{u as r}from"./useQuery-B7vCF2Os.js";import{c as n}from"./chat-DJiy7CbR.js";const u=["chat","openrouter","usage"],o=["chat","openrouter","credential"];function s(e=!0){return r({queryKey:u,queryFn:()=>n.getUsage(),enabled:e,staleTime:3e4,refetchOnWindowFocus:!0})}function c(e=!0){return r({queryKey:o,queryFn:()=>n.getOpenRouterCredential(),enabled:e,refetchOnWindowFocus:!0})}function m(e){const t=new Date(e);return{local:new Intl.DateTimeFormat(void 0,{year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"2-digit",timeZoneName:"short"}).format(t),utc:`${t.toLocaleString("en-GB",{timeZone:"UTC",year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})} UTC`}}export{o as O,s as a,m as r,c as u}; diff --git a/assets/operations-scUEWit-.js b/assets/operations-DFo5ls8Y.js similarity index 97% rename from assets/operations-scUEWit-.js rename to assets/operations-DFo5ls8Y.js index 15cf8093d9b7f1e2e1dd87003df21f3514ef3c2d..7986549e8245d4e6c75ebfbe1441cee8b3d9a839 100644 --- a/assets/operations-scUEWit-.js +++ b/assets/operations-DFo5ls8Y.js @@ -1,4 +1,4 @@ -import{g as c,r as s,j as r,x as n,a4 as u}from"./index-CnBotBa4.js";/** +import{g as c,r as s,j as r,x as n,a4 as u}from"./index-hxawG6mk.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/paperEdits-C4mFP78Y.js b/assets/paperEdits-B1ZmleCA.js similarity index 87% rename from assets/paperEdits-C4mFP78Y.js rename to assets/paperEdits-B1ZmleCA.js index 58747a8b3cc0edb171192ac43b75a646fa72d4e0..08c3712df2b2aa644451b26d03e7b5f3f4dd8a6b 100644 --- a/assets/paperEdits-C4mFP78Y.js +++ b/assets/paperEdits-B1ZmleCA.js @@ -1 +1 @@ -import{a4 as p}from"./index-CnBotBa4.js";const i={authorization:e=>p(`/paper-edit-authorizations/${encodeURIComponent(e)}`),approve:e=>p(`/paper-edit-authorizations/${encodeURIComponent(e)}/approve`,{method:"POST"}),history:(e,o)=>p(`/papers/${e}/edit-history${o?`?cursor=${encodeURIComponent(o)}`:""}`),digest:(e,o)=>p(`/admin/paper-edit-digest?day=${e}&page=${o}`),suspend:(e,o)=>p("/admin/paper-edit-suspension",{method:"POST",body:JSON.stringify({hf_subject:e,suspended:o})})};export{i as p}; +import{a4 as p}from"./index-hxawG6mk.js";const i={authorization:e=>p(`/paper-edit-authorizations/${encodeURIComponent(e)}`),approve:e=>p(`/paper-edit-authorizations/${encodeURIComponent(e)}/approve`,{method:"POST"}),history:(e,o)=>p(`/papers/${e}/edit-history${o?`?cursor=${encodeURIComponent(o)}`:""}`),digest:(e,o)=>p(`/admin/paper-edit-digest?day=${e}&page=${o}`),suspend:(e,o)=>p("/admin/paper-edit-suspension",{method:"POST",body:JSON.stringify({hf_subject:e,suspended:o})})};export{i as p}; diff --git a/assets/papers-DkTdvzl4.js b/assets/papers-B0ysePyJ.js similarity index 99% rename from assets/papers-DkTdvzl4.js rename to assets/papers-B0ysePyJ.js index 729102869311823b430ef7602849795d318c100c..475b9beb7923483d096223ac8a88c969ca796aca 100644 --- a/assets/papers-DkTdvzl4.js +++ b/assets/papers-B0ysePyJ.js @@ -1 +1 @@ -var g=Object.defineProperty;var S=(i,e,t)=>e in i?g(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t;var m=(i,e,t)=>S(i,typeof e!="symbol"?e+"":e,t);import{A as f,E as w,a4 as l}from"./index-CnBotBa4.js";const p="pwc:fresh-auth-mutation";function v(i){if(typeof window>"u")return;sessionStorage.setItem("pwc:fresh-auth-edit",i);const e=w("/api/v1/auth/hf/login");window.location.assign(`${e}?return_to=${encodeURIComponent(window.location.href)}`)}class ${constructor(e,t=v){m(this,"paperLoads",new Map);m(this,"evaluationLoads",new Map);this.request=e,this.recoverFreshAuth=t}primePaper(e,t=!1){t&&this.paperLoads.delete(e);let r=this.paperLoads.get(e);return r||(r=this.request(`/papers/${e}/curation-state`).catch(s=>{throw this.paperLoads.delete(e),s}),this.paperLoads.set(e,r)),r}primeEvaluations(e,t=!1){t&&this.evaluationLoads.delete(e);let r=this.evaluationLoads.get(e);return r||(r=this.request(`/evaluations/curation-state?paper_id=${e}`).catch(s=>{throw this.evaluationLoads.delete(e),s}),this.evaluationLoads.set(e,r)),r}async mutatePaper(e,t,r,s,o){const a=this.paperLoads.get(e);if(!a)throw new Error("The catalog version was not loaded when this editor opened. Close and reopen the editor.");const n=(await a).sections[t];if(!n)throw new Error(`Missing curation version for ${t}`);return this.mutate(t,s,r,n,o,`paper:${e}:${t}`)}async mutateEvaluations(e,t,r,s){const o=this.evaluationLoads.get(String(e));if(!o)throw new Error("The evaluation version was not loaded when this editor opened. Close and reopen the editor.");const a=(await o).version;return this.mutate("evaluations",r,t,a,s,`paper:${e}:evaluations`)}async mutate(e,t,r,s,o,a){const n=new Headers(o.headers);Object.entries(this.idempotencyHeaders(a,r,s)).forEach(([h,y])=>n.set(h,y));const d={...o,headers:n};try{const h=await this.request(t,d);return this.clearAttempt(d),h}catch(h){throw h instanceof f&&h.status===401&&h.code==="fresh_auth_required"?(this.saveFreshAuthMutation(e,t,r,d),this.recoverFreshAuth(e)):h instanceof f&&h.status===409&&(this.clearAttempt(d),typeof window<"u"&&window.dispatchEvent(new CustomEvent("pwc:catalog-conflict",{detail:{endpoint:t}}))),h}}freshAuthMutationDraft(){const e=sessionStorage.getItem(p);if(!e)return null;try{const t=JSON.parse(e);if(!t.endpoint.startsWith("/")||t.endpoint.startsWith("//")||!["POST","PUT","PATCH","DELETE"].includes(t.options.method))throw new Error("Invalid saved mutation draft");return t}catch{return sessionStorage.removeItem(p),null}}async resumeFreshAuthMutation(){const e=this.freshAuthMutationDraft();if(!e)throw new Error("No saved catalog edit is available.");const t=await this.request(e.endpoint,{method:e.options.method,body:e.options.body,headers:e.options.headers});return this.clearAttempt({headers:e.options.headers}),sessionStorage.removeItem(p),sessionStorage.removeItem("pwc:fresh-auth-edit"),t}saveFreshAuthMutation(e,t,r,s){const o=Object.fromEntries(new Headers(s.headers).entries()),a=typeof s.body=="string"?s.body:void 0;sessionStorage.setItem(p,JSON.stringify({section:e,endpoint:t,payload:r,options:{method:(s.method??"POST").toUpperCase(),body:a,headers:o}}))}idempotencyHeaders(e,t,r){const s=`pwc:mutation:${e}:${JSON.stringify(t)}`,o=sessionStorage.getItem(s);if(o){const n=JSON.parse(o);return{"Idempotency-Key":n.key,"If-Match":n.version}}const a=crypto.randomUUID();return sessionStorage.setItem(s,JSON.stringify({key:a,version:r})),sessionStorage.setItem(`pwc:mutation-key:${a}`,s),{"Idempotency-Key":a,"If-Match":r}}clearAttempt(e){const t=new Headers(e.headers).get("Idempotency-Key");if(!t)return;const r=sessionStorage.getItem(`pwc:mutation-key:${t}`);r&&sessionStorage.removeItem(r),sessionStorage.removeItem(`pwc:mutation-key:${t}`),this.paperLoads.clear(),this.evaluationLoads.clear()}}const u=new $(l);function c(i){const e=new URLSearchParams;for(const[r,s]of Object.entries(i??{}))s!==void 0&&s!==""&&e.set(r,String(s));const t=e.toString();return t?`?${t}`:""}class P{constructor(e){this.request=e}list(e){const t=new URLSearchParams;for(const[s,o]of Object.entries(e??{}))o!==void 0&&o!==""&&t.set(s,String(o));const r=t.toString();return this.request(`/papers/${r?`?${r}`:""}`,{cache:"no-cache"})}search(e,t=1,r=10,s,o,a){const n=new URLSearchParams({q:e,page:t.toString(),page_size:r.toString()});return s&&n.set("mode",s),a!=null&&a.start_date&&n.set("start_date",a.start_date),a!=null&&a.end_date&&n.set("end_date",a.end_date),this.request(`/papers/search?${n.toString()}`,{signal:o})}searchFeed(e){return this.request(`/papers/search/feed${c(e)}`,{cache:"no-cache"})}get(e,t=!0){const r=t?"?include_resources=true":"";return this.request(`/papers/${e}${r}`)}getByArxivId(e,t=!0){const r=t?"?include_resources=true":"";return this.request(`/papers/arxiv/${e}${r}`)}lookup(e){return this.request("/papers/lookup",{method:"POST",body:JSON.stringify({references:e})})}related(e,t=4){return this.request(`/papers/${encodeURIComponent(e)}/related?limit=${t}`)}versions(e){return this.request(`/papers/arxiv/${e}/versions`)}indexFromArxiv(e){return this.request(`/papers/index/${e}`,{method:"POST"})}submit(e){return this.request("/papers/submit",{method:"POST",body:JSON.stringify(e)})}copyToBucket(e,t){return this.request(`/papers/${encodeURIComponent(e)}/copy-to-bucket`,{method:"POST",body:JSON.stringify(t)})}trending(e){const t=new URLSearchParams;for(const[s,o]of Object.entries(e??{}))o!==void 0&&t.set(s,String(o));const r=t.toString();return this.request(`/papers/trending${r?`?${r}`:""}`,{cache:"no-store"})}forTask(e,t){return this.request(`/tasks/${e}/papers${c(t)}`)}forMethod(e,t){return this.request(`/methods/${encodeURIComponent(e)}/papers${c(t)}`)}forConference(e,t){return this.request(`/conferences/${e}/papers${c(t)}`)}forOrganization(e,t){return this.request(`/organizations/${e}/papers${c(t)}`)}getAuthor(e){return this.request(`/authors/${e}`)}primeCurationState(e,t=!1){return u.primePaper(e,t)}freshAuthMutationDraft(){return u.freshAuthMutationDraft()}resumeFreshAuthMutation(){return u.resumeFreshAuthMutation()}updateTasks(e,t){const r=new URLSearchParams(t.map(s=>["task_ids",String(s)])).toString();return u.mutatePaper(e,"tasks",t,`/papers/${e}/tasks?${r}`,{method:"PUT"})}updateMethods(e,t){const r=new URLSearchParams(t.map(s=>["method_ids",String(s)])).toString();return u.mutatePaper(e,"methods",t,`/papers/${e}/methods?${r}`,{method:"PUT"})}updateOrganizations(e,t){const r=new URLSearchParams(t.map(s=>["organization_ids",String(s)])).toString();return u.mutatePaper(e,"organizations",t,`/papers/${e}/organizations?${r}`,{method:"PUT"})}updateRepositories(e,t){return u.mutatePaper(e,"repositories",t,`/papers/${e}/repositories`,{method:"PUT",body:JSON.stringify({repositories:t})})}updateProjectPages(e,t){return u.mutatePaper(e,"project_pages",t,`/papers/${e}/project-pages`,{method:"PUT",body:JSON.stringify({project_pages:t})})}updateXThreads(e,t){return u.mutatePaper(e,"x_threads",t,`/papers/${e}/x-threads`,{method:"PUT",body:JSON.stringify({x_threads:t})})}updateSourceUrl(e,t){return u.mutatePaper(e,"source_url",t,`/papers/${e}/source-url`,{method:"PUT",body:JSON.stringify({source_url:t})})}updateHfArtifacts(e,t){return u.mutatePaper(e,"hf_artifacts",t,`/papers/${e}/hf-artifacts`,{method:"PUT",body:JSON.stringify(t)})}}const A=new P(l);export{u as a,A as p}; +var g=Object.defineProperty;var S=(i,e,t)=>e in i?g(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t;var m=(i,e,t)=>S(i,typeof e!="symbol"?e+"":e,t);import{A as f,E as w,a4 as l}from"./index-hxawG6mk.js";const p="pwc:fresh-auth-mutation";function v(i){if(typeof window>"u")return;sessionStorage.setItem("pwc:fresh-auth-edit",i);const e=w("/api/v1/auth/hf/login");window.location.assign(`${e}?return_to=${encodeURIComponent(window.location.href)}`)}class ${constructor(e,t=v){m(this,"paperLoads",new Map);m(this,"evaluationLoads",new Map);this.request=e,this.recoverFreshAuth=t}primePaper(e,t=!1){t&&this.paperLoads.delete(e);let r=this.paperLoads.get(e);return r||(r=this.request(`/papers/${e}/curation-state`).catch(s=>{throw this.paperLoads.delete(e),s}),this.paperLoads.set(e,r)),r}primeEvaluations(e,t=!1){t&&this.evaluationLoads.delete(e);let r=this.evaluationLoads.get(e);return r||(r=this.request(`/evaluations/curation-state?paper_id=${e}`).catch(s=>{throw this.evaluationLoads.delete(e),s}),this.evaluationLoads.set(e,r)),r}async mutatePaper(e,t,r,s,o){const a=this.paperLoads.get(e);if(!a)throw new Error("The catalog version was not loaded when this editor opened. Close and reopen the editor.");const n=(await a).sections[t];if(!n)throw new Error(`Missing curation version for ${t}`);return this.mutate(t,s,r,n,o,`paper:${e}:${t}`)}async mutateEvaluations(e,t,r,s){const o=this.evaluationLoads.get(String(e));if(!o)throw new Error("The evaluation version was not loaded when this editor opened. Close and reopen the editor.");const a=(await o).version;return this.mutate("evaluations",r,t,a,s,`paper:${e}:evaluations`)}async mutate(e,t,r,s,o,a){const n=new Headers(o.headers);Object.entries(this.idempotencyHeaders(a,r,s)).forEach(([h,y])=>n.set(h,y));const d={...o,headers:n};try{const h=await this.request(t,d);return this.clearAttempt(d),h}catch(h){throw h instanceof f&&h.status===401&&h.code==="fresh_auth_required"?(this.saveFreshAuthMutation(e,t,r,d),this.recoverFreshAuth(e)):h instanceof f&&h.status===409&&(this.clearAttempt(d),typeof window<"u"&&window.dispatchEvent(new CustomEvent("pwc:catalog-conflict",{detail:{endpoint:t}}))),h}}freshAuthMutationDraft(){const e=sessionStorage.getItem(p);if(!e)return null;try{const t=JSON.parse(e);if(!t.endpoint.startsWith("/")||t.endpoint.startsWith("//")||!["POST","PUT","PATCH","DELETE"].includes(t.options.method))throw new Error("Invalid saved mutation draft");return t}catch{return sessionStorage.removeItem(p),null}}async resumeFreshAuthMutation(){const e=this.freshAuthMutationDraft();if(!e)throw new Error("No saved catalog edit is available.");const t=await this.request(e.endpoint,{method:e.options.method,body:e.options.body,headers:e.options.headers});return this.clearAttempt({headers:e.options.headers}),sessionStorage.removeItem(p),sessionStorage.removeItem("pwc:fresh-auth-edit"),t}saveFreshAuthMutation(e,t,r,s){const o=Object.fromEntries(new Headers(s.headers).entries()),a=typeof s.body=="string"?s.body:void 0;sessionStorage.setItem(p,JSON.stringify({section:e,endpoint:t,payload:r,options:{method:(s.method??"POST").toUpperCase(),body:a,headers:o}}))}idempotencyHeaders(e,t,r){const s=`pwc:mutation:${e}:${JSON.stringify(t)}`,o=sessionStorage.getItem(s);if(o){const n=JSON.parse(o);return{"Idempotency-Key":n.key,"If-Match":n.version}}const a=crypto.randomUUID();return sessionStorage.setItem(s,JSON.stringify({key:a,version:r})),sessionStorage.setItem(`pwc:mutation-key:${a}`,s),{"Idempotency-Key":a,"If-Match":r}}clearAttempt(e){const t=new Headers(e.headers).get("Idempotency-Key");if(!t)return;const r=sessionStorage.getItem(`pwc:mutation-key:${t}`);r&&sessionStorage.removeItem(r),sessionStorage.removeItem(`pwc:mutation-key:${t}`),this.paperLoads.clear(),this.evaluationLoads.clear()}}const u=new $(l);function c(i){const e=new URLSearchParams;for(const[r,s]of Object.entries(i??{}))s!==void 0&&s!==""&&e.set(r,String(s));const t=e.toString();return t?`?${t}`:""}class P{constructor(e){this.request=e}list(e){const t=new URLSearchParams;for(const[s,o]of Object.entries(e??{}))o!==void 0&&o!==""&&t.set(s,String(o));const r=t.toString();return this.request(`/papers/${r?`?${r}`:""}`,{cache:"no-cache"})}search(e,t=1,r=10,s,o,a){const n=new URLSearchParams({q:e,page:t.toString(),page_size:r.toString()});return s&&n.set("mode",s),a!=null&&a.start_date&&n.set("start_date",a.start_date),a!=null&&a.end_date&&n.set("end_date",a.end_date),this.request(`/papers/search?${n.toString()}`,{signal:o})}searchFeed(e){return this.request(`/papers/search/feed${c(e)}`,{cache:"no-cache"})}get(e,t=!0){const r=t?"?include_resources=true":"";return this.request(`/papers/${e}${r}`)}getByArxivId(e,t=!0){const r=t?"?include_resources=true":"";return this.request(`/papers/arxiv/${e}${r}`)}lookup(e){return this.request("/papers/lookup",{method:"POST",body:JSON.stringify({references:e})})}related(e,t=4){return this.request(`/papers/${encodeURIComponent(e)}/related?limit=${t}`)}versions(e){return this.request(`/papers/arxiv/${e}/versions`)}indexFromArxiv(e){return this.request(`/papers/index/${e}`,{method:"POST"})}submit(e){return this.request("/papers/submit",{method:"POST",body:JSON.stringify(e)})}copyToBucket(e,t){return this.request(`/papers/${encodeURIComponent(e)}/copy-to-bucket`,{method:"POST",body:JSON.stringify(t)})}trending(e){const t=new URLSearchParams;for(const[s,o]of Object.entries(e??{}))o!==void 0&&t.set(s,String(o));const r=t.toString();return this.request(`/papers/trending${r?`?${r}`:""}`,{cache:"no-store"})}forTask(e,t){return this.request(`/tasks/${e}/papers${c(t)}`)}forMethod(e,t){return this.request(`/methods/${encodeURIComponent(e)}/papers${c(t)}`)}forConference(e,t){return this.request(`/conferences/${e}/papers${c(t)}`)}forOrganization(e,t){return this.request(`/organizations/${e}/papers${c(t)}`)}getAuthor(e){return this.request(`/authors/${e}`)}primeCurationState(e,t=!1){return u.primePaper(e,t)}freshAuthMutationDraft(){return u.freshAuthMutationDraft()}resumeFreshAuthMutation(){return u.resumeFreshAuthMutation()}updateTasks(e,t){const r=new URLSearchParams(t.map(s=>["task_ids",String(s)])).toString();return u.mutatePaper(e,"tasks",t,`/papers/${e}/tasks?${r}`,{method:"PUT"})}updateMethods(e,t){const r=new URLSearchParams(t.map(s=>["method_ids",String(s)])).toString();return u.mutatePaper(e,"methods",t,`/papers/${e}/methods?${r}`,{method:"PUT"})}updateOrganizations(e,t){const r=new URLSearchParams(t.map(s=>["organization_ids",String(s)])).toString();return u.mutatePaper(e,"organizations",t,`/papers/${e}/organizations?${r}`,{method:"PUT"})}updateRepositories(e,t){return u.mutatePaper(e,"repositories",t,`/papers/${e}/repositories`,{method:"PUT",body:JSON.stringify({repositories:t})})}updateProjectPages(e,t){return u.mutatePaper(e,"project_pages",t,`/papers/${e}/project-pages`,{method:"PUT",body:JSON.stringify({project_pages:t})})}updateXThreads(e,t){return u.mutatePaper(e,"x_threads",t,`/papers/${e}/x-threads`,{method:"PUT",body:JSON.stringify({x_threads:t})})}updateSourceUrl(e,t){return u.mutatePaper(e,"source_url",t,`/papers/${e}/source-url`,{method:"PUT",body:JSON.stringify({source_url:t})})}updateHfArtifacts(e,t){return u.mutatePaper(e,"hf_artifacts",t,`/papers/${e}/hf-artifacts`,{method:"PUT",body:JSON.stringify(t)})}}const A=new P(l);export{u as a,A as p}; diff --git a/assets/plus-DTSO60Ls.js b/assets/plus-C1naIkSJ.js similarity index 86% rename from assets/plus-DTSO60Ls.js rename to assets/plus-C1naIkSJ.js index f8e179c9c999bf9a8d2589a1d93f73a1e60cb4ef..0f13429f5cd01c6a34a50f329e5aafb75aca5b3f 100644 --- a/assets/plus-DTSO60Ls.js +++ b/assets/plus-C1naIkSJ.js @@ -1,4 +1,4 @@ -import{g as e}from"./index-CnBotBa4.js";/** +import{g as e}from"./index-hxawG6mk.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/popover-BvojInsz.js b/assets/popover-BEdoEHfx.js similarity index 98% rename from assets/popover-BvojInsz.js rename to assets/popover-BEdoEHfx.js index eb768a87515481bde307f1f9f303782e99d722f7..1c0cc27f9e372f1a2971819f278e286ec85b5e5f 100644 --- a/assets/popover-BvojInsz.js +++ b/assets/popover-BEdoEHfx.js @@ -1 +1 @@ -import{r as s,j as l,ab as V,q as $,ag as L,a1 as W,s as A,p as O,t as h,ah as E,ai as y,P as _,aj as H,w as z,ak as G,al as q,am as B,an as K,ao as Z,ap as U,aq as J,x as Q}from"./index-CnBotBa4.js";function X(e){const t=Y(e),r=s.forwardRef((n,o)=>{const{children:a,...c}=n,i=s.Children.toArray(a),p=i.find(oe);if(p){const u=p.props.children,P=i.map(f=>f===p?s.Children.count(u)>1?s.Children.only(null):s.isValidElement(u)?u.props.children:null:f);return l.jsx(t,{...c,ref:o,children:s.isValidElement(u)?s.cloneElement(u,void 0,P):null})}return l.jsx(t,{...c,ref:o,children:a})});return r.displayName=`${e}.Slot`,r}function Y(e){const t=s.forwardRef((r,n)=>{const{children:o,...a}=r;if(s.isValidElement(o)){const c=re(o),i=te(a,o.props);return o.type!==s.Fragment&&(i.ref=n?V(n,c):c),s.cloneElement(o,i)}return s.Children.count(o)>1?s.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var ee=Symbol("radix.slottable");function oe(e){return s.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===ee}function te(e,t){const r={...t};for(const n in t){const o=e[n],a=t[n];/^on[A-Z]/.test(n)?o&&a?r[n]=(...i)=>{const p=a(...i);return o(...i),p}:o&&(r[n]=o):n==="style"?r[n]={...o,...a}:n==="className"&&(r[n]=[o,a].filter(Boolean).join(" "))}return{...e,...r}}function re(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var C="Popover",[b]=z(C,[y]),m=y(),[ne,d]=b(C),j=e=>{const{__scopePopover:t,children:r,open:n,defaultOpen:o,onOpenChange:a,modal:c=!1}=e,i=m(t),p=s.useRef(null),[u,P]=s.useState(!1),[f,v]=$({prop:n,defaultProp:o??!1,onChange:a,caller:C});return l.jsx(L,{...i,children:l.jsx(ne,{scope:t,contentId:W(),triggerRef:p,open:f,onOpenChange:v,onOpenToggle:s.useCallback(()=>v(x=>!x),[v]),hasCustomAnchor:u,onCustomAnchorAdd:s.useCallback(()=>P(!0),[]),onCustomAnchorRemove:s.useCallback(()=>P(!1),[]),modal:c,children:r})})};j.displayName=C;var w="PopoverAnchor",ae=s.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=d(w,r),a=m(r),{onCustomAnchorAdd:c,onCustomAnchorRemove:i}=o;return s.useEffect(()=>(c(),()=>i()),[c,i]),l.jsx(E,{...a,...n,ref:t})});ae.displayName=w;var S="PopoverTrigger",N=s.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=d(S,r),a=m(r),c=A(t,o.triggerRef),i=l.jsx(O.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":M(o.open),...n,ref:c,onClick:h(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?i:l.jsx(E,{asChild:!0,...a,children:i})});N.displayName=S;var R="PopoverPortal",[se,ce]=b(R,{forceMount:void 0}),F=e=>{const{__scopePopover:t,forceMount:r,children:n,container:o}=e,a=d(R,t);return l.jsx(se,{scope:t,forceMount:r,children:l.jsx(_,{present:r||a.open,children:l.jsx(H,{asChild:!0,container:o,children:n})})})};F.displayName=R;var g="PopoverContent",D=s.forwardRef((e,t)=>{const r=ce(g,e.__scopePopover),{forceMount:n=r.forceMount,...o}=e,a=d(g,e.__scopePopover);return l.jsx(_,{present:n||a.open,children:a.modal?l.jsx(le,{...o,ref:t}):l.jsx(pe,{...o,ref:t})})});D.displayName=g;var ie=X("PopoverContent.RemoveScroll"),le=s.forwardRef((e,t)=>{const r=d(g,e.__scopePopover),n=s.useRef(null),o=A(t,n),a=s.useRef(!1);return s.useEffect(()=>{const c=n.current;if(c)return G(c)},[]),l.jsx(q,{as:ie,allowPinchZoom:!0,children:l.jsx(I,{...e,ref:o,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:h(e.onCloseAutoFocus,c=>{var i;c.preventDefault(),a.current||(i=r.triggerRef.current)==null||i.focus()}),onPointerDownOutside:h(e.onPointerDownOutside,c=>{const i=c.detail.originalEvent,p=i.button===0&&i.ctrlKey===!0,u=i.button===2||p;a.current=u},{checkForDefaultPrevented:!1}),onFocusOutside:h(e.onFocusOutside,c=>c.preventDefault(),{checkForDefaultPrevented:!1})})})}),pe=s.forwardRef((e,t)=>{const r=d(g,e.__scopePopover),n=s.useRef(!1),o=s.useRef(!1);return l.jsx(I,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var c,i;(c=e.onCloseAutoFocus)==null||c.call(e,a),a.defaultPrevented||(n.current||(i=r.triggerRef.current)==null||i.focus(),a.preventDefault()),n.current=!1,o.current=!1},onInteractOutside:a=>{var p,u;(p=e.onInteractOutside)==null||p.call(e,a),a.defaultPrevented||(n.current=!0,a.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const c=a.target;((u=r.triggerRef.current)==null?void 0:u.contains(c))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&o.current&&a.preventDefault()}})}),I=s.forwardRef((e,t)=>{const{__scopePopover:r,trapFocus:n,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:c,onEscapeKeyDown:i,onPointerDownOutside:p,onFocusOutside:u,onInteractOutside:P,...f}=e,v=d(g,r),x=m(r);return B(),l.jsx(K,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:o,onUnmountAutoFocus:a,children:l.jsx(Z,{asChild:!0,disableOutsidePointerEvents:c,onInteractOutside:P,onEscapeKeyDown:i,onPointerDownOutside:p,onFocusOutside:u,onDismiss:()=>v.onOpenChange(!1),children:l.jsx(U,{"data-state":M(v.open),role:"dialog",id:v.contentId,...x,...f,ref:t,style:{...f.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)"}})})})}),T="PopoverClose",ue=s.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=d(T,r);return l.jsx(O.button,{type:"button",...n,ref:t,onClick:h(e.onClick,()=>o.onOpenChange(!1))})});ue.displayName=T;var de="PopoverArrow",fe=s.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=m(r);return l.jsx(J,{...o,...n,ref:t})});fe.displayName=de;function M(e){return e?"open":"closed"}var ve=j,Pe=N,ge=F,k=D;const Ce=ve,xe=Pe,he=s.forwardRef(({className:e,align:t="center",sideOffset:r=4,...n},o)=>l.jsx(ge,{children:l.jsx(k,{ref:o,align:t,sideOffset:r,className:Q("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",e),...n})}));he.displayName=k.displayName;export{Ce as P,xe as a,he as b}; +import{r as s,j as l,ab as V,q as $,ag as L,a1 as W,s as A,p as O,t as h,ah as E,ai as y,P as _,aj as H,w as z,ak as G,al as q,am as B,an as K,ao as Z,ap as U,aq as J,x as Q}from"./index-hxawG6mk.js";function X(e){const t=Y(e),r=s.forwardRef((n,o)=>{const{children:a,...c}=n,i=s.Children.toArray(a),p=i.find(oe);if(p){const u=p.props.children,P=i.map(f=>f===p?s.Children.count(u)>1?s.Children.only(null):s.isValidElement(u)?u.props.children:null:f);return l.jsx(t,{...c,ref:o,children:s.isValidElement(u)?s.cloneElement(u,void 0,P):null})}return l.jsx(t,{...c,ref:o,children:a})});return r.displayName=`${e}.Slot`,r}function Y(e){const t=s.forwardRef((r,n)=>{const{children:o,...a}=r;if(s.isValidElement(o)){const c=re(o),i=te(a,o.props);return o.type!==s.Fragment&&(i.ref=n?V(n,c):c),s.cloneElement(o,i)}return s.Children.count(o)>1?s.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var ee=Symbol("radix.slottable");function oe(e){return s.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===ee}function te(e,t){const r={...t};for(const n in t){const o=e[n],a=t[n];/^on[A-Z]/.test(n)?o&&a?r[n]=(...i)=>{const p=a(...i);return o(...i),p}:o&&(r[n]=o):n==="style"?r[n]={...o,...a}:n==="className"&&(r[n]=[o,a].filter(Boolean).join(" "))}return{...e,...r}}function re(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var C="Popover",[b]=z(C,[y]),m=y(),[ne,d]=b(C),j=e=>{const{__scopePopover:t,children:r,open:n,defaultOpen:o,onOpenChange:a,modal:c=!1}=e,i=m(t),p=s.useRef(null),[u,P]=s.useState(!1),[f,v]=$({prop:n,defaultProp:o??!1,onChange:a,caller:C});return l.jsx(L,{...i,children:l.jsx(ne,{scope:t,contentId:W(),triggerRef:p,open:f,onOpenChange:v,onOpenToggle:s.useCallback(()=>v(x=>!x),[v]),hasCustomAnchor:u,onCustomAnchorAdd:s.useCallback(()=>P(!0),[]),onCustomAnchorRemove:s.useCallback(()=>P(!1),[]),modal:c,children:r})})};j.displayName=C;var w="PopoverAnchor",ae=s.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=d(w,r),a=m(r),{onCustomAnchorAdd:c,onCustomAnchorRemove:i}=o;return s.useEffect(()=>(c(),()=>i()),[c,i]),l.jsx(E,{...a,...n,ref:t})});ae.displayName=w;var S="PopoverTrigger",N=s.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=d(S,r),a=m(r),c=A(t,o.triggerRef),i=l.jsx(O.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":M(o.open),...n,ref:c,onClick:h(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?i:l.jsx(E,{asChild:!0,...a,children:i})});N.displayName=S;var R="PopoverPortal",[se,ce]=b(R,{forceMount:void 0}),F=e=>{const{__scopePopover:t,forceMount:r,children:n,container:o}=e,a=d(R,t);return l.jsx(se,{scope:t,forceMount:r,children:l.jsx(_,{present:r||a.open,children:l.jsx(H,{asChild:!0,container:o,children:n})})})};F.displayName=R;var g="PopoverContent",D=s.forwardRef((e,t)=>{const r=ce(g,e.__scopePopover),{forceMount:n=r.forceMount,...o}=e,a=d(g,e.__scopePopover);return l.jsx(_,{present:n||a.open,children:a.modal?l.jsx(le,{...o,ref:t}):l.jsx(pe,{...o,ref:t})})});D.displayName=g;var ie=X("PopoverContent.RemoveScroll"),le=s.forwardRef((e,t)=>{const r=d(g,e.__scopePopover),n=s.useRef(null),o=A(t,n),a=s.useRef(!1);return s.useEffect(()=>{const c=n.current;if(c)return G(c)},[]),l.jsx(q,{as:ie,allowPinchZoom:!0,children:l.jsx(I,{...e,ref:o,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:h(e.onCloseAutoFocus,c=>{var i;c.preventDefault(),a.current||(i=r.triggerRef.current)==null||i.focus()}),onPointerDownOutside:h(e.onPointerDownOutside,c=>{const i=c.detail.originalEvent,p=i.button===0&&i.ctrlKey===!0,u=i.button===2||p;a.current=u},{checkForDefaultPrevented:!1}),onFocusOutside:h(e.onFocusOutside,c=>c.preventDefault(),{checkForDefaultPrevented:!1})})})}),pe=s.forwardRef((e,t)=>{const r=d(g,e.__scopePopover),n=s.useRef(!1),o=s.useRef(!1);return l.jsx(I,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var c,i;(c=e.onCloseAutoFocus)==null||c.call(e,a),a.defaultPrevented||(n.current||(i=r.triggerRef.current)==null||i.focus(),a.preventDefault()),n.current=!1,o.current=!1},onInteractOutside:a=>{var p,u;(p=e.onInteractOutside)==null||p.call(e,a),a.defaultPrevented||(n.current=!0,a.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const c=a.target;((u=r.triggerRef.current)==null?void 0:u.contains(c))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&o.current&&a.preventDefault()}})}),I=s.forwardRef((e,t)=>{const{__scopePopover:r,trapFocus:n,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:c,onEscapeKeyDown:i,onPointerDownOutside:p,onFocusOutside:u,onInteractOutside:P,...f}=e,v=d(g,r),x=m(r);return B(),l.jsx(K,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:o,onUnmountAutoFocus:a,children:l.jsx(Z,{asChild:!0,disableOutsidePointerEvents:c,onInteractOutside:P,onEscapeKeyDown:i,onPointerDownOutside:p,onFocusOutside:u,onDismiss:()=>v.onOpenChange(!1),children:l.jsx(U,{"data-state":M(v.open),role:"dialog",id:v.contentId,...x,...f,ref:t,style:{...f.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)"}})})})}),T="PopoverClose",ue=s.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=d(T,r);return l.jsx(O.button,{type:"button",...n,ref:t,onClick:h(e.onClick,()=>o.onOpenChange(!1))})});ue.displayName=T;var de="PopoverArrow",fe=s.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=m(r);return l.jsx(J,{...o,...n,ref:t})});fe.displayName=de;function M(e){return e?"open":"closed"}var ve=j,Pe=N,ge=F,k=D;const Ce=ve,xe=Pe,he=s.forwardRef(({className:e,align:t="center",sideOffset:r=4,...n},o)=>l.jsx(ge,{children:l.jsx(k,{ref:o,align:t,sideOffset:r,className:Q("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",e),...n})}));he.displayName=k.displayName;export{Ce as P,xe as a,he as b}; diff --git a/assets/refresh-cw-B16d_5-C.js b/assets/refresh-cw-Dg-Q2M4w.js similarity index 94% rename from assets/refresh-cw-B16d_5-C.js rename to assets/refresh-cw-Dg-Q2M4w.js index ddfb7a7d636467f4f5a8ab804c77af123d704598..2aa780634dd83bb98a12e0297bacaf372e6040c0 100644 --- a/assets/refresh-cw-B16d_5-C.js +++ b/assets/refresh-cw-Dg-Q2M4w.js @@ -1,4 +1,4 @@ -import{g as e}from"./index-CnBotBa4.js";/** +import{g as e}from"./index-hxawG6mk.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/research-DhkAyrPi.js b/assets/research-25A5rLuK.js similarity index 89% rename from assets/research-DhkAyrPi.js rename to assets/research-25A5rLuK.js index 83fbfdc75365901ae677e9a39c2686ac5da7fef4..8208962418c55bf218d47316de9075a888ed4055 100644 --- a/assets/research-DhkAyrPi.js +++ b/assets/research-25A5rLuK.js @@ -1 +1 @@ -import{a4 as s}from"./index-CnBotBa4.js";const r={follows:()=>s("/me/follows"),setFollow:(t,e,a)=>s(`/me/follows/${t}/${e}`,{method:a?"PUT":"DELETE"}),following:(t=0,e={})=>{const a=new URLSearchParams({offset:String(t),limit:"40"});return e.startDate&&a.set("start_date",e.startDate),e.endDate&&a.set("end_date",e.endDate),!e.startDate&&!e.endDate&&a.set("all_time","true"),e.hasCode&&a.set("has_code","true"),e.hasHfArtifacts&&a.set("has_hf_artifacts","true"),s(`/me/following?${a}`)},email:()=>s("/me/research-email"),setEmail:t=>s("/me/research-email",{method:"PUT",body:JSON.stringify({enabled:t})})};export{r}; +import{a4 as s}from"./index-hxawG6mk.js";const r={follows:()=>s("/me/follows"),setFollow:(t,e,a)=>s(`/me/follows/${t}/${e}`,{method:a?"PUT":"DELETE"}),following:(t=0,e={})=>{const a=new URLSearchParams({offset:String(t),limit:"40"});return e.startDate&&a.set("start_date",e.startDate),e.endDate&&a.set("end_date",e.endDate),!e.startDate&&!e.endDate&&a.set("all_time","true"),e.hasCode&&a.set("has_code","true"),e.hasHfArtifacts&&a.set("has_hf_artifacts","true"),s(`/me/following?${a}`)},email:()=>s("/me/research-email"),setEmail:t=>s("/me/research-email",{method:"PUT",body:JSON.stringify({enabled:t})})};export{r}; diff --git a/assets/savedPapersAuth-C_nw2twk.js b/assets/savedPapersAuth-BIdugktw.js similarity index 85% rename from assets/savedPapersAuth-C_nw2twk.js rename to assets/savedPapersAuth-BIdugktw.js index ca4edf3a5d26383ac7b24f663281e19d3eaa0fef..ddbfd503394f57b7359e7d1dda59962cfc33f95b 100644 --- a/assets/savedPapersAuth-C_nw2twk.js +++ b/assets/savedPapersAuth-BIdugktw.js @@ -1 +1 @@ -import{E as i}from"./index-CnBotBa4.js";const s="saved_papers_authorized";function u(n=!1){const r=i("/api/v1/auth/hf/login"),o=new URL(r,window.location.origin).origin,t=new URL(window.location.href);n&&t.searchParams.set(s,"1");const a=o===window.location.origin?`${t.pathname}${t.search}${t.hash}`:t.toString(),e=new URLSearchParams({return_to:a,authorize_bucket:"true",bucket_create:"true"});return`${r}?${e.toString()}`}export{s as S,u as s}; +import{E as i}from"./index-hxawG6mk.js";const s="saved_papers_authorized";function u(n=!1){const r=i("/api/v1/auth/hf/login"),o=new URL(r,window.location.origin).origin,t=new URL(window.location.href);n&&t.searchParams.set(s,"1");const a=o===window.location.origin?`${t.pathname}${t.search}${t.hash}`:t.toString(),e=new URLSearchParams({return_to:a,authorize_bucket:"true",bucket_create:"true"});return`${r}?${e.toString()}`}export{s as S,u as s}; diff --git a/assets/searchable-select-Dky9Eonk.js b/assets/searchable-select-cLm40hhL.js similarity index 98% rename from assets/searchable-select-Dky9Eonk.js rename to assets/searchable-select-cLm40hhL.js index a33d7aead4dda2bd7fbb3237d4eee7c3bb80e29e..595d00d405bbd6da87035d0db381a804f04a503a 100644 --- a/assets/searchable-select-Dky9Eonk.js +++ b/assets/searchable-select-cLm40hhL.js @@ -1,4 +1,4 @@ -import{g as he,r as a,a1 as Q,p as L,a7 as Me,a8 as De,a9 as $e,aa as Le,ab as H,j as p,x as D,l as Pe}from"./index-CnBotBa4.js";import{u as Fe}from"./useQuery-C8pfCInN.js";import{B as qe}from"./button-DNii_czO.js";import{P as Ke,a as Ve,b as Be}from"./popover-BvojInsz.js";import"./dialog-mXYRHqz9.js";import{L as Ue}from"./loader-circle-zwM3ton0.js";/** +import{g as he,r as a,a1 as Q,p as L,a7 as Me,a8 as De,a9 as $e,aa as Le,ab as H,j as p,x as D,l as Pe}from"./index-hxawG6mk.js";import{u as Fe}from"./useQuery-B7vCF2Os.js";import{B as qe}from"./button-DR59q2Iu.js";import{P as Ke,a as Ve,b as Be}from"./popover-BEdoEHfx.js";import"./dialog-D2TDqr0v.js";import{L as Ue}from"./loader-circle-CXb3415J.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/shield-alert-B-esZpK3.js b/assets/shield-alert-DrzIR1qR.js similarity index 91% rename from assets/shield-alert-B-esZpK3.js rename to assets/shield-alert-DrzIR1qR.js index 982cce4cbffb673fa6a91d616fb580f51b062c53..0c9be6c3aeba840a181907c532860db8928dde2c 100644 --- a/assets/shield-alert-B-esZpK3.js +++ b/assets/shield-alert-DrzIR1qR.js @@ -1,4 +1,4 @@ -import{g as e}from"./index-CnBotBa4.js";/** +import{g as e}from"./index-hxawG6mk.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/skeleton-DuOQBmSr.js b/assets/skeleton-CRfsRMNe.js similarity index 62% rename from assets/skeleton-DuOQBmSr.js rename to assets/skeleton-CRfsRMNe.js index ff955258e886e16c94be321b9f275845bc3013a6..dfd70a3dc9a6cda52876fab5368c2621af7823c0 100644 --- a/assets/skeleton-DuOQBmSr.js +++ b/assets/skeleton-CRfsRMNe.js @@ -1 +1 @@ -import{j as t,x as n}from"./index-CnBotBa4.js";function m({className:e,...s}){return t.jsx("div",{className:n("animate-pulse rounded-md bg-muted",e),...s})}export{m as S}; +import{j as t,x as n}from"./index-hxawG6mk.js";function m({className:e,...s}){return t.jsx("div",{className:n("animate-pulse rounded-md bg-muted",e),...s})}export{m as S}; diff --git a/assets/submissions-BXysTHzU.js b/assets/submissions-DgbzmxlX.js similarity index 99% rename from assets/submissions-BXysTHzU.js rename to assets/submissions-DgbzmxlX.js index 2645d320e858e752eacd6571b46b40633c806c21..10faeb7f5c64d5acff616679bc9afa634d5c7e56 100644 --- a/assets/submissions-BXysTHzU.js +++ b/assets/submissions-DgbzmxlX.js @@ -1 +1 @@ -import{a4 as qe}from"./index-CnBotBa4.js";var v;(function(s){s.assertEqual=n=>{};function e(n){}s.assertIs=e;function t(n){throw new Error}s.assertNever=t,s.arrayToEnum=n=>{const a={};for(const i of n)a[i]=i;return a},s.getValidEnumValues=n=>{const a=s.objectKeys(n).filter(o=>typeof n[n[o]]!="number"),i={};for(const o of a)i[o]=n[o];return s.objectValues(i)},s.objectValues=n=>s.objectKeys(n).map(function(a){return n[a]}),s.objectKeys=typeof Object.keys=="function"?n=>Object.keys(n):n=>{const a=[];for(const i in n)Object.prototype.hasOwnProperty.call(n,i)&&a.push(i);return a},s.find=(n,a)=>{for(const i of n)if(a(i))return i},s.isInteger=typeof Number.isInteger=="function"?n=>Number.isInteger(n):n=>typeof n=="number"&&Number.isFinite(n)&&Math.floor(n)===n;function r(n,a=" | "){return n.map(i=>typeof i=="string"?`'${i}'`:i).join(a)}s.joinValues=r,s.jsonStringifyReplacer=(n,a)=>typeof a=="bigint"?a.toString():a})(v||(v={}));var Te;(function(s){s.mergeShapes=(e,t)=>({...e,...t})})(Te||(Te={}));const u=v.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),$=s=>{switch(typeof s){case"undefined":return u.undefined;case"string":return u.string;case"number":return Number.isNaN(s)?u.nan:u.number;case"boolean":return u.boolean;case"function":return u.function;case"bigint":return u.bigint;case"symbol":return u.symbol;case"object":return Array.isArray(s)?u.array:s===null?u.null:s.then&&typeof s.then=="function"&&s.catch&&typeof s.catch=="function"?u.promise:typeof Map<"u"&&s instanceof Map?u.map:typeof Set<"u"&&s instanceof Set?u.set:typeof Date<"u"&&s instanceof Date?u.date:u.object;default:return u.unknown}},d=v.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class I extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}format(e){const t=e||function(a){return a.message},r={_errors:[]},n=a=>{for(const i of a.issues)if(i.code==="invalid_union")i.unionErrors.map(n);else if(i.code==="invalid_return_type")n(i.returnTypeError);else if(i.code==="invalid_arguments")n(i.argumentsError);else if(i.path.length===0)r._errors.push(t(i));else{let o=r,f=0;for(;ft.message){const t={},r=[];for(const n of this.issues)if(n.path.length>0){const a=n.path[0];t[a]=t[a]||[],t[a].push(e(n))}else r.push(e(n));return{formErrors:r,fieldErrors:t}}get formErrors(){return this.flatten()}}I.create=s=>new I(s);const ue=(s,e)=>{let t;switch(s.code){case d.invalid_type:s.received===u.undefined?t="Required":t=`Expected ${s.expected}, received ${s.received}`;break;case d.invalid_literal:t=`Invalid literal value, expected ${JSON.stringify(s.expected,v.jsonStringifyReplacer)}`;break;case d.unrecognized_keys:t=`Unrecognized key(s) in object: ${v.joinValues(s.keys,", ")}`;break;case d.invalid_union:t="Invalid input";break;case d.invalid_union_discriminator:t=`Invalid discriminator value. Expected ${v.joinValues(s.options)}`;break;case d.invalid_enum_value:t=`Invalid enum value. Expected ${v.joinValues(s.options)}, received '${s.received}'`;break;case d.invalid_arguments:t="Invalid function arguments";break;case d.invalid_return_type:t="Invalid function return type";break;case d.invalid_date:t="Invalid date";break;case d.invalid_string:typeof s.validation=="object"?"includes"in s.validation?(t=`Invalid input: must include "${s.validation.includes}"`,typeof s.validation.position=="number"&&(t=`${t} at one or more positions greater than or equal to ${s.validation.position}`)):"startsWith"in s.validation?t=`Invalid input: must start with "${s.validation.startsWith}"`:"endsWith"in s.validation?t=`Invalid input: must end with "${s.validation.endsWith}"`:v.assertNever(s.validation):s.validation!=="regex"?t=`Invalid ${s.validation}`:t="Invalid";break;case d.too_small:s.type==="array"?t=`Array must contain ${s.exact?"exactly":s.inclusive?"at least":"more than"} ${s.minimum} element(s)`:s.type==="string"?t=`String must contain ${s.exact?"exactly":s.inclusive?"at least":"over"} ${s.minimum} character(s)`:s.type==="number"?t=`Number must be ${s.exact?"exactly equal to ":s.inclusive?"greater than or equal to ":"greater than "}${s.minimum}`:s.type==="bigint"?t=`Number must be ${s.exact?"exactly equal to ":s.inclusive?"greater than or equal to ":"greater than "}${s.minimum}`:s.type==="date"?t=`Date must be ${s.exact?"exactly equal to ":s.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(s.minimum))}`:t="Invalid input";break;case d.too_big:s.type==="array"?t=`Array must contain ${s.exact?"exactly":s.inclusive?"at most":"less than"} ${s.maximum} element(s)`:s.type==="string"?t=`String must contain ${s.exact?"exactly":s.inclusive?"at most":"under"} ${s.maximum} character(s)`:s.type==="number"?t=`Number must be ${s.exact?"exactly":s.inclusive?"less than or equal to":"less than"} ${s.maximum}`:s.type==="bigint"?t=`BigInt must be ${s.exact?"exactly":s.inclusive?"less than or equal to":"less than"} ${s.maximum}`:s.type==="date"?t=`Date must be ${s.exact?"exactly":s.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(s.maximum))}`:t="Invalid input";break;case d.custom:t="Invalid input";break;case d.invalid_intersection_types:t="Intersection results could not be merged";break;case d.not_multiple_of:t=`Number must be a multiple of ${s.multipleOf}`;break;case d.not_finite:t="Number must be finite";break;default:t=e.defaultError,v.assertNever(s)}return{message:t}};let Fe=ue;function We(){return Fe}const Je=s=>{const{data:e,path:t,errorMaps:r,issueData:n}=s,a=[...t,...n.path||[]],i={...n,path:a};if(n.message!==void 0)return{...n,path:a,message:n.message};let o="";const f=r.filter(p=>!!p).slice().reverse();for(const p of f)o=p(i,{data:e,defaultError:o}).message;return{...n,path:a,message:o}};function c(s,e){const t=We(),r=Je({issueData:e,data:s.data,path:s.path,errorMaps:[s.common.contextualErrorMap,s.schemaErrorMap,t,t===ue?void 0:ue].filter(n=>!!n)});s.common.issues.push(r)}class C{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,t){const r=[];for(const n of t){if(n.status==="aborted")return m;n.status==="dirty"&&e.dirty(),r.push(n.value)}return{status:e.value,value:r}}static async mergeObjectAsync(e,t){const r=[];for(const n of t){const a=await n.key,i=await n.value;r.push({key:a,value:i})}return C.mergeObjectSync(e,r)}static mergeObjectSync(e,t){const r={};for(const n of t){const{key:a,value:i}=n;if(a.status==="aborted"||i.status==="aborted")return m;a.status==="dirty"&&e.dirty(),i.status==="dirty"&&e.dirty(),a.value!=="__proto__"&&(typeof i.value<"u"||n.alwaysSet)&&(r[a.value]=i.value)}return{status:e.value,value:r}}}const m=Object.freeze({status:"aborted"}),W=s=>({status:"dirty",value:s}),O=s=>({status:"valid",value:s}),Se=s=>s.status==="aborted",Ce=s=>s.status==="dirty",U=s=>s.status==="valid",Q=s=>typeof Promise<"u"&&s instanceof Promise;var h;(function(s){s.errToObj=e=>typeof e=="string"?{message:e}:e||{},s.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(h||(h={}));class Z{constructor(e,t,r,n){this._cachedPath=[],this.parent=e,this.data=t,this._path=r,this._key=n}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const Oe=(s,e)=>{if(U(e))return{success:!0,data:e.value};if(!s.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const t=new I(s.common.issues);return this._error=t,this._error}}};function y(s){if(!s)return{};const{errorMap:e,invalid_type_error:t,required_error:r,description:n}=s;if(e&&(t||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:n}:{errorMap:(i,o)=>{const{message:f}=s;return i.code==="invalid_enum_value"?{message:f??o.defaultError}:typeof o.data>"u"?{message:f??r??o.defaultError}:i.code!=="invalid_type"?{message:o.defaultError}:{message:f??t??o.defaultError}},description:n}}class g{get description(){return this._def.description}_getType(e){return $(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:$(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new C,ctx:{common:e.parent.common,data:e.data,parsedType:$(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(Q(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){const t=this._parse(e);return Promise.resolve(t)}parse(e,t){const r=this.safeParse(e,t);if(r.success)return r.data;throw r.error}safeParse(e,t){const r={common:{issues:[],async:(t==null?void 0:t.async)??!1,contextualErrorMap:t==null?void 0:t.errorMap},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:$(e)},n=this._parseSync({data:e,path:r.path,parent:r});return Oe(r,n)}"~validate"(e){var r,n;const t={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:$(e)};if(!this["~standard"].async)try{const a=this._parseSync({data:e,path:[],parent:t});return U(a)?{value:a.value}:{issues:t.common.issues}}catch(a){(n=(r=a==null?void 0:a.message)==null?void 0:r.toLowerCase())!=null&&n.includes("encountered")&&(this["~standard"].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then(a=>U(a)?{value:a.value}:{issues:t.common.issues})}async parseAsync(e,t){const r=await this.safeParseAsync(e,t);if(r.success)return r.data;throw r.error}async safeParseAsync(e,t){const r={common:{issues:[],contextualErrorMap:t==null?void 0:t.errorMap,async:!0},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:$(e)},n=this._parse({data:e,path:r.path,parent:r}),a=await(Q(n)?n:Promise.resolve(n));return Oe(r,a)}refine(e,t){const r=n=>typeof t=="string"||typeof t>"u"?{message:t}:typeof t=="function"?t(n):t;return this._refinement((n,a)=>{const i=e(n),o=()=>a.addIssue({code:d.custom,...r(n)});return typeof Promise<"u"&&i instanceof Promise?i.then(f=>f?!0:(o(),!1)):i?!0:(o(),!1)})}refinement(e,t){return this._refinement((r,n)=>e(r)?!0:(n.addIssue(typeof t=="function"?t(r,n):t),!1))}_refinement(e){return new z({schema:this,typeName:_.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:t=>this["~validate"](t)}}optional(){return j.create(this,this._def)}nullable(){return L.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return N.create(this)}promise(){return re.create(this,this._def)}or(e){return K.create([this,e],this._def)}and(e){return ee.create(this,e,this._def)}transform(e){return new z({...y(this._def),schema:this,typeName:_.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t=typeof e=="function"?e:()=>e;return new ne({...y(this._def),innerType:this,defaultValue:t,typeName:_.ZodDefault})}brand(){return new Me({typeName:_.ZodBranded,type:this,...y(this._def)})}catch(e){const t=typeof e=="function"?e:()=>e;return new ae({...y(this._def),innerType:this,catchValue:t,typeName:_.ZodCatch})}describe(e){const t=this.constructor;return new t({...this._def,description:e})}pipe(e){return ke.create(this,e)}readonly(){return ie.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const Ye=/^c[^\s-]{8,}$/i,He=/^[0-9a-z]+$/,Ge=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Qe=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,Xe=/^[a-z0-9_-]{21}$/i,Ke=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,et=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,tt=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,st="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let ce;const rt=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,nt=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,at=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,it=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,ot=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,dt=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Ie="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",ct=new RegExp(`^${Ie}$`);function $e(s){let e="[0-5]\\d";s.precision?e=`${e}\\.\\d{${s.precision}}`:s.precision==null&&(e=`${e}(\\.\\d+)?`);const t=s.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${t}`}function ut(s){return new RegExp(`^${$e(s)}$`)}function lt(s){let e=`${Ie}T${$e(s)}`;const t=[];return t.push(s.local?"Z?":"Z"),s.offset&&t.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${t.join("|")})`,new RegExp(`^${e}$`)}function ht(s,e){return!!((e==="v4"||!e)&&rt.test(s)||(e==="v6"||!e)&&at.test(s))}function ft(s,e){if(!Ke.test(s))return!1;try{const[t]=s.split(".");if(!t)return!1;const r=t.replace(/-/g,"+").replace(/_/g,"/").padEnd(t.length+(4-t.length%4)%4,"="),n=JSON.parse(atob(r));return!(typeof n!="object"||n===null||"typ"in n&&(n==null?void 0:n.typ)!=="JWT"||!n.alg||e&&n.alg!==e)}catch{return!1}}function pt(s,e){return!!((e==="v4"||!e)&&nt.test(s)||(e==="v6"||!e)&&it.test(s))}class R extends g{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==u.string){const a=this._getOrReturnCtx(e);return c(a,{code:d.invalid_type,expected:u.string,received:a.parsedType}),m}const r=new C;let n;for(const a of this._def.checks)if(a.kind==="min")e.data.lengtha.value&&(n=this._getOrReturnCtx(e,n),c(n,{code:d.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),r.dirty());else if(a.kind==="length"){const i=e.data.length>a.value,o=e.data.lengthe.test(n),{validation:t,code:d.invalid_string,...h.errToObj(r)})}_addCheck(e){return new R({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...h.errToObj(e)})}url(e){return this._addCheck({kind:"url",...h.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...h.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...h.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...h.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...h.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...h.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...h.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...h.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...h.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...h.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...h.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...h.errToObj(e)})}datetime(e){return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,offset:(e==null?void 0:e.offset)??!1,local:(e==null?void 0:e.local)??!1,...h.errToObj(e==null?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,...h.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...h.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...h.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t==null?void 0:t.position,...h.errToObj(t==null?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...h.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...h.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...h.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...h.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...h.errToObj(t)})}nonempty(e){return this.min(1,h.errToObj(e))}trim(){return new R({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new R({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new R({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.valuenew R({checks:[],typeName:_.ZodString,coerce:(s==null?void 0:s.coerce)??!1,...y(s)});function mt(s,e){const t=(s.toString().split(".")[1]||"").length,r=(e.toString().split(".")[1]||"").length,n=t>r?t:r,a=Number.parseInt(s.toFixed(n).replace(".","")),i=Number.parseInt(e.toFixed(n).replace(".",""));return a%i/10**n}class B extends g{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==u.number){const a=this._getOrReturnCtx(e);return c(a,{code:d.invalid_type,expected:u.number,received:a.parsedType}),m}let r;const n=new C;for(const a of this._def.checks)a.kind==="int"?v.isInteger(e.data)||(r=this._getOrReturnCtx(e,r),c(r,{code:d.invalid_type,expected:"integer",received:"float",message:a.message}),n.dirty()):a.kind==="min"?(a.inclusive?e.dataa.value:e.data>=a.value)&&(r=this._getOrReturnCtx(e,r),c(r,{code:d.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),n.dirty()):a.kind==="multipleOf"?mt(e.data,a.value)!==0&&(r=this._getOrReturnCtx(e,r),c(r,{code:d.not_multiple_of,multipleOf:a.value,message:a.message}),n.dirty()):a.kind==="finite"?Number.isFinite(e.data)||(r=this._getOrReturnCtx(e,r),c(r,{code:d.not_finite,message:a.message}),n.dirty()):v.assertNever(a);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,h.toString(t))}gt(e,t){return this.setLimit("min",e,!1,h.toString(t))}lte(e,t){return this.setLimit("max",e,!0,h.toString(t))}lt(e,t){return this.setLimit("max",e,!1,h.toString(t))}setLimit(e,t,r,n){return new B({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:h.toString(n)}]})}_addCheck(e){return new B({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:h.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:h.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:h.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:h.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:h.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:h.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:h.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:h.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:h.toString(e)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.valuee.kind==="int"||e.kind==="multipleOf"&&v.isInteger(e.value))}get isFinite(){let e=null,t=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(t===null||r.value>t)&&(t=r.value):r.kind==="max"&&(e===null||r.valuenew B({checks:[],typeName:_.ZodNumber,coerce:(s==null?void 0:s.coerce)||!1,...y(s)});class J extends g{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==u.bigint)return this._getInvalidInput(e);let r;const n=new C;for(const a of this._def.checks)a.kind==="min"?(a.inclusive?e.dataa.value:e.data>=a.value)&&(r=this._getOrReturnCtx(e,r),c(r,{code:d.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),n.dirty()):a.kind==="multipleOf"?e.data%a.value!==BigInt(0)&&(r=this._getOrReturnCtx(e,r),c(r,{code:d.not_multiple_of,multipleOf:a.value,message:a.message}),n.dirty()):v.assertNever(a);return{status:n.value,value:e.data}}_getInvalidInput(e){const t=this._getOrReturnCtx(e);return c(t,{code:d.invalid_type,expected:u.bigint,received:t.parsedType}),m}gte(e,t){return this.setLimit("min",e,!0,h.toString(t))}gt(e,t){return this.setLimit("min",e,!1,h.toString(t))}lte(e,t){return this.setLimit("max",e,!0,h.toString(t))}lt(e,t){return this.setLimit("max",e,!1,h.toString(t))}setLimit(e,t,r,n){return new J({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:h.toString(n)}]})}_addCheck(e){return new J({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:h.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:h.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:h.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:h.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:h.toString(t)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.valuenew J({checks:[],typeName:_.ZodBigInt,coerce:(s==null?void 0:s.coerce)??!1,...y(s)});class le extends g{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==u.boolean){const r=this._getOrReturnCtx(e);return c(r,{code:d.invalid_type,expected:u.boolean,received:r.parsedType}),m}return O(e.data)}}le.create=s=>new le({typeName:_.ZodBoolean,coerce:(s==null?void 0:s.coerce)||!1,...y(s)});class X extends g{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==u.date){const a=this._getOrReturnCtx(e);return c(a,{code:d.invalid_type,expected:u.date,received:a.parsedType}),m}if(Number.isNaN(e.data.getTime())){const a=this._getOrReturnCtx(e);return c(a,{code:d.invalid_date}),m}const r=new C;let n;for(const a of this._def.checks)a.kind==="min"?e.data.getTime()a.value&&(n=this._getOrReturnCtx(e,n),c(n,{code:d.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),r.dirty()):v.assertNever(a);return{status:r.value,value:new Date(e.data.getTime())}}_addCheck(e){return new X({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:h.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:h.toString(t)})}get minDate(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.valuenew X({checks:[],coerce:(s==null?void 0:s.coerce)||!1,typeName:_.ZodDate,...y(s)});class Ne extends g{_parse(e){if(this._getType(e)!==u.symbol){const r=this._getOrReturnCtx(e);return c(r,{code:d.invalid_type,expected:u.symbol,received:r.parsedType}),m}return O(e.data)}}Ne.create=s=>new Ne({typeName:_.ZodSymbol,...y(s)});class he extends g{_parse(e){if(this._getType(e)!==u.undefined){const r=this._getOrReturnCtx(e);return c(r,{code:d.invalid_type,expected:u.undefined,received:r.parsedType}),m}return O(e.data)}}he.create=s=>new he({typeName:_.ZodUndefined,...y(s)});class fe extends g{_parse(e){if(this._getType(e)!==u.null){const r=this._getOrReturnCtx(e);return c(r,{code:d.invalid_type,expected:u.null,received:r.parsedType}),m}return O(e.data)}}fe.create=s=>new fe({typeName:_.ZodNull,...y(s)});class Ae extends g{constructor(){super(...arguments),this._any=!0}_parse(e){return O(e.data)}}Ae.create=s=>new Ae({typeName:_.ZodAny,...y(s)});class pe extends g{constructor(){super(...arguments),this._unknown=!0}_parse(e){return O(e.data)}}pe.create=s=>new pe({typeName:_.ZodUnknown,...y(s)});class P extends g{_parse(e){const t=this._getOrReturnCtx(e);return c(t,{code:d.invalid_type,expected:u.never,received:t.parsedType}),m}}P.create=s=>new P({typeName:_.ZodNever,...y(s)});class Ze extends g{_parse(e){if(this._getType(e)!==u.undefined){const r=this._getOrReturnCtx(e);return c(r,{code:d.invalid_type,expected:u.void,received:r.parsedType}),m}return O(e.data)}}Ze.create=s=>new Ze({typeName:_.ZodVoid,...y(s)});class N extends g{_parse(e){const{ctx:t,status:r}=this._processInputParams(e),n=this._def;if(t.parsedType!==u.array)return c(t,{code:d.invalid_type,expected:u.array,received:t.parsedType}),m;if(n.exactLength!==null){const i=t.data.length>n.exactLength.value,o=t.data.lengthn.maxLength.value&&(c(t,{code:d.too_big,maximum:n.maxLength.value,type:"array",inclusive:!0,exact:!1,message:n.maxLength.message}),r.dirty()),t.common.async)return Promise.all([...t.data].map((i,o)=>n.type._parseAsync(new Z(t,i,t.path,o)))).then(i=>C.mergeArray(r,i));const a=[...t.data].map((i,o)=>n.type._parseSync(new Z(t,i,t.path,o)));return C.mergeArray(r,a)}get element(){return this._def.type}min(e,t){return new N({...this._def,minLength:{value:e,message:h.toString(t)}})}max(e,t){return new N({...this._def,maxLength:{value:e,message:h.toString(t)}})}length(e,t){return new N({...this._def,exactLength:{value:e,message:h.toString(t)}})}nonempty(e){return this.min(1,e)}}N.create=(s,e)=>new N({type:s,minLength:null,maxLength:null,exactLength:null,typeName:_.ZodArray,...y(e)});function D(s){if(s instanceof w){const e={};for(const t in s.shape){const r=s.shape[t];e[t]=j.create(D(r))}return new w({...s._def,shape:()=>e})}else return s instanceof N?new N({...s._def,type:D(s.element)}):s instanceof j?j.create(D(s.unwrap())):s instanceof L?L.create(D(s.unwrap())):s instanceof M?M.create(s.items.map(e=>D(e))):s}class w extends g{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),t=v.objectKeys(e);return this._cached={shape:e,keys:t},this._cached}_parse(e){if(this._getType(e)!==u.object){const p=this._getOrReturnCtx(e);return c(p,{code:d.invalid_type,expected:u.object,received:p.parsedType}),m}const{status:r,ctx:n}=this._processInputParams(e),{shape:a,keys:i}=this._getCached(),o=[];if(!(this._def.catchall instanceof P&&this._def.unknownKeys==="strip"))for(const p in n.data)i.includes(p)||o.push(p);const f=[];for(const p of i){const x=a[p],F=n.data[p];f.push({key:{status:"valid",value:p},value:x._parse(new Z(n,F,n.path,p)),alwaysSet:p in n.data})}if(this._def.catchall instanceof P){const p=this._def.unknownKeys;if(p==="passthrough")for(const x of o)f.push({key:{status:"valid",value:x},value:{status:"valid",value:n.data[x]}});else if(p==="strict")o.length>0&&(c(n,{code:d.unrecognized_keys,keys:o}),r.dirty());else if(p!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const p=this._def.catchall;for(const x of o){const F=n.data[x];f.push({key:{status:"valid",value:x},value:p._parse(new Z(n,F,n.path,x)),alwaysSet:x in n.data})}}return n.common.async?Promise.resolve().then(async()=>{const p=[];for(const x of f){const F=await x.key,Be=await x.value;p.push({key:F,value:Be,alwaysSet:x.alwaysSet})}return p}).then(p=>C.mergeObjectSync(r,p)):C.mergeObjectSync(r,f)}get shape(){return this._def.shape()}strict(e){return h.errToObj,new w({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(t,r)=>{var a,i;const n=((i=(a=this._def).errorMap)==null?void 0:i.call(a,t,r).message)??r.defaultError;return t.code==="unrecognized_keys"?{message:h.errToObj(e).message??n}:{message:n}}}:{}})}strip(){return new w({...this._def,unknownKeys:"strip"})}passthrough(){return new w({...this._def,unknownKeys:"passthrough"})}extend(e){return new w({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new w({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:_.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new w({...this._def,catchall:e})}pick(e){const t={};for(const r of v.objectKeys(e))e[r]&&this.shape[r]&&(t[r]=this.shape[r]);return new w({...this._def,shape:()=>t})}omit(e){const t={};for(const r of v.objectKeys(this.shape))e[r]||(t[r]=this.shape[r]);return new w({...this._def,shape:()=>t})}deepPartial(){return D(this)}partial(e){const t={};for(const r of v.objectKeys(this.shape)){const n=this.shape[r];e&&!e[r]?t[r]=n:t[r]=n.optional()}return new w({...this._def,shape:()=>t})}required(e){const t={};for(const r of v.objectKeys(this.shape))if(e&&!e[r])t[r]=this.shape[r];else{let a=this.shape[r];for(;a instanceof j;)a=a._def.innerType;t[r]=a}return new w({...this._def,shape:()=>t})}keyof(){return Pe(v.objectKeys(this.shape))}}w.create=(s,e)=>new w({shape:()=>s,unknownKeys:"strip",catchall:P.create(),typeName:_.ZodObject,...y(e)});w.strictCreate=(s,e)=>new w({shape:()=>s,unknownKeys:"strict",catchall:P.create(),typeName:_.ZodObject,...y(e)});w.lazycreate=(s,e)=>new w({shape:s,unknownKeys:"strip",catchall:P.create(),typeName:_.ZodObject,...y(e)});class K extends g{_parse(e){const{ctx:t}=this._processInputParams(e),r=this._def.options;function n(a){for(const o of a)if(o.result.status==="valid")return o.result;for(const o of a)if(o.result.status==="dirty")return t.common.issues.push(...o.ctx.common.issues),o.result;const i=a.map(o=>new I(o.ctx.common.issues));return c(t,{code:d.invalid_union,unionErrors:i}),m}if(t.common.async)return Promise.all(r.map(async a=>{const i={...t,common:{...t.common,issues:[]},parent:null};return{result:await a._parseAsync({data:t.data,path:t.path,parent:i}),ctx:i}})).then(n);{let a;const i=[];for(const f of r){const p={...t,common:{...t.common,issues:[]},parent:null},x=f._parseSync({data:t.data,path:t.path,parent:p});if(x.status==="valid")return x;x.status==="dirty"&&!a&&(a={result:x,ctx:p}),p.common.issues.length&&i.push(p.common.issues)}if(a)return t.common.issues.push(...a.ctx.common.issues),a.result;const o=i.map(f=>new I(f));return c(t,{code:d.invalid_union,unionErrors:o}),m}}get options(){return this._def.options}}K.create=(s,e)=>new K({options:s,typeName:_.ZodUnion,...y(e)});const E=s=>s instanceof _e?E(s.schema):s instanceof z?E(s.innerType()):s instanceof se?[s.value]:s instanceof V?s.options:s instanceof ye?v.objectValues(s.enum):s instanceof ne?E(s._def.innerType):s instanceof he?[void 0]:s instanceof fe?[null]:s instanceof j?[void 0,...E(s.unwrap())]:s instanceof L?[null,...E(s.unwrap())]:s instanceof Me||s instanceof ie?E(s.unwrap()):s instanceof ae?E(s._def.innerType):[];class xe extends g{_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==u.object)return c(t,{code:d.invalid_type,expected:u.object,received:t.parsedType}),m;const r=this.discriminator,n=t.data[r],a=this.optionsMap.get(n);return a?t.common.async?a._parseAsync({data:t.data,path:t.path,parent:t}):a._parseSync({data:t.data,path:t.path,parent:t}):(c(t,{code:d.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),m)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,r){const n=new Map;for(const a of t){const i=E(a.shape[e]);if(!i.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const o of i){if(n.has(o))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(o)}`);n.set(o,a)}}return new xe({typeName:_.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:n,...y(r)})}}function me(s,e){const t=$(s),r=$(e);if(s===e)return{valid:!0,data:s};if(t===u.object&&r===u.object){const n=v.objectKeys(e),a=v.objectKeys(s).filter(o=>n.indexOf(o)!==-1),i={...s,...e};for(const o of a){const f=me(s[o],e[o]);if(!f.valid)return{valid:!1};i[o]=f.data}return{valid:!0,data:i}}else if(t===u.array&&r===u.array){if(s.length!==e.length)return{valid:!1};const n=[];for(let a=0;a{if(Se(a)||Se(i))return m;const o=me(a.value,i.value);return o.valid?((Ce(a)||Ce(i))&&t.dirty(),{status:t.value,value:o.data}):(c(r,{code:d.invalid_intersection_types}),m)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([a,i])=>n(a,i)):n(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}ee.create=(s,e,t)=>new ee({left:s,right:e,typeName:_.ZodIntersection,...y(t)});class M extends g{_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==u.array)return c(r,{code:d.invalid_type,expected:u.array,received:r.parsedType}),m;if(r.data.lengththis._def.items.length&&(c(r,{code:d.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const a=[...r.data].map((i,o)=>{const f=this._def.items[o]||this._def.rest;return f?f._parse(new Z(r,i,r.path,o)):null}).filter(i=>!!i);return r.common.async?Promise.all(a).then(i=>C.mergeArray(t,i)):C.mergeArray(t,a)}get items(){return this._def.items}rest(e){return new M({...this._def,rest:e})}}M.create=(s,e)=>{if(!Array.isArray(s))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new M({items:s,typeName:_.ZodTuple,rest:null,...y(e)})};class te extends g{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==u.object)return c(r,{code:d.invalid_type,expected:u.object,received:r.parsedType}),m;const n=[],a=this._def.keyType,i=this._def.valueType;for(const o in r.data)n.push({key:a._parse(new Z(r,o,r.path,o)),value:i._parse(new Z(r,r.data[o],r.path,o)),alwaysSet:o in r.data});return r.common.async?C.mergeObjectAsync(t,n):C.mergeObjectSync(t,n)}get element(){return this._def.valueType}static create(e,t,r){return t instanceof g?new te({keyType:e,valueType:t,typeName:_.ZodRecord,...y(r)}):new te({keyType:R.create(),valueType:e,typeName:_.ZodRecord,...y(t)})}}class Ee extends g{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==u.map)return c(r,{code:d.invalid_type,expected:u.map,received:r.parsedType}),m;const n=this._def.keyType,a=this._def.valueType,i=[...r.data.entries()].map(([o,f],p)=>({key:n._parse(new Z(r,o,r.path,[p,"key"])),value:a._parse(new Z(r,f,r.path,[p,"value"]))}));if(r.common.async){const o=new Map;return Promise.resolve().then(async()=>{for(const f of i){const p=await f.key,x=await f.value;if(p.status==="aborted"||x.status==="aborted")return m;(p.status==="dirty"||x.status==="dirty")&&t.dirty(),o.set(p.value,x.value)}return{status:t.value,value:o}})}else{const o=new Map;for(const f of i){const p=f.key,x=f.value;if(p.status==="aborted"||x.status==="aborted")return m;(p.status==="dirty"||x.status==="dirty")&&t.dirty(),o.set(p.value,x.value)}return{status:t.value,value:o}}}}Ee.create=(s,e,t)=>new Ee({valueType:e,keyType:s,typeName:_.ZodMap,...y(t)});class Y extends g{_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==u.set)return c(r,{code:d.invalid_type,expected:u.set,received:r.parsedType}),m;const n=this._def;n.minSize!==null&&r.data.sizen.maxSize.value&&(c(r,{code:d.too_big,maximum:n.maxSize.value,type:"set",inclusive:!0,exact:!1,message:n.maxSize.message}),t.dirty());const a=this._def.valueType;function i(f){const p=new Set;for(const x of f){if(x.status==="aborted")return m;x.status==="dirty"&&t.dirty(),p.add(x.value)}return{status:t.value,value:p}}const o=[...r.data.values()].map((f,p)=>a._parse(new Z(r,f,r.path,p)));return r.common.async?Promise.all(o).then(f=>i(f)):i(o)}min(e,t){return new Y({...this._def,minSize:{value:e,message:h.toString(t)}})}max(e,t){return new Y({...this._def,maxSize:{value:e,message:h.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}Y.create=(s,e)=>new Y({valueType:s,minSize:null,maxSize:null,typeName:_.ZodSet,...y(e)});class _e extends g{get schema(){return this._def.getter()}_parse(e){const{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}_e.create=(s,e)=>new _e({getter:s,typeName:_.ZodLazy,...y(e)});class se extends g{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return c(t,{received:t.data,code:d.invalid_literal,expected:this._def.value}),m}return{status:"valid",value:e.data}}get value(){return this._def.value}}se.create=(s,e)=>new se({value:s,typeName:_.ZodLiteral,...y(e)});function Pe(s,e){return new V({values:s,typeName:_.ZodEnum,...y(e)})}class V extends g{_parse(e){if(typeof e.data!="string"){const t=this._getOrReturnCtx(e),r=this._def.values;return c(t,{expected:v.joinValues(r),received:t.parsedType,code:d.invalid_type}),m}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){const t=this._getOrReturnCtx(e),r=this._def.values;return c(t,{received:t.data,code:d.invalid_enum_value,options:r}),m}return O(e.data)}get options(){return this._def.values}get enum(){const e={};for(const t of this._def.values)e[t]=t;return e}get Values(){const e={};for(const t of this._def.values)e[t]=t;return e}get Enum(){const e={};for(const t of this._def.values)e[t]=t;return e}extract(e,t=this._def){return V.create(e,{...this._def,...t})}exclude(e,t=this._def){return V.create(this.options.filter(r=>!e.includes(r)),{...this._def,...t})}}V.create=Pe;class ye extends g{_parse(e){const t=v.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(e);if(r.parsedType!==u.string&&r.parsedType!==u.number){const n=v.objectValues(t);return c(r,{expected:v.joinValues(n),received:r.parsedType,code:d.invalid_type}),m}if(this._cache||(this._cache=new Set(v.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){const n=v.objectValues(t);return c(r,{received:r.data,code:d.invalid_enum_value,options:n}),m}return O(e.data)}get enum(){return this._def.values}}ye.create=(s,e)=>new ye({values:s,typeName:_.ZodNativeEnum,...y(e)});class re extends g{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==u.promise&&t.common.async===!1)return c(t,{code:d.invalid_type,expected:u.promise,received:t.parsedType}),m;const r=t.parsedType===u.promise?t.data:Promise.resolve(t.data);return O(r.then(n=>this._def.type.parseAsync(n,{path:t.path,errorMap:t.common.contextualErrorMap})))}}re.create=(s,e)=>new re({type:s,typeName:_.ZodPromise,...y(e)});class z extends g{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===_.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:r}=this._processInputParams(e),n=this._def.effect||null,a={addIssue:i=>{c(r,i),i.fatal?t.abort():t.dirty()},get path(){return r.path}};if(a.addIssue=a.addIssue.bind(a),n.type==="preprocess"){const i=n.transform(r.data,a);if(r.common.async)return Promise.resolve(i).then(async o=>{if(t.value==="aborted")return m;const f=await this._def.schema._parseAsync({data:o,path:r.path,parent:r});return f.status==="aborted"?m:f.status==="dirty"||t.value==="dirty"?W(f.value):f});{if(t.value==="aborted")return m;const o=this._def.schema._parseSync({data:i,path:r.path,parent:r});return o.status==="aborted"?m:o.status==="dirty"||t.value==="dirty"?W(o.value):o}}if(n.type==="refinement"){const i=o=>{const f=n.refinement(o,a);if(r.common.async)return Promise.resolve(f);if(f instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return o};if(r.common.async===!1){const o=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?m:(o.status==="dirty"&&t.dirty(),i(o.value),{status:t.value,value:o.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(o=>o.status==="aborted"?m:(o.status==="dirty"&&t.dirty(),i(o.value).then(()=>({status:t.value,value:o.value}))))}if(n.type==="transform")if(r.common.async===!1){const i=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!U(i))return m;const o=n.transform(i.value,a);if(o instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:o}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(i=>U(i)?Promise.resolve(n.transform(i.value,a)).then(o=>({status:t.value,value:o})):m);v.assertNever(n)}}z.create=(s,e,t)=>new z({schema:s,typeName:_.ZodEffects,effect:e,...y(t)});z.createWithPreprocess=(s,e,t)=>new z({schema:e,effect:{type:"preprocess",transform:s},typeName:_.ZodEffects,...y(t)});class j extends g{_parse(e){return this._getType(e)===u.undefined?O(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}j.create=(s,e)=>new j({innerType:s,typeName:_.ZodOptional,...y(e)});class L extends g{_parse(e){return this._getType(e)===u.null?O(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}L.create=(s,e)=>new L({innerType:s,typeName:_.ZodNullable,...y(e)});class ne extends g{_parse(e){const{ctx:t}=this._processInputParams(e);let r=t.data;return t.parsedType===u.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}ne.create=(s,e)=>new ne({innerType:s,typeName:_.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...y(e)});class ae extends g{_parse(e){const{ctx:t}=this._processInputParams(e),r={...t,common:{...t.common,issues:[]}},n=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return Q(n)?n.then(a=>({status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new I(r.common.issues)},input:r.data})})):{status:"valid",value:n.status==="valid"?n.value:this._def.catchValue({get error(){return new I(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}ae.create=(s,e)=>new ae({innerType:s,typeName:_.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...y(e)});class Re extends g{_parse(e){if(this._getType(e)!==u.nan){const r=this._getOrReturnCtx(e);return c(r,{code:d.invalid_type,expected:u.nan,received:r.parsedType}),m}return{status:"valid",value:e.data}}}Re.create=s=>new Re({typeName:_.ZodNaN,...y(s)});class Me extends g{_parse(e){const{ctx:t}=this._processInputParams(e),r=t.data;return this._def.type._parse({data:r,path:t.path,parent:t})}unwrap(){return this._def.type}}class ke extends g{_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.common.async)return(async()=>{const a=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?m:a.status==="dirty"?(t.dirty(),W(a.value)):this._def.out._parseAsync({data:a.value,path:r.path,parent:r})})();{const n=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return n.status==="aborted"?m:n.status==="dirty"?(t.dirty(),{status:"dirty",value:n.value}):this._def.out._parseSync({data:n.value,path:r.path,parent:r})}}static create(e,t){return new ke({in:e,out:t,typeName:_.ZodPipeline})}}class ie extends g{_parse(e){const t=this._def.innerType._parse(e),r=n=>(U(n)&&(n.value=Object.freeze(n.value)),n);return Q(t)?t.then(n=>r(n)):r(t)}unwrap(){return this._def.innerType}}ie.create=(s,e)=>new ie({innerType:s,typeName:_.ZodReadonly,...y(e)});var _;(function(s){s.ZodString="ZodString",s.ZodNumber="ZodNumber",s.ZodNaN="ZodNaN",s.ZodBigInt="ZodBigInt",s.ZodBoolean="ZodBoolean",s.ZodDate="ZodDate",s.ZodSymbol="ZodSymbol",s.ZodUndefined="ZodUndefined",s.ZodNull="ZodNull",s.ZodAny="ZodAny",s.ZodUnknown="ZodUnknown",s.ZodNever="ZodNever",s.ZodVoid="ZodVoid",s.ZodArray="ZodArray",s.ZodObject="ZodObject",s.ZodUnion="ZodUnion",s.ZodDiscriminatedUnion="ZodDiscriminatedUnion",s.ZodIntersection="ZodIntersection",s.ZodTuple="ZodTuple",s.ZodRecord="ZodRecord",s.ZodMap="ZodMap",s.ZodSet="ZodSet",s.ZodFunction="ZodFunction",s.ZodLazy="ZodLazy",s.ZodLiteral="ZodLiteral",s.ZodEnum="ZodEnum",s.ZodEffects="ZodEffects",s.ZodNativeEnum="ZodNativeEnum",s.ZodOptional="ZodOptional",s.ZodNullable="ZodNullable",s.ZodDefault="ZodDefault",s.ZodCatch="ZodCatch",s.ZodPromise="ZodPromise",s.ZodBranded="ZodBranded",s.ZodPipeline="ZodPipeline",s.ZodReadonly="ZodReadonly"})(_||(_={}));const l=R.create,b=B.create,oe=le.create,_t=pe.create;P.create;const T=N.create,k=w.create,Ve=K.create,ze=xe.create;ee.create;M.create;const Le=te.create,G=se.create,ge=V.create;re.create;j.create;L.create;const A=Le(_t()),be=k({id:b(),name:l(),slug:l().optional()}).passthrough(),de=k({url:l(),is_official:oe()}),ve=k({task_id:b(),dataset_id:b(),model_name:l().nullish(),harness:l().nullish(),methodology:l().nullish(),metrics:Le(Ve([l(),b()])),uses_additional_data:oe().optional(),is_open:oe().optional(),best_rank:b().nullish(),best_metric:l().nullish(),evaluated_on:l().nullish(),external_source_url:l().nullish(),num_parameters:b().nullish(),hf_model_url:l().nullish()}).passthrough(),yt=ve.partial().extend({id:b().optional()}),gt=ze("op",[k({op:G("create"),data:ve}),k({op:G("update"),evaluation_id:b(),data:ve}),k({op:G("delete"),evaluation_id:b()})]),je=k({hf_models:T(l()),hf_datasets:T(l()),hf_spaces:T(l())}),we=k({file_name:l(),mime_type:l(),data_url:l().optional(),url:l().optional()}),q=k({name:l(),description:l().optional()}),vt=q.extend({image:we.optional(),image_credit:l().optional(),parent_id:b().optional(),area_id:b().optional(),keywords:l().optional()}),xt=q.extend({image:we.optional(),image_credit:l().optional(),source_paper_id:b().optional(),source_url:l().optional(),source_title:l().optional()}),kt=Ve([k({benchmark:l(),task:l(),description:l()}),q.extend({description:l(),task_ids:T(b()),full_name:l().optional(),url:l().optional(),hf_url:l().optional(),paper_url:l().optional(),license_name:l().optional(),license_url:l().optional()})]),bt=q.extend({description:l(),direction:ge(["higher_is_better","lower_is_better"]),full_name:l().optional(),scale:l().optional(),task_id:b(),dataset_id:b()}),wt=q.extend({short_name:l().optional(),venue:l().optional(),location:l().optional(),url:l(),year:b(),start_date:l().optional(),end_date:l().optional()}),Tt=q.extend({hf_slug:l().optional(),website_url:l().optional(),image:we.optional()}),St=k({id:b(),paper_id:b().nullable(),hf_username:l(),is_author:oe(),status:ge(["pending","approved","rejected"]),applied_payload:A.nullish(),conflict_payload:A.nullish(),result_entity_type:l().nullish(),result_entity_id:l().nullish(),admin_note:l().nullish(),user_review_reason:l().nullish(),reviewed_by:l().nullish(),reviewed_by_kind:ge(["human","codex"]).nullish(),review_evidence:A.nullish(),created_at:l(),updated_at:l(),reviewed_at:l().nullish()});function S(s,e,t){return St.extend({edit_type:G(s),proposed_payload:e,current_payload:t.nullish()})}const Ct=S("tasks",k({task_ids:T(b())}),k({tasks:T(be)})),Ot=S("methods",k({method_ids:T(b())}),k({methods:T(be)})),Nt=S("evaluations",k({operations:T(gt)}),k({evaluations:T(yt)})),At=S("repositories",k({repositories:T(de)}),k({repositories:T(de)})),Zt=S("project_pages",k({project_pages:T(de)}),k({project_pages:T(de)})),Et=S("source_url",k({source_url:l()}),k({source_url:l().nullish()})),Rt=S("hf_artifacts",je,je),jt=S("x_threads",k({x_threads:T(l())}),k({x_threads:T(k({url:l()}))})),It=S("organizations",k({organization_ids:T(b())}),k({organizations:T(be)})),$t=S("new_task",vt,A),Pt=S("new_method",xt,A),Mt=S("new_benchmark",kt,A),Vt=S("new_metric",bt,A),zt=S("new_conference",wt,A),Lt=S("new_organization",Tt,A),Dt=S("new_external_paper",k({title:l().optional(),source_url:l(),authors:T(l()),date_published:l().optional(),abstract:l().optional()}),A),De=ze("edit_type",[Ct,Ot,Nt,At,Zt,Et,Rt,jt,It,$t,Pt,Mt,Vt,zt,Lt,Dt]);function Jt(s,e,t){return{paper_id:s,edit_type:e,proposed_payload:t}}const Ut=k({count:b(),results:T(De)});class Bt extends Error{constructor(e){super(`Malformed pending-edit payload: ${e}`),this.name="PendingEditPayloadError"}}function Ue(s,e){const t=s.safeParse(e);if(t.success)return t.data;const r=t.error.issues[0];throw new Bt(`${(r==null?void 0:r.path.join("."))||"response"}: ${(r==null?void 0:r.message)||"invalid value"}`)}const H=s=>Ue(De,s),qt=s=>Ue(Ut,s);class Ft{constructor(e){this.request=e}async submit(e){return H(await this.request("/me/paper-edits",{method:"POST",body:JSON.stringify(e)}))}list(e){const t=new URLSearchParams;for(const[n,a]of Object.entries(e??{}))a!==void 0&&t.set(n,String(a));const r=t.toString();return this.request(`/admin/paper-edits${r?`?${r}`:""}`).then(qt)}async get(e){return H(await this.request(`/admin/paper-edits/${e}`))}async approve(e,t={}){return H(await this.request(`/admin/paper-edits/${e}/approve`,{method:"POST",body:JSON.stringify(t)}))}async reject(e,t={}){return H(await this.request(`/admin/paper-edits/${e}/reject`,{method:"POST",body:JSON.stringify(t)}))}}const Yt=new Ft(qe);export{Jt as p,Yt as s}; +import{a4 as qe}from"./index-hxawG6mk.js";var v;(function(s){s.assertEqual=n=>{};function e(n){}s.assertIs=e;function t(n){throw new Error}s.assertNever=t,s.arrayToEnum=n=>{const a={};for(const i of n)a[i]=i;return a},s.getValidEnumValues=n=>{const a=s.objectKeys(n).filter(o=>typeof n[n[o]]!="number"),i={};for(const o of a)i[o]=n[o];return s.objectValues(i)},s.objectValues=n=>s.objectKeys(n).map(function(a){return n[a]}),s.objectKeys=typeof Object.keys=="function"?n=>Object.keys(n):n=>{const a=[];for(const i in n)Object.prototype.hasOwnProperty.call(n,i)&&a.push(i);return a},s.find=(n,a)=>{for(const i of n)if(a(i))return i},s.isInteger=typeof Number.isInteger=="function"?n=>Number.isInteger(n):n=>typeof n=="number"&&Number.isFinite(n)&&Math.floor(n)===n;function r(n,a=" | "){return n.map(i=>typeof i=="string"?`'${i}'`:i).join(a)}s.joinValues=r,s.jsonStringifyReplacer=(n,a)=>typeof a=="bigint"?a.toString():a})(v||(v={}));var Te;(function(s){s.mergeShapes=(e,t)=>({...e,...t})})(Te||(Te={}));const u=v.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),$=s=>{switch(typeof s){case"undefined":return u.undefined;case"string":return u.string;case"number":return Number.isNaN(s)?u.nan:u.number;case"boolean":return u.boolean;case"function":return u.function;case"bigint":return u.bigint;case"symbol":return u.symbol;case"object":return Array.isArray(s)?u.array:s===null?u.null:s.then&&typeof s.then=="function"&&s.catch&&typeof s.catch=="function"?u.promise:typeof Map<"u"&&s instanceof Map?u.map:typeof Set<"u"&&s instanceof Set?u.set:typeof Date<"u"&&s instanceof Date?u.date:u.object;default:return u.unknown}},d=v.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class I extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}format(e){const t=e||function(a){return a.message},r={_errors:[]},n=a=>{for(const i of a.issues)if(i.code==="invalid_union")i.unionErrors.map(n);else if(i.code==="invalid_return_type")n(i.returnTypeError);else if(i.code==="invalid_arguments")n(i.argumentsError);else if(i.path.length===0)r._errors.push(t(i));else{let o=r,f=0;for(;ft.message){const t={},r=[];for(const n of this.issues)if(n.path.length>0){const a=n.path[0];t[a]=t[a]||[],t[a].push(e(n))}else r.push(e(n));return{formErrors:r,fieldErrors:t}}get formErrors(){return this.flatten()}}I.create=s=>new I(s);const ue=(s,e)=>{let t;switch(s.code){case d.invalid_type:s.received===u.undefined?t="Required":t=`Expected ${s.expected}, received ${s.received}`;break;case d.invalid_literal:t=`Invalid literal value, expected ${JSON.stringify(s.expected,v.jsonStringifyReplacer)}`;break;case d.unrecognized_keys:t=`Unrecognized key(s) in object: ${v.joinValues(s.keys,", ")}`;break;case d.invalid_union:t="Invalid input";break;case d.invalid_union_discriminator:t=`Invalid discriminator value. Expected ${v.joinValues(s.options)}`;break;case d.invalid_enum_value:t=`Invalid enum value. Expected ${v.joinValues(s.options)}, received '${s.received}'`;break;case d.invalid_arguments:t="Invalid function arguments";break;case d.invalid_return_type:t="Invalid function return type";break;case d.invalid_date:t="Invalid date";break;case d.invalid_string:typeof s.validation=="object"?"includes"in s.validation?(t=`Invalid input: must include "${s.validation.includes}"`,typeof s.validation.position=="number"&&(t=`${t} at one or more positions greater than or equal to ${s.validation.position}`)):"startsWith"in s.validation?t=`Invalid input: must start with "${s.validation.startsWith}"`:"endsWith"in s.validation?t=`Invalid input: must end with "${s.validation.endsWith}"`:v.assertNever(s.validation):s.validation!=="regex"?t=`Invalid ${s.validation}`:t="Invalid";break;case d.too_small:s.type==="array"?t=`Array must contain ${s.exact?"exactly":s.inclusive?"at least":"more than"} ${s.minimum} element(s)`:s.type==="string"?t=`String must contain ${s.exact?"exactly":s.inclusive?"at least":"over"} ${s.minimum} character(s)`:s.type==="number"?t=`Number must be ${s.exact?"exactly equal to ":s.inclusive?"greater than or equal to ":"greater than "}${s.minimum}`:s.type==="bigint"?t=`Number must be ${s.exact?"exactly equal to ":s.inclusive?"greater than or equal to ":"greater than "}${s.minimum}`:s.type==="date"?t=`Date must be ${s.exact?"exactly equal to ":s.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(s.minimum))}`:t="Invalid input";break;case d.too_big:s.type==="array"?t=`Array must contain ${s.exact?"exactly":s.inclusive?"at most":"less than"} ${s.maximum} element(s)`:s.type==="string"?t=`String must contain ${s.exact?"exactly":s.inclusive?"at most":"under"} ${s.maximum} character(s)`:s.type==="number"?t=`Number must be ${s.exact?"exactly":s.inclusive?"less than or equal to":"less than"} ${s.maximum}`:s.type==="bigint"?t=`BigInt must be ${s.exact?"exactly":s.inclusive?"less than or equal to":"less than"} ${s.maximum}`:s.type==="date"?t=`Date must be ${s.exact?"exactly":s.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(s.maximum))}`:t="Invalid input";break;case d.custom:t="Invalid input";break;case d.invalid_intersection_types:t="Intersection results could not be merged";break;case d.not_multiple_of:t=`Number must be a multiple of ${s.multipleOf}`;break;case d.not_finite:t="Number must be finite";break;default:t=e.defaultError,v.assertNever(s)}return{message:t}};let Fe=ue;function We(){return Fe}const Je=s=>{const{data:e,path:t,errorMaps:r,issueData:n}=s,a=[...t,...n.path||[]],i={...n,path:a};if(n.message!==void 0)return{...n,path:a,message:n.message};let o="";const f=r.filter(p=>!!p).slice().reverse();for(const p of f)o=p(i,{data:e,defaultError:o}).message;return{...n,path:a,message:o}};function c(s,e){const t=We(),r=Je({issueData:e,data:s.data,path:s.path,errorMaps:[s.common.contextualErrorMap,s.schemaErrorMap,t,t===ue?void 0:ue].filter(n=>!!n)});s.common.issues.push(r)}class C{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,t){const r=[];for(const n of t){if(n.status==="aborted")return m;n.status==="dirty"&&e.dirty(),r.push(n.value)}return{status:e.value,value:r}}static async mergeObjectAsync(e,t){const r=[];for(const n of t){const a=await n.key,i=await n.value;r.push({key:a,value:i})}return C.mergeObjectSync(e,r)}static mergeObjectSync(e,t){const r={};for(const n of t){const{key:a,value:i}=n;if(a.status==="aborted"||i.status==="aborted")return m;a.status==="dirty"&&e.dirty(),i.status==="dirty"&&e.dirty(),a.value!=="__proto__"&&(typeof i.value<"u"||n.alwaysSet)&&(r[a.value]=i.value)}return{status:e.value,value:r}}}const m=Object.freeze({status:"aborted"}),W=s=>({status:"dirty",value:s}),O=s=>({status:"valid",value:s}),Se=s=>s.status==="aborted",Ce=s=>s.status==="dirty",U=s=>s.status==="valid",Q=s=>typeof Promise<"u"&&s instanceof Promise;var h;(function(s){s.errToObj=e=>typeof e=="string"?{message:e}:e||{},s.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(h||(h={}));class Z{constructor(e,t,r,n){this._cachedPath=[],this.parent=e,this.data=t,this._path=r,this._key=n}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const Oe=(s,e)=>{if(U(e))return{success:!0,data:e.value};if(!s.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const t=new I(s.common.issues);return this._error=t,this._error}}};function y(s){if(!s)return{};const{errorMap:e,invalid_type_error:t,required_error:r,description:n}=s;if(e&&(t||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:n}:{errorMap:(i,o)=>{const{message:f}=s;return i.code==="invalid_enum_value"?{message:f??o.defaultError}:typeof o.data>"u"?{message:f??r??o.defaultError}:i.code!=="invalid_type"?{message:o.defaultError}:{message:f??t??o.defaultError}},description:n}}class g{get description(){return this._def.description}_getType(e){return $(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:$(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new C,ctx:{common:e.parent.common,data:e.data,parsedType:$(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(Q(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){const t=this._parse(e);return Promise.resolve(t)}parse(e,t){const r=this.safeParse(e,t);if(r.success)return r.data;throw r.error}safeParse(e,t){const r={common:{issues:[],async:(t==null?void 0:t.async)??!1,contextualErrorMap:t==null?void 0:t.errorMap},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:$(e)},n=this._parseSync({data:e,path:r.path,parent:r});return Oe(r,n)}"~validate"(e){var r,n;const t={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:$(e)};if(!this["~standard"].async)try{const a=this._parseSync({data:e,path:[],parent:t});return U(a)?{value:a.value}:{issues:t.common.issues}}catch(a){(n=(r=a==null?void 0:a.message)==null?void 0:r.toLowerCase())!=null&&n.includes("encountered")&&(this["~standard"].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then(a=>U(a)?{value:a.value}:{issues:t.common.issues})}async parseAsync(e,t){const r=await this.safeParseAsync(e,t);if(r.success)return r.data;throw r.error}async safeParseAsync(e,t){const r={common:{issues:[],contextualErrorMap:t==null?void 0:t.errorMap,async:!0},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:$(e)},n=this._parse({data:e,path:r.path,parent:r}),a=await(Q(n)?n:Promise.resolve(n));return Oe(r,a)}refine(e,t){const r=n=>typeof t=="string"||typeof t>"u"?{message:t}:typeof t=="function"?t(n):t;return this._refinement((n,a)=>{const i=e(n),o=()=>a.addIssue({code:d.custom,...r(n)});return typeof Promise<"u"&&i instanceof Promise?i.then(f=>f?!0:(o(),!1)):i?!0:(o(),!1)})}refinement(e,t){return this._refinement((r,n)=>e(r)?!0:(n.addIssue(typeof t=="function"?t(r,n):t),!1))}_refinement(e){return new z({schema:this,typeName:_.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:t=>this["~validate"](t)}}optional(){return j.create(this,this._def)}nullable(){return L.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return N.create(this)}promise(){return re.create(this,this._def)}or(e){return K.create([this,e],this._def)}and(e){return ee.create(this,e,this._def)}transform(e){return new z({...y(this._def),schema:this,typeName:_.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t=typeof e=="function"?e:()=>e;return new ne({...y(this._def),innerType:this,defaultValue:t,typeName:_.ZodDefault})}brand(){return new Me({typeName:_.ZodBranded,type:this,...y(this._def)})}catch(e){const t=typeof e=="function"?e:()=>e;return new ae({...y(this._def),innerType:this,catchValue:t,typeName:_.ZodCatch})}describe(e){const t=this.constructor;return new t({...this._def,description:e})}pipe(e){return ke.create(this,e)}readonly(){return ie.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const Ye=/^c[^\s-]{8,}$/i,He=/^[0-9a-z]+$/,Ge=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Qe=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,Xe=/^[a-z0-9_-]{21}$/i,Ke=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,et=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,tt=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,st="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let ce;const rt=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,nt=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,at=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,it=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,ot=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,dt=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Ie="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",ct=new RegExp(`^${Ie}$`);function $e(s){let e="[0-5]\\d";s.precision?e=`${e}\\.\\d{${s.precision}}`:s.precision==null&&(e=`${e}(\\.\\d+)?`);const t=s.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${t}`}function ut(s){return new RegExp(`^${$e(s)}$`)}function lt(s){let e=`${Ie}T${$e(s)}`;const t=[];return t.push(s.local?"Z?":"Z"),s.offset&&t.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${t.join("|")})`,new RegExp(`^${e}$`)}function ht(s,e){return!!((e==="v4"||!e)&&rt.test(s)||(e==="v6"||!e)&&at.test(s))}function ft(s,e){if(!Ke.test(s))return!1;try{const[t]=s.split(".");if(!t)return!1;const r=t.replace(/-/g,"+").replace(/_/g,"/").padEnd(t.length+(4-t.length%4)%4,"="),n=JSON.parse(atob(r));return!(typeof n!="object"||n===null||"typ"in n&&(n==null?void 0:n.typ)!=="JWT"||!n.alg||e&&n.alg!==e)}catch{return!1}}function pt(s,e){return!!((e==="v4"||!e)&&nt.test(s)||(e==="v6"||!e)&&it.test(s))}class R extends g{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==u.string){const a=this._getOrReturnCtx(e);return c(a,{code:d.invalid_type,expected:u.string,received:a.parsedType}),m}const r=new C;let n;for(const a of this._def.checks)if(a.kind==="min")e.data.lengtha.value&&(n=this._getOrReturnCtx(e,n),c(n,{code:d.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),r.dirty());else if(a.kind==="length"){const i=e.data.length>a.value,o=e.data.lengthe.test(n),{validation:t,code:d.invalid_string,...h.errToObj(r)})}_addCheck(e){return new R({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...h.errToObj(e)})}url(e){return this._addCheck({kind:"url",...h.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...h.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...h.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...h.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...h.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...h.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...h.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...h.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...h.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...h.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...h.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...h.errToObj(e)})}datetime(e){return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,offset:(e==null?void 0:e.offset)??!1,local:(e==null?void 0:e.local)??!1,...h.errToObj(e==null?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,...h.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...h.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...h.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t==null?void 0:t.position,...h.errToObj(t==null?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...h.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...h.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...h.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...h.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...h.errToObj(t)})}nonempty(e){return this.min(1,h.errToObj(e))}trim(){return new R({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new R({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new R({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.valuenew R({checks:[],typeName:_.ZodString,coerce:(s==null?void 0:s.coerce)??!1,...y(s)});function mt(s,e){const t=(s.toString().split(".")[1]||"").length,r=(e.toString().split(".")[1]||"").length,n=t>r?t:r,a=Number.parseInt(s.toFixed(n).replace(".","")),i=Number.parseInt(e.toFixed(n).replace(".",""));return a%i/10**n}class B extends g{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==u.number){const a=this._getOrReturnCtx(e);return c(a,{code:d.invalid_type,expected:u.number,received:a.parsedType}),m}let r;const n=new C;for(const a of this._def.checks)a.kind==="int"?v.isInteger(e.data)||(r=this._getOrReturnCtx(e,r),c(r,{code:d.invalid_type,expected:"integer",received:"float",message:a.message}),n.dirty()):a.kind==="min"?(a.inclusive?e.dataa.value:e.data>=a.value)&&(r=this._getOrReturnCtx(e,r),c(r,{code:d.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),n.dirty()):a.kind==="multipleOf"?mt(e.data,a.value)!==0&&(r=this._getOrReturnCtx(e,r),c(r,{code:d.not_multiple_of,multipleOf:a.value,message:a.message}),n.dirty()):a.kind==="finite"?Number.isFinite(e.data)||(r=this._getOrReturnCtx(e,r),c(r,{code:d.not_finite,message:a.message}),n.dirty()):v.assertNever(a);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,h.toString(t))}gt(e,t){return this.setLimit("min",e,!1,h.toString(t))}lte(e,t){return this.setLimit("max",e,!0,h.toString(t))}lt(e,t){return this.setLimit("max",e,!1,h.toString(t))}setLimit(e,t,r,n){return new B({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:h.toString(n)}]})}_addCheck(e){return new B({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:h.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:h.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:h.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:h.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:h.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:h.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:h.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:h.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:h.toString(e)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.valuee.kind==="int"||e.kind==="multipleOf"&&v.isInteger(e.value))}get isFinite(){let e=null,t=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(t===null||r.value>t)&&(t=r.value):r.kind==="max"&&(e===null||r.valuenew B({checks:[],typeName:_.ZodNumber,coerce:(s==null?void 0:s.coerce)||!1,...y(s)});class J extends g{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==u.bigint)return this._getInvalidInput(e);let r;const n=new C;for(const a of this._def.checks)a.kind==="min"?(a.inclusive?e.dataa.value:e.data>=a.value)&&(r=this._getOrReturnCtx(e,r),c(r,{code:d.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),n.dirty()):a.kind==="multipleOf"?e.data%a.value!==BigInt(0)&&(r=this._getOrReturnCtx(e,r),c(r,{code:d.not_multiple_of,multipleOf:a.value,message:a.message}),n.dirty()):v.assertNever(a);return{status:n.value,value:e.data}}_getInvalidInput(e){const t=this._getOrReturnCtx(e);return c(t,{code:d.invalid_type,expected:u.bigint,received:t.parsedType}),m}gte(e,t){return this.setLimit("min",e,!0,h.toString(t))}gt(e,t){return this.setLimit("min",e,!1,h.toString(t))}lte(e,t){return this.setLimit("max",e,!0,h.toString(t))}lt(e,t){return this.setLimit("max",e,!1,h.toString(t))}setLimit(e,t,r,n){return new J({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:h.toString(n)}]})}_addCheck(e){return new J({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:h.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:h.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:h.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:h.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:h.toString(t)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.valuenew J({checks:[],typeName:_.ZodBigInt,coerce:(s==null?void 0:s.coerce)??!1,...y(s)});class le extends g{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==u.boolean){const r=this._getOrReturnCtx(e);return c(r,{code:d.invalid_type,expected:u.boolean,received:r.parsedType}),m}return O(e.data)}}le.create=s=>new le({typeName:_.ZodBoolean,coerce:(s==null?void 0:s.coerce)||!1,...y(s)});class X extends g{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==u.date){const a=this._getOrReturnCtx(e);return c(a,{code:d.invalid_type,expected:u.date,received:a.parsedType}),m}if(Number.isNaN(e.data.getTime())){const a=this._getOrReturnCtx(e);return c(a,{code:d.invalid_date}),m}const r=new C;let n;for(const a of this._def.checks)a.kind==="min"?e.data.getTime()a.value&&(n=this._getOrReturnCtx(e,n),c(n,{code:d.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),r.dirty()):v.assertNever(a);return{status:r.value,value:new Date(e.data.getTime())}}_addCheck(e){return new X({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:h.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:h.toString(t)})}get minDate(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.valuenew X({checks:[],coerce:(s==null?void 0:s.coerce)||!1,typeName:_.ZodDate,...y(s)});class Ne extends g{_parse(e){if(this._getType(e)!==u.symbol){const r=this._getOrReturnCtx(e);return c(r,{code:d.invalid_type,expected:u.symbol,received:r.parsedType}),m}return O(e.data)}}Ne.create=s=>new Ne({typeName:_.ZodSymbol,...y(s)});class he extends g{_parse(e){if(this._getType(e)!==u.undefined){const r=this._getOrReturnCtx(e);return c(r,{code:d.invalid_type,expected:u.undefined,received:r.parsedType}),m}return O(e.data)}}he.create=s=>new he({typeName:_.ZodUndefined,...y(s)});class fe extends g{_parse(e){if(this._getType(e)!==u.null){const r=this._getOrReturnCtx(e);return c(r,{code:d.invalid_type,expected:u.null,received:r.parsedType}),m}return O(e.data)}}fe.create=s=>new fe({typeName:_.ZodNull,...y(s)});class Ae extends g{constructor(){super(...arguments),this._any=!0}_parse(e){return O(e.data)}}Ae.create=s=>new Ae({typeName:_.ZodAny,...y(s)});class pe extends g{constructor(){super(...arguments),this._unknown=!0}_parse(e){return O(e.data)}}pe.create=s=>new pe({typeName:_.ZodUnknown,...y(s)});class P extends g{_parse(e){const t=this._getOrReturnCtx(e);return c(t,{code:d.invalid_type,expected:u.never,received:t.parsedType}),m}}P.create=s=>new P({typeName:_.ZodNever,...y(s)});class Ze extends g{_parse(e){if(this._getType(e)!==u.undefined){const r=this._getOrReturnCtx(e);return c(r,{code:d.invalid_type,expected:u.void,received:r.parsedType}),m}return O(e.data)}}Ze.create=s=>new Ze({typeName:_.ZodVoid,...y(s)});class N extends g{_parse(e){const{ctx:t,status:r}=this._processInputParams(e),n=this._def;if(t.parsedType!==u.array)return c(t,{code:d.invalid_type,expected:u.array,received:t.parsedType}),m;if(n.exactLength!==null){const i=t.data.length>n.exactLength.value,o=t.data.lengthn.maxLength.value&&(c(t,{code:d.too_big,maximum:n.maxLength.value,type:"array",inclusive:!0,exact:!1,message:n.maxLength.message}),r.dirty()),t.common.async)return Promise.all([...t.data].map((i,o)=>n.type._parseAsync(new Z(t,i,t.path,o)))).then(i=>C.mergeArray(r,i));const a=[...t.data].map((i,o)=>n.type._parseSync(new Z(t,i,t.path,o)));return C.mergeArray(r,a)}get element(){return this._def.type}min(e,t){return new N({...this._def,minLength:{value:e,message:h.toString(t)}})}max(e,t){return new N({...this._def,maxLength:{value:e,message:h.toString(t)}})}length(e,t){return new N({...this._def,exactLength:{value:e,message:h.toString(t)}})}nonempty(e){return this.min(1,e)}}N.create=(s,e)=>new N({type:s,minLength:null,maxLength:null,exactLength:null,typeName:_.ZodArray,...y(e)});function D(s){if(s instanceof w){const e={};for(const t in s.shape){const r=s.shape[t];e[t]=j.create(D(r))}return new w({...s._def,shape:()=>e})}else return s instanceof N?new N({...s._def,type:D(s.element)}):s instanceof j?j.create(D(s.unwrap())):s instanceof L?L.create(D(s.unwrap())):s instanceof M?M.create(s.items.map(e=>D(e))):s}class w extends g{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),t=v.objectKeys(e);return this._cached={shape:e,keys:t},this._cached}_parse(e){if(this._getType(e)!==u.object){const p=this._getOrReturnCtx(e);return c(p,{code:d.invalid_type,expected:u.object,received:p.parsedType}),m}const{status:r,ctx:n}=this._processInputParams(e),{shape:a,keys:i}=this._getCached(),o=[];if(!(this._def.catchall instanceof P&&this._def.unknownKeys==="strip"))for(const p in n.data)i.includes(p)||o.push(p);const f=[];for(const p of i){const x=a[p],F=n.data[p];f.push({key:{status:"valid",value:p},value:x._parse(new Z(n,F,n.path,p)),alwaysSet:p in n.data})}if(this._def.catchall instanceof P){const p=this._def.unknownKeys;if(p==="passthrough")for(const x of o)f.push({key:{status:"valid",value:x},value:{status:"valid",value:n.data[x]}});else if(p==="strict")o.length>0&&(c(n,{code:d.unrecognized_keys,keys:o}),r.dirty());else if(p!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const p=this._def.catchall;for(const x of o){const F=n.data[x];f.push({key:{status:"valid",value:x},value:p._parse(new Z(n,F,n.path,x)),alwaysSet:x in n.data})}}return n.common.async?Promise.resolve().then(async()=>{const p=[];for(const x of f){const F=await x.key,Be=await x.value;p.push({key:F,value:Be,alwaysSet:x.alwaysSet})}return p}).then(p=>C.mergeObjectSync(r,p)):C.mergeObjectSync(r,f)}get shape(){return this._def.shape()}strict(e){return h.errToObj,new w({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(t,r)=>{var a,i;const n=((i=(a=this._def).errorMap)==null?void 0:i.call(a,t,r).message)??r.defaultError;return t.code==="unrecognized_keys"?{message:h.errToObj(e).message??n}:{message:n}}}:{}})}strip(){return new w({...this._def,unknownKeys:"strip"})}passthrough(){return new w({...this._def,unknownKeys:"passthrough"})}extend(e){return new w({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new w({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:_.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new w({...this._def,catchall:e})}pick(e){const t={};for(const r of v.objectKeys(e))e[r]&&this.shape[r]&&(t[r]=this.shape[r]);return new w({...this._def,shape:()=>t})}omit(e){const t={};for(const r of v.objectKeys(this.shape))e[r]||(t[r]=this.shape[r]);return new w({...this._def,shape:()=>t})}deepPartial(){return D(this)}partial(e){const t={};for(const r of v.objectKeys(this.shape)){const n=this.shape[r];e&&!e[r]?t[r]=n:t[r]=n.optional()}return new w({...this._def,shape:()=>t})}required(e){const t={};for(const r of v.objectKeys(this.shape))if(e&&!e[r])t[r]=this.shape[r];else{let a=this.shape[r];for(;a instanceof j;)a=a._def.innerType;t[r]=a}return new w({...this._def,shape:()=>t})}keyof(){return Pe(v.objectKeys(this.shape))}}w.create=(s,e)=>new w({shape:()=>s,unknownKeys:"strip",catchall:P.create(),typeName:_.ZodObject,...y(e)});w.strictCreate=(s,e)=>new w({shape:()=>s,unknownKeys:"strict",catchall:P.create(),typeName:_.ZodObject,...y(e)});w.lazycreate=(s,e)=>new w({shape:s,unknownKeys:"strip",catchall:P.create(),typeName:_.ZodObject,...y(e)});class K extends g{_parse(e){const{ctx:t}=this._processInputParams(e),r=this._def.options;function n(a){for(const o of a)if(o.result.status==="valid")return o.result;for(const o of a)if(o.result.status==="dirty")return t.common.issues.push(...o.ctx.common.issues),o.result;const i=a.map(o=>new I(o.ctx.common.issues));return c(t,{code:d.invalid_union,unionErrors:i}),m}if(t.common.async)return Promise.all(r.map(async a=>{const i={...t,common:{...t.common,issues:[]},parent:null};return{result:await a._parseAsync({data:t.data,path:t.path,parent:i}),ctx:i}})).then(n);{let a;const i=[];for(const f of r){const p={...t,common:{...t.common,issues:[]},parent:null},x=f._parseSync({data:t.data,path:t.path,parent:p});if(x.status==="valid")return x;x.status==="dirty"&&!a&&(a={result:x,ctx:p}),p.common.issues.length&&i.push(p.common.issues)}if(a)return t.common.issues.push(...a.ctx.common.issues),a.result;const o=i.map(f=>new I(f));return c(t,{code:d.invalid_union,unionErrors:o}),m}}get options(){return this._def.options}}K.create=(s,e)=>new K({options:s,typeName:_.ZodUnion,...y(e)});const E=s=>s instanceof _e?E(s.schema):s instanceof z?E(s.innerType()):s instanceof se?[s.value]:s instanceof V?s.options:s instanceof ye?v.objectValues(s.enum):s instanceof ne?E(s._def.innerType):s instanceof he?[void 0]:s instanceof fe?[null]:s instanceof j?[void 0,...E(s.unwrap())]:s instanceof L?[null,...E(s.unwrap())]:s instanceof Me||s instanceof ie?E(s.unwrap()):s instanceof ae?E(s._def.innerType):[];class xe extends g{_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==u.object)return c(t,{code:d.invalid_type,expected:u.object,received:t.parsedType}),m;const r=this.discriminator,n=t.data[r],a=this.optionsMap.get(n);return a?t.common.async?a._parseAsync({data:t.data,path:t.path,parent:t}):a._parseSync({data:t.data,path:t.path,parent:t}):(c(t,{code:d.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),m)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,r){const n=new Map;for(const a of t){const i=E(a.shape[e]);if(!i.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const o of i){if(n.has(o))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(o)}`);n.set(o,a)}}return new xe({typeName:_.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:n,...y(r)})}}function me(s,e){const t=$(s),r=$(e);if(s===e)return{valid:!0,data:s};if(t===u.object&&r===u.object){const n=v.objectKeys(e),a=v.objectKeys(s).filter(o=>n.indexOf(o)!==-1),i={...s,...e};for(const o of a){const f=me(s[o],e[o]);if(!f.valid)return{valid:!1};i[o]=f.data}return{valid:!0,data:i}}else if(t===u.array&&r===u.array){if(s.length!==e.length)return{valid:!1};const n=[];for(let a=0;a{if(Se(a)||Se(i))return m;const o=me(a.value,i.value);return o.valid?((Ce(a)||Ce(i))&&t.dirty(),{status:t.value,value:o.data}):(c(r,{code:d.invalid_intersection_types}),m)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([a,i])=>n(a,i)):n(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}ee.create=(s,e,t)=>new ee({left:s,right:e,typeName:_.ZodIntersection,...y(t)});class M extends g{_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==u.array)return c(r,{code:d.invalid_type,expected:u.array,received:r.parsedType}),m;if(r.data.lengththis._def.items.length&&(c(r,{code:d.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const a=[...r.data].map((i,o)=>{const f=this._def.items[o]||this._def.rest;return f?f._parse(new Z(r,i,r.path,o)):null}).filter(i=>!!i);return r.common.async?Promise.all(a).then(i=>C.mergeArray(t,i)):C.mergeArray(t,a)}get items(){return this._def.items}rest(e){return new M({...this._def,rest:e})}}M.create=(s,e)=>{if(!Array.isArray(s))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new M({items:s,typeName:_.ZodTuple,rest:null,...y(e)})};class te extends g{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==u.object)return c(r,{code:d.invalid_type,expected:u.object,received:r.parsedType}),m;const n=[],a=this._def.keyType,i=this._def.valueType;for(const o in r.data)n.push({key:a._parse(new Z(r,o,r.path,o)),value:i._parse(new Z(r,r.data[o],r.path,o)),alwaysSet:o in r.data});return r.common.async?C.mergeObjectAsync(t,n):C.mergeObjectSync(t,n)}get element(){return this._def.valueType}static create(e,t,r){return t instanceof g?new te({keyType:e,valueType:t,typeName:_.ZodRecord,...y(r)}):new te({keyType:R.create(),valueType:e,typeName:_.ZodRecord,...y(t)})}}class Ee extends g{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==u.map)return c(r,{code:d.invalid_type,expected:u.map,received:r.parsedType}),m;const n=this._def.keyType,a=this._def.valueType,i=[...r.data.entries()].map(([o,f],p)=>({key:n._parse(new Z(r,o,r.path,[p,"key"])),value:a._parse(new Z(r,f,r.path,[p,"value"]))}));if(r.common.async){const o=new Map;return Promise.resolve().then(async()=>{for(const f of i){const p=await f.key,x=await f.value;if(p.status==="aborted"||x.status==="aborted")return m;(p.status==="dirty"||x.status==="dirty")&&t.dirty(),o.set(p.value,x.value)}return{status:t.value,value:o}})}else{const o=new Map;for(const f of i){const p=f.key,x=f.value;if(p.status==="aborted"||x.status==="aborted")return m;(p.status==="dirty"||x.status==="dirty")&&t.dirty(),o.set(p.value,x.value)}return{status:t.value,value:o}}}}Ee.create=(s,e,t)=>new Ee({valueType:e,keyType:s,typeName:_.ZodMap,...y(t)});class Y extends g{_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==u.set)return c(r,{code:d.invalid_type,expected:u.set,received:r.parsedType}),m;const n=this._def;n.minSize!==null&&r.data.sizen.maxSize.value&&(c(r,{code:d.too_big,maximum:n.maxSize.value,type:"set",inclusive:!0,exact:!1,message:n.maxSize.message}),t.dirty());const a=this._def.valueType;function i(f){const p=new Set;for(const x of f){if(x.status==="aborted")return m;x.status==="dirty"&&t.dirty(),p.add(x.value)}return{status:t.value,value:p}}const o=[...r.data.values()].map((f,p)=>a._parse(new Z(r,f,r.path,p)));return r.common.async?Promise.all(o).then(f=>i(f)):i(o)}min(e,t){return new Y({...this._def,minSize:{value:e,message:h.toString(t)}})}max(e,t){return new Y({...this._def,maxSize:{value:e,message:h.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}Y.create=(s,e)=>new Y({valueType:s,minSize:null,maxSize:null,typeName:_.ZodSet,...y(e)});class _e extends g{get schema(){return this._def.getter()}_parse(e){const{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}_e.create=(s,e)=>new _e({getter:s,typeName:_.ZodLazy,...y(e)});class se extends g{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return c(t,{received:t.data,code:d.invalid_literal,expected:this._def.value}),m}return{status:"valid",value:e.data}}get value(){return this._def.value}}se.create=(s,e)=>new se({value:s,typeName:_.ZodLiteral,...y(e)});function Pe(s,e){return new V({values:s,typeName:_.ZodEnum,...y(e)})}class V extends g{_parse(e){if(typeof e.data!="string"){const t=this._getOrReturnCtx(e),r=this._def.values;return c(t,{expected:v.joinValues(r),received:t.parsedType,code:d.invalid_type}),m}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){const t=this._getOrReturnCtx(e),r=this._def.values;return c(t,{received:t.data,code:d.invalid_enum_value,options:r}),m}return O(e.data)}get options(){return this._def.values}get enum(){const e={};for(const t of this._def.values)e[t]=t;return e}get Values(){const e={};for(const t of this._def.values)e[t]=t;return e}get Enum(){const e={};for(const t of this._def.values)e[t]=t;return e}extract(e,t=this._def){return V.create(e,{...this._def,...t})}exclude(e,t=this._def){return V.create(this.options.filter(r=>!e.includes(r)),{...this._def,...t})}}V.create=Pe;class ye extends g{_parse(e){const t=v.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(e);if(r.parsedType!==u.string&&r.parsedType!==u.number){const n=v.objectValues(t);return c(r,{expected:v.joinValues(n),received:r.parsedType,code:d.invalid_type}),m}if(this._cache||(this._cache=new Set(v.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){const n=v.objectValues(t);return c(r,{received:r.data,code:d.invalid_enum_value,options:n}),m}return O(e.data)}get enum(){return this._def.values}}ye.create=(s,e)=>new ye({values:s,typeName:_.ZodNativeEnum,...y(e)});class re extends g{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==u.promise&&t.common.async===!1)return c(t,{code:d.invalid_type,expected:u.promise,received:t.parsedType}),m;const r=t.parsedType===u.promise?t.data:Promise.resolve(t.data);return O(r.then(n=>this._def.type.parseAsync(n,{path:t.path,errorMap:t.common.contextualErrorMap})))}}re.create=(s,e)=>new re({type:s,typeName:_.ZodPromise,...y(e)});class z extends g{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===_.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:r}=this._processInputParams(e),n=this._def.effect||null,a={addIssue:i=>{c(r,i),i.fatal?t.abort():t.dirty()},get path(){return r.path}};if(a.addIssue=a.addIssue.bind(a),n.type==="preprocess"){const i=n.transform(r.data,a);if(r.common.async)return Promise.resolve(i).then(async o=>{if(t.value==="aborted")return m;const f=await this._def.schema._parseAsync({data:o,path:r.path,parent:r});return f.status==="aborted"?m:f.status==="dirty"||t.value==="dirty"?W(f.value):f});{if(t.value==="aborted")return m;const o=this._def.schema._parseSync({data:i,path:r.path,parent:r});return o.status==="aborted"?m:o.status==="dirty"||t.value==="dirty"?W(o.value):o}}if(n.type==="refinement"){const i=o=>{const f=n.refinement(o,a);if(r.common.async)return Promise.resolve(f);if(f instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return o};if(r.common.async===!1){const o=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?m:(o.status==="dirty"&&t.dirty(),i(o.value),{status:t.value,value:o.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(o=>o.status==="aborted"?m:(o.status==="dirty"&&t.dirty(),i(o.value).then(()=>({status:t.value,value:o.value}))))}if(n.type==="transform")if(r.common.async===!1){const i=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!U(i))return m;const o=n.transform(i.value,a);if(o instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:o}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(i=>U(i)?Promise.resolve(n.transform(i.value,a)).then(o=>({status:t.value,value:o})):m);v.assertNever(n)}}z.create=(s,e,t)=>new z({schema:s,typeName:_.ZodEffects,effect:e,...y(t)});z.createWithPreprocess=(s,e,t)=>new z({schema:e,effect:{type:"preprocess",transform:s},typeName:_.ZodEffects,...y(t)});class j extends g{_parse(e){return this._getType(e)===u.undefined?O(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}j.create=(s,e)=>new j({innerType:s,typeName:_.ZodOptional,...y(e)});class L extends g{_parse(e){return this._getType(e)===u.null?O(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}L.create=(s,e)=>new L({innerType:s,typeName:_.ZodNullable,...y(e)});class ne extends g{_parse(e){const{ctx:t}=this._processInputParams(e);let r=t.data;return t.parsedType===u.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}ne.create=(s,e)=>new ne({innerType:s,typeName:_.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...y(e)});class ae extends g{_parse(e){const{ctx:t}=this._processInputParams(e),r={...t,common:{...t.common,issues:[]}},n=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return Q(n)?n.then(a=>({status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new I(r.common.issues)},input:r.data})})):{status:"valid",value:n.status==="valid"?n.value:this._def.catchValue({get error(){return new I(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}ae.create=(s,e)=>new ae({innerType:s,typeName:_.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...y(e)});class Re extends g{_parse(e){if(this._getType(e)!==u.nan){const r=this._getOrReturnCtx(e);return c(r,{code:d.invalid_type,expected:u.nan,received:r.parsedType}),m}return{status:"valid",value:e.data}}}Re.create=s=>new Re({typeName:_.ZodNaN,...y(s)});class Me extends g{_parse(e){const{ctx:t}=this._processInputParams(e),r=t.data;return this._def.type._parse({data:r,path:t.path,parent:t})}unwrap(){return this._def.type}}class ke extends g{_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.common.async)return(async()=>{const a=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?m:a.status==="dirty"?(t.dirty(),W(a.value)):this._def.out._parseAsync({data:a.value,path:r.path,parent:r})})();{const n=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return n.status==="aborted"?m:n.status==="dirty"?(t.dirty(),{status:"dirty",value:n.value}):this._def.out._parseSync({data:n.value,path:r.path,parent:r})}}static create(e,t){return new ke({in:e,out:t,typeName:_.ZodPipeline})}}class ie extends g{_parse(e){const t=this._def.innerType._parse(e),r=n=>(U(n)&&(n.value=Object.freeze(n.value)),n);return Q(t)?t.then(n=>r(n)):r(t)}unwrap(){return this._def.innerType}}ie.create=(s,e)=>new ie({innerType:s,typeName:_.ZodReadonly,...y(e)});var _;(function(s){s.ZodString="ZodString",s.ZodNumber="ZodNumber",s.ZodNaN="ZodNaN",s.ZodBigInt="ZodBigInt",s.ZodBoolean="ZodBoolean",s.ZodDate="ZodDate",s.ZodSymbol="ZodSymbol",s.ZodUndefined="ZodUndefined",s.ZodNull="ZodNull",s.ZodAny="ZodAny",s.ZodUnknown="ZodUnknown",s.ZodNever="ZodNever",s.ZodVoid="ZodVoid",s.ZodArray="ZodArray",s.ZodObject="ZodObject",s.ZodUnion="ZodUnion",s.ZodDiscriminatedUnion="ZodDiscriminatedUnion",s.ZodIntersection="ZodIntersection",s.ZodTuple="ZodTuple",s.ZodRecord="ZodRecord",s.ZodMap="ZodMap",s.ZodSet="ZodSet",s.ZodFunction="ZodFunction",s.ZodLazy="ZodLazy",s.ZodLiteral="ZodLiteral",s.ZodEnum="ZodEnum",s.ZodEffects="ZodEffects",s.ZodNativeEnum="ZodNativeEnum",s.ZodOptional="ZodOptional",s.ZodNullable="ZodNullable",s.ZodDefault="ZodDefault",s.ZodCatch="ZodCatch",s.ZodPromise="ZodPromise",s.ZodBranded="ZodBranded",s.ZodPipeline="ZodPipeline",s.ZodReadonly="ZodReadonly"})(_||(_={}));const l=R.create,b=B.create,oe=le.create,_t=pe.create;P.create;const T=N.create,k=w.create,Ve=K.create,ze=xe.create;ee.create;M.create;const Le=te.create,G=se.create,ge=V.create;re.create;j.create;L.create;const A=Le(_t()),be=k({id:b(),name:l(),slug:l().optional()}).passthrough(),de=k({url:l(),is_official:oe()}),ve=k({task_id:b(),dataset_id:b(),model_name:l().nullish(),harness:l().nullish(),methodology:l().nullish(),metrics:Le(Ve([l(),b()])),uses_additional_data:oe().optional(),is_open:oe().optional(),best_rank:b().nullish(),best_metric:l().nullish(),evaluated_on:l().nullish(),external_source_url:l().nullish(),num_parameters:b().nullish(),hf_model_url:l().nullish()}).passthrough(),yt=ve.partial().extend({id:b().optional()}),gt=ze("op",[k({op:G("create"),data:ve}),k({op:G("update"),evaluation_id:b(),data:ve}),k({op:G("delete"),evaluation_id:b()})]),je=k({hf_models:T(l()),hf_datasets:T(l()),hf_spaces:T(l())}),we=k({file_name:l(),mime_type:l(),data_url:l().optional(),url:l().optional()}),q=k({name:l(),description:l().optional()}),vt=q.extend({image:we.optional(),image_credit:l().optional(),parent_id:b().optional(),area_id:b().optional(),keywords:l().optional()}),xt=q.extend({image:we.optional(),image_credit:l().optional(),source_paper_id:b().optional(),source_url:l().optional(),source_title:l().optional()}),kt=Ve([k({benchmark:l(),task:l(),description:l()}),q.extend({description:l(),task_ids:T(b()),full_name:l().optional(),url:l().optional(),hf_url:l().optional(),paper_url:l().optional(),license_name:l().optional(),license_url:l().optional()})]),bt=q.extend({description:l(),direction:ge(["higher_is_better","lower_is_better"]),full_name:l().optional(),scale:l().optional(),task_id:b(),dataset_id:b()}),wt=q.extend({short_name:l().optional(),venue:l().optional(),location:l().optional(),url:l(),year:b(),start_date:l().optional(),end_date:l().optional()}),Tt=q.extend({hf_slug:l().optional(),website_url:l().optional(),image:we.optional()}),St=k({id:b(),paper_id:b().nullable(),hf_username:l(),is_author:oe(),status:ge(["pending","approved","rejected"]),applied_payload:A.nullish(),conflict_payload:A.nullish(),result_entity_type:l().nullish(),result_entity_id:l().nullish(),admin_note:l().nullish(),user_review_reason:l().nullish(),reviewed_by:l().nullish(),reviewed_by_kind:ge(["human","codex"]).nullish(),review_evidence:A.nullish(),created_at:l(),updated_at:l(),reviewed_at:l().nullish()});function S(s,e,t){return St.extend({edit_type:G(s),proposed_payload:e,current_payload:t.nullish()})}const Ct=S("tasks",k({task_ids:T(b())}),k({tasks:T(be)})),Ot=S("methods",k({method_ids:T(b())}),k({methods:T(be)})),Nt=S("evaluations",k({operations:T(gt)}),k({evaluations:T(yt)})),At=S("repositories",k({repositories:T(de)}),k({repositories:T(de)})),Zt=S("project_pages",k({project_pages:T(de)}),k({project_pages:T(de)})),Et=S("source_url",k({source_url:l()}),k({source_url:l().nullish()})),Rt=S("hf_artifacts",je,je),jt=S("x_threads",k({x_threads:T(l())}),k({x_threads:T(k({url:l()}))})),It=S("organizations",k({organization_ids:T(b())}),k({organizations:T(be)})),$t=S("new_task",vt,A),Pt=S("new_method",xt,A),Mt=S("new_benchmark",kt,A),Vt=S("new_metric",bt,A),zt=S("new_conference",wt,A),Lt=S("new_organization",Tt,A),Dt=S("new_external_paper",k({title:l().optional(),source_url:l(),authors:T(l()),date_published:l().optional(),abstract:l().optional()}),A),De=ze("edit_type",[Ct,Ot,Nt,At,Zt,Et,Rt,jt,It,$t,Pt,Mt,Vt,zt,Lt,Dt]);function Jt(s,e,t){return{paper_id:s,edit_type:e,proposed_payload:t}}const Ut=k({count:b(),results:T(De)});class Bt extends Error{constructor(e){super(`Malformed pending-edit payload: ${e}`),this.name="PendingEditPayloadError"}}function Ue(s,e){const t=s.safeParse(e);if(t.success)return t.data;const r=t.error.issues[0];throw new Bt(`${(r==null?void 0:r.path.join("."))||"response"}: ${(r==null?void 0:r.message)||"invalid value"}`)}const H=s=>Ue(De,s),qt=s=>Ue(Ut,s);class Ft{constructor(e){this.request=e}async submit(e){return H(await this.request("/me/paper-edits",{method:"POST",body:JSON.stringify(e)}))}list(e){const t=new URLSearchParams;for(const[n,a]of Object.entries(e??{}))a!==void 0&&t.set(n,String(a));const r=t.toString();return this.request(`/admin/paper-edits${r?`?${r}`:""}`).then(qt)}async get(e){return H(await this.request(`/admin/paper-edits/${e}`))}async approve(e,t={}){return H(await this.request(`/admin/paper-edits/${e}/approve`,{method:"POST",body:JSON.stringify(t)}))}async reject(e,t={}){return H(await this.request(`/admin/paper-edits/${e}/reject`,{method:"POST",body:JSON.stringify(t)}))}}const Yt=new Ft(qe);export{Jt as p,Yt as s}; diff --git a/assets/switch-D71Zro87.js b/assets/switch-BC-W3U4C.js similarity index 94% rename from assets/switch-D71Zro87.js rename to assets/switch-BC-W3U4C.js index 2a37065b77d59306a58b9f0a705339e17ea96cc1..6883ecc1cf0880582033ee1e0c80465c8a1e1dd0 100644 --- a/assets/switch-D71Zro87.js +++ b/assets/switch-BC-W3U4C.js @@ -1 +1 @@ -import{r as s,s as C,q as I,j as a,p as y,t as M,v as H,w as q,x as g}from"./index-CnBotBa4.js";import{u as A}from"./index-C2-TgiAT.js";var b="Switch",[U]=q(b),[z,L]=U(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),S=C(o,h=>p(h)),k=s.useRef(!1),x=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:S,onClick:M(t.onClick,h=>{B(T=>!T),x&&(k.current=h.isPropagationStopped(),k.current||h.stopPropagation())})}),x&&a.jsx(N,{control:l,bubbles:!k.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=A(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 S=new Event("click",{bubbles:n});p.call(i,e),i.dispatchEvent(S)}},[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:g("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:g("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}; +import{r as s,s as C,q as I,j as a,p as y,t as M,v as H,w as q,x as g}from"./index-hxawG6mk.js";import{u as A}from"./index-DvHdqmQp.js";var b="Switch",[U]=q(b),[z,L]=U(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),S=C(o,h=>p(h)),k=s.useRef(!1),x=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:S,onClick:M(t.onClick,h=>{B(T=>!T),x&&(k.current=h.isPropagationStopped(),k.current||h.stopPropagation())})}),x&&a.jsx(N,{control:l,bubbles:!k.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=A(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 S=new Event("click",{bubbles:n});p.call(i,e),i.dispatchEvent(S)}},[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:g("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:g("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}; diff --git a/assets/textarea-D8TA8f9X.js b/assets/textarea-DzlRNXqF.js similarity index 86% rename from assets/textarea-D8TA8f9X.js rename to assets/textarea-DzlRNXqF.js index e4ad2cea910d2131ae042fa26d9d12b3d31233a1..d95b971797f1870e770f42f0f98e084543c63d75 100644 --- a/assets/textarea-D8TA8f9X.js +++ b/assets/textarea-DzlRNXqF.js @@ -1 +1 @@ -import{r as s,j as a,x as t}from"./index-CnBotBa4.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}; +import{r as s,j as a,x as t}from"./index-hxawG6mk.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}; diff --git a/assets/transform-DMbrhcTx.js b/assets/transform-DfrN0kQW.js similarity index 99% rename from assets/transform-DMbrhcTx.js rename to assets/transform-DfrN0kQW.js index f01a9cb54e2ea7d41eeebbf104fcaa80591e9924..e86785e25167c836380c77c09814a66733e10497 100644 --- a/assets/transform-DMbrhcTx.js +++ b/assets/transform-DfrN0kQW.js @@ -1 +1 @@ -import{U as _}from"./index-CnBotBa4.js";function Pe(t){let e=2166136261;const n=t||"";for(let r=0;r=a.getTime()?n+1:e.getTime()>=o.getTime()?n:n-1}function F(t){const e=w(t);return e.setHours(0,0,0,0),e}function E(t){const e=w(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)/z)}function Z(t){const e=j(t),n=D(t,0);return n.setFullYear(e,0,4),n.setHours(0,0,0,0),S(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=w(t);return!isNaN(Number(e))}function et(t){const e=w(t),n=D(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 C(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:C({formats:at,defaultWidth:"full"}),time:C({formats:it,defaultWidth:"full"}),dateTime:C({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 O(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:O({values:dt,defaultWidth:"wide"}),quarter:O({values:lt,defaultWidth:"wide",argumentCallback:t=>t-1}),month:O({values:ft,defaultWidth:"wide"}),day:O({values:ht,defaultWidth:"wide"}),dayPeriod:O({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{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 kt=/^(\d+)(th|st|nd|rd)?/i,Ot=/\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},Pt={any:[/^b/i,/^(a|c)/i]},xt={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},vt={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},St={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]},Wt={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]},Ct={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},Nt={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}},_t={ordinalNumber:Mt({matchPattern:kt,parsePattern:Ot,valueCallback:t=>parseInt(t,10)}),era:p({matchPatterns:pt,defaultMatchWidth:"wide",parsePatterns:Pt,defaultParseWidth:"any"}),quarter:p({matchPatterns:xt,defaultMatchWidth:"wide",parsePatterns:vt,defaultParseWidth:"any",valueCallback:t=>t+1}),month:p({matchPatterns:Tt,defaultMatchWidth:"wide",parsePatterns:St,defaultParseWidth:"any"}),day:p({matchPatterns:Wt,defaultMatchWidth:"wide",parsePatterns:Yt,defaultParseWidth:"any"}),dayPeriod:p({matchPatterns:Ct,defaultMatchWidth:"any",parsePatterns:Nt,defaultParseWidth:"any"})},Ft={code:"en-US",formatDistance:rt,formatLong:st,formatRelative:ct,localize:yt,match:_t,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Et(t){const e=w(t);return J(e,et(e))+1}function qt(t){const e=w(t),n=+S(e)-+Z(e);return Math.round(n/I)+1}function Q(t,e){var f,g,l,k;const n=w(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??((k=(l=a.locale)==null?void 0:l.options)==null?void 0:k.firstWeekContainsDate)??1,o=D(t,0);o.setFullYear(r+1,0,i),o.setHours(0,0,0,0);const s=x(o,e),u=D(t,0);u.setFullYear(r,0,i),u.setHours(0,0,0,0);const d=x(u,e);return n.getTime()>=s.getTime()?r+1:n.getTime()>=d.getTime()?r:r-1}function Ut(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=Q(t,e),i=D(t,0);return i.setFullYear(a,0,r),i.setHours(0,0,0,0),x(i,e)}function Lt(t,e){const n=w(t),r=+x(n,e)-+Ut(n,e);return Math.round(r/I)+1}function c(t,e){const n=t<0?"-":"",r=Math.abs(t).toString().padStart(e,"0");return n+r}const y={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)}},M={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},q={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 y.y(t,e)},Y:function(t,e,n,r){const a=Q(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 y.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=Lt(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"}):y.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=M.noon:r===0?a=M.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=M.evening:r>=12?a=M.afternoon:r>=4?a=M.morning:a=M.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 y.h(t,e)},H:function(t,e,n){return e==="Ho"?n.ordinalNumber(t.getHours(),{unit:"hour"}):y.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"}):y.m(t,e)},s:function(t,e,n){return e==="so"?n.ordinalNumber(t.getSeconds(),{unit:"second"}):y.s(t,e)},S:function(t,e){return y.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 b(r);case"XXXXX":case"XXX":default:return b(r,":")}},x:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"x":return L(r);case"xxxx":case"xx":return b(r);case"xxxxx":case"xxx":default:return b(r,":")}},O:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+U(r,":");case"OOOO":default:return"GMT"+b(r,":")}},z:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+U(r,":");case"zzzz":default:return"GMT"+b(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 U(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):b(t,e)}function b(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"})}},X=(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 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}}",X(a,e))},It={p:X,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,Zt=/[a-zA-Z]/;function Kt(t,e,n){var f,g,l,k;const r=W(),a=r.locale??Ft,i=r.firstWeekContainsDate??((g=(f=r.locale)==null?void 0:f.options)==null?void 0:g.firstWeekContainsDate)??1,o=r.weekStartsOn??((k=(l=r.locale)==null?void 0:l.options)==null?void 0:k.weekStartsOn)??0,s=w(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 Y=It[h];return Y(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(q[h])return{isToken:!0,value:m};if(h.match(Zt))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 Y=q[h[0]];return Y(s,h,a.localize,d)}).join("")}function te(t){const e=t.match(Vt);return e?e[1].replace(Jt,"'"):t}function B(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 v={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(v.dateTimeDelimiter);let r;if(n.length>2)return e;if(/:/.test(n[0])?r=n[0]:(e.date=n[0],r=n[1],v.timeZoneDelimiter.test(e.date)&&(e.date=t.split(v.timeZoneDelimiter)[0],r=t.substr(e.date.length,t.length))),r){const a=v.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=P(n[1]),i=P(n[2])-1,o=P(n[3]),s=P(n[4]),u=P(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 P(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*A+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*A):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 G(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]||(G(t)?29:28))}function fe(t,e){return e>=1&&e<=(G(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"?B(t):t;return Kt(e,"MMM d, yyyy")}catch{return null}}function Me(t){if(!t)return null;try{return B(t).getFullYear()}catch{return null}}function ve(t){var f,g;const{github:e,githubUrl:n,velocity24h:r}=be(t.repositories),{hfKind:a,hfCount:i,hfUrl:o}=ye(t),s=(t.tasks||[]).map(l=>l.slug||"").filter(Boolean),u=(t.methods||[]).map(l=>({id:l.id,name:l.name,slug:l.slug})),d=(t.leaderboard_ranks||[]).filter(l=>l.best_rank>=1&&l.best_rank<=3).map(l=>({name:l.dataset_name,slug:l.dataset_slug||null,rank:l.best_rank}));return{id:t.arxiv_id||t.id,dbId:t.id,title:t.title,abstract:t.abstract||"",authors:t.authors||[],authorIds:(t.author_links||[]).map(l=>l.id??null),tags:s,methods:u,organizations:(t.organizations||[]).map(l=>({name:l.name,slug:l.slug,logoUrl:_(l.logo_url)||null})),citations:t.citation_count||0,github:e,githubUrl:n,project:((g=(f=t.project_pages)==null?void 0:f[0])==null?void 0:g.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,sotaRanks:d}}function ke(t){const e=$.get(t.toLowerCase());if(e)return e;const n=t.toUpperCase();return T.has(n)?n:t.replace(/[-_]+/g," ").replace(/\b\w/g,r=>r.toUpperCase())}const T=new Set(["AI","OCR"]),$=new Map([["3d-tracking","3D Tracking"],["point-tracking","2D Point Tracking"],["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"],["text-to-sql","Text-to-SQL"]]);function Te(t,e){const n=t||ke(e||""),r=$.get((e==null?void 0:e.toLowerCase())||Oe(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&&T.has(a)||T.has(i)?i:n.toLowerCase().replace(/\b\w/g,s=>s.toUpperCase()).replace(/\b[A-Za-z0-9]+\b/g,s=>T.has(s.toUpperCase())?s.toUpperCase():s)}function Oe(t){return t.trim().toLowerCase().replace(/[\s_]+/g,"-")}export{ke as a,xe as c,Te as d,Pe as h,be as s,ve as t}; +import{U as _}from"./index-hxawG6mk.js";function Pe(t){let e=2166136261;const n=t||"";for(let r=0;r=a.getTime()?n+1:e.getTime()>=o.getTime()?n:n-1}function F(t){const e=w(t);return e.setHours(0,0,0,0),e}function E(t){const e=w(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)/z)}function Z(t){const e=j(t),n=D(t,0);return n.setFullYear(e,0,4),n.setHours(0,0,0,0),S(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=w(t);return!isNaN(Number(e))}function et(t){const e=w(t),n=D(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 C(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:C({formats:at,defaultWidth:"full"}),time:C({formats:it,defaultWidth:"full"}),dateTime:C({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 O(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:O({values:dt,defaultWidth:"wide"}),quarter:O({values:lt,defaultWidth:"wide",argumentCallback:t=>t-1}),month:O({values:ft,defaultWidth:"wide"}),day:O({values:ht,defaultWidth:"wide"}),dayPeriod:O({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{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 kt=/^(\d+)(th|st|nd|rd)?/i,Ot=/\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},Pt={any:[/^b/i,/^(a|c)/i]},xt={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},vt={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},St={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]},Wt={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]},Ct={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},Nt={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}},_t={ordinalNumber:Mt({matchPattern:kt,parsePattern:Ot,valueCallback:t=>parseInt(t,10)}),era:p({matchPatterns:pt,defaultMatchWidth:"wide",parsePatterns:Pt,defaultParseWidth:"any"}),quarter:p({matchPatterns:xt,defaultMatchWidth:"wide",parsePatterns:vt,defaultParseWidth:"any",valueCallback:t=>t+1}),month:p({matchPatterns:Tt,defaultMatchWidth:"wide",parsePatterns:St,defaultParseWidth:"any"}),day:p({matchPatterns:Wt,defaultMatchWidth:"wide",parsePatterns:Yt,defaultParseWidth:"any"}),dayPeriod:p({matchPatterns:Ct,defaultMatchWidth:"any",parsePatterns:Nt,defaultParseWidth:"any"})},Ft={code:"en-US",formatDistance:rt,formatLong:st,formatRelative:ct,localize:yt,match:_t,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Et(t){const e=w(t);return J(e,et(e))+1}function qt(t){const e=w(t),n=+S(e)-+Z(e);return Math.round(n/I)+1}function Q(t,e){var f,g,l,k;const n=w(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??((k=(l=a.locale)==null?void 0:l.options)==null?void 0:k.firstWeekContainsDate)??1,o=D(t,0);o.setFullYear(r+1,0,i),o.setHours(0,0,0,0);const s=x(o,e),u=D(t,0);u.setFullYear(r,0,i),u.setHours(0,0,0,0);const d=x(u,e);return n.getTime()>=s.getTime()?r+1:n.getTime()>=d.getTime()?r:r-1}function Ut(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=Q(t,e),i=D(t,0);return i.setFullYear(a,0,r),i.setHours(0,0,0,0),x(i,e)}function Lt(t,e){const n=w(t),r=+x(n,e)-+Ut(n,e);return Math.round(r/I)+1}function c(t,e){const n=t<0?"-":"",r=Math.abs(t).toString().padStart(e,"0");return n+r}const y={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)}},M={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},q={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 y.y(t,e)},Y:function(t,e,n,r){const a=Q(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 y.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=Lt(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"}):y.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=M.noon:r===0?a=M.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=M.evening:r>=12?a=M.afternoon:r>=4?a=M.morning:a=M.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 y.h(t,e)},H:function(t,e,n){return e==="Ho"?n.ordinalNumber(t.getHours(),{unit:"hour"}):y.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"}):y.m(t,e)},s:function(t,e,n){return e==="so"?n.ordinalNumber(t.getSeconds(),{unit:"second"}):y.s(t,e)},S:function(t,e){return y.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 b(r);case"XXXXX":case"XXX":default:return b(r,":")}},x:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"x":return L(r);case"xxxx":case"xx":return b(r);case"xxxxx":case"xxx":default:return b(r,":")}},O:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+U(r,":");case"OOOO":default:return"GMT"+b(r,":")}},z:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+U(r,":");case"zzzz":default:return"GMT"+b(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 U(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):b(t,e)}function b(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"})}},X=(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 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}}",X(a,e))},It={p:X,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,Zt=/[a-zA-Z]/;function Kt(t,e,n){var f,g,l,k;const r=W(),a=r.locale??Ft,i=r.firstWeekContainsDate??((g=(f=r.locale)==null?void 0:f.options)==null?void 0:g.firstWeekContainsDate)??1,o=r.weekStartsOn??((k=(l=r.locale)==null?void 0:l.options)==null?void 0:k.weekStartsOn)??0,s=w(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 Y=It[h];return Y(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(q[h])return{isToken:!0,value:m};if(h.match(Zt))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 Y=q[h[0]];return Y(s,h,a.localize,d)}).join("")}function te(t){const e=t.match(Vt);return e?e[1].replace(Jt,"'"):t}function B(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 v={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(v.dateTimeDelimiter);let r;if(n.length>2)return e;if(/:/.test(n[0])?r=n[0]:(e.date=n[0],r=n[1],v.timeZoneDelimiter.test(e.date)&&(e.date=t.split(v.timeZoneDelimiter)[0],r=t.substr(e.date.length,t.length))),r){const a=v.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=P(n[1]),i=P(n[2])-1,o=P(n[3]),s=P(n[4]),u=P(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 P(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*A+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*A):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 G(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]||(G(t)?29:28))}function fe(t,e){return e>=1&&e<=(G(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"?B(t):t;return Kt(e,"MMM d, yyyy")}catch{return null}}function Me(t){if(!t)return null;try{return B(t).getFullYear()}catch{return null}}function ve(t){var f,g;const{github:e,githubUrl:n,velocity24h:r}=be(t.repositories),{hfKind:a,hfCount:i,hfUrl:o}=ye(t),s=(t.tasks||[]).map(l=>l.slug||"").filter(Boolean),u=(t.methods||[]).map(l=>({id:l.id,name:l.name,slug:l.slug})),d=(t.leaderboard_ranks||[]).filter(l=>l.best_rank>=1&&l.best_rank<=3).map(l=>({name:l.dataset_name,slug:l.dataset_slug||null,rank:l.best_rank}));return{id:t.arxiv_id||t.id,dbId:t.id,title:t.title,abstract:t.abstract||"",authors:t.authors||[],authorIds:(t.author_links||[]).map(l=>l.id??null),tags:s,methods:u,organizations:(t.organizations||[]).map(l=>({name:l.name,slug:l.slug,logoUrl:_(l.logo_url)||null})),citations:t.citation_count||0,github:e,githubUrl:n,project:((g=(f=t.project_pages)==null?void 0:f[0])==null?void 0:g.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,sotaRanks:d}}function ke(t){const e=$.get(t.toLowerCase());if(e)return e;const n=t.toUpperCase();return T.has(n)?n:t.replace(/[-_]+/g," ").replace(/\b\w/g,r=>r.toUpperCase())}const T=new Set(["AI","OCR"]),$=new Map([["3d-tracking","3D Tracking"],["point-tracking","2D Point Tracking"],["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"],["text-to-sql","Text-to-SQL"]]);function Te(t,e){const n=t||ke(e||""),r=$.get((e==null?void 0:e.toLowerCase())||Oe(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&&T.has(a)||T.has(i)?i:n.toLowerCase().replace(/\b\w/g,s=>s.toUpperCase()).replace(/\b[A-Za-z0-9]+\b/g,s=>T.has(s.toUpperCase())?s.toUpperCase():s)}function Oe(t){return t.trim().toLowerCase().replace(/[\s_]+/g,"-")}export{ke as a,xe as c,Te as d,Pe as h,be as s,ve as t}; diff --git a/assets/trophy-CO9jGMPk.js b/assets/trophy-DQthGapR.js similarity index 95% rename from assets/trophy-CO9jGMPk.js rename to assets/trophy-DQthGapR.js index 618d8fbfb32576b36b1dd95530fe5216ea7777d2..473575e3adcf474bd67a0f54e166b7fe394ddd74 100644 --- a/assets/trophy-CO9jGMPk.js +++ b/assets/trophy-DQthGapR.js @@ -1,4 +1,4 @@ -import{g as a}from"./index-CnBotBa4.js";/** +import{g as a}from"./index-hxawG6mk.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/useDebounce-Bw5By0Qg.js b/assets/useDebounce-lGdHpcfR.js similarity index 66% rename from assets/useDebounce-Bw5By0Qg.js rename to assets/useDebounce-lGdHpcfR.js index 31a106b0b633ca85c084ca02fb59001126a5dd80..a0a959461a0c0cc78603431feeeaeb8a166d509a 100644 --- a/assets/useDebounce-Bw5By0Qg.js +++ b/assets/useDebounce-lGdHpcfR.js @@ -1 +1 @@ -import{r as o}from"./index-CnBotBa4.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}; +import{r as o}from"./index-hxawG6mk.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}; diff --git a/assets/useInfiniteQuery-DUlXElgD.js b/assets/useInfiniteQuery-BIEmOe8z.js similarity index 89% rename from assets/useInfiniteQuery-DUlXElgD.js rename to assets/useInfiniteQuery-BIEmOe8z.js index 9fabe391073dee2ca32aea2d63bf31ce6d76b5f3..aff7bb6bf5a6525c3485d8f17cf5ae6fb4423c7f 100644 --- a/assets/useInfiniteQuery-DUlXElgD.js +++ b/assets/useInfiniteQuery-BIEmOe8z.js @@ -1 +1 @@ -import{Q as v,a as p}from"./useQuery-C8pfCInN.js";import{aN as x,aO as N}from"./index-CnBotBa4.js";var b=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:N(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 O(e,t){return p(e,b)}export{O as u}; +import{Q as v,a as p}from"./useQuery-B7vCF2Os.js";import{aN as x,aO as N}from"./index-hxawG6mk.js";var b=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:N(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 O(e,t){return p(e,b)}export{O as u}; diff --git a/assets/useIntersectionObserver-WHgviHIR.js b/assets/useIntersectionObserver-rTEWxOEQ.js similarity index 86% rename from assets/useIntersectionObserver-WHgviHIR.js rename to assets/useIntersectionObserver-rTEWxOEQ.js index dbcedcf96f8e7c9d2671f3fa5863569fc0127463..cd63b292001e457da2c22f8635327c64e3294bff 100644 --- a/assets/useIntersectionObserver-WHgviHIR.js +++ b/assets/useIntersectionObserver-rTEWxOEQ.js @@ -1 +1 @@ -import{r}from"./index-CnBotBa4.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}; +import{r}from"./index-hxawG6mk.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}; diff --git a/assets/useMutation-YEvFXzv3.js b/assets/useMutation-gPqxjZGO.js similarity index 97% rename from assets/useMutation-YEvFXzv3.js rename to assets/useMutation-gPqxjZGO.js index 57bb3ce1e4b2350d52ed22fa9b4bf68e7205b176..37d3b05e1f1b6b7a01daf6b8dc176913bc3658bc 100644 --- a/assets/useMutation-YEvFXzv3.js +++ b/assets/useMutation-gPqxjZGO.js @@ -1 +1 @@ -var w=i=>{throw TypeError(i)};var E=(i,t,s)=>t.has(i)||w("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)?w("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{aw as L,az as U,aL as R,aM as k,aJ as P,m as q,r as v,aB as z,aK as A}from"./index-CnBotBa4.js";var a,c,o,h,n,C,S,j,B=(j=class extends L{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)??k();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,K,x;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{(x=(K=e(this,h)).onSettled)==null||x.call(K,void 0,t.error,m,M,g)}catch(l){Promise.reject(l)}}}this.listeners.forEach(m=>{m(e(this,c))})})},j);function J(i,t){const s=q(),[r]=v.useState(()=>new B(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(z)},[r]);if(u.error&&A(r.options.throwOnError,[u.error]))throw u.error;return{...u,mutate:f,mutateAsync:u.mutate}}export{J as u}; +var w=i=>{throw TypeError(i)};var E=(i,t,s)=>t.has(i)||w("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)?w("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{aw as L,az as U,aL as R,aM as k,aJ as P,m as q,r as v,aB as z,aK as A}from"./index-hxawG6mk.js";var a,c,o,h,n,C,S,j,B=(j=class extends L{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)??k();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,K,x;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{(x=(K=e(this,h)).onSettled)==null||x.call(K,void 0,t.error,m,M,g)}catch(l){Promise.reject(l)}}}this.listeners.forEach(m=>{m(e(this,c))})})},j);function J(i,t){const s=q(),[r]=v.useState(()=>new B(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(z)},[r]);if(u.error&&A(r.options.throwOnError,[u.error]))throw u.error;return{...u,mutate:f,mutateAsync:u.mutate}}export{J as u}; diff --git a/assets/usePapers-fw4Ivp2T.js b/assets/usePapers-K74IxnFM.js similarity index 95% rename from assets/usePapers-fw4Ivp2T.js rename to assets/usePapers-K74IxnFM.js index e050ddf43a2af9dfe4f6e477970d2907ed7db127..504803a90971f82a9d378bd9c9b1fc2c0aa6e3c7 100644 --- a/assets/usePapers-fw4Ivp2T.js +++ b/assets/usePapers-K74IxnFM.js @@ -1 +1 @@ -import{p as g}from"./paperQueryKeys-BP2E-0yf.js";import{af as y}from"./index-CnBotBa4.js";import{u as x}from"./useQuery-C8pfCInN.js";import{u as m}from"./useInfiniteQuery-DUlXElgD.js";import{p as h}from"./papers-DkTdvzl4.js";function I(a,e=!0){return x({queryKey:g.detail(a),queryFn:()=>h.get(a),enabled:e&&!!a,staleTime:10*60*1e3,refetchOnWindowFocus:!1})}function K(a={}){const{page_size:e=20,search:t,order_by:s="date_published",order_dir:n="desc",start_date:i,end_date:o,conference:r,task:u,method:l,latest_only:d=!0,include_resources:c=!1,has_code:f=!1,has_hf_artifacts:p=!1,framework:_,repository:b,author:F,enabled:k=!0}=a;return m({queryKey:[...g.feeds.infinite,{page_size:e,search:t,order_by:s,order_dir:n,start_date:i,end_date:o,conference:r,task:u,method:l,latest_only:d,include_resources:c,has_code:f,has_hf_artifacts:p,framework:_,repository:b,author:F}],queryFn:({pageParam:P=1})=>h.list({page:P,page_size:e,search:t,order_by:s,order_dir:n,start_date:i,end_date:o,conference:r,task:u,method:l,latest_only:d,include_resources:c,has_code:f,has_hf_artifacts:p,framework:_,repository:b,author:F}),getNextPageParam:P=>P.next_page,initialPageParam:1,enabled:k,staleTime:5*60*1e3,placeholderData:y,refetchOnWindowFocus:!1})}function D({q:a,order_by:e="relevance",start_date:t,end_date:s,has_code:n=!1,has_hf_artifacts:i=!1,enabled:o=!0}){return m({queryKey:[...g.feeds.search,{q:a,order_by:e,start_date:t,end_date:s,has_code:n,has_hf_artifacts:i}],queryFn:({pageParam:r=1})=>h.searchFeed({q:a,page:r,page_size:20,order_by:e,start_date:t,end_date:s,has_code:n,has_hf_artifacts:i,mode:"hybrid"}),getNextPageParam:r=>r.next_page,initialPageParam:1,enabled:o&&a.trim().length>0,staleTime:5*60*1e3,placeholderData:y,refetchOnWindowFocus:!1})}function W(a){const{taskId:e,page_size:t=20,order_by:s="date_published",order_dir:n="desc",latest_only:i=!0,include_resources:o=!0,has_code:r=!1,has_hf_artifacts:u=!1,start_date:l,end_date:d,enabled:c=!0}=a;return m({queryKey:[...g.feeds.task,e,{page_size:t,order_by:s,order_dir:n,latest_only:i,include_resources:o,has_code:r,has_hf_artifacts:u,start_date:l,end_date:d}],queryFn:({pageParam:f=1})=>h.forTask(e,{page:f,page_size:t,order_by:s,order_dir:n,latest_only:i,include_resources:o,repository_limit:1,has_code:r,has_hf_artifacts:u,start_date:l,end_date:d}),getNextPageParam:f=>f.next_page,initialPageParam:1,enabled:c&&!!e,staleTime:5*60*1e3,placeholderData:y,refetchOnWindowFocus:!1})}function N(a){const{conferenceSlug:e,taskSlug:t,presentation:s,page_size:n=20,order_by:i="date_published",order_dir:o="desc",latest_only:r=!0,include_resources:u=!0,has_code:l=!1,has_hf_artifacts:d=!1,start_date:c,end_date:f,enabled:p=!0}=a;return m({queryKey:[...g.feeds.conference,e,t,s,{page_size:n,order_by:i,order_dir:o,latest_only:r,include_resources:u,has_code:l,has_hf_artifacts:d,start_date:c,end_date:f}],queryFn:({pageParam:_=1})=>h.forConference(e,{task:t,presentation:s,page:_,page_size:n,order_by:i,order_dir:o,latest_only:r,include_resources:u,has_code:l,has_hf_artifacts:d,start_date:c,end_date:f}),getNextPageParam:_=>_.next_page,initialPageParam:1,enabled:p&&!!e,staleTime:5*60*1e3,placeholderData:y,refetchOnWindowFocus:!1})}function S(a){const{organizationSlug:e,taskSlug:t,page_size:s=20,order_by:n="date_published",order_dir:i="desc",latest_only:o=!0,include_resources:r=!0,has_code:u=!1,has_hf_artifacts:l=!1,start_date:d,end_date:c,enabled:f=!0}=a;return m({queryKey:[...g.feeds.organization,e,t,{page_size:s,order_by:n,order_dir:i,latest_only:o,include_resources:r,has_code:u,has_hf_artifacts:l,start_date:d,end_date:c}],queryFn:({pageParam:p=1})=>h.forOrganization(e,{task:t,page:p,page_size:s,order_by:n,order_dir:i,latest_only:o,include_resources:r,has_code:u,has_hf_artifacts:l,start_date:d,end_date:c}),getNextPageParam:p=>p.next_page,initialPageParam:1,enabled:f&&!!e,staleTime:5*60*1e3,placeholderData:y,refetchOnWindowFocus:!1})}export{D as a,I as b,W as c,N as d,S as e,K as u}; +import{p as g}from"./paperQueryKeys-BP2E-0yf.js";import{af as y}from"./index-hxawG6mk.js";import{u as x}from"./useQuery-B7vCF2Os.js";import{u as m}from"./useInfiniteQuery-BIEmOe8z.js";import{p as h}from"./papers-B0ysePyJ.js";function I(a,e=!0){return x({queryKey:g.detail(a),queryFn:()=>h.get(a),enabled:e&&!!a,staleTime:10*60*1e3,refetchOnWindowFocus:!1})}function K(a={}){const{page_size:e=20,search:t,order_by:s="date_published",order_dir:n="desc",start_date:i,end_date:o,conference:r,task:u,method:l,latest_only:d=!0,include_resources:c=!1,has_code:f=!1,has_hf_artifacts:p=!1,framework:_,repository:b,author:F,enabled:k=!0}=a;return m({queryKey:[...g.feeds.infinite,{page_size:e,search:t,order_by:s,order_dir:n,start_date:i,end_date:o,conference:r,task:u,method:l,latest_only:d,include_resources:c,has_code:f,has_hf_artifacts:p,framework:_,repository:b,author:F}],queryFn:({pageParam:P=1})=>h.list({page:P,page_size:e,search:t,order_by:s,order_dir:n,start_date:i,end_date:o,conference:r,task:u,method:l,latest_only:d,include_resources:c,has_code:f,has_hf_artifacts:p,framework:_,repository:b,author:F}),getNextPageParam:P=>P.next_page,initialPageParam:1,enabled:k,staleTime:5*60*1e3,placeholderData:y,refetchOnWindowFocus:!1})}function D({q:a,order_by:e="relevance",start_date:t,end_date:s,has_code:n=!1,has_hf_artifacts:i=!1,enabled:o=!0}){return m({queryKey:[...g.feeds.search,{q:a,order_by:e,start_date:t,end_date:s,has_code:n,has_hf_artifacts:i}],queryFn:({pageParam:r=1})=>h.searchFeed({q:a,page:r,page_size:20,order_by:e,start_date:t,end_date:s,has_code:n,has_hf_artifacts:i,mode:"hybrid"}),getNextPageParam:r=>r.next_page,initialPageParam:1,enabled:o&&a.trim().length>0,staleTime:5*60*1e3,placeholderData:y,refetchOnWindowFocus:!1})}function W(a){const{taskId:e,page_size:t=20,order_by:s="date_published",order_dir:n="desc",latest_only:i=!0,include_resources:o=!0,has_code:r=!1,has_hf_artifacts:u=!1,start_date:l,end_date:d,enabled:c=!0}=a;return m({queryKey:[...g.feeds.task,e,{page_size:t,order_by:s,order_dir:n,latest_only:i,include_resources:o,has_code:r,has_hf_artifacts:u,start_date:l,end_date:d}],queryFn:({pageParam:f=1})=>h.forTask(e,{page:f,page_size:t,order_by:s,order_dir:n,latest_only:i,include_resources:o,repository_limit:1,has_code:r,has_hf_artifacts:u,start_date:l,end_date:d}),getNextPageParam:f=>f.next_page,initialPageParam:1,enabled:c&&!!e,staleTime:5*60*1e3,placeholderData:y,refetchOnWindowFocus:!1})}function N(a){const{conferenceSlug:e,taskSlug:t,presentation:s,page_size:n=20,order_by:i="date_published",order_dir:o="desc",latest_only:r=!0,include_resources:u=!0,has_code:l=!1,has_hf_artifacts:d=!1,start_date:c,end_date:f,enabled:p=!0}=a;return m({queryKey:[...g.feeds.conference,e,t,s,{page_size:n,order_by:i,order_dir:o,latest_only:r,include_resources:u,has_code:l,has_hf_artifacts:d,start_date:c,end_date:f}],queryFn:({pageParam:_=1})=>h.forConference(e,{task:t,presentation:s,page:_,page_size:n,order_by:i,order_dir:o,latest_only:r,include_resources:u,has_code:l,has_hf_artifacts:d,start_date:c,end_date:f}),getNextPageParam:_=>_.next_page,initialPageParam:1,enabled:p&&!!e,staleTime:5*60*1e3,placeholderData:y,refetchOnWindowFocus:!1})}function S(a){const{organizationSlug:e,taskSlug:t,page_size:s=20,order_by:n="date_published",order_dir:i="desc",latest_only:o=!0,include_resources:r=!0,has_code:u=!1,has_hf_artifacts:l=!1,start_date:d,end_date:c,enabled:f=!0}=a;return m({queryKey:[...g.feeds.organization,e,t,{page_size:s,order_by:n,order_dir:i,latest_only:o,include_resources:r,has_code:u,has_hf_artifacts:l,start_date:d,end_date:c}],queryFn:({pageParam:p=1})=>h.forOrganization(e,{task:t,page:p,page_size:s,order_by:n,order_dir:i,latest_only:o,include_resources:r,has_code:u,has_hf_artifacts:l,start_date:d,end_date:c}),getNextPageParam:p=>p.next_page,initialPageParam:1,enabled:f&&!!e,staleTime:5*60*1e3,placeholderData:y,refetchOnWindowFocus:!1})}export{D as a,I as b,W as c,N as d,S as e,K as u}; diff --git a/assets/useQuery-C8pfCInN.js b/assets/useQuery-B7vCF2Os.js similarity index 99% rename from assets/useQuery-C8pfCInN.js rename to assets/useQuery-B7vCF2Os.js index 78e238d99928416ec79d1ad8f80b50fc9670350b..394533f92f571cce3b67157299c8db2cec7f29ed 100644 --- a/assets/useQuery-C8pfCInN.js +++ b/assets/useQuery-B7vCF2Os.js @@ -1 +1 @@ -var bt=s=>{throw TypeError(s)};var $=(s,t,e)=>t.has(s)||bt("Cannot "+e);var i=(s,t,e)=>($(s,t,"read from private field"),e?e.call(s):t.get(s)),p=(s,t,e)=>t.has(s)?bt("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(s):t.set(s,e),u=(s,t,e,r)=>($(s,t,"write to private field"),r?r.call(s,e):t.set(s,e),e),l=(s,t,e)=>($(s,t,"access private method"),e);import{aw as Tt,ax as gt,ay as S,az as q,aA as H,aB as tt,aC as et,aD as mt,aE as Mt,aF as J,aG as Qt,aH as xt,aI as vt,aJ as Ct,r as O,aK as Ot,m as _t}from"./index-CnBotBa4.js";var m,a,j,g,x,U,C,w,z,P,L,_,F,T,N,n,A,st,it,rt,at,nt,ht,ot,It,Et,Ft=(Et=class extends Tt{constructor(t,e){super();p(this,n);p(this,m);p(this,a);p(this,j);p(this,g);p(this,x);p(this,U);p(this,C);p(this,w);p(this,z);p(this,P);p(this,L);p(this,_);p(this,F);p(this,T);p(this,N,new Set);this.options=e,u(this,m,t),u(this,w,null),u(this,C,gt()),this.bindMethods(),this.setOptions(e)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(i(this,a).addObserver(this),Rt(i(this,a),this.options)?l(this,n,A).call(this):this.updateResult(),l(this,n,at).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return ct(i(this,a),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return ct(i(this,a),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,l(this,n,nt).call(this),l(this,n,ht).call(this),i(this,a).removeObserver(this)}setOptions(t){const e=this.options,r=i(this,a);if(this.options=i(this,m).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof S(this.options.enabled,i(this,a))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");l(this,n,ot).call(this),i(this,a).setOptions(this.options),e._defaulted&&!q(this.options,e)&&i(this,m).getQueryCache().notify({type:"observerOptionsUpdated",query:i(this,a),observer:this});const h=this.hasListeners();h&&St(i(this,a),r,this.options,e)&&l(this,n,A).call(this),this.updateResult(),h&&(i(this,a)!==r||S(this.options.enabled,i(this,a))!==S(e.enabled,i(this,a))||H(this.options.staleTime,i(this,a))!==H(e.staleTime,i(this,a)))&&l(this,n,st).call(this);const o=l(this,n,it).call(this);h&&(i(this,a)!==r||S(this.options.enabled,i(this,a))!==S(e.enabled,i(this,a))||o!==i(this,T))&&l(this,n,rt).call(this,o)}getOptimisticResult(t){const e=i(this,m).getQueryCache().build(i(this,m),t),r=this.createResult(e,t);return Ut(this,r)&&(u(this,g,r),u(this,U,this.options),u(this,x,i(this,a).state)),r}getCurrentResult(){return i(this,g)}trackResult(t,e){return new Proxy(t,{get:(r,h)=>(this.trackProp(h),e==null||e(h),h==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&i(this,C).status==="pending"&&i(this,C).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(r,h))})}trackProp(t){i(this,N).add(t)}getCurrentQuery(){return i(this,a)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const e=i(this,m).defaultQueryOptions(t),r=i(this,m).getQueryCache().build(i(this,m),e);return r.fetch().then(()=>this.createResult(r,e))}fetch(t){return l(this,n,A).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),i(this,g)))}createResult(t,e){var ft;const r=i(this,a),h=this.options,o=i(this,g),c=i(this,x),y=i(this,U),b=t!==r?t.state:i(this,j),{state:E}=t;let d={...E},M=!1,f;if(e._optimisticResults){const R=this.hasListeners(),k=!R&&Rt(t,e),V=R&&St(t,r,e,h);(k||V)&&(d={...d,...xt(E.data,t.options)}),e._optimisticResults==="isRestoring"&&(d.fetchStatus="idle")}let{error:Q,errorUpdatedAt:B,status:v}=d;f=d.data;let W=!1;if(e.placeholderData!==void 0&&f===void 0&&v==="pending"){let R;o!=null&&o.isPlaceholderData&&e.placeholderData===(y==null?void 0:y.placeholderData)?(R=o.data,W=!0):R=typeof e.placeholderData=="function"?e.placeholderData((ft=i(this,L))==null?void 0:ft.state.data,i(this,L)):e.placeholderData,R!==void 0&&(v="success",f=vt(o==null?void 0:o.data,R,e),M=!0)}if(e.select&&f!==void 0&&!W)if(o&&f===(c==null?void 0:c.data)&&e.select===i(this,z))f=i(this,P);else try{u(this,z,e.select),f=e.select(f),f=vt(o==null?void 0:o.data,f,e),u(this,P,f),u(this,w,null)}catch(R){u(this,w,R)}i(this,w)&&(Q=i(this,w),f=i(this,P),B=Date.now(),v="error");const X=d.fetchStatus==="fetching",Y=v==="pending",Z=v==="error",lt=Y&&X,dt=f!==void 0,I={status:v,fetchStatus:d.fetchStatus,isPending:Y,isSuccess:v==="success",isError:Z,isInitialLoading:lt,isLoading:lt,data:f,dataUpdatedAt:d.dataUpdatedAt,error:Q,errorUpdatedAt:B,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:d.dataUpdateCount>b.dataUpdateCount||d.errorUpdateCount>b.errorUpdateCount,isFetching:X,isRefetching:X&&!Y,isLoadingError:Z&&!dt,isPaused:d.fetchStatus==="paused",isPlaceholderData:M,isRefetchError:Z&&dt,isStale:ut(t,e),refetch:this.refetch,promise:i(this,C),isEnabled:S(e.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const R=I.data!==void 0,k=I.status==="error"&&!R,V=G=>{k?G.reject(I.error):R&&G.resolve(I.data)},pt=()=>{const G=u(this,C,I.promise=gt());V(G)},K=i(this,C);switch(K.status){case"pending":t.queryHash===r.queryHash&&V(K);break;case"fulfilled":(k||I.data!==K.value)&&pt();break;case"rejected":(!k||I.error!==K.reason)&&pt();break}}return I}updateResult(){const t=i(this,g),e=this.createResult(i(this,a),this.options);if(u(this,x,i(this,a).state),u(this,U,this.options),i(this,x).data!==void 0&&u(this,L,i(this,a)),q(e,t))return;u(this,g,e);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:h}=this.options,o=typeof h=="function"?h():h;if(o==="all"||!o&&!i(this,N).size)return!0;const c=new Set(o??i(this,N));return this.options.throwOnError&&c.add("error"),Object.keys(i(this,g)).some(y=>{const D=y;return i(this,g)[D]!==t[D]&&c.has(D)})};l(this,n,It).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&l(this,n,at).call(this)}},m=new WeakMap,a=new WeakMap,j=new WeakMap,g=new WeakMap,x=new WeakMap,U=new WeakMap,C=new WeakMap,w=new WeakMap,z=new WeakMap,P=new WeakMap,L=new WeakMap,_=new WeakMap,F=new WeakMap,T=new WeakMap,N=new WeakMap,n=new WeakSet,A=function(t){l(this,n,ot).call(this);let e=i(this,a).fetch(this.options,t);return t!=null&&t.throwOnError||(e=e.catch(tt)),e},st=function(){l(this,n,nt).call(this);const t=H(this.options.staleTime,i(this,a));if(et.isServer()||i(this,g).isStale||!mt(t))return;const r=Mt(i(this,g).dataUpdatedAt,t)+1;u(this,_,J.setTimeout(()=>{i(this,g).isStale||this.updateResult()},r))},it=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(i(this,a)):this.options.refetchInterval)??!1},rt=function(t){l(this,n,ht).call(this),u(this,T,t),!(et.isServer()||S(this.options.enabled,i(this,a))===!1||!mt(i(this,T))||i(this,T)===0)&&u(this,F,J.setInterval(()=>{(this.options.refetchIntervalInBackground||Qt.isFocused())&&l(this,n,A).call(this)},i(this,T)))},at=function(){l(this,n,st).call(this),l(this,n,rt).call(this,l(this,n,it).call(this))},nt=function(){i(this,_)!==void 0&&(J.clearTimeout(i(this,_)),u(this,_,void 0))},ht=function(){i(this,F)!==void 0&&(J.clearInterval(i(this,F)),u(this,F,void 0))},ot=function(){const t=i(this,m).getQueryCache().build(i(this,m),this.options);if(t===i(this,a))return;const e=i(this,a);u(this,a,t),u(this,j,t.state),this.hasListeners()&&(e==null||e.removeObserver(this),t.addObserver(this))},It=function(t){Ct.batch(()=>{t.listeners&&this.listeners.forEach(e=>{e(i(this,g))}),i(this,m).getQueryCache().notify({query:i(this,a),type:"observerResultsUpdated"})})},Et);function Dt(s,t){return S(t.enabled,s)!==!1&&s.state.data===void 0&&!(s.state.status==="error"&&S(t.retryOnMount,s)===!1)}function Rt(s,t){return Dt(s,t)||s.state.data!==void 0&&ct(s,t,t.refetchOnMount)}function ct(s,t,e){if(S(t.enabled,s)!==!1&&H(t.staleTime,s)!=="static"){const r=typeof e=="function"?e(s):e;return r==="always"||r!==!1&&ut(s,t)}return!1}function St(s,t,e,r){return(s!==t||S(r.enabled,s)===!1)&&(!e.suspense||s.state.status!=="error")&&ut(s,e)}function ut(s,t){return S(t.enabled,s)!==!1&&s.isStaleByTime(H(t.staleTime,s))}function Ut(s,t){return!q(s.getCurrentResult(),t)}var wt=O.createContext(!1),Pt=()=>O.useContext(wt);wt.Provider;function Lt(){let s=!1;return{clearReset:()=>{s=!1},reset:()=>{s=!0},isReset:()=>s}}var Nt=O.createContext(Lt()),Bt=()=>O.useContext(Nt),kt=(s,t,e)=>{const r=e!=null&&e.state.error&&typeof s.throwOnError=="function"?Ot(s.throwOnError,[e.state.error,e]):s.throwOnError;(s.suspense||s.experimental_prefetchInRender||r)&&(t.isReset()||(s.retryOnMount=!1))},At=s=>{O.useEffect(()=>{s.clearReset()},[s])},Ht=({result:s,errorResetBoundary:t,throwOnError:e,query:r,suspense:h})=>s.isError&&!t.isReset()&&!s.isFetching&&r&&(h&&s.data===void 0||Ot(e,[s.error,r])),jt=s=>{if(s.suspense){const e=h=>h==="static"?h:Math.max(h??1e3,1e3),r=s.staleTime;s.staleTime=typeof r=="function"?(...h)=>e(r(...h)):e(r),typeof s.gcTime=="number"&&(s.gcTime=Math.max(s.gcTime,1e3))}},zt=(s,t)=>s.isLoading&&s.isFetching&&!t,Wt=(s,t)=>(s==null?void 0:s.suspense)&&t.isPending,yt=(s,t,e)=>t.fetchOptimistic(s).catch(()=>{e.clearReset()});function Vt(s,t,e){var M,f,Q,B;const r=Pt(),h=Bt(),o=_t(),c=o.defaultQueryOptions(s);(f=(M=o.getDefaultOptions().queries)==null?void 0:M._experimental_beforeQuery)==null||f.call(M,c);const y=o.getQueryCache().get(c.queryHash);c._optimisticResults=r?"isRestoring":"optimistic",jt(c),kt(c,h,y),At(h);const D=!o.getQueryCache().get(c.queryHash),[b]=O.useState(()=>new t(o,c)),E=b.getOptimisticResult(c),d=!r&&s.subscribed!==!1;if(O.useSyncExternalStore(O.useCallback(v=>{const W=d?b.subscribe(Ct.batchCalls(v)):tt;return b.updateResult(),W},[b,d]),()=>b.getCurrentResult(),()=>b.getCurrentResult()),O.useEffect(()=>{b.setOptions(c)},[c,b]),Wt(c,E))throw yt(c,b,h);if(Ht({result:E,errorResetBoundary:h,throwOnError:c.throwOnError,query:y,suspense:c.suspense}))throw E.error;if((B=(Q=o.getDefaultOptions().queries)==null?void 0:Q._experimental_afterQuery)==null||B.call(Q,c,E),c.experimental_prefetchInRender&&!et.isServer()&&zt(E,r)){const v=D?yt(c,b,h):y==null?void 0:y.promise;v==null||v.catch(tt).finally(()=>{b.updateResult()})}return c.notifyOnChangeProps?E:b.trackResult(E)}function Xt(s,t){return Vt(s,Ft)}export{Ft as Q,Vt as a,Pt as b,Bt as c,kt as d,jt as e,At as f,yt as g,Ht as h,Wt as s,Xt as u}; +var bt=s=>{throw TypeError(s)};var $=(s,t,e)=>t.has(s)||bt("Cannot "+e);var i=(s,t,e)=>($(s,t,"read from private field"),e?e.call(s):t.get(s)),p=(s,t,e)=>t.has(s)?bt("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(s):t.set(s,e),u=(s,t,e,r)=>($(s,t,"write to private field"),r?r.call(s,e):t.set(s,e),e),l=(s,t,e)=>($(s,t,"access private method"),e);import{aw as Tt,ax as gt,ay as S,az as q,aA as H,aB as tt,aC as et,aD as mt,aE as Mt,aF as J,aG as Qt,aH as xt,aI as vt,aJ as Ct,r as O,aK as Ot,m as _t}from"./index-hxawG6mk.js";var m,a,j,g,x,U,C,w,z,P,L,_,F,T,N,n,A,st,it,rt,at,nt,ht,ot,It,Et,Ft=(Et=class extends Tt{constructor(t,e){super();p(this,n);p(this,m);p(this,a);p(this,j);p(this,g);p(this,x);p(this,U);p(this,C);p(this,w);p(this,z);p(this,P);p(this,L);p(this,_);p(this,F);p(this,T);p(this,N,new Set);this.options=e,u(this,m,t),u(this,w,null),u(this,C,gt()),this.bindMethods(),this.setOptions(e)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(i(this,a).addObserver(this),Rt(i(this,a),this.options)?l(this,n,A).call(this):this.updateResult(),l(this,n,at).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return ct(i(this,a),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return ct(i(this,a),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,l(this,n,nt).call(this),l(this,n,ht).call(this),i(this,a).removeObserver(this)}setOptions(t){const e=this.options,r=i(this,a);if(this.options=i(this,m).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof S(this.options.enabled,i(this,a))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");l(this,n,ot).call(this),i(this,a).setOptions(this.options),e._defaulted&&!q(this.options,e)&&i(this,m).getQueryCache().notify({type:"observerOptionsUpdated",query:i(this,a),observer:this});const h=this.hasListeners();h&&St(i(this,a),r,this.options,e)&&l(this,n,A).call(this),this.updateResult(),h&&(i(this,a)!==r||S(this.options.enabled,i(this,a))!==S(e.enabled,i(this,a))||H(this.options.staleTime,i(this,a))!==H(e.staleTime,i(this,a)))&&l(this,n,st).call(this);const o=l(this,n,it).call(this);h&&(i(this,a)!==r||S(this.options.enabled,i(this,a))!==S(e.enabled,i(this,a))||o!==i(this,T))&&l(this,n,rt).call(this,o)}getOptimisticResult(t){const e=i(this,m).getQueryCache().build(i(this,m),t),r=this.createResult(e,t);return Ut(this,r)&&(u(this,g,r),u(this,U,this.options),u(this,x,i(this,a).state)),r}getCurrentResult(){return i(this,g)}trackResult(t,e){return new Proxy(t,{get:(r,h)=>(this.trackProp(h),e==null||e(h),h==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&i(this,C).status==="pending"&&i(this,C).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(r,h))})}trackProp(t){i(this,N).add(t)}getCurrentQuery(){return i(this,a)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const e=i(this,m).defaultQueryOptions(t),r=i(this,m).getQueryCache().build(i(this,m),e);return r.fetch().then(()=>this.createResult(r,e))}fetch(t){return l(this,n,A).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),i(this,g)))}createResult(t,e){var ft;const r=i(this,a),h=this.options,o=i(this,g),c=i(this,x),y=i(this,U),b=t!==r?t.state:i(this,j),{state:E}=t;let d={...E},M=!1,f;if(e._optimisticResults){const R=this.hasListeners(),k=!R&&Rt(t,e),V=R&&St(t,r,e,h);(k||V)&&(d={...d,...xt(E.data,t.options)}),e._optimisticResults==="isRestoring"&&(d.fetchStatus="idle")}let{error:Q,errorUpdatedAt:B,status:v}=d;f=d.data;let W=!1;if(e.placeholderData!==void 0&&f===void 0&&v==="pending"){let R;o!=null&&o.isPlaceholderData&&e.placeholderData===(y==null?void 0:y.placeholderData)?(R=o.data,W=!0):R=typeof e.placeholderData=="function"?e.placeholderData((ft=i(this,L))==null?void 0:ft.state.data,i(this,L)):e.placeholderData,R!==void 0&&(v="success",f=vt(o==null?void 0:o.data,R,e),M=!0)}if(e.select&&f!==void 0&&!W)if(o&&f===(c==null?void 0:c.data)&&e.select===i(this,z))f=i(this,P);else try{u(this,z,e.select),f=e.select(f),f=vt(o==null?void 0:o.data,f,e),u(this,P,f),u(this,w,null)}catch(R){u(this,w,R)}i(this,w)&&(Q=i(this,w),f=i(this,P),B=Date.now(),v="error");const X=d.fetchStatus==="fetching",Y=v==="pending",Z=v==="error",lt=Y&&X,dt=f!==void 0,I={status:v,fetchStatus:d.fetchStatus,isPending:Y,isSuccess:v==="success",isError:Z,isInitialLoading:lt,isLoading:lt,data:f,dataUpdatedAt:d.dataUpdatedAt,error:Q,errorUpdatedAt:B,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:d.dataUpdateCount>b.dataUpdateCount||d.errorUpdateCount>b.errorUpdateCount,isFetching:X,isRefetching:X&&!Y,isLoadingError:Z&&!dt,isPaused:d.fetchStatus==="paused",isPlaceholderData:M,isRefetchError:Z&&dt,isStale:ut(t,e),refetch:this.refetch,promise:i(this,C),isEnabled:S(e.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const R=I.data!==void 0,k=I.status==="error"&&!R,V=G=>{k?G.reject(I.error):R&&G.resolve(I.data)},pt=()=>{const G=u(this,C,I.promise=gt());V(G)},K=i(this,C);switch(K.status){case"pending":t.queryHash===r.queryHash&&V(K);break;case"fulfilled":(k||I.data!==K.value)&&pt();break;case"rejected":(!k||I.error!==K.reason)&&pt();break}}return I}updateResult(){const t=i(this,g),e=this.createResult(i(this,a),this.options);if(u(this,x,i(this,a).state),u(this,U,this.options),i(this,x).data!==void 0&&u(this,L,i(this,a)),q(e,t))return;u(this,g,e);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:h}=this.options,o=typeof h=="function"?h():h;if(o==="all"||!o&&!i(this,N).size)return!0;const c=new Set(o??i(this,N));return this.options.throwOnError&&c.add("error"),Object.keys(i(this,g)).some(y=>{const D=y;return i(this,g)[D]!==t[D]&&c.has(D)})};l(this,n,It).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&l(this,n,at).call(this)}},m=new WeakMap,a=new WeakMap,j=new WeakMap,g=new WeakMap,x=new WeakMap,U=new WeakMap,C=new WeakMap,w=new WeakMap,z=new WeakMap,P=new WeakMap,L=new WeakMap,_=new WeakMap,F=new WeakMap,T=new WeakMap,N=new WeakMap,n=new WeakSet,A=function(t){l(this,n,ot).call(this);let e=i(this,a).fetch(this.options,t);return t!=null&&t.throwOnError||(e=e.catch(tt)),e},st=function(){l(this,n,nt).call(this);const t=H(this.options.staleTime,i(this,a));if(et.isServer()||i(this,g).isStale||!mt(t))return;const r=Mt(i(this,g).dataUpdatedAt,t)+1;u(this,_,J.setTimeout(()=>{i(this,g).isStale||this.updateResult()},r))},it=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(i(this,a)):this.options.refetchInterval)??!1},rt=function(t){l(this,n,ht).call(this),u(this,T,t),!(et.isServer()||S(this.options.enabled,i(this,a))===!1||!mt(i(this,T))||i(this,T)===0)&&u(this,F,J.setInterval(()=>{(this.options.refetchIntervalInBackground||Qt.isFocused())&&l(this,n,A).call(this)},i(this,T)))},at=function(){l(this,n,st).call(this),l(this,n,rt).call(this,l(this,n,it).call(this))},nt=function(){i(this,_)!==void 0&&(J.clearTimeout(i(this,_)),u(this,_,void 0))},ht=function(){i(this,F)!==void 0&&(J.clearInterval(i(this,F)),u(this,F,void 0))},ot=function(){const t=i(this,m).getQueryCache().build(i(this,m),this.options);if(t===i(this,a))return;const e=i(this,a);u(this,a,t),u(this,j,t.state),this.hasListeners()&&(e==null||e.removeObserver(this),t.addObserver(this))},It=function(t){Ct.batch(()=>{t.listeners&&this.listeners.forEach(e=>{e(i(this,g))}),i(this,m).getQueryCache().notify({query:i(this,a),type:"observerResultsUpdated"})})},Et);function Dt(s,t){return S(t.enabled,s)!==!1&&s.state.data===void 0&&!(s.state.status==="error"&&S(t.retryOnMount,s)===!1)}function Rt(s,t){return Dt(s,t)||s.state.data!==void 0&&ct(s,t,t.refetchOnMount)}function ct(s,t,e){if(S(t.enabled,s)!==!1&&H(t.staleTime,s)!=="static"){const r=typeof e=="function"?e(s):e;return r==="always"||r!==!1&&ut(s,t)}return!1}function St(s,t,e,r){return(s!==t||S(r.enabled,s)===!1)&&(!e.suspense||s.state.status!=="error")&&ut(s,e)}function ut(s,t){return S(t.enabled,s)!==!1&&s.isStaleByTime(H(t.staleTime,s))}function Ut(s,t){return!q(s.getCurrentResult(),t)}var wt=O.createContext(!1),Pt=()=>O.useContext(wt);wt.Provider;function Lt(){let s=!1;return{clearReset:()=>{s=!1},reset:()=>{s=!0},isReset:()=>s}}var Nt=O.createContext(Lt()),Bt=()=>O.useContext(Nt),kt=(s,t,e)=>{const r=e!=null&&e.state.error&&typeof s.throwOnError=="function"?Ot(s.throwOnError,[e.state.error,e]):s.throwOnError;(s.suspense||s.experimental_prefetchInRender||r)&&(t.isReset()||(s.retryOnMount=!1))},At=s=>{O.useEffect(()=>{s.clearReset()},[s])},Ht=({result:s,errorResetBoundary:t,throwOnError:e,query:r,suspense:h})=>s.isError&&!t.isReset()&&!s.isFetching&&r&&(h&&s.data===void 0||Ot(e,[s.error,r])),jt=s=>{if(s.suspense){const e=h=>h==="static"?h:Math.max(h??1e3,1e3),r=s.staleTime;s.staleTime=typeof r=="function"?(...h)=>e(r(...h)):e(r),typeof s.gcTime=="number"&&(s.gcTime=Math.max(s.gcTime,1e3))}},zt=(s,t)=>s.isLoading&&s.isFetching&&!t,Wt=(s,t)=>(s==null?void 0:s.suspense)&&t.isPending,yt=(s,t,e)=>t.fetchOptimistic(s).catch(()=>{e.clearReset()});function Vt(s,t,e){var M,f,Q,B;const r=Pt(),h=Bt(),o=_t(),c=o.defaultQueryOptions(s);(f=(M=o.getDefaultOptions().queries)==null?void 0:M._experimental_beforeQuery)==null||f.call(M,c);const y=o.getQueryCache().get(c.queryHash);c._optimisticResults=r?"isRestoring":"optimistic",jt(c),kt(c,h,y),At(h);const D=!o.getQueryCache().get(c.queryHash),[b]=O.useState(()=>new t(o,c)),E=b.getOptimisticResult(c),d=!r&&s.subscribed!==!1;if(O.useSyncExternalStore(O.useCallback(v=>{const W=d?b.subscribe(Ct.batchCalls(v)):tt;return b.updateResult(),W},[b,d]),()=>b.getCurrentResult(),()=>b.getCurrentResult()),O.useEffect(()=>{b.setOptions(c)},[c,b]),Wt(c,E))throw yt(c,b,h);if(Ht({result:E,errorResetBoundary:h,throwOnError:c.throwOnError,query:y,suspense:c.suspense}))throw E.error;if((B=(Q=o.getDefaultOptions().queries)==null?void 0:Q._experimental_afterQuery)==null||B.call(Q,c,E),c.experimental_prefetchInRender&&!et.isServer()&&zt(E,r)){const v=D?yt(c,b,h):y==null?void 0:y.promise;v==null||v.catch(tt).finally(()=>{b.updateResult()})}return c.notifyOnChangeProps?E:b.trackResult(E)}function Xt(s,t){return Vt(s,Ft)}export{Ft as Q,Vt as a,Pt as b,Bt as c,kt as d,jt as e,At as f,yt as g,Ht as h,Wt as s,Xt as u}; diff --git a/index.html b/index.html index 56ea7395e7d49dfd9371e8c758de7e13330ddc3a..6321d2c5cc794a15253ac6384fc373f1cffe358a 100644 --- a/index.html +++ b/index.html @@ -72,8 +72,8 @@ plausible.init(); })(); - - + +