diff --git a/assets/AiDeadlinesView-D4Hrlig2.js b/assets/AiDeadlinesView-DoOHv-cM.js similarity index 96% rename from assets/AiDeadlinesView-D4Hrlig2.js rename to assets/AiDeadlinesView-DoOHv-cM.js index f02467563a8b1e1a1289e287636ab79de1931202..8c4adf2debf66659c35f22f701adb9efe01c4223 100644 --- a/assets/AiDeadlinesView-D4Hrlig2.js +++ b/assets/AiDeadlinesView-DoOHv-cM.js @@ -1,3 +1,3 @@ -import{r as x,j as t}from"./index-Cry0GNHI.js";import{u as A}from"./useQuery-DlAfMYOD.js";import{c as B}from"./catalog-BjZE6R9z.js";import{S as U}from"./switch-rXZTYMbm.js";import{S as W}from"./skeleton-LwsL9heH.js";import{A as O,a as V}from"./alert-BAHZ4i9D.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-Dedt-uqk.js";import"./index-IfmCq-bY.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-Dt001B3A.js";import{u as A}from"./useQuery-DD4hUA6p.js";import{c as B}from"./catalog-BOpSeTzm.js";import{S as U}from"./switch-CqcBxohM.js";import{S as W}from"./skeleton-DkhIJUB4.js";import{A as O,a as V}from"./alert-Xa-AqUL5.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-Bs8pVXcH.js";import"./index-i7UOsfxV.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/ArtifactWorkspace-BDAI0t7b.js b/assets/ArtifactWorkspace-CMp03Kf3.js similarity index 99% rename from assets/ArtifactWorkspace-BDAI0t7b.js rename to assets/ArtifactWorkspace-CMp03Kf3.js index 3e2a0571073af1c952c645c4802563afc3a720ef..a576c7bd6cede5377e0e29c3e9e4596f03ed313c 100644 --- a/assets/ArtifactWorkspace-BDAI0t7b.js +++ b/assets/ArtifactWorkspace-CMp03Kf3.js @@ -1,4 +1,4 @@ -var xN=Object.defineProperty;var Mk=n=>{throw TypeError(n)};var EN=(n,e,t)=>e in n?xN(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var ie=(n,e,t)=>EN(n,typeof e!="symbol"?e+"":e,t),E0=(n,e,t)=>e.has(n)||Mk("Cannot "+t);var d=(n,e,t)=>(E0(n,e,"read from private field"),t?t.call(n):e.get(n)),R=(n,e,t)=>e.has(n)?Mk("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(n):e.set(n,t),E=(n,e,t,s)=>(E0(n,e,"write to private field"),s?s.call(n,t):e.set(n,t),t),C=(n,e,t)=>(E0(n,e,"access private method"),t);var is=(n,e,t,s)=>({set _(i){E(n,e,i,t)},get _(){return d(n,e,s)}});import{d as bo,r as Q,j as S,z as ee,S as g_,E as rn,_ as jp,U as Py,L as Ik,X as y_,g as CN,C as $N}from"./index-Cry0GNHI.js";import{u as sC,P as iC,b as rC,M as TN,R as PN,W as RN,d as v_,A as MN,l as IN,J as ON,K as NN,L as LN,N as oC,O as DN}from"./chatLaunch-DpNrK5mV.js";import"./katex.min-BSBacQyE.js";import{H as Ry,a as My,b as Iy}from"./hover-card-CbDqfS2l.js";import{u as ra}from"./useQuery-DlAfMYOD.js";import{f as FN,p as jN,T as zN}from"./github-Bll0eXy5.js";import{G as Oy}from"./github-D38gLg_l.js";import{r as HN,a as BN,P as aC}from"./PaperPreviewLink-CPKVU1Zw.js";import{M as qN,r as UN,d as VN}from"./index-D7CE3jjK.js";import{c as Ok}from"./chat-FW6HqAah.js";import{F as WN}from"./file-text-DXZT7Qxr.js";import{u as zp}from"./useMutation-C5zYPeQC.js";import{E as lC}from"./external-link-DIcR472K.js";/** +var xN=Object.defineProperty;var Mk=n=>{throw TypeError(n)};var EN=(n,e,t)=>e in n?xN(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var ie=(n,e,t)=>EN(n,typeof e!="symbol"?e+"":e,t),E0=(n,e,t)=>e.has(n)||Mk("Cannot "+t);var d=(n,e,t)=>(E0(n,e,"read from private field"),t?t.call(n):e.get(n)),R=(n,e,t)=>e.has(n)?Mk("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(n):e.set(n,t),E=(n,e,t,s)=>(E0(n,e,"write to private field"),s?s.call(n,t):e.set(n,t),t),C=(n,e,t)=>(E0(n,e,"access private method"),t);var is=(n,e,t,s)=>({set _(i){E(n,e,i,t)},get _(){return d(n,e,s)}});import{d as bo,r as Q,j as S,z as ee,S as g_,E as rn,_ as jp,U as Py,L as Ik,X as y_,g as CN,C as $N}from"./index-Dt001B3A.js";import{u as sC,P as iC,b as rC,M as TN,R as PN,W as RN,d as v_,A as MN,l as IN,J as ON,K as NN,L as LN,N as oC,O as DN}from"./chatLaunch-C8mQqa_z.js";import"./katex.min-BSBacQyE.js";import{H as Ry,a as My,b as Iy}from"./hover-card-C7JmPdFo.js";import{u as ra}from"./useQuery-DD4hUA6p.js";import{f as FN,p as jN,T as zN}from"./github-oD2gKV6Z.js";import{G as Oy}from"./github-TRZ4i_h7.js";import{r as HN,a as BN,P as aC}from"./PaperPreviewLink-CCwg7dvd.js";import{M as qN,r as UN,d as VN}from"./index-Byizcq9V.js";import{c as Ok}from"./chat-98y1Ufht.js";import{F as WN}from"./file-text-BXknBxd6.js";import{u as zp}from"./useMutation-BSdRNizq.js";import{E as lC}from"./external-link-DdqhM_eg.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/AuthorDetailView-DkyM2b_B.js b/assets/AuthorDetailView-49FXhHea.js similarity index 82% rename from assets/AuthorDetailView-DkyM2b_B.js rename to assets/AuthorDetailView-49FXhHea.js index bd3040188b7ec1737ead14d3ea3ad6d137867464..42659b12e6186401cc0c5579b04db9a24cda6376 100644 --- a/assets/AuthorDetailView-DkyM2b_B.js +++ b/assets/AuthorDetailView-49FXhHea.js @@ -1 +1 @@ -import{c as m,j as e,L as x}from"./index-Cry0GNHI.js";import{u as h}from"./useQuery-DlAfMYOD.js";import{p as d}from"./papers-CrgFFrmi.js";import{S as c}from"./skeleton-LwsL9heH.js";import g from"./NotFound-BSLpqWSh.js";const _=()=>{var i,l,n,o,u;const{authorId:a}=m(),r=h({queryKey:["author",a],queryFn:()=>d.getAuthor(a),enabled:!!a}),t=h({queryKey:["author-papers",a],queryFn:()=>d.authorPapers(a,{page:1,page_size:20}),enabled:!!a});return((i=r.error)==null?void 0:i.status)===404?e.jsx(g,{}):e.jsxs("div",{className:"page",children:[e.jsx("p",{className:"sidebar-label",children:"Author"}),e.jsx("h1",{className:"feed-title",children:((l=r.data)==null?void 0:l.full_name)??e.jsx(c,{className:"h-10 w-64 inline-block"})}),((n=r.data)==null?void 0:n.hf_username)&&e.jsxs("a",{href:`https://huggingface.co/${r.data.hf_username}`,target:"_blank",rel:"noopener noreferrer",children:["@",r.data.hf_username," on Hugging Face"]}),e.jsxs("section",{style:{marginTop:40},"aria-labelledby":"author-papers-heading",children:[e.jsx("h2",{id:"author-papers-heading",children:"Research papers"}),t.isLoading&&e.jsx(c,{className:"h-24 w-full mt-4"}),((o=t.data)==null?void 0:o.results.length)===0&&e.jsx("p",{children:"No public papers are available."}),e.jsx("ol",{className:"paper-list",children:(u=t.data)==null?void 0:u.results.map(s=>{const p=s.source==="external"?String(s.id):s.arxiv_id;return e.jsx("li",{children:e.jsx(x,{to:`/paper/${p}`,children:s.title})},s.id)})})]})]})};export{_ as default}; +import{c as m,j as e,L as x}from"./index-Dt001B3A.js";import{u as h}from"./useQuery-DD4hUA6p.js";import{p as d}from"./papers-KXkGPHI5.js";import{S as c}from"./skeleton-DkhIJUB4.js";import g from"./NotFound-CkQZGkjc.js";const _=()=>{var i,l,n,o,u;const{authorId:a}=m(),r=h({queryKey:["author",a],queryFn:()=>d.getAuthor(a),enabled:!!a}),t=h({queryKey:["author-papers",a],queryFn:()=>d.authorPapers(a,{page:1,page_size:20}),enabled:!!a});return((i=r.error)==null?void 0:i.status)===404?e.jsx(g,{}):e.jsxs("div",{className:"page",children:[e.jsx("p",{className:"sidebar-label",children:"Author"}),e.jsx("h1",{className:"feed-title",children:((l=r.data)==null?void 0:l.full_name)??e.jsx(c,{className:"h-10 w-64 inline-block"})}),((n=r.data)==null?void 0:n.hf_username)&&e.jsxs("a",{href:`https://huggingface.co/${r.data.hf_username}`,target:"_blank",rel:"noopener noreferrer",children:["@",r.data.hf_username," on Hugging Face"]}),e.jsxs("section",{style:{marginTop:40},"aria-labelledby":"author-papers-heading",children:[e.jsx("h2",{id:"author-papers-heading",children:"Research papers"}),t.isLoading&&e.jsx(c,{className:"h-24 w-full mt-4"}),((o=t.data)==null?void 0:o.results.length)===0&&e.jsx("p",{children:"No public papers are available."}),e.jsx("ol",{className:"paper-list",children:(u=t.data)==null?void 0:u.results.map(s=>{const p=s.source==="external"?String(s.id):s.arxiv_id;return e.jsx("li",{children:e.jsx(x,{to:`/paper/${p}`,children:s.title})},s.id)})})]})]})};export{_ as default}; diff --git a/assets/BenchmarkDetailView-CP6Bok1b.js b/assets/BenchmarkDetailView-DaFnh3b2.js similarity index 98% rename from assets/BenchmarkDetailView-CP6Bok1b.js rename to assets/BenchmarkDetailView-DaFnh3b2.js index 2110ce06b9966a84263e3bda2ef21596df303038..838397dc3fc04d907956948d57012e76a1b21a62 100644 --- a/assets/BenchmarkDetailView-CP6Bok1b.js +++ b/assets/BenchmarkDetailView-DaFnh3b2.js @@ -1,2 +1,2 @@ -import{u as Lt,r as v,j as s,s as ce,e as Mt,c as It,a as At,f as Bt,L as ae}from"./index-Cry0GNHI.js";import{u as ee}from"./useQuery-DlAfMYOD.js";import{c as ne}from"./catalog-BjZE6R9z.js";import{C as Dt,E as Ht,e as Vt}from"./ExternalSourceEvalBadge-CQ-fBLgc.js";import{S as ye}from"./skeleton-LwsL9heH.js";import{S as ot}from"./switch-rXZTYMbm.js";import{A as Ut,a as qt}from"./alert-BAHZ4i9D.js";import{L as ve}from"./LatexTitle-CLc_16Sj.js";import{B as Ot}from"./BenchmarkTrendSparkline-BJ3H66bV.js";import{I as Wt}from"./components-IPCTDA4d.js";import{s as zt}from"./safeExternalHref-CkBrsh84.js";import{s as Kt}from"./slug-BpH-Nkvz.js";import"./papers-CrgFFrmi.js";import"./hover-card-CbDqfS2l.js";import"./index-IfmCq-bY.js";import"./katex.min-BSBacQyE.js";import"./transform-b6MI1iSQ.js";function Gt(e,t,r){const a=t?(e??[]).filter(l=>l.task_id===t):e??[],n=a.filter(l=>l.is_open===!1),i=n.reduce((l,o)=>l?(o.best_rank??Number.POSITIVE_INFINITY)<(l.best_rank??Number.POSITIVE_INFINITY)?o:l:o,null);return{visible:r?a.filter(l=>l.is_open!==!1):a,hiddenClosed:n,topHiddenClosed:i}}function ct(e){const t=e.length===7?`${e}-01`:e,r=new Date(t).getTime();return Number.isFinite(r)?r:0}const Fe=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Le(e){const t=new Date(e);return{year:t.getFullYear(),month:t.getMonth()}}function Qt(e,t){if(e===t){const{year:m,month:g}=Le(e);return[{timestamp:new Date(m,g,1).getTime(),key:`${m}-${g}`,label:`${Fe[g]} ${m}`}]}const r=Le(e),a=Le(t);if(r.year===a.year){const m=a.month-r.month+1;let g=1;const h=12;m>h&&(g=Math.ceil(m/h));const y=[];for(let x=r.month;x<=a.month;x+=g)y.push({timestamp:new Date(r.year,x,1).getTime(),key:`${r.year}-${x}`,label:m<=3?`${Fe[x]} ${r.year}`:Fe[x]});return y}const n=a.year-r.year+1;let i=1;const l=12;n>l&&(i=Math.ceil(n/l));const o=[];for(let m=r.year;m<=a.year;m+=i)o.push({timestamp:new Date(m,0,1).getTime(),key:String(m),label:String(m)});return o}const Xt=({points:e,metric:t})=>{const r=Lt(),[a,n]=v.useState(null),i=880,l=320,o=60,m=30,g=40,h=50,y=e.map(d=>d.value),x=Math.min(...y),z=Math.max(...y)-x||1,de=i-o-m,M=l-g-h,T=e.map(d=>ct(d.date)),X=Math.min(...T),I=Math.max(...T),ue=I-X||1,te=d=>X===I?o+de/2:o+(d-X)/ue*de,Y=e.map((d,f)=>{const R=te(ct(d.date)),_=(d.value-x)/z,w=g+M*(1-_);return{x:R,y:w,data:d,idx:f}}),N=Y.filter(d=>d.data.isSota);let q="";if(N.length>=2){q=`M${N[0].x},${N[0].y}`;for(let d=1;d{const f=d.data.modelName||d.data.paperTitle||"";if(!f)return null;const R=f.length>22?f.slice(0,21)+"…":f,_=R.length*D;let w=d.x-_/2,j=d.x+_/2,V="middle";return wi-m&&(j=i-m,w=j-_,V="end"),{x:V==="start"?o:V==="end"?i-m:d.x,y:d.y-Se,text:R,anchor:V,left:w,right:j}},P=[],O=N.length>0?J(N[N.length-1]):null;let me=-1/0;for(let d=0;dO.left-re||(me=f.right,P.push({x:f.x,y:f.y,text:f.text,anchor:f.anchor})))}O&&P.push({x:O.x,y:O.y,text:O.text,anchor:O.anchor});const He=Qt(X,I),b=5,Ce=d=>n(f=>f===d?null:f),K=d=>{d&&r(`/paper/${d}`)},G=(d,f)=>{const _=`${d.data.modelName||d.data.paperTitle||"Unknown model"}: ${ce(d.data.value)} on ${d.data.dateLabel}`,w=!!d.data.paperRouteId;return s.jsxs("g",{children:[f,s.jsx("circle",{cx:d.x,cy:d.y,r:"10",fill:"transparent",style:{cursor:w?"pointer":"default",outline:"none"},tabIndex:0,role:w?"link":"img","aria-label":_,onMouseEnter:()=>n(d.idx),onMouseLeave:()=>Ce(d.idx),onFocus:()=>n(d.idx),onBlur:()=>Ce(d.idx),onClick:()=>K(d.data.paperRouteId),onKeyDown:j=>{w&&(j.key==="Enter"||j.key===" ")&&(j.preventDefault(),K(d.data.paperRouteId))},children:s.jsx("title",{children:_})})]},d.idx)};return s.jsxs("svg",{width:"100%",viewBox:`0 0 ${i} ${l}`,style:{display:"block"},children:[s.jsx("text",{x:o-38,y:g+M/2,fontSize:"11",fontFamily:"var(--mono)",fill:"var(--ink-faint)",textAnchor:"middle",transform:`rotate(-90 ${o-38} ${g+M/2})`,children:t}),Array.from({length:b}).map((d,f)=>{const R=f/(b-1),_=g+M*(1-R),w=x+z*R;return s.jsxs("g",{children:[s.jsx("line",{x1:o,y1:_,x2:i-m,y2:_,stroke:"var(--hairline)",strokeWidth:"1"}),s.jsx("text",{x:o-10,y:_+4,fontSize:"11",fontFamily:"var(--mono)",fill:"var(--ink-faint)",textAnchor:"end",children:ce(w)})]},f)}),He.map(d=>{const f=te(d.timestamp);return s.jsx("text",{x:f,y:l-h+18,fontSize:"11",fontFamily:"var(--mono)",fill:"var(--ink-soft)",textAnchor:"middle",children:d.label},d.key)}),Y.filter(d=>!d.data.isSota).map(d=>{const f=a===d.idx;return G(d,s.jsx("circle",{cx:d.x,cy:d.y,r:f?3:2,fill:"var(--ink-faint)",opacity:f?1:.45,style:{transition:"r 0.12s ease, opacity 0.12s ease"}}))}),q&&s.jsx("path",{d:q,stroke:"var(--accent)",strokeWidth:"2",fill:"none",strokeLinejoin:"round",strokeLinecap:"round"}),N.map(d=>{const f=a===d.idx;return G(d,s.jsx("circle",{cx:d.x,cy:d.y,r:f?4.5:3,fill:f?"var(--accent)":"var(--bg-elevated)",stroke:"var(--accent)",strokeWidth:"1.5",style:{transition:"r 0.12s ease, fill 0.12s ease"}}))}),P.map((d,f)=>s.jsx("text",{x:d.x,y:d.y,fontSize:"9.5",fontFamily:"var(--mono)",fill:"var(--ink-soft)",textAnchor:d.anchor,pointerEvents:"none",style:{paintOrder:"stroke",stroke:"var(--bg-elevated)",strokeWidth:3,strokeLinejoin:"round"},children:d.text},`label-${f}`)),a!==null&&Y[a]&&(()=>{const d=Y[a],f=d.data.modelName||d.data.paperTitle||"Unknown model",_=`${f.length>40?f.slice(0,39)+"…":f}: ${ce(d.data.value)}`,j=Math.max(120,Math.min(340,_.length*6.6+24)),V=30;let W=d.x-j/2;Wi-m&&(W=i-m-j);const fe=d.y-V-14>=g?d.y-V-12:d.y+12;return s.jsxs("g",{pointerEvents:"none",children:[s.jsx("rect",{x:W,y:fe,width:j,height:V,rx:"6",ry:"6",fill:"var(--bg-elevated)",stroke:"var(--hairline-strong)",strokeWidth:"1",style:{filter:"drop-shadow(0 2px 6px rgba(0,0,0,0.08))"}}),s.jsx("text",{x:W+12,y:fe+19,fontSize:"12",fontFamily:"var(--sans)",fill:"var(--ink)",fontWeight:500,children:_})]})})()]})};function Yt(e,t){if(e.match(/^[a-z]+:\/\//i))return e;if(e.match(/^\/\//))return window.location.protocol+e;if(e.match(/^[a-z]+:/i))return e;const r=document.implementation.createHTMLDocument(),a=r.createElement("base"),n=r.createElement("a");return r.head.appendChild(a),r.body.appendChild(n),t&&(a.href=t),n.href=e,n.href}const Jt=(()=>{let e=0;const t=()=>`0000${(Math.random()*36**4<<0).toString(36)}`.slice(-4);return()=>(e+=1,`u${t()}${e}`)})();function Q(e){const t=[];for(let r=0,a=e.length;rH||e.height>H)&&(e.width>H&&e.height>H?e.width>e.height?(e.height*=H/e.width,e.width=H):(e.width*=H/e.height,e.height=H):e.width>H?(e.height*=H/e.width,e.width=H):(e.width*=H/e.height,e.height=H))}function sr(e,t={}){return e.toBlob?new Promise(r=>{e.toBlob(r,t.type?t.type:"image/png",t.quality?t.quality:1)}):new Promise(r=>{const a=window.atob(e.toDataURL(t.type?t.type:void 0,t.quality?t.quality:void 0).split(",")[1]),n=a.length,i=new Uint8Array(n);for(let l=0;l{const a=new Image;a.onload=()=>{a.decode().then(()=>{requestAnimationFrame(()=>t(a))})},a.onerror=r,a.crossOrigin="anonymous",a.decoding="async",a.src=e})}async function ar(e){return Promise.resolve().then(()=>new XMLSerializer().serializeToString(e)).then(encodeURIComponent).then(t=>`data:image/svg+xml;charset=utf-8,${t}`)}async function nr(e,t,r){const a="http://www.w3.org/2000/svg",n=document.createElementNS(a,"svg"),i=document.createElementNS(a,"foreignObject");return n.setAttribute("width",`${t}`),n.setAttribute("height",`${r}`),n.setAttribute("viewBox",`0 0 ${t} ${r}`),i.setAttribute("width","100%"),i.setAttribute("height","100%"),i.setAttribute("x","0"),i.setAttribute("y","0"),i.setAttribute("externalResourcesRequired","true"),n.appendChild(i),i.appendChild(e),ar(n)}const B=(e,t)=>{if(e instanceof t)return!0;const r=Object.getPrototypeOf(e);return r===null?!1:r.constructor.name===t.name||B(r,t)};function ir(e){const t=e.getPropertyValue("content");return`${e.cssText} content: '${t.replace(/'|"/g,"")}';`}function lr(e,t){return vt(t).map(r=>{const a=e.getPropertyValue(r),n=e.getPropertyPriority(r);return`${r}: ${a}${n?" !important":""};`}).join(" ")}function or(e,t,r,a){const n=`.${e}:${t}`,i=r.cssText?ir(r):lr(r,a);return document.createTextNode(`${n}{${i}}`)}function dt(e,t,r,a){const n=window.getComputedStyle(e,r),i=n.getPropertyValue("content");if(i===""||i==="none")return;const l=Jt();try{t.className=`${t.className} ${l}`}catch{return}const o=document.createElement("style");o.appendChild(or(l,r,n,a)),t.appendChild(o)}function cr(e,t,r){dt(e,t,":before",r),dt(e,t,":after",r)}const ut="application/font-woff",mt="image/jpeg",dr={woff:ut,woff2:ut,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:mt,jpeg:mt,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml",webp:"image/webp"};function ur(e){const t=/\.([^./]*?)$/g.exec(e);return t?t[1]:""}function Be(e){const t=ur(e).toLowerCase();return dr[t]||""}function mr(e){return e.split(/,/)[1]}function Ie(e){return e.search(/^(data:)/)!==-1}function hr(e,t){return`data:${t};base64,${e}`}async function jt(e,t,r){const a=await fetch(e,t);if(a.status===404)throw new Error(`Resource "${a.url}" not found`);const n=await a.blob();return new Promise((i,l)=>{const o=new FileReader;o.onerror=l,o.onloadend=()=>{try{i(r({res:a,result:o.result}))}catch(m){l(m)}},o.readAsDataURL(n)})}const Me={};function fr(e,t,r){let a=e.replace(/\?.*/,"");return r&&(a=e),/ttf|otf|eot|woff2?/i.test(a)&&(a=a.replace(/.*\//,"")),t?`[${t}]${a}`:a}async function De(e,t,r){const a=fr(e,t,r.includeQueryParams);if(Me[a]!=null)return Me[a];r.cacheBust&&(e+=(/\?/.test(e)?"&":"?")+new Date().getTime());let n;try{const i=await jt(e,r.fetchRequestInit,({res:l,result:o})=>(t||(t=l.headers.get("Content-Type")||""),mr(o)));n=hr(i,t)}catch(i){n=r.imagePlaceholder||"";let l=`Failed to fetch resource: ${e}`;i&&(l=typeof i=="string"?i:i.message),l&&console.warn(l)}return Me[a]=n,n}async function pr(e){const t=e.toDataURL();return t==="data:,"?e.cloneNode(!1):je(t)}async function gr(e,t){if(e.currentSrc){const i=document.createElement("canvas"),l=i.getContext("2d");i.width=e.clientWidth,i.height=e.clientHeight,l==null||l.drawImage(e,0,0,i.width,i.height);const o=i.toDataURL();return je(o)}const r=e.poster,a=Be(r),n=await De(r,a,t);return je(n)}async function xr(e,t){var r;try{if(!((r=e==null?void 0:e.contentDocument)===null||r===void 0)&&r.body)return await ke(e.contentDocument.body,t,!0)}catch{}return e.cloneNode(!1)}async function br(e,t){return B(e,HTMLCanvasElement)?pr(e):B(e,HTMLVideoElement)?gr(e,t):B(e,HTMLIFrameElement)?xr(e,t):e.cloneNode(kt(e))}const yr=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SLOT",kt=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SVG";async function wr(e,t,r){var a,n;if(kt(t))return t;let i=[];return yr(e)&&e.assignedNodes?i=Q(e.assignedNodes()):B(e,HTMLIFrameElement)&&(!((a=e.contentDocument)===null||a===void 0)&&a.body)?i=Q(e.contentDocument.body.childNodes):i=Q(((n=e.shadowRoot)!==null&&n!==void 0?n:e).childNodes),i.length===0||B(e,HTMLVideoElement)||await i.reduce((l,o)=>l.then(()=>ke(o,r)).then(m=>{m&&t.appendChild(m)}),Promise.resolve()),t}function vr(e,t,r){const a=t.style;if(!a)return;const n=window.getComputedStyle(e);n.cssText?(a.cssText=n.cssText,a.transformOrigin=n.transformOrigin):vt(r).forEach(i=>{let l=n.getPropertyValue(i);i==="font-size"&&l.endsWith("px")&&(l=`${Math.floor(parseFloat(l.substring(0,l.length-2)))-.1}px`),B(e,HTMLIFrameElement)&&i==="display"&&l==="inline"&&(l="block"),i==="d"&&t.getAttribute("d")&&(l=`path(${t.getAttribute("d")})`),a.setProperty(i,l,n.getPropertyPriority(i))})}function _r(e,t){B(e,HTMLTextAreaElement)&&(t.innerHTML=e.value),B(e,HTMLInputElement)&&t.setAttribute("value",e.value)}function jr(e,t){if(B(e,HTMLSelectElement)){const r=t,a=Array.from(r.children).find(n=>e.value===n.getAttribute("value"));a&&a.setAttribute("selected","")}}function kr(e,t,r){return B(t,Element)&&(vr(e,t,r),cr(e,t,r),_r(e,t),jr(e,t)),t}async function Sr(e,t){const r=e.querySelectorAll?e.querySelectorAll("use"):[];if(r.length===0)return e;const a={};for(let i=0;ibr(a,t)).then(a=>wr(e,a,t)).then(a=>kr(e,a,t)).then(a=>Sr(a,t))}const St=/url\((['"]?)([^'"]+?)\1\)/g,Cr=/url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g,Er=/src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;function Nr(e){const t=e.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1");return new RegExp(`(url\\(['"]?)(${t})(['"]?\\))`,"g")}function Rr(e){const t=[];return e.replace(St,(r,a,n)=>(t.push(n),r)),t.filter(r=>!Ie(r))}async function $r(e,t,r,a,n){try{const i=r?Yt(t,r):t,l=Be(t);let o;return n||(o=await De(i,l,a)),e.replace(Nr(t),`$1${o}$3`)}catch{}return e}function Tr(e,{preferredFontFormat:t}){return t?e.replace(Er,r=>{for(;;){const[a,,n]=Cr.exec(r)||[];if(!n)return"";if(n===t)return`src: ${a};`}}):e}function Ct(e){return e.search(St)!==-1}async function Et(e,t,r){if(!Ct(e))return e;const a=Tr(e,r);return Rr(a).reduce((i,l)=>i.then(o=>$r(o,l,t,r)),Promise.resolve(a))}async function le(e,t,r){var a;const n=(a=t.style)===null||a===void 0?void 0:a.getPropertyValue(e);if(n){const i=await Et(n,null,r);return t.style.setProperty(e,i,t.style.getPropertyPriority(e)),!0}return!1}async function Pr(e,t){await le("background",e,t)||await le("background-image",e,t),await le("mask",e,t)||await le("-webkit-mask",e,t)||await le("mask-image",e,t)||await le("-webkit-mask-image",e,t)}async function Fr(e,t){const r=B(e,HTMLImageElement);if(!(r&&!Ie(e.src))&&!(B(e,SVGImageElement)&&!Ie(e.href.baseVal)))return;const a=r?e.src:e.href.baseVal,n=await De(a,Be(a),t);await new Promise((i,l)=>{e.onload=i,e.onerror=t.onImageErrorHandler?(...m)=>{try{i(t.onImageErrorHandler(...m))}catch(g){l(g)}}:l;const o=e;o.decode&&(o.decode=i),o.loading==="lazy"&&(o.loading="eager"),r?(e.srcset="",e.src=n):e.href.baseVal=n})}async function Lr(e,t){const a=Q(e.childNodes).map(n=>Nt(n,t));await Promise.all(a).then(()=>e)}async function Nt(e,t){B(e,Element)&&(await Pr(e,t),await Fr(e,t),await Lr(e,t))}function Mr(e,t){const{style:r}=e;t.backgroundColor&&(r.backgroundColor=t.backgroundColor),t.width&&(r.width=`${t.width}px`),t.height&&(r.height=`${t.height}px`);const a=t.style;return a!=null&&Object.keys(a).forEach(n=>{r[n]=a[n]}),e}const ht={};async function ft(e){let t=ht[e];if(t!=null)return t;const a=await(await fetch(e)).text();return t={url:e,cssText:a},ht[e]=t,t}async function pt(e,t){let r=e.cssText;const a=/url\(["']?([^"')]+)["']?\)/g,i=(r.match(/url\([^)]+\)/g)||[]).map(async l=>{let o=l.replace(a,"$1");return o.startsWith("https://")||(o=new URL(o,e.url).href),jt(o,t.fetchRequestInit,({result:m})=>(r=r.replace(l,`url(${m})`),[l,m]))});return Promise.all(i).then(()=>r)}function gt(e){if(e==null)return[];const t=[],r=/(\/\*[\s\S]*?\*\/)/gi;let a=e.replace(r,"");const n=new RegExp("((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)})","gi");for(;;){const m=n.exec(a);if(m===null)break;t.push(m[0])}a=a.replace(n,"");const i=/@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi,l="((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})",o=new RegExp(l,"gi");for(;;){let m=i.exec(a);if(m===null){if(m=o.exec(a),m===null)break;i.lastIndex=o.lastIndex}else o.lastIndex=i.lastIndex;t.push(m[0])}return t}async function Ir(e,t){const r=[],a=[];return e.forEach(n=>{if("cssRules"in n)try{Q(n.cssRules||[]).forEach((i,l)=>{if(i.type===CSSRule.IMPORT_RULE){let o=l+1;const m=i.href,g=ft(m).then(h=>pt(h,t)).then(h=>gt(h).forEach(y=>{try{n.insertRule(y,y.startsWith("@import")?o+=1:n.cssRules.length)}catch(x){console.error("Error inserting rule from remote css",{rule:y,error:x})}})).catch(h=>{console.error("Error loading remote css",h.toString())});a.push(g)}})}catch(i){const l=e.find(o=>o.href==null)||document.styleSheets[0];n.href!=null&&a.push(ft(n.href).then(o=>pt(o,t)).then(o=>gt(o).forEach(m=>{l.insertRule(m,l.cssRules.length)})).catch(o=>{console.error("Error loading remote stylesheet",o)})),console.error("Error inlining remote css file",i)}}),Promise.all(a).then(()=>(e.forEach(n=>{if("cssRules"in n)try{Q(n.cssRules||[]).forEach(i=>{r.push(i)})}catch(i){console.error(`Error while reading CSS rules from ${n.href}`,i)}}),r))}function Ar(e){return e.filter(t=>t.type===CSSRule.FONT_FACE_RULE).filter(t=>Ct(t.style.getPropertyValue("src")))}async function Br(e,t){if(e.ownerDocument==null)throw new Error("Provided element is not within a Document");const r=Q(e.ownerDocument.styleSheets),a=await Ir(r,t);return Ar(a)}function Rt(e){return e.trim().replace(/["']/g,"")}function Dr(e){const t=new Set;function r(a){(a.style.fontFamily||getComputedStyle(a).fontFamily).split(",").forEach(i=>{t.add(Rt(i))}),Array.from(a.children).forEach(i=>{i instanceof HTMLElement&&r(i)})}return r(e),t}async function Hr(e,t){const r=await Br(e,t),a=Dr(e);return(await Promise.all(r.filter(i=>a.has(Rt(i.style.fontFamily))).map(i=>{const l=i.parentStyleSheet?i.parentStyleSheet.href:null;return Et(i.cssText,l,t)}))).join(` +import{u as Lt,r as v,j as s,s as ce,e as Mt,c as It,a as At,f as Bt,L as ae}from"./index-Dt001B3A.js";import{u as ee}from"./useQuery-DD4hUA6p.js";import{c as ne}from"./catalog-BOpSeTzm.js";import{C as Dt,E as Ht,e as Vt}from"./ExternalSourceEvalBadge-D7DvXFmF.js";import{S as ye}from"./skeleton-DkhIJUB4.js";import{S as ot}from"./switch-CqcBxohM.js";import{A as Ut,a as qt}from"./alert-Xa-AqUL5.js";import{L as ve}from"./LatexTitle-B651zAGR.js";import{B as Ot}from"./BenchmarkTrendSparkline-B9CQXlVT.js";import{I as Wt}from"./components-DMT1vhIy.js";import{s as zt}from"./safeExternalHref-CkBrsh84.js";import{s as Kt}from"./slug-BpH-Nkvz.js";import"./papers-KXkGPHI5.js";import"./hover-card-C7JmPdFo.js";import"./index-i7UOsfxV.js";import"./katex.min-BSBacQyE.js";import"./transform-DgCWw6nP.js";function Gt(e,t,r){const a=t?(e??[]).filter(l=>l.task_id===t):e??[],n=a.filter(l=>l.is_open===!1),i=n.reduce((l,o)=>l?(o.best_rank??Number.POSITIVE_INFINITY)<(l.best_rank??Number.POSITIVE_INFINITY)?o:l:o,null);return{visible:r?a.filter(l=>l.is_open!==!1):a,hiddenClosed:n,topHiddenClosed:i}}function ct(e){const t=e.length===7?`${e}-01`:e,r=new Date(t).getTime();return Number.isFinite(r)?r:0}const Fe=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Le(e){const t=new Date(e);return{year:t.getFullYear(),month:t.getMonth()}}function Qt(e,t){if(e===t){const{year:m,month:g}=Le(e);return[{timestamp:new Date(m,g,1).getTime(),key:`${m}-${g}`,label:`${Fe[g]} ${m}`}]}const r=Le(e),a=Le(t);if(r.year===a.year){const m=a.month-r.month+1;let g=1;const h=12;m>h&&(g=Math.ceil(m/h));const y=[];for(let x=r.month;x<=a.month;x+=g)y.push({timestamp:new Date(r.year,x,1).getTime(),key:`${r.year}-${x}`,label:m<=3?`${Fe[x]} ${r.year}`:Fe[x]});return y}const n=a.year-r.year+1;let i=1;const l=12;n>l&&(i=Math.ceil(n/l));const o=[];for(let m=r.year;m<=a.year;m+=i)o.push({timestamp:new Date(m,0,1).getTime(),key:String(m),label:String(m)});return o}const Xt=({points:e,metric:t})=>{const r=Lt(),[a,n]=v.useState(null),i=880,l=320,o=60,m=30,g=40,h=50,y=e.map(d=>d.value),x=Math.min(...y),z=Math.max(...y)-x||1,de=i-o-m,M=l-g-h,T=e.map(d=>ct(d.date)),X=Math.min(...T),I=Math.max(...T),ue=I-X||1,te=d=>X===I?o+de/2:o+(d-X)/ue*de,Y=e.map((d,f)=>{const R=te(ct(d.date)),_=(d.value-x)/z,w=g+M*(1-_);return{x:R,y:w,data:d,idx:f}}),N=Y.filter(d=>d.data.isSota);let q="";if(N.length>=2){q=`M${N[0].x},${N[0].y}`;for(let d=1;d{const f=d.data.modelName||d.data.paperTitle||"";if(!f)return null;const R=f.length>22?f.slice(0,21)+"…":f,_=R.length*D;let w=d.x-_/2,j=d.x+_/2,V="middle";return wi-m&&(j=i-m,w=j-_,V="end"),{x:V==="start"?o:V==="end"?i-m:d.x,y:d.y-Se,text:R,anchor:V,left:w,right:j}},P=[],O=N.length>0?J(N[N.length-1]):null;let me=-1/0;for(let d=0;dO.left-re||(me=f.right,P.push({x:f.x,y:f.y,text:f.text,anchor:f.anchor})))}O&&P.push({x:O.x,y:O.y,text:O.text,anchor:O.anchor});const He=Qt(X,I),b=5,Ce=d=>n(f=>f===d?null:f),K=d=>{d&&r(`/paper/${d}`)},G=(d,f)=>{const _=`${d.data.modelName||d.data.paperTitle||"Unknown model"}: ${ce(d.data.value)} on ${d.data.dateLabel}`,w=!!d.data.paperRouteId;return s.jsxs("g",{children:[f,s.jsx("circle",{cx:d.x,cy:d.y,r:"10",fill:"transparent",style:{cursor:w?"pointer":"default",outline:"none"},tabIndex:0,role:w?"link":"img","aria-label":_,onMouseEnter:()=>n(d.idx),onMouseLeave:()=>Ce(d.idx),onFocus:()=>n(d.idx),onBlur:()=>Ce(d.idx),onClick:()=>K(d.data.paperRouteId),onKeyDown:j=>{w&&(j.key==="Enter"||j.key===" ")&&(j.preventDefault(),K(d.data.paperRouteId))},children:s.jsx("title",{children:_})})]},d.idx)};return s.jsxs("svg",{width:"100%",viewBox:`0 0 ${i} ${l}`,style:{display:"block"},children:[s.jsx("text",{x:o-38,y:g+M/2,fontSize:"11",fontFamily:"var(--mono)",fill:"var(--ink-faint)",textAnchor:"middle",transform:`rotate(-90 ${o-38} ${g+M/2})`,children:t}),Array.from({length:b}).map((d,f)=>{const R=f/(b-1),_=g+M*(1-R),w=x+z*R;return s.jsxs("g",{children:[s.jsx("line",{x1:o,y1:_,x2:i-m,y2:_,stroke:"var(--hairline)",strokeWidth:"1"}),s.jsx("text",{x:o-10,y:_+4,fontSize:"11",fontFamily:"var(--mono)",fill:"var(--ink-faint)",textAnchor:"end",children:ce(w)})]},f)}),He.map(d=>{const f=te(d.timestamp);return s.jsx("text",{x:f,y:l-h+18,fontSize:"11",fontFamily:"var(--mono)",fill:"var(--ink-soft)",textAnchor:"middle",children:d.label},d.key)}),Y.filter(d=>!d.data.isSota).map(d=>{const f=a===d.idx;return G(d,s.jsx("circle",{cx:d.x,cy:d.y,r:f?3:2,fill:"var(--ink-faint)",opacity:f?1:.45,style:{transition:"r 0.12s ease, opacity 0.12s ease"}}))}),q&&s.jsx("path",{d:q,stroke:"var(--accent)",strokeWidth:"2",fill:"none",strokeLinejoin:"round",strokeLinecap:"round"}),N.map(d=>{const f=a===d.idx;return G(d,s.jsx("circle",{cx:d.x,cy:d.y,r:f?4.5:3,fill:f?"var(--accent)":"var(--bg-elevated)",stroke:"var(--accent)",strokeWidth:"1.5",style:{transition:"r 0.12s ease, fill 0.12s ease"}}))}),P.map((d,f)=>s.jsx("text",{x:d.x,y:d.y,fontSize:"9.5",fontFamily:"var(--mono)",fill:"var(--ink-soft)",textAnchor:d.anchor,pointerEvents:"none",style:{paintOrder:"stroke",stroke:"var(--bg-elevated)",strokeWidth:3,strokeLinejoin:"round"},children:d.text},`label-${f}`)),a!==null&&Y[a]&&(()=>{const d=Y[a],f=d.data.modelName||d.data.paperTitle||"Unknown model",_=`${f.length>40?f.slice(0,39)+"…":f}: ${ce(d.data.value)}`,j=Math.max(120,Math.min(340,_.length*6.6+24)),V=30;let W=d.x-j/2;Wi-m&&(W=i-m-j);const fe=d.y-V-14>=g?d.y-V-12:d.y+12;return s.jsxs("g",{pointerEvents:"none",children:[s.jsx("rect",{x:W,y:fe,width:j,height:V,rx:"6",ry:"6",fill:"var(--bg-elevated)",stroke:"var(--hairline-strong)",strokeWidth:"1",style:{filter:"drop-shadow(0 2px 6px rgba(0,0,0,0.08))"}}),s.jsx("text",{x:W+12,y:fe+19,fontSize:"12",fontFamily:"var(--sans)",fill:"var(--ink)",fontWeight:500,children:_})]})})()]})};function Yt(e,t){if(e.match(/^[a-z]+:\/\//i))return e;if(e.match(/^\/\//))return window.location.protocol+e;if(e.match(/^[a-z]+:/i))return e;const r=document.implementation.createHTMLDocument(),a=r.createElement("base"),n=r.createElement("a");return r.head.appendChild(a),r.body.appendChild(n),t&&(a.href=t),n.href=e,n.href}const Jt=(()=>{let e=0;const t=()=>`0000${(Math.random()*36**4<<0).toString(36)}`.slice(-4);return()=>(e+=1,`u${t()}${e}`)})();function Q(e){const t=[];for(let r=0,a=e.length;rH||e.height>H)&&(e.width>H&&e.height>H?e.width>e.height?(e.height*=H/e.width,e.width=H):(e.width*=H/e.height,e.height=H):e.width>H?(e.height*=H/e.width,e.width=H):(e.width*=H/e.height,e.height=H))}function sr(e,t={}){return e.toBlob?new Promise(r=>{e.toBlob(r,t.type?t.type:"image/png",t.quality?t.quality:1)}):new Promise(r=>{const a=window.atob(e.toDataURL(t.type?t.type:void 0,t.quality?t.quality:void 0).split(",")[1]),n=a.length,i=new Uint8Array(n);for(let l=0;l{const a=new Image;a.onload=()=>{a.decode().then(()=>{requestAnimationFrame(()=>t(a))})},a.onerror=r,a.crossOrigin="anonymous",a.decoding="async",a.src=e})}async function ar(e){return Promise.resolve().then(()=>new XMLSerializer().serializeToString(e)).then(encodeURIComponent).then(t=>`data:image/svg+xml;charset=utf-8,${t}`)}async function nr(e,t,r){const a="http://www.w3.org/2000/svg",n=document.createElementNS(a,"svg"),i=document.createElementNS(a,"foreignObject");return n.setAttribute("width",`${t}`),n.setAttribute("height",`${r}`),n.setAttribute("viewBox",`0 0 ${t} ${r}`),i.setAttribute("width","100%"),i.setAttribute("height","100%"),i.setAttribute("x","0"),i.setAttribute("y","0"),i.setAttribute("externalResourcesRequired","true"),n.appendChild(i),i.appendChild(e),ar(n)}const B=(e,t)=>{if(e instanceof t)return!0;const r=Object.getPrototypeOf(e);return r===null?!1:r.constructor.name===t.name||B(r,t)};function ir(e){const t=e.getPropertyValue("content");return`${e.cssText} content: '${t.replace(/'|"/g,"")}';`}function lr(e,t){return vt(t).map(r=>{const a=e.getPropertyValue(r),n=e.getPropertyPriority(r);return`${r}: ${a}${n?" !important":""};`}).join(" ")}function or(e,t,r,a){const n=`.${e}:${t}`,i=r.cssText?ir(r):lr(r,a);return document.createTextNode(`${n}{${i}}`)}function dt(e,t,r,a){const n=window.getComputedStyle(e,r),i=n.getPropertyValue("content");if(i===""||i==="none")return;const l=Jt();try{t.className=`${t.className} ${l}`}catch{return}const o=document.createElement("style");o.appendChild(or(l,r,n,a)),t.appendChild(o)}function cr(e,t,r){dt(e,t,":before",r),dt(e,t,":after",r)}const ut="application/font-woff",mt="image/jpeg",dr={woff:ut,woff2:ut,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:mt,jpeg:mt,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml",webp:"image/webp"};function ur(e){const t=/\.([^./]*?)$/g.exec(e);return t?t[1]:""}function Be(e){const t=ur(e).toLowerCase();return dr[t]||""}function mr(e){return e.split(/,/)[1]}function Ie(e){return e.search(/^(data:)/)!==-1}function hr(e,t){return`data:${t};base64,${e}`}async function jt(e,t,r){const a=await fetch(e,t);if(a.status===404)throw new Error(`Resource "${a.url}" not found`);const n=await a.blob();return new Promise((i,l)=>{const o=new FileReader;o.onerror=l,o.onloadend=()=>{try{i(r({res:a,result:o.result}))}catch(m){l(m)}},o.readAsDataURL(n)})}const Me={};function fr(e,t,r){let a=e.replace(/\?.*/,"");return r&&(a=e),/ttf|otf|eot|woff2?/i.test(a)&&(a=a.replace(/.*\//,"")),t?`[${t}]${a}`:a}async function De(e,t,r){const a=fr(e,t,r.includeQueryParams);if(Me[a]!=null)return Me[a];r.cacheBust&&(e+=(/\?/.test(e)?"&":"?")+new Date().getTime());let n;try{const i=await jt(e,r.fetchRequestInit,({res:l,result:o})=>(t||(t=l.headers.get("Content-Type")||""),mr(o)));n=hr(i,t)}catch(i){n=r.imagePlaceholder||"";let l=`Failed to fetch resource: ${e}`;i&&(l=typeof i=="string"?i:i.message),l&&console.warn(l)}return Me[a]=n,n}async function pr(e){const t=e.toDataURL();return t==="data:,"?e.cloneNode(!1):je(t)}async function gr(e,t){if(e.currentSrc){const i=document.createElement("canvas"),l=i.getContext("2d");i.width=e.clientWidth,i.height=e.clientHeight,l==null||l.drawImage(e,0,0,i.width,i.height);const o=i.toDataURL();return je(o)}const r=e.poster,a=Be(r),n=await De(r,a,t);return je(n)}async function xr(e,t){var r;try{if(!((r=e==null?void 0:e.contentDocument)===null||r===void 0)&&r.body)return await ke(e.contentDocument.body,t,!0)}catch{}return e.cloneNode(!1)}async function br(e,t){return B(e,HTMLCanvasElement)?pr(e):B(e,HTMLVideoElement)?gr(e,t):B(e,HTMLIFrameElement)?xr(e,t):e.cloneNode(kt(e))}const yr=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SLOT",kt=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SVG";async function wr(e,t,r){var a,n;if(kt(t))return t;let i=[];return yr(e)&&e.assignedNodes?i=Q(e.assignedNodes()):B(e,HTMLIFrameElement)&&(!((a=e.contentDocument)===null||a===void 0)&&a.body)?i=Q(e.contentDocument.body.childNodes):i=Q(((n=e.shadowRoot)!==null&&n!==void 0?n:e).childNodes),i.length===0||B(e,HTMLVideoElement)||await i.reduce((l,o)=>l.then(()=>ke(o,r)).then(m=>{m&&t.appendChild(m)}),Promise.resolve()),t}function vr(e,t,r){const a=t.style;if(!a)return;const n=window.getComputedStyle(e);n.cssText?(a.cssText=n.cssText,a.transformOrigin=n.transformOrigin):vt(r).forEach(i=>{let l=n.getPropertyValue(i);i==="font-size"&&l.endsWith("px")&&(l=`${Math.floor(parseFloat(l.substring(0,l.length-2)))-.1}px`),B(e,HTMLIFrameElement)&&i==="display"&&l==="inline"&&(l="block"),i==="d"&&t.getAttribute("d")&&(l=`path(${t.getAttribute("d")})`),a.setProperty(i,l,n.getPropertyPriority(i))})}function _r(e,t){B(e,HTMLTextAreaElement)&&(t.innerHTML=e.value),B(e,HTMLInputElement)&&t.setAttribute("value",e.value)}function jr(e,t){if(B(e,HTMLSelectElement)){const r=t,a=Array.from(r.children).find(n=>e.value===n.getAttribute("value"));a&&a.setAttribute("selected","")}}function kr(e,t,r){return B(t,Element)&&(vr(e,t,r),cr(e,t,r),_r(e,t),jr(e,t)),t}async function Sr(e,t){const r=e.querySelectorAll?e.querySelectorAll("use"):[];if(r.length===0)return e;const a={};for(let i=0;ibr(a,t)).then(a=>wr(e,a,t)).then(a=>kr(e,a,t)).then(a=>Sr(a,t))}const St=/url\((['"]?)([^'"]+?)\1\)/g,Cr=/url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g,Er=/src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;function Nr(e){const t=e.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1");return new RegExp(`(url\\(['"]?)(${t})(['"]?\\))`,"g")}function Rr(e){const t=[];return e.replace(St,(r,a,n)=>(t.push(n),r)),t.filter(r=>!Ie(r))}async function $r(e,t,r,a,n){try{const i=r?Yt(t,r):t,l=Be(t);let o;return n||(o=await De(i,l,a)),e.replace(Nr(t),`$1${o}$3`)}catch{}return e}function Tr(e,{preferredFontFormat:t}){return t?e.replace(Er,r=>{for(;;){const[a,,n]=Cr.exec(r)||[];if(!n)return"";if(n===t)return`src: ${a};`}}):e}function Ct(e){return e.search(St)!==-1}async function Et(e,t,r){if(!Ct(e))return e;const a=Tr(e,r);return Rr(a).reduce((i,l)=>i.then(o=>$r(o,l,t,r)),Promise.resolve(a))}async function le(e,t,r){var a;const n=(a=t.style)===null||a===void 0?void 0:a.getPropertyValue(e);if(n){const i=await Et(n,null,r);return t.style.setProperty(e,i,t.style.getPropertyPriority(e)),!0}return!1}async function Pr(e,t){await le("background",e,t)||await le("background-image",e,t),await le("mask",e,t)||await le("-webkit-mask",e,t)||await le("mask-image",e,t)||await le("-webkit-mask-image",e,t)}async function Fr(e,t){const r=B(e,HTMLImageElement);if(!(r&&!Ie(e.src))&&!(B(e,SVGImageElement)&&!Ie(e.href.baseVal)))return;const a=r?e.src:e.href.baseVal,n=await De(a,Be(a),t);await new Promise((i,l)=>{e.onload=i,e.onerror=t.onImageErrorHandler?(...m)=>{try{i(t.onImageErrorHandler(...m))}catch(g){l(g)}}:l;const o=e;o.decode&&(o.decode=i),o.loading==="lazy"&&(o.loading="eager"),r?(e.srcset="",e.src=n):e.href.baseVal=n})}async function Lr(e,t){const a=Q(e.childNodes).map(n=>Nt(n,t));await Promise.all(a).then(()=>e)}async function Nt(e,t){B(e,Element)&&(await Pr(e,t),await Fr(e,t),await Lr(e,t))}function Mr(e,t){const{style:r}=e;t.backgroundColor&&(r.backgroundColor=t.backgroundColor),t.width&&(r.width=`${t.width}px`),t.height&&(r.height=`${t.height}px`);const a=t.style;return a!=null&&Object.keys(a).forEach(n=>{r[n]=a[n]}),e}const ht={};async function ft(e){let t=ht[e];if(t!=null)return t;const a=await(await fetch(e)).text();return t={url:e,cssText:a},ht[e]=t,t}async function pt(e,t){let r=e.cssText;const a=/url\(["']?([^"')]+)["']?\)/g,i=(r.match(/url\([^)]+\)/g)||[]).map(async l=>{let o=l.replace(a,"$1");return o.startsWith("https://")||(o=new URL(o,e.url).href),jt(o,t.fetchRequestInit,({result:m})=>(r=r.replace(l,`url(${m})`),[l,m]))});return Promise.all(i).then(()=>r)}function gt(e){if(e==null)return[];const t=[],r=/(\/\*[\s\S]*?\*\/)/gi;let a=e.replace(r,"");const n=new RegExp("((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)})","gi");for(;;){const m=n.exec(a);if(m===null)break;t.push(m[0])}a=a.replace(n,"");const i=/@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi,l="((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})",o=new RegExp(l,"gi");for(;;){let m=i.exec(a);if(m===null){if(m=o.exec(a),m===null)break;i.lastIndex=o.lastIndex}else o.lastIndex=i.lastIndex;t.push(m[0])}return t}async function Ir(e,t){const r=[],a=[];return e.forEach(n=>{if("cssRules"in n)try{Q(n.cssRules||[]).forEach((i,l)=>{if(i.type===CSSRule.IMPORT_RULE){let o=l+1;const m=i.href,g=ft(m).then(h=>pt(h,t)).then(h=>gt(h).forEach(y=>{try{n.insertRule(y,y.startsWith("@import")?o+=1:n.cssRules.length)}catch(x){console.error("Error inserting rule from remote css",{rule:y,error:x})}})).catch(h=>{console.error("Error loading remote css",h.toString())});a.push(g)}})}catch(i){const l=e.find(o=>o.href==null)||document.styleSheets[0];n.href!=null&&a.push(ft(n.href).then(o=>pt(o,t)).then(o=>gt(o).forEach(m=>{l.insertRule(m,l.cssRules.length)})).catch(o=>{console.error("Error loading remote stylesheet",o)})),console.error("Error inlining remote css file",i)}}),Promise.all(a).then(()=>(e.forEach(n=>{if("cssRules"in n)try{Q(n.cssRules||[]).forEach(i=>{r.push(i)})}catch(i){console.error(`Error while reading CSS rules from ${n.href}`,i)}}),r))}function Ar(e){return e.filter(t=>t.type===CSSRule.FONT_FACE_RULE).filter(t=>Ct(t.style.getPropertyValue("src")))}async function Br(e,t){if(e.ownerDocument==null)throw new Error("Provided element is not within a Document");const r=Q(e.ownerDocument.styleSheets),a=await Ir(r,t);return Ar(a)}function Rt(e){return e.trim().replace(/["']/g,"")}function Dr(e){const t=new Set;function r(a){(a.style.fontFamily||getComputedStyle(a).fontFamily).split(",").forEach(i=>{t.add(Rt(i))}),Array.from(a.children).forEach(i=>{i instanceof HTMLElement&&r(i)})}return r(e),t}async function Hr(e,t){const r=await Br(e,t),a=Dr(e);return(await Promise.all(r.filter(i=>a.has(Rt(i.style.fontFamily))).map(i=>{const l=i.parentStyleSheet?i.parentStyleSheet.href:null;return Et(i.cssText,l,t)}))).join(` `)}async function Vr(e,t){const r=t.fontEmbedCSS!=null?t.fontEmbedCSS:t.skipFonts?null:await Hr(e,t);if(r){const a=document.createElement("style"),n=document.createTextNode(r);a.appendChild(n),e.firstChild?e.insertBefore(a,e.firstChild):e.appendChild(a)}}async function Ur(e,t={}){const{width:r,height:a}=_t(e,t),n=await ke(e,t,!0);return await Vr(n,t),await Nt(n,t),Mr(n,t),await nr(n,r,a)}async function qr(e,t={}){const{width:r,height:a}=_t(e,t),n=await Ur(e,t),i=await je(n),l=document.createElement("canvas"),o=l.getContext("2d"),m=t.pixelRatio||tr(),g=t.canvasWidth||r,h=t.canvasHeight||a;return l.width=g*m,l.height=h*m,t.skipAutoScale||rr(l),l.style.width=`${g}`,l.style.height=`${h}`,t.backgroundColor&&(o.fillStyle=t.backgroundColor,o.fillRect(0,0,l.width,l.height)),o.drawImage(i,0,0,l.width,l.height),l}async function Or(e,t={}){const r=await qr(e,t);return await sr(r)}const Ae="#ffffff";function Wr(){return typeof window>"u"?Ae:window.getComputedStyle(document.documentElement).getPropertyValue("--bg-elevated").trim()||Ae}function zr(e){if(typeof window>"u")return Ae;const t=window.getComputedStyle(e).backgroundColor;return!t||t==="rgba(0, 0, 0, 0)"||t==="transparent"?Wr():t}async function Kr(e){var r,a;if(typeof window>"u"||!((a=(r=window.navigator)==null?void 0:r.clipboard)!=null&&a.write))throw new Error("Clipboard image copy is not supported in this browser.");if(typeof window.ClipboardItem>"u")throw new Error("Clipboard image copy is not supported in this browser.");const t=await Or(e,{pixelRatio:2,cacheBust:!0,backgroundColor:zr(e)});if(!t)throw new Error("Failed to render screenshot.");await window.navigator.clipboard.write([new window.ClipboardItem({"image/png":t})])}const xt=({targetRef:e,label:t})=>{const{toast:r}=Mt(),[a,n]=v.useState("idle"),i=v.useRef(null);v.useEffect(()=>()=>{i.current!==null&&window.clearTimeout(i.current)},[]);const l=v.useCallback(async()=>{const m=e.current;if(m){n("copying"),m.classList.add("is-capturing"),m.offsetHeight,await new Promise(g=>window.requestAnimationFrame(()=>g()));try{await Kr(m),n("copied"),r({title:"Screenshot copied",description:`Image of the ${t} copied to your clipboard.`}),i.current!==null&&window.clearTimeout(i.current),i.current=window.setTimeout(()=>n("idle"),1500)}catch(g){n("idle"),r({title:"Copy failed",description:g instanceof Error&&g.message?g.message:"Could not copy the screenshot to your clipboard.",variant:"destructive"})}finally{m.classList.remove("is-capturing")}}},[e,t,r]),o=a==="copied"?"Copied":a==="copying"?"Copying…":"Copy image";return s.jsxs("button",{type:"button",className:"bm-copy-btn",onClick:l,disabled:a==="copying","aria-label":`Copy ${t} screenshot to clipboard`,title:`Copy ${t} screenshot to clipboard`,children:[s.jsx(Wt,{name:"copy",size:11}),o]})};function oe(e){if(e==null)return null;if(typeof e=="number")return Number.isFinite(e)?e:null;const t=e.includes("±")?e.split("±")[0].trim():e.trim(),r=parseFloat(t);return Number.isFinite(r)?r:null}const $t=[{label:"All",maxParametersExclusive:void 0},{label:"<1B",maxParametersExclusive:1e9},{label:"<3B",maxParametersExclusive:3e9},{label:"<6B",maxParametersExclusive:6e9},{label:"<12B",maxParametersExclusive:12e9},{label:"<32B",maxParametersExclusive:32e9},{label:"<128B",maxParametersExclusive:128e9},{label:"<500B",maxParametersExclusive:5e11}];function Gr(e){const t=e===null?void 0:Number(e);return $t.some(r=>r.maxParametersExclusive===t)?t:void 0}function Qr(e){return new Intl.NumberFormat("en",{notation:"compact",maximumSignificantDigits:3}).format(e)}function Xr(e){return[e.paper_id,e.task_id,e.dataset_id,e.model_name,e.harness??""].join("|")}function Yr(e){const t=new Map;for(const r of e){const a=Xr(r),n=t.get(a);if(!n){t.set(a,{...r,metrics:{...r.metrics||{}},sourceEvaluationIds:[r.id],ranksByMetric:r.best_metric&&r.best_rank!=null?{[r.best_metric]:r.best_rank}:{},parameterCount:r.num_parameters??null,hasParameterConflict:!1});continue}n.metrics={...n.metrics,...r.metrics||{}},n.sourceEvaluationIds.push(r.id),r.best_metric&&r.best_rank!=null&&(n.ranksByMetric[r.best_metric]=r.best_rank),r.num_parameters!=null&&!n.hasParameterConflict&&(n.parameterCount===null?n.parameterCount=r.num_parameters:n.parameterCount!==r.num_parameters&&(n.parameterCount=null,n.hasParameterConflict=!0))}return Array.from(t.values())}function bt(e,t){return t===void 0?e:e.filter(r=>r.parameterCount!==null&&r.parameterCount{var E;const y=oe((E=h.metrics)==null?void 0:E[t]),x=h.paper_published_date||"";return{eval:h,value:y,date:x}}).filter(h=>h.value!==null&&!!h.date).sort((h,y)=>h.date.localeCompare(y.date)),n=[];let i=null;for(const h of a){const y=i==null?!0:r==="↓"?h.valuei;y&&(i=h.value),n.push({value:h.value,date:h.date,dateLabel:h.date.slice(0,7),modelName:h.eval.model_name||"",paperTitle:h.eval.paper_title||"",paperRouteId:h.eval.paper_arxiv_id||h.eval.paper_id||null,isSota:y})}const o=e.map(h=>{var y;return{eval:h,value:oe((y=h.metrics)==null?void 0:y[t])}}).filter(h=>h.value!==null).sort((h,y)=>r==="↓"?h.value-y.value:y.value-h.value)[0],m=(o==null?void 0:o.value)??0,g=(o==null?void 0:o.eval.model_name)||(o==null?void 0:o.eval.paper_title)||"";return{points:n,sota:m,sotaModel:g}}const Zr=5;function es(e){if(!e)return null;const t=e.trim(),r=t.match(/^https?:\/\/(?:www\.)?arxiv\.org\/(?:abs|pdf)\/([^/?#]+)/i);if(r!=null&&r[1])return r[1].replace(/\.pdf$/i,"");const a=t.match(/^(?:https?:\/\/(?:www\.)?paperswithcode\.co)?\/paper\/([^/?#]+)/i);return(a==null?void 0:a[1])??null}function we(e,t){return e?s.jsx(ve,{title:e}):t||"—"}const ys=()=>{var qe,Oe,We,ze,Ke,Ge,Qe,Xe,Ye,Je,Ze,et,tt,rt;const{datasetSlug:e}=It(),[t,r]=At(),a=t.get("task")||void 0,n=t.get("eval")||void 0,i=Gr(t.get("max_parameters_exclusive")),{preferences:l,setHideClosedSourceEvals:o}=Bt(),m=v.useRef(null),g=v.useRef(!1),h=v.useRef(null),y=v.useRef(null),x=ee({queryKey:["dataset",e,"with-paper",a,l.hide_closed_source_evals?"open":"all"],queryFn:()=>ne.getDatasetBySlug(e,{include_paper:!0,task:a,is_open:l.hide_closed_source_evals?!0:void 0}),enabled:!!e,staleTime:10*60*1e3}),E=ee({queryKey:["dataset-evals",(qe=x.data)==null?void 0:qe.id],queryFn:()=>Vt.byDataset(x.data.id),enabled:!!((Oe=x.data)!=null&&Oe.id),staleTime:5*60*1e3}),z=ee({queryKey:["dataset-tasks",(We=x.data)==null?void 0:We.id],queryFn:()=>ne.datasetTasks(x.data.id),enabled:!!((ze=x.data)!=null&&ze.id),staleTime:10*60*1e3}),de=ee({queryKey:["metric-directions"],queryFn:()=>ne.metricDirections(),staleTime:60*60*1e3}),M=v.useMemo(()=>{var c;return!n||!((c=E.data)!=null&&c.length)?null:E.data.find(p=>p.id===n)||null},[n,E.data]),T=v.useMemo(()=>{const c=z.data||[];if(c.length===0)return null;if(M!=null&&M.task_id&&c.some(u=>u.id===M.task_id))return M.task_id;if(a){const u=c.find(C=>C.slug===a);if(u)return u.id}if(c.length===1)return c[0].id;const p=E.data||[];if(p.length>0){const u=new Map;for(const k of p)u.set(k.task_id,(u.get(k.task_id)||0)+1);let C=null,L=-1;for(const k of c){const A=u.get(k.id)||0;A>L&&(L=A,C=k.id)}if(C)return C}return c[0].id},[z.data,E.data,a,M]),X=ee({queryKey:["task-benchmark-trends",T,l.hide_closed_source_evals?!0:void 0],queryFn:()=>ne.trendingBenchmarks(T,{limit:100,min_recent_papers:0,is_open:l.hide_closed_source_evals?!0:void 0}),enabled:!!T&&!!((Ke=x.data)!=null&&Ke.id),staleTime:10*60*1e3}),I=v.useMemo(()=>{var c;return(((c=X.data)==null?void 0:c.results)||[]).find(p=>{var u;return p.id===((u=x.data)==null?void 0:u.id)})||null},[X.data,(Ge=x.data)==null?void 0:Ge.id]),ue=ee({queryKey:["leaderboard-metrics",(Qe=x.data)==null?void 0:Qe.id,T],queryFn:()=>ne.leaderboardMetrics(x.data.id,T),enabled:!!((Xe=x.data)!=null&&Xe.id)&&!!T,staleTime:10*60*1e3}),te=v.useMemo(()=>Gt(E.data,T,l.hide_closed_source_evals),[E.data,T,l.hide_closed_source_evals]),Y=te.visible,N=te.hiddenClosed,q=te.topHiddenClosed,D=v.useMemo(()=>Yr(Y),[Y]),re=v.useMemo(()=>bt(D,i),[D,i]),Se=v.useMemo(()=>{const c=new Set;return D.forEach(p=>{p.best_metric&&c.add(p.best_metric),Object.keys(p.metrics||{}).forEach(u=>c.add(u))}),Array.from(c)},[D]),J=v.useMemo(()=>(ue.data||[]).map(c=>c.metric_name),[ue.data]),P=J.length?J:Se,O=v.useMemo(()=>{var C,L;if(D.length===0)return P[0]||"";const c=new Map;for(const k of D){const A=k.best_metric;!A||oe((C=k.metrics)==null?void 0:C[A])===null||J.length&&!P.includes(A)||c.set(A,(c.get(A)||0)+1)}let p=null,u=0;for(const[k,A]of c)A>u&&(u=A,p=k);return p||P[0]||((L=D[0])==null?void 0:L.best_metric)||""},[D,P,J]),me=(Ye=t.get("metric"))==null?void 0:Ye.trim(),b=(me?P.find(c=>c.toLocaleLowerCase()===me.toLocaleLowerCase()):void 0)||(M==null?void 0:M.best_metric)||O,K=(((Ze=(Je=de.data)==null?void 0:Je.directions)==null?void 0:Ze[b])||"higher_is_better")==="lower_is_better"?"↓":"↑",G=v.useMemo(()=>!b||!P.includes(b)?P:[b,...P.filter(c=>c!==b)],[P,b]),d=v.useMemo(()=>G.length===0?b?[b]:[]:G.slice(0,Zr),[G,b]),{points:f,sota:R,sotaModel:_}=v.useMemo(()=>Jr(re,b,K),[re,b,K]),w=i===void 0?(et=x.data)==null?void 0:et.leaderboard_summary:void 0,j=E.isSuccess&&z.isSuccess&&de.isSuccess&&(!T||ue.isSuccess),V=j?b:w==null?void 0:w.metric,W=j?R:w==null?void 0:w.value,Ee=j?_:w==null?void 0:w.model_name,fe=!j&&!w,pe=i!==void 0&&!j;v.useEffect(()=>{if(g.current||!n||!E.data||E.data.length===0)return;const c=m.current;c&&(g.current=!0,c.scrollIntoView({behavior:"smooth",block:"start"}))},[n,E.data]);const U=v.useMemo(()=>{const c=z.data||[];return T?c.find(p=>p.id===T)||c[0]||null:c[0]||null},[z.data,T]),Ne=ee({queryKey:["area",U==null?void 0:U.area_id],queryFn:()=>ne.getArea(U.area_id),enabled:!!(U!=null&&U.area_id),staleTime:10*60*1e3});if(x.isLoading)return s.jsxs("div",{className:"page",children:[s.jsx(ye,{className:"h-12 w-1/2 mb-6"}),s.jsx(ye,{className:"h-64 w-full"})]});if(x.error||!x.data)return s.jsx("div",{className:"page",children:s.jsx(Ut,{variant:"destructive",children:s.jsx(qt,{children:"Benchmark not found."})})});const S=x.data,ge=re.slice().sort((c,p)=>{var L,k;const u=oe((L=c.metrics)==null?void 0:L[b]),C=oe((k=p.metrics)==null?void 0:k[b]);return u!==null&&C!==null?K==="↓"?u-C:C-u:u!==null?-1:C!==null?1:wt(c,b)-wt(p,b)}),Ve=!!S.supports_harness,Re={parameter_coverage_known:D.filter(c=>c.parameterCount!==null).length,parameter_coverage_total:D.length},xe=Re.parameter_coverage_known>0,Tt=c=>bt(D,c).length>0,Ue=c=>{r(p=>{const u=new URLSearchParams(p);return c===void 0?u.delete("max_parameters_exclusive"):u.set("max_parameters_exclusive",String(c)),u})},$e=c=>{r(p=>{const u=new URLSearchParams(p);return u.set("metric",c),u})},$=n&&ge.find(c=>yt(c,n))||null,F=S.introducing_paper??void 0,he=(F==null?void 0:F.arxiv_id)||(F==null?void 0:F.id)||es(S.paper_url),Z=(F==null?void 0:F.title)||S.introducing_paper_title||null,se=((tt=F==null?void 0:F.published)==null?void 0:tt.slice(0,4))||S.introduced_year||null,Pt=!!he||!!S.paper_url||!!Z,Ft=F!=null&&F.arxiv_id||(rt=S.paper_url)!=null&&rt.match(/^https?:\/\/(?:www\.)?arxiv\.org\//i)?`arXiv:${he}`:`Paper ${he}`;return s.jsx("div",{className:"page",children:s.jsxs("div",{className:"bm-page",children:[s.jsxs("div",{className:"breadcrumb",children:[s.jsx(ae,{to:"/tasks",children:"Tasks"}),Ne.data&&s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"sep",children:"/"}),s.jsx(ae,{to:`/tasks#area-${Kt(Ne.data.name)}`,children:Ne.data.name})]}),U&&s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"sep",children:"/"}),s.jsx(ae,{to:`/tasks/${U.slug||U.id}`,children:U.name})]}),s.jsx("span",{className:"sep",children:"/"}),s.jsx("span",{style:{color:"var(--accent-text)"},children:S.name})]}),s.jsxs("div",{className:"bm-title-row",children:[s.jsx("h1",{className:"bm-title",children:S.name}),I&&s.jsxs("div",{className:"bm-title-trend","aria-label":`${S.name} reporting trend`,children:[s.jsx(Ot,{history:I.history,benchmarkName:I.name}),s.jsxs("span",{className:"bm-title-trend-summary",children:[s.jsx("strong",{children:I.recent_paper_count})," ",I.recent_paper_count===1?"paper":"papers",I.rate_change==null?I.recent_paper_count>0&&s.jsx("span",{className:"benchmark-trend-change is-new",children:"new"}):s.jsxs("span",{className:`benchmark-trend-change ${I.rate_change>=1?"is-up":"is-down"}`,children:[I.rate_change>=1?"↑":"↓"," ",I.rate_change.toFixed(1),"×"]})]})]})]}),s.jsxs("div",{className:"bm-subtitle",children:[fe?s.jsx(ye,{className:"h-5 w-64 bm-summary-skeleton","aria-label":"Loading benchmark summary"}):s.jsxs("span",{children:[V&&s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"metric-tag",children:V}),s.jsx("span",{style:{color:"var(--hairline-strong)",margin:"0 8px"},children:"·"})]}),Ee?s.jsxs("span",{children:["Best: ",s.jsx("span",{className:"best-name",children:ce(W)})," by ",s.jsx("span",{className:"best-name",style:{fontStyle:"normal"},children:Ee})]}):s.jsxs("span",{children:[ge.length," evaluations"]})]}),S.hf_url&&s.jsxs("a",{className:"bm-action-btn",href:S.hf_url,target:"_blank",rel:"noopener noreferrer",children:[s.jsx("span",{"aria-hidden":"true",children:"🤗"})," View on Hugging Face"]})]}),S.description&&s.jsx("p",{className:"bm-description",children:S.description}),l.hide_closed_source_evals&&N.length>0&&s.jsxs("div",{className:"bm-hidden-closed-notice",children:[s.jsxs("span",{children:[N.length," closed-source ",N.length===1?"row is":"rows are"," hidden",q!=null&&q.model_name?s.jsxs(s.Fragment,{children:[", including ",s.jsx("strong",{children:q.model_name})]}):null,"."]}),s.jsx("button",{type:"button",className:"bm-hidden-closed-action",onClick:()=>{o(!1)},children:"Show closed-source"})]}),Pt&&s.jsxs("div",{className:"method-source",style:{marginTop:0,marginBottom:18},children:[s.jsx("span",{className:"method-source-label",children:"Source"}),he?s.jsxs(ae,{to:`/paper/${he}`,target:"_blank",rel:"noopener noreferrer",className:"method-source-link",children:[s.jsx("span",{className:"method-source-title",children:Z?s.jsx(ve,{title:Z}):Ft}),se&&s.jsx("span",{className:"method-source-meta",children:se})]}):S.paper_url?s.jsxs("a",{href:zt(S.paper_url)??void 0,target:"_blank",rel:"noopener noreferrer",className:"method-source-link",children:[s.jsx("span",{className:"method-source-title",children:Z?s.jsx(ve,{title:Z}):S.paper_url}),se&&s.jsx("span",{className:"method-source-meta",children:se})]}):s.jsxs("div",{className:"method-source-link is-static",children:[s.jsx("span",{className:"method-source-title",children:Z?s.jsx(ve,{title:Z}):null}),se&&s.jsx("span",{className:"method-source-meta",children:se})]})]}),!pe&&f.length>0&&s.jsxs("div",{className:"bm-card",ref:h,children:[s.jsxs("div",{className:"bm-card-screenshot-header","aria-hidden":"true",children:[s.jsxs("div",{className:"bm-card-screenshot-title",children:[s.jsx("span",{className:"bm-card-screenshot-eyebrow",children:"Benchmark"}),s.jsx("span",{className:"bm-card-screenshot-name",children:S.name})]}),s.jsxs("div",{className:"bm-card-screenshot-brand",children:[s.jsxs("span",{className:"brand",children:[s.jsx("span",{className:"brand-mark"}),s.jsxs("span",{className:"brand-name",children:["Papers ",s.jsx("em",{children:"With Code"})]})]}),s.jsx("span",{className:"bm-card-screenshot-url",children:"paperswithcode.co"})]})]}),s.jsxs("div",{className:"bm-card-head",children:[s.jsx("div",{className:"bm-card-title",children:"SOTA progression"}),s.jsxs("div",{className:"bm-card-actions",children:[P.length>1&&s.jsxs("label",{className:"bm-view-select",children:[s.jsx("span",{className:"bm-view-select-label",children:"View"}),s.jsx("select",{value:b,onChange:c=>$e(c.target.value),children:G.map(c=>s.jsx("option",{value:c,children:c},c))})]}),s.jsxs("label",{className:"bm-closed-toggle",title:"Show or hide evaluations of closed-source models",children:[s.jsx(ot,{className:"bm-closed-toggle-switch",checked:!l.hide_closed_source_evals,onCheckedChange:c=>{o(!c)},"aria-label":"Show closed-source models"}),s.jsx("span",{className:"bm-closed-toggle-label",children:"Closed-source"})]}),s.jsx(xt,{targetRef:h,label:"SOTA chart"})]})]}),s.jsx("div",{className:"bm-chart-wrap",children:s.jsx(Xt,{points:f,metric:b})}),s.jsxs("div",{className:"bm-chart-foot",children:[s.jsx("span",{className:"legend-dot"}),i===void 0?"All models":"Filtered models"," over time · highlighted dots track the running best · hover for the model · click to open the paper"]})]}),$&&(()=>{var L,k;const c=$.paper_arxiv_id||$.paper_id,p=$.paper_title||($.paper_arxiv_id?`arXiv:${$.paper_arxiv_id}`:null),u=$.best_metric&&((L=$.metrics)==null?void 0:L[$.best_metric])!==void 0?$.best_metric:b,C=(k=$.metrics)==null?void 0:k[u];return s.jsxs("div",{className:"bm-highlight-banner",role:"status",children:[s.jsx("span",{className:"bm-highlight-dot","aria-hidden":"true"}),s.jsxs("div",{className:"bm-highlight-text",children:[s.jsx("span",{className:"bm-highlight-label",children:"Comparing result"}),s.jsxs("span",{className:"bm-highlight-paper",children:[$.model_name||p||"—",$.harness?` · ${$.harness}`:""]}),s.jsxs("span",{className:"bm-highlight-meta",children:[C!==void 0&&u?s.jsxs(s.Fragment,{children:[u,": ",ce(C),p?" · ":""]}):null,c?s.jsx(ae,{to:`/paper/${c}`,children:we($.paper_title,p)}):we($.paper_title,p)]})]})]})})(),s.jsxs("div",{className:"bm-card",ref:y,children:[s.jsxs("div",{className:"bm-card-screenshot-header","aria-hidden":"true",children:[s.jsxs("div",{className:"bm-card-screenshot-title",children:[s.jsx("span",{className:"bm-card-screenshot-eyebrow",children:"Benchmark"}),s.jsx("span",{className:"bm-card-screenshot-name",children:S.name})]}),s.jsxs("div",{className:"bm-card-screenshot-brand",children:[s.jsxs("span",{className:"brand",children:[s.jsx("span",{className:"brand-mark"}),s.jsxs("span",{className:"brand-name",children:["Papers ",s.jsx("em",{children:"With Code"})]})]}),s.jsx("span",{className:"bm-card-screenshot-url",children:"paperswithcode.co"})]})]}),s.jsxs("div",{className:"bm-card-head",children:[s.jsx("div",{className:"bm-card-title",children:"Leaderboard"}),s.jsxs("div",{className:"bm-card-actions",children:[P.length>1&&s.jsxs("label",{className:"bm-view-select",children:[s.jsx("span",{className:"bm-view-select-label",children:"View"}),s.jsx("select",{value:b,onChange:c=>$e(c.target.value),children:G.map(c=>s.jsx("option",{value:c,children:c},c))})]}),s.jsxs("label",{className:"bm-closed-toggle",title:"Show or hide evaluations of closed-source models",children:[s.jsx(ot,{className:"bm-closed-toggle-switch",checked:!l.hide_closed_source_evals,onCheckedChange:c=>{o(!c)},"aria-label":"Show closed-source models"}),s.jsx("span",{className:"bm-closed-toggle-label",children:"Closed-source"})]}),!pe&&!xe&&E.isSuccess?s.jsx("span",{className:"bm-parameter-unavailable",children:"Parameter metadata unavailable"}):null,s.jsx(xt,{targetRef:y,label:"leaderboard"})]})]}),!pe&&xe&&s.jsxs("div",{className:"bm-parameter-filter-bar",children:[s.jsx("span",{className:"bm-parameter-filter-label",children:"Parameters Size"}),s.jsx("div",{className:"bm-parameter-filter-options",role:"group","aria-label":"Filter leaderboard by parameter size",children:$t.map(c=>{const p=i===c.maxParametersExclusive,u=!p&&!Tt(c.maxParametersExclusive);return s.jsx("button",{type:"button",className:`bm-parameter-filter-option${p?" is-active":""}`,"aria-pressed":p,disabled:u,onClick:()=>Ue(c.maxParametersExclusive),children:c.label},c.label)})}),s.jsxs("span",{className:"bm-parameter-coverage",children:["Parameters known for ",Re.parameter_coverage_known," of ",Re.parameter_coverage_total," entries"]})]}),E.isLoading||pe?s.jsx("div",{style:{padding:16},children:Array.from({length:5}).map((c,p)=>s.jsx(ye,{className:"h-10 w-full mb-2"},p))}):ge.length===0?i?s.jsxs("div",{className:"no-results",children:["No known parameter counts match this filter. "," ",s.jsx("button",{type:"button",className:"bm-empty-filter-action",onClick:()=>Ue(void 0),children:"Show all"})]}):s.jsx("div",{className:"no-results",children:"No evaluations submitted yet."}):s.jsx("div",{className:"bm-table-scroll",children:s.jsxs("table",{className:"bm-table",children:[s.jsx("thead",{children:s.jsxs("tr",{children:[s.jsx("th",{className:"col-rank",children:"Rank"}),s.jsx("th",{className:"col-model",children:"Model"}),Ve&&s.jsx("th",{className:"col-harness",children:"Harness"}),xe&&s.jsx("th",{className:"col-parameters",children:"Parameters"}),d.map(c=>{const p=c===b;return s.jsx("th",{className:`col-value ${p?"is-active":""}`,"aria-sort":p?K==="↓"?"ascending":"descending":"none",children:s.jsxs("button",{type:"button",className:"bm-metric-header",onClick:()=>$e(c),"aria-pressed":p,title:`Sort by ${c}`,children:[c,p?` ${K}`:""]})},c)}),s.jsx("th",{className:"col-paper",children:"Paper"}),s.jsx("th",{className:"col-year",children:"Year"})]})}),s.jsx("tbody",{children:(()=>{let c=null,p=0;return ge.map((u,C)=>{var at,nt;const L=oe((at=u.metrics)==null?void 0:at[b]);let k=null;L!==null&&((c===null||L!==c)&&(p=C+1,c=L),k=p);const A=u.paper_arxiv_id||u.paper_id,st=u.paper_title||(u.paper_arxiv_id?`arXiv:${u.paper_arxiv_id}`:null),Te=yt(u,n);return s.jsxs("tr",{ref:Te?m:void 0,className:Te?"is-highlighted":void 0,children:[s.jsx("td",{className:"col-rank",children:k??"—"}),s.jsxs("td",{className:"col-model",children:[Te&&s.jsx("span",{className:"bm-row-marker","aria-hidden":"true"}),u.hf_model_url?s.jsx("a",{href:u.hf_model_url,target:"_blank",rel:"noopener noreferrer",className:"bm-model-link",title:`Open ${u.model_name||"model"} on Hugging Face`,children:u.model_name||"—"}):u.model_name||"—",u.is_open===!1&&s.jsx(Dt,{}),(u.external??u.is_external)&&s.jsx(Ht,{sourceUrl:u.source_url||u.external_source_url||u.result_url})]}),Ve&&s.jsx("td",{className:"col-harness",children:u.harness||"—"}),xe&&s.jsx("td",{className:"col-parameters",title:u.parameterCount===null?void 0:u.parameterCount.toLocaleString("en-US"),"aria-label":u.parameterCount===null?"Parameters unknown":`${u.parameterCount.toLocaleString("en-US")} parameters`,children:u.parameterCount===null?"—":Qr(u.parameterCount)}),d.map(Pe=>{var lt;const it=Pe===b,be=(lt=u.metrics)==null?void 0:lt[Pe];return s.jsx("td",{className:`col-value${it?" is-active":""}${it&&k===1?" is-best":""}`,children:be!=null&&be!==""?ce(be):"—"},Pe)}),s.jsx("td",{className:"col-paper",children:A?s.jsx(ae,{to:`/paper/${A}`,children:we(u.paper_title,st)}):we(u.paper_title,st)}),s.jsx("td",{className:"col-year",children:((nt=u.paper_published_date)==null?void 0:nt.slice(0,4))||"—"})]},u.id)})})()})]})})]})]})})};export{ys as default}; diff --git a/assets/BenchmarkTrendSparkline-BJ3H66bV.js b/assets/BenchmarkTrendSparkline-B9CQXlVT.js similarity index 97% rename from assets/BenchmarkTrendSparkline-BJ3H66bV.js rename to assets/BenchmarkTrendSparkline-B9CQXlVT.js index 96a19aa9fbfcb0a7be66f9a8570c02aa62c15d0d..1df3217788f69f4b16df430c033cf8e4db39adc1 100644 --- a/assets/BenchmarkTrendSparkline-BJ3H66bV.js +++ b/assets/BenchmarkTrendSparkline-B9CQXlVT.js @@ -1 +1 @@ -import{r as C,j as t}from"./index-Cry0GNHI.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-Dt001B3A.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-BLEP80pf.js b/assets/ChatView-BLEP80pf.js new file mode 100644 index 0000000000000000000000000000000000000000..1ba1149ac382de8ddc96ee14126b79b4cd174155 --- /dev/null +++ b/assets/ChatView-BLEP80pf.js @@ -0,0 +1,16 @@ +var $t=Object.defineProperty;var Gt=(e,r,t)=>r in e?$t(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t;var Ce=(e,r,t)=>Gt(e,typeof r!="symbol"?r+"":r,t);import{d as Kt,A as zt,O as Qt,r as i,j as s,X as Xt,e as Lt,z as ot,c as Jt,u as Zt,a as er,y as tr,g as rr,Q as nr,L as St,b as sr}from"./index-Dt001B3A.js";import{u as ar}from"./useQuery-DD4hUA6p.js";import{C as ir,U as Et,b as or,c as $e,u as cr,d as lr,A as ur,a as dr}from"./ArtifactWorkspace-CMp03Kf3.js";import{c as Ge}from"./chat-98y1Ufht.js";import{e as fr,f as Nt,h as pr,T as hr,d as Ft,i as mr,j as gr,k as yr,l as nt,m as _r,t as kt,n as st,o as Pt,r as br,S as wr,a as vr,D as xr,s as Rr,v as Sr,w as at,x as et,y as Er,z as tt,B as rt,E as kr,F as Tr,G as Ar,H as ct,I as Ir}from"./chatLaunch-C8mQqa_z.js";import{S as Or}from"./chatPrompts-CDY3UGU1.js";import{u as Cr,O as jr}from"./openrouter-BTt-GpWV.js";import"./katex.min-BSBacQyE.js";import"./hover-card-C7JmPdFo.js";import"./github-oD2gKV6Z.js";import"./github-TRZ4i_h7.js";import"./PaperPreviewLink-CCwg7dvd.js";import"./index-Byizcq9V.js";import"./papers-KXkGPHI5.js";import"./file-text-BXknBxd6.js";import"./useMutation-BSdRNizq.js";import"./external-link-DdqhM_eg.js";import"./chevron-down-BXCXby03.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 Dr=Kt("Share2",[["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}],["circle",{cx:"6",cy:"12",r:"3",key:"w7nqdw"}],["circle",{cx:"18",cy:"19",r:"3",key:"1xt0gg"}],["line",{x1:"8.59",x2:"15.42",y1:"13.51",y2:"17.49",key:"47mynk"}],["line",{x1:"15.41",x2:"8.59",y1:"6.51",y2:"10.49",key:"1n3mei"}]]),le=(e,r)=>new Promise(t=>{const n=setTimeout(o,e);function o(){r==null||r.removeEventListener("abort",o),clearTimeout(n),t()}r==null||r.addEventListener("abort",o)}),Se=e=>({arxiv_id:null,source:"arxiv",source_url:null,thumbnail_url:null,authors:[],published:null,conference:null,citation_count:null,tasks:[],methods:[],repositories:[],project_pages:[],...e}),Ee={name:"Object Detection",slug:"object-detection"},je={name:"Real-Time Object Detection",slug:"real-time-object-detection"},Mr={"2502.12524":{route_id:"2502.12524",title:"YOLOv12: Attention-Centric Real-Time Object Detectors",content:"Enhancing the network architecture of the YOLO framework has been crucial for a long time. This work introduces an attention-centric YOLO framework, namely YOLOv12, built around area attention and residual efficient layer aggregation networks (R-ELAN). YOLOv12-N reaches 40.6 mAP at 1.64 ms on a T4 GPU, closing the gap to attention-based detectors without the usual latency penalty and surpassing YOLOv10/YOLOv11 by +1.2–1.6 mAP at matched latency.",content_truncated:!1,metadata:Se({arxiv_id:"2502.12524",authors:[{name:"Y. Tian"},{name:"Q. Ye"},{name:"D. Doermann"}],published:"2025-02-18",citation_count:412,tasks:[Ee,je],methods:[{name:"Area Attention",slug:"area-attention"}],repositories:[{url:"https://github.com/sunsmarterjie/yolov12",stars:18700}]})},"2407.17140":{route_id:"2407.17140",title:"RT-DETRv2: Improved Baseline with Bag-of-Freebies for Real-Time Detection",content:"RT-DETRv2 improves the real-time DETR baseline with selective multi-scale feature extraction, a discrete sampling operator to ease deployment, and training-only 'bag-of-freebies' that add no inference cost. RT-DETRv2-R18/R50/R101 reach 47.9 / 53.4 / 54.3 mAP on COCO at 217 / 108 / 74 FPS on T4 TensorRT FP16, remaining NMS-free end to end.",content_truncated:!1,metadata:Se({arxiv_id:"2407.17140",authors:[{name:"W. Lv"},{name:"Y. Zhao"},{name:"J. Chang"}],published:"2024-07-24",citation_count:268,tasks:[Ee,je],methods:[{name:"DETR",slug:"detr"}],repositories:[{url:"https://github.com/lyuwenyu/RT-DETR",stars:9400}]})},"2410.13842":{route_id:"2410.13842",title:"D-FINE: Redefining Regression as Fine-grained Distribution Refinement",content:"D-FINE reformulates bounding-box regression in DETR-style detectors as iterative refinement of probability distributions (FDR) and adds a localization self-distillation scheme (GO-LSD). D-FINE-L reaches 54.0 mAP at ~9 ms and D-FINE-X 55.8 mAP on COCO while staying real-time on modern GPUs, dominating RT-DETRv2 and YOLOv10 on the accuracy–latency Pareto front.",content_truncated:!1,metadata:Se({arxiv_id:"2410.13842",authors:[{name:"Y. Peng"},{name:"H. Li"},{name:"P. Wu"}],published:"2024-10-17",conference:"ICLR 2025",citation_count:187,tasks:[Ee,je],methods:[{name:"Knowledge Distillation",slug:"knowledge-distillation"}],repositories:[{url:"https://github.com/Peterande/D-FINE",stars:12100}]})},"2406.03459":{route_id:"2406.03459",title:"LW-DETR: A Transformer Replacement to YOLO for Real-Time Detection",content:"LW-DETR pairs a plain ViT encoder with a lightweight DETR decoder and shows the combination outperforms YOLOv8 and YOLO-NAS at comparable latency, arguing transformer detectors are viable even at the fast end of the accuracy–latency curve. Uses multi-level feature aggregation, window-attention interleaving, and IoU-aware classification.",content_truncated:!1,metadata:Se({arxiv_id:"2406.03459",authors:[{name:"Q. Chen"},{name:"X. Su"},{name:"X. Zhang"}],published:"2024-06-05",citation_count:94,tasks:[Ee,je],methods:[{name:"Vision Transformer",slug:"vision-transformer"}],repositories:[{url:"https://github.com/Atten4Vis/LW-DETR",stars:5200}]})},"2304.08069":{route_id:"2304.08069",title:"DETRs Beat YOLOs on Real-time Object Detection",content:"RT-DETR is the first real-time end-to-end object detector, built on an efficient hybrid encoder that decouples intra-scale interaction and cross-scale fusion, plus IoU-aware query selection. RT-DETR-R50 achieves 53.1 mAP at 108 FPS on COCO, beating comparably sized YOLO detectors in both speed and accuracy while eliminating NMS entirely; its Figure 1 accuracy–latency plot became the reference for later real-time detectors.",content_truncated:!1,metadata:Se({arxiv_id:"2304.08069",authors:[{name:"Y. Zhao"},{name:"W. Lv"},{name:"S. Xu"}],published:"2023-04-17",conference:"CVPR 2024",citation_count:2310,tasks:[Ee,je],methods:[{name:"DETR",slug:"detr"}],repositories:[{url:"https://github.com/lyuwenyu/RT-DETR",stars:9400}]})},"2405.14458":{route_id:"2405.14458",title:"YOLOv10: Real-Time End-to-End Object Detection",content:"YOLOv10 removes NMS from the YOLO pipeline via consistent dual assignments during training and applies a holistic efficiency–accuracy driven design across the architecture. YOLOv10-S is 1.8x faster than RT-DETR-R18 at similar COCO accuracy; the family spans 46.3–54.4 mAP with substantially lower end-to-end latency than prior YOLOs because post-processing disappears.",content_truncated:!1,metadata:Se({arxiv_id:"2405.14458",authors:[{name:"A. Wang"},{name:"H. Chen"},{name:"L. Liu"}],published:"2024-05-23",conference:"NeurIPS 2024",citation_count:1650,tasks:[Ee,je],methods:[{name:"NMS-free Training",slug:"nms-free-training"}],repositories:[{url:"https://github.com/THU-MIG/yolov10",stars:44200}]})},"2401.17270":{route_id:"2401.17270",title:"YOLO-World: Real-Time Open-Vocabulary Object Detection",content:"YOLO-World extends the YOLO paradigm to open-vocabulary detection through vision-language modeling with a re-parameterizable vision-language path aggregation network (RepVL-PAN) and region-text contrastive pretraining. It detects categories never seen at training time while running at 35+ FPS, and its prompt-then-detect deployment re-parameterizes text embeddings for zero runtime text-encoder cost.",content_truncated:!1,metadata:Se({arxiv_id:"2401.17270",authors:[{name:"T. Cheng"},{name:"L. Song"},{name:"Y. Ge"}],published:"2024-01-30",conference:"CVPR 2024",citation_count:890,tasks:[{name:"Open-Vocabulary Object Detection",slug:"open-vocabulary-object-detection"},Ee],methods:[{name:"Contrastive Learning",slug:"contrastive-learning"}],repositories:[{url:"https://github.com/AILab-CVC/YOLO-World",stars:16800}]})},158342:{route_id:"158342",title:"Ultralytics YOLO: real-time detection framework and model zoo",content:"Official Ultralytics framework release covering YOLO11 and YOLOv12 deployment: pretrained COCO checkpoints from nano to x-large, TensorRT/ONNX/CoreML export paths, and reproducible latency benchmarks on T4, Jetson Orin, and CPU targets. Widely used as the practical baseline for real-time detection deployments.",content_truncated:!1,metadata:Se({source:"external",source_url:"https://docs.ultralytics.com/models/",authors:[{name:"Ultralytics"}],published:"2025-01-02",tasks:[Ee,je],repositories:[{url:"https://github.com/ultralytics/ultralytics",stars:46e3}],project_pages:[{url:"https://docs.ultralytics.com"}]})}},Yt=e=>e.map(r=>Mr[r]),Tt=Yt(["2502.12524","2407.17140","2410.13842","2406.03459","2304.08069","2405.14458","2401.17270","158342"]),At=Yt(["2410.13842","2502.12524","2407.17140","2405.14458","2304.08069"]),It="The user wants the current state-of-the-art for real-time object detection. That's a moving target split across two lineages — the YOLO family (fast CNN one-stage detectors) and the DETR family (transformer, end-to-end, NMS-free). I should ground the answer in recent papers benchmarked on COCO with reported latency or FPS, not just accuracy. Let me start with a broad hybrid search, see which papers surface, then run a second, narrower query to pin down the head-to-head COCO mAP vs latency trade-offs before I write anything.",Ot="Good — both lineages are well represented. YOLOv12, YOLOv10 and RT-DETRv2 / D-FINE keep coming up. To actually rank them I need the accuracy-vs-latency numbers side by side on the same COCO val2017 protocol, so let me narrow the query to the benchmark comparison specifically.",Ct=`There isn't a single winner — real-time object detection in 2026 is a two-horse race between the [YOLO family](paper:2502.12524) (fast one-stage CNNs) and the end-to-end [DETR family](paper:2304.08069) (NMS-free transformers). Which one is “SOTA” depends entirely on where you sit on the accuracy-vs-latency curve. + +**At the fast / edge end**, [YOLOv12](paper:2502.12524) is the current leader. Its area-attention design pushes attention into the YOLO backbone without the usual latency hit — YOLOv12-N reaches 40.6 mAP at ~1.6 ms on a T4, roughly +1.5 mAP over [YOLOv10](paper:2405.14458) at matched speed. [YOLOv10](paper:2405.14458) is still very relevant because it made the YOLO head NMS-free, cutting real end-to-end latency. + +**At the high-accuracy end**, the transformer detectors win. [D-FINE](paper:2410.13842) currently holds the accuracy-latency Pareto front, reporting 55.8 mAP by reformulating box regression as fine-grained distribution refinement with self-distillation. It builds on [RT-DETRv2](paper:2407.17140), which hardened the [original RT-DETR](paper:2304.08069) recipe (the paper that first showed DETRs beating YOLOs in real time) with training-only “bag-of-freebies” that add no inference cost. + +**My recommendation:** for edge or high-FPS deployment, start with [YOLOv12](paper:2502.12524) — the [Ultralytics framework](paper:158342) has ready-made checkpoints and export paths. If you have GPU headroom and want maximum accuracy while staying real-time, use [D-FINE](paper:2410.13842) or [RT-DETRv2](paper:2407.17140). And if you need open-vocabulary detection rather than fixed COCO classes, [YOLO-World](paper:2401.17270) is the one to look at.`,Lr=["How do these compare on edge devices like Jetson?","Show me open-vocabulary detectors","What about small-object detection?"];async function*Nr(e,r){const t=()=>(r==null?void 0:r.aborted)===!0,n=e.trim().slice(0,90)||"state-of-the-art real-time object detection";if(yield{type:"stream_start",request_id:"req_mock",session_id:null},await le(350,r),!t()){yield{type:"reasoning_start"};for(let o=0;o{const r=String("0").trim().toLowerCase();return r==="1"||r==="true"||r==="yes"},Fr=()=>!0;class Be extends Error{constructor(r,t,n,o){super(r),this.code=t,this.status=n,this.retryAfterSeconds=o,this.name="ChatStreamError"}}function Pr(e,r){if(qe())try{Ge.reportLatency(e,r).catch(()=>{})}catch{}}function Yr(e,r={}){return qe()?qr(e,r.signal):Nr(e.message,r.signal)}function Br(e,r={}){return Ur(e,r.signal)}async function*qr(e,r){const t=await Ge.stream(e,r);yield*Bt(t)}async function*Ur(e,r){const t=await Ge.resumeStream(e,r);yield*Bt(t)}async function*Bt(e){if(!e.ok||!e.body){const o=e.ok?null:new zt(e,await e.text());o&&Qt(o);const c=o==null?void 0:o.detail,f=typeof c=="object"&&c!==null?c:null,m=e.status===403&&!c,g=Number(e.headers.get("Retry-After")),C=Number.isFinite(g)&&g>=0?Math.min(300,Math.ceil(g)):void 0;throw new Be(m?"Chat on staging is limited to approved Hugging Face users. Sign in with an approved account and try again.":(o==null?void 0:o.message)||`Chat stream failed (${e.status})`,f&&"code"in f&&typeof f.code=="string"?f.code:m?"staging_access_required":void 0,e.status,C)}const r=e.body.getReader(),t=new TextDecoder;let n="";try{for(;;){const{done:o,value:c}=await r.read();if(o)break;n+=t.decode(c,{stream:!0});let f;for(;(f=n.indexOf(` + +`))!==-1;){const m=n.slice(0,f);n=n.slice(f+2);const g=m.split(` +`).filter(C=>C.startsWith("data:")).map(C=>C.slice(5).trimStart()).join(` +`);!g||g==="[DONE]"||(yield JSON.parse(g))}}}finally{r.releaseLock()}}const Hr="https://huggingface.co/settings/inference-providers",jt="pwc.chat.billing-notice-dismissed.v1";function Wr({provider:e}){const[r,t]=i.useState(()=>localStorage.getItem(jt)==="1");return!qe()||r||e!=="huggingface"?null:s.jsxs("div",{className:"chat-billing-notice",role:"note",children:[s.jsx("span",{children:"Hugging Face models use the inference permission granted when you start chatting. Included monthly credits are used first, then extra usage requires purchased credits. You can choose organization billing in Settings."}),s.jsxs("div",{className:"chat-billing-notice-actions",children:[s.jsx("a",{href:"/settings",children:"Review billing"}),s.jsx("a",{href:Hr,target:"_blank",rel:"noreferrer",children:"Review usage"}),s.jsx("button",{type:"button",className:"chat-billing-notice-dismiss","aria-label":"Dismiss billing notice",title:"Dismiss",onClick:()=>{localStorage.setItem(jt,"1"),t(!0)},children:s.jsx(Xt,{size:15,"aria-hidden":"true"})})]})]})}function Dt({variant:e,composerProps:r,provider:t,paused:n,suggestions:o=[]}){var f;const c=s.jsxs(s.Fragment,{children:[s.jsx(Wr,{provider:t}),n&&s.jsx("div",{id:"chat-paused-description",className:"chat-paused-banner",role:"status",children:"Chat is temporarily disabled. You can keep browsing and editing your conversations. New research runs will return when chat is restored."}),s.jsx(ir,{...r,...e==="empty"?{autoFocus:!0}:{placeholder:(f=r.draft)!=null&&f.text?"Edit and send again…":"Ask a follow-up…"}}),e==="empty"&&s.jsx("div",{className:"chat-examples",children:o.map(m=>s.jsx("button",{type:"button",className:"chat-example",disabled:n,onClick:()=>{var g;return r.onSend({text:m,paperMentions:[],...(g=r.draft)!=null&&g.paperSelection?{paperSelection:r.draft.paperSelection}:{}})},children:m},m))})]});return e==="empty"?c:s.jsx("div",{className:"chat-composer-wrap",children:s.jsxs("div",{className:"chat-composer-inner",children:[c,s.jsx("div",{className:"chat-composer-foot",children:qe()?s.jsxs(s.Fragment,{children:[t==="huggingface"&&s.jsxs("span",{className:"chat-provider-attribution",children:["Powered by 🤗 ",s.jsx("a",{href:"https://huggingface.co/docs/inference-providers/en/index",target:"_blank",rel:"noreferrer",children:"Inference Providers"}),"."]}),t==="openrouter"&&s.jsxs("span",{className:"chat-provider-attribution",children:["Powered by ",s.jsx("a",{href:"https://openrouter.ai",target:"_blank",rel:"noreferrer",children:"OpenRouter"}),"."]}),t==="openai"&&s.jsx("span",{className:"chat-provider-attribution",children:"Powered by OpenAI."}),s.jsx("span",{children:"The AI assistant can make mistakes. Double-check responses."})]}):s.jsx(s.Fragment,{children:"Assistant preview — responses are simulated."})})]})})}function Vr({messages:e,papers:r,busy:t,queuedDraft:n,paperMentionsEnabled:o,archivePending:c,openRouterFallbackEnabled:f,onToggleBlock:m,onEditAndResend:g,onArchiveOld:C,onArchiveOldest:_}){var ue,A;const[v,k]=i.useState(null),F=i.useRef(null),T=i.useRef(null),L=i.useRef(null);i.useEffect(()=>{t?k(null):L.current=null},[t]),i.useLayoutEffect(()=>{const h=F.current;if(h){if(T.current!==null){h.scrollTop=T.current,T.current=null;return}if(L.current){const I=Array.from(h.querySelectorAll("[data-message-id]")).find(D=>D.dataset.messageId===L.current);if(I){const D=h.getBoundingClientRect(),P=I.getBoundingClientRect();h.scrollTop+=P.top-D.top-24;return}}h.scrollTop=h.scrollHeight}},[e]);const Y=e.filter(h=>h.role==="user"),V=(ue=Y[0])==null?void 0:ue.id,U=(A=Y.at(-1))==null?void 0:A.id,$=(h,I)=>{var D;T.current=((D=F.current)==null?void 0:D.scrollTop)??null,m(h,I)};return s.jsx("div",{className:"chat-conversation",ref:F,children:s.jsxs("div",{className:"chat-conversation-inner",children:[e.length===0&&(n==null?void 0:n.text)&&s.jsx(Et,{id:"queued-launch-preview",text:n.text,paperMentions:n.paperMentions,paperSelection:n.paperSelection,isInitial:!0}),e.map(h=>h.role==="user"?s.jsx(Et,{id:h.id,text:h.text??"",paperMentions:h.paperMentions??[],paperSelection:h.paperSelection,paperMentionsEnabled:o,isInitial:h.id===V,editingAllowed:!t&&!!h.revision,editing:v===h.id,editNotice:h.id===V?"Sending will replace this conversation.":h.id===U?"Sending will replace the response.":"Sending will replace the response and all messages after it.",onEdit:()=>k(h.id),onCancel:()=>k(null),onResendDraft:I=>{h.id!==V&&(L.current=h.id);const D=g(h.id,I);return D?k(null):L.current=null,D}},h.id):s.jsx(or,{msg:h,papers:r,onToggleBlock:$,onArchiveOldChats:C,onArchiveOldestChats:_,archivePending:c,hfBilling:null,openRouterFallbackEnabled:f,feedbackEnabled:!0},h.id))]})})}function $r({retryAt:e,onRetry:r,onCancel:t}){const[n,o]=i.useState(()=>Math.max(0,Math.ceil((e-Date.now())/1e3))),c=i.useRef(null);return i.useEffect(()=>{var C;const f=document.activeElement instanceof HTMLElement?document.activeElement:null;(C=c.current)==null||C.focus();const m=()=>o(Math.max(0,Math.ceil((e-Date.now())/1e3)));m();const g=window.setInterval(m,250);return()=>{window.clearInterval(g),f==null||f.focus()}},[e]),s.jsx("div",{className:"chat-capacity-dialog-backdrop",role:"presentation",children:s.jsxs("div",{className:"chat-capacity-dialog",role:"dialog","aria-modal":"true","aria-labelledby":"chat-capacity-dialog-title","aria-describedby":"chat-capacity-dialog-description",onKeyDown:f=>{f.key==="Escape"&&(f.preventDefault(),t())},children:[s.jsx("h2",{id:"chat-capacity-dialog-title",children:"All research slots are currently in use"}),s.jsx("p",{id:"chat-capacity-dialog-description",children:"Your message was not sent or billed. Try again in a few seconds."}),s.jsx("p",{className:"chat-capacity-countdown","aria-live":"polite",children:n>0?`Try again available in ${n} second${n===1?"":"s"}.`:"You can try again now."}),s.jsxs("div",{className:"chat-capacity-dialog-actions",children:[s.jsx("button",{type:"button",className:"chat-capacity-cancel",ref:c,onClick:t,children:"Cancel"}),s.jsx("button",{type:"button",className:"chat-capacity-retry",disabled:n>0,onClick:r,children:"Try again"})]})]})})}function Gr({onClose:e}){const r=i.useRef(null);return i.useEffect(()=>{var n;const t=document.activeElement instanceof HTMLElement?document.activeElement:null;return(n=r.current)==null||n.focus(),()=>t==null?void 0:t.focus()},[]),s.jsx("div",{className:"chat-capacity-dialog-backdrop",role:"presentation",children:s.jsxs("div",{className:"chat-capacity-dialog",role:"dialog","aria-modal":"true","aria-labelledby":"chat-disabled-title","aria-describedby":"chat-disabled-description",onKeyDown:t=>{t.key==="Escape"&&(t.preventDefault(),e())},children:[s.jsx("h2",{id:"chat-disabled-title",children:"Chat is temporarily disabled"}),s.jsx("p",{id:"chat-disabled-description",children:"We've temporarily paused new research runs. Your message wasn't sent, and your draft is still here. Please try again later."}),s.jsx("div",{className:"chat-capacity-dialog-actions",children:s.jsx("button",{ref:r,type:"button",className:"chat-capacity-cancel",onClick:e,children:"Keep editing"})})]})})}function Kr({url:e,onClose:r}){return e?s.jsx("div",{className:"chat-share-dialog-backdrop",role:"presentation",onMouseDown:r,children:s.jsxs("div",{className:"chat-share-dialog",role:"dialog","aria-modal":"true","aria-labelledby":"chat-share-dialog-title",onMouseDown:t=>t.stopPropagation(),children:[s.jsx("h2",{id:"chat-share-dialog-title",children:"Public link created"}),s.jsx("p",{children:"Anyone with this link can see this conversation. It could not be copied automatically, so copy it manually:"}),s.jsx("input",{readOnly:!0,value:e,"aria-label":"Public conversation link",autoFocus:!0,onFocus:t=>t.currentTarget.select()}),s.jsx("button",{type:"button",onClick:r,children:"Close"})]})}):null}const lt="pwc:chat:sidebar-width",ut=280,dt=200,ft=480,pt=e=>Math.max(dt,Math.min(ft,e)),zr=()=>{if(typeof window>"u")return ut;const e=Number(localStorage.getItem(lt));return Number.isFinite(e)&&e>0?pt(e):ut};function Qr({sessions:e,activeSessionId:r,loading:t,error:n,open:o,onClose:c,onNew:f,onNavigate:m,onRename:g,onDelete:C}){const[_,v]=i.useState(zr),k=i.useRef(null),F=i.useRef(_),[T,L]=i.useState(null),[Y,V]=i.useState(""),[U,$]=i.useState(null);i.useEffect(()=>{if(!U)return;const u=()=>$(null),p=M=>{M.key==="Escape"&&u()};return window.addEventListener("click",u),window.addEventListener("keydown",p),()=>{window.removeEventListener("click",u),window.removeEventListener("keydown",p)}},[U]);const ue=u=>{L(u.id),V(u.title)},A=async u=>{const p=Y.trim();p&&await g(u,p)&&L(null)},h=(u,p,M)=>$({id:u,x:p,y:M}),I=u=>{if(!k.current)return;const p=pt(k.current.width+u-k.current.x);F.current=p,v(p)},D=()=>{k.current&&(k.current=null,localStorage.setItem(lt,String(F.current)))},P=u=>{const p=pt(u);F.current=p,v(p),localStorage.setItem(lt,String(p))};return s.jsxs("aside",{className:`chat-sidebar${o?"":" chat-sidebar-closed"}`,style:{"--chat-sidebar-width":`${_}px`},children:[s.jsxs("div",{className:"chat-sidebar-top",children:[s.jsxs("button",{type:"button",className:"chat-new-chat",onClick:()=>{$e()&&f()},children:[s.jsx(fr,{})," New chat"]}),s.jsx("button",{type:"button",className:"icon-btn",onClick:c,title:"Collapse sidebar",children:s.jsx(Nt,{})})]}),s.jsxs("nav",{className:"chat-sessions","aria-label":"Chat history",children:[t&&s.jsx("div",{className:"chat-sessions-empty",children:"Loading chats…"}),!t&&n&&s.jsx("div",{className:"chat-sessions-empty",children:n}),!t&&!n&&e.length===0&&s.jsx("div",{className:"chat-sessions-empty",children:"Conversations you start will show up here."}),pr(e).map(u=>s.jsxs("div",{className:"chat-session-group",children:[s.jsx("div",{className:"chat-session-group-label",children:u.label}),u.items.map(p=>s.jsxs("div",{className:`chat-session${p.id===r?" chat-session-active":""}`,role:"button",tabIndex:0,onClick:()=>{$e()&&m(p.id)},onKeyDown:M=>{if(M.key==="Enter"&&$e()&&m(p.id),M.key==="F2"&&ue(p),M.key==="ContextMenu"||M.shiftKey&&M.key==="F10"){M.preventDefault();const de=M.currentTarget.getBoundingClientRect();h(p.id,de.right-150,de.bottom)}},onContextMenu:M=>{M.preventDefault(),h(p.id,M.clientX,M.clientY)},children:[T===p.id?s.jsx("input",{className:"chat-session-title-input",value:Y,autoFocus:!0,maxLength:80,onClick:M=>M.stopPropagation(),onChange:M=>V(M.target.value),onBlur:()=>void A(p.id),onKeyDown:M=>{M.stopPropagation(),M.key==="Enter"&&A(p.id),M.key==="Escape"&&L(null)}}):s.jsx("span",{className:"chat-session-title",children:p.title}),s.jsx("button",{type:"button",className:"chat-session-menu","aria-label":"Chat actions","aria-haspopup":"menu",title:"Chat actions",onClick:M=>{M.stopPropagation();const de=M.currentTarget.getBoundingClientRect();h(p.id,de.right-150,de.bottom)},children:"⋯"}),s.jsx("button",{type:"button",className:"chat-session-delete","aria-label":"Delete conversation",onClick:M=>{M.stopPropagation(),$e()&&C(p.id)},children:s.jsx(hr,{})})]},p.id))]},u.label))]}),s.jsx("div",{className:"chat-sidebar-resize-handle",role:"separator","aria-label":"Resize chat history","aria-orientation":"vertical","aria-valuemin":dt,"aria-valuemax":ft,"aria-valuenow":_,title:"Drag to resize; double-click to reset",tabIndex:0,onPointerDown:u=>{u.button===0&&(k.current={x:u.clientX,width:_},F.current=_,u.currentTarget.setPointerCapture(u.pointerId))},onPointerMove:u=>I(u.clientX),onPointerUp:D,onPointerCancel:D,onLostPointerCapture:D,onDoubleClick:()=>P(ut),onKeyDown:u=>{(u.key==="ArrowLeft"||u.key==="ArrowRight")&&(u.preventDefault(),P(_+(u.key==="ArrowRight"?10:-10))),(u.key==="Home"||u.key==="End")&&(u.preventDefault(),P(u.key==="Home"?dt:ft))}}),U&&s.jsx("div",{className:"chat-session-context-menu",role:"menu",style:{left:U.x,top:U.y},onClick:u=>u.stopPropagation(),children:s.jsx("button",{type:"button",role:"menuitem",autoFocus:!0,onClick:()=>{const u=e.find(p=>p.id===U.id);u&&ue(u),$(null)},children:"Rename chat"})})]})}function Xr({sessionId:e,busy:r,loading:t,hasPaperSelection:n=!1,onError:o}){const{toast:c}=Lt(),[f,m]=i.useState(!1),[g,C]=i.useState(""),_=async()=>{var v;if(!(r||f)&&!(n&&!window.confirm("This public link will include the selected paper passage. Anyone with the link can read that passage. Continue?"))){m(!0);try{const k=await mr(e),F=new URL(k.public_path,window.location.origin).toString();try{if(!((v=navigator.clipboard)!=null&&v.writeText))throw new Error("Clipboard unavailable");await navigator.clipboard.writeText(F),c({className:"chat-share-toast",duration:5e3,title:"Public link copied to your clipboard",description:"Anyone with this link can see this conversation."})}catch{C(F)}}catch(k){const F=k instanceof Error?k.message:"Could not share this conversation";o(F),c({variant:"destructive",title:"Share failed",description:F})}finally{m(!1)}}};return s.jsxs(s.Fragment,{children:[s.jsxs("button",{type:"button",className:"chat-share-button",onClick:()=>void _(),disabled:r||f||t,"aria-label":"Share conversation",children:[f?s.jsx(Ft,{}):s.jsx(Dr,{"aria-hidden":"true"}),s.jsx("span",{children:"Share"})]}),s.jsx(Kr,{url:g,onClose:()=>C("")})]})}const Jr=({descriptor:e})=>{const r=cr(),{open:t,register:n,unregister:o}=r,c=ot.useRef(null),f=e.source_head??e.preview_head,m=ot.useMemo(()=>f?{kind:"artifact",schema_version:1,scope:"owner",artifact_id:e.artifact_id,version_id:f.version_id,identifier:"latex-paper",version:f.version,artifact_kind:"latex_paper",title:e.title,status:"ready",preview_mime:"application/pdf",source_language:"latex",total_bytes:0}:null,[e.artifact_id,e.title,f]),g=m?lr(m):null;return ot.useEffect(()=>{if(!(!m||!g))return n(m),c.current!==g&&(c.current=g,t(m)),()=>o(g)},[m,g,t,n,o]),null};function Zr({messages:e,refreshSessions:r,resetChat:t,restoreDraft:n,clearTitle:o}){const{toast:c}=Lt(),[f,m]=i.useState(null),g=()=>{const v=[...e].reverse().find(k=>k.role==="user");t(),n({text:(v==null?void 0:v.text)??"",paperMentions:(v==null?void 0:v.paperMentions)??[],...v!=null&&v.paperSelection?{paperSelection:v.paperSelection}:{}}),o()};return{pending:f,archiveOld:async()=>{if(f===null){m("old");try{const v=await yr();if(await r(),v.archived_count===0){c({title:"No chats were archived",description:"There are no inactive chats older than 30 days."});return}g(),c({title:`${v.archived_count} ${v.archived_count===1?"chat":"chats"} archived`,description:"Your question is ready to send again."})}catch(v){c({variant:"destructive",title:"Could not archive old chats",description:v instanceof Error?v.message:"Try again."})}finally{m(null)}}},archiveOldest:async()=>{if(f===null){m("oldest");try{const v=await gr();await r(),g(),c({title:`${v.archived_count} ${v.archived_count===1?"chat":"chats"} archived`,description:"Your question is ready to send again."})}catch(v){c({variant:"destructive",title:"Could not archive chats",description:v instanceof Error?v.message:"Try again."})}finally{m(null)}}}}}class en{constructor(r,t=Pr){Ce(this,"requestId");Ce(this,"firstVisibleAt");Ce(this,"streamStartReported",!1);Ce(this,"firstVisibleReported",!1);Ce(this,"terminalReported",!1);Ce(this,"semanticReported",new Set);this.submittedAt=r,this.report=t}recordStreamStart(r,t){this.requestId=r,this.streamStartReported||(this.streamStartReported=!0,this.send({submission_to_stream_start_ms:Math.max(0,t-this.submittedAt)})),this.reportFirstVisible()}recordFirstVisible(r){this.firstVisibleAt===void 0&&(this.firstVisibleAt=r,this.reportFirstVisible())}recordSemantic(r,t){if(this.semanticReported.has(r))return;this.semanticReported.add(r);const n=Math.max(0,t-this.submittedAt);this.send(r==="reasoning"?{submission_to_first_reasoning_delta_ms:n}:r==="tool"?{submission_to_first_tool_call_ms:n}:{submission_to_first_answer_delta_ms:n})}recordTerminal(r){this.terminalReported||(this.terminalReported=!0,this.send({terminal_classification:r}))}reportFirstVisible(){!this.requestId||this.firstVisibleAt===void 0||this.firstVisibleReported||(this.firstVisibleReported=!0,this.send({submission_to_first_visible_delta_ms:Math.max(0,this.firstVisibleAt-this.submittedAt)}))}send(r){this.requestId&&this.report(this.requestId,r)}}const qt="Preparing research workspace…",Ut={preparing_workspace:"Preparing secure workspace…",starting_agent:"Starting research agent…",connecting_model:"Connecting to model…"},Ht=()=>({messages:[],sessionId:null,title:"",phase:"idle"});function Mt(e,r){for(let t=e.length-1;t>=0;t-=1)if(r(e[t]))return t;return-1}function Te(e){if(e.status!==qt&&!Object.values(Ut).includes(e.status))return e;const{status:r,...t}=e;return t}function Z(e,r){if(!e.length)return e;const t=e.slice();return t[t.length-1]=r(t[t.length-1]),t}function De(e,r,t){return Z(e,n=>{const o=Te(n),c=o.blocks??[];return{...o,blocks:c.map((f,m)=>r(f,m,c)?t(f):f)}})}function tn(e,r){switch(r.type){case"stream_start":return r.session_id?{...e,sessionId:r.session_id}:e;case"sandbox_start":case"sandbox_ready":case"workspace_ready":return e;case"lifecycle":return{...e,messages:Z(e.messages,t=>{var n;return t.role==="assistant"&&t.streaming&&(((n=t.blocks)==null?void 0:n.length)??0)===0?{...t,status:Ut[r.phase]}:t})};case"session_title_start":return{...e,title:""};case"session_title_delta":return{...e,title:`${e.title}${r.text}`.replace(/\s+/g," ").slice(0,80)};case"session_title_done":return{...e,title:r.title};case"reasoning_start":return{...e,messages:Z(e.messages,t=>{const n=Te(t);return{...n,blocks:[...(n.blocks??[]).map(o=>o.kind==="reasoning"&&o.active?{...o,active:!1,open:!1}:o),{kind:"reasoning",text:"",active:!0,open:!0}]}})};case"reasoning_delta":return{...e,messages:De(e.messages,(t,n,o)=>t.kind==="reasoning"&&Mt(o,c=>c.kind==="reasoning")===n,t=>t.kind==="reasoning"?{...t,text:t.text+r.text}:t)};case"reasoning_end":return{...e,messages:Z(e.messages,t=>{const n=t.blocks??[],o=Mt(n,m=>m.kind==="reasoning"&&m.active);if(o<0)return t;const c=n[o];if(c.kind!=="reasoning")return t;const f=n[o-1];return(f==null?void 0:f.kind)==="reasoning"&&f.text===c.text?{...t,blocks:n.filter((m,g)=>g!==o)}:{...t,blocks:n.map((m,g)=>g===o?{...c,active:!1,open:!1}:m)}})};case"tool_call":return{...e,messages:Z(e.messages,t=>{const n=Te(t);return{...n,blocks:[...n.blocks??[],{kind:"tool",id:r.id,name:r.name,args:r.args,status:"running",open:!1}]}})};case"tool_call_start":return{...e,messages:Z(e.messages,t=>{const n=Te(t);return{...n,blocks:[...n.blocks??[],{kind:"tool",schema_version:2,id:r.id,name:r.name,args:{},argumentText:"",argumentState:"streaming",arguments_redacted:r.redacted,status:"running",open:!1}]}})};case"tool_call_arguments_delta":return{...e,messages:De(e.messages,t=>t.kind==="tool"&&t.id===r.id,t=>t.kind==="tool"?{...t,args:r.partial_args,argumentText:r.snapshot?r.delta:`${t.argumentText??""}${r.delta}`,arguments_redacted:t.arguments_redacted||r.redacted}:t)};case"tool_call_arguments_done":return{...e,messages:De(e.messages,t=>t.kind==="tool"&&t.id===r.id,t=>t.kind==="tool"?{...t,args:r.args,argumentText:JSON.stringify(r.args),argumentState:"done",arguments_redacted:t.arguments_redacted||r.redacted}:t)};case"app_start":return{...e,messages:Z(e.messages,t=>{const n=Te(t);return{...n,blocks:[...n.blocks??[],{kind:"app",schema_version:1,instance_id:r.instance_id,provider:r.provider,server:r.server,tool:r.tool,resource_uri:r.resource_uri,status:"loading",input:r.input,result:{content:[],structuredContent:{},isError:!1},csp:{},permissions:{clipboardWrite:!0},height:525}]}})};case"app_result":return{...e,messages:De(e.messages,t=>t.kind==="app"&&t.instance_id===r.id,t=>t.kind==="app"?{...t,status:r.status,result:r.result}:t)};case"tool_result":return{...e,messages:De(e.messages,t=>t.kind==="tool"&&t.id===r.id,t=>t.kind!=="tool"?t:r.status?{...t,schema_version:2,status:r.status,took_ms:r.took_ms,content:r.content,metadata:r.metadata,open:r.status!=="success"}:{...t,status:"done",hits:r.hits,took_ms:r.took_ms,results:r.results})};case"artifact_start":return{...e,messages:Z(e.messages,t=>{const n=Te(t);return{...n,blocks:[...n.blocks??[],{kind:"artifact",schema_version:1,scope:"owner",publication_id:r.publication_id,identifier:r.identifier,artifact_kind:"posterly",title:r.title,status:"generating",phase:"publishing_poster"}]}})};case"artifact_ready":return{...e,messages:De(e.messages,t=>t.kind==="artifact"&&t.publication_id===r.publication_id,t=>t.kind==="artifact"?{...t,artifact_id:r.artifact_id,version_id:r.version_id,identifier:r.identifier,version:r.version,title:r.title,status:"ready",preview_mime:r.preview_mime,source_language:r.source_language,gate_status:r.gate_status,total_bytes:r.total_bytes,phase:void 0}:t)};case"artifact_error":return{...e,messages:De(e.messages,t=>t.kind==="artifact"&&t.publication_id===r.publication_id,t=>t.kind==="artifact"?{...t,status:"error",phase:void 0,error_code:r.code,error_message:r.message}:t)};case"answer_delta":return{...e,messages:Z(e.messages,t=>{const n=Te(t),o=n.blocks??[],c=o.at(-1);return(c==null?void 0:c.kind)==="answer"&&!c.done?{...n,blocks:[...o.slice(0,-1),{...c,text:c.text+r.text}]}:{...n,blocks:[...o,{kind:"answer",text:r.text,done:!1}]}})};case"done":return{...e,phase:"complete",messages:Z(e.messages,t=>({...t,streaming:!1,followups:r.followups,finishReason:r.finish_reason,citations:r.citations,blocks:(t.blocks??[]).map(n=>n.kind==="answer"?{...n,done:!0}:n.kind==="reasoning"&&n.active?{...n,active:!1,open:!1}:n)}))};case"error":return{...e,phase:"failed",messages:Z(e.messages,t=>({...t,streaming:!1,error:r.message,errorCode:r.code,blocks:(t.blocks??[]).map(n=>n.kind==="reasoning"&&n.active?{...n,active:!1,open:!1}:n.kind==="tool"&&n.status==="running"?{...n,status:"error",open:!0}:n)}))};default:return e}}function rn(e){return Z(e,r=>{if(r.role!=="assistant")return r;const t=(r.blocks??[]).flatMap(n=>n.kind==="tool"&&n.status==="running"?[{...n,status:"error",open:!0}]:n.kind==="reasoning"&&n.active?n.text?[{...n,active:!1,open:!1}]:[]:n.kind==="answer"?[{...n,done:!0}]:[n]);return{...r,blocks:t,streaming:!1,finishReason:"stopped"}})}function We(e,r){switch(r.type){case"start":return{messages:r.messages,sessionId:r.sessionId,title:"",phase:"streaming"};case"event":return tn(e,r.event);case"load":return{messages:r.messages,sessionId:r.sessionId,title:e.title,phase:"idle"};case"workspace_status":return{...e,messages:Z(e.messages,t=>{var n;return t.role==="assistant"&&t.streaming&&(((n=t.blocks)==null?void 0:n.length)??0)===0&&!t.error?{...t,status:qt}:t})};case"clear_workspace_status":return{...e,messages:Z(e.messages,Te)};case"settle":return{...e,phase:"idle",messages:Z(e.messages,t=>t.streaming?{...t,streaming:!1}:t)};case"stop":return{...e,messages:rn(e.messages),phase:"stopped"};case"reset":return Ht()}}const ke={minDelayMs:5,maxDelayMs:80,minRateCharsPerMs:.3,maxBufferedMs:400,arrivalRateTauMs:1e3,arrivalRateHeadroom:1.1,maxPendingChars:64},nn={now:()=>performance.now(),sleep:(e,r)=>new Promise(t=>{if(r!=null&&r.aborted||e<=0){t();return}const n=window.setTimeout(o,e);function o(){r==null||r.removeEventListener("abort",o),window.clearTimeout(n),t()}r==null||r.addEventListener("abort",o,{once:!0})})};function sn(e){return!["stream_start","sandbox_start","sandbox_ready","workspace_ready","session_title_start","session_title_delta","session_title_done"].includes(e.type)}function an(e,r=!1,t=ke.maxPendingChars){var o;if(!e)return{pieces:[],pending:""};if(r)return{pieces:[e],pending:""};const n=Intl.Segmenter;if(n){const f=[...new n(void 0,{granularity:"word"}).segment(e)].filter(g=>g.isWordLike);let m=0;if(f.length>1&&(m=f.at(-1).index),f.length&&/\s$/u.test(e)&&(m=e.length),m>0){const g=e.slice(0,m),C=[],v=[...new n(void 0,{granularity:"word"}).segment(g)].filter(k=>k.isWordLike);for(let k=0;kF&&C.push(g.slice(F,T))}return v.length||C.push(g),{pieces:C,pending:e.slice(m)}}}else{const c=[...e.matchAll(/\s+/gu)];if(c.length){const f=[];let m=0;for(const g of c){const C=g.index+g[0].length;f.push(e.slice(m,C)),m=C}return{pieces:f,pending:e.slice(m)}}}return e.length>=t?{pieces:[e.slice(0,t)],pending:e.slice(t)}:{pieces:[],pending:e}}function on(e,r={}){const t={minDelayMs:r.minDelayMs??ke.minDelayMs,maxDelayMs:r.maxDelayMs??ke.maxDelayMs,minRateCharsPerMs:r.minRateCharsPerMs??ke.minRateCharsPerMs,maxBufferedMs:r.maxBufferedMs??ke.maxBufferedMs,arrivalRateTauMs:r.arrivalRateTauMs??ke.arrivalRateTauMs,arrivalRateHeadroom:r.arrivalRateHeadroom??ke.arrivalRateHeadroom,maxPendingChars:r.maxPendingChars??ke.maxPendingChars},n=r.clock??nn,o=[];let c="",f=null,m=0,g=!0,C=!1,_=null,v=0,k=n.now(),F=!1;const T=()=>{_==null||_(),_=null},L=(A,h)=>{const I=A.type==="reasoning_delta"||A.type==="answer_delta"?A.text.length:0;o.push({kind:"event",event:A,arrivedAt:h,chars:I}),T()},Y=A=>{if(!f||!c)return;const h=an(c,A,t.maxPendingChars);for(const I of h.pieces)I&&L({type:f,text:I},m),m=n.now();c=h.pending,c||(f=null)},V=A=>{if(!g)return;const h=n.now();if(A.type==="reasoning_delta"||A.type==="answer_delta"){const I=A.type;if(!A.text)return;if(!F){F=!0,v+=A.text.length,k=h;const P=Array.from(A.text)[0];L({type:I,text:P},h);const u=A.text.slice(P.length);if(u)for(f=I,c=u,m=h,Y(!1);c.length>=t.maxPendingChars;)Y(!1);return}f&&f!==I&&Y(!0),f||(f=I,m=h),c+=A.text;const D=Math.max(0,h-k);for(v*=Math.exp(-D/t.arrivalRateTauMs),v+=A.text.length,k=h,Y(!1);c.length>=t.maxPendingChars;)Y(!1);return}sn(A)&&Y(!0),L(A,h)},U=(async()=>{var A;try{for await(const h of e)V(h);g&&Y(!0)}catch(h){g&&!((A=r.signal)!=null&&A.aborted)&&(Y(!0),o.push({kind:"error",error:h,arrivedAt:n.now(),chars:0}))}finally{C=!0,T()}})(),$=()=>o.length||C?Promise.resolve():new Promise(A=>{_=A});return{events:async function*(){var h,I,D,P;let A=Number.NEGATIVE_INFINITY;try{for(;;){if(await $(),!o.length){if(C||!g)return;continue}const u=o[0];if(u.kind==="error")throw o.shift(),u.error;if(u.chars&&!((h=r.isHidden)!=null&&h.call(r))){const p=n.now(),M=o.reduce((ee,z)=>ee+z.chars,0),de=((I=o.find(ee=>ee.chars))==null?void 0:I.arrivedAt)??p,H=Math.max(0,t.maxBufferedMs-(p-de)),G=v*Math.exp(-Math.max(0,p-k)/t.arrivalRateTauMs)/t.arrivalRateTauMs,ne=H>0?M/H:Number.POSITIVE_INFINITY,Me=Math.max(t.minRateCharsPerMs,G*t.arrivalRateHeadroom,ne),_e=Math.min(t.maxDelayMs,Math.max(t.minDelayMs,u.chars/Me)),he=Math.max(0,u.arrivedAt+t.maxBufferedMs-p),J=Math.max(u.arrivedAt,A+Math.min(_e,he));if(await n.sleep(Math.max(0,J-n.now()),r.signal),!g||(D=r.signal)!=null&&D.aborted)return}o.shift(),A=n.now(),yield u.event}}finally{g&&(g=!1,T(),await((P=e.return)==null?void 0:P.call(e,void 0))),await U}}(),takeAcceptedForStop(){var h;if(!g)return[];g=!1,f&&c&&(L({type:f,text:c},m),c="",f=null);const A=o.flatMap(I=>I.kind==="event"&&I.event.type!=="done"&&I.event.type!=="error"?[I.event]:[]);return o.length=0,T(),(h=e.return)==null||h.call(e,void 0),A}}}const cn=750;function ln(e,r){for(let t=e.length-1;t>=0;t-=1)if(r(e[t]))return t;return-1}function Ve(e){const r=i.useRef(e);return i.useLayoutEffect(()=>{r.current=e}),i.useCallback((...t)=>r.current(...t),[])}function un(e){const[r,t]=i.useState([]),[n,o]=i.useState(!1),[c,f]=i.useState(""),m=i.useRef(!1),g=i.useRef(null),C=i.useRef(null),_=i.useRef(null),v=i.useRef(null),k=i.useRef(!1),F=i.useRef(null),T=i.useRef(null),L=i.useRef("cleared"),Y=i.useRef(null),V=i.useRef(null),[U,$]=i.useState(null),[ue,A]=i.useState(null),h=i.useRef([]),I=i.useRef(Ht()),D=i.useRef(null),P=i.useRef(null),u=i.useRef(!1),p=i.useRef(e),M=i.useRef(nt()),de=i.useRef(0),H=i.useRef(0),G=i.useRef(e.sessionId),ne=i.useRef(e.sessionId);ne.current!==e.sessionId&&(ne.current=e.sessionId,G.current!==e.sessionId&&(H.current+=1,Y.current=null)),p.current=e,h.current=r,i.useEffect(()=>()=>{var l;T.current!==null&&window.clearTimeout(T.current),(l=g.current)==null||l.abort(),C.current=null,_.current!==null&&cancelAnimationFrame(_.current),v.current!==null&&window.clearTimeout(v.current),V.current=null},[]),i.useEffect(()=>{m.current||(G.current=e.sessionId)},[e.sessionId]),i.useEffect(()=>{const l=m.current&&e.sessionId===G.current?D.current:null;u.current=l!==null,l&&(t(l),h.current=l)},[e.sessionId]);const Me=i.useMemo(()=>{const l={};for(const w of r)for(const E of w.blocks??[])if(E.kind==="tool")for(const y of E.results??[])l[y.route_id]=y;return l},[r]),_e=()=>`m${++de.current}_${Date.now().toString(36)}`,he=(l,w=!0)=>{const E={...I.current,messages:D.current??h.current,sessionId:G.current},y=We(E,l);I.current=y,D.current&&(D.current=y.messages);const b=l.type==="event"&&l.event.type==="stream_start"?l.event.session_id:null;return b?(G.current=b,p.current.onSessionId(b)):y.sessionId&&y.sessionId!==E.sessionId&&(G.current=y.sessionId,p.current.onSessionId(y.sessionId)),y.title!==E.title&&p.current.onTitle(y.title),w&&(h.current=y.messages,t(y.messages)),y},J=()=>P.current===H.current||u.current,ee=()=>{_.current!==null&&(cancelAnimationFrame(_.current),_.current=null),v.current!==null&&(window.clearTimeout(v.current),v.current=null)},z=()=>{ee(),document.visibilityState!=="hidden"&&(!u.current||!D.current||(k.current=!1,h.current=D.current,t(D.current)))},Ke=()=>{if(!u.current||document.visibilityState==="hidden"||_.current!==null||v.current!==null)return;const l=()=>{_.current=null,v.current=null,z()};typeof requestAnimationFrame=="function"?_.current=requestAnimationFrame(l):v.current=window.setTimeout(l,0)};i.useEffect(()=>{const l=()=>{document.visibilityState==="visible"&&k.current&&Ke()};return document.addEventListener("visibilitychange",l),()=>document.removeEventListener("visibilitychange",l)});const be=l=>{if(g.current!==l||(T.current!==null&&(window.clearTimeout(T.current),T.current=null),L.current==="cleared"))return;const w=L.current==="shown";L.current="cleared",w&&he({type:"clear_workspace_status"},J())},it=(l,w)=>{T.current!==null&&window.clearTimeout(T.current),L.current="armed",T.current=window.setTimeout(()=>{T.current=null,!(L.current!=="armed"||g.current!==l||l.signal.aborted||H.current!==w)&&(L.current="shown",he({type:"workspace_status"},J()))},cn)},we=(l,w)=>{const E=Y.current;!E||E.controller!==l||E.tracker.recordStreamStart(w,performance.now())},Ae=(l,w)=>{const E=Y.current;!E||E.controller!==l||E.tracker.recordTerminal(w)};i.useLayoutEffect(()=>{const l=Y.current;if(!l)return;const w=r.at(-1);if((w==null?void 0:w.role)!=="assistant"||!(w.blocks??[]).some(b=>b.kind==="tool"||b.kind==="reasoning"&&!!b.text.trim()||b.kind==="answer"&&!!b.text.trim()))return;const y=performance.now();l.tracker.recordFirstVisible(y);for(const b of w.blocks??[])b.kind==="reasoning"&&b.text.trim()?l.tracker.recordSemantic("reasoning",y):b.kind==="tool"?l.tracker.recordSemantic("tool",y):b.kind==="answer"&&b.text.trim()&&l.tracker.recordSemantic("answer",y)},[r]);const ge=(l,w=!0)=>{he({type:"event",event:l},w)},ve=async(l,w)=>{var b;const E=await st(l);let y=Pt(E);return((b=F.current)==null?void 0:b.sessionId)===l&&(y=F.current.messages,F.current=null),H.current!==w&&!(P.current===w&&u.current&&p.current.sessionId===l)?null:(t(y),h.current=y,D.current=y,I.current=We(I.current,{type:"load",messages:y,sessionId:l}),y)},Q=(l,w,E,y,b,B)=>{const O=++H.current;P.current=O,u.current=!0,m.current=!0;const j=new AbortController;g.current=j;const ie=l.text;return M.current=l,G.current=w.session_id,f(""),t(E),D.current=E,I.current=We(I.current,{type:"start",messages:E,sessionId:w.session_id}),o(!0),Y.current=B?null:{controller:j,tracker:new en(performance.now())},L.current="cleared",(async()=>{var fe,me,Qe,Xe,Pe,Je;let se=!1,X=!1,S=!1,oe=!1,K=!1,te=!1;try{const W=B?Br(B,{signal:j.signal}):Yr(w,{signal:j.signal}),re=!B&&qe()&&Fr(),ce=re?on(W,{signal:j.signal,isHidden:()=>document.visibilityState==="hidden"}):null;ce&&(C.current={controller:j,stream:ce});for await(const x of(ce==null?void 0:ce.events)??W){x.type==="paper_artifact"&&((me=(fe=p.current).onPaperArtifact)==null||me.call(fe,x)),x.type==="stream_start"&&(se=!0,X=x.provider_execution!==!1,we(j,x.request_id)),x.type==="sandbox_start"&&it(j,O),(x.type==="sandbox_ready"||x.type==="workspace_ready"||x.type==="lifecycle")&&be(j),(x.type==="reasoning_start"||x.type==="reasoning_delta"||x.type==="tool_call"||x.type==="tool_call_start"||x.type==="tool_call_arguments_delta"||x.type==="tool_call_arguments_done"||x.type==="app_start"||x.type==="app_result"||x.type==="artifact_start"||x.type==="artifact_ready"||x.type==="artifact_error"||x.type==="answer_delta"||x.type==="done"||x.type==="error")&&be(j),(x.type==="done"||x.type==="error")&&(oe=!0,K=x.type==="error",Ae(j,x.type==="error"?"error":"complete"),x.type==="error"&&["openrouter_monthly_budget_exhausted","openrouter_unavailable","openrouter_byok_credential_invalid","openrouter_byok_billing_error","openrouter_byok_rate_limit","hf_inference_billing_exhausted"].includes(x.code??"")&&(S=!0,p.current.onInterrupted(l)));const Re=J(),Ye=Re&&!(re&&document.visibilityState==="hidden"),Ue=x.type==="reasoning_delta"||x.type==="answer_delta"||x.type==="tool_call_arguments_delta",Ze=!["stream_start","sandbox_start","sandbox_ready","workspace_ready","session_title_start","session_title_delta","session_title_done","reasoning_delta","answer_delta","tool_call_arguments_delta"].includes(x.type);re&&Ze&&z(),!j.signal.aborted&&(Re||x.type==="stream_start"||x.type==="session_title_start"||x.type==="session_title_delta"||x.type==="session_title_done")?re&&Ue?(ge(x,!1),k.current=k.current||Re,Ke()):(ge(x,Ye),re&&Re&&!Ye&&(k.current=!0)):j.signal.aborted||ge(x,!1)}}catch(W){if(K=!0,!j.signal.aborted){if(be(j),W instanceof Be&&W.code==="chat_temporarily_disabled")te=!0,A({question:ie,draft:l}),H.current===O&&(t(y),h.current=y,f(""));else if(W instanceof Be&&W.code==="chat_capacity"){te=!0;const re=W.retryAfterSeconds??5,ce={question:ie,draft:l,request:w,optimistic:E,original:y,edit:b,retryAfterSeconds:re,retryAt:Date.now()+re*1e3};V.current=ce,$({question:ie,draft:l,retryAt:ce.retryAt,retryAfterSeconds:re}),H.current===O&&(t(y),h.current=y,f(""))}else Ae(j,"network_error"),W instanceof Be&&["paper_context_unavailable","paper_mention_unavailable","paper_mentions_disabled","paper_selection_disabled","paper_selection_requires_reader","paper_selection_paper_mismatch","paper_selection_version_mismatch","paper_selection_page_invalid","paper_selection_too_large","chat_storage_quota_exceeded"].includes(W.code??"")&&(te=!0,p.current.onInterrupted(l),H.current===O&&(t(y),h.current=y,f(W.message))),W instanceof Be&&["openrouter_monthly_budget_exhausted","openrouter_unavailable","openrouter_byok_credential_invalid","openrouter_byok_billing_error","openrouter_byok_rate_limit","hf_inference_billing_exhausted"].includes(W.code??"")&&(S=!0,p.current.onInterrupted(l));!te&&H.current===O&&ge({type:"error",message:W instanceof Error?W.message:"The assistant stream failed.",code:W instanceof Be?W.code:void 0})}}finally{if(g.current===j){if(((Qe=C.current)==null?void 0:Qe.controller)===j&&(z(),C.current=null),be(j),!oe&&!j.signal.aborted&&Ae(j,"network_error"),m.current=!1,o(!1),te)p.current.onSettled(w.session_id);else if(!j.signal.aborted){(se&&X||S)&&((Pe=(Xe=p.current).onProviderTerminal)==null||Pe.call(Xe));const W=G.current;if(b&&!se)H.current===O&&(t(b.snapshot),h.current=b.snapshot,f("Couldn’t resend this message. Your original conversation was restored."));else if(W){H.current===O&&b&&(K||!oe)&&(t(b.snapshot),h.current=b.snapshot);try{const re=await ve(W,O);re&&b&&re.some(ce=>ce.id===b.targetId)&&f("Couldn’t resend this message. Your original conversation was restored.")}catch{H.current===O&&he({type:"settle"})}}else H.current===O&&he({type:"settle"});p.current.onSettled(W)}((Je=Y.current)==null?void 0:Je.controller)===j&&(Y.current=null)}}})(),!0},Ie=Ve(l=>{var S,oe;const w=typeof l=="string"?nt(l.trim()):l,E=w.text;if(!E||E.length>8e3||m.current||V.current)return!1;const y=h.current,b=[...y].reverse().find(K=>K.role==="user"),B=b!=null&&b.status&&b.status!=="complete"&&b.revision?{replace_message_id:b.id,prior_revision:b.revision}:null,O={id:_e(),role:"user",text:E,paperMentions:w.paperMentions,paperSelection:w.paperSelection},j={id:_e(),role:"assistant",streaming:!0,blocks:[]},ie=B&&b?ln(y,K=>K.id===b.id):-1,se=ie<0?[...y,O,j]:[...y.slice(0,ie),O,j],X=(oe=(S=p.current).viewerContext)==null?void 0:oe.call(S);return Q(w,{message:E,paper_mentions:w.paperMentions.map(({route_id:K,title:te,start:fe,end:me})=>({route_id:K,title:te,start:fe,end:me})),session_id:p.current.sessionId,client_message_id:crypto.randomUUID(),web_search_enabled:!!p.current.webSearchEnabled,reasoning_effort:p.current.reasoningEffort??"low",...p.current.primaryPaperRouteId?{primary_paper_route_id:p.current.primaryPaperRouteId}:{},...X?{viewer_context:X}:{},...w.paperSelection?{paper_selection:kt(w.paperSelection)}:{},...!p.current.sessionId&&p.current.initialModel?{initial_model:p.current.initialModel}:{},...B??{}},se,y)}),Le=Ve((l,w)=>{var S,oe;const E=typeof w=="string"?nt(w.trim()):w,y=E.text;if(!y||y.length>8e3||m.current||V.current)return!1;const b=h.current.slice(),B=b.findIndex(K=>K.id===l&&K.role==="user");if(B<0)return!1;const O=b[B];if(!p.current.sessionId||!O.revision)return!1;const j={id:O.id,role:"user",text:y,paperMentions:E.paperMentions,paperSelection:E.paperSelection,revision:O.revision+1,status:"generating"},ie={id:_e(),role:"assistant",streaming:!0,blocks:[]},se=[...b.slice(0,B),j,ie],X=(oe=(S=p.current).viewerContext)==null?void 0:oe.call(S);return Q(E,{message:y,paper_mentions:E.paperMentions.map(({route_id:K,title:te,start:fe,end:me})=>({route_id:K,title:te,start:fe,end:me})),session_id:p.current.sessionId,client_message_id:crypto.randomUUID(),web_search_enabled:!!p.current.webSearchEnabled,reasoning_effort:p.current.reasoningEffort??"low",...p.current.primaryPaperRouteId?{primary_paper_route_id:p.current.primaryPaperRouteId}:{},...X?{viewer_context:X}:{},...E.paperSelection?{paper_selection:kt(E.paperSelection)}:{},replace_message_id:O.id,prior_revision:O.revision},se,b,{targetId:O.id,snapshot:b})}),xe=i.useCallback(()=>{V.current=null,$(null)},[]),Oe=Ve(()=>{const l=V.current;return!l||Date.now(){var B,O;if(!g.current)return;const l=g.current;be(l),Ae(l,"stopped"),l.abort();const w=((B=C.current)==null?void 0:B.controller)===l?C.current.stream.takeAcceptedForStop():[];C.current=null;for(const j of w)ge(j,!1);z(),g.current=null,((O=Y.current)==null?void 0:O.controller)===l&&(Y.current=null),m.current=!1,o(!1);const E=he({type:"stop"},!1).messages;D.current=E,h.current=E,t(E),p.current.onInterrupted(M.current);const y=G.current;y&&(F.current={sessionId:y,messages:E}),y&&_r(y).catch(()=>{});const b=++H.current;window.setTimeout(()=>{y&&H.current===b?ve(y,b).catch(()=>{}).finally(()=>p.current.onSettled(y)):y||p.current.onSettled(null)},450)}),ye=i.useCallback((l,w)=>t(E=>E.map(y=>{var b;return y.id!==l?y:{...y,blocks:(b=y.blocks)==null?void 0:b.map((B,O)=>O===w&&(B.kind==="reasoning"||B.kind==="tool")?{...B,open:!B.open}:B)}})),[]),Ne=i.useCallback(()=>{var l;H.current+=1,T.current!==null&&(window.clearTimeout(T.current),T.current=null),L.current="cleared",(l=g.current)==null||l.abort(),g.current=null,C.current=null,ee(),k.current=!1,F.current=null,Y.current=null,V.current=null,$(null),m.current=!1,G.current=null,D.current=null,I.current=We(I.current,{type:"reset"}),P.current=null,u.current=!1,t([]),o(!1),f("")},[]),Fe=Ve((l,w,E=!1)=>{var y;if(H.current+=1,T.current!==null&&(window.clearTimeout(T.current),T.current=null),L.current="cleared",ee(),k.current=!1,Y.current=null,V.current=null,$(null),m.current&&w!==void 0&&w===G.current&&D.current){u.current=!0,t(D.current),h.current=D.current,f("");return}if(u.current=!1,m.current||((y=g.current)==null||y.abort(),g.current=null,D.current=null,P.current=null,u.current=!1),E&&w){const b=[...l].reverse().find(B=>B.role==="user");if(b){const B={text:b.text??"",paperMentions:b.paperMentions??[],...b.paperSelection?{paperSelection:b.paperSelection}:{}},O=[...l,{id:`${b.id}-active`,role:"assistant",streaming:!0,blocks:[]}];Q(B,{message:B.text,session_id:w,client_message_id:"reconnect",web_search_enabled:!!p.current.webSearchEnabled,reasoning_effort:p.current.reasoningEffort??"low"},O,l,void 0,w);return}}t(l),h.current=l,I.current=We(I.current,{type:"load",messages:l,sessionId:w??p.current.sessionId}),m.current||o(!1),f("")});return{messages:r,busy:n,papers:Me,sessionError:c,capacityRequest:U,disabledRequest:ue,send:Ie,editAndResend:Le,retryCapacity:Oe,cancelCapacity:xe,dismissDisabled:()=>A(null),stop:ze,toggleBlock:ye,reset:Ne,load:Fe}}const pe=nt,dn=["Summarize the main contributions","Explain in simple terms","Identify the main limitations"],fn=()=>{const e=sessionStorage.getItem(at);if(!e)return null;try{return Ar(JSON.parse(e),e)}catch{}return pe(e)},pn=({enabled:e,workspaceKey:r,children:t,onAskAiFix:n})=>e?s.jsx(ur,{workspaceKey:r,onAskAiFix:n,children:t}):s.jsx(s.Fragment,{children:t}),hn=({enabled:e,children:r})=>e?s.jsx(dr,{variant:"chat",children:r}):s.jsx(s.Fragment,{children:r}),mn=({mode:e="general",routeSessionId:r,primaryPaper:t,currentPage:n,paperSelection:o,onPaperSelectionChange:c,onSessionId:f,onReaderSubmit:m,onReaderNewChat:g})=>{var mt,gt,yt,_t,bt,wt,vt,xt,Rt;const{sessionId:C}=Jt(),_=r??(e==="general"?C:void 0),v=Zt(),[k,F]=er(),{user:T,isLoading:L}=tr(),Y=rr(),V=sr(),U=ar({queryKey:["chatAvailability"],queryFn:()=>Ge.getAvailability(),refetchInterval:3e4,retry:!1,enabled:qe()&&!!T}),$=((mt=U.data)==null?void 0:mt.status)==="paused"||e==="paper"&&((gt=U.data)==null?void 0:gt.paper_reader_chat_enabled)===!1,[ue,A]=i.useState([]),[h,I]=i.useState(!1),[D,P]=i.useState(""),[u,p]=i.useState(()=>_?{id:_,status:"loading"}:null),[M,de]=i.useState(0),[H,G]=i.useState(null),ne=i.useRef(br()),Me=i.useRef(k.get("model")||((yt=ne.current)==null?void 0:yt.model)),[_e,he]=i.useState(V?wr:vr),[J,ee]=i.useState(Me.current||xr),z=Rr(_e,J),Ke=Cr(!!(T&&z==="openrouter")),be=i.useRef(z);be.current=z;const[it,we]=i.useState(""),[Ae,ge]=i.useState(null),[ve,Q]=i.useState(()=>pe()),[Ie,Le]=i.useState(()=>{var a;return((a=ne.current)==null?void 0:a.webSearchEnabled)??!1}),[xe,Oe]=i.useState(()=>{var a;return((a=ne.current)==null?void 0:a.reasoningEffort)??"low"}),ze=!!((_t=U.data)!=null&&_t.web_search_available),[ye,Ne]=i.useState(()=>{var d,R;const a=(d=k.get("q"))==null?void 0:d.trim();return a?pe(a):((R=ne.current)==null?void 0:R.draft)??pe()}),Fe=i.useRef(!1),l=i.useRef(!1),w=i.useRef(!1),[E,y]=i.useState(()=>typeof window>"u"||window.innerWidth>900),b=i.useRef(new Set),B=i.useRef(!1),O=i.useRef(_),j=i.useRef(null),ie=i.useRef(null),se=i.useRef(null);O.current=_;const X=i.useCallback(async()=>{if(!T)return;const a=!B.current;a&&I(!0);try{const d=await Sr();A(R=>{const N=j.current,q=N?R.find(He=>He.id===N):void 0;if(!q)return d;const ae=d.find(He=>He.id===N);return[ae?{...ae,title:q.title,is_busy:!0}:q,...d.filter(He=>He.id!==N)]}),B.current=!0,P("")}catch(d){P(d instanceof Error?d.message:"Could not load chats")}finally{a&&I(!1)}},[T]),S=un({sessionId:_??null,initialModel:J,webSearchEnabled:ze&&Ie,reasoningEffort:xe,primaryPaperRouteId:e==="paper"?t==null?void 0:t.routeId:void 0,viewerContext:e==="paper"&&n?()=>({page:Math.max(1,Math.min(1e4,n()))}):void 0,onSessionId:a=>{j.current=a;const d=a!==O.current,R=(O.current??null)===ie.current,N=new Date().toISOString();A(q=>q.some(ae=>ae.id===a)?q.map(ae=>ae.id===a?{...ae,is_busy:!0}:ae):[{id:a,title:"New chat",selected_model:J,created_at:N,updated_at:N,message_count:1,is_busy:!0,web_search_enabled:Ie,reasoning_effort:xe},...q]),d&&R&&we("New chat"),R&&(se.current=a,p({id:a,status:"loaded"}),d&&(e==="paper"?f==null||f(a):v(`/chat/${a}`,{replace:!0})))},onTitle:a=>{const d=j.current??O.current;d&&!b.current.has(d)&&(d===O.current&&we(a),A(R=>R.map(N=>N.id===d?{...N,title:a}:N)))},onSettled:a=>{a&&A(d=>d.map(R=>R.id===a?{...R,is_busy:!1}:R)),j.current=null,ie.current=null,a&&e==="general"&&st(a).then(d=>{O.current===a&&G(d.latex_paper??null)}).catch(()=>{}),X()},onProviderTerminal:()=>{be.current==="openrouter"&&Y.invalidateQueries({queryKey:jr})},onPaperArtifact:a=>{e==="general"&&G(a.descriptor)},onInterrupted:a=>{Q(a),c==null||c(a.paperSelection)}}),oe=S.send;i.useEffect(()=>{S.capacityRequest&&(Q(S.capacityRequest.draft),c==null||c(S.capacityRequest.draft.paperSelection))},[S.capacityRequest,c]);const K=i.useCallback(a=>{sessionStorage.setItem(at,JSON.stringify(a)),sessionStorage.setItem(et,J),sessionStorage.setItem(Er,xe),sessionStorage.setItem(tt,"1"),sessionStorage.setItem(rt,"1");const d=e==="paper"&&t?`/pdf/${t.routeId}`:O.current?`/chat/${O.current}`:"/chat";window.location.href=nr(d,z==="huggingface")},[e,t,xe,J,z]),te=i.useCallback((a,d)=>{sessionStorage.setItem(at,JSON.stringify(a)),sessionStorage.setItem(et,J),sessionStorage.removeItem(tt),sessionStorage.removeItem(rt),Ne(pe()),Q(a),c==null||c(a.paperSelection),P(d)},[c,J]),fe=i.useCallback(async a=>{const d=c?o?{...a,paperSelection:o}:{text:a.text,paperMentions:a.paperMentions}:a;if(!T){K(d);return}if(z==="huggingface"&&!l.current){if(w.current)return;w.current=!0;try{if(!(await Ge.getInferenceBilling()).connected){if(sessionStorage.getItem(rt)==="1"){te(d,"Hugging Face inference authorization was not completed. Your prompt is ready to retry.");return}K(d);return}l.current=!0}catch(N){te(d,N instanceof Error?N.message:"Could not check Hugging Face authorization.");return}finally{w.current=!1}}const R=O.current??null;if(sessionStorage.removeItem(tt),!oe(d)){te(d,"Your prompt was not sent. It is ready to retry.");return}ie.current=R,j.current=R,sessionStorage.removeItem(at),sessionStorage.removeItem(et),sessionStorage.removeItem(rt),kr(),Q(pe()),c==null||c(void 0),e==="paper"&&(m==null||m())},[K,e,c,m,o,te,z,oe,T]);i.useEffect(()=>{if(L||!T)return;const a=sessionStorage.getItem(et);a&&ee(a),X(),Tr().then(N=>{if(he(N.items),!O.current){const q=Me.current||a;ee(q&&N.items.some(ae=>ae.id===q)?q:N.default_model)}});const d=fn(),R=sessionStorage.getItem(tt)==="1";d&&(c==null||c(d.paperSelection),R?Ne(d):Q(d))},[L,c,X,T]),i.useEffect(()=>{if(!_){se.current!==null&&!S.busy&&(se.current=null,S.reset(),Le(!1),Oe("low")),p(null),ge(null),G(null);return}if(se.current===_||(ge(null),p(d=>(d==null?void 0:d.id)===_&&d.status==="loading"?d:{id:_,status:"loading"}),L||!T))return;let a=!1;return P(""),st(_).then(d=>{var N,q;if(a)return;S.load(Pt(d),_,d.is_busy),G(d.latex_paper??null),ee(d.selected_model),Le(ne.current&&d.messages.length===0?ne.current.webSearchEnabled:d.web_search_enabled),Oe(ne.current&&d.messages.length===0?ne.current.reasoningEffort:d.reasoning_effort??"high"),we(d.title);const R=(q=(N=[...d.messages].reverse().find(ae=>ae.role==="user"&&ae.viewer_context))==null?void 0:N.viewer_context)==null?void 0:q.page;ge(R??null),se.current=_,p({id:_,status:"loaded"})}).catch(d=>{if(a)return;const R=d instanceof Error?d.message:"Chat not found";S.reset(),P(R),p({id:_,status:"error",error:R})}),()=>{a=!0}},[L,_,T,S.busy,M]),i.useEffect(()=>{var N;const a=(N=k.get("q"))==null?void 0:N.trim();if(!a)return;Fe.current=!1;const d=k.get("model");d&&ee(d),Ne(pe(a));const R=new URLSearchParams(k);R.delete("q"),R.delete("model"),F(R,{replace:!0})},[k,F]),i.useEffect(()=>{if(L||S.busy||!ye.text||Fe.current||T&&Ie&&U.isFetching||_&&(u==null?void 0:u.status)!=="loaded")return;const a=window.setTimeout(()=>{if(Fe.current)return;Fe.current=!0,fe(ye).finally(()=>Ne(pe()))},0);return()=>window.clearTimeout(a)},[L,U.isFetching,S.busy,ye,_,u==null?void 0:u.status,fe,T,Ie]),i.useEffect(()=>{const a=()=>{!T||S.busy||X()};return window.addEventListener("focus",a),()=>window.removeEventListener("focus",a)},[S.busy,X,T]);const me=()=>{j.current=null,S.reset(),Q(pe()),c==null||c(void 0),Le(!1),Oe("low"),we(""),e==="paper"?g==null||g():v("/chat")},Qe=async(a,d)=>{try{const R=await ct(a,{title:d});return b.current.add(a),a===_&&we(R.title),A(N=>N.map(q=>q.id===a?R:q)),!0}catch(R){return P(R instanceof Error?R.message:"Rename failed"),!1}},Xe=async a=>{const d=a===_&&S.busy;if(window.confirm(d?"Stop and delete this chat? This cannot be undone.":"Delete this chat? This cannot be undone.")){d&&S.stop();try{if(d){const R=Date.now()+3e3;for(;(await st(a)).is_busy;){if(Date.now()>=R)throw new Error("Generation is still stopping. The chat was not deleted.");await new Promise(q=>window.setTimeout(q,150))}}await Ir(a),a===_&&me(),await X()}catch(R){P(R instanceof Error?R.message:"Delete failed")}}},Pe=Zr({messages:S.messages,refreshSessions:X,resetChat:S.reset,restoreDraft:Q,clearTitle:()=>we("")}),Je=async a=>{const d=J;if(ee(a),!!_)try{const R=await ct(_,{selected_model:a});A(N=>N.map(q=>q.id===_?{...q,selected_model:R.selected_model}:q)),P("")}catch(R){ee(d),P(R instanceof Error?R.message:"Model change failed")}},W=async a=>{const d=xe;if(Oe(a),!!_)try{const R=await ct(_,{reasoning_effort:a});A(N=>N.map(q=>q.id===_?R:q))}catch(R){Oe(d),P(R instanceof Error?R.message:"Effort change failed")}},[re,ce]=i.useState(60);i.useLayoutEffect(()=>{const a=document.querySelector(".app-header");if(!a)return;const d=()=>ce(a.offsetHeight);d();const R=new ResizeObserver(d);return R.observe(a),()=>R.disconnect()},[]);const x=ue.find(a=>a.id===_),Re=S.messages.length===0,Ye=(u==null?void 0:u.id)===_,Ue=!!(_&&(L||T&&(!Ye||(u==null?void 0:u.status)==="loading"))),Ze=Ye&&(u==null?void 0:u.status)==="error"?u.error:void 0,Wt=!!((bt=Ke.data)!=null&&bt.fallback_enabled),Vt=c?o?{...ve,paperSelection:o}:{text:ve.text,paperMentions:ve.paperMentions}:ve,ht={onSend:fe,busy:S.busy,onStop:S.stop,draft:Vt,onDraftChange:a=>{c?(Q({text:a.text,paperMentions:a.paperMentions}),a.paperSelection!==o&&c(a.paperSelection)):Q(a)},models:_e,selectedModel:J,onModelChange:a=>void Je(a),disabled:$||L,describedBy:$?"chat-paused-description":void 0,paperMentionsEnabled:!!((wt=U.data)!=null&&wt.paper_mentions_enabled),paperSelectionEnabled:((vt=U.data)==null?void 0:vt.paper_reader_selection_enabled)===!0,paperArtifactsEnabled:e==="general"&&((xt=U.data)==null?void 0:xt.paper_artifacts_enabled)===!0,webSearchAvailable:ze,webSearchEnabled:Ie,onWebSearchChange:Le,reasoningEffort:xe,onReasoningEffortChange:a=>void W(a)};return s.jsx(pn,{enabled:e==="general",workspaceKey:_??"new-chat",onAskAiFix:a=>{fe(pe(a))},children:s.jsxs("div",{className:`chat-page${e==="paper"?" chat-page--reader":""}`,style:{height:e==="paper"?"100%":`calc(100dvh - ${re}px)`},children:[e==="general"&&s.jsx(Qr,{sessions:ue,activeSessionId:_,loading:h,error:D,open:E,onClose:()=>y(!1),onNew:me,onNavigate:a=>v(`/chat/${a}`),onRename:Qe,onDelete:a=>void Xe(a)}),s.jsx(hn,{enabled:e==="general",children:s.jsxs("section",{className:"chat-main","data-testid":"active-chat-pane",children:[s.jsxs("div",{className:"chat-topbar",children:[e==="general"&&!E&&s.jsx("button",{type:"button",className:"icon-btn",onClick:()=>y(!0),title:"Open sidebar",children:s.jsx(Nt,{})}),e==="paper"&&s.jsx("button",{type:"button",className:"chat-reader-action",onClick:me,children:"New chat"}),s.jsx("span",{className:"chat-topbar-title",children:Ue?(x==null?void 0:x.title)||"":it||(x==null?void 0:x.title)||(Re?"":"New chat")}),V&&s.jsx("span",{className:"chat-staging-badge",children:"Staging"}),e==="paper"&&s.jsx(St,{className:"chat-reader-action",to:"/chat",children:"All chats"}),e==="general"&&(x==null?void 0:x.primary_paper)&&s.jsx(St,{className:"chat-reader-action",to:`/pdf/${x.primary_paper.route_id}`,onClick:a=>{if(!$e()){a.preventDefault();return}const d=x.primary_paper.route_id;sessionStorage.setItem(`pwc:reader:session:${d}`,x.id),Ae&&sessionStorage.setItem(`pwc:reader:page:${d}`,String(Ae))},children:"Open reader"}),_&&Ye&&(u==null?void 0:u.status)==="loaded"&&!Re&&s.jsx(Xr,{sessionId:_,busy:S.busy,loading:Ue,hasPaperSelection:S.messages.some(a=>!!a.paperSelection),onError:P})]}),e==="general"&&H&&s.jsx(Jr,{descriptor:H}),Ue&&!ye.text?s.jsxs("div",{className:"chat-session-loading",role:"status","aria-live":"polite",children:[s.jsx(Ft,{}),s.jsx("span",{children:"Loading conversation…"})]}):Ze?s.jsxs("div",{className:"chat-session-load-error",role:"alert",children:[s.jsx("p",{children:Ze}),s.jsx("button",{type:"button",onClick:()=>{p({id:_,status:"loading"}),de(a=>a+1)},children:"Try again"})]}):Re&&!ye.text?s.jsx("div",{className:"chat-empty",children:s.jsxs("div",{className:"chat-empty-inner",children:[s.jsx("div",{className:"chat-empty-eyebrow",children:e==="paper"?"Paper chat":"Research chat"}),s.jsx("h1",{className:"chat-empty-title",children:e==="paper"?"Ask about this paper":s.jsxs(s.Fragment,{children:["Ask ",s.jsx("em",{children:"Papers With Code"})]})}),s.jsx("p",{className:"chat-empty-sub",children:e==="paper"?"Questions are grounded in the open paper. Add up to three other papers with @.":"Answers are grounded in a live hybrid search over papers, tasks, and benchmarks — with citations you can follow."}),V&&s.jsx("p",{className:"chat-staging-access-note",children:"This is a limited staging preview. Only approved Hugging Face users can start chats."}),s.jsx(Dt,{variant:"empty",composerProps:ht,provider:z,paused:$,suggestions:e==="paper"?dn:Or})]})}):s.jsxs(s.Fragment,{children:[S.sessionError&&s.jsx("div",{className:"chat-session-error",role:"alert",children:S.sessionError}),s.jsx(Vr,{messages:S.messages,papers:S.papers,busy:S.busy,queuedDraft:ye.text?ye:void 0,paperMentionsEnabled:!!((Rt=U.data)!=null&&Rt.paper_mentions_enabled),archivePending:Pe.pending,openRouterFallbackEnabled:Wt,onToggleBlock:S.toggleBlock,onEditAndResend:S.editAndResend,onArchiveOld:()=>void Pe.archiveOld(),onArchiveOldest:()=>void Pe.archiveOldest()}),s.jsx(Dt,{variant:"followup",composerProps:ht,provider:z,paused:$})]})]})}),S.capacityRequest&&s.jsx($r,{retryAt:S.capacityRequest.retryAt,onCancel:S.cancelCapacity,onRetry:()=>{S.retryCapacity()&&(Q(pe()),c==null||c(void 0))}}),S.disabledRequest&&s.jsx(Gr,{onClose:()=>{var d;const a=((d=S.disabledRequest)==null?void 0:d.draft)??ve;Q(a),c==null||c(a.paperSelection),S.dismissDisabled(),U.refetch()}})]})})},Nn=()=>s.jsx(mn,{});export{$r as ChatCapacityDialog,mn as ChatExperience,Nn as default}; diff --git a/assets/ChatView-C_sQDmRZ.js b/assets/ChatView-C_sQDmRZ.js deleted file mode 100644 index e8fe23d14d1ae648f612c69e64e7e163c2bc8a38..0000000000000000000000000000000000000000 --- a/assets/ChatView-C_sQDmRZ.js +++ /dev/null @@ -1,16 +0,0 @@ -var Bt=Object.defineProperty;var Ut=(t,r,e)=>r in t?Bt(t,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[r]=e;var Ae=(t,r,e)=>Ut(t,typeof r!="symbol"?r+"":r,e);import{d as Ht,A as Wt,O as Vt,r as o,j as s,X as $t,e as It,z as ot,c as Gt,u as Kt,a as zt,y as Qt,g as Jt,Q as Xt,L as bt,b as Zt}from"./index-Cry0GNHI.js";import{u as er}from"./useQuery-DlAfMYOD.js";import{C as tr,U as wt,b as rr,c as $e,u as nr,d as sr,A as ar,a as ir}from"./ArtifactWorkspace-BDAI0t7b.js";import{c as Ge}from"./chat-FW6HqAah.js";import{e as or,f as Ct,h as cr,T as lr,d as jt,i as ur,j as dr,k as fr,l as nt,m as pr,t as vt,n as st,o as Lt,r as hr,S as mr,a as gr,D as yr,s as _r,v as br,w as at,x as et,y as wr,z as tt,B as rt,E as vr,F as xr,G as Rr,H as ct,I as Sr}from"./chatLaunch-DpNrK5mV.js";import{S as Er}from"./chatPrompts-CDY3UGU1.js";import{u as kr,O as Tr}from"./openrouter-CKgqF9nS.js";import"./katex.min-BSBacQyE.js";import"./hover-card-CbDqfS2l.js";import"./github-Bll0eXy5.js";import"./github-D38gLg_l.js";import"./PaperPreviewLink-CPKVU1Zw.js";import"./index-D7CE3jjK.js";import"./papers-CrgFFrmi.js";import"./file-text-DXZT7Qxr.js";import"./useMutation-C5zYPeQC.js";import"./external-link-DIcR472K.js";import"./chevron-down-DR8n8lNp.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 Or=Ht("Share2",[["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}],["circle",{cx:"6",cy:"12",r:"3",key:"w7nqdw"}],["circle",{cx:"18",cy:"19",r:"3",key:"1xt0gg"}],["line",{x1:"8.59",x2:"15.42",y1:"13.51",y2:"17.49",key:"47mynk"}],["line",{x1:"15.41",x2:"8.59",y1:"6.51",y2:"10.49",key:"1n3mei"}]]),le=(t,r)=>new Promise(e=>{const n=setTimeout(i,t);function i(){r==null||r.removeEventListener("abort",i),clearTimeout(n),e()}r==null||r.addEventListener("abort",i)}),xe=t=>({arxiv_id:null,source:"arxiv",source_url:null,thumbnail_url:null,authors:[],published:null,conference:null,citation_count:null,tasks:[],methods:[],repositories:[],project_pages:[],...t}),Re={name:"Object Detection",slug:"object-detection"},Ie={name:"Real-Time Object Detection",slug:"real-time-object-detection"},Ar={"2502.12524":{route_id:"2502.12524",title:"YOLOv12: Attention-Centric Real-Time Object Detectors",content:"Enhancing the network architecture of the YOLO framework has been crucial for a long time. This work introduces an attention-centric YOLO framework, namely YOLOv12, built around area attention and residual efficient layer aggregation networks (R-ELAN). YOLOv12-N reaches 40.6 mAP at 1.64 ms on a T4 GPU, closing the gap to attention-based detectors without the usual latency penalty and surpassing YOLOv10/YOLOv11 by +1.2–1.6 mAP at matched latency.",content_truncated:!1,metadata:xe({arxiv_id:"2502.12524",authors:[{name:"Y. Tian"},{name:"Q. Ye"},{name:"D. Doermann"}],published:"2025-02-18",citation_count:412,tasks:[Re,Ie],methods:[{name:"Area Attention",slug:"area-attention"}],repositories:[{url:"https://github.com/sunsmarterjie/yolov12",stars:18700}]})},"2407.17140":{route_id:"2407.17140",title:"RT-DETRv2: Improved Baseline with Bag-of-Freebies for Real-Time Detection",content:"RT-DETRv2 improves the real-time DETR baseline with selective multi-scale feature extraction, a discrete sampling operator to ease deployment, and training-only 'bag-of-freebies' that add no inference cost. RT-DETRv2-R18/R50/R101 reach 47.9 / 53.4 / 54.3 mAP on COCO at 217 / 108 / 74 FPS on T4 TensorRT FP16, remaining NMS-free end to end.",content_truncated:!1,metadata:xe({arxiv_id:"2407.17140",authors:[{name:"W. Lv"},{name:"Y. Zhao"},{name:"J. Chang"}],published:"2024-07-24",citation_count:268,tasks:[Re,Ie],methods:[{name:"DETR",slug:"detr"}],repositories:[{url:"https://github.com/lyuwenyu/RT-DETR",stars:9400}]})},"2410.13842":{route_id:"2410.13842",title:"D-FINE: Redefining Regression as Fine-grained Distribution Refinement",content:"D-FINE reformulates bounding-box regression in DETR-style detectors as iterative refinement of probability distributions (FDR) and adds a localization self-distillation scheme (GO-LSD). D-FINE-L reaches 54.0 mAP at ~9 ms and D-FINE-X 55.8 mAP on COCO while staying real-time on modern GPUs, dominating RT-DETRv2 and YOLOv10 on the accuracy–latency Pareto front.",content_truncated:!1,metadata:xe({arxiv_id:"2410.13842",authors:[{name:"Y. Peng"},{name:"H. Li"},{name:"P. Wu"}],published:"2024-10-17",conference:"ICLR 2025",citation_count:187,tasks:[Re,Ie],methods:[{name:"Knowledge Distillation",slug:"knowledge-distillation"}],repositories:[{url:"https://github.com/Peterande/D-FINE",stars:12100}]})},"2406.03459":{route_id:"2406.03459",title:"LW-DETR: A Transformer Replacement to YOLO for Real-Time Detection",content:"LW-DETR pairs a plain ViT encoder with a lightweight DETR decoder and shows the combination outperforms YOLOv8 and YOLO-NAS at comparable latency, arguing transformer detectors are viable even at the fast end of the accuracy–latency curve. Uses multi-level feature aggregation, window-attention interleaving, and IoU-aware classification.",content_truncated:!1,metadata:xe({arxiv_id:"2406.03459",authors:[{name:"Q. Chen"},{name:"X. Su"},{name:"X. Zhang"}],published:"2024-06-05",citation_count:94,tasks:[Re,Ie],methods:[{name:"Vision Transformer",slug:"vision-transformer"}],repositories:[{url:"https://github.com/Atten4Vis/LW-DETR",stars:5200}]})},"2304.08069":{route_id:"2304.08069",title:"DETRs Beat YOLOs on Real-time Object Detection",content:"RT-DETR is the first real-time end-to-end object detector, built on an efficient hybrid encoder that decouples intra-scale interaction and cross-scale fusion, plus IoU-aware query selection. RT-DETR-R50 achieves 53.1 mAP at 108 FPS on COCO, beating comparably sized YOLO detectors in both speed and accuracy while eliminating NMS entirely; its Figure 1 accuracy–latency plot became the reference for later real-time detectors.",content_truncated:!1,metadata:xe({arxiv_id:"2304.08069",authors:[{name:"Y. Zhao"},{name:"W. Lv"},{name:"S. Xu"}],published:"2023-04-17",conference:"CVPR 2024",citation_count:2310,tasks:[Re,Ie],methods:[{name:"DETR",slug:"detr"}],repositories:[{url:"https://github.com/lyuwenyu/RT-DETR",stars:9400}]})},"2405.14458":{route_id:"2405.14458",title:"YOLOv10: Real-Time End-to-End Object Detection",content:"YOLOv10 removes NMS from the YOLO pipeline via consistent dual assignments during training and applies a holistic efficiency–accuracy driven design across the architecture. YOLOv10-S is 1.8x faster than RT-DETR-R18 at similar COCO accuracy; the family spans 46.3–54.4 mAP with substantially lower end-to-end latency than prior YOLOs because post-processing disappears.",content_truncated:!1,metadata:xe({arxiv_id:"2405.14458",authors:[{name:"A. Wang"},{name:"H. Chen"},{name:"L. Liu"}],published:"2024-05-23",conference:"NeurIPS 2024",citation_count:1650,tasks:[Re,Ie],methods:[{name:"NMS-free Training",slug:"nms-free-training"}],repositories:[{url:"https://github.com/THU-MIG/yolov10",stars:44200}]})},"2401.17270":{route_id:"2401.17270",title:"YOLO-World: Real-Time Open-Vocabulary Object Detection",content:"YOLO-World extends the YOLO paradigm to open-vocabulary detection through vision-language modeling with a re-parameterizable vision-language path aggregation network (RepVL-PAN) and region-text contrastive pretraining. It detects categories never seen at training time while running at 35+ FPS, and its prompt-then-detect deployment re-parameterizes text embeddings for zero runtime text-encoder cost.",content_truncated:!1,metadata:xe({arxiv_id:"2401.17270",authors:[{name:"T. Cheng"},{name:"L. Song"},{name:"Y. Ge"}],published:"2024-01-30",conference:"CVPR 2024",citation_count:890,tasks:[{name:"Open-Vocabulary Object Detection",slug:"open-vocabulary-object-detection"},Re],methods:[{name:"Contrastive Learning",slug:"contrastive-learning"}],repositories:[{url:"https://github.com/AILab-CVC/YOLO-World",stars:16800}]})},158342:{route_id:"158342",title:"Ultralytics YOLO: real-time detection framework and model zoo",content:"Official Ultralytics framework release covering YOLO11 and YOLOv12 deployment: pretrained COCO checkpoints from nano to x-large, TensorRT/ONNX/CoreML export paths, and reproducible latency benchmarks on T4, Jetson Orin, and CPU targets. Widely used as the practical baseline for real-time detection deployments.",content_truncated:!1,metadata:xe({source:"external",source_url:"https://docs.ultralytics.com/models/",authors:[{name:"Ultralytics"}],published:"2025-01-02",tasks:[Re,Ie],repositories:[{url:"https://github.com/ultralytics/ultralytics",stars:46e3}],project_pages:[{url:"https://docs.ultralytics.com"}]})}},Mt=t=>t.map(r=>Ar[r]),xt=Mt(["2502.12524","2407.17140","2410.13842","2406.03459","2304.08069","2405.14458","2401.17270","158342"]),Rt=Mt(["2410.13842","2502.12524","2407.17140","2405.14458","2304.08069"]),St="The user wants the current state-of-the-art for real-time object detection. That's a moving target split across two lineages — the YOLO family (fast CNN one-stage detectors) and the DETR family (transformer, end-to-end, NMS-free). I should ground the answer in recent papers benchmarked on COCO with reported latency or FPS, not just accuracy. Let me start with a broad hybrid search, see which papers surface, then run a second, narrower query to pin down the head-to-head COCO mAP vs latency trade-offs before I write anything.",Et="Good — both lineages are well represented. YOLOv12, YOLOv10 and RT-DETRv2 / D-FINE keep coming up. To actually rank them I need the accuracy-vs-latency numbers side by side on the same COCO val2017 protocol, so let me narrow the query to the benchmark comparison specifically.",kt=`There isn't a single winner — real-time object detection in 2026 is a two-horse race between the [YOLO family](paper:2502.12524) (fast one-stage CNNs) and the end-to-end [DETR family](paper:2304.08069) (NMS-free transformers). Which one is “SOTA” depends entirely on where you sit on the accuracy-vs-latency curve. - -**At the fast / edge end**, [YOLOv12](paper:2502.12524) is the current leader. Its area-attention design pushes attention into the YOLO backbone without the usual latency hit — YOLOv12-N reaches 40.6 mAP at ~1.6 ms on a T4, roughly +1.5 mAP over [YOLOv10](paper:2405.14458) at matched speed. [YOLOv10](paper:2405.14458) is still very relevant because it made the YOLO head NMS-free, cutting real end-to-end latency. - -**At the high-accuracy end**, the transformer detectors win. [D-FINE](paper:2410.13842) currently holds the accuracy-latency Pareto front, reporting 55.8 mAP by reformulating box regression as fine-grained distribution refinement with self-distillation. It builds on [RT-DETRv2](paper:2407.17140), which hardened the [original RT-DETR](paper:2304.08069) recipe (the paper that first showed DETRs beating YOLOs in real time) with training-only “bag-of-freebies” that add no inference cost. - -**My recommendation:** for edge or high-FPS deployment, start with [YOLOv12](paper:2502.12524) — the [Ultralytics framework](paper:158342) has ready-made checkpoints and export paths. If you have GPU headroom and want maximum accuracy while staying real-time, use [D-FINE](paper:2410.13842) or [RT-DETRv2](paper:2407.17140). And if you need open-vocabulary detection rather than fixed COCO classes, [YOLO-World](paper:2401.17270) is the one to look at.`,Ir=["How do these compare on edge devices like Jetson?","Show me open-vocabulary detectors","What about small-object detection?"];async function*Cr(t,r){const e=()=>(r==null?void 0:r.aborted)===!0,n=t.trim().slice(0,90)||"state-of-the-art real-time object detection";if(yield{type:"stream_start",request_id:"req_mock",session_id:null},await le(350,r),!e()){yield{type:"reasoning_start"};for(let i=0;i{const r=String("0").trim().toLowerCase();return r==="1"||r==="true"||r==="yes"},jr=()=>!0;class Ye extends Error{constructor(r,e,n,i){super(r),this.code=e,this.status=n,this.retryAfterSeconds=i,this.name="ChatStreamError"}}function Lr(t,r){if(qe())try{Ge.reportLatency(t,r).catch(()=>{})}catch{}}function Mr(t,r={}){return qe()?Dr(t,r.signal):Cr(t.message,r.signal)}function Nr(t,r={}){return Fr(t,r.signal)}async function*Dr(t,r){const e=await Ge.stream(t,r);yield*Nt(e)}async function*Fr(t,r){const e=await Ge.resumeStream(t,r);yield*Nt(e)}async function*Nt(t){if(!t.ok||!t.body){const i=t.ok?null:new Wt(t,await t.text());i&&Vt(i);const c=i==null?void 0:i.detail,d=typeof c=="object"&&c!==null?c:null,p=t.status===403&&!c,m=Number(t.headers.get("Retry-After")),I=Number.isFinite(m)&&m>=0?Math.min(300,Math.ceil(m)):void 0;throw new Ye(p?"Chat on staging is limited to approved Hugging Face users. Sign in with an approved account and try again.":(i==null?void 0:i.message)||`Chat stream failed (${t.status})`,d&&"code"in d&&typeof d.code=="string"?d.code:p?"staging_access_required":void 0,t.status,I)}const r=t.body.getReader(),e=new TextDecoder;let n="";try{for(;;){const{done:i,value:c}=await r.read();if(i)break;n+=e.decode(c,{stream:!0});let d;for(;(d=n.indexOf(` - -`))!==-1;){const p=n.slice(0,d);n=n.slice(d+2);const m=p.split(` -`).filter(I=>I.startsWith("data:")).map(I=>I.slice(5).trimStart()).join(` -`);!m||m==="[DONE]"||(yield JSON.parse(m))}}}finally{r.releaseLock()}}const Pr="https://huggingface.co/settings/inference-providers",Tt="pwc.chat.billing-notice-dismissed.v1";function Yr({provider:t}){const[r,e]=o.useState(()=>localStorage.getItem(Tt)==="1");return!qe()||r||t!=="huggingface"?null:s.jsxs("div",{className:"chat-billing-notice",role:"note",children:[s.jsx("span",{children:"Hugging Face models use the inference permission granted when you start chatting. Included monthly credits are used first, then extra usage requires purchased credits. You can choose organization billing in Settings."}),s.jsxs("div",{className:"chat-billing-notice-actions",children:[s.jsx("a",{href:"/settings",children:"Review billing"}),s.jsx("a",{href:Pr,target:"_blank",rel:"noreferrer",children:"Review usage"}),s.jsx("button",{type:"button",className:"chat-billing-notice-dismiss","aria-label":"Dismiss billing notice",title:"Dismiss",onClick:()=>{localStorage.setItem(Tt,"1"),e(!0)},children:s.jsx($t,{size:15,"aria-hidden":"true"})})]})]})}function Ot({variant:t,composerProps:r,provider:e,paused:n,suggestions:i=[]}){var d;const c=s.jsxs(s.Fragment,{children:[s.jsx(Yr,{provider:e}),n&&s.jsx("div",{id:"chat-paused-description",className:"chat-paused-banner",role:"status",children:"Chat is temporarily disabled. You can keep browsing and editing your conversations. New research runs will return when chat is restored."}),s.jsx(tr,{...r,...t==="empty"?{autoFocus:!0}:{placeholder:(d=r.draft)!=null&&d.text?"Edit and send again…":"Ask a follow-up…"}}),t==="empty"&&s.jsx("div",{className:"chat-examples",children:i.map(p=>s.jsx("button",{type:"button",className:"chat-example",disabled:n,onClick:()=>{var m;return r.onSend({text:p,paperMentions:[],...(m=r.draft)!=null&&m.paperSelection?{paperSelection:r.draft.paperSelection}:{}})},children:p},p))})]});return t==="empty"?c:s.jsx("div",{className:"chat-composer-wrap",children:s.jsxs("div",{className:"chat-composer-inner",children:[c,s.jsx("div",{className:"chat-composer-foot",children:qe()?s.jsxs(s.Fragment,{children:[e==="huggingface"&&s.jsxs("span",{className:"chat-provider-attribution",children:["Powered by 🤗 ",s.jsx("a",{href:"https://huggingface.co/docs/inference-providers/en/index",target:"_blank",rel:"noreferrer",children:"Inference Providers"}),"."]}),e==="openrouter"&&s.jsxs("span",{className:"chat-provider-attribution",children:["Powered by ",s.jsx("a",{href:"https://openrouter.ai",target:"_blank",rel:"noreferrer",children:"OpenRouter"}),"."]}),e==="openai"&&s.jsx("span",{className:"chat-provider-attribution",children:"Powered by OpenAI."}),s.jsx("span",{children:"The AI assistant can make mistakes. Double-check responses."})]}):s.jsx(s.Fragment,{children:"Assistant preview — responses are simulated."})})]})})}function qr({messages:t,papers:r,busy:e,queuedDraft:n,paperMentionsEnabled:i,archivePending:c,openRouterFallbackEnabled:d,onToggleBlock:p,onEditAndResend:m,onArchiveOld:I,onArchiveOldest:_}){var N,h;const[b,T]=o.useState(null),q=o.useRef(null),x=o.useRef(null),M=o.useRef(null);o.useEffect(()=>{e?T(null):M.current=null},[e]),o.useLayoutEffect(()=>{const f=q.current;if(f){if(x.current!==null){f.scrollTop=x.current,x.current=null;return}if(M.current){const C=Array.from(f.querySelectorAll("[data-message-id]")).find(D=>D.dataset.messageId===M.current);if(C){const D=f.getBoundingClientRect(),U=C.getBoundingClientRect();f.scrollTop+=U.top-D.top-24;return}}f.scrollTop=f.scrollHeight}},[t]);const P=t.filter(f=>f.role==="user"),V=(N=P[0])==null?void 0:N.id,$=(h=P.at(-1))==null?void 0:h.id,L=(f,C)=>{var D;x.current=((D=q.current)==null?void 0:D.scrollTop)??null,p(f,C)};return s.jsx("div",{className:"chat-conversation",ref:q,children:s.jsxs("div",{className:"chat-conversation-inner",children:[t.length===0&&(n==null?void 0:n.text)&&s.jsx(wt,{id:"queued-launch-preview",text:n.text,paperMentions:n.paperMentions,paperSelection:n.paperSelection,isInitial:!0}),t.map(f=>f.role==="user"?s.jsx(wt,{id:f.id,text:f.text??"",paperMentions:f.paperMentions??[],paperSelection:f.paperSelection,paperMentionsEnabled:i,isInitial:f.id===V,editingAllowed:!e&&!!f.revision,editing:b===f.id,editNotice:f.id===V?"Sending will replace this conversation.":f.id===$?"Sending will replace the response.":"Sending will replace the response and all messages after it.",onEdit:()=>T(f.id),onCancel:()=>T(null),onResendDraft:C=>{f.id!==V&&(M.current=f.id);const D=m(f.id,C);return D?T(null):M.current=null,D}},f.id):s.jsx(rr,{msg:f,papers:r,onToggleBlock:L,onArchiveOldChats:I,onArchiveOldestChats:_,archivePending:c,hfBilling:null,openRouterFallbackEnabled:d,feedbackEnabled:!0},f.id))]})})}function Br({retryAt:t,onRetry:r,onCancel:e}){const[n,i]=o.useState(()=>Math.max(0,Math.ceil((t-Date.now())/1e3))),c=o.useRef(null);return o.useEffect(()=>{var I;const d=document.activeElement instanceof HTMLElement?document.activeElement:null;(I=c.current)==null||I.focus();const p=()=>i(Math.max(0,Math.ceil((t-Date.now())/1e3)));p();const m=window.setInterval(p,250);return()=>{window.clearInterval(m),d==null||d.focus()}},[t]),s.jsx("div",{className:"chat-capacity-dialog-backdrop",role:"presentation",children:s.jsxs("div",{className:"chat-capacity-dialog",role:"dialog","aria-modal":"true","aria-labelledby":"chat-capacity-dialog-title","aria-describedby":"chat-capacity-dialog-description",onKeyDown:d=>{d.key==="Escape"&&(d.preventDefault(),e())},children:[s.jsx("h2",{id:"chat-capacity-dialog-title",children:"All research slots are currently in use"}),s.jsx("p",{id:"chat-capacity-dialog-description",children:"Your message was not sent or billed. Try again in a few seconds."}),s.jsx("p",{className:"chat-capacity-countdown","aria-live":"polite",children:n>0?`Try again available in ${n} second${n===1?"":"s"}.`:"You can try again now."}),s.jsxs("div",{className:"chat-capacity-dialog-actions",children:[s.jsx("button",{type:"button",className:"chat-capacity-cancel",ref:c,onClick:e,children:"Cancel"}),s.jsx("button",{type:"button",className:"chat-capacity-retry",disabled:n>0,onClick:r,children:"Try again"})]})]})})}function Ur({onClose:t}){const r=o.useRef(null);return o.useEffect(()=>{var n;const e=document.activeElement instanceof HTMLElement?document.activeElement:null;return(n=r.current)==null||n.focus(),()=>e==null?void 0:e.focus()},[]),s.jsx("div",{className:"chat-capacity-dialog-backdrop",role:"presentation",children:s.jsxs("div",{className:"chat-capacity-dialog",role:"dialog","aria-modal":"true","aria-labelledby":"chat-disabled-title","aria-describedby":"chat-disabled-description",onKeyDown:e=>{e.key==="Escape"&&(e.preventDefault(),t())},children:[s.jsx("h2",{id:"chat-disabled-title",children:"Chat is temporarily disabled"}),s.jsx("p",{id:"chat-disabled-description",children:"We've temporarily paused new research runs. Your message wasn't sent, and your draft is still here. Please try again later."}),s.jsx("div",{className:"chat-capacity-dialog-actions",children:s.jsx("button",{ref:r,type:"button",className:"chat-capacity-cancel",onClick:t,children:"Keep editing"})})]})})}function Hr({url:t,onClose:r}){return t?s.jsx("div",{className:"chat-share-dialog-backdrop",role:"presentation",onMouseDown:r,children:s.jsxs("div",{className:"chat-share-dialog",role:"dialog","aria-modal":"true","aria-labelledby":"chat-share-dialog-title",onMouseDown:e=>e.stopPropagation(),children:[s.jsx("h2",{id:"chat-share-dialog-title",children:"Public link created"}),s.jsx("p",{children:"Anyone with this link can see this conversation. It could not be copied automatically, so copy it manually:"}),s.jsx("input",{readOnly:!0,value:t,"aria-label":"Public conversation link",autoFocus:!0,onFocus:e=>e.currentTarget.select()}),s.jsx("button",{type:"button",onClick:r,children:"Close"})]})}):null}function Wr({sessions:t,activeSessionId:r,loading:e,error:n,open:i,onClose:c,onNew:d,onNavigate:p,onRename:m,onDelete:I}){const[_,b]=o.useState(null),[T,q]=o.useState(""),[x,M]=o.useState(null);o.useEffect(()=>{if(!x)return;const L=()=>M(null),N=h=>{h.key==="Escape"&&L()};return window.addEventListener("click",L),window.addEventListener("keydown",N),()=>{window.removeEventListener("click",L),window.removeEventListener("keydown",N)}},[x]);const P=L=>{b(L.id),q(L.title)},V=async L=>{const N=T.trim();N&&await m(L,N)&&b(null)},$=(L,N,h)=>M({id:L,x:N,y:h});return s.jsxs("aside",{className:`chat-sidebar${i?"":" chat-sidebar-closed"}`,children:[s.jsxs("div",{className:"chat-sidebar-top",children:[s.jsxs("button",{type:"button",className:"chat-new-chat",onClick:()=>{$e()&&d()},children:[s.jsx(or,{})," New chat"]}),s.jsx("button",{type:"button",className:"icon-btn",onClick:c,title:"Collapse sidebar",children:s.jsx(Ct,{})})]}),s.jsxs("nav",{className:"chat-sessions","aria-label":"Chat history",children:[e&&s.jsx("div",{className:"chat-sessions-empty",children:"Loading chats…"}),!e&&n&&s.jsx("div",{className:"chat-sessions-empty",children:n}),!e&&!n&&t.length===0&&s.jsx("div",{className:"chat-sessions-empty",children:"Conversations you start will show up here."}),cr(t).map(L=>s.jsxs("div",{className:"chat-session-group",children:[s.jsx("div",{className:"chat-session-group-label",children:L.label}),L.items.map(N=>s.jsxs("div",{className:`chat-session${N.id===r?" chat-session-active":""}`,role:"button",tabIndex:0,onClick:()=>{$e()&&p(N.id)},onKeyDown:h=>{if(h.key==="Enter"&&$e()&&p(N.id),h.key==="F2"&&P(N),h.key==="ContextMenu"||h.shiftKey&&h.key==="F10"){h.preventDefault();const f=h.currentTarget.getBoundingClientRect();$(N.id,f.right-150,f.bottom)}},onContextMenu:h=>{h.preventDefault(),$(N.id,h.clientX,h.clientY)},children:[_===N.id?s.jsx("input",{className:"chat-session-title-input",value:T,autoFocus:!0,maxLength:80,onClick:h=>h.stopPropagation(),onChange:h=>q(h.target.value),onBlur:()=>void V(N.id),onKeyDown:h=>{h.stopPropagation(),h.key==="Enter"&&V(N.id),h.key==="Escape"&&b(null)}}):s.jsx("span",{className:"chat-session-title",children:N.title}),s.jsx("button",{type:"button",className:"chat-session-menu","aria-label":"Chat actions","aria-haspopup":"menu",title:"Chat actions",onClick:h=>{h.stopPropagation();const f=h.currentTarget.getBoundingClientRect();$(N.id,f.right-150,f.bottom)},children:"⋯"}),s.jsx("button",{type:"button",className:"chat-session-delete","aria-label":"Delete conversation",onClick:h=>{h.stopPropagation(),$e()&&I(N.id)},children:s.jsx(lr,{})})]},N.id))]},L.label))]}),x&&s.jsx("div",{className:"chat-session-context-menu",role:"menu",style:{left:x.x,top:x.y},onClick:L=>L.stopPropagation(),children:s.jsx("button",{type:"button",role:"menuitem",autoFocus:!0,onClick:()=>{const L=t.find(N=>N.id===x.id);L&&P(L),M(null)},children:"Rename chat"})})]})}function Vr({sessionId:t,busy:r,loading:e,hasPaperSelection:n=!1,onError:i}){const{toast:c}=It(),[d,p]=o.useState(!1),[m,I]=o.useState(""),_=async()=>{var b;if(!(r||d)&&!(n&&!window.confirm("This public link will include the selected paper passage. Anyone with the link can read that passage. Continue?"))){p(!0);try{const T=await ur(t),q=new URL(T.public_path,window.location.origin).toString();try{if(!((b=navigator.clipboard)!=null&&b.writeText))throw new Error("Clipboard unavailable");await navigator.clipboard.writeText(q),c({className:"chat-share-toast",duration:5e3,title:"Public link copied to your clipboard",description:"Anyone with this link can see this conversation."})}catch{I(q)}}catch(T){const q=T instanceof Error?T.message:"Could not share this conversation";i(q),c({variant:"destructive",title:"Share failed",description:q})}finally{p(!1)}}};return s.jsxs(s.Fragment,{children:[s.jsxs("button",{type:"button",className:"chat-share-button",onClick:()=>void _(),disabled:r||d||e,"aria-label":"Share conversation",children:[d?s.jsx(jt,{}):s.jsx(Or,{"aria-hidden":"true"}),s.jsx("span",{children:"Share"})]}),s.jsx(Hr,{url:m,onClose:()=>I("")})]})}const $r=({descriptor:t})=>{const r=nr(),{open:e,register:n,unregister:i}=r,c=ot.useRef(null),d=t.source_head??t.preview_head,p=ot.useMemo(()=>d?{kind:"artifact",schema_version:1,scope:"owner",artifact_id:t.artifact_id,version_id:d.version_id,identifier:"latex-paper",version:d.version,artifact_kind:"latex_paper",title:t.title,status:"ready",preview_mime:"application/pdf",source_language:"latex",total_bytes:0}:null,[t.artifact_id,t.title,d]),m=p?sr(p):null;return ot.useEffect(()=>{if(!(!p||!m))return n(p),c.current!==m&&(c.current=m,e(p)),()=>i(m)},[p,m,e,n,i]),null};function Gr({messages:t,refreshSessions:r,resetChat:e,restoreDraft:n,clearTitle:i}){const{toast:c}=It(),[d,p]=o.useState(null),m=()=>{const b=[...t].reverse().find(T=>T.role==="user");e(),n({text:(b==null?void 0:b.text)??"",paperMentions:(b==null?void 0:b.paperMentions)??[],...b!=null&&b.paperSelection?{paperSelection:b.paperSelection}:{}}),i()};return{pending:d,archiveOld:async()=>{if(d===null){p("old");try{const b=await fr();if(await r(),b.archived_count===0){c({title:"No chats were archived",description:"There are no inactive chats older than 30 days."});return}m(),c({title:`${b.archived_count} ${b.archived_count===1?"chat":"chats"} archived`,description:"Your question is ready to send again."})}catch(b){c({variant:"destructive",title:"Could not archive old chats",description:b instanceof Error?b.message:"Try again."})}finally{p(null)}}},archiveOldest:async()=>{if(d===null){p("oldest");try{const b=await dr();await r(),m(),c({title:`${b.archived_count} ${b.archived_count===1?"chat":"chats"} archived`,description:"Your question is ready to send again."})}catch(b){c({variant:"destructive",title:"Could not archive chats",description:b instanceof Error?b.message:"Try again."})}finally{p(null)}}}}}class Kr{constructor(r,e=Lr){Ae(this,"requestId");Ae(this,"firstVisibleAt");Ae(this,"streamStartReported",!1);Ae(this,"firstVisibleReported",!1);Ae(this,"terminalReported",!1);Ae(this,"semanticReported",new Set);this.submittedAt=r,this.report=e}recordStreamStart(r,e){this.requestId=r,this.streamStartReported||(this.streamStartReported=!0,this.send({submission_to_stream_start_ms:Math.max(0,e-this.submittedAt)})),this.reportFirstVisible()}recordFirstVisible(r){this.firstVisibleAt===void 0&&(this.firstVisibleAt=r,this.reportFirstVisible())}recordSemantic(r,e){if(this.semanticReported.has(r))return;this.semanticReported.add(r);const n=Math.max(0,e-this.submittedAt);this.send(r==="reasoning"?{submission_to_first_reasoning_delta_ms:n}:r==="tool"?{submission_to_first_tool_call_ms:n}:{submission_to_first_answer_delta_ms:n})}recordTerminal(r){this.terminalReported||(this.terminalReported=!0,this.send({terminal_classification:r}))}reportFirstVisible(){!this.requestId||this.firstVisibleAt===void 0||this.firstVisibleReported||(this.firstVisibleReported=!0,this.send({submission_to_first_visible_delta_ms:Math.max(0,this.firstVisibleAt-this.submittedAt)}))}send(r){this.requestId&&this.report(this.requestId,r)}}const Dt="Preparing research workspace…",Ft={preparing_workspace:"Preparing secure workspace…",starting_agent:"Starting research agent…",connecting_model:"Connecting to model…"},Pt=()=>({messages:[],sessionId:null,title:"",phase:"idle"});function At(t,r){for(let e=t.length-1;e>=0;e-=1)if(r(t[e]))return e;return-1}function Ee(t){if(t.status!==Dt&&!Object.values(Ft).includes(t.status))return t;const{status:r,...e}=t;return e}function Z(t,r){if(!t.length)return t;const e=t.slice();return e[e.length-1]=r(e[e.length-1]),e}function Ce(t,r,e){return Z(t,n=>{const i=Ee(n),c=i.blocks??[];return{...i,blocks:c.map((d,p)=>r(d,p,c)?e(d):d)}})}function zr(t,r){switch(r.type){case"stream_start":return r.session_id?{...t,sessionId:r.session_id}:t;case"sandbox_start":case"sandbox_ready":case"workspace_ready":return t;case"lifecycle":return{...t,messages:Z(t.messages,e=>{var n;return e.role==="assistant"&&e.streaming&&(((n=e.blocks)==null?void 0:n.length)??0)===0?{...e,status:Ft[r.phase]}:e})};case"session_title_start":return{...t,title:""};case"session_title_delta":return{...t,title:`${t.title}${r.text}`.replace(/\s+/g," ").slice(0,80)};case"session_title_done":return{...t,title:r.title};case"reasoning_start":return{...t,messages:Z(t.messages,e=>{const n=Ee(e);return{...n,blocks:[...(n.blocks??[]).map(i=>i.kind==="reasoning"&&i.active?{...i,active:!1,open:!1}:i),{kind:"reasoning",text:"",active:!0,open:!0}]}})};case"reasoning_delta":return{...t,messages:Ce(t.messages,(e,n,i)=>e.kind==="reasoning"&&At(i,c=>c.kind==="reasoning")===n,e=>e.kind==="reasoning"?{...e,text:e.text+r.text}:e)};case"reasoning_end":return{...t,messages:Z(t.messages,e=>{const n=e.blocks??[],i=At(n,p=>p.kind==="reasoning"&&p.active);if(i<0)return e;const c=n[i];if(c.kind!=="reasoning")return e;const d=n[i-1];return(d==null?void 0:d.kind)==="reasoning"&&d.text===c.text?{...e,blocks:n.filter((p,m)=>m!==i)}:{...e,blocks:n.map((p,m)=>m===i?{...c,active:!1,open:!1}:p)}})};case"tool_call":return{...t,messages:Z(t.messages,e=>{const n=Ee(e);return{...n,blocks:[...n.blocks??[],{kind:"tool",id:r.id,name:r.name,args:r.args,status:"running",open:!1}]}})};case"tool_call_start":return{...t,messages:Z(t.messages,e=>{const n=Ee(e);return{...n,blocks:[...n.blocks??[],{kind:"tool",schema_version:2,id:r.id,name:r.name,args:{},argumentText:"",argumentState:"streaming",arguments_redacted:r.redacted,status:"running",open:!1}]}})};case"tool_call_arguments_delta":return{...t,messages:Ce(t.messages,e=>e.kind==="tool"&&e.id===r.id,e=>e.kind==="tool"?{...e,args:r.partial_args,argumentText:r.snapshot?r.delta:`${e.argumentText??""}${r.delta}`,arguments_redacted:e.arguments_redacted||r.redacted}:e)};case"tool_call_arguments_done":return{...t,messages:Ce(t.messages,e=>e.kind==="tool"&&e.id===r.id,e=>e.kind==="tool"?{...e,args:r.args,argumentText:JSON.stringify(r.args),argumentState:"done",arguments_redacted:e.arguments_redacted||r.redacted}:e)};case"app_start":return{...t,messages:Z(t.messages,e=>{const n=Ee(e);return{...n,blocks:[...n.blocks??[],{kind:"app",schema_version:1,instance_id:r.instance_id,provider:r.provider,server:r.server,tool:r.tool,resource_uri:r.resource_uri,status:"loading",input:r.input,result:{content:[],structuredContent:{},isError:!1},csp:{},permissions:{clipboardWrite:!0},height:525}]}})};case"app_result":return{...t,messages:Ce(t.messages,e=>e.kind==="app"&&e.instance_id===r.id,e=>e.kind==="app"?{...e,status:r.status,result:r.result}:e)};case"tool_result":return{...t,messages:Ce(t.messages,e=>e.kind==="tool"&&e.id===r.id,e=>e.kind!=="tool"?e:r.status?{...e,schema_version:2,status:r.status,took_ms:r.took_ms,content:r.content,metadata:r.metadata,open:r.status!=="success"}:{...e,status:"done",hits:r.hits,took_ms:r.took_ms,results:r.results})};case"artifact_start":return{...t,messages:Z(t.messages,e=>{const n=Ee(e);return{...n,blocks:[...n.blocks??[],{kind:"artifact",schema_version:1,scope:"owner",publication_id:r.publication_id,identifier:r.identifier,artifact_kind:"posterly",title:r.title,status:"generating",phase:"publishing_poster"}]}})};case"artifact_ready":return{...t,messages:Ce(t.messages,e=>e.kind==="artifact"&&e.publication_id===r.publication_id,e=>e.kind==="artifact"?{...e,artifact_id:r.artifact_id,version_id:r.version_id,identifier:r.identifier,version:r.version,title:r.title,status:"ready",preview_mime:r.preview_mime,source_language:r.source_language,gate_status:r.gate_status,total_bytes:r.total_bytes,phase:void 0}:e)};case"artifact_error":return{...t,messages:Ce(t.messages,e=>e.kind==="artifact"&&e.publication_id===r.publication_id,e=>e.kind==="artifact"?{...e,status:"error",phase:void 0,error_code:r.code,error_message:r.message}:e)};case"answer_delta":return{...t,messages:Z(t.messages,e=>{const n=Ee(e),i=n.blocks??[],c=i.at(-1);return(c==null?void 0:c.kind)==="answer"&&!c.done?{...n,blocks:[...i.slice(0,-1),{...c,text:c.text+r.text}]}:{...n,blocks:[...i,{kind:"answer",text:r.text,done:!1}]}})};case"done":return{...t,phase:"complete",messages:Z(t.messages,e=>({...e,streaming:!1,followups:r.followups,finishReason:r.finish_reason,citations:r.citations,blocks:(e.blocks??[]).map(n=>n.kind==="answer"?{...n,done:!0}:n.kind==="reasoning"&&n.active?{...n,active:!1,open:!1}:n)}))};case"error":return{...t,phase:"failed",messages:Z(t.messages,e=>({...e,streaming:!1,error:r.message,errorCode:r.code,blocks:(e.blocks??[]).map(n=>n.kind==="reasoning"&&n.active?{...n,active:!1,open:!1}:n.kind==="tool"&&n.status==="running"?{...n,status:"error",open:!0}:n)}))};default:return t}}function Qr(t){return Z(t,r=>{if(r.role!=="assistant")return r;const e=(r.blocks??[]).flatMap(n=>n.kind==="tool"&&n.status==="running"?[{...n,status:"error",open:!0}]:n.kind==="reasoning"&&n.active?n.text?[{...n,active:!1,open:!1}]:[]:n.kind==="answer"?[{...n,done:!0}]:[n]);return{...r,blocks:e,streaming:!1,finishReason:"stopped"}})}function We(t,r){switch(r.type){case"start":return{messages:r.messages,sessionId:r.sessionId,title:"",phase:"streaming"};case"event":return zr(t,r.event);case"load":return{messages:r.messages,sessionId:r.sessionId,title:t.title,phase:"idle"};case"workspace_status":return{...t,messages:Z(t.messages,e=>{var n;return e.role==="assistant"&&e.streaming&&(((n=e.blocks)==null?void 0:n.length)??0)===0&&!e.error?{...e,status:Dt}:e})};case"clear_workspace_status":return{...t,messages:Z(t.messages,Ee)};case"settle":return{...t,phase:"idle",messages:Z(t.messages,e=>e.streaming?{...e,streaming:!1}:e)};case"stop":return{...t,messages:Qr(t.messages),phase:"stopped"};case"reset":return Pt()}}const Se={minDelayMs:5,maxDelayMs:80,minRateCharsPerMs:.3,maxBufferedMs:400,arrivalRateTauMs:1e3,arrivalRateHeadroom:1.1,maxPendingChars:64},Jr={now:()=>performance.now(),sleep:(t,r)=>new Promise(e=>{if(r!=null&&r.aborted||t<=0){e();return}const n=window.setTimeout(i,t);function i(){r==null||r.removeEventListener("abort",i),window.clearTimeout(n),e()}r==null||r.addEventListener("abort",i,{once:!0})})};function Xr(t){return!["stream_start","sandbox_start","sandbox_ready","workspace_ready","session_title_start","session_title_delta","session_title_done"].includes(t.type)}function Zr(t,r=!1,e=Se.maxPendingChars){var i;if(!t)return{pieces:[],pending:""};if(r)return{pieces:[t],pending:""};const n=Intl.Segmenter;if(n){const d=[...new n(void 0,{granularity:"word"}).segment(t)].filter(m=>m.isWordLike);let p=0;if(d.length>1&&(p=d.at(-1).index),d.length&&/\s$/u.test(t)&&(p=t.length),p>0){const m=t.slice(0,p),I=[],b=[...new n(void 0,{granularity:"word"}).segment(m)].filter(T=>T.isWordLike);for(let T=0;Tq&&I.push(m.slice(q,x))}return b.length||I.push(m),{pieces:I,pending:t.slice(p)}}}else{const c=[...t.matchAll(/\s+/gu)];if(c.length){const d=[];let p=0;for(const m of c){const I=m.index+m[0].length;d.push(t.slice(p,I)),p=I}return{pieces:d,pending:t.slice(p)}}}return t.length>=e?{pieces:[t.slice(0,e)],pending:t.slice(e)}:{pieces:[],pending:t}}function en(t,r={}){const e={minDelayMs:r.minDelayMs??Se.minDelayMs,maxDelayMs:r.maxDelayMs??Se.maxDelayMs,minRateCharsPerMs:r.minRateCharsPerMs??Se.minRateCharsPerMs,maxBufferedMs:r.maxBufferedMs??Se.maxBufferedMs,arrivalRateTauMs:r.arrivalRateTauMs??Se.arrivalRateTauMs,arrivalRateHeadroom:r.arrivalRateHeadroom??Se.arrivalRateHeadroom,maxPendingChars:r.maxPendingChars??Se.maxPendingChars},n=r.clock??Jr,i=[];let c="",d=null,p=0,m=!0,I=!1,_=null,b=0,T=n.now(),q=!1;const x=()=>{_==null||_(),_=null},M=(h,f)=>{const C=h.type==="reasoning_delta"||h.type==="answer_delta"?h.text.length:0;i.push({kind:"event",event:h,arrivedAt:f,chars:C}),x()},P=h=>{if(!d||!c)return;const f=Zr(c,h,e.maxPendingChars);for(const C of f.pieces)C&&M({type:d,text:C},p),p=n.now();c=f.pending,c||(d=null)},V=h=>{if(!m)return;const f=n.now();if(h.type==="reasoning_delta"||h.type==="answer_delta"){const C=h.type;if(!h.text)return;if(!q){q=!0,b+=h.text.length,T=f;const U=Array.from(h.text)[0];M({type:C,text:U},f);const O=h.text.slice(U.length);if(O)for(d=C,c=O,p=f,P(!1);c.length>=e.maxPendingChars;)P(!1);return}d&&d!==C&&P(!0),d||(d=C,p=f),c+=h.text;const D=Math.max(0,f-T);for(b*=Math.exp(-D/e.arrivalRateTauMs),b+=h.text.length,T=f,P(!1);c.length>=e.maxPendingChars;)P(!1);return}Xr(h)&&P(!0),M(h,f)},$=(async()=>{var h;try{for await(const f of t)V(f);m&&P(!0)}catch(f){m&&!((h=r.signal)!=null&&h.aborted)&&(P(!0),i.push({kind:"error",error:f,arrivedAt:n.now(),chars:0}))}finally{I=!0,x()}})(),L=()=>i.length||I?Promise.resolve():new Promise(h=>{_=h});return{events:async function*(){var f,C,D,U;let h=Number.NEGATIVE_INFINITY;try{for(;;){if(await L(),!i.length){if(I||!m)return;continue}const O=i[0];if(O.kind==="error")throw i.shift(),O.error;if(O.chars&&!((f=r.isHidden)!=null&&f.call(r))){const k=n.now(),je=i.reduce((ee,z)=>ee+z.chars,0),Be=((C=i.find(ee=>ee.chars))==null?void 0:C.arrivedAt)??k,H=Math.max(0,e.maxBufferedMs-(k-Be)),G=b*Math.exp(-Math.max(0,k-T)/e.arrivalRateTauMs)/e.arrivalRateTauMs,ne=H>0?je/H:Number.POSITIVE_INFINITY,Le=Math.max(e.minRateCharsPerMs,G*e.arrivalRateHeadroom,ne),ge=Math.min(e.maxDelayMs,Math.max(e.minDelayMs,O.chars/Le)),fe=Math.max(0,O.arrivedAt+e.maxBufferedMs-k),X=Math.max(O.arrivedAt,h+Math.min(ge,fe));if(await n.sleep(Math.max(0,X-n.now()),r.signal),!m||(D=r.signal)!=null&&D.aborted)return}i.shift(),h=n.now(),yield O.event}}finally{m&&(m=!1,x(),await((U=t.return)==null?void 0:U.call(t,void 0))),await $}}(),takeAcceptedForStop(){var f;if(!m)return[];m=!1,d&&c&&(M({type:d,text:c},p),c="",d=null);const h=i.flatMap(C=>C.kind==="event"&&C.event.type!=="done"&&C.event.type!=="error"?[C.event]:[]);return i.length=0,x(),(f=t.return)==null||f.call(t,void 0),h}}}const tn=750;function rn(t,r){for(let e=t.length-1;e>=0;e-=1)if(r(t[e]))return e;return-1}function Ve(t){const r=o.useRef(t);return o.useLayoutEffect(()=>{r.current=t}),o.useCallback((...e)=>r.current(...e),[])}function nn(t){const[r,e]=o.useState([]),[n,i]=o.useState(!1),[c,d]=o.useState(""),p=o.useRef(!1),m=o.useRef(null),I=o.useRef(null),_=o.useRef(null),b=o.useRef(null),T=o.useRef(!1),q=o.useRef(null),x=o.useRef(null),M=o.useRef("cleared"),P=o.useRef(null),V=o.useRef(null),[$,L]=o.useState(null),[N,h]=o.useState(null),f=o.useRef([]),C=o.useRef(Pt()),D=o.useRef(null),U=o.useRef(null),O=o.useRef(!1),k=o.useRef(t),je=o.useRef(nt()),Be=o.useRef(0),H=o.useRef(0),G=o.useRef(t.sessionId),ne=o.useRef(t.sessionId);ne.current!==t.sessionId&&(ne.current=t.sessionId,G.current!==t.sessionId&&(H.current+=1,P.current=null)),k.current=t,f.current=r,o.useEffect(()=>()=>{var l;x.current!==null&&window.clearTimeout(x.current),(l=m.current)==null||l.abort(),I.current=null,_.current!==null&&cancelAnimationFrame(_.current),b.current!==null&&window.clearTimeout(b.current),V.current=null},[]),o.useEffect(()=>{p.current||(G.current=t.sessionId)},[t.sessionId]),o.useEffect(()=>{const l=p.current&&t.sessionId===G.current?D.current:null;O.current=l!==null,l&&(e(l),f.current=l)},[t.sessionId]);const Le=o.useMemo(()=>{const l={};for(const w of r)for(const E of w.blocks??[])if(E.kind==="tool")for(const g of E.results??[])l[g.route_id]=g;return l},[r]),ge=()=>`m${++Be.current}_${Date.now().toString(36)}`,fe=(l,w=!0)=>{const E={...C.current,messages:D.current??f.current,sessionId:G.current},g=We(E,l);C.current=g,D.current&&(D.current=g.messages);const y=l.type==="event"&&l.event.type==="stream_start"?l.event.session_id:null;return y?(G.current=y,k.current.onSessionId(y)):g.sessionId&&g.sessionId!==E.sessionId&&(G.current=g.sessionId,k.current.onSessionId(g.sessionId)),g.title!==E.title&&k.current.onTitle(g.title),w&&(f.current=g.messages,e(g.messages)),g},X=()=>U.current===H.current||O.current,ee=()=>{_.current!==null&&(cancelAnimationFrame(_.current),_.current=null),b.current!==null&&(window.clearTimeout(b.current),b.current=null)},z=()=>{ee(),document.visibilityState!=="hidden"&&(!O.current||!D.current||(T.current=!1,f.current=D.current,e(D.current)))},Ke=()=>{if(!O.current||document.visibilityState==="hidden"||_.current!==null||b.current!==null)return;const l=()=>{_.current=null,b.current=null,z()};typeof requestAnimationFrame=="function"?_.current=requestAnimationFrame(l):b.current=window.setTimeout(l,0)};o.useEffect(()=>{const l=()=>{document.visibilityState==="visible"&&T.current&&Ke()};return document.addEventListener("visibilitychange",l),()=>document.removeEventListener("visibilitychange",l)});const ye=l=>{if(m.current!==l||(x.current!==null&&(window.clearTimeout(x.current),x.current=null),M.current==="cleared"))return;const w=M.current==="shown";M.current="cleared",w&&fe({type:"clear_workspace_status"},X())},it=(l,w)=>{x.current!==null&&window.clearTimeout(x.current),M.current="armed",x.current=window.setTimeout(()=>{x.current=null,!(M.current!=="armed"||m.current!==l||l.signal.aborted||H.current!==w)&&(M.current="shown",fe({type:"workspace_status"},X()))},tn)},_e=(l,w)=>{const E=P.current;!E||E.controller!==l||E.tracker.recordStreamStart(w,performance.now())},ke=(l,w)=>{const E=P.current;!E||E.controller!==l||E.tracker.recordTerminal(w)};o.useLayoutEffect(()=>{const l=P.current;if(!l)return;const w=r.at(-1);if((w==null?void 0:w.role)!=="assistant"||!(w.blocks??[]).some(y=>y.kind==="tool"||y.kind==="reasoning"&&!!y.text.trim()||y.kind==="answer"&&!!y.text.trim()))return;const g=performance.now();l.tracker.recordFirstVisible(g);for(const y of w.blocks??[])y.kind==="reasoning"&&y.text.trim()?l.tracker.recordSemantic("reasoning",g):y.kind==="tool"?l.tracker.recordSemantic("tool",g):y.kind==="answer"&&y.text.trim()&&l.tracker.recordSemantic("answer",g)},[r]);const he=(l,w=!0)=>{fe({type:"event",event:l},w)},be=async(l,w)=>{var y;const E=await st(l);let g=Lt(E);return((y=q.current)==null?void 0:y.sessionId)===l&&(g=q.current.messages,q.current=null),H.current!==w&&!(U.current===w&&O.current&&k.current.sessionId===l)?null:(e(g),f.current=g,D.current=g,C.current=We(C.current,{type:"load",messages:g,sessionId:l}),g)},Q=(l,w,E,g,y,Y)=>{const A=++H.current;U.current=A,O.current=!0,p.current=!0;const j=new AbortController;m.current=j;const ie=l.text;return je.current=l,G.current=w.session_id,d(""),e(E),D.current=E,C.current=We(C.current,{type:"start",messages:E,sessionId:w.session_id}),i(!0),P.current=Y?null:{controller:j,tracker:new Kr(performance.now())},M.current="cleared",(async()=>{var ue,pe,Qe,Je,Fe,Xe;let se=!1,J=!1,S=!1,oe=!1,K=!1,te=!1;try{const W=Y?Nr(Y,{signal:j.signal}):Mr(w,{signal:j.signal}),re=!Y&&qe()&&jr(),ce=re?en(W,{signal:j.signal,isHidden:()=>document.visibilityState==="hidden"}):null;ce&&(I.current={controller:j,stream:ce});for await(const v of(ce==null?void 0:ce.events)??W){v.type==="paper_artifact"&&((pe=(ue=k.current).onPaperArtifact)==null||pe.call(ue,v)),v.type==="stream_start"&&(se=!0,J=v.provider_execution!==!1,_e(j,v.request_id)),v.type==="sandbox_start"&&it(j,A),(v.type==="sandbox_ready"||v.type==="workspace_ready"||v.type==="lifecycle")&&ye(j),(v.type==="reasoning_start"||v.type==="reasoning_delta"||v.type==="tool_call"||v.type==="tool_call_start"||v.type==="tool_call_arguments_delta"||v.type==="tool_call_arguments_done"||v.type==="app_start"||v.type==="app_result"||v.type==="artifact_start"||v.type==="artifact_ready"||v.type==="artifact_error"||v.type==="answer_delta"||v.type==="done"||v.type==="error")&&ye(j),(v.type==="done"||v.type==="error")&&(oe=!0,K=v.type==="error",ke(j,v.type==="error"?"error":"complete"),v.type==="error"&&["openrouter_monthly_budget_exhausted","openrouter_unavailable","openrouter_byok_credential_invalid","openrouter_byok_billing_error","openrouter_byok_rate_limit","hf_inference_billing_exhausted"].includes(v.code??"")&&(S=!0,k.current.onInterrupted(l)));const ve=X(),Pe=ve&&!(re&&document.visibilityState==="hidden"),Ue=v.type==="reasoning_delta"||v.type==="answer_delta"||v.type==="tool_call_arguments_delta",Ze=!["stream_start","sandbox_start","sandbox_ready","workspace_ready","session_title_start","session_title_delta","session_title_done","reasoning_delta","answer_delta","tool_call_arguments_delta"].includes(v.type);re&&Ze&&z(),!j.signal.aborted&&(ve||v.type==="stream_start"||v.type==="session_title_start"||v.type==="session_title_delta"||v.type==="session_title_done")?re&&Ue?(he(v,!1),T.current=T.current||ve,Ke()):(he(v,Pe),re&&ve&&!Pe&&(T.current=!0)):j.signal.aborted||he(v,!1)}}catch(W){if(K=!0,!j.signal.aborted){if(ye(j),W instanceof Ye&&W.code==="chat_temporarily_disabled")te=!0,h({question:ie,draft:l}),H.current===A&&(e(g),f.current=g,d(""));else if(W instanceof Ye&&W.code==="chat_capacity"){te=!0;const re=W.retryAfterSeconds??5,ce={question:ie,draft:l,request:w,optimistic:E,original:g,edit:y,retryAfterSeconds:re,retryAt:Date.now()+re*1e3};V.current=ce,L({question:ie,draft:l,retryAt:ce.retryAt,retryAfterSeconds:re}),H.current===A&&(e(g),f.current=g,d(""))}else ke(j,"network_error"),W instanceof Ye&&["paper_context_unavailable","paper_mention_unavailable","paper_mentions_disabled","paper_selection_disabled","paper_selection_requires_reader","paper_selection_paper_mismatch","paper_selection_version_mismatch","paper_selection_page_invalid","paper_selection_too_large","chat_storage_quota_exceeded"].includes(W.code??"")&&(te=!0,k.current.onInterrupted(l),H.current===A&&(e(g),f.current=g,d(W.message))),W instanceof Ye&&["openrouter_monthly_budget_exhausted","openrouter_unavailable","openrouter_byok_credential_invalid","openrouter_byok_billing_error","openrouter_byok_rate_limit","hf_inference_billing_exhausted"].includes(W.code??"")&&(S=!0,k.current.onInterrupted(l));!te&&H.current===A&&he({type:"error",message:W instanceof Error?W.message:"The assistant stream failed.",code:W instanceof Ye?W.code:void 0})}}finally{if(m.current===j){if(((Qe=I.current)==null?void 0:Qe.controller)===j&&(z(),I.current=null),ye(j),!oe&&!j.signal.aborted&&ke(j,"network_error"),p.current=!1,i(!1),te)k.current.onSettled(w.session_id);else if(!j.signal.aborted){(se&&J||S)&&((Fe=(Je=k.current).onProviderTerminal)==null||Fe.call(Je));const W=G.current;if(y&&!se)H.current===A&&(e(y.snapshot),f.current=y.snapshot,d("Couldn’t resend this message. Your original conversation was restored."));else if(W){H.current===A&&y&&(K||!oe)&&(e(y.snapshot),f.current=y.snapshot);try{const re=await be(W,A);re&&y&&re.some(ce=>ce.id===y.targetId)&&d("Couldn’t resend this message. Your original conversation was restored.")}catch{H.current===A&&fe({type:"settle"})}}else H.current===A&&fe({type:"settle"});k.current.onSettled(W)}((Xe=P.current)==null?void 0:Xe.controller)===j&&(P.current=null)}}})(),!0},Te=Ve(l=>{var S,oe;const w=typeof l=="string"?nt(l.trim()):l,E=w.text;if(!E||E.length>8e3||p.current||V.current)return!1;const g=f.current,y=[...g].reverse().find(K=>K.role==="user"),Y=y!=null&&y.status&&y.status!=="complete"&&y.revision?{replace_message_id:y.id,prior_revision:y.revision}:null,A={id:ge(),role:"user",text:E,paperMentions:w.paperMentions,paperSelection:w.paperSelection},j={id:ge(),role:"assistant",streaming:!0,blocks:[]},ie=Y&&y?rn(g,K=>K.id===y.id):-1,se=ie<0?[...g,A,j]:[...g.slice(0,ie),A,j],J=(oe=(S=k.current).viewerContext)==null?void 0:oe.call(S);return Q(w,{message:E,paper_mentions:w.paperMentions.map(({route_id:K,title:te,start:ue,end:pe})=>({route_id:K,title:te,start:ue,end:pe})),session_id:k.current.sessionId,client_message_id:crypto.randomUUID(),web_search_enabled:!!k.current.webSearchEnabled,reasoning_effort:k.current.reasoningEffort??"low",...k.current.primaryPaperRouteId?{primary_paper_route_id:k.current.primaryPaperRouteId}:{},...J?{viewer_context:J}:{},...w.paperSelection?{paper_selection:vt(w.paperSelection)}:{},...!k.current.sessionId&&k.current.initialModel?{initial_model:k.current.initialModel}:{},...Y??{}},se,g)}),Me=Ve((l,w)=>{var S,oe;const E=typeof w=="string"?nt(w.trim()):w,g=E.text;if(!g||g.length>8e3||p.current||V.current)return!1;const y=f.current.slice(),Y=y.findIndex(K=>K.id===l&&K.role==="user");if(Y<0)return!1;const A=y[Y];if(!k.current.sessionId||!A.revision)return!1;const j={id:A.id,role:"user",text:g,paperMentions:E.paperMentions,paperSelection:E.paperSelection,revision:A.revision+1,status:"generating"},ie={id:ge(),role:"assistant",streaming:!0,blocks:[]},se=[...y.slice(0,Y),j,ie],J=(oe=(S=k.current).viewerContext)==null?void 0:oe.call(S);return Q(E,{message:g,paper_mentions:E.paperMentions.map(({route_id:K,title:te,start:ue,end:pe})=>({route_id:K,title:te,start:ue,end:pe})),session_id:k.current.sessionId,client_message_id:crypto.randomUUID(),web_search_enabled:!!k.current.webSearchEnabled,reasoning_effort:k.current.reasoningEffort??"low",...k.current.primaryPaperRouteId?{primary_paper_route_id:k.current.primaryPaperRouteId}:{},...J?{viewer_context:J}:{},...E.paperSelection?{paper_selection:vt(E.paperSelection)}:{},replace_message_id:A.id,prior_revision:A.revision},se,y,{targetId:A.id,snapshot:y})}),we=o.useCallback(()=>{V.current=null,L(null)},[]),Oe=Ve(()=>{const l=V.current;return!l||Date.now(){var Y,A;if(!m.current)return;const l=m.current;ye(l),ke(l,"stopped"),l.abort();const w=((Y=I.current)==null?void 0:Y.controller)===l?I.current.stream.takeAcceptedForStop():[];I.current=null;for(const j of w)he(j,!1);z(),m.current=null,((A=P.current)==null?void 0:A.controller)===l&&(P.current=null),p.current=!1,i(!1);const E=fe({type:"stop"},!1).messages;D.current=E,f.current=E,e(E),k.current.onInterrupted(je.current);const g=G.current;g&&(q.current={sessionId:g,messages:E}),g&&pr(g).catch(()=>{});const y=++H.current;window.setTimeout(()=>{g&&H.current===y?be(g,y).catch(()=>{}).finally(()=>k.current.onSettled(g)):g||k.current.onSettled(null)},450)}),me=o.useCallback((l,w)=>e(E=>E.map(g=>{var y;return g.id!==l?g:{...g,blocks:(y=g.blocks)==null?void 0:y.map((Y,A)=>A===w&&(Y.kind==="reasoning"||Y.kind==="tool")?{...Y,open:!Y.open}:Y)}})),[]),Ne=o.useCallback(()=>{var l;H.current+=1,x.current!==null&&(window.clearTimeout(x.current),x.current=null),M.current="cleared",(l=m.current)==null||l.abort(),m.current=null,I.current=null,ee(),T.current=!1,q.current=null,P.current=null,V.current=null,L(null),p.current=!1,G.current=null,D.current=null,C.current=We(C.current,{type:"reset"}),U.current=null,O.current=!1,e([]),i(!1),d("")},[]),De=Ve((l,w,E=!1)=>{var g;if(H.current+=1,x.current!==null&&(window.clearTimeout(x.current),x.current=null),M.current="cleared",ee(),T.current=!1,P.current=null,V.current=null,L(null),p.current&&w!==void 0&&w===G.current&&D.current){O.current=!0,e(D.current),f.current=D.current,d("");return}if(O.current=!1,p.current||((g=m.current)==null||g.abort(),m.current=null,D.current=null,U.current=null,O.current=!1),E&&w){const y=[...l].reverse().find(Y=>Y.role==="user");if(y){const Y={text:y.text??"",paperMentions:y.paperMentions??[],...y.paperSelection?{paperSelection:y.paperSelection}:{}},A=[...l,{id:`${y.id}-active`,role:"assistant",streaming:!0,blocks:[]}];Q(Y,{message:Y.text,session_id:w,client_message_id:"reconnect",web_search_enabled:!!k.current.webSearchEnabled,reasoning_effort:k.current.reasoningEffort??"low"},A,l,void 0,w);return}}e(l),f.current=l,C.current=We(C.current,{type:"load",messages:l,sessionId:w??k.current.sessionId}),p.current||i(!1),d("")});return{messages:r,busy:n,papers:Le,sessionError:c,capacityRequest:$,disabledRequest:N,send:Te,editAndResend:Me,retryCapacity:Oe,cancelCapacity:we,dismissDisabled:()=>h(null),stop:ze,toggleBlock:me,reset:Ne,load:De}}const de=nt,sn=["Summarize the main contributions","Explain in simple terms","Identify the main limitations"],an=()=>{const t=sessionStorage.getItem(at);if(!t)return null;try{return Rr(JSON.parse(t),t)}catch{}return de(t)},on=({enabled:t,workspaceKey:r,children:e,onAskAiFix:n})=>t?s.jsx(ar,{workspaceKey:r,onAskAiFix:n,children:e}):s.jsx(s.Fragment,{children:e}),cn=({enabled:t,children:r})=>t?s.jsx(ir,{variant:"chat",children:r}):s.jsx(s.Fragment,{children:r}),ln=({mode:t="general",routeSessionId:r,primaryPaper:e,currentPage:n,paperSelection:i,onPaperSelectionChange:c,onSessionId:d,onReaderSubmit:p,onReaderNewChat:m})=>{var ut,dt,ft,pt,ht,mt,gt,yt,_t;const{sessionId:I}=Gt(),_=r??(t==="general"?I:void 0),b=Kt(),[T,q]=zt(),{user:x,isLoading:M}=Qt(),P=Jt(),V=Zt(),$=er({queryKey:["chatAvailability"],queryFn:()=>Ge.getAvailability(),refetchInterval:3e4,retry:!1,enabled:qe()&&!!x}),L=((ut=$.data)==null?void 0:ut.status)==="paused"||t==="paper"&&((dt=$.data)==null?void 0:dt.paper_reader_chat_enabled)===!1,[N,h]=o.useState([]),[f,C]=o.useState(!1),[D,U]=o.useState(""),[O,k]=o.useState(()=>_?{id:_,status:"loading"}:null),[je,Be]=o.useState(0),[H,G]=o.useState(null),ne=o.useRef(hr()),Le=o.useRef(T.get("model")||((ft=ne.current)==null?void 0:ft.model)),[ge,fe]=o.useState(V?mr:gr),[X,ee]=o.useState(Le.current||yr),z=_r(ge,X),Ke=kr(!!(x&&z==="openrouter")),ye=o.useRef(z);ye.current=z;const[it,_e]=o.useState(""),[ke,he]=o.useState(null),[be,Q]=o.useState(()=>de()),[Te,Me]=o.useState(()=>{var a;return((a=ne.current)==null?void 0:a.webSearchEnabled)??!1}),[we,Oe]=o.useState(()=>{var a;return((a=ne.current)==null?void 0:a.reasoningEffort)??"low"}),ze=!!((pt=$.data)!=null&&pt.web_search_available),[me,Ne]=o.useState(()=>{var u,R;const a=(u=T.get("q"))==null?void 0:u.trim();return a?de(a):((R=ne.current)==null?void 0:R.draft)??de()}),De=o.useRef(!1),l=o.useRef(!1),w=o.useRef(!1),[E,g]=o.useState(()=>typeof window>"u"||window.innerWidth>900),y=o.useRef(new Set),Y=o.useRef(!1),A=o.useRef(_),j=o.useRef(null),ie=o.useRef(null),se=o.useRef(null);A.current=_;const J=o.useCallback(async()=>{if(!x)return;const a=!Y.current;a&&C(!0);try{const u=await br();h(R=>{const F=j.current,B=F?R.find(He=>He.id===F):void 0;if(!B)return u;const ae=u.find(He=>He.id===F);return[ae?{...ae,title:B.title,is_busy:!0}:B,...u.filter(He=>He.id!==F)]}),Y.current=!0,U("")}catch(u){U(u instanceof Error?u.message:"Could not load chats")}finally{a&&C(!1)}},[x]),S=nn({sessionId:_??null,initialModel:X,webSearchEnabled:ze&&Te,reasoningEffort:we,primaryPaperRouteId:t==="paper"?e==null?void 0:e.routeId:void 0,viewerContext:t==="paper"&&n?()=>({page:Math.max(1,Math.min(1e4,n()))}):void 0,onSessionId:a=>{j.current=a;const u=a!==A.current,R=(A.current??null)===ie.current,F=new Date().toISOString();h(B=>B.some(ae=>ae.id===a)?B.map(ae=>ae.id===a?{...ae,is_busy:!0}:ae):[{id:a,title:"New chat",selected_model:X,created_at:F,updated_at:F,message_count:1,is_busy:!0,web_search_enabled:Te,reasoning_effort:we},...B]),u&&R&&_e("New chat"),R&&(se.current=a,k({id:a,status:"loaded"}),u&&(t==="paper"?d==null||d(a):b(`/chat/${a}`,{replace:!0})))},onTitle:a=>{const u=j.current??A.current;u&&!y.current.has(u)&&(u===A.current&&_e(a),h(R=>R.map(F=>F.id===u?{...F,title:a}:F)))},onSettled:a=>{a&&h(u=>u.map(R=>R.id===a?{...R,is_busy:!1}:R)),j.current=null,ie.current=null,a&&t==="general"&&st(a).then(u=>{A.current===a&&G(u.latex_paper??null)}).catch(()=>{}),J()},onProviderTerminal:()=>{ye.current==="openrouter"&&P.invalidateQueries({queryKey:Tr})},onPaperArtifact:a=>{t==="general"&&G(a.descriptor)},onInterrupted:a=>{Q(a),c==null||c(a.paperSelection)}}),oe=S.send;o.useEffect(()=>{S.capacityRequest&&(Q(S.capacityRequest.draft),c==null||c(S.capacityRequest.draft.paperSelection))},[S.capacityRequest,c]);const K=o.useCallback(a=>{sessionStorage.setItem(at,JSON.stringify(a)),sessionStorage.setItem(et,X),sessionStorage.setItem(wr,we),sessionStorage.setItem(tt,"1"),sessionStorage.setItem(rt,"1");const u=t==="paper"&&e?`/pdf/${e.routeId}`:A.current?`/chat/${A.current}`:"/chat";window.location.href=Xt(u,z==="huggingface")},[t,e,we,X,z]),te=o.useCallback((a,u)=>{sessionStorage.setItem(at,JSON.stringify(a)),sessionStorage.setItem(et,X),sessionStorage.removeItem(tt),sessionStorage.removeItem(rt),Ne(de()),Q(a),c==null||c(a.paperSelection),U(u)},[c,X]),ue=o.useCallback(async a=>{const u=c?i?{...a,paperSelection:i}:{text:a.text,paperMentions:a.paperMentions}:a;if(!x){K(u);return}if(z==="huggingface"&&!l.current){if(w.current)return;w.current=!0;try{if(!(await Ge.getInferenceBilling()).connected){if(sessionStorage.getItem(rt)==="1"){te(u,"Hugging Face inference authorization was not completed. Your prompt is ready to retry.");return}K(u);return}l.current=!0}catch(F){te(u,F instanceof Error?F.message:"Could not check Hugging Face authorization.");return}finally{w.current=!1}}const R=A.current??null;if(sessionStorage.removeItem(tt),!oe(u)){te(u,"Your prompt was not sent. It is ready to retry.");return}ie.current=R,j.current=R,sessionStorage.removeItem(at),sessionStorage.removeItem(et),sessionStorage.removeItem(rt),vr(),Q(de()),c==null||c(void 0),t==="paper"&&(p==null||p())},[K,t,c,p,i,te,z,oe,x]);o.useEffect(()=>{if(M||!x)return;const a=sessionStorage.getItem(et);a&&ee(a),J(),xr().then(F=>{if(fe(F.items),!A.current){const B=Le.current||a;ee(B&&F.items.some(ae=>ae.id===B)?B:F.default_model)}});const u=an(),R=sessionStorage.getItem(tt)==="1";u&&(c==null||c(u.paperSelection),R?Ne(u):Q(u))},[M,c,J,x]),o.useEffect(()=>{if(!_){se.current!==null&&!S.busy&&(se.current=null,S.reset(),Me(!1),Oe("low")),k(null),he(null),G(null);return}if(se.current===_||(he(null),k(u=>(u==null?void 0:u.id)===_&&u.status==="loading"?u:{id:_,status:"loading"}),M||!x))return;let a=!1;return U(""),st(_).then(u=>{var F,B;if(a)return;S.load(Lt(u),_,u.is_busy),G(u.latex_paper??null),ee(u.selected_model),Me(ne.current&&u.messages.length===0?ne.current.webSearchEnabled:u.web_search_enabled),Oe(ne.current&&u.messages.length===0?ne.current.reasoningEffort:u.reasoning_effort??"high"),_e(u.title);const R=(B=(F=[...u.messages].reverse().find(ae=>ae.role==="user"&&ae.viewer_context))==null?void 0:F.viewer_context)==null?void 0:B.page;he(R??null),se.current=_,k({id:_,status:"loaded"})}).catch(u=>{if(a)return;const R=u instanceof Error?u.message:"Chat not found";S.reset(),U(R),k({id:_,status:"error",error:R})}),()=>{a=!0}},[M,_,x,S.busy,je]),o.useEffect(()=>{var F;const a=(F=T.get("q"))==null?void 0:F.trim();if(!a)return;De.current=!1;const u=T.get("model");u&&ee(u),Ne(de(a));const R=new URLSearchParams(T);R.delete("q"),R.delete("model"),q(R,{replace:!0})},[T,q]),o.useEffect(()=>{if(M||S.busy||!me.text||De.current||x&&Te&&$.isFetching||_&&(O==null?void 0:O.status)!=="loaded")return;const a=window.setTimeout(()=>{if(De.current)return;De.current=!0,ue(me).finally(()=>Ne(de()))},0);return()=>window.clearTimeout(a)},[M,$.isFetching,S.busy,me,_,O==null?void 0:O.status,ue,x,Te]),o.useEffect(()=>{const a=()=>{!x||S.busy||J()};return window.addEventListener("focus",a),()=>window.removeEventListener("focus",a)},[S.busy,J,x]);const pe=()=>{j.current=null,S.reset(),Q(de()),c==null||c(void 0),Me(!1),Oe("low"),_e(""),t==="paper"?m==null||m():b("/chat")},Qe=async(a,u)=>{try{const R=await ct(a,{title:u});return y.current.add(a),a===_&&_e(R.title),h(F=>F.map(B=>B.id===a?R:B)),!0}catch(R){return U(R instanceof Error?R.message:"Rename failed"),!1}},Je=async a=>{const u=a===_&&S.busy;if(window.confirm(u?"Stop and delete this chat? This cannot be undone.":"Delete this chat? This cannot be undone.")){u&&S.stop();try{if(u){const R=Date.now()+3e3;for(;(await st(a)).is_busy;){if(Date.now()>=R)throw new Error("Generation is still stopping. The chat was not deleted.");await new Promise(B=>window.setTimeout(B,150))}}await Sr(a),a===_&&pe(),await J()}catch(R){U(R instanceof Error?R.message:"Delete failed")}}},Fe=Gr({messages:S.messages,refreshSessions:J,resetChat:S.reset,restoreDraft:Q,clearTitle:()=>_e("")}),Xe=async a=>{const u=X;if(ee(a),!!_)try{const R=await ct(_,{selected_model:a});h(F=>F.map(B=>B.id===_?{...B,selected_model:R.selected_model}:B)),U("")}catch(R){ee(u),U(R instanceof Error?R.message:"Model change failed")}},W=async a=>{const u=we;if(Oe(a),!!_)try{const R=await ct(_,{reasoning_effort:a});h(F=>F.map(B=>B.id===_?R:B))}catch(R){Oe(u),U(R instanceof Error?R.message:"Effort change failed")}},[re,ce]=o.useState(60);o.useLayoutEffect(()=>{const a=document.querySelector(".app-header");if(!a)return;const u=()=>ce(a.offsetHeight);u();const R=new ResizeObserver(u);return R.observe(a),()=>R.disconnect()},[]);const v=N.find(a=>a.id===_),ve=S.messages.length===0,Pe=(O==null?void 0:O.id)===_,Ue=!!(_&&(M||x&&(!Pe||(O==null?void 0:O.status)==="loading"))),Ze=Pe&&(O==null?void 0:O.status)==="error"?O.error:void 0,Yt=!!((ht=Ke.data)!=null&&ht.fallback_enabled),qt=c?i?{...be,paperSelection:i}:{text:be.text,paperMentions:be.paperMentions}:be,lt={onSend:ue,busy:S.busy,onStop:S.stop,draft:qt,onDraftChange:a=>{c?(Q({text:a.text,paperMentions:a.paperMentions}),a.paperSelection!==i&&c(a.paperSelection)):Q(a)},models:ge,selectedModel:X,onModelChange:a=>void Xe(a),disabled:L||M,describedBy:L?"chat-paused-description":void 0,paperMentionsEnabled:!!((mt=$.data)!=null&&mt.paper_mentions_enabled),paperSelectionEnabled:((gt=$.data)==null?void 0:gt.paper_reader_selection_enabled)===!0,paperArtifactsEnabled:t==="general"&&((yt=$.data)==null?void 0:yt.paper_artifacts_enabled)===!0,webSearchAvailable:ze,webSearchEnabled:Te,onWebSearchChange:Me,reasoningEffort:we,onReasoningEffortChange:a=>void W(a)};return s.jsx(on,{enabled:t==="general",workspaceKey:_??"new-chat",onAskAiFix:a=>{ue(de(a))},children:s.jsxs("div",{className:`chat-page${t==="paper"?" chat-page--reader":""}`,style:{height:t==="paper"?"100%":`calc(100dvh - ${re}px)`},children:[t==="general"&&s.jsx(Wr,{sessions:N,activeSessionId:_,loading:f,error:D,open:E,onClose:()=>g(!1),onNew:pe,onNavigate:a=>b(`/chat/${a}`),onRename:Qe,onDelete:a=>void Je(a)}),s.jsx(cn,{enabled:t==="general",children:s.jsxs("section",{className:"chat-main","data-testid":"active-chat-pane",children:[s.jsxs("div",{className:"chat-topbar",children:[t==="general"&&!E&&s.jsx("button",{type:"button",className:"icon-btn",onClick:()=>g(!0),title:"Open sidebar",children:s.jsx(Ct,{})}),t==="paper"&&s.jsx("button",{type:"button",className:"chat-reader-action",onClick:pe,children:"New chat"}),s.jsx("span",{className:"chat-topbar-title",children:Ue?(v==null?void 0:v.title)||"":it||(v==null?void 0:v.title)||(ve?"":"New chat")}),V&&s.jsx("span",{className:"chat-staging-badge",children:"Staging"}),t==="paper"&&s.jsx(bt,{className:"chat-reader-action",to:"/chat",children:"All chats"}),t==="general"&&(v==null?void 0:v.primary_paper)&&s.jsx(bt,{className:"chat-reader-action",to:`/pdf/${v.primary_paper.route_id}`,onClick:a=>{if(!$e()){a.preventDefault();return}const u=v.primary_paper.route_id;sessionStorage.setItem(`pwc:reader:session:${u}`,v.id),ke&&sessionStorage.setItem(`pwc:reader:page:${u}`,String(ke))},children:"Open reader"}),_&&Pe&&(O==null?void 0:O.status)==="loaded"&&!ve&&s.jsx(Vr,{sessionId:_,busy:S.busy,loading:Ue,hasPaperSelection:S.messages.some(a=>!!a.paperSelection),onError:U})]}),t==="general"&&H&&s.jsx($r,{descriptor:H}),Ue&&!me.text?s.jsxs("div",{className:"chat-session-loading",role:"status","aria-live":"polite",children:[s.jsx(jt,{}),s.jsx("span",{children:"Loading conversation…"})]}):Ze?s.jsxs("div",{className:"chat-session-load-error",role:"alert",children:[s.jsx("p",{children:Ze}),s.jsx("button",{type:"button",onClick:()=>{k({id:_,status:"loading"}),Be(a=>a+1)},children:"Try again"})]}):ve&&!me.text?s.jsx("div",{className:"chat-empty",children:s.jsxs("div",{className:"chat-empty-inner",children:[s.jsx("div",{className:"chat-empty-eyebrow",children:t==="paper"?"Paper chat":"Research chat"}),s.jsx("h1",{className:"chat-empty-title",children:t==="paper"?"Ask about this paper":s.jsxs(s.Fragment,{children:["Ask ",s.jsx("em",{children:"Papers With Code"})]})}),s.jsx("p",{className:"chat-empty-sub",children:t==="paper"?"Questions are grounded in the open paper. Add up to three other papers with @.":"Answers are grounded in a live hybrid search over papers, tasks, and benchmarks — with citations you can follow."}),V&&s.jsx("p",{className:"chat-staging-access-note",children:"This is a limited staging preview. Only approved Hugging Face users can start chats."}),s.jsx(Ot,{variant:"empty",composerProps:lt,provider:z,paused:L,suggestions:t==="paper"?sn:Er})]})}):s.jsxs(s.Fragment,{children:[S.sessionError&&s.jsx("div",{className:"chat-session-error",role:"alert",children:S.sessionError}),s.jsx(qr,{messages:S.messages,papers:S.papers,busy:S.busy,queuedDraft:me.text?me:void 0,paperMentionsEnabled:!!((_t=$.data)!=null&&_t.paper_mentions_enabled),archivePending:Fe.pending,openRouterFallbackEnabled:Yt,onToggleBlock:S.toggleBlock,onEditAndResend:S.editAndResend,onArchiveOld:()=>void Fe.archiveOld(),onArchiveOldest:()=>void Fe.archiveOldest()}),s.jsx(Ot,{variant:"followup",composerProps:lt,provider:z,paused:L})]})]})}),S.capacityRequest&&s.jsx(Br,{retryAt:S.capacityRequest.retryAt,onCancel:S.cancelCapacity,onRetry:()=>{S.retryCapacity()&&(Q(de()),c==null||c(void 0))}}),S.disabledRequest&&s.jsx(Ur,{onClose:()=>{var u;const a=((u=S.disabledRequest)==null?void 0:u.draft)??be;Q(a),c==null||c(a.paperSelection),S.dismissDisabled(),$.refetch()}})]})})},In=()=>s.jsx(ln,{});export{Br as ChatCapacityDialog,ln as ChatExperience,In as default}; diff --git a/assets/ConferenceDetailView-U1eFBlMo.js b/assets/ConferenceDetailView-IlZriJt1.js similarity index 93% rename from assets/ConferenceDetailView-U1eFBlMo.js rename to assets/ConferenceDetailView-IlZriJt1.js index 752290ee9471733077963eba6f5eb7b3b113dcd2..1473459decb83c5e3c12f730902b2d8cb095b70d 100644 --- a/assets/ConferenceDetailView-U1eFBlMo.js +++ b/assets/ConferenceDetailView-IlZriJt1.js @@ -1 +1 @@ -import{c as L,r as D,j as e,L as p}from"./index-Cry0GNHI.js";import{u as T}from"./useQuery-DlAfMYOD.js";import{M as F}from"./MarkdownText-CzUmjuOY.js";import{c as A}from"./catalog-BjZE6R9z.js";import{c as B,h as C,d as E}from"./transform-b6MI1iSQ.js";import{S as f}from"./skeleton-LwsL9heH.js";import{A as P,a as z}from"./alert-BAHZ4i9D.js";import{s as M}from"./safeExternalHref-CkBrsh84.js";import"./katex.min-BSBacQyE.js";import"./PaperPreviewLink-CPKVU1Zw.js";import"./index-D7CE3jjK.js";import"./hover-card-CbDqfS2l.js";import"./papers-CrgFFrmi.js";const R=a=>(a==null?void 0:a.trim().toLowerCase().replace(/[\s_]+/g,"-"))??"",O=(a,t)=>{if(!a)return null;const i=new Date(`${a}T00:00:00`),s=t?new Date(`${t}T00:00:00`):null,c=g=>g.toLocaleDateString("en-US",{month:"long",day:"numeric"}),m=i.getFullYear();return s&&s.getTime()!==i.getTime()?i.getMonth()===s.getMonth()?`${c(i).replace(/\d+$/,"").trim()} ${i.getDate()}–${s.getDate()}, ${m}`:`${c(i)} – ${c(s)}, ${m}`:`${c(i)}, ${m}`},ee=()=>{var k,S,b,_,$,w;const{confSlug:a}=L(),t=T({queryKey:["conference-areas-with-tasks",a],queryFn:()=>A.conferenceAreasWithTasks(a),enabled:!!a,staleTime:10*60*1e3}),i=D.useMemo(()=>{if(!t.data)return[];const n={general:0,vision:1,video:2,language:3,audio:4,other:5},r=o=>n[R(o)]??999;return[...t.data.results].sort((o,l)=>{const d=r(o.name),x=r(l.name);return d!==x?d-x:o.name.localeCompare(l.name)})},[t.data]),s=(k=t.data)==null?void 0:k.conference,c=((S=t.data)==null?void 0:S.total_paper_count)??0,m=((b=t.data)==null?void 0:b.oral_paper_count)??0,g=((_=t.data)==null?void 0:_.spotlight_paper_count)??0,u=(($=t.data)==null?void 0:$.outstanding_paper_count)??0,j=((w=t.data)==null?void 0:w.best_paper_finalist_paper_count)??0,v=i.reduce((n,r)=>n+r.tasks.length,0);if(t.error)return e.jsx("div",{className:"page",children:e.jsx(P,{variant:"destructive",children:e.jsx(z,{children:"Failed to load conference. Please try again."})})});const y=s?O(s.start_date,s.end_date):null,N=s?[s.venue,s.location].filter(Boolean).join(", "):null,h=s==null?void 0:s.name;return e.jsxs("div",{className:"page",children:[e.jsxs("div",{className:s!=null&&s.image_url?"task-hero-grid":void 0,children:[e.jsxs("div",{children:[e.jsx("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--accent-text)",letterSpacing:"0.1em",marginBottom:8},children:"CONFERENCE"}),e.jsx("h1",{className:"feed-title",children:h??e.jsx(f,{className:"h-10 w-64 inline-block"})}),e.jsxs("div",{className:"feed-subtitle",style:{display:"flex",flexDirection:"column",gap:4},children:[y&&e.jsx("span",{children:y}),N&&e.jsx("span",{children:N}),(s==null?void 0:s.url)&&e.jsx("a",{href:M(s.url)??void 0,target:"_blank",rel:"noopener noreferrer",style:{color:"var(--accent-text)"},children:s.url.replace(/^https?:\/\//,"")}),(s==null?void 0:s.hf_url)&&e.jsxs("a",{className:"bm-action-btn",href:s.hf_url,target:"_blank",rel:"noopener noreferrer",style:{alignSelf:"flex-start",marginTop:4},children:[e.jsx("span",{"aria-hidden":"true",children:"🤗"})," View on Hugging Face"]})]}),(s==null?void 0:s.description)&&e.jsx(F,{className:"method-description",text:s.description})]}),(s==null?void 0:s.image_url)&&e.jsxs("figure",{className:"task-figure-card",children:[e.jsx("div",{className:"task-figure-img-wrap",children:e.jsx("img",{className:"task-figure-img",src:s.image_url,alt:h?`${h} visual`:"Conference visual",onError:n=>{var r,o;(o=(r=n.currentTarget.parentElement)==null?void 0:r.parentElement)==null||o.style.setProperty("display","none")}})}),e.jsxs("figcaption",{children:["Figure · ",h??"Conference",s.image_credit&&e.jsxs(e.Fragment,{children:[e.jsx("br",{}),e.jsx(F,{className:"task-image-credit",text:s.image_credit})]})]})]})]}),!t.isLoading&&c>0&&e.jsxs("section",{style:{marginTop:48,marginBottom:48},children:[e.jsxs("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:24,paddingBottom:12,borderBottom:"1px solid var(--hairline-strong)"},children:[e.jsxs("div",{children:[e.jsx("h2",{style:{fontFamily:"var(--serif)",fontSize:26,fontWeight:500,letterSpacing:"-0.02em",marginBottom:4},children:"Browse papers"}),e.jsx("div",{style:{fontFamily:"var(--serif)",fontStyle:"italic",fontSize:13,color:"var(--ink-soft)"},children:"All accepted papers, plus oral, spotlight, outstanding, and best paper finalists."})]}),e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",whiteSpace:"nowrap"},children:[c.toLocaleString()," papers"]})]}),e.jsxs("div",{className:"tag-grid",children:[e.jsxs(p,{to:`/conferences/${a}/all`,className:"tag-cell",children:[e.jsxs("div",{className:"name",children:[e.jsx("span",{className:"dot",style:{background:"var(--accent)"}}),"All papers"]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[c.toLocaleString()," papers"]})})]}),m>0&&e.jsxs(p,{to:`/conferences/${a}/oral`,className:"tag-cell",children:[e.jsxs("div",{className:"name",children:[e.jsx("span",{className:"dot",style:{background:"#fdbb02"}}),"Oral papers"]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[m.toLocaleString()," papers"]})})]}),g>0&&e.jsxs(p,{to:`/conferences/${a}/spotlight`,className:"tag-cell",children:[e.jsxs("div",{className:"name",children:[e.jsx("span",{className:"dot",style:{background:"#fdbb02"}}),"Spotlight papers"]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[g.toLocaleString()," papers"]})})]}),u>0&&e.jsxs(p,{to:`/conferences/${a}/outstanding`,className:"tag-cell",children:[e.jsxs("div",{className:"name",children:[e.jsx("span",{className:"dot",style:{background:"#c45c26"}}),"Outstanding papers"]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[u.toLocaleString()," papers"]})})]}),j>0&&e.jsxs(p,{to:`/conferences/${a}/best-paper-finalists`,className:"tag-cell",children:[e.jsxs("div",{className:"name",children:[e.jsx("span",{className:"dot",style:{background:"#c9a227"}}),"Best paper finalists"]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[j.toLocaleString()," papers"]})})]})]})]}),t.isLoading?e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:32},children:Array.from({length:4}).map((n,r)=>e.jsxs("div",{children:[e.jsx(f,{className:"h-8 w-1/3 mb-4"}),e.jsx("div",{className:"tag-grid",children:Array.from({length:6}).map((o,l)=>e.jsx(f,{className:"h-24"},l))})]},r))}):i.map(n=>{const r=n.tasks;if(r.length===0)return null;const o=r.reduce((l,d)=>l+(d.paper_count||0),0);return e.jsxs("section",{style:{marginBottom:48},children:[e.jsxs("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:24,paddingBottom:12,borderBottom:"1px solid var(--hairline-strong)"},children:[e.jsxs("div",{children:[e.jsx("h2",{style:{fontFamily:"var(--serif)",fontSize:26,fontWeight:500,letterSpacing:"-0.02em",marginBottom:4},children:n.name}),n.description&&e.jsx("div",{style:{fontFamily:"var(--serif)",fontStyle:"italic",fontSize:13,color:"var(--ink-soft)"},children:n.description})]}),e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",whiteSpace:"nowrap"},children:[r.length," ",r.length===1?"task":"tasks"," · ",o.toLocaleString()," papers"]})]}),e.jsx("div",{className:"tag-grid",children:r.map(l=>{const d=l.slug||"",x=B(C(d));return e.jsxs(p,{to:`/conferences/${a}/${d}`,className:"tag-cell",children:[e.jsxs("div",{className:"name",children:[e.jsx("span",{className:"dot",style:{background:x.dot}}),E(l.name,d)]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[(l.paper_count??0).toLocaleString()," papers"]})})]},l.id)})})]},n.id)}),v>0&&e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",marginTop:24},children:[v," tasks across ",i.filter(n=>n.tasks.length>0).length," areas."]})]})};export{ee as default}; +import{c as L,r as D,j as e,L as p}from"./index-Dt001B3A.js";import{u as T}from"./useQuery-DD4hUA6p.js";import{M as F}from"./MarkdownText-DeuWKnsZ.js";import{c as A}from"./catalog-BOpSeTzm.js";import{c as B,h as C,d as E}from"./transform-DgCWw6nP.js";import{S as f}from"./skeleton-DkhIJUB4.js";import{A as P,a as z}from"./alert-Xa-AqUL5.js";import{s as M}from"./safeExternalHref-CkBrsh84.js";import"./katex.min-BSBacQyE.js";import"./PaperPreviewLink-CCwg7dvd.js";import"./index-Byizcq9V.js";import"./hover-card-C7JmPdFo.js";import"./papers-KXkGPHI5.js";const R=a=>(a==null?void 0:a.trim().toLowerCase().replace(/[\s_]+/g,"-"))??"",O=(a,t)=>{if(!a)return null;const i=new Date(`${a}T00:00:00`),s=t?new Date(`${t}T00:00:00`):null,c=g=>g.toLocaleDateString("en-US",{month:"long",day:"numeric"}),m=i.getFullYear();return s&&s.getTime()!==i.getTime()?i.getMonth()===s.getMonth()?`${c(i).replace(/\d+$/,"").trim()} ${i.getDate()}–${s.getDate()}, ${m}`:`${c(i)} – ${c(s)}, ${m}`:`${c(i)}, ${m}`},ee=()=>{var k,S,b,_,$,w;const{confSlug:a}=L(),t=T({queryKey:["conference-areas-with-tasks",a],queryFn:()=>A.conferenceAreasWithTasks(a),enabled:!!a,staleTime:10*60*1e3}),i=D.useMemo(()=>{if(!t.data)return[];const n={general:0,vision:1,video:2,language:3,audio:4,other:5},r=o=>n[R(o)]??999;return[...t.data.results].sort((o,l)=>{const d=r(o.name),x=r(l.name);return d!==x?d-x:o.name.localeCompare(l.name)})},[t.data]),s=(k=t.data)==null?void 0:k.conference,c=((S=t.data)==null?void 0:S.total_paper_count)??0,m=((b=t.data)==null?void 0:b.oral_paper_count)??0,g=((_=t.data)==null?void 0:_.spotlight_paper_count)??0,u=(($=t.data)==null?void 0:$.outstanding_paper_count)??0,j=((w=t.data)==null?void 0:w.best_paper_finalist_paper_count)??0,v=i.reduce((n,r)=>n+r.tasks.length,0);if(t.error)return e.jsx("div",{className:"page",children:e.jsx(P,{variant:"destructive",children:e.jsx(z,{children:"Failed to load conference. Please try again."})})});const y=s?O(s.start_date,s.end_date):null,N=s?[s.venue,s.location].filter(Boolean).join(", "):null,h=s==null?void 0:s.name;return e.jsxs("div",{className:"page",children:[e.jsxs("div",{className:s!=null&&s.image_url?"task-hero-grid":void 0,children:[e.jsxs("div",{children:[e.jsx("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--accent-text)",letterSpacing:"0.1em",marginBottom:8},children:"CONFERENCE"}),e.jsx("h1",{className:"feed-title",children:h??e.jsx(f,{className:"h-10 w-64 inline-block"})}),e.jsxs("div",{className:"feed-subtitle",style:{display:"flex",flexDirection:"column",gap:4},children:[y&&e.jsx("span",{children:y}),N&&e.jsx("span",{children:N}),(s==null?void 0:s.url)&&e.jsx("a",{href:M(s.url)??void 0,target:"_blank",rel:"noopener noreferrer",style:{color:"var(--accent-text)"},children:s.url.replace(/^https?:\/\//,"")}),(s==null?void 0:s.hf_url)&&e.jsxs("a",{className:"bm-action-btn",href:s.hf_url,target:"_blank",rel:"noopener noreferrer",style:{alignSelf:"flex-start",marginTop:4},children:[e.jsx("span",{"aria-hidden":"true",children:"🤗"})," View on Hugging Face"]})]}),(s==null?void 0:s.description)&&e.jsx(F,{className:"method-description",text:s.description})]}),(s==null?void 0:s.image_url)&&e.jsxs("figure",{className:"task-figure-card",children:[e.jsx("div",{className:"task-figure-img-wrap",children:e.jsx("img",{className:"task-figure-img",src:s.image_url,alt:h?`${h} visual`:"Conference visual",onError:n=>{var r,o;(o=(r=n.currentTarget.parentElement)==null?void 0:r.parentElement)==null||o.style.setProperty("display","none")}})}),e.jsxs("figcaption",{children:["Figure · ",h??"Conference",s.image_credit&&e.jsxs(e.Fragment,{children:[e.jsx("br",{}),e.jsx(F,{className:"task-image-credit",text:s.image_credit})]})]})]})]}),!t.isLoading&&c>0&&e.jsxs("section",{style:{marginTop:48,marginBottom:48},children:[e.jsxs("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:24,paddingBottom:12,borderBottom:"1px solid var(--hairline-strong)"},children:[e.jsxs("div",{children:[e.jsx("h2",{style:{fontFamily:"var(--serif)",fontSize:26,fontWeight:500,letterSpacing:"-0.02em",marginBottom:4},children:"Browse papers"}),e.jsx("div",{style:{fontFamily:"var(--serif)",fontStyle:"italic",fontSize:13,color:"var(--ink-soft)"},children:"All accepted papers, plus oral, spotlight, outstanding, and best paper finalists."})]}),e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",whiteSpace:"nowrap"},children:[c.toLocaleString()," papers"]})]}),e.jsxs("div",{className:"tag-grid",children:[e.jsxs(p,{to:`/conferences/${a}/all`,className:"tag-cell",children:[e.jsxs("div",{className:"name",children:[e.jsx("span",{className:"dot",style:{background:"var(--accent)"}}),"All papers"]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[c.toLocaleString()," papers"]})})]}),m>0&&e.jsxs(p,{to:`/conferences/${a}/oral`,className:"tag-cell",children:[e.jsxs("div",{className:"name",children:[e.jsx("span",{className:"dot",style:{background:"#fdbb02"}}),"Oral papers"]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[m.toLocaleString()," papers"]})})]}),g>0&&e.jsxs(p,{to:`/conferences/${a}/spotlight`,className:"tag-cell",children:[e.jsxs("div",{className:"name",children:[e.jsx("span",{className:"dot",style:{background:"#fdbb02"}}),"Spotlight papers"]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[g.toLocaleString()," papers"]})})]}),u>0&&e.jsxs(p,{to:`/conferences/${a}/outstanding`,className:"tag-cell",children:[e.jsxs("div",{className:"name",children:[e.jsx("span",{className:"dot",style:{background:"#c45c26"}}),"Outstanding papers"]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[u.toLocaleString()," papers"]})})]}),j>0&&e.jsxs(p,{to:`/conferences/${a}/best-paper-finalists`,className:"tag-cell",children:[e.jsxs("div",{className:"name",children:[e.jsx("span",{className:"dot",style:{background:"#c9a227"}}),"Best paper finalists"]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[j.toLocaleString()," papers"]})})]})]})]}),t.isLoading?e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:32},children:Array.from({length:4}).map((n,r)=>e.jsxs("div",{children:[e.jsx(f,{className:"h-8 w-1/3 mb-4"}),e.jsx("div",{className:"tag-grid",children:Array.from({length:6}).map((o,l)=>e.jsx(f,{className:"h-24"},l))})]},r))}):i.map(n=>{const r=n.tasks;if(r.length===0)return null;const o=r.reduce((l,d)=>l+(d.paper_count||0),0);return e.jsxs("section",{style:{marginBottom:48},children:[e.jsxs("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:24,paddingBottom:12,borderBottom:"1px solid var(--hairline-strong)"},children:[e.jsxs("div",{children:[e.jsx("h2",{style:{fontFamily:"var(--serif)",fontSize:26,fontWeight:500,letterSpacing:"-0.02em",marginBottom:4},children:n.name}),n.description&&e.jsx("div",{style:{fontFamily:"var(--serif)",fontStyle:"italic",fontSize:13,color:"var(--ink-soft)"},children:n.description})]}),e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",whiteSpace:"nowrap"},children:[r.length," ",r.length===1?"task":"tasks"," · ",o.toLocaleString()," papers"]})]}),e.jsx("div",{className:"tag-grid",children:r.map(l=>{const d=l.slug||"",x=B(C(d));return e.jsxs(p,{to:`/conferences/${a}/${d}`,className:"tag-cell",children:[e.jsxs("div",{className:"name",children:[e.jsx("span",{className:"dot",style:{background:x.dot}}),E(l.name,d)]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[(l.paper_count??0).toLocaleString()," papers"]})})]},l.id)})})]},n.id)}),v>0&&e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",marginTop:24},children:[v," tasks across ",i.filter(n=>n.tasks.length>0).length," areas."]})]})};export{ee as default}; diff --git a/assets/ConferenceTaskView-Co8AdVvk.js b/assets/ConferenceTaskView-DUu-DomW.js similarity index 88% rename from assets/ConferenceTaskView-Co8AdVvk.js rename to assets/ConferenceTaskView-DUu-DomW.js index 5b9a9108c2923d8369f09b11b344f633e92ca316..22f7b881e2a74ea00d7b38cdd983007576298262 100644 --- a/assets/ConferenceTaskView-Co8AdVvk.js +++ b/assets/ConferenceTaskView-DUu-DomW.js @@ -1 +1 @@ -import{c as $,a as W,r as P,j as e,L as y,z as G}from"./index-Cry0GNHI.js";import{u as M}from"./useQuery-DlAfMYOD.js";import{P as J}from"./components-IPCTDA4d.js";import{r as X,u as Y,P as Z,a as ee,w as se}from"./paperDateRange-DQDDTCHP.js";import{M as h}from"./MarkdownText-CzUmjuOY.js";import{c as z}from"./catalog-BjZE6R9z.js";import{t as ae,d as te}from"./transform-b6MI1iSQ.js";import{d as re}from"./usePapers-B86z4_CJ.js";import{S as ne}from"./skeleton-LwsL9heH.js";import{A as ie,a as oe}from"./alert-BAHZ4i9D.js";import"./LatexTitle-CLc_16Sj.js";import"./katex.min-BSBacQyE.js";import"./papers-CrgFFrmi.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-C_By4VBc.js";import"./PaperPreviewLink-CPKVU1Zw.js";import"./index-D7CE3jjK.js";import"./hover-card-CbDqfS2l.js";import"./useInfiniteQuery-C8Q6ynv2.js";const ce=[["trending","trending"],["date_published","newest"],["citation_count","most cited"]],le=t=>t==="trending"||t==="date_published"||t==="citation_count"?t:"trending",Ce=()=>{var A,L,O,T,B,D;const{confSlug:t,taskSlug:n}=$(),[o,u]=W(),w=le(o.get("order_by")),S=o.get("has_code")==="true",k=o.get("has_hf_artifacts")==="true",x=X(o),I=a=>{const s=new URLSearchParams(o);s.set("order_by",a),u(s)},q=a=>{const s=new URLSearchParams(o);a?s.set("has_code","true"):s.delete("has_code"),u(s)},Q=a=>{const s=new URLSearchParams(o);a?s.set("has_hf_artifacts","true"):s.delete("has_hf_artifacts"),u(s)},R=n==="all",N=n==="oral",_=n==="spotlight",l=n==="outstanding",d=n==="best-paper-finalists",f=l||d,p=R||N||_||l||d,K=p?void 0:n,U=N?"oral":_?"spotlight":l?"outstanding":d?"best_paper_finalist":void 0,m=M({queryKey:["conference",t],queryFn:()=>z.getConference(t),enabled:!!t,staleTime:10*60*1e3}),j=M({queryKey:["task",n],queryFn:()=>z.getTask(n),enabled:!!n&&!p,staleTime:10*60*1e3}),i=re({conferenceSlug:t||"",taskSlug:K,presentation:U,page_size:12,order_by:w,order_dir:"desc",include_resources:!0,has_code:S,has_hf_artifacts:k,start_date:x.startDate,end_date:x.endDate,enabled:!!t}),{targetRef:V,isIntersecting:C}=Y({rootMargin:"200px"});P.useEffect(()=>{C&&i.hasNextPage&&!i.isFetchingNextPage&&i.fetchNextPage()},[C,i.hasNextPage,i.isFetchingNextPage]),P.useEffect(()=>{window.scrollTo(0,0)},[t,n]);const v=P.useMemo(()=>{var s;return(((s=i.data)==null?void 0:s.pages)??[]).flatMap(c=>c.results)},[i.data]),b=P.useMemo(()=>v.map(ae),[v]),g=R?"All papers":N?"Oral papers":_?"Spotlight papers":l?"Outstanding papers":d?"Best paper finalists":te(((A=j.data)==null?void 0:A.name)||n||"",((L=j.data)==null?void 0:L.slug)||n),F=((T=(O=i.data)==null?void 0:O.pages[0])==null?void 0:T.count)??((B=m.data)==null?void 0:B.paper_count)??0,r=j.data;return m.error||j.error||i.error?e.jsx("div",{className:"page",children:e.jsx(ie,{variant:"destructive",children:e.jsx(oe,{children:"Failed to load conference papers. Please try again."})})}):e.jsxs("div",{className:"page",children:[e.jsxs("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:[e.jsx(y,{to:"/",children:"Home"}),e.jsx("span",{children:" / "}),e.jsx(y,{to:"/conferences",children:"Conferences"}),e.jsx("span",{children:" / "}),e.jsx(y,{to:`/conferences/${t}`,children:((D=m.data)==null?void 0:D.name)??t}),e.jsx("span",{children:" / "}),e.jsx("span",{children:g})]}),e.jsxs("div",{className:!p&&(r!=null&&r.image_url)?"task-hero-grid":void 0,style:{marginTop:16,marginBottom:28},children:[e.jsxs("div",{children:[e.jsx("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--accent-text)",letterSpacing:"0.1em",marginBottom:8},children:p?"BROWSE PAPERS":"TASK"}),e.jsx("h1",{className:"domain-mega-title",children:g}),l&&t==="iclr-2026"&&e.jsx(h,{className:"task-explainer",text:"ICLR 2026 recognized two Outstanding Papers and one Honorable Mention. [Read the announcement](https://blog.iclr.cc/2026/04/23/announcing-the-iclr-2026-outstanding-papers/)."}),l&&t==="icml-2026"&&e.jsx(h,{className:"task-explainer",text:"ICML 2026 recognized two Outstanding Papers and five Honorable Mentions. [Read the announcement](https://blog.icml.cc/2026/07/05/announcing-the-icml-2026-awards/)."}),d&&t==="cvpr-2026"&&e.jsx(h,{className:"task-explainer",text:"CVPR 2026 recognized fifteen Best Paper Award finalists, including the winners. [Read the announcement](https://x.com/CVPR/status/2062912519522717978)."}),!p&&(r==null?void 0:r.description)&&e.jsx(h,{className:"task-explainer",text:r.description}),m.data&&e.jsxs("div",{className:"task-quickstats",style:{marginTop:12},children:[e.jsxs("span",{children:[e.jsx("span",{className:"num",children:F.toLocaleString()}),"PAPERS"]}),e.jsx("span",{children:m.data.name})]})]}),!p&&(r==null?void 0:r.image_url)&&e.jsxs("figure",{className:"task-figure-card",children:[e.jsx("div",{className:"task-figure-img-wrap",children:e.jsx("img",{className:"task-figure-img",src:r.image_url,alt:`${g} schematic`,onError:a=>{var s,c;(c=(s=a.currentTarget.parentElement)==null?void 0:s.parentElement)==null||c.style.setProperty("display","none")}})}),e.jsxs("figcaption",{children:["Figure · ",g,r.image_credit&&e.jsxs(e.Fragment,{children:[e.jsx("br",{}),e.jsx(h,{className:"task-image-credit",text:r.image_credit})]})]})]})]}),e.jsxs("div",{className:"task-section-head",children:[e.jsx("div",{className:"task-section-eyebrow",children:f?"Award papers":"Conference papers · sort below"}),e.jsxs("div",{className:"task-section-title",children:["Papers ",e.jsxs("span",{className:"meta",children:["[",F.toLocaleString(),"]"]})]})]}),e.jsxs("div",{className:"sort-bar",children:[e.jsxs("div",{className:"paper-feed-toolbar-controls",children:[!f&&e.jsx("div",{className:"sort-options",children:ce.map(([a,s])=>e.jsx("button",{className:`sort-btn ${w===a?"active":""}`,onClick:()=>I(a),children:s},a))}),e.jsx(Z,{hasCode:S,hasHfArtifacts:k,onHasCodeChange:q,onHasHfArtifactsChange:Q,showDivider:!f})]}),e.jsx(ee,{startDate:x.startDate,endDate:x.endDate,onChange:a=>u(se(o,a))}),!f&&e.jsxs("div",{className:"results-count",children:[b.length," loaded in ",e.jsx("span",{children:g})]})]}),i.isLoading?e.jsx("div",{className:"paper-list",children:Array.from({length:4}).map((a,s)=>e.jsx(ne,{className:"h-40 w-full"},s))}):b.length===0?e.jsx("div",{className:"no-results",children:"No papers found for this selection."}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"paper-list",children:b.map((a,s)=>{var E;const c=(E=v[s])==null?void 0:E.conference_award,H=c==="outstanding"?"Outstanding Paper":c==="honorable_mention"?"Honorable Mention":c==="best_paper_finalist"&&!d?"Best Paper Finalist":null;return e.jsxs(G.Fragment,{children:[H&&e.jsx("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--accent-text)",letterSpacing:"0.08em",marginBottom:8},children:H}),e.jsx(J,{paper:a,rank:s+1})]},a.id)})}),e.jsx("div",{ref:V,style:{height:1}}),i.isFetchingNextPage&&e.jsx("div",{style:{padding:"20px 0",textAlign:"center",color:"var(--ink-faint)"},children:"Loading more…"})]})]})};export{Ce as default}; +import{c as $,a as W,r as P,j as e,L as y,z as G}from"./index-Dt001B3A.js";import{u as M}from"./useQuery-DD4hUA6p.js";import{P as J}from"./components-DMT1vhIy.js";import{r as X,u as Y,P as Z,a as ee,w as se}from"./paperDateRange-BJ29xsSE.js";import{M as h}from"./MarkdownText-DeuWKnsZ.js";import{c as z}from"./catalog-BOpSeTzm.js";import{t as ae,d as te}from"./transform-DgCWw6nP.js";import{d as re}from"./usePapers-qkM3n2JN.js";import{S as ne}from"./skeleton-DkhIJUB4.js";import{A as ie,a as oe}from"./alert-Xa-AqUL5.js";import"./LatexTitle-B651zAGR.js";import"./katex.min-BSBacQyE.js";import"./papers-KXkGPHI5.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-DDOhCeb4.js";import"./PaperPreviewLink-CCwg7dvd.js";import"./index-Byizcq9V.js";import"./hover-card-C7JmPdFo.js";import"./useInfiniteQuery-CgAOxB5d.js";const ce=[["trending","trending"],["date_published","newest"],["citation_count","most cited"]],le=t=>t==="trending"||t==="date_published"||t==="citation_count"?t:"trending",Ce=()=>{var A,L,O,T,B,D;const{confSlug:t,taskSlug:n}=$(),[o,u]=W(),w=le(o.get("order_by")),S=o.get("has_code")==="true",k=o.get("has_hf_artifacts")==="true",x=X(o),I=a=>{const s=new URLSearchParams(o);s.set("order_by",a),u(s)},q=a=>{const s=new URLSearchParams(o);a?s.set("has_code","true"):s.delete("has_code"),u(s)},Q=a=>{const s=new URLSearchParams(o);a?s.set("has_hf_artifacts","true"):s.delete("has_hf_artifacts"),u(s)},R=n==="all",N=n==="oral",_=n==="spotlight",l=n==="outstanding",d=n==="best-paper-finalists",f=l||d,p=R||N||_||l||d,K=p?void 0:n,U=N?"oral":_?"spotlight":l?"outstanding":d?"best_paper_finalist":void 0,m=M({queryKey:["conference",t],queryFn:()=>z.getConference(t),enabled:!!t,staleTime:10*60*1e3}),j=M({queryKey:["task",n],queryFn:()=>z.getTask(n),enabled:!!n&&!p,staleTime:10*60*1e3}),i=re({conferenceSlug:t||"",taskSlug:K,presentation:U,page_size:12,order_by:w,order_dir:"desc",include_resources:!0,has_code:S,has_hf_artifacts:k,start_date:x.startDate,end_date:x.endDate,enabled:!!t}),{targetRef:V,isIntersecting:C}=Y({rootMargin:"200px"});P.useEffect(()=>{C&&i.hasNextPage&&!i.isFetchingNextPage&&i.fetchNextPage()},[C,i.hasNextPage,i.isFetchingNextPage]),P.useEffect(()=>{window.scrollTo(0,0)},[t,n]);const v=P.useMemo(()=>{var s;return(((s=i.data)==null?void 0:s.pages)??[]).flatMap(c=>c.results)},[i.data]),b=P.useMemo(()=>v.map(ae),[v]),g=R?"All papers":N?"Oral papers":_?"Spotlight papers":l?"Outstanding papers":d?"Best paper finalists":te(((A=j.data)==null?void 0:A.name)||n||"",((L=j.data)==null?void 0:L.slug)||n),F=((T=(O=i.data)==null?void 0:O.pages[0])==null?void 0:T.count)??((B=m.data)==null?void 0:B.paper_count)??0,r=j.data;return m.error||j.error||i.error?e.jsx("div",{className:"page",children:e.jsx(ie,{variant:"destructive",children:e.jsx(oe,{children:"Failed to load conference papers. Please try again."})})}):e.jsxs("div",{className:"page",children:[e.jsxs("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:[e.jsx(y,{to:"/",children:"Home"}),e.jsx("span",{children:" / "}),e.jsx(y,{to:"/conferences",children:"Conferences"}),e.jsx("span",{children:" / "}),e.jsx(y,{to:`/conferences/${t}`,children:((D=m.data)==null?void 0:D.name)??t}),e.jsx("span",{children:" / "}),e.jsx("span",{children:g})]}),e.jsxs("div",{className:!p&&(r!=null&&r.image_url)?"task-hero-grid":void 0,style:{marginTop:16,marginBottom:28},children:[e.jsxs("div",{children:[e.jsx("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--accent-text)",letterSpacing:"0.1em",marginBottom:8},children:p?"BROWSE PAPERS":"TASK"}),e.jsx("h1",{className:"domain-mega-title",children:g}),l&&t==="iclr-2026"&&e.jsx(h,{className:"task-explainer",text:"ICLR 2026 recognized two Outstanding Papers and one Honorable Mention. [Read the announcement](https://blog.iclr.cc/2026/04/23/announcing-the-iclr-2026-outstanding-papers/)."}),l&&t==="icml-2026"&&e.jsx(h,{className:"task-explainer",text:"ICML 2026 recognized two Outstanding Papers and five Honorable Mentions. [Read the announcement](https://blog.icml.cc/2026/07/05/announcing-the-icml-2026-awards/)."}),d&&t==="cvpr-2026"&&e.jsx(h,{className:"task-explainer",text:"CVPR 2026 recognized fifteen Best Paper Award finalists, including the winners. [Read the announcement](https://x.com/CVPR/status/2062912519522717978)."}),!p&&(r==null?void 0:r.description)&&e.jsx(h,{className:"task-explainer",text:r.description}),m.data&&e.jsxs("div",{className:"task-quickstats",style:{marginTop:12},children:[e.jsxs("span",{children:[e.jsx("span",{className:"num",children:F.toLocaleString()}),"PAPERS"]}),e.jsx("span",{children:m.data.name})]})]}),!p&&(r==null?void 0:r.image_url)&&e.jsxs("figure",{className:"task-figure-card",children:[e.jsx("div",{className:"task-figure-img-wrap",children:e.jsx("img",{className:"task-figure-img",src:r.image_url,alt:`${g} schematic`,onError:a=>{var s,c;(c=(s=a.currentTarget.parentElement)==null?void 0:s.parentElement)==null||c.style.setProperty("display","none")}})}),e.jsxs("figcaption",{children:["Figure · ",g,r.image_credit&&e.jsxs(e.Fragment,{children:[e.jsx("br",{}),e.jsx(h,{className:"task-image-credit",text:r.image_credit})]})]})]})]}),e.jsxs("div",{className:"task-section-head",children:[e.jsx("div",{className:"task-section-eyebrow",children:f?"Award papers":"Conference papers · sort below"}),e.jsxs("div",{className:"task-section-title",children:["Papers ",e.jsxs("span",{className:"meta",children:["[",F.toLocaleString(),"]"]})]})]}),e.jsxs("div",{className:"sort-bar",children:[e.jsxs("div",{className:"paper-feed-toolbar-controls",children:[!f&&e.jsx("div",{className:"sort-options",children:ce.map(([a,s])=>e.jsx("button",{className:`sort-btn ${w===a?"active":""}`,onClick:()=>I(a),children:s},a))}),e.jsx(Z,{hasCode:S,hasHfArtifacts:k,onHasCodeChange:q,onHasHfArtifactsChange:Q,showDivider:!f})]}),e.jsx(ee,{startDate:x.startDate,endDate:x.endDate,onChange:a=>u(se(o,a))}),!f&&e.jsxs("div",{className:"results-count",children:[b.length," loaded in ",e.jsx("span",{children:g})]})]}),i.isLoading?e.jsx("div",{className:"paper-list",children:Array.from({length:4}).map((a,s)=>e.jsx(ne,{className:"h-40 w-full"},s))}):b.length===0?e.jsx("div",{className:"no-results",children:"No papers found for this selection."}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"paper-list",children:b.map((a,s)=>{var E;const c=(E=v[s])==null?void 0:E.conference_award,H=c==="outstanding"?"Outstanding Paper":c==="honorable_mention"?"Honorable Mention":c==="best_paper_finalist"&&!d?"Best Paper Finalist":null;return e.jsxs(G.Fragment,{children:[H&&e.jsx("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--accent-text)",letterSpacing:"0.08em",marginBottom:8},children:H}),e.jsx(J,{paper:a,rank:s+1})]},a.id)})}),e.jsx("div",{ref:V,style:{height:1}}),i.isFetchingNextPage&&e.jsx("div",{style:{padding:"20px 0",textAlign:"center",color:"var(--ink-faint)"},children:"Loading more…"})]})]})};export{Ce as default}; diff --git a/assets/ConferencesIndexView-CA_XWUAi.js b/assets/ConferencesIndexView-Ct7JZfsT.js similarity index 86% rename from assets/ConferencesIndexView-CA_XWUAi.js rename to assets/ConferencesIndexView-Ct7JZfsT.js index 7b1f8f0ba6804d9dd587ab54b28213d549d892b1..31ebdff78fa262d9c6189b1b9b5be49f5a56b704 100644 --- a/assets/ConferencesIndexView-CA_XWUAi.js +++ b/assets/ConferencesIndexView-Ct7JZfsT.js @@ -1 +1 @@ -import{r as u,j as e,L as d}from"./index-Cry0GNHI.js";import{u as p}from"./useQuery-DlAfMYOD.js";import{c as f}from"./catalog-BjZE6R9z.js";import{S as m}from"./skeleton-LwsL9heH.js";import{A as h,a as g}from"./alert-BAHZ4i9D.js";import{T as x}from"./TaxonomySuggestionTile-Dlf-wpJa.js";import"./SignInToEditDialog-D0_3y_qM.js";import"./button-QVzubJLr.js";import"./textarea-nAbEj-Sd.js";import"./dialog-Dedt-uqk.js";import"./useMutation-C5zYPeQC.js";import"./submissions-CVaVzZAk.js";import"./loader-circle-C6beazQX.js";const j=(r,a)=>{if(!r)return null;const t=new Date(`${r}T00:00:00`),s=a?new Date(`${a}T00:00:00`):null,n=o=>o.toLocaleDateString("en-US",{month:"long",day:"numeric"}),i=t.getFullYear();return s&&s.getTime()!==t.getTime()?t.getMonth()===s.getMonth()?`${n(t).replace(/\d+$/,"").trim()} ${t.getDate()}–${s.getDate()}, ${i}`:`${n(t)} – ${n(s)}, ${i}`:`${n(t)}, ${i}`},v=r=>{var t;if(r.year!=null)return r.year;if(r.start_date)return Number(r.start_date.slice(0,4));const a=(t=r.slug.match(/-(\d{4})$/))==null?void 0:t[1];return a?Number(a):0},y=(r,a)=>{if(r.start_date&&a.start_date){const t=r.start_date.localeCompare(a.start_date);if(t!==0)return t}else{if(r.start_date)return-1;if(a.start_date)return 1}return r.name.localeCompare(a.name)},N={display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:24,paddingBottom:12,borderBottom:"1px solid var(--hairline-strong)"},M=()=>{const r=p({queryKey:["conferences"],queryFn:()=>f.conferences(),staleTime:6e5}),a=u.useMemo(()=>{var s;if(!((s=r.data)!=null&&s.results))return null;const t={};return r.data.results.forEach(n=>{const i=v(n);(t[i]||(t[i]=[])).push(n)}),Object.values(t).forEach(n=>n.sort(y)),Object.keys(t).map(Number).sort((n,i)=>i-n).map(n=>({year:n,conferences:t[n]}))},[r.data]);return r.error?e.jsx("div",{className:"page",children:e.jsx(h,{variant:"destructive",children:e.jsx(g,{children:"Failed to load conferences. Please try again."})})}):e.jsxs("div",{className:"page",children:[e.jsx("div",{className:"feed-header",children:e.jsxs("div",{children:[e.jsxs("h1",{className:"feed-title",children:["All ",e.jsx("em",{children:"Conferences"})]}),e.jsx("div",{className:"feed-subtitle",children:"Browse accepted papers from major AI conferences, grouped by research area and task."}),e.jsxs("div",{className:"conference-deadlines-link",children:["Find deadlines for upcoming conferences"," ",e.jsx(d,{to:"/ai-deadlines",className:"underline underline-offset-2 hover:text-foreground",children:"here"}),". Conference information is based on"," ",e.jsx("a",{href:"https://huggingface.co/ai-conferences",target:"_blank",rel:"noreferrer",className:"underline underline-offset-2 hover:text-foreground",children:"Hugging Face AI Conferences"}),"."]})]})}),r.isLoading?e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:32},children:Array.from({length:2}).map((t,s)=>e.jsxs("div",{children:[e.jsx(m,{className:"h-8 w-24 mb-4"}),e.jsx("div",{className:"tag-grid",children:Array.from({length:3}).map((n,i)=>e.jsx(m,{className:"h-32"},i))})]},s))}):a==null?void 0:a.map(({year:t,conferences:s})=>{const n=s.reduce((o,l)=>o+(l.paper_count??0),0),i=t>0?String(t):"Unknown year";return e.jsxs("section",{style:{marginBottom:48},children:[e.jsxs("div",{style:N,children:[e.jsx("div",{children:e.jsx("h2",{style:{fontFamily:"var(--serif)",fontSize:26,fontWeight:500,letterSpacing:"-0.02em",marginBottom:4},children:i})}),e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",whiteSpace:"nowrap"},children:[s.length," ",s.length===1?"conference":"conferences"," ·"," ",n.toLocaleString()," papers"]})]}),e.jsxs("div",{className:"tag-grid",children:[s.map(o=>{const l=j(o.start_date,o.end_date),c=[o.venue,o.location].filter(Boolean).join(", ");return e.jsxs(d,{to:`/conferences/${o.slug}`,className:"tag-cell",children:[e.jsx("div",{className:"name",children:o.name}),e.jsxs("div",{className:"meta",style:{display:"flex",flexDirection:"column",gap:4},children:[l&&e.jsx("span",{children:l}),c&&e.jsx("span",{children:c}),e.jsxs("span",{children:[(o.paper_count??0).toLocaleString()," papers"]})]})]},o.id)}),e.jsx(x,{kind:"conference"})]})]},t)})]})};export{M as default}; +import{r as u,j as e,L as d}from"./index-Dt001B3A.js";import{u as p}from"./useQuery-DD4hUA6p.js";import{c as f}from"./catalog-BOpSeTzm.js";import{S as m}from"./skeleton-DkhIJUB4.js";import{A as h,a as g}from"./alert-Xa-AqUL5.js";import{T as x}from"./TaxonomySuggestionTile-BEuXuGw1.js";import"./SignInToEditDialog-BkrM2MwG.js";import"./button-BL-YLDFJ.js";import"./textarea-BLDaXAi6.js";import"./dialog-Bs8pVXcH.js";import"./useMutation-BSdRNizq.js";import"./submissions-IHYlc8kE.js";import"./loader-circle-DD7s_n4z.js";const j=(r,a)=>{if(!r)return null;const t=new Date(`${r}T00:00:00`),s=a?new Date(`${a}T00:00:00`):null,n=o=>o.toLocaleDateString("en-US",{month:"long",day:"numeric"}),i=t.getFullYear();return s&&s.getTime()!==t.getTime()?t.getMonth()===s.getMonth()?`${n(t).replace(/\d+$/,"").trim()} ${t.getDate()}–${s.getDate()}, ${i}`:`${n(t)} – ${n(s)}, ${i}`:`${n(t)}, ${i}`},v=r=>{var t;if(r.year!=null)return r.year;if(r.start_date)return Number(r.start_date.slice(0,4));const a=(t=r.slug.match(/-(\d{4})$/))==null?void 0:t[1];return a?Number(a):0},y=(r,a)=>{if(r.start_date&&a.start_date){const t=r.start_date.localeCompare(a.start_date);if(t!==0)return t}else{if(r.start_date)return-1;if(a.start_date)return 1}return r.name.localeCompare(a.name)},N={display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:24,paddingBottom:12,borderBottom:"1px solid var(--hairline-strong)"},M=()=>{const r=p({queryKey:["conferences"],queryFn:()=>f.conferences(),staleTime:6e5}),a=u.useMemo(()=>{var s;if(!((s=r.data)!=null&&s.results))return null;const t={};return r.data.results.forEach(n=>{const i=v(n);(t[i]||(t[i]=[])).push(n)}),Object.values(t).forEach(n=>n.sort(y)),Object.keys(t).map(Number).sort((n,i)=>i-n).map(n=>({year:n,conferences:t[n]}))},[r.data]);return r.error?e.jsx("div",{className:"page",children:e.jsx(h,{variant:"destructive",children:e.jsx(g,{children:"Failed to load conferences. Please try again."})})}):e.jsxs("div",{className:"page",children:[e.jsx("div",{className:"feed-header",children:e.jsxs("div",{children:[e.jsxs("h1",{className:"feed-title",children:["All ",e.jsx("em",{children:"Conferences"})]}),e.jsx("div",{className:"feed-subtitle",children:"Browse accepted papers from major AI conferences, grouped by research area and task."}),e.jsxs("div",{className:"conference-deadlines-link",children:["Find deadlines for upcoming conferences"," ",e.jsx(d,{to:"/ai-deadlines",className:"underline underline-offset-2 hover:text-foreground",children:"here"}),". Conference information is based on"," ",e.jsx("a",{href:"https://huggingface.co/ai-conferences",target:"_blank",rel:"noreferrer",className:"underline underline-offset-2 hover:text-foreground",children:"Hugging Face AI Conferences"}),"."]})]})}),r.isLoading?e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:32},children:Array.from({length:2}).map((t,s)=>e.jsxs("div",{children:[e.jsx(m,{className:"h-8 w-24 mb-4"}),e.jsx("div",{className:"tag-grid",children:Array.from({length:3}).map((n,i)=>e.jsx(m,{className:"h-32"},i))})]},s))}):a==null?void 0:a.map(({year:t,conferences:s})=>{const n=s.reduce((o,l)=>o+(l.paper_count??0),0),i=t>0?String(t):"Unknown year";return e.jsxs("section",{style:{marginBottom:48},children:[e.jsxs("div",{style:N,children:[e.jsx("div",{children:e.jsx("h2",{style:{fontFamily:"var(--serif)",fontSize:26,fontWeight:500,letterSpacing:"-0.02em",marginBottom:4},children:i})}),e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",whiteSpace:"nowrap"},children:[s.length," ",s.length===1?"conference":"conferences"," ·"," ",n.toLocaleString()," papers"]})]}),e.jsxs("div",{className:"tag-grid",children:[s.map(o=>{const l=j(o.start_date,o.end_date),c=[o.venue,o.location].filter(Boolean).join(", ");return e.jsxs(d,{to:`/conferences/${o.slug}`,className:"tag-cell",children:[e.jsx("div",{className:"name",children:o.name}),e.jsxs("div",{className:"meta",style:{display:"flex",flexDirection:"column",gap:4},children:[l&&e.jsx("span",{children:l}),c&&e.jsx("span",{children:c}),e.jsxs("span",{children:[(o.paper_count??0).toLocaleString()," papers"]})]})]},o.id)}),e.jsx(x,{kind:"conference"})]})]},t)})]})};export{M as default}; diff --git a/assets/CronDashboard-CCbRoahI.js b/assets/CronDashboard-CCbRoahI.js new file mode 100644 index 0000000000000000000000000000000000000000..4e741a4b53b9e1039af65f189190c1d4a1516c68 --- /dev/null +++ b/assets/CronDashboard-CCbRoahI.js @@ -0,0 +1,56 @@ +import{d as T,r as x,j as e,q as k,t as Qe,k as Xe,h as ne,V as Ze,R as Ye,I as es,m as ce,P as ss,p as as,v as Se,g as $e,L as rs,Z as ns,y as ts,b as is}from"./index-Dt001B3A.js";import{u as Q}from"./useQuery-DD4hUA6p.js";import{B as C,D as pe,r as cs,f as ls,h as os,j as ds,p as ms,k as us}from"./codexAddEvals-BW2pMO12.js";import{B as P}from"./button-BL-YLDFJ.js";import{C as hs}from"./chevron-down-BXCXby03.js";import{F as je}from"./file-text-BXknBxd6.js";import{C as X,R as ge,S as xs}from"./shield-alert-BzyltW9X.js";import{L as A}from"./loader-circle-DD7s_n4z.js";import{C as me}from"./circle-check-BxcyjDCC.js";import{E as oe}from"./external-link-DdqhM_eg.js";import{u as H}from"./useMutation-BSdRNizq.js";import{u as ps}from"./useInfiniteQuery-CgAOxB5d.js";import{c as le}from"./catalog-BOpSeTzm.js";import{c as fe}from"./chat-98y1Ufht.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 ae=T("Activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);/** + * @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 ve=T("Calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);/** + * @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 js=T("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/** + * @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 gs=T("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/** + * @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 fs=T("CirclePlay",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polygon",{points:"10 8 16 12 10 16 10 8",key:"1cimsy"}]]);/** + * @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 vs=T("CircleSlash2",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M22 2 2 22",key:"y4kqgn"}]]);/** + * @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 _s=T("Clock3",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16.5 12",key:"1aq6pp"}]]);/** + * @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 Le=T("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/** + * @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 Ns=T("Images",[["path",{d:"M18 22H4a2 2 0 0 1-2-2V6",key:"pblm9e"}],["path",{d:"m22 13-1.296-1.296a2.41 2.41 0 0 0-3.408 0L11 18",key:"nf6bnh"}],["circle",{cx:"12",cy:"8",r:"2",key:"1822b1"}],["rect",{width:"16",height:"16",x:"6",y:"2",rx:"2",key:"12espp"}]]);/** + * @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 bs=T("TrendingUp",[["polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17",key:"126l90"}],["polyline",{points:"16 7 22 7 22 13",key:"kwv8wd"}]]);/** + * @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 Re=T("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]),g=x.forwardRef(({className:s,...a},r)=>e.jsx("div",{ref:r,className:k("rounded-lg border bg-card text-card-foreground shadow-sm",s),...a}));g.displayName="Card";const N=x.forwardRef(({className:s,...a},r)=>e.jsx("div",{ref:r,className:k("flex flex-col space-y-1.5 p-6",s),...a}));N.displayName="CardHeader";const b=x.forwardRef(({className:s,...a},r)=>e.jsx("h3",{ref:r,className:k("text-2xl font-semibold leading-none tracking-tight",s),...a}));b.displayName="CardTitle";const R=x.forwardRef(({className:s,...a},r)=>e.jsx("p",{ref:r,className:k("text-sm text-muted-foreground",s),...a}));R.displayName="CardDescription";const f=x.forwardRef(({className:s,...a},r)=>e.jsx("div",{ref:r,className:k("p-6 pt-0",s),...a}));f.displayName="CardContent";const ys=x.forwardRef(({className:s,...a},r)=>e.jsx("div",{ref:r,className:k("flex items-center p-6 pt-0",s),...a}));ys.displayName="CardFooter";var te="Tabs",[ws]=as(te,[Se]),Pe=Se(),[ks,ue]=ws(te),Te=x.forwardRef((s,a)=>{const{__scopeTabs:r,value:t,onValueChange:c,defaultValue:d,orientation:j="horizontal",dir:_,activationMode:u="automatic",...m}=s,y=Qe(_),[w,l]=Xe({prop:t,onChange:c,defaultProp:d??"",caller:te});return e.jsx(ks,{scope:r,baseId:Ze(),value:w,onValueChange:l,orientation:j,dir:y,activationMode:u,children:e.jsx(ne.div,{dir:y,"data-orientation":j,...m,ref:a})})});Te.displayName=te;var Fe="TabsList",Ae=x.forwardRef((s,a)=>{const{__scopeTabs:r,loop:t=!0,...c}=s,d=ue(Fe,r),j=Pe(r);return e.jsx(Ye,{asChild:!0,...j,orientation:d.orientation,dir:d.dir,loop:t,children:e.jsx(ne.div,{role:"tablist","aria-orientation":d.orientation,...c,ref:a})})});Ae.displayName=Fe;var Me="TabsTrigger",Ee=x.forwardRef((s,a)=>{const{__scopeTabs:r,value:t,disabled:c=!1,...d}=s,j=ue(Me,r),_=Pe(r),u=Ie(j.baseId,t),m=Je(j.baseId,t),y=t===j.value;return e.jsx(es,{asChild:!0,..._,focusable:!c,active:y,children:e.jsx(ne.button,{type:"button",role:"tab","aria-selected":y,"aria-controls":m,"data-state":y?"active":"inactive","data-disabled":c?"":void 0,disabled:c,id:u,...d,ref:a,onMouseDown:ce(s.onMouseDown,w=>{!c&&w.button===0&&w.ctrlKey===!1?j.onValueChange(t):w.preventDefault()}),onKeyDown:ce(s.onKeyDown,w=>{[" ","Enter"].includes(w.key)&&j.onValueChange(t)}),onFocus:ce(s.onFocus,()=>{const w=j.activationMode!=="manual";!y&&!c&&w&&j.onValueChange(t)})})})});Ee.displayName=Me;var qe="TabsContent",De=x.forwardRef((s,a)=>{const{__scopeTabs:r,value:t,forceMount:c,children:d,...j}=s,_=ue(qe,r),u=Ie(_.baseId,t),m=Je(_.baseId,t),y=t===_.value,w=x.useRef(y);return x.useEffect(()=>{const l=requestAnimationFrame(()=>w.current=!1);return()=>cancelAnimationFrame(l)},[]),e.jsx(ss,{present:c||y,children:({present:l})=>e.jsx(ne.div,{"data-state":y?"active":"inactive","data-orientation":_.orientation,role:"tabpanel","aria-labelledby":u,hidden:!l,id:m,tabIndex:0,...j,ref:a,style:{...s.style,animationDuration:w.current?"0s":void 0},children:l&&d})})});De.displayName=qe;function Ie(s,a){return`${s}-trigger-${a}`}function Je(s,a){return`${s}-content-${a}`}var Cs=Te,Oe=Ae,He=Ee,Ue=De;const Ss=Cs,We=x.forwardRef(({className:s,...a},r)=>e.jsx(Oe,{ref:r,className:k("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",s),...a}));We.displayName=Oe.displayName;const W=x.forwardRef(({className:s,...a},r)=>e.jsx(He,{ref:r,className:k("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",s),...a}));W.displayName=He.displayName;const B=x.forwardRef(({className:s,...a},r)=>e.jsx(Ue,{ref:r,className:k("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",s),...a}));B.displayName=Ue.displayName;function v(s){if(!s)return"Never";const a=new Date(s);if(Number.isNaN(a.getTime()))return s;const r=Date.now()-a.getTime(),t=Math.floor(r/6e4),c=Math.floor(r/36e5),d=Math.floor(r/864e5);return t<1?"Just now":t<60?`${t}m ago`:c<24?`${c}h ago`:d<7?`${d}d ago`:a.toLocaleString("en-US",{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}function re(s){return s==null?"N/A":s<60?`${s.toFixed(1)}s`:s<3600?`${(s/60).toFixed(1)}m`:`${(s/3600).toFixed(1)}h`}function Be(s){return s.available?s.status==="completed"?s.conclusion??"completed":s.status??"unknown":"Unavailable"}function he(s){return s.replace(/_/g," ").replace(/\b\w/g,a=>a.toUpperCase())}const L=s=>`$${s.toFixed(2)}`;function _e({title:s,budget:a,profile:r}){const t=a.cost_policy==="unmetered_hf"||a.budget_enforced===!1,c=Math.min(100,a.current_exposure_usd/a.ceiling_usd*100),d=t?"Unmetered HF":a.affordable_jobs===0&&a.desired_jobs>0?"No shard fits":a.affordable_jobs0?"Now":"No scheduled admission"})]}),e.jsxs("div",{children:[e.jsx("span",{className:"cron-label",children:"Unknown terminal reserve"}),e.jsxs("div",{children:[L(a.unknown_terminal_reservation_usd??0)," · ",(a.unknown_terminal_reservation_count??0).toLocaleString()," jobs"]})]})]}),r&&e.jsxs("div",{className:"text-xs cron-muted",children:["Profile ",e.jsx("strong",{children:r.profile_id})," · max ",r.max_papers.toLocaleString()," papers · hard ",re(r.hard_timeout_seconds)," · soft ",re(r.soft_deadline_seconds)]}),e.jsx("p",{className:"text-xs cron-muted",children:t?"HF owns this workload, so monetary admission is disabled; concurrency and timeout limits still apply. Runtime cost remains an operational estimate.":"Projected exposure is an admission-control estimate, not a provider invoice. Each launch reserves the full timeout until actual runtime is known."})]})}const $s={healthy:me,degraded:Re,broken:X,running:A,stuck:X,unknown:gs};function Ls({status:s,isRunning:a}){const r=a?"running":s,t=$s[r];return e.jsx(t,{className:`cron-status-icon cron-status--${r}${r==="running"?" animate-spin":""}`})}function Ne({label:s,axis:a}){return e.jsxs(C,{variant:"outline",className:`cron-status--${a.status}`,title:a.reason,children:[s,": ",a.status]})}function be({icon:s,title:a,metrics:r}){return e.jsxs("div",{children:[e.jsxs("div",{className:"cron-section-heading",children:[e.jsx(s,{className:"h-4 w-4"}),e.jsx("h4",{children:a})]}),e.jsx("div",{className:"grid grid-cols-2 gap-3",children:Object.entries(r).map(([t,c])=>e.jsxs("div",{className:"cron-metric-card",children:[e.jsx("div",{className:"cron-label",children:he(t)}),e.jsx("div",{className:"text-lg font-semibold",children:typeof c=="number"?c.toLocaleString():c})]},t))})]})}function Rs({workflow:s}){return e.jsxs("div",{children:[e.jsxs("div",{className:"cron-section-heading",children:[e.jsx(ae,{className:"h-4 w-4"}),e.jsx("h4",{children:"GitHub Actions"})]}),e.jsxs("div",{className:"cron-metric-card space-y-2 text-sm",children:[[["Workflow",s.workflow_file],["Run",s.run_id??"N/A"],["Status",Be(s)],...s.updated_at?[["Updated",v(s.updated_at)]]:[]].map(([a,r])=>e.jsxs("div",{className:"flex items-center justify-between gap-3",children:[e.jsx("span",{className:"cron-label",children:a}),e.jsx("span",{className:a==="Workflow"?"font-mono text-xs":void 0,children:r})]},a)),s.failed_jobs&&s.failed_jobs.length>0&&e.jsxs("div",{children:[e.jsx("div",{className:"cron-label mb-1",children:"Failed jobs"}),e.jsx("div",{className:"flex gap-2 flex-wrap",children:s.failed_jobs.map(a=>e.jsx(C,{variant:"outline",className:"cron-status--broken",children:a},a))})]}),s.job_conclusions&&Object.keys(s.job_conclusions).length>0&&e.jsxs("div",{children:[e.jsx("div",{className:"cron-label mb-1",children:"Job conclusions"}),e.jsx("div",{className:"flex gap-2 flex-wrap",children:Object.entries(s.job_conclusions).map(([a,r])=>e.jsxs(C,{variant:"outline",children:[a,": ",r??"running"]},a))})]}),(s.error||s.view_error)&&e.jsx("div",{className:"cron-message cron-message--error",children:s.error??s.view_error})]})]})}function Ps(s){return s==="COMPLETED"?"cron-status--healthy":s==="ERROR"||s==="CANCELED"?"cron-status--broken":s==="RUNNING"?"cron-status--running":"cron-status--unknown"}function ye(s){return s==="success"?"cron-status--healthy":s==="partial"||s==="interrupted"?"cron-status--degraded":s==="infrastructure_failure"||s==="worker_failure"?"cron-status--broken":s==="active"?"cron-status--running":"cron-status--unknown"}function Ts({job:s}){const a=s.progress,r=(a==null?void 0:a.omitted_images)??0,t=a!=null&&a.total_papers?Math.min(100,a.processed_papers/a.total_papers*100):0;return e.jsxs("div",{className:"cron-metric-card space-y-3",children:[e.jsxs("div",{className:"flex items-start justify-between gap-3",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsxs("div",{className:"font-semibold",children:[s.mode??"unknown"," · shard ",s.shard_id??"N/A"," · attempt ",s.provider_attempt??1]}),e.jsx("div",{className:"font-mono text-xs cron-muted truncate",children:s.id})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(C,{variant:"outline",className:Ps(s.stage),children:s.stage.toLowerCase()}),s.effective_outcome&&e.jsxs(C,{variant:"outline",className:ye(s.effective_outcome),children:["output: ",s.effective_outcome.replace(/_/g," ")]}),s.failure_cause&&e.jsxs(C,{variant:"outline",className:ye(s.effective_outcome),children:["cause: ",s.failure_cause.replace(/_/g," ")]}),s.url&&e.jsx("a",{href:s.url,target:"_blank",rel:"noreferrer","aria-label":`Open Hugging Face Job ${s.id}`,className:"cron-info-text",children:e.jsx(oe,{className:"h-4 w-4"})})]})]}),a?e.jsxs(e.Fragment,{children:[e.jsxs("div",{children:[e.jsxs("div",{className:"flex justify-between gap-3 text-xs cron-muted mb-1",children:[e.jsxs("span",{children:[a.processed_papers.toLocaleString()," / ",a.total_papers.toLocaleString()," papers"]}),e.jsxs("span",{children:[t.toFixed(0),"%"]})]}),e.jsx("div",{className:"cron-progress-track",children:e.jsx("div",{className:"cron-progress-value",style:{width:`${t}%`}})})]}),e.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-2 text-sm",children:[e.jsxs("span",{children:[e.jsx("strong",{children:a.succeeded_papers.toLocaleString()})," succeeded"]}),e.jsxs("span",{children:[e.jsx("strong",{children:a.failed_papers.toLocaleString()})," failed"]}),e.jsxs("span",{children:[e.jsx("strong",{children:a.already_existed_papers.toLocaleString()})," skipped"]}),e.jsxs("span",{children:[e.jsx("strong",{children:a.extracted_images.toLocaleString()})," images"]})]}),r>0&&e.jsxs("div",{className:"text-xs cron-muted",children:[e.jsx("strong",{children:r.toLocaleString()})," unresolved image references omitted after final retry"]}),a.updated_at&&e.jsxs("div",{className:"text-xs cron-muted",children:["Progress updated ",v(a.updated_at)]}),(a.fatal_error||a.error_samples.length>0)&&e.jsxs("div",{className:"cron-message cron-message--error space-y-1",children:[a.fatal_error&&e.jsx("div",{children:a.fatal_error}),a.error_samples.map(c=>e.jsxs("div",{children:[e.jsx("span",{className:"font-mono",children:c.arxiv_id}),": ",c.error]},`${c.arxiv_id}:${c.error}`))]})]}):e.jsx("div",{className:"text-sm cron-muted",children:"Waiting for the shard progress checkpoint."}),e.jsxs("div",{className:"flex flex-wrap gap-x-4 gap-y-1 text-xs cron-muted",children:[s.hardware&&e.jsx("span",{children:s.hardware}),s.created_at&&e.jsxs("span",{children:["Created ",v(s.created_at)]}),s.duration_seconds!=null&&e.jsxs("span",{children:["Duration ",re(s.duration_seconds)]})]}),s.stage_message&&e.jsx("div",{className:"cron-message cron-message--warning",children:s.stage_message})]})}function Fs({monitor:s,loading:a,error:r}){var t,c;return e.jsxs("div",{className:"md:col-span-2",children:[e.jsxs("div",{className:"cron-section-heading",children:[e.jsx(Ns,{className:"h-4 w-4"}),e.jsx("h4",{children:"Hugging Face OCR shards"})]}),a&&e.jsxs("div",{className:"cron-metric-card flex items-center gap-2 text-sm cron-muted",children:[e.jsx(A,{className:"h-4 w-4 animate-spin"})," Loading remote Jobs…"]}),!!r&&e.jsx("div",{className:"cron-message cron-message--error",children:"Could not load Hugging Face Jobs."}),s&&!s.available&&e.jsx("div",{className:"cron-message cron-message--warning",children:s.error??"Hugging Face monitoring is unavailable."}),(s==null?void 0:s.available)&&e.jsxs(e.Fragment,{children:[s.budgets.live&&s.budgets.backfill&&e.jsxs("div",{className:"grid grid-cols-1 xl:grid-cols-2 gap-3 mb-3",children:[e.jsx(_e,{title:"Live paper Markdown GPU policy",budget:s.budgets.live,profile:(t=s.selected_profiles)==null?void 0:t.live}),e.jsx(_e,{title:"Full backfill GPU policy",budget:s.budgets.backfill,profile:(c=s.selected_profiles)==null?void 0:c.backfill})]}),e.jsxs("div",{className:`cron-message mb-3 ${(s.summary.unresolved_mount_failures??0)>0?"cron-message--error":""}`,children:[e.jsx("strong",{children:"Logical shard health:"})," ",(s.summary.logical_shards??0).toLocaleString()," logical shards / ",(s.summary.provider_attempts??0).toLocaleString()," provider attempts · ",(s.summary.recovered_mount_failures??0).toLocaleString()," recovered mount failures · ",(s.summary.unresolved_mount_failures??0).toLocaleString()," unresolved"]}),e.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-3 mb-3",children:Object.entries(s.summary).map(([d,j])=>e.jsxs("div",{className:"cron-metric-card",children:[e.jsx("div",{className:"cron-label",children:he(d)}),e.jsx("div",{className:"text-lg font-semibold",children:j.toLocaleString()})]},d))}),e.jsx("p",{className:"text-xs cron-muted mb-3",children:"Efficiency and backlog-clearance costs are admission-control estimates, not provider invoices."}),s.coverage&&Object.keys(s.coverage).length>0&&e.jsx("div",{className:"grid grid-cols-1 xl:grid-cols-2 gap-3 mb-3",children:Object.values(s.coverage).map(d=>e.jsxs("div",{className:"cron-metric-card space-y-2 text-sm",children:[e.jsx("div",{className:"font-semibold",children:d.scope==="full"?"Full catalog coverage":"Recent 14-day coverage"}),e.jsxs("div",{className:"text-lg font-semibold",children:[d.coverage_percentage.toFixed(2),"%"]}),e.jsxs("div",{children:[d.canonical_markdown_count.toLocaleString()," canonical / ",d.eligible_papers.toLocaleString()," eligible · ",d.missing_count.toLocaleString()," missing"]}),e.jsxs("div",{className:"cron-muted",children:["Copied from upstream this reconciliation: ",d.copied_from_upstream_count.toLocaleString()]}),e.jsxs("div",{className:"cron-muted",children:["7-day Δ eligible ",d.eligible_delta_7d??"collecting"," · canonical ",d.canonical_delta_7d??"collecting"," · missing ",d.missing_delta_7d??"collecting"]})]},d.scope))}),s.jobs.length===0?e.jsx("div",{className:"cron-metric-card text-sm cron-muted",children:"No OCR shards have been launched yet."}):e.jsx("div",{className:"grid grid-cols-1 xl:grid-cols-2 gap-3",children:s.jobs.map(d=>e.jsx(Ts,{job:d},d.id))})]})]})}function As({job:s,expanded:a,onToggle:r,paperMarkdownJobs:t,paperMarkdownJobsLoading:c=!1,paperMarkdownJobsError:d=null}){const j=!!(s.work_metrics&&Object.keys(s.work_metrics).length),_=!!(s.db_metrics&&Object.keys(s.db_metrics).length),u=s.job_name==="paper_markdown_backfill",m=u?t==null?void 0:t.budgets.live:void 0,y=(m==null?void 0:m.cost_policy)==="unmetered_hf"||(m==null?void 0:m.budget_enforced)===!1;return e.jsxs("div",{className:"cron-job-card",children:[e.jsx("button",{type:"button",className:"cron-job-summary",onClick:r,"aria-expanded":a,children:e.jsxs("div",{className:"flex items-start justify-between gap-3",children:[e.jsxs("div",{className:"flex items-start gap-3 flex-1 min-w-0",children:[e.jsx(Ls,{status:s.status,isRunning:s.is_running}),e.jsxs("div",{className:"flex-1 min-w-0 text-left",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1 flex-wrap",children:[e.jsx("h3",{className:"font-semibold",children:s.display_name}),s.critical&&e.jsx(C,{variant:"outline",className:"text-[10px] uppercase tracking-wide",children:"Critical"}),s.lock_stale&&e.jsx(C,{variant:"outline",className:"cron-status--broken",children:"Held lock"}),e.jsx(Ne,{label:"Execution",axis:s.execution_health}),e.jsx(Ne,{label:"Output",axis:s.output_health}),a?e.jsx(js,{className:"h-4 w-4 cron-muted"}):e.jsx(hs,{className:"h-4 w-4 cron-muted"})]}),e.jsx("p",{className:"text-sm cron-muted mb-2",children:s.status_reason}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 xl:grid-cols-4 gap-2 text-sm cron-muted",children:[e.jsxs("span",{className:"cron-fact",children:[e.jsx(Le,{}),"Log: ",v(s.last_run)]}),e.jsxs("span",{className:"cron-fact",children:[e.jsx(pe,{}),"DB: ",v(s.last_db_write)]}),s.recent_write_count!=null&&e.jsxs("span",{className:"cron-fact",children:[e.jsx(bs,{}),"Recent writes: ",s.recent_write_count.toLocaleString()]}),s.duration!=null&&e.jsxs("span",{className:"cron-fact",children:[e.jsx(ae,{}),"Duration: ",re(s.duration)]}),s.schedule&&e.jsxs("span",{className:"cron-fact md:col-span-2",children:[e.jsx(ve,{}),e.jsx("span",{className:"font-mono text-xs",children:s.schedule})]}),s.log_status&&e.jsxs("span",{className:"cron-fact",children:[e.jsx(je,{}),"Log status: ",s.log_status]}),s.workflow_status&&e.jsxs("span",{className:"cron-fact",children:[e.jsx(ae,{}),"Actions: ",Be(s.workflow_status)]})]}),s.work_summary&&e.jsx("div",{className:"cron-message",children:s.work_summary}),s.error&&e.jsxs("div",{className:"cron-message cron-message--error",children:[e.jsx("strong",{children:"Error: "}),s.error]}),s.diagnostics&&e.jsx("div",{className:"cron-message cron-message--warning",children:s.diagnostics}),m&&e.jsxs("div",{className:`cron-message ${m.can_launch_planned?"":"cron-message--error"}`,children:[e.jsx("strong",{children:"Live GPU policy:"})," ",y?"unmetered on HF":`${L(m.current_exposure_usd)} current / ${L(m.ceiling_usd)} cap`," · ",m.affordable_jobs," of ",m.desired_jobs," planned",y?"":` · projects ${L(m.projected_usd)} · rolling 30 days`]})]})]}),e.jsx(C,{variant:"outline",className:`cron-status--${s.status}`,children:s.status})]})}),a&&!0&&e.jsx("div",{className:"cron-job-details",children:e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"cron-section-heading",children:[e.jsx(ve,{className:"h-4 w-4"}),e.jsx("h4",{children:"Scheduler evidence"})]}),e.jsx("div",{className:"cron-metric-card space-y-2 text-sm",children:[["Scheduler",s.execution_health.scheduler??"unknown"],["Last expected",v(s.execution_health.last_expected_at??null)],["Last started",v(s.execution_health.last_started_at??null)],["Last completed",v(s.execution_health.last_completed_at??null)],["Next expected",v(s.execution_health.next_expected_at??null)]].map(([l,p])=>e.jsxs("div",{className:"flex items-center justify-between gap-3",children:[e.jsx("span",{className:"cron-label",children:l}),e.jsx("span",{children:p})]},l))})]}),s.work_metrics&&j&&e.jsx(be,{icon:je,title:"Log Metrics",metrics:s.work_metrics}),s.db_metrics&&_&&e.jsx(be,{icon:pe,title:"Database Metrics",metrics:s.db_metrics}),s.workflow_status&&e.jsx(Rs,{workflow:s.workflow_status}),u&&e.jsx(Fs,{monitor:t,loading:c,error:d}),s.diagnostic_groups&&Object.values(s.diagnostic_groups).some(l=>l.length>0)&&e.jsxs("div",{className:"md:col-span-2",children:[e.jsxs("div",{className:"cron-section-heading",children:[e.jsx(Re,{className:"h-4 w-4"}),e.jsx("h4",{children:"Diagnostics by cause"})]}),e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:Object.entries(s.diagnostic_groups).filter(([,l])=>l.length>0).map(([l,p])=>e.jsxs("div",{className:"cron-metric-card",children:[e.jsx("div",{className:"cron-label mb-1",children:he(l)}),e.jsx("ul",{className:"list-disc pl-4 text-sm space-y-1",children:p.map(I=>e.jsx("li",{children:I},I))})]},l))})]})]})})]})}const ze=x.forwardRef(({className:s,...a},r)=>e.jsx("div",{className:"relative w-full overflow-auto",children:e.jsx("table",{ref:r,className:k("w-full caption-bottom text-sm",s),...a})}));ze.displayName="Table";const Ge=x.forwardRef(({className:s,...a},r)=>e.jsx("thead",{ref:r,className:k("[&_tr]:border-b",s),...a}));Ge.displayName="TableHeader";const Ve=x.forwardRef(({className:s,...a},r)=>e.jsx("tbody",{ref:r,className:k("[&_tr:last-child]:border-0",s),...a}));Ve.displayName="TableBody";const Ms=x.forwardRef(({className:s,...a},r)=>e.jsx("tfoot",{ref:r,className:k("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",s),...a}));Ms.displayName="TableFooter";const de=x.forwardRef(({className:s,...a},r)=>e.jsx("tr",{ref:r,className:k("border-b transition-colors data-[state=selected]:bg-muted hover:bg-muted/50",s),...a}));de.displayName="TableRow";const z=x.forwardRef(({className:s,...a},r)=>e.jsx("th",{ref:r,className:k("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",s),...a}));z.displayName="TableHead";const G=x.forwardRef(({className:s,...a},r)=>e.jsx("td",{ref:r,className:k("p-4 align-middle [&:has([role=checkbox])]:pr-0",s),...a}));G.displayName="TableCell";const Es=x.forwardRef(({className:s,...a},r)=>e.jsx("caption",{ref:r,className:k("mt-4 text-sm text-muted-foreground",s),...a}));Es.displayName="TableCaption";const Ke={queued:"cron-status--unknown",dispatching:"cron-status--running",running:"cron-status--running",completed:"cron-status--healthy",failed:"cron-status--broken",canceled:"cron-status--unknown"},we={"add-evals":"Add evals","enrich-paper":"Enrich paper","resolve-model-paper":"Resolve model release"},qs={queued:_s,dispatching:A,running:fs,completed:me,failed:X,canceled:vs};function Ds({status:s}){const a=qs[s];return e.jsxs(C,{variant:"outline",className:Ke[s],children:[e.jsx(a,{className:`mr-1 h-3.5 w-3.5 ${s==="dispatching"?"animate-spin":""}`}),s]})}function Is(s){return s.error?s.error:s.report?s.report:s.status==="completed"&&s.applied_at?"Changes applied to the paper.":s.status==="completed"?"Completed without a recorded mutation.":null}function Js({autoRefresh:s,refreshToken:a}){var se;const r=$e(),[t,c]=x.useState(""),[d,j]=x.useState(""),[_,u]=x.useState(""),[m,y]=x.useState(""),[w,l]=x.useState(""),[p,I]=x.useState({}),V={trigger:t,status:d,policy_version:_,cohort_date:m,review_status:w},{data:h,isLoading:Z,isFetching:U,error:$}=Q({queryKey:["codexPaperJobs",a,V],queryFn:()=>us(100,V),refetchInterval:s?1e4:!1,retry:!1}),M=()=>r.invalidateQueries({queryKey:["codexPaperJobs"]}),xe=H({mutationFn:cs,onSuccess:M}),Y=H({mutationFn:ls,onSuccess:M}),ie=H({mutationFn:os,onSuccess:M}),K=H({mutationFn:ds,onSuccess:M}),J=H({mutationFn:({id:n,dataset:o,task:q,metric:E})=>ms(n,{dataset_id:Number(o),task_id:Number(q),best_metric:E.trim()}),onSuccess:M}),ee=$&&typeof $=="object"&&"status"in $?$.status:void 0;return e.jsxs(g,{className:"mb-8",children:[e.jsx(N,{children:e.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[e.jsxs("div",{children:[e.jsx(b,{className:"text-xl",children:"Codex paper jobs"}),e.jsx(R,{children:"Durable queue, two-stage daily workflows, traces, and benchmark-gap follow-up"})]}),U&&!Z&&e.jsxs("span",{className:"flex items-center gap-2 text-xs cron-muted",children:[e.jsx(A,{className:"h-3.5 w-3.5 animate-spin"})," Syncing with Hugging Face"]})]})}),e.jsxs(f,{children:[Z&&e.jsxs("div",{className:"flex items-center justify-center py-10 cron-muted",children:[e.jsx(A,{className:"mr-2 h-5 w-5 animate-spin"})," Loading paper jobs…"]}),$&&ee!==404&&e.jsx("div",{className:"cron-message cron-message--error mb-4",children:$ instanceof Error?$.message:"Could not load Codex paper jobs."}),ee===404&&e.jsx("p",{className:"py-4 text-sm cron-muted",children:"Codex paper jobs are not enabled in this environment."}),h&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:`cron-message mb-5 ${h.scheduler.paused_at?"cron-message--error":""}`,children:e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[e.jsxs("div",{children:[e.jsxs("strong",{children:["Scheduled dispatch: ",h.scheduler.paused_at?"paused":h.scheduler.dispatch_enabled?"enabled":"disabled"]}),h.scheduler.pause_reason&&e.jsx("div",{className:"mt-1 text-xs",children:h.scheduler.pause_reason}),e.jsxs("div",{className:"mt-1 text-xs cron-muted",children:["Canary ",h.scheduler.canary_released?"released":"active"," · Queue age ",h.scheduler.queue_age_level]}),e.jsxs("div",{className:"mt-1 text-xs cron-muted",children:["Scheduled usage today ",h.scheduler.usage.current_day_tokens.toLocaleString()," tokens · ",h.scheduler.usage.mode==="enforced"?`pause threshold ${((se=h.scheduler.usage.pause_threshold_tokens)==null?void 0:se.toLocaleString())??"not established"}`:"first-week alert-only baseline"," · trailing median ",h.scheduler.usage.trailing_seven_day_median_tokens.toLocaleString()]})]}),e.jsx(P,{size:"sm",variant:h.scheduler.paused_at||!h.scheduler.dispatch_enabled?"default":"outline",disabled:K.isPending,onClick:()=>K.mutate(h.scheduler.paused_at||!h.scheduler.dispatch_enabled?"resume":"pause"),children:h.scheduler.paused_at?"Acknowledge & resume":h.scheduler.dispatch_enabled?"Pause scheduled dispatch":"Enable scheduled dispatch"})]})}),e.jsxs("div",{className:"mb-5 grid grid-cols-2 gap-3 sm:grid-cols-4 lg:grid-cols-7",children:[["queued","dispatching","running","completed","failed","canceled"].map(n=>e.jsxs("div",{className:"cron-metric-card",children:[e.jsx("div",{className:"cron-label capitalize",children:n}),e.jsx("div",{className:"mt-1 text-xl font-semibold",children:h.summary[n]})]},n)),e.jsxs("div",{className:"cron-metric-card",children:[e.jsx("div",{className:"cron-label",children:"Total"}),e.jsx("div",{className:"mt-1 text-xl font-semibold",children:h.summary.total})]})]}),e.jsxs("div",{className:"mb-5 grid gap-3 sm:grid-cols-5",children:[e.jsxs("select",{"aria-label":"Trigger",className:"rounded border px-2 py-1 text-sm",value:t,onChange:n=>c(n.target.value),children:[e.jsx("option",{value:"",children:"All triggers"}),e.jsx("option",{value:"admin",children:"Admin"}),e.jsx("option",{value:"hf-daily-cron",children:"HF daily cron"}),e.jsx("option",{value:"hf-trending-cron",children:"HF trending cron"})]}),e.jsxs("select",{"aria-label":"Status",className:"rounded border px-2 py-1 text-sm",value:d,onChange:n=>j(n.target.value),children:[e.jsx("option",{value:"",children:"All statuses"}),Object.keys(Ke).map(n=>e.jsx("option",{children:n},n))]}),e.jsx("input",{"aria-label":"Policy version",className:"rounded border px-2 py-1 text-sm",placeholder:"Policy version",value:_,onChange:n=>u(n.target.value)}),e.jsx("input",{"aria-label":"Cohort date",type:"date",className:"rounded border px-2 py-1 text-sm",value:m,onChange:n=>y(n.target.value)}),e.jsxs("select",{"aria-label":"Review status",className:"rounded border px-2 py-1 text-sm",value:w,onChange:n=>l(n.target.value),children:[e.jsx("option",{value:"",children:"All review states"}),e.jsx("option",{value:"unreviewed",children:"Unreviewed"}),e.jsx("option",{value:"approved",children:"Approved"}),e.jsx("option",{value:"corrected",children:"Corrected"})]})]}),h.jobs.length===0?e.jsx("p",{className:"py-8 text-center text-sm cron-muted",children:"No paper curation jobs have been submitted yet."}):e.jsxs(ze,{children:[e.jsx(Ge,{children:e.jsxs(de,{children:[e.jsx(z,{children:"Status"}),e.jsx(z,{children:"Paper"}),e.jsx(z,{children:"Action"}),e.jsx(z,{children:"Requested"}),e.jsx(z,{children:"Execution"})]})}),e.jsx(Ve,{children:h.jobs.map(n=>{const o=Is(n);return e.jsxs(de,{children:[e.jsx(G,{className:"align-top",children:e.jsx(Ds,{status:n.status})}),e.jsx(G,{className:"min-w-[260px] align-top",children:n.paper_route?e.jsxs(e.Fragment,{children:[e.jsx(rs,{to:`/paper/${encodeURIComponent(n.paper_route)}`,className:"font-medium hover:underline",children:n.paper_title}),e.jsxs("div",{className:"mt-1 text-xs cron-muted",children:["Paper #",n.paper_id]})]}):e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"font-medium",children:"Trending model discovery"}),e.jsxs("div",{className:"mt-1 text-xs cron-muted",children:["Candidate ",n.candidate_id]})]})}),e.jsxs(G,{className:"whitespace-nowrap align-top",children:[we[n.kind],n.applied_at&&e.jsxs("div",{className:"mt-1 flex items-center gap-1 text-xs cron-status--healthy",children:[e.jsx(me,{className:"h-3.5 w-3.5"})," Applied"]})]}),e.jsxs(G,{className:"whitespace-nowrap align-top",children:[e.jsx("div",{children:v(n.created_at)}),e.jsxs("div",{className:"mt-1 text-xs cron-muted",children:["@",n.requested_by]})]}),e.jsxs(G,{className:"max-w-[360px] align-top",children:[n.hf_job_url?e.jsxs("a",{href:n.hf_job_url,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-1 hover:underline",children:["Hugging Face Job ",e.jsx(oe,{className:"h-3.5 w-3.5"})]}):e.jsx("span",{className:"cron-muted",children:"Waiting to dispatch"}),o&&e.jsx("p",{className:`mt-2 line-clamp-3 text-xs ${n.error?"text-red-700":"cron-muted"}`,title:o,children:o}),e.jsxs("div",{className:"mt-2 flex gap-2",children:[["failed","canceled"].includes(n.status)&&e.jsx(P,{size:"sm",variant:"outline",onClick:()=>xe.mutate(n.id),children:"Retry"}),["queued","dispatching","running"].includes(n.status)&&e.jsx(P,{size:"sm",variant:"outline",onClick:()=>Y.mutate(n.id),children:"Cancel"}),n.trace_status==="finalize_failed"&&e.jsx(P,{size:"sm",variant:"outline",onClick:()=>ie.mutate(n.id),children:"Retry trace"})]})]})]},n.id)})})]}),h.workflows.length>0&&e.jsxs("div",{className:"mt-8 space-y-3",children:[e.jsx("h3",{className:"text-base font-semibold",children:"Scheduled paper workflows"}),h.workflows.map(n=>e.jsxs("details",{className:"rounded-md border p-3",children:[e.jsxs("summary",{className:"cursor-pointer text-sm font-medium",children:["Paper #",n.paper_id," · ",n.cohort_date," · ",n.status," · ",n.policy_version]}),e.jsxs("div",{className:"mt-3 space-y-3 text-xs",children:[n.error&&e.jsx("div",{className:"text-red-700",children:n.error}),n.stages.map(o=>{var q;return e.jsxs("div",{className:"rounded border p-3",children:[e.jsxs("div",{className:"font-medium",children:[we[o.kind]," · ",o.status," · trace ",o.trace_status," · review ",o.audit_status]}),e.jsxs("div",{className:"mt-1 cron-muted",children:["model ",o.model??"—"," · reasoning ",o.reasoning_effort??"—"," · tokens ",(o.input_tokens??0)+(o.output_tokens??0)," · duration ",o.duration_ms??0," ms · attempts ",o.attempt_count]}),o.error&&e.jsx("div",{className:"mt-2 text-red-700",children:o.error}),o.report&&e.jsx("div",{className:"mt-2 whitespace-pre-wrap rounded border p-2",children:o.report}),o.url_candidates&&e.jsxs("details",{className:"mt-2",children:[e.jsx("summary",{children:"URL candidates and provenance"}),e.jsx("pre",{className:"mt-2 max-h-52 overflow-auto whitespace-pre-wrap",children:JSON.stringify(o.url_candidates,null,2)})]}),o.validation_summary&&e.jsx("pre",{className:"mt-2 max-h-40 overflow-auto whitespace-pre-wrap",children:JSON.stringify(o.validation_summary,null,2)}),Array.isArray((q=o.validation_summary)==null?void 0:q.manual_or_legacy_evaluation_rows_affected)&&o.validation_summary.manual_or_legacy_evaluation_rows_affected.length>0&&e.jsxs("div",{className:"mt-2 rounded border border-amber-500 bg-amber-50 p-2 font-medium text-amber-900",children:["Manual or legacy evaluation rows changed: ",o.validation_summary.manual_or_legacy_evaluation_rows_affected.join(", "),". Review the evidence and before/after diff."]}),o.proposal&&e.jsx("pre",{className:"mt-2 max-h-52 overflow-auto whitespace-pre-wrap",children:JSON.stringify(o.proposal,null,2)}),o.mutation_result&&e.jsxs("details",{className:"mt-2",children:[e.jsx("summary",{children:"Accepted callback result and before/after state"}),e.jsx("pre",{className:"mt-2 max-h-64 overflow-auto whitespace-pre-wrap",children:JSON.stringify(o.mutation_result,null,2)})]}),o.trace_status==="complete"&&e.jsxs("a",{className:"mt-2 inline-flex items-center gap-1 hover:underline",href:`/api/v1/admin/codex-curation/jobs/${o.id}/trace`,target:"_blank",rel:"noreferrer",children:["Authenticated trace manifest ",e.jsx(oe,{className:"h-3.5 w-3.5"})]})]},o.id)})]})]},n.id))]}),h.benchmark_candidates.length>0&&e.jsxs("div",{className:"mt-8 space-y-3",children:[e.jsx("h3",{className:"text-base font-semibold",children:"Benchmark-gap backlog"}),h.benchmark_candidates.map(n=>{var E;const o=p[n.id]??{dataset:"",task:((E=n.task_ids[0])==null?void 0:E.toString())??"",metric:""},q=Number(o.dataset)>0&&Number(o.task)>0&&o.metric.trim().length>0;return e.jsxs("div",{className:"rounded-md border p-3 text-xs",children:[e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[e.jsxs("div",{className:"font-medium",children:[n.canonical_name," · ",n.gap_type," · ",n.status]}),e.jsxs("div",{className:"cron-muted",children:[n.distinct_paper_count," paper",n.distinct_paper_count===1?"":"s"," · ",n.confidence??"unknown"," confidence"]})]}),n.canonical_url&&e.jsx("a",{className:"mt-1 block hover:underline",href:n.canonical_url,target:"_blank",rel:"noreferrer",children:n.canonical_url}),e.jsxs("div",{className:"mt-1 cron-muted",children:["Task evidence: ",n.task_ids.join(", ")||"none"," · Papers: ",n.evidence_paper_ids.join(", ")]}),n.status!=="promoted"&&e.jsxs("div",{className:"mt-3 flex flex-wrap gap-2",children:[["dataset","task","metric"].map(D=>e.jsx("input",{"aria-label":`${n.canonical_name} ${D}`,className:"w-36 rounded border px-2 py-1",placeholder:D==="metric"?"Exact metric":`${D} ID`,value:o[D],onChange:i=>I(F=>({...F,[n.id]:{...o,[D]:i.target.value}}))},D)),e.jsx(P,{size:"sm",variant:"outline",disabled:!q||J.isPending,onClick:()=>J.mutate({id:n.id,...o}),children:"Promote & requeue evidence papers"})]})]},n.id)}),J.error&&e.jsx("div",{className:"cron-message cron-message--error",children:J.error.message})]}),e.jsxs("p",{className:"mt-4 text-xs cron-muted",children:["Showing the 100 most recent jobs · Queue totals include full history · Updated ",v(h.timestamp)]})]})]})]})}const Os=()=>{var d,j,_;const s=$e(),a=ps({queryKey:["catalog-audit"],queryFn:({pageParam:u})=>le.audit(u),initialPageParam:void 0,getNextPageParam:u=>u.next_cursor??void 0}),r=((d=a.data)==null?void 0:d.pages.flatMap(u=>u.events))??[],t=H({mutationFn:()=>le.acknowledgeAudit(),onSuccess:()=>s.invalidateQueries({queryKey:["catalog-audit"]})}),c=H({mutationFn:u=>le.rollbackEvent(u),onSuccess:()=>s.invalidateQueries({queryKey:["catalog-audit"]})});return e.jsx("div",{className:"space-y-4",children:e.jsxs(g,{children:[e.jsxs(N,{className:"flex-row items-center justify-between",children:[e.jsx(b,{children:"Catalog mutation audit"}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsxs("span",{className:"text-sm font-medium",children:[((_=(j=a.data)==null?void 0:j.pages[0])==null?void 0:_.unread_contributor_count)??0," unread contributor changes"]}),e.jsx(P,{variant:"outline",size:"sm",onClick:()=>t.mutate(),disabled:t.isPending,children:"Mark read"})]})]}),e.jsxs(f,{className:"space-y-3",children:[a.isLoading&&e.jsx("p",{children:"Loading audit history…"}),a.error&&e.jsx("p",{className:"text-destructive",children:"Audit history unavailable."}),r.map(u=>e.jsxs("article",{className:`rounded-md border p-3 ${u.operation==="delete"||u.rollback_eligible===!1?"border-red-500 bg-red-50/50":""}`,children:[e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[e.jsxs("strong",{children:[u.operation," ",u.entity_type," ",u.entity_id]}),e.jsxs("span",{className:"text-xs text-muted-foreground",children:["@",u.actor_username??u.actor_role," ·"," ",new Date(u.created_at).toLocaleString()]})]}),e.jsxs("details",{className:"mt-2 text-xs",children:[e.jsx("summary",{children:"Inspect snapshots"}),e.jsx("pre",{className:"mt-2 max-h-80 overflow-auto rounded bg-muted p-3",children:JSON.stringify({before:u.before,after:u.after},null,2)})]}),!u.rollback_of_event_id&&e.jsx(P,{className:"mt-3",variant:"outline",size:"sm",onClick:()=>c.mutate(u.id),disabled:c.isPending||u.rollback_eligible===!1,children:u.rollback_eligible===!1?"Rollback conflict":"Roll back if unchanged"})]},u.id)),a.hasNextPage&&e.jsx(P,{variant:"outline",onClick:()=>a.fetchNextPage(),disabled:a.isFetchingNextPage,children:a.isFetchingNextPage?"Loading…":"Load older events"})]})]})})};class Hs{constructor(a){this.request=a}getCronStatus(a=!1){const r=a?"?force_refresh=true":"";return this.request(`/cron/status${r}`,{cache:"no-store"})}getPaperMarkdownJobs(){return this.request("/cron/paper-markdown-jobs",{cache:"no-store"})}}const ke=new Hs(ns),Ce={hourly:"cron-status--running",daily:"cron-status--healthy",weekly:"cron-status--degraded",systemd:"cron-status--running"},S=s=>`$${(s/1e6).toFixed(2)}`,Us=({data:s,loading:a,error:r})=>{const[t,c]=x.useState("staging-current"),d={"staging-current":"Starter staging · $75 warning / $100 trip / no Environment cap","staging-production-era":"Staging with production · $15 / $20 / $25",production:"Production · $175 / $200 / $225"};if(a)return e.jsxs("div",{className:"flex items-center py-12",children:[e.jsx(A,{className:"h-6 w-6 animate-spin mr-3"}),"Loading chat compute…"]});if(r||!s)return e.jsx(g,{className:"cron-status--broken",children:e.jsx(f,{className:"pt-6",children:"Chat compute accounting is unavailable."})});const j=Math.min(100,s.effective_microusd/s.application_cap_microusd*100),_=s.circuit_state==="tripped"?"Chat disabled":s.circuit_state==="warning"?"Operator warning":"Enabled",u=s.reconciliation_state==="fresh"?"Fresh":s.reconciliation_state==="stale"?"Stale":"Unavailable";return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"grid md:grid-cols-4 gap-4",children:[e.jsxs(g,{className:s.circuit_state==="tripped"?"cron-status--broken":s.circuit_state==="warning"?"cron-status--degraded":"",children:[e.jsx(N,{children:e.jsx(b,{className:"text-sm",children:"Circuit"})}),e.jsxs(f,{children:[e.jsx("div",{className:"text-2xl font-bold",children:_}),e.jsx("p",{className:"text-xs cron-muted",children:s.trip_reason??"Policy armed"})]})]}),e.jsxs(g,{children:[e.jsx(N,{children:e.jsx(b,{className:"text-sm",children:"Month to date"})}),e.jsxs(f,{children:[e.jsx("div",{className:"text-2xl font-bold",children:S(s.effective_microusd)}),e.jsx("div",{role:"progressbar","aria-label":"Application cap used","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":Math.round(j),className:"h-2 rounded bg-muted mt-3",children:e.jsx("div",{className:"h-2 rounded bg-primary",style:{width:`${j}%`}})})]})]}),e.jsxs(g,{children:[e.jsx(N,{children:e.jsx(b,{className:"text-sm",children:"Application headroom"})}),e.jsxs(f,{children:[e.jsx("div",{className:"text-2xl font-bold",children:S(s.remaining_microusd)}),e.jsxs("p",{className:"text-xs cron-muted",children:["Cap ",S(s.application_cap_microusd)]})]})]}),e.jsxs(g,{children:[e.jsx(N,{children:e.jsx(b,{className:"text-sm",children:"Live compute"})}),e.jsxs(f,{children:[e.jsx("div",{className:"text-2xl font-bold",children:s.live_count}),e.jsxs("p",{className:"text-xs cron-muted",children:[s.termination_uncertain_count," termination uncertain"]})]})]})]}),e.jsxs(g,{children:[e.jsxs(N,{children:[e.jsx(b,{children:"Accounting and policy"}),e.jsxs(R,{children:[s.environment," · cycle ",s.billing_cycle]})]}),e.jsxs(f,{className:"grid md:grid-cols-3 gap-4 text-sm",children:[e.jsxs("div",{children:[e.jsx("strong",{children:"Environment record"}),e.jsx("br",{}),s.environment," · ",s.provider_mode==="starter_workspace"?"Starter Workspace":"Team isolated"]}),e.jsxs("label",{children:[e.jsx("strong",{children:"Policy profile"}),e.jsxs("select",{"aria-label":"Chat compute policy profile",value:t,onChange:m=>c(m.target.value),className:"block mt-1",children:[e.jsx("option",{value:"staging-current",children:"Staging now"}),e.jsx("option",{value:"staging-production-era",children:"Staging with production"}),e.jsx("option",{value:"production",children:"Production"})]}),e.jsxs("span",{className:"text-xs cron-muted",children:[d[t]," · Workspace $250"]})]}),e.jsxs("div",{children:[e.jsx("strong",{children:"Conservative estimate"}),e.jsx("br",{}),S(s.estimated_microusd)]}),e.jsxs("div",{children:[e.jsx("strong",{children:"Provider-reported floor"}),e.jsx("br",{}),S(s.provider_floor_microusd)," · ",e.jsx(C,{children:u})]}),e.jsxs("div",{children:[e.jsx("strong",{children:"Provider backstops"}),e.jsx("br",{}),s.environment_cap_microusd===null?"Starter: no Environment cap":`Environment ${S(s.environment_cap_microusd)}`," · Workspace ",S(s.workspace_cap_microusd)]}),e.jsxs("div",{children:[e.jsx("strong",{children:"Active thresholds"}),e.jsx("br",{}),"Warning ",S(s.warning_microusd)," · trip ",S(s.application_cap_microusd)]}),e.jsxs("div",{children:[e.jsx("strong",{children:"Policy allocation"}),e.jsx("br",{}),"Starter staging $75/$100 with no Environment cap · future Team staging $15/$20/$25 · production $175/$200/$225 · workspace $250"]}),e.jsxs("div",{children:[e.jsx("strong",{children:"Cycle end"}),e.jsx("br",{}),v(s.cycle_end_at)]}),e.jsxs("div",{children:[e.jsx("strong",{children:"Last metered"}),e.jsx("br",{}),s.last_metered_at?v(s.last_metered_at):"Unavailable"]}),e.jsxs("div",{children:[e.jsx("strong",{children:"Provider reconciliation"}),e.jsx("br",{}),s.last_reconciled_at?v(s.last_reconciled_at):"Unavailable",s.last_reconciliation_attempt_at?` · attempted ${v(s.last_reconciliation_attempt_at)}`:"",s.next_reconciliation_at?` · next ${v(s.next_reconciliation_at)}`:""]}),e.jsxs("div",{children:[e.jsx("strong",{children:"Burn projection"}),e.jsx("br",{}),s.burn_rate_microusd_per_hour===null?"Not enough data":`${S(s.burn_rate_microusd_per_hour)}/hour${s.projected_cap_hit_at?` · cap ${v(s.projected_cap_hit_at)}`:""}`]}),e.jsxs("div",{children:[e.jsx("strong",{children:"Prior cycle"}),e.jsx("br",{}),s.prior_cycle?`${s.prior_cycle.billing_cycle} · ${S(s.prior_cycle.effective_microusd)}`:"Not enough data"]})]})]}),e.jsxs(g,{children:[e.jsx(N,{children:e.jsx(b,{children:"Live lifecycle"})}),e.jsx(f,{className:"text-sm",children:Object.entries(s.live_states).map(([m,y])=>e.jsxs("span",{className:"mr-4",children:[m,": ",y]},m))})]}),e.jsxs(g,{children:[e.jsx(N,{children:e.jsx(b,{children:"Daily spend"})}),e.jsx(f,{children:s.daily_spend.length?e.jsx("ul",{className:"space-y-1 text-sm",children:s.daily_spend.map(m=>e.jsxs("li",{children:[m.date,": blank ",S(m.blank_pool_microusd)," · assigned ",S(m.assigned_microusd)]},m.date))}):e.jsx("p",{className:"cron-muted",children:"No compute recorded in this cycle."})})]}),e.jsxs(g,{children:[e.jsxs(N,{children:[e.jsx(b,{children:"Recent circuit events"}),e.jsx(R,{children:"Runbook: docs/chat-sandbox-spend-runbook.md"})]}),e.jsx(f,{children:s.events.length?e.jsx("ul",{className:"space-y-2 text-sm",children:s.events.map(m=>e.jsxs("li",{children:[e.jsx(C,{children:m.severity})," ",m.type," · ",v(m.created_at)]},m.id))}):e.jsx("p",{className:"cron-muted",children:"No events in this cycle."})})]})]})},Ws=({data:s,loading:a,error:r})=>{if(a)return e.jsxs("div",{className:"flex items-center py-8",children:[e.jsx(A,{className:"h-5 w-5 animate-spin mr-3"}),"Loading web-search budget…"]});if(r||!s)return e.jsx(g,{className:"cron-status--broken",children:e.jsx(f,{className:"pt-6",children:"Web-search budget accounting is unavailable."})});const t=Math.min(100,s.call_count/s.hard_limit_calls*100);return e.jsxs(g,{className:s.circuit_state==="tripped"?"cron-status--broken":s.circuit_state==="warning"||s.circuit_state==="cooldown"?"cron-status--degraded":"",children:[e.jsxs(N,{children:[e.jsx(b,{children:"Web search"}),e.jsxs(R,{children:[s.environment," · UTC cycle ",s.billing_cycle," · provider details are admin-only"]})]}),e.jsxs(f,{className:"space-y-4",children:[e.jsxs("div",{className:"grid md:grid-cols-4 gap-4 text-sm",children:[e.jsxs("div",{children:[e.jsx("strong",{children:"Circuit"}),e.jsx("br",{}),s.circuit_state,s.trip_reason?` · ${s.trip_reason}`:""]}),e.jsxs("div",{children:[e.jsx("strong",{children:"Calls"}),e.jsx("br",{}),s.call_count," / ",s.hard_limit_calls," · ",s.success_count," successful"]}),e.jsxs("div",{children:[e.jsx("strong",{children:"Remaining"}),e.jsx("br",{}),s.remaining_calls]}),e.jsxs("div",{children:[e.jsx("strong",{children:"Warning"}),e.jsx("br",{}),s.warning_calls," calls"]})]}),e.jsx("div",{role:"progressbar","aria-label":"Web-search monthly budget used","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":Math.round(t),className:"h-2 rounded bg-muted",children:e.jsx("div",{className:"h-2 rounded bg-primary",style:{width:`${t}%`}})}),e.jsxs("p",{className:"text-xs cron-muted",children:["Cycle ends ",v(s.cycle_end_at)," · provider-reported cost $",(s.provider_cost_microusd/1e6).toFixed(4),s.last_latency_ms!==null?` · last ${s.last_latency_ms} ms / ${s.last_result_count??0} results`:"",s.cooldown_until?` · cooldown until ${v(s.cooldown_until)}`:"",s.last_provider_error_class?` · last provider error ${s.last_provider_error_class}`:""]}),s.events.length>0&&e.jsx("ul",{className:"space-y-1 text-sm",children:s.events.map(c=>e.jsxs("li",{children:[c.type," · ",v(c.created_at),c.error_class?` · ${c.error_class}`:""]},c.id))})]})]})},Bs=({data:s})=>s!=null&&s.snapshot_stale?e.jsx(g,{className:"mb-6 cron-status--degraded",role:"status",children:e.jsx(f,{className:"pt-6",children:e.jsxs("div",{className:"flex items-center gap-3 text-sm",children:[e.jsx(A,{className:"h-4 w-4 animate-spin"}),e.jsxs("span",{children:["Refreshing status… Current snapshot is ",Math.ceil(s.snapshot_age_seconds)," seconds old."]})]})})}):null,zs=(s,a)=>s!=null&&s.snapshot_stale||s!=null&&s.refreshing?1e3:a?3e4:!1,ca=()=>{const s=is(),[a,r]=x.useState(!0),[t,c]=x.useState(0),[d,j]=x.useState(""),[_,u]=x.useState(""),[m,y]=x.useState(new Set),w=x.useRef(!1),{user:l}=ts(),{data:p,isLoading:I,isFetching:V,error:h,refetch:Z}=Q({queryKey:["cronStatus",l==null?void 0:l.username],queryFn:()=>{const i=w.current;return w.current=!1,ke.getCronStatus(i)},enabled:!!(l!=null&&l.is_admin),refetchInterval:i=>zs(i.state.data,a),retry:!1}),U=Q({queryKey:["paperMarkdownJobs",l==null?void 0:l.username],queryFn:()=>ke.getPaperMarkdownJobs(),enabled:!!(l!=null&&l.is_admin),refetchInterval:a?3e4:!1,retry:!1}),$=Q({queryKey:["chatSandboxSpend",l==null?void 0:l.username,_],queryFn:()=>fe.getSandboxSpend(_||void 0),enabled:!!(l!=null&&l.is_admin),refetchInterval:a?3e4:!1,retry:!1}),M=Q({queryKey:["chatWebSearchBudget",l==null?void 0:l.username],queryFn:()=>fe.getWebSearchBudget(),enabled:!!(l!=null&&l.is_admin)&&s,refetchInterval:a?3e4:!1,retry:!1}),Y=(h&&typeof h=="object"&&"status"in h?h.status:void 0)===401?"Unauthorized. Sign in with an allowlisted Hugging Face admin account.":h instanceof Error?h.message:void 0,ie=i=>{y(F=>{const O=new Set(F);return O.has(i)?O.delete(i):O.add(i),O})},K=(p==null?void 0:p.jobs.filter(i=>i.dashboard_group==="leaderboard_sync"))??[],J=(p==null?void 0:p.jobs.filter(i=>i.category!=="manual"&&i.dashboard_group!=="leaderboard_sync"))??[],ee=J.filter(i=>i.critical),se=J.filter(i=>!i.critical),n=(p==null?void 0:p.manual_operations)??[],o=se.reduce((i,F)=>(i[F.category]||(i[F.category]=[]),i[F.category].push(F),i),{}),q=Object.keys(o).sort((i,F)=>{const O=["systemd","hourly","daily","weekly","backfill"];return O.indexOf(i)-O.indexOf(F)}),E=i=>e.jsx(As,{job:i,expanded:m.has(i.job_name),onToggle:()=>ie(i.job_name),paperMarkdownJobs:i.job_name==="paper_markdown_backfill"?U.data:void 0,paperMarkdownJobsLoading:i.job_name==="paper_markdown_backfill"?U.isLoading:!1,paperMarkdownJobsError:i.job_name==="paper_markdown_backfill"?U.error:null},i.job_name),D=()=>{c(i=>i+1),w.current=!0,Z(),U.refetch(),$.refetch()};return e.jsx("div",{className:"cron-dashboard","data-shadcn":!0,children:e.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8",children:[e.jsx("div",{className:"mb-8",children:e.jsxs("div",{className:"flex items-center justify-between gap-4 flex-wrap",children:[e.jsxs("div",{children:[e.jsxs("h1",{className:"text-3xl font-bold flex items-center gap-3",children:[e.jsx(ae,{className:"h-8 w-8 cron-info-text"}),"Admin Dashboard"]}),e.jsx("p",{className:"mt-2 cron-muted",children:"Paper curation queue and operational health for scheduled jobs"})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsxs(P,{variant:"outline",size:"sm",onClick:()=>r(!a),className:a?"cron-status--running":"",children:[e.jsx(ge,{className:`h-4 w-4 mr-2 ${a?"animate-spin":""}`}),"Auto-refresh ",a?"ON":"OFF"]}),e.jsxs(P,{variant:"outline",size:"sm",onClick:D,disabled:V,children:[e.jsx(ge,{className:`h-4 w-4 mr-2 ${V?"animate-spin":""}`}),"Refresh"]})]})]})}),e.jsx(g,{className:"mb-6",children:e.jsx(f,{className:"pt-6",children:e.jsxs("p",{className:"text-sm cron-muted",children:["Signed in as ",e.jsxs("span",{className:"font-semibold",children:["@",l==null?void 0:l.username]}),". Health checks prefer database freshness over log completion so silent no-work failures surface as degraded or broken."]})})}),e.jsx(Bs,{data:p}),e.jsxs(Ss,{defaultValue:"critical-jobs",children:[e.jsxs(We,{className:"grid h-auto w-full grid-cols-2 sm:w-auto sm:grid-cols-5",children:[e.jsx(W,{value:"critical-jobs",children:"Critical Jobs"}),e.jsx(W,{value:"leaderboard-syncs",children:"Leaderboard Syncs"}),e.jsx(W,{value:"codex-paper-jobs",children:"Codex Paper Jobs"}),e.jsx(W,{value:"catalog-audit",children:"Catalog Audit"}),e.jsx(W,{value:"chat-compute",children:"Chat Compute"})]}),e.jsxs(B,{value:"critical-jobs",className:"mt-6",children:[I&&e.jsxs("div",{className:"flex items-center justify-center py-12",children:[e.jsx(A,{className:"h-8 w-8 animate-spin cron-info-text"}),e.jsx("span",{className:"ml-3 cron-muted",children:"Loading CRON jobs status..."})]}),h&&e.jsx(g,{className:"cron-status--broken",children:e.jsx(f,{className:"pt-6",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(X,{className:"h-5 w-5"}),e.jsx("p",{children:Y??"Failed to load CRON jobs status. Please try again."})]})})}),p&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-6 gap-4 mb-6",children:["healthy","degraded","broken","running","stuck","unknown"].map(i=>e.jsxs(g,{children:[e.jsx(N,{className:"pb-2",children:e.jsx(b,{className:"text-sm font-medium cron-muted capitalize",children:i})}),e.jsx(f,{children:e.jsx("div",{className:"text-2xl font-bold",children:p.summary[i]})})]},i))}),p.summary.critical_issues.length>0&&e.jsxs(g,{className:"mb-6 cron-status--broken",children:[e.jsx(N,{children:e.jsxs(b,{className:"flex items-center gap-2",children:[e.jsx(xs,{className:"h-5 w-5"}),"Critical job issues"]})}),e.jsx(f,{children:e.jsx("ul",{className:"list-disc pl-5 space-y-1 text-sm",children:p.summary.critical_issues.map(i=>e.jsx("li",{children:i},i))})})]}),e.jsxs(g,{className:"mb-8",children:[e.jsx(N,{children:e.jsx(b,{className:"text-base",children:"What to check next"})}),e.jsxs(f,{children:[e.jsx("p",{className:"text-sm cron-muted",children:p.summary.what_to_check_next}),e.jsxs("p",{className:"mt-2 text-xs cron-muted flex items-center gap-2",children:[e.jsx(Le,{className:"h-4 w-4"}),"Last updated: ",v(p.timestamp)," · Health score:"," ",p.summary.health_score.toFixed(0),"%"]})]})]}),e.jsxs(g,{className:`mb-8 ${p.summary.coverage.coverage_gaps?"cron-status--broken":""}`,children:[e.jsxs(N,{children:[e.jsx(b,{className:"text-base",children:"Coverage"}),e.jsx(R,{children:"Registry and deployed scheduler inventory"})]}),e.jsxs(f,{className:"grid grid-cols-2 md:grid-cols-4 gap-4 text-sm",children:[e.jsxs("div",{children:[e.jsx("span",{className:"cron-label",children:"Registered"}),e.jsx("div",{className:"text-2xl font-bold",children:p.summary.coverage.registered_scheduled_duties})]}),e.jsxs("div",{children:[e.jsx("span",{className:"cron-label",children:"Discovered"}),e.jsx("div",{className:"text-2xl font-bold",children:p.summary.coverage.discovered_scheduled_duties})]}),e.jsxs("div",{children:[e.jsx("span",{className:"cron-label",children:"Monitored"}),e.jsx("div",{className:"text-2xl font-bold",children:p.summary.coverage.monitored_duties})]}),e.jsxs("div",{children:[e.jsx("span",{className:"cron-label",children:"Gaps"}),e.jsx("div",{className:"text-2xl font-bold",children:p.summary.coverage.coverage_gaps})]})]})]}),e.jsxs(g,{className:"mb-8",children:[e.jsxs(N,{children:[e.jsx(b,{className:"text-xl",children:"Critical jobs"}),e.jsx(R,{children:"Writers whose stale output breaks the live site"})]}),e.jsx(f,{className:"space-y-4",children:ee.map(E)})]}),e.jsx("div",{className:"space-y-6",children:q.map(i=>e.jsxs(g,{children:[e.jsx(N,{children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs(b,{className:"text-xl capitalize flex items-center gap-2",children:[e.jsx(C,{className:Ce[i]??Ce.hourly,children:i}),e.jsx("span",{children:"Supporting jobs"})]}),e.jsxs(R,{children:[o[i].length," job",o[i].length!==1?"s":""]})]})}),e.jsx(f,{className:"space-y-4",children:o[i].map(E)})]},i))}),n.length>0&&e.jsxs(g,{className:"mt-6",children:[e.jsxs(N,{children:[e.jsx(b,{className:"text-xl",children:"Manual operations"}),e.jsx(R,{children:"Visible invocation history; excluded from scheduled health and coverage"})]}),e.jsx(f,{className:"space-y-4",children:n.map(E)})]})]})]}),e.jsxs(B,{value:"leaderboard-syncs",className:"mt-6",children:[I&&e.jsxs("div",{className:"flex items-center justify-center py-12",children:[e.jsx(A,{className:"h-8 w-8 animate-spin cron-info-text"}),e.jsx("span",{className:"ml-3 cron-muted",children:"Loading leaderboard sync status..."})]}),h&&e.jsx(g,{className:"cron-status--broken",children:e.jsx(f,{className:"pt-6",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(X,{className:"h-5 w-5"}),e.jsx("p",{children:Y??"Failed to load leaderboard sync status. Please try again."})]})})}),p&&e.jsxs(g,{children:[e.jsx(N,{children:e.jsxs("div",{className:"flex items-center justify-between gap-4",children:[e.jsxs("div",{children:[e.jsx(b,{className:"text-xl",children:"Leaderboard syncs"}),e.jsx(R,{children:"Recurring imports from externally maintained benchmark leaderboards"})]}),e.jsxs(C,{children:[K.length," jobs"]})]})}),e.jsx(f,{className:"space-y-4",children:K.map(E)})]})]}),e.jsx(B,{value:"codex-paper-jobs",className:"mt-6",children:e.jsx(Js,{autoRefresh:a,refreshToken:t})}),e.jsx(B,{value:"catalog-audit",className:"mt-6",children:e.jsx(Os,{})}),e.jsxs(B,{value:"chat-compute",className:"mt-6",children:[e.jsxs(g,{className:"mb-6",children:[e.jsxs(N,{children:[e.jsx(b,{children:"Environment record"}),e.jsx(R,{children:"Leave blank for live staging, or enter the isolated environment printed by the spend qualification command."})]}),e.jsxs(f,{className:"flex gap-2",children:[e.jsx("input",{"aria-label":"Chat compute environment record",value:d,onChange:i=>j(i.target.value),placeholder:"staging-q-example",className:"flex-1 rounded border px-3 py-2"}),e.jsx(P,{onClick:()=>u(d.trim()),children:"Load"})]})]}),e.jsx(Us,{data:$.data,loading:$.isLoading,error:$.error}),s&&e.jsx("div",{className:"mt-6",children:e.jsx(Ws,{data:M.data,loading:M.isLoading,error:M.error})})]})]})]})})};export{Us as ChatComputePanel,Bs as CronSnapshotNotice,Ws as WebSearchBudgetPanel,zs as cronStatusRefetchInterval,ca as default}; diff --git a/assets/CronDashboard-Cn8uaVGb.js b/assets/CronDashboard-Cn8uaVGb.js deleted file mode 100644 index bdc12a926b2606baab2b9d366e8b89579e600ac4..0000000000000000000000000000000000000000 --- a/assets/CronDashboard-Cn8uaVGb.js +++ /dev/null @@ -1,56 +0,0 @@ -import{d as T,r as x,j as e,q as k,t as Qe,k as Xe,h as ne,V as Ze,R as Ye,I as es,m as ce,P as ss,p as as,v as Se,g as $e,L as rs,Z as ns,y as ts,b as is}from"./index-Cry0GNHI.js";import{u as Q}from"./useQuery-DlAfMYOD.js";import{B as C,D as pe,r as cs,f as ls,h as os,j as ds,p as ms,k as us}from"./codexAddEvals-DrSFgeIY.js";import{B as P}from"./button-QVzubJLr.js";import{C as hs}from"./chevron-down-DR8n8lNp.js";import{F as je}from"./file-text-DXZT7Qxr.js";import{C as X,R as ge,S as xs}from"./shield-alert-CjZsQbM-.js";import{L as A}from"./loader-circle-C6beazQX.js";import{C as me}from"./circle-check-CFRMmRHN.js";import{E as oe}from"./external-link-DIcR472K.js";import{u as H}from"./useMutation-C5zYPeQC.js";import{u as ps}from"./useInfiniteQuery-C8Q6ynv2.js";import{c as le}from"./catalog-BjZE6R9z.js";import{c as fe}from"./chat-FW6HqAah.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 ae=T("Activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);/** - * @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 ve=T("Calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);/** - * @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 js=T("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/** - * @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 gs=T("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/** - * @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 fs=T("CirclePlay",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polygon",{points:"10 8 16 12 10 16 10 8",key:"1cimsy"}]]);/** - * @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 vs=T("CircleSlash2",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M22 2 2 22",key:"y4kqgn"}]]);/** - * @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 _s=T("Clock3",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16.5 12",key:"1aq6pp"}]]);/** - * @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 Le=T("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/** - * @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 Ns=T("Images",[["path",{d:"M18 22H4a2 2 0 0 1-2-2V6",key:"pblm9e"}],["path",{d:"m22 13-1.296-1.296a2.41 2.41 0 0 0-3.408 0L11 18",key:"nf6bnh"}],["circle",{cx:"12",cy:"8",r:"2",key:"1822b1"}],["rect",{width:"16",height:"16",x:"6",y:"2",rx:"2",key:"12espp"}]]);/** - * @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 bs=T("TrendingUp",[["polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17",key:"126l90"}],["polyline",{points:"16 7 22 7 22 13",key:"kwv8wd"}]]);/** - * @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 Re=T("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]),g=x.forwardRef(({className:s,...a},r)=>e.jsx("div",{ref:r,className:k("rounded-lg border bg-card text-card-foreground shadow-sm",s),...a}));g.displayName="Card";const N=x.forwardRef(({className:s,...a},r)=>e.jsx("div",{ref:r,className:k("flex flex-col space-y-1.5 p-6",s),...a}));N.displayName="CardHeader";const b=x.forwardRef(({className:s,...a},r)=>e.jsx("h3",{ref:r,className:k("text-2xl font-semibold leading-none tracking-tight",s),...a}));b.displayName="CardTitle";const R=x.forwardRef(({className:s,...a},r)=>e.jsx("p",{ref:r,className:k("text-sm text-muted-foreground",s),...a}));R.displayName="CardDescription";const f=x.forwardRef(({className:s,...a},r)=>e.jsx("div",{ref:r,className:k("p-6 pt-0",s),...a}));f.displayName="CardContent";const ys=x.forwardRef(({className:s,...a},r)=>e.jsx("div",{ref:r,className:k("flex items-center p-6 pt-0",s),...a}));ys.displayName="CardFooter";var te="Tabs",[ws]=as(te,[Se]),Pe=Se(),[ks,ue]=ws(te),Te=x.forwardRef((s,a)=>{const{__scopeTabs:r,value:t,onValueChange:c,defaultValue:d,orientation:j="horizontal",dir:_,activationMode:u="automatic",...m}=s,y=Qe(_),[w,l]=Xe({prop:t,onChange:c,defaultProp:d??"",caller:te});return e.jsx(ks,{scope:r,baseId:Ze(),value:w,onValueChange:l,orientation:j,dir:y,activationMode:u,children:e.jsx(ne.div,{dir:y,"data-orientation":j,...m,ref:a})})});Te.displayName=te;var Fe="TabsList",Ae=x.forwardRef((s,a)=>{const{__scopeTabs:r,loop:t=!0,...c}=s,d=ue(Fe,r),j=Pe(r);return e.jsx(Ye,{asChild:!0,...j,orientation:d.orientation,dir:d.dir,loop:t,children:e.jsx(ne.div,{role:"tablist","aria-orientation":d.orientation,...c,ref:a})})});Ae.displayName=Fe;var Me="TabsTrigger",Ee=x.forwardRef((s,a)=>{const{__scopeTabs:r,value:t,disabled:c=!1,...d}=s,j=ue(Me,r),_=Pe(r),u=Ie(j.baseId,t),m=Je(j.baseId,t),y=t===j.value;return e.jsx(es,{asChild:!0,..._,focusable:!c,active:y,children:e.jsx(ne.button,{type:"button",role:"tab","aria-selected":y,"aria-controls":m,"data-state":y?"active":"inactive","data-disabled":c?"":void 0,disabled:c,id:u,...d,ref:a,onMouseDown:ce(s.onMouseDown,w=>{!c&&w.button===0&&w.ctrlKey===!1?j.onValueChange(t):w.preventDefault()}),onKeyDown:ce(s.onKeyDown,w=>{[" ","Enter"].includes(w.key)&&j.onValueChange(t)}),onFocus:ce(s.onFocus,()=>{const w=j.activationMode!=="manual";!y&&!c&&w&&j.onValueChange(t)})})})});Ee.displayName=Me;var qe="TabsContent",De=x.forwardRef((s,a)=>{const{__scopeTabs:r,value:t,forceMount:c,children:d,...j}=s,_=ue(qe,r),u=Ie(_.baseId,t),m=Je(_.baseId,t),y=t===_.value,w=x.useRef(y);return x.useEffect(()=>{const l=requestAnimationFrame(()=>w.current=!1);return()=>cancelAnimationFrame(l)},[]),e.jsx(ss,{present:c||y,children:({present:l})=>e.jsx(ne.div,{"data-state":y?"active":"inactive","data-orientation":_.orientation,role:"tabpanel","aria-labelledby":u,hidden:!l,id:m,tabIndex:0,...j,ref:a,style:{...s.style,animationDuration:w.current?"0s":void 0},children:l&&d})})});De.displayName=qe;function Ie(s,a){return`${s}-trigger-${a}`}function Je(s,a){return`${s}-content-${a}`}var Cs=Te,Oe=Ae,He=Ee,Ue=De;const Ss=Cs,We=x.forwardRef(({className:s,...a},r)=>e.jsx(Oe,{ref:r,className:k("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",s),...a}));We.displayName=Oe.displayName;const W=x.forwardRef(({className:s,...a},r)=>e.jsx(He,{ref:r,className:k("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",s),...a}));W.displayName=He.displayName;const B=x.forwardRef(({className:s,...a},r)=>e.jsx(Ue,{ref:r,className:k("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",s),...a}));B.displayName=Ue.displayName;function v(s){if(!s)return"Never";const a=new Date(s);if(Number.isNaN(a.getTime()))return s;const r=Date.now()-a.getTime(),t=Math.floor(r/6e4),c=Math.floor(r/36e5),d=Math.floor(r/864e5);return t<1?"Just now":t<60?`${t}m ago`:c<24?`${c}h ago`:d<7?`${d}d ago`:a.toLocaleString("en-US",{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}function re(s){return s==null?"N/A":s<60?`${s.toFixed(1)}s`:s<3600?`${(s/60).toFixed(1)}m`:`${(s/3600).toFixed(1)}h`}function Be(s){return s.available?s.status==="completed"?s.conclusion??"completed":s.status??"unknown":"Unavailable"}function he(s){return s.replace(/_/g," ").replace(/\b\w/g,a=>a.toUpperCase())}const L=s=>`$${s.toFixed(2)}`;function _e({title:s,budget:a,profile:r}){const t=a.cost_policy==="unmetered_hf"||a.budget_enforced===!1,c=Math.min(100,a.current_exposure_usd/a.ceiling_usd*100),d=t?"Unmetered HF":a.affordable_jobs===0&&a.desired_jobs>0?"No shard fits":a.affordable_jobs0?"Now":"No scheduled admission"})]}),e.jsxs("div",{children:[e.jsx("span",{className:"cron-label",children:"Unknown terminal reserve"}),e.jsxs("div",{children:[L(a.unknown_terminal_reservation_usd??0)," · ",(a.unknown_terminal_reservation_count??0).toLocaleString()," jobs"]})]})]}),r&&e.jsxs("div",{className:"text-xs cron-muted",children:["Profile ",e.jsx("strong",{children:r.profile_id})," · max ",r.max_papers.toLocaleString()," papers · hard ",re(r.hard_timeout_seconds)," · soft ",re(r.soft_deadline_seconds)]}),e.jsx("p",{className:"text-xs cron-muted",children:t?"HF owns this workload, so monetary admission is disabled; concurrency and timeout limits still apply. Runtime cost remains an operational estimate.":"Projected exposure is an admission-control estimate, not a provider invoice. Each launch reserves the full timeout until actual runtime is known."})]})}const $s={healthy:me,degraded:Re,broken:X,running:A,stuck:X,unknown:gs};function Ls({status:s,isRunning:a}){const r=a?"running":s,t=$s[r];return e.jsx(t,{className:`cron-status-icon cron-status--${r}${r==="running"?" animate-spin":""}`})}function Ne({label:s,axis:a}){return e.jsxs(C,{variant:"outline",className:`cron-status--${a.status}`,title:a.reason,children:[s,": ",a.status]})}function be({icon:s,title:a,metrics:r}){return e.jsxs("div",{children:[e.jsxs("div",{className:"cron-section-heading",children:[e.jsx(s,{className:"h-4 w-4"}),e.jsx("h4",{children:a})]}),e.jsx("div",{className:"grid grid-cols-2 gap-3",children:Object.entries(r).map(([t,c])=>e.jsxs("div",{className:"cron-metric-card",children:[e.jsx("div",{className:"cron-label",children:he(t)}),e.jsx("div",{className:"text-lg font-semibold",children:typeof c=="number"?c.toLocaleString():c})]},t))})]})}function Rs({workflow:s}){return e.jsxs("div",{children:[e.jsxs("div",{className:"cron-section-heading",children:[e.jsx(ae,{className:"h-4 w-4"}),e.jsx("h4",{children:"GitHub Actions"})]}),e.jsxs("div",{className:"cron-metric-card space-y-2 text-sm",children:[[["Workflow",s.workflow_file],["Run",s.run_id??"N/A"],["Status",Be(s)],...s.updated_at?[["Updated",v(s.updated_at)]]:[]].map(([a,r])=>e.jsxs("div",{className:"flex items-center justify-between gap-3",children:[e.jsx("span",{className:"cron-label",children:a}),e.jsx("span",{className:a==="Workflow"?"font-mono text-xs":void 0,children:r})]},a)),s.failed_jobs&&s.failed_jobs.length>0&&e.jsxs("div",{children:[e.jsx("div",{className:"cron-label mb-1",children:"Failed jobs"}),e.jsx("div",{className:"flex gap-2 flex-wrap",children:s.failed_jobs.map(a=>e.jsx(C,{variant:"outline",className:"cron-status--broken",children:a},a))})]}),s.job_conclusions&&Object.keys(s.job_conclusions).length>0&&e.jsxs("div",{children:[e.jsx("div",{className:"cron-label mb-1",children:"Job conclusions"}),e.jsx("div",{className:"flex gap-2 flex-wrap",children:Object.entries(s.job_conclusions).map(([a,r])=>e.jsxs(C,{variant:"outline",children:[a,": ",r??"running"]},a))})]}),(s.error||s.view_error)&&e.jsx("div",{className:"cron-message cron-message--error",children:s.error??s.view_error})]})]})}function Ps(s){return s==="COMPLETED"?"cron-status--healthy":s==="ERROR"||s==="CANCELED"?"cron-status--broken":s==="RUNNING"?"cron-status--running":"cron-status--unknown"}function ye(s){return s==="success"?"cron-status--healthy":s==="partial"||s==="interrupted"?"cron-status--degraded":s==="infrastructure_failure"||s==="worker_failure"?"cron-status--broken":s==="active"?"cron-status--running":"cron-status--unknown"}function Ts({job:s}){const a=s.progress,r=(a==null?void 0:a.omitted_images)??0,t=a!=null&&a.total_papers?Math.min(100,a.processed_papers/a.total_papers*100):0;return e.jsxs("div",{className:"cron-metric-card space-y-3",children:[e.jsxs("div",{className:"flex items-start justify-between gap-3",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsxs("div",{className:"font-semibold",children:[s.mode??"unknown"," · shard ",s.shard_id??"N/A"," · attempt ",s.provider_attempt??1]}),e.jsx("div",{className:"font-mono text-xs cron-muted truncate",children:s.id})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(C,{variant:"outline",className:Ps(s.stage),children:s.stage.toLowerCase()}),s.effective_outcome&&e.jsxs(C,{variant:"outline",className:ye(s.effective_outcome),children:["output: ",s.effective_outcome.replace(/_/g," ")]}),s.failure_cause&&e.jsxs(C,{variant:"outline",className:ye(s.effective_outcome),children:["cause: ",s.failure_cause.replace(/_/g," ")]}),s.url&&e.jsx("a",{href:s.url,target:"_blank",rel:"noreferrer","aria-label":`Open Hugging Face Job ${s.id}`,className:"cron-info-text",children:e.jsx(oe,{className:"h-4 w-4"})})]})]}),a?e.jsxs(e.Fragment,{children:[e.jsxs("div",{children:[e.jsxs("div",{className:"flex justify-between gap-3 text-xs cron-muted mb-1",children:[e.jsxs("span",{children:[a.processed_papers.toLocaleString()," / ",a.total_papers.toLocaleString()," papers"]}),e.jsxs("span",{children:[t.toFixed(0),"%"]})]}),e.jsx("div",{className:"cron-progress-track",children:e.jsx("div",{className:"cron-progress-value",style:{width:`${t}%`}})})]}),e.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-2 text-sm",children:[e.jsxs("span",{children:[e.jsx("strong",{children:a.succeeded_papers.toLocaleString()})," succeeded"]}),e.jsxs("span",{children:[e.jsx("strong",{children:a.failed_papers.toLocaleString()})," failed"]}),e.jsxs("span",{children:[e.jsx("strong",{children:a.already_existed_papers.toLocaleString()})," skipped"]}),e.jsxs("span",{children:[e.jsx("strong",{children:a.extracted_images.toLocaleString()})," images"]})]}),r>0&&e.jsxs("div",{className:"text-xs cron-muted",children:[e.jsx("strong",{children:r.toLocaleString()})," unresolved image references omitted after final retry"]}),a.updated_at&&e.jsxs("div",{className:"text-xs cron-muted",children:["Progress updated ",v(a.updated_at)]}),(a.fatal_error||a.error_samples.length>0)&&e.jsxs("div",{className:"cron-message cron-message--error space-y-1",children:[a.fatal_error&&e.jsx("div",{children:a.fatal_error}),a.error_samples.map(c=>e.jsxs("div",{children:[e.jsx("span",{className:"font-mono",children:c.arxiv_id}),": ",c.error]},`${c.arxiv_id}:${c.error}`))]})]}):e.jsx("div",{className:"text-sm cron-muted",children:"Waiting for the shard progress checkpoint."}),e.jsxs("div",{className:"flex flex-wrap gap-x-4 gap-y-1 text-xs cron-muted",children:[s.hardware&&e.jsx("span",{children:s.hardware}),s.created_at&&e.jsxs("span",{children:["Created ",v(s.created_at)]}),s.duration_seconds!=null&&e.jsxs("span",{children:["Duration ",re(s.duration_seconds)]})]}),s.stage_message&&e.jsx("div",{className:"cron-message cron-message--warning",children:s.stage_message})]})}function Fs({monitor:s,loading:a,error:r}){var t,c;return e.jsxs("div",{className:"md:col-span-2",children:[e.jsxs("div",{className:"cron-section-heading",children:[e.jsx(Ns,{className:"h-4 w-4"}),e.jsx("h4",{children:"Hugging Face OCR shards"})]}),a&&e.jsxs("div",{className:"cron-metric-card flex items-center gap-2 text-sm cron-muted",children:[e.jsx(A,{className:"h-4 w-4 animate-spin"})," Loading remote Jobs…"]}),!!r&&e.jsx("div",{className:"cron-message cron-message--error",children:"Could not load Hugging Face Jobs."}),s&&!s.available&&e.jsx("div",{className:"cron-message cron-message--warning",children:s.error??"Hugging Face monitoring is unavailable."}),(s==null?void 0:s.available)&&e.jsxs(e.Fragment,{children:[s.budgets.live&&s.budgets.backfill&&e.jsxs("div",{className:"grid grid-cols-1 xl:grid-cols-2 gap-3 mb-3",children:[e.jsx(_e,{title:"Live paper Markdown GPU policy",budget:s.budgets.live,profile:(t=s.selected_profiles)==null?void 0:t.live}),e.jsx(_e,{title:"Full backfill GPU policy",budget:s.budgets.backfill,profile:(c=s.selected_profiles)==null?void 0:c.backfill})]}),e.jsxs("div",{className:`cron-message mb-3 ${(s.summary.unresolved_mount_failures??0)>0?"cron-message--error":""}`,children:[e.jsx("strong",{children:"Logical shard health:"})," ",(s.summary.logical_shards??0).toLocaleString()," logical shards / ",(s.summary.provider_attempts??0).toLocaleString()," provider attempts · ",(s.summary.recovered_mount_failures??0).toLocaleString()," recovered mount failures · ",(s.summary.unresolved_mount_failures??0).toLocaleString()," unresolved"]}),e.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-3 mb-3",children:Object.entries(s.summary).map(([d,j])=>e.jsxs("div",{className:"cron-metric-card",children:[e.jsx("div",{className:"cron-label",children:he(d)}),e.jsx("div",{className:"text-lg font-semibold",children:j.toLocaleString()})]},d))}),e.jsx("p",{className:"text-xs cron-muted mb-3",children:"Efficiency and backlog-clearance costs are admission-control estimates, not provider invoices."}),s.coverage&&Object.keys(s.coverage).length>0&&e.jsx("div",{className:"grid grid-cols-1 xl:grid-cols-2 gap-3 mb-3",children:Object.values(s.coverage).map(d=>e.jsxs("div",{className:"cron-metric-card space-y-2 text-sm",children:[e.jsx("div",{className:"font-semibold",children:d.scope==="full"?"Full catalog coverage":"Recent 14-day coverage"}),e.jsxs("div",{className:"text-lg font-semibold",children:[d.coverage_percentage.toFixed(2),"%"]}),e.jsxs("div",{children:[d.canonical_markdown_count.toLocaleString()," canonical / ",d.eligible_papers.toLocaleString()," eligible · ",d.missing_count.toLocaleString()," missing"]}),e.jsxs("div",{className:"cron-muted",children:["Copied from upstream this reconciliation: ",d.copied_from_upstream_count.toLocaleString()]}),e.jsxs("div",{className:"cron-muted",children:["7-day Δ eligible ",d.eligible_delta_7d??"collecting"," · canonical ",d.canonical_delta_7d??"collecting"," · missing ",d.missing_delta_7d??"collecting"]})]},d.scope))}),s.jobs.length===0?e.jsx("div",{className:"cron-metric-card text-sm cron-muted",children:"No OCR shards have been launched yet."}):e.jsx("div",{className:"grid grid-cols-1 xl:grid-cols-2 gap-3",children:s.jobs.map(d=>e.jsx(Ts,{job:d},d.id))})]})]})}function As({job:s,expanded:a,onToggle:r,paperMarkdownJobs:t,paperMarkdownJobsLoading:c=!1,paperMarkdownJobsError:d=null}){const j=!!(s.work_metrics&&Object.keys(s.work_metrics).length),_=!!(s.db_metrics&&Object.keys(s.db_metrics).length),u=s.job_name==="paper_markdown_backfill",m=u?t==null?void 0:t.budgets.live:void 0,y=(m==null?void 0:m.cost_policy)==="unmetered_hf"||(m==null?void 0:m.budget_enforced)===!1;return e.jsxs("div",{className:"cron-job-card",children:[e.jsx("button",{type:"button",className:"cron-job-summary",onClick:r,"aria-expanded":a,children:e.jsxs("div",{className:"flex items-start justify-between gap-3",children:[e.jsxs("div",{className:"flex items-start gap-3 flex-1 min-w-0",children:[e.jsx(Ls,{status:s.status,isRunning:s.is_running}),e.jsxs("div",{className:"flex-1 min-w-0 text-left",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1 flex-wrap",children:[e.jsx("h3",{className:"font-semibold",children:s.display_name}),s.critical&&e.jsx(C,{variant:"outline",className:"text-[10px] uppercase tracking-wide",children:"Critical"}),s.lock_stale&&e.jsx(C,{variant:"outline",className:"cron-status--broken",children:"Held lock"}),e.jsx(Ne,{label:"Execution",axis:s.execution_health}),e.jsx(Ne,{label:"Output",axis:s.output_health}),a?e.jsx(js,{className:"h-4 w-4 cron-muted"}):e.jsx(hs,{className:"h-4 w-4 cron-muted"})]}),e.jsx("p",{className:"text-sm cron-muted mb-2",children:s.status_reason}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 xl:grid-cols-4 gap-2 text-sm cron-muted",children:[e.jsxs("span",{className:"cron-fact",children:[e.jsx(Le,{}),"Log: ",v(s.last_run)]}),e.jsxs("span",{className:"cron-fact",children:[e.jsx(pe,{}),"DB: ",v(s.last_db_write)]}),s.recent_write_count!=null&&e.jsxs("span",{className:"cron-fact",children:[e.jsx(bs,{}),"Recent writes: ",s.recent_write_count.toLocaleString()]}),s.duration!=null&&e.jsxs("span",{className:"cron-fact",children:[e.jsx(ae,{}),"Duration: ",re(s.duration)]}),s.schedule&&e.jsxs("span",{className:"cron-fact md:col-span-2",children:[e.jsx(ve,{}),e.jsx("span",{className:"font-mono text-xs",children:s.schedule})]}),s.log_status&&e.jsxs("span",{className:"cron-fact",children:[e.jsx(je,{}),"Log status: ",s.log_status]}),s.workflow_status&&e.jsxs("span",{className:"cron-fact",children:[e.jsx(ae,{}),"Actions: ",Be(s.workflow_status)]})]}),s.work_summary&&e.jsx("div",{className:"cron-message",children:s.work_summary}),s.error&&e.jsxs("div",{className:"cron-message cron-message--error",children:[e.jsx("strong",{children:"Error: "}),s.error]}),s.diagnostics&&e.jsx("div",{className:"cron-message cron-message--warning",children:s.diagnostics}),m&&e.jsxs("div",{className:`cron-message ${m.can_launch_planned?"":"cron-message--error"}`,children:[e.jsx("strong",{children:"Live GPU policy:"})," ",y?"unmetered on HF":`${L(m.current_exposure_usd)} current / ${L(m.ceiling_usd)} cap`," · ",m.affordable_jobs," of ",m.desired_jobs," planned",y?"":` · projects ${L(m.projected_usd)} · rolling 30 days`]})]})]}),e.jsx(C,{variant:"outline",className:`cron-status--${s.status}`,children:s.status})]})}),a&&!0&&e.jsx("div",{className:"cron-job-details",children:e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"cron-section-heading",children:[e.jsx(ve,{className:"h-4 w-4"}),e.jsx("h4",{children:"Scheduler evidence"})]}),e.jsx("div",{className:"cron-metric-card space-y-2 text-sm",children:[["Scheduler",s.execution_health.scheduler??"unknown"],["Last expected",v(s.execution_health.last_expected_at??null)],["Last started",v(s.execution_health.last_started_at??null)],["Last completed",v(s.execution_health.last_completed_at??null)],["Next expected",v(s.execution_health.next_expected_at??null)]].map(([l,p])=>e.jsxs("div",{className:"flex items-center justify-between gap-3",children:[e.jsx("span",{className:"cron-label",children:l}),e.jsx("span",{children:p})]},l))})]}),s.work_metrics&&j&&e.jsx(be,{icon:je,title:"Log Metrics",metrics:s.work_metrics}),s.db_metrics&&_&&e.jsx(be,{icon:pe,title:"Database Metrics",metrics:s.db_metrics}),s.workflow_status&&e.jsx(Rs,{workflow:s.workflow_status}),u&&e.jsx(Fs,{monitor:t,loading:c,error:d}),s.diagnostic_groups&&Object.values(s.diagnostic_groups).some(l=>l.length>0)&&e.jsxs("div",{className:"md:col-span-2",children:[e.jsxs("div",{className:"cron-section-heading",children:[e.jsx(Re,{className:"h-4 w-4"}),e.jsx("h4",{children:"Diagnostics by cause"})]}),e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:Object.entries(s.diagnostic_groups).filter(([,l])=>l.length>0).map(([l,p])=>e.jsxs("div",{className:"cron-metric-card",children:[e.jsx("div",{className:"cron-label mb-1",children:he(l)}),e.jsx("ul",{className:"list-disc pl-4 text-sm space-y-1",children:p.map(I=>e.jsx("li",{children:I},I))})]},l))})]})]})})]})}const ze=x.forwardRef(({className:s,...a},r)=>e.jsx("div",{className:"relative w-full overflow-auto",children:e.jsx("table",{ref:r,className:k("w-full caption-bottom text-sm",s),...a})}));ze.displayName="Table";const Ge=x.forwardRef(({className:s,...a},r)=>e.jsx("thead",{ref:r,className:k("[&_tr]:border-b",s),...a}));Ge.displayName="TableHeader";const Ve=x.forwardRef(({className:s,...a},r)=>e.jsx("tbody",{ref:r,className:k("[&_tr:last-child]:border-0",s),...a}));Ve.displayName="TableBody";const Ms=x.forwardRef(({className:s,...a},r)=>e.jsx("tfoot",{ref:r,className:k("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",s),...a}));Ms.displayName="TableFooter";const de=x.forwardRef(({className:s,...a},r)=>e.jsx("tr",{ref:r,className:k("border-b transition-colors data-[state=selected]:bg-muted hover:bg-muted/50",s),...a}));de.displayName="TableRow";const z=x.forwardRef(({className:s,...a},r)=>e.jsx("th",{ref:r,className:k("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",s),...a}));z.displayName="TableHead";const G=x.forwardRef(({className:s,...a},r)=>e.jsx("td",{ref:r,className:k("p-4 align-middle [&:has([role=checkbox])]:pr-0",s),...a}));G.displayName="TableCell";const Es=x.forwardRef(({className:s,...a},r)=>e.jsx("caption",{ref:r,className:k("mt-4 text-sm text-muted-foreground",s),...a}));Es.displayName="TableCaption";const Ke={queued:"cron-status--unknown",dispatching:"cron-status--running",running:"cron-status--running",completed:"cron-status--healthy",failed:"cron-status--broken",canceled:"cron-status--unknown"},we={"add-evals":"Add evals","enrich-paper":"Enrich paper"},qs={queued:_s,dispatching:A,running:fs,completed:me,failed:X,canceled:vs};function Ds({status:s}){const a=qs[s];return e.jsxs(C,{variant:"outline",className:Ke[s],children:[e.jsx(a,{className:`mr-1 h-3.5 w-3.5 ${s==="dispatching"?"animate-spin":""}`}),s]})}function Is(s){return s.error?s.error:s.report?s.report:s.status==="completed"&&s.applied_at?"Changes applied to the paper.":s.status==="completed"?"Completed without a recorded mutation.":null}function Js({autoRefresh:s,refreshToken:a}){var se;const r=$e(),[t,c]=x.useState(""),[d,j]=x.useState(""),[_,u]=x.useState(""),[m,y]=x.useState(""),[w,l]=x.useState(""),[p,I]=x.useState({}),V={trigger:t,status:d,policy_version:_,cohort_date:m,review_status:w},{data:h,isLoading:Z,isFetching:U,error:$}=Q({queryKey:["codexPaperJobs",a,V],queryFn:()=>us(100,V),refetchInterval:s?1e4:!1,retry:!1}),M=()=>r.invalidateQueries({queryKey:["codexPaperJobs"]}),xe=H({mutationFn:cs,onSuccess:M}),Y=H({mutationFn:ls,onSuccess:M}),ie=H({mutationFn:os,onSuccess:M}),K=H({mutationFn:ds,onSuccess:M}),J=H({mutationFn:({id:n,dataset:o,task:q,metric:E})=>ms(n,{dataset_id:Number(o),task_id:Number(q),best_metric:E.trim()}),onSuccess:M}),ee=$&&typeof $=="object"&&"status"in $?$.status:void 0;return e.jsxs(g,{className:"mb-8",children:[e.jsx(N,{children:e.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[e.jsxs("div",{children:[e.jsx(b,{className:"text-xl",children:"Codex paper jobs"}),e.jsx(R,{children:"Durable queue, two-stage daily workflows, traces, and benchmark-gap follow-up"})]}),U&&!Z&&e.jsxs("span",{className:"flex items-center gap-2 text-xs cron-muted",children:[e.jsx(A,{className:"h-3.5 w-3.5 animate-spin"})," Syncing with Hugging Face"]})]})}),e.jsxs(f,{children:[Z&&e.jsxs("div",{className:"flex items-center justify-center py-10 cron-muted",children:[e.jsx(A,{className:"mr-2 h-5 w-5 animate-spin"})," Loading paper jobs…"]}),$&&ee!==404&&e.jsx("div",{className:"cron-message cron-message--error mb-4",children:$ instanceof Error?$.message:"Could not load Codex paper jobs."}),ee===404&&e.jsx("p",{className:"py-4 text-sm cron-muted",children:"Codex paper jobs are not enabled in this environment."}),h&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:`cron-message mb-5 ${h.scheduler.paused_at?"cron-message--error":""}`,children:e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[e.jsxs("div",{children:[e.jsxs("strong",{children:["Scheduled dispatch: ",h.scheduler.paused_at?"paused":h.scheduler.dispatch_enabled?"enabled":"disabled"]}),h.scheduler.pause_reason&&e.jsx("div",{className:"mt-1 text-xs",children:h.scheduler.pause_reason}),e.jsxs("div",{className:"mt-1 text-xs cron-muted",children:["Canary ",h.scheduler.canary_released?"released":"active"," · Queue age ",h.scheduler.queue_age_level]}),e.jsxs("div",{className:"mt-1 text-xs cron-muted",children:["Scheduled usage today ",h.scheduler.usage.current_day_tokens.toLocaleString()," tokens · ",h.scheduler.usage.mode==="enforced"?`pause threshold ${((se=h.scheduler.usage.pause_threshold_tokens)==null?void 0:se.toLocaleString())??"not established"}`:"first-week alert-only baseline"," · trailing median ",h.scheduler.usage.trailing_seven_day_median_tokens.toLocaleString()]})]}),e.jsx(P,{size:"sm",variant:h.scheduler.paused_at||!h.scheduler.dispatch_enabled?"default":"outline",disabled:K.isPending,onClick:()=>K.mutate(h.scheduler.paused_at||!h.scheduler.dispatch_enabled?"resume":"pause"),children:h.scheduler.paused_at?"Acknowledge & resume":h.scheduler.dispatch_enabled?"Pause scheduled dispatch":"Enable scheduled dispatch"})]})}),e.jsxs("div",{className:"mb-5 grid grid-cols-2 gap-3 sm:grid-cols-4 lg:grid-cols-7",children:[["queued","dispatching","running","completed","failed","canceled"].map(n=>e.jsxs("div",{className:"cron-metric-card",children:[e.jsx("div",{className:"cron-label capitalize",children:n}),e.jsx("div",{className:"mt-1 text-xl font-semibold",children:h.summary[n]})]},n)),e.jsxs("div",{className:"cron-metric-card",children:[e.jsx("div",{className:"cron-label",children:"Total"}),e.jsx("div",{className:"mt-1 text-xl font-semibold",children:h.summary.total})]})]}),e.jsxs("div",{className:"mb-5 grid gap-3 sm:grid-cols-5",children:[e.jsxs("select",{"aria-label":"Trigger",className:"rounded border px-2 py-1 text-sm",value:t,onChange:n=>c(n.target.value),children:[e.jsx("option",{value:"",children:"All triggers"}),e.jsx("option",{value:"admin",children:"Admin"}),e.jsx("option",{value:"hf-daily-cron",children:"HF daily cron"})]}),e.jsxs("select",{"aria-label":"Status",className:"rounded border px-2 py-1 text-sm",value:d,onChange:n=>j(n.target.value),children:[e.jsx("option",{value:"",children:"All statuses"}),Object.keys(Ke).map(n=>e.jsx("option",{children:n},n))]}),e.jsx("input",{"aria-label":"Policy version",className:"rounded border px-2 py-1 text-sm",placeholder:"Policy version",value:_,onChange:n=>u(n.target.value)}),e.jsx("input",{"aria-label":"Cohort date",type:"date",className:"rounded border px-2 py-1 text-sm",value:m,onChange:n=>y(n.target.value)}),e.jsxs("select",{"aria-label":"Review status",className:"rounded border px-2 py-1 text-sm",value:w,onChange:n=>l(n.target.value),children:[e.jsx("option",{value:"",children:"All review states"}),e.jsx("option",{value:"unreviewed",children:"Unreviewed"}),e.jsx("option",{value:"approved",children:"Approved"}),e.jsx("option",{value:"corrected",children:"Corrected"})]})]}),h.jobs.length===0?e.jsx("p",{className:"py-8 text-center text-sm cron-muted",children:"No paper curation jobs have been submitted yet."}):e.jsxs(ze,{children:[e.jsx(Ge,{children:e.jsxs(de,{children:[e.jsx(z,{children:"Status"}),e.jsx(z,{children:"Paper"}),e.jsx(z,{children:"Action"}),e.jsx(z,{children:"Requested"}),e.jsx(z,{children:"Execution"})]})}),e.jsx(Ve,{children:h.jobs.map(n=>{const o=Is(n);return e.jsxs(de,{children:[e.jsx(G,{className:"align-top",children:e.jsx(Ds,{status:n.status})}),e.jsxs(G,{className:"min-w-[260px] align-top",children:[e.jsx(rs,{to:`/paper/${encodeURIComponent(n.paper_route)}`,className:"font-medium hover:underline",children:n.paper_title}),e.jsxs("div",{className:"mt-1 text-xs cron-muted",children:["Paper #",n.paper_id]})]}),e.jsxs(G,{className:"whitespace-nowrap align-top",children:[we[n.kind],n.applied_at&&e.jsxs("div",{className:"mt-1 flex items-center gap-1 text-xs cron-status--healthy",children:[e.jsx(me,{className:"h-3.5 w-3.5"})," Applied"]})]}),e.jsxs(G,{className:"whitespace-nowrap align-top",children:[e.jsx("div",{children:v(n.created_at)}),e.jsxs("div",{className:"mt-1 text-xs cron-muted",children:["@",n.requested_by]})]}),e.jsxs(G,{className:"max-w-[360px] align-top",children:[n.hf_job_url?e.jsxs("a",{href:n.hf_job_url,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-1 hover:underline",children:["Hugging Face Job ",e.jsx(oe,{className:"h-3.5 w-3.5"})]}):e.jsx("span",{className:"cron-muted",children:"Waiting to dispatch"}),o&&e.jsx("p",{className:`mt-2 line-clamp-3 text-xs ${n.error?"text-red-700":"cron-muted"}`,title:o,children:o}),e.jsxs("div",{className:"mt-2 flex gap-2",children:[["failed","canceled"].includes(n.status)&&e.jsx(P,{size:"sm",variant:"outline",onClick:()=>xe.mutate(n.id),children:"Retry"}),["queued","dispatching","running"].includes(n.status)&&e.jsx(P,{size:"sm",variant:"outline",onClick:()=>Y.mutate(n.id),children:"Cancel"}),n.trace_status==="finalize_failed"&&e.jsx(P,{size:"sm",variant:"outline",onClick:()=>ie.mutate(n.id),children:"Retry trace"})]})]})]},n.id)})})]}),h.workflows.length>0&&e.jsxs("div",{className:"mt-8 space-y-3",children:[e.jsx("h3",{className:"text-base font-semibold",children:"Scheduled paper workflows"}),h.workflows.map(n=>e.jsxs("details",{className:"rounded-md border p-3",children:[e.jsxs("summary",{className:"cursor-pointer text-sm font-medium",children:["Paper #",n.paper_id," · ",n.cohort_date," · ",n.status," · ",n.policy_version]}),e.jsxs("div",{className:"mt-3 space-y-3 text-xs",children:[n.error&&e.jsx("div",{className:"text-red-700",children:n.error}),n.stages.map(o=>{var q;return e.jsxs("div",{className:"rounded border p-3",children:[e.jsxs("div",{className:"font-medium",children:[we[o.kind]," · ",o.status," · trace ",o.trace_status," · review ",o.audit_status]}),e.jsxs("div",{className:"mt-1 cron-muted",children:["model ",o.model??"—"," · reasoning ",o.reasoning_effort??"—"," · tokens ",(o.input_tokens??0)+(o.output_tokens??0)," · duration ",o.duration_ms??0," ms · attempts ",o.attempt_count]}),o.error&&e.jsx("div",{className:"mt-2 text-red-700",children:o.error}),o.report&&e.jsx("div",{className:"mt-2 whitespace-pre-wrap rounded border p-2",children:o.report}),o.url_candidates&&e.jsxs("details",{className:"mt-2",children:[e.jsx("summary",{children:"URL candidates and provenance"}),e.jsx("pre",{className:"mt-2 max-h-52 overflow-auto whitespace-pre-wrap",children:JSON.stringify(o.url_candidates,null,2)})]}),o.validation_summary&&e.jsx("pre",{className:"mt-2 max-h-40 overflow-auto whitespace-pre-wrap",children:JSON.stringify(o.validation_summary,null,2)}),Array.isArray((q=o.validation_summary)==null?void 0:q.manual_or_legacy_evaluation_rows_affected)&&o.validation_summary.manual_or_legacy_evaluation_rows_affected.length>0&&e.jsxs("div",{className:"mt-2 rounded border border-amber-500 bg-amber-50 p-2 font-medium text-amber-900",children:["Manual or legacy evaluation rows changed: ",o.validation_summary.manual_or_legacy_evaluation_rows_affected.join(", "),". Review the evidence and before/after diff."]}),o.proposal&&e.jsx("pre",{className:"mt-2 max-h-52 overflow-auto whitespace-pre-wrap",children:JSON.stringify(o.proposal,null,2)}),o.mutation_result&&e.jsxs("details",{className:"mt-2",children:[e.jsx("summary",{children:"Accepted callback result and before/after state"}),e.jsx("pre",{className:"mt-2 max-h-64 overflow-auto whitespace-pre-wrap",children:JSON.stringify(o.mutation_result,null,2)})]}),o.trace_status==="complete"&&e.jsxs("a",{className:"mt-2 inline-flex items-center gap-1 hover:underline",href:`/api/v1/admin/codex-curation/jobs/${o.id}/trace`,target:"_blank",rel:"noreferrer",children:["Authenticated trace manifest ",e.jsx(oe,{className:"h-3.5 w-3.5"})]})]},o.id)})]})]},n.id))]}),h.benchmark_candidates.length>0&&e.jsxs("div",{className:"mt-8 space-y-3",children:[e.jsx("h3",{className:"text-base font-semibold",children:"Benchmark-gap backlog"}),h.benchmark_candidates.map(n=>{var E;const o=p[n.id]??{dataset:"",task:((E=n.task_ids[0])==null?void 0:E.toString())??"",metric:""},q=Number(o.dataset)>0&&Number(o.task)>0&&o.metric.trim().length>0;return e.jsxs("div",{className:"rounded-md border p-3 text-xs",children:[e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[e.jsxs("div",{className:"font-medium",children:[n.canonical_name," · ",n.gap_type," · ",n.status]}),e.jsxs("div",{className:"cron-muted",children:[n.distinct_paper_count," paper",n.distinct_paper_count===1?"":"s"," · ",n.confidence??"unknown"," confidence"]})]}),n.canonical_url&&e.jsx("a",{className:"mt-1 block hover:underline",href:n.canonical_url,target:"_blank",rel:"noreferrer",children:n.canonical_url}),e.jsxs("div",{className:"mt-1 cron-muted",children:["Task evidence: ",n.task_ids.join(", ")||"none"," · Papers: ",n.evidence_paper_ids.join(", ")]}),n.status!=="promoted"&&e.jsxs("div",{className:"mt-3 flex flex-wrap gap-2",children:[["dataset","task","metric"].map(D=>e.jsx("input",{"aria-label":`${n.canonical_name} ${D}`,className:"w-36 rounded border px-2 py-1",placeholder:D==="metric"?"Exact metric":`${D} ID`,value:o[D],onChange:i=>I(F=>({...F,[n.id]:{...o,[D]:i.target.value}}))},D)),e.jsx(P,{size:"sm",variant:"outline",disabled:!q||J.isPending,onClick:()=>J.mutate({id:n.id,...o}),children:"Promote & requeue evidence papers"})]})]},n.id)}),J.error&&e.jsx("div",{className:"cron-message cron-message--error",children:J.error.message})]}),e.jsxs("p",{className:"mt-4 text-xs cron-muted",children:["Showing the 100 most recent jobs · Queue totals include full history · Updated ",v(h.timestamp)]})]})]})]})}const Os=()=>{var d,j,_;const s=$e(),a=ps({queryKey:["catalog-audit"],queryFn:({pageParam:u})=>le.audit(u),initialPageParam:void 0,getNextPageParam:u=>u.next_cursor??void 0}),r=((d=a.data)==null?void 0:d.pages.flatMap(u=>u.events))??[],t=H({mutationFn:()=>le.acknowledgeAudit(),onSuccess:()=>s.invalidateQueries({queryKey:["catalog-audit"]})}),c=H({mutationFn:u=>le.rollbackEvent(u),onSuccess:()=>s.invalidateQueries({queryKey:["catalog-audit"]})});return e.jsx("div",{className:"space-y-4",children:e.jsxs(g,{children:[e.jsxs(N,{className:"flex-row items-center justify-between",children:[e.jsx(b,{children:"Catalog mutation audit"}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsxs("span",{className:"text-sm font-medium",children:[((_=(j=a.data)==null?void 0:j.pages[0])==null?void 0:_.unread_contributor_count)??0," unread contributor changes"]}),e.jsx(P,{variant:"outline",size:"sm",onClick:()=>t.mutate(),disabled:t.isPending,children:"Mark read"})]})]}),e.jsxs(f,{className:"space-y-3",children:[a.isLoading&&e.jsx("p",{children:"Loading audit history…"}),a.error&&e.jsx("p",{className:"text-destructive",children:"Audit history unavailable."}),r.map(u=>e.jsxs("article",{className:`rounded-md border p-3 ${u.operation==="delete"||u.rollback_eligible===!1?"border-red-500 bg-red-50/50":""}`,children:[e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[e.jsxs("strong",{children:[u.operation," ",u.entity_type," ",u.entity_id]}),e.jsxs("span",{className:"text-xs text-muted-foreground",children:["@",u.actor_username??u.actor_role," ·"," ",new Date(u.created_at).toLocaleString()]})]}),e.jsxs("details",{className:"mt-2 text-xs",children:[e.jsx("summary",{children:"Inspect snapshots"}),e.jsx("pre",{className:"mt-2 max-h-80 overflow-auto rounded bg-muted p-3",children:JSON.stringify({before:u.before,after:u.after},null,2)})]}),!u.rollback_of_event_id&&e.jsx(P,{className:"mt-3",variant:"outline",size:"sm",onClick:()=>c.mutate(u.id),disabled:c.isPending||u.rollback_eligible===!1,children:u.rollback_eligible===!1?"Rollback conflict":"Roll back if unchanged"})]},u.id)),a.hasNextPage&&e.jsx(P,{variant:"outline",onClick:()=>a.fetchNextPage(),disabled:a.isFetchingNextPage,children:a.isFetchingNextPage?"Loading…":"Load older events"})]})]})})};class Hs{constructor(a){this.request=a}getCronStatus(a=!1){const r=a?"?force_refresh=true":"";return this.request(`/cron/status${r}`,{cache:"no-store"})}getPaperMarkdownJobs(){return this.request("/cron/paper-markdown-jobs",{cache:"no-store"})}}const ke=new Hs(ns),Ce={hourly:"cron-status--running",daily:"cron-status--healthy",weekly:"cron-status--degraded",systemd:"cron-status--running"},S=s=>`$${(s/1e6).toFixed(2)}`,Us=({data:s,loading:a,error:r})=>{const[t,c]=x.useState("staging-current"),d={"staging-current":"Starter staging · $75 warning / $100 trip / no Environment cap","staging-production-era":"Staging with production · $15 / $20 / $25",production:"Production · $175 / $200 / $225"};if(a)return e.jsxs("div",{className:"flex items-center py-12",children:[e.jsx(A,{className:"h-6 w-6 animate-spin mr-3"}),"Loading chat compute…"]});if(r||!s)return e.jsx(g,{className:"cron-status--broken",children:e.jsx(f,{className:"pt-6",children:"Chat compute accounting is unavailable."})});const j=Math.min(100,s.effective_microusd/s.application_cap_microusd*100),_=s.circuit_state==="tripped"?"Chat disabled":s.circuit_state==="warning"?"Operator warning":"Enabled",u=s.reconciliation_state==="fresh"?"Fresh":s.reconciliation_state==="stale"?"Stale":"Unavailable";return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"grid md:grid-cols-4 gap-4",children:[e.jsxs(g,{className:s.circuit_state==="tripped"?"cron-status--broken":s.circuit_state==="warning"?"cron-status--degraded":"",children:[e.jsx(N,{children:e.jsx(b,{className:"text-sm",children:"Circuit"})}),e.jsxs(f,{children:[e.jsx("div",{className:"text-2xl font-bold",children:_}),e.jsx("p",{className:"text-xs cron-muted",children:s.trip_reason??"Policy armed"})]})]}),e.jsxs(g,{children:[e.jsx(N,{children:e.jsx(b,{className:"text-sm",children:"Month to date"})}),e.jsxs(f,{children:[e.jsx("div",{className:"text-2xl font-bold",children:S(s.effective_microusd)}),e.jsx("div",{role:"progressbar","aria-label":"Application cap used","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":Math.round(j),className:"h-2 rounded bg-muted mt-3",children:e.jsx("div",{className:"h-2 rounded bg-primary",style:{width:`${j}%`}})})]})]}),e.jsxs(g,{children:[e.jsx(N,{children:e.jsx(b,{className:"text-sm",children:"Application headroom"})}),e.jsxs(f,{children:[e.jsx("div",{className:"text-2xl font-bold",children:S(s.remaining_microusd)}),e.jsxs("p",{className:"text-xs cron-muted",children:["Cap ",S(s.application_cap_microusd)]})]})]}),e.jsxs(g,{children:[e.jsx(N,{children:e.jsx(b,{className:"text-sm",children:"Live compute"})}),e.jsxs(f,{children:[e.jsx("div",{className:"text-2xl font-bold",children:s.live_count}),e.jsxs("p",{className:"text-xs cron-muted",children:[s.termination_uncertain_count," termination uncertain"]})]})]})]}),e.jsxs(g,{children:[e.jsxs(N,{children:[e.jsx(b,{children:"Accounting and policy"}),e.jsxs(R,{children:[s.environment," · cycle ",s.billing_cycle]})]}),e.jsxs(f,{className:"grid md:grid-cols-3 gap-4 text-sm",children:[e.jsxs("div",{children:[e.jsx("strong",{children:"Environment record"}),e.jsx("br",{}),s.environment," · ",s.provider_mode==="starter_workspace"?"Starter Workspace":"Team isolated"]}),e.jsxs("label",{children:[e.jsx("strong",{children:"Policy profile"}),e.jsxs("select",{"aria-label":"Chat compute policy profile",value:t,onChange:m=>c(m.target.value),className:"block mt-1",children:[e.jsx("option",{value:"staging-current",children:"Staging now"}),e.jsx("option",{value:"staging-production-era",children:"Staging with production"}),e.jsx("option",{value:"production",children:"Production"})]}),e.jsxs("span",{className:"text-xs cron-muted",children:[d[t]," · Workspace $250"]})]}),e.jsxs("div",{children:[e.jsx("strong",{children:"Conservative estimate"}),e.jsx("br",{}),S(s.estimated_microusd)]}),e.jsxs("div",{children:[e.jsx("strong",{children:"Provider-reported floor"}),e.jsx("br",{}),S(s.provider_floor_microusd)," · ",e.jsx(C,{children:u})]}),e.jsxs("div",{children:[e.jsx("strong",{children:"Provider backstops"}),e.jsx("br",{}),s.environment_cap_microusd===null?"Starter: no Environment cap":`Environment ${S(s.environment_cap_microusd)}`," · Workspace ",S(s.workspace_cap_microusd)]}),e.jsxs("div",{children:[e.jsx("strong",{children:"Active thresholds"}),e.jsx("br",{}),"Warning ",S(s.warning_microusd)," · trip ",S(s.application_cap_microusd)]}),e.jsxs("div",{children:[e.jsx("strong",{children:"Policy allocation"}),e.jsx("br",{}),"Starter staging $75/$100 with no Environment cap · future Team staging $15/$20/$25 · production $175/$200/$225 · workspace $250"]}),e.jsxs("div",{children:[e.jsx("strong",{children:"Cycle end"}),e.jsx("br",{}),v(s.cycle_end_at)]}),e.jsxs("div",{children:[e.jsx("strong",{children:"Last metered"}),e.jsx("br",{}),s.last_metered_at?v(s.last_metered_at):"Unavailable"]}),e.jsxs("div",{children:[e.jsx("strong",{children:"Provider reconciliation"}),e.jsx("br",{}),s.last_reconciled_at?v(s.last_reconciled_at):"Unavailable",s.last_reconciliation_attempt_at?` · attempted ${v(s.last_reconciliation_attempt_at)}`:"",s.next_reconciliation_at?` · next ${v(s.next_reconciliation_at)}`:""]}),e.jsxs("div",{children:[e.jsx("strong",{children:"Burn projection"}),e.jsx("br",{}),s.burn_rate_microusd_per_hour===null?"Not enough data":`${S(s.burn_rate_microusd_per_hour)}/hour${s.projected_cap_hit_at?` · cap ${v(s.projected_cap_hit_at)}`:""}`]}),e.jsxs("div",{children:[e.jsx("strong",{children:"Prior cycle"}),e.jsx("br",{}),s.prior_cycle?`${s.prior_cycle.billing_cycle} · ${S(s.prior_cycle.effective_microusd)}`:"Not enough data"]})]})]}),e.jsxs(g,{children:[e.jsx(N,{children:e.jsx(b,{children:"Live lifecycle"})}),e.jsx(f,{className:"text-sm",children:Object.entries(s.live_states).map(([m,y])=>e.jsxs("span",{className:"mr-4",children:[m,": ",y]},m))})]}),e.jsxs(g,{children:[e.jsx(N,{children:e.jsx(b,{children:"Daily spend"})}),e.jsx(f,{children:s.daily_spend.length?e.jsx("ul",{className:"space-y-1 text-sm",children:s.daily_spend.map(m=>e.jsxs("li",{children:[m.date,": blank ",S(m.blank_pool_microusd)," · assigned ",S(m.assigned_microusd)]},m.date))}):e.jsx("p",{className:"cron-muted",children:"No compute recorded in this cycle."})})]}),e.jsxs(g,{children:[e.jsxs(N,{children:[e.jsx(b,{children:"Recent circuit events"}),e.jsx(R,{children:"Runbook: docs/chat-sandbox-spend-runbook.md"})]}),e.jsx(f,{children:s.events.length?e.jsx("ul",{className:"space-y-2 text-sm",children:s.events.map(m=>e.jsxs("li",{children:[e.jsx(C,{children:m.severity})," ",m.type," · ",v(m.created_at)]},m.id))}):e.jsx("p",{className:"cron-muted",children:"No events in this cycle."})})]})]})},Ws=({data:s,loading:a,error:r})=>{if(a)return e.jsxs("div",{className:"flex items-center py-8",children:[e.jsx(A,{className:"h-5 w-5 animate-spin mr-3"}),"Loading web-search budget…"]});if(r||!s)return e.jsx(g,{className:"cron-status--broken",children:e.jsx(f,{className:"pt-6",children:"Web-search budget accounting is unavailable."})});const t=Math.min(100,s.call_count/s.hard_limit_calls*100);return e.jsxs(g,{className:s.circuit_state==="tripped"?"cron-status--broken":s.circuit_state==="warning"||s.circuit_state==="cooldown"?"cron-status--degraded":"",children:[e.jsxs(N,{children:[e.jsx(b,{children:"Web search"}),e.jsxs(R,{children:[s.environment," · UTC cycle ",s.billing_cycle," · provider details are admin-only"]})]}),e.jsxs(f,{className:"space-y-4",children:[e.jsxs("div",{className:"grid md:grid-cols-4 gap-4 text-sm",children:[e.jsxs("div",{children:[e.jsx("strong",{children:"Circuit"}),e.jsx("br",{}),s.circuit_state,s.trip_reason?` · ${s.trip_reason}`:""]}),e.jsxs("div",{children:[e.jsx("strong",{children:"Calls"}),e.jsx("br",{}),s.call_count," / ",s.hard_limit_calls," · ",s.success_count," successful"]}),e.jsxs("div",{children:[e.jsx("strong",{children:"Remaining"}),e.jsx("br",{}),s.remaining_calls]}),e.jsxs("div",{children:[e.jsx("strong",{children:"Warning"}),e.jsx("br",{}),s.warning_calls," calls"]})]}),e.jsx("div",{role:"progressbar","aria-label":"Web-search monthly budget used","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":Math.round(t),className:"h-2 rounded bg-muted",children:e.jsx("div",{className:"h-2 rounded bg-primary",style:{width:`${t}%`}})}),e.jsxs("p",{className:"text-xs cron-muted",children:["Cycle ends ",v(s.cycle_end_at)," · provider-reported cost $",(s.provider_cost_microusd/1e6).toFixed(4),s.last_latency_ms!==null?` · last ${s.last_latency_ms} ms / ${s.last_result_count??0} results`:"",s.cooldown_until?` · cooldown until ${v(s.cooldown_until)}`:"",s.last_provider_error_class?` · last provider error ${s.last_provider_error_class}`:""]}),s.events.length>0&&e.jsx("ul",{className:"space-y-1 text-sm",children:s.events.map(c=>e.jsxs("li",{children:[c.type," · ",v(c.created_at),c.error_class?` · ${c.error_class}`:""]},c.id))})]})]})},Bs=({data:s})=>s!=null&&s.snapshot_stale?e.jsx(g,{className:"mb-6 cron-status--degraded",role:"status",children:e.jsx(f,{className:"pt-6",children:e.jsxs("div",{className:"flex items-center gap-3 text-sm",children:[e.jsx(A,{className:"h-4 w-4 animate-spin"}),e.jsxs("span",{children:["Refreshing status… Current snapshot is ",Math.ceil(s.snapshot_age_seconds)," seconds old."]})]})})}):null,zs=(s,a)=>s!=null&&s.snapshot_stale||s!=null&&s.refreshing?1e3:a?3e4:!1,ca=()=>{const s=is(),[a,r]=x.useState(!0),[t,c]=x.useState(0),[d,j]=x.useState(""),[_,u]=x.useState(""),[m,y]=x.useState(new Set),w=x.useRef(!1),{user:l}=ts(),{data:p,isLoading:I,isFetching:V,error:h,refetch:Z}=Q({queryKey:["cronStatus",l==null?void 0:l.username],queryFn:()=>{const i=w.current;return w.current=!1,ke.getCronStatus(i)},enabled:!!(l!=null&&l.is_admin),refetchInterval:i=>zs(i.state.data,a),retry:!1}),U=Q({queryKey:["paperMarkdownJobs",l==null?void 0:l.username],queryFn:()=>ke.getPaperMarkdownJobs(),enabled:!!(l!=null&&l.is_admin),refetchInterval:a?3e4:!1,retry:!1}),$=Q({queryKey:["chatSandboxSpend",l==null?void 0:l.username,_],queryFn:()=>fe.getSandboxSpend(_||void 0),enabled:!!(l!=null&&l.is_admin),refetchInterval:a?3e4:!1,retry:!1}),M=Q({queryKey:["chatWebSearchBudget",l==null?void 0:l.username],queryFn:()=>fe.getWebSearchBudget(),enabled:!!(l!=null&&l.is_admin)&&s,refetchInterval:a?3e4:!1,retry:!1}),Y=(h&&typeof h=="object"&&"status"in h?h.status:void 0)===401?"Unauthorized. Sign in with an allowlisted Hugging Face admin account.":h instanceof Error?h.message:void 0,ie=i=>{y(F=>{const O=new Set(F);return O.has(i)?O.delete(i):O.add(i),O})},K=(p==null?void 0:p.jobs.filter(i=>i.dashboard_group==="leaderboard_sync"))??[],J=(p==null?void 0:p.jobs.filter(i=>i.category!=="manual"&&i.dashboard_group!=="leaderboard_sync"))??[],ee=J.filter(i=>i.critical),se=J.filter(i=>!i.critical),n=(p==null?void 0:p.manual_operations)??[],o=se.reduce((i,F)=>(i[F.category]||(i[F.category]=[]),i[F.category].push(F),i),{}),q=Object.keys(o).sort((i,F)=>{const O=["systemd","hourly","daily","weekly","backfill"];return O.indexOf(i)-O.indexOf(F)}),E=i=>e.jsx(As,{job:i,expanded:m.has(i.job_name),onToggle:()=>ie(i.job_name),paperMarkdownJobs:i.job_name==="paper_markdown_backfill"?U.data:void 0,paperMarkdownJobsLoading:i.job_name==="paper_markdown_backfill"?U.isLoading:!1,paperMarkdownJobsError:i.job_name==="paper_markdown_backfill"?U.error:null},i.job_name),D=()=>{c(i=>i+1),w.current=!0,Z(),U.refetch(),$.refetch()};return e.jsx("div",{className:"cron-dashboard","data-shadcn":!0,children:e.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8",children:[e.jsx("div",{className:"mb-8",children:e.jsxs("div",{className:"flex items-center justify-between gap-4 flex-wrap",children:[e.jsxs("div",{children:[e.jsxs("h1",{className:"text-3xl font-bold flex items-center gap-3",children:[e.jsx(ae,{className:"h-8 w-8 cron-info-text"}),"Admin Dashboard"]}),e.jsx("p",{className:"mt-2 cron-muted",children:"Paper curation queue and operational health for scheduled jobs"})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsxs(P,{variant:"outline",size:"sm",onClick:()=>r(!a),className:a?"cron-status--running":"",children:[e.jsx(ge,{className:`h-4 w-4 mr-2 ${a?"animate-spin":""}`}),"Auto-refresh ",a?"ON":"OFF"]}),e.jsxs(P,{variant:"outline",size:"sm",onClick:D,disabled:V,children:[e.jsx(ge,{className:`h-4 w-4 mr-2 ${V?"animate-spin":""}`}),"Refresh"]})]})]})}),e.jsx(g,{className:"mb-6",children:e.jsx(f,{className:"pt-6",children:e.jsxs("p",{className:"text-sm cron-muted",children:["Signed in as ",e.jsxs("span",{className:"font-semibold",children:["@",l==null?void 0:l.username]}),". Health checks prefer database freshness over log completion so silent no-work failures surface as degraded or broken."]})})}),e.jsx(Bs,{data:p}),e.jsxs(Ss,{defaultValue:"critical-jobs",children:[e.jsxs(We,{className:"grid h-auto w-full grid-cols-2 sm:w-auto sm:grid-cols-5",children:[e.jsx(W,{value:"critical-jobs",children:"Critical Jobs"}),e.jsx(W,{value:"leaderboard-syncs",children:"Leaderboard Syncs"}),e.jsx(W,{value:"codex-paper-jobs",children:"Codex Paper Jobs"}),e.jsx(W,{value:"catalog-audit",children:"Catalog Audit"}),e.jsx(W,{value:"chat-compute",children:"Chat Compute"})]}),e.jsxs(B,{value:"critical-jobs",className:"mt-6",children:[I&&e.jsxs("div",{className:"flex items-center justify-center py-12",children:[e.jsx(A,{className:"h-8 w-8 animate-spin cron-info-text"}),e.jsx("span",{className:"ml-3 cron-muted",children:"Loading CRON jobs status..."})]}),h&&e.jsx(g,{className:"cron-status--broken",children:e.jsx(f,{className:"pt-6",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(X,{className:"h-5 w-5"}),e.jsx("p",{children:Y??"Failed to load CRON jobs status. Please try again."})]})})}),p&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-6 gap-4 mb-6",children:["healthy","degraded","broken","running","stuck","unknown"].map(i=>e.jsxs(g,{children:[e.jsx(N,{className:"pb-2",children:e.jsx(b,{className:"text-sm font-medium cron-muted capitalize",children:i})}),e.jsx(f,{children:e.jsx("div",{className:"text-2xl font-bold",children:p.summary[i]})})]},i))}),p.summary.critical_issues.length>0&&e.jsxs(g,{className:"mb-6 cron-status--broken",children:[e.jsx(N,{children:e.jsxs(b,{className:"flex items-center gap-2",children:[e.jsx(xs,{className:"h-5 w-5"}),"Critical job issues"]})}),e.jsx(f,{children:e.jsx("ul",{className:"list-disc pl-5 space-y-1 text-sm",children:p.summary.critical_issues.map(i=>e.jsx("li",{children:i},i))})})]}),e.jsxs(g,{className:"mb-8",children:[e.jsx(N,{children:e.jsx(b,{className:"text-base",children:"What to check next"})}),e.jsxs(f,{children:[e.jsx("p",{className:"text-sm cron-muted",children:p.summary.what_to_check_next}),e.jsxs("p",{className:"mt-2 text-xs cron-muted flex items-center gap-2",children:[e.jsx(Le,{className:"h-4 w-4"}),"Last updated: ",v(p.timestamp)," · Health score:"," ",p.summary.health_score.toFixed(0),"%"]})]})]}),e.jsxs(g,{className:`mb-8 ${p.summary.coverage.coverage_gaps?"cron-status--broken":""}`,children:[e.jsxs(N,{children:[e.jsx(b,{className:"text-base",children:"Coverage"}),e.jsx(R,{children:"Registry and deployed scheduler inventory"})]}),e.jsxs(f,{className:"grid grid-cols-2 md:grid-cols-4 gap-4 text-sm",children:[e.jsxs("div",{children:[e.jsx("span",{className:"cron-label",children:"Registered"}),e.jsx("div",{className:"text-2xl font-bold",children:p.summary.coverage.registered_scheduled_duties})]}),e.jsxs("div",{children:[e.jsx("span",{className:"cron-label",children:"Discovered"}),e.jsx("div",{className:"text-2xl font-bold",children:p.summary.coverage.discovered_scheduled_duties})]}),e.jsxs("div",{children:[e.jsx("span",{className:"cron-label",children:"Monitored"}),e.jsx("div",{className:"text-2xl font-bold",children:p.summary.coverage.monitored_duties})]}),e.jsxs("div",{children:[e.jsx("span",{className:"cron-label",children:"Gaps"}),e.jsx("div",{className:"text-2xl font-bold",children:p.summary.coverage.coverage_gaps})]})]})]}),e.jsxs(g,{className:"mb-8",children:[e.jsxs(N,{children:[e.jsx(b,{className:"text-xl",children:"Critical jobs"}),e.jsx(R,{children:"Writers whose stale output breaks the live site"})]}),e.jsx(f,{className:"space-y-4",children:ee.map(E)})]}),e.jsx("div",{className:"space-y-6",children:q.map(i=>e.jsxs(g,{children:[e.jsx(N,{children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs(b,{className:"text-xl capitalize flex items-center gap-2",children:[e.jsx(C,{className:Ce[i]??Ce.hourly,children:i}),e.jsx("span",{children:"Supporting jobs"})]}),e.jsxs(R,{children:[o[i].length," job",o[i].length!==1?"s":""]})]})}),e.jsx(f,{className:"space-y-4",children:o[i].map(E)})]},i))}),n.length>0&&e.jsxs(g,{className:"mt-6",children:[e.jsxs(N,{children:[e.jsx(b,{className:"text-xl",children:"Manual operations"}),e.jsx(R,{children:"Visible invocation history; excluded from scheduled health and coverage"})]}),e.jsx(f,{className:"space-y-4",children:n.map(E)})]})]})]}),e.jsxs(B,{value:"leaderboard-syncs",className:"mt-6",children:[I&&e.jsxs("div",{className:"flex items-center justify-center py-12",children:[e.jsx(A,{className:"h-8 w-8 animate-spin cron-info-text"}),e.jsx("span",{className:"ml-3 cron-muted",children:"Loading leaderboard sync status..."})]}),h&&e.jsx(g,{className:"cron-status--broken",children:e.jsx(f,{className:"pt-6",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(X,{className:"h-5 w-5"}),e.jsx("p",{children:Y??"Failed to load leaderboard sync status. Please try again."})]})})}),p&&e.jsxs(g,{children:[e.jsx(N,{children:e.jsxs("div",{className:"flex items-center justify-between gap-4",children:[e.jsxs("div",{children:[e.jsx(b,{className:"text-xl",children:"Leaderboard syncs"}),e.jsx(R,{children:"Recurring imports from externally maintained benchmark leaderboards"})]}),e.jsxs(C,{children:[K.length," jobs"]})]})}),e.jsx(f,{className:"space-y-4",children:K.map(E)})]})]}),e.jsx(B,{value:"codex-paper-jobs",className:"mt-6",children:e.jsx(Js,{autoRefresh:a,refreshToken:t})}),e.jsx(B,{value:"catalog-audit",className:"mt-6",children:e.jsx(Os,{})}),e.jsxs(B,{value:"chat-compute",className:"mt-6",children:[e.jsxs(g,{className:"mb-6",children:[e.jsxs(N,{children:[e.jsx(b,{children:"Environment record"}),e.jsx(R,{children:"Leave blank for live staging, or enter the isolated environment printed by the spend qualification command."})]}),e.jsxs(f,{className:"flex gap-2",children:[e.jsx("input",{"aria-label":"Chat compute environment record",value:d,onChange:i=>j(i.target.value),placeholder:"staging-q-example",className:"flex-1 rounded border px-3 py-2"}),e.jsx(P,{onClick:()=>u(d.trim()),children:"Load"})]})]}),e.jsx(Us,{data:$.data,loading:$.isLoading,error:$.error}),s&&e.jsx("div",{className:"mt-6",children:e.jsx(Ws,{data:M.data,loading:M.isLoading,error:M.error})})]})]})]})})};export{Us as ChatComputePanel,Bs as CronSnapshotNotice,Ws as WebSearchBudgetPanel,zs as cronStatusRefetchInterval,ca as default}; diff --git a/assets/ExternalSourceEvalBadge-CQ-fBLgc.js b/assets/ExternalSourceEvalBadge-D7DvXFmF.js similarity index 94% rename from assets/ExternalSourceEvalBadge-CQ-fBLgc.js rename to assets/ExternalSourceEvalBadge-D7DvXFmF.js index 094d57249c7aac2fd1b938cfb2c5d7f383e537d8..89fd33b78cfe14c82434027e05913a2a57e38b0b 100644 --- a/assets/ExternalSourceEvalBadge-CQ-fBLgc.js +++ b/assets/ExternalSourceEvalBadge-D7DvXFmF.js @@ -1 +1 @@ -import{a as l}from"./papers-CrgFFrmi.js";import{Z as h,j as a,L as u}from"./index-Cry0GNHI.js";import{H as c,a as d,b as p}from"./hover-card-CbDqfS2l.js";import{s as g}from"./safeExternalHref-CkBrsh84.js";class m{constructor(e){this.request=e}list(e={}){const t=new URLSearchParams(Object.entries(e).filter(r=>r[1]!==void 0).map(([r,n])=>[r,String(n)])).toString();return this.request(`/evaluations/${t?`?${t}`:""}`,{cache:"no-store"})}get(e){return this.request(`/evaluations/${e}`)}async byPaper(e){return this.allPages({paper_id:Number(e),ordering:"-benchmark_popularity"})}async byDataset(e,t){return this.allPages({dataset_id:Number(e),best_metric:t,ordering:"best_rank"})}async byLeaderboard(e,t,r={}){return this.allPages({dataset_id:Number(e),task_id:Number(t),ordering:"best_rank",...r})}create(e){return this.request("/evaluations/",{method:"POST",body:JSON.stringify(e)})}update(e,t){return this.request(`/evaluations/${e}`,{method:"PUT",body:JSON.stringify(t)})}delete(e){return this.request(`/evaluations/${e}`,{method:"DELETE"})}primeCurationState(e,t=!1){return l.primeEvaluations(e,t)}batch(e,t){return l.mutateEvaluations(e,t,"/evaluations/batch",{method:"POST",body:JSON.stringify({paper_id:e,operations:t})})}async allPages(e){const r=await this.list({...e,page_size:100}),n=[...r.results];let i=r.next_page;for(;i;){const o=await this.list({...e,page:i,page_size:100});n.push(...o.results),i=o.next_page}return n}}const w=new m(h),S=()=>a.jsxs(c,{openDelay:120,closeDelay:120,children:[a.jsx(d,{asChild:!0,children:a.jsx("button",{type:"button",className:"bm-closed-source-tag","aria-label":"Closed-source model",children:"closed"})}),a.jsxs(p,{side:"top",align:"start",className:"w-auto max-w-[260px] p-3 text-sm leading-snug",children:["This is an evaluation of a closed-source model. You can disable viewing these in your"," ",a.jsx(u,{to:"/settings",className:"closed-eval-tooltip-link",children:"settings"}),"."]})]});function b(s){if(!s)return"Evaluation sourced outside this paper";const e=s.toLowerCase();if(e.includes("open-asr-leaderboard"))return"Open ASR Leaderboard";if(e.includes("arcprize.org"))return"ARC Prize Leaderboard";if(e.includes("frontierswe.com"))return"FrontierSWE";if(e.includes("deepswe.datacurve.ai"))return"DeepSWE";try{const t=new URL(s,"https://paperswithcode.co");return t.pathname.startsWith("/paper/")?"Source paper":t.hostname.replace(/^www\./,"")}catch{return s}}const j=({sourceUrl:s})=>{const e=g(s),t=typeof s=="string"&&s.startsWith("/paper/")?s:null,r=b(s);return a.jsxs(c,{openDelay:120,closeDelay:120,children:[a.jsx(d,{asChild:!0,children:a.jsx("button",{type:"button",className:"bm-external-source-tag","aria-label":`Externally sourced evaluation: ${r}`,children:"External"})}),a.jsxs(p,{side:"top",align:"start",className:"w-auto max-w-[280px] p-3 text-sm leading-snug",children:["This score was sourced outside this paper.",t?a.jsxs(a.Fragment,{children:[" ",a.jsx(u,{to:t,target:"_blank",rel:"noopener noreferrer",className:"external-eval-tooltip-link",children:r}),"."]}):e?a.jsxs(a.Fragment,{children:[" ",a.jsx("a",{href:e,target:"_blank",rel:"noopener noreferrer",className:"external-eval-tooltip-link",children:r}),"."]}):a.jsxs(a.Fragment,{children:[" ",r,"."]})]})]})};export{S as C,j as E,w as e}; +import{a as l}from"./papers-KXkGPHI5.js";import{Z as h,j as a,L as u}from"./index-Dt001B3A.js";import{H as c,a as d,b as p}from"./hover-card-C7JmPdFo.js";import{s as g}from"./safeExternalHref-CkBrsh84.js";class m{constructor(e){this.request=e}list(e={}){const t=new URLSearchParams(Object.entries(e).filter(r=>r[1]!==void 0).map(([r,n])=>[r,String(n)])).toString();return this.request(`/evaluations/${t?`?${t}`:""}`,{cache:"no-store"})}get(e){return this.request(`/evaluations/${e}`)}async byPaper(e){return this.allPages({paper_id:Number(e),ordering:"-benchmark_popularity"})}async byDataset(e,t){return this.allPages({dataset_id:Number(e),best_metric:t,ordering:"best_rank"})}async byLeaderboard(e,t,r={}){return this.allPages({dataset_id:Number(e),task_id:Number(t),ordering:"best_rank",...r})}create(e){return this.request("/evaluations/",{method:"POST",body:JSON.stringify(e)})}update(e,t){return this.request(`/evaluations/${e}`,{method:"PUT",body:JSON.stringify(t)})}delete(e){return this.request(`/evaluations/${e}`,{method:"DELETE"})}primeCurationState(e,t=!1){return l.primeEvaluations(e,t)}batch(e,t){return l.mutateEvaluations(e,t,"/evaluations/batch",{method:"POST",body:JSON.stringify({paper_id:e,operations:t})})}async allPages(e){const r=await this.list({...e,page_size:100}),n=[...r.results];let i=r.next_page;for(;i;){const o=await this.list({...e,page:i,page_size:100});n.push(...o.results),i=o.next_page}return n}}const w=new m(h),S=()=>a.jsxs(c,{openDelay:120,closeDelay:120,children:[a.jsx(d,{asChild:!0,children:a.jsx("button",{type:"button",className:"bm-closed-source-tag","aria-label":"Closed-source model",children:"closed"})}),a.jsxs(p,{side:"top",align:"start",className:"w-auto max-w-[260px] p-3 text-sm leading-snug",children:["This is an evaluation of a closed-source model. You can disable viewing these in your"," ",a.jsx(u,{to:"/settings",className:"closed-eval-tooltip-link",children:"settings"}),"."]})]});function b(s){if(!s)return"Evaluation sourced outside this paper";const e=s.toLowerCase();if(e.includes("open-asr-leaderboard"))return"Open ASR Leaderboard";if(e.includes("arcprize.org"))return"ARC Prize Leaderboard";if(e.includes("frontierswe.com"))return"FrontierSWE";if(e.includes("deepswe.datacurve.ai"))return"DeepSWE";try{const t=new URL(s,"https://paperswithcode.co");return t.pathname.startsWith("/paper/")?"Source paper":t.hostname.replace(/^www\./,"")}catch{return s}}const j=({sourceUrl:s})=>{const e=g(s),t=typeof s=="string"&&s.startsWith("/paper/")?s:null,r=b(s);return a.jsxs(c,{openDelay:120,closeDelay:120,children:[a.jsx(d,{asChild:!0,children:a.jsx("button",{type:"button",className:"bm-external-source-tag","aria-label":`Externally sourced evaluation: ${r}`,children:"External"})}),a.jsxs(p,{side:"top",align:"start",className:"w-auto max-w-[280px] p-3 text-sm leading-snug",children:["This score was sourced outside this paper.",t?a.jsxs(a.Fragment,{children:[" ",a.jsx(u,{to:t,target:"_blank",rel:"noopener noreferrer",className:"external-eval-tooltip-link",children:r}),"."]}):e?a.jsxs(a.Fragment,{children:[" ",a.jsx("a",{href:e,target:"_blank",rel:"noopener noreferrer",className:"external-eval-tooltip-link",children:r}),"."]}):a.jsxs(a.Fragment,{children:[" ",r,"."]})]})]})};export{S as C,j as E,w as e}; diff --git a/assets/FeedView-DkdrvXaC.js b/assets/FeedView-BBqtfWKy.js similarity index 90% rename from assets/FeedView-DkdrvXaC.js rename to assets/FeedView-BBqtfWKy.js index 00fa81784e71ef3b171b11626f647f860438598b..7e07d78a5f271c05ff8e0416d818ce3a634e4684 100644 --- a/assets/FeedView-DkdrvXaC.js +++ b/assets/FeedView-BBqtfWKy.js @@ -1 +1 @@ -import{u as q,r as c,i as k,j as e,a as $,L as C,b as B}from"./index-Cry0GNHI.js";import{P as K}from"./components-IPCTDA4d.js";import{r as U,u as z,P as G,a as W,w as Q}from"./paperDateRange-DQDDTCHP.js";import{D as V,u as X,P as Y,M as J,S as Z,a as ee,R as se,W as ae,A as te,b as re,q as ie,c as ne}from"./chatLaunch-DpNrK5mV.js";import{c as oe}from"./chat-FW6HqAah.js";import{c as M}from"./catalog-BjZE6R9z.js";import{S as _}from"./chatPrompts-CDY3UGU1.js";import{t as le,d as R}from"./transform-b6MI1iSQ.js";import{u as ce}from"./usePapers-B86z4_CJ.js";import{S as y}from"./skeleton-LwsL9heH.js";import{A as de,a as me}from"./alert-BAHZ4i9D.js";import{u as D}from"./useQuery-DlAfMYOD.js";import"./LatexTitle-CLc_16Sj.js";import"./katex.min-BSBacQyE.js";import"./papers-CrgFFrmi.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-C_By4VBc.js";import"./chevron-down-DR8n8lNp.js";import"./useInfiniteQuery-C8Q6ynv2.js";const he=[["trending","trending"],["date_published","newest"],["citation_count","most cited"]],H=45,pe=1800,ue=25,ge=350,xe=i=>{const[g,l]=c.useState(_[0].slice(0,1));return c.useEffect(()=>{var v,f;if(!i)return;if((f=(v=window.matchMedia)==null?void 0:v.call(window,"(prefers-reduced-motion: reduce)"))!=null&&f.matches){l(_[0]);return}let m=0,n=1,x=!1,h;l(_[0].slice(0,n));const d=()=>{const p=_[m];if(!x){if(n+=1,l(p.slice(0,n)),n===p.length){x=!0,h=window.setTimeout(d,pe);return}h=window.setTimeout(d,H);return}if(n-=1,l(p.slice(0,n)),n===0){x=!1,m=(m+1)%_.length,h=window.setTimeout(d,ge);return}h=window.setTimeout(d,ue)};return h=window.setTimeout(d,H),()=>window.clearTimeout(h)},[i]),g},fe=i=>i==="trending"||i==="date_published"||i==="citation_count"?i:"trending",be=()=>{var s,r;const i=q(),g=B()?Z:ee,[l,m]=c.useState({text:"",paperMentions:[]}),n=l.text,[x,h]=c.useState(0),[d,v]=c.useState(V),[f,p]=c.useState(!1),[o,A]=c.useState("low"),[b,E]=c.useState(!1),L=xe(!n),w=c.useRef(null),S=D({queryKey:["chatAvailability"],queryFn:()=>oe.getAvailability(),retry:!1,enabled:k()}),P=!!((s=S.data)!=null&&s.web_search_available),j=k()&&((r=S.data)==null?void 0:r.paper_mentions_enabled)!==!1,t=X({draft:l,onChange:m,enabled:j,textareaRef:w});c.useLayoutEffect(()=>{const a=w.current;if(!a)return;const u=()=>{if(a.style.height="auto",n){a.style.height=`${Math.min(a.scrollHeight,160)}px`;return}const N=a.placeholder,F=_.reduce((I,O)=>(a.placeholder=O,Math.max(I,a.scrollHeight)),0);a.placeholder=N,a.style.height=`${Math.min(F,160)}px`};return u(),window.addEventListener("resize",u),()=>window.removeEventListener("resize",u)},[n]);const T=async(a=l)=>{if(!(!a.text.trim()||b)){E(!0),ie(a,d,{webSearchEnabled:P&&f,reasoningEffort:o});try{const N=await ne(d,o);i(`/chat/${N.id}`)}catch{i("/chat")}}};return e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"ask-home-new",children:"Hint: type @ to bring papers into context"}),e.jsxs("div",{className:"ask-home",children:[e.jsxs("div",{className:"ask-home-textarea-wrap",children:[e.jsx(Y,{text:l.text,mentions:l.paperMentions,scrollTop:x,variant:"home"}),e.jsx("textarea",{ref:w,rows:1,value:n,placeholder:L,"aria-label":"Ask the assistant",disabled:b,onChange:a=>t.updateText(a.target.value,a.target.selectionStart),onSelect:a=>t.refresh(a.currentTarget.selectionStart),onClick:a=>t.refresh(a.currentTarget.selectionStart),onScroll:a=>h(a.currentTarget.scrollTop),onBlur:a=>{var u,N;(N=(u=a.relatedTarget)==null?void 0:u.closest)!=null&&N.call(u,".chat-paper-picker")||window.setTimeout(t.close,0)},onKeyDown:a=>{t.keyDown(a)||a.key==="Enter"&&!a.shiftKey&&(a.preventDefault(),T())},role:j?"combobox":void 0,"aria-expanded":j?t.open:void 0,"aria-controls":t.open?t.pickerId:void 0,"aria-activedescendant":t.open&&t.results.length?`${t.optionIdPrefix}-${t.activeIndex}`:void 0,"aria-autocomplete":j?"list":void 0,"aria-describedby":t.message?"ask-home-paper-mention-message":void 0})]}),t.message&&e.jsx("div",{id:"ask-home-paper-mention-message",className:"chat-paper-mention-message",role:"alert",children:t.message}),e.jsxs("div",{className:"ask-home-foot",children:[e.jsxs("div",{className:"ask-home-provider-tools",children:[e.jsx(J,{models:g,selectedModel:d,onModelChange:v}),e.jsx(se,{value:o,onChange:A,disabled:b}),P&&e.jsx(ae,{enabled:f,onChange:p,disabled:b})]}),e.jsx("button",{type:"button",className:`chat-send${n.trim()?" chat-send-on":""}`,onClick:()=>void T(),disabled:!n.trim()||b,"aria-label":"Ask the assistant",children:e.jsx(te,{})})]}),e.jsx(re,{open:t.open,query:t.query,results:t.results,activeIndex:t.activeIndex,loading:t.loading,error:t.error,onSelect:t.select,id:t.pickerId,optionIdPrefix:t.optionIdPrefix})]})]})},Ie=()=>{var S,P,j,t,T;const[i,g]=$(),l=fe(i.get("order_by")),m=U(i),n=i.get("has_code")==="true",x=i.get("has_hf_artifacts")==="true",h=s=>{const r=new URLSearchParams(i);r.set("order_by",s),g(r)},d=s=>{const r=new URLSearchParams(i);s?r.set("has_code","true"):r.delete("has_code"),g(r)},v=s=>{const r=new URLSearchParams(i);s?r.set("has_hf_artifacts","true"):r.delete("has_hf_artifacts"),g(r)},f=D({queryKey:["top-tasks-sidebar"],queryFn:()=>M.topTasks(8),staleTime:10*60*1e3}),p=D({queryKey:["trending-tasks-sidebar"],queryFn:()=>M.trendingTasks({limit:8,level:0}),staleTime:10*60*1e3}),o=ce({page_size:30,order_by:l,order_dir:"desc",start_date:m.startDate,end_date:m.endDate,include_resources:!0,has_code:n,has_hf_artifacts:x}),A=c.useMemo(()=>{var r;return(((r=o.data)==null?void 0:r.pages.flatMap(a=>a.results))||[]).map(le)},[o.data]),{targetRef:b,isIntersecting:E}=z({rootMargin:"400px"});c.useEffect(()=>{E&&o.hasNextPage&&!o.isFetchingNextPage&&o.fetchNextPage()},[E,o.hasNextPage,o.isFetchingNextPage]);const L=o.isLoading,w=o.error;return e.jsxs("div",{className:"page",children:[e.jsx("div",{className:"feed-header",children:e.jsxs("div",{children:[e.jsxs("h1",{className:"feed-title",children:["Trending ",e.jsx("em",{children:"Research"})]}),e.jsx("div",{className:"feed-subtitle",children:"Curated daily from arXiv and Hugging Face"})]})}),e.jsxs("div",{className:"layout-with-sidebar",children:[e.jsxs("aside",{className:"sidebar",children:[e.jsxs("div",{className:"sidebar-section sidebar-section-top-domains",children:[e.jsx("div",{className:"sidebar-label",children:"Top Domains"}),f.isLoading&&e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:Array.from({length:6}).map((s,r)=>e.jsx(y,{className:"h-5 w-full"},r))}),(S=f.data)==null?void 0:S.map(s=>e.jsxs(C,{to:`/tasks/${s.slug}`,className:"sidebar-link",children:[R(s.name,s.slug),s.paper_count!=null&&e.jsx("span",{className:"count",children:s.paper_count})]},s.id)),e.jsx(C,{to:"/tasks",className:"sidebar-link",style:{marginTop:8,fontStyle:"italic"},children:"all domains →"})]}),e.jsxs("div",{className:"sidebar-section sidebar-section-trending-domains",children:[e.jsx("div",{className:"sidebar-label",children:"Trending Domains"}),p.isLoading&&e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:Array.from({length:6}).map((s,r)=>e.jsx(y,{className:"h-5 w-full"},r))}),((j=(P=p.data)==null?void 0:P.results)==null?void 0:j.length)===0&&!p.isLoading&&e.jsx("div",{style:{fontSize:12,color:"var(--ink-faint)"},children:"No domains gaining momentum right now."}),(T=(t=p.data)==null?void 0:t.results)==null?void 0:T.map(s=>e.jsxs(C,{to:`/tasks/${s.slug}`,className:"sidebar-link",children:[R(s.name,s.slug),e.jsxs("span",{className:"count",children:[s.share_lift.toFixed(1),"x"]})]},s.id))]})]}),e.jsxs("div",{className:"feed-main",children:[k()&&e.jsx("div",{className:"feed-chat",children:e.jsx(be,{})}),e.jsxs("div",{className:"feed-content",children:[e.jsxs("div",{className:"sort-bar home-feed-sort-bar",children:[e.jsxs("div",{className:"paper-feed-toolbar-controls",children:[e.jsx("div",{className:"sort-options",children:he.map(([s,r])=>e.jsx("button",{className:`sort-btn ${l===s?"active":""}`,onClick:()=>h(s),children:r},s))}),e.jsx(G,{hasCode:n,hasHfArtifacts:x,onHasCodeChange:d,onHasHfArtifactsChange:v})]}),e.jsx(W,{startDate:m.startDate,endDate:m.endDate,onChange:s=>g(Q(i,s))})]}),w&&e.jsx(de,{variant:"destructive",className:"mb-4",children:e.jsx(me,{children:"Failed to load papers. Please try again."})}),L?e.jsx("div",{className:"paper-list",children:Array.from({length:6}).map((s,r)=>e.jsxs("div",{className:"paper-card",children:[e.jsx("div",{className:"paper-thumb-wrap",children:e.jsx(y,{className:"paper-thumb-skeleton"})}),e.jsxs("div",{className:"paper-body",style:{flex:1,gap:12},children:[e.jsx(y,{className:"h-6 w-3/4"}),e.jsx(y,{className:"h-4 w-1/2"}),e.jsx(y,{className:"h-12 w-full"})]})]},r))}):A.length===0?e.jsx("div",{className:"no-results",children:"No papers in this window."}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"paper-list",children:A.map((s,r)=>e.jsx(K,{paper:s,rank:r+1},s.id))}),e.jsx("div",{ref:b,style:{height:1}}),o.isFetchingNextPage&&e.jsx("div",{style:{padding:"20px 0",textAlign:"center",color:"var(--ink-faint)"},children:"Loading more…"})]})]})]})]})]})};export{be as AskAssistant,Ie as default}; +import{u as q,r as c,i as k,j as e,a as $,L as C,b as B}from"./index-Dt001B3A.js";import{P as K}from"./components-DMT1vhIy.js";import{r as U,u as z,P as G,a as W,w as Q}from"./paperDateRange-BJ29xsSE.js";import{D as V,u as X,P as Y,M as J,S as Z,a as ee,R as se,W as ae,A as te,b as re,q as ie,c as ne}from"./chatLaunch-C8mQqa_z.js";import{c as oe}from"./chat-98y1Ufht.js";import{c as M}from"./catalog-BOpSeTzm.js";import{S as _}from"./chatPrompts-CDY3UGU1.js";import{t as le,d as R}from"./transform-DgCWw6nP.js";import{u as ce}from"./usePapers-qkM3n2JN.js";import{S as y}from"./skeleton-DkhIJUB4.js";import{A as de,a as me}from"./alert-Xa-AqUL5.js";import{u as D}from"./useQuery-DD4hUA6p.js";import"./LatexTitle-B651zAGR.js";import"./katex.min-BSBacQyE.js";import"./papers-KXkGPHI5.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-DDOhCeb4.js";import"./chevron-down-BXCXby03.js";import"./useInfiniteQuery-CgAOxB5d.js";const he=[["trending","trending"],["date_published","newest"],["citation_count","most cited"]],H=45,pe=1800,ue=25,ge=350,xe=i=>{const[g,l]=c.useState(_[0].slice(0,1));return c.useEffect(()=>{var v,f;if(!i)return;if((f=(v=window.matchMedia)==null?void 0:v.call(window,"(prefers-reduced-motion: reduce)"))!=null&&f.matches){l(_[0]);return}let m=0,n=1,x=!1,h;l(_[0].slice(0,n));const d=()=>{const p=_[m];if(!x){if(n+=1,l(p.slice(0,n)),n===p.length){x=!0,h=window.setTimeout(d,pe);return}h=window.setTimeout(d,H);return}if(n-=1,l(p.slice(0,n)),n===0){x=!1,m=(m+1)%_.length,h=window.setTimeout(d,ge);return}h=window.setTimeout(d,ue)};return h=window.setTimeout(d,H),()=>window.clearTimeout(h)},[i]),g},fe=i=>i==="trending"||i==="date_published"||i==="citation_count"?i:"trending",be=()=>{var s,r;const i=q(),g=B()?Z:ee,[l,m]=c.useState({text:"",paperMentions:[]}),n=l.text,[x,h]=c.useState(0),[d,v]=c.useState(V),[f,p]=c.useState(!1),[o,A]=c.useState("low"),[b,E]=c.useState(!1),L=xe(!n),w=c.useRef(null),S=D({queryKey:["chatAvailability"],queryFn:()=>oe.getAvailability(),retry:!1,enabled:k()}),P=!!((s=S.data)!=null&&s.web_search_available),j=k()&&((r=S.data)==null?void 0:r.paper_mentions_enabled)!==!1,t=X({draft:l,onChange:m,enabled:j,textareaRef:w});c.useLayoutEffect(()=>{const a=w.current;if(!a)return;const u=()=>{if(a.style.height="auto",n){a.style.height=`${Math.min(a.scrollHeight,160)}px`;return}const N=a.placeholder,F=_.reduce((I,O)=>(a.placeholder=O,Math.max(I,a.scrollHeight)),0);a.placeholder=N,a.style.height=`${Math.min(F,160)}px`};return u(),window.addEventListener("resize",u),()=>window.removeEventListener("resize",u)},[n]);const T=async(a=l)=>{if(!(!a.text.trim()||b)){E(!0),ie(a,d,{webSearchEnabled:P&&f,reasoningEffort:o});try{const N=await ne(d,o);i(`/chat/${N.id}`)}catch{i("/chat")}}};return e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"ask-home-new",children:"Hint: type @ to bring papers into context"}),e.jsxs("div",{className:"ask-home",children:[e.jsxs("div",{className:"ask-home-textarea-wrap",children:[e.jsx(Y,{text:l.text,mentions:l.paperMentions,scrollTop:x,variant:"home"}),e.jsx("textarea",{ref:w,rows:1,value:n,placeholder:L,"aria-label":"Ask the assistant",disabled:b,onChange:a=>t.updateText(a.target.value,a.target.selectionStart),onSelect:a=>t.refresh(a.currentTarget.selectionStart),onClick:a=>t.refresh(a.currentTarget.selectionStart),onScroll:a=>h(a.currentTarget.scrollTop),onBlur:a=>{var u,N;(N=(u=a.relatedTarget)==null?void 0:u.closest)!=null&&N.call(u,".chat-paper-picker")||window.setTimeout(t.close,0)},onKeyDown:a=>{t.keyDown(a)||a.key==="Enter"&&!a.shiftKey&&(a.preventDefault(),T())},role:j?"combobox":void 0,"aria-expanded":j?t.open:void 0,"aria-controls":t.open?t.pickerId:void 0,"aria-activedescendant":t.open&&t.results.length?`${t.optionIdPrefix}-${t.activeIndex}`:void 0,"aria-autocomplete":j?"list":void 0,"aria-describedby":t.message?"ask-home-paper-mention-message":void 0})]}),t.message&&e.jsx("div",{id:"ask-home-paper-mention-message",className:"chat-paper-mention-message",role:"alert",children:t.message}),e.jsxs("div",{className:"ask-home-foot",children:[e.jsxs("div",{className:"ask-home-provider-tools",children:[e.jsx(J,{models:g,selectedModel:d,onModelChange:v}),e.jsx(se,{value:o,onChange:A,disabled:b}),P&&e.jsx(ae,{enabled:f,onChange:p,disabled:b})]}),e.jsx("button",{type:"button",className:`chat-send${n.trim()?" chat-send-on":""}`,onClick:()=>void T(),disabled:!n.trim()||b,"aria-label":"Ask the assistant",children:e.jsx(te,{})})]}),e.jsx(re,{open:t.open,query:t.query,results:t.results,activeIndex:t.activeIndex,loading:t.loading,error:t.error,onSelect:t.select,id:t.pickerId,optionIdPrefix:t.optionIdPrefix})]})]})},Ie=()=>{var S,P,j,t,T;const[i,g]=$(),l=fe(i.get("order_by")),m=U(i),n=i.get("has_code")==="true",x=i.get("has_hf_artifacts")==="true",h=s=>{const r=new URLSearchParams(i);r.set("order_by",s),g(r)},d=s=>{const r=new URLSearchParams(i);s?r.set("has_code","true"):r.delete("has_code"),g(r)},v=s=>{const r=new URLSearchParams(i);s?r.set("has_hf_artifacts","true"):r.delete("has_hf_artifacts"),g(r)},f=D({queryKey:["top-tasks-sidebar"],queryFn:()=>M.topTasks(8),staleTime:10*60*1e3}),p=D({queryKey:["trending-tasks-sidebar"],queryFn:()=>M.trendingTasks({limit:8,level:0}),staleTime:10*60*1e3}),o=ce({page_size:30,order_by:l,order_dir:"desc",start_date:m.startDate,end_date:m.endDate,include_resources:!0,has_code:n,has_hf_artifacts:x}),A=c.useMemo(()=>{var r;return(((r=o.data)==null?void 0:r.pages.flatMap(a=>a.results))||[]).map(le)},[o.data]),{targetRef:b,isIntersecting:E}=z({rootMargin:"400px"});c.useEffect(()=>{E&&o.hasNextPage&&!o.isFetchingNextPage&&o.fetchNextPage()},[E,o.hasNextPage,o.isFetchingNextPage]);const L=o.isLoading,w=o.error;return e.jsxs("div",{className:"page",children:[e.jsx("div",{className:"feed-header",children:e.jsxs("div",{children:[e.jsxs("h1",{className:"feed-title",children:["Trending ",e.jsx("em",{children:"Research"})]}),e.jsx("div",{className:"feed-subtitle",children:"Curated daily from arXiv and Hugging Face"})]})}),e.jsxs("div",{className:"layout-with-sidebar",children:[e.jsxs("aside",{className:"sidebar",children:[e.jsxs("div",{className:"sidebar-section sidebar-section-top-domains",children:[e.jsx("div",{className:"sidebar-label",children:"Top Domains"}),f.isLoading&&e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:Array.from({length:6}).map((s,r)=>e.jsx(y,{className:"h-5 w-full"},r))}),(S=f.data)==null?void 0:S.map(s=>e.jsxs(C,{to:`/tasks/${s.slug}`,className:"sidebar-link",children:[R(s.name,s.slug),s.paper_count!=null&&e.jsx("span",{className:"count",children:s.paper_count})]},s.id)),e.jsx(C,{to:"/tasks",className:"sidebar-link",style:{marginTop:8,fontStyle:"italic"},children:"all domains →"})]}),e.jsxs("div",{className:"sidebar-section sidebar-section-trending-domains",children:[e.jsx("div",{className:"sidebar-label",children:"Trending Domains"}),p.isLoading&&e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:Array.from({length:6}).map((s,r)=>e.jsx(y,{className:"h-5 w-full"},r))}),((j=(P=p.data)==null?void 0:P.results)==null?void 0:j.length)===0&&!p.isLoading&&e.jsx("div",{style:{fontSize:12,color:"var(--ink-faint)"},children:"No domains gaining momentum right now."}),(T=(t=p.data)==null?void 0:t.results)==null?void 0:T.map(s=>e.jsxs(C,{to:`/tasks/${s.slug}`,className:"sidebar-link",children:[R(s.name,s.slug),e.jsxs("span",{className:"count",children:[s.share_lift.toFixed(1),"x"]})]},s.id))]})]}),e.jsxs("div",{className:"feed-main",children:[k()&&e.jsx("div",{className:"feed-chat",children:e.jsx(be,{})}),e.jsxs("div",{className:"feed-content",children:[e.jsxs("div",{className:"sort-bar home-feed-sort-bar",children:[e.jsxs("div",{className:"paper-feed-toolbar-controls",children:[e.jsx("div",{className:"sort-options",children:he.map(([s,r])=>e.jsx("button",{className:`sort-btn ${l===s?"active":""}`,onClick:()=>h(s),children:r},s))}),e.jsx(G,{hasCode:n,hasHfArtifacts:x,onHasCodeChange:d,onHasHfArtifactsChange:v})]}),e.jsx(W,{startDate:m.startDate,endDate:m.endDate,onChange:s=>g(Q(i,s))})]}),w&&e.jsx(de,{variant:"destructive",className:"mb-4",children:e.jsx(me,{children:"Failed to load papers. Please try again."})}),L?e.jsx("div",{className:"paper-list",children:Array.from({length:6}).map((s,r)=>e.jsxs("div",{className:"paper-card",children:[e.jsx("div",{className:"paper-thumb-wrap",children:e.jsx(y,{className:"paper-thumb-skeleton"})}),e.jsxs("div",{className:"paper-body",style:{flex:1,gap:12},children:[e.jsx(y,{className:"h-6 w-3/4"}),e.jsx(y,{className:"h-4 w-1/2"}),e.jsx(y,{className:"h-12 w-full"})]})]},r))}):A.length===0?e.jsx("div",{className:"no-results",children:"No papers in this window."}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"paper-list",children:A.map((s,r)=>e.jsx(K,{paper:s,rank:r+1},s.id))}),e.jsx("div",{ref:b,style:{height:1}}),o.isFetchingNextPage&&e.jsx("div",{style:{padding:"20px 0",textAlign:"center",color:"var(--ink-faint)"},children:"Loading more…"})]})]})]})]})]})};export{be as AskAssistant,Ie as default}; diff --git a/assets/FrameworksIndexView-C07bXY9T.js b/assets/FrameworksIndexView-DIYY9ojn.js similarity index 92% rename from assets/FrameworksIndexView-C07bXY9T.js rename to assets/FrameworksIndexView-DIYY9ojn.js index 2466ba2bbd2cf0204b0d2421d9929c2a15f91c8a..295670cb03d09dbca0ba408c1e73d30b17a9a387 100644 --- a/assets/FrameworksIndexView-C07bXY9T.js +++ b/assets/FrameworksIndexView-DIYY9ojn.js @@ -1 +1 @@ -import{u as d,j as e,L as o,z as m}from"./index-Cry0GNHI.js";import{u as p}from"./useQuery-DlAfMYOD.js";import{I as h}from"./components-IPCTDA4d.js";import{c as u}from"./catalog-BjZE6R9z.js";import{c as g,h as f}from"./transform-b6MI1iSQ.js";import"./LatexTitle-CLc_16Sj.js";import"./katex.min-BSBacQyE.js";import"./papers-CrgFFrmi.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{u as d,j as e,L as o,z as m}from"./index-Dt001B3A.js";import{u as p}from"./useQuery-DD4hUA6p.js";import{I as h}from"./components-DMT1vhIy.js";import{c as u}from"./catalog-BOpSeTzm.js";import{c as g,h as f}from"./transform-DgCWw6nP.js";import"./LatexTitle-B651zAGR.js";import"./katex.min-BSBacQyE.js";import"./papers-KXkGPHI5.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-CLc_16Sj.js b/assets/LatexTitle-B651zAGR.js similarity index 98% rename from assets/LatexTitle-CLc_16Sj.js rename to assets/LatexTitle-B651zAGR.js index 9c0d91f7ec5fbf557a92cb026b02d0c717bfa117..ea4d8191d503f39d0cfc882e59a5b43a0a794a21 100644 --- a/assets/LatexTitle-CLc_16Sj.js +++ b/assets/LatexTitle-B651zAGR.js @@ -1 +1 @@ -import{j as u,r as E}from"./index-Cry0GNHI.js";import{k as j}from"./katex.min-BSBacQyE.js";const C=new Set([",",";",":","!"," ","quad","qquad","enspace","thinspace"]),M={a:"á",e:"é",i:"í",o:"ó",u:"ú",y:"ý",A:"Á",E:"É",I:"Í",O:"Ó",U:"Ú",Y:"Ý"},_={a:"à",e:"è",i:"ì",o:"ò",u:"ù",A:"À",E:"È",I:"Ì",O:"Ò",U:"Ù"},b={a:"â",e:"ê",i:"î",o:"ô",u:"û",A:"Â",E:"Ê",I:"Î",O:"Ô",U:"Û"},w={a:"ä",e:"ë",i:"ï",o:"ö",u:"ü",y:"ÿ",A:"Ä",E:"Ë",I:"Ï",O:"Ö",U:"Ü",Y:"Ÿ"},O={"'":M,"`":_,"^":b,'"':w,"~":{n:"ñ",N:"Ñ"}},$={ss:"ß",ae:"æ",AE:"Æ",oe:"œ",OE:"Œ",o:"ø",O:"Ø",l:"ł",L:"Ł"};function S(n,s){var e;return((e=O[n])==null?void 0:e[s])??null}function N(n){const s=[];let e=0,r="";const t=()=>{r&&(s.push({type:"text",content:r}),r="")};for(;e=n.length)return{name:"",end:e};if(!/[a-zA-Z]/.test(n[e]))return{name:n[e],end:e+1};const r=e;for(;e=n.length)return null;if(n[s+1]==="{"){const r=d(n,s+1);return r?{end:r.end}:null}return/[A-Za-z0-9+\-=.]/.test(n[s+1])?{end:s+2}:null}function L(n,s){let e=s;if(n[e]==="\\"){const{name:o,end:i}=y(n,e);if(!o)return null;if(e=i,n[e]==="{"){const a=d(n,e);a&&(e=a.end)}}else if(/[A-Za-z0-9]/.test(n[e])){let o=e+1;for(;oe.length-s.length)}function z(n,s,e){const r=U(s);if(!r.length)return[n];const t=r.map(i=>i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")),o=new RegExp(`(${t.join("|")})`,"gi");return n.split(o).filter(Boolean).map((i,a)=>r.some(p=>p.toLocaleLowerCase()===i.toLocaleLowerCase())?u.jsx("mark",{children:i},`${e}-mark-${a}`):i)}function m(n,s,e){const r=[];let t=0,o=0;const i=()=>`${s}-${o++}`,a=(p,f)=>p==="strong"?u.jsx("strong",{children:f},i()):u.jsx("em",{children:f},i());for(;tt&&r.push(...z(n.slice(t,f),e,i())),t=f}return r}function g({latex:n,display:s}){const e=E.useMemo(()=>{try{return j.renderToString(n.trim(),{displayMode:s,throwOnError:!1})}catch{return null}},[n,s]);return e?u.jsx("span",{className:s?"katex-display":void 0,dangerouslySetInnerHTML:{__html:e}}):u.jsx(u.Fragment,{children:s?`$$${n}$$`:`$${n}$`})}function I(n,s){const e=N(n),r=[];return e.forEach((t,o)=>{const i=`latex-${o}`;if(t.type==="text"){const a=m(t.content,i,s);a.length===1?r.push(a[0]):a.length>1&&r.push(u.jsx(E.Fragment,{children:a},i));return}if(t.type==="display"){r.push(u.jsx(g,{latex:t.content,display:!0},i));return}r.push(u.jsx(g,{latex:t.content,display:!1},i))}),r.length===1?r[0]:u.jsx(u.Fragment,{children:r})}const X=({text:n,className:s="",highlight:e})=>{const r=E.useMemo(()=>I(n,e),[n,e]);return u.jsx("span",{className:s,children:r})},D=({title:n,className:s="",highlight:e})=>u.jsx(X,{text:n,className:s,highlight:e});export{D as L,X as a}; +import{j as u,r as E}from"./index-Dt001B3A.js";import{k as j}from"./katex.min-BSBacQyE.js";const C=new Set([",",";",":","!"," ","quad","qquad","enspace","thinspace"]),M={a:"á",e:"é",i:"í",o:"ó",u:"ú",y:"ý",A:"Á",E:"É",I:"Í",O:"Ó",U:"Ú",Y:"Ý"},_={a:"à",e:"è",i:"ì",o:"ò",u:"ù",A:"À",E:"È",I:"Ì",O:"Ò",U:"Ù"},b={a:"â",e:"ê",i:"î",o:"ô",u:"û",A:"Â",E:"Ê",I:"Î",O:"Ô",U:"Û"},w={a:"ä",e:"ë",i:"ï",o:"ö",u:"ü",y:"ÿ",A:"Ä",E:"Ë",I:"Ï",O:"Ö",U:"Ü",Y:"Ÿ"},O={"'":M,"`":_,"^":b,'"':w,"~":{n:"ñ",N:"Ñ"}},$={ss:"ß",ae:"æ",AE:"Æ",oe:"œ",OE:"Œ",o:"ø",O:"Ø",l:"ł",L:"Ł"};function S(n,s){var e;return((e=O[n])==null?void 0:e[s])??null}function N(n){const s=[];let e=0,r="";const t=()=>{r&&(s.push({type:"text",content:r}),r="")};for(;e=n.length)return{name:"",end:e};if(!/[a-zA-Z]/.test(n[e]))return{name:n[e],end:e+1};const r=e;for(;e=n.length)return null;if(n[s+1]==="{"){const r=d(n,s+1);return r?{end:r.end}:null}return/[A-Za-z0-9+\-=.]/.test(n[s+1])?{end:s+2}:null}function L(n,s){let e=s;if(n[e]==="\\"){const{name:o,end:i}=y(n,e);if(!o)return null;if(e=i,n[e]==="{"){const a=d(n,e);a&&(e=a.end)}}else if(/[A-Za-z0-9]/.test(n[e])){let o=e+1;for(;oe.length-s.length)}function z(n,s,e){const r=U(s);if(!r.length)return[n];const t=r.map(i=>i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")),o=new RegExp(`(${t.join("|")})`,"gi");return n.split(o).filter(Boolean).map((i,a)=>r.some(p=>p.toLocaleLowerCase()===i.toLocaleLowerCase())?u.jsx("mark",{children:i},`${e}-mark-${a}`):i)}function m(n,s,e){const r=[];let t=0,o=0;const i=()=>`${s}-${o++}`,a=(p,f)=>p==="strong"?u.jsx("strong",{children:f},i()):u.jsx("em",{children:f},i());for(;tt&&r.push(...z(n.slice(t,f),e,i())),t=f}return r}function g({latex:n,display:s}){const e=E.useMemo(()=>{try{return j.renderToString(n.trim(),{displayMode:s,throwOnError:!1})}catch{return null}},[n,s]);return e?u.jsx("span",{className:s?"katex-display":void 0,dangerouslySetInnerHTML:{__html:e}}):u.jsx(u.Fragment,{children:s?`$$${n}$$`:`$${n}$`})}function I(n,s){const e=N(n),r=[];return e.forEach((t,o)=>{const i=`latex-${o}`;if(t.type==="text"){const a=m(t.content,i,s);a.length===1?r.push(a[0]):a.length>1&&r.push(u.jsx(E.Fragment,{children:a},i));return}if(t.type==="display"){r.push(u.jsx(g,{latex:t.content,display:!0},i));return}r.push(u.jsx(g,{latex:t.content,display:!1},i))}),r.length===1?r[0]:u.jsx(u.Fragment,{children:r})}const X=({text:n,className:s="",highlight:e})=>{const r=E.useMemo(()=>I(n,e),[n,e]);return u.jsx("span",{className:s,children:r})},D=({title:n,className:s="",highlight:e})=>u.jsx(X,{text:n,className:s,highlight:e});export{D as L,X as a}; diff --git a/assets/MarkdownText-CzUmjuOY.js b/assets/MarkdownText-DeuWKnsZ.js similarity index 85% rename from assets/MarkdownText-CzUmjuOY.js rename to assets/MarkdownText-DeuWKnsZ.js index 44284876b366777a6d0077727376653a9bd2a315..085f33bf437be32138ef29b317fb89d78c8d5024 100644 --- a/assets/MarkdownText-CzUmjuOY.js +++ b/assets/MarkdownText-DeuWKnsZ.js @@ -1 +1 @@ -import{n as l,j as s,L as u}from"./index-Cry0GNHI.js";import"./katex.min-BSBacQyE.js";import{r as p,a as m,P as h}from"./PaperPreviewLink-CPKVU1Zw.js";import{M as d,r as w}from"./index-D7CE3jjK.js";const x=new Set(["paperswithcode.co","www.paperswithcode.co","localhost","127.0.0.1","167.235.148.241"]),P=["/methods","/paper","/papers","/tasks","/benchmark","/conferences"];function f(n,o=window.location.origin){if(!n)return null;let t;if(n.startsWith("/"))t=n;else try{const r=new URL(n,o);if(!x.has(r.hostname))return null;t=`${r.pathname}${r.search}${r.hash}`}catch{return null}const e=t.split(/[?#]/,1)[0];return P.some(r=>e===r||e.startsWith(`${r}/`))?t:null}function k(n){const t=n.split(/[?#]/,1)[0].match(/^\/papers?\/([^/]+)$/);if(!t||t[1].includes("%"))return null;const e=t[1],r=/^\d{4}[.-]\d{4,5}(?:v\d+)?$/.test(e),a=/^[1-9]\d*$/.test(e);return!r&&!a?null:l(e)}const E=({text:n,className:o=""})=>s.jsx("div",{className:o,children:s.jsx(d,{remarkPlugins:[w,m],rehypePlugins:[p],components:{a:({href:t,children:e,node:r,...a})=>{const i=f(t);if(i){const c=k(i);return c?s.jsx(h,{routeId:c,to:i,...a,children:e}):s.jsx(u,{to:i,...a,children:e})}return s.jsx("a",{href:t,target:"_blank",rel:"noopener noreferrer",...a,children:e})}},children:n})});export{E as M,f as r}; +import{n as l,j as s,L as u}from"./index-Dt001B3A.js";import"./katex.min-BSBacQyE.js";import{r as p,a as m,P as h}from"./PaperPreviewLink-CCwg7dvd.js";import{M as d,r as w}from"./index-Byizcq9V.js";const x=new Set(["paperswithcode.co","www.paperswithcode.co","localhost","127.0.0.1","167.235.148.241"]),P=["/methods","/paper","/papers","/tasks","/benchmark","/conferences"];function f(n,o=window.location.origin){if(!n)return null;let t;if(n.startsWith("/"))t=n;else try{const r=new URL(n,o);if(!x.has(r.hostname))return null;t=`${r.pathname}${r.search}${r.hash}`}catch{return null}const e=t.split(/[?#]/,1)[0];return P.some(r=>e===r||e.startsWith(`${r}/`))?t:null}function k(n){const t=n.split(/[?#]/,1)[0].match(/^\/papers?\/([^/]+)$/);if(!t||t[1].includes("%"))return null;const e=t[1],r=/^\d{4}[.-]\d{4,5}(?:v\d+)?$/.test(e),a=/^[1-9]\d*$/.test(e);return!r&&!a?null:l(e)}const E=({text:n,className:o=""})=>s.jsx("div",{className:o,children:s.jsx(d,{remarkPlugins:[w,m],rehypePlugins:[p],components:{a:({href:t,children:e,node:r,...a})=>{const i=f(t);if(i){const c=k(i);return c?s.jsx(h,{routeId:c,to:i,...a,children:e}):s.jsx(u,{to:i,...a,children:e})}return s.jsx("a",{href:t,target:"_blank",rel:"noopener noreferrer",...a,children:e})}},children:n})});export{E as M,f as r}; diff --git a/assets/MethodDetailView-BNXK8V3e.js b/assets/MethodDetailView-UdG0EtHc.js similarity index 94% rename from assets/MethodDetailView-BNXK8V3e.js rename to assets/MethodDetailView-UdG0EtHc.js index 434159a05203b05b0ddd31b2c20163ecf1eb378e..75e08bad7543452fd5da64d2d1ebf070a0e2102a 100644 --- a/assets/MethodDetailView-BNXK8V3e.js +++ b/assets/MethodDetailView-UdG0EtHc.js @@ -1 +1 @@ -import{j as e,r as A,c as Z,a as V,L,aa as X}from"./index-Cry0GNHI.js";import{u as F}from"./useQuery-DlAfMYOD.js";import{u as Y}from"./useInfiniteQuery-C8Q6ynv2.js";import{M as J,P as ee}from"./components-IPCTDA4d.js";import{r as te,u as ae,P as se,a as re,w as ne}from"./paperDateRange-DQDDTCHP.js";import{r as ie,M as K}from"./MarkdownText-CzUmjuOY.js";import{c as k}from"./catalog-BjZE6R9z.js";import{p as le}from"./papers-CrgFFrmi.js";import{s as oe}from"./slug-BpH-Nkvz.js";import{t as ce}from"./transform-b6MI1iSQ.js";import{S as M}from"./skeleton-LwsL9heH.js";import{A as de,a as me}from"./alert-BAHZ4i9D.js";import{s as he}from"./safeExternalHref-CkBrsh84.js";import"./LatexTitle-CLc_16Sj.js";import"./katex.min-BSBacQyE.js";import"./popover-C_By4VBc.js";import"./PaperPreviewLink-CPKVU1Zw.js";import"./index-D7CE3jjK.js";import"./hover-card-CbDqfS2l.js";const a={pink:"#F8D7D9",pinkS:"#D9B0B3",yellow:"#FBEFC2",yellowS:"#C9B97D",orange:"#F8D7B3",orangeS:"#C99466",blue:"#CDE2EE",blueS:"#7FA4BA",purple:"#D4D2EA",purpleS:"#8E8AC0",green:"#CCE2C5",greenS:"#7DA475",ink:"#1A1814",faint:"#8E8678"},j=({x:t,y:n,w:o,h:c,fill:g,stroke:x,label:p,fontSize:i=10,multiline:y})=>e.jsxs("g",{children:[e.jsx("rect",{x:t,y:n,width:o,height:c,rx:"3",ry:"3",fill:g,stroke:x,strokeWidth:"1"}),y?e.jsxs(e.Fragment,{children:[e.jsx("text",{x:t+o/2,y:n+c/2-2,fontSize:i,fontFamily:"var(--sans)",fill:a.ink,textAnchor:"middle",dominantBaseline:"middle",children:y[0]}),e.jsx("text",{x:t+o/2,y:n+c/2+i-1,fontSize:i,fontFamily:"var(--sans)",fill:a.ink,textAnchor:"middle",dominantBaseline:"middle",children:y[1]})]}):e.jsx("text",{x:t+o/2,y:n+c/2,fontSize:i,fontFamily:"var(--sans)",fill:a.ink,textAnchor:"middle",dominantBaseline:"middle",children:p})]}),pe=()=>e.jsxs("svg",{viewBox:"0 0 360 420",width:"100%",height:"100%",style:{display:"block"},children:[e.jsx("text",{x:"180",y:"20",fontSize:"11",fontFamily:"var(--serif)",fontStyle:"italic",fill:a.faint,textAnchor:"middle",children:"Scaled Dot-Product Attention"}),e.jsx(j,{x:140,y:40,w:80,h:26,fill:a.yellow,stroke:a.yellowS,label:"MatMul",fontSize:11}),e.jsx("path",{d:"M180 66 L180 80",stroke:a.ink}),e.jsx(j,{x:140,y:80,w:80,h:26,fill:a.green,stroke:a.greenS,label:"SoftMax",fontSize:11}),e.jsx("path",{d:"M180 106 L180 120",stroke:a.ink}),e.jsx(j,{x:140,y:120,w:80,h:26,fill:a.purple,stroke:a.purpleS,label:"Mask (opt.)",fontSize:11}),e.jsx("path",{d:"M180 146 L180 160",stroke:a.ink}),e.jsx(j,{x:140,y:160,w:80,h:26,fill:a.blue,stroke:a.blueS,label:"Scale ÷√dₖ",fontSize:11}),e.jsx("path",{d:"M180 186 L180 200",stroke:a.ink}),e.jsx(j,{x:140,y:200,w:80,h:26,fill:a.yellow,stroke:a.yellowS,label:"MatMul",fontSize:11}),e.jsx("path",{d:"M156 226 L120 270",stroke:a.ink}),e.jsx("path",{d:"M180 226 L180 270",stroke:a.ink}),e.jsx("path",{d:"M204 226 L240 270",stroke:a.ink}),e.jsx(j,{x:100,y:270,w:40,h:24,fill:a.pink,stroke:a.pinkS,label:"Q",fontSize:13}),e.jsx(j,{x:160,y:270,w:40,h:24,fill:a.pink,stroke:a.pinkS,label:"K",fontSize:13}),e.jsx(j,{x:220,y:270,w:40,h:24,fill:a.pink,stroke:a.pinkS,label:"V",fontSize:13}),e.jsxs("text",{x:"180",y:"330",fontSize:"14",fontFamily:"var(--serif)",fontStyle:"italic",fill:a.ink,textAnchor:"middle",children:["softmax(QK",e.jsx("tspan",{fontSize:"9",baselineShift:"super",children:"⊤"})," / √d) V"]})]}),ue=[["my-skill/",""],["├── SKILL.md","# Required: metadata + instructions"],["├── scripts/","# Optional: executable code"],["├── references/","# Optional: documentation"],["├── assets/","# Optional: templates, resources"],["└── ...","# Any additional files or directories"]],xe=()=>e.jsxs("svg",{viewBox:"0 0 360 420",width:"100%",height:"100%",style:{display:"block"},children:[e.jsx("text",{x:"180",y:"20",fontSize:"11",fontFamily:"var(--serif)",fontStyle:"italic",fill:a.faint,textAnchor:"middle",children:"Skill package layout"}),e.jsx("rect",{x:"28",y:"48",width:"304",height:"318",rx:"8",fill:"#FFFDF8",stroke:a.faint,strokeWidth:"1"}),ue.map(([t,n],o)=>{const c=92+o*44;return e.jsxs("g",{children:[e.jsx("text",{x:"44",y:c,fontSize:"11",fontFamily:"var(--mono)",fill:a.ink,dominantBaseline:"middle",children:t}),n?e.jsx("text",{x:"138",y:c,fontSize:"8.5",fontFamily:"var(--mono)",fill:a.faint,dominantBaseline:"middle",children:n}):null]},t)})]}),ge={attention:pe,"agent-skills":xe},fe=({method:t})=>e.jsxs("svg",{viewBox:"0 0 360 420",width:"100%",height:"100%",children:[e.jsx("text",{x:"180",y:"20",fontSize:"11",fontFamily:"var(--serif)",fontStyle:"italic",fill:a.faint,textAnchor:"middle",children:t.name||"method"}),e.jsx(j,{x:80,y:70,w:200,h:50,fill:a.blue,stroke:a.blueS,label:"Input",fontSize:12}),e.jsx("path",{d:"M180 120 L180 150",stroke:a.ink}),e.jsx(j,{x:80,y:150,w:200,h:70,fill:a.orange,stroke:a.orangeS,label:t.name||"transform",fontSize:13}),e.jsx("path",{d:"M180 220 L180 250",stroke:a.ink}),e.jsx(j,{x:80,y:250,w:200,h:50,fill:a.purple,stroke:a.purpleS,label:"Output",fontSize:12})]}),je=({method:t})=>{const n=(t.slug||"").toLowerCase(),o=ge[n];if(o)return e.jsx("div",{className:"method-figure-svg method-figure-svg--schematic",children:e.jsx(o,{})});if(t.image_url){const c=n==="transformer"||n==="gpt-4"||n==="gpt-4o"||n==="multi-head-attention"?" method-figure-svg--compact":n==="rpn"?" method-figure-svg--scaled-80":"";return e.jsx("div",{className:`method-figure-svg method-figure-svg--image${c}`,children:e.jsx("img",{className:"method-figure-img",src:t.image_url,alt:`${t.name} figure`})})}return e.jsx("div",{className:"method-figure-svg method-figure-svg--schematic",children:e.jsx(fe,{method:t})})},C=720,B=138,u={top:8,right:10,bottom:25,left:36},Q=56,_e=new Intl.DateTimeFormat("en",{month:"short",year:"2-digit",timeZone:"UTC"}),ye=new Intl.DateTimeFormat("en",{year:"numeric",timeZone:"UTC"}),E=t=>_e.format(new Date(`${t}T00:00:00Z`)),ve=(t,n)=>{if(t===0)return new Set;const o=t>48?12:t>36?6:t>18?3:2,c=Math.max(1,Math.ceil(Q/n)),g=Math.max(o,c),x=t-1,p=new Set([0,x]);for(let i=g;i=Q&&p.add(i);return p},U=t=>{if(t.coverage_status===void 0||["complete","not_applicable"].includes(t.coverage_status))return null;const n=t.processed_paper_count!==void 0&&t.eligible_paper_count!==void 0?`; ${t.processed_paper_count.toLocaleString()} of ${t.eligible_paper_count.toLocaleString()} eligible papers processed`:"";return`Historical tagging ${t.coverage_status==="failed"?"needs retry":"in progress"}${n}`},Ne=({history:t,methodName:n})=>{const[o,c]=A.useState(null),g=Math.max(1,...t.map(d=>d.paper_count)),x=C-u.left-u.right,p=B-u.top-u.bottom,i=t.length?x/t.length:x,y=Math.max(2,i*.68),D=ve(t.length,i),h=Array.from(new Set([0,Math.ceil(g/2),g])),_=o==null?null:t[o],f=_?U(_):null;return e.jsxs("div",{className:"method-usage-chart-wrap",children:[e.jsxs("svg",{className:"method-usage-chart",viewBox:`0 0 ${C} ${B}`,role:"group","aria-label":`${n}: papers mentioning this method by publication month`,children:[e.jsxs("title",{children:[n,": papers mentioning this method by publication month"]}),h.map(d=>{const l=u.top+p-d/g*p;return e.jsxs("g",{children:[e.jsx("line",{className:"method-usage-gridline",x1:u.left,x2:C-u.right,y1:l,y2:l}),e.jsx("text",{className:"method-usage-y-label",x:u.left-8,y:l+3,textAnchor:"end",children:d})]},d)}),t.map((d,l)=>{const b=d.paper_count/g*p,v=d.paper_count>0?Math.max(1,b):0,P=u.left+i*l+(i-y)/2,w=u.top+p-v,s=o===l,S=l===t.length-1,N=U(d);return e.jsxs("g",{className:`method-usage-bar${s?" is-active":""}${S?" is-current":""}`,tabIndex:0,role:"img","aria-label":`${E(d.start_date)}: ${d.paper_count} ${d.paper_count===1?"paper":"papers"}${N?`. ${N}`:""}`,onMouseEnter:()=>c(l),onMouseLeave:()=>c(null),onFocus:()=>c(l),onBlur:()=>c(null),children:[e.jsx("rect",{className:"method-usage-bar-hit",x:u.left+i*l,y:u.top,width:i,height:p}),e.jsx("rect",{className:"method-usage-bar-mark",x:P,y:w,width:y,height:v,rx:"1.5"})]},d.start_date)}),t.map((d,l)=>D.has(l)?e.jsx("text",{className:"method-usage-x-label",x:u.left+i*(l+.5),y:B-11,textAnchor:"middle",children:t.length>48?ye.format(new Date(`${d.start_date}T00:00:00Z`)):E(d.start_date)},d.start_date):null)]}),_&&e.jsxs("div",{className:"method-usage-tooltip",role:"status",children:[e.jsx("strong",{children:E(_.start_date)}),e.jsxs("span",{children:[_.paper_count," ",_.paper_count===1?"paper":"papers",o===t.length-1?" · month to date":""]}),e.jsxs("span",{children:[(_.catalog_share??0).toFixed(2),"% of"," ",(_.catalog_paper_count??0).toLocaleString()," catalog papers"]}),f&&e.jsx("span",{children:f})]})]})},Se=[["trending","trending"],["new","newest"],["cited","most cited"]],G={"on-policy-distillation":["fine-tuning","post-training","rlvr","rlhf","direct-preference-optimization-dpo"],mcp:["agent-skills"],"agent-skills":["mcp"]},Oe=()=>{var T,z,$,H,R,q;const{methodSlug:t}=Z(),[n,o]=V(),[c,g]=A.useState("trending"),x=n.get("has_code")==="true",p=n.get("has_hf_artifacts")==="true",i=te(n),y=r=>{const m=new URLSearchParams(n);r?m.set("has_code","true"):m.delete("has_code"),o(m)},D=r=>{const m=new URLSearchParams(n);r?m.set("has_hf_artifacts","true"):m.delete("has_hf_artifacts"),o(m)},h=F({queryKey:["method",t],queryFn:()=>k.getMethod(t),enabled:!!t,staleTime:10*60*1e3}),_=F({queryKey:["areas-all"],queryFn:()=>k.listAreas({page_size:50,ordering:"name"}),enabled:!!((T=h.data)!=null&&T.area_id),staleTime:10*60*1e3}),f=F({queryKey:["method-trend",t],queryFn:()=>k.methodTrend(t),enabled:!!t&&!!h.data,staleTime:10*60*1e3}),d=c==="trending"?"trending":c==="cited"?"citation_count":"date_published",l=Y({queryKey:["method-papers-infinite",t,d,x,p,i.startDate,i.endDate],queryFn:({pageParam:r=1})=>le.forMethod(t,{page:r,page_size:20,order_by:d,order_dir:"desc",include_resources:!0,has_code:x,has_hf_artifacts:p,start_date:i.startDate,end_date:i.endDate}),getNextPageParam:r=>r.next_page,initialPageParam:1,enabled:!!t,staleTime:5*60*1e3,placeholderData:X}),b=F({queryKey:["related-methods",(z=h.data)==null?void 0:z.slug,($=h.data)==null?void 0:$.area_id,(H=h.data)==null?void 0:H.id],queryFn:async()=>{const r=h.data;if(!r)return[];const m=r.slug?G[r.slug]:void 0;return m?Promise.all(m.map(W=>k.getMethod(W))):r.area_id?(await k.listMethods({area_id:r.area_id,exclude_id:r.id,ordering:"-paper_count",page_size:8})).results:[]},enabled:!!(h.data&&(h.data.slug&&G[h.data.slug]||h.data.area_id)),staleTime:10*60*1e3}),v=A.useMemo(()=>{var m;return(((m=l.data)==null?void 0:m.pages.flatMap(O=>O.results))||[]).map(ce)},[l.data]),{targetRef:P,isIntersecting:w}=ae({rootMargin:"200px"});if(A.useEffect(()=>{w&&l.hasNextPage&&!l.isFetchingNextPage&&l.fetchNextPage()},[w,l.hasNextPage,l.isFetchingNextPage]),h.isLoading)return e.jsxs("div",{className:"page",children:[e.jsx(M,{className:"h-12 w-1/2 mb-4"}),e.jsx(M,{className:"h-64 w-full"})]});if(h.error||!h.data)return e.jsx("div",{className:"page",children:e.jsx(de,{variant:"destructive",children:e.jsx(me,{children:"Method not found."})})});const s=h.data,S=(R=_.data)==null?void 0:R.results.find(r=>r.id===s.area_id),N=ie(s.source_url),I=N?null:he(s.source_url);return e.jsxs("div",{className:"page",children:[e.jsxs("div",{className:"breadcrumb",children:[e.jsx(L,{to:"/methods",children:"Methods"}),S&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"sep",children:"/"}),e.jsx(L,{to:`/methods#area-${oe(S.name)}`,children:S.name})]}),e.jsx("span",{className:"sep",children:"/"}),e.jsx("span",{style:{color:"var(--ink)"},children:s.name})]}),e.jsxs("div",{className:`tag-hero method-hero-grid${s.slug==="grokking"||s.slug==="latent-reasoning"||s.slug==="world-action-models"?" method-hero-grid--wide-figure":""}`,children:[e.jsxs("div",{children:[e.jsx("div",{className:"tag-hero-eyebrow",children:"METHOD"}),e.jsx("h1",{className:"tag-hero-title method-hero-title",children:s.name}),s.full_name&&s.full_name!==s.name&&e.jsx("div",{style:{fontFamily:"var(--serif)",fontSize:16,fontStyle:"italic",color:"var(--ink-soft)",marginTop:8},children:s.full_name}),s.description&&e.jsx(K,{className:"method-description",text:s.description}),s.source_url&&s.source_title&&e.jsxs("div",{className:"method-source",children:[e.jsx("span",{className:"method-source-label",children:"Source"}),N?e.jsxs(L,{className:"method-source-link",to:N,target:"_blank",rel:"noopener noreferrer",children:[e.jsx("span",{className:"method-source-title",children:s.source_title}),s.introduced_year&&e.jsx("span",{className:"method-source-meta",children:s.introduced_year})]}):I?e.jsxs("a",{className:"method-source-link",href:I,target:"_blank",rel:"noopener noreferrer",children:[e.jsx("span",{className:"method-source-title",children:s.source_title}),s.introduced_year&&e.jsx("span",{className:"method-source-meta",children:s.introduced_year})]}):e.jsxs("div",{className:"method-source-link is-static",children:[e.jsx("span",{className:"method-source-title",children:s.source_title}),s.introduced_year&&e.jsx("span",{className:"method-source-meta",children:s.introduced_year})]})]}),e.jsxs("div",{className:"tag-hero-meta",children:[e.jsxs("div",{className:"stat",children:[e.jsx("span",{className:"label",children:"Papers mentioning"}),e.jsx("span",{className:"value",children:(s.paper_count??0).toLocaleString()})]}),f.data&&e.jsxs("div",{className:"stat",children:[e.jsx("span",{className:"label",children:"Recent mentions"}),e.jsx("span",{className:"value",children:f.data.comparison_complete?e.jsxs(e.Fragment,{children:[f.data.trend_score.toFixed(1),e.jsx("small",{children:"/mo"})]}):"Pending"})]}),s.introduced_year!=null&&e.jsxs("div",{className:"stat",children:[e.jsx("span",{className:"label",children:"Introduced"}),e.jsx("span",{className:"value",children:s.introduced_year})]})]}),f.isLoading?e.jsx(M,{className:"h-36 w-full method-trend-skeleton"}):f.data?e.jsxs("section",{className:"method-trend-panel method-trend-panel--compact",children:[e.jsxs("div",{className:"method-trend-header",children:[e.jsx("div",{children:e.jsx("div",{className:"method-trend-eyebrow",children:"Usage trend"})}),e.jsxs("div",{className:"method-trend-summary",children:[e.jsx("strong",{children:f.data.recent_paper_count}),e.jsxs("span",{children:["papers / ",f.data.recent_days,"d"]})]})]}),e.jsx(Ne,{history:f.data.history,methodName:s.name})]}):null]}),e.jsxs("figure",{className:"method-figure-card",children:[e.jsx(je,{method:s}),s.image_credit&&e.jsx("figcaption",{children:e.jsx(K,{className:"method-image-credit",text:s.image_credit})})]})]}),(((q=b.data)==null?void 0:q.length)??0)>0&&e.jsxs("div",{className:"filter-row",children:[e.jsx("span",{className:"label",children:"Related methods"}),b.data.map(r=>e.jsx(J,{method:{slug:r.slug,name:r.name}},r.id))]}),e.jsxs("div",{className:"sort-bar",children:[e.jsxs("div",{className:"paper-feed-toolbar-controls",children:[e.jsx("div",{className:"sort-options",children:Se.map(([r,m])=>e.jsx("button",{className:`sort-btn ${c===r?"active":""}`,onClick:()=>g(r),children:m},r))}),e.jsx(se,{hasCode:x,hasHfArtifacts:p,onHasCodeChange:y,onHasHfArtifactsChange:D})]}),e.jsx(re,{startDate:i.startDate,endDate:i.endDate,onChange:r=>o(ne(n,r))}),e.jsxs("div",{className:"results-count",children:[v.length," papers mentioning ",s.name]})]}),l.isLoading?e.jsx("div",{className:"paper-list",children:Array.from({length:4}).map((r,m)=>e.jsx(M,{className:"h-40 w-full"},m))}):v.length===0?e.jsx("div",{className:"no-results",children:"No papers tagged with this method yet."}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"paper-list",children:v.map((r,m)=>e.jsx(ee,{paper:r,rank:m+1},r.id))}),e.jsx("div",{ref:P,style:{height:1}}),l.isFetchingNextPage&&e.jsx("div",{style:{padding:"20px 0",textAlign:"center",color:"var(--ink-faint)"},children:"Loading more…"})]})]})};export{Oe as default}; +import{j as e,r as A,c as Z,a as V,L,aa as X}from"./index-Dt001B3A.js";import{u as F}from"./useQuery-DD4hUA6p.js";import{u as Y}from"./useInfiniteQuery-CgAOxB5d.js";import{M as J,P as ee}from"./components-DMT1vhIy.js";import{r as te,u as ae,P as se,a as re,w as ne}from"./paperDateRange-BJ29xsSE.js";import{r as ie,M as K}from"./MarkdownText-DeuWKnsZ.js";import{c as k}from"./catalog-BOpSeTzm.js";import{p as le}from"./papers-KXkGPHI5.js";import{s as oe}from"./slug-BpH-Nkvz.js";import{t as ce}from"./transform-DgCWw6nP.js";import{S as M}from"./skeleton-DkhIJUB4.js";import{A as de,a as me}from"./alert-Xa-AqUL5.js";import{s as he}from"./safeExternalHref-CkBrsh84.js";import"./LatexTitle-B651zAGR.js";import"./katex.min-BSBacQyE.js";import"./popover-DDOhCeb4.js";import"./PaperPreviewLink-CCwg7dvd.js";import"./index-Byizcq9V.js";import"./hover-card-C7JmPdFo.js";const a={pink:"#F8D7D9",pinkS:"#D9B0B3",yellow:"#FBEFC2",yellowS:"#C9B97D",orange:"#F8D7B3",orangeS:"#C99466",blue:"#CDE2EE",blueS:"#7FA4BA",purple:"#D4D2EA",purpleS:"#8E8AC0",green:"#CCE2C5",greenS:"#7DA475",ink:"#1A1814",faint:"#8E8678"},j=({x:t,y:n,w:o,h:c,fill:g,stroke:x,label:p,fontSize:i=10,multiline:y})=>e.jsxs("g",{children:[e.jsx("rect",{x:t,y:n,width:o,height:c,rx:"3",ry:"3",fill:g,stroke:x,strokeWidth:"1"}),y?e.jsxs(e.Fragment,{children:[e.jsx("text",{x:t+o/2,y:n+c/2-2,fontSize:i,fontFamily:"var(--sans)",fill:a.ink,textAnchor:"middle",dominantBaseline:"middle",children:y[0]}),e.jsx("text",{x:t+o/2,y:n+c/2+i-1,fontSize:i,fontFamily:"var(--sans)",fill:a.ink,textAnchor:"middle",dominantBaseline:"middle",children:y[1]})]}):e.jsx("text",{x:t+o/2,y:n+c/2,fontSize:i,fontFamily:"var(--sans)",fill:a.ink,textAnchor:"middle",dominantBaseline:"middle",children:p})]}),pe=()=>e.jsxs("svg",{viewBox:"0 0 360 420",width:"100%",height:"100%",style:{display:"block"},children:[e.jsx("text",{x:"180",y:"20",fontSize:"11",fontFamily:"var(--serif)",fontStyle:"italic",fill:a.faint,textAnchor:"middle",children:"Scaled Dot-Product Attention"}),e.jsx(j,{x:140,y:40,w:80,h:26,fill:a.yellow,stroke:a.yellowS,label:"MatMul",fontSize:11}),e.jsx("path",{d:"M180 66 L180 80",stroke:a.ink}),e.jsx(j,{x:140,y:80,w:80,h:26,fill:a.green,stroke:a.greenS,label:"SoftMax",fontSize:11}),e.jsx("path",{d:"M180 106 L180 120",stroke:a.ink}),e.jsx(j,{x:140,y:120,w:80,h:26,fill:a.purple,stroke:a.purpleS,label:"Mask (opt.)",fontSize:11}),e.jsx("path",{d:"M180 146 L180 160",stroke:a.ink}),e.jsx(j,{x:140,y:160,w:80,h:26,fill:a.blue,stroke:a.blueS,label:"Scale ÷√dₖ",fontSize:11}),e.jsx("path",{d:"M180 186 L180 200",stroke:a.ink}),e.jsx(j,{x:140,y:200,w:80,h:26,fill:a.yellow,stroke:a.yellowS,label:"MatMul",fontSize:11}),e.jsx("path",{d:"M156 226 L120 270",stroke:a.ink}),e.jsx("path",{d:"M180 226 L180 270",stroke:a.ink}),e.jsx("path",{d:"M204 226 L240 270",stroke:a.ink}),e.jsx(j,{x:100,y:270,w:40,h:24,fill:a.pink,stroke:a.pinkS,label:"Q",fontSize:13}),e.jsx(j,{x:160,y:270,w:40,h:24,fill:a.pink,stroke:a.pinkS,label:"K",fontSize:13}),e.jsx(j,{x:220,y:270,w:40,h:24,fill:a.pink,stroke:a.pinkS,label:"V",fontSize:13}),e.jsxs("text",{x:"180",y:"330",fontSize:"14",fontFamily:"var(--serif)",fontStyle:"italic",fill:a.ink,textAnchor:"middle",children:["softmax(QK",e.jsx("tspan",{fontSize:"9",baselineShift:"super",children:"⊤"})," / √d) V"]})]}),ue=[["my-skill/",""],["├── SKILL.md","# Required: metadata + instructions"],["├── scripts/","# Optional: executable code"],["├── references/","# Optional: documentation"],["├── assets/","# Optional: templates, resources"],["└── ...","# Any additional files or directories"]],xe=()=>e.jsxs("svg",{viewBox:"0 0 360 420",width:"100%",height:"100%",style:{display:"block"},children:[e.jsx("text",{x:"180",y:"20",fontSize:"11",fontFamily:"var(--serif)",fontStyle:"italic",fill:a.faint,textAnchor:"middle",children:"Skill package layout"}),e.jsx("rect",{x:"28",y:"48",width:"304",height:"318",rx:"8",fill:"#FFFDF8",stroke:a.faint,strokeWidth:"1"}),ue.map(([t,n],o)=>{const c=92+o*44;return e.jsxs("g",{children:[e.jsx("text",{x:"44",y:c,fontSize:"11",fontFamily:"var(--mono)",fill:a.ink,dominantBaseline:"middle",children:t}),n?e.jsx("text",{x:"138",y:c,fontSize:"8.5",fontFamily:"var(--mono)",fill:a.faint,dominantBaseline:"middle",children:n}):null]},t)})]}),ge={attention:pe,"agent-skills":xe},fe=({method:t})=>e.jsxs("svg",{viewBox:"0 0 360 420",width:"100%",height:"100%",children:[e.jsx("text",{x:"180",y:"20",fontSize:"11",fontFamily:"var(--serif)",fontStyle:"italic",fill:a.faint,textAnchor:"middle",children:t.name||"method"}),e.jsx(j,{x:80,y:70,w:200,h:50,fill:a.blue,stroke:a.blueS,label:"Input",fontSize:12}),e.jsx("path",{d:"M180 120 L180 150",stroke:a.ink}),e.jsx(j,{x:80,y:150,w:200,h:70,fill:a.orange,stroke:a.orangeS,label:t.name||"transform",fontSize:13}),e.jsx("path",{d:"M180 220 L180 250",stroke:a.ink}),e.jsx(j,{x:80,y:250,w:200,h:50,fill:a.purple,stroke:a.purpleS,label:"Output",fontSize:12})]}),je=({method:t})=>{const n=(t.slug||"").toLowerCase(),o=ge[n];if(o)return e.jsx("div",{className:"method-figure-svg method-figure-svg--schematic",children:e.jsx(o,{})});if(t.image_url){const c=n==="transformer"||n==="gpt-4"||n==="gpt-4o"||n==="multi-head-attention"?" method-figure-svg--compact":n==="rpn"?" method-figure-svg--scaled-80":"";return e.jsx("div",{className:`method-figure-svg method-figure-svg--image${c}`,children:e.jsx("img",{className:"method-figure-img",src:t.image_url,alt:`${t.name} figure`})})}return e.jsx("div",{className:"method-figure-svg method-figure-svg--schematic",children:e.jsx(fe,{method:t})})},C=720,B=138,u={top:8,right:10,bottom:25,left:36},Q=56,_e=new Intl.DateTimeFormat("en",{month:"short",year:"2-digit",timeZone:"UTC"}),ye=new Intl.DateTimeFormat("en",{year:"numeric",timeZone:"UTC"}),E=t=>_e.format(new Date(`${t}T00:00:00Z`)),ve=(t,n)=>{if(t===0)return new Set;const o=t>48?12:t>36?6:t>18?3:2,c=Math.max(1,Math.ceil(Q/n)),g=Math.max(o,c),x=t-1,p=new Set([0,x]);for(let i=g;i=Q&&p.add(i);return p},U=t=>{if(t.coverage_status===void 0||["complete","not_applicable"].includes(t.coverage_status))return null;const n=t.processed_paper_count!==void 0&&t.eligible_paper_count!==void 0?`; ${t.processed_paper_count.toLocaleString()} of ${t.eligible_paper_count.toLocaleString()} eligible papers processed`:"";return`Historical tagging ${t.coverage_status==="failed"?"needs retry":"in progress"}${n}`},Ne=({history:t,methodName:n})=>{const[o,c]=A.useState(null),g=Math.max(1,...t.map(d=>d.paper_count)),x=C-u.left-u.right,p=B-u.top-u.bottom,i=t.length?x/t.length:x,y=Math.max(2,i*.68),D=ve(t.length,i),h=Array.from(new Set([0,Math.ceil(g/2),g])),_=o==null?null:t[o],f=_?U(_):null;return e.jsxs("div",{className:"method-usage-chart-wrap",children:[e.jsxs("svg",{className:"method-usage-chart",viewBox:`0 0 ${C} ${B}`,role:"group","aria-label":`${n}: papers mentioning this method by publication month`,children:[e.jsxs("title",{children:[n,": papers mentioning this method by publication month"]}),h.map(d=>{const l=u.top+p-d/g*p;return e.jsxs("g",{children:[e.jsx("line",{className:"method-usage-gridline",x1:u.left,x2:C-u.right,y1:l,y2:l}),e.jsx("text",{className:"method-usage-y-label",x:u.left-8,y:l+3,textAnchor:"end",children:d})]},d)}),t.map((d,l)=>{const b=d.paper_count/g*p,v=d.paper_count>0?Math.max(1,b):0,P=u.left+i*l+(i-y)/2,w=u.top+p-v,s=o===l,S=l===t.length-1,N=U(d);return e.jsxs("g",{className:`method-usage-bar${s?" is-active":""}${S?" is-current":""}`,tabIndex:0,role:"img","aria-label":`${E(d.start_date)}: ${d.paper_count} ${d.paper_count===1?"paper":"papers"}${N?`. ${N}`:""}`,onMouseEnter:()=>c(l),onMouseLeave:()=>c(null),onFocus:()=>c(l),onBlur:()=>c(null),children:[e.jsx("rect",{className:"method-usage-bar-hit",x:u.left+i*l,y:u.top,width:i,height:p}),e.jsx("rect",{className:"method-usage-bar-mark",x:P,y:w,width:y,height:v,rx:"1.5"})]},d.start_date)}),t.map((d,l)=>D.has(l)?e.jsx("text",{className:"method-usage-x-label",x:u.left+i*(l+.5),y:B-11,textAnchor:"middle",children:t.length>48?ye.format(new Date(`${d.start_date}T00:00:00Z`)):E(d.start_date)},d.start_date):null)]}),_&&e.jsxs("div",{className:"method-usage-tooltip",role:"status",children:[e.jsx("strong",{children:E(_.start_date)}),e.jsxs("span",{children:[_.paper_count," ",_.paper_count===1?"paper":"papers",o===t.length-1?" · month to date":""]}),e.jsxs("span",{children:[(_.catalog_share??0).toFixed(2),"% of"," ",(_.catalog_paper_count??0).toLocaleString()," catalog papers"]}),f&&e.jsx("span",{children:f})]})]})},Se=[["trending","trending"],["new","newest"],["cited","most cited"]],G={"on-policy-distillation":["fine-tuning","post-training","rlvr","rlhf","direct-preference-optimization-dpo"],mcp:["agent-skills"],"agent-skills":["mcp"]},Oe=()=>{var T,z,$,H,R,q;const{methodSlug:t}=Z(),[n,o]=V(),[c,g]=A.useState("trending"),x=n.get("has_code")==="true",p=n.get("has_hf_artifacts")==="true",i=te(n),y=r=>{const m=new URLSearchParams(n);r?m.set("has_code","true"):m.delete("has_code"),o(m)},D=r=>{const m=new URLSearchParams(n);r?m.set("has_hf_artifacts","true"):m.delete("has_hf_artifacts"),o(m)},h=F({queryKey:["method",t],queryFn:()=>k.getMethod(t),enabled:!!t,staleTime:10*60*1e3}),_=F({queryKey:["areas-all"],queryFn:()=>k.listAreas({page_size:50,ordering:"name"}),enabled:!!((T=h.data)!=null&&T.area_id),staleTime:10*60*1e3}),f=F({queryKey:["method-trend",t],queryFn:()=>k.methodTrend(t),enabled:!!t&&!!h.data,staleTime:10*60*1e3}),d=c==="trending"?"trending":c==="cited"?"citation_count":"date_published",l=Y({queryKey:["method-papers-infinite",t,d,x,p,i.startDate,i.endDate],queryFn:({pageParam:r=1})=>le.forMethod(t,{page:r,page_size:20,order_by:d,order_dir:"desc",include_resources:!0,has_code:x,has_hf_artifacts:p,start_date:i.startDate,end_date:i.endDate}),getNextPageParam:r=>r.next_page,initialPageParam:1,enabled:!!t,staleTime:5*60*1e3,placeholderData:X}),b=F({queryKey:["related-methods",(z=h.data)==null?void 0:z.slug,($=h.data)==null?void 0:$.area_id,(H=h.data)==null?void 0:H.id],queryFn:async()=>{const r=h.data;if(!r)return[];const m=r.slug?G[r.slug]:void 0;return m?Promise.all(m.map(W=>k.getMethod(W))):r.area_id?(await k.listMethods({area_id:r.area_id,exclude_id:r.id,ordering:"-paper_count",page_size:8})).results:[]},enabled:!!(h.data&&(h.data.slug&&G[h.data.slug]||h.data.area_id)),staleTime:10*60*1e3}),v=A.useMemo(()=>{var m;return(((m=l.data)==null?void 0:m.pages.flatMap(O=>O.results))||[]).map(ce)},[l.data]),{targetRef:P,isIntersecting:w}=ae({rootMargin:"200px"});if(A.useEffect(()=>{w&&l.hasNextPage&&!l.isFetchingNextPage&&l.fetchNextPage()},[w,l.hasNextPage,l.isFetchingNextPage]),h.isLoading)return e.jsxs("div",{className:"page",children:[e.jsx(M,{className:"h-12 w-1/2 mb-4"}),e.jsx(M,{className:"h-64 w-full"})]});if(h.error||!h.data)return e.jsx("div",{className:"page",children:e.jsx(de,{variant:"destructive",children:e.jsx(me,{children:"Method not found."})})});const s=h.data,S=(R=_.data)==null?void 0:R.results.find(r=>r.id===s.area_id),N=ie(s.source_url),I=N?null:he(s.source_url);return e.jsxs("div",{className:"page",children:[e.jsxs("div",{className:"breadcrumb",children:[e.jsx(L,{to:"/methods",children:"Methods"}),S&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"sep",children:"/"}),e.jsx(L,{to:`/methods#area-${oe(S.name)}`,children:S.name})]}),e.jsx("span",{className:"sep",children:"/"}),e.jsx("span",{style:{color:"var(--ink)"},children:s.name})]}),e.jsxs("div",{className:`tag-hero method-hero-grid${s.slug==="grokking"||s.slug==="latent-reasoning"||s.slug==="world-action-models"?" method-hero-grid--wide-figure":""}`,children:[e.jsxs("div",{children:[e.jsx("div",{className:"tag-hero-eyebrow",children:"METHOD"}),e.jsx("h1",{className:"tag-hero-title method-hero-title",children:s.name}),s.full_name&&s.full_name!==s.name&&e.jsx("div",{style:{fontFamily:"var(--serif)",fontSize:16,fontStyle:"italic",color:"var(--ink-soft)",marginTop:8},children:s.full_name}),s.description&&e.jsx(K,{className:"method-description",text:s.description}),s.source_url&&s.source_title&&e.jsxs("div",{className:"method-source",children:[e.jsx("span",{className:"method-source-label",children:"Source"}),N?e.jsxs(L,{className:"method-source-link",to:N,target:"_blank",rel:"noopener noreferrer",children:[e.jsx("span",{className:"method-source-title",children:s.source_title}),s.introduced_year&&e.jsx("span",{className:"method-source-meta",children:s.introduced_year})]}):I?e.jsxs("a",{className:"method-source-link",href:I,target:"_blank",rel:"noopener noreferrer",children:[e.jsx("span",{className:"method-source-title",children:s.source_title}),s.introduced_year&&e.jsx("span",{className:"method-source-meta",children:s.introduced_year})]}):e.jsxs("div",{className:"method-source-link is-static",children:[e.jsx("span",{className:"method-source-title",children:s.source_title}),s.introduced_year&&e.jsx("span",{className:"method-source-meta",children:s.introduced_year})]})]}),e.jsxs("div",{className:"tag-hero-meta",children:[e.jsxs("div",{className:"stat",children:[e.jsx("span",{className:"label",children:"Papers mentioning"}),e.jsx("span",{className:"value",children:(s.paper_count??0).toLocaleString()})]}),f.data&&e.jsxs("div",{className:"stat",children:[e.jsx("span",{className:"label",children:"Recent mentions"}),e.jsx("span",{className:"value",children:f.data.comparison_complete?e.jsxs(e.Fragment,{children:[f.data.trend_score.toFixed(1),e.jsx("small",{children:"/mo"})]}):"Pending"})]}),s.introduced_year!=null&&e.jsxs("div",{className:"stat",children:[e.jsx("span",{className:"label",children:"Introduced"}),e.jsx("span",{className:"value",children:s.introduced_year})]})]}),f.isLoading?e.jsx(M,{className:"h-36 w-full method-trend-skeleton"}):f.data?e.jsxs("section",{className:"method-trend-panel method-trend-panel--compact",children:[e.jsxs("div",{className:"method-trend-header",children:[e.jsx("div",{children:e.jsx("div",{className:"method-trend-eyebrow",children:"Usage trend"})}),e.jsxs("div",{className:"method-trend-summary",children:[e.jsx("strong",{children:f.data.recent_paper_count}),e.jsxs("span",{children:["papers / ",f.data.recent_days,"d"]})]})]}),e.jsx(Ne,{history:f.data.history,methodName:s.name})]}):null]}),e.jsxs("figure",{className:"method-figure-card",children:[e.jsx(je,{method:s}),s.image_credit&&e.jsx("figcaption",{children:e.jsx(K,{className:"method-image-credit",text:s.image_credit})})]})]}),(((q=b.data)==null?void 0:q.length)??0)>0&&e.jsxs("div",{className:"filter-row",children:[e.jsx("span",{className:"label",children:"Related methods"}),b.data.map(r=>e.jsx(J,{method:{slug:r.slug,name:r.name}},r.id))]}),e.jsxs("div",{className:"sort-bar",children:[e.jsxs("div",{className:"paper-feed-toolbar-controls",children:[e.jsx("div",{className:"sort-options",children:Se.map(([r,m])=>e.jsx("button",{className:`sort-btn ${c===r?"active":""}`,onClick:()=>g(r),children:m},r))}),e.jsx(se,{hasCode:x,hasHfArtifacts:p,onHasCodeChange:y,onHasHfArtifactsChange:D})]}),e.jsx(re,{startDate:i.startDate,endDate:i.endDate,onChange:r=>o(ne(n,r))}),e.jsxs("div",{className:"results-count",children:[v.length," papers mentioning ",s.name]})]}),l.isLoading?e.jsx("div",{className:"paper-list",children:Array.from({length:4}).map((r,m)=>e.jsx(M,{className:"h-40 w-full"},m))}):v.length===0?e.jsx("div",{className:"no-results",children:"No papers tagged with this method yet."}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"paper-list",children:v.map((r,m)=>e.jsx(ee,{paper:r,rank:m+1},r.id))}),e.jsx("div",{ref:P,style:{height:1}}),l.isFetchingNextPage&&e.jsx("div",{style:{padding:"20px 0",textAlign:"center",color:"var(--ink-faint)"},children:"Loading more…"})]})]})};export{Oe as default}; diff --git a/assets/MethodsIndexView-C2HRCWSA.js b/assets/MethodsIndexView-vViWCtwM.js similarity index 87% rename from assets/MethodsIndexView-C2HRCWSA.js rename to assets/MethodsIndexView-vViWCtwM.js index d918636b367a427812ae9d2c48e81a0577cdce37..6b4fd4402e2491ee203d8e7aef83ee91cc3ecac5 100644 --- a/assets/MethodsIndexView-C2HRCWSA.js +++ b/assets/MethodsIndexView-vViWCtwM.js @@ -1,4 +1,4 @@ -import{d as g,r as d,j as e,L as f}from"./index-Cry0GNHI.js";import{u as m}from"./useQuery-DlAfMYOD.js";import{c as h}from"./catalog-BjZE6R9z.js";import{s as j}from"./slug-BpH-Nkvz.js";import{S as p}from"./skeleton-LwsL9heH.js";import{A as y,a as v}from"./alert-BAHZ4i9D.js";import{T as _}from"./TaxonomySuggestionTile-Dlf-wpJa.js";import"./SignInToEditDialog-D0_3y_qM.js";import"./button-QVzubJLr.js";import"./textarea-nAbEj-Sd.js";import"./dialog-Dedt-uqk.js";import"./useMutation-C5zYPeQC.js";import"./submissions-CVaVzZAk.js";import"./loader-circle-C6beazQX.js";/** +import{d as g,r as d,j as e,L as f}from"./index-Dt001B3A.js";import{u as m}from"./useQuery-DD4hUA6p.js";import{c as h}from"./catalog-BOpSeTzm.js";import{s as j}from"./slug-BpH-Nkvz.js";import{S as p}from"./skeleton-DkhIJUB4.js";import{A as y,a as v}from"./alert-Xa-AqUL5.js";import{T as _}from"./TaxonomySuggestionTile-BEuXuGw1.js";import"./SignInToEditDialog-BkrM2MwG.js";import"./button-BL-YLDFJ.js";import"./textarea-BLDaXAi6.js";import"./dialog-Bs8pVXcH.js";import"./useMutation-BSdRNizq.js";import"./submissions-IHYlc8kE.js";import"./loader-circle-DD7s_n4z.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/NotFound-BSLpqWSh.js b/assets/NotFound-CkQZGkjc.js similarity index 89% rename from assets/NotFound-BSLpqWSh.js rename to assets/NotFound-CkQZGkjc.js index be7388eeee08b63a9c618baf57d08b17237fe092..d01ecfed700b7f152b68a06ce5030f1999462197 100644 --- a/assets/NotFound-BSLpqWSh.js +++ b/assets/NotFound-CkQZGkjc.js @@ -1 +1 @@ -import{ay as o,r as a,j as t,L as s}from"./index-Cry0GNHI.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{ay as o,r as a,j as t,L as s}from"./index-Dt001B3A.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-qTfsmWA5.js b/assets/OrganizationContributionGraph-B_9EeNTc.js similarity index 94% rename from assets/OrganizationContributionGraph-qTfsmWA5.js rename to assets/OrganizationContributionGraph-B_9EeNTc.js index a056ee8000d29dd039f3c7b9577767de311ad8af..484f143b323b1a310322a2ec544126a821d2117e 100644 --- a/assets/OrganizationContributionGraph-qTfsmWA5.js +++ b/assets/OrganizationContributionGraph-B_9EeNTc.js @@ -1 +1 @@ -import{r as b,j as o}from"./index-Cry0GNHI.js";import{u as z}from"./useQuery-DlAfMYOD.js";import{S as T}from"./skeleton-LwsL9heH.js";import{c as w}from"./catalog-BjZE6R9z.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-Dt001B3A.js";import{u as z}from"./useQuery-DD4hUA6p.js";import{S as T}from"./skeleton-DkhIJUB4.js";import{c as w}from"./catalog-BOpSeTzm.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-Cf4QdmqL.js b/assets/OrganizationDetailView-Cf4QdmqL.js deleted file mode 100644 index ddc3f28733eece6154c49de91f81c0ea98def924..0000000000000000000000000000000000000000 --- a/assets/OrganizationDetailView-Cf4QdmqL.js +++ /dev/null @@ -1 +0,0 @@ -import{c as t,j as r}from"./index-Cry0GNHI.js";import{O as i}from"./OrganizationPaperFeed-gweMJ5dR.js";import m from"./NotFound-BSLpqWSh.js";import"./useQuery-DlAfMYOD.js";import"./components-IPCTDA4d.js";import"./LatexTitle-CLc_16Sj.js";import"./katex.min-BSBacQyE.js";import"./transform-b6MI1iSQ.js";import"./papers-CrgFFrmi.js";import"./safeExternalHref-CkBrsh84.js";import"./MarkdownText-CzUmjuOY.js";import"./PaperPreviewLink-CPKVU1Zw.js";import"./index-D7CE3jjK.js";import"./hover-card-CbDqfS2l.js";import"./OrganizationContributionGraph-qTfsmWA5.js";import"./skeleton-LwsL9heH.js";import"./catalog-BjZE6R9z.js";import"./paperDateRange-DQDDTCHP.js";import"./popover-C_By4VBc.js";import"./alert-BAHZ4i9D.js";import"./searchable-select-BbTr2CaG.js";import"./button-QVzubJLr.js";import"./dialog-Dedt-uqk.js";import"./loader-circle-C6beazQX.js";import"./usePapers-B86z4_CJ.js";import"./useInfiniteQuery-C8Q6ynv2.js";const k=()=>{const{orgSlug:o}=t();return o?r.jsx(i,{organizationSlug:o}):r.jsx(m,{})};export{k as default}; diff --git a/assets/OrganizationDetailView-DNGLw7ip.js b/assets/OrganizationDetailView-DNGLw7ip.js new file mode 100644 index 0000000000000000000000000000000000000000..bb354ea0b437e4fc2779de3f1410754a7cddad2b --- /dev/null +++ b/assets/OrganizationDetailView-DNGLw7ip.js @@ -0,0 +1 @@ +import{c as t,j as r}from"./index-Dt001B3A.js";import{O as i}from"./OrganizationPaperFeed-By1LI1kk.js";import m from"./NotFound-CkQZGkjc.js";import"./useQuery-DD4hUA6p.js";import"./components-DMT1vhIy.js";import"./LatexTitle-B651zAGR.js";import"./katex.min-BSBacQyE.js";import"./transform-DgCWw6nP.js";import"./papers-KXkGPHI5.js";import"./safeExternalHref-CkBrsh84.js";import"./MarkdownText-DeuWKnsZ.js";import"./PaperPreviewLink-CCwg7dvd.js";import"./index-Byizcq9V.js";import"./hover-card-C7JmPdFo.js";import"./OrganizationContributionGraph-B_9EeNTc.js";import"./skeleton-DkhIJUB4.js";import"./catalog-BOpSeTzm.js";import"./paperDateRange-BJ29xsSE.js";import"./popover-DDOhCeb4.js";import"./alert-Xa-AqUL5.js";import"./searchable-select-C7oc2Val.js";import"./button-BL-YLDFJ.js";import"./dialog-Bs8pVXcH.js";import"./loader-circle-DD7s_n4z.js";import"./usePapers-qkM3n2JN.js";import"./useInfiniteQuery-CgAOxB5d.js";const k=()=>{const{orgSlug:o}=t();return o?r.jsx(i,{organizationSlug:o}):r.jsx(m,{})};export{k as default}; diff --git a/assets/OrganizationPaperFeed-gweMJ5dR.js b/assets/OrganizationPaperFeed-By1LI1kk.js similarity index 89% rename from assets/OrganizationPaperFeed-gweMJ5dR.js rename to assets/OrganizationPaperFeed-By1LI1kk.js index 8b171867fc7d659f3ad0fc53c1b9b870a1115c22..34dc32a2ae022433035ca99a0c9f2d4489f0308c 100644 --- a/assets/OrganizationPaperFeed-gweMJ5dR.js +++ b/assets/OrganizationPaperFeed-By1LI1kk.js @@ -1 +1 @@ -import{u as E,a as Q,r as d,j as e,L as A}from"./index-Cry0GNHI.js";import{u as C}from"./useQuery-DlAfMYOD.js";import{P as U}from"./components-IPCTDA4d.js";import{M as B}from"./MarkdownText-CzUmjuOY.js";import{O as G}from"./OrganizationContributionGraph-qTfsmWA5.js";import{r as K,u as W,P as Z,a as z,w as J}from"./paperDateRange-DQDDTCHP.js";import{A as V,a as X}from"./alert-BAHZ4i9D.js";import{S as Y}from"./searchable-select-BbTr2CaG.js";import{S as $}from"./skeleton-LwsL9heH.js";import{e as ee}from"./usePapers-B86z4_CJ.js";import{c as D}from"./catalog-BjZE6R9z.js";import{d as R,t as ae}from"./transform-b6MI1iSQ.js";import se from"./NotFound-BSLpqWSh.js";const re=[["trending","trending"],["date_published","newest"],["citation_count","most cited"]],te=n=>n==="date_published"||n==="citation_count"?n:"trending",xe=({organizationSlug:n,taskSlug:p})=>{var y,P,v,F,L,k,w,O;const T=E(),[o,h]=Q(),[I,u]=d.useState(!1),g=te(o.get("order_by")),_=o.get("has_code")==="true",f=o.get("has_hf_artifacts")==="true",m=K(o),x=C({queryKey:["organization",n],queryFn:()=>D.getOrganization(n),staleTime:10*60*1e3}),c=C({queryKey:["organization-areas-with-tasks",n],queryFn:()=>D.organizationAreasWithTasks(n),staleTime:10*60*1e3}),i=ee({organizationSlug:n,taskSlug:p,page_size:12,order_by:g,order_dir:"desc",include_resources:!0,has_code:_,has_hf_artifacts:f,start_date:m.startDate,end_date:m.endDate,enabled:!!n}),{targetRef:M,isIntersecting:j}=W({rootMargin:"200px"});d.useEffect(()=>{j&&i.hasNextPage&&!i.isFetchingNextPage&&i.fetchNextPage()},[j,i.hasNextPage,i.isFetchingNextPage]),d.useEffect(()=>{u(!1)},[n,p]);const b=d.useMemo(()=>{var s;return(((s=c.data)==null?void 0:s.results)??[]).flatMap(r=>r.tasks.filter(t=>!!t.slug).map(t=>({...t,slug:t.slug,label:R(t.name,t.slug)})))},[c.data]),l=b.find(s=>s.slug===p),N=d.useMemo(()=>{var s;return(((s=i.data)==null?void 0:s.pages)??[]).flatMap(r=>r.results.map(ae))},[i.data]),a=x.data??((y=c.data)==null?void 0:y.organization),H=((v=(P=i.data)==null?void 0:P.pages[0])==null?void 0:v.count)??0;if(((F=x.error)==null?void 0:F.status)===404||((L=c.error)==null?void 0:L.status)===404||((k=i.error)==null?void 0:k.status)===404)return e.jsx(se,{});if(c.error||i.error)return e.jsx("div",{className:"page",children:e.jsx(V,{variant:"destructive",children:e.jsx(X,{children:"Failed to load organization papers. Please try again."})})});const S=s=>{const r=s.trim().toLocaleLowerCase();return b.filter(t=>`${t.label} ${t.slug}`.toLocaleLowerCase().includes(r)).map(t=>({value:t.slug,label:t.label,description:`${t.paper_count.toLocaleString()} ${t.paper_count===1?"paper":"papers"}`}))},q=s=>{const r=s==="__all__"?`/orgs/${n}`:`/orgs/${n}/${s}`,t=o.toString();T({pathname:r,search:t?`?${t}`:""})};return e.jsxs("div",{className:"page",children:[e.jsxs("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:[e.jsx(A,{to:"/",children:"Home"}),e.jsx("span",{children:" / "}),e.jsx(A,{to:"/organizations",children:"Organizations"}),e.jsx("span",{children:" / "}),e.jsx("span",{children:(a==null?void 0:a.name)??n}),l&&e.jsxs(e.Fragment,{children:[e.jsx("span",{children:" / "}),e.jsx("span",{children:R(l.name,l.slug)})]})]}),e.jsxs("header",{className:"organization-hero",children:[e.jsxs("div",{className:"organization-hero-profile",children:[e.jsx("div",{className:"organizations-eyebrow",children:"ORGANIZATION"}),e.jsxs("h1",{className:"feed-title organization-hero-title",children:[a!=null&&a.logo_url&&!I?e.jsx("img",{src:a.logo_url,alt:"",width:58,height:58,onError:()=>u(!0)}):a?e.jsx("span",{className:"organization-logo organization-logo--fallback","aria-hidden":"true",children:a.name.slice(0,1).toUpperCase()}):null,(a==null?void 0:a.name)??e.jsx($,{className:"h-12 w-64"})]}),a&&e.jsxs("div",{className:"feed-subtitle",children:[((w=a.paper_count)==null?void 0:w.toLocaleString())??0," papers",(a.organization_trending_score??0)>0&&a.trending_rank&&e.jsxs(e.Fragment,{children:[" · #",a.trending_rank," trending this month"]})]}),(a==null?void 0:a.description)&&e.jsx(B,{className:"method-description",text:a.description}),a&&e.jsxs("div",{className:"organization-hero-links",children:[a.website_url&&e.jsx("a",{href:a.website_url,target:"_blank",rel:"noreferrer",children:"Website ↗"}),a.hf_url&&e.jsx("a",{href:a.hf_url,target:"_blank",rel:"noreferrer",children:"Hugging Face ↗"}),a.github_url&&e.jsx("a",{href:a.github_url,target:"_blank",rel:"noreferrer",children:"GitHub ↗"})]})]}),a&&e.jsx(G,{organizationSlug:n,organizationName:a.name})]}),e.jsxs("div",{className:"sort-bar",style:{alignItems:"center",gap:16},children:[e.jsx("div",{style:{minWidth:260},children:e.jsx(Y,{value:p??"__all__",onChange:q,placeholder:"All tasks",searchPlaceholder:"Search organization tasks...",emptyMessage:"No matching tasks.",ariaLabel:"Filter papers by task",selectedOption:l?{value:l.slug,label:l.label,description:`${l.paper_count.toLocaleString()} ${l.paper_count===1?"paper":"papers"}`}:{value:"__all__",label:"All tasks",description:`${((O=a==null?void 0:a.paper_count)==null?void 0:O.toLocaleString())??0} papers`},queryKey:["organization-task-options",n],queryFn:async s=>{var r;return[{value:"__all__",label:"All tasks",description:`${((r=a==null?void 0:a.paper_count)==null?void 0:r.toLocaleString())??0} papers`},...S(s)]},enabled:!c.isLoading,className:"h-[38px]"})}),e.jsxs("div",{className:"paper-feed-toolbar-controls",children:[e.jsx("div",{className:"sort-options",children:re.map(([s,r])=>e.jsx("button",{type:"button",className:`sort-btn ${g===s?"active":""}`,onClick:()=>{const t=new URLSearchParams(o);s==="trending"?t.delete("order_by"):t.set("order_by",s),h(t)},children:r},s))}),e.jsx(Z,{hasCode:_,hasHfArtifacts:f,onHasCodeChange:s=>{const r=new URLSearchParams(o);s?r.set("has_code","true"):r.delete("has_code"),h(r)},onHasHfArtifactsChange:s=>{const r=new URLSearchParams(o);s?r.set("has_hf_artifacts","true"):r.delete("has_hf_artifacts"),h(r)}})]}),e.jsx(z,{startDate:m.startDate,endDate:m.endDate,onChange:s=>h(J(o,s))}),e.jsxs("div",{className:"results-count",children:[H.toLocaleString()," papers"]})]}),i.isLoading?e.jsx("div",{className:"paper-list",children:Array.from({length:4}).map((s,r)=>e.jsx($,{className:"h-40 w-full"},r))}):N.length===0?e.jsx("div",{className:"no-results",children:(a==null?void 0:a.paper_count)===0?"No papers indexed yet":"No papers found for this selection."}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"paper-list",children:N.map((s,r)=>e.jsx(U,{paper:s,rank:r+1,showInstitution:!1},s.id))}),e.jsx("div",{ref:M,style:{height:1}}),i.isFetchingNextPage&&e.jsx("div",{style:{padding:"20px 0",textAlign:"center"},children:"Loading more…"})]})]})};export{xe as O}; +import{u as E,a as Q,r as d,j as e,L as A}from"./index-Dt001B3A.js";import{u as C}from"./useQuery-DD4hUA6p.js";import{P as U}from"./components-DMT1vhIy.js";import{M as B}from"./MarkdownText-DeuWKnsZ.js";import{O as G}from"./OrganizationContributionGraph-B_9EeNTc.js";import{r as K,u as W,P as Z,a as z,w as J}from"./paperDateRange-BJ29xsSE.js";import{A as V,a as X}from"./alert-Xa-AqUL5.js";import{S as Y}from"./searchable-select-C7oc2Val.js";import{S as $}from"./skeleton-DkhIJUB4.js";import{e as ee}from"./usePapers-qkM3n2JN.js";import{c as D}from"./catalog-BOpSeTzm.js";import{d as R,t as ae}from"./transform-DgCWw6nP.js";import se from"./NotFound-CkQZGkjc.js";const re=[["trending","trending"],["date_published","newest"],["citation_count","most cited"]],te=n=>n==="date_published"||n==="citation_count"?n:"trending",xe=({organizationSlug:n,taskSlug:p})=>{var y,P,v,F,L,k,w,O;const T=E(),[o,h]=Q(),[I,u]=d.useState(!1),g=te(o.get("order_by")),_=o.get("has_code")==="true",f=o.get("has_hf_artifacts")==="true",m=K(o),x=C({queryKey:["organization",n],queryFn:()=>D.getOrganization(n),staleTime:10*60*1e3}),c=C({queryKey:["organization-areas-with-tasks",n],queryFn:()=>D.organizationAreasWithTasks(n),staleTime:10*60*1e3}),i=ee({organizationSlug:n,taskSlug:p,page_size:12,order_by:g,order_dir:"desc",include_resources:!0,has_code:_,has_hf_artifacts:f,start_date:m.startDate,end_date:m.endDate,enabled:!!n}),{targetRef:M,isIntersecting:j}=W({rootMargin:"200px"});d.useEffect(()=>{j&&i.hasNextPage&&!i.isFetchingNextPage&&i.fetchNextPage()},[j,i.hasNextPage,i.isFetchingNextPage]),d.useEffect(()=>{u(!1)},[n,p]);const b=d.useMemo(()=>{var s;return(((s=c.data)==null?void 0:s.results)??[]).flatMap(r=>r.tasks.filter(t=>!!t.slug).map(t=>({...t,slug:t.slug,label:R(t.name,t.slug)})))},[c.data]),l=b.find(s=>s.slug===p),N=d.useMemo(()=>{var s;return(((s=i.data)==null?void 0:s.pages)??[]).flatMap(r=>r.results.map(ae))},[i.data]),a=x.data??((y=c.data)==null?void 0:y.organization),H=((v=(P=i.data)==null?void 0:P.pages[0])==null?void 0:v.count)??0;if(((F=x.error)==null?void 0:F.status)===404||((L=c.error)==null?void 0:L.status)===404||((k=i.error)==null?void 0:k.status)===404)return e.jsx(se,{});if(c.error||i.error)return e.jsx("div",{className:"page",children:e.jsx(V,{variant:"destructive",children:e.jsx(X,{children:"Failed to load organization papers. Please try again."})})});const S=s=>{const r=s.trim().toLocaleLowerCase();return b.filter(t=>`${t.label} ${t.slug}`.toLocaleLowerCase().includes(r)).map(t=>({value:t.slug,label:t.label,description:`${t.paper_count.toLocaleString()} ${t.paper_count===1?"paper":"papers"}`}))},q=s=>{const r=s==="__all__"?`/orgs/${n}`:`/orgs/${n}/${s}`,t=o.toString();T({pathname:r,search:t?`?${t}`:""})};return e.jsxs("div",{className:"page",children:[e.jsxs("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:[e.jsx(A,{to:"/",children:"Home"}),e.jsx("span",{children:" / "}),e.jsx(A,{to:"/organizations",children:"Organizations"}),e.jsx("span",{children:" / "}),e.jsx("span",{children:(a==null?void 0:a.name)??n}),l&&e.jsxs(e.Fragment,{children:[e.jsx("span",{children:" / "}),e.jsx("span",{children:R(l.name,l.slug)})]})]}),e.jsxs("header",{className:"organization-hero",children:[e.jsxs("div",{className:"organization-hero-profile",children:[e.jsx("div",{className:"organizations-eyebrow",children:"ORGANIZATION"}),e.jsxs("h1",{className:"feed-title organization-hero-title",children:[a!=null&&a.logo_url&&!I?e.jsx("img",{src:a.logo_url,alt:"",width:58,height:58,onError:()=>u(!0)}):a?e.jsx("span",{className:"organization-logo organization-logo--fallback","aria-hidden":"true",children:a.name.slice(0,1).toUpperCase()}):null,(a==null?void 0:a.name)??e.jsx($,{className:"h-12 w-64"})]}),a&&e.jsxs("div",{className:"feed-subtitle",children:[((w=a.paper_count)==null?void 0:w.toLocaleString())??0," papers",(a.organization_trending_score??0)>0&&a.trending_rank&&e.jsxs(e.Fragment,{children:[" · #",a.trending_rank," trending this month"]})]}),(a==null?void 0:a.description)&&e.jsx(B,{className:"method-description",text:a.description}),a&&e.jsxs("div",{className:"organization-hero-links",children:[a.website_url&&e.jsx("a",{href:a.website_url,target:"_blank",rel:"noreferrer",children:"Website ↗"}),a.hf_url&&e.jsx("a",{href:a.hf_url,target:"_blank",rel:"noreferrer",children:"Hugging Face ↗"}),a.github_url&&e.jsx("a",{href:a.github_url,target:"_blank",rel:"noreferrer",children:"GitHub ↗"})]})]}),a&&e.jsx(G,{organizationSlug:n,organizationName:a.name})]}),e.jsxs("div",{className:"sort-bar",style:{alignItems:"center",gap:16},children:[e.jsx("div",{style:{minWidth:260},children:e.jsx(Y,{value:p??"__all__",onChange:q,placeholder:"All tasks",searchPlaceholder:"Search organization tasks...",emptyMessage:"No matching tasks.",ariaLabel:"Filter papers by task",selectedOption:l?{value:l.slug,label:l.label,description:`${l.paper_count.toLocaleString()} ${l.paper_count===1?"paper":"papers"}`}:{value:"__all__",label:"All tasks",description:`${((O=a==null?void 0:a.paper_count)==null?void 0:O.toLocaleString())??0} papers`},queryKey:["organization-task-options",n],queryFn:async s=>{var r;return[{value:"__all__",label:"All tasks",description:`${((r=a==null?void 0:a.paper_count)==null?void 0:r.toLocaleString())??0} papers`},...S(s)]},enabled:!c.isLoading,className:"h-[38px]"})}),e.jsxs("div",{className:"paper-feed-toolbar-controls",children:[e.jsx("div",{className:"sort-options",children:re.map(([s,r])=>e.jsx("button",{type:"button",className:`sort-btn ${g===s?"active":""}`,onClick:()=>{const t=new URLSearchParams(o);s==="trending"?t.delete("order_by"):t.set("order_by",s),h(t)},children:r},s))}),e.jsx(Z,{hasCode:_,hasHfArtifacts:f,onHasCodeChange:s=>{const r=new URLSearchParams(o);s?r.set("has_code","true"):r.delete("has_code"),h(r)},onHasHfArtifactsChange:s=>{const r=new URLSearchParams(o);s?r.set("has_hf_artifacts","true"):r.delete("has_hf_artifacts"),h(r)}})]}),e.jsx(z,{startDate:m.startDate,endDate:m.endDate,onChange:s=>h(J(o,s))}),e.jsxs("div",{className:"results-count",children:[H.toLocaleString()," papers"]})]}),i.isLoading?e.jsx("div",{className:"paper-list",children:Array.from({length:4}).map((s,r)=>e.jsx($,{className:"h-40 w-full"},r))}):N.length===0?e.jsx("div",{className:"no-results",children:(a==null?void 0:a.paper_count)===0?"No papers indexed yet":"No papers found for this selection."}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"paper-list",children:N.map((s,r)=>e.jsx(U,{paper:s,rank:r+1,showInstitution:!1},s.id))}),e.jsx("div",{ref:M,style:{height:1}}),i.isFetchingNextPage&&e.jsx("div",{style:{padding:"20px 0",textAlign:"center"},children:"Loading more…"})]})]})};export{xe as O}; diff --git a/assets/OrganizationTaskView-I6v3uF7J.js b/assets/OrganizationTaskView-I6v3uF7J.js new file mode 100644 index 0000000000000000000000000000000000000000..045c1a863fc76e520315cdcb67015457a2bf1964 --- /dev/null +++ b/assets/OrganizationTaskView-I6v3uF7J.js @@ -0,0 +1 @@ +import{c as i,j as t}from"./index-Dt001B3A.js";import{O as m}from"./OrganizationPaperFeed-By1LI1kk.js";import p from"./NotFound-CkQZGkjc.js";import"./useQuery-DD4hUA6p.js";import"./components-DMT1vhIy.js";import"./LatexTitle-B651zAGR.js";import"./katex.min-BSBacQyE.js";import"./transform-DgCWw6nP.js";import"./papers-KXkGPHI5.js";import"./safeExternalHref-CkBrsh84.js";import"./MarkdownText-DeuWKnsZ.js";import"./PaperPreviewLink-CCwg7dvd.js";import"./index-Byizcq9V.js";import"./hover-card-C7JmPdFo.js";import"./OrganizationContributionGraph-B_9EeNTc.js";import"./skeleton-DkhIJUB4.js";import"./catalog-BOpSeTzm.js";import"./paperDateRange-BJ29xsSE.js";import"./popover-DDOhCeb4.js";import"./alert-Xa-AqUL5.js";import"./searchable-select-C7oc2Val.js";import"./button-BL-YLDFJ.js";import"./dialog-Bs8pVXcH.js";import"./loader-circle-DD7s_n4z.js";import"./usePapers-qkM3n2JN.js";import"./useInfiniteQuery-CgAOxB5d.js";const q=()=>{const{orgSlug:o,taskSlug:r}=i();return o&&r?t.jsx(m,{organizationSlug:o,taskSlug:r}):t.jsx(p,{})};export{q as default}; diff --git a/assets/OrganizationTaskView-KbmvUuSs.js b/assets/OrganizationTaskView-KbmvUuSs.js deleted file mode 100644 index 9b7b2af8d59c65f6d0709a48c9f3a1e66d7fab9a..0000000000000000000000000000000000000000 --- a/assets/OrganizationTaskView-KbmvUuSs.js +++ /dev/null @@ -1 +0,0 @@ -import{c as i,j as t}from"./index-Cry0GNHI.js";import{O as m}from"./OrganizationPaperFeed-gweMJ5dR.js";import p from"./NotFound-BSLpqWSh.js";import"./useQuery-DlAfMYOD.js";import"./components-IPCTDA4d.js";import"./LatexTitle-CLc_16Sj.js";import"./katex.min-BSBacQyE.js";import"./transform-b6MI1iSQ.js";import"./papers-CrgFFrmi.js";import"./safeExternalHref-CkBrsh84.js";import"./MarkdownText-CzUmjuOY.js";import"./PaperPreviewLink-CPKVU1Zw.js";import"./index-D7CE3jjK.js";import"./hover-card-CbDqfS2l.js";import"./OrganizationContributionGraph-qTfsmWA5.js";import"./skeleton-LwsL9heH.js";import"./catalog-BjZE6R9z.js";import"./paperDateRange-DQDDTCHP.js";import"./popover-C_By4VBc.js";import"./alert-BAHZ4i9D.js";import"./searchable-select-BbTr2CaG.js";import"./button-QVzubJLr.js";import"./dialog-Dedt-uqk.js";import"./loader-circle-C6beazQX.js";import"./usePapers-B86z4_CJ.js";import"./useInfiniteQuery-C8Q6ynv2.js";const q=()=>{const{orgSlug:o,taskSlug:r}=i();return o&&r?t.jsx(m,{organizationSlug:o,taskSlug:r}):t.jsx(p,{})};export{q as default}; diff --git a/assets/OrganizationsIndexView-BFWAW5nR.js b/assets/OrganizationsIndexView-BGARKKve.js similarity index 94% rename from assets/OrganizationsIndexView-BFWAW5nR.js rename to assets/OrganizationsIndexView-BGARKKve.js index 7c87880f783c04d3ab8934e77df8716fe21f07ab..4732a4d56d02618b26a1bb1b37658c8b3b0a82ea 100644 --- a/assets/OrganizationsIndexView-BFWAW5nR.js +++ b/assets/OrganizationsIndexView-BGARKKve.js @@ -1 +1 @@ -import{a as u,r as g,j as e,L as x}from"./index-Cry0GNHI.js";import{u as j}from"./useQuery-DlAfMYOD.js";import{A as y,a as f}from"./alert-BAHZ4i9D.js";import{S as _}from"./skeleton-LwsL9heH.js";import{c as N}from"./catalog-BjZE6R9z.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{a as u,r as g,j as e,L as x}from"./index-Dt001B3A.js";import{u as j}from"./useQuery-DD4hUA6p.js";import{A as y,a as f}from"./alert-Xa-AqUL5.js";import{S as _}from"./skeleton-DkhIJUB4.js";import{c as N}from"./catalog-BOpSeTzm.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/PaperDetailView-DB5nVfY_.js b/assets/PaperDetailView-D__j4Exc.js similarity index 98% rename from assets/PaperDetailView-DB5nVfY_.js rename to assets/PaperDetailView-D__j4Exc.js index 793788106abca3e892f387c1807f3a10dba29cde..cc5f0e1233e360b295b1075efafe5ae86c85041c 100644 --- a/assets/PaperDetailView-DB5nVfY_.js +++ b/assets/PaperDetailView-D__j4Exc.js @@ -1,4 +1,4 @@ -import{d as Bt,n as Es,u as Dt,e as te,f as Ss,r as p,j as e,g as ce,C as me,P as Ht,h as ge,k as Mt,l as Se,m as Ce,o as zt,p as ht,q as Re,X as pt,L as le,s as Ps,t as Is,R as $s,I as As,v as qt,w as Rs,x as Fs,T as Ls,A as it,y as Le,z as Fe,B as ot,D as Kt,E as Ts,c as Us,F as Bs,b as Ds,G as Hs,H as Ms,J as zs,K as qs,M as Ks}from"./index-Cry0GNHI.js";import{I as G,T as Os,M as Qs,S as Gs,a as Vs}from"./components-IPCTDA4d.js";import{L as Ae,a as Js}from"./LatexTitle-CLc_16Sj.js";import{e as Te,C as Xs,E as Ws}from"./ExternalSourceEvalBadge-CQ-fBLgc.js";import{p as V}from"./papers-CrgFFrmi.js";import{u as Z}from"./useQuery-DlAfMYOD.js";import{b as Ys}from"./usePapers-B86z4_CJ.js";import{f as Zs,D as ea}from"./latexPlainText-DI8YEXVe.js";import{s as be}from"./safeExternalHref-CkBrsh84.js";import{s as ta}from"./transform-b6MI1iSQ.js";import{S as Ne}from"./skeleton-LwsL9heH.js";import{A as sa,a as aa}from"./alert-BAHZ4i9D.js";import{B as D}from"./button-QVzubJLr.js";import{I as W}from"./textarea-nAbEj-Sd.js";import{D as se,a as ae,b as re,c as ne,d as ie,e as oe}from"./dialog-Dedt-uqk.js";import{S as Ct,a as Ee}from"./searchable-select-BbTr2CaG.js";import{u as de}from"./useMutation-C5zYPeQC.js";import{c as fe}from"./catalog-BjZE6R9z.js";import{s as he}from"./submissions-CVaVzZAk.js";import{P as Ue,S as ft,L as Y,a as ra}from"./SignInToEditDialog-D0_3y_qM.js";import{L as ee}from"./loader-circle-C6beazQX.js";import{T as Be,n as Ge,g as Et}from"./github-Bll0eXy5.js";import{D as na,B as Ot,c as ia,g as oa,s as la,a as ca,b as da,d as ua,i as ma,e as ha}from"./codexAddEvals-DrSFgeIY.js";import{u as Qt}from"./index-IfmCq-bY.js";import{G as St}from"./github-D38gLg_l.js";import{M as pa,r as fa}from"./index-D7CE3jjK.js";import{S as Pt,s as ga}from"./savedPapersAuth-DmaqaN2Y.js";import"./katex.min-BSBacQyE.js";import"./hover-card-CbDqfS2l.js";import"./useInfiniteQuery-C8Q6ynv2.js";import"./popover-C_By4VBc.js";/** +import{d as Bt,n as Es,u as Dt,e as te,f as Ss,r as p,j as e,g as ce,C as me,P as Ht,h as ge,k as Mt,l as Se,m as Ce,o as zt,p as ht,q as Re,X as pt,L as le,s as Ps,t as Is,R as $s,I as As,v as qt,w as Rs,x as Fs,T as Ls,A as it,y as Le,z as Fe,B as ot,D as Kt,E as Ts,c as Us,F as Bs,b as Ds,G as Hs,H as Ms,J as zs,K as qs,M as Ks}from"./index-Dt001B3A.js";import{I as G,T as Os,M as Qs,S as Gs,a as Vs}from"./components-DMT1vhIy.js";import{L as Ae,a as Js}from"./LatexTitle-B651zAGR.js";import{e as Te,C as Xs,E as Ws}from"./ExternalSourceEvalBadge-D7DvXFmF.js";import{p as V}from"./papers-KXkGPHI5.js";import{u as Z}from"./useQuery-DD4hUA6p.js";import{b as Ys}from"./usePapers-qkM3n2JN.js";import{f as Zs,D as ea}from"./latexPlainText-DI8YEXVe.js";import{s as be}from"./safeExternalHref-CkBrsh84.js";import{s as ta}from"./transform-DgCWw6nP.js";import{S as Ne}from"./skeleton-DkhIJUB4.js";import{A as sa,a as aa}from"./alert-Xa-AqUL5.js";import{B as D}from"./button-BL-YLDFJ.js";import{I as W}from"./textarea-BLDaXAi6.js";import{D as se,a as ae,b as re,c as ne,d as ie,e as oe}from"./dialog-Bs8pVXcH.js";import{S as Ct,a as Ee}from"./searchable-select-C7oc2Val.js";import{u as de}from"./useMutation-BSdRNizq.js";import{c as fe}from"./catalog-BOpSeTzm.js";import{s as he}from"./submissions-IHYlc8kE.js";import{P as Ue,S as ft,L as Y,a as ra}from"./SignInToEditDialog-BkrM2MwG.js";import{L as ee}from"./loader-circle-DD7s_n4z.js";import{T as Be,n as Ge,g as Et}from"./github-oD2gKV6Z.js";import{D as na,B as Ot,c as ia,g as oa,s as la,a as ca,b as da,d as ua,i as ma,e as ha}from"./codexAddEvals-BW2pMO12.js";import{u as Qt}from"./index-i7UOsfxV.js";import{G as St}from"./github-TRZ4i_h7.js";import{M as pa,r as fa}from"./index-Byizcq9V.js";import{S as Pt,s as ga}from"./savedPapersAuth-CR1Q1QTW.js";import"./katex.min-BSBacQyE.js";import"./hover-card-C7JmPdFo.js";import"./useInfiniteQuery-CgAOxB5d.js";import"./popover-DDOhCeb4.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/PaperPreviewLink-CPKVU1Zw.js b/assets/PaperPreviewLink-CCwg7dvd.js similarity index 98% rename from assets/PaperPreviewLink-CPKVU1Zw.js rename to assets/PaperPreviewLink-CCwg7dvd.js index 941b77cf494946e4526977ea958c1bc8d3a45737..9159d1703b19ca9c02e1b8da18c4aeef16e5e15e 100644 --- a/assets/PaperPreviewLink-CPKVU1Zw.js +++ b/assets/PaperPreviewLink-CCwg7dvd.js @@ -1,4 +1,4 @@ -import{o as F,l as ne,f as v,m as b,a as re,p as I,b as $,n as z,h as ie,s as ae,c as oe,v as se,S as le}from"./index-D7CE3jjK.js";import{k as L}from"./katex.min-BSBacQyE.js";import{j as f,z as T,M as ce,n as ue,L as he}from"./index-Cry0GNHI.js";import{u as pe}from"./useQuery-DlAfMYOD.js";import{H as me,a as fe,b as de}from"./hover-card-CbDqfS2l.js";import{p as ge}from"./papers-CrgFFrmi.js";function xe(){return{enter:{mathFlow:e,mathFlowFenceMeta:t,mathText:o},exit:{mathFlow:i,mathFlowFence:r,mathFlowFenceMeta:n,mathFlowValue:l,mathText:s,mathTextData:l}};function e(a){const u={type:"element",tagName:"code",properties:{className:["language-math","math-display"]},children:[]};this.enter({type:"math",meta:null,value:"",data:{hName:"pre",hChildren:[u]}},a)}function t(){this.buffer()}function n(){const a=this.resume(),u=this.stack[this.stack.length-1];F(u.type==="math"),u.meta=a}function r(){this.data.mathFlowInside||(this.buffer(),this.data.mathFlowInside=!0)}function i(a){const u=this.resume().replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),p=this.stack[this.stack.length-1];F(p.type==="math"),this.exit(a),p.value=u;const m=p.data.hChildren[0];F(m.type==="element"),F(m.tagName==="code"),m.children.push({type:"text",value:u}),this.data.mathFlowInside=void 0}function o(a){this.enter({type:"inlineMath",value:"",data:{hName:"code",hProperties:{className:["language-math","math-inline"]},hChildren:[]}},a),this.buffer()}function s(a){const u=this.resume(),p=this.stack[this.stack.length-1];F(p.type==="inlineMath"),this.exit(a),p.value=u,p.data.hChildren.push({type:"text",value:u})}function l(a){this.config.enter.data.call(this,a),this.config.exit.data.call(this,a)}}function ye(e){let t=(e||{}).singleDollarTextMath;return t==null&&(t=!0),r.peek=i,{unsafe:[{character:"\r",inConstruct:"mathFlowMeta"},{character:` +import{o as F,l as ne,f as v,m as b,a as re,p as I,b as $,n as z,h as ie,s as ae,c as oe,v as se,S as le}from"./index-Byizcq9V.js";import{k as L}from"./katex.min-BSBacQyE.js";import{j as f,z as T,M as ce,n as ue,L as he}from"./index-Dt001B3A.js";import{u as pe}from"./useQuery-DD4hUA6p.js";import{H as me,a as fe,b as de}from"./hover-card-C7JmPdFo.js";import{p as ge}from"./papers-KXkGPHI5.js";function xe(){return{enter:{mathFlow:e,mathFlowFenceMeta:t,mathText:o},exit:{mathFlow:i,mathFlowFence:r,mathFlowFenceMeta:n,mathFlowValue:l,mathText:s,mathTextData:l}};function e(a){const u={type:"element",tagName:"code",properties:{className:["language-math","math-display"]},children:[]};this.enter({type:"math",meta:null,value:"",data:{hName:"pre",hChildren:[u]}},a)}function t(){this.buffer()}function n(){const a=this.resume(),u=this.stack[this.stack.length-1];F(u.type==="math"),u.meta=a}function r(){this.data.mathFlowInside||(this.buffer(),this.data.mathFlowInside=!0)}function i(a){const u=this.resume().replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),p=this.stack[this.stack.length-1];F(p.type==="math"),this.exit(a),p.value=u;const m=p.data.hChildren[0];F(m.type==="element"),F(m.tagName==="code"),m.children.push({type:"text",value:u}),this.data.mathFlowInside=void 0}function o(a){this.enter({type:"inlineMath",value:"",data:{hName:"code",hProperties:{className:["language-math","math-inline"]},hChildren:[]}},a),this.buffer()}function s(a){const u=this.resume(),p=this.stack[this.stack.length-1];F(p.type==="inlineMath"),this.exit(a),p.value=u,p.data.hChildren.push({type:"text",value:u})}function l(a){this.config.enter.data.call(this,a),this.config.exit.data.call(this,a)}}function ye(e){let t=(e||{}).singleDollarTextMath;return t==null&&(t=!0),r.peek=i,{unsafe:[{character:"\r",inConstruct:"mathFlowMeta"},{character:` `,inConstruct:"mathFlowMeta"},{character:"$",after:t?void 0:"\\$",inConstruct:"phrasing"},{character:"$",inConstruct:"mathFlowMeta"},{atBreak:!0,character:"$",after:"\\$"}],handlers:{math:n,inlineMath:r}};function n(o,s,l,a){const u=o.value||"",p=l.createTracker(a),m="$".repeat(Math.max(ne(u,"$")+1,2)),g=l.enter("mathFlow");let x=p.move(m);if(o.meta){const d=l.enter("mathFlowMeta");x+=p.move(l.safe(o.meta,{after:` `,before:x,encode:["$"],...p.current()})),d()}return x+=p.move(` `),u&&(x+=p.move(u+` diff --git a/assets/PaperReaderView-DvqvLLoh.js b/assets/PaperReaderView-AmqyPB1B.js similarity index 91% rename from assets/PaperReaderView-DvqvLLoh.js rename to assets/PaperReaderView-AmqyPB1B.js index c1a39d77df00534ba90b15da86ea0ce70ede587e..17b7a8e8487ada062c15ae20c29b2255f77e4cce 100644 --- a/assets/PaperReaderView-DvqvLLoh.js +++ b/assets/PaperReaderView-AmqyPB1B.js @@ -1 +1 @@ -import{c as ne,j as i,n as Pe,r as s,N as ye,L as K}from"./index-Cry0GNHI.js";import{u as Ce}from"./useQuery-DlAfMYOD.js";import{A as _e,u as je,a as Ie,P as $e}from"./ArtifactWorkspace-BDAI0t7b.js";import{b as Ae}from"./usePapers-B86z4_CJ.js";import{c as ke}from"./chat-FW6HqAah.js";import{s as D}from"./safeExternalHref-CkBrsh84.js";import{ChatExperience as Ne}from"./ChatView-C_sQDmRZ.js";import"./chatLaunch-DpNrK5mV.js";import"./chevron-down-DR8n8lNp.js";import"./papers-CrgFFrmi.js";import"./katex.min-BSBacQyE.js";import"./hover-card-CbDqfS2l.js";import"./github-Bll0eXy5.js";import"./github-D38gLg_l.js";import"./PaperPreviewLink-CPKVU1Zw.js";import"./index-D7CE3jjK.js";import"./file-text-DXZT7Qxr.js";import"./useMutation-C5zYPeQC.js";import"./external-link-DIcR472K.js";import"./useInfiniteQuery-C8Q6ynv2.js";import"./chatPrompts-CDY3UGU1.js";import"./openrouter-CKgqF9nS.js";const ie=66,Ee=240,U="pwc:reader:split-ratio",A=r=>`pwc:reader:session:${r}`,B=r=>`pwc:reader:assistant-collapsed:${r}`,oe=r=>`pwc:reader:page:${r}`;function q(r){const n=Number(sessionStorage.getItem(oe(r)));return Number.isInteger(n)&&n>0?n:1}function Te(){const r=Number(localStorage.getItem(U));return Number.isFinite(r)&&r>=45&&r<=75?r:ie}function ze(r){const n=D(r);if(!n)return null;const o=new URL(n);return(o.hostname==="arxiv.org"||o.hostname==="www.arxiv.org")&&o.pathname.startsWith("/pdf/")&&o.pathname.endsWith(".pdf")&&(o.pathname=o.pathname.slice(0,-4)),o.href}function Le(r){return new URL(r).hostname.replace(/^www\./,"")}function Fe(r){if(!r)return{};const n={};for(const t of r.repositories??[]){if(!t.is_official)continue;const c=D(t.url);if(!c)continue;const b=new URL(c),p=b.pathname.split("/").filter(Boolean);if((b.hostname==="github.com"||b.hostname==="www.github.com")&&p.length>=2){n.repository={href:c,stars:t.num_stars||0};break}}const o=[...r.project_pages??[]].sort((t,c)=>Number(c.is_official)-Number(t.is_official));for(const t of o){const c=D(t.url);if(c){n.projectPage={href:c,label:Le(c)};break}}const g=r.hf_artifact_summary?r.hf_artifact_summary.model_count+r.hf_artifact_summary.dataset_count+r.hf_artifact_summary.space_count:new Set([...r.hf_models??[],...r.hf_datasets??[],...r.hf_spaces??[]]).size;return g>0&&r.arxiv_id&&(n.huggingFace={href:`https://huggingface.co/papers/${r.arxiv_id.replace(/v\d+$/i,"")}`,count:g}),n}function Me(){var te,re,ae,se;const{arxivId:r}=ne(),n=Pe(r??"").replace(/v\d+$/i,""),o=Ae(n,!!n),g=Ce({queryKey:["chatAvailability"],queryFn:()=>ke.getAvailability(),refetchInterval:3e4,retry:!1}),t=o.data,c=ze(t==null?void 0:t.url_pdf),b=Fe(t),p=((te=t==null?void 0:t.arxiv_id)==null?void 0:te.replace(/v\d+$/i,""))||n,[P,k]=s.useState(()=>sessionStorage.getItem(A(n))||void 0),[w,N]=s.useState(Te),[f,O]=s.useState(()=>sessionStorage.getItem(B(n))==="1"),[m,y]=s.useState("paper"),[E,R]=s.useState(),[ce,v]=s.useState(""),[le,ue]=s.useState(()=>q(n)),[S,de]=s.useState(0),[V,X]=s.useState(!1),[fe,T]=s.useState(!1),C=s.useRef(null),z=s.useRef(null),L=s.useRef(null),Q=s.useRef(null),_=s.useRef(!1),j=s.useRef(0),h=s.useRef(0),F=s.useRef(0),x=s.useRef(w),M=s.useRef(q(n)),W=s.useRef(t==null?void 0:t.version),Y=je().reset,G=s.useRef(`${n}:${P??"new"}`),l=S>=840;s.useEffect(()=>{const e=`${n}:${P??"new"}`;G.current!==e&&(G.current=e,Y())},[P,Y,n]),s.useEffect(()=>{t!=null&&t.version&&W.current&&t.version!==W.current&&(R(void 0),v("")),W.current=t==null?void 0:t.version},[t==null?void 0:t.version]),s.useEffect(()=>{window.clearTimeout(j.current),T(!1);const e=sessionStorage.getItem(A(n));k(e||void 0),O(sessionStorage.getItem(B(n))==="1"),y("paper"),R(void 0),v("");const a=q(n);M.current=a,ue(a)},[n]),s.useEffect(()=>()=>{window.clearTimeout(j.current),cancelAnimationFrame(h.current)},[]),s.useLayoutEffect(()=>{const e=C.current;if(!e)return;const a=()=>de(e.clientWidth);a();const u=new ResizeObserver(a);return u.observe(e),()=>u.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 u=e.content;e.content="noindex, nofollow";let d=document.querySelector('link[rel="canonical"]');const Se=!d;d||(d=document.createElement("link"),d.rel="canonical",document.head.appendChild(d));const xe=d.href;return d.href=`${window.location.origin}/paper/${p}`,()=>{document.title="Papers With Code",a?e==null||e.remove():e&&(e.content=u),Se?d==null||d.remove():d&&(d.href=xe)}},[p,t]);const I=s.useCallback(e=>{if(!S)return Math.max(45,Math.min(75,e));const a=480/S*100,u=100-360/S*100;return Math.max(a,Math.min(u,e))},[S]);s.useEffect(()=>N(e=>{const a=I(e);return x.current=a,a}),[I]);const $=e=>{const a=I(e);x.current=a,N(a),localStorage.setItem(U,String(a))},J=e=>{var u;const a=I(e);x.current=a,z.current&&(z.current.style.width=`${a}%`),L.current&&(L.current.style.width=`${100-a}%`),(u=Q.current)==null||u.setAttribute("aria-valuenow",String(Math.round(a)))},Z=e=>{F.current=e,!h.current&&(h.current=requestAnimationFrame(()=>{var u;h.current=0;const a=(u=C.current)==null?void 0:u.getBoundingClientRect();a!=null&&a.width&&J((F.current-a.left)/a.width*100)}))},pe=e=>{_.current=!0,X(!0),e.currentTarget.setPointerCapture(e.pointerId),Z(e.clientX)},H=()=>{var e;if(_.current){if(h.current){cancelAnimationFrame(h.current),h.current=0;const a=(e=C.current)==null?void 0:e.getBoundingClientRect();a!=null&&a.width&&J((F.current-a.left)/a.width*100)}_.current=!1,N(x.current),localStorage.setItem(U,String(x.current)),X(!1)}},ee=e=>{window.clearTimeout(j.current),T(!0),O(e),sessionStorage.setItem(B(n),e?"1":"0"),j.current=window.setTimeout(()=>T(!1),Ee+40)},me=e=>{k(e),sessionStorage.setItem(A(n),e)},he=()=>{k(void 0),sessionStorage.removeItem(A(n)),R(void 0),v("")},ge=((re=g.data)==null?void 0:re.paper_reader_selection_enabled)===!0,ve=e=>{R(e),v(`Selection from page ${e.page} added to chat`),l&&f&&ee(!1)},be=s.useCallback(e=>{R(e),e||v("")},[]),we=ye()&&((ae=g.data)==null?void 0:ae.paper_reader_chat_enabled)!==!1,Re=t&&we?i.jsx(Ne,{mode:"paper",routeSessionId:P,primaryPaper:{id:t.id,routeId:p,title:t.title},currentPage:()=>M.current,paperSelection:E,onPaperSelectionChange:be,onSessionId:me,onReaderSubmit:()=>y("assistant"),onReaderNewChat:he}):i.jsx("div",{className:"reader-chat-unavailable",children:"Chat is not enabled for this preview."});return o.isLoading?i.jsx("div",{className:"reader-status",role:"status",children:"Loading paper…"}):o.error||!t?i.jsxs("div",{className:"reader-status",role:"alert",children:[i.jsx("p",{children:"Paper not found."}),i.jsx(K,{to:"/papers",children:"Browse papers"})]}):((se=g.data)==null?void 0:se.native_pdf_reader_enabled)===!1?i.jsxs("div",{className:"reader-status",role:"alert",children:[i.jsx("p",{children:"The native reader is currently unavailable."}),i.jsx(K,{to:`/paper/${p}`,children:"Back to paper"})]}):t.source!=="arxiv"||!c?i.jsxs("div",{className:"reader-status",role:"alert",children:[i.jsx("p",{children:"Native reading is unavailable for this resource."}),i.jsx(K,{to:`/paper/${p}`,children:"Back to paper"})]}):i.jsxs("div",{className:"paper-reader-shell",children:[!l&&i.jsxs("div",{className:"reader-tabs",role:"tablist","aria-label":"Reader panels",children:[i.jsx("button",{type:"button",role:"tab","aria-selected":m==="paper",onClick:()=>y("paper"),children:"Paper"}),i.jsxs("button",{type:"button",role:"tab","aria-selected":m==="assistant","aria-label":E&&m!=="assistant"?"Chat, selection attached":"Chat",onClick:()=>y("assistant"),children:["Chat",E&&m!=="assistant"&&i.jsx("span",{className:"reader-tab-pending","aria-hidden":"true"})]})]}),i.jsx(Ie,{variant:"reader",children:i.jsxs("div",{ref:C,className:`reader-workspace${l?" is-desktop":" is-tabs"}${f?" is-assistant-collapsed":""}${V?" is-resizing":""}`,"data-testid":"paper-chat-workspace",children:[i.jsx("section",{ref:z,className:`reader-paper-pane${!l&&m!=="paper"?" is-hidden":""}`,style:l?{width:f?"100%":`${w}%`}:void 0,role:"tabpanel","aria-label":"Paper","aria-hidden":!l&&m!=="paper",children:i.jsx($e,{url:c,paperKey:p,paperTitle:t.title,paperHref:`/paper/${p}`,resources:b,initialPage:le,resizeActive:V||fe,selectionEnabled:ge,paperVersion:t.version,onPaperSelection:ve,onPaperSelectionError:v,onPageChange:e=>{M.current=e,sessionStorage.setItem(oe(n),String(e))}})}),l&&!f&&i.jsx("div",{ref:Q,className:"reader-resize-handle",role:"separator","aria-label":"Resize paper and Chat panels","aria-orientation":"vertical","aria-valuemin":45,"aria-valuemax":75,"aria-valuenow":Math.round(w),tabIndex:0,onPointerDown:pe,onPointerMove:e=>{_.current&&Z(e.clientX)},onPointerUp:H,onPointerCancel:H,onLostPointerCapture:H,onDoubleClick:()=>$(ie),onKeyDown:e=>{(e.key==="ArrowLeft"||e.key==="ArrowRight")&&(e.preventDefault(),$(w+(e.key==="ArrowRight"?2:-2))),e.key==="Home"&&$(45),e.key==="End"&&$(75)}}),i.jsx("aside",{ref:L,id:"reader-chat-panel",className:`reader-assistant-pane${!l&&m!=="assistant"?" is-hidden":""}${l&&f?" is-collapsed":""}`,style:l?{width:f?0:`${100-w}%`}:void 0,role:"tabpanel","aria-label":"Chat","aria-hidden":!l&&m!=="assistant"||f,children:Re}),i.jsx("div",{className:"sr-only","aria-live":"polite",children:ce}),l&&i.jsx("button",{type:"button",className:"reader-collapse-assistant","aria-controls":"reader-chat-panel","aria-expanded":!f,onClick:()=>ee(!f),children:f?"Open chat":"Hide chat"})]})})]})}function ct(){const{arxivId:r=""}=ne();return i.jsx(_e,{workspaceKey:`reader:${r}`,children:i.jsx(Me,{})})}export{ct as default,ze as directArxivPdfHref,Fe as readerToolbarResources}; +import{c as ne,j as i,n as Pe,r as s,N as ye,L as K}from"./index-Dt001B3A.js";import{u as Ce}from"./useQuery-DD4hUA6p.js";import{A as _e,u as je,a as Ie,P as $e}from"./ArtifactWorkspace-CMp03Kf3.js";import{b as Ae}from"./usePapers-qkM3n2JN.js";import{c as ke}from"./chat-98y1Ufht.js";import{s as D}from"./safeExternalHref-CkBrsh84.js";import{ChatExperience as Ne}from"./ChatView-BLEP80pf.js";import"./chatLaunch-C8mQqa_z.js";import"./chevron-down-BXCXby03.js";import"./papers-KXkGPHI5.js";import"./katex.min-BSBacQyE.js";import"./hover-card-C7JmPdFo.js";import"./github-oD2gKV6Z.js";import"./github-TRZ4i_h7.js";import"./PaperPreviewLink-CCwg7dvd.js";import"./index-Byizcq9V.js";import"./file-text-BXknBxd6.js";import"./useMutation-BSdRNizq.js";import"./external-link-DdqhM_eg.js";import"./useInfiniteQuery-CgAOxB5d.js";import"./chatPrompts-CDY3UGU1.js";import"./openrouter-BTt-GpWV.js";const ie=66,Ee=240,U="pwc:reader:split-ratio",A=r=>`pwc:reader:session:${r}`,B=r=>`pwc:reader:assistant-collapsed:${r}`,oe=r=>`pwc:reader:page:${r}`;function q(r){const n=Number(sessionStorage.getItem(oe(r)));return Number.isInteger(n)&&n>0?n:1}function Te(){const r=Number(localStorage.getItem(U));return Number.isFinite(r)&&r>=45&&r<=75?r:ie}function ze(r){const n=D(r);if(!n)return null;const o=new URL(n);return(o.hostname==="arxiv.org"||o.hostname==="www.arxiv.org")&&o.pathname.startsWith("/pdf/")&&o.pathname.endsWith(".pdf")&&(o.pathname=o.pathname.slice(0,-4)),o.href}function Le(r){return new URL(r).hostname.replace(/^www\./,"")}function Fe(r){if(!r)return{};const n={};for(const t of r.repositories??[]){if(!t.is_official)continue;const c=D(t.url);if(!c)continue;const b=new URL(c),p=b.pathname.split("/").filter(Boolean);if((b.hostname==="github.com"||b.hostname==="www.github.com")&&p.length>=2){n.repository={href:c,stars:t.num_stars||0};break}}const o=[...r.project_pages??[]].sort((t,c)=>Number(c.is_official)-Number(t.is_official));for(const t of o){const c=D(t.url);if(c){n.projectPage={href:c,label:Le(c)};break}}const g=r.hf_artifact_summary?r.hf_artifact_summary.model_count+r.hf_artifact_summary.dataset_count+r.hf_artifact_summary.space_count:new Set([...r.hf_models??[],...r.hf_datasets??[],...r.hf_spaces??[]]).size;return g>0&&r.arxiv_id&&(n.huggingFace={href:`https://huggingface.co/papers/${r.arxiv_id.replace(/v\d+$/i,"")}`,count:g}),n}function Me(){var te,re,ae,se;const{arxivId:r}=ne(),n=Pe(r??"").replace(/v\d+$/i,""),o=Ae(n,!!n),g=Ce({queryKey:["chatAvailability"],queryFn:()=>ke.getAvailability(),refetchInterval:3e4,retry:!1}),t=o.data,c=ze(t==null?void 0:t.url_pdf),b=Fe(t),p=((te=t==null?void 0:t.arxiv_id)==null?void 0:te.replace(/v\d+$/i,""))||n,[P,k]=s.useState(()=>sessionStorage.getItem(A(n))||void 0),[w,N]=s.useState(Te),[f,O]=s.useState(()=>sessionStorage.getItem(B(n))==="1"),[m,y]=s.useState("paper"),[E,R]=s.useState(),[ce,v]=s.useState(""),[le,ue]=s.useState(()=>q(n)),[S,de]=s.useState(0),[V,X]=s.useState(!1),[fe,T]=s.useState(!1),C=s.useRef(null),z=s.useRef(null),L=s.useRef(null),Q=s.useRef(null),_=s.useRef(!1),j=s.useRef(0),h=s.useRef(0),F=s.useRef(0),x=s.useRef(w),M=s.useRef(q(n)),W=s.useRef(t==null?void 0:t.version),Y=je().reset,G=s.useRef(`${n}:${P??"new"}`),l=S>=840;s.useEffect(()=>{const e=`${n}:${P??"new"}`;G.current!==e&&(G.current=e,Y())},[P,Y,n]),s.useEffect(()=>{t!=null&&t.version&&W.current&&t.version!==W.current&&(R(void 0),v("")),W.current=t==null?void 0:t.version},[t==null?void 0:t.version]),s.useEffect(()=>{window.clearTimeout(j.current),T(!1);const e=sessionStorage.getItem(A(n));k(e||void 0),O(sessionStorage.getItem(B(n))==="1"),y("paper"),R(void 0),v("");const a=q(n);M.current=a,ue(a)},[n]),s.useEffect(()=>()=>{window.clearTimeout(j.current),cancelAnimationFrame(h.current)},[]),s.useLayoutEffect(()=>{const e=C.current;if(!e)return;const a=()=>de(e.clientWidth);a();const u=new ResizeObserver(a);return u.observe(e),()=>u.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 u=e.content;e.content="noindex, nofollow";let d=document.querySelector('link[rel="canonical"]');const Se=!d;d||(d=document.createElement("link"),d.rel="canonical",document.head.appendChild(d));const xe=d.href;return d.href=`${window.location.origin}/paper/${p}`,()=>{document.title="Papers With Code",a?e==null||e.remove():e&&(e.content=u),Se?d==null||d.remove():d&&(d.href=xe)}},[p,t]);const I=s.useCallback(e=>{if(!S)return Math.max(45,Math.min(75,e));const a=480/S*100,u=100-360/S*100;return Math.max(a,Math.min(u,e))},[S]);s.useEffect(()=>N(e=>{const a=I(e);return x.current=a,a}),[I]);const $=e=>{const a=I(e);x.current=a,N(a),localStorage.setItem(U,String(a))},J=e=>{var u;const a=I(e);x.current=a,z.current&&(z.current.style.width=`${a}%`),L.current&&(L.current.style.width=`${100-a}%`),(u=Q.current)==null||u.setAttribute("aria-valuenow",String(Math.round(a)))},Z=e=>{F.current=e,!h.current&&(h.current=requestAnimationFrame(()=>{var u;h.current=0;const a=(u=C.current)==null?void 0:u.getBoundingClientRect();a!=null&&a.width&&J((F.current-a.left)/a.width*100)}))},pe=e=>{_.current=!0,X(!0),e.currentTarget.setPointerCapture(e.pointerId),Z(e.clientX)},H=()=>{var e;if(_.current){if(h.current){cancelAnimationFrame(h.current),h.current=0;const a=(e=C.current)==null?void 0:e.getBoundingClientRect();a!=null&&a.width&&J((F.current-a.left)/a.width*100)}_.current=!1,N(x.current),localStorage.setItem(U,String(x.current)),X(!1)}},ee=e=>{window.clearTimeout(j.current),T(!0),O(e),sessionStorage.setItem(B(n),e?"1":"0"),j.current=window.setTimeout(()=>T(!1),Ee+40)},me=e=>{k(e),sessionStorage.setItem(A(n),e)},he=()=>{k(void 0),sessionStorage.removeItem(A(n)),R(void 0),v("")},ge=((re=g.data)==null?void 0:re.paper_reader_selection_enabled)===!0,ve=e=>{R(e),v(`Selection from page ${e.page} added to chat`),l&&f&&ee(!1)},be=s.useCallback(e=>{R(e),e||v("")},[]),we=ye()&&((ae=g.data)==null?void 0:ae.paper_reader_chat_enabled)!==!1,Re=t&&we?i.jsx(Ne,{mode:"paper",routeSessionId:P,primaryPaper:{id:t.id,routeId:p,title:t.title},currentPage:()=>M.current,paperSelection:E,onPaperSelectionChange:be,onSessionId:me,onReaderSubmit:()=>y("assistant"),onReaderNewChat:he}):i.jsx("div",{className:"reader-chat-unavailable",children:"Chat is not enabled for this preview."});return o.isLoading?i.jsx("div",{className:"reader-status",role:"status",children:"Loading paper…"}):o.error||!t?i.jsxs("div",{className:"reader-status",role:"alert",children:[i.jsx("p",{children:"Paper not found."}),i.jsx(K,{to:"/papers",children:"Browse papers"})]}):((se=g.data)==null?void 0:se.native_pdf_reader_enabled)===!1?i.jsxs("div",{className:"reader-status",role:"alert",children:[i.jsx("p",{children:"The native reader is currently unavailable."}),i.jsx(K,{to:`/paper/${p}`,children:"Back to paper"})]}):t.source!=="arxiv"||!c?i.jsxs("div",{className:"reader-status",role:"alert",children:[i.jsx("p",{children:"Native reading is unavailable for this resource."}),i.jsx(K,{to:`/paper/${p}`,children:"Back to paper"})]}):i.jsxs("div",{className:"paper-reader-shell",children:[!l&&i.jsxs("div",{className:"reader-tabs",role:"tablist","aria-label":"Reader panels",children:[i.jsx("button",{type:"button",role:"tab","aria-selected":m==="paper",onClick:()=>y("paper"),children:"Paper"}),i.jsxs("button",{type:"button",role:"tab","aria-selected":m==="assistant","aria-label":E&&m!=="assistant"?"Chat, selection attached":"Chat",onClick:()=>y("assistant"),children:["Chat",E&&m!=="assistant"&&i.jsx("span",{className:"reader-tab-pending","aria-hidden":"true"})]})]}),i.jsx(Ie,{variant:"reader",children:i.jsxs("div",{ref:C,className:`reader-workspace${l?" is-desktop":" is-tabs"}${f?" is-assistant-collapsed":""}${V?" is-resizing":""}`,"data-testid":"paper-chat-workspace",children:[i.jsx("section",{ref:z,className:`reader-paper-pane${!l&&m!=="paper"?" is-hidden":""}`,style:l?{width:f?"100%":`${w}%`}:void 0,role:"tabpanel","aria-label":"Paper","aria-hidden":!l&&m!=="paper",children:i.jsx($e,{url:c,paperKey:p,paperTitle:t.title,paperHref:`/paper/${p}`,resources:b,initialPage:le,resizeActive:V||fe,selectionEnabled:ge,paperVersion:t.version,onPaperSelection:ve,onPaperSelectionError:v,onPageChange:e=>{M.current=e,sessionStorage.setItem(oe(n),String(e))}})}),l&&!f&&i.jsx("div",{ref:Q,className:"reader-resize-handle",role:"separator","aria-label":"Resize paper and Chat panels","aria-orientation":"vertical","aria-valuemin":45,"aria-valuemax":75,"aria-valuenow":Math.round(w),tabIndex:0,onPointerDown:pe,onPointerMove:e=>{_.current&&Z(e.clientX)},onPointerUp:H,onPointerCancel:H,onLostPointerCapture:H,onDoubleClick:()=>$(ie),onKeyDown:e=>{(e.key==="ArrowLeft"||e.key==="ArrowRight")&&(e.preventDefault(),$(w+(e.key==="ArrowRight"?2:-2))),e.key==="Home"&&$(45),e.key==="End"&&$(75)}}),i.jsx("aside",{ref:L,id:"reader-chat-panel",className:`reader-assistant-pane${!l&&m!=="assistant"?" is-hidden":""}${l&&f?" is-collapsed":""}`,style:l?{width:f?0:`${100-w}%`}:void 0,role:"tabpanel","aria-label":"Chat","aria-hidden":!l&&m!=="assistant"||f,children:Re}),i.jsx("div",{className:"sr-only","aria-live":"polite",children:ce}),l&&i.jsx("button",{type:"button",className:"reader-collapse-assistant","aria-controls":"reader-chat-panel","aria-expanded":!f,onClick:()=>ee(!f),children:f?"Open chat":"Hide chat"})]})})]})}function ct(){const{arxivId:r=""}=ne();return i.jsx(_e,{workspaceKey:`reader:${r}`,children:i.jsx(Me,{})})}export{ct as default,ze as directArxivPdfHref,Fe as readerToolbarResources}; diff --git a/assets/PapersListView-CacFfG7A.js b/assets/PapersListView-eYTQa2CU.js similarity index 92% rename from assets/PapersListView-CacFfG7A.js rename to assets/PapersListView-eYTQa2CU.js index 4fb0f5f239f77a72c8d7fb3ea5160dcb0a12d5a1..8069ef9dd8996f70b1f3ee25ce415698269062e4 100644 --- a/assets/PapersListView-CacFfG7A.js +++ b/assets/PapersListView-eYTQa2CU.js @@ -1 +1 @@ -import{a as X,r as x,A as J,j as e,L as j,i as W}from"./index-Cry0GNHI.js";import{I as U,T as Y,P as Z}from"./components-IPCTDA4d.js";import{c as ee}from"./catalog-BjZE6R9z.js";import{t as se,d as ae}from"./transform-b6MI1iSQ.js";import{u as re,a as te}from"./usePapers-B86z4_CJ.js";import{u as ne}from"./useDebounce-Wb28akK_.js";import{r as ie,u as oe,a as ce,w as le,P as de}from"./paperDateRange-DQDDTCHP.js";import{S as _}from"./skeleton-LwsL9heH.js";import{A as me,a as he}from"./alert-BAHZ4i9D.js";import{u as pe}from"./useQuery-DlAfMYOD.js";import"./LatexTitle-CLc_16Sj.js";import"./katex.min-BSBacQyE.js";import"./papers-CrgFFrmi.js";import"./safeExternalHref-CkBrsh84.js";import"./useInfiniteQuery-C8Q6ynv2.js";import"./popover-C_By4VBc.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),$e=()=>{var I,$,T,O,B,H,M,q,G;const[a,o]=X(),m=a.get("framework")||void 0,c=a.get("repository")||void 0,t=!!(m||c),l=a.get("search")||"",[F,C]=x.useState(l),p=ne(F,300),n=!t&&l.trim().length>0;x.useEffect(()=>C(l),[l]),x.useEffect(()=>{if(p===l)return;const s=new URLSearchParams(a);p?s.set("search",p):s.delete("search"),o(s,{replace:!0})},[p]),x.useEffect(()=>{const s=a.get("order_by"),i=new URLSearchParams(a);n&&!["relevance","date_published","citation_count"].includes(s||"")?(i.set("order_by","relevance"),o(i,{replace:!0})):!n&&s==="relevance"&&(i.delete("order_by"),o(i,{replace:!0}))},[n,a,o]);const L=a.get("order_by"),g=L==="citation_count"?"cited":L==="date_published"?"new":n?"relevance":"trending",u=ie(a),w=a.get("has_hf_artifacts")==="true",k=!t&&a.get("has_code")==="true",y=(s,i)=>{const h=new URLSearchParams(a);i?h.set(s,i):h.delete(s),o(h)},Q=s=>{y("order_by",s==="cited"?"citation_count":s==="new"?"date_published":s)},b=re({page_size:20,order_by:g==="trending"?"trending":g==="cited"?"citation_count":"date_published",order_dir:"desc",search:t&&p||void 0,start_date:u.startDate,end_date:u.endDate,include_resources:!0,conference:a.get("conference")||void 0,latest_only:a.get("latest_only")!=="false",has_code:k,has_hf_artifacts:w,framework:m,repository:c,enabled:!n}),R=te({q:p.trim(),order_by:g==="cited"?"citation_count":g==="new"?"date_published":"relevance",start_date:u.startDate,end_date:u.endDate,has_code:k,has_hf_artifacts:w,enabled:n}),d=n?R:b,A=pe({queryKey:["top-tasks-sidebar"],queryFn:()=>ee.topTasks(8),enabled:!t&&!n,staleTime:10*60*1e3}),N=x.useMemo(()=>{var i;return(((i=d.data)==null?void 0:i.pages.flatMap(h=>h.results))||[]).map(h=>{const S=se(h);return n?{...S,abstract:fe(S.abstract,l)}:S})},[d.data,n,l]),{targetRef:K,isIntersecting:D}=oe({rootMargin:"200px"});x.useEffect(()=>{D&&d.hasNextPage&&!d.isFetchingNextPage&&d.fetchNextPage()},[D,d.hasNextPage,d.isFetchingNextPage]);const f=((T=($=(I=b.data)==null?void 0:I.pages)==null?void 0:$[0])==null?void 0:T.count)??0,r=(H=(B=(O=b.data)==null?void 0:O.pages)==null?void 0:B[0])==null?void 0:H.scope,P=(q=(M=R.data)==null?void 0:M.pages)==null?void 0:q.at(-1),E=m&&d.error instanceof J&&d.error.status===404,V=(r==null?void 0:r.kind)==="framework"?r.framework_name:r==null?void 0:r.repository;return e.jsxs("div",{className:"page",children:[(r==null?void 0:r.kind)==="framework"&&e.jsxs("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:[e.jsx(j,{to:"/",children:"Papers"}),e.jsx("span",{className:"sep",children:"/"}),e.jsx(j,{to:"/frameworks",children:"Frameworks"}),e.jsx("span",{className:"sep",children:"/"}),e.jsx("span",{style:{color:"var(--ink)"},children:r.framework_name})]}),e.jsxs("div",{className:"feed-header",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"feed-title",children:t?e.jsxs(e.Fragment,{children:["Papers implemented by ",e.jsx("em",{children:V||m||c})]}):n?e.jsxs(e.Fragment,{children:["Search results for ",e.jsxs("em",{children:["“",l,"”"]})]}):e.jsxs(e.Fragment,{children:["All ",e.jsx("em",{children:"Papers"})]})}),e.jsx("div",{className:"feed-subtitle",children:t?(r==null?void 0:r.kind)==="framework"?f>0&&`${f.toLocaleString()} papers.`:r!=null&&r.repository?e.jsxs(e.Fragment,{children:["GitHub repository ",e.jsx("strong",{children:r.repository}),". ",f>0&&`${f.toLocaleString()} papers.`]}):"Repository-scoped paper feed.":n?`${N.length} loaded from the most relevant results.`:e.jsxs(e.Fragment,{children:["Search the full corpus. ",f>0&&`${f.toLocaleString()} papers indexed.`]})}),t&&r&&e.jsxs("div",{className:"paper-feed-scope-links",children:[e.jsxs("div",{className:"paper-feed-primary-links",children:[r.github_url&&e.jsxs("a",{href:r.github_url,target:"_blank",rel:"noopener noreferrer",className:r.kind==="framework"?"task-framework-link":"framework-link",children:[e.jsx(U,{name:"github",size:13}),r.kind==="framework"?e.jsxs(e.Fragment,{children:[e.jsx("span",{children:r.repository||"GitHub"}),r.num_stars!=null&&e.jsxs("span",{className:"task-framework-link-stars",children:["★ ",je(r.num_stars)]})]}):"GitHub"]}),r.kind==="framework"&&r.introducing_paper_arxiv_id&&e.jsx(j,{to:`/paper/${r.introducing_paper_arxiv_id}`,className:"framework-link",children:"Introducing paper"})]}),r.kind==="framework"&&r.recommended_tasks&&r.recommended_tasks.length>0&&e.jsx("div",{className:"paper-feed-task-tags",children:r.recommended_tasks.map(s=>s.slug?e.jsx(Y,{slug:s.slug,label:s.name},s.id):null)})]})]}),e.jsx(ce,{startDate:u.startDate,endDate:u.endDate,onChange:s=>o(le(a,s))})]}),e.jsx("div",{className:"papers-search-row",children:e.jsxs("div",{className:"papers-search-input-wrap",children:[e.jsx(U,{name:"search",size:14}),e.jsx("input",{className:"papers-search-input",placeholder:"Search title or abstract…",value:F,onChange:s=>C(s.target.value)})]})}),e.jsxs("div",{className:t||n?"papers-feed-layout-scoped":"layout-with-sidebar",children:[!t&&!n&&e.jsx("aside",{className:"sidebar",children:e.jsxs("div",{className:"sidebar-section",children:[e.jsx("div",{className:"sidebar-label",children:"Top Domains"}),A.isLoading&&e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:Array.from({length:6}).map((s,i)=>e.jsx(_,{className:"h-5 w-full"},i))}),(G=A.data)==null?void 0:G.map(s=>e.jsxs(j,{to:`/tasks/${s.slug}`,className:"sidebar-link",children:[ae(s.name,s.slug),s.paper_count!=null&&e.jsx("span",{className:"count",children:s.paper_count})]},s.id))]})}),e.jsxs("div",{children:[e.jsxs("div",{className:"sort-bar",children:[e.jsxs("div",{className:"paper-feed-toolbar-controls",children:[e.jsx("div",{className:"sort-options",children:(n?ge:xe).map(([s,i])=>e.jsx("button",{className:`sort-btn ${g===s?"active":""}`,onClick:()=>Q(s),children:i},s))}),e.jsx(de,{hasCode:k,hasHfArtifacts:w,onHasCodeChange:s=>y("has_code",s?"true":void 0),onHasHfArtifactsChange:s=>y("has_hf_artifacts",s?"true":void 0),showHasCode:!t})]}),e.jsxs("div",{className:"results-count",children:[N.length," loaded"]})]}),E?e.jsx("div",{className:"no-results",children:"Framework not found."}):d.error&&e.jsx(me,{variant:"destructive",className:"mb-4",children:e.jsx(he,{children:"Failed to load papers. Please try again."})}),!E&&(d.isLoading?e.jsx("div",{className:"paper-list",children:Array.from({length:6}).map((s,i)=>e.jsxs("div",{className:"paper-card",children:[e.jsx(_,{className:"h-[220px] w-[160px]"}),e.jsxs("div",{className:"paper-body",style:{flex:1,gap:12},children:[e.jsx(_,{className:"h-6 w-3/4"}),e.jsx(_,{className:"h-4 w-1/2"}),e.jsx(_,{className:"h-12 w-full"})]})]},i))}):N.length===0?e.jsxs("div",{className:"no-results",children:[e.jsx("p",{children:"No matching papers."}),n&&W()&&e.jsx(j,{to:`/chat?q=${encodeURIComponent(l.trim())}`,children:"Ask the assistant instead"})]}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"paper-list",children:N.map((s,i)=>e.jsx(Z,{paper:s,rank:i+1,highlightQuery:n?l:void 0},s.id))}),e.jsx("div",{ref:K,style:{height:1}}),d.isFetchingNextPage&&e.jsx("div",{style:{padding:"20px 0",textAlign:"center",color:"var(--ink-faint)"},children:"Loading more…"}),!d.hasNextPage&&!d.isFetchingNextPage&&n&&e.jsx("div",{className:"search-results-end",children:P!=null&&P.cap_reached?"End of the top 100 results":"End of results"})]}))]})]})]})};export{$e as default}; +import{a as X,r as x,A as J,j as e,L as j,i as W}from"./index-Dt001B3A.js";import{I as U,T as Y,P as Z}from"./components-DMT1vhIy.js";import{c as ee}from"./catalog-BOpSeTzm.js";import{t as se,d as ae}from"./transform-DgCWw6nP.js";import{u as re,a as te}from"./usePapers-qkM3n2JN.js";import{u as ne}from"./useDebounce-DaqbxkO6.js";import{r as ie,u as oe,a as ce,w as le,P as de}from"./paperDateRange-BJ29xsSE.js";import{S as _}from"./skeleton-DkhIJUB4.js";import{A as me,a as he}from"./alert-Xa-AqUL5.js";import{u as pe}from"./useQuery-DD4hUA6p.js";import"./LatexTitle-B651zAGR.js";import"./katex.min-BSBacQyE.js";import"./papers-KXkGPHI5.js";import"./safeExternalHref-CkBrsh84.js";import"./useInfiniteQuery-CgAOxB5d.js";import"./popover-DDOhCeb4.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),$e=()=>{var I,$,T,O,B,H,M,q,G;const[a,o]=X(),m=a.get("framework")||void 0,c=a.get("repository")||void 0,t=!!(m||c),l=a.get("search")||"",[F,C]=x.useState(l),p=ne(F,300),n=!t&&l.trim().length>0;x.useEffect(()=>C(l),[l]),x.useEffect(()=>{if(p===l)return;const s=new URLSearchParams(a);p?s.set("search",p):s.delete("search"),o(s,{replace:!0})},[p]),x.useEffect(()=>{const s=a.get("order_by"),i=new URLSearchParams(a);n&&!["relevance","date_published","citation_count"].includes(s||"")?(i.set("order_by","relevance"),o(i,{replace:!0})):!n&&s==="relevance"&&(i.delete("order_by"),o(i,{replace:!0}))},[n,a,o]);const L=a.get("order_by"),g=L==="citation_count"?"cited":L==="date_published"?"new":n?"relevance":"trending",u=ie(a),w=a.get("has_hf_artifacts")==="true",k=!t&&a.get("has_code")==="true",y=(s,i)=>{const h=new URLSearchParams(a);i?h.set(s,i):h.delete(s),o(h)},Q=s=>{y("order_by",s==="cited"?"citation_count":s==="new"?"date_published":s)},b=re({page_size:20,order_by:g==="trending"?"trending":g==="cited"?"citation_count":"date_published",order_dir:"desc",search:t&&p||void 0,start_date:u.startDate,end_date:u.endDate,include_resources:!0,conference:a.get("conference")||void 0,latest_only:a.get("latest_only")!=="false",has_code:k,has_hf_artifacts:w,framework:m,repository:c,enabled:!n}),R=te({q:p.trim(),order_by:g==="cited"?"citation_count":g==="new"?"date_published":"relevance",start_date:u.startDate,end_date:u.endDate,has_code:k,has_hf_artifacts:w,enabled:n}),d=n?R:b,A=pe({queryKey:["top-tasks-sidebar"],queryFn:()=>ee.topTasks(8),enabled:!t&&!n,staleTime:10*60*1e3}),N=x.useMemo(()=>{var i;return(((i=d.data)==null?void 0:i.pages.flatMap(h=>h.results))||[]).map(h=>{const S=se(h);return n?{...S,abstract:fe(S.abstract,l)}:S})},[d.data,n,l]),{targetRef:K,isIntersecting:D}=oe({rootMargin:"200px"});x.useEffect(()=>{D&&d.hasNextPage&&!d.isFetchingNextPage&&d.fetchNextPage()},[D,d.hasNextPage,d.isFetchingNextPage]);const f=((T=($=(I=b.data)==null?void 0:I.pages)==null?void 0:$[0])==null?void 0:T.count)??0,r=(H=(B=(O=b.data)==null?void 0:O.pages)==null?void 0:B[0])==null?void 0:H.scope,P=(q=(M=R.data)==null?void 0:M.pages)==null?void 0:q.at(-1),E=m&&d.error instanceof J&&d.error.status===404,V=(r==null?void 0:r.kind)==="framework"?r.framework_name:r==null?void 0:r.repository;return e.jsxs("div",{className:"page",children:[(r==null?void 0:r.kind)==="framework"&&e.jsxs("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:[e.jsx(j,{to:"/",children:"Papers"}),e.jsx("span",{className:"sep",children:"/"}),e.jsx(j,{to:"/frameworks",children:"Frameworks"}),e.jsx("span",{className:"sep",children:"/"}),e.jsx("span",{style:{color:"var(--ink)"},children:r.framework_name})]}),e.jsxs("div",{className:"feed-header",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"feed-title",children:t?e.jsxs(e.Fragment,{children:["Papers implemented by ",e.jsx("em",{children:V||m||c})]}):n?e.jsxs(e.Fragment,{children:["Search results for ",e.jsxs("em",{children:["“",l,"”"]})]}):e.jsxs(e.Fragment,{children:["All ",e.jsx("em",{children:"Papers"})]})}),e.jsx("div",{className:"feed-subtitle",children:t?(r==null?void 0:r.kind)==="framework"?f>0&&`${f.toLocaleString()} papers.`:r!=null&&r.repository?e.jsxs(e.Fragment,{children:["GitHub repository ",e.jsx("strong",{children:r.repository}),". ",f>0&&`${f.toLocaleString()} papers.`]}):"Repository-scoped paper feed.":n?`${N.length} loaded from the most relevant results.`:e.jsxs(e.Fragment,{children:["Search the full corpus. ",f>0&&`${f.toLocaleString()} papers indexed.`]})}),t&&r&&e.jsxs("div",{className:"paper-feed-scope-links",children:[e.jsxs("div",{className:"paper-feed-primary-links",children:[r.github_url&&e.jsxs("a",{href:r.github_url,target:"_blank",rel:"noopener noreferrer",className:r.kind==="framework"?"task-framework-link":"framework-link",children:[e.jsx(U,{name:"github",size:13}),r.kind==="framework"?e.jsxs(e.Fragment,{children:[e.jsx("span",{children:r.repository||"GitHub"}),r.num_stars!=null&&e.jsxs("span",{className:"task-framework-link-stars",children:["★ ",je(r.num_stars)]})]}):"GitHub"]}),r.kind==="framework"&&r.introducing_paper_arxiv_id&&e.jsx(j,{to:`/paper/${r.introducing_paper_arxiv_id}`,className:"framework-link",children:"Introducing paper"})]}),r.kind==="framework"&&r.recommended_tasks&&r.recommended_tasks.length>0&&e.jsx("div",{className:"paper-feed-task-tags",children:r.recommended_tasks.map(s=>s.slug?e.jsx(Y,{slug:s.slug,label:s.name},s.id):null)})]})]}),e.jsx(ce,{startDate:u.startDate,endDate:u.endDate,onChange:s=>o(le(a,s))})]}),e.jsx("div",{className:"papers-search-row",children:e.jsxs("div",{className:"papers-search-input-wrap",children:[e.jsx(U,{name:"search",size:14}),e.jsx("input",{className:"papers-search-input",placeholder:"Search title or abstract…",value:F,onChange:s=>C(s.target.value)})]})}),e.jsxs("div",{className:t||n?"papers-feed-layout-scoped":"layout-with-sidebar",children:[!t&&!n&&e.jsx("aside",{className:"sidebar",children:e.jsxs("div",{className:"sidebar-section",children:[e.jsx("div",{className:"sidebar-label",children:"Top Domains"}),A.isLoading&&e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:Array.from({length:6}).map((s,i)=>e.jsx(_,{className:"h-5 w-full"},i))}),(G=A.data)==null?void 0:G.map(s=>e.jsxs(j,{to:`/tasks/${s.slug}`,className:"sidebar-link",children:[ae(s.name,s.slug),s.paper_count!=null&&e.jsx("span",{className:"count",children:s.paper_count})]},s.id))]})}),e.jsxs("div",{children:[e.jsxs("div",{className:"sort-bar",children:[e.jsxs("div",{className:"paper-feed-toolbar-controls",children:[e.jsx("div",{className:"sort-options",children:(n?ge:xe).map(([s,i])=>e.jsx("button",{className:`sort-btn ${g===s?"active":""}`,onClick:()=>Q(s),children:i},s))}),e.jsx(de,{hasCode:k,hasHfArtifacts:w,onHasCodeChange:s=>y("has_code",s?"true":void 0),onHasHfArtifactsChange:s=>y("has_hf_artifacts",s?"true":void 0),showHasCode:!t})]}),e.jsxs("div",{className:"results-count",children:[N.length," loaded"]})]}),E?e.jsx("div",{className:"no-results",children:"Framework not found."}):d.error&&e.jsx(me,{variant:"destructive",className:"mb-4",children:e.jsx(he,{children:"Failed to load papers. Please try again."})}),!E&&(d.isLoading?e.jsx("div",{className:"paper-list",children:Array.from({length:6}).map((s,i)=>e.jsxs("div",{className:"paper-card",children:[e.jsx(_,{className:"h-[220px] w-[160px]"}),e.jsxs("div",{className:"paper-body",style:{flex:1,gap:12},children:[e.jsx(_,{className:"h-6 w-3/4"}),e.jsx(_,{className:"h-4 w-1/2"}),e.jsx(_,{className:"h-12 w-full"})]})]},i))}):N.length===0?e.jsxs("div",{className:"no-results",children:[e.jsx("p",{children:"No matching papers."}),n&&W()&&e.jsx(j,{to:`/chat?q=${encodeURIComponent(l.trim())}`,children:"Ask the assistant instead"})]}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"paper-list",children:N.map((s,i)=>e.jsx(Z,{paper:s,rank:i+1,highlightQuery:n?l:void 0},s.id))}),e.jsx("div",{ref:K,style:{height:1}}),d.isFetchingNextPage&&e.jsx("div",{style:{padding:"20px 0",textAlign:"center",color:"var(--ink-faint)"},children:"Loading more…"}),!d.hasNextPage&&!d.isFetchingNextPage&&n&&e.jsx("div",{className:"search-results-end",children:P!=null&&P.cap_reached?"End of the top 100 results":"End of results"})]}))]})]})]})};export{$e as default}; diff --git a/assets/PrivacyView-C2T_LyM0.js b/assets/PrivacyView-DlTj4HIc.js similarity index 99% rename from assets/PrivacyView-C2T_LyM0.js rename to assets/PrivacyView-DlTj4HIc.js index 954ea833626732c4aa71e6be47d3252aa1792708..6ebae850859f6f943a05b1e1569c2770bfcc9c84 100644 --- a/assets/PrivacyView-C2T_LyM0.js +++ b/assets/PrivacyView-DlTj4HIc.js @@ -1 +1 @@ -import{z as s,j as e}from"./index-Cry0GNHI.js";import{f as i,D as r}from"./latexPlainText-DI8YEXVe.js";const n=()=>(s.useEffect(()=>(document.title=i("Privacy Policy"),()=>{document.title=r}),[]),e.jsxs("article",{className:"page legal-page",children:[e.jsxs("header",{className:"legal-header",children:[e.jsx("p",{className:"legal-kicker",children:"Legal"}),e.jsx("h1",{children:"Privacy Policy"}),e.jsx("p",{className:"legal-effective-date",children:"Effective August 11, 2026"})]}),e.jsx("p",{children:"This Privacy Policy explains how Hugging Face, Inc. (“Hugging Face,” “we,” or “us”) collects, uses, and shares information when you use Papers With Code, including its website, research assistant, APIs, and related services (the “Service”)."}),e.jsxs("section",{children:[e.jsx("h2",{children:"1. Information we collect"}),e.jsx("h3",{children:"Information you provide"}),e.jsxs("ul",{children:[e.jsxs("li",{children:[e.jsx("strong",{children:"Account information."})," If you sign in with Hugging Face, we receive account identifiers and profile details needed to authenticate you, such as your user ID, username, and avatar. If you request contributor access, we also receive and retain the verified email address associated with your Hugging Face account so we can review and communicate about your request."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Contributions and preferences."})," We collect information you submit or save, such as paper submissions and edits, bookmarks, display preferences, feedback, and communications with us. Material you submit to a public research page may be publicly visible."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Research assistant content."})," We collect your questions, conversation history, generated answers, citations, tool calls and results, and feedback about answers. Chats are private to your account unless you choose to create a share link; anyone with that link may be able to view the shared chat."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Provider and billing information."})," If you enable a model provider, we process the authorization or API credentials needed to make requests on your behalf. Hugging Face or another provider processes its own billing information under its terms. Papers With Code does not collect your payment-card details."]})]}),e.jsx("h3",{children:"Information collected automatically"}),e.jsx("p",{children:"We collect technical and usage information such as IP address, browser and device type, operating system, pages or features used, dates and times, referring pages, request identifiers, cookies, logs, and diagnostic data. For research-assistant requests, this may include the selected model, token and cost details, latency, errors, and other operational metadata."}),e.jsx("h3",{children:"Research assistant tracing"}),e.jsxs("p",{children:["To evaluate, debug, secure, and improve the research assistant, we use Langfuse to record traces. A trace may contain the complete text of your question and the assistant's answer, as well as tool inputs, tool outputs, retrieved research material, model details, usage data, and related operational metadata.",e.jsx("strong",{children:" This trace content is not redacted before it is sent to Langfuse."})]}),e.jsx("p",{children:"Papers With Code is designed for questions about research literature. Do not put passwords, API keys, confidential information, health or financial data, or other sensitive personal information in research-assistant prompts."})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"2. How we use information"}),e.jsx("p",{children:"We use information to:"}),e.jsxs("ul",{children:[e.jsx("li",{children:"provide, personalize, maintain, and operate the Service;"}),e.jsx("li",{children:"authenticate users and keep accounts and the Service secure;"}),e.jsx("li",{children:"run research-assistant requests and preserve conversation history;"}),e.jsx("li",{children:"measure performance, troubleshoot failures, and improve quality;"}),e.jsx("li",{children:"review contributions, prevent abuse, and enforce applicable terms;"}),e.jsx("li",{children:"communicate with you and respond to requests; and"}),e.jsx("li",{children:"comply with law and protect users, Hugging Face, and the public."})]})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"3. How we share information"}),e.jsx("p",{children:"We may share information in these circumstances:"}),e.jsxs("ul",{children:[e.jsxs("li",{children:[e.jsx("strong",{children:"Service providers."})," Vendors process information for hosting, authentication, analytics, observability, security, and support. These include Hugging Face services, Langfuse for research-assistant tracing, Plausible for website analytics, and infrastructure providers."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Model providers."})," Research-assistant content is sent to the model provider you use, such as Hugging Face Inference Providers or OpenRouter, so it can generate a response. That provider's privacy terms also apply to its processing."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Public and shared content."})," Contributions intended for public pages are public. A chat is disclosed through the Service when you create and distribute a share link."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Legal, safety, and corporate events."})," We may disclose information when reasonably necessary to comply with law, protect rights and safety, investigate abuse, or complete a merger, acquisition, financing, or transfer of assets."]})]}),e.jsx("p",{children:"We do not sell your personal information."})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"4. Cookies and analytics"}),e.jsx("p",{children:"We use cookies and similar storage when needed for sign-in, security, preferences, and operation of the Service. We also use Plausible to understand aggregate website usage. You can control cookies through your browser, but disabling necessary cookies may prevent account features from working."})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"5. Legal bases"}),e.jsx("p",{children:"Where applicable law requires a legal basis, we process information as needed to perform our agreement with you, with your consent, to comply with legal obligations, and for legitimate interests such as operating, securing, and improving the Service. You may withdraw consent where consent is the basis for processing, without affecting earlier processing."})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"6. Retention and deletion"}),e.jsx("p",{children:"Private chats are retained until you delete them, subject to limits of 100 active chats and 100 MB of chat data per user. Archiving hides a chat and frees active-chat quota but does not delete it. You may deliberately share an unlisted snapshot; deleting its private chat removes the durable transcript, workspace reference, and share link after deletion is verified. No dedicated private-chat export format is currently offered."}),e.jsx("p",{children:"We keep information for as long as reasonably needed for the purposes described here, including providing the Service, maintaining security and audit records, resolving disputes, and meeting legal obligations. Retention periods vary by data type and service provider. You can delete individual chats in the Service. Deletion may not immediately remove information from backups, security logs, or third-party systems where limited retention is required."})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"7. Security and international transfers"}),e.jsx("p",{children:"We use reasonable administrative, technical, and organizational safeguards, but no internet service can guarantee absolute security. We and our service providers may process information in the United States and other countries, which may have different data-protection laws from your country. Where required, we use appropriate safeguards for international transfers."})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"8. Your privacy rights"}),e.jsx("p",{children:"Depending on where you live, you may have rights to access, correct, delete, or receive a copy of your personal information; object to or restrict processing; withdraw consent; or appeal a decision about a request. You may also have the right to complain to a data-protection authority. We may need to verify your identity before fulfilling a request."})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"9. Children"}),e.jsx("p",{children:"The Service is not directed to children under 13, and we do not knowingly collect personal information from children under 13. If you believe a child has provided personal information, please contact us."})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"10. Changes to this policy"}),e.jsx("p",{children:"We may update this policy as the Service changes. We will post the revised policy here and update its effective date. If a change is material, we will provide additional notice when appropriate."})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"11. Contact us"}),e.jsxs("p",{children:["For questions or privacy requests, contact"," ",e.jsx("a",{href:"mailto:privacy@huggingface.co",children:"privacy@huggingface.co"}),". Please do not include passwords, API keys, or other sensitive credentials in your message."]})]})]}));export{n as default}; +import{z as s,j as e}from"./index-Dt001B3A.js";import{f as i,D as r}from"./latexPlainText-DI8YEXVe.js";const n=()=>(s.useEffect(()=>(document.title=i("Privacy Policy"),()=>{document.title=r}),[]),e.jsxs("article",{className:"page legal-page",children:[e.jsxs("header",{className:"legal-header",children:[e.jsx("p",{className:"legal-kicker",children:"Legal"}),e.jsx("h1",{children:"Privacy Policy"}),e.jsx("p",{className:"legal-effective-date",children:"Effective August 11, 2026"})]}),e.jsx("p",{children:"This Privacy Policy explains how Hugging Face, Inc. (“Hugging Face,” “we,” or “us”) collects, uses, and shares information when you use Papers With Code, including its website, research assistant, APIs, and related services (the “Service”)."}),e.jsxs("section",{children:[e.jsx("h2",{children:"1. Information we collect"}),e.jsx("h3",{children:"Information you provide"}),e.jsxs("ul",{children:[e.jsxs("li",{children:[e.jsx("strong",{children:"Account information."})," If you sign in with Hugging Face, we receive account identifiers and profile details needed to authenticate you, such as your user ID, username, and avatar. If you request contributor access, we also receive and retain the verified email address associated with your Hugging Face account so we can review and communicate about your request."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Contributions and preferences."})," We collect information you submit or save, such as paper submissions and edits, bookmarks, display preferences, feedback, and communications with us. Material you submit to a public research page may be publicly visible."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Research assistant content."})," We collect your questions, conversation history, generated answers, citations, tool calls and results, and feedback about answers. Chats are private to your account unless you choose to create a share link; anyone with that link may be able to view the shared chat."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Provider and billing information."})," If you enable a model provider, we process the authorization or API credentials needed to make requests on your behalf. Hugging Face or another provider processes its own billing information under its terms. Papers With Code does not collect your payment-card details."]})]}),e.jsx("h3",{children:"Information collected automatically"}),e.jsx("p",{children:"We collect technical and usage information such as IP address, browser and device type, operating system, pages or features used, dates and times, referring pages, request identifiers, cookies, logs, and diagnostic data. For research-assistant requests, this may include the selected model, token and cost details, latency, errors, and other operational metadata."}),e.jsx("h3",{children:"Research assistant tracing"}),e.jsxs("p",{children:["To evaluate, debug, secure, and improve the research assistant, we use Langfuse to record traces. A trace may contain the complete text of your question and the assistant's answer, as well as tool inputs, tool outputs, retrieved research material, model details, usage data, and related operational metadata.",e.jsx("strong",{children:" This trace content is not redacted before it is sent to Langfuse."})]}),e.jsx("p",{children:"Papers With Code is designed for questions about research literature. Do not put passwords, API keys, confidential information, health or financial data, or other sensitive personal information in research-assistant prompts."})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"2. How we use information"}),e.jsx("p",{children:"We use information to:"}),e.jsxs("ul",{children:[e.jsx("li",{children:"provide, personalize, maintain, and operate the Service;"}),e.jsx("li",{children:"authenticate users and keep accounts and the Service secure;"}),e.jsx("li",{children:"run research-assistant requests and preserve conversation history;"}),e.jsx("li",{children:"measure performance, troubleshoot failures, and improve quality;"}),e.jsx("li",{children:"review contributions, prevent abuse, and enforce applicable terms;"}),e.jsx("li",{children:"communicate with you and respond to requests; and"}),e.jsx("li",{children:"comply with law and protect users, Hugging Face, and the public."})]})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"3. How we share information"}),e.jsx("p",{children:"We may share information in these circumstances:"}),e.jsxs("ul",{children:[e.jsxs("li",{children:[e.jsx("strong",{children:"Service providers."})," Vendors process information for hosting, authentication, analytics, observability, security, and support. These include Hugging Face services, Langfuse for research-assistant tracing, Plausible for website analytics, and infrastructure providers."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Model providers."})," Research-assistant content is sent to the model provider you use, such as Hugging Face Inference Providers or OpenRouter, so it can generate a response. That provider's privacy terms also apply to its processing."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Public and shared content."})," Contributions intended for public pages are public. A chat is disclosed through the Service when you create and distribute a share link."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Legal, safety, and corporate events."})," We may disclose information when reasonably necessary to comply with law, protect rights and safety, investigate abuse, or complete a merger, acquisition, financing, or transfer of assets."]})]}),e.jsx("p",{children:"We do not sell your personal information."})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"4. Cookies and analytics"}),e.jsx("p",{children:"We use cookies and similar storage when needed for sign-in, security, preferences, and operation of the Service. We also use Plausible to understand aggregate website usage. You can control cookies through your browser, but disabling necessary cookies may prevent account features from working."})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"5. Legal bases"}),e.jsx("p",{children:"Where applicable law requires a legal basis, we process information as needed to perform our agreement with you, with your consent, to comply with legal obligations, and for legitimate interests such as operating, securing, and improving the Service. You may withdraw consent where consent is the basis for processing, without affecting earlier processing."})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"6. Retention and deletion"}),e.jsx("p",{children:"Private chats are retained until you delete them, subject to limits of 100 active chats and 100 MB of chat data per user. Archiving hides a chat and frees active-chat quota but does not delete it. You may deliberately share an unlisted snapshot; deleting its private chat removes the durable transcript, workspace reference, and share link after deletion is verified. No dedicated private-chat export format is currently offered."}),e.jsx("p",{children:"We keep information for as long as reasonably needed for the purposes described here, including providing the Service, maintaining security and audit records, resolving disputes, and meeting legal obligations. Retention periods vary by data type and service provider. You can delete individual chats in the Service. Deletion may not immediately remove information from backups, security logs, or third-party systems where limited retention is required."})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"7. Security and international transfers"}),e.jsx("p",{children:"We use reasonable administrative, technical, and organizational safeguards, but no internet service can guarantee absolute security. We and our service providers may process information in the United States and other countries, which may have different data-protection laws from your country. Where required, we use appropriate safeguards for international transfers."})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"8. Your privacy rights"}),e.jsx("p",{children:"Depending on where you live, you may have rights to access, correct, delete, or receive a copy of your personal information; object to or restrict processing; withdraw consent; or appeal a decision about a request. You may also have the right to complain to a data-protection authority. We may need to verify your identity before fulfilling a request."})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"9. Children"}),e.jsx("p",{children:"The Service is not directed to children under 13, and we do not knowingly collect personal information from children under 13. If you believe a child has provided personal information, please contact us."})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"10. Changes to this policy"}),e.jsx("p",{children:"We may update this policy as the Service changes. We will post the revised policy here and update its effective date. If a change is material, we will provide additional notice when appropriate."})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"11. Contact us"}),e.jsxs("p",{children:["For questions or privacy requests, contact"," ",e.jsx("a",{href:"mailto:privacy@huggingface.co",children:"privacy@huggingface.co"}),". Please do not include passwords, API keys, or other sensitive credentials in your message."]})]})]}));export{n as default}; diff --git a/assets/RateLimitsView-B7_tunuS.js b/assets/RateLimitsView-DZkZ108W.js similarity index 87% rename from assets/RateLimitsView-B7_tunuS.js rename to assets/RateLimitsView-DZkZ108W.js index 1c94b0b25b315fb702295ee837e0a178375fa8ab..20fe0209a99cd1847cba0b24aa451135bedd356e 100644 --- a/assets/RateLimitsView-B7_tunuS.js +++ b/assets/RateLimitsView-DZkZ108W.js @@ -1 +1 @@ -import{j as e,B as t}from"./index-Cry0GNHI.js";import{u as s}from"./useQuery-DlAfMYOD.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,B as t}from"./index-Dt001B3A.js";import{u as s}from"./useQuery-DD4hUA6p.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/SavedPapersView-9_TEeoY-.js b/assets/SavedPapersView-0zMEoSEk.js similarity index 89% rename from assets/SavedPapersView-9_TEeoY-.js rename to assets/SavedPapersView-0zMEoSEk.js index 2f04f54a7a6575e453c28b53a48e059ce85469ae..55c32f109c81d79ba31eb0d772f4c7a07a86a686 100644 --- a/assets/SavedPapersView-9_TEeoY-.js +++ b/assets/SavedPapersView-0zMEoSEk.js @@ -1 +1 @@ -import{y as h,A as g,j as e,a1 as v,L as x,B as j}from"./index-Cry0GNHI.js";import{u as N}from"./useQuery-DlAfMYOD.js";import{T as b,P as f}from"./components-IPCTDA4d.js";import{S as r}from"./skeleton-LwsL9heH.js";import{A as k,a as y}from"./alert-BAHZ4i9D.js";import{t as w}from"./transform-b6MI1iSQ.js";import{s as A}from"./savedPapersAuth-DmaqaN2Y.js";import"./LatexTitle-CLc_16Sj.js";import"./katex.min-BSBacQyE.js";import"./papers-CrgFFrmi.js";import"./safeExternalHref-CkBrsh84.js";const z=()=>{var d,o;const{user:t,isLoading:u}=h(),a=N({queryKey:["my-bookmarks"],queryFn:()=>j.getBookmarks(),enabled:!!t,staleTime:30*1e3,refetchOnWindowFocus:!1}),n=a.error instanceof g&&a.error.code==="saved_papers_bucket_authorization_required",m=!!a.data&&!a.data.bucket_connected,c=()=>{window.location.assign(A())};return u?e.jsxs("div",{className:"page",children:[e.jsx(r,{className:"h-10 w-1/3 mb-4"}),e.jsx(r,{className:"h-6 w-1/2 mb-8"})]}):t?e.jsxs("div",{className:"page",children:[e.jsx("div",{className:"feed-header",children:e.jsxs("div",{children:[e.jsxs("h1",{className:"feed-title",children:["Saved ",e.jsx("em",{children:"Papers"})]}),e.jsxs("div",{className:"feed-subtitle",children:[(d=a.data)!=null&&d.count?`${a.data.count.toLocaleString()} saved · grouped by domain`:"Your bookmarked papers, grouped by domain.",(o=a.data)!=null&&o.bucket_connected?e.jsxs(e.Fragment,{children:[" · ",e.jsx("a",{href:`https://huggingface.co/buckets/${t.username}/pwc-saved-papers`,target:"_blank",rel:"noopener noreferrer",children:"Open your Hugging Face Bucket"})]}):null]})]})}),n?e.jsxs("div",{className:"saved-bucket-migration",children:[e.jsx("p",{children:"Your saved papers are still safe in Papers With Code. Approve Bucket access to copy them into a private Hugging Face Bucket that belongs to you."}),e.jsx("button",{type:"button",className:"hf-signin-btn",onClick:c,children:"Approve and migrate saved papers"})]}):a.error?e.jsx(k,{variant:"destructive",className:"mb-4",children:e.jsx(y,{children:"Failed to load your saved papers. Please try again."})}):null,m?e.jsxs("div",{className:"saved-bucket-migration",children:[e.jsxs("p",{children:[a.data.count?`Your ${a.data.count.toLocaleString()} saved ${a.data.count===1?"paper is":"papers are"} still available below. `:"When you save your first paper, ","Approve Bucket access to copy saved papers into a private Hugging Face Bucket that belongs to you. The existing data is kept until the copy is verified."]}),e.jsx("button",{type:"button",className:"hf-signin-btn",onClick:c,children:a.data.count?"Approve and migrate saved papers":"Use a Hugging Face Bucket"})]}):null,n||a.error?null:a.isLoading?e.jsx("div",{className:"paper-list",children:Array.from({length:4}).map((i,s)=>e.jsxs("div",{className:"paper-card",children:[e.jsx(r,{className:"h-[220px] w-[160px]"}),e.jsxs("div",{className:"paper-body",style:{flex:1,gap:12},children:[e.jsx(r,{className:"h-6 w-3/4"}),e.jsx(r,{className:"h-4 w-1/2"}),e.jsx(r,{className:"h-12 w-full"})]})]},s))}):!a.data||a.data.count===0?e.jsxs("div",{className:"no-results",children:["No saved papers yet."," ",e.jsx(x,{to:"/papers",className:"sidebar-link",style:{display:"inline"},children:"Browse papers →"})]}):a.data.areas.map(i=>e.jsxs("section",{className:"saved-area-section",children:[e.jsx("h2",{className:"saved-area-heading",children:i.name}),i.tasks.map(s=>{const l=s.papers.length;return e.jsxs("div",{className:"saved-task-block",children:[e.jsxs("div",{className:"saved-task-row",children:[s.slug?e.jsx(b,{slug:s.slug,label:s.name}):e.jsx("span",{className:"tag-chip",style:{background:"var(--surface)"},children:s.name}),e.jsxs("span",{className:"saved-task-count",children:[l," ",l===1?"paper":"papers"]})]}),e.jsx("div",{className:"paper-list",children:s.papers.map(p=>e.jsx(f,{paper:w(p),rank:1},p.id))})]},`task-${i.id??"other"}-${s.id??"untagged"}`)})]},`area-${i.id??"other"}`))]}):e.jsxs("div",{className:"page",children:[e.jsx("div",{className:"feed-header",children:e.jsxs("div",{children:[e.jsxs("h1",{className:"feed-title",children:["Saved ",e.jsx("em",{children:"Papers"})]}),e.jsx("div",{className:"feed-subtitle",children:"Sign in with Hugging Face to save papers and revisit them later."})]})}),e.jsx("div",{className:"saved-signin-panel",children:e.jsx(v,{returnTo:"/saved"})})]})};export{z as default}; +import{y as h,A as g,j as e,a1 as v,L as x,B as j}from"./index-Dt001B3A.js";import{u as N}from"./useQuery-DD4hUA6p.js";import{T as b,P as f}from"./components-DMT1vhIy.js";import{S as r}from"./skeleton-DkhIJUB4.js";import{A as k,a as y}from"./alert-Xa-AqUL5.js";import{t as w}from"./transform-DgCWw6nP.js";import{s as A}from"./savedPapersAuth-CR1Q1QTW.js";import"./LatexTitle-B651zAGR.js";import"./katex.min-BSBacQyE.js";import"./papers-KXkGPHI5.js";import"./safeExternalHref-CkBrsh84.js";const z=()=>{var d,o;const{user:t,isLoading:u}=h(),a=N({queryKey:["my-bookmarks"],queryFn:()=>j.getBookmarks(),enabled:!!t,staleTime:30*1e3,refetchOnWindowFocus:!1}),n=a.error instanceof g&&a.error.code==="saved_papers_bucket_authorization_required",m=!!a.data&&!a.data.bucket_connected,c=()=>{window.location.assign(A())};return u?e.jsxs("div",{className:"page",children:[e.jsx(r,{className:"h-10 w-1/3 mb-4"}),e.jsx(r,{className:"h-6 w-1/2 mb-8"})]}):t?e.jsxs("div",{className:"page",children:[e.jsx("div",{className:"feed-header",children:e.jsxs("div",{children:[e.jsxs("h1",{className:"feed-title",children:["Saved ",e.jsx("em",{children:"Papers"})]}),e.jsxs("div",{className:"feed-subtitle",children:[(d=a.data)!=null&&d.count?`${a.data.count.toLocaleString()} saved · grouped by domain`:"Your bookmarked papers, grouped by domain.",(o=a.data)!=null&&o.bucket_connected?e.jsxs(e.Fragment,{children:[" · ",e.jsx("a",{href:`https://huggingface.co/buckets/${t.username}/pwc-saved-papers`,target:"_blank",rel:"noopener noreferrer",children:"Open your Hugging Face Bucket"})]}):null]})]})}),n?e.jsxs("div",{className:"saved-bucket-migration",children:[e.jsx("p",{children:"Your saved papers are still safe in Papers With Code. Approve Bucket access to copy them into a private Hugging Face Bucket that belongs to you."}),e.jsx("button",{type:"button",className:"hf-signin-btn",onClick:c,children:"Approve and migrate saved papers"})]}):a.error?e.jsx(k,{variant:"destructive",className:"mb-4",children:e.jsx(y,{children:"Failed to load your saved papers. Please try again."})}):null,m?e.jsxs("div",{className:"saved-bucket-migration",children:[e.jsxs("p",{children:[a.data.count?`Your ${a.data.count.toLocaleString()} saved ${a.data.count===1?"paper is":"papers are"} still available below. `:"When you save your first paper, ","Approve Bucket access to copy saved papers into a private Hugging Face Bucket that belongs to you. The existing data is kept until the copy is verified."]}),e.jsx("button",{type:"button",className:"hf-signin-btn",onClick:c,children:a.data.count?"Approve and migrate saved papers":"Use a Hugging Face Bucket"})]}):null,n||a.error?null:a.isLoading?e.jsx("div",{className:"paper-list",children:Array.from({length:4}).map((i,s)=>e.jsxs("div",{className:"paper-card",children:[e.jsx(r,{className:"h-[220px] w-[160px]"}),e.jsxs("div",{className:"paper-body",style:{flex:1,gap:12},children:[e.jsx(r,{className:"h-6 w-3/4"}),e.jsx(r,{className:"h-4 w-1/2"}),e.jsx(r,{className:"h-12 w-full"})]})]},s))}):!a.data||a.data.count===0?e.jsxs("div",{className:"no-results",children:["No saved papers yet."," ",e.jsx(x,{to:"/papers",className:"sidebar-link",style:{display:"inline"},children:"Browse papers →"})]}):a.data.areas.map(i=>e.jsxs("section",{className:"saved-area-section",children:[e.jsx("h2",{className:"saved-area-heading",children:i.name}),i.tasks.map(s=>{const l=s.papers.length;return e.jsxs("div",{className:"saved-task-block",children:[e.jsxs("div",{className:"saved-task-row",children:[s.slug?e.jsx(b,{slug:s.slug,label:s.name}):e.jsx("span",{className:"tag-chip",style:{background:"var(--surface)"},children:s.name}),e.jsxs("span",{className:"saved-task-count",children:[l," ",l===1?"paper":"papers"]})]}),e.jsx("div",{className:"paper-list",children:s.papers.map(p=>e.jsx(f,{paper:w(p),rank:1},p.id))})]},`task-${i.id??"other"}-${s.id??"untagged"}`)})]},`area-${i.id??"other"}`))]}):e.jsxs("div",{className:"page",children:[e.jsx("div",{className:"feed-header",children:e.jsxs("div",{children:[e.jsxs("h1",{className:"feed-title",children:["Saved ",e.jsx("em",{children:"Papers"})]}),e.jsx("div",{className:"feed-subtitle",children:"Sign in with Hugging Face to save papers and revisit them later."})]})}),e.jsx("div",{className:"saved-signin-panel",children:e.jsx(v,{returnTo:"/saved"})})]})};export{z as default}; diff --git a/assets/SearchOverlay-DDzvZPvq.js b/assets/SearchOverlay-s2H4WBI8.js similarity index 92% rename from assets/SearchOverlay-DDzvZPvq.js rename to assets/SearchOverlay-s2H4WBI8.js index 2adb08f72d37e60939c20cae3c5c2bee09e5c555..51c7141f79b6a4b305055bdcc06233a20d79d366 100644 --- a/assets/SearchOverlay-DDzvZPvq.js +++ b/assets/SearchOverlay-s2H4WBI8.js @@ -1 +1 @@ -import{r as q,u as Q,z as P,i as $,j as e}from"./index-Cry0GNHI.js";import{u as m}from"./useQuery-DlAfMYOD.js";import{L as A}from"./LatexTitle-CLc_16Sj.js";import{c as g}from"./catalog-BjZE6R9z.js";import{p as K}from"./papers-CrgFFrmi.js";import{u as L}from"./useDebounce-Wb28akK_.js";import{c as S,h as z,d as D}from"./transform-b6MI1iSQ.js";import"./katex.min-BSBacQyE.js";const I=10,Z=({open:t,onClose:l})=>{var f,b,_,F;const x=q.useRef(null),E=Q(),[n,w]=P.useState(""),a=L(n,200),u=n.trim(),p=$();q.useEffect(()=>{var r;if(!t)return;(r=x.current)==null||r.focus();const s=R=>{R.key==="Escape"&&l()};return window.addEventListener("keydown",s),()=>window.removeEventListener("keydown",s)},[t,l]);const j=m({queryKey:["search-papers",a],queryFn:()=>K.search(a,1,I),enabled:t&&a.length>=2,staleTime:6e4}),y=m({queryKey:["search-tasks",a],queryFn:()=>g.listTasks({q:a,page_size:6}),enabled:t&&a.length>=2,staleTime:6e4}),k=m({queryKey:["search-methods",a],queryFn:()=>g.listMethods({q:a,page_size:6}),enabled:t&&a.length>=2,staleTime:6e4}),v=m({queryKey:["search-benchmarks",a],queryFn:()=>g.listDatasets({q:a,page_size:6}),enabled:t&&a.length>=2,staleTime:6e4});if(!t)return null;const i=((f=y.data)==null?void 0:f.results)||[],h=((b=k.data)==null?void 0:b.results)||[],o=((_=v.data)==null?void 0:_.results)||[],d=((F=j.data)==null?void 0:F.results)||[],C=j.isFetching||y.isFetching||k.isFetching||v.isFetching,T=i.length||d.length||h.length||o.length,c=s=>{l(),E(s)},N=()=>{const s=n.trim();s&&c(`/chat?q=${encodeURIComponent(s)}`)};return e.jsx("div",{className:"search-overlay",onClick:l,children:e.jsxs("div",{className:"search-modal",onClick:s=>s.stopPropagation(),children:[e.jsx("input",{ref:x,className:"search-modal-input",placeholder:"Search papers, tasks, methods, or benchmarks…",value:n,onChange:s=>w(s.target.value),onKeyDown:s=>{p&&s.key==="Enter"&&(s.preventDefault(),N())}}),e.jsxs("div",{className:"search-results",children:[p&&n.trim()&&e.jsxs("button",{type:"button",className:"search-ask-row",onClick:N,children:[e.jsx("span",{className:"search-ask-chip",children:"assistant"}),e.jsxs("span",{className:"search-ask-text",children:["Ask: “",n.trim(),"”"]}),e.jsx("kbd",{children:"↵"})]}),!a&&e.jsxs("div",{className:"search-empty",children:["Try “diffusion”, “object detection”, or an arXiv id.",p&&e.jsx("span",{className:"search-empty-sub",children:"Press Enter to ask the assistant"})]}),a&&!C&&!T&&e.jsxs("div",{className:"search-empty",children:['No matches for "',n,'"']}),i.length>0&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"search-section-label",children:["Tasks · ",i.length]}),i.map(s=>{const r=S(z(s.slug||""));return e.jsxs("div",{className:"search-result-tag",onClick:()=>c(`/tasks/${s.slug}`),children:[e.jsx("span",{className:"dot",style:{width:6,height:6,borderRadius:"50%",background:r.dot}}),e.jsx("span",{className:"name",children:D(s.name,s.slug)}),s.paper_count!=null&&e.jsxs("span",{className:"count",children:[s.paper_count," papers"]})]},s.id)})]}),h.length>0&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"search-section-label",children:["Methods · ",h.length]}),h.map(s=>e.jsxs("div",{className:"search-result-tag",onClick:()=>c(`/methods/${s.slug||s.id}`),children:[e.jsx("span",{style:{fontFamily:"var(--mono)",fontWeight:600},children:s.name}),s.paper_count!=null&&e.jsxs("span",{className:"count",children:[s.paper_count," papers"]})]},s.id))]}),o.length>0&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"search-section-label",children:["Benchmarks · ",o.length]}),o.map(s=>e.jsxs("div",{className:"search-result-tag",onClick:()=>c(`/benchmark/${s.slug||s.id}`),children:[e.jsx("span",{className:"name",children:s.name}),s.paper_count!=null&&s.paper_count>0&&e.jsxs("span",{className:"count",children:[s.paper_count," entries"]})]},s.id))]}),d.length>0&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"search-section-label",children:["Papers · ",d.length]}),d.map(s=>{var r;return e.jsxs("div",{className:"search-result",onClick:()=>c(`/paper/${s.arxiv_id||s.id}`),children:[e.jsx("div",{className:"search-result-title",children:e.jsx(A,{title:s.title})}),e.jsxs("div",{className:"search-result-meta",children:[e.jsx("span",{children:s.arxiv_id?`arXiv:${s.arxiv_id}`:"External resource"}),((r=s.authors)==null?void 0:r[0])&&e.jsxs(e.Fragment,{children:[e.jsx("span",{children:"·"}),e.jsxs("span",{children:[s.authors[0],s.authors.length>1?" et al.":""]})]}),s.citation_count!=null&&e.jsxs(e.Fragment,{children:[e.jsx("span",{children:"·"}),e.jsxs("span",{children:["↑ ",s.citation_count.toLocaleString()]})]})]})]},s.id)})]}),u.length>=2&&e.jsxs("button",{type:"button",className:"search-view-all-row",onClick:()=>c(`/papers?search=${encodeURIComponent(u)}`),children:["View all paper results for “",u,"”"]})]})]})})};export{Z as default}; +import{r as q,u as Q,z as P,i as $,j as e}from"./index-Dt001B3A.js";import{u as m}from"./useQuery-DD4hUA6p.js";import{L as A}from"./LatexTitle-B651zAGR.js";import{c as g}from"./catalog-BOpSeTzm.js";import{p as K}from"./papers-KXkGPHI5.js";import{u as L}from"./useDebounce-DaqbxkO6.js";import{c as S,h as z,d as D}from"./transform-DgCWw6nP.js";import"./katex.min-BSBacQyE.js";const I=10,Z=({open:t,onClose:l})=>{var f,b,_,F;const x=q.useRef(null),E=Q(),[n,w]=P.useState(""),a=L(n,200),u=n.trim(),p=$();q.useEffect(()=>{var r;if(!t)return;(r=x.current)==null||r.focus();const s=R=>{R.key==="Escape"&&l()};return window.addEventListener("keydown",s),()=>window.removeEventListener("keydown",s)},[t,l]);const j=m({queryKey:["search-papers",a],queryFn:()=>K.search(a,1,I),enabled:t&&a.length>=2,staleTime:6e4}),y=m({queryKey:["search-tasks",a],queryFn:()=>g.listTasks({q:a,page_size:6}),enabled:t&&a.length>=2,staleTime:6e4}),k=m({queryKey:["search-methods",a],queryFn:()=>g.listMethods({q:a,page_size:6}),enabled:t&&a.length>=2,staleTime:6e4}),v=m({queryKey:["search-benchmarks",a],queryFn:()=>g.listDatasets({q:a,page_size:6}),enabled:t&&a.length>=2,staleTime:6e4});if(!t)return null;const i=((f=y.data)==null?void 0:f.results)||[],h=((b=k.data)==null?void 0:b.results)||[],o=((_=v.data)==null?void 0:_.results)||[],d=((F=j.data)==null?void 0:F.results)||[],C=j.isFetching||y.isFetching||k.isFetching||v.isFetching,T=i.length||d.length||h.length||o.length,c=s=>{l(),E(s)},N=()=>{const s=n.trim();s&&c(`/chat?q=${encodeURIComponent(s)}`)};return e.jsx("div",{className:"search-overlay",onClick:l,children:e.jsxs("div",{className:"search-modal",onClick:s=>s.stopPropagation(),children:[e.jsx("input",{ref:x,className:"search-modal-input",placeholder:"Search papers, tasks, methods, or benchmarks…",value:n,onChange:s=>w(s.target.value),onKeyDown:s=>{p&&s.key==="Enter"&&(s.preventDefault(),N())}}),e.jsxs("div",{className:"search-results",children:[p&&n.trim()&&e.jsxs("button",{type:"button",className:"search-ask-row",onClick:N,children:[e.jsx("span",{className:"search-ask-chip",children:"assistant"}),e.jsxs("span",{className:"search-ask-text",children:["Ask: “",n.trim(),"”"]}),e.jsx("kbd",{children:"↵"})]}),!a&&e.jsxs("div",{className:"search-empty",children:["Try “diffusion”, “object detection”, or an arXiv id.",p&&e.jsx("span",{className:"search-empty-sub",children:"Press Enter to ask the assistant"})]}),a&&!C&&!T&&e.jsxs("div",{className:"search-empty",children:['No matches for "',n,'"']}),i.length>0&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"search-section-label",children:["Tasks · ",i.length]}),i.map(s=>{const r=S(z(s.slug||""));return e.jsxs("div",{className:"search-result-tag",onClick:()=>c(`/tasks/${s.slug}`),children:[e.jsx("span",{className:"dot",style:{width:6,height:6,borderRadius:"50%",background:r.dot}}),e.jsx("span",{className:"name",children:D(s.name,s.slug)}),s.paper_count!=null&&e.jsxs("span",{className:"count",children:[s.paper_count," papers"]})]},s.id)})]}),h.length>0&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"search-section-label",children:["Methods · ",h.length]}),h.map(s=>e.jsxs("div",{className:"search-result-tag",onClick:()=>c(`/methods/${s.slug||s.id}`),children:[e.jsx("span",{style:{fontFamily:"var(--mono)",fontWeight:600},children:s.name}),s.paper_count!=null&&e.jsxs("span",{className:"count",children:[s.paper_count," papers"]})]},s.id))]}),o.length>0&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"search-section-label",children:["Benchmarks · ",o.length]}),o.map(s=>e.jsxs("div",{className:"search-result-tag",onClick:()=>c(`/benchmark/${s.slug||s.id}`),children:[e.jsx("span",{className:"name",children:s.name}),s.paper_count!=null&&s.paper_count>0&&e.jsxs("span",{className:"count",children:[s.paper_count," entries"]})]},s.id))]}),d.length>0&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"search-section-label",children:["Papers · ",d.length]}),d.map(s=>{var r;return e.jsxs("div",{className:"search-result",onClick:()=>c(`/paper/${s.arxiv_id||s.id}`),children:[e.jsx("div",{className:"search-result-title",children:e.jsx(A,{title:s.title})}),e.jsxs("div",{className:"search-result-meta",children:[e.jsx("span",{children:s.arxiv_id?`arXiv:${s.arxiv_id}`:"External resource"}),((r=s.authors)==null?void 0:r[0])&&e.jsxs(e.Fragment,{children:[e.jsx("span",{children:"·"}),e.jsxs("span",{children:[s.authors[0],s.authors.length>1?" et al.":""]})]}),s.citation_count!=null&&e.jsxs(e.Fragment,{children:[e.jsx("span",{children:"·"}),e.jsxs("span",{children:["↑ ",s.citation_count.toLocaleString()]})]})]})]},s.id)})]}),u.length>=2&&e.jsxs("button",{type:"button",className:"search-view-all-row",onClick:()=>c(`/papers?search=${encodeURIComponent(u)}`),children:["View all paper results for “",u,"”"]})]})]})})};export{Z as default}; diff --git a/assets/SettingsView-bS736GLu.js b/assets/SettingsView-dDA_sdmT.js similarity index 97% rename from assets/SettingsView-bS736GLu.js rename to assets/SettingsView-dDA_sdmT.js index c55902fd9658c93a5369f5dff85df01e48a9f5d0..d31439817ec546e99a684c60906f2f54b051b428 100644 --- a/assets/SettingsView-bS736GLu.js +++ b/assets/SettingsView-dDA_sdmT.js @@ -1,4 +1,4 @@ -import{d as _,y as ee,f as se,ah as ne,i as te,z as c,g as ae,j as e,a1 as v,A as Q}from"./index-Cry0GNHI.js";import{u as L}from"./useQuery-DlAfMYOD.js";import{u as y}from"./useMutation-C5zYPeQC.js";import{S as B}from"./switch-rXZTYMbm.js";import{c as r}from"./chat-FW6HqAah.js";import{f as ie,D as le}from"./latexPlainText-DI8YEXVe.js";import{a as oe,u as re,r as ce,O as C}from"./openrouter-CKgqF9nS.js";import{E as Y}from"./external-link-DIcR472K.js";import"./index-IfmCq-bY.js";/** +import{d as _,y as ee,f as se,ah as ne,i as te,z as c,g as ae,j as e,a1 as v,A as Q}from"./index-Dt001B3A.js";import{u as L}from"./useQuery-DD4hUA6p.js";import{u as y}from"./useMutation-BSdRNizq.js";import{S as B}from"./switch-CqcBxohM.js";import{c as r}from"./chat-98y1Ufht.js";import{f as ie,D as le}from"./latexPlainText-DI8YEXVe.js";import{a as oe,u as re,r as ce,O as C}from"./openrouter-BTt-GpWV.js";import{E as Y}from"./external-link-DdqhM_eg.js";import"./index-i7UOsfxV.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/SharedChatView-BF8QaAJZ.js b/assets/SharedChatView-BH5hBJDO.js similarity index 84% rename from assets/SharedChatView-BF8QaAJZ.js rename to assets/SharedChatView-BH5hBJDO.js index 6985092f110617ff06f7c7ddb698987f4684cebc..3aa4bbe646deb57e2da86baeceffbd4c1d7299f1 100644 --- a/assets/SharedChatView-BF8QaAJZ.js +++ b/assets/SharedChatView-BH5hBJDO.js @@ -1 +1 @@ -import{c as f,u as x,r as h,j as e,b as g}from"./index-Cry0GNHI.js";import{u as v}from"./useQuery-DlAfMYOD.js";import{A as j,a as b,C as y,U as S,b as k}from"./ArtifactWorkspace-BDAI0t7b.js";import{C as m,d as w,p as N,q as C,g as q}from"./chatLaunch-DpNrK5mV.js";import"./katex.min-BSBacQyE.js";import"./hover-card-CbDqfS2l.js";import"./github-Bll0eXy5.js";import"./github-D38gLg_l.js";import"./PaperPreviewLink-CPKVU1Zw.js";import"./index-D7CE3jjK.js";import"./papers-CrgFFrmi.js";import"./chat-FW6HqAah.js";import"./file-text-DXZT7Qxr.js";import"./useMutation-C5zYPeQC.js";import"./external-link-DIcR472K.js";import"./chevron-down-DR8n8lNp.js";const _=({detail:i})=>{const[d,l]=h.useState(()=>N(i)),p=h.useMemo(()=>{const t={};for(const c of d)for(const n of c.blocks??[])if(n.kind==="tool")for(const r of n.results??[])t[r.route_id]=r;return t},[d]),u=(t,c)=>{l(n=>n.map(r=>{var a;return r.id!==t?r:{...r,blocks:(a=r.blocks)==null?void 0:a.map((s,o)=>o===c&&(s.kind==="reasoning"||s.kind==="tool")?{...s,open:!s.open}:s)}}))};return e.jsx("div",{className:"shared-chat-transcript",children:d.map(t=>t.role==="user"?e.jsx(S,{id:t.id,text:t.text??"",paperMentions:t.paperMentions??[],paperSelection:t.paperSelection},t.id):e.jsx(k,{msg:t,papers:p,onToggleBlock:u},t.id))})},G=()=>{const{shareId:i=""}=f(),d=x(),l=g(),[p,u]=h.useState(60),t=v({queryKey:["shared-chat",i],queryFn:()=>q(i),retry:(r,a)=>!(a instanceof m&&a.status===404)&&r<1});h.useEffect(()=>{const r=document.title,a=document.head.querySelector('meta[name="robots"]'),s=a==null?void 0:a.content,o=a??document.createElement("meta");return o.name="robots",o.content="noindex,nofollow",a||document.head.appendChild(o),document.title="Shared conversation",()=>{document.title=r,a?a.content=s??"":o.remove()}},[]),h.useLayoutEffect(()=>{const r=document.querySelector(".app-header");if(!r)return;const a=()=>u(r.offsetHeight);a();const s=new ResizeObserver(a);return s.observe(r),()=>s.disconnect()},[]);const c=r=>{C(r,void 0,{autoSend:!1}),d("/chat")},n=t.error instanceof m&&t.error.status===404;return t.isLoading?e.jsxs("div",{className:"shared-chat-state",role:"status",children:[e.jsx(w,{})," Loading shared conversation…"]}):n?e.jsxs("div",{className:"shared-chat-state shared-chat-not-found",children:[e.jsx("h1",{children:"Shared conversation not found"}),e.jsx("p",{children:"This link is invalid or is no longer available."})]}):t.isError||!t.data?e.jsxs("div",{className:"shared-chat-state",role:"alert",children:[e.jsx("h1",{children:"Couldn’t load this conversation"}),e.jsx("p",{children:"Please check your connection and try again."}),e.jsx("button",{type:"button",onClick:()=>void t.refetch(),children:"Try again"})]}):e.jsx(j,{workspaceKey:`share:${i}:${t.data.updated_at}`,autoOpenOnMount:!0,children:e.jsxs("div",{className:"shared-chat-page",style:{height:`calc(100dvh - ${p}px)`},children:[e.jsxs("div",{className:"shared-chat-heading",children:[e.jsx("h1",{children:"Shared conversation"}),l&&e.jsx("span",{className:"chat-staging-badge",children:"Staging"})]}),e.jsx(b,{variant:"shared",children:e.jsxs("div",{className:"shared-chat-content","data-testid":"shared-conversation-pane",children:[e.jsx(_,{detail:t.data},t.data.updated_at),t.data.model_label&&e.jsxs("div",{className:"shared-chat-attribution",children:[e.jsxs("span",{children:["Generated with ",t.data.model_label]}),t.data.model_provider==="huggingface"&&e.jsxs("span",{children:["Powered by ",e.jsx("span",{"aria-hidden":"true",children:"🤗"})," ",e.jsx("a",{href:"https://huggingface.co/docs/inference-providers/en/index",target:"_blank",rel:"noreferrer",children:"Inference Providers"})]}),t.data.model_provider==="openrouter"&&e.jsxs("span",{children:["Powered by ",e.jsx("a",{href:"https://openrouter.ai",target:"_blank",rel:"noreferrer",children:"OpenRouter"})]}),t.data.model_provider==="openai"&&e.jsx("span",{children:"Powered by OpenAI"})]}),e.jsxs("section",{className:"shared-chat-fresh","aria-labelledby":"shared-chat-fresh-title",children:[e.jsx("h2",{id:"shared-chat-fresh-title",children:"Start a new conversation"}),e.jsx("p",{children:"Your new question starts with an empty context."}),l&&e.jsxs("div",{className:"shared-chat-access-note",role:"note",children:[e.jsx("strong",{children:"Limited staging preview."})," Starting a chat is available only to approved Hugging Face users."]}),e.jsx(y,{onSend:r=>c(r.text),placeholder:"Ask a new research question…"})]})]})})]})})};export{G as default}; +import{c as f,u as x,r as h,j as e,b as g}from"./index-Dt001B3A.js";import{u as v}from"./useQuery-DD4hUA6p.js";import{A as j,a as b,C as y,U as S,b as k}from"./ArtifactWorkspace-CMp03Kf3.js";import{C as m,d as w,p as N,q as C,g as q}from"./chatLaunch-C8mQqa_z.js";import"./katex.min-BSBacQyE.js";import"./hover-card-C7JmPdFo.js";import"./github-oD2gKV6Z.js";import"./github-TRZ4i_h7.js";import"./PaperPreviewLink-CCwg7dvd.js";import"./index-Byizcq9V.js";import"./papers-KXkGPHI5.js";import"./chat-98y1Ufht.js";import"./file-text-BXknBxd6.js";import"./useMutation-BSdRNizq.js";import"./external-link-DdqhM_eg.js";import"./chevron-down-BXCXby03.js";const _=({detail:i})=>{const[d,l]=h.useState(()=>N(i)),p=h.useMemo(()=>{const t={};for(const c of d)for(const n of c.blocks??[])if(n.kind==="tool")for(const r of n.results??[])t[r.route_id]=r;return t},[d]),u=(t,c)=>{l(n=>n.map(r=>{var a;return r.id!==t?r:{...r,blocks:(a=r.blocks)==null?void 0:a.map((s,o)=>o===c&&(s.kind==="reasoning"||s.kind==="tool")?{...s,open:!s.open}:s)}}))};return e.jsx("div",{className:"shared-chat-transcript",children:d.map(t=>t.role==="user"?e.jsx(S,{id:t.id,text:t.text??"",paperMentions:t.paperMentions??[],paperSelection:t.paperSelection},t.id):e.jsx(k,{msg:t,papers:p,onToggleBlock:u},t.id))})},G=()=>{const{shareId:i=""}=f(),d=x(),l=g(),[p,u]=h.useState(60),t=v({queryKey:["shared-chat",i],queryFn:()=>q(i),retry:(r,a)=>!(a instanceof m&&a.status===404)&&r<1});h.useEffect(()=>{const r=document.title,a=document.head.querySelector('meta[name="robots"]'),s=a==null?void 0:a.content,o=a??document.createElement("meta");return o.name="robots",o.content="noindex,nofollow",a||document.head.appendChild(o),document.title="Shared conversation",()=>{document.title=r,a?a.content=s??"":o.remove()}},[]),h.useLayoutEffect(()=>{const r=document.querySelector(".app-header");if(!r)return;const a=()=>u(r.offsetHeight);a();const s=new ResizeObserver(a);return s.observe(r),()=>s.disconnect()},[]);const c=r=>{C(r,void 0,{autoSend:!1}),d("/chat")},n=t.error instanceof m&&t.error.status===404;return t.isLoading?e.jsxs("div",{className:"shared-chat-state",role:"status",children:[e.jsx(w,{})," Loading shared conversation…"]}):n?e.jsxs("div",{className:"shared-chat-state shared-chat-not-found",children:[e.jsx("h1",{children:"Shared conversation not found"}),e.jsx("p",{children:"This link is invalid or is no longer available."})]}):t.isError||!t.data?e.jsxs("div",{className:"shared-chat-state",role:"alert",children:[e.jsx("h1",{children:"Couldn’t load this conversation"}),e.jsx("p",{children:"Please check your connection and try again."}),e.jsx("button",{type:"button",onClick:()=>void t.refetch(),children:"Try again"})]}):e.jsx(j,{workspaceKey:`share:${i}:${t.data.updated_at}`,autoOpenOnMount:!0,children:e.jsxs("div",{className:"shared-chat-page",style:{height:`calc(100dvh - ${p}px)`},children:[e.jsxs("div",{className:"shared-chat-heading",children:[e.jsx("h1",{children:"Shared conversation"}),l&&e.jsx("span",{className:"chat-staging-badge",children:"Staging"})]}),e.jsx(b,{variant:"shared",children:e.jsxs("div",{className:"shared-chat-content","data-testid":"shared-conversation-pane",children:[e.jsx(_,{detail:t.data},t.data.updated_at),t.data.model_label&&e.jsxs("div",{className:"shared-chat-attribution",children:[e.jsxs("span",{children:["Generated with ",t.data.model_label]}),t.data.model_provider==="huggingface"&&e.jsxs("span",{children:["Powered by ",e.jsx("span",{"aria-hidden":"true",children:"🤗"})," ",e.jsx("a",{href:"https://huggingface.co/docs/inference-providers/en/index",target:"_blank",rel:"noreferrer",children:"Inference Providers"})]}),t.data.model_provider==="openrouter"&&e.jsxs("span",{children:["Powered by ",e.jsx("a",{href:"https://openrouter.ai",target:"_blank",rel:"noreferrer",children:"OpenRouter"})]}),t.data.model_provider==="openai"&&e.jsx("span",{children:"Powered by OpenAI"})]}),e.jsxs("section",{className:"shared-chat-fresh","aria-labelledby":"shared-chat-fresh-title",children:[e.jsx("h2",{id:"shared-chat-fresh-title",children:"Start a new conversation"}),e.jsx("p",{children:"Your new question starts with an empty context."}),l&&e.jsxs("div",{className:"shared-chat-access-note",role:"note",children:[e.jsx("strong",{children:"Limited staging preview."})," Starting a chat is available only to approved Hugging Face users."]}),e.jsx(y,{onSend:r=>c(r.text),placeholder:"Ask a new research question…"})]})]})})]})})};export{G as default}; diff --git a/assets/SignInToEditDialog-D0_3y_qM.js b/assets/SignInToEditDialog-BkrM2MwG.js similarity index 96% rename from assets/SignInToEditDialog-D0_3y_qM.js rename to assets/SignInToEditDialog-BkrM2MwG.js index 2c49e5d28a023f048f71117e677e49939a310902..530942d52e2b5af0cd8f09ae52a0c730ea076ba0 100644 --- a/assets/SignInToEditDialog-D0_3y_qM.js +++ b/assets/SignInToEditDialog-BkrM2MwG.js @@ -1,4 +1,4 @@ -import{d as ne,r as a,j as e,$ as ve,q as be,a0 as fe,e as je,X as ye,C as Ne,a1 as we}from"./index-Cry0GNHI.js";import{B as L}from"./button-QVzubJLr.js";import{I as d,T as Ie}from"./textarea-nAbEj-Sd.js";import{D as oe,a as le,b as ce,c as de,d as me,e as Se}from"./dialog-Dedt-uqk.js";import{u as _e}from"./useMutation-C5zYPeQC.js";import{s as v,p as b}from"./submissions-CVaVzZAk.js";import{L as De}from"./loader-circle-C6beazQX.js";/** +import{d as ne,r as a,j as e,$ as ve,q as be,a0 as fe,e as je,X as ye,C as Ne,a1 as we}from"./index-Dt001B3A.js";import{B as L}from"./button-BL-YLDFJ.js";import{I as d,T as Ie}from"./textarea-BLDaXAi6.js";import{D as oe,a as le,b as ce,c as de,d as me,e as Se}from"./dialog-Bs8pVXcH.js";import{u as _e}from"./useMutation-BSdRNizq.js";import{s as v,p as b}from"./submissions-IHYlc8kE.js";import{L as De}from"./loader-circle-DD7s_n4z.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/StagingAccessRequestView-CL10uP0d.js b/assets/StagingAccessRequestView-Ceal3OTX.js similarity index 95% rename from assets/StagingAccessRequestView-CL10uP0d.js rename to assets/StagingAccessRequestView-Ceal3OTX.js index 236935f3cf7131eb70a79fdd74ee39e421b4d806..0bdcc113e74736145510435eb219525cc7a2fbcc 100644 --- a/assets/StagingAccessRequestView-CL10uP0d.js +++ b/assets/StagingAccessRequestView-Ceal3OTX.js @@ -1 +1 @@ -import{y as m,z as a,j as e,a1 as g,aJ as p}from"./index-Cry0GNHI.js";import{C as j}from"./circle-check-CFRMmRHN.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{y as m,z as a,j as e,a1 as g,aJ as p}from"./index-Dt001B3A.js";import{C as j}from"./circle-check-BxcyjDCC.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-BxcDg24H.js b/assets/SubmissionsDashboard-jDE9mCsU.js similarity index 98% rename from assets/SubmissionsDashboard-BxcDg24H.js rename to assets/SubmissionsDashboard-jDE9mCsU.js index 0e10a1095fa2daa4c373cb52358d8ce930abc544..d455fdd2dffbf58c7cc3fcc5691b3ca6f88920fb 100644 --- a/assets/SubmissionsDashboard-BxcDg24H.js +++ b/assets/SubmissionsDashboard-jDE9mCsU.js @@ -1,4 +1,4 @@ -var be=s=>{throw TypeError(s)};var ee=(s,t,i)=>t.has(s)||be("Cannot "+i);var f=(s,t,i)=>(ee(s,t,"read from private field"),i?i.call(s):t.get(s)),R=(s,t,i)=>t.has(s)?be("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(s):t.set(s,i),k=(s,t,i,n)=>(ee(s,t,"write to private field"),n?n.call(s,i):t.set(s,i),i),O=(s,t,i)=>(ee(s,t,"access private method"),i);import{am as Ce,an as te,ao as Re,ap as Oe,g as Ne,r as z,aq as Me,d as qe,j as e,M as Ae,z as w,q as I,y as Te,e as ke,ar as Fe,as as Ie,at as Qe}from"./index-Cry0GNHI.js";import{Q as we,b as Le,c as Ue,e as De,d as $e,f as ze,s as ge,g as Be,h as He,u as ie}from"./useQuery-DlAfMYOD.js";import{u as xe}from"./useMutation-C5zYPeQC.js";import{c as Q}from"./catalog-BjZE6R9z.js";import{s as $}from"./safeExternalHref-CkBrsh84.js";import{p as Ke}from"./papers-CrgFFrmi.js";import{s as H}from"./submissions-CVaVzZAk.js";import{R as Pe,S as Je,C as Ge}from"./shield-alert-CjZsQbM-.js";import{L as K}from"./loader-circle-C6beazQX.js";import{C as Ve}from"./circle-check-CFRMmRHN.js";function je(s,t){const i=new Set(t);return s.filter(n=>!i.has(n))}function We(s,t,i){const n=s.slice(0);return n[t]=i,n}var U,E,D,L,C,F,P,J,G,V,N,ne,re,Se,ae,oe,le,_e,Ye=(_e=class extends Ce{constructor(t,i,n){super();R(this,N);R(this,U);R(this,E);R(this,D);R(this,L);R(this,C);R(this,F);R(this,P);R(this,J);R(this,G);R(this,V,[]);k(this,U,t),k(this,L,n),k(this,D,[]),k(this,C,[]),k(this,E,[]),this.setQueries(i)}onSubscribe(){this.listeners.size===1&&f(this,C).forEach(t=>{t.subscribe(i=>{O(this,N,oe).call(this,t,i)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,f(this,C).forEach(t=>{t.destroy()})}setQueries(t,i){k(this,D,t),k(this,L,i),te.batch(()=>{const n=f(this,C),a=O(this,N,ae).call(this,f(this,D));a.forEach(r=>r.observer.setOptions(r.defaultedQueryOptions));const l=a.map(r=>r.observer),o=l.map(r=>r.getCurrentResult()),d=n.length!==l.length,p=l.some((r,m)=>r!==n[m]),b=d||p,x=b?!0:o.some((r,m)=>{const c=f(this,E)[m];return!c||!Re(r,c)});!b&&!x||(b&&(k(this,V,a),k(this,C,l)),k(this,E,o),this.hasListeners()&&(b&&(je(n,l).forEach(r=>{r.destroy()}),je(l,n).forEach(r=>{r.subscribe(m=>{O(this,N,oe).call(this,r,m)})})),O(this,N,le).call(this)))})}getCurrentResult(){return f(this,E)}getQueries(){return f(this,C).map(t=>t.getCurrentQuery())}getObservers(){return f(this,C)}getOptimisticResult(t,i){const n=O(this,N,ae).call(this,t),a=n.map(o=>o.observer.getOptimisticResult(o.defaultedQueryOptions)),l=n.map(o=>o.defaultedQueryOptions.queryHash);return[a,o=>O(this,N,re).call(this,o??a,i,l),()=>O(this,N,ne).call(this,a,n)]}},U=new WeakMap,E=new WeakMap,D=new WeakMap,L=new WeakMap,C=new WeakMap,F=new WeakMap,P=new WeakMap,J=new WeakMap,G=new WeakMap,V=new WeakMap,N=new WeakSet,ne=function(t,i){return i.map((n,a)=>{const l=t[a];return n.defaultedQueryOptions.notifyOnChangeProps?l:n.observer.trackResult(l,o=>{i.forEach(d=>{d.observer.trackProp(o)})})})},re=function(t,i,n){if(i){const a=f(this,G),l=n!==void 0&&a!==void 0&&(a.length!==n.length||n.some((o,d)=>o!==a[d]));return(!f(this,F)||f(this,E)!==f(this,J)||l||i!==f(this,P))&&(k(this,P,i),k(this,J,f(this,E)),n!==void 0&&k(this,G,n),k(this,F,Oe(f(this,F),i(t)))),f(this,F)}return t},Se=function(){var t;return((t=f(this,L))==null?void 0:t.combine)!==void 0&&f(this,C).some((i,n)=>{var a;return i.options.suspense&&((a=f(this,E)[n])==null?void 0:a.data)===void 0})},ae=function(t){const i=new Map;f(this,C).forEach(a=>{const l=a.options.queryHash;if(!l)return;const o=i.get(l);o?o.push(a):i.set(l,[a])});const n=[];return t.forEach(a=>{var p;const l=f(this,U).defaultQueryOptions(a),d=((p=i.get(l.queryHash))==null?void 0:p.shift())??new we(f(this,U),l);n.push({defaultedQueryOptions:l,observer:d})}),n},oe=function(t,i){const n=f(this,C).indexOf(t);n!==-1&&(k(this,E,We(f(this,E),n,i)),O(this,N,le).call(this))},le=function(){var t;if(this.hasListeners()){const i=O(this,N,ne).call(this,f(this,E),f(this,V)),n=O(this,N,Se).call(this),a=f(this,F),l=n?a:O(this,N,re).call(this,i,(t=f(this,L))==null?void 0:t.combine);(n||a!==l)&&te.batch(()=>{this.listeners.forEach(o=>{o(f(this,E))})})}},_e);function X({queries:s,...t},i){const n=Ne(),a=Le(),l=Ue(),o=z.useMemo(()=>s.map(u=>{const j=n.defaultQueryOptions(u);return j._optimisticResults=a?"isRestoring":"optimistic",j}),[s,n,a]);o.forEach(u=>{De(u);const j=n.getQueryCache().get(u.queryHash);$e(u,l,j)}),ze(l);const[d]=z.useState(()=>new Ye(n,o,t)),[p,b,x]=d.getOptimisticResult(o,t.combine),r=!a&&t.subscribed!==!1;z.useSyncExternalStore(z.useCallback(u=>r?d.subscribe(te.batchCalls(u)):Me,[d,r]),()=>d.getCurrentResult(),()=>d.getCurrentResult()),z.useEffect(()=>{d.setQueries(o,t)},[o,t,d]);const c=p.some((u,j)=>ge(o[j],u))?p.flatMap((u,j)=>{const S=o[j];if(S&&ge(S,u)){const M=new we(n,S);return Be(S,M,l)}return[]}):[];if(c.length>0)throw Promise.all(c);const h=p.find((u,j)=>{const S=o[j];return S&&He({result:u,errorResetBoundary:l,throwOnError:S.throwOnError,query:n.getQueryCache().get(S.queryHash),suspense:S.suspense})});if(h!=null&&h.error)throw h.error;return b(x())}/** +var be=s=>{throw TypeError(s)};var ee=(s,t,i)=>t.has(s)||be("Cannot "+i);var f=(s,t,i)=>(ee(s,t,"read from private field"),i?i.call(s):t.get(s)),R=(s,t,i)=>t.has(s)?be("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(s):t.set(s,i),k=(s,t,i,n)=>(ee(s,t,"write to private field"),n?n.call(s,i):t.set(s,i),i),O=(s,t,i)=>(ee(s,t,"access private method"),i);import{am as Ce,an as te,ao as Re,ap as Oe,g as Ne,r as z,aq as Me,d as qe,j as e,M as Ae,z as w,q as I,y as Te,e as ke,ar as Fe,as as Ie,at as Qe}from"./index-Dt001B3A.js";import{Q as we,b as Le,c as Ue,e as De,d as $e,f as ze,s as ge,g as Be,h as He,u as ie}from"./useQuery-DD4hUA6p.js";import{u as xe}from"./useMutation-BSdRNizq.js";import{c as Q}from"./catalog-BOpSeTzm.js";import{s as $}from"./safeExternalHref-CkBrsh84.js";import{p as Ke}from"./papers-KXkGPHI5.js";import{s as H}from"./submissions-IHYlc8kE.js";import{R as Pe,S as Je,C as Ge}from"./shield-alert-BzyltW9X.js";import{L as K}from"./loader-circle-DD7s_n4z.js";import{C as Ve}from"./circle-check-BxcyjDCC.js";function je(s,t){const i=new Set(t);return s.filter(n=>!i.has(n))}function We(s,t,i){const n=s.slice(0);return n[t]=i,n}var U,E,D,L,C,F,P,J,G,V,N,ne,re,Se,ae,oe,le,_e,Ye=(_e=class extends Ce{constructor(t,i,n){super();R(this,N);R(this,U);R(this,E);R(this,D);R(this,L);R(this,C);R(this,F);R(this,P);R(this,J);R(this,G);R(this,V,[]);k(this,U,t),k(this,L,n),k(this,D,[]),k(this,C,[]),k(this,E,[]),this.setQueries(i)}onSubscribe(){this.listeners.size===1&&f(this,C).forEach(t=>{t.subscribe(i=>{O(this,N,oe).call(this,t,i)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,f(this,C).forEach(t=>{t.destroy()})}setQueries(t,i){k(this,D,t),k(this,L,i),te.batch(()=>{const n=f(this,C),a=O(this,N,ae).call(this,f(this,D));a.forEach(r=>r.observer.setOptions(r.defaultedQueryOptions));const l=a.map(r=>r.observer),o=l.map(r=>r.getCurrentResult()),d=n.length!==l.length,p=l.some((r,m)=>r!==n[m]),b=d||p,x=b?!0:o.some((r,m)=>{const c=f(this,E)[m];return!c||!Re(r,c)});!b&&!x||(b&&(k(this,V,a),k(this,C,l)),k(this,E,o),this.hasListeners()&&(b&&(je(n,l).forEach(r=>{r.destroy()}),je(l,n).forEach(r=>{r.subscribe(m=>{O(this,N,oe).call(this,r,m)})})),O(this,N,le).call(this)))})}getCurrentResult(){return f(this,E)}getQueries(){return f(this,C).map(t=>t.getCurrentQuery())}getObservers(){return f(this,C)}getOptimisticResult(t,i){const n=O(this,N,ae).call(this,t),a=n.map(o=>o.observer.getOptimisticResult(o.defaultedQueryOptions)),l=n.map(o=>o.defaultedQueryOptions.queryHash);return[a,o=>O(this,N,re).call(this,o??a,i,l),()=>O(this,N,ne).call(this,a,n)]}},U=new WeakMap,E=new WeakMap,D=new WeakMap,L=new WeakMap,C=new WeakMap,F=new WeakMap,P=new WeakMap,J=new WeakMap,G=new WeakMap,V=new WeakMap,N=new WeakSet,ne=function(t,i){return i.map((n,a)=>{const l=t[a];return n.defaultedQueryOptions.notifyOnChangeProps?l:n.observer.trackResult(l,o=>{i.forEach(d=>{d.observer.trackProp(o)})})})},re=function(t,i,n){if(i){const a=f(this,G),l=n!==void 0&&a!==void 0&&(a.length!==n.length||n.some((o,d)=>o!==a[d]));return(!f(this,F)||f(this,E)!==f(this,J)||l||i!==f(this,P))&&(k(this,P,i),k(this,J,f(this,E)),n!==void 0&&k(this,G,n),k(this,F,Oe(f(this,F),i(t)))),f(this,F)}return t},Se=function(){var t;return((t=f(this,L))==null?void 0:t.combine)!==void 0&&f(this,C).some((i,n)=>{var a;return i.options.suspense&&((a=f(this,E)[n])==null?void 0:a.data)===void 0})},ae=function(t){const i=new Map;f(this,C).forEach(a=>{const l=a.options.queryHash;if(!l)return;const o=i.get(l);o?o.push(a):i.set(l,[a])});const n=[];return t.forEach(a=>{var p;const l=f(this,U).defaultQueryOptions(a),d=((p=i.get(l.queryHash))==null?void 0:p.shift())??new we(f(this,U),l);n.push({defaultedQueryOptions:l,observer:d})}),n},oe=function(t,i){const n=f(this,C).indexOf(t);n!==-1&&(k(this,E,We(f(this,E),n,i)),O(this,N,le).call(this))},le=function(){var t;if(this.hasListeners()){const i=O(this,N,ne).call(this,f(this,E),f(this,V)),n=O(this,N,Se).call(this),a=f(this,F),l=n?a:O(this,N,re).call(this,i,(t=f(this,L))==null?void 0:t.combine);(n||a!==l)&&te.batch(()=>{this.listeners.forEach(o=>{o(f(this,E))})})}},_e);function X({queries:s,...t},i){const n=Ne(),a=Le(),l=Ue(),o=z.useMemo(()=>s.map(u=>{const j=n.defaultQueryOptions(u);return j._optimisticResults=a?"isRestoring":"optimistic",j}),[s,n,a]);o.forEach(u=>{De(u);const j=n.getQueryCache().get(u.queryHash);$e(u,l,j)}),ze(l);const[d]=z.useState(()=>new Ye(n,o,t)),[p,b,x]=d.getOptimisticResult(o,t.combine),r=!a&&t.subscribed!==!1;z.useSyncExternalStore(z.useCallback(u=>r?d.subscribe(te.batchCalls(u)):Me,[d,r]),()=>d.getCurrentResult(),()=>d.getCurrentResult()),z.useEffect(()=>{d.setQueries(o,t)},[o,t,d]);const c=p.some((u,j)=>ge(o[j],u))?p.flatMap((u,j)=>{const S=o[j];if(S&&ge(S,u)){const M=new we(n,S);return Be(S,M,l)}return[]}):[];if(c.length>0)throw Promise.all(c);const h=p.find((u,j)=>{const S=o[j];return S&&He({result:u,errorResetBoundary:l,throwOnError:S.throwOnError,query:n.getQueryCache().get(S.queryHash),suspense:S.suspense})});if(h!=null&&h.error)throw h.error;return b(x())}/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/SubmitView-CEm_w3o3.js b/assets/SubmitView-K0VXsMx6.js similarity index 95% rename from assets/SubmitView-CEm_w3o3.js rename to assets/SubmitView-K0VXsMx6.js index 659419e0d1bc2e179b99fbe51c2de452b580dd89..09accfda194c22f0e4010e80623345b25a232948 100644 --- a/assets/SubmitView-CEm_w3o3.js +++ b/assets/SubmitView-K0VXsMx6.js @@ -1 +1 @@ -import{u as D,g as k,e as C,y as E,z as d,j as e,x as z}from"./index-Cry0GNHI.js";import{u as L}from"./useMutation-C5zYPeQC.js";import{A as F,a as X}from"./alert-BAHZ4i9D.js";import{B as _}from"./button-QVzubJLr.js";import{I as g,T as q}from"./textarea-nAbEj-Sd.js";import{p as N}from"./papers-CrgFFrmi.js";const v="pwc:paper-submit-draft",U=/^\d{4}\.\d{4,5}(v\d+)?$/i,$=/^[a-z-]+(\.[A-Z]{2})?\/\d{7}$/,O=/^https?:\/\/(?:www\.)?arxiv\.org\//i;function A(n){const i=n.trim();return i?U.test(i)||$.test(i)||O.test(i)?"arxiv":/^https?:\/\//i.test(i)?"external":"arxiv":"empty"}function B(n,i){const a=n.trim();if(A(a)==="arxiv")return/^https?:\/\//i.test(a)?{source_url:a}:{arxiv_id:a};const o={source_url:a},l=i.title.trim();l&&(o.title=l);const p=i.abstract.trim();p&&(o.abstract=p);const u=i.authors.split(/[,\n]/).map(m=>m.trim()).filter(Boolean);return u.length>0&&(o.authors=u),i.datePublished&&(o.date_published=i.datePublished),o}function J(n){var a;const i=n;if(!i)return"Submission failed";if(i.response)try{const s=JSON.parse(i.response);if(typeof s.detail=="string")return s.detail;if((a=s.detail)!=null&&a.message)return`${s.detail.message} See ${s.detail.help||"/rate-limits"} for help.`}catch{return i.response}return i.message||"Submission failed"}const Y=()=>{const n=D(),i=k(),{toast:a}=C(),{user:s,isLoading:o}=E(),[l,p]=d.useState(""),[u,m]=d.useState(""),[f,S]=d.useState(""),[x,j]=d.useState(""),[y,w]=d.useState(""),[I,b]=d.useState(null);d.useEffect(()=>{const t=sessionStorage.getItem(v);if(t){sessionStorage.removeItem(v);try{const r=JSON.parse(t);p(r.input??""),m(r.title??""),S(r.abstract??""),j(r.authors??""),w(r.datePublished??"")}catch{}}},[]);const h=A(l),R=h==="external",c=L({mutationFn:t=>N.submit(t),onSuccess:t=>{if(t.pending_review){a({title:"Submission queued for review",description:"No source page was fetched and no catalog row was changed."}),c.reset();return}i.invalidateQueries({queryKey:["papers"],refetchType:"none"}),i.invalidateQueries({queryKey:["papers-infinite"],refetchType:"none"}),i.invalidateQueries({queryKey:["trending-papers"],refetchType:"none"});const r=t.refreshed&&t.created&&t.latest_version;a({title:r?`Paper updated to ${t.latest_version}`:t.created?"Paper submitted":"Paper already indexed",description:r?"Opening the updated paper page…":t.created?"Opening the paper page…":"Opening the existing paper page…"}),t.route_identifier&&n(`/paper/${t.route_identifier}`)},onError:t=>{b(J(t))}}),T=t=>{if(t.preventDefault(),b(null),h==="empty"){b("Enter an arXiv ID or a paper URL to submit.");return}if(!s){sessionStorage.setItem(v,JSON.stringify({input:l,title:u,abstract:f,authors:x,datePublished:y}));const P=z("/api/v1/auth/hf/login");window.location.assign(`${P}?return_to=${encodeURIComponent(window.location.href)}`);return}const r=B(l,{title:u,abstract:f,authors:x,datePublished:y});c.mutate(r)};return e.jsxs("div",{className:"page",style:{maxWidth:720},children:[e.jsx("h1",{className:"detail-title",children:"Submit a paper"}),e.jsxs("p",{style:{fontFamily:"var(--serif)",color:"var(--ink-soft)",marginTop:12,lineHeight:1.55},children:["Index an arXiv paper or propose a non-arXiv paper (blog post, technical report, model release page). External papers enter the submission queue and appear only after review."," ",e.jsx("a",{href:"/rate-limits",children:"Read the submission and rate-limit policy."})]}),e.jsxs("form",{onSubmit:T,style:{marginTop:28,display:"grid",gap:20},children:[e.jsxs("div",{style:{display:"grid",gap:8},children:[e.jsx("label",{htmlFor:"submit-input",style:{fontWeight:600,fontSize:14},children:"arXiv ID or paper URL"}),e.jsx(g,{id:"submit-input",value:l,onChange:t=>p(t.target.value),placeholder:"2501.12345 · https://arxiv.org/abs/2501.12345 · https://blog.example.com/release",autoFocus:!0,required:!0}),e.jsx("div",{style:{fontSize:12,color:"var(--ink-soft)",minHeight:18},children:h==="arxiv"?"Detected: arXiv paper — metadata will be fetched automatically.":h==="external"?"Detected: external URL — we'll extract metadata and you can override below.":"Paste an arXiv ID like 2501.12345 or any paper/blog URL."})]}),R&&e.jsxs("fieldset",{style:{border:"1px solid var(--rule)",borderRadius:8,padding:"16px 20px 20px",display:"grid",gap:16},children:[e.jsx("legend",{style:{padding:"0 8px",fontSize:12,color:"var(--ink-soft)",textTransform:"uppercase",letterSpacing:.5},children:"External paper details (optional)"}),e.jsxs("div",{style:{display:"grid",gap:8},children:[e.jsx("label",{htmlFor:"submit-title",style:{fontSize:13},children:"Title"}),e.jsx(g,{id:"submit-title",value:u,onChange:t=>m(t.target.value),placeholder:"Leave blank to extract automatically"})]}),e.jsxs("div",{style:{display:"grid",gap:8},children:[e.jsx("label",{htmlFor:"submit-abstract",style:{fontSize:13},children:"Abstract or summary"}),e.jsx(q,{id:"submit-abstract",value:f,onChange:t=>S(t.target.value),rows:4,placeholder:"Leave blank to extract automatically"})]}),e.jsxs("div",{style:{display:"grid",gap:8},children:[e.jsx("label",{htmlFor:"submit-authors",style:{fontSize:13},children:"Authors (comma-separated)"}),e.jsx(g,{id:"submit-authors",value:x,onChange:t=>j(t.target.value),placeholder:"Jane Smith, John Doe"})]}),e.jsxs("div",{style:{display:"grid",gap:8},children:[e.jsx("label",{htmlFor:"submit-date",style:{fontSize:13},children:"Publication date"}),e.jsx(g,{id:"submit-date",type:"date",value:y,onChange:t=>w(t.target.value),style:{maxWidth:220}}),e.jsx("div",{style:{fontSize:12,color:"var(--ink-soft)"},children:"Required only if we cannot infer a date from the page."})]})]}),I&&e.jsx(F,{variant:"destructive",children:e.jsx(X,{children:I})}),e.jsxs("div",{style:{display:"flex",gap:12,alignItems:"center"},children:[e.jsx(_,{type:"submit",disabled:c.isPending||o,children:o?"Checking sign-in…":c.isPending?"Submitting…":s?"Submit paper":"Sign in to submit"}),e.jsx(_,{type:"button",variant:"outline",onClick:()=>n(-1),disabled:c.isPending,children:"Cancel"})]})]})]})};export{Y as default}; +import{u as D,g as k,e as C,y as E,z as d,j as e,x as z}from"./index-Dt001B3A.js";import{u as L}from"./useMutation-BSdRNizq.js";import{A as F,a as X}from"./alert-Xa-AqUL5.js";import{B as _}from"./button-BL-YLDFJ.js";import{I as g,T as q}from"./textarea-BLDaXAi6.js";import{p as N}from"./papers-KXkGPHI5.js";const v="pwc:paper-submit-draft",U=/^\d{4}\.\d{4,5}(v\d+)?$/i,$=/^[a-z-]+(\.[A-Z]{2})?\/\d{7}$/,O=/^https?:\/\/(?:www\.)?arxiv\.org\//i;function A(n){const i=n.trim();return i?U.test(i)||$.test(i)||O.test(i)?"arxiv":/^https?:\/\//i.test(i)?"external":"arxiv":"empty"}function B(n,i){const a=n.trim();if(A(a)==="arxiv")return/^https?:\/\//i.test(a)?{source_url:a}:{arxiv_id:a};const o={source_url:a},l=i.title.trim();l&&(o.title=l);const p=i.abstract.trim();p&&(o.abstract=p);const u=i.authors.split(/[,\n]/).map(m=>m.trim()).filter(Boolean);return u.length>0&&(o.authors=u),i.datePublished&&(o.date_published=i.datePublished),o}function J(n){var a;const i=n;if(!i)return"Submission failed";if(i.response)try{const s=JSON.parse(i.response);if(typeof s.detail=="string")return s.detail;if((a=s.detail)!=null&&a.message)return`${s.detail.message} See ${s.detail.help||"/rate-limits"} for help.`}catch{return i.response}return i.message||"Submission failed"}const Y=()=>{const n=D(),i=k(),{toast:a}=C(),{user:s,isLoading:o}=E(),[l,p]=d.useState(""),[u,m]=d.useState(""),[f,S]=d.useState(""),[x,j]=d.useState(""),[y,w]=d.useState(""),[I,b]=d.useState(null);d.useEffect(()=>{const t=sessionStorage.getItem(v);if(t){sessionStorage.removeItem(v);try{const r=JSON.parse(t);p(r.input??""),m(r.title??""),S(r.abstract??""),j(r.authors??""),w(r.datePublished??"")}catch{}}},[]);const h=A(l),R=h==="external",c=L({mutationFn:t=>N.submit(t),onSuccess:t=>{if(t.pending_review){a({title:"Submission queued for review",description:"No source page was fetched and no catalog row was changed."}),c.reset();return}i.invalidateQueries({queryKey:["papers"],refetchType:"none"}),i.invalidateQueries({queryKey:["papers-infinite"],refetchType:"none"}),i.invalidateQueries({queryKey:["trending-papers"],refetchType:"none"});const r=t.refreshed&&t.created&&t.latest_version;a({title:r?`Paper updated to ${t.latest_version}`:t.created?"Paper submitted":"Paper already indexed",description:r?"Opening the updated paper page…":t.created?"Opening the paper page…":"Opening the existing paper page…"}),t.route_identifier&&n(`/paper/${t.route_identifier}`)},onError:t=>{b(J(t))}}),T=t=>{if(t.preventDefault(),b(null),h==="empty"){b("Enter an arXiv ID or a paper URL to submit.");return}if(!s){sessionStorage.setItem(v,JSON.stringify({input:l,title:u,abstract:f,authors:x,datePublished:y}));const P=z("/api/v1/auth/hf/login");window.location.assign(`${P}?return_to=${encodeURIComponent(window.location.href)}`);return}const r=B(l,{title:u,abstract:f,authors:x,datePublished:y});c.mutate(r)};return e.jsxs("div",{className:"page",style:{maxWidth:720},children:[e.jsx("h1",{className:"detail-title",children:"Submit a paper"}),e.jsxs("p",{style:{fontFamily:"var(--serif)",color:"var(--ink-soft)",marginTop:12,lineHeight:1.55},children:["Index an arXiv paper or propose a non-arXiv paper (blog post, technical report, model release page). External papers enter the submission queue and appear only after review."," ",e.jsx("a",{href:"/rate-limits",children:"Read the submission and rate-limit policy."})]}),e.jsxs("form",{onSubmit:T,style:{marginTop:28,display:"grid",gap:20},children:[e.jsxs("div",{style:{display:"grid",gap:8},children:[e.jsx("label",{htmlFor:"submit-input",style:{fontWeight:600,fontSize:14},children:"arXiv ID or paper URL"}),e.jsx(g,{id:"submit-input",value:l,onChange:t=>p(t.target.value),placeholder:"2501.12345 · https://arxiv.org/abs/2501.12345 · https://blog.example.com/release",autoFocus:!0,required:!0}),e.jsx("div",{style:{fontSize:12,color:"var(--ink-soft)",minHeight:18},children:h==="arxiv"?"Detected: arXiv paper — metadata will be fetched automatically.":h==="external"?"Detected: external URL — we'll extract metadata and you can override below.":"Paste an arXiv ID like 2501.12345 or any paper/blog URL."})]}),R&&e.jsxs("fieldset",{style:{border:"1px solid var(--rule)",borderRadius:8,padding:"16px 20px 20px",display:"grid",gap:16},children:[e.jsx("legend",{style:{padding:"0 8px",fontSize:12,color:"var(--ink-soft)",textTransform:"uppercase",letterSpacing:.5},children:"External paper details (optional)"}),e.jsxs("div",{style:{display:"grid",gap:8},children:[e.jsx("label",{htmlFor:"submit-title",style:{fontSize:13},children:"Title"}),e.jsx(g,{id:"submit-title",value:u,onChange:t=>m(t.target.value),placeholder:"Leave blank to extract automatically"})]}),e.jsxs("div",{style:{display:"grid",gap:8},children:[e.jsx("label",{htmlFor:"submit-abstract",style:{fontSize:13},children:"Abstract or summary"}),e.jsx(q,{id:"submit-abstract",value:f,onChange:t=>S(t.target.value),rows:4,placeholder:"Leave blank to extract automatically"})]}),e.jsxs("div",{style:{display:"grid",gap:8},children:[e.jsx("label",{htmlFor:"submit-authors",style:{fontSize:13},children:"Authors (comma-separated)"}),e.jsx(g,{id:"submit-authors",value:x,onChange:t=>j(t.target.value),placeholder:"Jane Smith, John Doe"})]}),e.jsxs("div",{style:{display:"grid",gap:8},children:[e.jsx("label",{htmlFor:"submit-date",style:{fontSize:13},children:"Publication date"}),e.jsx(g,{id:"submit-date",type:"date",value:y,onChange:t=>w(t.target.value),style:{maxWidth:220}}),e.jsx("div",{style:{fontSize:12,color:"var(--ink-soft)"},children:"Required only if we cannot infer a date from the page."})]})]}),I&&e.jsx(F,{variant:"destructive",children:e.jsx(X,{children:I})}),e.jsxs("div",{style:{display:"flex",gap:12,alignItems:"center"},children:[e.jsx(_,{type:"submit",disabled:c.isPending||o,children:o?"Checking sign-in…":c.isPending?"Submitting…":s?"Submit paper":"Sign in to submit"}),e.jsx(_,{type:"button",variant:"outline",onClick:()=>n(-1),disabled:c.isPending,children:"Cancel"})]})]})]})};export{Y as default}; diff --git a/assets/TagBrowseView-Cl8JYE1w.js b/assets/TagBrowseView-D0CN98ak.js similarity index 95% rename from assets/TagBrowseView-Cl8JYE1w.js rename to assets/TagBrowseView-D0CN98ak.js index 5c8f1ac949db2e5458a31f8bfea573dc66734848..ebc0f60954ab84f6529b3c4aff2c5ac9e4c2dc6a 100644 --- a/assets/TagBrowseView-Cl8JYE1w.js +++ b/assets/TagBrowseView-D0CN98ak.js @@ -1,4 +1,4 @@ -import{d as je,r as h,k as X,j as e,h as O,V as _e,m as ve,P as ss,p as Ne,l as ke,W as as,z as j,Y as ts,t as rs,q as ee,L as k,c as ns,u as os,a as is,f as cs,M as ls}from"./index-Cry0GNHI.js";import{u as be}from"./useQuery-DlAfMYOD.js";import{P as ds,M as ms}from"./components-IPCTDA4d.js";import{B as ps}from"./BenchmarkTrendSparkline-BJ3H66bV.js";import{r as hs,u as us,P as gs,a as xs,w as bs}from"./paperDateRange-DQDDTCHP.js";import{M as Y}from"./MarkdownText-CzUmjuOY.js";import{c as fe}from"./catalog-BjZE6R9z.js";import{s as fs}from"./slug-BpH-Nkvz.js";import{d as H,t as js}from"./transform-b6MI1iSQ.js";import{c as _s}from"./usePapers-B86z4_CJ.js";import{S as q}from"./skeleton-LwsL9heH.js";import{A as vs,a as Ns}from"./alert-BAHZ4i9D.js";import{C as ks}from"./chevron-down-DR8n8lNp.js";import{G as ws}from"./github-D38gLg_l.js";import"./LatexTitle-CLc_16Sj.js";import"./katex.min-BSBacQyE.js";import"./papers-CrgFFrmi.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-C_By4VBc.js";import"./PaperPreviewLink-CPKVU1Zw.js";import"./index-D7CE3jjK.js";import"./hover-card-CbDqfS2l.js";import"./useInfiniteQuery-C8Q6ynv2.js";/** +import{d as je,r as h,k as X,j as e,h as O,V as _e,m as ve,P as ss,p as Ne,l as ke,W as as,z as j,Y as ts,t as rs,q as ee,L as k,c as ns,u as os,a as is,f as cs,M as ls}from"./index-Dt001B3A.js";import{u as be}from"./useQuery-DD4hUA6p.js";import{P as ds,M as ms}from"./components-DMT1vhIy.js";import{B as ps}from"./BenchmarkTrendSparkline-B9CQXlVT.js";import{r as hs,u as us,P as gs,a as xs,w as bs}from"./paperDateRange-BJ29xsSE.js";import{M as Y}from"./MarkdownText-DeuWKnsZ.js";import{c as fe}from"./catalog-BOpSeTzm.js";import{s as fs}from"./slug-BpH-Nkvz.js";import{d as H,t as js}from"./transform-DgCWw6nP.js";import{c as _s}from"./usePapers-qkM3n2JN.js";import{S as q}from"./skeleton-DkhIJUB4.js";import{A as vs,a as Ns}from"./alert-Xa-AqUL5.js";import{C as ks}from"./chevron-down-BXCXby03.js";import{G as ws}from"./github-TRZ4i_h7.js";import"./LatexTitle-B651zAGR.js";import"./katex.min-BSBacQyE.js";import"./papers-KXkGPHI5.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-DDOhCeb4.js";import"./PaperPreviewLink-CCwg7dvd.js";import"./index-Byizcq9V.js";import"./hover-card-C7JmPdFo.js";import"./useInfiniteQuery-CgAOxB5d.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/TagsIndexView-p9VyqRM6.js b/assets/TagsIndexView-6sOdH8Ff.js similarity index 82% rename from assets/TagsIndexView-p9VyqRM6.js rename to assets/TagsIndexView-6sOdH8Ff.js index 920d785592b6879fa320bab13857565077d9b9bd..b99948ca0be5f4d54abd9310e33bded513e2d5b4 100644 --- a/assets/TagsIndexView-p9VyqRM6.js +++ b/assets/TagsIndexView-6sOdH8Ff.js @@ -1 +1 @@ -import{r as m,j as s,L as p}from"./index-Cry0GNHI.js";import{u as h}from"./useQuery-DlAfMYOD.js";import{c as g}from"./catalog-BjZE6R9z.js";import{c as x,h as f,d as u}from"./transform-b6MI1iSQ.js";import{s as j}from"./slug-BpH-Nkvz.js";import{S as d}from"./skeleton-LwsL9heH.js";import{A as y,a as k}from"./alert-BAHZ4i9D.js";import{T as v}from"./TaxonomySuggestionTile-Dlf-wpJa.js";import"./SignInToEditDialog-D0_3y_qM.js";import"./button-QVzubJLr.js";import"./textarea-nAbEj-Sd.js";import"./dialog-Dedt-uqk.js";import"./useMutation-C5zYPeQC.js";import"./submissions-CVaVzZAk.js";import"./loader-circle-C6beazQX.js";const N=r=>(r==null?void 0:r.trim().toLowerCase().replace(/[\s_]+/g,"-"))??"",I=()=>{const r=h({queryKey:["areas-with-tasks"],queryFn:()=>g.areasWithTasks(),staleTime:6e5}),o=m.useMemo(()=>{if(!r.data)return[];const e={general:0,vision:1,video:2,language:3,audio:4,other:5},a=n=>e[N(n)]??999;return[...r.data.results].sort((n,t)=>{const i=a(n.name),l=a(t.name);return i!==l?i-l:n.name.localeCompare(t.name)})},[r.data]),c=m.useMemo(()=>o.reduce((e,a)=>e+a.tasks.length,0),[o]);return r.error?s.jsx("div",{className:"page",children:s.jsx(y,{variant:"destructive",children:s.jsx(k,{children:"Failed to load taxonomy. Please try again."})})}):s.jsxs("div",{className:"page",children:[s.jsx("div",{className:"feed-header",children:s.jsxs("div",{children:[s.jsxs("h1",{className:"feed-title",children:["All ",s.jsx("em",{children:"Domains"})]}),s.jsx("div",{className:"feed-subtitle",children:"Browse research by area. Click any task to see trending work."})]})}),r.isLoading?s.jsx("div",{style:{display:"flex",flexDirection:"column",gap:32},children:Array.from({length:4}).map((e,a)=>s.jsxs("div",{children:[s.jsx(d,{className:"h-8 w-1/3 mb-4"}),s.jsx("div",{className:"tag-grid",children:Array.from({length:6}).map((n,t)=>s.jsx(d,{className:"h-24"},t))})]},a))}):o.map(e=>{const a=e.tasks;if(a.length===0)return null;const n=a.reduce((t,i)=>t+(i.paper_count||0),0);return s.jsxs("section",{id:`area-${j(e.name)}`,style:{marginBottom:48},children:[s.jsxs("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:24,paddingBottom:12,borderBottom:"1px solid var(--hairline-strong)"},children:[s.jsxs("div",{children:[s.jsx("h2",{style:{fontFamily:"var(--serif)",fontSize:26,fontWeight:500,letterSpacing:"-0.02em",marginBottom:4},children:e.name}),e.description&&s.jsx("div",{style:{fontFamily:"var(--serif)",fontStyle:"italic",fontSize:13,color:"var(--ink-soft)"},children:e.description})]}),s.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",whiteSpace:"nowrap"},children:[a.length," ",a.length===1?"task":"tasks"," · ",n.toLocaleString()," papers"]})]}),s.jsxs("div",{className:"tag-grid",children:[a.map(t=>{const i=t.slug||"",l=x(f(i));return s.jsxs(p,{to:`/tasks/${i}`,className:"tag-cell",children:[s.jsxs("div",{className:"name",children:[s.jsx("span",{className:"dot",style:{background:l.dot}}),u(t.name,i)]}),s.jsx("div",{className:"meta",children:s.jsxs("span",{children:[(t.paper_count??0).toLocaleString()," papers"]})})]},t.id)}),s.jsx(v,{kind:"task"})]})]},e.id)}),c>0&&s.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",marginTop:24},children:[c," tasks across ",o.filter(e=>e.tasks.length>0).length," areas."]})]})};export{I as default}; +import{r as m,j as s,L as p}from"./index-Dt001B3A.js";import{u as h}from"./useQuery-DD4hUA6p.js";import{c as g}from"./catalog-BOpSeTzm.js";import{c as x,h as f,d as u}from"./transform-DgCWw6nP.js";import{s as j}from"./slug-BpH-Nkvz.js";import{S as d}from"./skeleton-DkhIJUB4.js";import{A as y,a as k}from"./alert-Xa-AqUL5.js";import{T as v}from"./TaxonomySuggestionTile-BEuXuGw1.js";import"./SignInToEditDialog-BkrM2MwG.js";import"./button-BL-YLDFJ.js";import"./textarea-BLDaXAi6.js";import"./dialog-Bs8pVXcH.js";import"./useMutation-BSdRNizq.js";import"./submissions-IHYlc8kE.js";import"./loader-circle-DD7s_n4z.js";const N=r=>(r==null?void 0:r.trim().toLowerCase().replace(/[\s_]+/g,"-"))??"",I=()=>{const r=h({queryKey:["areas-with-tasks"],queryFn:()=>g.areasWithTasks(),staleTime:6e5}),o=m.useMemo(()=>{if(!r.data)return[];const e={general:0,vision:1,video:2,language:3,audio:4,other:5},a=n=>e[N(n)]??999;return[...r.data.results].sort((n,t)=>{const i=a(n.name),l=a(t.name);return i!==l?i-l:n.name.localeCompare(t.name)})},[r.data]),c=m.useMemo(()=>o.reduce((e,a)=>e+a.tasks.length,0),[o]);return r.error?s.jsx("div",{className:"page",children:s.jsx(y,{variant:"destructive",children:s.jsx(k,{children:"Failed to load taxonomy. Please try again."})})}):s.jsxs("div",{className:"page",children:[s.jsx("div",{className:"feed-header",children:s.jsxs("div",{children:[s.jsxs("h1",{className:"feed-title",children:["All ",s.jsx("em",{children:"Domains"})]}),s.jsx("div",{className:"feed-subtitle",children:"Browse research by area. Click any task to see trending work."})]})}),r.isLoading?s.jsx("div",{style:{display:"flex",flexDirection:"column",gap:32},children:Array.from({length:4}).map((e,a)=>s.jsxs("div",{children:[s.jsx(d,{className:"h-8 w-1/3 mb-4"}),s.jsx("div",{className:"tag-grid",children:Array.from({length:6}).map((n,t)=>s.jsx(d,{className:"h-24"},t))})]},a))}):o.map(e=>{const a=e.tasks;if(a.length===0)return null;const n=a.reduce((t,i)=>t+(i.paper_count||0),0);return s.jsxs("section",{id:`area-${j(e.name)}`,style:{marginBottom:48},children:[s.jsxs("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:24,paddingBottom:12,borderBottom:"1px solid var(--hairline-strong)"},children:[s.jsxs("div",{children:[s.jsx("h2",{style:{fontFamily:"var(--serif)",fontSize:26,fontWeight:500,letterSpacing:"-0.02em",marginBottom:4},children:e.name}),e.description&&s.jsx("div",{style:{fontFamily:"var(--serif)",fontStyle:"italic",fontSize:13,color:"var(--ink-soft)"},children:e.description})]}),s.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",whiteSpace:"nowrap"},children:[a.length," ",a.length===1?"task":"tasks"," · ",n.toLocaleString()," papers"]})]}),s.jsxs("div",{className:"tag-grid",children:[a.map(t=>{const i=t.slug||"",l=x(f(i));return s.jsxs(p,{to:`/tasks/${i}`,className:"tag-cell",children:[s.jsxs("div",{className:"name",children:[s.jsx("span",{className:"dot",style:{background:l.dot}}),u(t.name,i)]}),s.jsx("div",{className:"meta",children:s.jsxs("span",{children:[(t.paper_count??0).toLocaleString()," papers"]})})]},t.id)}),s.jsx(v,{kind:"task"})]})]},e.id)}),c>0&&s.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",marginTop:24},children:[c," tasks across ",o.filter(e=>e.tasks.length>0).length," areas."]})]})};export{I as default}; diff --git a/assets/TaxonomySuggestionTile-Dlf-wpJa.js b/assets/TaxonomySuggestionTile-BEuXuGw1.js similarity index 83% rename from assets/TaxonomySuggestionTile-Dlf-wpJa.js rename to assets/TaxonomySuggestionTile-BEuXuGw1.js index 30fa687e07139e6bf8d4d5ac86ac92c9a1999721..a0ce157eb8a4ffd12fdd486c24291544221d6e7a 100644 --- a/assets/TaxonomySuggestionTile-Dlf-wpJa.js +++ b/assets/TaxonomySuggestionTile-BEuXuGw1.js @@ -1 +1 @@ -import{y as u,r as o,j as e}from"./index-Cry0GNHI.js";import{P as c,S as m,a as p}from"./SignInToEditDialog-D0_3y_qM.js";function h({kind:s}){const{user:a}=u(),[i,n]=o.useState(!1),[l,t]=o.useState(!1),r=`Suggest a new ${s}...`,g=()=>{a?n(!0):t(!0)};return e.jsxs(e.Fragment,{children:[e.jsxs("button",{type:"button",className:"tag-cell taxonomy-suggestion-cell",onClick:g,children:[e.jsxs("div",{className:"name",children:[e.jsx(c,{className:"taxonomy-suggestion-icon","aria-hidden":"true"}),r]}),e.jsx("div",{className:"meta",children:e.jsx("span",{children:"Propose an addition"})})]}),e.jsx(m,{open:i,onOpenChange:n,kind:s}),e.jsx(p,{open:l,onOpenChange:t,sectionLabel:`${s}s`,returnTo:typeof window<"u"?window.location.pathname:`/${s}s`,taxonomySuggestion:!0})]})}export{h as T}; +import{y as u,r as o,j as e}from"./index-Dt001B3A.js";import{P as c,S as m,a as p}from"./SignInToEditDialog-BkrM2MwG.js";function h({kind:s}){const{user:a}=u(),[i,n]=o.useState(!1),[l,t]=o.useState(!1),r=`Suggest a new ${s}...`,g=()=>{a?n(!0):t(!0)};return e.jsxs(e.Fragment,{children:[e.jsxs("button",{type:"button",className:"tag-cell taxonomy-suggestion-cell",onClick:g,children:[e.jsxs("div",{className:"name",children:[e.jsx(c,{className:"taxonomy-suggestion-icon","aria-hidden":"true"}),r]}),e.jsx("div",{className:"meta",children:e.jsx("span",{children:"Propose an addition"})})]}),e.jsx(m,{open:i,onOpenChange:n,kind:s}),e.jsx(p,{open:l,onOpenChange:t,sectionLabel:`${s}s`,returnTo:typeof window<"u"?window.location.pathname:`/${s}s`,taxonomySuggestion:!0})]})}export{h as T}; diff --git a/assets/TrendsView-CSAyYk6b.js b/assets/TrendsView-C_nun9wG.js similarity index 97% rename from assets/TrendsView-CSAyYk6b.js rename to assets/TrendsView-C_nun9wG.js index 930c65a05e59d93ea6a4f5aad611cbb42b13eb18..3f026426ab79ee98776476f64df9c3e8fd432055 100644 --- a/assets/TrendsView-CSAyYk6b.js +++ b/assets/TrendsView-C_nun9wG.js @@ -1 +1 @@ -import{Z as I,z as X,j as e}from"./index-Cry0GNHI.js";import{u as G}from"./useQuery-DlAfMYOD.js";import{A as J,a as E}from"./alert-BAHZ4i9D.js";import{S as P}from"./skeleton-LwsL9heH.js";class Q{constructor(r){this.request=r}trends(){return this.request("/stats/trends")}}const V=new Q(I),m=t=>{const r=/^(\d{4})-(0[1-9]|1[0-2])$/.exec(t);if(!r)return t;const[,s,l]=r;return`${["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"][Number(l)-1]} '${s.slice(2)}`},Y=()=>V.trends(),f=980,j=400,x=62,B=26,g=30,Z=58,u=f-x-B,A=j-g-Z,v=g+A,K=t=>{if(t.length<3)return t.map((s,l)=>`${l?"L":"M"}${s[0]} ${s[1]}`).join(" ");let r=`M${t[0][0]} ${t[0][1]}`;for(let s=0;s{const[a,y]=X.useState(null),i=r.length,b=l[l.length-1],d=n=>x+u*(i===1?0:n/(i-1)),p=n=>g+A*(1-n/b);if(i===0)return null;const R=r.map((n,h)=>[d(h),p(n.percent)]),F=K(R),_=`${F} L ${d(i-1)} ${v} L ${x} ${v} Z`,w=i<=12?1:Math.ceil(i/8),O=n=>{const h=n.currentTarget.getBoundingClientRect(),S=(n.clientX-h.left)/h.width*f,k=i>1?u/(i-1):u,q=Math.max(0,Math.min(i-1,Math.round((S-x)/k)));y(q)},H=`trend-gradient-${t}`;return e.jsxs("figure",{className:"trend-chart",children:[e.jsxs("div",{className:"trend-chart-visual",children:[e.jsxs("svg",{viewBox:`0 0 ${f} ${j}`,width:"100%",role:"img","aria-label":`${c} by ${o.toLowerCase()}, from ${m(r[0].month)} (${r[0].percent}%) to ${m(r[i-1].month)} (${r[i-1].percent}%)`,style:{display:"block",overflow:"visible",cursor:"crosshair"},onPointerMove:O,onPointerLeave:()=>y(null),children:[e.jsx("defs",{children:e.jsxs("linearGradient",{id:H,x1:"0",y1:"0",x2:"0",y2:"1",children:[e.jsx("stop",{offset:"0%",style:{stopColor:s,stopOpacity:.26}}),e.jsx("stop",{offset:"100%",style:{stopColor:s,stopOpacity:.02}})]})}),l.map(n=>e.jsxs("g",{children:[e.jsx("line",{x1:x,x2:f-B,y1:p(n),y2:p(n),stroke:"var(--hairline)",strokeWidth:1}),e.jsxs("text",{x:x-14,y:p(n)+4,textAnchor:"end",style:z,children:[n,"%"]})]},n)),e.jsx("path",{d:_,fill:`url(#${H})`}),e.jsx("path",{d:F,fill:"none",stroke:s,strokeWidth:2,strokeLinejoin:"round",strokeLinecap:"round"}),r.map((n,h)=>{const S=h===i-1,k=h%w===0&&i-1-h>=w/2;return!S&&!k?null:e.jsx("text",{x:d(h),y:v+24,textAnchor:"middle",style:z,children:m(n.month)},n.month)}),e.jsx("text",{x:x+u/2,y:j-4,textAnchor:"middle",style:W,children:o}),e.jsx("text",{transform:`translate(16 ${g+A/2}) rotate(-90)`,textAnchor:"middle",style:W,children:c}),a!=null&&e.jsxs(e.Fragment,{children:[e.jsx("line",{x1:d(a),x2:d(a),y1:g,y2:v,stroke:s,strokeWidth:1,strokeDasharray:"3 4",opacity:.5}),e.jsx("circle",{cx:d(a),cy:p(r[a].percent),r:5,fill:"var(--bg)",stroke:s,strokeWidth:2})]})]}),a!=null&&e.jsxs("div",{style:{position:"absolute",left:`${d(a)/f*100}%`,top:`${p(r[a].percent)/j*100}%`,transform:"translate(-50%, calc(-100% - 14px))",background:"var(--bg-elevated)",border:"1px solid var(--hairline)",borderRadius:6,boxShadow:"0 8px 26px rgba(0,0,0,.13)",padding:"7px 12px",pointerEvents:"none",whiteSpace:"nowrap",zIndex:3},children:[e.jsx("div",{style:{fontFamily:"var(--serif)",fontStyle:"italic",color:"var(--ink-faint)",fontSize:13,marginBottom:2},children:m(r[a].month)}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:7,fontFamily:"var(--mono)",fontWeight:600,fontSize:15,color:"var(--ink)"},children:[e.jsx("span",{style:{width:8,height:8,borderRadius:2,background:s,display:"inline-block"}}),r[a].percent,"%"]})]})]}),e.jsxs("details",{className:"trend-chart-table",children:[e.jsx("summary",{style:{fontFamily:"var(--mono)",fontSize:11,letterSpacing:"0.04em",color:"var(--ink-faint)",cursor:"pointer"},children:"View data table"}),e.jsxs("table",{style:{marginTop:8,borderCollapse:"collapse",fontFamily:"var(--mono)",fontSize:12,color:"var(--ink-soft)"},children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{style:{textAlign:"left",padding:"3px 18px 3px 0"},children:o}),e.jsx("th",{style:{textAlign:"right",padding:"3px 0"},children:c})]})}),e.jsx("tbody",{children:r.map(n=>e.jsxs("tr",{children:[e.jsx("td",{style:{padding:"2px 18px 2px 0"},children:m(n.month)}),e.jsxs("td",{style:{textAlign:"right",padding:"2px 0"},children:[n.percent,"%"]})]},n.month))})]})]})]})},$={maxWidth:960,padding:"48px 0 8px",borderTop:"1px solid var(--hairline)",marginTop:48},T={fontFamily:"var(--serif)",fontSize:34,fontWeight:500,letterSpacing:"-0.02em",margin:"0 0 10px",color:"var(--ink)"},M={fontFamily:"var(--serif)",fontSize:18,lineHeight:1.55,color:"var(--ink-soft)",maxWidth:620,margin:"0 0 8px"},C={fontFamily:"var(--mono)",fontSize:12,fontWeight:600,letterSpacing:"0.14em",textTransform:"uppercase",color:"var(--ink-faint)",marginBottom:8},N={fontFamily:"var(--serif)",fontSize:17,lineHeight:1.6,color:"var(--ink-soft)",margin:0},D={height:320,marginTop:26},re=()=>{const t=G({queryKey:["research-trends"],queryFn:Y,staleTime:36e5});return e.jsxs("div",{className:"page",children:[e.jsx("div",{className:"feed-header",children:e.jsxs("div",{children:[e.jsxs("h1",{className:"feed-title",children:["Research ",e.jsx("em",{children:"Trends"})]}),e.jsx("div",{className:"feed-subtitle",children:"How open science is changing across machine learning — tracked over time from arXiv and the Hugging Face Hub."})]})}),t.error&&e.jsx(J,{variant:"destructive",children:e.jsx(E,{children:"Failed to load research trends. Please try again."})}),e.jsxs("section",{style:$,children:[e.jsx("h2",{style:T,children:"Code Availability"}),e.jsx("p",{style:M,children:"The percentage of published papers that have at least one official code implementation on GitHub."}),e.jsx("div",{style:{marginTop:26},children:t.data?e.jsx(L,{id:"code",data:t.data.code_availability,color:"var(--trend-code)",yTicks:[0,20,40,60,80],yLabel:"Code Availability",xLabel:"Paper Publication Date"}):!t.error&&e.jsx(P,{style:D})})]}),e.jsxs("section",{style:$,children:[e.jsx("h2",{style:T,children:"Papers with Hugging Face artifacts"}),e.jsx("p",{style:M,children:"The percentage of published papers linked to at least one Hugging Face artifact — a model, dataset or Space — making the work directly runnable and reusable."}),e.jsx("div",{style:{marginTop:26},children:t.data?e.jsx(L,{id:"hf",data:t.data.hf_artifacts,color:"var(--trend-hf)",yTicks:[0,10,20,30,40,50],yLabel:"HF Artifact Coverage",xLabel:"Paper Publication Date"}):!t.error&&e.jsx(P,{style:D})})]}),e.jsxs("section",{style:{...$,paddingBottom:72},children:[e.jsx("h2",{style:{...T,fontSize:27},children:"How the data is collected"}),e.jsxs("div",{style:{display:"grid",gap:24,maxWidth:680},children:[e.jsxs("div",{children:[e.jsx("div",{style:C,children:"Code Availability"}),e.jsx("p",{style:N,children:"For every open-access machine learning paper, we check whether an official code implementation is linked on GitHub. The date axis is the paper's publication date."})]}),e.jsxs("div",{children:[e.jsx("div",{style:C,children:"Hugging Face artifacts"}),e.jsx("p",{style:N,children:"We resolve links between papers and the Hugging Face Hub, counting a paper as covered when it references at least one model, dataset or Space. The date axis is the paper's publication date."})]}),e.jsx("p",{style:{fontFamily:"var(--mono)",fontSize:12,lineHeight:1.6,color:"var(--ink-faint)",margin:"8px 0 0",letterSpacing:"0.02em"},children:"Figures use complete publication months. Historical Hugging Face coverage reflects artifacts currently linked in the catalog."})]})]})]})};export{re as default}; +import{Z as I,z as X,j as e}from"./index-Dt001B3A.js";import{u as G}from"./useQuery-DD4hUA6p.js";import{A as J,a as E}from"./alert-Xa-AqUL5.js";import{S as P}from"./skeleton-DkhIJUB4.js";class Q{constructor(r){this.request=r}trends(){return this.request("/stats/trends")}}const V=new Q(I),m=t=>{const r=/^(\d{4})-(0[1-9]|1[0-2])$/.exec(t);if(!r)return t;const[,s,l]=r;return`${["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"][Number(l)-1]} '${s.slice(2)}`},Y=()=>V.trends(),f=980,j=400,x=62,B=26,g=30,Z=58,u=f-x-B,A=j-g-Z,v=g+A,K=t=>{if(t.length<3)return t.map((s,l)=>`${l?"L":"M"}${s[0]} ${s[1]}`).join(" ");let r=`M${t[0][0]} ${t[0][1]}`;for(let s=0;s{const[a,y]=X.useState(null),i=r.length,b=l[l.length-1],d=n=>x+u*(i===1?0:n/(i-1)),p=n=>g+A*(1-n/b);if(i===0)return null;const R=r.map((n,h)=>[d(h),p(n.percent)]),F=K(R),_=`${F} L ${d(i-1)} ${v} L ${x} ${v} Z`,w=i<=12?1:Math.ceil(i/8),O=n=>{const h=n.currentTarget.getBoundingClientRect(),S=(n.clientX-h.left)/h.width*f,k=i>1?u/(i-1):u,q=Math.max(0,Math.min(i-1,Math.round((S-x)/k)));y(q)},H=`trend-gradient-${t}`;return e.jsxs("figure",{className:"trend-chart",children:[e.jsxs("div",{className:"trend-chart-visual",children:[e.jsxs("svg",{viewBox:`0 0 ${f} ${j}`,width:"100%",role:"img","aria-label":`${c} by ${o.toLowerCase()}, from ${m(r[0].month)} (${r[0].percent}%) to ${m(r[i-1].month)} (${r[i-1].percent}%)`,style:{display:"block",overflow:"visible",cursor:"crosshair"},onPointerMove:O,onPointerLeave:()=>y(null),children:[e.jsx("defs",{children:e.jsxs("linearGradient",{id:H,x1:"0",y1:"0",x2:"0",y2:"1",children:[e.jsx("stop",{offset:"0%",style:{stopColor:s,stopOpacity:.26}}),e.jsx("stop",{offset:"100%",style:{stopColor:s,stopOpacity:.02}})]})}),l.map(n=>e.jsxs("g",{children:[e.jsx("line",{x1:x,x2:f-B,y1:p(n),y2:p(n),stroke:"var(--hairline)",strokeWidth:1}),e.jsxs("text",{x:x-14,y:p(n)+4,textAnchor:"end",style:z,children:[n,"%"]})]},n)),e.jsx("path",{d:_,fill:`url(#${H})`}),e.jsx("path",{d:F,fill:"none",stroke:s,strokeWidth:2,strokeLinejoin:"round",strokeLinecap:"round"}),r.map((n,h)=>{const S=h===i-1,k=h%w===0&&i-1-h>=w/2;return!S&&!k?null:e.jsx("text",{x:d(h),y:v+24,textAnchor:"middle",style:z,children:m(n.month)},n.month)}),e.jsx("text",{x:x+u/2,y:j-4,textAnchor:"middle",style:W,children:o}),e.jsx("text",{transform:`translate(16 ${g+A/2}) rotate(-90)`,textAnchor:"middle",style:W,children:c}),a!=null&&e.jsxs(e.Fragment,{children:[e.jsx("line",{x1:d(a),x2:d(a),y1:g,y2:v,stroke:s,strokeWidth:1,strokeDasharray:"3 4",opacity:.5}),e.jsx("circle",{cx:d(a),cy:p(r[a].percent),r:5,fill:"var(--bg)",stroke:s,strokeWidth:2})]})]}),a!=null&&e.jsxs("div",{style:{position:"absolute",left:`${d(a)/f*100}%`,top:`${p(r[a].percent)/j*100}%`,transform:"translate(-50%, calc(-100% - 14px))",background:"var(--bg-elevated)",border:"1px solid var(--hairline)",borderRadius:6,boxShadow:"0 8px 26px rgba(0,0,0,.13)",padding:"7px 12px",pointerEvents:"none",whiteSpace:"nowrap",zIndex:3},children:[e.jsx("div",{style:{fontFamily:"var(--serif)",fontStyle:"italic",color:"var(--ink-faint)",fontSize:13,marginBottom:2},children:m(r[a].month)}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:7,fontFamily:"var(--mono)",fontWeight:600,fontSize:15,color:"var(--ink)"},children:[e.jsx("span",{style:{width:8,height:8,borderRadius:2,background:s,display:"inline-block"}}),r[a].percent,"%"]})]})]}),e.jsxs("details",{className:"trend-chart-table",children:[e.jsx("summary",{style:{fontFamily:"var(--mono)",fontSize:11,letterSpacing:"0.04em",color:"var(--ink-faint)",cursor:"pointer"},children:"View data table"}),e.jsxs("table",{style:{marginTop:8,borderCollapse:"collapse",fontFamily:"var(--mono)",fontSize:12,color:"var(--ink-soft)"},children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{style:{textAlign:"left",padding:"3px 18px 3px 0"},children:o}),e.jsx("th",{style:{textAlign:"right",padding:"3px 0"},children:c})]})}),e.jsx("tbody",{children:r.map(n=>e.jsxs("tr",{children:[e.jsx("td",{style:{padding:"2px 18px 2px 0"},children:m(n.month)}),e.jsxs("td",{style:{textAlign:"right",padding:"2px 0"},children:[n.percent,"%"]})]},n.month))})]})]})]})},$={maxWidth:960,padding:"48px 0 8px",borderTop:"1px solid var(--hairline)",marginTop:48},T={fontFamily:"var(--serif)",fontSize:34,fontWeight:500,letterSpacing:"-0.02em",margin:"0 0 10px",color:"var(--ink)"},M={fontFamily:"var(--serif)",fontSize:18,lineHeight:1.55,color:"var(--ink-soft)",maxWidth:620,margin:"0 0 8px"},C={fontFamily:"var(--mono)",fontSize:12,fontWeight:600,letterSpacing:"0.14em",textTransform:"uppercase",color:"var(--ink-faint)",marginBottom:8},N={fontFamily:"var(--serif)",fontSize:17,lineHeight:1.6,color:"var(--ink-soft)",margin:0},D={height:320,marginTop:26},re=()=>{const t=G({queryKey:["research-trends"],queryFn:Y,staleTime:36e5});return e.jsxs("div",{className:"page",children:[e.jsx("div",{className:"feed-header",children:e.jsxs("div",{children:[e.jsxs("h1",{className:"feed-title",children:["Research ",e.jsx("em",{children:"Trends"})]}),e.jsx("div",{className:"feed-subtitle",children:"How open science is changing across machine learning — tracked over time from arXiv and the Hugging Face Hub."})]})}),t.error&&e.jsx(J,{variant:"destructive",children:e.jsx(E,{children:"Failed to load research trends. Please try again."})}),e.jsxs("section",{style:$,children:[e.jsx("h2",{style:T,children:"Code Availability"}),e.jsx("p",{style:M,children:"The percentage of published papers that have at least one official code implementation on GitHub."}),e.jsx("div",{style:{marginTop:26},children:t.data?e.jsx(L,{id:"code",data:t.data.code_availability,color:"var(--trend-code)",yTicks:[0,20,40,60,80],yLabel:"Code Availability",xLabel:"Paper Publication Date"}):!t.error&&e.jsx(P,{style:D})})]}),e.jsxs("section",{style:$,children:[e.jsx("h2",{style:T,children:"Papers with Hugging Face artifacts"}),e.jsx("p",{style:M,children:"The percentage of published papers linked to at least one Hugging Face artifact — a model, dataset or Space — making the work directly runnable and reusable."}),e.jsx("div",{style:{marginTop:26},children:t.data?e.jsx(L,{id:"hf",data:t.data.hf_artifacts,color:"var(--trend-hf)",yTicks:[0,10,20,30,40,50],yLabel:"HF Artifact Coverage",xLabel:"Paper Publication Date"}):!t.error&&e.jsx(P,{style:D})})]}),e.jsxs("section",{style:{...$,paddingBottom:72},children:[e.jsx("h2",{style:{...T,fontSize:27},children:"How the data is collected"}),e.jsxs("div",{style:{display:"grid",gap:24,maxWidth:680},children:[e.jsxs("div",{children:[e.jsx("div",{style:C,children:"Code Availability"}),e.jsx("p",{style:N,children:"For every open-access machine learning paper, we check whether an official code implementation is linked on GitHub. The date axis is the paper's publication date."})]}),e.jsxs("div",{children:[e.jsx("div",{style:C,children:"Hugging Face artifacts"}),e.jsx("p",{style:N,children:"We resolve links between papers and the Hugging Face Hub, counting a paper as covered when it references at least one model, dataset or Space. The date axis is the paper's publication date."})]}),e.jsx("p",{style:{fontFamily:"var(--mono)",fontSize:12,lineHeight:1.6,color:"var(--ink-faint)",margin:"8px 0 0",letterSpacing:"0.02em"},children:"Figures use complete publication months. Historical Hugging Face coverage reflects artifacts currently linked in the catalog."})]})]})]})};export{re as default}; diff --git a/assets/UserProfileView-BER9pnDz.js b/assets/UserProfileView-hcOOdDE-.js similarity index 87% rename from assets/UserProfileView-BER9pnDz.js rename to assets/UserProfileView-hcOOdDE-.js index 2c67fa24a7ee67e7eff5f8fbaf2ac4e4c64efab1..ce460773fcea82dc1d71d7a3a1c86cf914de09df 100644 --- a/assets/UserProfileView-BER9pnDz.js +++ b/assets/UserProfileView-hcOOdDE-.js @@ -1 +1 @@ -import{ak as i,A as n,c as o,j as e,ax as d}from"./index-Cry0GNHI.js";import{u as l}from"./useQuery-DlAfMYOD.js";import{C as c}from"./OrganizationContributionGraph-qTfsmWA5.js";import"./skeleton-LwsL9heH.js";import"./catalog-BjZE6R9z.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{ak as i,A as n,c as o,j as e,ax as d}from"./index-Dt001B3A.js";import{u as l}from"./useQuery-DD4hUA6p.js";import{C as c}from"./OrganizationContributionGraph-B_9EeNTc.js";import"./skeleton-DkhIJUB4.js";import"./catalog-BOpSeTzm.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-BAHZ4i9D.js b/assets/alert-Xa-AqUL5.js similarity index 92% rename from assets/alert-BAHZ4i9D.js rename to assets/alert-Xa-AqUL5.js index 21dbe9f71961738a2c4b91348717e23efde8ade1..6c22562ae96ea5cd1a6981d9ec9bfee99ef07cfa 100644 --- a/assets/alert-BAHZ4i9D.js +++ b/assets/alert-Xa-AqUL5.js @@ -1 +1 @@ -import{r as a,j as s,q as l,a0 as i}from"./index-Cry0GNHI.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,q as l,a0 as i}from"./index-Dt001B3A.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/button-QVzubJLr.js b/assets/button-BL-YLDFJ.js similarity index 89% rename from assets/button-QVzubJLr.js rename to assets/button-BL-YLDFJ.js index 91768c6e253574e2cf9eb6df3b77751100d3190a..fbc45dfe8b1e7bf1178379179e635a218a182f4a 100644 --- a/assets/button-QVzubJLr.js +++ b/assets/button-BL-YLDFJ.js @@ -1 +1 @@ -import{r as a,j as d,al as u,q as c,a0 as f}from"./index-Cry0GNHI.js";const g=f("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),l=a.forwardRef(({className:e,variant:t,size:r,asChild:n=!1,...o},s)=>{const i=n?u:"button";return d.jsx(i,{className:c(g({variant:t,size:r,className:e})),ref:s,...o})});l.displayName="Button";export{l as B}; +import{r as a,j as d,al as u,q as c,a0 as f}from"./index-Dt001B3A.js";const g=f("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),l=a.forwardRef(({className:e,variant:t,size:r,asChild:n=!1,...o},s)=>{const i=n?u:"button";return d.jsx(i,{className:c(g({variant:t,size:r,className:e})),ref:s,...o})});l.displayName="Button";export{l as B}; diff --git a/assets/catalog-BjZE6R9z.js b/assets/catalog-BOpSeTzm.js similarity index 97% rename from assets/catalog-BjZE6R9z.js rename to assets/catalog-BOpSeTzm.js index d6dc1af2ab743e881b203e6b24d518afca4cb7bd..bfa70f046501f190179d211c2d57a1f457c30e47 100644 --- a/assets/catalog-BjZE6R9z.js +++ b/assets/catalog-BOpSeTzm.js @@ -1 +1 @@ -import{Z as o}from"./index-Cry0GNHI.js";function s(a,e){const t=new URLSearchParams;for(const[i,n]of Object.entries(e??{}))n!==void 0&&n!==""&&t.set(i,String(n));const r=t.toString();return`${a}${r?`?${r}`:""}`}class u{constructor(e){this.request=e}listAreas(e){return this.request(s("/areas/",e))}getArea(e){return this.request(`/areas/${e}`)}areasWithTasks(){return this.request("/areas/with-tasks/")}listTasks(e){return this.request(s("/tasks/",e))}getTask(e){return this.request(`/tasks/${e}`)}topTasks(e){return this.request(s("/tasks/top",{limit:e}))}trendingTasks(e){return this.request(s("/tasks/trending",e))}taskChildren(e,t){return this.request(s(`/tasks/${e}/children`,t))}taskParents(e){return this.request(`/tasks/${e}/parents`)}taskPage(e,t){return this.request(s(`/tasks/${e}/page`,t))}trendingBenchmarks(e,t){return this.request(s(`/tasks/${encodeURIComponent(e)}/trending-benchmarks`,t))}frameworkCatalog(){return this.request("/frameworks/")}listMethods(e){return this.request(s("/methods/",e))}methodIndex(){return this.request("/methods/index/cards")}getMethod(e){return this.request(`/methods/${encodeURIComponent(e)}`)}methodTrend(e,t){return this.request(s(`/methods/${encodeURIComponent(e)}/trend`,t))}listDatasets(e){const{task_id:t,...r}=e??{};return this.request(s("/datasets/",{...r,task:r.task??t}))}getDataset(e){return this.request(`/datasets/${e}`)}getDatasetBySlug(e,t){return this.request(s(`/datasets/${e}`,t))}async datasetTasks(e){return(await this.request(`/datasets/${e}/tasks/`)).results}async leaderboardMetrics(e,t){return(await this.request(`/datasets/${e}/tasks/${t}/metrics`)).metrics}metricDirections(){return this.request("/metrics/directions")}conferences(){return this.request("/conferences/")}conferenceDeadlines(){return this.request("/conferences/deadlines")}getConference(e){return this.request(`/conferences/${e}`)}conferenceAreasWithTasks(e){return this.request(`/conferences/${e}/areas-with-tasks`)}organizations(e=!1){return this.request(`/organizations/${e?"?featured_only=true":""}`)}organizationIndex(){return this.request("/organizations/index/cards")}getOrganization(e){return this.request(`/organizations/${e}`)}organizationContributions(e){return this.request(`/organizations/${e}/contributions`)}organizationAreasWithTasks(e){return this.request(`/organizations/${e}/areas-with-tasks`)}audit(e){return this.request(s("/admin/catalog-audit",{cursor:e}))}acknowledgeAudit(){return this.request("/admin/catalog-audit/acknowledge",{method:"POST"})}rollbackEvent(e){return this.request(`/admin/catalog-audit/${e}/rollback`,{method:"POST"})}}const c=new u(o);export{c}; +import{Z as o}from"./index-Dt001B3A.js";function s(a,e){const t=new URLSearchParams;for(const[i,n]of Object.entries(e??{}))n!==void 0&&n!==""&&t.set(i,String(n));const r=t.toString();return`${a}${r?`?${r}`:""}`}class u{constructor(e){this.request=e}listAreas(e){return this.request(s("/areas/",e))}getArea(e){return this.request(`/areas/${e}`)}areasWithTasks(){return this.request("/areas/with-tasks/")}listTasks(e){return this.request(s("/tasks/",e))}getTask(e){return this.request(`/tasks/${e}`)}topTasks(e){return this.request(s("/tasks/top",{limit:e}))}trendingTasks(e){return this.request(s("/tasks/trending",e))}taskChildren(e,t){return this.request(s(`/tasks/${e}/children`,t))}taskParents(e){return this.request(`/tasks/${e}/parents`)}taskPage(e,t){return this.request(s(`/tasks/${e}/page`,t))}trendingBenchmarks(e,t){return this.request(s(`/tasks/${encodeURIComponent(e)}/trending-benchmarks`,t))}frameworkCatalog(){return this.request("/frameworks/")}listMethods(e){return this.request(s("/methods/",e))}methodIndex(){return this.request("/methods/index/cards")}getMethod(e){return this.request(`/methods/${encodeURIComponent(e)}`)}methodTrend(e,t){return this.request(s(`/methods/${encodeURIComponent(e)}/trend`,t))}listDatasets(e){const{task_id:t,...r}=e??{};return this.request(s("/datasets/",{...r,task:r.task??t}))}getDataset(e){return this.request(`/datasets/${e}`)}getDatasetBySlug(e,t){return this.request(s(`/datasets/${e}`,t))}async datasetTasks(e){return(await this.request(`/datasets/${e}/tasks/`)).results}async leaderboardMetrics(e,t){return(await this.request(`/datasets/${e}/tasks/${t}/metrics`)).metrics}metricDirections(){return this.request("/metrics/directions")}conferences(){return this.request("/conferences/")}conferenceDeadlines(){return this.request("/conferences/deadlines")}getConference(e){return this.request(`/conferences/${e}`)}conferenceAreasWithTasks(e){return this.request(`/conferences/${e}/areas-with-tasks`)}organizations(e=!1){return this.request(`/organizations/${e?"?featured_only=true":""}`)}organizationIndex(){return this.request("/organizations/index/cards")}getOrganization(e){return this.request(`/organizations/${e}`)}organizationContributions(e){return this.request(`/organizations/${e}/contributions`)}organizationAreasWithTasks(e){return this.request(`/organizations/${e}/areas-with-tasks`)}audit(e){return this.request(s("/admin/catalog-audit",{cursor:e}))}acknowledgeAudit(){return this.request("/admin/catalog-audit/acknowledge",{method:"POST"})}rollbackEvent(e){return this.request(`/admin/catalog-audit/${e}/rollback`,{method:"POST"})}}const c=new u(o);export{c}; diff --git a/assets/chat-FW6HqAah.js b/assets/chat-98y1Ufht.js similarity index 97% rename from assets/chat-FW6HqAah.js rename to assets/chat-98y1Ufht.js index 34ae8f092296918717f27f925b8301cea8e83bdc..ef9f4f814c29421870ca4b9d791f5ffb93a94ec3 100644 --- a/assets/chat-FW6HqAah.js +++ b/assets/chat-98y1Ufht.js @@ -1 +1 @@ -import{Z as n,ak as s}from"./index-Cry0GNHI.js";class o{constructor(e){this.request=e}listSessions(e){const t=new URLSearchParams({limit:"50"});return e&&t.set("cursor",e),this.request(`/chat/sessions?${t.toString()}`)}createSession(e,t="low"){return this.request("/chat/sessions",{method:"POST",body:JSON.stringify({selected_model:e||null,reasoning_effort:t})})}getSession(e){return this.request(`/chat/sessions/${e}`)}updateSession(e,t){return this.request(`/chat/sessions/${e}`,{method:"PATCH",body:JSON.stringify(t)})}removeSession(e){return this.request(`/chat/sessions/${e}`,{method:"DELETE"})}archiveOldChats(){return this.request("/chat/sessions/archive-old",{method:"POST"})}archiveOldestChats(){return this.request("/chat/sessions/archive-oldest",{method:"POST"})}cancelSession(e){return this.request(`/chat/sessions/${e}/cancel`,{method:"POST"})}createOrRefreshShare(e){return this.request(`/chat/sessions/${e}/share`,{method:"POST"})}getSharedChat(e){return this.request(`/chat/shares/${encodeURIComponent(e)}`,{credentials:"omit"})}getModels(){return this.request("/chat/models")}getUsage(){return this.request("/chat/usage",{cache:"no-store"})}getAvailability(){return this.request("/chat/availability",{cache:"no-store"})}getInferenceBilling(){return this.request("/me/inference-billing",{cache:"no-store"})}selectInferenceBillingAccount(e){return this.request("/me/inference-billing",{method:"PATCH",body:JSON.stringify({bill_to:e})})}prewarmPaperContext(e){return this.request("/chat/paper-context/prewarm",{method:"POST",body:JSON.stringify({route_id:e}),credentials:"omit",cache:"no-store"})}getSandboxSpend(e){const t=e?`?environment=${encodeURIComponent(e)}`:"";return this.request(`/chat/admin/sandbox-spend${t}`,{cache:"no-store"})}getWebSearchBudget(){return this.request("/chat/admin/web-search-budget",{cache:"no-store"})}getOpenRouterCredential(){return this.request("/chat/openrouter-key",{cache:"no-store"})}connectOpenRouterCredential(e){return this.request("/chat/openrouter-key",{method:"PUT",body:JSON.stringify({api_key:e})})}setOpenRouterFallback(e){return this.request("/chat/openrouter-key",{method:"PATCH",body:JSON.stringify({enabled:e})})}disconnectOpenRouterCredential(){return this.request("/chat/openrouter-key",{method:"DELETE"})}reportLatency(e,t){return s(`/chat/latency/${encodeURIComponent(e)}`,{method:"POST",keepalive:!0,body:JSON.stringify(t)})}reportFeedback(e,t,r){return this.request(`/chat/messages/${encodeURIComponent(e)}/feedback`,{method:"POST",body:JSON.stringify({value:t,...r?{comment:r}:{}})})}stream(e,t){return s("/chat/stream",{method:"POST",headers:{Accept:"text/event-stream"},body:JSON.stringify(e),signal:t})}resumeStream(e,t){return s(`/chat/sessions/${encodeURIComponent(e)}/stream`,{method:"GET",headers:{Accept:"text/event-stream"},signal:t})}}const h=new o(n);export{h as c}; +import{Z as n,ak as s}from"./index-Dt001B3A.js";class o{constructor(e){this.request=e}listSessions(e){const t=new URLSearchParams({limit:"50"});return e&&t.set("cursor",e),this.request(`/chat/sessions?${t.toString()}`)}createSession(e,t="low"){return this.request("/chat/sessions",{method:"POST",body:JSON.stringify({selected_model:e||null,reasoning_effort:t})})}getSession(e){return this.request(`/chat/sessions/${e}`)}updateSession(e,t){return this.request(`/chat/sessions/${e}`,{method:"PATCH",body:JSON.stringify(t)})}removeSession(e){return this.request(`/chat/sessions/${e}`,{method:"DELETE"})}archiveOldChats(){return this.request("/chat/sessions/archive-old",{method:"POST"})}archiveOldestChats(){return this.request("/chat/sessions/archive-oldest",{method:"POST"})}cancelSession(e){return this.request(`/chat/sessions/${e}/cancel`,{method:"POST"})}createOrRefreshShare(e){return this.request(`/chat/sessions/${e}/share`,{method:"POST"})}getSharedChat(e){return this.request(`/chat/shares/${encodeURIComponent(e)}`,{credentials:"omit"})}getModels(){return this.request("/chat/models")}getUsage(){return this.request("/chat/usage",{cache:"no-store"})}getAvailability(){return this.request("/chat/availability",{cache:"no-store"})}getInferenceBilling(){return this.request("/me/inference-billing",{cache:"no-store"})}selectInferenceBillingAccount(e){return this.request("/me/inference-billing",{method:"PATCH",body:JSON.stringify({bill_to:e})})}prewarmPaperContext(e){return this.request("/chat/paper-context/prewarm",{method:"POST",body:JSON.stringify({route_id:e}),credentials:"omit",cache:"no-store"})}getSandboxSpend(e){const t=e?`?environment=${encodeURIComponent(e)}`:"";return this.request(`/chat/admin/sandbox-spend${t}`,{cache:"no-store"})}getWebSearchBudget(){return this.request("/chat/admin/web-search-budget",{cache:"no-store"})}getOpenRouterCredential(){return this.request("/chat/openrouter-key",{cache:"no-store"})}connectOpenRouterCredential(e){return this.request("/chat/openrouter-key",{method:"PUT",body:JSON.stringify({api_key:e})})}setOpenRouterFallback(e){return this.request("/chat/openrouter-key",{method:"PATCH",body:JSON.stringify({enabled:e})})}disconnectOpenRouterCredential(){return this.request("/chat/openrouter-key",{method:"DELETE"})}reportLatency(e,t){return s(`/chat/latency/${encodeURIComponent(e)}`,{method:"POST",keepalive:!0,body:JSON.stringify(t)})}reportFeedback(e,t,r){return this.request(`/chat/messages/${encodeURIComponent(e)}/feedback`,{method:"POST",body:JSON.stringify({value:t,...r?{comment:r}:{}})})}stream(e,t){return s("/chat/stream",{method:"POST",headers:{Accept:"text/event-stream"},body:JSON.stringify(e),signal:t})}resumeStream(e,t){return s(`/chat/sessions/${encodeURIComponent(e)}/stream`,{method:"GET",headers:{Accept:"text/event-stream"},signal:t})}}const h=new o(n);export{h as c}; diff --git a/assets/chatLaunch-DpNrK5mV.js b/assets/chatLaunch-C8mQqa_z.js similarity index 99% rename from assets/chatLaunch-DpNrK5mV.js rename to assets/chatLaunch-C8mQqa_z.js index bbc4a1e98f3f12596b308657f498ec4c36fcd7ab..d506e5cd888bcc9681268d886e3ef478db6fca89 100644 --- a/assets/chatLaunch-DpNrK5mV.js +++ b/assets/chatLaunch-C8mQqa_z.js @@ -1,4 +1,4 @@ -import{d as ae,j as a,A as ce,r as j,C as le,z as h}from"./index-Cry0GNHI.js";import{c as m}from"./chat-FW6HqAah.js";import{C as ue}from"./chevron-down-DR8n8lNp.js";import{u as pe}from"./useQuery-DlAfMYOD.js";import{p as de}from"./papers-CrgFFrmi.js";/** +import{d as ae,j as a,A as ce,r as j,C as le,z as h}from"./index-Dt001B3A.js";import{c as m}from"./chat-98y1Ufht.js";import{C as ue}from"./chevron-down-BXCXby03.js";import{u as pe}from"./useQuery-DD4hUA6p.js";import{p as de}from"./papers-KXkGPHI5.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/chevron-down-DR8n8lNp.js b/assets/chevron-down-BXCXby03.js similarity index 85% rename from assets/chevron-down-DR8n8lNp.js rename to assets/chevron-down-BXCXby03.js index da5a0ab23653b85e0837388a48621229ac830cc7..03816d072c9d1489b4c6d887971762223830ec9c 100644 --- a/assets/chevron-down-DR8n8lNp.js +++ b/assets/chevron-down-BXCXby03.js @@ -1,4 +1,4 @@ -import{d as o}from"./index-Cry0GNHI.js";/** +import{d as o}from"./index-Dt001B3A.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/circle-check-CFRMmRHN.js b/assets/circle-check-BxcyjDCC.js similarity index 87% rename from assets/circle-check-CFRMmRHN.js rename to assets/circle-check-BxcyjDCC.js index 137be4be81ae4340482d8d98d083cf6415d4ab67..bcc011f9c38d284002afcd9199f0917e18a89c47 100644 --- a/assets/circle-check-CFRMmRHN.js +++ b/assets/circle-check-BxcyjDCC.js @@ -1,4 +1,4 @@ -import{d as c}from"./index-Cry0GNHI.js";/** +import{d as c}from"./index-Dt001B3A.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/codexAddEvals-DrSFgeIY.js b/assets/codexAddEvals-BW2pMO12.js similarity index 98% rename from assets/codexAddEvals-DrSFgeIY.js rename to assets/codexAddEvals-BW2pMO12.js index 7e851dae5847c63069965c7812806e809e3eaf88..d4a693be47ebe28c3a68a58edc838a790ef673c9 100644 --- a/assets/codexAddEvals-DrSFgeIY.js +++ b/assets/codexAddEvals-BW2pMO12.js @@ -1,4 +1,4 @@ -import{d,j as u,q as l,a0 as p,E as t}from"./index-Cry0GNHI.js";/** +import{d,j as u,q as l,a0 as p,E as t}from"./index-Dt001B3A.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/components-IPCTDA4d.js b/assets/components-DMT1vhIy.js similarity index 98% rename from assets/components-IPCTDA4d.js rename to assets/components-DMT1vhIy.js index 036aa4dc5c13219d5810bca84c6e0d0b7615f0ad..03782637eb334683a0a55ba5a4f1956a45b20164 100644 --- a/assets/components-IPCTDA4d.js +++ b/assets/components-DMT1vhIy.js @@ -1 +1 @@ -import{g as E,z as m,j as e,L as y,u as S}from"./index-Cry0GNHI.js";import{L as R,a as T}from"./LatexTitle-CLc_16Sj.js";import{h as P,d as Z,a as H,c as B}from"./transform-b6MI1iSQ.js";import{p as D}from"./papers-CrgFFrmi.js";import{s as C}from"./safeExternalHref-CkBrsh84.js";const G=({slug:t,label:s,onClick:r})=>{const n=S(),x=P(t),a=B(x),h=i=>{if(i.stopPropagation(),r){r(t);return}n(`/tasks/${t}`)};return e.jsxs("span",{className:"tag-chip",style:{background:a.bg,color:a.text},onClick:h,children:[e.jsx("span",{className:"dot",style:{background:a.dot}}),Z(s||H(t),t)]})},O=({method:t,onClick:s})=>{const r=S(),n=t.slug||t.id||"";if(!n)return null;const x=a=>{if(a.stopPropagation(),s){s(n);return}r(`/methods/${n}`)};return e.jsx("span",{className:"method-chip",onClick:x,children:t.name})},$={1:"SOTA 🏆",2:"#2",3:"#3"},F=({units:t,paperHref:s})=>{const r=m.useRef(null),n=m.useRef(null),[x,a]=m.useState(t.length);if(m.useLayoutEffect(()=>{const o=r.current,c=n.current;if(!o||!c||t.length===0)return;const f=p=>(c.textContent=p,c.scrollWidth),l=()=>{const p=o.clientWidth;if(p<=0)return;let d=0,u=0;for(const N of t){const j=f(N.measureText);if(d+j<=p)d+=j,u+=1;else break}if(u0&&d+f(` · +${t.length-u} more`)>p;)u-=1,d-=f(t[u].measureText);u===0&&(u=1)}a(u)};l();const g=new ResizeObserver(l);return g.observe(o),()=>g.disconnect()},[t]),t.length===0)return null;const h=t.slice(0,Math.max(1,Math.min(x,t.length))),i=t.length-h.length;return e.jsxs("div",{className:"paper-sota",ref:r,children:[e.jsx("span",{ref:n,className:"paper-sota-measure","aria-hidden":"true"}),h.map((o,c)=>e.jsxs(m.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:$[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:f=>f.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"]})]})},I=({ranks:t,paperHref:s,wrap:r=!1})=>{const n=m.useMemo(()=>{const a=[];let h=!0;for(const i of[1,2,3]){const o=t.filter(c=>c.rank===i);o.forEach((c,f)=>{const l=f===0,g=l?`${h?"":" · "}${$[i]} on `:", ";a.push({name:c.name,slug:c.slug,rank:i,isGroupStart:l,measureText:g+c.name})}),o.length>0&&(h=!1)}return a},[t]),x=m.useMemo(()=>[1,2,3].map(a=>t.filter(i=>i.rank===a).map((i,o)=>({name:i.name,slug:i.slug,rank:a,isGroupStart:o===0,measureText:(o===0?`${$[a]} on `:", ")+i.name}))).filter(a=>a.length>0),[t]);return r?x.length===0?null:e.jsx("div",{className:"paper-sota-stack",children:x.map(a=>e.jsx(F,{units:a,paperHref:s},a[0].rank))}):n.length===0?null:e.jsx(F,{units:n,paperHref:s})},K=({name:t,size:s=14})=>{const r={search:e.jsx("path",{d:"M11 11l3 3M7 12.5a5.5 5.5 0 110-11 5.5 5.5 0 010 11z",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinecap:"round"}),arrowUp:e.jsx("path",{d:"M8 3l5 6H3l5-6z",fill:"currentColor"}),arrowLeft:e.jsx("path",{d:"M9 3l-4 5 4 5",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"}),arrowRight:e.jsx("path",{d:"M7 3l4 5-4 5",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"}),external:e.jsx("path",{d:"M5 3h-2v8h8v-2M9 3h3v3M7 9l5-5",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"}),github:e.jsx("path",{d:"M8 1a7 7 0 00-2.21 13.64c.35.06.48-.15.48-.34v-1.2c-1.95.42-2.36-.94-2.36-.94-.32-.81-.78-1.03-.78-1.03-.64-.43.05-.43.05-.43.7.05 1.07.72 1.07.72.62 1.07 1.64.76 2.04.58.06-.45.24-.76.44-.94-1.55-.18-3.18-.78-3.18-3.46 0-.76.27-1.39.72-1.88-.07-.18-.31-.89.07-1.86 0 0 .59-.19 1.92.72.56-.15 1.16-.23 1.75-.24.59 0 1.19.08 1.75.24 1.33-.9 1.92-.72 1.92-.72.38.97.14 1.68.07 1.86.45.49.72 1.12.72 1.88 0 2.69-1.64 3.28-3.19 3.45.25.22.48.65.48 1.32v1.95c0 .19.13.41.49.34A7 7 0 008 1z",fill:"currentColor"}),citation:e.jsx("path",{d:"M3 4h3v3H3zM4 7v1.5a1.5 1.5 0 01-1.5 1.5M9 4h3v3H9zM10 7v1.5a1.5 1.5 0 01-1.5 1.5",stroke:"currentColor",strokeWidth:"1.2",fill:"none"}),bookmark:e.jsx("path",{d:"M4 2h8v12l-4-3-4 3V2z",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinejoin:"round"}),chart:e.jsx("path",{d:"M2 13h12M3 11l3-4 3 2 4-5",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"}),chat:e.jsx("path",{d:"M3 3h10v7H7l-3 3v-3H3V3z",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinejoin:"round"}),pdf:e.jsx("path",{d:"M5 2h5l3 3v9H5V2z",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinejoin:"round"}),copy:e.jsx("path",{d:"M5 5h7v8H5V5zM3 3h7v2M3 3v8h2",stroke:"currentColor",strokeWidth:"1.2",fill:"none",strokeLinejoin:"round"}),sparkle:e.jsx("path",{d:"M8 2l1.2 3.8L13 7l-3.8 1.2L8 12l-1.2-3.8L3 7l3.8-1.2L8 2z",fill:"currentColor"}),user:e.jsx("path",{d:"M8 8a3 3 0 100-6 3 3 0 000 6zM2 14c0-3 2.5-5 6-5s6 2 6 5",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinecap:"round"}),globe:e.jsx("path",{d:"M8 1.5a6.5 6.5 0 100 13 6.5 6.5 0 000-13zM1.5 8h13M8 1.5c1.7 1.9 2.6 4.2 2.6 6.5s-.9 4.6-2.6 6.5M8 1.5C6.3 3.4 5.4 5.7 5.4 8s.9 4.6 2.6 6.5",stroke:"currentColor",strokeWidth:"1.2",fill:"none",strokeLinecap:"round"}),menu:e.jsx("path",{d:"M2 4h12M2 8h12M2 12h12",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"}),close:e.jsx("path",{d:"M3 3l10 10M13 3L3 13",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"})};return e.jsx("svg",{className:s===11?"icon-sm":"icon",viewBox:"0 0 16 16",width:s,height:s,children:r[t]})},U=({size:t=16})=>e.jsxs("svg",{className:"hf-logo",width:t,height:t,viewBox:"0 0 95 88",fill:"none","aria-hidden":"true",focusable:"false",children:[e.jsx("path",{fill:"#FFD21E",d:"M47.21 76.5a34.75 34.75 0 1 0 0-69.5 34.75 34.75 0 0 0 0 69.5Z"}),e.jsx("path",{fill:"#FF9D0B",d:"M81.96 41.75a34.75 34.75 0 1 0-69.5 0 34.75 34.75 0 0 0 69.5 0Zm-73.5 0a38.75 38.75 0 1 1 77.5 0 38.75 38.75 0 0 1-77.5 0Z"}),e.jsx("path",{fill:"#3A3B45",d:"M58.5 32.3c1.28.44 1.78 3.06 3.07 2.38a5 5 0 1 0-6.76-2.07c.61 1.15 2.55-.72 3.7-.32ZM34.95 32.3c-1.28.44-1.79 3.06-3.07 2.38a5 5 0 1 1 6.76-2.07c-.61 1.15-2.56-.72-3.7-.32Z"}),e.jsx("path",{fill:"#FF323D",d:"M46.96 56.29c9.83 0 13-8.76 13-13.26 0-2.34-1.57-1.6-4.09-.36-2.33 1.15-5.46 2.74-8.9 2.74-7.19 0-13-6.88-13-2.38s3.16 13.26 13 13.26Z"}),e.jsx("path",{fill:"#3A3B45",fillRule:"evenodd",clipRule:"evenodd",d:"M39.43 54a8.7 8.7 0 0 1 5.3-4.49c.4-.12.81.57 1.24 1.28.4.68.82 1.37 1.24 1.37.45 0 .9-.68 1.33-1.35.45-.7.89-1.38 1.32-1.25a8.61 8.61 0 0 1 5 4.17c3.73-2.94 5.1-7.74 5.1-10.7 0-2.34-1.57-1.6-4.09-.36l-.14.07c-2.31 1.15-5.39 2.67-8.77 2.67s-6.45-1.52-8.77-2.67c-2.6-1.29-4.23-2.1-4.23.29 0 3.05 1.46 8.06 5.47 10.97Z"}),e.jsx("path",{fill:"#FF9D0B",d:"M70.71 37a3.25 3.25 0 1 0 0-6.5 3.25 3.25 0 0 0 0 6.5ZM24.21 37a3.25 3.25 0 1 0 0-6.5 3.25 3.25 0 0 0 0 6.5ZM17.52 48c-1.62 0-3.06.66-4.07 1.87a5.97 5.97 0 0 0-1.33 3.76 7.1 7.1 0 0 0-1.94-.3c-1.55 0-2.95.59-3.94 1.66a5.8 5.8 0 0 0-.8 7 5.3 5.3 0 0 0-1.79 2.82c-.24.9-.48 2.8.8 4.74a5.22 5.22 0 0 0-.37 5.02c1.02 2.32 3.57 4.14 8.52 6.1 3.07 1.22 5.89 2 5.91 2.01a44.33 44.33 0 0 0 10.93 1.6c5.86 0 10.05-1.8 12.46-5.34 3.88-5.69 3.33-10.9-1.7-15.92-2.77-2.78-4.62-6.87-5-7.77-.78-2.66-2.84-5.62-6.25-5.62a5.7 5.7 0 0 0-4.6 2.46c-1-1.26-1.98-2.25-2.86-2.82A7.4 7.4 0 0 0 17.52 48Zm0 4c.51 0 1.14.22 1.82.65 2.14 1.36 6.25 8.43 7.76 11.18.5.92 1.37 1.31 2.14 1.31 1.55 0 2.75-1.53.15-3.48-3.92-2.93-2.55-7.72-.68-8.01.08-.02.17-.02.24-.02 1.7 0 2.45 2.93 2.45 2.93s2.2 5.52 5.98 9.3c3.77 3.77 3.97 6.8 1.22 10.83-1.88 2.75-5.47 3.58-9.16 3.58-3.81 0-7.73-.9-9.92-1.46-.11-.03-13.45-3.8-11.76-7 .28-.54.75-.76 1.34-.76 2.38 0 6.7 3.54 8.57 3.54.41 0 .7-.17.83-.6.79-2.85-12.06-4.05-10.98-8.17.2-.73.71-1.02 1.44-1.02 3.14 0 10.2 5.53 11.68 5.53.11 0 .2-.03.24-.1.74-1.2.33-2.04-4.9-5.2-5.21-3.16-8.88-5.06-6.8-7.33.24-.26.58-.38 1-.38 3.17 0 10.66 6.82 10.66 6.82s2.02 2.1 3.25 2.1c.28 0 .52-.1.68-.38.86-1.46-8.06-8.22-8.56-11.01-.34-1.9.24-2.85 1.31-2.85Z"}),e.jsx("path",{fill:"#FFD21E",d:"M38.6 76.69c2.75-4.04 2.55-7.07-1.22-10.84-3.78-3.77-5.98-9.3-5.98-9.3s-.82-3.2-2.69-2.9c-1.87.3-3.24 5.08.68 8.01 3.91 2.93-.78 4.92-2.29 2.17-1.5-2.75-5.62-9.82-7.76-11.18-2.13-1.35-3.63-.6-3.13 2.2.5 2.79 9.43 9.55 8.56 11-.87 1.47-3.93-1.71-3.93-1.71s-9.57-8.71-11.66-6.44c-2.08 2.27 1.59 4.17 6.8 7.33 5.23 3.16 5.64 4 4.9 5.2-.75 1.2-12.28-8.53-13.36-4.4-1.08 4.11 11.77 5.3 10.98 8.15-.8 2.85-9.06-5.38-10.74-2.18-1.7 3.21 11.65 6.98 11.76 7.01 4.3 1.12 15.25 3.49 19.08-2.12Z"}),e.jsx("path",{fill:"#FF9D0B",d:"M77.4 48c1.62 0 3.07.66 4.07 1.87a5.97 5.97 0 0 1 1.33 3.76 7.1 7.1 0 0 1 1.95-.3c1.55 0 2.95.59 3.94 1.66a5.8 5.8 0 0 1 .8 7 5.3 5.3 0 0 1 1.78 2.82c.24.9.48 2.8-.8 4.74a5.22 5.22 0 0 1 .37 5.02c-1.02 2.32-3.57 4.14-8.51 6.1-3.08 1.22-5.9 2-5.92 2.01a44.33 44.33 0 0 1-10.93 1.6c-5.86 0-10.05-1.8-12.46-5.34-3.88-5.69-3.33-10.9 1.7-15.92 2.78-2.78 4.63-6.87 5.01-7.77.78-2.66 2.83-5.62 6.24-5.62a5.7 5.7 0 0 1 4.6 2.46c1-1.26 1.98-2.25 2.87-2.82A7.4 7.4 0 0 1 77.4 48Zm0 4c-.51 0-1.13.22-1.82.65-2.13 1.36-6.25 8.43-7.76 11.18a2.43 2.43 0 0 1-2.14 1.31c-1.54 0-2.75-1.53-.14-3.48 3.91-2.93 2.54-7.72.67-8.01a1.54 1.54 0 0 0-.24-.02c-1.7 0-2.45 2.93-2.45 2.93s-2.2 5.52-5.97 9.3c-3.78 3.77-3.98 6.8-1.22 10.83 1.87 2.75 5.47 3.58 9.15 3.58 3.82 0 7.73-.9 9.93-1.46.1-.03 13.45-3.8 11.76-7-.29-.54-.75-.76-1.34-.76-2.38 0-6.71 3.54-8.57 3.54-.42 0-.71-.17-.83-.6-.8-2.85 12.05-4.05 10.97-8.17-.19-.73-.7-1.02-1.44-1.02-3.14 0-10.2 5.53-11.68 5.53-.1 0-.19-.03-.23-.1-.74-1.2-.34-2.04 4.88-5.2 5.23-3.16 8.9-5.06 6.8-7.33-.23-.26-.57-.38-.98-.38-3.18 0-10.67 6.82-10.67 6.82s-2.02 2.1-3.24 2.1a.74.74 0 0 1-.68-.38c-.87-1.46 8.05-8.22 8.55-11.01.34-1.9-.24-2.85-1.31-2.85Z"}),e.jsx("path",{fill:"#FFD21E",d:"M56.33 76.69c-2.75-4.04-2.56-7.07 1.22-10.84 3.77-3.77 5.97-9.3 5.97-9.3s.82-3.2 2.7-2.9c1.86.3 3.23 5.08-.68 8.01-3.92 2.93.78 4.92 2.28 2.17 1.51-2.75 5.63-9.82 7.76-11.18 2.13-1.35 3.64-.6 3.13 2.2-.5 2.79-9.42 9.55-8.55 11 .86 1.47 3.92-1.71 3.92-1.71s9.58-8.71 11.66-6.44c2.08 2.27-1.58 4.17-6.8 7.33-5.23 3.16-5.63 4-4.9 5.2.75 1.2 12.28-8.53 13.36-4.4 1.08 4.11-11.76 5.3-10.97 8.15.8 2.85 9.05-5.38 10.74-2.18 1.69 3.21-11.65 6.98-11.76 7.01-4.31 1.12-15.26 3.49-19.08-2.12Z"})]}),_=t=>{let s=2166136261;for(let r=0;r(s=Math.imul(s^s>>>15,2246822507),s=Math.imul(s^s>>>13,3266489909),s^=s>>>16,(s>>>0)%1e4/1e4)},V=({paperId:t})=>{const s=_(t),r=160,n=220,x=[.85+s()*.1,.55+s()*.25],a=.45+s()*.3,h=[],i=9+Math.floor(s()*3);for(let M=0;M.3,c=Math.floor(s()*3),f=[],l=6+Math.floor(s()*3);for(let M=0;Me.jsx("rect",{x:d+(r-d*2)*(1-M)/2,y:z+v*2.4,width:(r-d*2)*M,height:1.4,fill:p,rx:.3},`t${v}`)),e.jsx("rect",{x:d+(r-d*2)*(1-a)/2,y:W,width:(r-d*2)*a,height:.9,fill:g,opacity:.7,rx:.2}),e.jsx("rect",{x:d,y:A,width:6,height:1,fill:p,opacity:.6}),h.map((M,v)=>{const L=k+v*2.1;return L>n-d-1?null:e.jsx("rect",{x:N,y:L,width:u*M,height:.8,fill:g,opacity:.55,rx:.2},`l${v}`)}),o&&e.jsxs("g",{children:[e.jsx("rect",{x:j,y:k,width:u,height:14,fill:"#F0EBE0",stroke:g,strokeWidth:.3,opacity:.9}),c===0&&e.jsx("g",{stroke:p,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+u/2,cy:k+7,r:3.5,fill:p}),e.jsx("rect",{x:j+2,y:k+11,width:u-4,height:1.5,fill:g})]}),c===2&&e.jsxs("g",{opacity:.55,children:[e.jsx("rect",{x:j+3,y:k+5,width:u-6,height:1,fill:p}),e.jsx("rect",{x:j+6,y:k+8,width:u-12,height:.8,fill:p})]})]}),f.map((M,v)=>{const L=k+(o?16:0)+v*2.1;return L>n-d-1?null:e.jsx("rect",{x:j,y:L,width:u*M,height:.8,fill:g,opacity:.55,rx:.2},`r${v}`)})]})})},q=({paperId:t,title:s,thumbnailUrl:r,priority:n=!1})=>{const[x,a]=m.useState(!1),[h,i]=m.useState(0),[o,c]=m.useState(n),f=m.useRef(null);m.useEffect(()=>{a(!1),i(0)},[r]);const l=m.useMemo(()=>{if(!r)return null;if(h===0)return r;const g=r.includes("?")?"&":"?";return`${r}${g}retry=${h}`},[r,h]);return m.useEffect(()=>{if(n||o)return;const g=f.current;if(!g)return;const p=new IntersectionObserver(([d])=>{d.isIntersecting&&(c(!0),p.disconnect())},{rootMargin:"250px"});return p.observe(g),()=>p.disconnect()},[n,o]),r&&!x?e.jsx("div",{ref:f,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:(n||o)&&l&&e.jsx("img",{src:l,alt:`Thumbnail for ${s}`,loading:n?"eager":"lazy",decoding:"async",fetchPriority:n?"high":"auto",style:{width:"100%",height:"100%",objectFit:"contain",display:"block"},onError:()=>{if(h<1){i(g=>g+1);return}a(!0)}},l)}):e.jsx(V,{paperId:t})},Y="language-modeling";function w(t){return t?t.toLowerCase().replace(/\(.*?\)/g," ").replace(/[^a-z]+/g," ").replace(/\bllm\b/g," ").replace(/\s+/g," ").trim().replace(/s$/,""):""}function Q(t){return w(t.slug)==="large language model"||w(t.name)==="large language model"}function J(t){return t.tags.includes(Y)?t.methods.filter(s=>!Q(s)):t.methods}const X=({name:t,slug:s,logoUrl:r})=>{const[n,x]=m.useState(!1);return!r||n?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:()=>x(!0)})})},ae=({paper:t,rank:s,showInstitution:r=!0,onClickTag:n,highlightQuery:x})=>{const a=E(),h=`/paper/${t.id}`,i=m.useCallback(()=>{a.prefetchQuery({queryKey:["paper-route",t.id],queryFn:()=>D.get(t.id,!0),staleTime:10*60*1e3})},[t.id,a]),o=t.authors.slice(0,3).join(", "),c=t.authors.length,f=J(t);return e.jsxs("article",{className:"paper-card",children:[s!=null&&e.jsx(y,{to:h,className:"paper-thumb-wrap",onFocus:i,onMouseEnter:i,children:e.jsx(q,{paperId:t.id,title:t.title,thumbnailUrl:t.thumbnailUrl,priority:s<=3})}),e.jsxs("div",{className:"paper-body",children:[e.jsxs("div",{className:"paper-body-main",children:[e.jsxs("h3",{className:"paper-title",children:[e.jsx(y,{to:h,onFocus:i,onMouseEnter:i,children:e.jsx(R,{title:t.title,highlight:x})}),r&&t.organizations.length>0&&e.jsx("span",{className:"paper-organization-logos",children:t.organizations.map(l=>e.jsx(X,{...l},l.slug))})]}),e.jsxs("div",{className:"paper-authors",children:[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(T,{text:t.abstract,highlight:x})}),t.sotaRanks.length>0&&e.jsx(I,{ranks:t.sotaRanks,paperHref:h}),(t.tags.length>0||f.length>0)&&e.jsxs("div",{className:"paper-tags paper-tags--clamped",children:[t.tags.map(l=>e.jsx(G,{slug:l,onClick:n},l)),f.map(l=>e.jsx(O,{method:l},l.id||l.slug||l.name))]})]}),(t.githubUrl||t.hfUrl)&&e.jsxs("div",{className:"paper-resources",children:[C(t.githubUrl)&&e.jsxs("a",{className:"paper-resource is-link",href:C(t.githubUrl)??void 0,target:"_blank",rel:"noopener noreferrer","aria-label":"Open GitHub repository",onClick:l=>l.stopPropagation(),children:[e.jsx(K,{name:"github",size:20}),t.velocity24h!=null&&t.velocity24h>0&&e.jsxs("span",{className:"resource-stat",children:[e.jsxs("span",{className:"resource-value",children:[e.jsx("span",{className:"gh-rate-arrow",children:"↑"}),ee(t.velocity24h)]}),e.jsx("span",{className:"resource-label",children:"stars / hr"})]})]}),C(t.hfUrl)&&t.hfKind&&e.jsxs("a",{className:"paper-resource is-link",href:C(t.hfUrl)??void 0,target:"_blank",rel:"noopener noreferrer","aria-label":`Open Hugging Face ${t.hfKind}`,onClick:l=>l.stopPropagation(),children:[e.jsx(U,{size:20}),e.jsxs("span",{className:"resource-stat",children:[e.jsx("span",{className:"resource-value",children:t.hfCount}),e.jsx("span",{className:"resource-label",children:t.hfKind})]})]})]})]})]})};function ee(t){return t.toFixed(1)}export{K as I,O as M,ae as P,I as S,G as T,q as a}; +import{g as E,z as m,j as e,L as y,u as S}from"./index-Dt001B3A.js";import{L as R,a as T}from"./LatexTitle-B651zAGR.js";import{h as P,d as Z,a as H,c as B}from"./transform-DgCWw6nP.js";import{p as D}from"./papers-KXkGPHI5.js";import{s as C}from"./safeExternalHref-CkBrsh84.js";const G=({slug:t,label:s,onClick:r})=>{const n=S(),x=P(t),a=B(x),h=i=>{if(i.stopPropagation(),r){r(t);return}n(`/tasks/${t}`)};return e.jsxs("span",{className:"tag-chip",style:{background:a.bg,color:a.text},onClick:h,children:[e.jsx("span",{className:"dot",style:{background:a.dot}}),Z(s||H(t),t)]})},O=({method:t,onClick:s})=>{const r=S(),n=t.slug||t.id||"";if(!n)return null;const x=a=>{if(a.stopPropagation(),s){s(n);return}r(`/methods/${n}`)};return e.jsx("span",{className:"method-chip",onClick:x,children:t.name})},$={1:"SOTA 🏆",2:"#2",3:"#3"},F=({units:t,paperHref:s})=>{const r=m.useRef(null),n=m.useRef(null),[x,a]=m.useState(t.length);if(m.useLayoutEffect(()=>{const o=r.current,c=n.current;if(!o||!c||t.length===0)return;const f=p=>(c.textContent=p,c.scrollWidth),l=()=>{const p=o.clientWidth;if(p<=0)return;let d=0,u=0;for(const N of t){const j=f(N.measureText);if(d+j<=p)d+=j,u+=1;else break}if(u0&&d+f(` · +${t.length-u} more`)>p;)u-=1,d-=f(t[u].measureText);u===0&&(u=1)}a(u)};l();const g=new ResizeObserver(l);return g.observe(o),()=>g.disconnect()},[t]),t.length===0)return null;const h=t.slice(0,Math.max(1,Math.min(x,t.length))),i=t.length-h.length;return e.jsxs("div",{className:"paper-sota",ref:r,children:[e.jsx("span",{ref:n,className:"paper-sota-measure","aria-hidden":"true"}),h.map((o,c)=>e.jsxs(m.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:$[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:f=>f.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"]})]})},I=({ranks:t,paperHref:s,wrap:r=!1})=>{const n=m.useMemo(()=>{const a=[];let h=!0;for(const i of[1,2,3]){const o=t.filter(c=>c.rank===i);o.forEach((c,f)=>{const l=f===0,g=l?`${h?"":" · "}${$[i]} on `:", ";a.push({name:c.name,slug:c.slug,rank:i,isGroupStart:l,measureText:g+c.name})}),o.length>0&&(h=!1)}return a},[t]),x=m.useMemo(()=>[1,2,3].map(a=>t.filter(i=>i.rank===a).map((i,o)=>({name:i.name,slug:i.slug,rank:a,isGroupStart:o===0,measureText:(o===0?`${$[a]} on `:", ")+i.name}))).filter(a=>a.length>0),[t]);return r?x.length===0?null:e.jsx("div",{className:"paper-sota-stack",children:x.map(a=>e.jsx(F,{units:a,paperHref:s},a[0].rank))}):n.length===0?null:e.jsx(F,{units:n,paperHref:s})},K=({name:t,size:s=14})=>{const r={search:e.jsx("path",{d:"M11 11l3 3M7 12.5a5.5 5.5 0 110-11 5.5 5.5 0 010 11z",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinecap:"round"}),arrowUp:e.jsx("path",{d:"M8 3l5 6H3l5-6z",fill:"currentColor"}),arrowLeft:e.jsx("path",{d:"M9 3l-4 5 4 5",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"}),arrowRight:e.jsx("path",{d:"M7 3l4 5-4 5",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"}),external:e.jsx("path",{d:"M5 3h-2v8h8v-2M9 3h3v3M7 9l5-5",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"}),github:e.jsx("path",{d:"M8 1a7 7 0 00-2.21 13.64c.35.06.48-.15.48-.34v-1.2c-1.95.42-2.36-.94-2.36-.94-.32-.81-.78-1.03-.78-1.03-.64-.43.05-.43.05-.43.7.05 1.07.72 1.07.72.62 1.07 1.64.76 2.04.58.06-.45.24-.76.44-.94-1.55-.18-3.18-.78-3.18-3.46 0-.76.27-1.39.72-1.88-.07-.18-.31-.89.07-1.86 0 0 .59-.19 1.92.72.56-.15 1.16-.23 1.75-.24.59 0 1.19.08 1.75.24 1.33-.9 1.92-.72 1.92-.72.38.97.14 1.68.07 1.86.45.49.72 1.12.72 1.88 0 2.69-1.64 3.28-3.19 3.45.25.22.48.65.48 1.32v1.95c0 .19.13.41.49.34A7 7 0 008 1z",fill:"currentColor"}),citation:e.jsx("path",{d:"M3 4h3v3H3zM4 7v1.5a1.5 1.5 0 01-1.5 1.5M9 4h3v3H9zM10 7v1.5a1.5 1.5 0 01-1.5 1.5",stroke:"currentColor",strokeWidth:"1.2",fill:"none"}),bookmark:e.jsx("path",{d:"M4 2h8v12l-4-3-4 3V2z",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinejoin:"round"}),chart:e.jsx("path",{d:"M2 13h12M3 11l3-4 3 2 4-5",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"}),chat:e.jsx("path",{d:"M3 3h10v7H7l-3 3v-3H3V3z",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinejoin:"round"}),pdf:e.jsx("path",{d:"M5 2h5l3 3v9H5V2z",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinejoin:"round"}),copy:e.jsx("path",{d:"M5 5h7v8H5V5zM3 3h7v2M3 3v8h2",stroke:"currentColor",strokeWidth:"1.2",fill:"none",strokeLinejoin:"round"}),sparkle:e.jsx("path",{d:"M8 2l1.2 3.8L13 7l-3.8 1.2L8 12l-1.2-3.8L3 7l3.8-1.2L8 2z",fill:"currentColor"}),user:e.jsx("path",{d:"M8 8a3 3 0 100-6 3 3 0 000 6zM2 14c0-3 2.5-5 6-5s6 2 6 5",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinecap:"round"}),globe:e.jsx("path",{d:"M8 1.5a6.5 6.5 0 100 13 6.5 6.5 0 000-13zM1.5 8h13M8 1.5c1.7 1.9 2.6 4.2 2.6 6.5s-.9 4.6-2.6 6.5M8 1.5C6.3 3.4 5.4 5.7 5.4 8s.9 4.6 2.6 6.5",stroke:"currentColor",strokeWidth:"1.2",fill:"none",strokeLinecap:"round"}),menu:e.jsx("path",{d:"M2 4h12M2 8h12M2 12h12",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"}),close:e.jsx("path",{d:"M3 3l10 10M13 3L3 13",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"})};return e.jsx("svg",{className:s===11?"icon-sm":"icon",viewBox:"0 0 16 16",width:s,height:s,children:r[t]})},U=({size:t=16})=>e.jsxs("svg",{className:"hf-logo",width:t,height:t,viewBox:"0 0 95 88",fill:"none","aria-hidden":"true",focusable:"false",children:[e.jsx("path",{fill:"#FFD21E",d:"M47.21 76.5a34.75 34.75 0 1 0 0-69.5 34.75 34.75 0 0 0 0 69.5Z"}),e.jsx("path",{fill:"#FF9D0B",d:"M81.96 41.75a34.75 34.75 0 1 0-69.5 0 34.75 34.75 0 0 0 69.5 0Zm-73.5 0a38.75 38.75 0 1 1 77.5 0 38.75 38.75 0 0 1-77.5 0Z"}),e.jsx("path",{fill:"#3A3B45",d:"M58.5 32.3c1.28.44 1.78 3.06 3.07 2.38a5 5 0 1 0-6.76-2.07c.61 1.15 2.55-.72 3.7-.32ZM34.95 32.3c-1.28.44-1.79 3.06-3.07 2.38a5 5 0 1 1 6.76-2.07c-.61 1.15-2.56-.72-3.7-.32Z"}),e.jsx("path",{fill:"#FF323D",d:"M46.96 56.29c9.83 0 13-8.76 13-13.26 0-2.34-1.57-1.6-4.09-.36-2.33 1.15-5.46 2.74-8.9 2.74-7.19 0-13-6.88-13-2.38s3.16 13.26 13 13.26Z"}),e.jsx("path",{fill:"#3A3B45",fillRule:"evenodd",clipRule:"evenodd",d:"M39.43 54a8.7 8.7 0 0 1 5.3-4.49c.4-.12.81.57 1.24 1.28.4.68.82 1.37 1.24 1.37.45 0 .9-.68 1.33-1.35.45-.7.89-1.38 1.32-1.25a8.61 8.61 0 0 1 5 4.17c3.73-2.94 5.1-7.74 5.1-10.7 0-2.34-1.57-1.6-4.09-.36l-.14.07c-2.31 1.15-5.39 2.67-8.77 2.67s-6.45-1.52-8.77-2.67c-2.6-1.29-4.23-2.1-4.23.29 0 3.05 1.46 8.06 5.47 10.97Z"}),e.jsx("path",{fill:"#FF9D0B",d:"M70.71 37a3.25 3.25 0 1 0 0-6.5 3.25 3.25 0 0 0 0 6.5ZM24.21 37a3.25 3.25 0 1 0 0-6.5 3.25 3.25 0 0 0 0 6.5ZM17.52 48c-1.62 0-3.06.66-4.07 1.87a5.97 5.97 0 0 0-1.33 3.76 7.1 7.1 0 0 0-1.94-.3c-1.55 0-2.95.59-3.94 1.66a5.8 5.8 0 0 0-.8 7 5.3 5.3 0 0 0-1.79 2.82c-.24.9-.48 2.8.8 4.74a5.22 5.22 0 0 0-.37 5.02c1.02 2.32 3.57 4.14 8.52 6.1 3.07 1.22 5.89 2 5.91 2.01a44.33 44.33 0 0 0 10.93 1.6c5.86 0 10.05-1.8 12.46-5.34 3.88-5.69 3.33-10.9-1.7-15.92-2.77-2.78-4.62-6.87-5-7.77-.78-2.66-2.84-5.62-6.25-5.62a5.7 5.7 0 0 0-4.6 2.46c-1-1.26-1.98-2.25-2.86-2.82A7.4 7.4 0 0 0 17.52 48Zm0 4c.51 0 1.14.22 1.82.65 2.14 1.36 6.25 8.43 7.76 11.18.5.92 1.37 1.31 2.14 1.31 1.55 0 2.75-1.53.15-3.48-3.92-2.93-2.55-7.72-.68-8.01.08-.02.17-.02.24-.02 1.7 0 2.45 2.93 2.45 2.93s2.2 5.52 5.98 9.3c3.77 3.77 3.97 6.8 1.22 10.83-1.88 2.75-5.47 3.58-9.16 3.58-3.81 0-7.73-.9-9.92-1.46-.11-.03-13.45-3.8-11.76-7 .28-.54.75-.76 1.34-.76 2.38 0 6.7 3.54 8.57 3.54.41 0 .7-.17.83-.6.79-2.85-12.06-4.05-10.98-8.17.2-.73.71-1.02 1.44-1.02 3.14 0 10.2 5.53 11.68 5.53.11 0 .2-.03.24-.1.74-1.2.33-2.04-4.9-5.2-5.21-3.16-8.88-5.06-6.8-7.33.24-.26.58-.38 1-.38 3.17 0 10.66 6.82 10.66 6.82s2.02 2.1 3.25 2.1c.28 0 .52-.1.68-.38.86-1.46-8.06-8.22-8.56-11.01-.34-1.9.24-2.85 1.31-2.85Z"}),e.jsx("path",{fill:"#FFD21E",d:"M38.6 76.69c2.75-4.04 2.55-7.07-1.22-10.84-3.78-3.77-5.98-9.3-5.98-9.3s-.82-3.2-2.69-2.9c-1.87.3-3.24 5.08.68 8.01 3.91 2.93-.78 4.92-2.29 2.17-1.5-2.75-5.62-9.82-7.76-11.18-2.13-1.35-3.63-.6-3.13 2.2.5 2.79 9.43 9.55 8.56 11-.87 1.47-3.93-1.71-3.93-1.71s-9.57-8.71-11.66-6.44c-2.08 2.27 1.59 4.17 6.8 7.33 5.23 3.16 5.64 4 4.9 5.2-.75 1.2-12.28-8.53-13.36-4.4-1.08 4.11 11.77 5.3 10.98 8.15-.8 2.85-9.06-5.38-10.74-2.18-1.7 3.21 11.65 6.98 11.76 7.01 4.3 1.12 15.25 3.49 19.08-2.12Z"}),e.jsx("path",{fill:"#FF9D0B",d:"M77.4 48c1.62 0 3.07.66 4.07 1.87a5.97 5.97 0 0 1 1.33 3.76 7.1 7.1 0 0 1 1.95-.3c1.55 0 2.95.59 3.94 1.66a5.8 5.8 0 0 1 .8 7 5.3 5.3 0 0 1 1.78 2.82c.24.9.48 2.8-.8 4.74a5.22 5.22 0 0 1 .37 5.02c-1.02 2.32-3.57 4.14-8.51 6.1-3.08 1.22-5.9 2-5.92 2.01a44.33 44.33 0 0 1-10.93 1.6c-5.86 0-10.05-1.8-12.46-5.34-3.88-5.69-3.33-10.9 1.7-15.92 2.78-2.78 4.63-6.87 5.01-7.77.78-2.66 2.83-5.62 6.24-5.62a5.7 5.7 0 0 1 4.6 2.46c1-1.26 1.98-2.25 2.87-2.82A7.4 7.4 0 0 1 77.4 48Zm0 4c-.51 0-1.13.22-1.82.65-2.13 1.36-6.25 8.43-7.76 11.18a2.43 2.43 0 0 1-2.14 1.31c-1.54 0-2.75-1.53-.14-3.48 3.91-2.93 2.54-7.72.67-8.01a1.54 1.54 0 0 0-.24-.02c-1.7 0-2.45 2.93-2.45 2.93s-2.2 5.52-5.97 9.3c-3.78 3.77-3.98 6.8-1.22 10.83 1.87 2.75 5.47 3.58 9.15 3.58 3.82 0 7.73-.9 9.93-1.46.1-.03 13.45-3.8 11.76-7-.29-.54-.75-.76-1.34-.76-2.38 0-6.71 3.54-8.57 3.54-.42 0-.71-.17-.83-.6-.8-2.85 12.05-4.05 10.97-8.17-.19-.73-.7-1.02-1.44-1.02-3.14 0-10.2 5.53-11.68 5.53-.1 0-.19-.03-.23-.1-.74-1.2-.34-2.04 4.88-5.2 5.23-3.16 8.9-5.06 6.8-7.33-.23-.26-.57-.38-.98-.38-3.18 0-10.67 6.82-10.67 6.82s-2.02 2.1-3.24 2.1a.74.74 0 0 1-.68-.38c-.87-1.46 8.05-8.22 8.55-11.01.34-1.9-.24-2.85-1.31-2.85Z"}),e.jsx("path",{fill:"#FFD21E",d:"M56.33 76.69c-2.75-4.04-2.56-7.07 1.22-10.84 3.77-3.77 5.97-9.3 5.97-9.3s.82-3.2 2.7-2.9c1.86.3 3.23 5.08-.68 8.01-3.92 2.93.78 4.92 2.28 2.17 1.51-2.75 5.63-9.82 7.76-11.18 2.13-1.35 3.64-.6 3.13 2.2-.5 2.79-9.42 9.55-8.55 11 .86 1.47 3.92-1.71 3.92-1.71s9.58-8.71 11.66-6.44c2.08 2.27-1.58 4.17-6.8 7.33-5.23 3.16-5.63 4-4.9 5.2.75 1.2 12.28-8.53 13.36-4.4 1.08 4.11-11.76 5.3-10.97 8.15.8 2.85 9.05-5.38 10.74-2.18 1.69 3.21-11.65 6.98-11.76 7.01-4.31 1.12-15.26 3.49-19.08-2.12Z"})]}),_=t=>{let s=2166136261;for(let r=0;r(s=Math.imul(s^s>>>15,2246822507),s=Math.imul(s^s>>>13,3266489909),s^=s>>>16,(s>>>0)%1e4/1e4)},V=({paperId:t})=>{const s=_(t),r=160,n=220,x=[.85+s()*.1,.55+s()*.25],a=.45+s()*.3,h=[],i=9+Math.floor(s()*3);for(let M=0;M.3,c=Math.floor(s()*3),f=[],l=6+Math.floor(s()*3);for(let M=0;Me.jsx("rect",{x:d+(r-d*2)*(1-M)/2,y:z+v*2.4,width:(r-d*2)*M,height:1.4,fill:p,rx:.3},`t${v}`)),e.jsx("rect",{x:d+(r-d*2)*(1-a)/2,y:W,width:(r-d*2)*a,height:.9,fill:g,opacity:.7,rx:.2}),e.jsx("rect",{x:d,y:A,width:6,height:1,fill:p,opacity:.6}),h.map((M,v)=>{const L=k+v*2.1;return L>n-d-1?null:e.jsx("rect",{x:N,y:L,width:u*M,height:.8,fill:g,opacity:.55,rx:.2},`l${v}`)}),o&&e.jsxs("g",{children:[e.jsx("rect",{x:j,y:k,width:u,height:14,fill:"#F0EBE0",stroke:g,strokeWidth:.3,opacity:.9}),c===0&&e.jsx("g",{stroke:p,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+u/2,cy:k+7,r:3.5,fill:p}),e.jsx("rect",{x:j+2,y:k+11,width:u-4,height:1.5,fill:g})]}),c===2&&e.jsxs("g",{opacity:.55,children:[e.jsx("rect",{x:j+3,y:k+5,width:u-6,height:1,fill:p}),e.jsx("rect",{x:j+6,y:k+8,width:u-12,height:.8,fill:p})]})]}),f.map((M,v)=>{const L=k+(o?16:0)+v*2.1;return L>n-d-1?null:e.jsx("rect",{x:j,y:L,width:u*M,height:.8,fill:g,opacity:.55,rx:.2},`r${v}`)})]})})},q=({paperId:t,title:s,thumbnailUrl:r,priority:n=!1})=>{const[x,a]=m.useState(!1),[h,i]=m.useState(0),[o,c]=m.useState(n),f=m.useRef(null);m.useEffect(()=>{a(!1),i(0)},[r]);const l=m.useMemo(()=>{if(!r)return null;if(h===0)return r;const g=r.includes("?")?"&":"?";return`${r}${g}retry=${h}`},[r,h]);return m.useEffect(()=>{if(n||o)return;const g=f.current;if(!g)return;const p=new IntersectionObserver(([d])=>{d.isIntersecting&&(c(!0),p.disconnect())},{rootMargin:"250px"});return p.observe(g),()=>p.disconnect()},[n,o]),r&&!x?e.jsx("div",{ref:f,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:(n||o)&&l&&e.jsx("img",{src:l,alt:`Thumbnail for ${s}`,loading:n?"eager":"lazy",decoding:"async",fetchPriority:n?"high":"auto",style:{width:"100%",height:"100%",objectFit:"contain",display:"block"},onError:()=>{if(h<1){i(g=>g+1);return}a(!0)}},l)}):e.jsx(V,{paperId:t})},Y="language-modeling";function w(t){return t?t.toLowerCase().replace(/\(.*?\)/g," ").replace(/[^a-z]+/g," ").replace(/\bllm\b/g," ").replace(/\s+/g," ").trim().replace(/s$/,""):""}function Q(t){return w(t.slug)==="large language model"||w(t.name)==="large language model"}function J(t){return t.tags.includes(Y)?t.methods.filter(s=>!Q(s)):t.methods}const X=({name:t,slug:s,logoUrl:r})=>{const[n,x]=m.useState(!1);return!r||n?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:()=>x(!0)})})},ae=({paper:t,rank:s,showInstitution:r=!0,onClickTag:n,highlightQuery:x})=>{const a=E(),h=`/paper/${t.id}`,i=m.useCallback(()=>{a.prefetchQuery({queryKey:["paper-route",t.id],queryFn:()=>D.get(t.id,!0),staleTime:10*60*1e3})},[t.id,a]),o=t.authors.slice(0,3).join(", "),c=t.authors.length,f=J(t);return e.jsxs("article",{className:"paper-card",children:[s!=null&&e.jsx(y,{to:h,className:"paper-thumb-wrap",onFocus:i,onMouseEnter:i,children:e.jsx(q,{paperId:t.id,title:t.title,thumbnailUrl:t.thumbnailUrl,priority:s<=3})}),e.jsxs("div",{className:"paper-body",children:[e.jsxs("div",{className:"paper-body-main",children:[e.jsxs("h3",{className:"paper-title",children:[e.jsx(y,{to:h,onFocus:i,onMouseEnter:i,children:e.jsx(R,{title:t.title,highlight:x})}),r&&t.organizations.length>0&&e.jsx("span",{className:"paper-organization-logos",children:t.organizations.map(l=>e.jsx(X,{...l},l.slug))})]}),e.jsxs("div",{className:"paper-authors",children:[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(T,{text:t.abstract,highlight:x})}),t.sotaRanks.length>0&&e.jsx(I,{ranks:t.sotaRanks,paperHref:h}),(t.tags.length>0||f.length>0)&&e.jsxs("div",{className:"paper-tags paper-tags--clamped",children:[t.tags.map(l=>e.jsx(G,{slug:l,onClick:n},l)),f.map(l=>e.jsx(O,{method:l},l.id||l.slug||l.name))]})]}),(t.githubUrl||t.hfUrl)&&e.jsxs("div",{className:"paper-resources",children:[C(t.githubUrl)&&e.jsxs("a",{className:"paper-resource is-link",href:C(t.githubUrl)??void 0,target:"_blank",rel:"noopener noreferrer","aria-label":"Open GitHub repository",onClick:l=>l.stopPropagation(),children:[e.jsx(K,{name:"github",size:20}),t.velocity24h!=null&&t.velocity24h>0&&e.jsxs("span",{className:"resource-stat",children:[e.jsxs("span",{className:"resource-value",children:[e.jsx("span",{className:"gh-rate-arrow",children:"↑"}),ee(t.velocity24h)]}),e.jsx("span",{className:"resource-label",children:"stars / hr"})]})]}),C(t.hfUrl)&&t.hfKind&&e.jsxs("a",{className:"paper-resource is-link",href:C(t.hfUrl)??void 0,target:"_blank",rel:"noopener noreferrer","aria-label":`Open Hugging Face ${t.hfKind}`,onClick:l=>l.stopPropagation(),children:[e.jsx(U,{size:20}),e.jsxs("span",{className:"resource-stat",children:[e.jsx("span",{className:"resource-value",children:t.hfCount}),e.jsx("span",{className:"resource-label",children:t.hfKind})]})]})]})]})]})};function ee(t){return t.toFixed(1)}export{K as I,O as M,ae as P,I as S,G as T,q as a}; diff --git a/assets/dialog-Dedt-uqk.js b/assets/dialog-Bs8pVXcH.js similarity index 99% rename from assets/dialog-Dedt-uqk.js rename to assets/dialog-Bs8pVXcH.js index 2f542345d8b2b8aaf930ae2f9889f53866affa76..2e349184c174bc5bb1139e23ac4ff41dd8a3126b 100644 --- a/assets/dialog-Dedt-uqk.js +++ b/assets/dialog-Bs8pVXcH.js @@ -1,4 +1,4 @@ -import{r as s,j as i,a2 as Z,k as K,V as R,P as h,a3 as U,h as D,m as x,p as X,l as N,a4 as Y,a5 as J,a6 as Q,a7 as ee,a8 as te,a9 as oe,X as ne,q as p}from"./index-Cry0GNHI.js";function ae(e){const t=re(e),o=s.forwardRef((a,n)=>{const{children:r,...l}=a,c=s.Children.toArray(r),d=c.find(ie);if(d){const u=d.props.children,m=c.map(v=>v===d?s.Children.count(u)>1?s.Children.only(null):s.isValidElement(u)?u.props.children:null:v);return i.jsx(t,{...l,ref:n,children:s.isValidElement(u)?s.cloneElement(u,void 0,m):null})}return i.jsx(t,{...l,ref:n,children:r})});return o.displayName=`${e}.Slot`,o}function re(e){const t=s.forwardRef((o,a)=>{const{children:n,...r}=o;if(s.isValidElement(n)){const l=ce(n),c=le(r,n.props);return n.type!==s.Fragment&&(c.ref=a?Z(a,l):l),s.cloneElement(n,c)}return s.Children.count(n)>1?s.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var se=Symbol("radix.slottable");function ie(e){return s.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===se}function le(e,t){const o={...t};for(const a in t){const n=e[a],r=t[a];/^on[A-Z]/.test(a)?n&&r?o[a]=(...c)=>{const d=r(...c);return n(...c),d}:n&&(o[a]=n):a==="style"?o[a]={...n,...r}:a==="className"&&(o[a]=[n,r].filter(Boolean).join(" "))}return{...e,...o}}function ce(e){var a,n;let t=(a=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:a.get,o=t&&"isReactWarning"in t&&t.isReactWarning;return o?e.ref:(t=(n=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:n.get,o=t&&"isReactWarning"in t&&t.isReactWarning,o?e.props.ref:e.props.ref||e.ref)}var C="Dialog",[b]=X(C),[de,f]=b(C),P=e=>{const{__scopeDialog:t,children:o,open:a,defaultOpen:n,onOpenChange:r,modal:l=!0}=e,c=s.useRef(null),d=s.useRef(null),[u,m]=K({prop:a,defaultProp:n??!1,onChange:r,caller:C});return i.jsx(de,{scope:t,triggerRef:c,contentRef:d,contentId:R(),titleId:R(),descriptionId:R(),open:u,onOpenChange:m,onOpenToggle:s.useCallback(()=>m(v=>!v),[m]),modal:l,children:o})};P.displayName=C;var O="DialogTrigger",ue=s.forwardRef((e,t)=>{const{__scopeDialog:o,...a}=e,n=f(O,o),r=N(t,n.triggerRef);return i.jsx(D.button,{type:"button","aria-haspopup":"dialog","aria-expanded":n.open,"aria-controls":n.contentId,"data-state":j(n.open),...a,ref:r,onClick:x(e.onClick,n.onOpenToggle)})});ue.displayName=O;var E="DialogPortal",[fe,I]=b(E,{forceMount:void 0}),w=e=>{const{__scopeDialog:t,forceMount:o,children:a,container:n}=e,r=f(E,t);return i.jsx(fe,{scope:t,forceMount:o,children:s.Children.map(a,l=>i.jsx(h,{present:o||r.open,children:i.jsx(U,{asChild:!0,container:n,children:l})}))})};w.displayName=E;var y="DialogOverlay",A=s.forwardRef((e,t)=>{const o=I(y,e.__scopeDialog),{forceMount:a=o.forceMount,...n}=e,r=f(y,e.__scopeDialog);return r.modal?i.jsx(h,{present:a||r.open,children:i.jsx(pe,{...n,ref:t})}):null});A.displayName=y;var ge=ae("DialogOverlay.RemoveScroll"),pe=s.forwardRef((e,t)=>{const{__scopeDialog:o,...a}=e,n=f(y,o);return i.jsx(J,{as:ge,allowPinchZoom:!0,shards:[n.contentRef],children:i.jsx(D.div,{"data-state":j(n.open),...a,ref:t,style:{pointerEvents:"auto",...a.style}})})}),g="DialogContent",T=s.forwardRef((e,t)=>{const o=I(g,e.__scopeDialog),{forceMount:a=o.forceMount,...n}=e,r=f(g,e.__scopeDialog);return i.jsx(h,{present:a||r.open,children:r.modal?i.jsx(me,{...n,ref:t}):i.jsx(xe,{...n,ref:t})})});T.displayName=g;var me=s.forwardRef((e,t)=>{const o=f(g,e.__scopeDialog),a=s.useRef(null),n=N(t,o.contentRef,a);return s.useEffect(()=>{const r=a.current;if(r)return Y(r)},[]),i.jsx(S,{...e,ref:n,trapFocus:o.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:x(e.onCloseAutoFocus,r=>{var l;r.preventDefault(),(l=o.triggerRef.current)==null||l.focus()}),onPointerDownOutside:x(e.onPointerDownOutside,r=>{const l=r.detail.originalEvent,c=l.button===0&&l.ctrlKey===!0;(l.button===2||c)&&r.preventDefault()}),onFocusOutside:x(e.onFocusOutside,r=>r.preventDefault())})}),xe=s.forwardRef((e,t)=>{const o=f(g,e.__scopeDialog),a=s.useRef(!1),n=s.useRef(!1);return i.jsx(S,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:r=>{var l,c;(l=e.onCloseAutoFocus)==null||l.call(e,r),r.defaultPrevented||(a.current||(c=o.triggerRef.current)==null||c.focus(),r.preventDefault()),a.current=!1,n.current=!1},onInteractOutside:r=>{var d,u;(d=e.onInteractOutside)==null||d.call(e,r),r.defaultPrevented||(a.current=!0,r.detail.originalEvent.type==="pointerdown"&&(n.current=!0));const l=r.target;((u=o.triggerRef.current)==null?void 0:u.contains(l))&&r.preventDefault(),r.detail.originalEvent.type==="focusin"&&n.current&&r.preventDefault()}})}),S=s.forwardRef((e,t)=>{const{__scopeDialog:o,trapFocus:a,onOpenAutoFocus:n,onCloseAutoFocus:r,...l}=e,c=f(g,o),d=s.useRef(null),u=N(t,d);return Q(),i.jsxs(i.Fragment,{children:[i.jsx(ee,{asChild:!0,loop:!0,trapped:a,onMountAutoFocus:n,onUnmountAutoFocus:r,children:i.jsx(te,{role:"dialog",id:c.contentId,"aria-describedby":c.descriptionId,"aria-labelledby":c.titleId,"data-state":j(c.open),...l,ref:u,onDismiss:()=>c.onOpenChange(!1)})}),i.jsxs(i.Fragment,{children:[i.jsx(De,{titleId:c.titleId}),i.jsx(ye,{contentRef:d,descriptionId:c.descriptionId})]})]})}),_="DialogTitle",F=s.forwardRef((e,t)=>{const{__scopeDialog:o,...a}=e,n=f(_,o);return i.jsx(D.h2,{id:n.titleId,...a,ref:t})});F.displayName=_;var M="DialogDescription",W=s.forwardRef((e,t)=>{const{__scopeDialog:o,...a}=e,n=f(M,o);return i.jsx(D.p,{id:n.descriptionId,...a,ref:t})});W.displayName=M;var $="DialogClose",k=s.forwardRef((e,t)=>{const{__scopeDialog:o,...a}=e,n=f($,o);return i.jsx(D.button,{type:"button",...a,ref:t,onClick:x(e.onClick,()=>n.onOpenChange(!1))})});k.displayName=$;function j(e){return e?"open":"closed"}var L="DialogTitleWarning",[Ie,V]=oe(L,{contentName:g,titleName:_,docsSlug:"dialog"}),De=({titleId:e})=>{const t=V(L),o=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users. +import{r as s,j as i,a2 as Z,k as K,V as R,P as h,a3 as U,h as D,m as x,p as X,l as N,a4 as Y,a5 as J,a6 as Q,a7 as ee,a8 as te,a9 as oe,X as ne,q as p}from"./index-Dt001B3A.js";function ae(e){const t=re(e),o=s.forwardRef((a,n)=>{const{children:r,...l}=a,c=s.Children.toArray(r),d=c.find(ie);if(d){const u=d.props.children,m=c.map(v=>v===d?s.Children.count(u)>1?s.Children.only(null):s.isValidElement(u)?u.props.children:null:v);return i.jsx(t,{...l,ref:n,children:s.isValidElement(u)?s.cloneElement(u,void 0,m):null})}return i.jsx(t,{...l,ref:n,children:r})});return o.displayName=`${e}.Slot`,o}function re(e){const t=s.forwardRef((o,a)=>{const{children:n,...r}=o;if(s.isValidElement(n)){const l=ce(n),c=le(r,n.props);return n.type!==s.Fragment&&(c.ref=a?Z(a,l):l),s.cloneElement(n,c)}return s.Children.count(n)>1?s.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var se=Symbol("radix.slottable");function ie(e){return s.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===se}function le(e,t){const o={...t};for(const a in t){const n=e[a],r=t[a];/^on[A-Z]/.test(a)?n&&r?o[a]=(...c)=>{const d=r(...c);return n(...c),d}:n&&(o[a]=n):a==="style"?o[a]={...n,...r}:a==="className"&&(o[a]=[n,r].filter(Boolean).join(" "))}return{...e,...o}}function ce(e){var a,n;let t=(a=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:a.get,o=t&&"isReactWarning"in t&&t.isReactWarning;return o?e.ref:(t=(n=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:n.get,o=t&&"isReactWarning"in t&&t.isReactWarning,o?e.props.ref:e.props.ref||e.ref)}var C="Dialog",[b]=X(C),[de,f]=b(C),P=e=>{const{__scopeDialog:t,children:o,open:a,defaultOpen:n,onOpenChange:r,modal:l=!0}=e,c=s.useRef(null),d=s.useRef(null),[u,m]=K({prop:a,defaultProp:n??!1,onChange:r,caller:C});return i.jsx(de,{scope:t,triggerRef:c,contentRef:d,contentId:R(),titleId:R(),descriptionId:R(),open:u,onOpenChange:m,onOpenToggle:s.useCallback(()=>m(v=>!v),[m]),modal:l,children:o})};P.displayName=C;var O="DialogTrigger",ue=s.forwardRef((e,t)=>{const{__scopeDialog:o,...a}=e,n=f(O,o),r=N(t,n.triggerRef);return i.jsx(D.button,{type:"button","aria-haspopup":"dialog","aria-expanded":n.open,"aria-controls":n.contentId,"data-state":j(n.open),...a,ref:r,onClick:x(e.onClick,n.onOpenToggle)})});ue.displayName=O;var E="DialogPortal",[fe,I]=b(E,{forceMount:void 0}),w=e=>{const{__scopeDialog:t,forceMount:o,children:a,container:n}=e,r=f(E,t);return i.jsx(fe,{scope:t,forceMount:o,children:s.Children.map(a,l=>i.jsx(h,{present:o||r.open,children:i.jsx(U,{asChild:!0,container:n,children:l})}))})};w.displayName=E;var y="DialogOverlay",A=s.forwardRef((e,t)=>{const o=I(y,e.__scopeDialog),{forceMount:a=o.forceMount,...n}=e,r=f(y,e.__scopeDialog);return r.modal?i.jsx(h,{present:a||r.open,children:i.jsx(pe,{...n,ref:t})}):null});A.displayName=y;var ge=ae("DialogOverlay.RemoveScroll"),pe=s.forwardRef((e,t)=>{const{__scopeDialog:o,...a}=e,n=f(y,o);return i.jsx(J,{as:ge,allowPinchZoom:!0,shards:[n.contentRef],children:i.jsx(D.div,{"data-state":j(n.open),...a,ref:t,style:{pointerEvents:"auto",...a.style}})})}),g="DialogContent",T=s.forwardRef((e,t)=>{const o=I(g,e.__scopeDialog),{forceMount:a=o.forceMount,...n}=e,r=f(g,e.__scopeDialog);return i.jsx(h,{present:a||r.open,children:r.modal?i.jsx(me,{...n,ref:t}):i.jsx(xe,{...n,ref:t})})});T.displayName=g;var me=s.forwardRef((e,t)=>{const o=f(g,e.__scopeDialog),a=s.useRef(null),n=N(t,o.contentRef,a);return s.useEffect(()=>{const r=a.current;if(r)return Y(r)},[]),i.jsx(S,{...e,ref:n,trapFocus:o.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:x(e.onCloseAutoFocus,r=>{var l;r.preventDefault(),(l=o.triggerRef.current)==null||l.focus()}),onPointerDownOutside:x(e.onPointerDownOutside,r=>{const l=r.detail.originalEvent,c=l.button===0&&l.ctrlKey===!0;(l.button===2||c)&&r.preventDefault()}),onFocusOutside:x(e.onFocusOutside,r=>r.preventDefault())})}),xe=s.forwardRef((e,t)=>{const o=f(g,e.__scopeDialog),a=s.useRef(!1),n=s.useRef(!1);return i.jsx(S,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:r=>{var l,c;(l=e.onCloseAutoFocus)==null||l.call(e,r),r.defaultPrevented||(a.current||(c=o.triggerRef.current)==null||c.focus(),r.preventDefault()),a.current=!1,n.current=!1},onInteractOutside:r=>{var d,u;(d=e.onInteractOutside)==null||d.call(e,r),r.defaultPrevented||(a.current=!0,r.detail.originalEvent.type==="pointerdown"&&(n.current=!0));const l=r.target;((u=o.triggerRef.current)==null?void 0:u.contains(l))&&r.preventDefault(),r.detail.originalEvent.type==="focusin"&&n.current&&r.preventDefault()}})}),S=s.forwardRef((e,t)=>{const{__scopeDialog:o,trapFocus:a,onOpenAutoFocus:n,onCloseAutoFocus:r,...l}=e,c=f(g,o),d=s.useRef(null),u=N(t,d);return Q(),i.jsxs(i.Fragment,{children:[i.jsx(ee,{asChild:!0,loop:!0,trapped:a,onMountAutoFocus:n,onUnmountAutoFocus:r,children:i.jsx(te,{role:"dialog",id:c.contentId,"aria-describedby":c.descriptionId,"aria-labelledby":c.titleId,"data-state":j(c.open),...l,ref:u,onDismiss:()=>c.onOpenChange(!1)})}),i.jsxs(i.Fragment,{children:[i.jsx(De,{titleId:c.titleId}),i.jsx(ye,{contentRef:d,descriptionId:c.descriptionId})]})]})}),_="DialogTitle",F=s.forwardRef((e,t)=>{const{__scopeDialog:o,...a}=e,n=f(_,o);return i.jsx(D.h2,{id:n.titleId,...a,ref:t})});F.displayName=_;var M="DialogDescription",W=s.forwardRef((e,t)=>{const{__scopeDialog:o,...a}=e,n=f(M,o);return i.jsx(D.p,{id:n.descriptionId,...a,ref:t})});W.displayName=M;var $="DialogClose",k=s.forwardRef((e,t)=>{const{__scopeDialog:o,...a}=e,n=f($,o);return i.jsx(D.button,{type:"button",...a,ref:t,onClick:x(e.onClick,()=>n.onOpenChange(!1))})});k.displayName=$;function j(e){return e?"open":"closed"}var L="DialogTitleWarning",[Ie,V]=oe(L,{contentName:g,titleName:_,docsSlug:"dialog"}),De=({titleId:e})=>{const t=V(L),o=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users. If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component. diff --git a/assets/external-link-DIcR472K.js b/assets/external-link-DdqhM_eg.js similarity index 89% rename from assets/external-link-DIcR472K.js rename to assets/external-link-DdqhM_eg.js index 138477e35d7e28b88b21d564c82d06bcf18ee55e..8acf8caa685b3230e8223e7f3ef879b5378056c5 100644 --- a/assets/external-link-DIcR472K.js +++ b/assets/external-link-DdqhM_eg.js @@ -1,4 +1,4 @@ -import{d as a}from"./index-Cry0GNHI.js";/** +import{d as a}from"./index-Dt001B3A.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/file-text-DXZT7Qxr.js b/assets/file-text-BXknBxd6.js similarity index 91% rename from assets/file-text-DXZT7Qxr.js rename to assets/file-text-BXknBxd6.js index e39858827aafb8a0f7558edeccf15d352f75dde4..50010e7782b631e0bd4fd18b35ff0003ca165e90 100644 --- a/assets/file-text-DXZT7Qxr.js +++ b/assets/file-text-BXknBxd6.js @@ -1,4 +1,4 @@ -import{d as e}from"./index-Cry0GNHI.js";/** +import{d as e}from"./index-Dt001B3A.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/github-D38gLg_l.js b/assets/github-TRZ4i_h7.js similarity index 92% rename from assets/github-D38gLg_l.js rename to assets/github-TRZ4i_h7.js index 2a91ddbbd6d8dc0001d99488fab80aaaad3470b6..906499d9f1047bb2e661c3dbf81399ef9d4c010b 100644 --- a/assets/github-D38gLg_l.js +++ b/assets/github-TRZ4i_h7.js @@ -1,4 +1,4 @@ -import{d as c}from"./index-Cry0GNHI.js";/** +import{d as c}from"./index-Dt001B3A.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/github-Bll0eXy5.js b/assets/github-oD2gKV6Z.js similarity index 97% rename from assets/github-Bll0eXy5.js rename to assets/github-oD2gKV6Z.js index 0801e7ccb908f3da10f66a967f412bb5c2a3e0d4..8b1bb3c2d9ae754cd42dddaa3deeb695f4940ba6 100644 --- a/assets/github-Bll0eXy5.js +++ b/assets/github-oD2gKV6Z.js @@ -1,4 +1,4 @@ -import{d as l,E as u}from"./index-Cry0GNHI.js";/** +import{d as l,E as u}from"./index-Dt001B3A.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/hover-card-CbDqfS2l.js b/assets/hover-card-C7JmPdFo.js similarity index 98% rename from assets/hover-card-CbDqfS2l.js rename to assets/hover-card-C7JmPdFo.js index 267837fb783803cfa2462d2d5a69f95d5f20e5b1..39f1d3df5f50f71d931519be415de20622be241c 100644 --- a/assets/hover-card-CbDqfS2l.js +++ b/assets/hover-card-C7JmPdFo.js @@ -1 +1 @@ -import{r as n,k as M,j as c,ab as F,ac as I,h as U,m as l,ad as T,P as O,a3 as $,p as W,l as z,a8 as B,ae as G,af as K,q}from"./index-Cry0GNHI.js";var E,g="HoverCard",[y]=W(g,[T]),w=T(),[V,S]=y(g),N=e=>{const{__scopeHoverCard:o,children:r,open:s,defaultOpen:a,onOpenChange:i,openDelay:f=700,closeDelay:v=300}=e,d=w(o),C=n.useRef(0),u=n.useRef(0),h=n.useRef(!1),p=n.useRef(!1),[m,t]=M({prop:s,defaultProp:a??!1,onChange:i,caller:g}),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]),k=n.useCallback(()=>t(!1),[t]);return n.useEffect(()=>()=>{clearTimeout(C.current),clearTimeout(u.current)},[]),c.jsx(V,{scope:o,open:m,onOpenChange:t,onOpen:x,onClose:P,onDismiss:k,hasSelectionRef:h,isPointerDownOnContentRef:p,children:c.jsx(F,{...d,children:r})})};N.displayName=g;var _="HoverCardTrigger",D=n.forwardRef((e,o)=>{const{__scopeHoverCard:r,...s}=e,a=S(_,r),i=w(r);return c.jsx(I,{asChild:!0,...i,children:c.jsx(U.a,{"data-state":a.open?"open":"closed",...s,ref:o,onPointerEnter:l(e.onPointerEnter,b(a.onOpen)),onPointerLeave:l(e.onPointerLeave,b(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,i=S(H,o);return c.jsx(J,{scope:o,forceMount:r,children:c.jsx(O,{present:r||i.open,children:c.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,i=S(R,e.__scopeHoverCard);return c.jsx(O,{present:s||i.open,children:c.jsx(X,{"data-state":i.open?"open":"closed",...a,onPointerEnter:l(e.onPointerEnter,b(i.onOpen)),onPointerLeave:l(e.onPointerLeave,b(i.onClose)),ref:o})})});A.displayName=R;var X=n.forwardRef((e,o)=>{const{__scopeHoverCard:r,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:i,onInteractOutside:f,...v}=e,d=S(R,r),C=w(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"))}),c.jsx(B,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:f,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:l(i,t=>{t.preventDefault()}),onDismiss:d.onDismiss,children:c.jsx(G,{...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=w(r);return c.jsx(K,{...a,...s,ref:o})});Z.displayName=Y;function b(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,ce=oe,ne=n.forwardRef(({className:e,align:o="center",sideOffset:r=4,...s},a)=>c.jsx(re,{children:c.jsx(L,{ref:a,align:o,sideOffset:r,className:q("z-50 w-64 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...s})}));ne.displayName=L.displayName;export{se as H,ce as a,ne as b}; +import{r as n,k as M,j as c,ab as F,ac as I,h as U,m as l,ad as T,P as O,a3 as $,p as W,l as z,a8 as B,ae as G,af as K,q}from"./index-Dt001B3A.js";var E,g="HoverCard",[y]=W(g,[T]),w=T(),[V,S]=y(g),N=e=>{const{__scopeHoverCard:o,children:r,open:s,defaultOpen:a,onOpenChange:i,openDelay:f=700,closeDelay:v=300}=e,d=w(o),C=n.useRef(0),u=n.useRef(0),h=n.useRef(!1),p=n.useRef(!1),[m,t]=M({prop:s,defaultProp:a??!1,onChange:i,caller:g}),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]),k=n.useCallback(()=>t(!1),[t]);return n.useEffect(()=>()=>{clearTimeout(C.current),clearTimeout(u.current)},[]),c.jsx(V,{scope:o,open:m,onOpenChange:t,onOpen:x,onClose:P,onDismiss:k,hasSelectionRef:h,isPointerDownOnContentRef:p,children:c.jsx(F,{...d,children:r})})};N.displayName=g;var _="HoverCardTrigger",D=n.forwardRef((e,o)=>{const{__scopeHoverCard:r,...s}=e,a=S(_,r),i=w(r);return c.jsx(I,{asChild:!0,...i,children:c.jsx(U.a,{"data-state":a.open?"open":"closed",...s,ref:o,onPointerEnter:l(e.onPointerEnter,b(a.onOpen)),onPointerLeave:l(e.onPointerLeave,b(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,i=S(H,o);return c.jsx(J,{scope:o,forceMount:r,children:c.jsx(O,{present:r||i.open,children:c.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,i=S(R,e.__scopeHoverCard);return c.jsx(O,{present:s||i.open,children:c.jsx(X,{"data-state":i.open?"open":"closed",...a,onPointerEnter:l(e.onPointerEnter,b(i.onOpen)),onPointerLeave:l(e.onPointerLeave,b(i.onClose)),ref:o})})});A.displayName=R;var X=n.forwardRef((e,o)=>{const{__scopeHoverCard:r,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:i,onInteractOutside:f,...v}=e,d=S(R,r),C=w(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"))}),c.jsx(B,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:f,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:l(i,t=>{t.preventDefault()}),onDismiss:d.onDismiss,children:c.jsx(G,{...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=w(r);return c.jsx(K,{...a,...s,ref:o})});Z.displayName=Y;function b(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,ce=oe,ne=n.forwardRef(({className:e,align:o="center",sideOffset:r=4,...s},a)=>c.jsx(re,{children:c.jsx(L,{ref:a,align:o,sideOffset:r,className:q("z-50 w-64 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...s})}));ne.displayName=L.displayName;export{se as H,ce as a,ne as b}; diff --git a/assets/index-D7CE3jjK.js b/assets/index-Byizcq9V.js similarity index 99% rename from assets/index-D7CE3jjK.js rename to assets/index-Byizcq9V.js index e77f020b6bddc9009a38e4cc90b9bc960a9bda43..3a75e1a1fbd3b19698311e3b91cd2a64f94639a3 100644 --- a/assets/index-D7CE3jjK.js +++ b/assets/index-Byizcq9V.js @@ -1,4 +1,4 @@ -import{ag as nn,S as or,j as pn}from"./index-Cry0GNHI.js";function pf(){}function mf(e){const t=[],n=String(e||"");let r=n.indexOf(","),i=0,o=!1;for(;!o;){r===-1&&(r=n.length,o=!0);const l=n.slice(i,r).trim();(l||!o)&&t.push(l),i=r+1,r=n.indexOf(",",i)}return t}function wi(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const Si=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Ci=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Ei={};function ft(e,t){return(Ei.jsx?Ci:Si).test(e)}const Ii=/[ \t\n\f\r]/g;function Ai(e){return typeof e=="object"?e.type==="text"?ht(e.value):!1:ht(e)}function ht(e){return e.replace(Ii,"")===""}class qe{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}qe.prototype.normal={};qe.prototype.property={};qe.prototype.space=void 0;function ar(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new qe(n,r,t)}function vn(e){return e.toLowerCase()}class ee{constructor(t,n){this.attribute=n,this.property=t}}ee.prototype.attribute="";ee.prototype.booleanish=!1;ee.prototype.boolean=!1;ee.prototype.commaOrSpaceSeparated=!1;ee.prototype.commaSeparated=!1;ee.prototype.defined=!1;ee.prototype.mustUseProperty=!1;ee.prototype.number=!1;ee.prototype.overloadedBoolean=!1;ee.prototype.property="";ee.prototype.spaceSeparated=!1;ee.prototype.space=void 0;let Ti=0;const D=Ie(),W=Ie(),zn=Ie(),S=Ie(),V=Ie(),De=Ie(),te=Ie();function Ie(){return 2**++Ti}const Dn=Object.freeze(Object.defineProperty({__proto__:null,boolean:D,booleanish:W,commaOrSpaceSeparated:te,commaSeparated:De,number:S,overloadedBoolean:zn,spaceSeparated:V},Symbol.toStringTag,{value:"Module"})),mn=Object.keys(Dn);class Hn extends ee{constructor(t,n,r,i){let o=-1;if(super(t,n),pt(this,"space",i),typeof r=="number")for(;++o4&&n.slice(0,4)==="data"&&Li.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(mt,_i);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!mt.test(o)){let l=o.replace(Di,Ri);l.charAt(0)!=="-"&&(l="-"+l),t="data"+l}}i=Hn}return new i(r,t)}function Ri(e){return"-"+e.toLowerCase()}function _i(e){return e.charAt(1).toUpperCase()}const Oi=ar([ur,Pi,fr,hr,pr],"html"),Un=ar([ur,vi,fr,hr,pr],"svg");function gf(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function Mi(e){return e.join(" ").trim()}var Vn={},gt=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,Ni=/\n/g,Bi=/^\s*/,ji=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,Hi=/^:\s*/,Ui=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,Vi=/^[;\s]*/,$i=/^\s+|\s+$/g,qi=` +import{ag as nn,S as or,j as pn}from"./index-Dt001B3A.js";function pf(){}function mf(e){const t=[],n=String(e||"");let r=n.indexOf(","),i=0,o=!1;for(;!o;){r===-1&&(r=n.length,o=!0);const l=n.slice(i,r).trim();(l||!o)&&t.push(l),i=r+1,r=n.indexOf(",",i)}return t}function wi(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const Si=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Ci=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Ei={};function ft(e,t){return(Ei.jsx?Ci:Si).test(e)}const Ii=/[ \t\n\f\r]/g;function Ai(e){return typeof e=="object"?e.type==="text"?ht(e.value):!1:ht(e)}function ht(e){return e.replace(Ii,"")===""}class qe{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}qe.prototype.normal={};qe.prototype.property={};qe.prototype.space=void 0;function ar(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new qe(n,r,t)}function vn(e){return e.toLowerCase()}class ee{constructor(t,n){this.attribute=n,this.property=t}}ee.prototype.attribute="";ee.prototype.booleanish=!1;ee.prototype.boolean=!1;ee.prototype.commaOrSpaceSeparated=!1;ee.prototype.commaSeparated=!1;ee.prototype.defined=!1;ee.prototype.mustUseProperty=!1;ee.prototype.number=!1;ee.prototype.overloadedBoolean=!1;ee.prototype.property="";ee.prototype.spaceSeparated=!1;ee.prototype.space=void 0;let Ti=0;const D=Ie(),W=Ie(),zn=Ie(),S=Ie(),V=Ie(),De=Ie(),te=Ie();function Ie(){return 2**++Ti}const Dn=Object.freeze(Object.defineProperty({__proto__:null,boolean:D,booleanish:W,commaOrSpaceSeparated:te,commaSeparated:De,number:S,overloadedBoolean:zn,spaceSeparated:V},Symbol.toStringTag,{value:"Module"})),mn=Object.keys(Dn);class Hn extends ee{constructor(t,n,r,i){let o=-1;if(super(t,n),pt(this,"space",i),typeof r=="number")for(;++o4&&n.slice(0,4)==="data"&&Li.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(mt,_i);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!mt.test(o)){let l=o.replace(Di,Ri);l.charAt(0)!=="-"&&(l="-"+l),t="data"+l}}i=Hn}return new i(r,t)}function Ri(e){return"-"+e.toLowerCase()}function _i(e){return e.charAt(1).toUpperCase()}const Oi=ar([ur,Pi,fr,hr,pr],"html"),Un=ar([ur,vi,fr,hr,pr],"svg");function gf(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function Mi(e){return e.join(" ").trim()}var Vn={},gt=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,Ni=/\n/g,Bi=/^\s*/,ji=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,Hi=/^:\s*/,Ui=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,Vi=/^[;\s]*/,$i=/^\s+|\s+$/g,qi=` `,dt="/",yt="*",Ce="",Wi="comment",Yi="declaration";function Xi(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function i(d){var x=d.match(Ni);x&&(n+=x.length);var C=d.lastIndexOf(qi);r=~C?d.length-C:r+d.length}function o(){var d={line:n,column:r};return function(x){return x.position=new l(d),s(),x}}function l(d){this.start=d,this.end={line:n,column:r},this.source=t.source}l.prototype.content=e;function a(d){var x=new Error(t.source+":"+n+":"+r+": "+d);if(x.reason=d,x.filename=t.source,x.line=n,x.column=r,x.source=e,!t.silent)throw x}function u(d){var x=d.exec(e);if(x){var C=x[0];return i(C),e=e.slice(C.length),x}}function s(){u(Bi)}function f(d){var x;for(d=d||[];x=c();)x!==!1&&d.push(x);return d}function c(){var d=o();if(!(dt!=e.charAt(0)||yt!=e.charAt(1))){for(var x=2;Ce!=e.charAt(x)&&(yt!=e.charAt(x)||dt!=e.charAt(x+1));)++x;if(x+=2,Ce===e.charAt(x-1))return a("End of comment missing");var C=e.slice(2,x-2);return r+=2,i(C),e=e.slice(x),r+=2,d({type:Wi,comment:C})}}function p(){var d=o(),x=u(ji);if(x){if(c(),!u(Hi))return a("property missing ':'");var C=u(Ui),y=d({type:Yi,property:kt(x[0].replace(gt,Ce)),value:C?kt(C[0].replace(gt,Ce)):Ce});return u(Vi),y}}function h(){var d=[];f(d);for(var x;x=p();)x!==!1&&(d.push(x),f(d));return d}return s(),h()}function kt(e){return e?e.replace($i,Ce):Ce}var Qi=Xi,Gi=nn&&nn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Vn,"__esModule",{value:!0});Vn.default=Ji;const Ki=Gi(Qi);function Ji(e,t){let n=null;if(!e||typeof e!="string")return n;const r=(0,Ki.default)(e),i=typeof t=="function";return r.forEach(o=>{if(o.type!=="declaration")return;const{property:l,value:a}=o;i?t(l,a,o):a&&(n=n||{},n[l]=a)}),n}var an={};Object.defineProperty(an,"__esModule",{value:!0});an.camelCase=void 0;var Zi=/^--[a-zA-Z0-9_-]+$/,el=/-([a-z])/g,nl=/^[^-]+$/,tl=/^-(webkit|moz|ms|o|khtml)-/,rl=/^-(ms)-/,il=function(e){return!e||nl.test(e)||Zi.test(e)},ll=function(e,t){return t.toUpperCase()},xt=function(e,t){return"".concat(t,"-")},ol=function(e,t){return t===void 0&&(t={}),il(e)?e:(e=e.toLowerCase(),t.reactCompat?e=e.replace(rl,xt):e=e.replace(tl,xt),e.replace(el,ll))};an.camelCase=ol;var al=nn&&nn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},ul=al(Vn),sl=an;function Ln(e,t){var n={};return!e||typeof e!="string"||(0,ul.default)(e,function(r,i){r&&i&&(n[(0,sl.camelCase)(r,t)]=i)}),n}Ln.default=Ln;var cl=Ln;const fl=or(cl),mr=gr("end"),$n=gr("start");function gr(e){return t;function t(n){const r=n&&n.position&&n.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 hl(e){const t=$n(e),n=mr(e);if(t&&n)return{start:t,end:n}}function je(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?bt(e.position):"start"in e||"end"in e?bt(e):"line"in e||"column"in e?Fn(e):""}function Fn(e){return wt(e&&e.line)+":"+wt(e&&e.column)}function bt(e){return Fn(e&&e.start)+"-"+Fn(e&&e.end)}function wt(e){return e&&typeof e=="number"?e:1}class K extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",o={},l=!1;if(n&&("line"in n&&"column"in n?o={place:n}:"start"in n&&"end"in n?o={place:n}:"type"in n?o={ancestors:[n],place:n.position}:o={...n}),typeof t=="string"?i=t:!o.cause&&t&&(l=!0,i=t.message,o.cause=t),!o.ruleId&&!o.source&&typeof r=="string"){const u=r.indexOf(":");u===-1?o.ruleId=r:(o.source=r.slice(0,u),o.ruleId=r.slice(u+1))}if(!o.place&&o.ancestors&&o.ancestors){const u=o.ancestors[o.ancestors.length-1];u&&(o.place=u.position)}const a=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.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=je(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=l&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}K.prototype.file="";K.prototype.name="";K.prototype.reason="";K.prototype.message="";K.prototype.stack="";K.prototype.column=void 0;K.prototype.line=void 0;K.prototype.ancestors=void 0;K.prototype.cause=void 0;K.prototype.fatal=void 0;K.prototype.place=void 0;K.prototype.ruleId=void 0;K.prototype.source=void 0;const qn={}.hasOwnProperty,pl=new Map,ml=/[A-Z]/g,gl=new Set(["table","tbody","thead","tfoot","tr"]),dl=new Set(["td","th"]),dr="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function yl(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=Il(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=El(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?Un:Oi,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},o=yr(i,e,void 0);return o&&typeof o!="string"?o:i.create(e,i.Fragment,{children:o||void 0},void 0)}function yr(e,t,n){if(t.type==="element")return kl(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return xl(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return wl(e,t,n);if(t.type==="mdxjsEsm")return bl(e,t);if(t.type==="root")return Sl(e,t,n);if(t.type==="text")return Cl(e,t)}function kl(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=Un,e.schema=i),e.ancestors.push(t);const o=xr(e,t.tagName,!1),l=Al(e,t);let a=Yn(e,t);return gl.has(t.tagName)&&(a=a.filter(function(u){return typeof u=="string"?!Ai(u):!0})),kr(e,l,o,t),Wn(l,a),e.ancestors.pop(),e.schema=r,e.create(t,o,l,n)}function xl(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}Ve(e,t.position)}function bl(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Ve(e,t.position)}function wl(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=Un,e.schema=i),e.ancestors.push(t);const o=t.name===null?e.Fragment:xr(e,t.name,!0),l=Tl(e,t),a=Yn(e,t);return kr(e,l,o,t),Wn(l,a),e.ancestors.pop(),e.schema=r,e.create(t,o,l,n)}function Sl(e,t,n){const r={};return Wn(r,Yn(e,t)),e.create(t,e.Fragment,r,n)}function Cl(e,t){return t.value}function kr(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Wn(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function El(e,t,n){return r;function r(i,o,l,a){const s=Array.isArray(l.children)?n:t;return a?s(o,l,a):s(o,l)}}function Il(e,t){return n;function n(r,i,o,l){const a=Array.isArray(o.children),u=$n(r);return t(i,o,l,a,{columnNumber:u?u.column-1:void 0,fileName:e,lineNumber:u?u.line:void 0},void 0)}}function Al(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&qn.call(t.properties,i)){const o=Pl(e,i,t.properties[i]);if(o){const[l,a]=o;e.tableCellAlignToStyle&&l==="align"&&typeof a=="string"&&dl.has(t.tagName)?r=a:n[l]=a}}if(r){const o=n.style||(n.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function Tl(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const o=r.data.estree.body[0];o.type;const l=o.expression;l.type;const a=l.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else Ve(e,t.position);else{const i=r.name;let o;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,o=e.evaluater.evaluateExpression(a.expression)}else Ve(e,t.position);else o=r.value===null?!0:r.value;n[i]=o}return n}function Yn(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:pl;for(;++ri?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)l=Array.from(r),l.unshift(t,n),e.splice(...l);else for(n&&e.splice(t,n);o0?(re(e,e.length,0,t),e):t}const Et={}.hasOwnProperty;function wr(e){const t={};let n=-1;for(;++n13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function se(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const J=xe(/[A-Za-z]/),G=xe(/[\dA-Za-z]/),Ml=xe(/[#-'*+\--9=?A-Z^-~]/);function tn(e){return e!==null&&(e<32||e===127)}const Rn=xe(/\d/),Nl=xe(/[\dA-Fa-f]/),Bl=xe(/[!-/:-@[-`{-~]/);function v(e){return e!==null&&e<-2}function U(e){return e!==null&&(e<0||e===32)}function R(e){return e===-2||e===-1||e===32}const un=xe(new RegExp("\\p{P}|\\p{S}","u")),Ee=xe(/\s/);function xe(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Re(e){const t=[];let n=-1,r=0,i=0;for(;++n55295&&o<57344){const a=e.charCodeAt(n+1);o<56320&&a>56319&&a<57344?(l=String.fromCharCode(o,a),i=1):l="�"}else l=String.fromCharCode(o);l&&(t.push(e.slice(r,n),encodeURIComponent(l)),r=n+i+1,l=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function O(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let o=0;return l;function l(u){return R(u)?(e.enter(n),a(u)):t(u)}function a(u){return R(u)&&o++l))return;const M=t.events.length;let $=M,B,k;for(;$--;)if(t.events[$][0]==="exit"&&t.events[$][1].type==="chunkFlow"){if(B){k=t.events[$][1].end;break}B=!0}for(y(r),w=M;wE;){const F=n[L];t.containerState=F[1],F[0].exit.call(t,e)}n.length=E}function A(){i.write([null]),o=void 0,i=void 0,t.containerState._closeFlow=void 0}}function $l(e,t,n){return O(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Le(e){if(e===null||U(e)||Ee(e))return 1;if(un(e))return 2}function sn(e,t,n){const r=[];let i=-1;for(;++i1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const c={...e[r][1].end},p={...e[n][1].start};At(c,-u),At(p,u),l={type:u>1?"strongSequence":"emphasisSequence",start:c,end:{...e[r][1].end}},a={type:u>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:p},o={type:u>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:u>1?"strong":"emphasis",start:{...l.start},end:{...a.end}},e[r][1].end={...l.start},e[n][1].start={...a.end},s=[],e[r][1].end.offset-e[r][1].start.offset&&(s=ie(s,[["enter",e[r][1],t],["exit",e[r][1],t]])),s=ie(s,[["enter",i,t],["enter",l,t],["exit",l,t],["enter",o,t]]),s=ie(s,sn(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),s=ie(s,[["exit",o,t],["enter",a,t],["exit",a,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(f=2,s=ie(s,[["enter",e[n][1],t],["exit",e[n][1],t]])):f=0,re(e,r-1,n-r+3,s),n=r+s.length-f-2;break}}for(n=-1;++n0&&R(w)?O(e,A,"linePrefix",o+1)(w):A(w)}function A(w){return w===null||v(w)?e.check(Tt,x,L)(w):(e.enter("codeFlowValue"),E(w))}function E(w){return w===null||v(w)?(e.exit("codeFlowValue"),A(w)):(e.consume(w),E)}function L(w){return e.exit("codeFenced"),t(w)}function F(w,M,$){let B=0;return k;function k(N){return w.enter("lineEnding"),w.consume(N),w.exit("lineEnding"),T}function T(N){return w.enter("codeFencedFence"),R(N)?O(w,P,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(N):P(N)}function P(N){return N===a?(w.enter("codeFencedFenceSequence"),j(N)):$(N)}function j(N){return N===a?(B++,w.consume(N),j):B>=l?(w.exit("codeFencedFenceSequence"),R(N)?O(w,q,"whitespace")(N):q(N)):$(N)}function q(N){return N===null||v(N)?(w.exit("codeFencedFence"),M(N)):$(N)}}}function to(e,t,n){const r=this;return i;function i(l){return l===null?n(l):(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o)}function o(l){return r.parser.lazy[r.now().line]?n(l):t(l)}}const dn={name:"codeIndented",tokenize:io},ro={partial:!0,tokenize:lo};function io(e,t,n){const r=this;return i;function i(s){return e.enter("codeIndented"),O(e,o,"linePrefix",5)(s)}function o(s){const f=r.events[r.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?l(s):n(s)}function l(s){return s===null?u(s):v(s)?e.attempt(ro,l,u)(s):(e.enter("codeFlowValue"),a(s))}function a(s){return s===null||v(s)?(e.exit("codeFlowValue"),l(s)):(e.consume(s),a)}function u(s){return e.exit("codeIndented"),t(s)}}function lo(e,t,n){const r=this;return i;function i(l){return r.parser.lazy[r.now().line]?n(l):v(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),i):O(e,o,"linePrefix",5)(l)}function o(l){const a=r.events[r.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?t(l):v(l)?i(l):n(l)}}const oo={name:"codeText",previous:uo,resolve:ao,tokenize:so};function ao(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return tthis.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const o=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&Ne(this.left,r),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Ne(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Ne(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t=4?t(l):e.interrupt(r.parser.constructs.flow,n,t)(l)}}function Tr(e,t,n,r,i,o,l,a,u){const s=u||Number.POSITIVE_INFINITY;let f=0;return c;function c(y){return y===60?(e.enter(r),e.enter(i),e.enter(o),e.consume(y),e.exit(o),p):y===null||y===32||y===41||tn(y)?n(y):(e.enter(r),e.enter(l),e.enter(a),e.enter("chunkString",{contentType:"string"}),x(y))}function p(y){return y===62?(e.enter(o),e.consume(y),e.exit(o),e.exit(i),e.exit(r),t):(e.enter(a),e.enter("chunkString",{contentType:"string"}),h(y))}function h(y){return y===62?(e.exit("chunkString"),e.exit(a),p(y)):y===null||y===60||v(y)?n(y):(e.consume(y),y===92?d:h)}function d(y){return y===60||y===62||y===92?(e.consume(y),h):h(y)}function x(y){return!f&&(y===null||y===41||U(y))?(e.exit("chunkString"),e.exit(a),e.exit(l),e.exit(r),t(y)):f999||h===null||h===91||h===93&&!u||h===94&&!a&&"_hiddenFootnoteSupport"in l.parser.constructs?n(h):h===93?(e.exit(o),e.enter(i),e.consume(h),e.exit(i),e.exit(r),t):v(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),f):(e.enter("chunkString",{contentType:"string"}),c(h))}function c(h){return h===null||h===91||h===93||v(h)||a++>999?(e.exit("chunkString"),f(h)):(e.consume(h),u||(u=!R(h)),h===92?p:c)}function p(h){return h===91||h===92||h===93?(e.consume(h),a++,c):c(h)}}function vr(e,t,n,r,i,o){let l;return a;function a(p){return p===34||p===39||p===40?(e.enter(r),e.enter(i),e.consume(p),e.exit(i),l=p===40?41:p,u):n(p)}function u(p){return p===l?(e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):(e.enter(o),s(p))}function s(p){return p===l?(e.exit(o),u(l)):p===null?n(p):v(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),O(e,s,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),f(p))}function f(p){return p===l||p===null||v(p)?(e.exit("chunkString"),s(p)):(e.consume(p),p===92?c:f)}function c(p){return p===l||p===92?(e.consume(p),f):f(p)}}function He(e,t){let n;return r;function r(i){return v(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):R(i)?O(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const ko={name:"definition",tokenize:bo},xo={partial:!0,tokenize:wo};function bo(e,t,n){const r=this;let i;return o;function o(h){return e.enter("definition"),l(h)}function l(h){return Pr.call(r,e,a,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(h)}function a(h){return i=se(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),h===58?(e.enter("definitionMarker"),e.consume(h),e.exit("definitionMarker"),u):n(h)}function u(h){return U(h)?He(e,s)(h):s(h)}function s(h){return Tr(e,f,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(h)}function f(h){return e.attempt(xo,c,c)(h)}function c(h){return R(h)?O(e,p,"whitespace")(h):p(h)}function p(h){return h===null||v(h)?(e.exit("definition"),r.parser.defined.push(i),t(h)):n(h)}}function wo(e,t,n){return r;function r(a){return U(a)?He(e,i)(a):n(a)}function i(a){return vr(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function o(a){return R(a)?O(e,l,"whitespace")(a):l(a)}function l(a){return a===null||v(a)?t(a):n(a)}}const So={name:"hardBreakEscape",tokenize:Co};function Co(e,t,n){return r;function r(o){return e.enter("hardBreakEscape"),e.consume(o),i}function i(o){return v(o)?(e.exit("hardBreakEscape"),t(o)):n(o)}}const Eo={name:"headingAtx",resolve:Io,tokenize:Ao};function Io(e,t){let n=e.length-2,r=3,i,o;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},o={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},re(e,r,n-r+1,[["enter",i,t],["enter",o,t],["exit",o,t],["exit",i,t]])),e}function Ao(e,t,n){let r=0;return i;function i(f){return e.enter("atxHeading"),o(f)}function o(f){return e.enter("atxHeadingSequence"),l(f)}function l(f){return f===35&&r++<6?(e.consume(f),l):f===null||U(f)?(e.exit("atxHeadingSequence"),a(f)):n(f)}function a(f){return f===35?(e.enter("atxHeadingSequence"),u(f)):f===null||v(f)?(e.exit("atxHeading"),t(f)):R(f)?O(e,a,"whitespace")(f):(e.enter("atxHeadingText"),s(f))}function u(f){return f===35?(e.consume(f),u):(e.exit("atxHeadingSequence"),a(f))}function s(f){return f===null||f===35||U(f)?(e.exit("atxHeadingText"),a(f)):(e.consume(f),s)}}const To=["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"],vt=["pre","script","style","textarea"],Po={concrete:!0,name:"htmlFlow",resolveTo:Do,tokenize:Lo},vo={partial:!0,tokenize:Ro},zo={partial:!0,tokenize:Fo};function Do(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function Lo(e,t,n){const r=this;let i,o,l,a,u;return s;function s(g){return f(g)}function f(g){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(g),c}function c(g){return g===33?(e.consume(g),p):g===47?(e.consume(g),o=!0,x):g===63?(e.consume(g),i=3,r.interrupt?t:m):J(g)?(e.consume(g),l=String.fromCharCode(g),C):n(g)}function p(g){return g===45?(e.consume(g),i=2,h):g===91?(e.consume(g),i=5,a=0,d):J(g)?(e.consume(g),i=4,r.interrupt?t:m):n(g)}function h(g){return g===45?(e.consume(g),r.interrupt?t:m):n(g)}function d(g){const ae="CDATA[";return g===ae.charCodeAt(a++)?(e.consume(g),a===ae.length?r.interrupt?t:P:d):n(g)}function x(g){return J(g)?(e.consume(g),l=String.fromCharCode(g),C):n(g)}function C(g){if(g===null||g===47||g===62||U(g)){const ae=g===47,be=l.toLowerCase();return!ae&&!o&&vt.includes(be)?(i=1,r.interrupt?t(g):P(g)):To.includes(l.toLowerCase())?(i=6,ae?(e.consume(g),y):r.interrupt?t(g):P(g)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(g):o?A(g):E(g))}return g===45||G(g)?(e.consume(g),l+=String.fromCharCode(g),C):n(g)}function y(g){return g===62?(e.consume(g),r.interrupt?t:P):n(g)}function A(g){return R(g)?(e.consume(g),A):k(g)}function E(g){return g===47?(e.consume(g),k):g===58||g===95||J(g)?(e.consume(g),L):R(g)?(e.consume(g),E):k(g)}function L(g){return g===45||g===46||g===58||g===95||G(g)?(e.consume(g),L):F(g)}function F(g){return g===61?(e.consume(g),w):R(g)?(e.consume(g),F):E(g)}function w(g){return g===null||g===60||g===61||g===62||g===96?n(g):g===34||g===39?(e.consume(g),u=g,M):R(g)?(e.consume(g),w):$(g)}function M(g){return g===u?(e.consume(g),u=null,B):g===null||v(g)?n(g):(e.consume(g),M)}function $(g){return g===null||g===34||g===39||g===47||g===60||g===61||g===62||g===96||U(g)?F(g):(e.consume(g),$)}function B(g){return g===47||g===62||R(g)?E(g):n(g)}function k(g){return g===62?(e.consume(g),T):n(g)}function T(g){return g===null||v(g)?P(g):R(g)?(e.consume(g),T):n(g)}function P(g){return g===45&&i===2?(e.consume(g),Q):g===60&&i===1?(e.consume(g),Y):g===62&&i===4?(e.consume(g),oe):g===63&&i===3?(e.consume(g),m):g===93&&i===5?(e.consume(g),he):v(g)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(vo,pe,j)(g)):g===null||v(g)?(e.exit("htmlFlowData"),j(g)):(e.consume(g),P)}function j(g){return e.check(zo,q,pe)(g)}function q(g){return e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),N}function N(g){return g===null||v(g)?j(g):(e.enter("htmlFlowData"),P(g))}function Q(g){return g===45?(e.consume(g),m):P(g)}function Y(g){return g===47?(e.consume(g),l="",le):P(g)}function le(g){if(g===62){const ae=l.toLowerCase();return vt.includes(ae)?(e.consume(g),oe):P(g)}return J(g)&&l.length<8?(e.consume(g),l+=String.fromCharCode(g),le):P(g)}function he(g){return g===93?(e.consume(g),m):P(g)}function m(g){return g===62?(e.consume(g),oe):g===45&&i===2?(e.consume(g),m):P(g)}function oe(g){return g===null||v(g)?(e.exit("htmlFlowData"),pe(g)):(e.consume(g),oe)}function pe(g){return e.exit("htmlFlow"),t(g)}}function Fo(e,t,n){const r=this;return i;function i(l){return v(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o):n(l)}function o(l){return r.parser.lazy[r.now().line]?n(l):t(l)}}function Ro(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(We,t,n)}}const _o={name:"htmlText",tokenize:Oo};function Oo(e,t,n){const r=this;let i,o,l;return a;function a(m){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(m),u}function u(m){return m===33?(e.consume(m),s):m===47?(e.consume(m),F):m===63?(e.consume(m),E):J(m)?(e.consume(m),$):n(m)}function s(m){return m===45?(e.consume(m),f):m===91?(e.consume(m),o=0,d):J(m)?(e.consume(m),A):n(m)}function f(m){return m===45?(e.consume(m),h):n(m)}function c(m){return m===null?n(m):m===45?(e.consume(m),p):v(m)?(l=c,Y(m)):(e.consume(m),c)}function p(m){return m===45?(e.consume(m),h):c(m)}function h(m){return m===62?Q(m):m===45?p(m):c(m)}function d(m){const oe="CDATA[";return m===oe.charCodeAt(o++)?(e.consume(m),o===oe.length?x:d):n(m)}function x(m){return m===null?n(m):m===93?(e.consume(m),C):v(m)?(l=x,Y(m)):(e.consume(m),x)}function C(m){return m===93?(e.consume(m),y):x(m)}function y(m){return m===62?Q(m):m===93?(e.consume(m),y):x(m)}function A(m){return m===null||m===62?Q(m):v(m)?(l=A,Y(m)):(e.consume(m),A)}function E(m){return m===null?n(m):m===63?(e.consume(m),L):v(m)?(l=E,Y(m)):(e.consume(m),E)}function L(m){return m===62?Q(m):E(m)}function F(m){return J(m)?(e.consume(m),w):n(m)}function w(m){return m===45||G(m)?(e.consume(m),w):M(m)}function M(m){return v(m)?(l=M,Y(m)):R(m)?(e.consume(m),M):Q(m)}function $(m){return m===45||G(m)?(e.consume(m),$):m===47||m===62||U(m)?B(m):n(m)}function B(m){return m===47?(e.consume(m),Q):m===58||m===95||J(m)?(e.consume(m),k):v(m)?(l=B,Y(m)):R(m)?(e.consume(m),B):Q(m)}function k(m){return m===45||m===46||m===58||m===95||G(m)?(e.consume(m),k):T(m)}function T(m){return m===61?(e.consume(m),P):v(m)?(l=T,Y(m)):R(m)?(e.consume(m),T):B(m)}function P(m){return m===null||m===60||m===61||m===62||m===96?n(m):m===34||m===39?(e.consume(m),i=m,j):v(m)?(l=P,Y(m)):R(m)?(e.consume(m),P):(e.consume(m),q)}function j(m){return m===i?(e.consume(m),i=void 0,N):m===null?n(m):v(m)?(l=j,Y(m)):(e.consume(m),j)}function q(m){return m===null||m===34||m===39||m===60||m===61||m===96?n(m):m===47||m===62||U(m)?B(m):(e.consume(m),q)}function N(m){return m===47||m===62||U(m)?B(m):n(m)}function Q(m){return m===62?(e.consume(m),e.exit("htmlTextData"),e.exit("htmlText"),t):n(m)}function Y(m){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),le}function le(m){return R(m)?O(e,he,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(m):he(m)}function he(m){return e.enter("htmlTextData"),l(m)}}const Gn={name:"labelEnd",resolveAll:jo,resolveTo:Ho,tokenize:Uo},Mo={tokenize:Vo},No={tokenize:$o},Bo={tokenize:qo};function jo(e){let t=-1;const n=[];for(;++t=3&&(s===null||v(s))?(e.exit("thematicBreak"),t(s)):n(s)}function u(s){return s===i?(e.consume(s),r++,u):(e.exit("thematicBreakSequence"),R(s)?O(e,a,"whitespace")(s):a(s))}}const Z={continuation:{tokenize:na},exit:ra,name:"list",tokenize:ea},Jo={partial:!0,tokenize:ia},Zo={partial:!0,tokenize:ta};function ea(e,t,n){const r=this,i=r.events[r.events.length-1];let o=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,l=0;return a;function a(h){const d=r.containerState.type||(h===42||h===43||h===45?"listUnordered":"listOrdered");if(d==="listUnordered"?!r.containerState.marker||h===r.containerState.marker:Rn(h)){if(r.containerState.type||(r.containerState.type=d,e.enter(d,{_container:!0})),d==="listUnordered")return e.enter("listItemPrefix"),h===42||h===45?e.check(Ze,n,s)(h):s(h);if(!r.interrupt||h===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),u(h)}return n(h)}function u(h){return Rn(h)&&++l<10?(e.consume(h),u):(!r.interrupt||l<2)&&(r.containerState.marker?h===r.containerState.marker:h===41||h===46)?(e.exit("listItemValue"),s(h)):n(h)}function s(h){return e.enter("listItemMarker"),e.consume(h),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||h,e.check(We,r.interrupt?n:f,e.attempt(Jo,p,c))}function f(h){return r.containerState.initialBlankLine=!0,o++,p(h)}function c(h){return R(h)?(e.enter("listItemPrefixWhitespace"),e.consume(h),e.exit("listItemPrefixWhitespace"),p):n(h)}function p(h){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(h)}}function na(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(We,i,o);function i(a){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,O(e,t,"listItemIndent",r.containerState.size+1)(a)}function o(a){return r.containerState.furtherBlankLines||!R(a)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,l(a)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Zo,t,l)(a))}function l(a){return r.containerState._closeFlow=!0,r.interrupt=void 0,O(e,e.attempt(Z,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function ta(e,t,n){const r=this;return O(e,i,"listItemIndent",r.containerState.size+1);function i(o){const l=r.events[r.events.length-1];return l&&l[1].type==="listItemIndent"&&l[2].sliceSerialize(l[1],!0).length===r.containerState.size?t(o):n(o)}}function ra(e){e.exit(this.containerState.type)}function ia(e,t,n){const r=this;return O(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(o){const l=r.events[r.events.length-1];return!R(o)&&l&&l[1].type==="listItemPrefixWhitespace"?t(o):n(o)}}const zt={name:"setextUnderline",resolveTo:la,tokenize:oa};function la(e,t){let n=e.length,r,i,o;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!o&&e[n][1].type==="definition"&&(o=n);const l={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",o?(e.splice(i,0,["enter",l,t]),e.splice(o+1,0,["exit",e[r][1],t]),e[r][1].end={...e[o][1].end}):e[r][1]=l,e.push(["exit",l,t]),e}function oa(e,t,n){const r=this;let i;return o;function o(s){let f=r.events.length,c;for(;f--;)if(r.events[f][1].type!=="lineEnding"&&r.events[f][1].type!=="linePrefix"&&r.events[f][1].type!=="content"){c=r.events[f][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||c)?(e.enter("setextHeadingLine"),i=s,l(s)):n(s)}function l(s){return e.enter("setextHeadingLineSequence"),a(s)}function a(s){return s===i?(e.consume(s),a):(e.exit("setextHeadingLineSequence"),R(s)?O(e,u,"lineSuffix")(s):u(s))}function u(s){return s===null||v(s)?(e.exit("setextHeadingLine"),t(s)):n(s)}}const aa={tokenize:ua};function ua(e){const t=this,n=e.attempt(We,r,e.attempt(this.parser.constructs.flowInitial,i,O(e,e.attempt(this.parser.constructs.flow,i,e.attempt(ho,i)),"linePrefix")));return n;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const sa={resolveAll:Dr()},ca=zr("string"),fa=zr("text");function zr(e){return{resolveAll:Dr(e==="text"?ha:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],o=n.attempt(i,l,a);return l;function l(f){return s(f)?o(f):a(f)}function a(f){if(f===null){n.consume(f);return}return n.enter("data"),n.consume(f),u}function u(f){return s(f)?(n.exit("data"),o(f)):(n.consume(f),u)}function s(f){if(f===null)return!0;const c=i[f];let p=-1;if(c)for(;++p-1){const a=l[0];typeof a=="string"?l[0]=a.slice(r):l.shift()}o>0&&l.push(e[i].slice(0,o))}return l}function Ia(e,t){let n=-1;const r=[];let i;for(;++n0){const ue=z.tokenStack[z.tokenStack.length-1];(ue[1]||Lt).call(z,void 0,ue[0])}for(I.position={start:ke(b.length>0?b[0][1].start:{line:1,column:1,offset:0}),end:ke(b.length>0?b[b.length-2][1].end:{line:1,column:1,offset:0})},H=-1;++H: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-3>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.75rem * var(--tw-space-x-reverse));margin-left:calc(.75rem * 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))}.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-normal{white-space:normal}.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-emerald-500{--tw-bg-opacity: 1;background-color:rgb(16 185 129 / var(--tw-bg-opacity, 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-2{padding-right:.5rem}.pr-8{padding-right:2rem}.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}.text-right{text-align:right}.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-foreground\/50{color:hsl(var(--foreground) / .5)}.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))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.text-yellow-600{--tw-text-opacity: 1;color:rgb(202 138 4 / var(--tw-text-opacity, 1))}.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-emerald-600:hover{--tw-bg-opacity: 1;background-color:rgb(5 150 105 / var(--tw-bg-opacity, 1))}.hover\:bg-muted\/20:hover{background-color:hsl(var(--muted) / .2)}.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\:text-primary:hover{color:hsl(var(--primary))}.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\:opacity-100:focus{opacity:1}.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:hover .group-hover\:opacity-100{opacity:1}.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-red-300{--tw-text-opacity: 1;color:rgb(252 165 165 / var(--tw-text-opacity, 1))}.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\:text-destructive-foreground:hover{color:hsl(var(--destructive-foreground))}.group.destructive .group-\[\.destructive\]\:hover\:text-red-50:hover{--tw-text-opacity: 1;color:rgb(254 242 242 / var(--tw-text-opacity, 1))}.group.destructive .group-\[\.destructive\]\:focus\:ring-destructive:focus{--tw-ring-color: hsl(var(--destructive))}.group.destructive .group-\[\.destructive\]\:focus\:ring-red-400:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(248 113 113 / var(--tw-ring-opacity, 1))}.group.destructive .group-\[\.destructive\]\:focus\:ring-offset-red-600:focus{--tw-ring-offset-color: #dc2626}.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\: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\: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;height:32px;padding:0 12px;border:1px solid var(--hairline);border-radius:6px;background:var(--bg-elevated);font-size:13px;color:var(--ink);white-space:nowrap;transition:border-color .15s,background .15s}.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}.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:24px 24px 32px;display:flex;flex-direction:column;gap:4px;height:100dvh;max-height:100vh;overflow-y:auto;box-shadow:-8px 0 24px #0000000f}.mobile-nav-link{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,.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}.hf-signin-btn{width:36px;height:36px;padding:0;gap:0;justify-content:center;flex-shrink:0}.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-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}@media (max-width: 640px){.paper-date-filter{justify-content:flex-start}.paper-date-popover{width:calc(100vw - 20px);padding:20px 14px}.paper-date-calendars{display:block}.paper-date-calendar-secondary{display:none}.paper-date-navigation{display:block}.paper-date-navigation-group-secondary{display:none}.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)}}.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}.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-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}.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}.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-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}.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}}.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{min-width:42px;text-align:center;font-variant-numeric:tabular-nums}.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{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{background:#fff;box-shadow:0 1px 5px #0008}.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-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}}.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}@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:center;justify-content:center;padding:40px 24px;overflow-y:auto}.chat-empty-inner{max-width:680px;width:100%;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-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-closed{margin-left:calc(-1 * (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:none;align-items:center;color:var(--ink-faint);padding:2px;border-radius:4px;flex:none}.chat-session:hover .chat-session-delete{display:inline-flex}.chat-session-delete:hover{color:var(--negative-text)}.chat-session-menu{display:none;border:0;background:transparent;color:inherit;cursor:pointer;padding:0 3px;font-size:17px;line-height:1}.chat-session:hover .chat-session-menu,.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)}.chat-session-error{width:calc(100% - 56px);max-width:820px;margin:12px auto 0;padding:10px 12px;border:1px solid color-mix(in oklch,#c33 35%,var(--hairline));border-radius:8px;color:var(--ink);background:color-mix(in oklch,#c33 8%,var(--bg-elevated));font-size:13px}@media (max-width: 900px){.chat-sidebar{position:absolute;top:0;bottom:0;left:0;z-index:60;box-shadow:0 0 40px #0003}.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-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-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-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}.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{flex:1;overflow-y:auto}.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;-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;align-items:center;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}.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;color:var(--accent-text);font-weight:600;text-decoration:none}.chat-error button{border:0;padding:0;background:transparent;cursor:pointer;font:inherit}.chat-error button:disabled{cursor:wait;opacity:.65}.chat-error-actions{display:flex;flex:none;flex-wrap:wrap;justify-content:flex-end;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-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}} +@import"https://fonts.googleapis.com/css2?family=Newsreader:ital,opsz,wght@0,6..72,400;0,6..72,500;0,6..72,600;0,6..72,700;1,6..72,400&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap";*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}:root{--background: 0 0% 100%;--foreground: 222.2 84% 4.9%;--card: 0 0% 100%;--card-foreground: 222.2 84% 4.9%;--popover: 0 0% 100%;--popover-foreground: 222.2 84% 4.9%;--primary: 222.2 47.4% 11.2%;--primary-foreground: 210 40% 98%;--secondary: 210 40% 96.1%;--secondary-foreground: 222.2 47.4% 11.2%;--muted: 210 40% 96.1%;--muted-foreground: 215.4 16.3% 46.9%;--accent-tw: 210 40% 96.1%;--accent-foreground: 222.2 47.4% 11.2%;--destructive: 0 84.2% 60.2%;--destructive-foreground: 210 40% 98%;--border: 214.3 31.8% 91.4%;--input: 214.3 31.8% 91.4%;--ring: 222.2 84% 4.9%;--radius: .5rem}.dark{--background: 36 13% 7%;--foreground: 40 27% 93%;--card: 36 12% 10%;--card-foreground: 40 27% 93%;--popover: 36 12% 10%;--popover-foreground: 40 27% 93%;--primary: 40 27% 93%;--primary-foreground: 36 13% 7%;--secondary: 34 11% 15%;--secondary-foreground: 40 27% 93%;--muted: 34 11% 15%;--muted-foreground: 36 10% 64%;--accent-tw: 216 22% 20%;--accent-foreground: 213 38% 79%;--destructive: 0 63% 42%;--destructive-foreground: 40 27% 93%;--border: 35 11% 20%;--input: 35 11% 20%;--ring: 213 38% 67%}[data-shadcn] *{border-color:hsl(var(--border))}.\!container{width:100%!important;margin-right:auto!important;margin-left:auto!important;padding-right:2rem!important;padding-left:2rem!important}.container{width:100%;margin-right:auto;margin-left:auto;padding-right:2rem;padding-left:2rem}@media (min-width: 1400px){.\!container{max-width:1400px!important}.container{max-width:1400px}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.\!visible{visibility:visible!important}.visible{visibility:visible}.invisible{visibility:hidden}.collapse{visibility:collapse}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{top:0;right:0;bottom:0;left:0}.left-2{left:.5rem}.left-3{left:.75rem}.left-\[50\%\]{left:50%}.right-2{right:.5rem}.right-4{right:1rem}.top-0{top:0}.top-1\/2{top:50%}.top-2{top:.5rem}.top-3{top:.75rem}.top-4{top:1rem}.top-\[50\%\]{top:50%}.z-50{z-index:50}.z-\[100\]{z-index:100}.z-\[60\]{z-index:60}.-mx-1{margin-left:-.25rem;margin-right:-.25rem}.-mx-6{margin-left:-1.5rem;margin-right:-1.5rem}.mx-auto{margin-left:auto;margin-right:auto}.my-1{margin-top:.25rem;margin-bottom:.25rem}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-5{margin-bottom:1.25rem}.mb-6{margin-bottom:1.5rem}.mb-8{margin-bottom:2rem}.ml-1{margin-left:.25rem}.ml-3{margin-left:.75rem}.ml-auto{margin-left:auto}.mr-1{margin-right:.25rem}.mr-2{margin-right:.5rem}.mr-3{margin-right:.75rem}.mr-4{margin-right:1rem}.mr-auto{margin-right:auto}.mt-1{margin-top:.25rem}.mt-10{margin-top:2.5rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.mt-8{margin-top:2rem}.line-clamp-3{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3}.\!block{display:block!important}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.contents{display:contents}.hidden{display:none}.aspect-square{aspect-ratio:1 / 1}.h-10{height:2.5rem}.h-11{height:2.75rem}.h-12{height:3rem}.h-16{height:4rem}.h-2{height:.5rem}.h-2\.5{height:.625rem}.h-20{height:5rem}.h-24{height:6rem}.h-3{height:.75rem}.h-3\.5{height:.875rem}.h-32{height:8rem}.h-36{height:9rem}.h-4{height:1rem}.h-40{height:10rem}.h-44{height:11rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-64{height:16rem}.h-7{height:1.75rem}.h-8{height:2rem}.h-9{height:2.25rem}.h-\[190px\]{height:190px}.h-\[220px\]{height:220px}.h-\[38px\]{height:38px}.h-auto{height:auto}.h-full{height:100%}.h-px{height:1px}.max-h-40{max-height:10rem}.max-h-48{max-height:12rem}.max-h-52{max-height:13rem}.max-h-64{max-height:16rem}.max-h-80{max-height:20rem}.max-h-\[300px\]{max-height:300px}.max-h-\[350px\]{max-height:350px}.max-h-\[400px\]{max-height:400px}.max-h-\[460px\]{max-height:460px}.max-h-\[50vh\]{max-height:50vh}.max-h-\[600px\]{max-height:600px}.max-h-\[700px\]{max-height:700px}.max-h-\[800px\]{max-height:800px}.max-h-\[90vh\]{max-height:90vh}.max-h-\[min\(300px\,calc\(var\(--radix-popover-content-available-height\)-2\.75rem\)\)\]{max-height:min(300px,calc(var(--radix-popover-content-available-height) - 2.75rem))}.max-h-\[var\(--radix-popover-content-available-height\)\]{max-height:var(--radix-popover-content-available-height)}.max-h-screen{max-height:100vh}.min-h-0{min-height:0px}.min-h-\[80px\]{min-height:80px}.w-1\/2{width:50%}.w-1\/3{width:33.333333%}.w-10{width:2.5rem}.w-11{width:2.75rem}.w-12{width:3rem}.w-16{width:4rem}.w-2{width:.5rem}.w-2\.5{width:.625rem}.w-20{width:5rem}.w-24{width:6rem}.w-3{width:.75rem}.w-3\.5{width:.875rem}.w-3\/4{width:75%}.w-36{width:9rem}.w-4{width:1rem}.w-5{width:1.25rem}.w-56{width:14rem}.w-6{width:1.5rem}.w-64{width:16rem}.w-72{width:18rem}.w-8{width:2rem}.w-\[160px\]{width:160px}.w-\[calc\(100vw-2rem\)\]{width:calc(100vw - 2rem)}.w-\[var\(--radix-popover-trigger-width\)\]{width:var(--radix-popover-trigger-width)}.w-auto{width:auto}.w-fit{width:-moz-fit-content;width:fit-content}.w-full{width:100%}.min-w-0{min-width:0px}.min-w-\[120px\]{min-width:120px}.min-w-\[140px\]{min-width:140px}.min-w-\[180px\]{min-width:180px}.min-w-\[200px\]{min-width:200px}.min-w-\[240px\]{min-width:240px}.min-w-\[260px\]{min-width:260px}.min-w-\[8rem\]{min-width:8rem}.max-w-2xl{max-width:42rem}.max-w-6xl{max-width:72rem}.max-w-7xl{max-width:80rem}.max-w-\[260px\]{max-width:260px}.max-w-\[280px\]{max-width:280px}.max-w-\[360px\]{max-width:360px}.max-w-full{max-width:100%}.max-w-lg{max-width:32rem}.max-w-md{max-width:28rem}.max-w-xl{max-width:36rem}.flex-1{flex:1 1 0%}.flex-shrink-0{flex-shrink:0}.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.table-fixed{table-layout:fixed}.caption-bottom{caption-side:bottom}.border-collapse{border-collapse:collapse}.-translate-y-1\/2{--tw-translate-y: -50%;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))}.translate-x-\[-50\%\]{--tw-translate-x: -50%;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))}.translate-y-\[-50\%\]{--tw-translate-y: -50%;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))}.transform{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 pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-default{cursor:default}.cursor-pointer{cursor:pointer}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.resize{resize:both}.list-decimal{list-style-type:decimal}.list-disc{list-style-type:disc}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-rows-\[auto_minmax\(0\,1fr\)_auto\]{grid-template-rows:auto minmax(0,1fr) auto}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-center{align-items:center}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-0\.5{gap:.125rem}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-5{gap:1.25rem}.gap-x-4{-moz-column-gap:1rem;column-gap:1rem}.gap-y-1{row-gap:.25rem}.space-x-1>: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-3>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.75rem * var(--tw-space-x-reverse));margin-left:calc(.75rem * 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))}.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-normal{white-space:normal}.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-emerald-500{--tw-bg-opacity: 1;background-color:rgb(16 185 129 / var(--tw-bg-opacity, 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-2{padding-right:.5rem}.pr-8{padding-right:2rem}.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}.text-right{text-align:right}.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-foreground\/50{color:hsl(var(--foreground) / .5)}.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))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.text-yellow-600{--tw-text-opacity: 1;color:rgb(202 138 4 / var(--tw-text-opacity, 1))}.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-emerald-600:hover{--tw-bg-opacity: 1;background-color:rgb(5 150 105 / var(--tw-bg-opacity, 1))}.hover\:bg-muted\/20:hover{background-color:hsl(var(--muted) / .2)}.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\:text-primary:hover{color:hsl(var(--primary))}.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\:opacity-100:focus{opacity:1}.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:hover .group-hover\:opacity-100{opacity:1}.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-red-300{--tw-text-opacity: 1;color:rgb(252 165 165 / var(--tw-text-opacity, 1))}.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\:text-destructive-foreground:hover{color:hsl(var(--destructive-foreground))}.group.destructive .group-\[\.destructive\]\:hover\:text-red-50:hover{--tw-text-opacity: 1;color:rgb(254 242 242 / var(--tw-text-opacity, 1))}.group.destructive .group-\[\.destructive\]\:focus\:ring-destructive:focus{--tw-ring-color: hsl(var(--destructive))}.group.destructive .group-\[\.destructive\]\:focus\:ring-red-400:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(248 113 113 / var(--tw-ring-opacity, 1))}.group.destructive .group-\[\.destructive\]\:focus\:ring-offset-red-600:focus{--tw-ring-offset-color: #dc2626}.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\: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\: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;height:32px;padding:0 12px;border:1px solid var(--hairline);border-radius:6px;background:var(--bg-elevated);font-size:13px;color:var(--ink);white-space:nowrap;transition:border-color .15s,background .15s}.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}.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:24px 24px 32px;display:flex;flex-direction:column;gap:4px;height:100dvh;max-height:100vh;overflow-y:auto;box-shadow:-8px 0 24px #0000000f}.mobile-nav-link{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,.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}.hf-signin-btn{width:36px;height:36px;padding:0;gap:0;justify-content:center;flex-shrink:0}.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-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}@media (max-width: 640px){.paper-date-filter{justify-content:flex-start}.paper-date-popover{width:calc(100vw - 20px);padding:20px 14px}.paper-date-calendars{display:block}.paper-date-calendar-secondary{display:none}.paper-date-navigation{display:block}.paper-date-navigation-group-secondary{display:none}.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)}}.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}.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-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}.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}.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-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}.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}}.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{min-width:42px;text-align:center;font-variant-numeric:tabular-nums}.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{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{background:#fff;box-shadow:0 1px 5px #0008}.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-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}}.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}@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:center;justify-content:center;padding:40px 24px;overflow-y:auto}.chat-empty-inner{max-width:680px;width:100%;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-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:none;align-items:center;color:var(--ink-faint);padding:2px;border-radius:4px;flex:none}.chat-session:hover .chat-session-delete{display:inline-flex}.chat-session-delete:hover{color:var(--negative-text)}.chat-session-menu{display:none;border:0;background:transparent;color:inherit;cursor:pointer;padding:0 3px;font-size:17px;line-height:1}.chat-session:hover .chat-session-menu,.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)}.chat-session-error{width:calc(100% - 56px);max-width:820px;margin:12px auto 0;padding:10px 12px;border:1px solid color-mix(in oklch,#c33 35%,var(--hairline));border-radius:8px;color:var(--ink);background:color-mix(in oklch,#c33 8%,var(--bg-elevated));font-size:13px}@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-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-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-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}.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{flex:1;overflow-y:auto}.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;-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;align-items:center;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}.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;color:var(--accent-text);font-weight:600;text-decoration:none}.chat-error button{border:0;padding:0;background:transparent;cursor:pointer;font:inherit}.chat-error button:disabled{cursor:wait;opacity:.65}.chat-error-actions{display:flex;flex:none;flex-wrap:wrap;justify-content:flex-end;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-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-Cry0GNHI.js b/assets/index-Dt001B3A.js similarity index 99% rename from assets/index-Cry0GNHI.js rename to assets/index-Dt001B3A.js index 710fee64301fe5ed74ec3cf5a9a13d541f375189..cd7412b22e8bfd14757b9c99a372317b06ba4a48 100644 --- a/assets/index-Cry0GNHI.js +++ b/assets/index-Dt001B3A.js @@ -1,4 +1,4 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/FeedView-DkdrvXaC.js","assets/components-IPCTDA4d.js","assets/LatexTitle-CLc_16Sj.js","assets/katex.min-BSBacQyE.js","assets/katex-wklAmtGL.css","assets/transform-b6MI1iSQ.js","assets/papers-CrgFFrmi.js","assets/safeExternalHref-CkBrsh84.js","assets/paperDateRange-DQDDTCHP.js","assets/popover-C_By4VBc.js","assets/chatLaunch-DpNrK5mV.js","assets/chat-FW6HqAah.js","assets/chevron-down-DR8n8lNp.js","assets/useQuery-DlAfMYOD.js","assets/catalog-BjZE6R9z.js","assets/chatPrompts-CDY3UGU1.js","assets/usePapers-B86z4_CJ.js","assets/useInfiniteQuery-C8Q6ynv2.js","assets/skeleton-LwsL9heH.js","assets/alert-BAHZ4i9D.js","assets/ChatView-C_sQDmRZ.js","assets/ArtifactWorkspace-BDAI0t7b.js","assets/hover-card-CbDqfS2l.js","assets/github-Bll0eXy5.js","assets/github-D38gLg_l.js","assets/PaperPreviewLink-CPKVU1Zw.js","assets/index-D7CE3jjK.js","assets/file-text-DXZT7Qxr.js","assets/useMutation-C5zYPeQC.js","assets/external-link-DIcR472K.js","assets/ArtifactWorkspace-Lr_OJaUk.css","assets/openrouter-CKgqF9nS.js","assets/SharedChatView-BF8QaAJZ.js","assets/PapersListView-CacFfG7A.js","assets/useDebounce-Wb28akK_.js","assets/PaperDetailView-DB5nVfY_.js","assets/ExternalSourceEvalBadge-CQ-fBLgc.js","assets/ExternalSourceEvalBadge-DXfuqNnO.css","assets/latexPlainText-DI8YEXVe.js","assets/button-QVzubJLr.js","assets/textarea-nAbEj-Sd.js","assets/dialog-Dedt-uqk.js","assets/searchable-select-BbTr2CaG.js","assets/loader-circle-C6beazQX.js","assets/submissions-CVaVzZAk.js","assets/SignInToEditDialog-D0_3y_qM.js","assets/codexAddEvals-DrSFgeIY.js","assets/index-IfmCq-bY.js","assets/savedPapersAuth-DmaqaN2Y.js","assets/PaperDetailView-BZHxkTed.css","assets/PaperReaderView-DvqvLLoh.js","assets/TagsIndexView-p9VyqRM6.js","assets/slug-BpH-Nkvz.js","assets/TaxonomySuggestionTile-Dlf-wpJa.js","assets/TagBrowseView-Cl8JYE1w.js","assets/BenchmarkTrendSparkline-BJ3H66bV.js","assets/MarkdownText-CzUmjuOY.js","assets/MethodsIndexView-C2HRCWSA.js","assets/FrameworksIndexView-C07bXY9T.js","assets/TrendsView-CSAyYk6b.js","assets/ConferencesIndexView-CA_XWUAi.js","assets/AiDeadlinesView-D4Hrlig2.js","assets/switch-rXZTYMbm.js","assets/ConferenceDetailView-U1eFBlMo.js","assets/ConferenceTaskView-Co8AdVvk.js","assets/OrganizationsIndexView-BFWAW5nR.js","assets/OrganizationsIndexView-dniuSNch.css","assets/OrganizationDetailView-Cf4QdmqL.js","assets/OrganizationPaperFeed-gweMJ5dR.js","assets/OrganizationContributionGraph-qTfsmWA5.js","assets/NotFound-BSLpqWSh.js","assets/OrganizationTaskView-KbmvUuSs.js","assets/AuthorDetailView-DkyM2b_B.js","assets/MethodDetailView-BNXK8V3e.js","assets/BenchmarkDetailView-CP6Bok1b.js","assets/BenchmarkDetailView-SsEGoo2G.css","assets/SavedPapersView-9_TEeoY-.js","assets/SettingsView-bS736GLu.js","assets/PrivacyView-C2T_LyM0.js","assets/SubmitView-CEm_w3o3.js","assets/CronDashboard-Cn8uaVGb.js","assets/shield-alert-CjZsQbM-.js","assets/circle-check-CFRMmRHN.js","assets/CronDashboard-DwChfW9h.css","assets/SubmissionsDashboard-BxcDg24H.js","assets/SubmissionsDashboard-2iSRk_ue.css","assets/UserProfileView-BER9pnDz.js","assets/RateLimitsView-B7_tunuS.js","assets/SearchOverlay-DDzvZPvq.js","assets/StagingAccessRequestView-CL10uP0d.js"])))=>i.map(i=>d[i]); +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/FeedView-BBqtfWKy.js","assets/components-DMT1vhIy.js","assets/LatexTitle-B651zAGR.js","assets/katex.min-BSBacQyE.js","assets/katex-wklAmtGL.css","assets/transform-DgCWw6nP.js","assets/papers-KXkGPHI5.js","assets/safeExternalHref-CkBrsh84.js","assets/paperDateRange-BJ29xsSE.js","assets/popover-DDOhCeb4.js","assets/chatLaunch-C8mQqa_z.js","assets/chat-98y1Ufht.js","assets/chevron-down-BXCXby03.js","assets/useQuery-DD4hUA6p.js","assets/catalog-BOpSeTzm.js","assets/chatPrompts-CDY3UGU1.js","assets/usePapers-qkM3n2JN.js","assets/useInfiniteQuery-CgAOxB5d.js","assets/skeleton-DkhIJUB4.js","assets/alert-Xa-AqUL5.js","assets/ChatView-BLEP80pf.js","assets/ArtifactWorkspace-CMp03Kf3.js","assets/hover-card-C7JmPdFo.js","assets/github-oD2gKV6Z.js","assets/github-TRZ4i_h7.js","assets/PaperPreviewLink-CCwg7dvd.js","assets/index-Byizcq9V.js","assets/file-text-BXknBxd6.js","assets/useMutation-BSdRNizq.js","assets/external-link-DdqhM_eg.js","assets/ArtifactWorkspace-Lr_OJaUk.css","assets/openrouter-BTt-GpWV.js","assets/SharedChatView-BH5hBJDO.js","assets/PapersListView-eYTQa2CU.js","assets/useDebounce-DaqbxkO6.js","assets/PaperDetailView-D__j4Exc.js","assets/ExternalSourceEvalBadge-D7DvXFmF.js","assets/ExternalSourceEvalBadge-DXfuqNnO.css","assets/latexPlainText-DI8YEXVe.js","assets/button-BL-YLDFJ.js","assets/textarea-BLDaXAi6.js","assets/dialog-Bs8pVXcH.js","assets/searchable-select-C7oc2Val.js","assets/loader-circle-DD7s_n4z.js","assets/submissions-IHYlc8kE.js","assets/SignInToEditDialog-BkrM2MwG.js","assets/codexAddEvals-BW2pMO12.js","assets/index-i7UOsfxV.js","assets/savedPapersAuth-CR1Q1QTW.js","assets/PaperDetailView-BZHxkTed.css","assets/PaperReaderView-AmqyPB1B.js","assets/TagsIndexView-6sOdH8Ff.js","assets/slug-BpH-Nkvz.js","assets/TaxonomySuggestionTile-BEuXuGw1.js","assets/TagBrowseView-D0CN98ak.js","assets/BenchmarkTrendSparkline-B9CQXlVT.js","assets/MarkdownText-DeuWKnsZ.js","assets/MethodsIndexView-vViWCtwM.js","assets/FrameworksIndexView-DIYY9ojn.js","assets/TrendsView-C_nun9wG.js","assets/ConferencesIndexView-Ct7JZfsT.js","assets/AiDeadlinesView-DoOHv-cM.js","assets/switch-CqcBxohM.js","assets/ConferenceDetailView-IlZriJt1.js","assets/ConferenceTaskView-DUu-DomW.js","assets/OrganizationsIndexView-BGARKKve.js","assets/OrganizationsIndexView-dniuSNch.css","assets/OrganizationDetailView-DNGLw7ip.js","assets/OrganizationPaperFeed-By1LI1kk.js","assets/OrganizationContributionGraph-B_9EeNTc.js","assets/NotFound-CkQZGkjc.js","assets/OrganizationTaskView-I6v3uF7J.js","assets/AuthorDetailView-49FXhHea.js","assets/MethodDetailView-UdG0EtHc.js","assets/BenchmarkDetailView-DaFnh3b2.js","assets/BenchmarkDetailView-SsEGoo2G.css","assets/SavedPapersView-0zMEoSEk.js","assets/SettingsView-dDA_sdmT.js","assets/PrivacyView-DlTj4HIc.js","assets/SubmitView-K0VXsMx6.js","assets/CronDashboard-CCbRoahI.js","assets/shield-alert-BzyltW9X.js","assets/circle-check-BxcyjDCC.js","assets/CronDashboard-DwChfW9h.css","assets/SubmissionsDashboard-jDE9mCsU.js","assets/SubmissionsDashboard-2iSRk_ue.css","assets/UserProfileView-hcOOdDE-.js","assets/RateLimitsView-DZkZ108W.js","assets/SearchOverlay-s2H4WBI8.js","assets/StagingAccessRequestView-Ceal3OTX.js"])))=>i.map(i=>d[i]); var TC=Object.defineProperty;var nm=t=>{throw TypeError(t)};var RC=(t,e,r)=>e in t?TC(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var xs=(t,e,r)=>RC(t,typeof e!="symbol"?e+"":e,r),Rd=(t,e,r)=>e.has(t)||nm("Cannot "+r);var $=(t,e,r)=>(Rd(t,e,"read from private field"),r?r.call(t):e.get(t)),ce=(t,e,r)=>e.has(t)?nm("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,r),re=(t,e,r,n)=>(Rd(t,e,"write to private field"),n?n.call(t,r):e.set(t,r),r),ut=(t,e,r)=>(Rd(t,e,"access private method"),r);var El=(t,e,r,n)=>({set _(s){re(t,e,s,r)},get _(){return $(t,e,n)}});function IC(t,e){for(var r=0;rn[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"]'))n(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"&&n(o)}).observe(document,{childList:!0,subtree:!0});function r(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 n(s){if(s.ep)return;s.ep=!0;const i=r(s);fetch(s.href,i)}})();var J3=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function G0(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var K0={exports:{}},zc={},Q0={exports:{}},ue={};/** * @license React * react.production.min.js @@ -156,4 +156,4 @@ Error generating stack: `+i.message+` * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const pj=bd("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),vj=ij,gj=oj,mj=y.forwardRef(({className:t,inset:e,children:r,...n},s)=>x.jsxs(Ok,{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),...n,children:[r,x.jsx(fj,{className:"ml-auto h-4 w-4"})]}));mj.displayName=Ok.displayName;const yj=y.forwardRef(({className:t,...e},r)=>x.jsx(Mk,{ref:r,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}));yj.displayName=Mk.displayName;const $k=y.forwardRef(({className:t,sideOffset:e=4,...r},n)=>x.jsx(aj,{children:x.jsx(Sk,{ref:n,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),...r})}));$k.displayName=Sk.displayName;const sn=y.forwardRef(({className:t,inset:e,...r},n)=>x.jsx(Ck,{ref:n,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),...r}));sn.displayName=Ck.displayName;const _j=y.forwardRef(({className:t,children:e,checked:r,...n},s)=>x.jsxs(Pk,{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:r,...n,children:[x.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:x.jsx(Rk,{children:x.jsx(dj,{className:"h-4 w-4"})})}),e]}));_j.displayName=Pk.displayName;const wj=y.forwardRef(({className:t,children:e,...r},n)=>x.jsxs(Tk,{ref:n,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),...r,children:[x.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:x.jsx(Rk,{children:x.jsx(hj,{className:"h-2 w-2 fill-current"})})}),e]}));wj.displayName=Tk.displayName;const Ak=y.forwardRef(({className:t,inset:e,...r},n)=>x.jsx(kk,{ref:n,className:at("px-2 py-1.5 text-sm font-semibold",e&&"pl-8",t),...r}));Ak.displayName=kk.displayName;const Xp=y.forwardRef(({className:t,...e},r)=>x.jsx(Ik,{ref:r,className:at("-mx-1 my-1 h-px bg-muted",t),...e}));Xp.displayName=Ik.displayName;function xj(t){const r=(t.name||t.username||"?").trim().split(/\s+/).filter(Boolean);return r.length===0?"?":r.length===1?r[0][0].toUpperCase():(r[0][0]+r[r.length-1][0]).toUpperCase()}const bj=({user:t,onLogout:e})=>x.jsxs(vj,{children:[x.jsx(gj,{asChild:!0,children:x.jsx("button",{type:"button",className:"user-avatar-btn","aria-label":`Account menu for ${t.username}`,children:x.jsxs(W1,{className:"h-8 w-8",children:[t.avatar_url&&x.jsx(G1,{src:t.avatar_url,alt:t.username}),x.jsx(K1,{className:"text-xs",children:xj(t)})]})})}),x.jsxs($k,{align:"end",className:"w-56",children:[x.jsxs(Ak,{className:"flex flex-col gap-0.5 py-2",children:[x.jsx("span",{className:"text-sm font-medium leading-tight",children:t.name||t.username}),x.jsxs("span",{className:"text-xs font-normal text-muted-foreground",children:["@",t.username]}),t.is_admin&&x.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"&&x.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"})]}),x.jsx(Xp,{}),x.jsx(sn,{asChild:!0,children:x.jsx("a",{href:`https://huggingface.co/${encodeURIComponent(t.username)}`,target:"_blank",rel:"noopener noreferrer",children:"Hugging Face profile"})}),x.jsx(sn,{asChild:!0,children:x.jsx(qn,{to:"/frameworks",children:"Frameworks"})}),x.jsx(sn,{asChild:!0,children:x.jsx(qn,{to:"/trends",children:"Trends"})}),t.is_admin&&x.jsxs(x.Fragment,{children:[x.jsx(sn,{asChild:!0,children:x.jsx(qn,{to:"/admin-dashboard",children:"Admin dashboard"})}),x.jsx(sn,{asChild:!0,children:x.jsx(qn,{to:"/submissions",children:"Review submissions"})})]}),x.jsx(sn,{asChild:!0,children:x.jsx(qn,{to:`/${encodeURIComponent(t.username)}`,children:"My contributions"})}),x.jsx(sn,{asChild:!0,children:x.jsx(qn,{to:"/settings",children:"Settings"})}),x.jsx(Xp,{}),x.jsx(sn,{onSelect:r=>{r.preventDefault(),e()},children:"Log out"})]})]}),Ej="cronAdminToken";function Sj(){var t;return typeof window>"u"?"":((t=window.localStorage.getItem(Ej))==null?void 0:t.trim())??""}const kj=!1;class Lk extends Error{constructor(r,n){var s;super(`API request failed: ${r.status} ${r.statusText}`);xs(this,"status");xs(this,"statusText");xs(this,"response");xs(this,"detail");xs(this,"code");this.name="ApiError",this.status=r.status,this.statusText=r.statusText,this.response=n;try{if(this.detail=(s=JSON.parse(n))==null?void 0:s.detail,typeof this.detail=="string"&&(this.message=this.detail),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}}}class Cj{constructor(e){this.baseUrl=e}async fetch(e,r){const n=`${this.baseUrl}${e}`;try{const{headers:s,...i}=r??{},a=(i.method??"GET").toUpperCase()==="GET"?"default":"no-store",l=Sj(),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(n,{...i,cache:i.cache??a,credentials:i.credentials??"include",headers:u})}catch(s){throw console.error(`[API] Request to ${n} failed:`,s),s}}async request(e,r){const n=await this.fetch(e,r);if(!n.ok){const i=new Lk(n,await n.text());throw console.error("[API] Error response:",i.response),i}return n.status===204?void 0:await n.json()}}function Pj(t){t instanceof Lk&&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 Tj(t){try{return await t()}catch(e){throw Pj(e),e}}const Fk=new Cj(`${Sg()}/api/v1`),Rj=(t,e)=>Fk.fetch(t,e),Jp=(t,e)=>Tj(()=>Fk.request(t,e)),E0={async getCurrentUser(){if(gl())return null;const t=await Rj("/auth/me",{cache:"no-store"});return t.status===401||!t.ok?null:t.json()},async logout(){await Jp("/auth/logout",{method:"POST"})},async requestStagingAccess(){await Jp("/staging-access-request",{method:"POST"})}},jk=I.createContext(null),S0="pwc:auth-stale",Ij=({children:t})=>{const[e,r]=I.useState(null),[n,s]=I.useState(!0),i=I.useCallback(async()=>{s(!0);const l=await E0.getCurrentUser();r(l),s(!1)},[]),o=I.useCallback(async()=>{const l=kg("/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 E0.logout(),r(null)},[]);I.useEffect(()=>{i()},[i]),I.useEffect(()=>{},[e]),I.useEffect(()=>{const l=()=>{r(null)};return window.addEventListener(S0,l),()=>window.removeEventListener(S0,l)},[]);const a=I.useMemo(()=>({user:e,isLoading:n,refresh:i,logout:o}),[e,n,i,o]);return x.jsx(jk.Provider,{value:a,children:t})};function Kg(){const t=I.useContext(jk);if(!t)throw new Error("useAuth must be used inside an ");return t}const Ei=({name:t,size:e=14})=>{const r={search:x.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:x.jsx("path",{d:"M4 2h8v12l-4-3-4 3V2z",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinejoin:"round"}),menu:x.jsx("path",{d:"M2 4h12M2 8h12M2 12h12",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"}),close:x.jsx("path",{d:"M3 3l10 10M13 3L3 13",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"})};return x.jsx("svg",{className:e===11?"icon-sm":"icon",viewBox:"0 0 16 16",width:e,height:e,children:r[t]})},k0="https://github.com/huggingface/paperswithcode-feedback/issues",Oj="https://github.com/huggingface/pwc-cli",C0="pwc:announcement:pwc-cli:v1:dismissed",Yf=[{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}],Mj=()=>{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)},Nj=()=>{const[t,e]=I.useState(!1);return I.useEffect(()=>{e(Mj())},[]),x.jsx("kbd",{children:t?"⌘K":"Ctrl K"})},P0=({onOpenSearch:t})=>{const[e,r]=I.useState(!1),[n,s]=I.useState(()=>localStorage.getItem(C0)!=="1"),i=I.useRef(null),o=I.useRef(null),a=()=>r(!1),{user:l,logout:u}=Kg(),c=Nr(),d=c.pathname.startsWith("/pdf/"),f=`${c.pathname}${c.search}`||"/",h=gl(),_=Mc()?[Yf[0],{to:"/chat",label:"Chat",end:!1,badge:"New"},...Yf.slice(1)]:Yf;return I.useLayoutEffect(()=>{var E;const p=i.current,m=o.current;if(!p||!m)return;let v=!1;const g=()=>{if(v)return;const S=p.querySelector(".nav-item.active"),C=(S==null?void 0:S.offsetWidth)??0;m.style.width=`${C}px`,m.style.transform=`translateX(${(S==null?void 0:S.offsetLeft)??0}px)`,m.style.opacity=C>0?"1":"0"};g();const w=window.requestAnimationFrame(()=>{m.classList.add("nav-indicator-ready")}),b=typeof ResizeObserver>"u"?null:new ResizeObserver(g);return b==null||b.observe(p),window.addEventListener("resize",g),(E=document.fonts)==null||E.ready.then(g),()=>{v=!0,window.cancelAnimationFrame(w),b==null||b.disconnect(),window.removeEventListener("resize",g)}},[c.pathname,_.length]),x.jsxs(x.Fragment,{children:[x.jsxs("header",{className:"app-header",children:[x.jsxs("div",{className:"app-header-inner",children:[x.jsxs(_i,{to:"/",className:"brand",onClick:a,children:[x.jsx("span",{className:"brand-mark"}),x.jsxs("span",{className:"brand-name",children:["Papers ",x.jsx("em",{children:"With Code"})]})]}),x.jsxs("nav",{className:"nav",ref:i,children:[_.map(({to:p,label:m,end:v,badge:g})=>x.jsxs(_i,{to:p,end:v,className:({isActive:w})=>`nav-item${g?" nav-item-with-badge":""}${w?" active":""}`,children:[x.jsx("span",{children:m}),g&&x.jsx("span",{className:"nav-new-badge","aria-hidden":"true",children:g})]},p)),x.jsx("span",{ref:o,className:"nav-indicator","aria-hidden":"true"})]}),x.jsx("div",{className:"header-spacer"}),x.jsx("a",{className:"feedback-link header-feedback-link",href:k0,target:"_blank",rel:"noreferrer",children:"Submit feedback"}),x.jsxs("button",{className:"search-trigger",onClick:t,children:[x.jsx(Ei,{name:"search",size:13}),x.jsx("span",{children:"Search papers, authors, domains…"}),x.jsx(Nj,{})]}),x.jsx("button",{className:"icon-btn mobile-search-btn","aria-label":"Search",onClick:t,children:x.jsx(Ei,{name:"search",size:14})}),!h&&x.jsx(_i,{to:"/saved",className:"icon-btn header-bookmark-btn","aria-label":"Saved papers",title:"Saved papers",children:x.jsx(Ei,{name:"bookmark",size:13})}),h?null:l?x.jsx(bj,{user:l,onLogout:u}):x.jsx(k1,{returnTo:f}),x.jsx("button",{className:"icon-btn mobile-menu-btn","aria-label":"Open menu",onClick:()=>r(p=>!p),children:x.jsx(Ei,{name:e?"close":"menu",size:14})})]}),!d&&n&&x.jsxs("div",{className:"site-announcement",role:"status",children:[x.jsx("span",{children:"New: Papers with Code CLI and Skill now "}),x.jsx("a",{href:Oj,target:"_blank",rel:"noreferrer",children:"available"}),x.jsx("button",{type:"button",className:"site-announcement-close","aria-label":"Dismiss announcement",onClick:()=>{localStorage.setItem(C0,"1"),s(!1)},children:x.jsx(Ei,{name:"close",size:11})})]})]}),e&&x.jsx("div",{className:"mobile-nav-drawer",onClick:a,children:x.jsxs("div",{className:"mobile-nav-panel",onClick:p=>p.stopPropagation(),children:[x.jsxs("button",{type:"button",className:"mobile-nav-link mobile-nav-search",onClick:()=>{a(),t()},children:[x.jsx(Ei,{name:"search",size:14}),x.jsx("span",{children:"Search papers, authors, domains…"})]}),_.map(({to:p,label:m,end:v,badge:g})=>x.jsxs(_i,{to:p,end:v,className:`mobile-nav-link${g?" mobile-nav-link-with-badge":""}`,onClick:a,children:[x.jsx("span",{children:m}),g&&x.jsx("span",{className:"nav-new-badge","aria-hidden":"true",children:g})]},p)),x.jsx("a",{className:"mobile-nav-link",href:k0,target:"_blank",rel:"noreferrer",onClick:a,children:"Submit feedback"}),!h&&x.jsx(_i,{to:"/saved",className:"mobile-nav-link",onClick:a,children:"Saved papers"}),!h&&(l==null?void 0:l.is_admin)&&x.jsx(_i,{to:"/admin-dashboard",className:"mobile-nav-link",onClick:a,children:"Admin dashboard"})]})})]})},$j=()=>{const{pathname:t}=Nr();return t==="/chat"||t.startsWith("/chat/")||t.startsWith("/pdf/")?null:x.jsx("footer",{className:"site-footer",children:x.jsxs("div",{className:"site-footer-inner",children:[x.jsxs("span",{children:["© ",new Date().getFullYear()," Hugging Face"]}),x.jsx(qn,{to:"/privacy",children:"Privacy"}),x.jsx("a",{href:"https://github.com/huggingface/paperswithcode-feedback/issues",target:"_blank",rel:"noreferrer",children:"Feedback"})]})})},Aj=1,Lj=1e6;let Xf=0;function Fj(){return Xf=(Xf+1)%Number.MAX_SAFE_INTEGER,Xf.toString()}const Jf=new Map,T0=t=>{if(Jf.has(t))return;const e=setTimeout(()=>{Jf.delete(t),Pa({type:"REMOVE_TOAST",toastId:t})},Lj);Jf.set(t,e)},jj=(t,e)=>{switch(e.type){case"ADD_TOAST":return{...t,toasts:[e.toast,...t.toasts].slice(0,Aj)};case"UPDATE_TOAST":return{...t,toasts:t.toasts.map(r=>r.id===e.toast.id?{...r,...e.toast}:r)};case"DISMISS_TOAST":{const{toastId:r}=e;return r?T0(r):t.toasts.forEach(n=>{T0(n.id)}),{...t,toasts:t.toasts.map(n=>n.id===r||r===void 0?{...n,open:!1}:n)}}case"REMOVE_TOAST":return e.toastId===void 0?{...t,toasts:[]}:{...t,toasts:t.toasts.filter(r=>r.id!==e.toastId)}}},Iu=[];let Ou={toasts:[]};function Pa(t){Ou=jj(Ou,t),Iu.forEach(e=>{e(Ou)})}function Dj({...t}){const e=Fj(),r=s=>Pa({type:"UPDATE_TOAST",toast:{...s,id:e}}),n=()=>Pa({type:"DISMISS_TOAST",toastId:e});return Pa({type:"ADD_TOAST",toast:{...t,id:e,open:!0,onOpenChange:s=>{s||n()}}}),{id:e,dismiss:n,update:r}}function zj(){const[t,e]=y.useState(Ou);return y.useEffect(()=>(Iu.push(e),()=>{const r=Iu.indexOf(e);r>-1&&Iu.splice(r,1)}),[t]),{...t,toast:Dj,dismiss:r=>Pa({type:"DISMISS_TOAST",toastId:r})}}var Bj=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"}),Uj="VisuallyHidden",Ed=y.forwardRef((t,e)=>x.jsx(qe.span,{...t,ref:e,style:{...Bj,...t.style}}));Ed.displayName=Uj;var Vj=Ed,Qg="ToastProvider",[Yg,qj,Hj]=Og("Toast"),[Dk]=oi("Toast",[Hj]),[Wj,Sd]=Dk(Qg),zk=t=>{const{__scopeToast:e,label:r="Notification",duration:n=5e3,swipeDirection:s="right",swipeThreshold:i=50,children:o}=t,[a,l]=y.useState(null),[u,c]=y.useState(0),d=y.useRef(!1),f=y.useRef(!1);return r.trim()||console.error(`Invalid prop \`label\` supplied to \`${Qg}\`. Expected non-empty \`string\`.`),x.jsx(Yg.Provider,{scope:e,children:x.jsx(Wj,{scope:e,label:r,duration:n,swipeDirection:s,swipeThreshold:i,toastCount:u,viewport:a,onViewportChange:l,onToastAdd:y.useCallback(()=>c(h=>h+1),[]),onToastRemove:y.useCallback(()=>c(h=>h-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:f,children:o})})};zk.displayName=Qg;var Bk="ToastViewport",Gj=["F8"],Zp="toast.viewportPause",ev="toast.viewportResume",Uk=y.forwardRef((t,e)=>{const{__scopeToast:r,hotkey:n=Gj,label:s="Notifications ({hotkey})",...i}=t,o=Sd(Bk,r),a=qj(r),l=y.useRef(null),u=y.useRef(null),c=y.useRef(null),d=y.useRef(null),f=ot(e,d,o.onViewportChange),h=n.join("+").replace(/Key/g,"").replace(/Digit/g,""),_=o.toastCount>0;y.useEffect(()=>{const m=v=>{var w;n.length!==0&&n.every(b=>v[b]||v.code===b)&&((w=d.current)==null||w.focus())};return document.addEventListener("keydown",m),()=>document.removeEventListener("keydown",m)},[n]),y.useEffect(()=>{const m=l.current,v=d.current;if(_&&m&&v){const g=()=>{if(!o.isClosePausedRef.current){const S=new CustomEvent(Zp);v.dispatchEvent(S),o.isClosePausedRef.current=!0}},w=()=>{if(o.isClosePausedRef.current){const S=new CustomEvent(ev);v.dispatchEvent(S),o.isClosePausedRef.current=!1}},b=S=>{!m.contains(S.relatedTarget)&&w()},E=()=>{m.contains(document.activeElement)||w()};return m.addEventListener("focusin",g),m.addEventListener("focusout",b),m.addEventListener("pointermove",g),m.addEventListener("pointerleave",E),window.addEventListener("blur",g),window.addEventListener("focus",w),()=>{m.removeEventListener("focusin",g),m.removeEventListener("focusout",b),m.removeEventListener("pointermove",g),m.removeEventListener("pointerleave",E),window.removeEventListener("blur",g),window.removeEventListener("focus",w)}}},[_,o.isClosePausedRef]);const p=y.useCallback(({tabbingDirection:m})=>{const g=a().map(w=>{const b=w.ref.current,E=[b,...oD(b)];return m==="forwards"?E:E.reverse()});return(m==="forwards"?g.reverse():g).flat()},[a]);return y.useEffect(()=>{const m=d.current;if(m){const v=g=>{var E,S,C;const w=g.altKey||g.ctrlKey||g.metaKey;if(g.key==="Tab"&&!w){const k=document.activeElement,R=g.shiftKey;if(g.target===m&&R){(E=u.current)==null||E.focus();return}const N=p({tabbingDirection:R?"backwards":"forwards"}),B=N.findIndex(F=>F===k);Zf(N.slice(B+1))?g.preventDefault():R?(S=u.current)==null||S.focus():(C=c.current)==null||C.focus()}};return m.addEventListener("keydown",v),()=>m.removeEventListener("keydown",v)}},[a,p]),x.jsxs(wA,{ref:l,role:"region","aria-label":s.replace("{hotkey}",h),tabIndex:-1,style:{pointerEvents:_?void 0:"none"},children:[_&&x.jsx(tv,{ref:u,onFocusFromOutsideViewport:()=>{const m=p({tabbingDirection:"forwards"});Zf(m)}}),x.jsx(Yg.Slot,{scope:r,children:x.jsx(qe.ol,{tabIndex:-1,...i,ref:f})}),_&&x.jsx(tv,{ref:c,onFocusFromOutsideViewport:()=>{const m=p({tabbingDirection:"backwards"});Zf(m)}})]})});Uk.displayName=Bk;var Vk="ToastFocusProxy",tv=y.forwardRef((t,e)=>{const{__scopeToast:r,onFocusFromOutsideViewport:n,...s}=t,i=Sd(Vk,r);return x.jsx(Ed,{tabIndex:0,...s,ref:e,style:{position:"fixed"},onFocus:o=>{var u;const a=o.relatedTarget;!((u=i.viewport)!=null&&u.contains(a))&&n()}})});tv.displayName=Vk;var xl="Toast",Kj="toast.swipeStart",Qj="toast.swipeMove",Yj="toast.swipeCancel",Xj="toast.swipeEnd",qk=y.forwardRef((t,e)=>{const{forceMount:r,open:n,defaultOpen:s,onOpenChange:i,...o}=t,[a,l]=Rg({prop:n,defaultProp:s??!0,onChange:i,caller:xl});return x.jsx(ai,{present:r||a,children:x.jsx(eD,{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)})})})});qk.displayName=xl;var[Jj,Zj]=Dk(xl,{onClose(){}}),eD=y.forwardRef((t,e)=>{const{__scopeToast:r,type:n="foreground",duration:s,open:i,onClose:o,onEscapeKeyDown:a,onPause:l,onResume:u,onSwipeStart:c,onSwipeMove:d,onSwipeCancel:f,onSwipeEnd:h,..._}=t,p=Sd(xl,r),[m,v]=y.useState(null),g=ot(e,F=>v(F)),w=y.useRef(null),b=y.useRef(null),E=s||p.duration,S=y.useRef(0),C=y.useRef(E),k=y.useRef(0),{onToastAdd:R,onToastRemove:P}=p,A=Bt(()=>{var W;(m==null?void 0:m.contains(document.activeElement))&&((W=p.viewport)==null||W.focus()),o()}),N=y.useCallback(F=>{!F||F===1/0||(window.clearTimeout(k.current),S.current=new Date().getTime(),k.current=window.setTimeout(A,F))},[A]);y.useEffect(()=>{const F=p.viewport;if(F){const W=()=>{N(C.current),u==null||u()},q=()=>{const G=new Date().getTime()-S.current;C.current=C.current-G,window.clearTimeout(k.current),l==null||l()};return F.addEventListener(Zp,q),F.addEventListener(ev,W),()=>{F.removeEventListener(Zp,q),F.removeEventListener(ev,W)}}},[p.viewport,E,l,u,N]),y.useEffect(()=>{i&&!p.isClosePausedRef.current&&N(E)},[i,E,p.isClosePausedRef,N]),y.useEffect(()=>(R(),()=>P()),[R,P]);const B=y.useMemo(()=>m?Xk(m):null,[m]);return p.viewport?x.jsxs(x.Fragment,{children:[B&&x.jsx(tD,{__scopeToast:r,role:"status","aria-live":n==="foreground"?"assertive":"polite",children:B}),x.jsx(Jj,{scope:r,onClose:A,children:pl.createPortal(x.jsx(Yg.ItemSlot,{scope:r,children:x.jsx(_A,{asChild:!0,onEscapeKeyDown:Z(a,()=>{p.isFocusedToastEscapeKeyDownRef.current||A(),p.isFocusedToastEscapeKeyDownRef.current=!1}),children:x.jsx(qe.li,{tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":p.swipeDirection,..._,ref:g,style:{userSelect:"none",touchAction:"none",...t.style},onKeyDown:Z(t.onKeyDown,F=>{F.key==="Escape"&&(a==null||a(F.nativeEvent),F.nativeEvent.defaultPrevented||(p.isFocusedToastEscapeKeyDownRef.current=!0,A()))}),onPointerDown:Z(t.onPointerDown,F=>{F.button===0&&(w.current={x:F.clientX,y:F.clientY})}),onPointerMove:Z(t.onPointerMove,F=>{if(!w.current)return;const W=F.clientX-w.current.x,q=F.clientY-w.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=F.pointerType==="touch"?10:2,Q={x:z,y:K},X={originalEvent:F,delta:Q};G?(b.current=Q,ou(Qj,d,X,{discrete:!1})):R0(Q,p.swipeDirection,H)?(b.current=Q,ou(Kj,c,X,{discrete:!1}),F.target.setPointerCapture(F.pointerId)):(Math.abs(W)>H||Math.abs(q)>H)&&(w.current=null)}),onPointerUp:Z(t.onPointerUp,F=>{const W=b.current,q=F.target;if(q.hasPointerCapture(F.pointerId)&&q.releasePointerCapture(F.pointerId),b.current=null,w.current=null,W){const G=F.currentTarget,M={originalEvent:F,delta:W};R0(W,p.swipeDirection,p.swipeThreshold)?ou(Xj,h,M,{discrete:!0}):ou(Yj,f,M,{discrete:!0}),G.addEventListener("click",T=>T.preventDefault(),{once:!0})}})})})}),p.viewport)})]}):null}),tD=t=>{const{__scopeToast:e,children:r,...n}=t,s=Sd(xl,e),[i,o]=y.useState(!1),[a,l]=y.useState(!1);return sD(()=>o(!0)),y.useEffect(()=>{const u=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(u)},[]),a?null:x.jsx(zg,{asChild:!0,children:x.jsx(Ed,{...n,children:i&&x.jsxs(x.Fragment,{children:[s.label," ",r]})})})},rD="ToastTitle",Hk=y.forwardRef((t,e)=>{const{__scopeToast:r,...n}=t;return x.jsx(qe.div,{...n,ref:e})});Hk.displayName=rD;var nD="ToastDescription",Wk=y.forwardRef((t,e)=>{const{__scopeToast:r,...n}=t;return x.jsx(qe.div,{...n,ref:e})});Wk.displayName=nD;var Gk="ToastAction",Kk=y.forwardRef((t,e)=>{const{altText:r,...n}=t;return r.trim()?x.jsx(Yk,{altText:r,asChild:!0,children:x.jsx(Xg,{...n,ref:e})}):(console.error(`Invalid prop \`altText\` supplied to \`${Gk}\`. Expected non-empty \`string\`.`),null)});Kk.displayName=Gk;var Qk="ToastClose",Xg=y.forwardRef((t,e)=>{const{__scopeToast:r,...n}=t,s=Zj(Qk,r);return x.jsx(Yk,{asChild:!0,children:x.jsx(qe.button,{type:"button",...n,ref:e,onClick:Z(t.onClick,s.onClose)})})});Xg.displayName=Qk;var Yk=y.forwardRef((t,e)=>{const{__scopeToast:r,altText:n,...s}=t;return x.jsx(qe.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":n||void 0,...s,ref:e})});function Xk(t){const e=[];return Array.from(t.childNodes).forEach(n=>{if(n.nodeType===n.TEXT_NODE&&n.textContent&&e.push(n.textContent),iD(n)){const s=n.ariaHidden||n.hidden||n.style.display==="none",i=n.dataset.radixToastAnnounceExclude==="";if(!s)if(i){const o=n.dataset.radixToastAnnounceAlt;o&&e.push(o)}else e.push(...Xk(n))}}),e}function ou(t,e,r,{discrete:n}){const s=r.originalEvent.currentTarget,i=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:r});e&&s.addEventListener(t,e,{once:!0}),n?Ig(s,i):s.dispatchEvent(i)}var R0=(t,e,r=0)=>{const n=Math.abs(t.x),s=Math.abs(t.y),i=n>s;return e==="left"||e==="right"?i&&n>r:!i&&s>r};function sD(t=()=>{}){const e=Bt(t);hr(()=>{let r=0,n=0;return r=window.requestAnimationFrame(()=>n=window.requestAnimationFrame(e)),()=>{window.cancelAnimationFrame(r),window.cancelAnimationFrame(n)}},[e])}function iD(t){return t.nodeType===t.ELEMENT_NODE}function oD(t){const e=[],r=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const s=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||s?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)e.push(r.currentNode);return e}function Zf(t){const e=document.activeElement;return t.some(r=>r===e?!0:(r.focus(),document.activeElement!==e))}var aD=zk,Jk=Uk,Zk=qk,eC=Hk,tC=Wk,rC=Kk,nC=Xg;const I0=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,O0=z1,lD=(t,e)=>r=>{var n;if((e==null?void 0:e.variants)==null)return O0(t,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:s,defaultVariants:i}=e,o=Object.keys(s).map(u=>{const c=r==null?void 0:r[u],d=i==null?void 0:i[u];if(c===null)return null;const f=I0(c)||I0(d);return s[u][f]}),a=r&&Object.entries(r).reduce((u,c)=>{let[d,f]=c;return f===void 0||(u[d]=f),u},{}),l=e==null||(n=e.compoundVariants)===null||n===void 0?void 0:n.reduce((u,c)=>{let{class:d,className:f,...h}=c;return Object.entries(h).every(_=>{let[p,m]=_;return Array.isArray(m)?m.includes({...i,...a}[p]):{...i,...a}[p]===m})?[...u,d,f]:u},[]);return O0(t,o,l,r==null?void 0:r.class,r==null?void 0:r.className)},uD=aD,sC=y.forwardRef(({className:t,...e},r)=>x.jsx(Jk,{ref:r,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}));sC.displayName=Jk.displayName;const cD=lD("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 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"}}),iC=y.forwardRef(({className:t,variant:e,...r},n)=>x.jsx(Zk,{ref:n,className:at(cD({variant:e}),t),...r}));iC.displayName=Zk.displayName;const dD=y.forwardRef(({className:t,...e},r)=>x.jsx(rC,{ref:r,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}));dD.displayName=rC.displayName;const oC=y.forwardRef(({className:t,...e},r)=>x.jsx(nC,{ref:r,className:at("absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity group-hover:opacity-100 group-[.destructive]:text-red-300 hover:text-foreground group-[.destructive]:hover:text-red-50 focus:opacity-100 focus:outline-none focus:ring-2 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",t),"toast-close":"",...e,children:x.jsx(pj,{className:"h-4 w-4"})}));oC.displayName=nC.displayName;const aC=y.forwardRef(({className:t,...e},r)=>x.jsx(eC,{ref:r,className:at("text-sm font-semibold",t),...e}));aC.displayName=eC.displayName;const lC=y.forwardRef(({className:t,...e},r)=>x.jsx(tC,{ref:r,className:at("text-sm opacity-90",t),...e}));lC.displayName=tC.displayName;function fD(){const{toasts:t}=zj();return x.jsxs(uD,{children:[t.map(function({id:e,title:r,description:n,action:s,...i}){return x.jsxs(iC,{...i,children:[x.jsxs("div",{className:"grid gap-1",children:[r&&x.jsx(aC,{children:r}),n&&x.jsx(lC,{children:n})]}),s,x.jsx(oC,{})]},e)}),x.jsx(sC,{})]})}var hD=t=>{switch(t){case"success":return gD;case"info":return yD;case"warning":return mD;case"error":return _D;default:return null}},pD=Array(12).fill(0),vD=({visible:t,className:e})=>I.createElement("div",{className:["sonner-loading-wrapper",e].filter(Boolean).join(" "),"data-visible":t},I.createElement("div",{className:"sonner-spinner"},pD.map((r,n)=>I.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${n}`})))),gD=I.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},I.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"})),mD=I.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},I.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"})),yD=I.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},I.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"})),_D=I.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},I.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"})),wD=I.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"},I.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),I.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),xD=()=>{let[t,e]=I.useState(document.hidden);return I.useEffect(()=>{let r=()=>{e(document.hidden)};return document.addEventListener("visibilitychange",r),()=>window.removeEventListener("visibilitychange",r)},[]),t},rv=1,bD=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:r,...n}=t,s=typeof(t==null?void 0:t.id)=="number"||((e=t.id)==null?void 0:e.length)>0?t.id:rv++,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:r}),{...a,...t,id:s,dismissible:o,title:r}):a):this.addToast({title:r,...n,dismissible:o,id:s}),s},this.dismiss=t=>(this.dismissedToasts.add(t),t||this.toasts.forEach(e=>{this.subscribers.forEach(r=>r({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 r;e.loading!==void 0&&(r=this.create({...e,promise:t,type:"loading",message:e.loading,description:typeof e.description!="function"?e.description:void 0}));let n=t instanceof Promise?t:t(),s=r!==void 0,i,o=n.then(async l=>{if(i=["resolve",l],I.isValidElement(l))s=!1,this.create({id:r,type:"default",message:l});else if(SD(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:r,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:r,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:r,type:"error",message:u,description:c})}}).finally(()=>{var l;s&&(this.dismiss(r),r=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 r!="string"&&typeof r!="number"?{unwrap:a}:Object.assign(r,{unwrap:a})},this.custom=(t,e)=>{let r=(e==null?void 0:e.id)||rv++;return this.create({jsx:t(r),id:r,...e}),r},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},Nt=new bD,ED=(t,e)=>{let r=(e==null?void 0:e.id)||rv++;return Nt.addToast({title:t,...e,id:r}),r},SD=t=>t&&typeof t=="object"&&"ok"in t&&typeof t.ok=="boolean"&&"status"in t&&typeof t.status=="number",kD=ED,CD=()=>Nt.toasts,PD=()=>Nt.getActiveToasts();Object.assign(kD,{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:CD,getToasts:PD});function TD(t,{insertAt:e}={}){if(typeof document>"u")return;let r=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",e==="top"&&r.firstChild?r.insertBefore(n,r.firstChild):r.appendChild(n),n.styleSheet?n.styleSheet.cssText=t:n.appendChild(document.createTextNode(t))}TD(`: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 au(t){return t.label!==void 0}var RD=3,ID="32px",OD="16px",M0=4e3,MD=356,ND=14,$D=20,AD=200;function wr(...t){return t.filter(Boolean).join(" ")}function LD(t){let[e,r]=t.split("-"),n=[];return e&&n.push(e),r&&n.push(r),n}var FD=t=>{var e,r,n,s,i,o,a,l,u,c,d;let{invert:f,toast:h,unstyled:_,interacting:p,setHeights:m,visibleToasts:v,heights:g,index:w,toasts:b,expanded:E,removeToast:S,defaultRichColors:C,closeButton:k,style:R,cancelButtonStyle:P,actionButtonStyle:A,className:N="",descriptionClassName:B="",duration:F,position:W,gap:q,loadingIcon:G,expandByDefault:M,classNames:T,icons:z,closeButtonAriaLabel:K="Close toast",pauseWhenPageIsHidden:H}=t,[Q,X]=I.useState(null),[ie,he]=I.useState(null),[se,pe]=I.useState(!1),[_e,Je]=I.useState(!1),[Ot,Ze]=I.useState(!1),[De,Jr]=I.useState(!1),[Tn,lt]=I.useState(!1),[Rn,tr]=I.useState(0),[Ut,In]=I.useState(0),On=I.useRef(h.duration||F||M0),Fo=I.useRef(null),pr=I.useRef(null),_C=w===0,wC=w+1<=v,rr=h.type,ci=h.dismissible!==!1,xC=h.className||"",bC=h.descriptionClassName||"",bl=I.useMemo(()=>g.findIndex(oe=>oe.toastId===h.id)||0,[g,h.id]),EC=I.useMemo(()=>{var oe;return(oe=h.closeButton)!=null?oe:k},[h.closeButton,k]),Zg=I.useMemo(()=>h.duration||F||M0,[h.duration,F]),Pd=I.useRef(0),di=I.useRef(0),em=I.useRef(0),fi=I.useRef(null),[SC,kC]=W.split("-"),tm=I.useMemo(()=>g.reduce((oe,Se,Le)=>Le>=bl?oe:oe+Se.height,0),[g,bl]),rm=xD(),CC=h.invert||f,Td=rr==="loading";di.current=I.useMemo(()=>bl*q+tm,[bl,tm]),I.useEffect(()=>{On.current=Zg},[Zg]),I.useEffect(()=>{pe(!0)},[]),I.useEffect(()=>{let oe=pr.current;if(oe){let Se=oe.getBoundingClientRect().height;return In(Se),m(Le=>[{toastId:h.id,height:Se,position:h.position},...Le]),()=>m(Le=>Le.filter(vr=>vr.toastId!==h.id))}},[m,h.id]),I.useLayoutEffect(()=>{if(!se)return;let oe=pr.current,Se=oe.style.height;oe.style.height="auto";let Le=oe.getBoundingClientRect().height;oe.style.height=Se,In(Le),m(vr=>vr.find(gr=>gr.toastId===h.id)?vr.map(gr=>gr.toastId===h.id?{...gr,height:Le}:gr):[{toastId:h.id,height:Le,position:h.position},...vr])},[se,h.title,h.description,m,h.id]);let Mn=I.useCallback(()=>{Je(!0),tr(di.current),m(oe=>oe.filter(Se=>Se.toastId!==h.id)),setTimeout(()=>{S(h)},AD)},[h,S,m,di]);I.useEffect(()=>{if(h.promise&&rr==="loading"||h.duration===1/0||h.type==="loading")return;let oe;return E||p||H&&rm?(()=>{if(em.current{var Se;(Se=h.onAutoClose)==null||Se.call(h,h),Mn()},On.current)),()=>clearTimeout(oe)},[E,p,h,rr,H,rm,Mn]),I.useEffect(()=>{h.delete&&Mn()},[Mn,h.delete]);function PC(){var oe,Se,Le;return z!=null&&z.loading?I.createElement("div",{className:wr(T==null?void 0:T.loader,(oe=h==null?void 0:h.classNames)==null?void 0:oe.loader,"sonner-loader"),"data-visible":rr==="loading"},z.loading):G?I.createElement("div",{className:wr(T==null?void 0:T.loader,(Se=h==null?void 0:h.classNames)==null?void 0:Se.loader,"sonner-loader"),"data-visible":rr==="loading"},G):I.createElement(vD,{className:wr(T==null?void 0:T.loader,(Le=h==null?void 0:h.classNames)==null?void 0:Le.loader),visible:rr==="loading"})}return I.createElement("li",{tabIndex:0,ref:pr,className:wr(N,xC,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[rr],(r=h==null?void 0:h.classNames)==null?void 0:r[rr]),"data-sonner-toast":"","data-rich-colors":(n=h.richColors)!=null?n:C,"data-styled":!(h.jsx||h.unstyled||_),"data-mounted":se,"data-promise":!!h.promise,"data-swiped":Tn,"data-removed":_e,"data-visible":wC,"data-y-position":SC,"data-x-position":kC,"data-index":w,"data-front":_C,"data-swiping":Ot,"data-dismissible":ci,"data-type":rr,"data-invert":CC,"data-swipe-out":De,"data-swipe-direction":ie,"data-expanded":!!(E||M&&se),style:{"--index":w,"--toasts-before":w,"--z-index":b.length-w,"--offset":`${_e?Rn:di.current}px`,"--initial-height":M?"auto":`${Ut}px`,...R,...h.style},onDragEnd:()=>{Ze(!1),X(null),fi.current=null},onPointerDown:oe=>{Td||!ci||(Fo.current=new Date,tr(di.current),oe.target.setPointerCapture(oe.pointerId),oe.target.tagName!=="BUTTON"&&(Ze(!0),fi.current={x:oe.clientX,y:oe.clientY}))},onPointerUp:()=>{var oe,Se,Le,vr;if(De||!ci)return;fi.current=null;let gr=Number(((oe=pr.current)==null?void 0:oe.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Nn=Number(((Se=pr.current)==null?void 0:Se.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),ws=new Date().getTime()-((Le=Fo.current)==null?void 0:Le.getTime()),mr=Q==="x"?gr:Nn,$n=Math.abs(mr)/ws;if(Math.abs(mr)>=$D||$n>.11){tr(di.current),(vr=h.onDismiss)==null||vr.call(h,h),he(Q==="x"?gr>0?"right":"left":Nn>0?"down":"up"),Mn(),Jr(!0),lt(!1);return}Ze(!1),X(null)},onPointerMove:oe=>{var Se,Le,vr,gr;if(!fi.current||!ci||((Se=window.getSelection())==null?void 0:Se.toString().length)>0)return;let Nn=oe.clientY-fi.current.y,ws=oe.clientX-fi.current.x,mr=(Le=t.swipeDirections)!=null?Le:LD(W);!Q&&(Math.abs(ws)>1||Math.abs(Nn)>1)&&X(Math.abs(ws)>Math.abs(Nn)?"x":"y");let $n={x:0,y:0};Q==="y"?(mr.includes("top")||mr.includes("bottom"))&&(mr.includes("top")&&Nn<0||mr.includes("bottom")&&Nn>0)&&($n.y=Nn):Q==="x"&&(mr.includes("left")||mr.includes("right"))&&(mr.includes("left")&&ws<0||mr.includes("right")&&ws>0)&&($n.x=ws),(Math.abs($n.x)>0||Math.abs($n.y)>0)&<(!0),(vr=pr.current)==null||vr.style.setProperty("--swipe-amount-x",`${$n.x}px`),(gr=pr.current)==null||gr.style.setProperty("--swipe-amount-y",`${$n.y}px`)}},EC&&!h.jsx?I.createElement("button",{"aria-label":K,"data-disabled":Td,"data-close-button":!0,onClick:Td||!ci?()=>{}:()=>{var oe;Mn(),(oe=h.onDismiss)==null||oe.call(h,h)},className:wr(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:wD):null,h.jsx||y.isValidElement(h.title)?h.jsx?h.jsx:typeof h.title=="function"?h.title():h.title:I.createElement(I.Fragment,null,rr||h.icon||h.promise?I.createElement("div",{"data-icon":"",className:wr(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||PC():null,h.type!=="loading"?h.icon||(z==null?void 0:z[rr])||hD(rr):null):null,I.createElement("div",{"data-content":"",className:wr(T==null?void 0:T.content,(a=h==null?void 0:h.classNames)==null?void 0:a.content)},I.createElement("div",{"data-title":"",className:wr(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?I.createElement("div",{"data-description":"",className:wr(B,bC,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),y.isValidElement(h.cancel)?h.cancel:h.cancel&&au(h.cancel)?I.createElement("button",{"data-button":!0,"data-cancel":!0,style:h.cancelButtonStyle||P,onClick:oe=>{var Se,Le;au(h.cancel)&&ci&&((Le=(Se=h.cancel).onClick)==null||Le.call(Se,oe),Mn())},className:wr(T==null?void 0:T.cancelButton,(c=h==null?void 0:h.classNames)==null?void 0:c.cancelButton)},h.cancel.label):null,y.isValidElement(h.action)?h.action:h.action&&au(h.action)?I.createElement("button",{"data-button":!0,"data-action":!0,style:h.actionButtonStyle||A,onClick:oe=>{var Se,Le;au(h.action)&&((Le=(Se=h.action).onClick)==null||Le.call(Se,oe),!oe.defaultPrevented&&Mn())},className:wr(T==null?void 0:T.actionButton,(d=h==null?void 0:h.classNames)==null?void 0:d.actionButton)},h.action.label):null))};function N0(){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 jD(t,e){let r={};return[t,e].forEach((n,s)=>{let i=s===1,o=i?"--mobile-offset":"--offset",a=i?OD:ID;function l(u){["top","right","bottom","left"].forEach(c=>{r[`${o}-${c}`]=typeof u=="number"?`${u}px`:u})}typeof n=="number"||typeof n=="string"?l(n):typeof n=="object"?["top","right","bottom","left"].forEach(u=>{n[u]===void 0?r[`${o}-${u}`]=a:r[`${o}-${u}`]=typeof n[u]=="number"?`${n[u]}px`:n[u]}):l(a)}),r}var DD=y.forwardRef(function(t,e){let{invert:r,position:n="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:_=RD,toastOptions:p,dir:m=N0(),gap:v=ND,loadingIcon:g,icons:w,containerAriaLabel:b="Notifications",pauseWhenPageIsHidden:E}=t,[S,C]=I.useState([]),k=I.useMemo(()=>Array.from(new Set([n].concat(S.filter(H=>H.position).map(H=>H.position)))),[S,n]),[R,P]=I.useState([]),[A,N]=I.useState(!1),[B,F]=I.useState(!1),[W,q]=I.useState(c!=="system"?c:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),G=I.useRef(null),M=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),T=I.useRef(null),z=I.useRef(!1),K=I.useCallback(H=>{C(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 I.useEffect(()=>Nt.subscribe(H=>{if(H.dismiss){C(Q=>Q.map(X=>X.id===H.id?{...X,delete:!0}:X));return}setTimeout(()=>{ob.flushSync(()=>{C(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]})})})}),[]),I.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]),I.useEffect(()=>{S.length<=1&&N(!1)},[S]),I.useEffect(()=>{let H=Q=>{var X,ie;s.every(he=>Q[he]||Q.code===he)&&(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]),I.useEffect(()=>{if(G.current)return()=>{T.current&&(T.current.focus({preventScroll:!0}),T.current=null,z.current=!1)}},[G.current]),I.createElement("section",{ref:e,"aria-label":`${b} ${M}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},k.map((H,Q)=>{var X;let[ie,he]=H.split("-");return S.length?I.createElement("ol",{key:H,dir:m==="auto"?N0():m,tabIndex:-1,ref:G,className:a,"data-sonner-toaster":!0,"data-theme":W,"data-y-position":ie,"data-lifted":A&&S.length>1&&!i,"data-x-position":he,style:{"--front-toast-height":`${((X=R[0])==null?void 0:X.height)||0}px`,"--width":`${MD}px`,"--gap":`${v}px`,...h,...jD(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"||F(!0)},onPointerUp:()=>F(!1)},S.filter(se=>!se.position&&Q===0||se.position===H).map((se,pe)=>{var _e,Je;return I.createElement(FD,{key:se.id,icons:w,index:pe,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:r,visibleToasts:_,closeButton:(Je=p==null?void 0:p.closeButton)!=null?Je: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:R.filter(Ot=>Ot.position==se.position),setHeights:P,expandByDefault:i,gap:v,loadingIcon:g,expanded:A,pauseWhenPageIsHidden:E,swipeDirections:t.swipeDirections})})):null}))});const zD=({...t})=>{const{theme:e="system"}=sR();return x.jsx(DD,{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 BD=Symbol("radix.slottable");function UD(t){const e=({children:r})=>x.jsx(x.Fragment,{children:r});return e.displayName=`${t}.Slottable`,e.__radixId=BD,e}var[kd]=oi("Tooltip",[md]),Jg=md(),uC="TooltipProvider",VD=700,$0="tooltip.open",[qD,cC]=kd(uC),dC=t=>{const{__scopeTooltip:e,delayDuration:r=VD,skipDelayDuration:n=300,disableHoverableContent:s=!1,children:i}=t,o=y.useRef(!0),a=y.useRef(!1),l=y.useRef(0);return y.useEffect(()=>{const u=l.current;return()=>window.clearTimeout(u)},[]),x.jsx(qD,{scope:e,isOpenDelayedRef:o,delayDuration:r,onOpen:y.useCallback(()=>{window.clearTimeout(l.current),o.current=!1},[]),onClose:y.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>o.current=!0,n)},[n]),isPointerInTransitRef:a,onPointerInTransitChange:y.useCallback(u=>{a.current=u},[]),disableHoverableContent:s,children:i})};dC.displayName=uC;var fC="Tooltip",[pz,Cd]=kd(fC),nv="TooltipTrigger",HD=y.forwardRef((t,e)=>{const{__scopeTooltip:r,...n}=t,s=Cd(nv,r),i=cC(nv,r),o=Jg(r),a=y.useRef(null),l=ot(e,a,s.onTriggerChange),u=y.useRef(!1),c=y.useRef(!1),d=y.useCallback(()=>u.current=!1,[]);return y.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),x.jsx(bS,{asChild:!0,...o,children:x.jsx(qe.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...n,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)})})});HD.displayName=nv;var WD="TooltipPortal",[vz,GD]=kd(WD,{forceMount:void 0}),Ro="TooltipContent",hC=y.forwardRef((t,e)=>{const r=GD(Ro,t.__scopeTooltip),{forceMount:n=r.forceMount,side:s="top",...i}=t,o=Cd(Ro,t.__scopeTooltip);return x.jsx(ai,{present:n||o.open,children:o.disableHoverableContent?x.jsx(pC,{side:s,...i,ref:e}):x.jsx(KD,{side:s,...i,ref:e})})}),KD=y.forwardRef((t,e)=>{const r=Cd(Ro,t.__scopeTooltip),n=cC(Ro,t.__scopeTooltip),s=y.useRef(null),i=ot(e,s),[o,a]=y.useState(null),{trigger:l,onClose:u}=r,c=s.current,{onPointerInTransitChange:d}=n,f=y.useCallback(()=>{a(null),d(!1)},[d]),h=y.useCallback((_,p)=>{const m=_.currentTarget,v={x:_.clientX,y:_.clientY},g=ZD(v,m.getBoundingClientRect()),w=e3(v,g),b=t3(p.getBoundingClientRect()),E=n3([...w,...b]);a(E),d(!0)},[d]);return y.useEffect(()=>()=>f(),[f]),y.useEffect(()=>{if(l&&c){const _=m=>h(m,c),p=m=>h(m,l);return l.addEventListener("pointerleave",_),c.addEventListener("pointerleave",p),()=>{l.removeEventListener("pointerleave",_),c.removeEventListener("pointerleave",p)}}},[l,c,h,f]),y.useEffect(()=>{if(o){const _=p=>{const m=p.target,v={x:p.clientX,y:p.clientY},g=(l==null?void 0:l.contains(m))||(c==null?void 0:c.contains(m)),w=!r3(v,o);g?f():w&&(f(),u())};return document.addEventListener("pointermove",_),()=>document.removeEventListener("pointermove",_)}},[l,c,o,u,f]),x.jsx(pC,{...t,ref:i})}),[QD,YD]=kd(fC,{isInside:!1}),XD=UD("TooltipContent"),pC=y.forwardRef((t,e)=>{const{__scopeTooltip:r,children:n,"aria-label":s,onEscapeKeyDown:i,onPointerDownOutside:o,...a}=t,l=Cd(Ro,r),u=Jg(r),{onClose:c}=l;return y.useEffect(()=>(document.addEventListener($0,c),()=>document.removeEventListener($0,c)),[c]),y.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]),x.jsx(fd,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:d=>d.preventDefault(),onDismiss:c,children:x.jsxs(ES,{"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:[x.jsx(XD,{children:n}),x.jsx(QD,{scope:r,isInside:!0,children:x.jsx(Vj,{id:l.contentId,role:"tooltip",children:s||n})})]})})});hC.displayName=Ro;var vC="TooltipArrow",JD=y.forwardRef((t,e)=>{const{__scopeTooltip:r,...n}=t,s=Jg(r);return YD(vC,r).isInside?null:x.jsx(SS,{...s,...n,ref:e})});JD.displayName=vC;function ZD(t,e){const r=Math.abs(e.top-t.y),n=Math.abs(e.bottom-t.y),s=Math.abs(e.right-t.x),i=Math.abs(e.left-t.x);switch(Math.min(r,n,s,i)){case i:return"left";case s:return"right";case r:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function e3(t,e,r=5){const n=[];switch(e){case"top":n.push({x:t.x-r,y:t.y+r},{x:t.x+r,y:t.y+r});break;case"bottom":n.push({x:t.x-r,y:t.y-r},{x:t.x+r,y:t.y-r});break;case"left":n.push({x:t.x+r,y:t.y-r},{x:t.x+r,y:t.y+r});break;case"right":n.push({x:t.x-r,y:t.y-r},{x:t.x-r,y:t.y+r});break}return n}function t3(t){const{top:e,right:r,bottom:n,left:s}=t;return[{x:s,y:e},{x:r,y:e},{x:r,y:n},{x:s,y:n}]}function r3(t,e){const{x:r,y:n}=t;let s=!1;for(let i=0,o=e.length-1;in!=f>n&&r<(d-u)*(n-c)/(f-c)+u&&(s=!s)}return s}function n3(t){const e=t.slice();return e.sort((r,n)=>r.xn.x?1:r.yn.y?1:0),s3(e)}function s3(t){if(t.length<=1)return t.slice();const e=[];for(let n=0;n=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 r=[];for(let n=t.length-1;n>=0;n--){const s=t[n];for(;r.length>=2;){const i=r[r.length-1],o=r[r.length-2];if((i.x-o.x)*(s.y-o.y)>=(i.y-o.y)*(s.x-o.x))r.pop();else break}r.push(s)}return r.pop(),e.length===1&&r.length===1&&e[0].x===r[0].x&&e[0].y===r[0].y?e:e.concat(r)}var i3=dC,gC=hC;const o3=i3,a3=y.forwardRef(({className:t,sideOffset:e=4,...r},n)=>x.jsx(gC,{ref:n,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),...r}));a3.displayName=gC.displayName;function l3(){const{pathname:t,hash:e}=Nr();y.useEffect(()=>{e||window.scrollTo(0,0)},[t,e])}class u3{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 A0=new u3(Jp),eh={hide_closed_source_evals:!1},mC=I.createContext(null),c3=({children:t})=>{const{user:e}=Kg(),[r,n]=I.useState(eh),[s,i]=I.useState(!1);I.useEffect(()=>{let l=!1;if(!e){n(eh);return}return i(!0),A0.getPreferences().then(u=>{l||n(u)}).catch(()=>{l||n(eh)}).finally(()=>{l||i(!1)}),()=>{l=!0}},[e]);const o=I.useCallback(async l=>{const u={...r,hide_closed_source_evals:l};if(n(u),!!e)try{const c=await A0.updatePreferences(u);n(c)}catch{n(r)}},[r,e]),a=I.useMemo(()=>({preferences:r,canPersist:!!e,isLoading:s,setHideClosedSourceEvals:o}),[r,e,s,o]);return x.jsx(mC.Provider,{value:a,children:t})};function gz(){const t=I.useContext(mC);if(!t)throw new Error("usePreferences must be used inside a ");return t}const yC=VN(),d3=yC?iN:sN;if(!yC&&typeof window<"u"){const t=window.location.hash;t.startsWith("#/")&&!t.startsWith("#//")&&window.history.replaceState(null,"",t.slice(1))}const f3=I.lazy(()=>me(()=>import("./FeedView-DkdrvXaC.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19]))),h3=I.lazy(()=>me(()=>import("./ChatView-C_sQDmRZ.js"),__vite__mapDeps([20,13,21,10,11,12,6,3,4,22,23,24,25,26,27,28,29,30,15,31]))),p3=I.lazy(()=>me(()=>import("./SharedChatView-BF8QaAJZ.js"),__vite__mapDeps([32,13,21,10,11,12,6,3,4,22,23,24,25,26,27,28,29,30]))),v3=I.lazy(()=>me(()=>import("./PapersListView-CacFfG7A.js"),__vite__mapDeps([33,1,2,3,4,5,6,7,14,16,13,17,34,8,9,18,19]))),g3=I.lazy(()=>me(()=>import("./PaperDetailView-DB5nVfY_.js"),__vite__mapDeps([35,1,2,3,4,5,6,7,36,22,37,13,16,17,38,18,19,39,40,41,42,9,43,28,14,44,45,23,46,47,24,26,48,49]))),m3=I.lazy(()=>me(()=>import("./PaperReaderView-DvqvLLoh.js"),__vite__mapDeps([50,13,21,10,11,12,6,3,4,22,23,24,25,26,27,28,29,30,16,17,7,20,15,31]))),y3=I.lazy(()=>me(()=>import("./TagsIndexView-p9VyqRM6.js"),__vite__mapDeps([51,13,14,5,52,18,19,53,45,39,40,41,28,44,43]))),_3=I.lazy(()=>me(()=>import("./TagBrowseView-Cl8JYE1w.js"),__vite__mapDeps([54,13,1,2,3,4,5,6,7,55,8,9,56,25,26,22,14,52,16,17,18,19,12,24]))),w3=I.lazy(()=>me(()=>import("./MethodsIndexView-C2HRCWSA.js"),__vite__mapDeps([57,13,14,52,18,19,53,45,39,40,41,28,44,43]))),x3=I.lazy(()=>me(()=>import("./FrameworksIndexView-C07bXY9T.js"),__vite__mapDeps([58,13,1,2,3,4,5,6,7,14]))),b3=I.lazy(()=>me(()=>import("./TrendsView-CSAyYk6b.js"),__vite__mapDeps([59,13,19,18]))),E3=I.lazy(()=>me(()=>import("./ConferencesIndexView-CA_XWUAi.js"),__vite__mapDeps([60,13,14,18,19,53,45,39,40,41,28,44,43]))),S3=I.lazy(()=>me(()=>import("./AiDeadlinesView-D4Hrlig2.js"),__vite__mapDeps([61,13,14,62,47,18,19,7,41]))),k3=I.lazy(()=>me(()=>import("./ConferenceDetailView-U1eFBlMo.js"),__vite__mapDeps([63,13,56,3,4,25,26,22,6,14,5,18,19,7]))),C3=I.lazy(()=>me(()=>import("./ConferenceTaskView-Co8AdVvk.js"),__vite__mapDeps([64,13,1,2,3,4,5,6,7,8,9,56,25,26,22,14,16,17,18,19]))),P3=I.lazy(()=>me(()=>import("./OrganizationsIndexView-BFWAW5nR.js"),__vite__mapDeps([65,13,19,18,14,66]))),T3=I.lazy(()=>me(()=>import("./OrganizationDetailView-Cf4QdmqL.js"),__vite__mapDeps([67,68,13,1,2,3,4,5,6,7,56,25,26,22,69,18,14,8,9,19,42,39,41,43,16,17,70]))),R3=I.lazy(()=>me(()=>import("./OrganizationTaskView-KbmvUuSs.js"),__vite__mapDeps([71,68,13,1,2,3,4,5,6,7,56,25,26,22,69,18,14,8,9,19,42,39,41,43,16,17,70]))),I3=I.lazy(()=>me(()=>import("./AuthorDetailView-DkyM2b_B.js"),__vite__mapDeps([72,13,6,18,70]))),O3=I.lazy(()=>me(()=>import("./MethodDetailView-BNXK8V3e.js"),__vite__mapDeps([73,13,17,1,2,3,4,5,6,7,8,9,56,25,26,22,14,52,18,19]))),M3=I.lazy(()=>me(()=>import("./BenchmarkDetailView-CP6Bok1b.js"),__vite__mapDeps([74,13,14,36,6,22,7,37,18,62,47,19,2,3,4,55,1,5,52,75]))),N3=I.lazy(()=>me(()=>import("./SavedPapersView-9_TEeoY-.js"),__vite__mapDeps([76,13,1,2,3,4,5,6,7,18,19,48]))),$3=I.lazy(()=>me(()=>import("./SettingsView-bS736GLu.js"),__vite__mapDeps([77,13,28,62,47,11,38,31,29]))),A3=I.lazy(()=>me(()=>import("./PrivacyView-C2T_LyM0.js"),__vite__mapDeps([78,38]))),L3=I.lazy(()=>me(()=>import("./SubmitView-CEm_w3o3.js"),__vite__mapDeps([79,28,19,39,40,6]))),F3=I.lazy(()=>me(()=>import("./CronDashboard-Cn8uaVGb.js"),__vite__mapDeps([80,13,46,39,12,27,81,43,82,29,28,17,14,11,83]))),j3=I.lazy(()=>me(()=>import("./SubmissionsDashboard-BxcDg24H.js"),__vite__mapDeps([84,13,28,14,7,6,44,81,43,82,85]))),D3=I.lazy(()=>me(()=>import("./UserProfileView-BER9pnDz.js"),__vite__mapDeps([86,13,69,18,14]))),z3=I.lazy(()=>me(()=>import("./RateLimitsView-B7_tunuS.js"),__vite__mapDeps([87,13]))),th=I.lazy(()=>me(()=>import("./NotFound-BSLpqWSh.js"),[])),L0=I.lazy(()=>me(()=>import("./SearchOverlay-DDzvZPvq.js"),__vite__mapDeps([88,13,2,3,4,14,6,34,5]))),B3=I.lazy(()=>me(()=>import("./StagingAccessRequestView-CL10uP0d.js"),__vite__mapDeps([89,82]))),rh=()=>x.jsxs("div",{className:"page","aria-busy":"true","aria-live":"polite",children:[x.jsx("div",{className:"animate-pulse rounded-md bg-muted",style:{height:24,width:"30%",marginBottom:24}}),x.jsx("div",{className:"animate-pulse rounded-md bg-muted",style:{height:64,width:"60%",marginBottom:32}}),x.jsxs("div",{className:"paper-list",style:{display:"grid",gap:16},children:[x.jsx("div",{className:"animate-pulse rounded-md bg-muted",style:{height:96}}),x.jsx("div",{className:"animate-pulse rounded-md bg-muted",style:{height:96}}),x.jsx("div",{className:"animate-pulse rounded-md bg-muted",style:{height:96}})]})]}),U3=new jN({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:1}}}),V3=()=>{const{arxivId:t}=a1();return x.jsx(Co,{to:t?`/paper/${t}`:"/papers",replace:!0})},q3=()=>{const{taskSlug:t}=a1();return x.jsx(Co,{to:t?`/tasks/${t}`:"/tasks",replace:!0})},F0=({element:t})=>gl()?x.jsx(Co,{to:"/",replace:!0}):x.jsx(x.Fragment,{children:t}),H3=({element:t})=>{const{user:e,isLoading:r}=Kg();return gl()?x.jsx(Co,{to:"/",replace:!0}):r?x.jsx("div",{className:"page",children:x.jsx("div",{className:"submission-loading",children:x.jsx("span",{children:"Checking admin session..."})})}):e?e.is_admin?x.jsx(x.Fragment,{children:t}):x.jsx("div",{className:"page",children:x.jsxs("div",{className:"submission-empty submission-empty-warn",children:[x.jsx("h1",{children:"Admin access required"}),x.jsxs("p",{children:["Signed in as @",e.username,". This dashboard is limited to allowlisted admin accounts."]})]})}):x.jsx("div",{className:"page",children:x.jsxs("div",{className:"submission-empty submission-empty-warn",children:[x.jsx("h1",{children:"Sign in required"}),x.jsx("p",{children:"Sign in with an allowlisted Hugging Face admin account to view admin operations."}),x.jsx(k1,{returnTo:"/admin-dashboard"})]})})},W3=()=>{const t=BN(),e=typeof window<"u"&&new URL(t,window.location.origin).origin!==window.location.origin;return I.useEffect(()=>{e&&window.location.replace(t)},[t,e]),e?x.jsx("div",{className:"page",children:x.jsxs("div",{className:"submission-loading",children:[x.jsx("span",{children:"Opening the production admin dashboard..."}),x.jsx("a",{href:t,children:"Continue"})]})}):x.jsx(H3,{element:x.jsx(F3,{})})},G3=()=>{const[t,e]=I.useState(!1),r=Nr();return l3(),I.useLayoutEffect(()=>{var n;(n=document.getElementById("initial-discovery-footer"))==null||n.remove()},[]),I.useEffect(()=>{const n=s=>{(s.metaKey||s.ctrlKey)&&s.key==="k"&&(s.preventDefault(),e(!0))};return window.addEventListener("keydown",n),()=>window.removeEventListener("keydown",n)},[]),r.pathname==="/request-access"?x.jsx(I.Suspense,{fallback:x.jsx(rh,{}),children:x.jsx(B3,{})}):r.pathname.startsWith("/pdf/")?x.jsxs("div",{className:"reader-route-shell",children:[x.jsx(P0,{onOpenSearch:()=>e(!0)}),x.jsx("div",{className:"reader-route-content",children:x.jsx(I.Suspense,{fallback:x.jsx(rh,{}),children:x.jsx(j_,{children:x.jsx(fe,{path:"/pdf/:arxivId",element:UN()?x.jsx(m3,{}):x.jsx(th,{})})})})}),t&&x.jsx(I.Suspense,{fallback:null,children:x.jsx(L0,{open:t,onClose:()=>e(!1)})})]}):x.jsxs(x.Fragment,{children:[x.jsx(P0,{onOpenSearch:()=>e(!0)}),x.jsx("main",{children:x.jsx(I.Suspense,{fallback:x.jsx(rh,{}),children:x.jsxs(j_,{children:[x.jsx(fe,{path:"/",element:x.jsx(f3,{})}),x.jsx(fe,{path:"/chat/:sessionId?",element:Mc()?x.jsx(h3,{}):x.jsx(Co,{to:"/",replace:!0})}),x.jsx(fe,{path:"/share/:shareId",element:Mc()?x.jsx(p3,{}):x.jsx(th,{})}),x.jsx(fe,{path:"/papers",element:x.jsx(v3,{})}),x.jsx(fe,{path:"/papers/:arxivId",element:x.jsx(V3,{})}),x.jsx(fe,{path:"/paper/:arxivId",element:x.jsx(g3,{})}),x.jsx(fe,{path:"/tasks",element:x.jsx(y3,{})}),x.jsx(fe,{path:"/tasks/:taskSlug",element:x.jsx(_3,{})}),x.jsx(fe,{path:"/task/:taskSlug",element:x.jsx(q3,{})}),x.jsx(fe,{path:"/methods",element:x.jsx(w3,{})}),x.jsx(fe,{path:"/methods/:methodSlug",element:x.jsx(O3,{})}),x.jsx(fe,{path:"/frameworks",element:x.jsx(x3,{})}),x.jsx(fe,{path:"/trends",element:x.jsx(b3,{})}),x.jsx(fe,{path:"/conferences",element:x.jsx(E3,{})}),x.jsx(fe,{path:"/ai-deadlines",element:x.jsx(S3,{})}),x.jsx(fe,{path:"/conferences/:confSlug",element:x.jsx(k3,{})}),x.jsx(fe,{path:"/conferences/:confSlug/:taskSlug",element:x.jsx(C3,{})}),x.jsx(fe,{path:"/organizations",element:x.jsx(P3,{})}),x.jsx(fe,{path:"/orgs/:orgSlug",element:x.jsx(T3,{})}),x.jsx(fe,{path:"/orgs/:orgSlug/:taskSlug",element:x.jsx(R3,{})}),x.jsx(fe,{path:"/authors/:authorId",element:x.jsx(I3,{})}),x.jsx(fe,{path:"/benchmark/:datasetSlug",element:x.jsx(M3,{})}),x.jsx(fe,{path:"/submit",element:x.jsx(L3,{})}),x.jsx(fe,{path:"/saved",element:x.jsx(F0,{element:x.jsx(N3,{})})}),x.jsx(fe,{path:"/settings",element:x.jsx($3,{})}),x.jsx(fe,{path:"/privacy",element:x.jsx(A3,{})}),x.jsx(fe,{path:"/admin-dashboard",element:x.jsx(W3,{})}),x.jsx(fe,{path:"/cron-dashboard",element:x.jsx(Co,{to:"/admin-dashboard",replace:!0})}),x.jsx(fe,{path:"/submissions",element:x.jsx(F0,{element:x.jsx(j3,{})})}),x.jsx(fe,{path:"/rate-limits",element:x.jsx(z3,{})}),x.jsx(fe,{path:"/:username",element:x.jsx(D3,{})}),x.jsx(fe,{path:"*",element:x.jsx(th,{})})]})})}),x.jsx($j,{}),t&&x.jsx(I.Suspense,{fallback:null,children:x.jsx(L0,{open:t,onClose:()=>e(!1)})})]})},K3=()=>x.jsx(DN,{client:U3,children:x.jsx(Ij,{children:x.jsx(c3,{children:x.jsxs(o3,{children:[x.jsx(d3,{children:x.jsx(G3,{})}),x.jsx(fD,{}),x.jsx(zD,{}),!1]})})})});oM();const Q3=x.jsx(iR,{attribute:"class",defaultTheme:"system",enableSystem:!0,disableTransitionOnChange:!0,storageKey:"pwc-theme",children:x.jsx(sM,{children:x.jsx(K3,{})})}),Y3=ab(document.getElementById("root"));Y3.render(x.jsx(I.StrictMode,{children:Q3}));export{P1 as $,Lk as A,A0 as B,dj as C,gl as D,zN as E,UN as F,vj as G,gj as H,oF as I,$k as J,sn as K,qn as L,oz as M,az as N,Pj as O,ai as P,HN as Q,iF as R,G0 as S,dD as T,z1 as U,qp as V,hr as W,pj as X,Og as Y,Jp as Z,me as _,Z3 as a,lD as a0,k1 as a1,ii as a2,zg as a3,gF as a4,DS as a5,xA as a6,Z1 as a7,fd as a8,fz as a9,_N as aA,jp as aB,m1 as aC,mN as aD,yN as aE,Fp as aF,p1 as aG,NN as aH,bN as aI,E0 as aJ,tz as aa,qL as ab,bS as ac,md as ad,ES as ae,SS as af,J3 as ag,sR as ah,sz as ai,nz as aj,Rj as ak,uz as al,dd as am,kt as an,ez as ao,v1 as ap,Er as aq,W1 as ar,G1 as as,K1 as at,tl as au,AN as av,rz as aw,Co as ax,Nr as ay,CN as az,lz as b,a1 as c,bd as d,zj as e,gz as f,iz as g,qe as h,Mc as i,x as j,Rg as k,ot as l,Z as m,cz as n,FL as o,oi as p,at as q,y as r,dz as s,Q1 as t,xg as u,CS as v,hj as w,kg as x,Kg as y,I as z}; +`);function au(t){return t.label!==void 0}var RD=3,ID="32px",OD="16px",M0=4e3,MD=356,ND=14,$D=20,AD=200;function wr(...t){return t.filter(Boolean).join(" ")}function LD(t){let[e,r]=t.split("-"),n=[];return e&&n.push(e),r&&n.push(r),n}var FD=t=>{var e,r,n,s,i,o,a,l,u,c,d;let{invert:f,toast:h,unstyled:_,interacting:p,setHeights:m,visibleToasts:v,heights:g,index:w,toasts:b,expanded:E,removeToast:S,defaultRichColors:C,closeButton:k,style:R,cancelButtonStyle:P,actionButtonStyle:A,className:N="",descriptionClassName:B="",duration:F,position:W,gap:q,loadingIcon:G,expandByDefault:M,classNames:T,icons:z,closeButtonAriaLabel:K="Close toast",pauseWhenPageIsHidden:H}=t,[Q,X]=I.useState(null),[ie,he]=I.useState(null),[se,pe]=I.useState(!1),[_e,Je]=I.useState(!1),[Ot,Ze]=I.useState(!1),[De,Jr]=I.useState(!1),[Tn,lt]=I.useState(!1),[Rn,tr]=I.useState(0),[Ut,In]=I.useState(0),On=I.useRef(h.duration||F||M0),Fo=I.useRef(null),pr=I.useRef(null),_C=w===0,wC=w+1<=v,rr=h.type,ci=h.dismissible!==!1,xC=h.className||"",bC=h.descriptionClassName||"",bl=I.useMemo(()=>g.findIndex(oe=>oe.toastId===h.id)||0,[g,h.id]),EC=I.useMemo(()=>{var oe;return(oe=h.closeButton)!=null?oe:k},[h.closeButton,k]),Zg=I.useMemo(()=>h.duration||F||M0,[h.duration,F]),Pd=I.useRef(0),di=I.useRef(0),em=I.useRef(0),fi=I.useRef(null),[SC,kC]=W.split("-"),tm=I.useMemo(()=>g.reduce((oe,Se,Le)=>Le>=bl?oe:oe+Se.height,0),[g,bl]),rm=xD(),CC=h.invert||f,Td=rr==="loading";di.current=I.useMemo(()=>bl*q+tm,[bl,tm]),I.useEffect(()=>{On.current=Zg},[Zg]),I.useEffect(()=>{pe(!0)},[]),I.useEffect(()=>{let oe=pr.current;if(oe){let Se=oe.getBoundingClientRect().height;return In(Se),m(Le=>[{toastId:h.id,height:Se,position:h.position},...Le]),()=>m(Le=>Le.filter(vr=>vr.toastId!==h.id))}},[m,h.id]),I.useLayoutEffect(()=>{if(!se)return;let oe=pr.current,Se=oe.style.height;oe.style.height="auto";let Le=oe.getBoundingClientRect().height;oe.style.height=Se,In(Le),m(vr=>vr.find(gr=>gr.toastId===h.id)?vr.map(gr=>gr.toastId===h.id?{...gr,height:Le}:gr):[{toastId:h.id,height:Le,position:h.position},...vr])},[se,h.title,h.description,m,h.id]);let Mn=I.useCallback(()=>{Je(!0),tr(di.current),m(oe=>oe.filter(Se=>Se.toastId!==h.id)),setTimeout(()=>{S(h)},AD)},[h,S,m,di]);I.useEffect(()=>{if(h.promise&&rr==="loading"||h.duration===1/0||h.type==="loading")return;let oe;return E||p||H&&rm?(()=>{if(em.current{var Se;(Se=h.onAutoClose)==null||Se.call(h,h),Mn()},On.current)),()=>clearTimeout(oe)},[E,p,h,rr,H,rm,Mn]),I.useEffect(()=>{h.delete&&Mn()},[Mn,h.delete]);function PC(){var oe,Se,Le;return z!=null&&z.loading?I.createElement("div",{className:wr(T==null?void 0:T.loader,(oe=h==null?void 0:h.classNames)==null?void 0:oe.loader,"sonner-loader"),"data-visible":rr==="loading"},z.loading):G?I.createElement("div",{className:wr(T==null?void 0:T.loader,(Se=h==null?void 0:h.classNames)==null?void 0:Se.loader,"sonner-loader"),"data-visible":rr==="loading"},G):I.createElement(vD,{className:wr(T==null?void 0:T.loader,(Le=h==null?void 0:h.classNames)==null?void 0:Le.loader),visible:rr==="loading"})}return I.createElement("li",{tabIndex:0,ref:pr,className:wr(N,xC,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[rr],(r=h==null?void 0:h.classNames)==null?void 0:r[rr]),"data-sonner-toast":"","data-rich-colors":(n=h.richColors)!=null?n:C,"data-styled":!(h.jsx||h.unstyled||_),"data-mounted":se,"data-promise":!!h.promise,"data-swiped":Tn,"data-removed":_e,"data-visible":wC,"data-y-position":SC,"data-x-position":kC,"data-index":w,"data-front":_C,"data-swiping":Ot,"data-dismissible":ci,"data-type":rr,"data-invert":CC,"data-swipe-out":De,"data-swipe-direction":ie,"data-expanded":!!(E||M&&se),style:{"--index":w,"--toasts-before":w,"--z-index":b.length-w,"--offset":`${_e?Rn:di.current}px`,"--initial-height":M?"auto":`${Ut}px`,...R,...h.style},onDragEnd:()=>{Ze(!1),X(null),fi.current=null},onPointerDown:oe=>{Td||!ci||(Fo.current=new Date,tr(di.current),oe.target.setPointerCapture(oe.pointerId),oe.target.tagName!=="BUTTON"&&(Ze(!0),fi.current={x:oe.clientX,y:oe.clientY}))},onPointerUp:()=>{var oe,Se,Le,vr;if(De||!ci)return;fi.current=null;let gr=Number(((oe=pr.current)==null?void 0:oe.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Nn=Number(((Se=pr.current)==null?void 0:Se.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),ws=new Date().getTime()-((Le=Fo.current)==null?void 0:Le.getTime()),mr=Q==="x"?gr:Nn,$n=Math.abs(mr)/ws;if(Math.abs(mr)>=$D||$n>.11){tr(di.current),(vr=h.onDismiss)==null||vr.call(h,h),he(Q==="x"?gr>0?"right":"left":Nn>0?"down":"up"),Mn(),Jr(!0),lt(!1);return}Ze(!1),X(null)},onPointerMove:oe=>{var Se,Le,vr,gr;if(!fi.current||!ci||((Se=window.getSelection())==null?void 0:Se.toString().length)>0)return;let Nn=oe.clientY-fi.current.y,ws=oe.clientX-fi.current.x,mr=(Le=t.swipeDirections)!=null?Le:LD(W);!Q&&(Math.abs(ws)>1||Math.abs(Nn)>1)&&X(Math.abs(ws)>Math.abs(Nn)?"x":"y");let $n={x:0,y:0};Q==="y"?(mr.includes("top")||mr.includes("bottom"))&&(mr.includes("top")&&Nn<0||mr.includes("bottom")&&Nn>0)&&($n.y=Nn):Q==="x"&&(mr.includes("left")||mr.includes("right"))&&(mr.includes("left")&&ws<0||mr.includes("right")&&ws>0)&&($n.x=ws),(Math.abs($n.x)>0||Math.abs($n.y)>0)&<(!0),(vr=pr.current)==null||vr.style.setProperty("--swipe-amount-x",`${$n.x}px`),(gr=pr.current)==null||gr.style.setProperty("--swipe-amount-y",`${$n.y}px`)}},EC&&!h.jsx?I.createElement("button",{"aria-label":K,"data-disabled":Td,"data-close-button":!0,onClick:Td||!ci?()=>{}:()=>{var oe;Mn(),(oe=h.onDismiss)==null||oe.call(h,h)},className:wr(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:wD):null,h.jsx||y.isValidElement(h.title)?h.jsx?h.jsx:typeof h.title=="function"?h.title():h.title:I.createElement(I.Fragment,null,rr||h.icon||h.promise?I.createElement("div",{"data-icon":"",className:wr(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||PC():null,h.type!=="loading"?h.icon||(z==null?void 0:z[rr])||hD(rr):null):null,I.createElement("div",{"data-content":"",className:wr(T==null?void 0:T.content,(a=h==null?void 0:h.classNames)==null?void 0:a.content)},I.createElement("div",{"data-title":"",className:wr(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?I.createElement("div",{"data-description":"",className:wr(B,bC,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),y.isValidElement(h.cancel)?h.cancel:h.cancel&&au(h.cancel)?I.createElement("button",{"data-button":!0,"data-cancel":!0,style:h.cancelButtonStyle||P,onClick:oe=>{var Se,Le;au(h.cancel)&&ci&&((Le=(Se=h.cancel).onClick)==null||Le.call(Se,oe),Mn())},className:wr(T==null?void 0:T.cancelButton,(c=h==null?void 0:h.classNames)==null?void 0:c.cancelButton)},h.cancel.label):null,y.isValidElement(h.action)?h.action:h.action&&au(h.action)?I.createElement("button",{"data-button":!0,"data-action":!0,style:h.actionButtonStyle||A,onClick:oe=>{var Se,Le;au(h.action)&&((Le=(Se=h.action).onClick)==null||Le.call(Se,oe),!oe.defaultPrevented&&Mn())},className:wr(T==null?void 0:T.actionButton,(d=h==null?void 0:h.classNames)==null?void 0:d.actionButton)},h.action.label):null))};function N0(){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 jD(t,e){let r={};return[t,e].forEach((n,s)=>{let i=s===1,o=i?"--mobile-offset":"--offset",a=i?OD:ID;function l(u){["top","right","bottom","left"].forEach(c=>{r[`${o}-${c}`]=typeof u=="number"?`${u}px`:u})}typeof n=="number"||typeof n=="string"?l(n):typeof n=="object"?["top","right","bottom","left"].forEach(u=>{n[u]===void 0?r[`${o}-${u}`]=a:r[`${o}-${u}`]=typeof n[u]=="number"?`${n[u]}px`:n[u]}):l(a)}),r}var DD=y.forwardRef(function(t,e){let{invert:r,position:n="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:_=RD,toastOptions:p,dir:m=N0(),gap:v=ND,loadingIcon:g,icons:w,containerAriaLabel:b="Notifications",pauseWhenPageIsHidden:E}=t,[S,C]=I.useState([]),k=I.useMemo(()=>Array.from(new Set([n].concat(S.filter(H=>H.position).map(H=>H.position)))),[S,n]),[R,P]=I.useState([]),[A,N]=I.useState(!1),[B,F]=I.useState(!1),[W,q]=I.useState(c!=="system"?c:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),G=I.useRef(null),M=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),T=I.useRef(null),z=I.useRef(!1),K=I.useCallback(H=>{C(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 I.useEffect(()=>Nt.subscribe(H=>{if(H.dismiss){C(Q=>Q.map(X=>X.id===H.id?{...X,delete:!0}:X));return}setTimeout(()=>{ob.flushSync(()=>{C(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]})})})}),[]),I.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]),I.useEffect(()=>{S.length<=1&&N(!1)},[S]),I.useEffect(()=>{let H=Q=>{var X,ie;s.every(he=>Q[he]||Q.code===he)&&(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]),I.useEffect(()=>{if(G.current)return()=>{T.current&&(T.current.focus({preventScroll:!0}),T.current=null,z.current=!1)}},[G.current]),I.createElement("section",{ref:e,"aria-label":`${b} ${M}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},k.map((H,Q)=>{var X;let[ie,he]=H.split("-");return S.length?I.createElement("ol",{key:H,dir:m==="auto"?N0():m,tabIndex:-1,ref:G,className:a,"data-sonner-toaster":!0,"data-theme":W,"data-y-position":ie,"data-lifted":A&&S.length>1&&!i,"data-x-position":he,style:{"--front-toast-height":`${((X=R[0])==null?void 0:X.height)||0}px`,"--width":`${MD}px`,"--gap":`${v}px`,...h,...jD(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"||F(!0)},onPointerUp:()=>F(!1)},S.filter(se=>!se.position&&Q===0||se.position===H).map((se,pe)=>{var _e,Je;return I.createElement(FD,{key:se.id,icons:w,index:pe,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:r,visibleToasts:_,closeButton:(Je=p==null?void 0:p.closeButton)!=null?Je: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:R.filter(Ot=>Ot.position==se.position),setHeights:P,expandByDefault:i,gap:v,loadingIcon:g,expanded:A,pauseWhenPageIsHidden:E,swipeDirections:t.swipeDirections})})):null}))});const zD=({...t})=>{const{theme:e="system"}=sR();return x.jsx(DD,{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 BD=Symbol("radix.slottable");function UD(t){const e=({children:r})=>x.jsx(x.Fragment,{children:r});return e.displayName=`${t}.Slottable`,e.__radixId=BD,e}var[kd]=oi("Tooltip",[md]),Jg=md(),uC="TooltipProvider",VD=700,$0="tooltip.open",[qD,cC]=kd(uC),dC=t=>{const{__scopeTooltip:e,delayDuration:r=VD,skipDelayDuration:n=300,disableHoverableContent:s=!1,children:i}=t,o=y.useRef(!0),a=y.useRef(!1),l=y.useRef(0);return y.useEffect(()=>{const u=l.current;return()=>window.clearTimeout(u)},[]),x.jsx(qD,{scope:e,isOpenDelayedRef:o,delayDuration:r,onOpen:y.useCallback(()=>{window.clearTimeout(l.current),o.current=!1},[]),onClose:y.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>o.current=!0,n)},[n]),isPointerInTransitRef:a,onPointerInTransitChange:y.useCallback(u=>{a.current=u},[]),disableHoverableContent:s,children:i})};dC.displayName=uC;var fC="Tooltip",[pz,Cd]=kd(fC),nv="TooltipTrigger",HD=y.forwardRef((t,e)=>{const{__scopeTooltip:r,...n}=t,s=Cd(nv,r),i=cC(nv,r),o=Jg(r),a=y.useRef(null),l=ot(e,a,s.onTriggerChange),u=y.useRef(!1),c=y.useRef(!1),d=y.useCallback(()=>u.current=!1,[]);return y.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),x.jsx(bS,{asChild:!0,...o,children:x.jsx(qe.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...n,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)})})});HD.displayName=nv;var WD="TooltipPortal",[vz,GD]=kd(WD,{forceMount:void 0}),Ro="TooltipContent",hC=y.forwardRef((t,e)=>{const r=GD(Ro,t.__scopeTooltip),{forceMount:n=r.forceMount,side:s="top",...i}=t,o=Cd(Ro,t.__scopeTooltip);return x.jsx(ai,{present:n||o.open,children:o.disableHoverableContent?x.jsx(pC,{side:s,...i,ref:e}):x.jsx(KD,{side:s,...i,ref:e})})}),KD=y.forwardRef((t,e)=>{const r=Cd(Ro,t.__scopeTooltip),n=cC(Ro,t.__scopeTooltip),s=y.useRef(null),i=ot(e,s),[o,a]=y.useState(null),{trigger:l,onClose:u}=r,c=s.current,{onPointerInTransitChange:d}=n,f=y.useCallback(()=>{a(null),d(!1)},[d]),h=y.useCallback((_,p)=>{const m=_.currentTarget,v={x:_.clientX,y:_.clientY},g=ZD(v,m.getBoundingClientRect()),w=e3(v,g),b=t3(p.getBoundingClientRect()),E=n3([...w,...b]);a(E),d(!0)},[d]);return y.useEffect(()=>()=>f(),[f]),y.useEffect(()=>{if(l&&c){const _=m=>h(m,c),p=m=>h(m,l);return l.addEventListener("pointerleave",_),c.addEventListener("pointerleave",p),()=>{l.removeEventListener("pointerleave",_),c.removeEventListener("pointerleave",p)}}},[l,c,h,f]),y.useEffect(()=>{if(o){const _=p=>{const m=p.target,v={x:p.clientX,y:p.clientY},g=(l==null?void 0:l.contains(m))||(c==null?void 0:c.contains(m)),w=!r3(v,o);g?f():w&&(f(),u())};return document.addEventListener("pointermove",_),()=>document.removeEventListener("pointermove",_)}},[l,c,o,u,f]),x.jsx(pC,{...t,ref:i})}),[QD,YD]=kd(fC,{isInside:!1}),XD=UD("TooltipContent"),pC=y.forwardRef((t,e)=>{const{__scopeTooltip:r,children:n,"aria-label":s,onEscapeKeyDown:i,onPointerDownOutside:o,...a}=t,l=Cd(Ro,r),u=Jg(r),{onClose:c}=l;return y.useEffect(()=>(document.addEventListener($0,c),()=>document.removeEventListener($0,c)),[c]),y.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]),x.jsx(fd,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:d=>d.preventDefault(),onDismiss:c,children:x.jsxs(ES,{"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:[x.jsx(XD,{children:n}),x.jsx(QD,{scope:r,isInside:!0,children:x.jsx(Vj,{id:l.contentId,role:"tooltip",children:s||n})})]})})});hC.displayName=Ro;var vC="TooltipArrow",JD=y.forwardRef((t,e)=>{const{__scopeTooltip:r,...n}=t,s=Jg(r);return YD(vC,r).isInside?null:x.jsx(SS,{...s,...n,ref:e})});JD.displayName=vC;function ZD(t,e){const r=Math.abs(e.top-t.y),n=Math.abs(e.bottom-t.y),s=Math.abs(e.right-t.x),i=Math.abs(e.left-t.x);switch(Math.min(r,n,s,i)){case i:return"left";case s:return"right";case r:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function e3(t,e,r=5){const n=[];switch(e){case"top":n.push({x:t.x-r,y:t.y+r},{x:t.x+r,y:t.y+r});break;case"bottom":n.push({x:t.x-r,y:t.y-r},{x:t.x+r,y:t.y-r});break;case"left":n.push({x:t.x+r,y:t.y-r},{x:t.x+r,y:t.y+r});break;case"right":n.push({x:t.x-r,y:t.y-r},{x:t.x-r,y:t.y+r});break}return n}function t3(t){const{top:e,right:r,bottom:n,left:s}=t;return[{x:s,y:e},{x:r,y:e},{x:r,y:n},{x:s,y:n}]}function r3(t,e){const{x:r,y:n}=t;let s=!1;for(let i=0,o=e.length-1;in!=f>n&&r<(d-u)*(n-c)/(f-c)+u&&(s=!s)}return s}function n3(t){const e=t.slice();return e.sort((r,n)=>r.xn.x?1:r.yn.y?1:0),s3(e)}function s3(t){if(t.length<=1)return t.slice();const e=[];for(let n=0;n=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 r=[];for(let n=t.length-1;n>=0;n--){const s=t[n];for(;r.length>=2;){const i=r[r.length-1],o=r[r.length-2];if((i.x-o.x)*(s.y-o.y)>=(i.y-o.y)*(s.x-o.x))r.pop();else break}r.push(s)}return r.pop(),e.length===1&&r.length===1&&e[0].x===r[0].x&&e[0].y===r[0].y?e:e.concat(r)}var i3=dC,gC=hC;const o3=i3,a3=y.forwardRef(({className:t,sideOffset:e=4,...r},n)=>x.jsx(gC,{ref:n,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),...r}));a3.displayName=gC.displayName;function l3(){const{pathname:t,hash:e}=Nr();y.useEffect(()=>{e||window.scrollTo(0,0)},[t,e])}class u3{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 A0=new u3(Jp),eh={hide_closed_source_evals:!1},mC=I.createContext(null),c3=({children:t})=>{const{user:e}=Kg(),[r,n]=I.useState(eh),[s,i]=I.useState(!1);I.useEffect(()=>{let l=!1;if(!e){n(eh);return}return i(!0),A0.getPreferences().then(u=>{l||n(u)}).catch(()=>{l||n(eh)}).finally(()=>{l||i(!1)}),()=>{l=!0}},[e]);const o=I.useCallback(async l=>{const u={...r,hide_closed_source_evals:l};if(n(u),!!e)try{const c=await A0.updatePreferences(u);n(c)}catch{n(r)}},[r,e]),a=I.useMemo(()=>({preferences:r,canPersist:!!e,isLoading:s,setHideClosedSourceEvals:o}),[r,e,s,o]);return x.jsx(mC.Provider,{value:a,children:t})};function gz(){const t=I.useContext(mC);if(!t)throw new Error("usePreferences must be used inside a ");return t}const yC=VN(),d3=yC?iN:sN;if(!yC&&typeof window<"u"){const t=window.location.hash;t.startsWith("#/")&&!t.startsWith("#//")&&window.history.replaceState(null,"",t.slice(1))}const f3=I.lazy(()=>me(()=>import("./FeedView-BBqtfWKy.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19]))),h3=I.lazy(()=>me(()=>import("./ChatView-BLEP80pf.js"),__vite__mapDeps([20,13,21,10,11,12,6,3,4,22,23,24,25,26,27,28,29,30,15,31]))),p3=I.lazy(()=>me(()=>import("./SharedChatView-BH5hBJDO.js"),__vite__mapDeps([32,13,21,10,11,12,6,3,4,22,23,24,25,26,27,28,29,30]))),v3=I.lazy(()=>me(()=>import("./PapersListView-eYTQa2CU.js"),__vite__mapDeps([33,1,2,3,4,5,6,7,14,16,13,17,34,8,9,18,19]))),g3=I.lazy(()=>me(()=>import("./PaperDetailView-D__j4Exc.js"),__vite__mapDeps([35,1,2,3,4,5,6,7,36,22,37,13,16,17,38,18,19,39,40,41,42,9,43,28,14,44,45,23,46,47,24,26,48,49]))),m3=I.lazy(()=>me(()=>import("./PaperReaderView-AmqyPB1B.js"),__vite__mapDeps([50,13,21,10,11,12,6,3,4,22,23,24,25,26,27,28,29,30,16,17,7,20,15,31]))),y3=I.lazy(()=>me(()=>import("./TagsIndexView-6sOdH8Ff.js"),__vite__mapDeps([51,13,14,5,52,18,19,53,45,39,40,41,28,44,43]))),_3=I.lazy(()=>me(()=>import("./TagBrowseView-D0CN98ak.js"),__vite__mapDeps([54,13,1,2,3,4,5,6,7,55,8,9,56,25,26,22,14,52,16,17,18,19,12,24]))),w3=I.lazy(()=>me(()=>import("./MethodsIndexView-vViWCtwM.js"),__vite__mapDeps([57,13,14,52,18,19,53,45,39,40,41,28,44,43]))),x3=I.lazy(()=>me(()=>import("./FrameworksIndexView-DIYY9ojn.js"),__vite__mapDeps([58,13,1,2,3,4,5,6,7,14]))),b3=I.lazy(()=>me(()=>import("./TrendsView-C_nun9wG.js"),__vite__mapDeps([59,13,19,18]))),E3=I.lazy(()=>me(()=>import("./ConferencesIndexView-Ct7JZfsT.js"),__vite__mapDeps([60,13,14,18,19,53,45,39,40,41,28,44,43]))),S3=I.lazy(()=>me(()=>import("./AiDeadlinesView-DoOHv-cM.js"),__vite__mapDeps([61,13,14,62,47,18,19,7,41]))),k3=I.lazy(()=>me(()=>import("./ConferenceDetailView-IlZriJt1.js"),__vite__mapDeps([63,13,56,3,4,25,26,22,6,14,5,18,19,7]))),C3=I.lazy(()=>me(()=>import("./ConferenceTaskView-DUu-DomW.js"),__vite__mapDeps([64,13,1,2,3,4,5,6,7,8,9,56,25,26,22,14,16,17,18,19]))),P3=I.lazy(()=>me(()=>import("./OrganizationsIndexView-BGARKKve.js"),__vite__mapDeps([65,13,19,18,14,66]))),T3=I.lazy(()=>me(()=>import("./OrganizationDetailView-DNGLw7ip.js"),__vite__mapDeps([67,68,13,1,2,3,4,5,6,7,56,25,26,22,69,18,14,8,9,19,42,39,41,43,16,17,70]))),R3=I.lazy(()=>me(()=>import("./OrganizationTaskView-I6v3uF7J.js"),__vite__mapDeps([71,68,13,1,2,3,4,5,6,7,56,25,26,22,69,18,14,8,9,19,42,39,41,43,16,17,70]))),I3=I.lazy(()=>me(()=>import("./AuthorDetailView-49FXhHea.js"),__vite__mapDeps([72,13,6,18,70]))),O3=I.lazy(()=>me(()=>import("./MethodDetailView-UdG0EtHc.js"),__vite__mapDeps([73,13,17,1,2,3,4,5,6,7,8,9,56,25,26,22,14,52,18,19]))),M3=I.lazy(()=>me(()=>import("./BenchmarkDetailView-DaFnh3b2.js"),__vite__mapDeps([74,13,14,36,6,22,7,37,18,62,47,19,2,3,4,55,1,5,52,75]))),N3=I.lazy(()=>me(()=>import("./SavedPapersView-0zMEoSEk.js"),__vite__mapDeps([76,13,1,2,3,4,5,6,7,18,19,48]))),$3=I.lazy(()=>me(()=>import("./SettingsView-dDA_sdmT.js"),__vite__mapDeps([77,13,28,62,47,11,38,31,29]))),A3=I.lazy(()=>me(()=>import("./PrivacyView-DlTj4HIc.js"),__vite__mapDeps([78,38]))),L3=I.lazy(()=>me(()=>import("./SubmitView-K0VXsMx6.js"),__vite__mapDeps([79,28,19,39,40,6]))),F3=I.lazy(()=>me(()=>import("./CronDashboard-CCbRoahI.js"),__vite__mapDeps([80,13,46,39,12,27,81,43,82,29,28,17,14,11,83]))),j3=I.lazy(()=>me(()=>import("./SubmissionsDashboard-jDE9mCsU.js"),__vite__mapDeps([84,13,28,14,7,6,44,81,43,82,85]))),D3=I.lazy(()=>me(()=>import("./UserProfileView-hcOOdDE-.js"),__vite__mapDeps([86,13,69,18,14]))),z3=I.lazy(()=>me(()=>import("./RateLimitsView-DZkZ108W.js"),__vite__mapDeps([87,13]))),th=I.lazy(()=>me(()=>import("./NotFound-CkQZGkjc.js"),[])),L0=I.lazy(()=>me(()=>import("./SearchOverlay-s2H4WBI8.js"),__vite__mapDeps([88,13,2,3,4,14,6,34,5]))),B3=I.lazy(()=>me(()=>import("./StagingAccessRequestView-Ceal3OTX.js"),__vite__mapDeps([89,82]))),rh=()=>x.jsxs("div",{className:"page","aria-busy":"true","aria-live":"polite",children:[x.jsx("div",{className:"animate-pulse rounded-md bg-muted",style:{height:24,width:"30%",marginBottom:24}}),x.jsx("div",{className:"animate-pulse rounded-md bg-muted",style:{height:64,width:"60%",marginBottom:32}}),x.jsxs("div",{className:"paper-list",style:{display:"grid",gap:16},children:[x.jsx("div",{className:"animate-pulse rounded-md bg-muted",style:{height:96}}),x.jsx("div",{className:"animate-pulse rounded-md bg-muted",style:{height:96}}),x.jsx("div",{className:"animate-pulse rounded-md bg-muted",style:{height:96}})]})]}),U3=new jN({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:1}}}),V3=()=>{const{arxivId:t}=a1();return x.jsx(Co,{to:t?`/paper/${t}`:"/papers",replace:!0})},q3=()=>{const{taskSlug:t}=a1();return x.jsx(Co,{to:t?`/tasks/${t}`:"/tasks",replace:!0})},F0=({element:t})=>gl()?x.jsx(Co,{to:"/",replace:!0}):x.jsx(x.Fragment,{children:t}),H3=({element:t})=>{const{user:e,isLoading:r}=Kg();return gl()?x.jsx(Co,{to:"/",replace:!0}):r?x.jsx("div",{className:"page",children:x.jsx("div",{className:"submission-loading",children:x.jsx("span",{children:"Checking admin session..."})})}):e?e.is_admin?x.jsx(x.Fragment,{children:t}):x.jsx("div",{className:"page",children:x.jsxs("div",{className:"submission-empty submission-empty-warn",children:[x.jsx("h1",{children:"Admin access required"}),x.jsxs("p",{children:["Signed in as @",e.username,". This dashboard is limited to allowlisted admin accounts."]})]})}):x.jsx("div",{className:"page",children:x.jsxs("div",{className:"submission-empty submission-empty-warn",children:[x.jsx("h1",{children:"Sign in required"}),x.jsx("p",{children:"Sign in with an allowlisted Hugging Face admin account to view admin operations."}),x.jsx(k1,{returnTo:"/admin-dashboard"})]})})},W3=()=>{const t=BN(),e=typeof window<"u"&&new URL(t,window.location.origin).origin!==window.location.origin;return I.useEffect(()=>{e&&window.location.replace(t)},[t,e]),e?x.jsx("div",{className:"page",children:x.jsxs("div",{className:"submission-loading",children:[x.jsx("span",{children:"Opening the production admin dashboard..."}),x.jsx("a",{href:t,children:"Continue"})]})}):x.jsx(H3,{element:x.jsx(F3,{})})},G3=()=>{const[t,e]=I.useState(!1),r=Nr();return l3(),I.useLayoutEffect(()=>{var n;(n=document.getElementById("initial-discovery-footer"))==null||n.remove()},[]),I.useEffect(()=>{const n=s=>{(s.metaKey||s.ctrlKey)&&s.key==="k"&&(s.preventDefault(),e(!0))};return window.addEventListener("keydown",n),()=>window.removeEventListener("keydown",n)},[]),r.pathname==="/request-access"?x.jsx(I.Suspense,{fallback:x.jsx(rh,{}),children:x.jsx(B3,{})}):r.pathname.startsWith("/pdf/")?x.jsxs("div",{className:"reader-route-shell",children:[x.jsx(P0,{onOpenSearch:()=>e(!0)}),x.jsx("div",{className:"reader-route-content",children:x.jsx(I.Suspense,{fallback:x.jsx(rh,{}),children:x.jsx(j_,{children:x.jsx(fe,{path:"/pdf/:arxivId",element:UN()?x.jsx(m3,{}):x.jsx(th,{})})})})}),t&&x.jsx(I.Suspense,{fallback:null,children:x.jsx(L0,{open:t,onClose:()=>e(!1)})})]}):x.jsxs(x.Fragment,{children:[x.jsx(P0,{onOpenSearch:()=>e(!0)}),x.jsx("main",{children:x.jsx(I.Suspense,{fallback:x.jsx(rh,{}),children:x.jsxs(j_,{children:[x.jsx(fe,{path:"/",element:x.jsx(f3,{})}),x.jsx(fe,{path:"/chat/:sessionId?",element:Mc()?x.jsx(h3,{}):x.jsx(Co,{to:"/",replace:!0})}),x.jsx(fe,{path:"/share/:shareId",element:Mc()?x.jsx(p3,{}):x.jsx(th,{})}),x.jsx(fe,{path:"/papers",element:x.jsx(v3,{})}),x.jsx(fe,{path:"/papers/:arxivId",element:x.jsx(V3,{})}),x.jsx(fe,{path:"/paper/:arxivId",element:x.jsx(g3,{})}),x.jsx(fe,{path:"/tasks",element:x.jsx(y3,{})}),x.jsx(fe,{path:"/tasks/:taskSlug",element:x.jsx(_3,{})}),x.jsx(fe,{path:"/task/:taskSlug",element:x.jsx(q3,{})}),x.jsx(fe,{path:"/methods",element:x.jsx(w3,{})}),x.jsx(fe,{path:"/methods/:methodSlug",element:x.jsx(O3,{})}),x.jsx(fe,{path:"/frameworks",element:x.jsx(x3,{})}),x.jsx(fe,{path:"/trends",element:x.jsx(b3,{})}),x.jsx(fe,{path:"/conferences",element:x.jsx(E3,{})}),x.jsx(fe,{path:"/ai-deadlines",element:x.jsx(S3,{})}),x.jsx(fe,{path:"/conferences/:confSlug",element:x.jsx(k3,{})}),x.jsx(fe,{path:"/conferences/:confSlug/:taskSlug",element:x.jsx(C3,{})}),x.jsx(fe,{path:"/organizations",element:x.jsx(P3,{})}),x.jsx(fe,{path:"/orgs/:orgSlug",element:x.jsx(T3,{})}),x.jsx(fe,{path:"/orgs/:orgSlug/:taskSlug",element:x.jsx(R3,{})}),x.jsx(fe,{path:"/authors/:authorId",element:x.jsx(I3,{})}),x.jsx(fe,{path:"/benchmark/:datasetSlug",element:x.jsx(M3,{})}),x.jsx(fe,{path:"/submit",element:x.jsx(L3,{})}),x.jsx(fe,{path:"/saved",element:x.jsx(F0,{element:x.jsx(N3,{})})}),x.jsx(fe,{path:"/settings",element:x.jsx($3,{})}),x.jsx(fe,{path:"/privacy",element:x.jsx(A3,{})}),x.jsx(fe,{path:"/admin-dashboard",element:x.jsx(W3,{})}),x.jsx(fe,{path:"/cron-dashboard",element:x.jsx(Co,{to:"/admin-dashboard",replace:!0})}),x.jsx(fe,{path:"/submissions",element:x.jsx(F0,{element:x.jsx(j3,{})})}),x.jsx(fe,{path:"/rate-limits",element:x.jsx(z3,{})}),x.jsx(fe,{path:"/:username",element:x.jsx(D3,{})}),x.jsx(fe,{path:"*",element:x.jsx(th,{})})]})})}),x.jsx($j,{}),t&&x.jsx(I.Suspense,{fallback:null,children:x.jsx(L0,{open:t,onClose:()=>e(!1)})})]})},K3=()=>x.jsx(DN,{client:U3,children:x.jsx(Ij,{children:x.jsx(c3,{children:x.jsxs(o3,{children:[x.jsx(d3,{children:x.jsx(G3,{})}),x.jsx(fD,{}),x.jsx(zD,{}),!1]})})})});oM();const Q3=x.jsx(iR,{attribute:"class",defaultTheme:"system",enableSystem:!0,disableTransitionOnChange:!0,storageKey:"pwc-theme",children:x.jsx(sM,{children:x.jsx(K3,{})})}),Y3=ab(document.getElementById("root"));Y3.render(x.jsx(I.StrictMode,{children:Q3}));export{P1 as $,Lk as A,A0 as B,dj as C,gl as D,zN as E,UN as F,vj as G,gj as H,oF as I,$k as J,sn as K,qn as L,oz as M,az as N,Pj as O,ai as P,HN as Q,iF as R,G0 as S,dD as T,z1 as U,qp as V,hr as W,pj as X,Og as Y,Jp as Z,me as _,Z3 as a,lD as a0,k1 as a1,ii as a2,zg as a3,gF as a4,DS as a5,xA as a6,Z1 as a7,fd as a8,fz as a9,_N as aA,jp as aB,m1 as aC,mN as aD,yN as aE,Fp as aF,p1 as aG,NN as aH,bN as aI,E0 as aJ,tz as aa,qL as ab,bS as ac,md as ad,ES as ae,SS as af,J3 as ag,sR as ah,sz as ai,nz as aj,Rj as ak,uz as al,dd as am,kt as an,ez as ao,v1 as ap,Er as aq,W1 as ar,G1 as as,K1 as at,tl as au,AN as av,rz as aw,Co as ax,Nr as ay,CN as az,lz as b,a1 as c,bd as d,zj as e,gz as f,iz as g,qe as h,Mc as i,x as j,Rg as k,ot as l,Z as m,cz as n,FL as o,oi as p,at as q,y as r,dz as s,Q1 as t,xg as u,CS as v,hj as w,kg as x,Kg as y,I as z}; diff --git a/assets/index-IfmCq-bY.js b/assets/index-i7UOsfxV.js similarity index 72% rename from assets/index-IfmCq-bY.js rename to assets/index-i7UOsfxV.js index b1e1229f9ce7ad85cbb436cc58879a83ced8e033..7269b15031cea198e6d16edd2f213e36bb4455a6 100644 --- a/assets/index-IfmCq-bY.js +++ b/assets/index-i7UOsfxV.js @@ -1 +1 @@ -import{r as u}from"./index-Cry0GNHI.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-Dt001B3A.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/loader-circle-C6beazQX.js b/assets/loader-circle-DD7s_n4z.js similarity index 85% rename from assets/loader-circle-C6beazQX.js rename to assets/loader-circle-DD7s_n4z.js index 0453366b63653a0fa2d21f73b0c4a4cee625c3f6..f7f1af56a057f05c873fce8740a05225e555647b 100644 --- a/assets/loader-circle-C6beazQX.js +++ b/assets/loader-circle-DD7s_n4z.js @@ -1,4 +1,4 @@ -import{d as e}from"./index-Cry0GNHI.js";/** +import{d as e}from"./index-Dt001B3A.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/openrouter-CKgqF9nS.js b/assets/openrouter-BTt-GpWV.js similarity index 82% rename from assets/openrouter-CKgqF9nS.js rename to assets/openrouter-BTt-GpWV.js index d7ab4b2ad8c221684100ca30b5a958cb36719b33..20fee46d2f110b8d2c8c65464b9be69ee2a82635 100644 --- a/assets/openrouter-CKgqF9nS.js +++ b/assets/openrouter-BTt-GpWV.js @@ -1 +1 @@ -import{u as r}from"./useQuery-DlAfMYOD.js";import{c as n}from"./chat-FW6HqAah.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-DD4hUA6p.js";import{c as n}from"./chat-98y1Ufht.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/paperDateRange-DQDDTCHP.js b/assets/paperDateRange-BJ29xsSE.js similarity index 97% rename from assets/paperDateRange-DQDDTCHP.js rename to assets/paperDateRange-BJ29xsSE.js index 7a921241863d2606adfcb5fad97e19f55710b0ec..0f57f3dbc60a2eee35ed2b2ef7068d28d58a0e60 100644 --- a/assets/paperDateRange-DQDDTCHP.js +++ b/assets/paperDateRange-BJ29xsSE.js @@ -1 +1 @@ -import{j as t,r as h}from"./index-Cry0GNHI.js";import{I as W}from"./components-IPCTDA4d.js";import{P as z,a as q,b as G}from"./popover-C_By4VBc.js";const J=()=>t.jsxs("span",{className:"hf-resource-logo",children:[t.jsx("img",{className:"hf-resource-logo-black",src:"/hf-logo-monochrome-black.svg?v=20260729",alt:""}),t.jsx("img",{className:"hf-resource-logo-white",src:"/hf-logo-monochrome-white.svg?v=20260729",alt:""})]}),O=({checked:e,icon:a,label:n,onChange:s})=>t.jsxs("button",{type:"button",className:`paper-feed-filter ${e?"active":""}`,"aria-pressed":e,onClick:()=>s(!e),children:[t.jsxs("span",{className:"paper-feed-filter-content",children:[t.jsx("span",{className:"paper-feed-filter-icon","aria-hidden":"true",children:a}),n]}),e&&t.jsx("span",{className:"paper-feed-filter-check","aria-hidden":"true",children:"✓"})]}),re=({hasCode:e,hasHfArtifacts:a,onHasCodeChange:n,onHasHfArtifactsChange:s,showDivider:r=!0,showHasCode:c=!0})=>t.jsxs("div",{className:"paper-feed-resource-controls",role:"group","aria-label":"Resource filters",children:[r&&t.jsx("span",{className:"paper-feed-resource-divider","aria-hidden":"true"}),t.jsxs("div",{className:"paper-feed-filter-options",children:[c&&t.jsx(O,{checked:e,icon:t.jsx(W,{name:"github",size:14}),label:"Has code",onChange:n}),t.jsx(O,{checked:a,icon:t.jsx(J,{}),label:"Has artifacts",onChange:s})]})]}),K=new Intl.DateTimeFormat("en",{month:"long",year:"numeric",timeZone:"UTC"}),E=new Intl.DateTimeFormat("en",{month:"short",timeZone:"UTC"}),S=e=>e.toISOString().slice(0,10),C=e=>new Date(`${e}T00:00:00Z`),Q=()=>{const e=new Date;return new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()))},k=(e,a)=>new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth()+a,1)),N=e=>new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),1)),X=(e,a)=>new Date(Date.UTC(a,e.getUTCMonth(),1)),_=(e,a)=>{const n=new Date(a),s=new Date(n);if(e==="week"){const r=(n.getUTCDay()+6)%7;s.setUTCDate(n.getUTCDate()-r)}else s.setUTCDate(1);return{startDate:S(s),endDate:S(n)}},M=(e,a)=>e.startDate===a.startDate&&e.endDate===a.endDate,ee=(e,a)=>{const n=C(e),s=C(a),r=E.format(n),c=E.format(s),u=n.getUTCDate(),d=s.getUTCDate(),i=n.getUTCFullYear(),p=s.getUTCFullYear();return e===a?`${r} ${u}, ${i}`:i===p&&n.getUTCMonth()===s.getUTCMonth()?`${r} ${u}–${d}, ${i}`:i===p?`${r} ${u}–${c} ${d}, ${i}`:`${r} ${u}, ${i}–${c} ${d}, ${p}`},te=e=>{const a=e.getUTCFullYear(),n=e.getUTCMonth(),s=new Date(Date.UTC(a,n,1)),r=(s.getUTCDay()+6)%7,c=new Date(s);return c.setUTCDate(s.getUTCDate()-r),Array.from({length:42},(u,d)=>{const i=new Date(c);return i.setUTCDate(c.getUTCDate()+d),{iso:S(i),day:i.getUTCDate(),outsideMonth:i.getUTCMonth()!==n}})},H=({month:e,today:a,startDate:n,endDate:s,onSelect:r,yearLabel:c,yearValue:u,onYearChange:d,secondary:i=!1})=>{const p=h.useMemo(()=>te(e),[e]);return t.jsxs("section",{className:`paper-date-calendar${i?" paper-date-calendar-secondary":""}`,children:[t.jsxs("label",{className:"paper-date-year",children:[t.jsx("span",{children:c}),t.jsx("input",{type:"number",inputMode:"numeric",min:"1900",max:a.slice(0,4),step:"1",value:u,onChange:o=>d(o.target.value)})]}),t.jsx("h3",{children:K.format(e)}),t.jsx("div",{className:"paper-date-weekdays","aria-hidden":"true",children:["Mon","Tue","Wed","Thu","Fri","Sat","Sun"].map(o=>t.jsx("span",{children:o},o))}),t.jsx("div",{className:"paper-date-days",children:p.map(o=>{const g=o.iso===n||o.iso===s,m=!!(n&&s&&o.iso>n&&o.isoa;return t.jsx("button",{type:"button","aria-label":o.iso,"aria-selected":g,disabled:b,className:["paper-date-day",o.outsideMonth?"outside":"",g?"selected":"",m?"in-range":"",o.iso===a?"today":""].filter(Boolean).join(" "),onClick:()=>r(o.iso),children:o.day},o.iso)})})]})},V=({calendar:e,onPrevious:a,onNext:n,secondary:s=!1})=>t.jsxs("div",{className:`paper-date-navigation-group${s?" paper-date-navigation-group-secondary":""}`,children:[t.jsx("button",{type:"button","aria-label":`Previous ${e} month`,onClick:a,children:"←"}),t.jsx("button",{type:"button","aria-label":`Next ${e} month`,onClick:n,children:"→"})]}),oe=({startDate:e,endDate:a,onChange:n,currentDate:s})=>{const r=s?C(s):Q(),[c,u]=h.useState(!1),[d,i]=h.useState(),[p,o]=h.useState(),[g,m]=h.useState(()=>N(r)),[b,T]=h.useState(()=>k(N(r),1)),[A,j]=h.useState(()=>String(r.getUTCFullYear())),[L,y]=h.useState(()=>String(r.getUTCFullYear())),U={startDate:e,endDate:a},$=_("week",r),w=_("month",r),R=S(r),F=!!(e&&a&&!M(U,$)&&!M(U,w)),B=()=>{i(e),o(a);const l=N(e?C(e):r),f=N(a?C(a):k(l,1));m(l),T(f),j(String(l.getUTCFullYear())),y(String(f.getUTCFullYear())),u(!0)},P=(l,f,Y)=>{if(f(l),!/^\d{4}$/.test(l))return;const x=Number(l);x>=1900&&x<=r.getUTCFullYear()&&Y(v=>X(v,x))},D=(l,f,Y,x)=>{const v=k(l,f);Y(v),x(String(v.getUTCFullYear()))},I=l=>{!d||p?(i(l),o(void 0)):l{n({}),u(!1)};return t.jsxs("div",{className:"paper-date-filter",role:"group","aria-label":"Publication date",children:[t.jsx("button",{type:"button",className:`sort-btn sort-btn-time${M(U,$)?" active":""}`,onClick:()=>n($),children:"This Week"}),t.jsx("button",{type:"button",className:`sort-btn sort-btn-time${M(U,w)?" active":""}`,onClick:()=>n(w),children:"This Month"}),t.jsx("button",{type:"button",className:`sort-btn sort-btn-time${!e&&!a?" active":""}`,onClick:()=>n({}),children:"All Time"}),t.jsxs(z,{open:c,onOpenChange:l=>{l?B():u(!1)},children:[t.jsx(q,{asChild:!0,children:t.jsx("button",{type:"button",className:`sort-btn sort-btn-time${F?" active":""}`,"aria-label":F?"Change date range":"Select a range",children:F&&e&&a?ee(e,a):"Select a range"})}),t.jsxs(G,{align:"end",className:"paper-date-popover",role:"dialog","aria-label":"Select a date range",children:[t.jsxs("div",{className:"paper-date-popover-header",children:[t.jsx("h2",{children:"Select a date range"}),t.jsx("p",{children:"Choose an inclusive start and end publication date."})]}),t.jsxs("div",{className:"paper-date-navigation",children:[t.jsx(V,{calendar:"start",onPrevious:()=>D(g,-1,m,j),onNext:()=>D(g,1,m,j)}),t.jsx(V,{calendar:"end",onPrevious:()=>D(b,-1,T,y),onNext:()=>D(b,1,T,y),secondary:!0})]}),t.jsxs("div",{className:"paper-date-calendars",children:[t.jsx(H,{month:g,today:R,startDate:d,endDate:p,onSelect:I,yearLabel:"Start year",yearValue:A,onYearChange:l=>P(l,j,m)}),t.jsx(H,{month:b,today:R,startDate:d,endDate:p,onSelect:I,yearLabel:"End year",yearValue:L,onYearChange:l=>P(l,y,T),secondary:!0})]}),t.jsxs("div",{className:"paper-date-actions",children:[t.jsx("button",{type:"button",className:"paper-date-clear",onClick:Z,children:"Clear range"}),t.jsxs("div",{children:[t.jsx("button",{type:"button",onClick:()=>u(!1),children:"Cancel"}),t.jsx("button",{type:"button",className:"paper-date-apply",disabled:!d||!p,onClick:()=>{d&&p&&n({startDate:d,endDate:p}),u(!1)},children:"Apply"})]})]})]})]})]})};function ce(e={}){const{threshold:a=0,rootMargin:n="0px"}=e,[s,r]=h.useState(!1),c=h.useRef(null),u=h.useCallback(d=>{if(c.current&&(c.current.disconnect(),c.current=null),!d){r(!1);return}const i=new IntersectionObserver(([p])=>r(p.isIntersecting),{threshold:a,rootMargin:n});i.observe(d),c.current=i},[a,n]);return h.useEffect(()=>()=>{c.current&&(c.current.disconnect(),c.current=null)},[]),{targetRef:u,isIntersecting:s}}const ie=e=>({startDate:e.get("start_date")||void 0,endDate:e.get("end_date")||void 0}),le=(e,a)=>{const n=new URLSearchParams(e);return a.startDate?n.set("start_date",a.startDate):n.delete("start_date"),a.endDate?n.set("end_date",a.endDate):n.delete("end_date"),n.delete("time"),n};export{re as P,oe as a,ie as r,ce as u,le as w}; +import{j as t,r as h}from"./index-Dt001B3A.js";import{I as W}from"./components-DMT1vhIy.js";import{P as z,a as q,b as G}from"./popover-DDOhCeb4.js";const J=()=>t.jsxs("span",{className:"hf-resource-logo",children:[t.jsx("img",{className:"hf-resource-logo-black",src:"/hf-logo-monochrome-black.svg?v=20260729",alt:""}),t.jsx("img",{className:"hf-resource-logo-white",src:"/hf-logo-monochrome-white.svg?v=20260729",alt:""})]}),O=({checked:e,icon:a,label:n,onChange:s})=>t.jsxs("button",{type:"button",className:`paper-feed-filter ${e?"active":""}`,"aria-pressed":e,onClick:()=>s(!e),children:[t.jsxs("span",{className:"paper-feed-filter-content",children:[t.jsx("span",{className:"paper-feed-filter-icon","aria-hidden":"true",children:a}),n]}),e&&t.jsx("span",{className:"paper-feed-filter-check","aria-hidden":"true",children:"✓"})]}),re=({hasCode:e,hasHfArtifacts:a,onHasCodeChange:n,onHasHfArtifactsChange:s,showDivider:r=!0,showHasCode:c=!0})=>t.jsxs("div",{className:"paper-feed-resource-controls",role:"group","aria-label":"Resource filters",children:[r&&t.jsx("span",{className:"paper-feed-resource-divider","aria-hidden":"true"}),t.jsxs("div",{className:"paper-feed-filter-options",children:[c&&t.jsx(O,{checked:e,icon:t.jsx(W,{name:"github",size:14}),label:"Has code",onChange:n}),t.jsx(O,{checked:a,icon:t.jsx(J,{}),label:"Has artifacts",onChange:s})]})]}),K=new Intl.DateTimeFormat("en",{month:"long",year:"numeric",timeZone:"UTC"}),E=new Intl.DateTimeFormat("en",{month:"short",timeZone:"UTC"}),S=e=>e.toISOString().slice(0,10),C=e=>new Date(`${e}T00:00:00Z`),Q=()=>{const e=new Date;return new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()))},k=(e,a)=>new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth()+a,1)),N=e=>new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),1)),X=(e,a)=>new Date(Date.UTC(a,e.getUTCMonth(),1)),_=(e,a)=>{const n=new Date(a),s=new Date(n);if(e==="week"){const r=(n.getUTCDay()+6)%7;s.setUTCDate(n.getUTCDate()-r)}else s.setUTCDate(1);return{startDate:S(s),endDate:S(n)}},M=(e,a)=>e.startDate===a.startDate&&e.endDate===a.endDate,ee=(e,a)=>{const n=C(e),s=C(a),r=E.format(n),c=E.format(s),u=n.getUTCDate(),d=s.getUTCDate(),i=n.getUTCFullYear(),p=s.getUTCFullYear();return e===a?`${r} ${u}, ${i}`:i===p&&n.getUTCMonth()===s.getUTCMonth()?`${r} ${u}–${d}, ${i}`:i===p?`${r} ${u}–${c} ${d}, ${i}`:`${r} ${u}, ${i}–${c} ${d}, ${p}`},te=e=>{const a=e.getUTCFullYear(),n=e.getUTCMonth(),s=new Date(Date.UTC(a,n,1)),r=(s.getUTCDay()+6)%7,c=new Date(s);return c.setUTCDate(s.getUTCDate()-r),Array.from({length:42},(u,d)=>{const i=new Date(c);return i.setUTCDate(c.getUTCDate()+d),{iso:S(i),day:i.getUTCDate(),outsideMonth:i.getUTCMonth()!==n}})},H=({month:e,today:a,startDate:n,endDate:s,onSelect:r,yearLabel:c,yearValue:u,onYearChange:d,secondary:i=!1})=>{const p=h.useMemo(()=>te(e),[e]);return t.jsxs("section",{className:`paper-date-calendar${i?" paper-date-calendar-secondary":""}`,children:[t.jsxs("label",{className:"paper-date-year",children:[t.jsx("span",{children:c}),t.jsx("input",{type:"number",inputMode:"numeric",min:"1900",max:a.slice(0,4),step:"1",value:u,onChange:o=>d(o.target.value)})]}),t.jsx("h3",{children:K.format(e)}),t.jsx("div",{className:"paper-date-weekdays","aria-hidden":"true",children:["Mon","Tue","Wed","Thu","Fri","Sat","Sun"].map(o=>t.jsx("span",{children:o},o))}),t.jsx("div",{className:"paper-date-days",children:p.map(o=>{const g=o.iso===n||o.iso===s,m=!!(n&&s&&o.iso>n&&o.isoa;return t.jsx("button",{type:"button","aria-label":o.iso,"aria-selected":g,disabled:b,className:["paper-date-day",o.outsideMonth?"outside":"",g?"selected":"",m?"in-range":"",o.iso===a?"today":""].filter(Boolean).join(" "),onClick:()=>r(o.iso),children:o.day},o.iso)})})]})},V=({calendar:e,onPrevious:a,onNext:n,secondary:s=!1})=>t.jsxs("div",{className:`paper-date-navigation-group${s?" paper-date-navigation-group-secondary":""}`,children:[t.jsx("button",{type:"button","aria-label":`Previous ${e} month`,onClick:a,children:"←"}),t.jsx("button",{type:"button","aria-label":`Next ${e} month`,onClick:n,children:"→"})]}),oe=({startDate:e,endDate:a,onChange:n,currentDate:s})=>{const r=s?C(s):Q(),[c,u]=h.useState(!1),[d,i]=h.useState(),[p,o]=h.useState(),[g,m]=h.useState(()=>N(r)),[b,T]=h.useState(()=>k(N(r),1)),[A,j]=h.useState(()=>String(r.getUTCFullYear())),[L,y]=h.useState(()=>String(r.getUTCFullYear())),U={startDate:e,endDate:a},$=_("week",r),w=_("month",r),R=S(r),F=!!(e&&a&&!M(U,$)&&!M(U,w)),B=()=>{i(e),o(a);const l=N(e?C(e):r),f=N(a?C(a):k(l,1));m(l),T(f),j(String(l.getUTCFullYear())),y(String(f.getUTCFullYear())),u(!0)},P=(l,f,Y)=>{if(f(l),!/^\d{4}$/.test(l))return;const x=Number(l);x>=1900&&x<=r.getUTCFullYear()&&Y(v=>X(v,x))},D=(l,f,Y,x)=>{const v=k(l,f);Y(v),x(String(v.getUTCFullYear()))},I=l=>{!d||p?(i(l),o(void 0)):l{n({}),u(!1)};return t.jsxs("div",{className:"paper-date-filter",role:"group","aria-label":"Publication date",children:[t.jsx("button",{type:"button",className:`sort-btn sort-btn-time${M(U,$)?" active":""}`,onClick:()=>n($),children:"This Week"}),t.jsx("button",{type:"button",className:`sort-btn sort-btn-time${M(U,w)?" active":""}`,onClick:()=>n(w),children:"This Month"}),t.jsx("button",{type:"button",className:`sort-btn sort-btn-time${!e&&!a?" active":""}`,onClick:()=>n({}),children:"All Time"}),t.jsxs(z,{open:c,onOpenChange:l=>{l?B():u(!1)},children:[t.jsx(q,{asChild:!0,children:t.jsx("button",{type:"button",className:`sort-btn sort-btn-time${F?" active":""}`,"aria-label":F?"Change date range":"Select a range",children:F&&e&&a?ee(e,a):"Select a range"})}),t.jsxs(G,{align:"end",className:"paper-date-popover",role:"dialog","aria-label":"Select a date range",children:[t.jsxs("div",{className:"paper-date-popover-header",children:[t.jsx("h2",{children:"Select a date range"}),t.jsx("p",{children:"Choose an inclusive start and end publication date."})]}),t.jsxs("div",{className:"paper-date-navigation",children:[t.jsx(V,{calendar:"start",onPrevious:()=>D(g,-1,m,j),onNext:()=>D(g,1,m,j)}),t.jsx(V,{calendar:"end",onPrevious:()=>D(b,-1,T,y),onNext:()=>D(b,1,T,y),secondary:!0})]}),t.jsxs("div",{className:"paper-date-calendars",children:[t.jsx(H,{month:g,today:R,startDate:d,endDate:p,onSelect:I,yearLabel:"Start year",yearValue:A,onYearChange:l=>P(l,j,m)}),t.jsx(H,{month:b,today:R,startDate:d,endDate:p,onSelect:I,yearLabel:"End year",yearValue:L,onYearChange:l=>P(l,y,T),secondary:!0})]}),t.jsxs("div",{className:"paper-date-actions",children:[t.jsx("button",{type:"button",className:"paper-date-clear",onClick:Z,children:"Clear range"}),t.jsxs("div",{children:[t.jsx("button",{type:"button",onClick:()=>u(!1),children:"Cancel"}),t.jsx("button",{type:"button",className:"paper-date-apply",disabled:!d||!p,onClick:()=>{d&&p&&n({startDate:d,endDate:p}),u(!1)},children:"Apply"})]})]})]})]})]})};function ce(e={}){const{threshold:a=0,rootMargin:n="0px"}=e,[s,r]=h.useState(!1),c=h.useRef(null),u=h.useCallback(d=>{if(c.current&&(c.current.disconnect(),c.current=null),!d){r(!1);return}const i=new IntersectionObserver(([p])=>r(p.isIntersecting),{threshold:a,rootMargin:n});i.observe(d),c.current=i},[a,n]);return h.useEffect(()=>()=>{c.current&&(c.current.disconnect(),c.current=null)},[]),{targetRef:u,isIntersecting:s}}const ie=e=>({startDate:e.get("start_date")||void 0,endDate:e.get("end_date")||void 0}),le=(e,a)=>{const n=new URLSearchParams(e);return a.startDate?n.set("start_date",a.startDate):n.delete("start_date"),a.endDate?n.set("end_date",a.endDate):n.delete("end_date"),n.delete("time"),n};export{re as P,oe as a,ie as r,ce as u,le as w}; diff --git a/assets/papers-CrgFFrmi.js b/assets/papers-KXkGPHI5.js similarity index 99% rename from assets/papers-CrgFFrmi.js rename to assets/papers-KXkGPHI5.js index 1c4c0f172e3e7d66eb9f55e98b39bc1c8b5d91a9..87c142324dd4cac678cbee5adb7e6bb9b22001c3 100644 --- a/assets/papers-CrgFFrmi.js +++ b/assets/papers-KXkGPHI5.js @@ -1 +1 @@ -var y=Object.defineProperty;var w=(i,e,t)=>e in i?y(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t;var m=(i,e,t)=>w(i,typeof e!="symbol"?e+"":e,t);import{A as f,x as S,Z as l}from"./index-Cry0GNHI.js";const d="pwc:fresh-auth-mutation";function $(i){if(typeof window>"u")return;sessionStorage.setItem("pwc:fresh-auth-edit",i);const e=S("/api/v1/auth/hf/login");window.location.assign(`${e}?return_to=${encodeURIComponent(window.location.href)}`)}class v{constructor(e,t=$){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(([u,g])=>n.set(u,g));const p={...o,headers:n};try{const u=await this.request(t,p);return this.clearAttempt(p),u}catch(u){throw u instanceof f&&u.status===401&&u.code==="fresh_auth_required"?(this.saveFreshAuthMutation(e,t,r,p),this.recoverFreshAuth(e)):u instanceof f&&u.status===409&&(this.clearAttempt(p),typeof window<"u"&&window.dispatchEvent(new CustomEvent("pwc:catalog-conflict",{detail:{endpoint:t}}))),u}}freshAuthMutationDraft(){const e=sessionStorage.getItem(d);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(d),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(d),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(d,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 h=new v(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}`)}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}`)}authorPapers(e,t){return this.request(`/authors/${e}/papers${c(t)}`)}primeCurationState(e,t=!1){return h.primePaper(e,t)}freshAuthMutationDraft(){return h.freshAuthMutationDraft()}resumeFreshAuthMutation(){return h.resumeFreshAuthMutation()}updateTasks(e,t){const r=new URLSearchParams(t.map(s=>["task_ids",String(s)])).toString();return h.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 h.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 h.mutatePaper(e,"organizations",t,`/papers/${e}/organizations?${r}`,{method:"PUT"})}updateRepositories(e,t){return h.mutatePaper(e,"repositories",t,`/papers/${e}/repositories`,{method:"PUT",body:JSON.stringify({repositories:t})})}updateProjectPages(e,t){return h.mutatePaper(e,"project_pages",t,`/papers/${e}/project-pages`,{method:"PUT",body:JSON.stringify({project_pages:t})})}updateSourceUrl(e,t){return h.mutatePaper(e,"source_url",t,`/papers/${e}/source-url`,{method:"PUT",body:JSON.stringify({source_url:t})})}updateHfArtifacts(e,t){return h.mutatePaper(e,"hf_artifacts",t,`/papers/${e}/hf-artifacts`,{method:"PUT",body:JSON.stringify(t)})}}const O=new P(l);export{h as a,O as p}; +var y=Object.defineProperty;var w=(i,e,t)=>e in i?y(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t;var m=(i,e,t)=>w(i,typeof e!="symbol"?e+"":e,t);import{A as f,x as S,Z as l}from"./index-Dt001B3A.js";const d="pwc:fresh-auth-mutation";function $(i){if(typeof window>"u")return;sessionStorage.setItem("pwc:fresh-auth-edit",i);const e=S("/api/v1/auth/hf/login");window.location.assign(`${e}?return_to=${encodeURIComponent(window.location.href)}`)}class v{constructor(e,t=$){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(([u,g])=>n.set(u,g));const p={...o,headers:n};try{const u=await this.request(t,p);return this.clearAttempt(p),u}catch(u){throw u instanceof f&&u.status===401&&u.code==="fresh_auth_required"?(this.saveFreshAuthMutation(e,t,r,p),this.recoverFreshAuth(e)):u instanceof f&&u.status===409&&(this.clearAttempt(p),typeof window<"u"&&window.dispatchEvent(new CustomEvent("pwc:catalog-conflict",{detail:{endpoint:t}}))),u}}freshAuthMutationDraft(){const e=sessionStorage.getItem(d);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(d),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(d),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(d,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 h=new v(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}`)}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}`)}authorPapers(e,t){return this.request(`/authors/${e}/papers${c(t)}`)}primeCurationState(e,t=!1){return h.primePaper(e,t)}freshAuthMutationDraft(){return h.freshAuthMutationDraft()}resumeFreshAuthMutation(){return h.resumeFreshAuthMutation()}updateTasks(e,t){const r=new URLSearchParams(t.map(s=>["task_ids",String(s)])).toString();return h.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 h.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 h.mutatePaper(e,"organizations",t,`/papers/${e}/organizations?${r}`,{method:"PUT"})}updateRepositories(e,t){return h.mutatePaper(e,"repositories",t,`/papers/${e}/repositories`,{method:"PUT",body:JSON.stringify({repositories:t})})}updateProjectPages(e,t){return h.mutatePaper(e,"project_pages",t,`/papers/${e}/project-pages`,{method:"PUT",body:JSON.stringify({project_pages:t})})}updateSourceUrl(e,t){return h.mutatePaper(e,"source_url",t,`/papers/${e}/source-url`,{method:"PUT",body:JSON.stringify({source_url:t})})}updateHfArtifacts(e,t){return h.mutatePaper(e,"hf_artifacts",t,`/papers/${e}/hf-artifacts`,{method:"PUT",body:JSON.stringify(t)})}}const O=new P(l);export{h as a,O as p}; diff --git a/assets/popover-C_By4VBc.js b/assets/popover-DDOhCeb4.js similarity index 98% rename from assets/popover-C_By4VBc.js rename to assets/popover-DDOhCeb4.js index b488ed59af47fafb6bc3055ec04db3f859cb5f67..9f27b27cdeb4cfa8ded1d61765ebf1c1ceb6bd41 100644 --- a/assets/popover-C_By4VBc.js +++ b/assets/popover-DDOhCeb4.js @@ -1 +1 @@ -import{r as s,j as l,a2 as V,k as $,ab as L,V as W,l as A,h as O,m as h,ac as E,ad as y,P as _,a3 as H,p as z,a4 as G,a5 as B,a6 as K,a7 as Z,a8 as q,ae as U,af as J,q as Q}from"./index-Cry0GNHI.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(B,{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 K(),l.jsx(Z,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:o,onUnmountAutoFocus:a,children:l.jsx(q,{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,a2 as V,k as $,ab as L,V as W,l as A,h as O,m as h,ac as E,ad as y,P as _,a3 as H,p as z,a4 as G,a5 as B,a6 as K,a7 as Z,a8 as q,ae as U,af as J,q as Q}from"./index-Dt001B3A.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(B,{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 K(),l.jsx(Z,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:o,onUnmountAutoFocus:a,children:l.jsx(q,{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/savedPapersAuth-DmaqaN2Y.js b/assets/savedPapersAuth-CR1Q1QTW.js similarity index 85% rename from assets/savedPapersAuth-DmaqaN2Y.js rename to assets/savedPapersAuth-CR1Q1QTW.js index e1fe9905ccd597d9758863b8b3f586fb47f631a9..97ae6de9ef4ac3955901da49ec12ca070a3cf403 100644 --- a/assets/savedPapersAuth-DmaqaN2Y.js +++ b/assets/savedPapersAuth-CR1Q1QTW.js @@ -1 +1 @@ -import{x as i}from"./index-Cry0GNHI.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{x as i}from"./index-Dt001B3A.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-BbTr2CaG.js b/assets/searchable-select-C7oc2Val.js similarity index 98% rename from assets/searchable-select-BbTr2CaG.js rename to assets/searchable-select-C7oc2Val.js index 156e060b2e9363f543b181915b1816ed059ca8fc..5f79aa263cdc3ec859acfe7c4a22eee9ee49714d 100644 --- a/assets/searchable-select-BbTr2CaG.js +++ b/assets/searchable-select-C7oc2Val.js @@ -1,4 +1,4 @@ -import{d as he,r as a,V as U,h as L,a2 as z,j as g,q as D,C as Me}from"./index-Cry0GNHI.js";import{u as De}from"./useQuery-DlAfMYOD.js";import{B as $e}from"./button-QVzubJLr.js";import{P as Le,a as Pe,b as qe}from"./popover-C_By4VBc.js";import{R as Fe,P as Ke,O as Ve,C as Be}from"./dialog-Dedt-uqk.js";import{L as Ue}from"./loader-circle-C6beazQX.js";/** +import{d as he,r as a,V as U,h as L,a2 as z,j as g,q as D,C as Me}from"./index-Dt001B3A.js";import{u as De}from"./useQuery-DD4hUA6p.js";import{B as $e}from"./button-BL-YLDFJ.js";import{P as Le,a as Pe,b as qe}from"./popover-DDOhCeb4.js";import{R as Fe,P as Ke,O as Ve,C as Be}from"./dialog-Bs8pVXcH.js";import{L as Ue}from"./loader-circle-DD7s_n4z.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/shield-alert-CjZsQbM-.js b/assets/shield-alert-BzyltW9X.js similarity index 96% rename from assets/shield-alert-CjZsQbM-.js rename to assets/shield-alert-BzyltW9X.js index 49be3eb1653107182244636076c73acf9309ac23..1f909d5dec2cb44ed5d4c8ffd126a75f590857a7 100644 --- a/assets/shield-alert-CjZsQbM-.js +++ b/assets/shield-alert-BzyltW9X.js @@ -1,4 +1,4 @@ -import{d as e}from"./index-Cry0GNHI.js";/** +import{d as e}from"./index-Dt001B3A.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/skeleton-LwsL9heH.js b/assets/skeleton-DkhIJUB4.js similarity index 62% rename from assets/skeleton-LwsL9heH.js rename to assets/skeleton-DkhIJUB4.js index 6f6b0ef89f00893b806026097e577161543376b5..8abf86666335c3db2f5645dac06367f08e99b995 100644 --- a/assets/skeleton-LwsL9heH.js +++ b/assets/skeleton-DkhIJUB4.js @@ -1 +1 @@ -import{j as t,q as n}from"./index-Cry0GNHI.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,q as n}from"./index-Dt001B3A.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-CVaVzZAk.js b/assets/submissions-IHYlc8kE.js similarity index 99% rename from assets/submissions-CVaVzZAk.js rename to assets/submissions-IHYlc8kE.js index 303868976e39c5213c2e0853378e3fb6e6e24697..75442c2338e6f9d1a591dab654165d2d75518f14 100644 --- a/assets/submissions-CVaVzZAk.js +++ b/assets/submissions-IHYlc8kE.js @@ -1 +1 @@ -import{Z as Be}from"./index-Cry0GNHI.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 we;(function(s){s.mergeShapes=(e,t)=>({...e,...t})})(we||(we={}));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 qe=ue;function Fe(){return qe}const We=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=Fe(),r=We({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 S{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 S.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"}),F=s=>({status:"dirty",value:s}),O=s=>({status:"valid",value:s}),Te=s=>s.status==="aborted",Se=s=>s.status==="dirty",U=s=>s.status==="valid",Q=s=>typeof Promise<"u"&&s instanceof Promise;var l;(function(s){s.errToObj=e=>typeof e=="string"?{message:e}:e||{},s.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(l||(l={}));class A{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 Ce=(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 S,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 Ce(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 Ce(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 E.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 Pe({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 Je=/^c[^\s-]{8,}$/i,Ye=/^[0-9a-z]+$/,He=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Ge=/^[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,Qe=/^[a-z0-9_-]{21}$/i,Xe=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Ke=/^[-+]?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)?)??$/,et=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,tt="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let ce;const st=/^(?:(?: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])$/,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])\/(3[0-2]|[12]?[0-9])$/,nt=/^(([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]))$/,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]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,it=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,ot=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,je="((\\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])))",dt=new RegExp(`^${je}$`);function Ie(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 ct(s){return new RegExp(`^${Ie(s)}$`)}function ut(s){let e=`${je}T${Ie(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 lt(s,e){return!!((e==="v4"||!e)&&st.test(s)||(e==="v6"||!e)&&nt.test(s))}function ht(s,e){if(!Xe.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 ft(s,e){return!!((e==="v4"||!e)&&rt.test(s)||(e==="v6"||!e)&&at.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 S;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,...l.errToObj(r)})}_addCheck(e){return new R({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...l.errToObj(e)})}url(e){return this._addCheck({kind:"url",...l.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...l.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...l.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...l.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...l.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...l.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...l.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...l.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...l.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...l.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...l.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...l.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,...l.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,...l.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...l.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...l.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t==null?void 0:t.position,...l.errToObj(t==null?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...l.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...l.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...l.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...l.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...l.errToObj(t)})}nonempty(e){return this.min(1,l.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 pt(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 S;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"?pt(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,l.toString(t))}gt(e,t){return this.setLimit("min",e,!1,l.toString(t))}lte(e,t){return this.setLimit("max",e,!0,l.toString(t))}lt(e,t){return this.setLimit("max",e,!1,l.toString(t))}setLimit(e,t,r,n){return new B({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:l.toString(n)}]})}_addCheck(e){return new B({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:l.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:l.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:l.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:l.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:l.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:l.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:l.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:l.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:l.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 W 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 S;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,l.toString(t))}gt(e,t){return this.setLimit("min",e,!1,l.toString(t))}lte(e,t){return this.setLimit("max",e,!0,l.toString(t))}lt(e,t){return this.setLimit("max",e,!1,l.toString(t))}setLimit(e,t,r,n){return new W({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:l.toString(n)}]})}_addCheck(e){return new W({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:l.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:l.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:l.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:l.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:l.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 W({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 S;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:l.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:l.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 Oe 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)}}Oe.create=s=>new Oe({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 Ne extends g{constructor(){super(...arguments),this._any=!0}_parse(e){return O(e.data)}}Ne.create=s=>new Ne({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 Ae 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)}}Ae.create=s=>new Ae({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 A(t,i,t.path,o)))).then(i=>S.mergeArray(r,i));const a=[...t.data].map((i,o)=>n.type._parseSync(new A(t,i,t.path,o)));return S.mergeArray(r,a)}get element(){return this._def.type}min(e,t){return new N({...this._def,minLength:{value:e,message:l.toString(t)}})}max(e,t){return new N({...this._def,maxLength:{value:e,message:l.toString(t)}})}length(e,t){return new N({...this._def,exactLength:{value:e,message:l.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]=E.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 E?E.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],q=n.data[p];f.push({key:{status:"valid",value:p},value:x._parse(new A(n,q,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 q=n.data[x];f.push({key:{status:"valid",value:x},value:p._parse(new A(n,q,n.path,x)),alwaysSet:x in n.data})}}return n.common.async?Promise.resolve().then(async()=>{const p=[];for(const x of f){const q=await x.key,Ue=await x.value;p.push({key:q,value:Ue,alwaysSet:x.alwaysSet})}return p}).then(p=>S.mergeObjectSync(r,p)):S.mergeObjectSync(r,f)}get shape(){return this._def.shape()}strict(e){return l.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:l.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 E;)a=a._def.innerType;t[r]=a}return new w({...this._def,shape:()=>t})}keyof(){return $e(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 Z=s=>s instanceof _e?Z(s.schema):s instanceof z?Z(s.innerType()):s instanceof se?[s.value]:s instanceof V?s.options:s instanceof ye?v.objectValues(s.enum):s instanceof ne?Z(s._def.innerType):s instanceof he?[void 0]:s instanceof fe?[null]:s instanceof E?[void 0,...Z(s.unwrap())]:s instanceof L?[null,...Z(s.unwrap())]:s instanceof Pe||s instanceof ie?Z(s.unwrap()):s instanceof ae?Z(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=Z(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(Te(a)||Te(i))return m;const o=me(a.value,i.value);return o.valid?((Se(a)||Se(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 A(r,i,r.path,o)):null}).filter(i=>!!i);return r.common.async?Promise.all(a).then(i=>S.mergeArray(t,i)):S.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 A(r,o,r.path,o)),value:i._parse(new A(r,r.data[o],r.path,o)),alwaysSet:o in r.data});return r.common.async?S.mergeObjectAsync(t,n):S.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 Ze 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 A(r,o,r.path,[p,"key"])),value:a._parse(new A(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}}}}Ze.create=(s,e,t)=>new Ze({valueType:e,keyType:s,typeName:_.ZodMap,...y(t)});class J 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 A(r,f,r.path,p)));return r.common.async?Promise.all(o).then(f=>i(f)):i(o)}min(e,t){return new J({...this._def,minSize:{value:e,message:l.toString(t)}})}max(e,t){return new J({...this._def,maxSize:{value:e,message:l.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}J.create=(s,e)=>new J({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 $e(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=$e;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"?F(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"?F(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 E extends g{_parse(e){return this._getType(e)===u.undefined?O(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}E.create=(s,e)=>new E({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 Pe 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(),F(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 h=R.create,b=B.create,oe=le.create,mt=pe.create;P.create;const T=N.create,k=w.create,_t=K.create,Me=xe.create;ee.create;M.create;const Ve=te.create,G=se.create,ge=V.create;re.create;E.create;L.create;const j=Ve(mt()),be=k({id:b(),name:h(),slug:h().optional()}).passthrough(),de=k({url:h(),is_official:oe()}),ve=k({task_id:b(),dataset_id:b(),model_name:h().nullish(),harness:h().nullish(),methodology:h().nullish(),metrics:Ve(_t([h(),b()])),uses_additional_data:oe().optional(),is_open:oe().optional(),best_rank:b().nullish(),best_metric:h().nullish(),evaluated_on:h().nullish(),external_source_url:h().nullish(),num_parameters:b().nullish(),hf_model_url:h().nullish()}).passthrough(),yt=ve.partial().extend({id:b().optional()}),gt=Me("op",[k({op:G("create"),data:ve}),k({op:G("update"),evaluation_id:b(),data:ve}),k({op:G("delete"),evaluation_id:b()})]),Ee=k({hf_models:T(h()),hf_datasets:T(h()),hf_spaces:T(h())}),ze=k({file_name:h(),mime_type:h(),data_url:h().optional(),url:h().optional()}),Y=k({name:h(),description:h().optional()}),vt=Y.extend({image:ze.optional(),image_credit:h().optional(),parent_id:b().optional(),area_id:b().optional(),keywords:h().optional()}),xt=Y.extend({image:ze.optional(),image_credit:h().optional(),source_paper_id:b().optional(),source_url:h().optional(),source_title:h().optional()}),kt=Y.extend({description:h(),task_ids:T(b()),full_name:h().optional(),url:h().optional(),hf_url:h().optional(),paper_url:h().optional(),license_name:h().optional(),license_url:h().optional()}),bt=Y.extend({description:h(),direction:ge(["higher_is_better","lower_is_better"]),full_name:h().optional(),scale:h().optional(),task_id:b(),dataset_id:b()}),wt=Y.extend({short_name:h().optional(),venue:h().optional(),location:h().optional(),url:h(),year:b(),start_date:h().optional(),end_date:h().optional()}),Tt=k({id:b(),paper_id:b().nullable(),hf_username:h(),is_author:oe(),status:ge(["pending","approved","rejected"]),applied_payload:j.nullish(),conflict_payload:j.nullish(),result_entity_type:h().nullish(),result_entity_id:h().nullish(),admin_note:h().nullish(),user_review_reason:h().nullish(),reviewed_by:h().nullish(),reviewed_by_kind:ge(["human","codex"]).nullish(),review_evidence:j.nullish(),created_at:h(),updated_at:h(),reviewed_at:h().nullish()});function C(s,e,t){return Tt.extend({edit_type:G(s),proposed_payload:e,current_payload:t.nullish()})}const St=C("tasks",k({task_ids:T(b())}),k({tasks:T(be)})),Ct=C("methods",k({method_ids:T(b())}),k({methods:T(be)})),Ot=C("evaluations",k({operations:T(gt)}),k({evaluations:T(yt)})),Nt=C("repositories",k({repositories:T(de)}),k({repositories:T(de)})),At=C("project_pages",k({project_pages:T(de)}),k({project_pages:T(de)})),Zt=C("source_url",k({source_url:h()}),k({source_url:h().nullish()})),Rt=C("hf_artifacts",Ee,Ee),Et=C("organizations",k({organization_ids:T(b())}),k({organizations:T(be)})),jt=C("new_task",vt,j),It=C("new_method",xt,j),$t=C("new_benchmark",kt,j),Pt=C("new_metric",bt,j),Mt=C("new_conference",wt,j),Vt=C("new_external_paper",k({title:h().optional(),source_url:h(),authors:T(h()),date_published:h().optional(),abstract:h().optional()}),j),Le=Me("edit_type",[St,Ct,Ot,Nt,At,Zt,Rt,Et,jt,It,$t,Pt,Mt,Vt]);function qt(s,e,t){return{paper_id:s,edit_type:e,proposed_payload:t}}const zt=k({count:b(),results:T(Le)});class Lt extends Error{constructor(e){super(`Malformed pending-edit payload: ${e}`),this.name="PendingEditPayloadError"}}function De(s,e){const t=s.safeParse(e);if(t.success)return t.data;const r=t.error.issues[0];throw new Lt(`${(r==null?void 0:r.path.join("."))||"response"}: ${(r==null?void 0:r.message)||"invalid value"}`)}const H=s=>De(Le,s),Dt=s=>De(zt,s);class Ut{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(Dt)}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 Ft=new Ut(Be);export{qt as p,Ft as s}; +import{Z as Be}from"./index-Dt001B3A.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 we;(function(s){s.mergeShapes=(e,t)=>({...e,...t})})(we||(we={}));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 qe=ue;function Fe(){return qe}const We=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=Fe(),r=We({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 S{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 S.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"}),F=s=>({status:"dirty",value:s}),O=s=>({status:"valid",value:s}),Te=s=>s.status==="aborted",Se=s=>s.status==="dirty",U=s=>s.status==="valid",Q=s=>typeof Promise<"u"&&s instanceof Promise;var l;(function(s){s.errToObj=e=>typeof e=="string"?{message:e}:e||{},s.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(l||(l={}));class A{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 Ce=(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 S,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 Ce(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 Ce(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 E.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 Pe({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 Je=/^c[^\s-]{8,}$/i,Ye=/^[0-9a-z]+$/,He=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Ge=/^[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,Qe=/^[a-z0-9_-]{21}$/i,Xe=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Ke=/^[-+]?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)?)??$/,et=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,tt="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let ce;const st=/^(?:(?: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])$/,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])\/(3[0-2]|[12]?[0-9])$/,nt=/^(([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]))$/,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]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,it=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,ot=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,je="((\\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])))",dt=new RegExp(`^${je}$`);function Ie(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 ct(s){return new RegExp(`^${Ie(s)}$`)}function ut(s){let e=`${je}T${Ie(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 lt(s,e){return!!((e==="v4"||!e)&&st.test(s)||(e==="v6"||!e)&&nt.test(s))}function ht(s,e){if(!Xe.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 ft(s,e){return!!((e==="v4"||!e)&&rt.test(s)||(e==="v6"||!e)&&at.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 S;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,...l.errToObj(r)})}_addCheck(e){return new R({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...l.errToObj(e)})}url(e){return this._addCheck({kind:"url",...l.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...l.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...l.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...l.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...l.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...l.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...l.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...l.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...l.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...l.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...l.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...l.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,...l.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,...l.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...l.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...l.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t==null?void 0:t.position,...l.errToObj(t==null?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...l.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...l.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...l.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...l.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...l.errToObj(t)})}nonempty(e){return this.min(1,l.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 pt(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 S;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"?pt(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,l.toString(t))}gt(e,t){return this.setLimit("min",e,!1,l.toString(t))}lte(e,t){return this.setLimit("max",e,!0,l.toString(t))}lt(e,t){return this.setLimit("max",e,!1,l.toString(t))}setLimit(e,t,r,n){return new B({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:l.toString(n)}]})}_addCheck(e){return new B({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:l.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:l.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:l.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:l.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:l.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:l.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:l.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:l.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:l.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 W 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 S;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,l.toString(t))}gt(e,t){return this.setLimit("min",e,!1,l.toString(t))}lte(e,t){return this.setLimit("max",e,!0,l.toString(t))}lt(e,t){return this.setLimit("max",e,!1,l.toString(t))}setLimit(e,t,r,n){return new W({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:l.toString(n)}]})}_addCheck(e){return new W({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:l.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:l.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:l.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:l.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:l.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 W({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 S;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:l.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:l.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 Oe 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)}}Oe.create=s=>new Oe({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 Ne extends g{constructor(){super(...arguments),this._any=!0}_parse(e){return O(e.data)}}Ne.create=s=>new Ne({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 Ae 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)}}Ae.create=s=>new Ae({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 A(t,i,t.path,o)))).then(i=>S.mergeArray(r,i));const a=[...t.data].map((i,o)=>n.type._parseSync(new A(t,i,t.path,o)));return S.mergeArray(r,a)}get element(){return this._def.type}min(e,t){return new N({...this._def,minLength:{value:e,message:l.toString(t)}})}max(e,t){return new N({...this._def,maxLength:{value:e,message:l.toString(t)}})}length(e,t){return new N({...this._def,exactLength:{value:e,message:l.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]=E.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 E?E.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],q=n.data[p];f.push({key:{status:"valid",value:p},value:x._parse(new A(n,q,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 q=n.data[x];f.push({key:{status:"valid",value:x},value:p._parse(new A(n,q,n.path,x)),alwaysSet:x in n.data})}}return n.common.async?Promise.resolve().then(async()=>{const p=[];for(const x of f){const q=await x.key,Ue=await x.value;p.push({key:q,value:Ue,alwaysSet:x.alwaysSet})}return p}).then(p=>S.mergeObjectSync(r,p)):S.mergeObjectSync(r,f)}get shape(){return this._def.shape()}strict(e){return l.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:l.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 E;)a=a._def.innerType;t[r]=a}return new w({...this._def,shape:()=>t})}keyof(){return $e(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 Z=s=>s instanceof _e?Z(s.schema):s instanceof z?Z(s.innerType()):s instanceof se?[s.value]:s instanceof V?s.options:s instanceof ye?v.objectValues(s.enum):s instanceof ne?Z(s._def.innerType):s instanceof he?[void 0]:s instanceof fe?[null]:s instanceof E?[void 0,...Z(s.unwrap())]:s instanceof L?[null,...Z(s.unwrap())]:s instanceof Pe||s instanceof ie?Z(s.unwrap()):s instanceof ae?Z(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=Z(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(Te(a)||Te(i))return m;const o=me(a.value,i.value);return o.valid?((Se(a)||Se(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 A(r,i,r.path,o)):null}).filter(i=>!!i);return r.common.async?Promise.all(a).then(i=>S.mergeArray(t,i)):S.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 A(r,o,r.path,o)),value:i._parse(new A(r,r.data[o],r.path,o)),alwaysSet:o in r.data});return r.common.async?S.mergeObjectAsync(t,n):S.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 Ze 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 A(r,o,r.path,[p,"key"])),value:a._parse(new A(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}}}}Ze.create=(s,e,t)=>new Ze({valueType:e,keyType:s,typeName:_.ZodMap,...y(t)});class J 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 A(r,f,r.path,p)));return r.common.async?Promise.all(o).then(f=>i(f)):i(o)}min(e,t){return new J({...this._def,minSize:{value:e,message:l.toString(t)}})}max(e,t){return new J({...this._def,maxSize:{value:e,message:l.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}J.create=(s,e)=>new J({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 $e(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=$e;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"?F(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"?F(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 E extends g{_parse(e){return this._getType(e)===u.undefined?O(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}E.create=(s,e)=>new E({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 Pe 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(),F(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 h=R.create,b=B.create,oe=le.create,mt=pe.create;P.create;const T=N.create,k=w.create,_t=K.create,Me=xe.create;ee.create;M.create;const Ve=te.create,G=se.create,ge=V.create;re.create;E.create;L.create;const j=Ve(mt()),be=k({id:b(),name:h(),slug:h().optional()}).passthrough(),de=k({url:h(),is_official:oe()}),ve=k({task_id:b(),dataset_id:b(),model_name:h().nullish(),harness:h().nullish(),methodology:h().nullish(),metrics:Ve(_t([h(),b()])),uses_additional_data:oe().optional(),is_open:oe().optional(),best_rank:b().nullish(),best_metric:h().nullish(),evaluated_on:h().nullish(),external_source_url:h().nullish(),num_parameters:b().nullish(),hf_model_url:h().nullish()}).passthrough(),yt=ve.partial().extend({id:b().optional()}),gt=Me("op",[k({op:G("create"),data:ve}),k({op:G("update"),evaluation_id:b(),data:ve}),k({op:G("delete"),evaluation_id:b()})]),Ee=k({hf_models:T(h()),hf_datasets:T(h()),hf_spaces:T(h())}),ze=k({file_name:h(),mime_type:h(),data_url:h().optional(),url:h().optional()}),Y=k({name:h(),description:h().optional()}),vt=Y.extend({image:ze.optional(),image_credit:h().optional(),parent_id:b().optional(),area_id:b().optional(),keywords:h().optional()}),xt=Y.extend({image:ze.optional(),image_credit:h().optional(),source_paper_id:b().optional(),source_url:h().optional(),source_title:h().optional()}),kt=Y.extend({description:h(),task_ids:T(b()),full_name:h().optional(),url:h().optional(),hf_url:h().optional(),paper_url:h().optional(),license_name:h().optional(),license_url:h().optional()}),bt=Y.extend({description:h(),direction:ge(["higher_is_better","lower_is_better"]),full_name:h().optional(),scale:h().optional(),task_id:b(),dataset_id:b()}),wt=Y.extend({short_name:h().optional(),venue:h().optional(),location:h().optional(),url:h(),year:b(),start_date:h().optional(),end_date:h().optional()}),Tt=k({id:b(),paper_id:b().nullable(),hf_username:h(),is_author:oe(),status:ge(["pending","approved","rejected"]),applied_payload:j.nullish(),conflict_payload:j.nullish(),result_entity_type:h().nullish(),result_entity_id:h().nullish(),admin_note:h().nullish(),user_review_reason:h().nullish(),reviewed_by:h().nullish(),reviewed_by_kind:ge(["human","codex"]).nullish(),review_evidence:j.nullish(),created_at:h(),updated_at:h(),reviewed_at:h().nullish()});function C(s,e,t){return Tt.extend({edit_type:G(s),proposed_payload:e,current_payload:t.nullish()})}const St=C("tasks",k({task_ids:T(b())}),k({tasks:T(be)})),Ct=C("methods",k({method_ids:T(b())}),k({methods:T(be)})),Ot=C("evaluations",k({operations:T(gt)}),k({evaluations:T(yt)})),Nt=C("repositories",k({repositories:T(de)}),k({repositories:T(de)})),At=C("project_pages",k({project_pages:T(de)}),k({project_pages:T(de)})),Zt=C("source_url",k({source_url:h()}),k({source_url:h().nullish()})),Rt=C("hf_artifacts",Ee,Ee),Et=C("organizations",k({organization_ids:T(b())}),k({organizations:T(be)})),jt=C("new_task",vt,j),It=C("new_method",xt,j),$t=C("new_benchmark",kt,j),Pt=C("new_metric",bt,j),Mt=C("new_conference",wt,j),Vt=C("new_external_paper",k({title:h().optional(),source_url:h(),authors:T(h()),date_published:h().optional(),abstract:h().optional()}),j),Le=Me("edit_type",[St,Ct,Ot,Nt,At,Zt,Rt,Et,jt,It,$t,Pt,Mt,Vt]);function qt(s,e,t){return{paper_id:s,edit_type:e,proposed_payload:t}}const zt=k({count:b(),results:T(Le)});class Lt extends Error{constructor(e){super(`Malformed pending-edit payload: ${e}`),this.name="PendingEditPayloadError"}}function De(s,e){const t=s.safeParse(e);if(t.success)return t.data;const r=t.error.issues[0];throw new Lt(`${(r==null?void 0:r.path.join("."))||"response"}: ${(r==null?void 0:r.message)||"invalid value"}`)}const H=s=>De(Le,s),Dt=s=>De(zt,s);class Ut{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(Dt)}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 Ft=new Ut(Be);export{qt as p,Ft as s}; diff --git a/assets/switch-rXZTYMbm.js b/assets/switch-CqcBxohM.js similarity index 94% rename from assets/switch-rXZTYMbm.js rename to assets/switch-CqcBxohM.js index 18ef26a55fae6892605bae5174b2b4227e528161..4957c56e6246d673c39de5f0db0eaf7ff950e632 100644 --- a/assets/switch-rXZTYMbm.js +++ b/assets/switch-CqcBxohM.js @@ -1 +1 @@ -import{r as o,l as C,k as I,j as a,h as y,m as M,o as H,p as q,q as x}from"./index-Cry0GNHI.js";import{u as A}from"./index-IfmCq-bY.js";var b="Switch",[U]=q(b),[z,L]=U(b),P=o.forwardRef((t,s)=>{const{__scopeSwitch:e,name:n,checked:r,defaultChecked:m,required:d,disabled:c,value:l="on",onCheckedChange:v,form:i,...w}=t,[u,p]=o.useState(null),k=C(s,h=>p(h)),S=o.useRef(!1),g=u?i||!!u.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:l,...w,ref:k,onClick:M(t.onClick,h=>{B(T=>!T),g&&(S.current=h.isPropagationStopped(),S.current||h.stopPropagation())})}),g&&a.jsx(N,{control:u,bubbles:!S.current,name:n,value:l,checked:f,required:d,disabled:c,form:i,style:{transform:"translateX(-100%)"}})]})});P.displayName=b;var E="SwitchThumb",R=o.forwardRef((t,s)=>{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:s})});R.displayName=E;var O="SwitchBubbleInput",N=o.forwardRef(({__scopeSwitch:t,control:s,checked:e,bubbles:n=!0,...r},m)=>{const d=o.useRef(null),c=C(d,m),l=A(e),v=H(s);return o.useEffect(()=>{const i=d.current;if(!i)return;const w=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(w,"checked").set;if(l!==e&&p){const k=new Event("click",{bubbles:n});p.call(i,e),i.dispatchEvent(k)}},[l,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=o.forwardRef(({className:t,...s},e)=>a.jsx(_,{className:x("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50",t),...s,ref:e,children:a.jsx(D,{className:x("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})}));F.displayName=_.displayName;export{F as S}; +import{r as o,l as C,k as I,j as a,h as y,m as M,o as H,p as q,q as x}from"./index-Dt001B3A.js";import{u as A}from"./index-i7UOsfxV.js";var b="Switch",[U]=q(b),[z,L]=U(b),P=o.forwardRef((t,s)=>{const{__scopeSwitch:e,name:n,checked:r,defaultChecked:m,required:d,disabled:c,value:l="on",onCheckedChange:v,form:i,...w}=t,[u,p]=o.useState(null),k=C(s,h=>p(h)),S=o.useRef(!1),g=u?i||!!u.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:l,...w,ref:k,onClick:M(t.onClick,h=>{B(T=>!T),g&&(S.current=h.isPropagationStopped(),S.current||h.stopPropagation())})}),g&&a.jsx(N,{control:u,bubbles:!S.current,name:n,value:l,checked:f,required:d,disabled:c,form:i,style:{transform:"translateX(-100%)"}})]})});P.displayName=b;var E="SwitchThumb",R=o.forwardRef((t,s)=>{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:s})});R.displayName=E;var O="SwitchBubbleInput",N=o.forwardRef(({__scopeSwitch:t,control:s,checked:e,bubbles:n=!0,...r},m)=>{const d=o.useRef(null),c=C(d,m),l=A(e),v=H(s);return o.useEffect(()=>{const i=d.current;if(!i)return;const w=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(w,"checked").set;if(l!==e&&p){const k=new Event("click",{bubbles:n});p.call(i,e),i.dispatchEvent(k)}},[l,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=o.forwardRef(({className:t,...s},e)=>a.jsx(_,{className:x("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50",t),...s,ref:e,children:a.jsx(D,{className:x("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})}));F.displayName=_.displayName;export{F as S}; diff --git a/assets/textarea-nAbEj-Sd.js b/assets/textarea-BLDaXAi6.js similarity index 93% rename from assets/textarea-nAbEj-Sd.js rename to assets/textarea-BLDaXAi6.js index af7fbde93f8de6cd19ac87ff15d37de6c9ff6a94..8b9bc42d117a118bd67a59443686d92289432f56 100644 --- a/assets/textarea-nAbEj-Sd.js +++ b/assets/textarea-BLDaXAi6.js @@ -1 +1 @@ -import{r as s,j as i,q as t}from"./index-Cry0GNHI.js";const a=s.forwardRef(({className:e,type:r,...o},n)=>i.jsx("input",{type:r,className:t("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:n,...o}));a.displayName="Input";const d=s.forwardRef(({className:e,...r},o)=>i.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}));d.displayName="Textarea";export{a as I,d as T}; +import{r as s,j as i,q as t}from"./index-Dt001B3A.js";const a=s.forwardRef(({className:e,type:r,...o},n)=>i.jsx("input",{type:r,className:t("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:n,...o}));a.displayName="Input";const d=s.forwardRef(({className:e,...r},o)=>i.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}));d.displayName="Textarea";export{a as I,d as T}; diff --git a/assets/transform-b6MI1iSQ.js b/assets/transform-DgCWw6nP.js similarity index 99% rename from assets/transform-b6MI1iSQ.js rename to assets/transform-DgCWw6nP.js index bf8da187e8d39436e54de90e6bf8564ec5424363..6196f6d470d2da9c29dc6dd0111dafcb832fb85c 100644 --- a/assets/transform-b6MI1iSQ.js +++ b/assets/transform-DgCWw6nP.js @@ -1 +1 @@ -import{M as _}from"./index-Cry0GNHI.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 p(t){return(e,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let a;if(r==="formatting"&&t.formattingValues){const o=t.defaultFormattingWidth||t.defaultWidth,s=n!=null&&n.width?String(n.width):o;a=t.formattingValues[s]||t.formattingValues[o]}else{const o=t.defaultWidth,s=n!=null&&n.width?String(n.width):t.defaultWidth;a=t.values[s]||t.values[o]}const i=t.argumentCallback?t.argumentCallback(e):e;return a[i]}}const dt={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},lt={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},ft={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},ht={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},mt={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},gt={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},wt=(t,e)=>{const n=Number(t),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},yt={ordinalNumber:wt,era:p({values:dt,defaultWidth:"wide"}),quarter:p({values:lt,defaultWidth:"wide",argumentCallback:t=>t-1}),month:p({values:ft,defaultWidth:"wide"}),day:p({values:ht,defaultWidth:"wide"}),dayPeriod:p({values:mt,defaultWidth:"wide",formattingValues:gt,defaultFormattingWidth:"wide"})};function O(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,pt=/\d+/i,Ot={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:pt,valueCallback:t=>parseInt(t,10)}),era:O({matchPatterns:Ot,defaultMatchWidth:"wide",parsePatterns:Pt,defaultParseWidth:"any"}),quarter:O({matchPatterns:xt,defaultMatchWidth:"wide",parsePatterns:vt,defaultParseWidth:"any",valueCallback:t=>t+1}),month:O({matchPatterns:Tt,defaultMatchWidth:"wide",parsePatterns:St,defaultParseWidth:"any"}),day:O({matchPatterns:Wt,defaultMatchWidth:"wide",parsePatterns:Yt,defaultParseWidth:"any"}),dayPeriod:O({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/A)+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/A)+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))},At={p:X,P:Ht},It=/^D+$/,Rt=/^Y+$/,jt=["D","DD","YY","YYYY"];function Qt(t){return It.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=At[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*I+a*1e3:NaN}function N(t){return t&&parseFloat(t.replace(",","."))||0}function ue(t){if(t==="Z")return 0;const e=t.match(re);if(!e)return 0;const n=e[1]==="+"?-1:1,r=parseInt(e[2]),a=e[3]&&parseInt(e[3])||0;return ge(r,a)?n*(r*R+a*I):NaN}function ce(t,e,n){const r=new Date(0);r.setUTCFullYear(t,0,4);const a=r.getUTCDay()||7,i=(e-1)*7+n+1-a;return r.setUTCDate(r.getUTCDate()+i),r}const de=[31,null,31,30,31,30,31,31,30,31,30,31];function 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||[],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())||pe(n));if(r)return r;const a=e==null?void 0:e.toUpperCase(),i=n.toUpperCase();return/^[A-Z0-9][A-Z0-9-]{1,}$/.test(n)||a&&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 pe(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{M as _}from"./index-Dt001B3A.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 p(t){return(e,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let a;if(r==="formatting"&&t.formattingValues){const o=t.defaultFormattingWidth||t.defaultWidth,s=n!=null&&n.width?String(n.width):o;a=t.formattingValues[s]||t.formattingValues[o]}else{const o=t.defaultWidth,s=n!=null&&n.width?String(n.width):t.defaultWidth;a=t.values[s]||t.values[o]}const i=t.argumentCallback?t.argumentCallback(e):e;return a[i]}}const dt={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},lt={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},ft={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},ht={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},mt={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},gt={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},wt=(t,e)=>{const n=Number(t),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},yt={ordinalNumber:wt,era:p({values:dt,defaultWidth:"wide"}),quarter:p({values:lt,defaultWidth:"wide",argumentCallback:t=>t-1}),month:p({values:ft,defaultWidth:"wide"}),day:p({values:ht,defaultWidth:"wide"}),dayPeriod:p({values:mt,defaultWidth:"wide",formattingValues:gt,defaultFormattingWidth:"wide"})};function O(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,pt=/\d+/i,Ot={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:pt,valueCallback:t=>parseInt(t,10)}),era:O({matchPatterns:Ot,defaultMatchWidth:"wide",parsePatterns:Pt,defaultParseWidth:"any"}),quarter:O({matchPatterns:xt,defaultMatchWidth:"wide",parsePatterns:vt,defaultParseWidth:"any",valueCallback:t=>t+1}),month:O({matchPatterns:Tt,defaultMatchWidth:"wide",parsePatterns:St,defaultParseWidth:"any"}),day:O({matchPatterns:Wt,defaultMatchWidth:"wide",parsePatterns:Yt,defaultParseWidth:"any"}),dayPeriod:O({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/A)+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/A)+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))},At={p:X,P:Ht},It=/^D+$/,Rt=/^Y+$/,jt=["D","DD","YY","YYYY"];function Qt(t){return It.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=At[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*I+a*1e3:NaN}function N(t){return t&&parseFloat(t.replace(",","."))||0}function ue(t){if(t==="Z")return 0;const e=t.match(re);if(!e)return 0;const n=e[1]==="+"?-1:1,r=parseInt(e[2]),a=e[3]&&parseInt(e[3])||0;return ge(r,a)?n*(r*R+a*I):NaN}function ce(t,e,n){const r=new Date(0);r.setUTCFullYear(t,0,4);const a=r.getUTCDay()||7,i=(e-1)*7+n+1-a;return r.setUTCDate(r.getUTCDate()+i),r}const de=[31,null,31,30,31,30,31,31,30,31,30,31];function 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||[],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())||pe(n));if(r)return r;const a=e==null?void 0:e.toUpperCase(),i=n.toUpperCase();return/^[A-Z0-9][A-Z0-9-]{1,}$/.test(n)||a&&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 pe(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/useDebounce-Wb28akK_.js b/assets/useDebounce-DaqbxkO6.js similarity index 66% rename from assets/useDebounce-Wb28akK_.js rename to assets/useDebounce-DaqbxkO6.js index 1d965e02bf6a83dad2927a68796799bfc3fc1e9f..6870e935172a1b70e10c91d326d990a641fa9787 100644 --- a/assets/useDebounce-Wb28akK_.js +++ b/assets/useDebounce-DaqbxkO6.js @@ -1 +1 @@ -import{r as o}from"./index-Cry0GNHI.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-Dt001B3A.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-C8Q6ynv2.js b/assets/useInfiniteQuery-CgAOxB5d.js similarity index 89% rename from assets/useInfiniteQuery-C8Q6ynv2.js rename to assets/useInfiniteQuery-CgAOxB5d.js index ca3301db37cbffb0e9cd6874beae696a79cc96d1..0020bb275dab42c129da8290c61ec8b7c8535a38 100644 --- a/assets/useInfiniteQuery-C8Q6ynv2.js +++ b/assets/useInfiniteQuery-CgAOxB5d.js @@ -1 +1 @@ -import{Q as v,a as p}from"./useQuery-DlAfMYOD.js";import{ai as x,aj as b}from"./index-Cry0GNHI.js";var l=class extends v{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){e._type="infinite",super.setOptions(e)}getOptimisticResult(e){return e._type="infinite",super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,t){var f,P;const{state:s}=e,i=super.createResult(e,t),{isFetching:a,isRefetching:g,isError:c,isRefetchError:d}=i,r=(P=(f=s.fetchMeta)==null?void 0:f.fetchMore)==null?void 0:P.direction,h=c&&r==="forward",n=a&&r==="forward",o=c&&r==="backward",u=a&&r==="backward";return{...i,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:b(t,s.data),hasPreviousPage:x(t,s.data),isFetchNextPageError:h,isFetchingNextPage:n,isFetchPreviousPageError:o,isFetchingPreviousPage:u,isRefetchError:d&&!h&&!o,isRefetching:g&&!n&&!u}}};function w(e,t){return p(e,l)}export{w as u}; +import{Q as v,a as p}from"./useQuery-DD4hUA6p.js";import{ai as x,aj as b}from"./index-Dt001B3A.js";var l=class extends v{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){e._type="infinite",super.setOptions(e)}getOptimisticResult(e){return e._type="infinite",super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,t){var f,P;const{state:s}=e,i=super.createResult(e,t),{isFetching:a,isRefetching:g,isError:c,isRefetchError:d}=i,r=(P=(f=s.fetchMeta)==null?void 0:f.fetchMore)==null?void 0:P.direction,h=c&&r==="forward",n=a&&r==="forward",o=c&&r==="backward",u=a&&r==="backward";return{...i,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:b(t,s.data),hasPreviousPage:x(t,s.data),isFetchNextPageError:h,isFetchingNextPage:n,isFetchPreviousPageError:o,isFetchingPreviousPage:u,isRefetchError:d&&!h&&!o,isRefetching:g&&!n&&!u}}};function w(e,t){return p(e,l)}export{w as u}; diff --git a/assets/useMutation-C5zYPeQC.js b/assets/useMutation-BSdRNizq.js similarity index 97% rename from assets/useMutation-C5zYPeQC.js rename to assets/useMutation-BSdRNizq.js index 1872593dad02227b021872a7972940ef59a8ae4a..1858aae9685bbcda8f90ab5fd0d70d18653aab2e 100644 --- a/assets/useMutation-C5zYPeQC.js +++ b/assets/useMutation-BSdRNizq.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),v=(i,t,s)=>(E(i,t,"access private method"),s);import{am as q,ao as U,au as R,av as k,an as P,g as L,r as y,aq as A,aw as D}from"./index-Cry0GNHI.js";var a,c,o,h,n,C,S,j,I=(j=class extends q{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(),v(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){v(this,n,C).call(this),v(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),v(this,n,C).call(this),v(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,x,K;if(e(this,h)&&this.hasListeners()){const m=e(this,c).variables,g=e(this,c).context,M={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,g,M)}catch(l){Promise.reject(l)}try{(f=(u=e(this,h)).onSettled)==null||f.call(u,t.data,null,m,g,M)}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,g,M)}catch(l){Promise.reject(l)}try{(K=(x=e(this,h)).onSettled)==null||K.call(x,void 0,t.error,m,g,M)}catch(l){Promise.reject(l)}}}this.listeners.forEach(m=>{m(e(this,c))})})},j);function z(i,t){const s=L(),[r]=y.useState(()=>new I(s,i));y.useEffect(()=>{r.setOptions(i)},[r,i]);const u=y.useSyncExternalStore(y.useCallback(d=>r.subscribe(P.batchCalls(d)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),f=y.useCallback((d,O)=>{r.mutate(d,O).catch(A)},[r]);if(u.error&&D(r.options.throwOnError,[u.error]))throw u.error;return{...u,mutate:f,mutateAsync:u.mutate}}export{z 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),v=(i,t,s)=>(E(i,t,"access private method"),s);import{am as q,ao as U,au as R,av as k,an as P,g as L,r as y,aq as A,aw as D}from"./index-Dt001B3A.js";var a,c,o,h,n,C,S,j,I=(j=class extends q{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(),v(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){v(this,n,C).call(this),v(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),v(this,n,C).call(this),v(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,x,K;if(e(this,h)&&this.hasListeners()){const m=e(this,c).variables,g=e(this,c).context,M={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,g,M)}catch(l){Promise.reject(l)}try{(f=(u=e(this,h)).onSettled)==null||f.call(u,t.data,null,m,g,M)}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,g,M)}catch(l){Promise.reject(l)}try{(K=(x=e(this,h)).onSettled)==null||K.call(x,void 0,t.error,m,g,M)}catch(l){Promise.reject(l)}}}this.listeners.forEach(m=>{m(e(this,c))})})},j);function z(i,t){const s=L(),[r]=y.useState(()=>new I(s,i));y.useEffect(()=>{r.setOptions(i)},[r,i]);const u=y.useSyncExternalStore(y.useCallback(d=>r.subscribe(P.batchCalls(d)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),f=y.useCallback((d,O)=>{r.mutate(d,O).catch(A)},[r]);if(u.error&&D(r.options.throwOnError,[u.error]))throw u.error;return{...u,mutate:f,mutateAsync:u.mutate}}export{z as u}; diff --git a/assets/usePapers-B86z4_CJ.js b/assets/usePapers-qkM3n2JN.js similarity index 94% rename from assets/usePapers-B86z4_CJ.js rename to assets/usePapers-qkM3n2JN.js index b0d94bc326a326b81376e3f9a31cc8db12816d9b..95f7759ee2d4ed0efa3cba82f3c9b2c54989aec6 100644 --- a/assets/usePapers-B86z4_CJ.js +++ b/assets/usePapers-qkM3n2JN.js @@ -1 +1 @@ -import{aa as h}from"./index-Cry0GNHI.js";import{u as P}from"./useQuery-DlAfMYOD.js";import{u as y}from"./useInfiniteQuery-C8Q6ynv2.js";import{p as _}from"./papers-CrgFFrmi.js";function q(a,e=!0){return P({queryKey:["paper",a],queryFn:()=>_.get(a),enabled:e&&!!a,staleTime:10*60*1e3,refetchOnWindowFocus:!1})}function z(a={}){const{page_size:e=20,search:t,order_by:n="date_published",order_dir:s="desc",start_date:i,end_date:o,conference:r,latest_only:u=!0,include_resources:l=!1,has_code:d=!1,has_hf_artifacts:f=!1,framework:c,repository:p,enabled:g=!0}=a;return y({queryKey:["papers-infinite",{page_size:e,search:t,order_by:n,order_dir:s,start_date:i,end_date:o,conference:r,latest_only:u,include_resources:l,has_code:d,has_hf_artifacts:f,framework:c,repository:p}],queryFn:({pageParam:m=1})=>_.list({page:m,page_size:e,search:t,order_by:n,order_dir:s,start_date:i,end_date:o,conference:r,latest_only:u,include_resources:l,has_code:d,has_hf_artifacts:f,framework:c,repository:p}),getNextPageParam:m=>m.next_page,initialPageParam:1,enabled:g,staleTime:5*60*1e3,placeholderData:h,refetchOnWindowFocus:!1})}function O({q:a,order_by:e="relevance",start_date:t,end_date:n,has_code:s=!1,has_hf_artifacts:i=!1,enabled:o=!0}){return y({queryKey:["paper-search-feed",{q:a,order_by:e,start_date:t,end_date:n,has_code:s,has_hf_artifacts:i}],queryFn:({pageParam:r=1})=>_.searchFeed({q:a,page:r,page_size:20,order_by:e,start_date:t,end_date:n,has_code:s,has_hf_artifacts:i,mode:"hybrid"}),getNextPageParam:r=>r.next_page,initialPageParam:1,enabled:o&&a.trim().length>0,staleTime:5*60*1e3,placeholderData:h,refetchOnWindowFocus:!1})}function T(a){const{taskId:e,page_size:t=20,order_by:n="date_published",order_dir:s="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:f=!0}=a;return y({queryKey:["task-papers-infinite",e,{page_size:t,order_by:n,order_dir:s,latest_only:i,include_resources:o,has_code:r,has_hf_artifacts:u,start_date:l,end_date:d}],queryFn:({pageParam:c=1})=>_.forTask(e,{page:c,page_size:t,order_by:n,order_dir:s,latest_only:i,include_resources:o,has_code:r,has_hf_artifacts:u,start_date:l,end_date:d}),getNextPageParam:c=>c.next_page,initialPageParam:1,enabled:f&&!!e,staleTime:5*60*1e3,placeholderData:h,refetchOnWindowFocus:!1})}function w(a){const{conferenceSlug:e,taskSlug:t,presentation:n,page_size:s=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:f,end_date:c,enabled:p=!0}=a;return y({queryKey:["conference-papers-infinite",e,t,n,{page_size:s,order_by:i,order_dir:o,latest_only:r,include_resources:u,has_code:l,has_hf_artifacts:d,start_date:f,end_date:c}],queryFn:({pageParam:g=1})=>_.forConference(e,{task:t,presentation:n,page:g,page_size:s,order_by:i,order_dir:o,latest_only:r,include_resources:u,has_code:l,has_hf_artifacts:d,start_date:f,end_date:c}),getNextPageParam:g=>g.next_page,initialPageParam:1,enabled:p&&!!e,staleTime:5*60*1e3,placeholderData:h,refetchOnWindowFocus:!1})}function I(a){const{organizationSlug:e,taskSlug:t,page_size:n=20,order_by:s="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:f,enabled:c=!0}=a;return y({queryKey:["organization-papers-infinite",e,t,{page_size:n,order_by:s,order_dir:i,latest_only:o,include_resources:r,has_code:u,has_hf_artifacts:l,start_date:d,end_date:f}],queryFn:({pageParam:p=1})=>_.forOrganization(e,{task:t,page:p,page_size:n,order_by:s,order_dir:i,latest_only:o,include_resources:r,has_code:u,has_hf_artifacts:l,start_date:d,end_date:f}),getNextPageParam:p=>p.next_page,initialPageParam:1,enabled:c&&!!e,staleTime:5*60*1e3,placeholderData:h,refetchOnWindowFocus:!1})}export{O as a,q as b,T as c,w as d,I as e,z as u}; +import{aa as h}from"./index-Dt001B3A.js";import{u as P}from"./useQuery-DD4hUA6p.js";import{u as y}from"./useInfiniteQuery-CgAOxB5d.js";import{p as _}from"./papers-KXkGPHI5.js";function q(a,e=!0){return P({queryKey:["paper",a],queryFn:()=>_.get(a),enabled:e&&!!a,staleTime:10*60*1e3,refetchOnWindowFocus:!1})}function z(a={}){const{page_size:e=20,search:t,order_by:n="date_published",order_dir:s="desc",start_date:i,end_date:o,conference:r,latest_only:u=!0,include_resources:l=!1,has_code:d=!1,has_hf_artifacts:f=!1,framework:c,repository:p,enabled:g=!0}=a;return y({queryKey:["papers-infinite",{page_size:e,search:t,order_by:n,order_dir:s,start_date:i,end_date:o,conference:r,latest_only:u,include_resources:l,has_code:d,has_hf_artifacts:f,framework:c,repository:p}],queryFn:({pageParam:m=1})=>_.list({page:m,page_size:e,search:t,order_by:n,order_dir:s,start_date:i,end_date:o,conference:r,latest_only:u,include_resources:l,has_code:d,has_hf_artifacts:f,framework:c,repository:p}),getNextPageParam:m=>m.next_page,initialPageParam:1,enabled:g,staleTime:5*60*1e3,placeholderData:h,refetchOnWindowFocus:!1})}function O({q:a,order_by:e="relevance",start_date:t,end_date:n,has_code:s=!1,has_hf_artifacts:i=!1,enabled:o=!0}){return y({queryKey:["paper-search-feed",{q:a,order_by:e,start_date:t,end_date:n,has_code:s,has_hf_artifacts:i}],queryFn:({pageParam:r=1})=>_.searchFeed({q:a,page:r,page_size:20,order_by:e,start_date:t,end_date:n,has_code:s,has_hf_artifacts:i,mode:"hybrid"}),getNextPageParam:r=>r.next_page,initialPageParam:1,enabled:o&&a.trim().length>0,staleTime:5*60*1e3,placeholderData:h,refetchOnWindowFocus:!1})}function T(a){const{taskId:e,page_size:t=20,order_by:n="date_published",order_dir:s="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:f=!0}=a;return y({queryKey:["task-papers-infinite",e,{page_size:t,order_by:n,order_dir:s,latest_only:i,include_resources:o,has_code:r,has_hf_artifacts:u,start_date:l,end_date:d}],queryFn:({pageParam:c=1})=>_.forTask(e,{page:c,page_size:t,order_by:n,order_dir:s,latest_only:i,include_resources:o,has_code:r,has_hf_artifacts:u,start_date:l,end_date:d}),getNextPageParam:c=>c.next_page,initialPageParam:1,enabled:f&&!!e,staleTime:5*60*1e3,placeholderData:h,refetchOnWindowFocus:!1})}function w(a){const{conferenceSlug:e,taskSlug:t,presentation:n,page_size:s=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:f,end_date:c,enabled:p=!0}=a;return y({queryKey:["conference-papers-infinite",e,t,n,{page_size:s,order_by:i,order_dir:o,latest_only:r,include_resources:u,has_code:l,has_hf_artifacts:d,start_date:f,end_date:c}],queryFn:({pageParam:g=1})=>_.forConference(e,{task:t,presentation:n,page:g,page_size:s,order_by:i,order_dir:o,latest_only:r,include_resources:u,has_code:l,has_hf_artifacts:d,start_date:f,end_date:c}),getNextPageParam:g=>g.next_page,initialPageParam:1,enabled:p&&!!e,staleTime:5*60*1e3,placeholderData:h,refetchOnWindowFocus:!1})}function I(a){const{organizationSlug:e,taskSlug:t,page_size:n=20,order_by:s="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:f,enabled:c=!0}=a;return y({queryKey:["organization-papers-infinite",e,t,{page_size:n,order_by:s,order_dir:i,latest_only:o,include_resources:r,has_code:u,has_hf_artifacts:l,start_date:d,end_date:f}],queryFn:({pageParam:p=1})=>_.forOrganization(e,{task:t,page:p,page_size:n,order_by:s,order_dir:i,latest_only:o,include_resources:r,has_code:u,has_hf_artifacts:l,start_date:d,end_date:f}),getNextPageParam:p=>p.next_page,initialPageParam:1,enabled:c&&!!e,staleTime:5*60*1e3,placeholderData:h,refetchOnWindowFocus:!1})}export{O as a,q as b,T as c,w as d,I as e,z as u}; diff --git a/assets/useQuery-DlAfMYOD.js b/assets/useQuery-DD4hUA6p.js similarity index 99% rename from assets/useQuery-DlAfMYOD.js rename to assets/useQuery-DD4hUA6p.js index e3fd3d9293941bfaec1af6d890946cfec7f7b50c..a7a65be9476043009a7d0ccb41d8617233e708d6 100644 --- a/assets/useQuery-DlAfMYOD.js +++ b/assets/useQuery-DD4hUA6p.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{am as Tt,az as gt,aA as S,ao as q,aB as H,aq as tt,aC as et,aD as mt,aE as Mt,aF as J,aG as Qt,aH as xt,aI as vt,an as Ct,r as O,aw as Ot,g as _t}from"./index-Cry0GNHI.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=K=>{k?K.reject(I.error):R&&K.resolve(I.data)},pt=()=>{const K=u(this,C,I.promise=gt());V(K)},G=i(this,C);switch(G.status){case"pending":t.queryHash===r.queryHash&&V(G);break;case"fulfilled":(k||I.data!==G.value)&&pt();break;case"rejected":(!k||I.error!==G.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{am as Tt,az as gt,aA as S,ao as q,aB as H,aq as tt,aC as et,aD as mt,aE as Mt,aF as J,aG as Qt,aH as xt,aI as vt,an as Ct,r as O,aw as Ot,g as _t}from"./index-Dt001B3A.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=K=>{k?K.reject(I.error):R&&K.resolve(I.data)},pt=()=>{const K=u(this,C,I.promise=gt());V(K)},G=i(this,C);switch(G.status){case"pending":t.queryHash===r.queryHash&&V(G);break;case"fulfilled":(k||I.data!==G.value)&&pt();break;case"rejected":(!k||I.error!==G.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 ac87c9bf047aed8d1208177d4643c1db318ba680..d7464f844cb93596984fded35546de73f113bcc1 100644 --- a/index.html +++ b/index.html @@ -73,8 +73,8 @@ plausible.init(); })(); - - + +