diff --git a/assets/AgentLogos-BU5avxAK.js b/assets/AgentLogos-XWluRn7l.js similarity index 99% rename from assets/AgentLogos-BU5avxAK.js rename to assets/AgentLogos-XWluRn7l.js index f4f839d48b228013b1b521bb35eee937075e394f..33d475feac92244b4ad074508c8772d3af8b381d 100644 --- a/assets/AgentLogos-BU5avxAK.js +++ b/assets/AgentLogos-XWluRn7l.js @@ -1 +1 @@ -import{j as e}from"./index-CkeK0cDg.js";const s="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='256'%20height='257'%20preserveAspectRatio='xMidYMid'%20viewBox='0%200%20256%20257'%3e%3cpath%20fill='%23D97757'%20d='m50.228%20170.321%2050.357-28.257.843-2.463-.843-1.361h-2.462l-8.426-.518-28.775-.778-24.952-1.037-24.175-1.296-6.092-1.297L0%20125.796l.583-3.759%205.12-3.434%207.324.648%2016.202%201.101%2024.304%201.685%2017.629%201.037%2026.118%202.722h4.148l.583-1.685-1.426-1.037-1.101-1.037-25.147-17.045-27.22-18.017-14.258-10.37-7.713-5.25-3.888-4.925-1.685-10.758%207-7.713%209.397.649%202.398.648%209.527%207.323%2020.35%2015.75L94.817%2091.9l3.889%203.24%201.555-1.102.195-.777-1.75-2.917-14.453-26.118-15.425-26.572-6.87-11.018-1.814-6.61c-.648-2.723-1.102-4.991-1.102-7.778l7.972-10.823L71.42%200%2082.05%201.426l4.472%203.888%206.61%2015.101%2010.694%2023.786%2016.591%2032.34%204.861%209.592%202.592%208.879.973%202.722h1.685v-1.556l1.36-18.211%202.528-22.36%202.463-28.776.843-8.1%204.018-9.722%207.971-5.25%206.222%202.981%205.12%207.324-.713%204.73-3.046%2019.768-5.962%2030.98-3.889%2020.739h2.268l2.593-2.593%2010.499-13.934%2017.628-22.036%207.778-8.749%209.073-9.657%205.833-4.601h11.018l8.1%2012.055-3.628%2012.443-11.342%2014.388-9.398%2012.184-13.48%2018.147-8.426%2014.518.778%201.166%202.01-.194%2030.46-6.481%2016.462-2.982%2019.637-3.37%208.88%204.148.971%204.213-3.5%208.62-20.998%205.184-24.628%204.926-36.682%208.685-.454.324.519.648%2016.526%201.555%207.065.389h17.304l32.21%202.398%208.426%205.574%205.055%206.805-.843%205.184-12.962%206.611-17.498-4.148-40.83-9.721-14-3.5h-1.944v1.167l11.666%2011.406%2021.387%2019.314%2026.767%2024.887%201.36%206.157-3.434%204.86-3.63-.518-23.526-17.693-9.073-7.972-20.545-17.304h-1.36v1.814l4.73%206.935%2025.017%2037.59%201.296%2011.536-1.814%203.76-6.481%202.268-7.13-1.297-14.647-20.544-15.1-23.138-12.185-20.739-1.49.843-7.194%2077.448-3.37%203.953-7.778%202.981-6.48-4.925-3.436-7.972%203.435-15.749%204.148-20.544%203.37-16.333%203.046-20.285%201.815-6.74-.13-.454-1.49.194-15.295%2020.999-23.267%2031.433-18.406%2019.702-4.407%201.75-7.648-3.954.713-7.064%204.277-6.286%2025.47-32.405%2015.36-20.092%209.917-11.6-.065-1.686h-.583L44.07%20198.125l-12.055%201.555-5.185-4.86.648-7.972%202.463-2.593%2020.35-13.999-.064.065Z'/%3e%3c/svg%3e",a="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='256'%20height='257'%20preserveAspectRatio='xMidYMid'%20viewBox='0%200%20256%20257'%3e%3cpath%20fill='%23D97757'%20d='m50.228%20170.321%2050.357-28.257.843-2.463-.843-1.361h-2.462l-8.426-.518-28.775-.778-24.952-1.037-24.175-1.296-6.092-1.297L0%20125.796l.583-3.759%205.12-3.434%207.324.648%2016.202%201.101%2024.304%201.685%2017.629%201.037%2026.118%202.722h4.148l.583-1.685-1.426-1.037-1.101-1.037-25.147-17.045-27.22-18.017-14.258-10.37-7.713-5.25-3.888-4.925-1.685-10.758%207-7.713%209.397.649%202.398.648%209.527%207.323%2020.35%2015.75L94.817%2091.9l3.889%203.24%201.555-1.102.195-.777-1.75-2.917-14.453-26.118-15.425-26.572-6.87-11.018-1.814-6.61c-.648-2.723-1.102-4.991-1.102-7.778l7.972-10.823L71.42%200%2082.05%201.426l4.472%203.888%206.61%2015.101%2010.694%2023.786%2016.591%2032.34%204.861%209.592%202.592%208.879.973%202.722h1.685v-1.556l1.36-18.211%202.528-22.36%202.463-28.776.843-8.1%204.018-9.722%207.971-5.25%206.222%202.981%205.12%207.324-.713%204.73-3.046%2019.768-5.962%2030.98-3.889%2020.739h2.268l2.593-2.593%2010.499-13.934%2017.628-22.036%207.778-8.749%209.073-9.657%205.833-4.601h11.018l8.1%2012.055-3.628%2012.443-11.342%2014.388-9.398%2012.184-13.48%2018.147-8.426%2014.518.778%201.166%202.01-.194%2030.46-6.481%2016.462-2.982%2019.637-3.37%208.88%204.148.971%204.213-3.5%208.62-20.998%205.184-24.628%204.926-36.682%208.685-.454.324.519.648%2016.526%201.555%207.065.389h17.304l32.21%202.398%208.426%205.574%205.055%206.805-.843%205.184-12.962%206.611-17.498-4.148-40.83-9.721-14-3.5h-1.944v1.167l11.666%2011.406%2021.387%2019.314%2026.767%2024.887%201.36%206.157-3.434%204.86-3.63-.518-23.526-17.693-9.073-7.972-20.545-17.304h-1.36v1.814l4.73%206.935%2025.017%2037.59%201.296%2011.536-1.814%203.76-6.481%202.268-7.13-1.297-14.647-20.544-15.1-23.138-12.185-20.739-1.49.843-7.194%2077.448-3.37%203.953-7.778%202.981-6.48-4.925-3.436-7.972%203.435-15.749%204.148-20.544%203.37-16.333%203.046-20.285%201.815-6.74-.13-.454-1.49.194-15.295%2020.999-23.267%2031.433-18.406%2019.702-4.407%201.75-7.648-3.954.713-7.064%204.277-6.286%2025.47-32.405%2015.36-20.092%209.917-11.6-.065-1.686h-.583L44.07%20198.125l-12.055%201.555-5.185-4.86.648-7.972%202.463-2.593%2020.35-13.999-.064.065Z'/%3e%3c/svg%3e",h="data:image/svg+xml,%3csvg%20fill='%23111'%20fill-rule='evenodd'%20height='1em'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='1em'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eCodex%3c/title%3e%3cpath%20clip-rule='evenodd'%20d='M8.086.457a6.105%206.105%200%20013.046-.415c1.333.153%202.521.72%203.564%201.7a.117.117%200%2000.107.029c1.408-.346%202.762-.224%204.061.366l.063.03.154.076c1.357.703%202.33%201.77%202.918%203.198.278.679.418%201.388.421%202.126a5.655%205.655%200%2001-.18%201.631.167.167%200%2000.04.155%205.982%205.982%200%20011.578%202.891c.385%201.901-.01%203.615-1.183%205.14l-.182.22a6.063%206.063%200%2001-2.934%201.851.162.162%200%2000-.108.102c-.255.736-.511%201.364-.987%201.992-1.199%201.582-2.962%202.462-4.948%202.451-1.583-.008-2.986-.587-4.21-1.736a.145.145%200%2000-.14-.032c-.518.167-1.04.191-1.604.185a5.924%205.924%200%2001-2.595-.622%206.058%206.058%200%2001-2.146-1.781c-.203-.269-.404-.522-.551-.821a7.74%207.74%200%2001-.495-1.283%206.11%206.11%200%2001-.017-3.064.166.166%200%2000.008-.074.115.115%200%2000-.037-.064%205.958%205.958%200%2001-1.38-2.202%205.196%205.196%200%2001-.333-1.589%206.915%206.915%200%2001.188-2.132c.45-1.484%201.309-2.648%202.577-3.493.282-.188.55-.334.802-.438.286-.12.573-.22.861-.304a.129.129%200%2000.087-.087A6.016%206.016%200%20015.635%202.31C6.315%201.464%207.132.846%208.086.457zm-.804%207.85a.848.848%200%2000-1.473.842l1.694%202.965-1.688%202.848a.849.849%200%20001.46.864l1.94-3.272a.849.849%200%2000.007-.854l-1.94-3.393zm5.446%206.24a.849.849%200%20000%201.695h4.848a.849.849%200%20000-1.696h-4.848z'%3e%3c/path%3e%3c/svg%3e",o="data:image/svg+xml,%3csvg%20fill='%23fff'%20fill-rule='evenodd'%20height='1em'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='1em'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eCodex%3c/title%3e%3cpath%20clip-rule='evenodd'%20d='M8.086.457a6.105%206.105%200%20013.046-.415c1.333.153%202.521.72%203.564%201.7a.117.117%200%2000.107.029c1.408-.346%202.762-.224%204.061.366l.063.03.154.076c1.357.703%202.33%201.77%202.918%203.198.278.679.418%201.388.421%202.126a5.655%205.655%200%2001-.18%201.631.167.167%200%2000.04.155%205.982%205.982%200%20011.578%202.891c.385%201.901-.01%203.615-1.183%205.14l-.182.22a6.063%206.063%200%2001-2.934%201.851.162.162%200%2000-.108.102c-.255.736-.511%201.364-.987%201.992-1.199%201.582-2.962%202.462-4.948%202.451-1.583-.008-2.986-.587-4.21-1.736a.145.145%200%2000-.14-.032c-.518.167-1.04.191-1.604.185a5.924%205.924%200%2001-2.595-.622%206.058%206.058%200%2001-2.146-1.781c-.203-.269-.404-.522-.551-.821a7.74%207.74%200%2001-.495-1.283%206.11%206.11%200%2001-.017-3.064.166.166%200%2000.008-.074.115.115%200%2000-.037-.064%205.958%205.958%200%2001-1.38-2.202%205.196%205.196%200%2001-.333-1.589%206.915%206.915%200%2001.188-2.132c.45-1.484%201.309-2.648%202.577-3.493.282-.188.55-.334.802-.438.286-.12.573-.22.861-.304a.129.129%200%2000.087-.087A6.016%206.016%200%20015.635%202.31C6.315%201.464%207.132.846%208.086.457zm-.804%207.85a.848.848%200%2000-1.473.842l1.694%202.965-1.688%202.848a.849.849%200%20001.46.864l1.94-3.272a.849.849%200%2000.007-.854l-1.94-3.393zm5.446%206.24a.849.849%200%20000%201.695h4.848a.849.849%200%20000-1.696h-4.848z'%3e%3c/path%3e%3c/svg%3e",r="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20id='cursor_light__Ebene_1'%20xmlns='http://www.w3.org/2000/svg'%20version='1.1'%20viewBox='0%200%20466.73%20532.09'%3e%3c!--Generator:%20Adobe%20Illustrator%2029.6.1,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%202.1.1%20Build%209)--%3e%3cdefs%3e%3cstyle%3e.cursor_light__st0{fill:%2326251e}%3c/style%3e%3c/defs%3e%3cpath%20class='cursor_light__st0'%20d='M457.43,125.94L244.42,2.96c-6.84-3.95-15.28-3.95-22.12,0L9.3,125.94c-5.75,3.32-9.3,9.46-9.3,16.11v247.99c0,6.65,3.55,12.79,9.3,16.11l213.01,122.98c6.84,3.95,15.28,3.95,22.12,0l213.01-122.98c5.75-3.32,9.3-9.46,9.3-16.11v-247.99c0-6.65-3.55-12.79-9.3-16.11h-.01ZM444.05,151.99l-205.63,356.16c-1.39,2.4-5.06,1.42-5.06-1.36v-233.21c0-4.66-2.49-8.97-6.53-11.31L24.87,145.67c-2.4-1.39-1.42-5.06,1.36-5.06h411.26c5.84,0,9.49,6.33,6.57,11.39h-.01Z'/%3e%3c/svg%3e",d="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20id='cursor_dark__Ebene_1'%20xmlns='http://www.w3.org/2000/svg'%20version='1.1'%20viewBox='0%200%20466.73%20532.09'%3e%3c!--Generator:%20Adobe%20Illustrator%2029.6.1,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%202.1.1%20Build%209)--%3e%3cdefs%3e%3cstyle%3e.cursor_dark__st0{fill:%23edecec}%3c/style%3e%3c/defs%3e%3cpath%20class='cursor_dark__st0'%20d='M457.43,125.94L244.42,2.96c-6.84-3.95-15.28-3.95-22.12,0L9.3,125.94c-5.75,3.32-9.3,9.46-9.3,16.11v247.99c0,6.65,3.55,12.79,9.3,16.11l213.01,122.98c6.84,3.95,15.28,3.95,22.12,0l213.01-122.98c5.75-3.32,9.3-9.46,9.3-16.11v-247.99c0-6.65-3.55-12.79-9.3-16.11h-.01ZM444.05,151.99l-205.63,356.16c-1.39,2.4-5.06,1.42-5.06-1.36v-233.21c0-4.66-2.49-8.97-6.53-11.31L24.87,145.67c-2.4-1.39-1.42-5.06,1.36-5.06h411.26c5.84,0,9.49,6.33,6.57,11.39h-.01Z'/%3e%3c/svg%3e",n="data:image/svg+xml,%3csvg%20width='512'%20height='512'%20viewBox='0%200%20512%20512'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20width='512'%20height='512'%20fill='%23FDFCFC'/%3e%3cpath%20d='M320%20224V352H192V224H320Z'%20fill='%23E6E5E6'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M384%20416H128V96H384V416ZM320%20160H192V352H320V160Z'%20fill='%2317181C'/%3e%3c/svg%3e",g="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20version='1.1'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='512'%20height='512'%3e%3csvg%20width='512'%20height='512'%20viewBox='0%200%20512%20512'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20width='512'%20height='512'%20fill='%23131010'%3e%3c/rect%3e%3cpath%20d='M320%20224V352H192V224H320Z'%20fill='%235A5858'%3e%3c/path%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M384%20416H128V96H384V416ZM320%20160H192V352H320V160Z'%20fill='white'%3e%3c/path%3e%3c/svg%3e%3cstyle%3e@media%20(prefers-color-scheme:%20light)%20{%20:root%20{%20filter:%20none;%20}%20}%20@media%20(prefers-color-scheme:%20dark)%20{%20:root%20{%20filter:%20none;%20}%20}%20%3c/style%3e%3c/svg%3e",i=[{name:"Claude",light:s,dark:a},{name:"Codex",light:h,dark:o},{name:"Cursor",light:r,dark:d},{name:"OpenCode",light:n,dark:g}];function w(){return e.jsx("span",{className:"ml-1 inline-flex shrink-0 items-center gap-1.5","aria-hidden":"true",children:i.map(({name:l,light:t,dark:c})=>e.jsxs("span",{title:l,className:"inline-flex h-[18px] w-[18px]",children:[e.jsx("img",{src:t,alt:"",width:18,height:18,className:"h-full w-full object-contain dark:hidden"}),e.jsx("img",{src:c,alt:"",width:18,height:18,className:"hidden h-full w-full object-contain dark:block"})]},l))})}function m(){return e.jsx("ul",{className:"flex flex-wrap gap-2","aria-label":"Supported coding agents",children:i.map(({name:l,light:t,dark:c})=>e.jsxs("li",{className:"inline-flex items-center gap-2 rounded-full border px-3 py-1 text-sm",children:[e.jsx("img",{src:t,alt:"",width:18,height:18,className:"h-[18px] w-[18px] object-contain dark:hidden"}),e.jsx("img",{src:c,alt:"",width:18,height:18,className:"hidden h-[18px] w-[18px] object-contain dark:block"}),l]},l))})}export{w as A,m as a}; +import{j as e}from"./index-B7UoLEbn.js";const s="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='256'%20height='257'%20preserveAspectRatio='xMidYMid'%20viewBox='0%200%20256%20257'%3e%3cpath%20fill='%23D97757'%20d='m50.228%20170.321%2050.357-28.257.843-2.463-.843-1.361h-2.462l-8.426-.518-28.775-.778-24.952-1.037-24.175-1.296-6.092-1.297L0%20125.796l.583-3.759%205.12-3.434%207.324.648%2016.202%201.101%2024.304%201.685%2017.629%201.037%2026.118%202.722h4.148l.583-1.685-1.426-1.037-1.101-1.037-25.147-17.045-27.22-18.017-14.258-10.37-7.713-5.25-3.888-4.925-1.685-10.758%207-7.713%209.397.649%202.398.648%209.527%207.323%2020.35%2015.75L94.817%2091.9l3.889%203.24%201.555-1.102.195-.777-1.75-2.917-14.453-26.118-15.425-26.572-6.87-11.018-1.814-6.61c-.648-2.723-1.102-4.991-1.102-7.778l7.972-10.823L71.42%200%2082.05%201.426l4.472%203.888%206.61%2015.101%2010.694%2023.786%2016.591%2032.34%204.861%209.592%202.592%208.879.973%202.722h1.685v-1.556l1.36-18.211%202.528-22.36%202.463-28.776.843-8.1%204.018-9.722%207.971-5.25%206.222%202.981%205.12%207.324-.713%204.73-3.046%2019.768-5.962%2030.98-3.889%2020.739h2.268l2.593-2.593%2010.499-13.934%2017.628-22.036%207.778-8.749%209.073-9.657%205.833-4.601h11.018l8.1%2012.055-3.628%2012.443-11.342%2014.388-9.398%2012.184-13.48%2018.147-8.426%2014.518.778%201.166%202.01-.194%2030.46-6.481%2016.462-2.982%2019.637-3.37%208.88%204.148.971%204.213-3.5%208.62-20.998%205.184-24.628%204.926-36.682%208.685-.454.324.519.648%2016.526%201.555%207.065.389h17.304l32.21%202.398%208.426%205.574%205.055%206.805-.843%205.184-12.962%206.611-17.498-4.148-40.83-9.721-14-3.5h-1.944v1.167l11.666%2011.406%2021.387%2019.314%2026.767%2024.887%201.36%206.157-3.434%204.86-3.63-.518-23.526-17.693-9.073-7.972-20.545-17.304h-1.36v1.814l4.73%206.935%2025.017%2037.59%201.296%2011.536-1.814%203.76-6.481%202.268-7.13-1.297-14.647-20.544-15.1-23.138-12.185-20.739-1.49.843-7.194%2077.448-3.37%203.953-7.778%202.981-6.48-4.925-3.436-7.972%203.435-15.749%204.148-20.544%203.37-16.333%203.046-20.285%201.815-6.74-.13-.454-1.49.194-15.295%2020.999-23.267%2031.433-18.406%2019.702-4.407%201.75-7.648-3.954.713-7.064%204.277-6.286%2025.47-32.405%2015.36-20.092%209.917-11.6-.065-1.686h-.583L44.07%20198.125l-12.055%201.555-5.185-4.86.648-7.972%202.463-2.593%2020.35-13.999-.064.065Z'/%3e%3c/svg%3e",a="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='256'%20height='257'%20preserveAspectRatio='xMidYMid'%20viewBox='0%200%20256%20257'%3e%3cpath%20fill='%23D97757'%20d='m50.228%20170.321%2050.357-28.257.843-2.463-.843-1.361h-2.462l-8.426-.518-28.775-.778-24.952-1.037-24.175-1.296-6.092-1.297L0%20125.796l.583-3.759%205.12-3.434%207.324.648%2016.202%201.101%2024.304%201.685%2017.629%201.037%2026.118%202.722h4.148l.583-1.685-1.426-1.037-1.101-1.037-25.147-17.045-27.22-18.017-14.258-10.37-7.713-5.25-3.888-4.925-1.685-10.758%207-7.713%209.397.649%202.398.648%209.527%207.323%2020.35%2015.75L94.817%2091.9l3.889%203.24%201.555-1.102.195-.777-1.75-2.917-14.453-26.118-15.425-26.572-6.87-11.018-1.814-6.61c-.648-2.723-1.102-4.991-1.102-7.778l7.972-10.823L71.42%200%2082.05%201.426l4.472%203.888%206.61%2015.101%2010.694%2023.786%2016.591%2032.34%204.861%209.592%202.592%208.879.973%202.722h1.685v-1.556l1.36-18.211%202.528-22.36%202.463-28.776.843-8.1%204.018-9.722%207.971-5.25%206.222%202.981%205.12%207.324-.713%204.73-3.046%2019.768-5.962%2030.98-3.889%2020.739h2.268l2.593-2.593%2010.499-13.934%2017.628-22.036%207.778-8.749%209.073-9.657%205.833-4.601h11.018l8.1%2012.055-3.628%2012.443-11.342%2014.388-9.398%2012.184-13.48%2018.147-8.426%2014.518.778%201.166%202.01-.194%2030.46-6.481%2016.462-2.982%2019.637-3.37%208.88%204.148.971%204.213-3.5%208.62-20.998%205.184-24.628%204.926-36.682%208.685-.454.324.519.648%2016.526%201.555%207.065.389h17.304l32.21%202.398%208.426%205.574%205.055%206.805-.843%205.184-12.962%206.611-17.498-4.148-40.83-9.721-14-3.5h-1.944v1.167l11.666%2011.406%2021.387%2019.314%2026.767%2024.887%201.36%206.157-3.434%204.86-3.63-.518-23.526-17.693-9.073-7.972-20.545-17.304h-1.36v1.814l4.73%206.935%2025.017%2037.59%201.296%2011.536-1.814%203.76-6.481%202.268-7.13-1.297-14.647-20.544-15.1-23.138-12.185-20.739-1.49.843-7.194%2077.448-3.37%203.953-7.778%202.981-6.48-4.925-3.436-7.972%203.435-15.749%204.148-20.544%203.37-16.333%203.046-20.285%201.815-6.74-.13-.454-1.49.194-15.295%2020.999-23.267%2031.433-18.406%2019.702-4.407%201.75-7.648-3.954.713-7.064%204.277-6.286%2025.47-32.405%2015.36-20.092%209.917-11.6-.065-1.686h-.583L44.07%20198.125l-12.055%201.555-5.185-4.86.648-7.972%202.463-2.593%2020.35-13.999-.064.065Z'/%3e%3c/svg%3e",h="data:image/svg+xml,%3csvg%20fill='%23111'%20fill-rule='evenodd'%20height='1em'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='1em'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eCodex%3c/title%3e%3cpath%20clip-rule='evenodd'%20d='M8.086.457a6.105%206.105%200%20013.046-.415c1.333.153%202.521.72%203.564%201.7a.117.117%200%2000.107.029c1.408-.346%202.762-.224%204.061.366l.063.03.154.076c1.357.703%202.33%201.77%202.918%203.198.278.679.418%201.388.421%202.126a5.655%205.655%200%2001-.18%201.631.167.167%200%2000.04.155%205.982%205.982%200%20011.578%202.891c.385%201.901-.01%203.615-1.183%205.14l-.182.22a6.063%206.063%200%2001-2.934%201.851.162.162%200%2000-.108.102c-.255.736-.511%201.364-.987%201.992-1.199%201.582-2.962%202.462-4.948%202.451-1.583-.008-2.986-.587-4.21-1.736a.145.145%200%2000-.14-.032c-.518.167-1.04.191-1.604.185a5.924%205.924%200%2001-2.595-.622%206.058%206.058%200%2001-2.146-1.781c-.203-.269-.404-.522-.551-.821a7.74%207.74%200%2001-.495-1.283%206.11%206.11%200%2001-.017-3.064.166.166%200%2000.008-.074.115.115%200%2000-.037-.064%205.958%205.958%200%2001-1.38-2.202%205.196%205.196%200%2001-.333-1.589%206.915%206.915%200%2001.188-2.132c.45-1.484%201.309-2.648%202.577-3.493.282-.188.55-.334.802-.438.286-.12.573-.22.861-.304a.129.129%200%2000.087-.087A6.016%206.016%200%20015.635%202.31C6.315%201.464%207.132.846%208.086.457zm-.804%207.85a.848.848%200%2000-1.473.842l1.694%202.965-1.688%202.848a.849.849%200%20001.46.864l1.94-3.272a.849.849%200%2000.007-.854l-1.94-3.393zm5.446%206.24a.849.849%200%20000%201.695h4.848a.849.849%200%20000-1.696h-4.848z'%3e%3c/path%3e%3c/svg%3e",o="data:image/svg+xml,%3csvg%20fill='%23fff'%20fill-rule='evenodd'%20height='1em'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='1em'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eCodex%3c/title%3e%3cpath%20clip-rule='evenodd'%20d='M8.086.457a6.105%206.105%200%20013.046-.415c1.333.153%202.521.72%203.564%201.7a.117.117%200%2000.107.029c1.408-.346%202.762-.224%204.061.366l.063.03.154.076c1.357.703%202.33%201.77%202.918%203.198.278.679.418%201.388.421%202.126a5.655%205.655%200%2001-.18%201.631.167.167%200%2000.04.155%205.982%205.982%200%20011.578%202.891c.385%201.901-.01%203.615-1.183%205.14l-.182.22a6.063%206.063%200%2001-2.934%201.851.162.162%200%2000-.108.102c-.255.736-.511%201.364-.987%201.992-1.199%201.582-2.962%202.462-4.948%202.451-1.583-.008-2.986-.587-4.21-1.736a.145.145%200%2000-.14-.032c-.518.167-1.04.191-1.604.185a5.924%205.924%200%2001-2.595-.622%206.058%206.058%200%2001-2.146-1.781c-.203-.269-.404-.522-.551-.821a7.74%207.74%200%2001-.495-1.283%206.11%206.11%200%2001-.017-3.064.166.166%200%2000.008-.074.115.115%200%2000-.037-.064%205.958%205.958%200%2001-1.38-2.202%205.196%205.196%200%2001-.333-1.589%206.915%206.915%200%2001.188-2.132c.45-1.484%201.309-2.648%202.577-3.493.282-.188.55-.334.802-.438.286-.12.573-.22.861-.304a.129.129%200%2000.087-.087A6.016%206.016%200%20015.635%202.31C6.315%201.464%207.132.846%208.086.457zm-.804%207.85a.848.848%200%2000-1.473.842l1.694%202.965-1.688%202.848a.849.849%200%20001.46.864l1.94-3.272a.849.849%200%2000.007-.854l-1.94-3.393zm5.446%206.24a.849.849%200%20000%201.695h4.848a.849.849%200%20000-1.696h-4.848z'%3e%3c/path%3e%3c/svg%3e",r="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20id='cursor_light__Ebene_1'%20xmlns='http://www.w3.org/2000/svg'%20version='1.1'%20viewBox='0%200%20466.73%20532.09'%3e%3c!--Generator:%20Adobe%20Illustrator%2029.6.1,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%202.1.1%20Build%209)--%3e%3cdefs%3e%3cstyle%3e.cursor_light__st0{fill:%2326251e}%3c/style%3e%3c/defs%3e%3cpath%20class='cursor_light__st0'%20d='M457.43,125.94L244.42,2.96c-6.84-3.95-15.28-3.95-22.12,0L9.3,125.94c-5.75,3.32-9.3,9.46-9.3,16.11v247.99c0,6.65,3.55,12.79,9.3,16.11l213.01,122.98c6.84,3.95,15.28,3.95,22.12,0l213.01-122.98c5.75-3.32,9.3-9.46,9.3-16.11v-247.99c0-6.65-3.55-12.79-9.3-16.11h-.01ZM444.05,151.99l-205.63,356.16c-1.39,2.4-5.06,1.42-5.06-1.36v-233.21c0-4.66-2.49-8.97-6.53-11.31L24.87,145.67c-2.4-1.39-1.42-5.06,1.36-5.06h411.26c5.84,0,9.49,6.33,6.57,11.39h-.01Z'/%3e%3c/svg%3e",d="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20id='cursor_dark__Ebene_1'%20xmlns='http://www.w3.org/2000/svg'%20version='1.1'%20viewBox='0%200%20466.73%20532.09'%3e%3c!--Generator:%20Adobe%20Illustrator%2029.6.1,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%202.1.1%20Build%209)--%3e%3cdefs%3e%3cstyle%3e.cursor_dark__st0{fill:%23edecec}%3c/style%3e%3c/defs%3e%3cpath%20class='cursor_dark__st0'%20d='M457.43,125.94L244.42,2.96c-6.84-3.95-15.28-3.95-22.12,0L9.3,125.94c-5.75,3.32-9.3,9.46-9.3,16.11v247.99c0,6.65,3.55,12.79,9.3,16.11l213.01,122.98c6.84,3.95,15.28,3.95,22.12,0l213.01-122.98c5.75-3.32,9.3-9.46,9.3-16.11v-247.99c0-6.65-3.55-12.79-9.3-16.11h-.01ZM444.05,151.99l-205.63,356.16c-1.39,2.4-5.06,1.42-5.06-1.36v-233.21c0-4.66-2.49-8.97-6.53-11.31L24.87,145.67c-2.4-1.39-1.42-5.06,1.36-5.06h411.26c5.84,0,9.49,6.33,6.57,11.39h-.01Z'/%3e%3c/svg%3e",n="data:image/svg+xml,%3csvg%20width='512'%20height='512'%20viewBox='0%200%20512%20512'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20width='512'%20height='512'%20fill='%23FDFCFC'/%3e%3cpath%20d='M320%20224V352H192V224H320Z'%20fill='%23E6E5E6'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M384%20416H128V96H384V416ZM320%20160H192V352H320V160Z'%20fill='%2317181C'/%3e%3c/svg%3e",g="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20version='1.1'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='512'%20height='512'%3e%3csvg%20width='512'%20height='512'%20viewBox='0%200%20512%20512'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20width='512'%20height='512'%20fill='%23131010'%3e%3c/rect%3e%3cpath%20d='M320%20224V352H192V224H320Z'%20fill='%235A5858'%3e%3c/path%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M384%20416H128V96H384V416ZM320%20160H192V352H320V160Z'%20fill='white'%3e%3c/path%3e%3c/svg%3e%3cstyle%3e@media%20(prefers-color-scheme:%20light)%20{%20:root%20{%20filter:%20none;%20}%20}%20@media%20(prefers-color-scheme:%20dark)%20{%20:root%20{%20filter:%20none;%20}%20}%20%3c/style%3e%3c/svg%3e",i=[{name:"Claude",light:s,dark:a},{name:"Codex",light:h,dark:o},{name:"Cursor",light:r,dark:d},{name:"OpenCode",light:n,dark:g}];function w(){return e.jsx("span",{className:"ml-1 inline-flex shrink-0 items-center gap-1.5","aria-hidden":"true",children:i.map(({name:l,light:t,dark:c})=>e.jsxs("span",{title:l,className:"inline-flex h-[18px] w-[18px]",children:[e.jsx("img",{src:t,alt:"",width:18,height:18,className:"h-full w-full object-contain dark:hidden"}),e.jsx("img",{src:c,alt:"",width:18,height:18,className:"hidden h-full w-full object-contain dark:block"})]},l))})}function m(){return e.jsx("ul",{className:"flex flex-wrap gap-2","aria-label":"Supported coding agents",children:i.map(({name:l,light:t,dark:c})=>e.jsxs("li",{className:"inline-flex items-center gap-2 rounded-full border px-3 py-1 text-sm",children:[e.jsx("img",{src:t,alt:"",width:18,height:18,className:"h-[18px] w-[18px] object-contain dark:hidden"}),e.jsx("img",{src:c,alt:"",width:18,height:18,className:"hidden h-[18px] w-[18px] object-contain dark:block"}),l]},l))})}export{w as A,m as a}; diff --git a/assets/AiDeadlinesView-xAdHZPwo.js b/assets/AiDeadlinesView-CVIN6p8v.js similarity index 96% rename from assets/AiDeadlinesView-xAdHZPwo.js rename to assets/AiDeadlinesView-CVIN6p8v.js index a69861747a44031f05eb17d46851590896ad43ba..de8bd589a1f50bc3d0839ef978fc4c7e4bfcb63d 100644 --- a/assets/AiDeadlinesView-xAdHZPwo.js +++ b/assets/AiDeadlinesView-CVIN6p8v.js @@ -1,3 +1,3 @@ -import{r as x,j as t}from"./index-CkeK0cDg.js";import{u as A}from"./useQuery-_Fj6Jfzr.js";import{c as B}from"./catalog-DGg7xZLW.js";import{S as U}from"./switch-DlTd3dHA.js";import{S as W}from"./skeleton-Cs8haT1C.js";import{A as O,a as V}from"./alert-Vt5eE6re.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-CGH-CTnE.js";import"./index-DVmlmU_7.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-B7UoLEbn.js";import{u as A}from"./useQuery-DV2f4JpC.js";import{c as B}from"./catalog-DcbS_7_L.js";import{S as U}from"./switch-Dard85vE.js";import{S as W}from"./skeleton-DLsINbKq.js";import{A as O,a as V}from"./alert-B3UHHG00.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-BECDhHRn.js";import"./index-C0YS4OFr.js";const b=1e3*60*60*24,S={urgent:"#c0392b",soon:"#b9770e",normal:"#3f7d3f",passed:"var(--ink-faint)"},k=e=>e.split("-").map(a=>a.charAt(0).toUpperCase()+a.slice(1)).join(" "),q=new Set(["machine-learning","computer-vision","natural-language-processing","data-mining","robotics","computer-graphics","human-computer-interaction","web-search","signal-processing","representation-learning","reinforcement-learning","optimization-methods","large-language-models","information-retrieval","speech","mathematics"]),Q=e=>e.trim().toLowerCase().replace(/\s+/g,"-"),D=e=>Array.from(new Set((e.tags??[]).map(Q).filter(a=>q.has(a)))),F=e=>new Date(e).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}),I=(e,a)=>{if(!e)return null;const n=new Date(`${e}T00:00:00`),r=a?new Date(`${a}T00:00:00`):null,o=s=>s.toLocaleDateString("en-US",{month:"long",day:"numeric"}),i=n.getFullYear();return r&&r.getTime()!==n.getTime()?n.getMonth()===r.getMonth()?`${o(n).replace(/\d+$/,"").trim()} ${n.getDate()}–${r.getDate()}, ${i}`:`${o(n)} – ${o(r)}, ${i}`:`${o(n)}, ${i}`},M=e=>[...e.deadlines??[]].sort((a,n)=>new Date(a.deadline_at).getTime()-new Date(n.deadline_at).getTime()),T=(e,a)=>M(e).find(n=>new Date(n.deadline_at).getTime()>a)??null,L=e=>{const a=M(e);return a.length?a[a.length-1]:null},J=(e,a)=>{const n=e-a;if(n<=0)return"Deadline passed";const r=Math.floor(n/b);if(r>=1){const s=Math.floor((n-r*b)/36e5);return`in ${r}d ${s}h`}const o=Math.floor(n/(1e3*60*60));return o>=1?`in ${o}h`:`in ${Math.max(1,Math.floor(n/(1e3*60)))}m`},X=(e,a)=>{const n=e-a;if(n<=0)return"Deadline passed";const r=Math.floor(n/b),o=Math.floor(n%b/(1e3*60*60)),i=Math.floor(n%(1e3*60*60)/(1e3*60)),s=Math.floor(n%(1e3*60)/1e3);return`${r}d ${o}h ${i}m ${s}s`},_=(e,a)=>{if(e==null)return S.passed;const n=(e-a)/b;return n<=0?S.passed:n<=7?S.urgent:n<=30?S.soon:S.normal},$={fontFamily:"var(--mono)",fontSize:10,letterSpacing:"0.12em",textTransform:"uppercase",color:"var(--ink-faint)"},Z=(e,a)=>{const n=Math.ceil((e-a)/b);return n<=0?"passed":`${n} ${n===1?"day":"days"}`},R=(e,a)=>{const n=I(e.start_date,e.end_date),r=e.venue||[e.city,e.country].filter(Boolean).join(", ");return[`${a.label||a.type||"Deadline"} for ${e.name}`,n?`Dates: ${n}`:null,r?`Location: ${r}`:null,e.url?`Website: ${e.url}`:null].filter(Boolean).join(` `)},C=e=>e.toISOString().replace(/[-:]/g,"").replace(/\.\d{3}/,""),ee=(e,a)=>{const n=new Date(a.deadline_at),r=new Date(n.getTime()+60*60*1e3),o=`${e.short_name||e.name} ${a.label||a.type||"deadline"}`,i=e.venue||[e.city,e.country].filter(Boolean).join(", "),s=`https://calendar.google.com/calendar/render?action=TEMPLATE&text=${encodeURIComponent(o)}&dates=${C(n)}/${C(r)}&details=${encodeURIComponent(R(e,a))}&location=${encodeURIComponent(i)}`,m=z(s);m&&window.open(m,"_blank","noopener,noreferrer")},te=(e,a)=>{const n=new Date(a.deadline_at),r=new Date(n.getTime()+60*60*1e3),o=`${e.short_name||e.name} ${a.label||a.type||"deadline"}`,i=e.venue||[e.city,e.country].filter(Boolean).join(", "),s=["BEGIN:VCALENDAR","VERSION:2.0","BEGIN:VEVENT",e.url?`URL:${e.url}`:null,`DTSTART:${C(n)}`,`DTEND:${C(r)}`,`SUMMARY:${o}`,`DESCRIPTION:${R(e,a).replace(/\n/g,"\\n")}`,i?`LOCATION:${i}`:null,"END:VEVENT","END:VCALENDAR"].filter(Boolean).join(` `),m=new Blob([s],{type:"text/calendar;charset=utf-8"}),c=document.createElement("a");c.href=URL.createObjectURL(m),c.download=`${(e.short_name||e.name).toLowerCase().replace(/\s+/g,"-")}-deadline.ics`,document.body.appendChild(c),c.click(),document.body.removeChild(c),URL.revokeObjectURL(c.href)},ne=({conf:e,open:a,onOpenChange:n})=>{const[r,o]=x.useState(()=>Date.now());x.useEffect(()=>{if(!a)return;o(Date.now());const d=setInterval(()=>o(Date.now()),1e3);return()=>clearInterval(d)},[a]);const i=x.useMemo(()=>e?M(e):[],[e]),s=x.useMemo(()=>e?T(e,r):null,[e,r]),m=e?I(e.start_date,e.end_date):null,c=e?e.venue||[e.city,e.country].filter(Boolean).join(", ")||e.location:null,u=s?new Date(s.deadline_at).getTime():null;return t.jsx(P,{open:a,onOpenChange:n,children:t.jsx(G,{className:"max-w-xl",style:{background:"var(--bg-elevated)",maxHeight:"85vh",overflowY:"auto"},children:e&&t.jsxs(t.Fragment,{children:[t.jsxs(Y,{children:[t.jsx(H,{asChild:!0,children:t.jsx("h2",{style:{fontFamily:"var(--serif)",fontSize:26,fontWeight:500,letterSpacing:"-0.01em",margin:0},children:e.short_name?`${e.short_name} ${e.year??""}`.trim():e.name})}),e.short_name&&e.name||e.description?t.jsx(K,{asChild:!0,children:t.jsx("span",{style:{fontFamily:"var(--serif)",fontSize:14,color:"var(--ink-soft)"},children:e.short_name?e.name:e.description})}):null]}),t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:20,marginTop:4},children:[t.jsxs("div",{style:{display:"flex",flexWrap:"wrap",gap:24},children:[m&&t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:4},children:[t.jsx("span",{style:$,children:"Dates"}),t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:13,color:"var(--ink-soft)"},children:m})]}),c&&t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:4},children:[t.jsx("span",{style:$,children:"Venue"}),t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:13,color:"var(--ink-soft)"},children:c})]})]}),u!=null&&t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:4,padding:"12px 14px",borderRadius:8,background:"var(--bg-subtle)",border:"1px solid var(--hairline)"},children:[t.jsx("span",{style:$,children:"Next deadline in"}),t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:22,fontWeight:600,color:_(u,r)},children:X(u,r)})]}),t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:8},children:[t.jsx("span",{style:$,children:"Important deadlines"}),i.length===0?t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:13,color:"var(--ink-faint)"},children:"No deadlines listed"}):i.map((d,p)=>{const y=new Date(d.deadline_at).getTime(),l=s!=null&&d.deadline_at===s.deadline_at&&d.type===s.type,h=y<=r;return t.jsxs("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:12,padding:"8px 12px",borderRadius:6,background:l?"var(--accent-soft)":"transparent",border:l?"1px solid var(--hairline-strong)":"1px solid var(--hairline)",opacity:h&&!l?.55:1},children:[t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:2},children:[t.jsxs("span",{style:{fontFamily:"var(--mono)",fontSize:13,color:"var(--ink)",fontWeight:l?600:400},children:[d.label||k(d.type||"deadline"),l&&t.jsx("span",{style:{...$,marginLeft:8},children:"Next"})]}),t.jsxs("span",{style:{fontFamily:"var(--mono)",fontSize:12,color:"var(--ink-faint)"},children:[F(d.deadline_at),d.timezone?` · ${d.timezone}`:""]})]}),t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:12,fontWeight:600,whiteSpace:"nowrap",color:_(h?null:y,r)},children:Z(y,r)})]},`${d.type??"deadline"}-${p}`)})]}),D(e).length>0&&t.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:6},children:D(e).map(d=>t.jsx("span",{className:"tag-chip",style:{background:"var(--bg-subtle)",color:"var(--ink-soft)"},children:k(d)},d))}),t.jsxs("div",{style:{display:"flex",flexWrap:"wrap",alignItems:"center",gap:16,paddingTop:12,borderTop:"1px solid var(--hairline)"},children:[e.url&&t.jsx("a",{href:z(e.url)??void 0,target:"_blank",rel:"noopener noreferrer",style:{fontFamily:"var(--mono)",fontSize:12,color:"var(--accent-text)"},children:"Visit website ↗"}),s&&t.jsxs("div",{style:{display:"flex",gap:12,marginLeft:"auto"},children:[t.jsx("button",{type:"button",className:"tag-chip",onClick:()=>ee(e,s),style:{background:"var(--bg-subtle)",color:"var(--ink-soft)"},children:"+ Google Calendar"}),t.jsx("button",{type:"button",className:"tag-chip",onClick:()=>te(e,s),style:{background:"var(--bg-subtle)",color:"var(--ink-soft)"},children:"+ Apple / .ics"})]})]})]})]})})})},E=({id:e,label:a,checked:n,onChange:r})=>t.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,fontFamily:"var(--mono)",fontSize:12,color:"var(--ink-soft)"},children:[t.jsx(U,{id:e,checked:n,onCheckedChange:r}),t.jsx("label",{htmlFor:e,style:{cursor:"pointer"},children:a})]}),ae=({conf:e,now:a,selectedDomains:n,onToggleDomain:r,onOpen:o})=>{const i=T(e,a),s=i??L(e),m=s?new Date(s.deadline_at).getTime():null,c=_(i?m:null,a),u=I(e.start_date,e.end_date),d=[e.city??null,e.country??null].filter(Boolean).join(", ");return t.jsxs("div",{role:"button",tabIndex:0,onClick:()=>o(e),onKeyDown:p=>{(p.key==="Enter"||p.key===" ")&&(p.preventDefault(),o(e))},style:{border:"1px solid var(--hairline)",borderRadius:8,padding:20,background:"var(--bg-elevated)",display:"flex",flexDirection:"column",gap:12,cursor:"pointer"},children:[t.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"baseline",gap:12},children:[t.jsx("h3",{style:{fontFamily:"var(--serif)",fontSize:20,fontWeight:500,letterSpacing:"-0.01em",margin:0},children:e.short_name?`${e.short_name} ${e.year??""}`.trim():e.name}),e.url&&t.jsx("a",{href:z(e.url)??void 0,target:"_blank",rel:"noopener noreferrer",onClick:p=>p.stopPropagation(),style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--accent-text)",whiteSpace:"nowrap"},children:"website ↗"})]}),t.jsxs("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:12,paddingBottom:12,borderBottom:"1px solid var(--hairline)"},children:[t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:2},children:[t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)"},children:(s==null?void 0:s.label)||(s==null?void 0:s.type)||"Deadline"}),t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:12,color:"var(--ink-soft)"},children:s?`${F(s.deadline_at)}${s.timezone?` · ${s.timezone}`:""}`:"TBD"})]}),t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:14,fontWeight:600,color:c,whiteSpace:"nowrap"},children:m!=null?J(m,a):"TBD"})]}),t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:4,fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)"},children:[u&&t.jsx("span",{children:u}),d&&t.jsx("span",{children:d})]}),D(e).length>0&&t.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:6},children:D(e).map(p=>{const y=n.has(p);return t.jsx("button",{className:"tag-chip",onClick:l=>{l.stopPropagation(),r(p)},style:{background:y?"var(--ink)":"var(--bg-subtle)",color:y?"var(--bg)":"var(--ink-soft)"},children:k(p)},p)})})]})},ue=()=>{const[e,a]=x.useState(!0),[n,r]=x.useState(!1),[o,i]=x.useState(new Set),[s,m]=x.useState(null),c=x.useMemo(()=>Date.now(),[]),u=A({queryKey:["conference-deadlines"],queryFn:()=>B.conferenceDeadlines(),staleTime:10*60*1e3}),d=l=>{i(h=>{const g=new Set(h);return g.has(l)?g.delete(l):g.add(l),g})},p=x.useMemo(()=>{var h;const l=new Map;return(h=u.data)==null||h.results.forEach(g=>{D(g).forEach(j=>l.set(j,(l.get(j)??0)+1))}),Array.from(l.entries()).sort((g,j)=>j[1]-g[1]).map(([g])=>g)},[u.data]),y=x.useMemo(()=>{var j;const h=(((j=u.data)==null?void 0:j.results)??[]).filter(f=>!(e&&f.tier!=="a"||o.size>0&&!D(f).some(v=>o.has(v))||!n&&!T(f,c))),g=f=>{const w=T(f,c);if(w)return{group:0,time:new Date(w.deadline_at).getTime()};const v=L(f);return{group:1,time:-(v?new Date(v.deadline_at).getTime():0)}};return[...h].sort((f,w)=>{const v=g(f),N=g(w);return v.group!==N.group?v.group-N.group:v.time-N.time})},[u.data,e,n,o,c]);return u.error?t.jsx("div",{className:"page",children:t.jsx(O,{variant:"destructive",children:t.jsx(V,{children:"Failed to load conference deadlines. Please try again."})})}):t.jsxs("div",{className:"page",children:[t.jsx("div",{className:"feed-header",children:t.jsxs("div",{children:[t.jsxs("h1",{className:"feed-title",children:["AI Conference ",t.jsx("em",{children:"Deadlines"})]}),t.jsx("div",{className:"feed-subtitle",children:"Upcoming submission deadlines for major AI conferences, counting down."})]})}),t.jsxs("div",{style:{display:"flex",flexWrap:"wrap",alignItems:"center",gap:20,padding:"16px 0",borderBottom:"1px solid var(--hairline)",marginBottom:24},children:[t.jsx(E,{id:"top-tier-only",label:"Top tier only",checked:e,onChange:a}),t.jsx(E,{id:"show-past",label:"Show past conferences",checked:n,onChange:r})]}),p.length>0&&t.jsxs("div",{style:{display:"flex",flexWrap:"wrap",gap:6,marginBottom:24},children:[p.map(l=>{const h=o.has(l);return t.jsx("button",{className:"tag-chip",onClick:()=>d(l),style:{background:h?"var(--ink)":"var(--bg-subtle)",color:h?"var(--bg)":"var(--ink-soft)"},children:k(l)},l)}),o.size>0&&t.jsx("button",{className:"tag-chip",onClick:()=>i(new Set),style:{background:"transparent",color:"var(--ink-faint)"},children:"Clear ✕"})]}),t.jsx("div",{className:"sort-bar",children:t.jsx("div",{className:"results-count",children:u.isLoading?"…":`${y.length} conferences`})}),u.isLoading?t.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(320px, 1fr))",gap:16},children:Array.from({length:6}).map((l,h)=>t.jsx(W,{className:"h-44"},h))}):y.length===0?t.jsxs("div",{className:"no-results",children:["No conferences match these filters",n?".":" — try enabling “Show past conferences”."]}):t.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(320px, 1fr))",gap:16},children:y.map(l=>t.jsx(ae,{conf:l,now:c,selectedDomains:o,onToggleDomain:d,onOpen:m},l.id))}),t.jsx(ne,{conf:s,open:s!==null,onOpenChange:l=>{l||m(null)}})]})};export{ue as default}; diff --git a/assets/ApiDocsView-CTgUj-zh.js b/assets/ApiDocsView-BHw_NlA8.js similarity index 98% rename from assets/ApiDocsView-CTgUj-zh.js rename to assets/ApiDocsView-BHw_NlA8.js index 4b6a62a35b308815f9907d8df7eefabed05e1eba..c8f455be3ba43148672d52408c5ace3baeaa87a3 100644 --- a/assets/ApiDocsView-CTgUj-zh.js +++ b/assets/ApiDocsView-BHw_NlA8.js @@ -1,4 +1,4 @@ -import{a4 as m,r as o,j as e}from"./index-CkeK0cDg.js";import{u as f}from"./useQuery-_Fj6Jfzr.js";import{M as g}from"./index-B1_S53Hb.js";const y={queryKey:["public-api-schema"],queryFn:()=>m("/openapi.json",{credentials:"omit"}),staleTime:5*60*1e3};function b(s,r){const n=new URLSearchParams;for(const[a,t]of Object.entries(r["x-example-parameters"]))s.includes(`{${a}}`)?s=s.replace(`{${a}}`,encodeURIComponent(String(t))):n.append(a,String(t));return`https://paperswithcode.co${s}${n.size?`?${n}`:""}`}function w(s,r){return r==="Python"?`import requests +import{a4 as m,r as o,j as e}from"./index-B7UoLEbn.js";import{u as f}from"./useQuery-DV2f4JpC.js";import{M as g}from"./index-tHVWANW1.js";const y={queryKey:["public-api-schema"],queryFn:()=>m("/openapi.json",{credentials:"omit"}),staleTime:5*60*1e3};function b(s,r){const n=new URLSearchParams;for(const[a,t]of Object.entries(r["x-example-parameters"]))s.includes(`{${a}}`)?s=s.replace(`{${a}}`,encodeURIComponent(String(t))):n.append(a,String(t));return`https://paperswithcode.co${s}${n.size?`?${n}`:""}`}function w(s,r){return r==="Python"?`import requests response = requests.get(${JSON.stringify(s)}, timeout=30) response.raise_for_status() diff --git a/assets/ArtifactWorkspace-CRRWXbww.js b/assets/ArtifactWorkspace-B1pVTYNC.js similarity index 99% rename from assets/ArtifactWorkspace-CRRWXbww.js rename to assets/ArtifactWorkspace-B1pVTYNC.js index b802575618bec7de5b192724dd13ca9dbbedcd96..65b3c30657868b382b4ebd873c9062229932a0b8 100644 --- a/assets/ArtifactWorkspace-CRRWXbww.js +++ b/assets/ArtifactWorkspace-B1pVTYNC.js @@ -1,4 +1,4 @@ -var QN=Object.defineProperty;var Qk=n=>{throw TypeError(n)};var eL=(n,e,t)=>e in n?QN(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var re=(n,e,t)=>eL(n,typeof e!="symbol"?e+"":e,t),B0=(n,e,t)=>e.has(n)||Qk("Cannot "+t);var f=(n,e,t)=>(B0(n,e,"read from private field"),t?t.call(n):e.get(n)),R=(n,e,t)=>e.has(n)?Qk("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(n):e.set(n,t),C=(n,e,t,s)=>(B0(n,e,"write to private field"),s?s.call(n,t):e.set(n,t),t),T=(n,e,t)=>(B0(n,e,"access private method"),t);var ps=(n,e,t,s)=>({set _(i){C(n,e,i,t)},get _(){return f(n,e,s)}});import{g as Da,r as K,j as S,F as ee,L as jv,V as tL,Z as L_,K as rn,_ as sm,$ as Zy,X as D_,a0 as nL,m as CC,l as sL}from"./index-CkeK0cDg.js";import{u as $C,P as TC,b as PC,M as iL,R as rL,W as oL,d as F_,A as aL,l as lL,K as cL,L as hL,N as uL,O as RC,Q as dL}from"./chatLaunch-NPBTDHUP.js";/* empty css */import{H as Cp,a as $p,b as Tp}from"./hover-card-CAN3Vtea.js";import{u as wo}from"./useQuery-_Fj6Jfzr.js";import{f as fL,p as pL,T as mL}from"./github-BxRJHxJc.js";import{G as Xy}from"./github-DHpXYWrC.js";import{c as U0}from"./catalog-DGg7xZLW.js";import{r as gL,a as yL,P as j_,c as vL}from"./PaperPreviewLink-CQ27hqZy.js";import{M as bL,d as wL}from"./index-B1_S53Hb.js";import{r as _L}from"./index-DqQiSNg1.js";import{c as eA}from"./chat-Cvg-XEh-.js";import{C as SL}from"./copy-BEe19JmS.js";import{F as kL}from"./file-text-2FXER-SZ.js";import{u as im}from"./useMutation-q-fdM2fm.js";import{E as MC}from"./external-link-E5LiqyOi.js";/** +var QN=Object.defineProperty;var Qk=n=>{throw TypeError(n)};var eL=(n,e,t)=>e in n?QN(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var re=(n,e,t)=>eL(n,typeof e!="symbol"?e+"":e,t),B0=(n,e,t)=>e.has(n)||Qk("Cannot "+t);var f=(n,e,t)=>(B0(n,e,"read from private field"),t?t.call(n):e.get(n)),R=(n,e,t)=>e.has(n)?Qk("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(n):e.set(n,t),C=(n,e,t,s)=>(B0(n,e,"write to private field"),s?s.call(n,t):e.set(n,t),t),T=(n,e,t)=>(B0(n,e,"access private method"),t);var ps=(n,e,t,s)=>({set _(i){C(n,e,i,t)},get _(){return f(n,e,s)}});import{g as Da,r as K,j as S,F as ee,L as jv,V as tL,Z as L_,K as rn,_ as sm,$ as Zy,X as D_,a0 as nL,m as CC,l as sL}from"./index-B7UoLEbn.js";import{u as $C,P as TC,b as PC,M as iL,R as rL,W as oL,d as F_,A as aL,l as lL,K as cL,L as hL,N as uL,O as RC,Q as dL}from"./chatLaunch-BG1GqDpR.js";/* empty css */import{H as Cp,a as $p,b as Tp}from"./hover-card-BM8a6wEE.js";import{u as wo}from"./useQuery-DV2f4JpC.js";import{f as fL,p as pL,T as mL}from"./github-uiOp6-cP.js";import{G as Xy}from"./github-CVI7-Ls5.js";import{c as U0}from"./catalog-DcbS_7_L.js";import{r as gL,a as yL,P as j_,c as vL}from"./PaperPreviewLink-C5ianbW8.js";import{M as bL,d as wL}from"./index-tHVWANW1.js";import{r as _L}from"./index-ClEBI70O.js";import{c as eA}from"./chat-B6IGPjTl.js";import{C as SL}from"./copy-B2Q-ksVe.js";import{F as kL}from"./file-text-CXhRvAOE.js";import{u as im}from"./useMutation-CuaM6sOT.js";import{E as MC}from"./external-link-mpf7SsAF.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/AstraForRoboticsView-D_kBWqyr.js b/assets/AstraForRoboticsView-Ddft2N0b.js similarity index 92% rename from assets/AstraForRoboticsView-D_kBWqyr.js rename to assets/AstraForRoboticsView-Ddft2N0b.js index 7b6841005cecacb80bb7cc14319e5388d2417cb8..b441b7ce2646608898efdae83485a8a97942f0db 100644 --- a/assets/AstraForRoboticsView-D_kBWqyr.js +++ b/assets/AstraForRoboticsView-Ddft2N0b.js @@ -1 +1 @@ -import{d as v,r as h,j as a,L as n}from"./index-CkeK0cDg.js";import{P as N}from"./components-BRrDI9KS.js";import{P}from"./PaperFeedFilters-D-Ie3cDx.js";import{A as k,a as A}from"./alert-Vt5eE6re.js";import{S as w}from"./skeleton-Cs8haT1C.js";import{u as S}from"./useIntersectionObserver-Bw5JPCeX.js";import{u as R}from"./usePapers-fMOiVOFB.js";import{f as L,D as T}from"./latexPlainText-DI8YEXVe.js";import{t as F}from"./colors-DQ-VN9If.js";import"./paperQueryKeys-BP2E-0yf.js";import"./LatexTitle-DPYNzv63.js";import"./papers-Celoj8_s.js";import"./safeExternalHref-CkBrsh84.js";import"./useQuery-_Fj6Jfzr.js";import"./useInfiniteQuery-gdIFpXB_.js";const f="robotics",b="gpt-6-astra",I="https://x.com/YuXiang_IRVL/status/2100395131924840570",C=[["trending","trending"],["date_published","newest"],["citation_count","most cited"]],O=[{handle:"Frame_Robotics",author:"Frame Robotics",summary:"Real-arm control that fixes grip angle and carry height on the next try after a miss.",url:"https://x.com/Frame_Robotics/status/2099900836273090614"},{handle:"qineng_wang",author:"Qineng Wang",summary:"Dual-ALOHA spatial-constraint puzzles: unlocking interlocked parts and threading a rope through three rings.",url:"https://x.com/qineng_wang/status/2099893504658866561"},{handle:"__Rhodium__",author:"Lucas",summary:"In-context learning of the controls and the workspace, reaching the task goal in three tries.",url:"https://x.com/__Rhodium__/status/2099521054678925534"},{handle:"SuveenE",author:"Suveen Ellawela",summary:"Picking up a pipette and fitting a 5 mm tip on a MolmoAct2 real-world eval, using the free hand for a better view.",url:"https://x.com/SuveenE/status/2099448450341605672"},{handle:"cdngdev",author:"thijs",summary:"A robot arm with a paintbrush painting the Golden Gate Bridge, improving across attempts from camera feedback.",url:"https://x.com/cdngdev/status/2097339677128982873"},{handle:"IsaacSin12",author:"Isaac Sin",summary:"Zero-shot sorting of irregularly shaped blocks into cups by color.",url:"https://x.com/IsaacSin12/status/2096715382166098302"},{handle:"chooi_jeq",author:"Jay Chooi",summary:"Robocurve's robot-control comparison: 95% task completion versus 40% for Fable 5.1 at lower cost.",url:"https://x.com/chooi_jeq/status/2096064315115839904"}],G=[{handle:"Lingjun_Mao",author:"Lingjun Mao",summary:"Adapting to a new embodiment to put a cake into an air fryer through CuRobo motion-planning tool APIs.",url:"https://x.com/Lingjun_Mao/status/2100294902672462176"},{handle:"walterzhu8",author:"Wentao Zhu",summary:"A day-and-a-half autonomous run that builds and trains pen spinning on a Sharpa hand in Isaac Lab.",url:"https://x.com/walterzhu8/status/2100212420840989112"},{handle:"mishig25",author:"Mishig",summary:"Painting the Eiffel Tower in MuJoCo with an SO-101 and a brush, with the full experiment shared on Hugging Face.",url:"https://x.com/mishig25/status/2099611674793668676"},{handle:"RunpeiDong",author:"Runpei Dong",summary:"Getting a humanoid into a Tesla in MuJoCo: learning from feedback, then reusing that experience with egocentric perception.",url:"https://x.com/RunpeiDong/status/2099604536327614717"},{handle:"frankzydou",author:"Zhiyang (Frank) Dou",summary:"A LeRobot SO-101 real-world pickup from a third-person RGB camera, where the arm has to bend back to reach the pen.",url:"https://x.com/frankzydou/status/2099338127915512297"},{handle:"Parvkpr",author:"Parv Kapoor",summary:"Real-to-sim: building an interactive simulation environment from a single image or video.",url:"https://x.com/Parvkpr/status/2098847963867238597"},{handle:"z_code68632",author:"code_z",summary:"One demo per task: unscrewing a bottle cap, inserting a plug, clearing obstacles, and imitating a dance on a real robot.",url:"https://x.com/z_code68632/status/2098397364725895387"}],j=({posts:s,label:i})=>a.jsxs("div",{className:"astra-posts",children:[a.jsx("div",{className:"astra-posts-label",children:i}),a.jsx("ul",{children:s.map(o=>a.jsxs("li",{children:[a.jsxs("a",{href:o.url,target:"_blank",rel:"noreferrer",children:["@",o.handle]}),a.jsxs("span",{className:"astra-post-author",children:[" ",o.author]}),a.jsxs("span",{className:"astra-post-summary",children:[" — ",o.summary]})]},o.url))})]}),E=s=>s==="date_published"||s==="citation_count"?s:"trending",W=()=>{var g,x;const[s,i]=v(),o=E(s.get("order_by")),d=s.get("has_code")==="true",m=s.get("has_hf_artifacts")==="true",t=R({task:f,method:b,page_size:12,order_by:o,order_dir:"desc",include_resources:!0,has_code:d,has_hf_artifacts:m}),{targetRef:_,isIntersecting:u}=S({rootMargin:"200px"});h.useEffect(()=>(document.title=L("GPT-6 Astra for Robotics"),()=>{document.title=T}),[]),h.useEffect(()=>{u&&t.hasNextPage&&!t.isFetchingNextPage&&t.fetchNextPage()},[u,t.hasNextPage,t.isFetchingNextPage]);const p=h.useMemo(()=>{var e;return(((e=t.data)==null?void 0:e.pages)??[]).flatMap(r=>r.results.map(F))},[t.data]),y=((x=(g=t.data)==null?void 0:g.pages[0])==null?void 0:x.count)??0,c=(e,r)=>{const l=new URLSearchParams(s);r===null?l.delete(e):l.set(e,r),i(l)};return a.jsxs("div",{className:"page",children:[a.jsxs("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:[a.jsx(n,{to:"/",children:"Home"}),a.jsx("span",{children:" / "}),a.jsx("span",{children:"GPT-6 Astra for Robotics"})]}),a.jsx("header",{className:"feed-header",children:a.jsxs("div",{children:[a.jsx("div",{className:"astra-eyebrow",children:"Collection"}),a.jsxs("h1",{className:"feed-title",children:["GPT-6 Astra ",a.jsx("em",{children:"for Robotics"})]}),a.jsx("div",{className:"feed-subtitle",children:"Papers, technical reports, and evaluations that put OpenAI’s frontier model in control of real and simulated robots."}),a.jsxs("p",{className:"astra-lede",children:["The GPT-6 Astra launch never mentioned robots, yet within days the model was driving arms, hands, and humanoids. As"," ",a.jsx("a",{href:I,target:"_blank",rel:"noreferrer",children:"Yu Xiang"})," ","framed it, the work splits into two families: Astra acting as the robot policy itself, and Astra acting as an agent that orchestrates everything else."]})]})}),a.jsxs("section",{className:"astra-approaches","aria-label":"How GPT-6 Astra is used for robots",children:[a.jsxs("article",{className:"astra-approach",children:[a.jsx("div",{className:"astra-approach-num",children:"01 / Robot policy"}),a.jsx("h2",{children:"Astra as the policy, like a VLA"}),a.jsx("p",{children:"The model looks at camera frames and robot state and directly emits actions: end-effector poses, joint targets, or gripper commands, closing the control loop step by step with no task-specific training."}),a.jsx(j,{posts:O,label:"Seen on X"})]}),a.jsxs("article",{className:"astra-approach",children:[a.jsx("div",{className:"astra-approach-num",children:"02 / Agent"}),a.jsx("h2",{children:"Astra as the agent"}),a.jsx("p",{children:"The model reasons about the scene, writes and runs code, calls planners and tools, or delegates low-level motion to pretrained policies such as VLAs, and keeps the robot on task over long horizons."}),a.jsx(j,{posts:G,label:"Seen on X"})]})]}),a.jsxs("p",{className:"astra-note",children:["Listing is automatic: any paper tagged with both the"," ",a.jsx(n,{to:`/tasks/${f}`,children:"Robotics"})," task and the"," ",a.jsx(n,{to:`/methods/${b}`,children:"GPT-6 Astra"})," method appears here. Missing a report or preprint?"," ",a.jsx(n,{to:"/submit",children:"Submit it"}),"."]}),a.jsxs("div",{className:"task-section-head",style:{marginTop:36},children:[a.jsx("div",{className:"task-section-eyebrow",children:"Top trending · sort below"}),a.jsxs("div",{className:"task-section-title",children:["Papers ",a.jsxs("span",{className:"meta",children:["[",y.toLocaleString(),"]"]})]})]}),a.jsx("div",{className:"sort-bar",children:a.jsxs("div",{className:"paper-feed-toolbar-controls",children:[a.jsx("div",{className:"sort-options",children:C.map(([e,r])=>a.jsx("button",{type:"button",className:`sort-btn ${o===e?"active":""}`,onClick:()=>c("order_by",e==="trending"?null:e),children:r},e))}),a.jsx(P,{hasCode:d,hasHfArtifacts:m,onHasCodeChange:e=>c("has_code",e?"true":null),onHasHfArtifactsChange:e=>c("has_hf_artifacts",e?"true":null)})]})}),t.error?a.jsx(k,{variant:"destructive",children:a.jsx(A,{children:"Failed to load the collection. Please try again."})}):t.isLoading?a.jsx("div",{className:"paper-list",children:Array.from({length:3}).map((e,r)=>a.jsx(w,{className:"h-40 w-full"},r))}):p.length===0?a.jsx("div",{className:"no-results",children:"No papers match this selection yet."}):a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"paper-list",children:p.map((e,r)=>a.jsx(N,{paper:e,rank:r+1},e.id))}),a.jsx("div",{ref:_,style:{height:1}}),t.isFetchingNextPage&&a.jsx("div",{style:{padding:"20px 0",textAlign:"center",color:"var(--ink-faint)"},children:"Loading more…"})]})]})};export{W as default}; +import{d as v,r as h,j as a,L as n}from"./index-B7UoLEbn.js";import{P as N}from"./components-Cax1Inob.js";import{P}from"./PaperFeedFilters-CF3OKsFW.js";import{A as k,a as A}from"./alert-B3UHHG00.js";import{S as w}from"./skeleton-DLsINbKq.js";import{u as S}from"./useIntersectionObserver-DOCspj7m.js";import{u as R}from"./usePapers-CDuTKuAc.js";import{f as L,D as T}from"./latexPlainText-DI8YEXVe.js";import{t as F}from"./colors-COYRNy-F.js";import"./paperQueryKeys-BP2E-0yf.js";import"./LatexTitle-CeC5Gqpu.js";import"./papers-Ctf2uv0o.js";import"./safeExternalHref-CkBrsh84.js";import"./useQuery-DV2f4JpC.js";import"./useInfiniteQuery-CoFrg4GN.js";const f="robotics",b="gpt-6-astra",I="https://x.com/YuXiang_IRVL/status/2100395131924840570",C=[["trending","trending"],["date_published","newest"],["citation_count","most cited"]],O=[{handle:"Frame_Robotics",author:"Frame Robotics",summary:"Real-arm control that fixes grip angle and carry height on the next try after a miss.",url:"https://x.com/Frame_Robotics/status/2099900836273090614"},{handle:"qineng_wang",author:"Qineng Wang",summary:"Dual-ALOHA spatial-constraint puzzles: unlocking interlocked parts and threading a rope through three rings.",url:"https://x.com/qineng_wang/status/2099893504658866561"},{handle:"__Rhodium__",author:"Lucas",summary:"In-context learning of the controls and the workspace, reaching the task goal in three tries.",url:"https://x.com/__Rhodium__/status/2099521054678925534"},{handle:"SuveenE",author:"Suveen Ellawela",summary:"Picking up a pipette and fitting a 5 mm tip on a MolmoAct2 real-world eval, using the free hand for a better view.",url:"https://x.com/SuveenE/status/2099448450341605672"},{handle:"cdngdev",author:"thijs",summary:"A robot arm with a paintbrush painting the Golden Gate Bridge, improving across attempts from camera feedback.",url:"https://x.com/cdngdev/status/2097339677128982873"},{handle:"IsaacSin12",author:"Isaac Sin",summary:"Zero-shot sorting of irregularly shaped blocks into cups by color.",url:"https://x.com/IsaacSin12/status/2096715382166098302"},{handle:"chooi_jeq",author:"Jay Chooi",summary:"Robocurve's robot-control comparison: 95% task completion versus 40% for Fable 5.1 at lower cost.",url:"https://x.com/chooi_jeq/status/2096064315115839904"}],G=[{handle:"Lingjun_Mao",author:"Lingjun Mao",summary:"Adapting to a new embodiment to put a cake into an air fryer through CuRobo motion-planning tool APIs.",url:"https://x.com/Lingjun_Mao/status/2100294902672462176"},{handle:"walterzhu8",author:"Wentao Zhu",summary:"A day-and-a-half autonomous run that builds and trains pen spinning on a Sharpa hand in Isaac Lab.",url:"https://x.com/walterzhu8/status/2100212420840989112"},{handle:"mishig25",author:"Mishig",summary:"Painting the Eiffel Tower in MuJoCo with an SO-101 and a brush, with the full experiment shared on Hugging Face.",url:"https://x.com/mishig25/status/2099611674793668676"},{handle:"RunpeiDong",author:"Runpei Dong",summary:"Getting a humanoid into a Tesla in MuJoCo: learning from feedback, then reusing that experience with egocentric perception.",url:"https://x.com/RunpeiDong/status/2099604536327614717"},{handle:"frankzydou",author:"Zhiyang (Frank) Dou",summary:"A LeRobot SO-101 real-world pickup from a third-person RGB camera, where the arm has to bend back to reach the pen.",url:"https://x.com/frankzydou/status/2099338127915512297"},{handle:"Parvkpr",author:"Parv Kapoor",summary:"Real-to-sim: building an interactive simulation environment from a single image or video.",url:"https://x.com/Parvkpr/status/2098847963867238597"},{handle:"z_code68632",author:"code_z",summary:"One demo per task: unscrewing a bottle cap, inserting a plug, clearing obstacles, and imitating a dance on a real robot.",url:"https://x.com/z_code68632/status/2098397364725895387"}],j=({posts:s,label:i})=>a.jsxs("div",{className:"astra-posts",children:[a.jsx("div",{className:"astra-posts-label",children:i}),a.jsx("ul",{children:s.map(o=>a.jsxs("li",{children:[a.jsxs("a",{href:o.url,target:"_blank",rel:"noreferrer",children:["@",o.handle]}),a.jsxs("span",{className:"astra-post-author",children:[" ",o.author]}),a.jsxs("span",{className:"astra-post-summary",children:[" — ",o.summary]})]},o.url))})]}),E=s=>s==="date_published"||s==="citation_count"?s:"trending",W=()=>{var g,x;const[s,i]=v(),o=E(s.get("order_by")),d=s.get("has_code")==="true",m=s.get("has_hf_artifacts")==="true",t=R({task:f,method:b,page_size:12,order_by:o,order_dir:"desc",include_resources:!0,has_code:d,has_hf_artifacts:m}),{targetRef:_,isIntersecting:u}=S({rootMargin:"200px"});h.useEffect(()=>(document.title=L("GPT-6 Astra for Robotics"),()=>{document.title=T}),[]),h.useEffect(()=>{u&&t.hasNextPage&&!t.isFetchingNextPage&&t.fetchNextPage()},[u,t.hasNextPage,t.isFetchingNextPage]);const p=h.useMemo(()=>{var e;return(((e=t.data)==null?void 0:e.pages)??[]).flatMap(r=>r.results.map(F))},[t.data]),y=((x=(g=t.data)==null?void 0:g.pages[0])==null?void 0:x.count)??0,c=(e,r)=>{const l=new URLSearchParams(s);r===null?l.delete(e):l.set(e,r),i(l)};return a.jsxs("div",{className:"page",children:[a.jsxs("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:[a.jsx(n,{to:"/",children:"Home"}),a.jsx("span",{children:" / "}),a.jsx("span",{children:"GPT-6 Astra for Robotics"})]}),a.jsx("header",{className:"feed-header",children:a.jsxs("div",{children:[a.jsx("div",{className:"astra-eyebrow",children:"Collection"}),a.jsxs("h1",{className:"feed-title",children:["GPT-6 Astra ",a.jsx("em",{children:"for Robotics"})]}),a.jsx("div",{className:"feed-subtitle",children:"Papers, technical reports, and evaluations that put OpenAI’s frontier model in control of real and simulated robots."}),a.jsxs("p",{className:"astra-lede",children:["The GPT-6 Astra launch never mentioned robots, yet within days the model was driving arms, hands, and humanoids. As"," ",a.jsx("a",{href:I,target:"_blank",rel:"noreferrer",children:"Yu Xiang"})," ","framed it, the work splits into two families: Astra acting as the robot policy itself, and Astra acting as an agent that orchestrates everything else."]})]})}),a.jsxs("section",{className:"astra-approaches","aria-label":"How GPT-6 Astra is used for robots",children:[a.jsxs("article",{className:"astra-approach",children:[a.jsx("div",{className:"astra-approach-num",children:"01 / Robot policy"}),a.jsx("h2",{children:"Astra as the policy, like a VLA"}),a.jsx("p",{children:"The model looks at camera frames and robot state and directly emits actions: end-effector poses, joint targets, or gripper commands, closing the control loop step by step with no task-specific training."}),a.jsx(j,{posts:O,label:"Seen on X"})]}),a.jsxs("article",{className:"astra-approach",children:[a.jsx("div",{className:"astra-approach-num",children:"02 / Agent"}),a.jsx("h2",{children:"Astra as the agent"}),a.jsx("p",{children:"The model reasons about the scene, writes and runs code, calls planners and tools, or delegates low-level motion to pretrained policies such as VLAs, and keeps the robot on task over long horizons."}),a.jsx(j,{posts:G,label:"Seen on X"})]})]}),a.jsxs("p",{className:"astra-note",children:["Listing is automatic: any paper tagged with both the"," ",a.jsx(n,{to:`/tasks/${f}`,children:"Robotics"})," task and the"," ",a.jsx(n,{to:`/methods/${b}`,children:"GPT-6 Astra"})," method appears here. Missing a report or preprint?"," ",a.jsx(n,{to:"/submit",children:"Submit it"}),"."]}),a.jsxs("div",{className:"task-section-head",style:{marginTop:36},children:[a.jsx("div",{className:"task-section-eyebrow",children:"Top trending · sort below"}),a.jsxs("div",{className:"task-section-title",children:["Papers ",a.jsxs("span",{className:"meta",children:["[",y.toLocaleString(),"]"]})]})]}),a.jsx("div",{className:"sort-bar",children:a.jsxs("div",{className:"paper-feed-toolbar-controls",children:[a.jsx("div",{className:"sort-options",children:C.map(([e,r])=>a.jsx("button",{type:"button",className:`sort-btn ${o===e?"active":""}`,onClick:()=>c("order_by",e==="trending"?null:e),children:r},e))}),a.jsx(P,{hasCode:d,hasHfArtifacts:m,onHasCodeChange:e=>c("has_code",e?"true":null),onHasHfArtifactsChange:e=>c("has_hf_artifacts",e?"true":null)})]})}),t.error?a.jsx(k,{variant:"destructive",children:a.jsx(A,{children:"Failed to load the collection. Please try again."})}):t.isLoading?a.jsx("div",{className:"paper-list",children:Array.from({length:3}).map((e,r)=>a.jsx(w,{className:"h-40 w-full"},r))}):p.length===0?a.jsx("div",{className:"no-results",children:"No papers match this selection yet."}):a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"paper-list",children:p.map((e,r)=>a.jsx(N,{paper:e,rank:r+1},e.id))}),a.jsx("div",{ref:_,style:{height:1}}),t.isFetchingNextPage&&a.jsx("div",{style:{padding:"20px 0",textAlign:"center",color:"var(--ink-faint)"},children:"Loading more…"})]})]})};export{W as default}; diff --git a/assets/AuthorDetailView-D5GOZaKX.js b/assets/AuthorDetailView-BwAC3iti.js similarity index 79% rename from assets/AuthorDetailView-D5GOZaKX.js rename to assets/AuthorDetailView-BwAC3iti.js index 5c349eae77ea7864f15ddd652a452d71cd73e76b..2dc2b36495f46a05dca0b8176269dac82a1748fe 100644 --- a/assets/AuthorDetailView-D5GOZaKX.js +++ b/assets/AuthorDetailView-BwAC3iti.js @@ -1 +1 @@ -import{u as C,j as e,d as R,r as v,L as S}from"./index-CkeK0cDg.js";import{u as w}from"./useQuery-_Fj6Jfzr.js";import{A as H,P as k}from"./components-BRrDI9KS.js";import{a as L,P as O,b as B}from"./PaperDateFilter-qc_JVYg0.js";import{P as I}from"./PaperFeedFilters-D-Ie3cDx.js";import{R as T}from"./ResearchFollowButton-Dpqj0_yd.js";import{A as $,a as E}from"./alert-Vt5eE6re.js";import{S as y}from"./skeleton-Cs8haT1C.js";import{u as M}from"./useIntersectionObserver-Bw5JPCeX.js";import{u as q}from"./usePapers-fMOiVOFB.js";import{p as z}from"./papers-Celoj8_s.js";import{t as U}from"./colors-DQ-VN9If.js";import A from"./NotFound-3C_Rmvq0.js";import"./paperQueryKeys-BP2E-0yf.js";import"./LatexTitle-DPYNzv63.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-Vq6DwYpn.js";import"./useMutation-q-fdM2fm.js";import"./research-BfGol3BN.js";import"./plus-BaTMbqcZ.js";import"./useInfiniteQuery-gdIFpXB_.js";const K=[["trending","trending"],["date_published","newest"],["citation_count","most cited"]],Q=s=>s==="date_published"||s==="citation_count"?s:"trending",V=({authorId:s})=>{var f,x,j,_,N,b,P;const[o,h]=R(),p=Q(o.get("order_by")),m=o.get("has_code")==="true",u=o.get("has_hf_artifacts")==="true",i=L(o),t=w({queryKey:["author",s],queryFn:()=>z.getAuthor(s)}),r=q({author:s,page_size:12,order_by:p,order_dir:"desc",include_resources:!0,has_code:m,has_hf_artifacts:u,start_date:i.startDate,end_date:i.endDate}),{targetRef:F,isIntersecting:g}=M({rootMargin:"200px"}),c=v.useMemo(()=>{var a;return(((a=r.data)==null?void 0:a.pages)??[]).flatMap(n=>n.results.map(U))},[r.data]);v.useEffect(()=>{g&&r.hasNextPage&&!r.isFetchingNextPage&&r.fetchNextPage()},[g,r.hasNextPage,r.isFetchingNextPage,c.length]);const D=((x=(f=r.data)==null?void 0:f.pages[0])==null?void 0:x.count)??0,d=(a,n)=>{const l=new URLSearchParams(o);n?l.set(a,n):l.delete(a),h(l)};return((j=t.error)==null?void 0:j.status)===404?e.jsx(A,{}):e.jsxs("div",{className:"page",children:[e.jsxs("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:[e.jsx(S,{to:"/",children:"Home"}),e.jsx("span",{children:" / "}),e.jsx("span",{children:"Authors"}),e.jsx("span",{children:" / "}),e.jsx("span",{children:((_=t.data)==null?void 0:_.full_name)??s})]}),e.jsxs("header",{className:"author-hero",children:[e.jsx("div",{className:"organizations-eyebrow",children:"AUTHOR"}),e.jsxs("div",{className:"author-hero-title",children:[((N=t.data)==null?void 0:N.hf_username)&&e.jsx(H,{className:"author-avatar",url:t.data.hf_avatar_url,href:`https://huggingface.co/${t.data.hf_username}`,label:`@${t.data.hf_username} on Hugging Face`}),e.jsx("h1",{className:"feed-title",children:((b=t.data)==null?void 0:b.full_name)??e.jsx(y,{className:"h-12 w-64 inline-block"})})]}),t.data&&e.jsxs("div",{className:"feed-subtitle",children:[t.data.paper_count.toLocaleString()," ",t.data.paper_count===1?"paper":"papers",t.data.hf_username&&e.jsxs(e.Fragment,{children:[" · ",e.jsxs("a",{href:`https://huggingface.co/${t.data.hf_username}`,target:"_blank",rel:"noopener noreferrer",children:["@",t.data.hf_username," on Hugging Face ↗"]})]})]}),t.data&&e.jsx(T,{kind:"author",entityId:t.data.id})]}),e.jsxs("div",{className:"sort-bar",style:{alignItems:"center",gap:16},children:[e.jsxs("div",{className:"paper-feed-toolbar-controls",children:[e.jsx("div",{className:"sort-options",children:K.map(([a,n])=>e.jsx("button",{type:"button",className:`sort-btn ${p===a?"active":""}`,onClick:()=>d("order_by",a==="trending"?null:a),children:n},a))}),e.jsx(I,{hasCode:m,hasHfArtifacts:u,onHasCodeChange:a=>d("has_code",a?"true":null),onHasHfArtifactsChange:a=>d("has_hf_artifacts",a?"true":null)})]}),e.jsx(O,{startDate:i.startDate,endDate:i.endDate,onChange:a=>h(B(o,a))}),e.jsxs("div",{className:"results-count",children:[D.toLocaleString()," papers"]})]}),r.error?e.jsx($,{variant:"destructive",children:e.jsxs(E,{children:["Failed to load papers."," ",e.jsx("button",{type:"button",onClick:()=>void r.refetch(),children:"Try again"})]})}):r.isLoading?e.jsx("div",{className:"paper-list",children:Array.from({length:4}).map((a,n)=>e.jsx(y,{className:"h-40 w-full"},n))}):c.length===0?e.jsx("div",{className:"no-results",children:((P=t.data)==null?void 0:P.paper_count)===0?"No public papers are available.":"No papers found for this selection."}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"paper-list",children:c.map((a,n)=>e.jsx(k,{paper:a,rank:n+1},a.id))}),e.jsx("div",{ref:F,style:{height:1}}),r.isFetchingNextPage&&e.jsx("div",{style:{padding:"20px 0",textAlign:"center"},children:"Loading more…"})]})]})},ge=()=>{const{authorId:s}=C();return s?e.jsx(V,{authorId:s},s):e.jsx(A,{})};export{ge as default}; +import{u as C,j as e,d as R,r as v,L as S}from"./index-B7UoLEbn.js";import{u as w}from"./useQuery-DV2f4JpC.js";import{A as H,P as k}from"./components-Cax1Inob.js";import{a as L,P as O,b as B}from"./PaperDateFilter-CGG1OZi6.js";import{P as I}from"./PaperFeedFilters-CF3OKsFW.js";import{R as T}from"./ResearchFollowButton-C31U0bn3.js";import{A as $,a as E}from"./alert-B3UHHG00.js";import{S as y}from"./skeleton-DLsINbKq.js";import{u as M}from"./useIntersectionObserver-DOCspj7m.js";import{u as q}from"./usePapers-CDuTKuAc.js";import{p as z}from"./papers-Ctf2uv0o.js";import{t as U}from"./colors-COYRNy-F.js";import A from"./NotFound-DPR3-upZ.js";import"./paperQueryKeys-BP2E-0yf.js";import"./LatexTitle-CeC5Gqpu.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-BOnBmrXi.js";import"./useMutation-CuaM6sOT.js";import"./research-D7aSz-AO.js";import"./plus-BvN48Xkz.js";import"./useInfiniteQuery-CoFrg4GN.js";const K=[["trending","trending"],["date_published","newest"],["citation_count","most cited"]],Q=s=>s==="date_published"||s==="citation_count"?s:"trending",V=({authorId:s})=>{var f,x,j,_,N,b,P;const[o,h]=R(),p=Q(o.get("order_by")),m=o.get("has_code")==="true",u=o.get("has_hf_artifacts")==="true",i=L(o),t=w({queryKey:["author",s],queryFn:()=>z.getAuthor(s)}),r=q({author:s,page_size:12,order_by:p,order_dir:"desc",include_resources:!0,has_code:m,has_hf_artifacts:u,start_date:i.startDate,end_date:i.endDate}),{targetRef:F,isIntersecting:g}=M({rootMargin:"200px"}),c=v.useMemo(()=>{var a;return(((a=r.data)==null?void 0:a.pages)??[]).flatMap(n=>n.results.map(U))},[r.data]);v.useEffect(()=>{g&&r.hasNextPage&&!r.isFetchingNextPage&&r.fetchNextPage()},[g,r.hasNextPage,r.isFetchingNextPage,c.length]);const D=((x=(f=r.data)==null?void 0:f.pages[0])==null?void 0:x.count)??0,d=(a,n)=>{const l=new URLSearchParams(o);n?l.set(a,n):l.delete(a),h(l)};return((j=t.error)==null?void 0:j.status)===404?e.jsx(A,{}):e.jsxs("div",{className:"page",children:[e.jsxs("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:[e.jsx(S,{to:"/",children:"Home"}),e.jsx("span",{children:" / "}),e.jsx("span",{children:"Authors"}),e.jsx("span",{children:" / "}),e.jsx("span",{children:((_=t.data)==null?void 0:_.full_name)??s})]}),e.jsxs("header",{className:"author-hero",children:[e.jsx("div",{className:"organizations-eyebrow",children:"AUTHOR"}),e.jsxs("div",{className:"author-hero-title",children:[((N=t.data)==null?void 0:N.hf_username)&&e.jsx(H,{className:"author-avatar",url:t.data.hf_avatar_url,href:`https://huggingface.co/${t.data.hf_username}`,label:`@${t.data.hf_username} on Hugging Face`}),e.jsx("h1",{className:"feed-title",children:((b=t.data)==null?void 0:b.full_name)??e.jsx(y,{className:"h-12 w-64 inline-block"})})]}),t.data&&e.jsxs("div",{className:"feed-subtitle",children:[t.data.paper_count.toLocaleString()," ",t.data.paper_count===1?"paper":"papers",t.data.hf_username&&e.jsxs(e.Fragment,{children:[" · ",e.jsxs("a",{href:`https://huggingface.co/${t.data.hf_username}`,target:"_blank",rel:"noopener noreferrer",children:["@",t.data.hf_username," on Hugging Face ↗"]})]})]}),t.data&&e.jsx(T,{kind:"author",entityId:t.data.id})]}),e.jsxs("div",{className:"sort-bar",style:{alignItems:"center",gap:16},children:[e.jsxs("div",{className:"paper-feed-toolbar-controls",children:[e.jsx("div",{className:"sort-options",children:K.map(([a,n])=>e.jsx("button",{type:"button",className:`sort-btn ${p===a?"active":""}`,onClick:()=>d("order_by",a==="trending"?null:a),children:n},a))}),e.jsx(I,{hasCode:m,hasHfArtifacts:u,onHasCodeChange:a=>d("has_code",a?"true":null),onHasHfArtifactsChange:a=>d("has_hf_artifacts",a?"true":null)})]}),e.jsx(O,{startDate:i.startDate,endDate:i.endDate,onChange:a=>h(B(o,a))}),e.jsxs("div",{className:"results-count",children:[D.toLocaleString()," papers"]})]}),r.error?e.jsx($,{variant:"destructive",children:e.jsxs(E,{children:["Failed to load papers."," ",e.jsx("button",{type:"button",onClick:()=>void r.refetch(),children:"Try again"})]})}):r.isLoading?e.jsx("div",{className:"paper-list",children:Array.from({length:4}).map((a,n)=>e.jsx(y,{className:"h-40 w-full"},n))}):c.length===0?e.jsx("div",{className:"no-results",children:((P=t.data)==null?void 0:P.paper_count)===0?"No public papers are available.":"No papers found for this selection."}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"paper-list",children:c.map((a,n)=>e.jsx(k,{paper:a,rank:n+1},a.id))}),e.jsx("div",{ref:F,style:{height:1}}),r.isFetchingNextPage&&e.jsx("div",{style:{padding:"20px 0",textAlign:"center"},children:"Loading more…"})]})]})},ge=()=>{const{authorId:s}=C();return s?e.jsx(V,{authorId:s},s):e.jsx(A,{})};export{ge as default}; diff --git a/assets/AuthorizePaperEditView-BfRwxwFE.js b/assets/AuthorizePaperEditView-gluuntVq.js similarity index 87% rename from assets/AuthorizePaperEditView-BfRwxwFE.js rename to assets/AuthorizePaperEditView-gluuntVq.js index cfa80888278664a88e2536760012a6f8168274d1..f88b2116220193857955a7ef62d7757d9f028e51 100644 --- a/assets/AuthorizePaperEditView-BfRwxwFE.js +++ b/assets/AuthorizePaperEditView-gluuntVq.js @@ -1 +1 @@ -import{u,a as d,j as e,L as l,H as p}from"./index-CkeK0cDg.js";import{u as c}from"./useQuery-_Fj6Jfzr.js";import{u as h}from"./useMutation-q-fdM2fm.js";import{B as m}from"./button-CsUrN-GU.js";import{p as n}from"./paperEdits-DNevMcOH.js";function b(){const{authorizationId:t=""}=u(),{user:s,isLoading:o}=d(),i=c({queryKey:["paper-edit-authorization",t],queryFn:()=>n.authorization(t),retry:!1}),r=h({mutationFn:()=>n.approve(t)}),a=i.data;return e.jsxs("main",{className:"mx-auto max-w-xl space-y-5 px-6 py-12",children:[e.jsx("h1",{className:"text-2xl font-semibold",children:"Authorize your agent to edit a paper"}),(i.isLoading||o)&&e.jsx("p",{children:"Loading authorization…"}),i.error&&e.jsx("p",{role:"alert",children:i.error.message}),a&&e.jsxs(e.Fragment,{children:[e.jsx(l,{className:"underline",to:`/paper/${a.paper_id}`,children:a.title}),e.jsxs("p",{children:["Check that your CLI shows this code: ",e.jsx("strong",{className:"font-mono",children:a.user_code})]}),e.jsx("p",{children:"Only approve a request you started. Your agent will be able to publish changes to this paper’s links, tags, and evaluation results for one hour, without further approval."}),e.jsx("p",{children:"Edits appear publicly under your Hugging Face username. You can edit up to 20 distinct papers per UTC day. Evaluation deletion and changes to shared benchmark definitions require an administrator."}),r.isSuccess||a.approved?e.jsx("p",{role:"status",children:"Access approved. Return to your CLI to continue."}):s?e.jsxs(e.Fragment,{children:[e.jsxs("p",{children:["Signed in as ",e.jsxs("strong",{children:["@",s.username]})]}),e.jsx(m,{disabled:r.isPending||!s.can_directly_edit_catalog,onClick:()=>r.mutate(),children:r.isPending?"Authorizing…":"Authorize for one hour"}),!s.can_directly_edit_catalog&&e.jsx("p",{children:"Direct editing is unavailable for this session."})]}):e.jsx(p,{returnTo:`/authorize-paper-edit/${t}`,label:"Sign in with Hugging Face"}),r.error&&e.jsx("p",{role:"alert",children:r.error.message})]})]})}export{b as default}; +import{u,a as d,j as e,L as l,H as p}from"./index-B7UoLEbn.js";import{u as c}from"./useQuery-DV2f4JpC.js";import{u as h}from"./useMutation-CuaM6sOT.js";import{B as m}from"./button-D543yAN8.js";import{p as n}from"./paperEdits-C__t4BOQ.js";function b(){const{authorizationId:t=""}=u(),{user:s,isLoading:o}=d(),i=c({queryKey:["paper-edit-authorization",t],queryFn:()=>n.authorization(t),retry:!1}),r=h({mutationFn:()=>n.approve(t)}),a=i.data;return e.jsxs("main",{className:"mx-auto max-w-xl space-y-5 px-6 py-12",children:[e.jsx("h1",{className:"text-2xl font-semibold",children:"Authorize your agent to edit a paper"}),(i.isLoading||o)&&e.jsx("p",{children:"Loading authorization…"}),i.error&&e.jsx("p",{role:"alert",children:i.error.message}),a&&e.jsxs(e.Fragment,{children:[e.jsx(l,{className:"underline",to:`/paper/${a.paper_id}`,children:a.title}),e.jsxs("p",{children:["Check that your CLI shows this code: ",e.jsx("strong",{className:"font-mono",children:a.user_code})]}),e.jsx("p",{children:"Only approve a request you started. Your agent will be able to publish changes to this paper’s links, tags, and evaluation results for one hour, without further approval."}),e.jsx("p",{children:"Edits appear publicly under your Hugging Face username. You can edit up to 20 distinct papers per UTC day. Evaluation deletion and changes to shared benchmark definitions require an administrator."}),r.isSuccess||a.approved?e.jsx("p",{role:"status",children:"Access approved. Return to your CLI to continue."}):s?e.jsxs(e.Fragment,{children:[e.jsxs("p",{children:["Signed in as ",e.jsxs("strong",{children:["@",s.username]})]}),e.jsx(m,{disabled:r.isPending||!s.can_directly_edit_catalog,onClick:()=>r.mutate(),children:r.isPending?"Authorizing…":"Authorize for one hour"}),!s.can_directly_edit_catalog&&e.jsx("p",{children:"Direct editing is unavailable for this session."})]}):e.jsx(p,{returnTo:`/authorize-paper-edit/${t}`,label:"Sign in with Hugging Face"}),r.error&&e.jsx("p",{role:"alert",children:r.error.message})]})]})}export{b as default}; diff --git a/assets/AutonomousOperations-BUS5tzl6.js b/assets/AutonomousOperations-BcSbSeEV.js similarity index 94% rename from assets/AutonomousOperations-BUS5tzl6.js rename to assets/AutonomousOperations-BcSbSeEV.js index 3f43be2f1fd522721e269c562b9cb71de8d1b728..bb0e0b297dde6289d527dbc0bb7baeabf495623b 100644 --- a/assets/AutonomousOperations-BUS5tzl6.js +++ b/assets/AutonomousOperations-BcSbSeEV.js @@ -1,4 +1,4 @@ -import{g as R,a as B,m as q,r as m,j as e,L as H}from"./index-CkeK0cDg.js";import{u as I}from"./useQuery-_Fj6Jfzr.js";import{u as Q}from"./useMutation-q-fdM2fm.js";import{B as P}from"./badge-DESGN9ka.js";import{B as x}from"./button-CsUrN-GU.js";import{A as D,C as n,d as i,a as t,b as r,f as h,o as u}from"./operations-bzcC9DQN.js";import{I as j}from"./input-Cnu30n0B.js";import{S as $}from"./shield-alert-CvBQiZwU.js";/** +import{g as R,a as B,m as q,r as m,j as e,L as H}from"./index-B7UoLEbn.js";import{u as I}from"./useQuery-DV2f4JpC.js";import{u as Q}from"./useMutation-CuaM6sOT.js";import{B as P}from"./badge-BieMUBSb.js";import{B as x}from"./button-D543yAN8.js";import{A as D,C as n,d as i,a as t,b as r,f as h,o as u}from"./operations-GXAv7423.js";import{I as j}from"./input-hdt3aF12.js";import{S as $}from"./shield-alert-BnMa8lt8.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/BenchmarkDetailView-Do-phYU9.js b/assets/BenchmarkDetailView-BoBxL96j.js similarity index 98% rename from assets/BenchmarkDetailView-Do-phYU9.js rename to assets/BenchmarkDetailView-BoBxL96j.js index d3df749b1c2bc1274358625b65c69dd5afc82df1..ad8e90cc916f0b8ba96eff2aebda543aa692b648 100644 --- a/assets/BenchmarkDetailView-Do-phYU9.js +++ b/assets/BenchmarkDetailView-BoBxL96j.js @@ -1,2 +1,2 @@ -import{r as F,j as a,y as le,L as ne,b as ot,h as ct,u as dt,d as ut,k as mt}from"./index-CkeK0cDg.js";import{R as ht}from"./ResearchFollowButton-Dpqj0_yd.js";import{u as te}from"./useQuery-_Fj6Jfzr.js";import{c as re}from"./catalog-DGg7xZLW.js";import{C as ft,E as pt,e as gt}from"./ExternalSourceEvalBadge-C5RULLdt.js";import{L as oe}from"./LatexTitle-DPYNzv63.js";import{S as Ke}from"./switch-DlTd3dHA.js";import{I as xt}from"./components-BRrDI9KS.js";import{S as ce}from"./skeleton-Cs8haT1C.js";import{A as bt,a as yt}from"./alert-Vt5eE6re.js";import{B as wt}from"./BenchmarkTrendSparkline-DtMXUNJJ.js";import{s as vt}from"./safeExternalHref-CkBrsh84.js";import{s as jt}from"./slug-BpH-Nkvz.js";import"./useMutation-q-fdM2fm.js";import"./research-BfGol3BN.js";import"./plus-BaTMbqcZ.js";import"./papers-Celoj8_s.js";import"./hover-card-CAN3Vtea.js";import"./index-DVmlmU_7.js";import"./paperQueryKeys-BP2E-0yf.js";import"./colors-DQ-VN9If.js";function _t(e,t,r){const s=t?(e??[]).filter(l=>l.task_id===t):e??[],n=s.filter(l=>l.is_open===!1),i=n.reduce((l,c)=>l?(c.best_rank??Number.POSITIVE_INFINITY)<(l.best_rank??Number.POSITIVE_INFINITY)?c:l:c,null);return{visible:r?s.filter(l=>l.is_open!==!1):s,hiddenClosed:n,topHiddenClosed:i}}function ie(e){if(e==null)return null;if(typeof e=="number")return Number.isFinite(e)?e:null;const t=e.includes("±")?e.split("±")[0].trim():e.trim(),r=parseFloat(t);return Number.isFinite(r)?r:null}const Ge=[{label:"All",maxParametersExclusive:void 0},{label:"<10M",maxParametersExclusive:1e7},{label:"<100M",maxParametersExclusive:1e8},{label:"<1B",maxParametersExclusive:1e9},{label:"<3B",maxParametersExclusive:3e9},{label:"<6B",maxParametersExclusive:6e9},{label:"<12B",maxParametersExclusive:12e9},{label:"<32B",maxParametersExclusive:32e9},{label:"<128B",maxParametersExclusive:128e9},{label:"<500B",maxParametersExclusive:5e11}];function St(e){const t=e===null?void 0:Number(e);return Ge.some(r=>r.maxParametersExclusive===t)?t:void 0}function kt(e){return new Intl.NumberFormat("en",{notation:"compact",maximumSignificantDigits:3}).format(e)}function Ct(e){return[e.paper_id,e.task_id,e.dataset_id,e.model_name,e.harness??""].join("|")}function Et(e){const t=new Map;for(const r of e){const s=Ct(r),n=t.get(s);if(!n){t.set(s,{...r,metrics:{...r.metrics||{}},sourceEvaluationIds:[r.id],ranksByMetric:r.best_metric&&r.best_rank!=null?{[r.best_metric]:r.best_rank}:{},parameterCount:r.num_parameters??null,hasParameterConflict:!1});continue}n.metrics={...n.metrics,...r.metrics||{}},n.sourceEvaluationIds.push(r.id),r.best_metric&&r.best_rank!=null&&(n.ranksByMetric[r.best_metric]=r.best_rank),r.num_parameters!=null&&!n.hasParameterConflict&&(n.parameterCount===null?n.parameterCount=r.num_parameters:n.parameterCount!==r.num_parameters&&(n.parameterCount=null,n.hasParameterConflict=!0))}return Array.from(t.values())}function Le(e,t){return t===void 0?e:e.filter(r=>r.parameterCount!==null&&r.parameterCounts+n,0);for(const[s,n]of t)if(n>=2&&n*2>r)return s;return null}function $t(e,t){const r=e.evaluated_on;return r&&r!==t&&r!==Rt(e.updated_at)?r:e.paper_published_date||""}function Mt(e,t,r){if(e.length===0)return{points:[],sota:0,sotaModel:""};const s=Pt(e),n=e.map(u=>{var R;const h=ie((R=u.metrics)==null?void 0:R[t]);return{eval:u,value:h,date:$t(u,s)}}).filter(u=>u.value!==null&&!!u.date).sort((u,h)=>u.date.localeCompare(h.date)),i=[];let l=null;for(const u of n){const h=l==null?!0:r==="↓"?u.valuel;h&&(l=u.value),i.push({value:u.value,date:u.date,dateLabel:u.date.slice(0,7),modelName:u.eval.model_name||"",paperTitle:u.eval.paper_title||"",paperRouteId:u.eval.paper_arxiv_id||u.eval.paper_id||null,isSota:h})}const d=e.map(u=>{var h;return{eval:u,value:ie((h=u.metrics)==null?void 0:h[t])}}).filter(u=>u.value!==null).sort((u,h)=>r==="↓"?u.value-h.value:h.value-u.value)[0],f=(d==null?void 0:d.value)??0,x=(d==null?void 0:d.eval.model_name)||(d==null?void 0:d.eval.paper_title)||"";return{points:i,sota:f,sotaModel:x}}function Qe(e,t,r,s){const n=t.find(i=>i.id===s);if(e.length===0)return null;if(n!=null&&n.task_id&&e.some(i=>i.id===n.task_id))return n.task_id;if(r){const i=e.find(l=>l.slug===r);if(i)return i.id}if(e.length===1)return e[0].id;if(t.length>0){const i=new Map;for(const d of t)i.set(d.task_id,(i.get(d.task_id)||0)+1);let l=null,c=-1;for(const d of e){const f=i.get(d.id)||0;f>c&&(c=f,l=d.id)}if(l)return l}return e[0].id}function Tt(e){var _,X,Y;const{evaluations:t,tasks:r,taskSlug:s,highlightEvalId:n,parameterBound:i,showMoreMetrics:l,fittingMetricCount:c=1}=e,d=Qe(r,t,s,n),f=r.find(o=>o.id===d)||r[0]||null,x=t.find(o=>o.id===n),u=_t(t,d,e.hideClosed),h=Et(u.visible),R=Le(h,i),E=e.configuredMetrics.map(o=>o.metric_name),L=Array.from(new Set(h.flatMap(o=>[...o.best_metric?[o.best_metric]:[],...Object.keys(o.metrics||{})]))),S=E.length?E:L,g=new Map;for(const o of h){const m=o.best_metric;!m||ie(o.metrics[m])===null||E.length&&!S.includes(m)||g.set(m,(g.get(m)||0)+1)}const k=((_=[...g].sort((o,m)=>m[1]-o[1])[0])==null?void 0:_[0])||S[0]||"",j=S.find(o=>{var m;return o.toLocaleLowerCase()===((m=e.metric)==null?void 0:m.trim().toLocaleLowerCase())})||(x==null?void 0:x.best_metric)||k,D=((X=e.directions)==null?void 0:X.directions[j])==="lower_is_better"?"↓":"↑",W=j&&S.includes(j)?[j,...S.filter(o=>o!==j)]:S,w=W.length?l?W:W.slice(0,Math.max(1,c)):j?[j]:[],q=R.slice().sort((o,m)=>{const p=ie(o.metrics[j]),y=ie(m.metrics[j]);return p!==null&&y!==null?D==="↓"?p-y:y-p:p!==null?-1:y!==null?1:Ie(o,j)-Ie(m,j)});let I=null,N=0;const Q=q.map((o,m)=>{const p=ie(o.metrics[j]);return p!==null&&p!==I&&(I=p,N=m+1),{evaluation:o,rank:p===null?null:N,isHighlighted:Nt(o,n)}}),{points:z,sota:ee,sotaModel:O}=Mt(R,j,D),$=i===void 0?e.initialSummary:void 0,U=e.ready.evaluations&&e.ready.tasks&&e.ready.directions&&(!d||e.ready.metrics),K={parameter_coverage_known:h.filter(o=>o.parameterCount!==null).length,parameter_coverage_total:h.length};return{currentTaskId:d,primaryTask:f,activeMetric:j,arrow:D,allowedMetrics:S,orderedMetrics:W,visibleMetrics:w,rows:Q,chartPoints:z,highlightedEval:((Y=Q.find(o=>o.isHighlighted))==null?void 0:Y.evaluation)||null,hiddenClosedEvals:u.hiddenClosed,hiddenClosedTopEval:u.topHiddenClosed,parameterBound:i,parameterCoverage:K,hasParameterMetadata:K.parameter_coverage_known>0,parameterFilters:Ge.map(o=>({...o,selected:i===o.maxParametersExclusive,disabled:i!==o.maxParametersExclusive&&Le(h,o.maxParametersExclusive).length===0})),displayedMetric:U?j:$==null?void 0:$.metric,displayedSota:U?ee:$==null?void 0:$.value,displayedSotaModel:U?O:$==null?void 0:$.model_name,isSummaryLoading:!U&&!$,isInitialFilteredViewLoading:i!==void 0&&!U}}function Ft(e,t,r,s=1,n=0){const i=e-t.fixed-(r?t.harness:0);if(t.metric<=0)return 1;const l=Math.floor(i/t.metric);if(lr+he(t,s),0),harness:he(t,"--bm-harness-width"),metric:he(t,"--bm-metric-width")}}const It=20;function Ae(e,t){return e?a.jsx(oe,{title:e}):t||"—"}function At({model:e,showHarness:t,setMetric:r,highlightRowRef:s,onFittingMetricCountChange:n}){const{rows:i,visibleMetrics:l,activeMetric:c,arrow:d}=e,[f,x]=F.useState(null);return F.useEffect(()=>{if(!f)return;const u=()=>{f.classList.toggle("has-horizontal-overflow",f.scrollWidth>f.clientWidth);const R=f.firstElementChild;if(!R)return;const E=f.clientWidth,L=Lt(R),S=document.documentElement,g=S.scrollHeight>S.clientHeight?0:It;n(k=>Ft(E,L,t,k,g))},h=new ResizeObserver(u);return h.observe(f),f.firstElementChild&&h.observe(f.firstElementChild),u(),()=>h.disconnect()},[f,t,n]),a.jsx("div",{ref:x,className:"bm-table-scroll",role:"region","aria-label":"Leaderboard metrics",tabIndex:0,children:a.jsxs("table",{id:"benchmark-leaderboard",className:"bm-table",style:{"--bm-metric-count":l.length,"--bm-harness-count":t?1:0},children:[a.jsxs("colgroup",{children:[a.jsx("col",{className:"bm-width-rank"}),a.jsx("col",{className:"bm-width-model"}),a.jsx("col",{className:"bm-width-parameters"}),t&&a.jsx("col",{className:"bm-width-harness"}),l.map(u=>a.jsx("col",{className:"bm-width-metric"},u)),a.jsx("col",{}),a.jsx("col",{className:"bm-width-year"})]}),a.jsx("thead",{children:a.jsxs("tr",{children:[a.jsx("th",{className:"col-rank",children:"Rank"}),a.jsx("th",{className:"col-model",children:"Model"}),a.jsx("th",{className:"col-parameters",children:"Parameters"}),t&&a.jsx("th",{className:"col-harness",children:"Harness"}),l.map(u=>{const h=u===c;return a.jsx("th",{className:`col-value ${h?"is-active":""}`,"aria-sort":h?d==="↓"?"ascending":"descending":"none",children:a.jsxs("button",{type:"button",className:"bm-metric-header",onClick:()=>r(u),"aria-pressed":h,title:`Sort by ${u}`,children:[u,h?` ${d}`:""]})},u)}),a.jsx("th",{className:"col-paper",children:"Paper"}),a.jsx("th",{className:"col-year",children:"Year"})]})}),a.jsx("tbody",{children:i.map(({evaluation:u,rank:h,isHighlighted:R})=>{var S;const E=u.paper_arxiv_id||u.paper_id,L=u.paper_title||(u.paper_arxiv_id?`arXiv:${u.paper_arxiv_id}`:null);return a.jsxs("tr",{ref:R?s:void 0,className:R?"is-highlighted":void 0,children:[a.jsx("td",{className:"col-rank",children:h??"—"}),a.jsxs("td",{className:"col-model",children:[R&&a.jsx("span",{className:"bm-row-marker","aria-hidden":"true"}),u.hf_model_url?a.jsx("a",{href:u.hf_model_url,target:"_blank",rel:"noopener noreferrer",className:"bm-model-link",title:`Open ${u.model_name||"model"} on Hugging Face`,children:u.model_name||"—"}):u.model_name||"—",u.is_open===!1&&a.jsx(ft,{}),(u.external??u.is_external)&&a.jsx(pt,{sourceUrl:u.source_url||u.external_source_url||u.result_url})]}),a.jsx("td",{className:"col-parameters",title:u.parameterCount===null?void 0:u.parameterCount.toLocaleString("en-US"),"aria-label":u.parameterCount===null?"Parameters unknown":`${u.parameterCount.toLocaleString("en-US")} parameters`,children:u.parameterCount===null?"—":kt(u.parameterCount)}),t&&a.jsx("td",{className:"col-harness",children:u.harness||"—"}),l.map(g=>{var j;const k=g===c,B=(j=u.metrics)==null?void 0:j[g];return a.jsx("td",{className:`col-value${k?" is-active":""}${k&&h===1?" is-best":""}`,children:B!=null&&B!==""?le(B):"—"},g)}),a.jsx("td",{className:"col-paper",children:E?a.jsx(ne,{to:`/paper/${E}`,title:u.paper_title||L||void 0,children:Ae(u.paper_title,L)}):Ae(u.paper_title,L)}),a.jsx("td",{className:"col-year",children:((S=u.evaluated_on||u.paper_published_date)==null?void 0:S.slice(0,4))||"—"})]},u.id)})})]})})}function Be(e){const t=e.length===7?`${e}-01`:e,r=new Date(t).getTime();return Number.isFinite(r)?r:0}const fe=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function pe(e){const t=new Date(e);return{year:t.getFullYear(),month:t.getMonth()}}function Bt(e,t){if(e===t){const{year:d,month:f}=pe(e);return[{timestamp:new Date(d,f,1).getTime(),key:`${d}-${f}`,label:`${fe[f]} ${d}`}]}const r=pe(e),s=pe(t);if(r.year===s.year){const d=s.month-r.month+1;let f=1;const x=12;d>x&&(f=Math.ceil(d/x));const u=[];for(let h=r.month;h<=s.month;h+=f)u.push({timestamp:new Date(r.year,h,1).getTime(),key:`${r.year}-${h}`,label:d<=3?`${fe[h]} ${r.year}`:fe[h]});return u}const n=s.year-r.year+1;let i=1;const l=12;n>l&&(i=Math.ceil(n/l));const c=[];for(let d=r.year;d<=s.year;d+=i)c.push({timestamp:new Date(d,0,1).getTime(),key:String(d),label:String(d)});return c}const Dt=({points:e,metric:t})=>{const r=ot(),[s,n]=F.useState(null),i=880,l=320,c=60,d=30,f=40,x=50,u=e.map(o=>o.value),h=Math.min(...u),E=Math.max(...u)-h||1,L=i-c-d,S=l-f-x,g=e.map(o=>Be(o.date)),k=Math.min(...g),B=Math.max(...g),j=B-k||1,D=o=>k===B?c+L/2:c+(o-k)/j*L,W=e.map((o,m)=>{const p=D(Be(o.date)),y=(o.value-h)/E,P=f+S*(1-y);return{x:p,y:P,data:o,idx:m}}),w=W.filter(o=>o.data.isSota);let q="";if(w.length>=2){q=`M${w[0].x},${w[0].y}`;for(let o=1;o{const m=o.data.modelName||o.data.paperTitle||"";if(!m)return null;const p=m.length>22?m.slice(0,21)+"…":m,y=p.length*I;let P=o.x-y/2,C=o.x+y/2,v="middle";return Pi-d&&(C=i-d,P=C-y,v="end"),{x:v==="start"?c:v==="end"?i-d:o.x,y:o.y-Q,text:p,anchor:v,left:P,right:C}},ee=[],O=w.length>0?z(w[w.length-1]):null;let $=-1/0;for(let o=0;oO.left-N||($=m.right,ee.push({x:m.x,y:m.y,text:m.text,anchor:m.anchor})))}O&&ee.push({x:O.x,y:O.y,text:O.text,anchor:O.anchor});const U=Bt(k,B),K=5,_=o=>n(m=>m===o?null:m),X=o=>{o&&r(`/paper/${o}`)},Y=(o,m)=>{const y=`${o.data.modelName||o.data.paperTitle||"Unknown model"}: ${le(o.data.value)} on ${o.data.dateLabel}`,P=!!o.data.paperRouteId;return a.jsxs("g",{children:[m,a.jsx("circle",{cx:o.x,cy:o.y,r:"10",fill:"transparent",style:{cursor:P?"pointer":"default",outline:"none"},tabIndex:0,role:P?"link":"img","aria-label":y,onMouseEnter:()=>n(o.idx),onMouseLeave:()=>_(o.idx),onFocus:()=>n(o.idx),onBlur:()=>_(o.idx),onClick:()=>X(o.data.paperRouteId),onKeyDown:C=>{P&&(C.key==="Enter"||C.key===" ")&&(C.preventDefault(),X(o.data.paperRouteId))},children:a.jsx("title",{children:y})})]},o.idx)};return a.jsxs("svg",{width:"100%",viewBox:`0 0 ${i} ${l}`,style:{display:"block"},children:[a.jsx("text",{x:c-38,y:f+S/2,fontSize:"11",fontFamily:"var(--mono)",fill:"var(--ink-faint)",textAnchor:"middle",transform:`rotate(-90 ${c-38} ${f+S/2})`,children:t}),Array.from({length:K}).map((o,m)=>{const p=m/(K-1),y=f+S*(1-p),P=h+E*p;return a.jsxs("g",{children:[a.jsx("line",{x1:c,y1:y,x2:i-d,y2:y,stroke:"var(--hairline)",strokeWidth:"1"}),a.jsx("text",{x:c-10,y:y+4,fontSize:"11",fontFamily:"var(--mono)",fill:"var(--ink-faint)",textAnchor:"end",children:le(P)})]},m)}),U.map(o=>{const m=D(o.timestamp);return a.jsx("text",{x:m,y:l-x+18,fontSize:"11",fontFamily:"var(--mono)",fill:"var(--ink-soft)",textAnchor:"middle",children:o.label},o.key)}),W.filter(o=>!o.data.isSota).map(o=>{const m=s===o.idx;return Y(o,a.jsx("circle",{cx:o.x,cy:o.y,r:m?3:2,fill:"var(--ink-faint)",opacity:m?1:.45,style:{transition:"r 0.12s ease, opacity 0.12s ease"}}))}),q&&a.jsx("path",{d:q,stroke:"var(--accent)",strokeWidth:"2",fill:"none",strokeLinejoin:"round",strokeLinecap:"round"}),w.map(o=>{const m=s===o.idx;return Y(o,a.jsx("circle",{cx:o.x,cy:o.y,r:m?4.5:3,fill:m?"var(--accent)":"var(--bg-elevated)",stroke:"var(--accent)",strokeWidth:"1.5",style:{transition:"r 0.12s ease, fill 0.12s ease"}}))}),ee.map((o,m)=>a.jsx("text",{x:o.x,y:o.y,fontSize:"9.5",fontFamily:"var(--mono)",fill:"var(--ink-soft)",textAnchor:o.anchor,pointerEvents:"none",style:{paintOrder:"stroke",stroke:"var(--bg-elevated)",strokeWidth:3,strokeLinejoin:"round"},children:o.text},`label-${m}`)),s!==null&&W[s]&&(()=>{const o=W[s],m=o.data.modelName||o.data.paperTitle||"Unknown model",y=`${m.length>40?m.slice(0,39)+"…":m}: ${le(o.data.value)}`,C=Math.max(120,Math.min(340,y.length*6.6+24)),v=30;let H=o.x-C/2;Hi-d&&(H=i-d-C);const G=o.y-v-14>=f?o.y-v-12:o.y+12;return a.jsxs("g",{pointerEvents:"none",children:[a.jsx("rect",{x:H,y:G,width:C,height:v,rx:"6",ry:"6",fill:"var(--bg-elevated)",stroke:"var(--hairline-strong)",strokeWidth:"1",style:{filter:"drop-shadow(0 2px 6px rgba(0,0,0,0.08))"}}),a.jsx("text",{x:H+12,y:G+19,fontSize:"12",fontFamily:"var(--sans)",fill:"var(--ink)",fontWeight:500,children:y})]})})()]})};function Ht(e,t){if(e.match(/^[a-z]+:\/\//i))return e;if(e.match(/^\/\//))return window.location.protocol+e;if(e.match(/^[a-z]+:/i))return e;const r=document.implementation.createHTMLDocument(),s=r.createElement("base"),n=r.createElement("a");return r.head.appendChild(s),r.body.appendChild(n),t&&(s.href=t),n.href=e,n.href}const Vt=(()=>{let e=0;const t=()=>`0000${(Math.random()*36**4<<0).toString(36)}`.slice(-4);return()=>(e+=1,`u${t()}${e}`)})();function Z(e){const t=[];for(let r=0,s=e.length;rV||e.height>V)&&(e.width>V&&e.height>V?e.width>e.height?(e.height*=V/e.width,e.width=V):(e.width*=V/e.height,e.height=V):e.width>V?(e.height*=V/e.width,e.width=V):(e.width*=V/e.height,e.height=V))}function zt(e,t={}){return e.toBlob?new Promise(r=>{e.toBlob(r,t.type?t.type:"image/png",t.quality?t.quality:1)}):new Promise(r=>{const s=window.atob(e.toDataURL(t.type?t.type:void 0,t.quality?t.quality:void 0).split(",")[1]),n=s.length,i=new Uint8Array(n);for(let l=0;l{const s=new Image;s.onload=()=>{s.decode().then(()=>{requestAnimationFrame(()=>t(s))})},s.onerror=r,s.crossOrigin="anonymous",s.decoding="async",s.src=e})}async function Kt(e){return Promise.resolve().then(()=>new XMLSerializer().serializeToString(e)).then(encodeURIComponent).then(t=>`data:image/svg+xml;charset=utf-8,${t}`)}async function Gt(e,t,r){const s="http://www.w3.org/2000/svg",n=document.createElementNS(s,"svg"),i=document.createElementNS(s,"foreignObject");return n.setAttribute("width",`${t}`),n.setAttribute("height",`${r}`),n.setAttribute("viewBox",`0 0 ${t} ${r}`),i.setAttribute("width","100%"),i.setAttribute("height","100%"),i.setAttribute("x","0"),i.setAttribute("y","0"),i.setAttribute("externalResourcesRequired","true"),n.appendChild(i),i.appendChild(e),Kt(n)}const A=(e,t)=>{if(e instanceof t)return!0;const r=Object.getPrototypeOf(e);return r===null?!1:r.constructor.name===t.name||A(r,t)};function Qt(e){const t=e.getPropertyValue("content");return`${e.cssText} content: '${t.replace(/'|"/g,"")}';`}function Xt(e,t){return Xe(t).map(r=>{const s=e.getPropertyValue(r),n=e.getPropertyPriority(r);return`${r}: ${s}${n?" !important":""};`}).join(" ")}function Yt(e,t,r,s){const n=`.${e}:${t}`,i=r.cssText?Qt(r):Xt(r,s);return document.createTextNode(`${n}{${i}}`)}function De(e,t,r,s){const n=window.getComputedStyle(e,r),i=n.getPropertyValue("content");if(i===""||i==="none")return;const l=Vt();try{t.className=`${t.className} ${l}`}catch{return}const c=document.createElement("style");c.appendChild(Yt(l,r,n,s)),t.appendChild(c)}function Jt(e,t,r){De(e,t,":before",r),De(e,t,":after",r)}const He="application/font-woff",Ve="image/jpeg",Zt={woff:He,woff2:He,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:Ve,jpeg:Ve,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml",webp:"image/webp"};function er(e){const t=/\.([^./]*?)$/g.exec(e);return t?t[1]:""}function ye(e){const t=er(e).toLowerCase();return Zt[t]||""}function tr(e){return e.split(/,/)[1]}function xe(e){return e.search(/^(data:)/)!==-1}function rr(e,t){return`data:${t};base64,${e}`}async function Je(e,t,r){const s=await fetch(e,t);if(s.status===404)throw new Error(`Resource "${s.url}" not found`);const n=await s.blob();return new Promise((i,l)=>{const c=new FileReader;c.onerror=l,c.onloadend=()=>{try{i(r({res:s,result:c.result}))}catch(d){l(d)}},c.readAsDataURL(n)})}const ge={};function ar(e,t,r){let s=e.replace(/\?.*/,"");return r&&(s=e),/ttf|otf|eot|woff2?/i.test(s)&&(s=s.replace(/.*\//,"")),t?`[${t}]${s}`:s}async function we(e,t,r){const s=ar(e,t,r.includeQueryParams);if(ge[s]!=null)return ge[s];r.cacheBust&&(e+=(/\?/.test(e)?"&":"?")+new Date().getTime());let n;try{const i=await Je(e,r.fetchRequestInit,({res:l,result:c})=>(t||(t=l.headers.get("Content-Type")||""),tr(c)));n=rr(i,t)}catch(i){n=r.imagePlaceholder||"";let l=`Failed to fetch resource: ${e}`;i&&(l=typeof i=="string"?i:i.message),l&&console.warn(l)}return ge[s]=n,n}async function sr(e){const t=e.toDataURL();return t==="data:,"?e.cloneNode(!1):ue(t)}async function nr(e,t){if(e.currentSrc){const i=document.createElement("canvas"),l=i.getContext("2d");i.width=e.clientWidth,i.height=e.clientHeight,l==null||l.drawImage(e,0,0,i.width,i.height);const c=i.toDataURL();return ue(c)}const r=e.poster,s=ye(r),n=await we(r,s,t);return ue(n)}async function ir(e,t){var r;try{if(!((r=e==null?void 0:e.contentDocument)===null||r===void 0)&&r.body)return await me(e.contentDocument.body,t,!0)}catch{}return e.cloneNode(!1)}async function lr(e,t){return A(e,HTMLCanvasElement)?sr(e):A(e,HTMLVideoElement)?nr(e,t):A(e,HTMLIFrameElement)?ir(e,t):e.cloneNode(Ze(e))}const or=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SLOT",Ze=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SVG";async function cr(e,t,r){var s,n;if(Ze(t))return t;let i=[];return or(e)&&e.assignedNodes?i=Z(e.assignedNodes()):A(e,HTMLIFrameElement)&&(!((s=e.contentDocument)===null||s===void 0)&&s.body)?i=Z(e.contentDocument.body.childNodes):i=Z(((n=e.shadowRoot)!==null&&n!==void 0?n:e).childNodes),i.length===0||A(e,HTMLVideoElement)||await i.reduce((l,c)=>l.then(()=>me(c,r)).then(d=>{d&&t.appendChild(d)}),Promise.resolve()),t}function dr(e,t,r){const s=t.style;if(!s)return;const n=window.getComputedStyle(e);n.cssText?(s.cssText=n.cssText,s.transformOrigin=n.transformOrigin):Xe(r).forEach(i=>{let l=n.getPropertyValue(i);i==="font-size"&&l.endsWith("px")&&(l=`${Math.floor(parseFloat(l.substring(0,l.length-2)))-.1}px`),A(e,HTMLIFrameElement)&&i==="display"&&l==="inline"&&(l="block"),i==="d"&&t.getAttribute("d")&&(l=`path(${t.getAttribute("d")})`),s.setProperty(i,l,n.getPropertyPriority(i))})}function ur(e,t){A(e,HTMLTextAreaElement)&&(t.innerHTML=e.value),A(e,HTMLInputElement)&&t.setAttribute("value",e.value)}function mr(e,t){if(A(e,HTMLSelectElement)){const r=t,s=Array.from(r.children).find(n=>e.value===n.getAttribute("value"));s&&s.setAttribute("selected","")}}function hr(e,t,r){return A(t,Element)&&(dr(e,t,r),Jt(e,t,r),ur(e,t),mr(e,t)),t}async function fr(e,t){const r=e.querySelectorAll?e.querySelectorAll("use"):[];if(r.length===0)return e;const s={};for(let i=0;ilr(s,t)).then(s=>cr(e,s,t)).then(s=>hr(e,s,t)).then(s=>fr(s,t))}const et=/url\((['"]?)([^'"]+?)\1\)/g,pr=/url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g,gr=/src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;function xr(e){const t=e.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1");return new RegExp(`(url\\(['"]?)(${t})(['"]?\\))`,"g")}function br(e){const t=[];return e.replace(et,(r,s,n)=>(t.push(n),r)),t.filter(r=>!xe(r))}async function yr(e,t,r,s,n){try{const i=r?Ht(t,r):t,l=ye(t);let c;return n||(c=await we(i,l,s)),e.replace(xr(t),`$1${c}$3`)}catch{}return e}function wr(e,{preferredFontFormat:t}){return t?e.replace(gr,r=>{for(;;){const[s,,n]=pr.exec(r)||[];if(!n)return"";if(n===t)return`src: ${s};`}}):e}function tt(e){return e.search(et)!==-1}async function rt(e,t,r){if(!tt(e))return e;const s=wr(e,r);return br(s).reduce((i,l)=>i.then(c=>yr(c,l,t,r)),Promise.resolve(s))}async function se(e,t,r){var s;const n=(s=t.style)===null||s===void 0?void 0:s.getPropertyValue(e);if(n){const i=await rt(n,null,r);return t.style.setProperty(e,i,t.style.getPropertyPriority(e)),!0}return!1}async function vr(e,t){await se("background",e,t)||await se("background-image",e,t),await se("mask",e,t)||await se("-webkit-mask",e,t)||await se("mask-image",e,t)||await se("-webkit-mask-image",e,t)}async function jr(e,t){const r=A(e,HTMLImageElement);if(!(r&&!xe(e.src))&&!(A(e,SVGImageElement)&&!xe(e.href.baseVal)))return;const s=r?e.src:e.href.baseVal,n=await we(s,ye(s),t);await new Promise((i,l)=>{e.onload=i,e.onerror=t.onImageErrorHandler?(...d)=>{try{i(t.onImageErrorHandler(...d))}catch(f){l(f)}}:l;const c=e;c.decode&&(c.decode=i),c.loading==="lazy"&&(c.loading="eager"),r?(e.srcset="",e.src=n):e.href.baseVal=n})}async function _r(e,t){const s=Z(e.childNodes).map(n=>at(n,t));await Promise.all(s).then(()=>e)}async function at(e,t){A(e,Element)&&(await vr(e,t),await jr(e,t),await _r(e,t))}function Sr(e,t){const{style:r}=e;t.backgroundColor&&(r.backgroundColor=t.backgroundColor),t.width&&(r.width=`${t.width}px`),t.height&&(r.height=`${t.height}px`);const s=t.style;return s!=null&&Object.keys(s).forEach(n=>{r[n]=s[n]}),e}const We={};async function Oe(e){let t=We[e];if(t!=null)return t;const s=await(await fetch(e)).text();return t={url:e,cssText:s},We[e]=t,t}async function Ue(e,t){let r=e.cssText;const s=/url\(["']?([^"')]+)["']?\)/g,i=(r.match(/url\([^)]+\)/g)||[]).map(async l=>{let c=l.replace(s,"$1");return c.startsWith("https://")||(c=new URL(c,e.url).href),Je(c,t.fetchRequestInit,({result:d})=>(r=r.replace(l,`url(${d})`),[l,d]))});return Promise.all(i).then(()=>r)}function qe(e){if(e==null)return[];const t=[],r=/(\/\*[\s\S]*?\*\/)/gi;let s=e.replace(r,"");const n=new RegExp("((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)})","gi");for(;;){const d=n.exec(s);if(d===null)break;t.push(d[0])}s=s.replace(n,"");const i=/@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi,l="((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})",c=new RegExp(l,"gi");for(;;){let d=i.exec(s);if(d===null){if(d=c.exec(s),d===null)break;i.lastIndex=c.lastIndex}else c.lastIndex=i.lastIndex;t.push(d[0])}return t}async function kr(e,t){const r=[],s=[];return e.forEach(n=>{if("cssRules"in n)try{Z(n.cssRules||[]).forEach((i,l)=>{if(i.type===CSSRule.IMPORT_RULE){let c=l+1;const d=i.href,f=Oe(d).then(x=>Ue(x,t)).then(x=>qe(x).forEach(u=>{try{n.insertRule(u,u.startsWith("@import")?c+=1:n.cssRules.length)}catch(h){console.error("Error inserting rule from remote css",{rule:u,error:h})}})).catch(x=>{console.error("Error loading remote css",x.toString())});s.push(f)}})}catch(i){const l=e.find(c=>c.href==null)||document.styleSheets[0];n.href!=null&&s.push(Oe(n.href).then(c=>Ue(c,t)).then(c=>qe(c).forEach(d=>{l.insertRule(d,l.cssRules.length)})).catch(c=>{console.error("Error loading remote stylesheet",c)})),console.error("Error inlining remote css file",i)}}),Promise.all(s).then(()=>(e.forEach(n=>{if("cssRules"in n)try{Z(n.cssRules||[]).forEach(i=>{r.push(i)})}catch(i){console.error(`Error while reading CSS rules from ${n.href}`,i)}}),r))}function Cr(e){return e.filter(t=>t.type===CSSRule.FONT_FACE_RULE).filter(t=>tt(t.style.getPropertyValue("src")))}async function Er(e,t){if(e.ownerDocument==null)throw new Error("Provided element is not within a Document");const r=Z(e.ownerDocument.styleSheets),s=await kr(r,t);return Cr(s)}function st(e){return e.trim().replace(/["']/g,"")}function Nr(e){const t=new Set;function r(s){(s.style.fontFamily||getComputedStyle(s).fontFamily).split(",").forEach(i=>{t.add(st(i))}),Array.from(s.children).forEach(i=>{i instanceof HTMLElement&&r(i)})}return r(e),t}async function Rr(e,t){const r=await Er(e,t),s=Nr(e);return(await Promise.all(r.filter(i=>s.has(st(i.style.fontFamily))).map(i=>{const l=i.parentStyleSheet?i.parentStyleSheet.href:null;return rt(i.cssText,l,t)}))).join(` +import{r as F,j as a,y as le,L as ne,b as ot,h as ct,u as dt,d as ut,k as mt}from"./index-B7UoLEbn.js";import{R as ht}from"./ResearchFollowButton-C31U0bn3.js";import{u as te}from"./useQuery-DV2f4JpC.js";import{c as re}from"./catalog-DcbS_7_L.js";import{C as ft,E as pt,e as gt}from"./ExternalSourceEvalBadge-BwESq8va.js";import{L as oe}from"./LatexTitle-CeC5Gqpu.js";import{S as Ke}from"./switch-Dard85vE.js";import{I as xt}from"./components-Cax1Inob.js";import{S as ce}from"./skeleton-DLsINbKq.js";import{A as bt,a as yt}from"./alert-B3UHHG00.js";import{B as wt}from"./BenchmarkTrendSparkline-DoEe-tuL.js";import{s as vt}from"./safeExternalHref-CkBrsh84.js";import{s as jt}from"./slug-BpH-Nkvz.js";import"./useMutation-CuaM6sOT.js";import"./research-D7aSz-AO.js";import"./plus-BvN48Xkz.js";import"./papers-Ctf2uv0o.js";import"./hover-card-BM8a6wEE.js";import"./index-C0YS4OFr.js";import"./paperQueryKeys-BP2E-0yf.js";import"./colors-COYRNy-F.js";function _t(e,t,r){const s=t?(e??[]).filter(l=>l.task_id===t):e??[],n=s.filter(l=>l.is_open===!1),i=n.reduce((l,c)=>l?(c.best_rank??Number.POSITIVE_INFINITY)<(l.best_rank??Number.POSITIVE_INFINITY)?c:l:c,null);return{visible:r?s.filter(l=>l.is_open!==!1):s,hiddenClosed:n,topHiddenClosed:i}}function ie(e){if(e==null)return null;if(typeof e=="number")return Number.isFinite(e)?e:null;const t=e.includes("±")?e.split("±")[0].trim():e.trim(),r=parseFloat(t);return Number.isFinite(r)?r:null}const Ge=[{label:"All",maxParametersExclusive:void 0},{label:"<10M",maxParametersExclusive:1e7},{label:"<100M",maxParametersExclusive:1e8},{label:"<1B",maxParametersExclusive:1e9},{label:"<3B",maxParametersExclusive:3e9},{label:"<6B",maxParametersExclusive:6e9},{label:"<12B",maxParametersExclusive:12e9},{label:"<32B",maxParametersExclusive:32e9},{label:"<128B",maxParametersExclusive:128e9},{label:"<500B",maxParametersExclusive:5e11}];function St(e){const t=e===null?void 0:Number(e);return Ge.some(r=>r.maxParametersExclusive===t)?t:void 0}function kt(e){return new Intl.NumberFormat("en",{notation:"compact",maximumSignificantDigits:3}).format(e)}function Ct(e){return[e.paper_id,e.task_id,e.dataset_id,e.model_name,e.harness??""].join("|")}function Et(e){const t=new Map;for(const r of e){const s=Ct(r),n=t.get(s);if(!n){t.set(s,{...r,metrics:{...r.metrics||{}},sourceEvaluationIds:[r.id],ranksByMetric:r.best_metric&&r.best_rank!=null?{[r.best_metric]:r.best_rank}:{},parameterCount:r.num_parameters??null,hasParameterConflict:!1});continue}n.metrics={...n.metrics,...r.metrics||{}},n.sourceEvaluationIds.push(r.id),r.best_metric&&r.best_rank!=null&&(n.ranksByMetric[r.best_metric]=r.best_rank),r.num_parameters!=null&&!n.hasParameterConflict&&(n.parameterCount===null?n.parameterCount=r.num_parameters:n.parameterCount!==r.num_parameters&&(n.parameterCount=null,n.hasParameterConflict=!0))}return Array.from(t.values())}function Le(e,t){return t===void 0?e:e.filter(r=>r.parameterCount!==null&&r.parameterCounts+n,0);for(const[s,n]of t)if(n>=2&&n*2>r)return s;return null}function $t(e,t){const r=e.evaluated_on;return r&&r!==t&&r!==Rt(e.updated_at)?r:e.paper_published_date||""}function Mt(e,t,r){if(e.length===0)return{points:[],sota:0,sotaModel:""};const s=Pt(e),n=e.map(u=>{var R;const h=ie((R=u.metrics)==null?void 0:R[t]);return{eval:u,value:h,date:$t(u,s)}}).filter(u=>u.value!==null&&!!u.date).sort((u,h)=>u.date.localeCompare(h.date)),i=[];let l=null;for(const u of n){const h=l==null?!0:r==="↓"?u.valuel;h&&(l=u.value),i.push({value:u.value,date:u.date,dateLabel:u.date.slice(0,7),modelName:u.eval.model_name||"",paperTitle:u.eval.paper_title||"",paperRouteId:u.eval.paper_arxiv_id||u.eval.paper_id||null,isSota:h})}const d=e.map(u=>{var h;return{eval:u,value:ie((h=u.metrics)==null?void 0:h[t])}}).filter(u=>u.value!==null).sort((u,h)=>r==="↓"?u.value-h.value:h.value-u.value)[0],f=(d==null?void 0:d.value)??0,x=(d==null?void 0:d.eval.model_name)||(d==null?void 0:d.eval.paper_title)||"";return{points:i,sota:f,sotaModel:x}}function Qe(e,t,r,s){const n=t.find(i=>i.id===s);if(e.length===0)return null;if(n!=null&&n.task_id&&e.some(i=>i.id===n.task_id))return n.task_id;if(r){const i=e.find(l=>l.slug===r);if(i)return i.id}if(e.length===1)return e[0].id;if(t.length>0){const i=new Map;for(const d of t)i.set(d.task_id,(i.get(d.task_id)||0)+1);let l=null,c=-1;for(const d of e){const f=i.get(d.id)||0;f>c&&(c=f,l=d.id)}if(l)return l}return e[0].id}function Tt(e){var _,X,Y;const{evaluations:t,tasks:r,taskSlug:s,highlightEvalId:n,parameterBound:i,showMoreMetrics:l,fittingMetricCount:c=1}=e,d=Qe(r,t,s,n),f=r.find(o=>o.id===d)||r[0]||null,x=t.find(o=>o.id===n),u=_t(t,d,e.hideClosed),h=Et(u.visible),R=Le(h,i),E=e.configuredMetrics.map(o=>o.metric_name),L=Array.from(new Set(h.flatMap(o=>[...o.best_metric?[o.best_metric]:[],...Object.keys(o.metrics||{})]))),S=E.length?E:L,g=new Map;for(const o of h){const m=o.best_metric;!m||ie(o.metrics[m])===null||E.length&&!S.includes(m)||g.set(m,(g.get(m)||0)+1)}const k=((_=[...g].sort((o,m)=>m[1]-o[1])[0])==null?void 0:_[0])||S[0]||"",j=S.find(o=>{var m;return o.toLocaleLowerCase()===((m=e.metric)==null?void 0:m.trim().toLocaleLowerCase())})||(x==null?void 0:x.best_metric)||k,D=((X=e.directions)==null?void 0:X.directions[j])==="lower_is_better"?"↓":"↑",W=j&&S.includes(j)?[j,...S.filter(o=>o!==j)]:S,w=W.length?l?W:W.slice(0,Math.max(1,c)):j?[j]:[],q=R.slice().sort((o,m)=>{const p=ie(o.metrics[j]),y=ie(m.metrics[j]);return p!==null&&y!==null?D==="↓"?p-y:y-p:p!==null?-1:y!==null?1:Ie(o,j)-Ie(m,j)});let I=null,N=0;const Q=q.map((o,m)=>{const p=ie(o.metrics[j]);return p!==null&&p!==I&&(I=p,N=m+1),{evaluation:o,rank:p===null?null:N,isHighlighted:Nt(o,n)}}),{points:z,sota:ee,sotaModel:O}=Mt(R,j,D),$=i===void 0?e.initialSummary:void 0,U=e.ready.evaluations&&e.ready.tasks&&e.ready.directions&&(!d||e.ready.metrics),K={parameter_coverage_known:h.filter(o=>o.parameterCount!==null).length,parameter_coverage_total:h.length};return{currentTaskId:d,primaryTask:f,activeMetric:j,arrow:D,allowedMetrics:S,orderedMetrics:W,visibleMetrics:w,rows:Q,chartPoints:z,highlightedEval:((Y=Q.find(o=>o.isHighlighted))==null?void 0:Y.evaluation)||null,hiddenClosedEvals:u.hiddenClosed,hiddenClosedTopEval:u.topHiddenClosed,parameterBound:i,parameterCoverage:K,hasParameterMetadata:K.parameter_coverage_known>0,parameterFilters:Ge.map(o=>({...o,selected:i===o.maxParametersExclusive,disabled:i!==o.maxParametersExclusive&&Le(h,o.maxParametersExclusive).length===0})),displayedMetric:U?j:$==null?void 0:$.metric,displayedSota:U?ee:$==null?void 0:$.value,displayedSotaModel:U?O:$==null?void 0:$.model_name,isSummaryLoading:!U&&!$,isInitialFilteredViewLoading:i!==void 0&&!U}}function Ft(e,t,r,s=1,n=0){const i=e-t.fixed-(r?t.harness:0);if(t.metric<=0)return 1;const l=Math.floor(i/t.metric);if(lr+he(t,s),0),harness:he(t,"--bm-harness-width"),metric:he(t,"--bm-metric-width")}}const It=20;function Ae(e,t){return e?a.jsx(oe,{title:e}):t||"—"}function At({model:e,showHarness:t,setMetric:r,highlightRowRef:s,onFittingMetricCountChange:n}){const{rows:i,visibleMetrics:l,activeMetric:c,arrow:d}=e,[f,x]=F.useState(null);return F.useEffect(()=>{if(!f)return;const u=()=>{f.classList.toggle("has-horizontal-overflow",f.scrollWidth>f.clientWidth);const R=f.firstElementChild;if(!R)return;const E=f.clientWidth,L=Lt(R),S=document.documentElement,g=S.scrollHeight>S.clientHeight?0:It;n(k=>Ft(E,L,t,k,g))},h=new ResizeObserver(u);return h.observe(f),f.firstElementChild&&h.observe(f.firstElementChild),u(),()=>h.disconnect()},[f,t,n]),a.jsx("div",{ref:x,className:"bm-table-scroll",role:"region","aria-label":"Leaderboard metrics",tabIndex:0,children:a.jsxs("table",{id:"benchmark-leaderboard",className:"bm-table",style:{"--bm-metric-count":l.length,"--bm-harness-count":t?1:0},children:[a.jsxs("colgroup",{children:[a.jsx("col",{className:"bm-width-rank"}),a.jsx("col",{className:"bm-width-model"}),a.jsx("col",{className:"bm-width-parameters"}),t&&a.jsx("col",{className:"bm-width-harness"}),l.map(u=>a.jsx("col",{className:"bm-width-metric"},u)),a.jsx("col",{}),a.jsx("col",{className:"bm-width-year"})]}),a.jsx("thead",{children:a.jsxs("tr",{children:[a.jsx("th",{className:"col-rank",children:"Rank"}),a.jsx("th",{className:"col-model",children:"Model"}),a.jsx("th",{className:"col-parameters",children:"Parameters"}),t&&a.jsx("th",{className:"col-harness",children:"Harness"}),l.map(u=>{const h=u===c;return a.jsx("th",{className:`col-value ${h?"is-active":""}`,"aria-sort":h?d==="↓"?"ascending":"descending":"none",children:a.jsxs("button",{type:"button",className:"bm-metric-header",onClick:()=>r(u),"aria-pressed":h,title:`Sort by ${u}`,children:[u,h?` ${d}`:""]})},u)}),a.jsx("th",{className:"col-paper",children:"Paper"}),a.jsx("th",{className:"col-year",children:"Year"})]})}),a.jsx("tbody",{children:i.map(({evaluation:u,rank:h,isHighlighted:R})=>{var S;const E=u.paper_arxiv_id||u.paper_id,L=u.paper_title||(u.paper_arxiv_id?`arXiv:${u.paper_arxiv_id}`:null);return a.jsxs("tr",{ref:R?s:void 0,className:R?"is-highlighted":void 0,children:[a.jsx("td",{className:"col-rank",children:h??"—"}),a.jsxs("td",{className:"col-model",children:[R&&a.jsx("span",{className:"bm-row-marker","aria-hidden":"true"}),u.hf_model_url?a.jsx("a",{href:u.hf_model_url,target:"_blank",rel:"noopener noreferrer",className:"bm-model-link",title:`Open ${u.model_name||"model"} on Hugging Face`,children:u.model_name||"—"}):u.model_name||"—",u.is_open===!1&&a.jsx(ft,{}),(u.external??u.is_external)&&a.jsx(pt,{sourceUrl:u.source_url||u.external_source_url||u.result_url})]}),a.jsx("td",{className:"col-parameters",title:u.parameterCount===null?void 0:u.parameterCount.toLocaleString("en-US"),"aria-label":u.parameterCount===null?"Parameters unknown":`${u.parameterCount.toLocaleString("en-US")} parameters`,children:u.parameterCount===null?"—":kt(u.parameterCount)}),t&&a.jsx("td",{className:"col-harness",children:u.harness||"—"}),l.map(g=>{var j;const k=g===c,B=(j=u.metrics)==null?void 0:j[g];return a.jsx("td",{className:`col-value${k?" is-active":""}${k&&h===1?" is-best":""}`,children:B!=null&&B!==""?le(B):"—"},g)}),a.jsx("td",{className:"col-paper",children:E?a.jsx(ne,{to:`/paper/${E}`,title:u.paper_title||L||void 0,children:Ae(u.paper_title,L)}):Ae(u.paper_title,L)}),a.jsx("td",{className:"col-year",children:((S=u.evaluated_on||u.paper_published_date)==null?void 0:S.slice(0,4))||"—"})]},u.id)})})]})})}function Be(e){const t=e.length===7?`${e}-01`:e,r=new Date(t).getTime();return Number.isFinite(r)?r:0}const fe=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function pe(e){const t=new Date(e);return{year:t.getFullYear(),month:t.getMonth()}}function Bt(e,t){if(e===t){const{year:d,month:f}=pe(e);return[{timestamp:new Date(d,f,1).getTime(),key:`${d}-${f}`,label:`${fe[f]} ${d}`}]}const r=pe(e),s=pe(t);if(r.year===s.year){const d=s.month-r.month+1;let f=1;const x=12;d>x&&(f=Math.ceil(d/x));const u=[];for(let h=r.month;h<=s.month;h+=f)u.push({timestamp:new Date(r.year,h,1).getTime(),key:`${r.year}-${h}`,label:d<=3?`${fe[h]} ${r.year}`:fe[h]});return u}const n=s.year-r.year+1;let i=1;const l=12;n>l&&(i=Math.ceil(n/l));const c=[];for(let d=r.year;d<=s.year;d+=i)c.push({timestamp:new Date(d,0,1).getTime(),key:String(d),label:String(d)});return c}const Dt=({points:e,metric:t})=>{const r=ot(),[s,n]=F.useState(null),i=880,l=320,c=60,d=30,f=40,x=50,u=e.map(o=>o.value),h=Math.min(...u),E=Math.max(...u)-h||1,L=i-c-d,S=l-f-x,g=e.map(o=>Be(o.date)),k=Math.min(...g),B=Math.max(...g),j=B-k||1,D=o=>k===B?c+L/2:c+(o-k)/j*L,W=e.map((o,m)=>{const p=D(Be(o.date)),y=(o.value-h)/E,P=f+S*(1-y);return{x:p,y:P,data:o,idx:m}}),w=W.filter(o=>o.data.isSota);let q="";if(w.length>=2){q=`M${w[0].x},${w[0].y}`;for(let o=1;o{const m=o.data.modelName||o.data.paperTitle||"";if(!m)return null;const p=m.length>22?m.slice(0,21)+"…":m,y=p.length*I;let P=o.x-y/2,C=o.x+y/2,v="middle";return Pi-d&&(C=i-d,P=C-y,v="end"),{x:v==="start"?c:v==="end"?i-d:o.x,y:o.y-Q,text:p,anchor:v,left:P,right:C}},ee=[],O=w.length>0?z(w[w.length-1]):null;let $=-1/0;for(let o=0;oO.left-N||($=m.right,ee.push({x:m.x,y:m.y,text:m.text,anchor:m.anchor})))}O&&ee.push({x:O.x,y:O.y,text:O.text,anchor:O.anchor});const U=Bt(k,B),K=5,_=o=>n(m=>m===o?null:m),X=o=>{o&&r(`/paper/${o}`)},Y=(o,m)=>{const y=`${o.data.modelName||o.data.paperTitle||"Unknown model"}: ${le(o.data.value)} on ${o.data.dateLabel}`,P=!!o.data.paperRouteId;return a.jsxs("g",{children:[m,a.jsx("circle",{cx:o.x,cy:o.y,r:"10",fill:"transparent",style:{cursor:P?"pointer":"default",outline:"none"},tabIndex:0,role:P?"link":"img","aria-label":y,onMouseEnter:()=>n(o.idx),onMouseLeave:()=>_(o.idx),onFocus:()=>n(o.idx),onBlur:()=>_(o.idx),onClick:()=>X(o.data.paperRouteId),onKeyDown:C=>{P&&(C.key==="Enter"||C.key===" ")&&(C.preventDefault(),X(o.data.paperRouteId))},children:a.jsx("title",{children:y})})]},o.idx)};return a.jsxs("svg",{width:"100%",viewBox:`0 0 ${i} ${l}`,style:{display:"block"},children:[a.jsx("text",{x:c-38,y:f+S/2,fontSize:"11",fontFamily:"var(--mono)",fill:"var(--ink-faint)",textAnchor:"middle",transform:`rotate(-90 ${c-38} ${f+S/2})`,children:t}),Array.from({length:K}).map((o,m)=>{const p=m/(K-1),y=f+S*(1-p),P=h+E*p;return a.jsxs("g",{children:[a.jsx("line",{x1:c,y1:y,x2:i-d,y2:y,stroke:"var(--hairline)",strokeWidth:"1"}),a.jsx("text",{x:c-10,y:y+4,fontSize:"11",fontFamily:"var(--mono)",fill:"var(--ink-faint)",textAnchor:"end",children:le(P)})]},m)}),U.map(o=>{const m=D(o.timestamp);return a.jsx("text",{x:m,y:l-x+18,fontSize:"11",fontFamily:"var(--mono)",fill:"var(--ink-soft)",textAnchor:"middle",children:o.label},o.key)}),W.filter(o=>!o.data.isSota).map(o=>{const m=s===o.idx;return Y(o,a.jsx("circle",{cx:o.x,cy:o.y,r:m?3:2,fill:"var(--ink-faint)",opacity:m?1:.45,style:{transition:"r 0.12s ease, opacity 0.12s ease"}}))}),q&&a.jsx("path",{d:q,stroke:"var(--accent)",strokeWidth:"2",fill:"none",strokeLinejoin:"round",strokeLinecap:"round"}),w.map(o=>{const m=s===o.idx;return Y(o,a.jsx("circle",{cx:o.x,cy:o.y,r:m?4.5:3,fill:m?"var(--accent)":"var(--bg-elevated)",stroke:"var(--accent)",strokeWidth:"1.5",style:{transition:"r 0.12s ease, fill 0.12s ease"}}))}),ee.map((o,m)=>a.jsx("text",{x:o.x,y:o.y,fontSize:"9.5",fontFamily:"var(--mono)",fill:"var(--ink-soft)",textAnchor:o.anchor,pointerEvents:"none",style:{paintOrder:"stroke",stroke:"var(--bg-elevated)",strokeWidth:3,strokeLinejoin:"round"},children:o.text},`label-${m}`)),s!==null&&W[s]&&(()=>{const o=W[s],m=o.data.modelName||o.data.paperTitle||"Unknown model",y=`${m.length>40?m.slice(0,39)+"…":m}: ${le(o.data.value)}`,C=Math.max(120,Math.min(340,y.length*6.6+24)),v=30;let H=o.x-C/2;Hi-d&&(H=i-d-C);const G=o.y-v-14>=f?o.y-v-12:o.y+12;return a.jsxs("g",{pointerEvents:"none",children:[a.jsx("rect",{x:H,y:G,width:C,height:v,rx:"6",ry:"6",fill:"var(--bg-elevated)",stroke:"var(--hairline-strong)",strokeWidth:"1",style:{filter:"drop-shadow(0 2px 6px rgba(0,0,0,0.08))"}}),a.jsx("text",{x:H+12,y:G+19,fontSize:"12",fontFamily:"var(--sans)",fill:"var(--ink)",fontWeight:500,children:y})]})})()]})};function Ht(e,t){if(e.match(/^[a-z]+:\/\//i))return e;if(e.match(/^\/\//))return window.location.protocol+e;if(e.match(/^[a-z]+:/i))return e;const r=document.implementation.createHTMLDocument(),s=r.createElement("base"),n=r.createElement("a");return r.head.appendChild(s),r.body.appendChild(n),t&&(s.href=t),n.href=e,n.href}const Vt=(()=>{let e=0;const t=()=>`0000${(Math.random()*36**4<<0).toString(36)}`.slice(-4);return()=>(e+=1,`u${t()}${e}`)})();function Z(e){const t=[];for(let r=0,s=e.length;rV||e.height>V)&&(e.width>V&&e.height>V?e.width>e.height?(e.height*=V/e.width,e.width=V):(e.width*=V/e.height,e.height=V):e.width>V?(e.height*=V/e.width,e.width=V):(e.width*=V/e.height,e.height=V))}function zt(e,t={}){return e.toBlob?new Promise(r=>{e.toBlob(r,t.type?t.type:"image/png",t.quality?t.quality:1)}):new Promise(r=>{const s=window.atob(e.toDataURL(t.type?t.type:void 0,t.quality?t.quality:void 0).split(",")[1]),n=s.length,i=new Uint8Array(n);for(let l=0;l{const s=new Image;s.onload=()=>{s.decode().then(()=>{requestAnimationFrame(()=>t(s))})},s.onerror=r,s.crossOrigin="anonymous",s.decoding="async",s.src=e})}async function Kt(e){return Promise.resolve().then(()=>new XMLSerializer().serializeToString(e)).then(encodeURIComponent).then(t=>`data:image/svg+xml;charset=utf-8,${t}`)}async function Gt(e,t,r){const s="http://www.w3.org/2000/svg",n=document.createElementNS(s,"svg"),i=document.createElementNS(s,"foreignObject");return n.setAttribute("width",`${t}`),n.setAttribute("height",`${r}`),n.setAttribute("viewBox",`0 0 ${t} ${r}`),i.setAttribute("width","100%"),i.setAttribute("height","100%"),i.setAttribute("x","0"),i.setAttribute("y","0"),i.setAttribute("externalResourcesRequired","true"),n.appendChild(i),i.appendChild(e),Kt(n)}const A=(e,t)=>{if(e instanceof t)return!0;const r=Object.getPrototypeOf(e);return r===null?!1:r.constructor.name===t.name||A(r,t)};function Qt(e){const t=e.getPropertyValue("content");return`${e.cssText} content: '${t.replace(/'|"/g,"")}';`}function Xt(e,t){return Xe(t).map(r=>{const s=e.getPropertyValue(r),n=e.getPropertyPriority(r);return`${r}: ${s}${n?" !important":""};`}).join(" ")}function Yt(e,t,r,s){const n=`.${e}:${t}`,i=r.cssText?Qt(r):Xt(r,s);return document.createTextNode(`${n}{${i}}`)}function De(e,t,r,s){const n=window.getComputedStyle(e,r),i=n.getPropertyValue("content");if(i===""||i==="none")return;const l=Vt();try{t.className=`${t.className} ${l}`}catch{return}const c=document.createElement("style");c.appendChild(Yt(l,r,n,s)),t.appendChild(c)}function Jt(e,t,r){De(e,t,":before",r),De(e,t,":after",r)}const He="application/font-woff",Ve="image/jpeg",Zt={woff:He,woff2:He,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:Ve,jpeg:Ve,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml",webp:"image/webp"};function er(e){const t=/\.([^./]*?)$/g.exec(e);return t?t[1]:""}function ye(e){const t=er(e).toLowerCase();return Zt[t]||""}function tr(e){return e.split(/,/)[1]}function xe(e){return e.search(/^(data:)/)!==-1}function rr(e,t){return`data:${t};base64,${e}`}async function Je(e,t,r){const s=await fetch(e,t);if(s.status===404)throw new Error(`Resource "${s.url}" not found`);const n=await s.blob();return new Promise((i,l)=>{const c=new FileReader;c.onerror=l,c.onloadend=()=>{try{i(r({res:s,result:c.result}))}catch(d){l(d)}},c.readAsDataURL(n)})}const ge={};function ar(e,t,r){let s=e.replace(/\?.*/,"");return r&&(s=e),/ttf|otf|eot|woff2?/i.test(s)&&(s=s.replace(/.*\//,"")),t?`[${t}]${s}`:s}async function we(e,t,r){const s=ar(e,t,r.includeQueryParams);if(ge[s]!=null)return ge[s];r.cacheBust&&(e+=(/\?/.test(e)?"&":"?")+new Date().getTime());let n;try{const i=await Je(e,r.fetchRequestInit,({res:l,result:c})=>(t||(t=l.headers.get("Content-Type")||""),tr(c)));n=rr(i,t)}catch(i){n=r.imagePlaceholder||"";let l=`Failed to fetch resource: ${e}`;i&&(l=typeof i=="string"?i:i.message),l&&console.warn(l)}return ge[s]=n,n}async function sr(e){const t=e.toDataURL();return t==="data:,"?e.cloneNode(!1):ue(t)}async function nr(e,t){if(e.currentSrc){const i=document.createElement("canvas"),l=i.getContext("2d");i.width=e.clientWidth,i.height=e.clientHeight,l==null||l.drawImage(e,0,0,i.width,i.height);const c=i.toDataURL();return ue(c)}const r=e.poster,s=ye(r),n=await we(r,s,t);return ue(n)}async function ir(e,t){var r;try{if(!((r=e==null?void 0:e.contentDocument)===null||r===void 0)&&r.body)return await me(e.contentDocument.body,t,!0)}catch{}return e.cloneNode(!1)}async function lr(e,t){return A(e,HTMLCanvasElement)?sr(e):A(e,HTMLVideoElement)?nr(e,t):A(e,HTMLIFrameElement)?ir(e,t):e.cloneNode(Ze(e))}const or=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SLOT",Ze=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SVG";async function cr(e,t,r){var s,n;if(Ze(t))return t;let i=[];return or(e)&&e.assignedNodes?i=Z(e.assignedNodes()):A(e,HTMLIFrameElement)&&(!((s=e.contentDocument)===null||s===void 0)&&s.body)?i=Z(e.contentDocument.body.childNodes):i=Z(((n=e.shadowRoot)!==null&&n!==void 0?n:e).childNodes),i.length===0||A(e,HTMLVideoElement)||await i.reduce((l,c)=>l.then(()=>me(c,r)).then(d=>{d&&t.appendChild(d)}),Promise.resolve()),t}function dr(e,t,r){const s=t.style;if(!s)return;const n=window.getComputedStyle(e);n.cssText?(s.cssText=n.cssText,s.transformOrigin=n.transformOrigin):Xe(r).forEach(i=>{let l=n.getPropertyValue(i);i==="font-size"&&l.endsWith("px")&&(l=`${Math.floor(parseFloat(l.substring(0,l.length-2)))-.1}px`),A(e,HTMLIFrameElement)&&i==="display"&&l==="inline"&&(l="block"),i==="d"&&t.getAttribute("d")&&(l=`path(${t.getAttribute("d")})`),s.setProperty(i,l,n.getPropertyPriority(i))})}function ur(e,t){A(e,HTMLTextAreaElement)&&(t.innerHTML=e.value),A(e,HTMLInputElement)&&t.setAttribute("value",e.value)}function mr(e,t){if(A(e,HTMLSelectElement)){const r=t,s=Array.from(r.children).find(n=>e.value===n.getAttribute("value"));s&&s.setAttribute("selected","")}}function hr(e,t,r){return A(t,Element)&&(dr(e,t,r),Jt(e,t,r),ur(e,t),mr(e,t)),t}async function fr(e,t){const r=e.querySelectorAll?e.querySelectorAll("use"):[];if(r.length===0)return e;const s={};for(let i=0;ilr(s,t)).then(s=>cr(e,s,t)).then(s=>hr(e,s,t)).then(s=>fr(s,t))}const et=/url\((['"]?)([^'"]+?)\1\)/g,pr=/url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g,gr=/src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;function xr(e){const t=e.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1");return new RegExp(`(url\\(['"]?)(${t})(['"]?\\))`,"g")}function br(e){const t=[];return e.replace(et,(r,s,n)=>(t.push(n),r)),t.filter(r=>!xe(r))}async function yr(e,t,r,s,n){try{const i=r?Ht(t,r):t,l=ye(t);let c;return n||(c=await we(i,l,s)),e.replace(xr(t),`$1${c}$3`)}catch{}return e}function wr(e,{preferredFontFormat:t}){return t?e.replace(gr,r=>{for(;;){const[s,,n]=pr.exec(r)||[];if(!n)return"";if(n===t)return`src: ${s};`}}):e}function tt(e){return e.search(et)!==-1}async function rt(e,t,r){if(!tt(e))return e;const s=wr(e,r);return br(s).reduce((i,l)=>i.then(c=>yr(c,l,t,r)),Promise.resolve(s))}async function se(e,t,r){var s;const n=(s=t.style)===null||s===void 0?void 0:s.getPropertyValue(e);if(n){const i=await rt(n,null,r);return t.style.setProperty(e,i,t.style.getPropertyPriority(e)),!0}return!1}async function vr(e,t){await se("background",e,t)||await se("background-image",e,t),await se("mask",e,t)||await se("-webkit-mask",e,t)||await se("mask-image",e,t)||await se("-webkit-mask-image",e,t)}async function jr(e,t){const r=A(e,HTMLImageElement);if(!(r&&!xe(e.src))&&!(A(e,SVGImageElement)&&!xe(e.href.baseVal)))return;const s=r?e.src:e.href.baseVal,n=await we(s,ye(s),t);await new Promise((i,l)=>{e.onload=i,e.onerror=t.onImageErrorHandler?(...d)=>{try{i(t.onImageErrorHandler(...d))}catch(f){l(f)}}:l;const c=e;c.decode&&(c.decode=i),c.loading==="lazy"&&(c.loading="eager"),r?(e.srcset="",e.src=n):e.href.baseVal=n})}async function _r(e,t){const s=Z(e.childNodes).map(n=>at(n,t));await Promise.all(s).then(()=>e)}async function at(e,t){A(e,Element)&&(await vr(e,t),await jr(e,t),await _r(e,t))}function Sr(e,t){const{style:r}=e;t.backgroundColor&&(r.backgroundColor=t.backgroundColor),t.width&&(r.width=`${t.width}px`),t.height&&(r.height=`${t.height}px`);const s=t.style;return s!=null&&Object.keys(s).forEach(n=>{r[n]=s[n]}),e}const We={};async function Oe(e){let t=We[e];if(t!=null)return t;const s=await(await fetch(e)).text();return t={url:e,cssText:s},We[e]=t,t}async function Ue(e,t){let r=e.cssText;const s=/url\(["']?([^"')]+)["']?\)/g,i=(r.match(/url\([^)]+\)/g)||[]).map(async l=>{let c=l.replace(s,"$1");return c.startsWith("https://")||(c=new URL(c,e.url).href),Je(c,t.fetchRequestInit,({result:d})=>(r=r.replace(l,`url(${d})`),[l,d]))});return Promise.all(i).then(()=>r)}function qe(e){if(e==null)return[];const t=[],r=/(\/\*[\s\S]*?\*\/)/gi;let s=e.replace(r,"");const n=new RegExp("((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)})","gi");for(;;){const d=n.exec(s);if(d===null)break;t.push(d[0])}s=s.replace(n,"");const i=/@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi,l="((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})",c=new RegExp(l,"gi");for(;;){let d=i.exec(s);if(d===null){if(d=c.exec(s),d===null)break;i.lastIndex=c.lastIndex}else c.lastIndex=i.lastIndex;t.push(d[0])}return t}async function kr(e,t){const r=[],s=[];return e.forEach(n=>{if("cssRules"in n)try{Z(n.cssRules||[]).forEach((i,l)=>{if(i.type===CSSRule.IMPORT_RULE){let c=l+1;const d=i.href,f=Oe(d).then(x=>Ue(x,t)).then(x=>qe(x).forEach(u=>{try{n.insertRule(u,u.startsWith("@import")?c+=1:n.cssRules.length)}catch(h){console.error("Error inserting rule from remote css",{rule:u,error:h})}})).catch(x=>{console.error("Error loading remote css",x.toString())});s.push(f)}})}catch(i){const l=e.find(c=>c.href==null)||document.styleSheets[0];n.href!=null&&s.push(Oe(n.href).then(c=>Ue(c,t)).then(c=>qe(c).forEach(d=>{l.insertRule(d,l.cssRules.length)})).catch(c=>{console.error("Error loading remote stylesheet",c)})),console.error("Error inlining remote css file",i)}}),Promise.all(s).then(()=>(e.forEach(n=>{if("cssRules"in n)try{Z(n.cssRules||[]).forEach(i=>{r.push(i)})}catch(i){console.error(`Error while reading CSS rules from ${n.href}`,i)}}),r))}function Cr(e){return e.filter(t=>t.type===CSSRule.FONT_FACE_RULE).filter(t=>tt(t.style.getPropertyValue("src")))}async function Er(e,t){if(e.ownerDocument==null)throw new Error("Provided element is not within a Document");const r=Z(e.ownerDocument.styleSheets),s=await kr(r,t);return Cr(s)}function st(e){return e.trim().replace(/["']/g,"")}function Nr(e){const t=new Set;function r(s){(s.style.fontFamily||getComputedStyle(s).fontFamily).split(",").forEach(i=>{t.add(st(i))}),Array.from(s.children).forEach(i=>{i instanceof HTMLElement&&r(i)})}return r(e),t}async function Rr(e,t){const r=await Er(e,t),s=Nr(e);return(await Promise.all(r.filter(i=>s.has(st(i.style.fontFamily))).map(i=>{const l=i.parentStyleSheet?i.parentStyleSheet.href:null;return rt(i.cssText,l,t)}))).join(` `)}async function Pr(e,t){const r=t.fontEmbedCSS!=null?t.fontEmbedCSS:t.skipFonts?null:await Rr(e,t);if(r){const s=document.createElement("style"),n=document.createTextNode(r);s.appendChild(n),e.firstChild?e.insertBefore(s,e.firstChild):e.appendChild(s)}}async function $r(e,t={}){const{width:r,height:s}=Ye(e,t),n=await me(e,t,!0);return await Pr(n,t),await at(n,t),Sr(n,t),await Gt(n,r,s)}async function Mr(e,t={}){const{width:r,height:s}=Ye(e,t),n=await $r(e,t),i=await ue(n),l=document.createElement("canvas"),c=l.getContext("2d"),d=t.pixelRatio||Ut(),f=t.canvasWidth||r,x=t.canvasHeight||s;return l.width=f*d,l.height=x*d,t.skipAutoScale||qt(l),l.style.width=`${f}`,l.style.height=`${x}`,t.backgroundColor&&(c.fillStyle=t.backgroundColor,c.fillRect(0,0,l.width,l.height)),c.drawImage(i,0,0,l.width,l.height),l}async function Tr(e,t={}){const r=await Mr(e,t);return await zt(r)}const be="#ffffff";function Fr(){return typeof window>"u"?be:window.getComputedStyle(document.documentElement).getPropertyValue("--bg-elevated").trim()||be}function Lr(e){if(typeof window>"u")return be;const t=window.getComputedStyle(e).backgroundColor;return!t||t==="rgba(0, 0, 0, 0)"||t==="transparent"?Fr():t}async function Ir(e){var r,s;if(typeof window>"u"||!((s=(r=window.navigator)==null?void 0:r.clipboard)!=null&&s.write))throw new Error("Clipboard image copy is not supported in this browser.");if(typeof window.ClipboardItem>"u")throw new Error("Clipboard image copy is not supported in this browser.");const t=await Tr(e,{pixelRatio:2,cacheBust:!0,backgroundColor:Lr(e)});if(!t)throw new Error("Failed to render screenshot.");await window.navigator.clipboard.write([new window.ClipboardItem({"image/png":t})])}const nt=({targetRef:e,label:t})=>{const{toast:r}=ct(),[s,n]=F.useState("idle"),i=F.useRef(null);F.useEffect(()=>()=>{i.current!==null&&window.clearTimeout(i.current)},[]);const l=F.useCallback(async()=>{const d=e.current;if(d){n("copying"),d.classList.add("is-capturing"),d.offsetHeight,await new Promise(f=>window.requestAnimationFrame(()=>f()));try{await Ir(d),n("copied"),r({title:"Screenshot copied",description:`Image of the ${t} copied to your clipboard.`}),i.current!==null&&window.clearTimeout(i.current),i.current=window.setTimeout(()=>n("idle"),1500)}catch(f){n("idle"),r({title:"Copy failed",description:f instanceof Error&&f.message?f.message:"Could not copy the screenshot to your clipboard.",variant:"destructive"})}finally{d.classList.remove("is-capturing")}}},[e,t,r]),c=s==="copied"?"Copied":s==="copying"?"Copying…":"Copy image";return a.jsxs("button",{type:"button",className:"bm-copy-btn",onClick:l,disabled:s==="copying","aria-label":`Copy ${t} screenshot to clipboard`,title:`Copy ${t} screenshot to clipboard`,children:[a.jsx(xt,{name:"copy",size:11}),c]})};function Ar({model:e,datasetName:t,hideClosed:r,setHideClosed:s,setMetric:n}){const i=F.useRef(null),{isInitialFilteredViewLoading:l,chartPoints:c,activeMetric:d,allowedMetrics:f,orderedMetrics:x,parameterBound:u}=e;return l||c.length===0?null:a.jsxs("div",{className:"bm-card",ref:i,children:[a.jsxs("div",{className:"bm-card-screenshot-header","aria-hidden":"true",children:[a.jsxs("div",{className:"bm-card-screenshot-title",children:[a.jsx("span",{className:"bm-card-screenshot-eyebrow",children:"Benchmark"}),a.jsx("span",{className:"bm-card-screenshot-name",children:t})]}),a.jsxs("div",{className:"bm-card-screenshot-brand",children:[a.jsxs("span",{className:"brand",children:[a.jsx("span",{className:"brand-mark"}),a.jsxs("span",{className:"brand-name",children:["Papers ",a.jsx("em",{children:"With Code"})]})]}),a.jsx("span",{className:"bm-card-screenshot-url",children:"paperswithcode.co"})]})]}),a.jsxs("div",{className:"bm-card-head",children:[a.jsx("div",{className:"bm-card-title",children:"SOTA progression"}),a.jsxs("div",{className:"bm-card-actions",children:[f.length>1&&a.jsxs("label",{className:"bm-view-select",children:[a.jsx("span",{className:"bm-view-select-label",children:"View"}),a.jsx("select",{value:d,onChange:h=>n(h.target.value),children:x.map(h=>a.jsx("option",{value:h,children:h},h))})]}),a.jsxs("label",{className:"bm-closed-toggle",title:"Show or hide evaluations of closed-source models",children:[a.jsx(Ke,{className:"bm-closed-toggle-switch",checked:!r,onCheckedChange:h=>{s(!h)},"aria-label":"Show closed-source models"}),a.jsx("span",{className:"bm-closed-toggle-label",children:"Closed-source"})]}),a.jsx(nt,{targetRef:i,label:"SOTA chart"})]})]}),a.jsx("div",{className:"bm-chart-wrap",children:a.jsx(Dt,{points:c,metric:d})}),a.jsxs("div",{className:"bm-chart-foot",children:[a.jsx("span",{className:"legend-dot"}),u===void 0?"All models":"Filtered models"," over time · highlighted dots track the running best · hover for the model · click to open the paper"]})]})}function Br(e){if(!e)return null;const t=e.trim(),r=t.match(/^https?:\/\/(?:www\.)?arxiv\.org\/(?:abs|pdf)\/([^/?#]+)/i);if(r!=null&&r[1])return r[1].replace(/\.pdf$/i,"");const s=t.match(/^(?:https?:\/\/(?:www\.)?paperswithcode\.co)?\/paper\/([^/?#]+)/i);return(s==null?void 0:s[1])??null}function ze(e,t){return e?a.jsx(oe,{title:e}):t||"—"}const ia=()=>{var ve,je,_e,Se,ke,Ce,Ee,Ne,Re,Pe,$e;const{datasetSlug:e}=dt(),[t,r]=ut(),s=t.get("task")||void 0,n=t.get("eval")||void 0,i=St(t.get("max_parameters_exclusive")),{preferences:l,setHideClosedSourceEvals:c}=mt(),d=F.useRef(null),f=F.useRef(!1),x=F.useRef(null),[u,h]=F.useState(null),R=`${e}:${s||""}`,E=u===R,[L,S]=F.useState(1),g=te({queryKey:["dataset",e,"with-paper",s,l.hide_closed_source_evals?"open":"all"],queryFn:()=>re.getDatasetBySlug(e,{include_paper:!0,task:s,is_open:l.hide_closed_source_evals?!0:void 0}),enabled:!!e,staleTime:10*60*1e3}),k=te({queryKey:["dataset-evals",(ve=g.data)==null?void 0:ve.id],queryFn:()=>gt.byDataset(g.data.id),enabled:!!((je=g.data)!=null&&je.id),staleTime:5*60*1e3}),B=te({queryKey:["dataset-tasks",(_e=g.data)==null?void 0:_e.id],queryFn:()=>re.datasetTasks(g.data.id),enabled:!!((Se=g.data)!=null&&Se.id),staleTime:10*60*1e3}),j=te({queryKey:["metric-directions"],queryFn:()=>re.metricDirections(),staleTime:60*60*1e3}),D=Qe(B.data||[],k.data||[],s,n),W=te({queryKey:["task-benchmark-trends",D,l.hide_closed_source_evals?!0:void 0],queryFn:()=>re.trendingBenchmarks(D,{limit:100,min_recent_papers:0,is_open:l.hide_closed_source_evals?!0:void 0}),enabled:!!D&&!!((ke=g.data)!=null&&ke.id),staleTime:10*60*1e3}),w=F.useMemo(()=>{var b;return(((b=W.data)==null?void 0:b.results)||[]).find(M=>{var T;return M.id===((T=g.data)==null?void 0:T.id)})||null},[W.data,(Ce=g.data)==null?void 0:Ce.id]),q=te({queryKey:["leaderboard-metrics",(Ee=g.data)==null?void 0:Ee.id,D],queryFn:()=>re.leaderboardMetrics(g.data.id,D),enabled:!!((Ne=g.data)!=null&&Ne.id)&&!!D,staleTime:10*60*1e3}),I=Tt({evaluations:k.data||[],tasks:B.data||[],configuredMetrics:q.data||[],directions:j.data,initialSummary:(Re=g.data)==null?void 0:Re.leaderboard_summary,taskSlug:s,highlightEvalId:n,metric:t.get("metric")||void 0,hideClosed:l.hide_closed_source_evals,parameterBound:i,showMoreMetrics:E,fittingMetricCount:L,ready:{evaluations:k.isSuccess,tasks:B.isSuccess,directions:j.isSuccess,metrics:q.isSuccess}}),{primaryTask:N,hiddenClosedEvals:Q,hiddenClosedTopEval:z,isSummaryLoading:ee,displayedMetric:O,displayedSota:$,displayedSotaModel:U,isInitialFilteredViewLoading:K,highlightedEval:_,hasParameterMetadata:X,parameterCoverage:Y,orderedMetrics:o}=I;F.useEffect(()=>{if(f.current||!n||!k.data||k.data.length===0)return;const b=d.current;b&&(f.current=!0,b.scrollIntoView({behavior:"smooth",block:"start"}))},[n,k.data]);const m=te({queryKey:["area",N==null?void 0:N.area_id],queryFn:()=>re.getArea(N.area_id),enabled:!!(N!=null&&N.area_id),staleTime:10*60*1e3});if(g.isLoading)return a.jsxs("div",{className:"page",children:[a.jsx(ce,{className:"h-12 w-1/2 mb-6"}),a.jsx(ce,{className:"h-64 w-full"})]});if(g.error||!g.data)return a.jsx("div",{className:"page",children:a.jsx(bt,{variant:"destructive",children:a.jsx(yt,{children:"Benchmark not found."})})});const p=g.data,y=!!p.supports_harness,P=b=>{r(M=>{const T=new URLSearchParams(M);return b===void 0?T.delete("max_parameters_exclusive"):T.set("max_parameters_exclusive",String(b)),T})},C=b=>{r(M=>{const T=new URLSearchParams(M);return T.set("metric",b),T})},v=p.introducing_paper??void 0,H=(v==null?void 0:v.arxiv_id)||(v==null?void 0:v.id)||Br(p.paper_url),J=(v==null?void 0:v.title)||p.introducing_paper_title||null,G=((Pe=v==null?void 0:v.published)==null?void 0:Pe.slice(0,4))||p.introduced_year||null,it=!!H||!!p.paper_url||!!J,lt=v!=null&&v.arxiv_id||($e=p.paper_url)!=null&&$e.match(/^https?:\/\/(?:www\.)?arxiv\.org\//i)?`arXiv:${H}`:`Paper ${H}`;return a.jsx("div",{className:"page",children:a.jsxs("div",{className:"bm-page",children:[a.jsxs("div",{className:"breadcrumb",children:[a.jsx(ne,{to:"/tasks",children:"Tasks"}),m.data&&a.jsxs(a.Fragment,{children:[a.jsx("span",{className:"sep",children:"/"}),a.jsx(ne,{to:`/tasks#area-${jt(m.data.name)}`,children:m.data.name})]}),N&&a.jsxs(a.Fragment,{children:[a.jsx("span",{className:"sep",children:"/"}),a.jsx(ne,{to:`/tasks/${N.slug||N.id}`,children:N.name})]}),a.jsx("span",{className:"sep",children:"/"}),a.jsx("span",{style:{color:"var(--accent-text)"},children:p.name})]}),a.jsxs("div",{className:"bm-title-row",children:[a.jsx("h1",{className:"bm-title",children:p.name}),w&&a.jsxs("div",{className:"bm-title-trend","aria-label":`${p.name} reporting trend`,children:[a.jsx(wt,{history:w.history,benchmarkName:w.name}),a.jsxs("span",{className:"bm-title-trend-summary",children:[a.jsx("strong",{children:w.recent_paper_count})," ",w.recent_paper_count===1?"paper":"papers",w.rate_change==null?w.recent_paper_count>0&&a.jsx("span",{className:"benchmark-trend-change is-new",children:"new"}):a.jsxs("span",{className:`benchmark-trend-change ${w.rate_change>=1?"is-up":"is-down"}`,children:[w.rate_change>=1?"↑":"↓"," ",w.rate_change.toFixed(1),"×"]})]})]})]}),a.jsx(ht,{kind:"benchmark",entityId:p.id}),a.jsxs("div",{className:"bm-subtitle",children:[ee?a.jsx(ce,{className:"h-5 w-64 bm-summary-skeleton","aria-label":"Loading benchmark summary"}):a.jsxs("span",{children:[O&&a.jsxs(a.Fragment,{children:[a.jsx("span",{className:"metric-tag",children:O}),a.jsx("span",{style:{color:"var(--hairline-strong)",margin:"0 8px"},children:"·"})]}),U?a.jsxs("span",{children:["Best: ",a.jsx("span",{className:"best-name",children:le($)})," by ",a.jsx("span",{className:"best-name",style:{fontStyle:"normal"},children:U})]}):a.jsxs("span",{children:[I.rows.length," evaluations"]})]}),p.hf_url&&a.jsxs("a",{className:"bm-action-btn",href:p.hf_url,target:"_blank",rel:"noopener noreferrer",children:[a.jsx("span",{"aria-hidden":"true",children:"🤗"})," View on Hugging Face"]})]}),p.description&&a.jsx("p",{className:"bm-description",children:p.description}),l.hide_closed_source_evals&&Q.length>0&&a.jsxs("div",{className:"bm-hidden-closed-notice",children:[a.jsxs("span",{children:[Q.length," closed-source ",Q.length===1?"row is":"rows are"," hidden",z!=null&&z.model_name?a.jsxs(a.Fragment,{children:[", including ",a.jsx("strong",{children:z.model_name})]}):null,"."]}),a.jsx("button",{type:"button",className:"bm-hidden-closed-action",onClick:()=>{c(!1)},children:"Show closed-source"})]}),it&&a.jsxs("div",{className:"method-source",style:{marginTop:0,marginBottom:18},children:[a.jsx("span",{className:"method-source-label",children:"Source"}),H?a.jsxs(ne,{to:`/paper/${H}`,target:"_blank",rel:"noopener noreferrer",className:"method-source-link",children:[a.jsx("span",{className:"method-source-title",children:J?a.jsx(oe,{title:J}):lt}),G&&a.jsx("span",{className:"method-source-meta",children:G})]}):p.paper_url?a.jsxs("a",{href:vt(p.paper_url)??void 0,target:"_blank",rel:"noopener noreferrer",className:"method-source-link",children:[a.jsx("span",{className:"method-source-title",children:J?a.jsx(oe,{title:J}):p.paper_url}),G&&a.jsx("span",{className:"method-source-meta",children:G})]}):a.jsxs("div",{className:"method-source-link is-static",children:[a.jsx("span",{className:"method-source-title",children:J?a.jsx(oe,{title:J}):null}),G&&a.jsx("span",{className:"method-source-meta",children:G})]})]}),a.jsx(Ar,{model:I,datasetName:p.name,hideClosed:l.hide_closed_source_evals,setHideClosed:c,setMetric:C}),_&&(()=>{var Te,Fe;const b=_.paper_arxiv_id||_.paper_id,M=_.paper_title||(_.paper_arxiv_id?`arXiv:${_.paper_arxiv_id}`:null),T=_.best_metric&&((Te=_.metrics)==null?void 0:Te[_.best_metric])!==void 0?_.best_metric:I.activeMetric,Me=(Fe=_.metrics)==null?void 0:Fe[T];return a.jsxs("div",{className:"bm-highlight-banner",role:"status",children:[a.jsx("span",{className:"bm-highlight-dot","aria-hidden":"true"}),a.jsxs("div",{className:"bm-highlight-text",children:[a.jsx("span",{className:"bm-highlight-label",children:"Comparing result"}),a.jsxs("span",{className:"bm-highlight-paper",children:[_.model_name||M||"—",_.harness?` · ${_.harness}`:""]}),a.jsxs("span",{className:"bm-highlight-meta",children:[Me!==void 0&&T?a.jsxs(a.Fragment,{children:[T,": ",le(Me),M?" · ":""]}):null,b?a.jsx(ne,{to:`/paper/${b}`,children:ze(_.paper_title,M)}):ze(_.paper_title,M)]})]})]})})(),a.jsxs("div",{className:"bm-card",ref:x,children:[a.jsxs("div",{className:"bm-card-screenshot-header","aria-hidden":"true",children:[a.jsxs("div",{className:"bm-card-screenshot-title",children:[a.jsx("span",{className:"bm-card-screenshot-eyebrow",children:"Benchmark"}),a.jsx("span",{className:"bm-card-screenshot-name",children:p.name})]}),a.jsxs("div",{className:"bm-card-screenshot-brand",children:[a.jsxs("span",{className:"brand",children:[a.jsx("span",{className:"brand-mark"}),a.jsxs("span",{className:"brand-name",children:["Papers ",a.jsx("em",{children:"With Code"})]})]}),a.jsx("span",{className:"bm-card-screenshot-url",children:"paperswithcode.co"})]})]}),a.jsxs("div",{className:"bm-card-head",children:[a.jsx("div",{className:"bm-card-title",children:"Leaderboard"}),a.jsxs("div",{className:"bm-card-actions",children:[I.allowedMetrics.length>1&&a.jsxs("label",{className:"bm-view-select",children:[a.jsx("span",{className:"bm-view-select-label",children:"View"}),a.jsx("select",{value:I.activeMetric,onChange:b=>C(b.target.value),children:o.map(b=>a.jsx("option",{value:b,children:b},b))})]}),a.jsxs("label",{className:"bm-closed-toggle",title:"Show or hide evaluations of closed-source models",children:[a.jsx(Ke,{className:"bm-closed-toggle-switch",checked:!l.hide_closed_source_evals,onCheckedChange:b=>{c(!b)},"aria-label":"Show closed-source models"}),a.jsx("span",{className:"bm-closed-toggle-label",children:"Closed-source"})]}),!K&&!X&&k.isSuccess?a.jsx("span",{className:"bm-parameter-unavailable",children:"Parameter metadata unavailable"}):null,a.jsx(nt,{targetRef:x,label:"leaderboard"})]})]}),!K&&X&&a.jsxs("div",{className:"bm-parameter-filter-bar",children:[a.jsx("span",{className:"bm-parameter-filter-label",children:"Parameters Size"}),a.jsx("div",{className:"bm-parameter-filter-options",role:"group","aria-label":"Filter leaderboard by parameter size",children:I.parameterFilters.map(b=>{const{selected:M,disabled:T}=b;return a.jsx("button",{type:"button",className:`bm-parameter-filter-option${M?" is-active":""}`,"aria-pressed":M,disabled:T,onClick:()=>P(b.maxParametersExclusive),children:b.label},b.label)})}),a.jsxs("span",{className:"bm-parameter-coverage",children:["Parameters known for ",Y.parameter_coverage_known," of ",Y.parameter_coverage_total," entries"]})]}),k.isLoading||K?a.jsx("div",{style:{padding:16},children:Array.from({length:5}).map((b,M)=>a.jsx(ce,{className:"h-10 w-full mb-2"},M))}):I.rows.length===0?i?a.jsxs("div",{className:"no-results",children:["No known parameter counts match this filter. "," ",a.jsx("button",{type:"button",className:"bm-empty-filter-action",onClick:()=>P(void 0),children:"Show all"})]}):a.jsx("div",{className:"no-results",children:"No evaluations submitted yet."}):a.jsxs(a.Fragment,{children:[o.length>L&&a.jsxs("div",{className:"bm-metric-columns-control",children:[a.jsx("button",{type:"button",className:"bm-metric-columns-toggle","aria-expanded":E,"aria-controls":"benchmark-leaderboard",onClick:()=>h(E?null:R),children:E?"Show fewer metrics":`Show more metrics (${o.length-L})`}),E&&a.jsx("span",{children:"Scroll metrics horizontally; model and paper details stay visible."})]}),a.jsx(At,{model:I,showHarness:y,setMetric:C,highlightRowRef:d,onFittingMetricCountChange:S})]})]})]})})};export{ia as default}; diff --git a/assets/BenchmarkTrendSparkline-DtMXUNJJ.js b/assets/BenchmarkTrendSparkline-DoEe-tuL.js similarity index 97% rename from assets/BenchmarkTrendSparkline-DtMXUNJJ.js rename to assets/BenchmarkTrendSparkline-DoEe-tuL.js index 5e739739619af1af4f57ddc53b6e7956891effd6..c55727ca675b5a1d6049b765b37c87fba22e2c5c 100644 --- a/assets/BenchmarkTrendSparkline-DtMXUNJJ.js +++ b/assets/BenchmarkTrendSparkline-DoEe-tuL.js @@ -1 +1 @@ -import{r as C,j as t}from"./index-CkeK0cDg.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-B7UoLEbn.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-V3k6NvU1.js b/assets/ChatView-Clbc6HRC.js similarity index 98% rename from assets/ChatView-V3k6NvU1.js rename to assets/ChatView-Clbc6HRC.js index f0b740c96b0fbca52d083b938e318ea274b63760..f5ff66c50c6f321d5d0fec92211d0f4c0a259bad 100644 --- a/assets/ChatView-V3k6NvU1.js +++ b/assets/ChatView-Clbc6HRC.js @@ -1,4 +1,4 @@ -var yr=Object.defineProperty;var _r=(t,e,r)=>e in t?yr(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var X=(t,e,r)=>_r(t,typeof e!="symbol"?e+"":e,r);import{g as br,r as u,A as zt,W as wr,j as i,X as vr,h as Gt,F as ot,a as Qt,u as Sr,b as xr,d as Rr,m as Er,Y as Tr,L as Nt,f as kr}from"./index-CkeK0cDg.js";import{u as Ke}from"./useQuery-_Fj6Jfzr.js";import{C as Cr,U as Mt,b as Ir,d as Ve,c as Ar,e as Or,A as jr,a as Dr}from"./ArtifactWorkspace-CRRWXbww.js";import{c as Fe}from"./chat-Cvg-XEh-.js";import{e as Nr,f as Jt,h as Mr,T as Lr,d as Xt,i as Fr,j as qr,k as Pr,l as $e,m as Yr,t as Lt,n as mt,o as Zt,r as Br,s as Wr,S as Hr,a as Ur,D as ct,v as Kr,w as tt,x as Xe,y as Vr,z as $r,B as Ze,E as et,F as zr,G as Gr,H as Qr,I as lt,J as Jr}from"./chatLaunch-NPBTDHUP.js";import{S as Xr}from"./chatPrompts-DypmWIqx.js";import{u as Zr,O as es}from"./openrouter-DC0iPeja.js";import{q as er}from"./queryOptions-C9woPjwX.js";/* empty css */import"./hover-card-CAN3Vtea.js";import"./github-BxRJHxJc.js";import"./github-DHpXYWrC.js";import"./catalog-DGg7xZLW.js";import"./PaperPreviewLink-CQ27hqZy.js";import"./index-B1_S53Hb.js";import"./index-DqQiSNg1.js";import"./katex-DkKDou_j.js";import"./paperQueryKeys-BP2E-0yf.js";import"./papers-Celoj8_s.js";import"./useMutation-q-fdM2fm.js";import"./copy-BEe19JmS.js";import"./file-text-2FXER-SZ.js";import"./external-link-E5LiqyOi.js";import"./chevron-down-CcbfCW-U.js";/** +var yr=Object.defineProperty;var _r=(t,e,r)=>e in t?yr(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var X=(t,e,r)=>_r(t,typeof e!="symbol"?e+"":e,r);import{g as br,r as u,A as zt,W as wr,j as i,X as vr,h as Gt,F as ot,a as Qt,u as Sr,b as xr,d as Rr,m as Er,Y as Tr,L as Nt,f as kr}from"./index-B7UoLEbn.js";import{u as Ke}from"./useQuery-DV2f4JpC.js";import{C as Cr,U as Mt,b as Ir,d as Ve,c as Ar,e as Or,A as jr,a as Dr}from"./ArtifactWorkspace-B1pVTYNC.js";import{c as Fe}from"./chat-B6IGPjTl.js";import{e as Nr,f as Jt,h as Mr,T as Lr,d as Xt,i as Fr,j as qr,k as Pr,l as $e,m as Yr,t as Lt,n as mt,o as Zt,r as Br,s as Wr,S as Hr,a as Ur,D as ct,v as Kr,w as tt,x as Xe,y as Vr,z as $r,B as Ze,E as et,F as zr,G as Gr,H as Qr,I as lt,J as Jr}from"./chatLaunch-BG1GqDpR.js";import{S as Xr}from"./chatPrompts-DypmWIqx.js";import{u as Zr,O as es}from"./openrouter-Drl-aaDJ.js";import{q as er}from"./queryOptions-C9woPjwX.js";/* empty css */import"./hover-card-BM8a6wEE.js";import"./github-uiOp6-cP.js";import"./github-CVI7-Ls5.js";import"./catalog-DcbS_7_L.js";import"./PaperPreviewLink-C5ianbW8.js";import"./index-tHVWANW1.js";import"./index-ClEBI70O.js";import"./katex-DkKDou_j.js";import"./paperQueryKeys-BP2E-0yf.js";import"./papers-Ctf2uv0o.js";import"./useMutation-CuaM6sOT.js";import"./copy-B2Q-ksVe.js";import"./file-text-CXhRvAOE.js";import"./external-link-mpf7SsAF.js";import"./chevron-down-CF7sS93G.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/ConferenceDetailView-DCFcy6HY.js b/assets/ConferenceDetailView-BppSWd5G.js similarity index 91% rename from assets/ConferenceDetailView-DCFcy6HY.js rename to assets/ConferenceDetailView-BppSWd5G.js index ca56beb499a2bf774a869dd08c3a5467453aaf9e..ab5ac38e23772f6e032abfd8618d4dd15a013ed8 100644 --- a/assets/ConferenceDetailView-DCFcy6HY.js +++ b/assets/ConferenceDetailView-BppSWd5G.js @@ -1 +1 @@ -import{u as L,r as D,j as e,L as p}from"./index-CkeK0cDg.js";import{u as T}from"./useQuery-_Fj6Jfzr.js";import{M as F}from"./MarkdownText-DM-IyAfb.js";import{c as A}from"./catalog-DGg7xZLW.js";import{c as B,h as C,d as E}from"./colors-DQ-VN9If.js";import{S as f}from"./skeleton-Cs8haT1C.js";import{A as P,a as z}from"./alert-Vt5eE6re.js";import{s as M}from"./safeExternalHref-CkBrsh84.js";/* empty css */import"./PaperPreviewLink-CQ27hqZy.js";import"./index-B1_S53Hb.js";import"./index-DqQiSNg1.js";import"./katex-DkKDou_j.js";import"./hover-card-CAN3Vtea.js";import"./paperQueryKeys-BP2E-0yf.js";import"./papers-Celoj8_s.js";import"./useMutation-q-fdM2fm.js";const R=a=>(a==null?void 0:a.trim().toLowerCase().replace(/[\s_]+/g,"-"))??"",O=(a,t)=>{if(!a)return null;const i=new Date(`${a}T00:00:00`),s=t?new Date(`${t}T00:00:00`):null,c=g=>g.toLocaleDateString("en-US",{month:"long",day:"numeric"}),m=i.getFullYear();return s&&s.getTime()!==i.getTime()?i.getMonth()===s.getMonth()?`${c(i).replace(/\d+$/,"").trim()} ${i.getDate()}–${s.getDate()}, ${m}`:`${c(i)} – ${c(s)}, ${m}`:`${c(i)}, ${m}`},re=()=>{var k,S,b,_,$,w;const{confSlug:a}=L(),t=T({queryKey:["conference-areas-with-tasks",a],queryFn:()=>A.conferenceAreasWithTasks(a),enabled:!!a,staleTime:10*60*1e3}),i=D.useMemo(()=>{if(!t.data)return[];const n={general:0,vision:1,video:2,language:3,audio:4,other:5},r=o=>n[R(o)]??999;return[...t.data.results].sort((o,l)=>{const d=r(o.name),x=r(l.name);return d!==x?d-x:o.name.localeCompare(l.name)})},[t.data]),s=(k=t.data)==null?void 0:k.conference,c=((S=t.data)==null?void 0:S.total_paper_count)??0,m=((b=t.data)==null?void 0:b.oral_paper_count)??0,g=((_=t.data)==null?void 0:_.spotlight_paper_count)??0,u=(($=t.data)==null?void 0:$.outstanding_paper_count)??0,j=((w=t.data)==null?void 0:w.best_paper_finalist_paper_count)??0,v=i.reduce((n,r)=>n+r.tasks.length,0);if(t.error)return e.jsx("div",{className:"page",children:e.jsx(P,{variant:"destructive",children:e.jsx(z,{children:"Failed to load conference. Please try again."})})});const y=s?O(s.start_date,s.end_date):null,N=s?[s.venue,s.location].filter(Boolean).join(", "):null,h=s==null?void 0:s.name;return e.jsxs("div",{className:"page",children:[e.jsxs("div",{className:s!=null&&s.image_url?"task-hero-grid":void 0,children:[e.jsxs("div",{children:[e.jsx("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--accent-text)",letterSpacing:"0.1em",marginBottom:8},children:"CONFERENCE"}),e.jsx("h1",{className:"feed-title",children:h??e.jsx(f,{className:"h-10 w-64 inline-block"})}),e.jsxs("div",{className:"feed-subtitle",style:{display:"flex",flexDirection:"column",gap:4},children:[y&&e.jsx("span",{children:y}),N&&e.jsx("span",{children:N}),(s==null?void 0:s.url)&&e.jsx("a",{href:M(s.url)??void 0,target:"_blank",rel:"noopener noreferrer",style:{color:"var(--accent-text)"},children:s.url.replace(/^https?:\/\//,"")}),(s==null?void 0:s.hf_url)&&e.jsxs("a",{className:"bm-action-btn",href:s.hf_url,target:"_blank",rel:"noopener noreferrer",style:{alignSelf:"flex-start",marginTop:4},children:[e.jsx("span",{"aria-hidden":"true",children:"🤗"})," View on Hugging Face"]})]}),(s==null?void 0:s.description)&&e.jsx(F,{className:"method-description",text:s.description})]}),(s==null?void 0:s.image_url)&&e.jsxs("figure",{className:"task-figure-card",children:[e.jsx("div",{className:"task-figure-img-wrap",children:e.jsx("img",{className:"task-figure-img",src:s.image_url,alt:h?`${h} visual`:"Conference visual",onError:n=>{var r,o;(o=(r=n.currentTarget.parentElement)==null?void 0:r.parentElement)==null||o.style.setProperty("display","none")}})}),e.jsxs("figcaption",{children:["Figure · ",h??"Conference",s.image_credit&&e.jsxs(e.Fragment,{children:[e.jsx("br",{}),e.jsx(F,{className:"task-image-credit",text:s.image_credit})]})]})]})]}),!t.isLoading&&c>0&&e.jsxs("section",{style:{marginTop:48,marginBottom:48},children:[e.jsxs("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:24,paddingBottom:12,borderBottom:"1px solid var(--hairline-strong)"},children:[e.jsxs("div",{children:[e.jsx("h2",{style:{fontFamily:"var(--serif)",fontSize:26,fontWeight:500,letterSpacing:"-0.02em",marginBottom:4},children:"Browse papers"}),e.jsx("div",{style:{fontFamily:"var(--serif)",fontStyle:"italic",fontSize:13,color:"var(--ink-soft)"},children:"All accepted papers, plus oral, spotlight, outstanding, and best paper finalists."})]}),e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",whiteSpace:"nowrap"},children:[c.toLocaleString()," papers"]})]}),e.jsxs("div",{className:"tag-grid",children:[e.jsxs(p,{to:`/conferences/${a}/all`,className:"tag-cell",children:[e.jsxs("div",{className:"name",children:[e.jsx("span",{className:"dot",style:{background:"var(--accent)"}}),"All papers"]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[c.toLocaleString()," papers"]})})]}),m>0&&e.jsxs(p,{to:`/conferences/${a}/oral`,className:"tag-cell",children:[e.jsxs("div",{className:"name",children:[e.jsx("span",{className:"dot",style:{background:"#fdbb02"}}),"Oral papers"]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[m.toLocaleString()," papers"]})})]}),g>0&&e.jsxs(p,{to:`/conferences/${a}/spotlight`,className:"tag-cell",children:[e.jsxs("div",{className:"name",children:[e.jsx("span",{className:"dot",style:{background:"#fdbb02"}}),"Spotlight papers"]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[g.toLocaleString()," papers"]})})]}),u>0&&e.jsxs(p,{to:`/conferences/${a}/outstanding`,className:"tag-cell",children:[e.jsxs("div",{className:"name",children:[e.jsx("span",{className:"dot",style:{background:"#c45c26"}}),"Outstanding papers"]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[u.toLocaleString()," papers"]})})]}),j>0&&e.jsxs(p,{to:`/conferences/${a}/best-paper-finalists`,className:"tag-cell",children:[e.jsxs("div",{className:"name",children:[e.jsx("span",{className:"dot",style:{background:"#c9a227"}}),"Best paper finalists"]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[j.toLocaleString()," papers"]})})]})]})]}),t.isLoading?e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:32},children:Array.from({length:4}).map((n,r)=>e.jsxs("div",{children:[e.jsx(f,{className:"h-8 w-1/3 mb-4"}),e.jsx("div",{className:"tag-grid",children:Array.from({length:6}).map((o,l)=>e.jsx(f,{className:"h-24"},l))})]},r))}):i.map(n=>{const r=n.tasks;if(r.length===0)return null;const o=r.reduce((l,d)=>l+(d.paper_count||0),0);return e.jsxs("section",{style:{marginBottom:48},children:[e.jsxs("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:24,paddingBottom:12,borderBottom:"1px solid var(--hairline-strong)"},children:[e.jsxs("div",{children:[e.jsx("h2",{style:{fontFamily:"var(--serif)",fontSize:26,fontWeight:500,letterSpacing:"-0.02em",marginBottom:4},children:n.name}),n.description&&e.jsx("div",{style:{fontFamily:"var(--serif)",fontStyle:"italic",fontSize:13,color:"var(--ink-soft)"},children:n.description})]}),e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",whiteSpace:"nowrap"},children:[r.length," ",r.length===1?"task":"tasks"," · ",o.toLocaleString()," papers"]})]}),e.jsx("div",{className:"tag-grid",children:r.map(l=>{const d=l.slug||"",x=B(C(d));return e.jsxs(p,{to:`/conferences/${a}/${d}`,className:"tag-cell",children:[e.jsxs("div",{className:"name",children:[e.jsx("span",{className:"dot",style:{background:x.dot}}),E(l.name,d)]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[(l.paper_count??0).toLocaleString()," papers"]})})]},l.id)})})]},n.id)}),v>0&&e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",marginTop:24},children:[v," tasks across ",i.filter(n=>n.tasks.length>0).length," areas."]})]})};export{re as default}; +import{u as L,r as D,j as e,L as p}from"./index-B7UoLEbn.js";import{u as T}from"./useQuery-DV2f4JpC.js";import{M as F}from"./MarkdownText-DH4XnT47.js";import{c as A}from"./catalog-DcbS_7_L.js";import{c as B,h as C,d as E}from"./colors-COYRNy-F.js";import{S as f}from"./skeleton-DLsINbKq.js";import{A as P,a as z}from"./alert-B3UHHG00.js";import{s as M}from"./safeExternalHref-CkBrsh84.js";/* empty css */import"./PaperPreviewLink-C5ianbW8.js";import"./index-tHVWANW1.js";import"./index-ClEBI70O.js";import"./katex-DkKDou_j.js";import"./hover-card-BM8a6wEE.js";import"./paperQueryKeys-BP2E-0yf.js";import"./papers-Ctf2uv0o.js";import"./useMutation-CuaM6sOT.js";const R=a=>(a==null?void 0:a.trim().toLowerCase().replace(/[\s_]+/g,"-"))??"",O=(a,t)=>{if(!a)return null;const i=new Date(`${a}T00:00:00`),s=t?new Date(`${t}T00:00:00`):null,c=g=>g.toLocaleDateString("en-US",{month:"long",day:"numeric"}),m=i.getFullYear();return s&&s.getTime()!==i.getTime()?i.getMonth()===s.getMonth()?`${c(i).replace(/\d+$/,"").trim()} ${i.getDate()}–${s.getDate()}, ${m}`:`${c(i)} – ${c(s)}, ${m}`:`${c(i)}, ${m}`},re=()=>{var k,S,b,_,$,w;const{confSlug:a}=L(),t=T({queryKey:["conference-areas-with-tasks",a],queryFn:()=>A.conferenceAreasWithTasks(a),enabled:!!a,staleTime:10*60*1e3}),i=D.useMemo(()=>{if(!t.data)return[];const n={general:0,vision:1,video:2,language:3,audio:4,other:5},r=o=>n[R(o)]??999;return[...t.data.results].sort((o,l)=>{const d=r(o.name),x=r(l.name);return d!==x?d-x:o.name.localeCompare(l.name)})},[t.data]),s=(k=t.data)==null?void 0:k.conference,c=((S=t.data)==null?void 0:S.total_paper_count)??0,m=((b=t.data)==null?void 0:b.oral_paper_count)??0,g=((_=t.data)==null?void 0:_.spotlight_paper_count)??0,u=(($=t.data)==null?void 0:$.outstanding_paper_count)??0,j=((w=t.data)==null?void 0:w.best_paper_finalist_paper_count)??0,v=i.reduce((n,r)=>n+r.tasks.length,0);if(t.error)return e.jsx("div",{className:"page",children:e.jsx(P,{variant:"destructive",children:e.jsx(z,{children:"Failed to load conference. Please try again."})})});const y=s?O(s.start_date,s.end_date):null,N=s?[s.venue,s.location].filter(Boolean).join(", "):null,h=s==null?void 0:s.name;return e.jsxs("div",{className:"page",children:[e.jsxs("div",{className:s!=null&&s.image_url?"task-hero-grid":void 0,children:[e.jsxs("div",{children:[e.jsx("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--accent-text)",letterSpacing:"0.1em",marginBottom:8},children:"CONFERENCE"}),e.jsx("h1",{className:"feed-title",children:h??e.jsx(f,{className:"h-10 w-64 inline-block"})}),e.jsxs("div",{className:"feed-subtitle",style:{display:"flex",flexDirection:"column",gap:4},children:[y&&e.jsx("span",{children:y}),N&&e.jsx("span",{children:N}),(s==null?void 0:s.url)&&e.jsx("a",{href:M(s.url)??void 0,target:"_blank",rel:"noopener noreferrer",style:{color:"var(--accent-text)"},children:s.url.replace(/^https?:\/\//,"")}),(s==null?void 0:s.hf_url)&&e.jsxs("a",{className:"bm-action-btn",href:s.hf_url,target:"_blank",rel:"noopener noreferrer",style:{alignSelf:"flex-start",marginTop:4},children:[e.jsx("span",{"aria-hidden":"true",children:"🤗"})," View on Hugging Face"]})]}),(s==null?void 0:s.description)&&e.jsx(F,{className:"method-description",text:s.description})]}),(s==null?void 0:s.image_url)&&e.jsxs("figure",{className:"task-figure-card",children:[e.jsx("div",{className:"task-figure-img-wrap",children:e.jsx("img",{className:"task-figure-img",src:s.image_url,alt:h?`${h} visual`:"Conference visual",onError:n=>{var r,o;(o=(r=n.currentTarget.parentElement)==null?void 0:r.parentElement)==null||o.style.setProperty("display","none")}})}),e.jsxs("figcaption",{children:["Figure · ",h??"Conference",s.image_credit&&e.jsxs(e.Fragment,{children:[e.jsx("br",{}),e.jsx(F,{className:"task-image-credit",text:s.image_credit})]})]})]})]}),!t.isLoading&&c>0&&e.jsxs("section",{style:{marginTop:48,marginBottom:48},children:[e.jsxs("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:24,paddingBottom:12,borderBottom:"1px solid var(--hairline-strong)"},children:[e.jsxs("div",{children:[e.jsx("h2",{style:{fontFamily:"var(--serif)",fontSize:26,fontWeight:500,letterSpacing:"-0.02em",marginBottom:4},children:"Browse papers"}),e.jsx("div",{style:{fontFamily:"var(--serif)",fontStyle:"italic",fontSize:13,color:"var(--ink-soft)"},children:"All accepted papers, plus oral, spotlight, outstanding, and best paper finalists."})]}),e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",whiteSpace:"nowrap"},children:[c.toLocaleString()," papers"]})]}),e.jsxs("div",{className:"tag-grid",children:[e.jsxs(p,{to:`/conferences/${a}/all`,className:"tag-cell",children:[e.jsxs("div",{className:"name",children:[e.jsx("span",{className:"dot",style:{background:"var(--accent)"}}),"All papers"]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[c.toLocaleString()," papers"]})})]}),m>0&&e.jsxs(p,{to:`/conferences/${a}/oral`,className:"tag-cell",children:[e.jsxs("div",{className:"name",children:[e.jsx("span",{className:"dot",style:{background:"#fdbb02"}}),"Oral papers"]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[m.toLocaleString()," papers"]})})]}),g>0&&e.jsxs(p,{to:`/conferences/${a}/spotlight`,className:"tag-cell",children:[e.jsxs("div",{className:"name",children:[e.jsx("span",{className:"dot",style:{background:"#fdbb02"}}),"Spotlight papers"]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[g.toLocaleString()," papers"]})})]}),u>0&&e.jsxs(p,{to:`/conferences/${a}/outstanding`,className:"tag-cell",children:[e.jsxs("div",{className:"name",children:[e.jsx("span",{className:"dot",style:{background:"#c45c26"}}),"Outstanding papers"]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[u.toLocaleString()," papers"]})})]}),j>0&&e.jsxs(p,{to:`/conferences/${a}/best-paper-finalists`,className:"tag-cell",children:[e.jsxs("div",{className:"name",children:[e.jsx("span",{className:"dot",style:{background:"#c9a227"}}),"Best paper finalists"]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[j.toLocaleString()," papers"]})})]})]})]}),t.isLoading?e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:32},children:Array.from({length:4}).map((n,r)=>e.jsxs("div",{children:[e.jsx(f,{className:"h-8 w-1/3 mb-4"}),e.jsx("div",{className:"tag-grid",children:Array.from({length:6}).map((o,l)=>e.jsx(f,{className:"h-24"},l))})]},r))}):i.map(n=>{const r=n.tasks;if(r.length===0)return null;const o=r.reduce((l,d)=>l+(d.paper_count||0),0);return e.jsxs("section",{style:{marginBottom:48},children:[e.jsxs("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:24,paddingBottom:12,borderBottom:"1px solid var(--hairline-strong)"},children:[e.jsxs("div",{children:[e.jsx("h2",{style:{fontFamily:"var(--serif)",fontSize:26,fontWeight:500,letterSpacing:"-0.02em",marginBottom:4},children:n.name}),n.description&&e.jsx("div",{style:{fontFamily:"var(--serif)",fontStyle:"italic",fontSize:13,color:"var(--ink-soft)"},children:n.description})]}),e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",whiteSpace:"nowrap"},children:[r.length," ",r.length===1?"task":"tasks"," · ",o.toLocaleString()," papers"]})]}),e.jsx("div",{className:"tag-grid",children:r.map(l=>{const d=l.slug||"",x=B(C(d));return e.jsxs(p,{to:`/conferences/${a}/${d}`,className:"tag-cell",children:[e.jsxs("div",{className:"name",children:[e.jsx("span",{className:"dot",style:{background:x.dot}}),E(l.name,d)]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[(l.paper_count??0).toLocaleString()," papers"]})})]},l.id)})})]},n.id)}),v>0&&e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",marginTop:24},children:[v," tasks across ",i.filter(n=>n.tasks.length>0).length," areas."]})]})};export{re as default}; diff --git a/assets/ConferenceTaskView-B3KC6Cjp.js b/assets/ConferenceTaskView-GaHTKHQE.js similarity index 84% rename from assets/ConferenceTaskView-B3KC6Cjp.js rename to assets/ConferenceTaskView-GaHTKHQE.js index 49159c67fe4a9ac1783ebff34e57e88ae90d6b78..eb36d0cdc0b40c967c96ed6bc29d84484c791c6e 100644 --- a/assets/ConferenceTaskView-B3KC6Cjp.js +++ b/assets/ConferenceTaskView-GaHTKHQE.js @@ -1 +1 @@ -import{u as $,d as W,r as P,j as e,L as y,F as G}from"./index-CkeK0cDg.js";import{u as M}from"./useQuery-_Fj6Jfzr.js";import{P as J}from"./components-BRrDI9KS.js";import{P as X}from"./PaperFeedFilters-D-Ie3cDx.js";import{a as Y,P as Z,b as ee}from"./PaperDateFilter-qc_JVYg0.js";import{M as h}from"./MarkdownText-DM-IyAfb.js";import{c as z}from"./catalog-DGg7xZLW.js";import{t as se,d as ae}from"./colors-DQ-VN9If.js";import{d as te}from"./usePapers-fMOiVOFB.js";import{u as re}from"./useIntersectionObserver-Bw5JPCeX.js";import{S as ne}from"./skeleton-Cs8haT1C.js";import{A as ie,a as oe}from"./alert-Vt5eE6re.js";import"./paperQueryKeys-BP2E-0yf.js";import"./LatexTitle-DPYNzv63.js";import"./papers-Celoj8_s.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-Vq6DwYpn.js";/* empty css */import"./PaperPreviewLink-CQ27hqZy.js";import"./index-B1_S53Hb.js";import"./index-DqQiSNg1.js";import"./katex-DkKDou_j.js";import"./hover-card-CAN3Vtea.js";import"./useMutation-q-fdM2fm.js";import"./useInfiniteQuery-gdIFpXB_.js";const ce=[["trending","trending"],["date_published","newest"],["citation_count","most cited"]],le=t=>t==="trending"||t==="date_published"||t==="citation_count"?t:"trending",Be=()=>{var A,L,O,T,B,D;const{confSlug:t,taskSlug:n}=$(),[o,u]=W(),w=le(o.get("order_by")),S=o.get("has_code")==="true",k=o.get("has_hf_artifacts")==="true",f=Y(o),I=a=>{const s=new URLSearchParams(o);s.set("order_by",a),u(s)},q=a=>{const s=new URLSearchParams(o);a?s.set("has_code","true"):s.delete("has_code"),u(s)},Q=a=>{const s=new URLSearchParams(o);a?s.set("has_hf_artifacts","true"):s.delete("has_hf_artifacts"),u(s)},R=n==="all",N=n==="oral",_=n==="spotlight",l=n==="outstanding",d=n==="best-paper-finalists",x=l||d,p=R||N||_||l||d,K=p?void 0:n,U=N?"oral":_?"spotlight":l?"outstanding":d?"best_paper_finalist":void 0,m=M({queryKey:["conference",t],queryFn:()=>z.getConference(t),enabled:!!t,staleTime:10*60*1e3}),j=M({queryKey:["task",n],queryFn:()=>z.getTask(n),enabled:!!n&&!p,staleTime:10*60*1e3}),i=te({conferenceSlug:t||"",taskSlug:K,presentation:U,page_size:12,order_by:w,order_dir:"desc",include_resources:!0,has_code:S,has_hf_artifacts:k,start_date:f.startDate,end_date:f.endDate,enabled:!!t}),{targetRef:V,isIntersecting:C}=re({rootMargin:"200px"});P.useEffect(()=>{C&&i.hasNextPage&&!i.isFetchingNextPage&&i.fetchNextPage()},[C,i.hasNextPage,i.isFetchingNextPage]),P.useEffect(()=>{window.scrollTo(0,0)},[t,n]);const v=P.useMemo(()=>{var s;return(((s=i.data)==null?void 0:s.pages)??[]).flatMap(c=>c.results)},[i.data]),b=P.useMemo(()=>v.map(se),[v]),g=R?"All papers":N?"Oral papers":_?"Spotlight papers":l?"Outstanding papers":d?"Best paper finalists":ae(((A=j.data)==null?void 0:A.name)||n||"",((L=j.data)==null?void 0:L.slug)||n),F=((T=(O=i.data)==null?void 0:O.pages[0])==null?void 0:T.count)??((B=m.data)==null?void 0:B.paper_count)??0,r=j.data;return m.error||j.error||i.error?e.jsx("div",{className:"page",children:e.jsx(ie,{variant:"destructive",children:e.jsx(oe,{children:"Failed to load conference papers. Please try again."})})}):e.jsxs("div",{className:"page",children:[e.jsxs("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:[e.jsx(y,{to:"/",children:"Home"}),e.jsx("span",{children:" / "}),e.jsx(y,{to:"/conferences",children:"Conferences"}),e.jsx("span",{children:" / "}),e.jsx(y,{to:`/conferences/${t}`,children:((D=m.data)==null?void 0:D.name)??t}),e.jsx("span",{children:" / "}),e.jsx("span",{children:g})]}),e.jsxs("div",{className:!p&&(r!=null&&r.image_url)?"task-hero-grid":void 0,style:{marginTop:16,marginBottom:28},children:[e.jsxs("div",{children:[e.jsx("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--accent-text)",letterSpacing:"0.1em",marginBottom:8},children:p?"BROWSE PAPERS":"TASK"}),e.jsx("h1",{className:"domain-mega-title",children:g}),l&&t==="iclr-2026"&&e.jsx(h,{className:"task-explainer",text:"ICLR 2026 recognized two Outstanding Papers and one Honorable Mention. [Read the announcement](https://blog.iclr.cc/2026/04/23/announcing-the-iclr-2026-outstanding-papers/)."}),l&&t==="icml-2026"&&e.jsx(h,{className:"task-explainer",text:"ICML 2026 recognized two Outstanding Papers and five Honorable Mentions. [Read the announcement](https://blog.icml.cc/2026/07/05/announcing-the-icml-2026-awards/)."}),d&&t==="cvpr-2026"&&e.jsx(h,{className:"task-explainer",text:"CVPR 2026 recognized fifteen Best Paper Award finalists, including the winners. [Read the announcement](https://x.com/CVPR/status/2062912519522717978)."}),!p&&(r==null?void 0:r.description)&&e.jsx(h,{className:"task-explainer",text:r.description}),m.data&&e.jsxs("div",{className:"task-quickstats",style:{marginTop:12},children:[e.jsxs("span",{children:[e.jsx("span",{className:"num",children:F.toLocaleString()}),"PAPERS"]}),e.jsx("span",{children:m.data.name})]})]}),!p&&(r==null?void 0:r.image_url)&&e.jsxs("figure",{className:"task-figure-card",children:[e.jsx("div",{className:"task-figure-img-wrap",children:e.jsx("img",{className:"task-figure-img",src:r.image_url,alt:`${g} schematic`,onError:a=>{var s,c;(c=(s=a.currentTarget.parentElement)==null?void 0:s.parentElement)==null||c.style.setProperty("display","none")}})}),e.jsxs("figcaption",{children:["Figure · ",g,r.image_credit&&e.jsxs(e.Fragment,{children:[e.jsx("br",{}),e.jsx(h,{className:"task-image-credit",text:r.image_credit})]})]})]})]}),e.jsxs("div",{className:"task-section-head",children:[e.jsx("div",{className:"task-section-eyebrow",children:x?"Award papers":"Conference papers · sort below"}),e.jsxs("div",{className:"task-section-title",children:["Papers ",e.jsxs("span",{className:"meta",children:["[",F.toLocaleString(),"]"]})]})]}),e.jsxs("div",{className:"sort-bar",children:[e.jsxs("div",{className:"paper-feed-toolbar-controls",children:[!x&&e.jsx("div",{className:"sort-options",children:ce.map(([a,s])=>e.jsx("button",{className:`sort-btn ${w===a?"active":""}`,onClick:()=>I(a),children:s},a))}),e.jsx(X,{hasCode:S,hasHfArtifacts:k,onHasCodeChange:q,onHasHfArtifactsChange:Q,showDivider:!x})]}),e.jsx(Z,{startDate:f.startDate,endDate:f.endDate,onChange:a=>u(ee(o,a))}),!x&&e.jsxs("div",{className:"results-count",children:[b.length," loaded in ",e.jsx("span",{children:g})]})]}),i.isLoading?e.jsx("div",{className:"paper-list",children:Array.from({length:4}).map((a,s)=>e.jsx(ne,{className:"h-40 w-full"},s))}):b.length===0?e.jsx("div",{className:"no-results",children:"No papers found for this selection."}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"paper-list",children:b.map((a,s)=>{var E;const c=(E=v[s])==null?void 0:E.conference_award,H=c==="outstanding"?"Outstanding Paper":c==="honorable_mention"?"Honorable Mention":c==="best_paper_finalist"&&!d?"Best Paper Finalist":null;return e.jsxs(G.Fragment,{children:[H&&e.jsx("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--accent-text)",letterSpacing:"0.08em",marginBottom:8},children:H}),e.jsx(J,{paper:a,rank:s+1})]},a.id)})}),e.jsx("div",{ref:V,style:{height:1}}),i.isFetchingNextPage&&e.jsx("div",{style:{padding:"20px 0",textAlign:"center",color:"var(--ink-faint)"},children:"Loading more…"})]})]})};export{Be as default}; +import{u as $,d as W,r as P,j as e,L as y,F as G}from"./index-B7UoLEbn.js";import{u as M}from"./useQuery-DV2f4JpC.js";import{P as J}from"./components-Cax1Inob.js";import{P as X}from"./PaperFeedFilters-CF3OKsFW.js";import{a as Y,P as Z,b as ee}from"./PaperDateFilter-CGG1OZi6.js";import{M as h}from"./MarkdownText-DH4XnT47.js";import{c as z}from"./catalog-DcbS_7_L.js";import{t as se,d as ae}from"./colors-COYRNy-F.js";import{d as te}from"./usePapers-CDuTKuAc.js";import{u as re}from"./useIntersectionObserver-DOCspj7m.js";import{S as ne}from"./skeleton-DLsINbKq.js";import{A as ie,a as oe}from"./alert-B3UHHG00.js";import"./paperQueryKeys-BP2E-0yf.js";import"./LatexTitle-CeC5Gqpu.js";import"./papers-Ctf2uv0o.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-BOnBmrXi.js";/* empty css */import"./PaperPreviewLink-C5ianbW8.js";import"./index-tHVWANW1.js";import"./index-ClEBI70O.js";import"./katex-DkKDou_j.js";import"./hover-card-BM8a6wEE.js";import"./useMutation-CuaM6sOT.js";import"./useInfiniteQuery-CoFrg4GN.js";const ce=[["trending","trending"],["date_published","newest"],["citation_count","most cited"]],le=t=>t==="trending"||t==="date_published"||t==="citation_count"?t:"trending",Be=()=>{var A,L,O,T,B,D;const{confSlug:t,taskSlug:n}=$(),[o,u]=W(),w=le(o.get("order_by")),S=o.get("has_code")==="true",k=o.get("has_hf_artifacts")==="true",f=Y(o),I=a=>{const s=new URLSearchParams(o);s.set("order_by",a),u(s)},q=a=>{const s=new URLSearchParams(o);a?s.set("has_code","true"):s.delete("has_code"),u(s)},Q=a=>{const s=new URLSearchParams(o);a?s.set("has_hf_artifacts","true"):s.delete("has_hf_artifacts"),u(s)},R=n==="all",N=n==="oral",_=n==="spotlight",l=n==="outstanding",d=n==="best-paper-finalists",x=l||d,p=R||N||_||l||d,K=p?void 0:n,U=N?"oral":_?"spotlight":l?"outstanding":d?"best_paper_finalist":void 0,m=M({queryKey:["conference",t],queryFn:()=>z.getConference(t),enabled:!!t,staleTime:10*60*1e3}),j=M({queryKey:["task",n],queryFn:()=>z.getTask(n),enabled:!!n&&!p,staleTime:10*60*1e3}),i=te({conferenceSlug:t||"",taskSlug:K,presentation:U,page_size:12,order_by:w,order_dir:"desc",include_resources:!0,has_code:S,has_hf_artifacts:k,start_date:f.startDate,end_date:f.endDate,enabled:!!t}),{targetRef:V,isIntersecting:C}=re({rootMargin:"200px"});P.useEffect(()=>{C&&i.hasNextPage&&!i.isFetchingNextPage&&i.fetchNextPage()},[C,i.hasNextPage,i.isFetchingNextPage]),P.useEffect(()=>{window.scrollTo(0,0)},[t,n]);const v=P.useMemo(()=>{var s;return(((s=i.data)==null?void 0:s.pages)??[]).flatMap(c=>c.results)},[i.data]),b=P.useMemo(()=>v.map(se),[v]),g=R?"All papers":N?"Oral papers":_?"Spotlight papers":l?"Outstanding papers":d?"Best paper finalists":ae(((A=j.data)==null?void 0:A.name)||n||"",((L=j.data)==null?void 0:L.slug)||n),F=((T=(O=i.data)==null?void 0:O.pages[0])==null?void 0:T.count)??((B=m.data)==null?void 0:B.paper_count)??0,r=j.data;return m.error||j.error||i.error?e.jsx("div",{className:"page",children:e.jsx(ie,{variant:"destructive",children:e.jsx(oe,{children:"Failed to load conference papers. Please try again."})})}):e.jsxs("div",{className:"page",children:[e.jsxs("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:[e.jsx(y,{to:"/",children:"Home"}),e.jsx("span",{children:" / "}),e.jsx(y,{to:"/conferences",children:"Conferences"}),e.jsx("span",{children:" / "}),e.jsx(y,{to:`/conferences/${t}`,children:((D=m.data)==null?void 0:D.name)??t}),e.jsx("span",{children:" / "}),e.jsx("span",{children:g})]}),e.jsxs("div",{className:!p&&(r!=null&&r.image_url)?"task-hero-grid":void 0,style:{marginTop:16,marginBottom:28},children:[e.jsxs("div",{children:[e.jsx("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--accent-text)",letterSpacing:"0.1em",marginBottom:8},children:p?"BROWSE PAPERS":"TASK"}),e.jsx("h1",{className:"domain-mega-title",children:g}),l&&t==="iclr-2026"&&e.jsx(h,{className:"task-explainer",text:"ICLR 2026 recognized two Outstanding Papers and one Honorable Mention. [Read the announcement](https://blog.iclr.cc/2026/04/23/announcing-the-iclr-2026-outstanding-papers/)."}),l&&t==="icml-2026"&&e.jsx(h,{className:"task-explainer",text:"ICML 2026 recognized two Outstanding Papers and five Honorable Mentions. [Read the announcement](https://blog.icml.cc/2026/07/05/announcing-the-icml-2026-awards/)."}),d&&t==="cvpr-2026"&&e.jsx(h,{className:"task-explainer",text:"CVPR 2026 recognized fifteen Best Paper Award finalists, including the winners. [Read the announcement](https://x.com/CVPR/status/2062912519522717978)."}),!p&&(r==null?void 0:r.description)&&e.jsx(h,{className:"task-explainer",text:r.description}),m.data&&e.jsxs("div",{className:"task-quickstats",style:{marginTop:12},children:[e.jsxs("span",{children:[e.jsx("span",{className:"num",children:F.toLocaleString()}),"PAPERS"]}),e.jsx("span",{children:m.data.name})]})]}),!p&&(r==null?void 0:r.image_url)&&e.jsxs("figure",{className:"task-figure-card",children:[e.jsx("div",{className:"task-figure-img-wrap",children:e.jsx("img",{className:"task-figure-img",src:r.image_url,alt:`${g} schematic`,onError:a=>{var s,c;(c=(s=a.currentTarget.parentElement)==null?void 0:s.parentElement)==null||c.style.setProperty("display","none")}})}),e.jsxs("figcaption",{children:["Figure · ",g,r.image_credit&&e.jsxs(e.Fragment,{children:[e.jsx("br",{}),e.jsx(h,{className:"task-image-credit",text:r.image_credit})]})]})]})]}),e.jsxs("div",{className:"task-section-head",children:[e.jsx("div",{className:"task-section-eyebrow",children:x?"Award papers":"Conference papers · sort below"}),e.jsxs("div",{className:"task-section-title",children:["Papers ",e.jsxs("span",{className:"meta",children:["[",F.toLocaleString(),"]"]})]})]}),e.jsxs("div",{className:"sort-bar",children:[e.jsxs("div",{className:"paper-feed-toolbar-controls",children:[!x&&e.jsx("div",{className:"sort-options",children:ce.map(([a,s])=>e.jsx("button",{className:`sort-btn ${w===a?"active":""}`,onClick:()=>I(a),children:s},a))}),e.jsx(X,{hasCode:S,hasHfArtifacts:k,onHasCodeChange:q,onHasHfArtifactsChange:Q,showDivider:!x})]}),e.jsx(Z,{startDate:f.startDate,endDate:f.endDate,onChange:a=>u(ee(o,a))}),!x&&e.jsxs("div",{className:"results-count",children:[b.length," loaded in ",e.jsx("span",{children:g})]})]}),i.isLoading?e.jsx("div",{className:"paper-list",children:Array.from({length:4}).map((a,s)=>e.jsx(ne,{className:"h-40 w-full"},s))}):b.length===0?e.jsx("div",{className:"no-results",children:"No papers found for this selection."}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"paper-list",children:b.map((a,s)=>{var E;const c=(E=v[s])==null?void 0:E.conference_award,H=c==="outstanding"?"Outstanding Paper":c==="honorable_mention"?"Honorable Mention":c==="best_paper_finalist"&&!d?"Best Paper Finalist":null;return e.jsxs(G.Fragment,{children:[H&&e.jsx("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--accent-text)",letterSpacing:"0.08em",marginBottom:8},children:H}),e.jsx(J,{paper:a,rank:s+1})]},a.id)})}),e.jsx("div",{ref:V,style:{height:1}}),i.isFetchingNextPage&&e.jsx("div",{style:{padding:"20px 0",textAlign:"center",color:"var(--ink-faint)"},children:"Loading more…"})]})]})};export{Be as default}; diff --git a/assets/ConferencesIndexView-BAG6HQgJ.js b/assets/ConferencesIndexView-VSV18uHC.js similarity index 85% rename from assets/ConferencesIndexView-BAG6HQgJ.js rename to assets/ConferencesIndexView-VSV18uHC.js index 4e2d30e96f2f5e91a5cb0f3623e3e4c91a8b63eb..d43a26519a4b621fb466ddf7452016e3e38975f0 100644 --- a/assets/ConferencesIndexView-BAG6HQgJ.js +++ b/assets/ConferencesIndexView-VSV18uHC.js @@ -1 +1 @@ -import{r as p,j as e,L as d}from"./index-CkeK0cDg.js";import{u}from"./useQuery-_Fj6Jfzr.js";import{c as f}from"./catalog-DGg7xZLW.js";import{S as m}from"./skeleton-Cs8haT1C.js";import{A as h,a as g}from"./alert-Vt5eE6re.js";import{T as x}from"./TaxonomySuggestionTile-BltCio9I.js";import"./SignInToEditDialog-CmfnGty-.js";import"./button-CsUrN-GU.js";import"./input-Cnu30n0B.js";import"./textarea-BsaJyP0o.js";import"./searchable-select-DT-5KDJe.js";import"./popover-Vq6DwYpn.js";import"./dialog-CGH-CTnE.js";import"./loader-circle-CTuL2Xdc.js";import"./useMutation-q-fdM2fm.js";import"./submissions-C-uglc0y.js";import"./plus-BaTMbqcZ.js";const j=(r,a)=>{if(!r)return null;const t=new Date(`${r}T00:00:00`),s=a?new Date(`${a}T00:00:00`):null,n=o=>o.toLocaleDateString("en-US",{month:"long",day:"numeric"}),i=t.getFullYear();return s&&s.getTime()!==t.getTime()?t.getMonth()===s.getMonth()?`${n(t).replace(/\d+$/,"").trim()} ${t.getDate()}–${s.getDate()}, ${i}`:`${n(t)} – ${n(s)}, ${i}`:`${n(t)}, ${i}`},v=r=>{var t;if(r.year!=null)return r.year;if(r.start_date)return Number(r.start_date.slice(0,4));const a=(t=r.slug.match(/-(\d{4})$/))==null?void 0:t[1];return a?Number(a):0},y=(r,a)=>{if(r.start_date&&a.start_date){const t=r.start_date.localeCompare(a.start_date);if(t!==0)return t}else{if(r.start_date)return-1;if(a.start_date)return 1}return r.name.localeCompare(a.name)},N={display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:24,paddingBottom:12,borderBottom:"1px solid var(--hairline-strong)"},z=()=>{const r=u({queryKey:["conferences"],queryFn:()=>f.conferences(),staleTime:6e5}),a=p.useMemo(()=>{var s;if(!((s=r.data)!=null&&s.results))return null;const t={};return r.data.results.forEach(n=>{const i=v(n);(t[i]||(t[i]=[])).push(n)}),Object.values(t).forEach(n=>n.sort(y)),Object.keys(t).map(Number).sort((n,i)=>i-n).map(n=>({year:n,conferences:t[n]}))},[r.data]);return r.error?e.jsx("div",{className:"page",children:e.jsx(h,{variant:"destructive",children:e.jsx(g,{children:"Failed to load conferences. Please try again."})})}):e.jsxs("div",{className:"page",children:[e.jsx("div",{className:"feed-header",children:e.jsxs("div",{children:[e.jsxs("h1",{className:"feed-title",children:["All ",e.jsx("em",{children:"Conferences"})]}),e.jsx("div",{className:"feed-subtitle",children:"Browse accepted papers from major AI conferences, grouped by research area and task."}),e.jsxs("div",{className:"conference-deadlines-link",children:["Find deadlines for upcoming conferences"," ",e.jsx(d,{to:"/ai-deadlines",className:"underline underline-offset-2 hover:text-foreground",children:"here"}),". Conference information is based on"," ",e.jsx("a",{href:"https://huggingface.co/ai-conferences",target:"_blank",rel:"noreferrer",className:"underline underline-offset-2 hover:text-foreground",children:"Hugging Face AI Conferences"}),"."]})]})}),r.isLoading?e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:32},children:Array.from({length:2}).map((t,s)=>e.jsxs("div",{children:[e.jsx(m,{className:"h-8 w-24 mb-4"}),e.jsx("div",{className:"tag-grid",children:Array.from({length:3}).map((n,i)=>e.jsx(m,{className:"h-32"},i))})]},s))}):a==null?void 0:a.map(({year:t,conferences:s})=>{const n=s.reduce((o,l)=>o+(l.paper_count??0),0),i=t>0?String(t):"Unknown year";return e.jsxs("section",{style:{marginBottom:48},children:[e.jsxs("div",{style:N,children:[e.jsx("div",{children:e.jsx("h2",{style:{fontFamily:"var(--serif)",fontSize:26,fontWeight:500,letterSpacing:"-0.02em",marginBottom:4},children:i})}),e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",whiteSpace:"nowrap"},children:[s.length," ",s.length===1?"conference":"conferences"," ·"," ",n.toLocaleString()," papers"]})]}),e.jsxs("div",{className:"tag-grid",children:[s.map(o=>{const l=j(o.start_date,o.end_date),c=[o.venue,o.location].filter(Boolean).join(", ");return e.jsxs(d,{to:`/conferences/${o.slug}`,className:"tag-cell",children:[e.jsx("div",{className:"name",children:o.name}),e.jsxs("div",{className:"meta",style:{display:"flex",flexDirection:"column",gap:4},children:[l&&e.jsx("span",{children:l}),c&&e.jsx("span",{children:c}),e.jsxs("span",{children:[(o.paper_count??0).toLocaleString()," papers"]})]})]},o.id)}),e.jsx(x,{kind:"conference"})]})]},t)})]})};export{z as default}; +import{r as p,j as e,L as d}from"./index-B7UoLEbn.js";import{u}from"./useQuery-DV2f4JpC.js";import{c as f}from"./catalog-DcbS_7_L.js";import{S as m}from"./skeleton-DLsINbKq.js";import{A as h,a as g}from"./alert-B3UHHG00.js";import{T as x}from"./TaxonomySuggestionTile-DX_yob8h.js";import"./SignInToEditDialog-BzeqSUHr.js";import"./button-D543yAN8.js";import"./input-hdt3aF12.js";import"./textarea-CpxVQZTZ.js";import"./searchable-select-CceG4fY6.js";import"./popover-BOnBmrXi.js";import"./dialog-BECDhHRn.js";import"./loader-circle-hbMX20oF.js";import"./useMutation-CuaM6sOT.js";import"./submissions-BTKMKNWZ.js";import"./plus-BvN48Xkz.js";const j=(r,a)=>{if(!r)return null;const t=new Date(`${r}T00:00:00`),s=a?new Date(`${a}T00:00:00`):null,n=o=>o.toLocaleDateString("en-US",{month:"long",day:"numeric"}),i=t.getFullYear();return s&&s.getTime()!==t.getTime()?t.getMonth()===s.getMonth()?`${n(t).replace(/\d+$/,"").trim()} ${t.getDate()}–${s.getDate()}, ${i}`:`${n(t)} – ${n(s)}, ${i}`:`${n(t)}, ${i}`},v=r=>{var t;if(r.year!=null)return r.year;if(r.start_date)return Number(r.start_date.slice(0,4));const a=(t=r.slug.match(/-(\d{4})$/))==null?void 0:t[1];return a?Number(a):0},y=(r,a)=>{if(r.start_date&&a.start_date){const t=r.start_date.localeCompare(a.start_date);if(t!==0)return t}else{if(r.start_date)return-1;if(a.start_date)return 1}return r.name.localeCompare(a.name)},N={display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:24,paddingBottom:12,borderBottom:"1px solid var(--hairline-strong)"},z=()=>{const r=u({queryKey:["conferences"],queryFn:()=>f.conferences(),staleTime:6e5}),a=p.useMemo(()=>{var s;if(!((s=r.data)!=null&&s.results))return null;const t={};return r.data.results.forEach(n=>{const i=v(n);(t[i]||(t[i]=[])).push(n)}),Object.values(t).forEach(n=>n.sort(y)),Object.keys(t).map(Number).sort((n,i)=>i-n).map(n=>({year:n,conferences:t[n]}))},[r.data]);return r.error?e.jsx("div",{className:"page",children:e.jsx(h,{variant:"destructive",children:e.jsx(g,{children:"Failed to load conferences. Please try again."})})}):e.jsxs("div",{className:"page",children:[e.jsx("div",{className:"feed-header",children:e.jsxs("div",{children:[e.jsxs("h1",{className:"feed-title",children:["All ",e.jsx("em",{children:"Conferences"})]}),e.jsx("div",{className:"feed-subtitle",children:"Browse accepted papers from major AI conferences, grouped by research area and task."}),e.jsxs("div",{className:"conference-deadlines-link",children:["Find deadlines for upcoming conferences"," ",e.jsx(d,{to:"/ai-deadlines",className:"underline underline-offset-2 hover:text-foreground",children:"here"}),". Conference information is based on"," ",e.jsx("a",{href:"https://huggingface.co/ai-conferences",target:"_blank",rel:"noreferrer",className:"underline underline-offset-2 hover:text-foreground",children:"Hugging Face AI Conferences"}),"."]})]})}),r.isLoading?e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:32},children:Array.from({length:2}).map((t,s)=>e.jsxs("div",{children:[e.jsx(m,{className:"h-8 w-24 mb-4"}),e.jsx("div",{className:"tag-grid",children:Array.from({length:3}).map((n,i)=>e.jsx(m,{className:"h-32"},i))})]},s))}):a==null?void 0:a.map(({year:t,conferences:s})=>{const n=s.reduce((o,l)=>o+(l.paper_count??0),0),i=t>0?String(t):"Unknown year";return e.jsxs("section",{style:{marginBottom:48},children:[e.jsxs("div",{style:N,children:[e.jsx("div",{children:e.jsx("h2",{style:{fontFamily:"var(--serif)",fontSize:26,fontWeight:500,letterSpacing:"-0.02em",marginBottom:4},children:i})}),e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",whiteSpace:"nowrap"},children:[s.length," ",s.length===1?"conference":"conferences"," ·"," ",n.toLocaleString()," papers"]})]}),e.jsxs("div",{className:"tag-grid",children:[s.map(o=>{const l=j(o.start_date,o.end_date),c=[o.venue,o.location].filter(Boolean).join(", ");return e.jsxs(d,{to:`/conferences/${o.slug}`,className:"tag-cell",children:[e.jsx("div",{className:"name",children:o.name}),e.jsxs("div",{className:"meta",style:{display:"flex",flexDirection:"column",gap:4},children:[l&&e.jsx("span",{children:l}),c&&e.jsx("span",{children:c}),e.jsxs("span",{children:[(o.paper_count??0).toLocaleString()," papers"]})]})]},o.id)}),e.jsx(x,{kind:"conference"})]})]},t)})]})};export{z as default}; diff --git a/assets/CronDashboard-Da9cHEaM.js b/assets/CronDashboard-Da9cHEaM.js new file mode 100644 index 0000000000000000000000000000000000000000..33609ae4328126800dc05604bc2cc09fd916f13d --- /dev/null +++ b/assets/CronDashboard-Da9cHEaM.js @@ -0,0 +1,51 @@ +import{g as D,r as h,z as rs,q as ns,j as e,p as le,a1 as ts,R as is,I as cs,t as me,P as ls,w as ds,B as Re,x as T,m as Fe,L as xe,a as os,f as ms}from"./index-B7UoLEbn.js";import{u as X}from"./useQuery-DV2f4JpC.js";import{f,A as ie,C as v,a as b,b as y,c as q,d as _,o as ve}from"./operations-GXAv7423.js";import{B as S}from"./badge-BieMUBSb.js";import{B as C}from"./button-D543yAN8.js";import{C as us}from"./chevron-down-CF7sS93G.js";import{D as _e,r as hs,f as xs,h as ps,j as gs,p as js,k as vs,A as _s,l as fs}from"./codexAddEvals-Qz9YXTVy.js";import{T as Ns}from"./trending-up-DOtHjkBv.js";import{F as fe}from"./file-text-CXhRvAOE.js";import{S as Ae}from"./shield-alert-BnMa8lt8.js";import{E as ee}from"./external-link-mpf7SsAF.js";import{C as se,R as Ne}from"./refresh-cw-Gb7Np-Ie.js";import{L as I}from"./loader-circle-hbMX20oF.js";import{C as pe}from"./circle-check-CDmFoooL.js";import{u as O}from"./useMutation-CuaM6sOT.js";import{u as bs}from"./useInfiniteQuery-CoFrg4GN.js";import{p as Te}from"./paperEdits-C__t4BOQ.js";import{c as ue}from"./catalog-DcbS_7_L.js";import{c as be}from"./chat-B6IGPjTl.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 ye=D("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 ys=D("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 ks=D("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 ws=D("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 Cs=D("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 Ss=D("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 Ee=D("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 $s=D("FileClock",[["path",{d:"M16 22h2a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v3",key:"37hlfg"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["circle",{cx:"8",cy:"16",r:"6",key:"10v15b"}],["path",{d:"M9.5 17.5 8 16.25V14",key:"1o80t2"}]]);/** + * @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 Ls=D("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 Me=D("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"}]]);var de="Tabs",[Ps]=ds(de,[Re]),qe=Re(),[Rs,ge]=Ps(de),Ie=h.forwardRef((s,a)=>{const{__scopeTabs:n,value:t,onValueChange:i,defaultValue:d,orientation:p="horizontal",dir:N,activationMode:k="automatic",...m}=s,c=rs(N),[u,w]=ns({prop:t,onChange:i,defaultProp:d??"",caller:de});return e.jsx(Rs,{scope:n,baseId:ts(),value:u,onValueChange:w,orientation:p,dir:c,activationMode:k,children:e.jsx(le.div,{dir:c,"data-orientation":p,...m,ref:a})})});Ie.displayName=de;var De="TabsList",Oe=h.forwardRef((s,a)=>{const{__scopeTabs:n,loop:t=!0,...i}=s,d=ge(De,n),p=qe(n);return e.jsx(is,{asChild:!0,...p,orientation:d.orientation,dir:d.dir,loop:t,children:e.jsx(le.div,{role:"tablist","aria-orientation":d.orientation,...i,ref:a})})});Oe.displayName=De;var Je="TabsTrigger",Be=h.forwardRef((s,a)=>{const{__scopeTabs:n,value:t,disabled:i=!1,...d}=s,p=ge(Je,n),N=qe(n),k=We(p.baseId,t),m=ze(p.baseId,t),c=t===p.value;return e.jsx(cs,{asChild:!0,...N,focusable:!i,active:c,children:e.jsx(le.button,{type:"button",role:"tab","aria-selected":c,"aria-controls":m,"data-state":c?"active":"inactive","data-disabled":i?"":void 0,disabled:i,id:k,...d,ref:a,onMouseDown:me(s.onMouseDown,u=>{!i&&u.button===0&&u.ctrlKey===!1?p.onValueChange(t):u.preventDefault()}),onKeyDown:me(s.onKeyDown,u=>{[" ","Enter"].includes(u.key)&&p.onValueChange(t)}),onFocus:me(s.onFocus,()=>{const u=p.activationMode!=="manual";!c&&!i&&u&&p.onValueChange(t)})})})});Be.displayName=Je;var He="TabsContent",Ue=h.forwardRef((s,a)=>{const{__scopeTabs:n,value:t,forceMount:i,children:d,...p}=s,N=ge(He,n),k=We(N.baseId,t),m=ze(N.baseId,t),c=t===N.value,u=h.useRef(c);return h.useEffect(()=>{const w=requestAnimationFrame(()=>u.current=!1);return()=>cancelAnimationFrame(w)},[]),e.jsx(ls,{present:i||c,children:({present:w})=>e.jsx(le.div,{"data-state":c?"active":"inactive","data-orientation":N.orientation,role:"tabpanel","aria-labelledby":k,hidden:!w,id:m,tabIndex:0,...p,ref:a,style:{...s.style,animationDuration:u.current?"0s":void 0},children:w&&d})})});Ue.displayName=He;function We(s,a){return`${s}-trigger-${a}`}function ze(s,a){return`${s}-content-${a}`}var Fs=Ie,Ge=Oe,Ke=Be,Ve=Ue;const As=Fs,Qe=h.forwardRef(({className:s,...a},n)=>e.jsx(Ge,{ref:n,className:T("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",s),...a}));Qe.displayName=Ge.displayName;const G=h.forwardRef(({className:s,...a},n)=>e.jsx(Ke,{ref:n,className:T("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}));G.displayName=Ke.displayName;const K=h.forwardRef(({className:s,...a},n)=>e.jsx(Ve,{ref:n,className:T("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",s),...a}));K.displayName=Ve.displayName;function ce(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 Xe(s){return s.available?s.status==="completed"?s.conclusion??"completed":s.status??"unknown":"Unavailable"}function Z(s){return s.replace(/_/g," ").replace(/\b\w/g,a=>a.toUpperCase())}const P=s=>`$${s.toFixed(2)}`;function ke({title:s,budget:a,profile:n}){const t=a.cost_policy==="unmetered_hf"||a.budget_enforced===!1,i=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:[P(a.unknown_terminal_reservation_usd??0)," · ",(a.unknown_terminal_reservation_count??0).toLocaleString()," jobs"]})]})]}),n&&e.jsxs("div",{className:"text-xs cron-muted",children:["Profile ",e.jsx("strong",{children:n.profile_id})," · max ",n.max_papers.toLocaleString()," papers · hard ",ce(n.hard_timeout_seconds)," · soft ",ce(n.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 Ts={healthy:pe,degraded:Me,broken:se,running:I,stuck:se,unknown:ks};function Es({status:s,isRunning:a}){const n=a?"running":s,t=Ts[n];return e.jsx(t,{className:`cron-status-icon cron-status--${n}${n==="running"?" animate-spin":""}`})}function we({label:s,axis:a}){return e.jsxs(S,{variant:"outline",className:`cron-status--${a.status}`,title:a.reason,children:[s,": ",a.status]})}function Ce({icon:s,title:a,metrics:n}){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(n).map(([t,i])=>e.jsxs("div",{className:"cron-metric-card",children:[e.jsx("div",{className:"cron-label",children:Z(t)}),e.jsx("div",{className:"text-lg font-semibold",children:typeof i=="number"?i.toLocaleString():i})]},t))})]})}function Ms({workflow:s}){return e.jsxs("div",{children:[e.jsxs("div",{className:"cron-section-heading",children:[e.jsx(ie,{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",Xe(s)],...s.updated_at?[["Updated",f(s.updated_at)]]:[]].map(([a,n])=>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:n})]},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(S,{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,n])=>e.jsxs(S,{variant:"outline",children:[a,": ",n??"running"]},a))})]}),(s.error||s.view_error)&&e.jsx("div",{className:"cron-message cron-message--error",children:s.error??s.view_error})]})]})}function qs(s){return s==="COMPLETED"?"cron-status--healthy":s==="ERROR"||s==="CANCELED"?"cron-status--broken":s==="RUNNING"?"cron-status--running":"cron-status--unknown"}function Se(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 Is({job:s}){const a=s.progress,n=(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(S,{variant:"outline",className:qs(s.stage),children:s.stage.toLowerCase()}),s.effective_outcome&&e.jsxs(S,{variant:"outline",className:Se(s.effective_outcome),children:["output: ",s.effective_outcome.replace(/_/g," ")]}),s.failure_cause&&e.jsxs(S,{variant:"outline",className:Se(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(ee,{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"]})]}),n>0&&e.jsxs("div",{className:"text-xs cron-muted",children:[e.jsx("strong",{children:n.toLocaleString()})," unresolved image references omitted after final retry"]}),a.updated_at&&e.jsxs("div",{className:"text-xs cron-muted",children:["Progress updated ",f(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(i=>e.jsxs("div",{children:[e.jsx("span",{className:"font-mono",children:i.arxiv_id}),": ",i.error]},`${i.arxiv_id}:${i.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 ",f(s.created_at)]}),s.duration_seconds!=null&&e.jsxs("span",{children:["Duration ",ce(s.duration_seconds)]})]}),s.stage_message&&e.jsx("div",{className:"cron-message cron-message--warning",children:s.stage_message})]})}function Ds({monitor:s,loading:a,error:n}){var t,i;return e.jsxs("div",{className:"md:col-span-2",children:[e.jsxs("div",{className:"cron-section-heading",children:[e.jsx(Ls,{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(I,{className:"h-4 w-4 animate-spin"})," Loading remote Jobs…"]}),!!n&&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(ke,{title:"Live paper Markdown GPU policy",budget:s.budgets.live,profile:(t=s.selected_profiles)==null?void 0:t.live}),e.jsx(ke,{title:"Full backfill GPU policy",budget:s.budgets.backfill,profile:(i=s.selected_profiles)==null?void 0:i.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,p])=>e.jsxs("div",{className:"cron-metric-card",children:[e.jsx("div",{className:"cron-label",children:Z(d)}),e.jsx("div",{className:"text-lg font-semibold",children:p.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(Is,{job:d},d.id))})]})]})}function Os({job:s,expanded:a,onToggle:n,paperMarkdownJobs:t,paperMarkdownJobsLoading:i=!1,paperMarkdownJobsError:d=null}){const p=!!(s.work_metrics&&Object.keys(s.work_metrics).length),N=!!(s.db_metrics&&Object.keys(s.db_metrics).length),k=s.job_name==="paper_markdown_backfill",m=k?t==null?void 0:t.budgets.live:void 0,c=(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:n,"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(Es,{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(S,{variant:"outline",className:"text-[10px] uppercase tracking-wide",children:"Critical"}),s.lock_stale&&e.jsx(S,{variant:"outline",className:"cron-status--broken",children:"Held lock"}),e.jsx(we,{label:"Execution",axis:s.execution_health}),e.jsx(we,{label:"Output",axis:s.output_health}),a?e.jsx(ys,{className:"h-4 w-4 cron-muted"}):e.jsx(us,{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(Ee,{}),"Log: ",f(s.last_run)]}),e.jsxs("span",{className:"cron-fact",children:[e.jsx(_e,{}),"DB: ",f(s.last_db_write)]}),s.recent_write_count!=null&&e.jsxs("span",{className:"cron-fact",children:[e.jsx(Ns,{}),"Recent writes: ",s.recent_write_count.toLocaleString()]}),s.duration!=null&&e.jsxs("span",{className:"cron-fact",children:[e.jsx(ie,{}),"Duration: ",ce(s.duration)]}),s.schedule&&e.jsxs("span",{className:"cron-fact md:col-span-2",children:[e.jsx(ye,{}),e.jsx("span",{className:"font-mono text-xs",children:s.schedule})]}),s.log_status&&e.jsxs("span",{className:"cron-fact",children:[e.jsx(fe,{}),"Log status: ",s.log_status]}),s.workflow_status&&e.jsxs("span",{className:"cron-fact",children:[e.jsx(ie,{}),"Actions: ",Xe(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:"})," ",c?"unmetered on HF":`${P(m.current_exposure_usd)} current / ${P(m.ceiling_usd)} cap`," · ",m.affordable_jobs," of ",m.desired_jobs," planned",c?"":` · projects ${P(m.projected_usd)} · rolling 30 days`]})]})]}),e.jsx(S,{variant:"outline",className:`cron-status--${s.status}`,children:s.status})]})}),a&&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(ye,{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",f(s.execution_health.last_expected_at??null)],["Last started",f(s.execution_health.last_started_at??null)],["Last completed",f(s.execution_health.last_completed_at??null)],["Next expected",f(s.execution_health.next_expected_at??null)]].map(([u,w])=>e.jsxs("div",{className:"flex items-center justify-between gap-3",children:[e.jsx("span",{className:"cron-label",children:u}),e.jsx("span",{children:w})]},u))})]}),s.work_metrics&&p&&e.jsx(Ce,{icon:fe,title:"Log Metrics",metrics:s.work_metrics}),s.db_metrics&&N&&e.jsx(Ce,{icon:_e,title:"Database Metrics",metrics:s.db_metrics}),s.workflow_status&&e.jsx(Ms,{workflow:s.workflow_status}),k&&e.jsx(Ds,{monitor:t,loading:i,error:d}),s.diagnostic_groups&&Object.values(s.diagnostic_groups).some(u=>u.length>0)&&e.jsxs("div",{className:"md:col-span-2",children:[e.jsxs("div",{className:"cron-section-heading",children:[e.jsx(Me,{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(([,u])=>u.length>0).map(([u,w])=>e.jsxs("div",{className:"cron-metric-card",children:[e.jsx("div",{className:"cron-label mb-1",children:Z(u)}),e.jsx("ul",{className:"list-disc pl-4 text-sm space-y-1",children:w.map(E=>e.jsx("li",{children:E},E))})]},u))})]}),s.health_findings&&s.health_findings.some(u=>u.state!=="healthy")&&e.jsxs("div",{className:"md:col-span-2",children:[e.jsxs("div",{className:"cron-section-heading",children:[e.jsx(Ae,{className:"h-4 w-4"}),e.jsx("h4",{children:"Deterministic contract findings"})]}),e.jsxs("div",{className:"cron-metric-card space-y-3 text-sm",children:[s.health_findings.filter(u=>u.state!=="healthy").map(u=>e.jsxs("div",{children:[e.jsx(S,{variant:"outline",className:`cron-status--${u.state}`,children:u.state})," ",e.jsx("strong",{children:Z(u.contract)}),": ",u.summary,Object.entries(u.evidence).length>0&&e.jsx("div",{className:"mt-1 text-xs cron-muted",children:Object.entries(u.evidence).map(([w,E])=>e.jsxs("span",{className:"mr-3",children:[Z(w),": ",String(E)]},w))})]},`${u.plane}-${u.contract}`)),e.jsxs("div",{className:"flex gap-4",children:[s.operator_url&&e.jsxs("a",{className:"cron-info-text inline-flex items-center gap-1",href:s.operator_url,children:["Open operator ",e.jsx(ee,{className:"h-3.5 w-3.5"})]}),s.run_url&&e.jsxs("a",{className:"cron-info-text inline-flex items-center gap-1",href:s.run_url,target:"_blank",rel:"noreferrer",children:["Open run ",e.jsx(ee,{className:"h-3.5 w-3.5"})]})]})]})]})]})})]})}const Ye=h.forwardRef(({className:s,...a},n)=>e.jsx("div",{className:"relative w-full overflow-auto",children:e.jsx("table",{ref:n,className:T("w-full caption-bottom text-sm",s),...a})}));Ye.displayName="Table";const Ze=h.forwardRef(({className:s,...a},n)=>e.jsx("thead",{ref:n,className:T("[&_tr]:border-b",s),...a}));Ze.displayName="TableHeader";const es=h.forwardRef(({className:s,...a},n)=>e.jsx("tbody",{ref:n,className:T("[&_tr:last-child]:border-0",s),...a}));es.displayName="TableBody";const Js=h.forwardRef(({className:s,...a},n)=>e.jsx("tfoot",{ref:n,className:T("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",s),...a}));Js.displayName="TableFooter";const he=h.forwardRef(({className:s,...a},n)=>e.jsx("tr",{ref:n,className:T("border-b transition-colors data-[state=selected]:bg-muted hover:bg-muted/50",s),...a}));he.displayName="TableRow";const V=h.forwardRef(({className:s,...a},n)=>e.jsx("th",{ref:n,className:T("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",s),...a}));V.displayName="TableHead";const Q=h.forwardRef(({className:s,...a},n)=>e.jsx("td",{ref:n,className:T("p-4 align-middle [&:has([role=checkbox])]:pr-0",s),...a}));Q.displayName="TableCell";const Bs=h.forwardRef(({className:s,...a},n)=>e.jsx("caption",{ref:n,className:T("mt-4 text-sm text-muted-foreground",s),...a}));Bs.displayName="TableCaption";const ss={queued:"cron-status--unknown",dispatching:"cron-status--running",running:"cron-status--running",completed:"cron-status--healthy",failed:"cron-status--broken",canceled:"cron-status--unknown",awaiting_markdown:"cron-status--unknown"},as={queued:"queued",dispatching:"dispatching",running:"running",completed:"completed",failed:"failed",canceled:"canceled",awaiting_markdown:"waiting for Markdown"},$e={"add-evals":"Add evals","enrich-paper":"Enrich paper","resolve-model-paper":"Resolve model release","review-benchmark-gaps":"Review benchmark gaps","add-benchmark":"Add benchmark"},Hs={queued:Ss,dispatching:I,running:ws,completed:pe,failed:se,canceled:Cs,awaiting_markdown:$s};function Us({status:s}){const a=Hs[s];return e.jsxs(S,{variant:"outline",className:ss[s],children:[e.jsx(a,{className:`mr-1 h-3.5 w-3.5 ${s==="dispatching"?"animate-spin":""}`}),as[s]]})}function Ws(s){return s.status==="awaiting_markdown"?_s: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 Le({mutationResult:s}){const a=s==null?void 0:s.skipped_configured_leaderboards;return!Array.isArray(a)||a.length===0?null:e.jsxs("div",{className:"mt-2 rounded border border-amber-500 bg-amber-50 p-2 text-xs text-amber-900",children:[e.jsxs("div",{className:"font-medium",children:["Skipped configured leaderboards (",a.length,")"]}),e.jsx("ul",{className:"mt-1 list-disc space-y-1 pl-4",children:a.map((n,t)=>e.jsxs("li",{children:[n.benchmark," · ",n.disposition," · task ",n.task_id," / dataset ",n.dataset_id,n.metric?` / ${n.metric}`:"",n.value!=null?` = ${n.value}`:"",n.detail?` — ${n.detail}`:""]},t))})]})}function zs({autoRefresh:s,refreshToken:a}){var te;const n=Fe(),[t,i]=h.useState(""),[d,p]=h.useState(""),[N,k]=h.useState(""),[m,c]=h.useState(""),[u,w]=h.useState(""),[E,g]=h.useState({}),j={trigger:t,status:d,policy_version:N,cohort_date:m,review_status:u},{data:x,isLoading:R,isFetching:oe,error:L}=X({queryKey:["codexPaperJobs",a,j],queryFn:()=>fs(100,j),refetchInterval:s?1e4:!1,retry:!1}),F=()=>n.invalidateQueries({queryKey:["codexPaperJobs"]}),Y=O({mutationFn:hs,onSuccess:F}),je=O({mutationFn:xs,onSuccess:F}),ae=O({mutationFn:ps,onSuccess:F}),re=O({mutationFn:gs,onSuccess:F}),B=O({mutationFn:({id:r,dataset:o,task:A,metric:z})=>js(r,{dataset_id:Number(o),task_id:Number(A),best_metric:z.trim()}),onSuccess:F}),H=O({mutationFn:vs,onSuccess:F}),ne=L&&typeof L=="object"&&"status"in L?L.status:void 0;return e.jsxs(v,{className:"mb-8",children:[e.jsx(b,{children:e.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[e.jsxs("div",{children:[e.jsx(y,{className:"text-xl",children:"Codex paper jobs"}),e.jsx(q,{children:"Durable queue, two-stage daily workflows, traces, and benchmark-gap follow-up"})]}),oe&&!R&&e.jsxs("span",{className:"flex items-center gap-2 text-xs cron-muted",children:[e.jsx(I,{className:"h-3.5 w-3.5 animate-spin"})," Syncing with Hugging Face"]})]})}),e.jsxs(_,{children:[R&&e.jsxs("div",{className:"flex items-center justify-center py-10 cron-muted",children:[e.jsx(I,{className:"mr-2 h-5 w-5 animate-spin"})," Loading paper jobs…"]}),L&&ne!==404&&e.jsx("div",{className:"cron-message cron-message--error mb-4",children:L instanceof Error?L.message:"Could not load Codex paper jobs."}),ne===404&&e.jsx("p",{className:"py-4 text-sm cron-muted",children:"Codex paper jobs are not enabled in this environment."}),x&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:`cron-message mb-5 ${x.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: ",x.scheduler.paused_at?"paused":x.scheduler.dispatch_enabled?"enabled":"disabled"]}),x.scheduler.pause_reason&&e.jsx("div",{className:"mt-1 text-xs",children:x.scheduler.pause_reason}),e.jsxs("div",{className:"mt-1 text-xs cron-muted",children:["Canary ",x.scheduler.canary_released?"released":"active"," · Queue age ",x.scheduler.queue_age_level]}),e.jsxs("div",{className:"mt-1 text-xs cron-muted",children:["Scheduled usage today ",x.scheduler.usage.current_day_tokens.toLocaleString()," tokens · ",x.scheduler.usage.mode==="enforced"?`pause threshold ${((te=x.scheduler.usage.pause_threshold_tokens)==null?void 0:te.toLocaleString())??"not established"}`:"first-week alert-only baseline"," · trailing median ",x.scheduler.usage.trailing_seven_day_median_tokens.toLocaleString()]})]}),e.jsx(C,{size:"sm",variant:x.scheduler.paused_at||!x.scheduler.dispatch_enabled?"default":"outline",disabled:re.isPending,onClick:()=>re.mutate(x.scheduler.paused_at||!x.scheduler.dispatch_enabled?"resume":"pause"),children:x.scheduler.paused_at?"Acknowledge & resume":x.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-8",children:[["queued","awaiting_markdown","dispatching","running","completed","failed","canceled"].map(r=>e.jsxs("div",{className:"cron-metric-card",children:[e.jsx("div",{className:"cron-label capitalize",children:as[r]}),e.jsx("div",{className:"mt-1 text-xl font-semibold",children:x.summary[r]})]},r)),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:x.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:r=>i(r.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.jsx("option",{value:"benchmark-gap-cron",children:"Benchmark gap cron"})]}),e.jsxs("select",{"aria-label":"Status",className:"rounded border px-2 py-1 text-sm",value:d,onChange:r=>p(r.target.value),children:[e.jsx("option",{value:"",children:"All statuses"}),Object.keys(ss).map(r=>e.jsx("option",{children:r},r))]}),e.jsx("input",{"aria-label":"Policy version",className:"rounded border px-2 py-1 text-sm",placeholder:"Policy version",value:N,onChange:r=>k(r.target.value)}),e.jsx("input",{"aria-label":"Cohort date",type:"date",className:"rounded border px-2 py-1 text-sm",value:m,onChange:r=>c(r.target.value)}),e.jsxs("select",{"aria-label":"Review status",className:"rounded border px-2 py-1 text-sm",value:u,onChange:r=>w(r.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"})]})]}),x.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(Ye,{children:[e.jsx(Ze,{children:e.jsxs(he,{children:[e.jsx(V,{children:"Status"}),e.jsx(V,{children:"Paper"}),e.jsx(V,{children:"Action"}),e.jsx(V,{children:"Requested"}),e.jsx(V,{children:"Execution"})]})}),e.jsx(es,{children:x.jobs.map(r=>{const o=Ws(r);return e.jsxs(he,{children:[e.jsx(Q,{className:"align-top",children:e.jsx(Us,{status:r.status})}),e.jsx(Q,{className:"min-w-[260px] align-top",children:r.paper_route?e.jsxs(e.Fragment,{children:[e.jsx(xe,{to:`/paper/${encodeURIComponent(r.paper_route)}`,className:"font-medium hover:underline",children:r.paper_title}),e.jsxs("div",{className:"mt-1 text-xs cron-muted",children:["Paper #",r.paper_id]})]}):r.kind==="review-benchmark-gaps"?e.jsx("span",{className:"font-medium",children:"Benchmark-gap backlog"}):r.kind==="add-benchmark"?e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"font-medium",children:"Benchmark candidate"}),e.jsx("div",{className:"mt-1 text-xs cron-muted",children:r.benchmark_candidate_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 ",r.candidate_id]})]})}),e.jsxs(Q,{className:"whitespace-nowrap align-top",children:[$e[r.kind],r.applied_at&&e.jsxs("div",{className:"mt-1 flex items-center gap-1 text-xs cron-status--healthy",children:[e.jsx(pe,{className:"h-3.5 w-3.5"})," Applied"]})]}),e.jsxs(Q,{className:"whitespace-nowrap align-top",children:[e.jsx("div",{children:f(r.created_at)}),e.jsxs("div",{className:"mt-1 text-xs cron-muted",children:["@",r.requested_by]})]}),e.jsxs(Q,{className:"max-w-[360px] align-top",children:[r.hf_job_url?e.jsxs("a",{href:r.hf_job_url,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-1 hover:underline",children:["Hugging Face Job ",e.jsx(ee,{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 ${r.error&&r.status!=="awaiting_markdown"?"text-red-700":"cron-muted"}`,title:o,children:o}),e.jsx(Le,{mutationResult:r.mutation_result}),e.jsxs("div",{className:"mt-2 flex gap-2",children:[["failed","canceled"].includes(r.status)&&e.jsx(C,{size:"sm",variant:"outline",onClick:()=>Y.mutate(r.id),children:"Retry"}),["queued","awaiting_markdown","dispatching","running"].includes(r.status)&&e.jsx(C,{size:"sm",variant:"outline",onClick:()=>je.mutate(r.id),children:"Cancel"}),r.trace_status==="finalize_failed"&&e.jsx(C,{size:"sm",variant:"outline",onClick:()=>ae.mutate(r.id),children:"Retry trace"})]})]})]},r.id)})})]}),x.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"}),x.workflows.map(r=>e.jsxs("details",{className:"rounded-md border p-3",children:[e.jsxs("summary",{className:"cursor-pointer text-sm font-medium",children:["Paper #",r.paper_id," · ",r.cohort_date," · ",r.status," · ",r.policy_version]}),e.jsxs("div",{className:"mt-3 space-y-3 text-xs",children:[r.error&&e.jsx("div",{className:"text-red-700",children:r.error}),r.stages.map(o=>{var A;return e.jsxs("div",{className:"rounded border p-3",children:[e.jsxs("div",{className:"font-medium",children:[$e[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((A=o.validation_summary)==null?void 0:A.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)}),e.jsx(Le,{mutationResult:o.mutation_result}),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(ee,{className:"h-3.5 w-3.5"})]})]},o.id)})]})]},r.id))]}),x.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"}),x.benchmark_candidates.map(r=>{var z,U;const o=E[r.id]??{dataset:"",task:((z=r.task_ids[0])==null?void 0:z.toString())??"",metric:""},A=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:[r.canonical_name," · ",r.gap_type," · ",r.status]}),e.jsxs("div",{className:"cron-muted",children:[r.distinct_paper_count," paper",r.distinct_paper_count===1?"":"s"," · ",r.confidence??"unknown"," confidence"]})]}),r.canonical_url&&e.jsx("a",{className:"mt-1 block hover:underline",href:r.canonical_url,target:"_blank",rel:"noreferrer",children:r.canonical_url}),e.jsxs("div",{className:"mt-1 cron-muted",children:["Task evidence: ",r.task_ids.join(", ")||"none"," · Papers: ",r.evidence_paper_ids.join(", ")]}),r.review_reason&&e.jsxs("div",{className:"mt-1",children:["Review",r.reviewed_at?` ${f(r.reviewed_at)}`:"",": ",r.review_reason,r.deferred_until&&` · deferred until ${f(r.deferred_until)}`]}),r.resolution&&e.jsxs("div",{className:"mt-1 cron-muted",children:["Dataset #",r.resolution.dataset_id," · task #",r.resolution.task_id," · ",r.resolution.primary_metric,r.resolution.rolled_back_at&&` · rolled back ${f(r.resolution.rolled_back_at)}`]}),r.status==="promoted"&&((U=r.resolution)==null?void 0:U.created)&&!r.resolution.rolled_back_at&&e.jsx(C,{className:"mt-2",size:"sm",variant:"outline",disabled:H.isPending,onClick:()=>H.mutate(r.id),children:"Roll back automatic benchmark"}),!["promoted","merged"].includes(r.status)&&e.jsxs("div",{className:"mt-3 flex flex-wrap gap-2",children:[["dataset","task","metric"].map(J=>e.jsx("input",{"aria-label":`${r.canonical_name} ${J}`,className:"w-36 rounded border px-2 py-1",placeholder:J==="metric"?"Exact metric":`${J} ID`,value:o[J],onChange:l=>g(M=>({...M,[r.id]:{...o,[J]:l.target.value}}))},J)),e.jsx(C,{size:"sm",variant:"outline",disabled:!A||B.isPending,onClick:()=>B.mutate({id:r.id,...o}),children:"Promote & requeue evidence papers"})]})]},r.id)}),B.error&&e.jsx("div",{className:"cron-message cron-message--error",children:B.error.message}),H.error&&e.jsx("div",{className:"cron-message cron-message--error",children:H.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 ",f(x.timestamp)]})]})]})]})}function Gs(){const[s,a]=h.useState(()=>new Date().toISOString().slice(0,10)),[n,t]=h.useState(1),i=X({queryKey:["paper-edit-digest",s,n],queryFn:()=>Te.digest(s,n),enabled:!!s});return e.jsxs("section",{className:"space-y-3 rounded border p-4",children:[e.jsx("h2",{className:"text-lg font-semibold",children:"Daily paper edits"}),e.jsxs("label",{className:"flex items-center gap-2",children:["UTC date ",e.jsx("input",{type:"date",value:s,onChange:d=>{a(d.target.value),t(1)}})]}),i.isLoading&&e.jsx("p",{children:"Loading daily summary…"}),i.error&&e.jsx("p",{role:"alert",children:i.error.message}),i.data&&e.jsxs(e.Fragment,{children:[e.jsxs("p",{children:[i.data.edits," published changes · ",i.data.papers," papers · ",i.data.contributors," contributors"]}),e.jsx("ul",{className:"space-y-1",children:i.data.rows.map((d,p)=>e.jsxs("li",{children:[e.jsxs(xe,{className:"underline",to:`/paper/${d.paper_id}#edit-history`,children:["Paper ",d.paper_id]})," · @",d.actor_username??"admin"," · ",d.edits," changes"]},p))}),e.jsxs("div",{className:"flex gap-2",children:[n>1&&e.jsx(C,{variant:"outline",onClick:()=>t(n-1),children:"Previous"}),i.data.has_more&&e.jsx(C,{variant:"outline",onClick:()=>t(n+1),children:"Next"})]})]})]})}const Ks=()=>{var p,N,k,m;const s=Fe(),a=bs({queryKey:["catalog-audit"],queryFn:({pageParam:c})=>ue.audit(c),initialPageParam:void 0,getNextPageParam:c=>c.next_cursor??void 0}),n=((p=a.data)==null?void 0:p.pages.flatMap(c=>c.events))??[],t=O({mutationFn:()=>ue.acknowledgeAudit(),onSuccess:()=>s.invalidateQueries({queryKey:["catalog-audit"]})}),i=O({mutationFn:c=>ue.rollbackEvent(c),onSuccess:()=>s.invalidateQueries({queryKey:["catalog-audit"]})}),d=O({mutationFn:({subject:c,suspended:u})=>Te.suspend(c,u),onSuccess:()=>s.invalidateQueries({queryKey:["catalog-audit"]})});return e.jsxs("div",{className:"space-y-4",children:[e.jsx(Gs,{}),(i.error||d.error)&&e.jsx("p",{role:"alert",children:(N=i.error||d.error)==null?void 0:N.message}),e.jsxs(v,{children:[e.jsxs(b,{className:"flex-row items-center justify-between",children:[e.jsx(y,{children:"Catalog mutation audit"}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsxs("span",{className:"text-sm font-medium",children:[((m=(k=a.data)==null?void 0:k.pages[0])==null?void 0:m.unread_contributor_count)??0," unread contributor changes"]}),e.jsx(C,{variant:"outline",size:"sm",onClick:()=>t.mutate(),disabled:t.isPending,children:"Mark read"})]})]}),e.jsxs(_,{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."}),n.map(c=>e.jsxs("article",{className:`rounded-md border p-3 ${c.operation==="delete"||c.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:[c.operation," ",c.entity_type," ",c.entity_id]}),e.jsxs("span",{className:"text-xs text-muted-foreground",children:["@",c.actor_username??c.actor_role," ·"," ",new Date(c.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:c.before,after:c.after},null,2)})]}),c.actor_role==="contributor"&&c.actor_hf_subject&&e.jsx(C,{className:"mt-3 mr-2",variant:"outline",size:"sm",disabled:d.isPending,onClick:()=>d.mutate({subject:c.actor_hf_subject,suspended:!c.editing_suspended}),children:c.editing_suspended?"Restore editing access":"Suspend editing access"}),!c.rollback_of_event_id&&e.jsx(C,{className:"mt-3",variant:"outline",size:"sm",onClick:()=>i.mutate(c.id),disabled:i.isPending||c.rollback_eligible===!1,children:c.rollback_eligible===!1?"Rollback conflict":"Roll back if unchanged"})]},c.id)),a.hasNextPage&&e.jsx(C,{variant:"outline",onClick:()=>a.fetchNextPage(),disabled:a.isFetchingNextPage,children:a.isFetchingNextPage?"Loading…":"Load older events"})]})]})]})},Pe={hourly:"cron-status--running",daily:"cron-status--healthy",weekly:"cron-status--degraded",systemd:"cron-status--running"},$=s=>`$${(s/1e6).toFixed(2)}`,Vs=({data:s,loading:a,error:n})=>{const[t,i]=h.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(I,{className:"h-6 w-6 animate-spin mr-3"}),"Loading chat compute…"]});if(n||!s)return e.jsx(v,{className:"cron-status--broken",children:e.jsx(_,{className:"pt-6",children:"Chat compute accounting is unavailable."})});const p=Math.min(100,s.effective_microusd/s.application_cap_microusd*100),N=s.circuit_state==="tripped"?"Chat disabled":s.circuit_state==="warning"?"Operator warning":"Enabled",k=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(v,{className:s.circuit_state==="tripped"?"cron-status--broken":s.circuit_state==="warning"?"cron-status--degraded":"",children:[e.jsx(b,{children:e.jsx(y,{className:"text-sm",children:"Circuit"})}),e.jsxs(_,{children:[e.jsx("div",{className:"text-2xl font-bold",children:N}),e.jsx("p",{className:"text-xs cron-muted",children:s.trip_reason??"Policy armed"})]})]}),e.jsxs(v,{children:[e.jsx(b,{children:e.jsx(y,{className:"text-sm",children:"Month to date"})}),e.jsxs(_,{children:[e.jsx("div",{className:"text-2xl font-bold",children:$(s.effective_microusd)}),e.jsx("div",{role:"progressbar","aria-label":"Application cap used","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":Math.round(p),className:"h-2 rounded bg-muted mt-3",children:e.jsx("div",{className:"h-2 rounded bg-primary",style:{width:`${p}%`}})})]})]}),e.jsxs(v,{children:[e.jsx(b,{children:e.jsx(y,{className:"text-sm",children:"Application headroom"})}),e.jsxs(_,{children:[e.jsx("div",{className:"text-2xl font-bold",children:$(s.remaining_microusd)}),e.jsxs("p",{className:"text-xs cron-muted",children:["Cap ",$(s.application_cap_microusd)]})]})]}),e.jsxs(v,{children:[e.jsx(b,{children:e.jsx(y,{className:"text-sm",children:"Live compute"})}),e.jsxs(_,{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(v,{children:[e.jsxs(b,{children:[e.jsx(y,{children:"Accounting and policy"}),e.jsxs(q,{children:[s.environment," · cycle ",s.billing_cycle]})]}),e.jsxs(_,{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=>i(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.estimated_microusd)]}),e.jsxs("div",{children:[e.jsx("strong",{children:"Provider-reported floor"}),e.jsx("br",{}),$(s.provider_floor_microusd)," · ",e.jsx(S,{children:k})]}),e.jsxs("div",{children:[e.jsx("strong",{children:"Provider backstops"}),e.jsx("br",{}),s.environment_cap_microusd===null?"Starter: no Environment cap":`Environment ${$(s.environment_cap_microusd)}`," · Workspace ",$(s.workspace_cap_microusd)]}),e.jsxs("div",{children:[e.jsx("strong",{children:"Active thresholds"}),e.jsx("br",{}),"Warning ",$(s.warning_microusd)," · trip ",$(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",{}),f(s.cycle_end_at)]}),e.jsxs("div",{children:[e.jsx("strong",{children:"Last metered"}),e.jsx("br",{}),s.last_metered_at?f(s.last_metered_at):"Unavailable"]}),e.jsxs("div",{children:[e.jsx("strong",{children:"Provider reconciliation"}),e.jsx("br",{}),s.last_reconciled_at?f(s.last_reconciled_at):"Unavailable",s.last_reconciliation_attempt_at?` · attempted ${f(s.last_reconciliation_attempt_at)}`:"",s.next_reconciliation_at?` · next ${f(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.burn_rate_microusd_per_hour)}/hour${s.projected_cap_hit_at?` · cap ${f(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.prior_cycle.effective_microusd)}`:"Not enough data"]})]})]}),e.jsxs(v,{children:[e.jsx(b,{children:e.jsx(y,{children:"Live lifecycle"})}),e.jsx(_,{className:"text-sm",children:Object.entries(s.live_states).map(([m,c])=>e.jsxs("span",{className:"mr-4",children:[m,": ",c]},m))})]}),e.jsxs(v,{children:[e.jsx(b,{children:e.jsx(y,{children:"Daily spend"})}),e.jsx(_,{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 ",$(m.blank_pool_microusd)," · assigned ",$(m.assigned_microusd)]},m.date))}):e.jsx("p",{className:"cron-muted",children:"No compute recorded in this cycle."})})]}),e.jsxs(v,{children:[e.jsxs(b,{children:[e.jsx(y,{children:"Recent circuit events"}),e.jsx(q,{children:"Runbook: docs/chat-sandbox-spend-runbook.md"})]}),e.jsx(_,{children:s.events.length?e.jsx("ul",{className:"space-y-2 text-sm",children:s.events.map(m=>e.jsxs("li",{children:[e.jsx(S,{children:m.severity})," ",m.type," · ",f(m.created_at)]},m.id))}):e.jsx("p",{className:"cron-muted",children:"No events in this cycle."})})]})]})},Qs=({data:s,loading:a,error:n})=>{if(a)return e.jsxs("div",{className:"flex items-center py-8",children:[e.jsx(I,{className:"h-5 w-5 animate-spin mr-3"}),"Loading web-search budget…"]});if(n||!s)return e.jsx(v,{className:"cron-status--broken",children:e.jsx(_,{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(v,{className:s.circuit_state==="tripped"?"cron-status--broken":s.circuit_state==="warning"||s.circuit_state==="cooldown"?"cron-status--degraded":"",children:[e.jsxs(b,{children:[e.jsx(y,{children:"Web search"}),e.jsxs(q,{children:[s.environment," · UTC cycle ",s.billing_cycle," · provider details are admin-only"]})]}),e.jsxs(_,{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 ",f(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 ${f(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(i=>e.jsxs("li",{children:[i.type," · ",f(i.created_at),i.error_class?` · ${i.error_class}`:""]},i.id))})]})]})},Xs=({data:s})=>s!=null&&s.snapshot_stale?e.jsx(v,{className:"mb-6 cron-status--degraded",role:"status",children:e.jsx(_,{className:"pt-6",children:e.jsxs("div",{className:"flex items-center gap-3 text-sm",children:[e.jsx(I,{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,Ys=(s,a)=>s!=null&&s.snapshot_stale||s!=null&&s.refreshing?5e3:a?3e4:!1,va=()=>{const s=ms(),[a,n]=h.useState(!0),[t,i]=h.useState(!1),[d,p]=h.useState(0),[N,k]=h.useState(""),[m,c]=h.useState(""),[u,w]=h.useState(new Set),E=h.useRef(!1),{user:g}=os(),{data:j,isLoading:x,error:R,refetch:oe}=X({queryKey:["cronStatus",g==null?void 0:g.username],queryFn:()=>{const l=E.current;return E.current=!1,ve.getCronStatus(l)},enabled:!!(g!=null&&g.is_admin),refetchInterval:l=>Ys(l.state.data,a),retry:!1}),L=X({queryKey:["paperMarkdownJobs",g==null?void 0:g.username],queryFn:()=>ve.getPaperMarkdownJobs(),enabled:!!(g!=null&&g.is_admin),refetchInterval:a?3e4:!1,retry:!1}),F=X({queryKey:["chatSandboxSpend",g==null?void 0:g.username,m],queryFn:()=>be.getSandboxSpend(m||void 0),enabled:!!(g!=null&&g.is_admin),refetchInterval:a?3e4:!1,retry:!1}),Y=X({queryKey:["chatWebSearchBudget",g==null?void 0:g.username],queryFn:()=>be.getWebSearchBudget(),enabled:!!(g!=null&&g.is_admin)&&s,refetchInterval:a?3e4:!1,retry:!1}),ae=(R&&typeof R=="object"&&"status"in R?R.status:void 0)===401?"Unauthorized. Sign in with an allowlisted Hugging Face admin account.":R instanceof Error?R.message:void 0,re=l=>{w(M=>{const W=new Set(M);return W.has(l)?W.delete(l):W.add(l),W})},B=(j==null?void 0:j.jobs.filter(l=>l.dashboard_group==="leaderboard_sync"))??[],H=(j==null?void 0:j.jobs.filter(l=>l.category!=="manual"&&l.dashboard_group!=="leaderboard_sync"))??[],ne=H.filter(l=>l.critical),te=H.filter(l=>!l.critical),r=(j==null?void 0:j.manual_operations)??[],o=!!(x||t||j!=null&&j.refreshing),A=te.reduce((l,M)=>(l[M.category]||(l[M.category]=[]),l[M.category].push(M),l),{}),z=Object.keys(A).sort((l,M)=>{const W=["systemd","hourly","daily","weekly","backfill"];return W.indexOf(l)-W.indexOf(M)}),U=l=>e.jsx(Os,{job:l,expanded:u.has(l.job_name),onToggle:()=>re(l.job_name),paperMarkdownJobs:l.job_name==="paper_markdown_backfill"?L.data:void 0,paperMarkdownJobsLoading:l.job_name==="paper_markdown_backfill"?L.isLoading:!1,paperMarkdownJobsError:l.job_name==="paper_markdown_backfill"?L.error:null},l.job_name),J=async()=>{p(l=>l+1),E.current=!0,i(!0);try{await Promise.all([oe(),L.refetch(),F.refetch()])}finally{i(!1)}};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(ie,{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.jsx(C,{asChild:!0,variant:"outline",size:"sm",children:e.jsx(xe,{to:"/autonomous-operations",children:"Autonomous operations"})}),e.jsxs(C,{variant:"outline",size:"sm",onClick:()=>n(!a),className:a?"cron-status--running":"",children:[e.jsx(Ne,{className:`h-4 w-4 mr-2 ${a?"animate-spin":""}`}),"Auto-refresh ",a?"ON":"OFF"]}),e.jsxs(C,{variant:"outline",size:"sm",onClick:()=>void J(),disabled:o,children:[e.jsx(Ne,{className:`h-4 w-4 mr-2 ${o?"animate-spin":""}`}),"Refresh"]})]})]})}),e.jsx(v,{className:"mb-6",children:e.jsx(_,{className:"pt-6",children:e.jsxs("p",{className:"text-sm cron-muted",children:["Signed in as ",e.jsxs("span",{className:"font-semibold",children:["@",g==null?void 0:g.username]}),". Health checks prefer database freshness over log completion so silent no-work failures surface as degraded or broken. Expanded jobs include deterministic scheduler, log, lock, durable-data, throughput, backlog, and semantic contract evidence with direct operator and run links."]})})}),e.jsx(Xs,{data:j}),e.jsxs(As,{defaultValue:"critical-jobs",children:[e.jsxs(Qe,{className:"grid h-auto w-full grid-cols-2 sm:w-auto sm:grid-cols-5",children:[e.jsx(G,{value:"critical-jobs",children:"Critical Jobs"}),e.jsx(G,{value:"leaderboard-syncs",children:"Leaderboard Syncs"}),e.jsx(G,{value:"codex-paper-jobs",children:"Codex Paper Jobs"}),e.jsx(G,{value:"catalog-audit",children:"Catalog Audit"}),e.jsx(G,{value:"chat-compute",children:"Chat Compute"})]}),e.jsxs(K,{value:"critical-jobs",className:"mt-6",children:[x&&e.jsxs("div",{className:"flex items-center justify-center py-12",children:[e.jsx(I,{className:"h-8 w-8 animate-spin cron-info-text"}),e.jsx("span",{className:"ml-3 cron-muted",children:"Loading CRON jobs status..."})]}),R&&e.jsx(v,{className:"cron-status--broken",children:e.jsx(_,{className:"pt-6",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(se,{className:"h-5 w-5"}),e.jsx("p",{children:ae??"Failed to load CRON jobs status. Please try again."})]})})}),j&&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(l=>e.jsxs(v,{children:[e.jsx(b,{className:"pb-2",children:e.jsx(y,{className:"text-sm font-medium cron-muted capitalize",children:l})}),e.jsx(_,{children:e.jsx("div",{className:"text-2xl font-bold",children:j.summary[l]})})]},l))}),j.summary.critical_issues.length>0&&e.jsxs(v,{className:"mb-6 cron-status--broken",children:[e.jsx(b,{children:e.jsxs(y,{className:"flex items-center gap-2",children:[e.jsx(Ae,{className:"h-5 w-5"}),"Critical job issues"]})}),e.jsx(_,{children:e.jsx("ul",{className:"list-disc pl-5 space-y-1 text-sm",children:j.summary.critical_issues.map(l=>e.jsx("li",{children:l},l))})})]}),e.jsxs(v,{className:"mb-8",children:[e.jsx(b,{children:e.jsx(y,{className:"text-base",children:"What to check next"})}),e.jsxs(_,{children:[e.jsx("p",{className:"text-sm cron-muted",children:j.summary.what_to_check_next}),e.jsxs("p",{className:"mt-2 text-xs cron-muted flex items-center gap-2",children:[e.jsx(Ee,{className:"h-4 w-4"}),"Last updated: ",f(j.timestamp)," · Health score:"," ",j.summary.health_score.toFixed(0),"%"]})]})]}),e.jsxs(v,{className:`mb-8 ${j.summary.coverage.coverage_gaps?"cron-status--broken":""}`,children:[e.jsxs(b,{children:[e.jsx(y,{className:"text-base",children:"Coverage"}),e.jsx(q,{children:"Registry and deployed scheduler inventory"})]}),e.jsxs(_,{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:j.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:j.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:j.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:j.summary.coverage.coverage_gaps})]})]})]}),e.jsxs(v,{className:"mb-8",children:[e.jsxs(b,{children:[e.jsx(y,{className:"text-xl",children:"Critical jobs"}),e.jsx(q,{children:"Writers whose stale output breaks the live site"})]}),e.jsx(_,{className:"space-y-4",children:ne.map(U)})]}),e.jsx("div",{className:"space-y-6",children:z.map(l=>e.jsxs(v,{children:[e.jsx(b,{children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs(y,{className:"text-xl capitalize flex items-center gap-2",children:[e.jsx(S,{className:Pe[l]??Pe.hourly,children:l}),e.jsx("span",{children:"Supporting jobs"})]}),e.jsxs(q,{children:[A[l].length," job",A[l].length!==1?"s":""]})]})}),e.jsx(_,{className:"space-y-4",children:A[l].map(U)})]},l))}),r.length>0&&e.jsxs(v,{className:"mt-6",children:[e.jsxs(b,{children:[e.jsx(y,{className:"text-xl",children:"Manual operations"}),e.jsx(q,{children:"Visible invocation history; excluded from scheduled health and coverage"})]}),e.jsx(_,{className:"space-y-4",children:r.map(U)})]})]})]}),e.jsxs(K,{value:"leaderboard-syncs",className:"mt-6",children:[x&&e.jsxs("div",{className:"flex items-center justify-center py-12",children:[e.jsx(I,{className:"h-8 w-8 animate-spin cron-info-text"}),e.jsx("span",{className:"ml-3 cron-muted",children:"Loading leaderboard sync status..."})]}),R&&e.jsx(v,{className:"cron-status--broken",children:e.jsx(_,{className:"pt-6",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(se,{className:"h-5 w-5"}),e.jsx("p",{children:ae??"Failed to load leaderboard sync status. Please try again."})]})})}),j&&e.jsxs(v,{children:[e.jsx(b,{children:e.jsxs("div",{className:"flex items-center justify-between gap-4",children:[e.jsxs("div",{children:[e.jsx(y,{className:"text-xl",children:"Leaderboard syncs"}),e.jsx(q,{children:"Recurring imports from externally maintained benchmark leaderboards"})]}),e.jsxs(S,{children:[B.length," jobs"]})]})}),e.jsx(_,{className:"space-y-4",children:B.map(U)})]})]}),e.jsx(K,{value:"codex-paper-jobs",className:"mt-6",children:e.jsx(zs,{autoRefresh:a,refreshToken:d})}),e.jsx(K,{value:"catalog-audit",className:"mt-6",children:e.jsx(Ks,{})}),e.jsxs(K,{value:"chat-compute",className:"mt-6",children:[e.jsxs(v,{className:"mb-6",children:[e.jsxs(b,{children:[e.jsx(y,{children:"Environment record"}),e.jsx(q,{children:"Leave blank for live staging, or enter the isolated environment printed by the spend qualification command."})]}),e.jsxs(_,{className:"flex gap-2",children:[e.jsx("input",{"aria-label":"Chat compute environment record",value:N,onChange:l=>k(l.target.value),placeholder:"staging-q-example",className:"flex-1 rounded border px-3 py-2"}),e.jsx(C,{onClick:()=>c(N.trim()),children:"Load"})]})]}),e.jsx(Vs,{data:F.data,loading:F.isLoading,error:F.error}),s&&e.jsx("div",{className:"mt-6",children:e.jsx(Qs,{data:Y.data,loading:Y.isLoading,error:Y.error})})]})]})]})})};export{Vs as ChatComputePanel,Xs as CronSnapshotNotice,Ys as cronStatusRefetchInterval,va as default}; diff --git a/assets/CronDashboard-Sgu7FsUW.js b/assets/CronDashboard-Sgu7FsUW.js deleted file mode 100644 index 9ad69caab8e12807995cb4749eaf2e538e9376ad..0000000000000000000000000000000000000000 --- a/assets/CronDashboard-Sgu7FsUW.js +++ /dev/null @@ -1,46 +0,0 @@ -import{g as O,r as h,z as as,q as rs,j as e,p as le,a1 as ns,R as ts,I as is,t as me,P as cs,w as ls,B as Re,x as A,m as Fe,L as xe,a as ds,f as os}from"./index-CkeK0cDg.js";import{u as X}from"./useQuery-_Fj6Jfzr.js";import{f as _,A as ie,C as v,a as b,b as y,c as q,d as f,o as ve}from"./operations-bzcC9DQN.js";import{B as S}from"./badge-DESGN9ka.js";import{B as C}from"./button-CsUrN-GU.js";import{C as ms}from"./chevron-down-CcbfCW-U.js";import{D as fe,r as us,f as hs,h as xs,j as ps,p as js,k as gs,l as vs}from"./codexAddEvals-Cyz55d6F.js";import{T as fs}from"./trending-up-BKEZ18MU.js";import{F as _e}from"./file-text-2FXER-SZ.js";import{S as Te}from"./shield-alert-CvBQiZwU.js";import{E as ee}from"./external-link-E5LiqyOi.js";import{C as se,R as Ne}from"./refresh-cw-ty41it1O.js";import{L as D}from"./loader-circle-CTuL2Xdc.js";import{C as pe}from"./circle-check-BZ6y-zRa.js";import{u as I}from"./useMutation-q-fdM2fm.js";import{u as _s}from"./useInfiniteQuery-gdIFpXB_.js";import{p as Ae}from"./paperEdits-DNevMcOH.js";import{c as ue}from"./catalog-DGg7xZLW.js";import{c as be}from"./chat-Cvg-XEh-.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 ye=O("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 Ns=O("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 bs=O("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 ys=O("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 ks=O("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 ws=O("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 Ee=O("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 Cs=O("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 Me=O("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"}]]);var de="Tabs",[Ss]=ls(de,[Re]),qe=Re(),[$s,je]=Ss(de),De=h.forwardRef((s,a)=>{const{__scopeTabs:n,value:t,onValueChange:i,defaultValue:d,orientation:p="horizontal",dir:N,activationMode:k="automatic",...m}=s,c=as(N),[u,w]=rs({prop:t,onChange:i,defaultProp:d??"",caller:de});return e.jsx($s,{scope:n,baseId:ns(),value:u,onValueChange:w,orientation:p,dir:c,activationMode:k,children:e.jsx(le.div,{dir:c,"data-orientation":p,...m,ref:a})})});De.displayName=de;var Ie="TabsList",Oe=h.forwardRef((s,a)=>{const{__scopeTabs:n,loop:t=!0,...i}=s,d=je(Ie,n),p=qe(n);return e.jsx(ts,{asChild:!0,...p,orientation:d.orientation,dir:d.dir,loop:t,children:e.jsx(le.div,{role:"tablist","aria-orientation":d.orientation,...i,ref:a})})});Oe.displayName=Ie;var Je="TabsTrigger",Be=h.forwardRef((s,a)=>{const{__scopeTabs:n,value:t,disabled:i=!1,...d}=s,p=je(Je,n),N=qe(n),k=ze(p.baseId,t),m=We(p.baseId,t),c=t===p.value;return e.jsx(is,{asChild:!0,...N,focusable:!i,active:c,children:e.jsx(le.button,{type:"button",role:"tab","aria-selected":c,"aria-controls":m,"data-state":c?"active":"inactive","data-disabled":i?"":void 0,disabled:i,id:k,...d,ref:a,onMouseDown:me(s.onMouseDown,u=>{!i&&u.button===0&&u.ctrlKey===!1?p.onValueChange(t):u.preventDefault()}),onKeyDown:me(s.onKeyDown,u=>{[" ","Enter"].includes(u.key)&&p.onValueChange(t)}),onFocus:me(s.onFocus,()=>{const u=p.activationMode!=="manual";!c&&!i&&u&&p.onValueChange(t)})})})});Be.displayName=Je;var He="TabsContent",Ue=h.forwardRef((s,a)=>{const{__scopeTabs:n,value:t,forceMount:i,children:d,...p}=s,N=je(He,n),k=ze(N.baseId,t),m=We(N.baseId,t),c=t===N.value,u=h.useRef(c);return h.useEffect(()=>{const w=requestAnimationFrame(()=>u.current=!1);return()=>cancelAnimationFrame(w)},[]),e.jsx(cs,{present:i||c,children:({present:w})=>e.jsx(le.div,{"data-state":c?"active":"inactive","data-orientation":N.orientation,role:"tabpanel","aria-labelledby":k,hidden:!w,id:m,tabIndex:0,...p,ref:a,style:{...s.style,animationDuration:u.current?"0s":void 0},children:w&&d})})});Ue.displayName=He;function ze(s,a){return`${s}-trigger-${a}`}function We(s,a){return`${s}-content-${a}`}var Ls=De,Ke=Oe,Ge=Be,Qe=Ue;const Ps=Ls,Ve=h.forwardRef(({className:s,...a},n)=>e.jsx(Ke,{ref:n,className:A("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",s),...a}));Ve.displayName=Ke.displayName;const K=h.forwardRef(({className:s,...a},n)=>e.jsx(Ge,{ref:n,className:A("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}));K.displayName=Ge.displayName;const G=h.forwardRef(({className:s,...a},n)=>e.jsx(Qe,{ref:n,className:A("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",s),...a}));G.displayName=Qe.displayName;function ce(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 Xe(s){return s.available?s.status==="completed"?s.conclusion??"completed":s.status??"unknown":"Unavailable"}function Z(s){return s.replace(/_/g," ").replace(/\b\w/g,a=>a.toUpperCase())}const P=s=>`$${s.toFixed(2)}`;function ke({title:s,budget:a,profile:n}){const t=a.cost_policy==="unmetered_hf"||a.budget_enforced===!1,i=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:[P(a.unknown_terminal_reservation_usd??0)," · ",(a.unknown_terminal_reservation_count??0).toLocaleString()," jobs"]})]})]}),n&&e.jsxs("div",{className:"text-xs cron-muted",children:["Profile ",e.jsx("strong",{children:n.profile_id})," · max ",n.max_papers.toLocaleString()," papers · hard ",ce(n.hard_timeout_seconds)," · soft ",ce(n.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 Rs={healthy:pe,degraded:Me,broken:se,running:D,stuck:se,unknown:bs};function Fs({status:s,isRunning:a}){const n=a?"running":s,t=Rs[n];return e.jsx(t,{className:`cron-status-icon cron-status--${n}${n==="running"?" animate-spin":""}`})}function we({label:s,axis:a}){return e.jsxs(S,{variant:"outline",className:`cron-status--${a.status}`,title:a.reason,children:[s,": ",a.status]})}function Ce({icon:s,title:a,metrics:n}){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(n).map(([t,i])=>e.jsxs("div",{className:"cron-metric-card",children:[e.jsx("div",{className:"cron-label",children:Z(t)}),e.jsx("div",{className:"text-lg font-semibold",children:typeof i=="number"?i.toLocaleString():i})]},t))})]})}function Ts({workflow:s}){return e.jsxs("div",{children:[e.jsxs("div",{className:"cron-section-heading",children:[e.jsx(ie,{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",Xe(s)],...s.updated_at?[["Updated",_(s.updated_at)]]:[]].map(([a,n])=>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:n})]},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(S,{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,n])=>e.jsxs(S,{variant:"outline",children:[a,": ",n??"running"]},a))})]}),(s.error||s.view_error)&&e.jsx("div",{className:"cron-message cron-message--error",children:s.error??s.view_error})]})]})}function As(s){return s==="COMPLETED"?"cron-status--healthy":s==="ERROR"||s==="CANCELED"?"cron-status--broken":s==="RUNNING"?"cron-status--running":"cron-status--unknown"}function Se(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 Es({job:s}){const a=s.progress,n=(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(S,{variant:"outline",className:As(s.stage),children:s.stage.toLowerCase()}),s.effective_outcome&&e.jsxs(S,{variant:"outline",className:Se(s.effective_outcome),children:["output: ",s.effective_outcome.replace(/_/g," ")]}),s.failure_cause&&e.jsxs(S,{variant:"outline",className:Se(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(ee,{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"]})]}),n>0&&e.jsxs("div",{className:"text-xs cron-muted",children:[e.jsx("strong",{children:n.toLocaleString()})," unresolved image references omitted after final retry"]}),a.updated_at&&e.jsxs("div",{className:"text-xs cron-muted",children:["Progress updated ",_(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(i=>e.jsxs("div",{children:[e.jsx("span",{className:"font-mono",children:i.arxiv_id}),": ",i.error]},`${i.arxiv_id}:${i.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 ",_(s.created_at)]}),s.duration_seconds!=null&&e.jsxs("span",{children:["Duration ",ce(s.duration_seconds)]})]}),s.stage_message&&e.jsx("div",{className:"cron-message cron-message--warning",children:s.stage_message})]})}function Ms({monitor:s,loading:a,error:n}){var t,i;return e.jsxs("div",{className:"md:col-span-2",children:[e.jsxs("div",{className:"cron-section-heading",children:[e.jsx(Cs,{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(D,{className:"h-4 w-4 animate-spin"})," Loading remote Jobs…"]}),!!n&&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(ke,{title:"Live paper Markdown GPU policy",budget:s.budgets.live,profile:(t=s.selected_profiles)==null?void 0:t.live}),e.jsx(ke,{title:"Full backfill GPU policy",budget:s.budgets.backfill,profile:(i=s.selected_profiles)==null?void 0:i.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,p])=>e.jsxs("div",{className:"cron-metric-card",children:[e.jsx("div",{className:"cron-label",children:Z(d)}),e.jsx("div",{className:"text-lg font-semibold",children:p.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(Es,{job:d},d.id))})]})]})}function qs({job:s,expanded:a,onToggle:n,paperMarkdownJobs:t,paperMarkdownJobsLoading:i=!1,paperMarkdownJobsError:d=null}){const p=!!(s.work_metrics&&Object.keys(s.work_metrics).length),N=!!(s.db_metrics&&Object.keys(s.db_metrics).length),k=s.job_name==="paper_markdown_backfill",m=k?t==null?void 0:t.budgets.live:void 0,c=(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:n,"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(Fs,{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(S,{variant:"outline",className:"text-[10px] uppercase tracking-wide",children:"Critical"}),s.lock_stale&&e.jsx(S,{variant:"outline",className:"cron-status--broken",children:"Held lock"}),e.jsx(we,{label:"Execution",axis:s.execution_health}),e.jsx(we,{label:"Output",axis:s.output_health}),a?e.jsx(Ns,{className:"h-4 w-4 cron-muted"}):e.jsx(ms,{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(Ee,{}),"Log: ",_(s.last_run)]}),e.jsxs("span",{className:"cron-fact",children:[e.jsx(fe,{}),"DB: ",_(s.last_db_write)]}),s.recent_write_count!=null&&e.jsxs("span",{className:"cron-fact",children:[e.jsx(fs,{}),"Recent writes: ",s.recent_write_count.toLocaleString()]}),s.duration!=null&&e.jsxs("span",{className:"cron-fact",children:[e.jsx(ie,{}),"Duration: ",ce(s.duration)]}),s.schedule&&e.jsxs("span",{className:"cron-fact md:col-span-2",children:[e.jsx(ye,{}),e.jsx("span",{className:"font-mono text-xs",children:s.schedule})]}),s.log_status&&e.jsxs("span",{className:"cron-fact",children:[e.jsx(_e,{}),"Log status: ",s.log_status]}),s.workflow_status&&e.jsxs("span",{className:"cron-fact",children:[e.jsx(ie,{}),"Actions: ",Xe(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:"})," ",c?"unmetered on HF":`${P(m.current_exposure_usd)} current / ${P(m.ceiling_usd)} cap`," · ",m.affordable_jobs," of ",m.desired_jobs," planned",c?"":` · projects ${P(m.projected_usd)} · rolling 30 days`]})]})]}),e.jsx(S,{variant:"outline",className:`cron-status--${s.status}`,children:s.status})]})}),a&&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(ye,{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",_(s.execution_health.last_expected_at??null)],["Last started",_(s.execution_health.last_started_at??null)],["Last completed",_(s.execution_health.last_completed_at??null)],["Next expected",_(s.execution_health.next_expected_at??null)]].map(([u,w])=>e.jsxs("div",{className:"flex items-center justify-between gap-3",children:[e.jsx("span",{className:"cron-label",children:u}),e.jsx("span",{children:w})]},u))})]}),s.work_metrics&&p&&e.jsx(Ce,{icon:_e,title:"Log Metrics",metrics:s.work_metrics}),s.db_metrics&&N&&e.jsx(Ce,{icon:fe,title:"Database Metrics",metrics:s.db_metrics}),s.workflow_status&&e.jsx(Ts,{workflow:s.workflow_status}),k&&e.jsx(Ms,{monitor:t,loading:i,error:d}),s.diagnostic_groups&&Object.values(s.diagnostic_groups).some(u=>u.length>0)&&e.jsxs("div",{className:"md:col-span-2",children:[e.jsxs("div",{className:"cron-section-heading",children:[e.jsx(Me,{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(([,u])=>u.length>0).map(([u,w])=>e.jsxs("div",{className:"cron-metric-card",children:[e.jsx("div",{className:"cron-label mb-1",children:Z(u)}),e.jsx("ul",{className:"list-disc pl-4 text-sm space-y-1",children:w.map(E=>e.jsx("li",{children:E},E))})]},u))})]}),s.health_findings&&s.health_findings.some(u=>u.state!=="healthy")&&e.jsxs("div",{className:"md:col-span-2",children:[e.jsxs("div",{className:"cron-section-heading",children:[e.jsx(Te,{className:"h-4 w-4"}),e.jsx("h4",{children:"Deterministic contract findings"})]}),e.jsxs("div",{className:"cron-metric-card space-y-3 text-sm",children:[s.health_findings.filter(u=>u.state!=="healthy").map(u=>e.jsxs("div",{children:[e.jsx(S,{variant:"outline",className:`cron-status--${u.state}`,children:u.state})," ",e.jsx("strong",{children:Z(u.contract)}),": ",u.summary,Object.entries(u.evidence).length>0&&e.jsx("div",{className:"mt-1 text-xs cron-muted",children:Object.entries(u.evidence).map(([w,E])=>e.jsxs("span",{className:"mr-3",children:[Z(w),": ",String(E)]},w))})]},`${u.plane}-${u.contract}`)),e.jsxs("div",{className:"flex gap-4",children:[s.operator_url&&e.jsxs("a",{className:"cron-info-text inline-flex items-center gap-1",href:s.operator_url,children:["Open operator ",e.jsx(ee,{className:"h-3.5 w-3.5"})]}),s.run_url&&e.jsxs("a",{className:"cron-info-text inline-flex items-center gap-1",href:s.run_url,target:"_blank",rel:"noreferrer",children:["Open run ",e.jsx(ee,{className:"h-3.5 w-3.5"})]})]})]})]})]})})]})}const Ye=h.forwardRef(({className:s,...a},n)=>e.jsx("div",{className:"relative w-full overflow-auto",children:e.jsx("table",{ref:n,className:A("w-full caption-bottom text-sm",s),...a})}));Ye.displayName="Table";const Ze=h.forwardRef(({className:s,...a},n)=>e.jsx("thead",{ref:n,className:A("[&_tr]:border-b",s),...a}));Ze.displayName="TableHeader";const es=h.forwardRef(({className:s,...a},n)=>e.jsx("tbody",{ref:n,className:A("[&_tr:last-child]:border-0",s),...a}));es.displayName="TableBody";const Ds=h.forwardRef(({className:s,...a},n)=>e.jsx("tfoot",{ref:n,className:A("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",s),...a}));Ds.displayName="TableFooter";const he=h.forwardRef(({className:s,...a},n)=>e.jsx("tr",{ref:n,className:A("border-b transition-colors data-[state=selected]:bg-muted hover:bg-muted/50",s),...a}));he.displayName="TableRow";const Q=h.forwardRef(({className:s,...a},n)=>e.jsx("th",{ref:n,className:A("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",s),...a}));Q.displayName="TableHead";const V=h.forwardRef(({className:s,...a},n)=>e.jsx("td",{ref:n,className:A("p-4 align-middle [&:has([role=checkbox])]:pr-0",s),...a}));V.displayName="TableCell";const Is=h.forwardRef(({className:s,...a},n)=>e.jsx("caption",{ref:n,className:A("mt-4 text-sm text-muted-foreground",s),...a}));Is.displayName="TableCaption";const ss={queued:"cron-status--unknown",dispatching:"cron-status--running",running:"cron-status--running",completed:"cron-status--healthy",failed:"cron-status--broken",canceled:"cron-status--unknown"},$e={"add-evals":"Add evals","enrich-paper":"Enrich paper","resolve-model-paper":"Resolve model release","review-benchmark-gaps":"Review benchmark gaps","add-benchmark":"Add benchmark"},Os={queued:ws,dispatching:D,running:ys,completed:pe,failed:se,canceled:ks};function Js({status:s}){const a=Os[s];return e.jsxs(S,{variant:"outline",className:ss[s],children:[e.jsx(a,{className:`mr-1 h-3.5 w-3.5 ${s==="dispatching"?"animate-spin":""}`}),s]})}function Bs(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 Le({mutationResult:s}){const a=s==null?void 0:s.skipped_configured_leaderboards;return!Array.isArray(a)||a.length===0?null:e.jsxs("div",{className:"mt-2 rounded border border-amber-500 bg-amber-50 p-2 text-xs text-amber-900",children:[e.jsxs("div",{className:"font-medium",children:["Skipped configured leaderboards (",a.length,")"]}),e.jsx("ul",{className:"mt-1 list-disc space-y-1 pl-4",children:a.map((n,t)=>e.jsxs("li",{children:[n.benchmark," · ",n.disposition," · task ",n.task_id," / dataset ",n.dataset_id,n.metric?` / ${n.metric}`:"",n.value!=null?` = ${n.value}`:"",n.detail?` — ${n.detail}`:""]},t))})]})}function Hs({autoRefresh:s,refreshToken:a}){var te;const n=Fe(),[t,i]=h.useState(""),[d,p]=h.useState(""),[N,k]=h.useState(""),[m,c]=h.useState(""),[u,w]=h.useState(""),[E,j]=h.useState({}),g={trigger:t,status:d,policy_version:N,cohort_date:m,review_status:u},{data:x,isLoading:R,isFetching:oe,error:L}=X({queryKey:["codexPaperJobs",a,g],queryFn:()=>vs(100,g),refetchInterval:s?1e4:!1,retry:!1}),F=()=>n.invalidateQueries({queryKey:["codexPaperJobs"]}),Y=I({mutationFn:us,onSuccess:F}),ge=I({mutationFn:hs,onSuccess:F}),ae=I({mutationFn:xs,onSuccess:F}),re=I({mutationFn:ps,onSuccess:F}),B=I({mutationFn:({id:r,dataset:o,task:T,metric:W})=>js(r,{dataset_id:Number(o),task_id:Number(T),best_metric:W.trim()}),onSuccess:F}),H=I({mutationFn:gs,onSuccess:F}),ne=L&&typeof L=="object"&&"status"in L?L.status:void 0;return e.jsxs(v,{className:"mb-8",children:[e.jsx(b,{children:e.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[e.jsxs("div",{children:[e.jsx(y,{className:"text-xl",children:"Codex paper jobs"}),e.jsx(q,{children:"Durable queue, two-stage daily workflows, traces, and benchmark-gap follow-up"})]}),oe&&!R&&e.jsxs("span",{className:"flex items-center gap-2 text-xs cron-muted",children:[e.jsx(D,{className:"h-3.5 w-3.5 animate-spin"})," Syncing with Hugging Face"]})]})}),e.jsxs(f,{children:[R&&e.jsxs("div",{className:"flex items-center justify-center py-10 cron-muted",children:[e.jsx(D,{className:"mr-2 h-5 w-5 animate-spin"})," Loading paper jobs…"]}),L&&ne!==404&&e.jsx("div",{className:"cron-message cron-message--error mb-4",children:L instanceof Error?L.message:"Could not load Codex paper jobs."}),ne===404&&e.jsx("p",{className:"py-4 text-sm cron-muted",children:"Codex paper jobs are not enabled in this environment."}),x&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:`cron-message mb-5 ${x.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: ",x.scheduler.paused_at?"paused":x.scheduler.dispatch_enabled?"enabled":"disabled"]}),x.scheduler.pause_reason&&e.jsx("div",{className:"mt-1 text-xs",children:x.scheduler.pause_reason}),e.jsxs("div",{className:"mt-1 text-xs cron-muted",children:["Canary ",x.scheduler.canary_released?"released":"active"," · Queue age ",x.scheduler.queue_age_level]}),e.jsxs("div",{className:"mt-1 text-xs cron-muted",children:["Scheduled usage today ",x.scheduler.usage.current_day_tokens.toLocaleString()," tokens · ",x.scheduler.usage.mode==="enforced"?`pause threshold ${((te=x.scheduler.usage.pause_threshold_tokens)==null?void 0:te.toLocaleString())??"not established"}`:"first-week alert-only baseline"," · trailing median ",x.scheduler.usage.trailing_seven_day_median_tokens.toLocaleString()]})]}),e.jsx(C,{size:"sm",variant:x.scheduler.paused_at||!x.scheduler.dispatch_enabled?"default":"outline",disabled:re.isPending,onClick:()=>re.mutate(x.scheduler.paused_at||!x.scheduler.dispatch_enabled?"resume":"pause"),children:x.scheduler.paused_at?"Acknowledge & resume":x.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(r=>e.jsxs("div",{className:"cron-metric-card",children:[e.jsx("div",{className:"cron-label capitalize",children:r}),e.jsx("div",{className:"mt-1 text-xl font-semibold",children:x.summary[r]})]},r)),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:x.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:r=>i(r.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.jsx("option",{value:"benchmark-gap-cron",children:"Benchmark gap cron"})]}),e.jsxs("select",{"aria-label":"Status",className:"rounded border px-2 py-1 text-sm",value:d,onChange:r=>p(r.target.value),children:[e.jsx("option",{value:"",children:"All statuses"}),Object.keys(ss).map(r=>e.jsx("option",{children:r},r))]}),e.jsx("input",{"aria-label":"Policy version",className:"rounded border px-2 py-1 text-sm",placeholder:"Policy version",value:N,onChange:r=>k(r.target.value)}),e.jsx("input",{"aria-label":"Cohort date",type:"date",className:"rounded border px-2 py-1 text-sm",value:m,onChange:r=>c(r.target.value)}),e.jsxs("select",{"aria-label":"Review status",className:"rounded border px-2 py-1 text-sm",value:u,onChange:r=>w(r.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"})]})]}),x.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(Ye,{children:[e.jsx(Ze,{children:e.jsxs(he,{children:[e.jsx(Q,{children:"Status"}),e.jsx(Q,{children:"Paper"}),e.jsx(Q,{children:"Action"}),e.jsx(Q,{children:"Requested"}),e.jsx(Q,{children:"Execution"})]})}),e.jsx(es,{children:x.jobs.map(r=>{const o=Bs(r);return e.jsxs(he,{children:[e.jsx(V,{className:"align-top",children:e.jsx(Js,{status:r.status})}),e.jsx(V,{className:"min-w-[260px] align-top",children:r.paper_route?e.jsxs(e.Fragment,{children:[e.jsx(xe,{to:`/paper/${encodeURIComponent(r.paper_route)}`,className:"font-medium hover:underline",children:r.paper_title}),e.jsxs("div",{className:"mt-1 text-xs cron-muted",children:["Paper #",r.paper_id]})]}):r.kind==="review-benchmark-gaps"?e.jsx("span",{className:"font-medium",children:"Benchmark-gap backlog"}):r.kind==="add-benchmark"?e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"font-medium",children:"Benchmark candidate"}),e.jsx("div",{className:"mt-1 text-xs cron-muted",children:r.benchmark_candidate_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 ",r.candidate_id]})]})}),e.jsxs(V,{className:"whitespace-nowrap align-top",children:[$e[r.kind],r.applied_at&&e.jsxs("div",{className:"mt-1 flex items-center gap-1 text-xs cron-status--healthy",children:[e.jsx(pe,{className:"h-3.5 w-3.5"})," Applied"]})]}),e.jsxs(V,{className:"whitespace-nowrap align-top",children:[e.jsx("div",{children:_(r.created_at)}),e.jsxs("div",{className:"mt-1 text-xs cron-muted",children:["@",r.requested_by]})]}),e.jsxs(V,{className:"max-w-[360px] align-top",children:[r.hf_job_url?e.jsxs("a",{href:r.hf_job_url,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-1 hover:underline",children:["Hugging Face Job ",e.jsx(ee,{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 ${r.error?"text-red-700":"cron-muted"}`,title:o,children:o}),e.jsx(Le,{mutationResult:r.mutation_result}),e.jsxs("div",{className:"mt-2 flex gap-2",children:[["failed","canceled"].includes(r.status)&&e.jsx(C,{size:"sm",variant:"outline",onClick:()=>Y.mutate(r.id),children:"Retry"}),["queued","dispatching","running"].includes(r.status)&&e.jsx(C,{size:"sm",variant:"outline",onClick:()=>ge.mutate(r.id),children:"Cancel"}),r.trace_status==="finalize_failed"&&e.jsx(C,{size:"sm",variant:"outline",onClick:()=>ae.mutate(r.id),children:"Retry trace"})]})]})]},r.id)})})]}),x.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"}),x.workflows.map(r=>e.jsxs("details",{className:"rounded-md border p-3",children:[e.jsxs("summary",{className:"cursor-pointer text-sm font-medium",children:["Paper #",r.paper_id," · ",r.cohort_date," · ",r.status," · ",r.policy_version]}),e.jsxs("div",{className:"mt-3 space-y-3 text-xs",children:[r.error&&e.jsx("div",{className:"text-red-700",children:r.error}),r.stages.map(o=>{var T;return e.jsxs("div",{className:"rounded border p-3",children:[e.jsxs("div",{className:"font-medium",children:[$e[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((T=o.validation_summary)==null?void 0:T.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)}),e.jsx(Le,{mutationResult:o.mutation_result}),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(ee,{className:"h-3.5 w-3.5"})]})]},o.id)})]})]},r.id))]}),x.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"}),x.benchmark_candidates.map(r=>{var W,U;const o=E[r.id]??{dataset:"",task:((W=r.task_ids[0])==null?void 0:W.toString())??"",metric:""},T=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:[r.canonical_name," · ",r.gap_type," · ",r.status]}),e.jsxs("div",{className:"cron-muted",children:[r.distinct_paper_count," paper",r.distinct_paper_count===1?"":"s"," · ",r.confidence??"unknown"," confidence"]})]}),r.canonical_url&&e.jsx("a",{className:"mt-1 block hover:underline",href:r.canonical_url,target:"_blank",rel:"noreferrer",children:r.canonical_url}),e.jsxs("div",{className:"mt-1 cron-muted",children:["Task evidence: ",r.task_ids.join(", ")||"none"," · Papers: ",r.evidence_paper_ids.join(", ")]}),r.review_reason&&e.jsxs("div",{className:"mt-1",children:["Review",r.reviewed_at?` ${_(r.reviewed_at)}`:"",": ",r.review_reason,r.deferred_until&&` · deferred until ${_(r.deferred_until)}`]}),r.resolution&&e.jsxs("div",{className:"mt-1 cron-muted",children:["Dataset #",r.resolution.dataset_id," · task #",r.resolution.task_id," · ",r.resolution.primary_metric,r.resolution.rolled_back_at&&` · rolled back ${_(r.resolution.rolled_back_at)}`]}),r.status==="promoted"&&((U=r.resolution)==null?void 0:U.created)&&!r.resolution.rolled_back_at&&e.jsx(C,{className:"mt-2",size:"sm",variant:"outline",disabled:H.isPending,onClick:()=>H.mutate(r.id),children:"Roll back automatic benchmark"}),!["promoted","merged"].includes(r.status)&&e.jsxs("div",{className:"mt-3 flex flex-wrap gap-2",children:[["dataset","task","metric"].map(J=>e.jsx("input",{"aria-label":`${r.canonical_name} ${J}`,className:"w-36 rounded border px-2 py-1",placeholder:J==="metric"?"Exact metric":`${J} ID`,value:o[J],onChange:l=>j(M=>({...M,[r.id]:{...o,[J]:l.target.value}}))},J)),e.jsx(C,{size:"sm",variant:"outline",disabled:!T||B.isPending,onClick:()=>B.mutate({id:r.id,...o}),children:"Promote & requeue evidence papers"})]})]},r.id)}),B.error&&e.jsx("div",{className:"cron-message cron-message--error",children:B.error.message}),H.error&&e.jsx("div",{className:"cron-message cron-message--error",children:H.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 ",_(x.timestamp)]})]})]})]})}function Us(){const[s,a]=h.useState(()=>new Date().toISOString().slice(0,10)),[n,t]=h.useState(1),i=X({queryKey:["paper-edit-digest",s,n],queryFn:()=>Ae.digest(s,n),enabled:!!s});return e.jsxs("section",{className:"space-y-3 rounded border p-4",children:[e.jsx("h2",{className:"text-lg font-semibold",children:"Daily paper edits"}),e.jsxs("label",{className:"flex items-center gap-2",children:["UTC date ",e.jsx("input",{type:"date",value:s,onChange:d=>{a(d.target.value),t(1)}})]}),i.isLoading&&e.jsx("p",{children:"Loading daily summary…"}),i.error&&e.jsx("p",{role:"alert",children:i.error.message}),i.data&&e.jsxs(e.Fragment,{children:[e.jsxs("p",{children:[i.data.edits," published changes · ",i.data.papers," papers · ",i.data.contributors," contributors"]}),e.jsx("ul",{className:"space-y-1",children:i.data.rows.map((d,p)=>e.jsxs("li",{children:[e.jsxs(xe,{className:"underline",to:`/paper/${d.paper_id}#edit-history`,children:["Paper ",d.paper_id]})," · @",d.actor_username??"admin"," · ",d.edits," changes"]},p))}),e.jsxs("div",{className:"flex gap-2",children:[n>1&&e.jsx(C,{variant:"outline",onClick:()=>t(n-1),children:"Previous"}),i.data.has_more&&e.jsx(C,{variant:"outline",onClick:()=>t(n+1),children:"Next"})]})]})]})}const zs=()=>{var p,N,k,m;const s=Fe(),a=_s({queryKey:["catalog-audit"],queryFn:({pageParam:c})=>ue.audit(c),initialPageParam:void 0,getNextPageParam:c=>c.next_cursor??void 0}),n=((p=a.data)==null?void 0:p.pages.flatMap(c=>c.events))??[],t=I({mutationFn:()=>ue.acknowledgeAudit(),onSuccess:()=>s.invalidateQueries({queryKey:["catalog-audit"]})}),i=I({mutationFn:c=>ue.rollbackEvent(c),onSuccess:()=>s.invalidateQueries({queryKey:["catalog-audit"]})}),d=I({mutationFn:({subject:c,suspended:u})=>Ae.suspend(c,u),onSuccess:()=>s.invalidateQueries({queryKey:["catalog-audit"]})});return e.jsxs("div",{className:"space-y-4",children:[e.jsx(Us,{}),(i.error||d.error)&&e.jsx("p",{role:"alert",children:(N=i.error||d.error)==null?void 0:N.message}),e.jsxs(v,{children:[e.jsxs(b,{className:"flex-row items-center justify-between",children:[e.jsx(y,{children:"Catalog mutation audit"}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsxs("span",{className:"text-sm font-medium",children:[((m=(k=a.data)==null?void 0:k.pages[0])==null?void 0:m.unread_contributor_count)??0," unread contributor changes"]}),e.jsx(C,{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."}),n.map(c=>e.jsxs("article",{className:`rounded-md border p-3 ${c.operation==="delete"||c.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:[c.operation," ",c.entity_type," ",c.entity_id]}),e.jsxs("span",{className:"text-xs text-muted-foreground",children:["@",c.actor_username??c.actor_role," ·"," ",new Date(c.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:c.before,after:c.after},null,2)})]}),c.actor_role==="contributor"&&c.actor_hf_subject&&e.jsx(C,{className:"mt-3 mr-2",variant:"outline",size:"sm",disabled:d.isPending,onClick:()=>d.mutate({subject:c.actor_hf_subject,suspended:!c.editing_suspended}),children:c.editing_suspended?"Restore editing access":"Suspend editing access"}),!c.rollback_of_event_id&&e.jsx(C,{className:"mt-3",variant:"outline",size:"sm",onClick:()=>i.mutate(c.id),disabled:i.isPending||c.rollback_eligible===!1,children:c.rollback_eligible===!1?"Rollback conflict":"Roll back if unchanged"})]},c.id)),a.hasNextPage&&e.jsx(C,{variant:"outline",onClick:()=>a.fetchNextPage(),disabled:a.isFetchingNextPage,children:a.isFetchingNextPage?"Loading…":"Load older events"})]})]})]})},Pe={hourly:"cron-status--running",daily:"cron-status--healthy",weekly:"cron-status--degraded",systemd:"cron-status--running"},$=s=>`$${(s/1e6).toFixed(2)}`,Ws=({data:s,loading:a,error:n})=>{const[t,i]=h.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(D,{className:"h-6 w-6 animate-spin mr-3"}),"Loading chat compute…"]});if(n||!s)return e.jsx(v,{className:"cron-status--broken",children:e.jsx(f,{className:"pt-6",children:"Chat compute accounting is unavailable."})});const p=Math.min(100,s.effective_microusd/s.application_cap_microusd*100),N=s.circuit_state==="tripped"?"Chat disabled":s.circuit_state==="warning"?"Operator warning":"Enabled",k=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(v,{className:s.circuit_state==="tripped"?"cron-status--broken":s.circuit_state==="warning"?"cron-status--degraded":"",children:[e.jsx(b,{children:e.jsx(y,{className:"text-sm",children:"Circuit"})}),e.jsxs(f,{children:[e.jsx("div",{className:"text-2xl font-bold",children:N}),e.jsx("p",{className:"text-xs cron-muted",children:s.trip_reason??"Policy armed"})]})]}),e.jsxs(v,{children:[e.jsx(b,{children:e.jsx(y,{className:"text-sm",children:"Month to date"})}),e.jsxs(f,{children:[e.jsx("div",{className:"text-2xl font-bold",children:$(s.effective_microusd)}),e.jsx("div",{role:"progressbar","aria-label":"Application cap used","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":Math.round(p),className:"h-2 rounded bg-muted mt-3",children:e.jsx("div",{className:"h-2 rounded bg-primary",style:{width:`${p}%`}})})]})]}),e.jsxs(v,{children:[e.jsx(b,{children:e.jsx(y,{className:"text-sm",children:"Application headroom"})}),e.jsxs(f,{children:[e.jsx("div",{className:"text-2xl font-bold",children:$(s.remaining_microusd)}),e.jsxs("p",{className:"text-xs cron-muted",children:["Cap ",$(s.application_cap_microusd)]})]})]}),e.jsxs(v,{children:[e.jsx(b,{children:e.jsx(y,{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(v,{children:[e.jsxs(b,{children:[e.jsx(y,{children:"Accounting and policy"}),e.jsxs(q,{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=>i(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.estimated_microusd)]}),e.jsxs("div",{children:[e.jsx("strong",{children:"Provider-reported floor"}),e.jsx("br",{}),$(s.provider_floor_microusd)," · ",e.jsx(S,{children:k})]}),e.jsxs("div",{children:[e.jsx("strong",{children:"Provider backstops"}),e.jsx("br",{}),s.environment_cap_microusd===null?"Starter: no Environment cap":`Environment ${$(s.environment_cap_microusd)}`," · Workspace ",$(s.workspace_cap_microusd)]}),e.jsxs("div",{children:[e.jsx("strong",{children:"Active thresholds"}),e.jsx("br",{}),"Warning ",$(s.warning_microusd)," · trip ",$(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",{}),_(s.cycle_end_at)]}),e.jsxs("div",{children:[e.jsx("strong",{children:"Last metered"}),e.jsx("br",{}),s.last_metered_at?_(s.last_metered_at):"Unavailable"]}),e.jsxs("div",{children:[e.jsx("strong",{children:"Provider reconciliation"}),e.jsx("br",{}),s.last_reconciled_at?_(s.last_reconciled_at):"Unavailable",s.last_reconciliation_attempt_at?` · attempted ${_(s.last_reconciliation_attempt_at)}`:"",s.next_reconciliation_at?` · next ${_(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.burn_rate_microusd_per_hour)}/hour${s.projected_cap_hit_at?` · cap ${_(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.prior_cycle.effective_microusd)}`:"Not enough data"]})]})]}),e.jsxs(v,{children:[e.jsx(b,{children:e.jsx(y,{children:"Live lifecycle"})}),e.jsx(f,{className:"text-sm",children:Object.entries(s.live_states).map(([m,c])=>e.jsxs("span",{className:"mr-4",children:[m,": ",c]},m))})]}),e.jsxs(v,{children:[e.jsx(b,{children:e.jsx(y,{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 ",$(m.blank_pool_microusd)," · assigned ",$(m.assigned_microusd)]},m.date))}):e.jsx("p",{className:"cron-muted",children:"No compute recorded in this cycle."})})]}),e.jsxs(v,{children:[e.jsxs(b,{children:[e.jsx(y,{children:"Recent circuit events"}),e.jsx(q,{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(S,{children:m.severity})," ",m.type," · ",_(m.created_at)]},m.id))}):e.jsx("p",{className:"cron-muted",children:"No events in this cycle."})})]})]})},Ks=({data:s,loading:a,error:n})=>{if(a)return e.jsxs("div",{className:"flex items-center py-8",children:[e.jsx(D,{className:"h-5 w-5 animate-spin mr-3"}),"Loading web-search budget…"]});if(n||!s)return e.jsx(v,{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(v,{className:s.circuit_state==="tripped"?"cron-status--broken":s.circuit_state==="warning"||s.circuit_state==="cooldown"?"cron-status--degraded":"",children:[e.jsxs(b,{children:[e.jsx(y,{children:"Web search"}),e.jsxs(q,{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 ",_(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 ${_(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(i=>e.jsxs("li",{children:[i.type," · ",_(i.created_at),i.error_class?` · ${i.error_class}`:""]},i.id))})]})]})},Gs=({data:s})=>s!=null&&s.snapshot_stale?e.jsx(v,{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(D,{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,Qs=(s,a)=>s!=null&&s.snapshot_stale||s!=null&&s.refreshing?5e3:a?3e4:!1,pa=()=>{const s=os(),[a,n]=h.useState(!0),[t,i]=h.useState(!1),[d,p]=h.useState(0),[N,k]=h.useState(""),[m,c]=h.useState(""),[u,w]=h.useState(new Set),E=h.useRef(!1),{user:j}=ds(),{data:g,isLoading:x,error:R,refetch:oe}=X({queryKey:["cronStatus",j==null?void 0:j.username],queryFn:()=>{const l=E.current;return E.current=!1,ve.getCronStatus(l)},enabled:!!(j!=null&&j.is_admin),refetchInterval:l=>Qs(l.state.data,a),retry:!1}),L=X({queryKey:["paperMarkdownJobs",j==null?void 0:j.username],queryFn:()=>ve.getPaperMarkdownJobs(),enabled:!!(j!=null&&j.is_admin),refetchInterval:a?3e4:!1,retry:!1}),F=X({queryKey:["chatSandboxSpend",j==null?void 0:j.username,m],queryFn:()=>be.getSandboxSpend(m||void 0),enabled:!!(j!=null&&j.is_admin),refetchInterval:a?3e4:!1,retry:!1}),Y=X({queryKey:["chatWebSearchBudget",j==null?void 0:j.username],queryFn:()=>be.getWebSearchBudget(),enabled:!!(j!=null&&j.is_admin)&&s,refetchInterval:a?3e4:!1,retry:!1}),ae=(R&&typeof R=="object"&&"status"in R?R.status:void 0)===401?"Unauthorized. Sign in with an allowlisted Hugging Face admin account.":R instanceof Error?R.message:void 0,re=l=>{w(M=>{const z=new Set(M);return z.has(l)?z.delete(l):z.add(l),z})},B=(g==null?void 0:g.jobs.filter(l=>l.dashboard_group==="leaderboard_sync"))??[],H=(g==null?void 0:g.jobs.filter(l=>l.category!=="manual"&&l.dashboard_group!=="leaderboard_sync"))??[],ne=H.filter(l=>l.critical),te=H.filter(l=>!l.critical),r=(g==null?void 0:g.manual_operations)??[],o=!!(x||t||g!=null&&g.refreshing),T=te.reduce((l,M)=>(l[M.category]||(l[M.category]=[]),l[M.category].push(M),l),{}),W=Object.keys(T).sort((l,M)=>{const z=["systemd","hourly","daily","weekly","backfill"];return z.indexOf(l)-z.indexOf(M)}),U=l=>e.jsx(qs,{job:l,expanded:u.has(l.job_name),onToggle:()=>re(l.job_name),paperMarkdownJobs:l.job_name==="paper_markdown_backfill"?L.data:void 0,paperMarkdownJobsLoading:l.job_name==="paper_markdown_backfill"?L.isLoading:!1,paperMarkdownJobsError:l.job_name==="paper_markdown_backfill"?L.error:null},l.job_name),J=async()=>{p(l=>l+1),E.current=!0,i(!0);try{await Promise.all([oe(),L.refetch(),F.refetch()])}finally{i(!1)}};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(ie,{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.jsx(C,{asChild:!0,variant:"outline",size:"sm",children:e.jsx(xe,{to:"/autonomous-operations",children:"Autonomous operations"})}),e.jsxs(C,{variant:"outline",size:"sm",onClick:()=>n(!a),className:a?"cron-status--running":"",children:[e.jsx(Ne,{className:`h-4 w-4 mr-2 ${a?"animate-spin":""}`}),"Auto-refresh ",a?"ON":"OFF"]}),e.jsxs(C,{variant:"outline",size:"sm",onClick:()=>void J(),disabled:o,children:[e.jsx(Ne,{className:`h-4 w-4 mr-2 ${o?"animate-spin":""}`}),"Refresh"]})]})]})}),e.jsx(v,{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:["@",j==null?void 0:j.username]}),". Health checks prefer database freshness over log completion so silent no-work failures surface as degraded or broken. Expanded jobs include deterministic scheduler, log, lock, durable-data, throughput, backlog, and semantic contract evidence with direct operator and run links."]})})}),e.jsx(Gs,{data:g}),e.jsxs(Ps,{defaultValue:"critical-jobs",children:[e.jsxs(Ve,{className:"grid h-auto w-full grid-cols-2 sm:w-auto sm:grid-cols-5",children:[e.jsx(K,{value:"critical-jobs",children:"Critical Jobs"}),e.jsx(K,{value:"leaderboard-syncs",children:"Leaderboard Syncs"}),e.jsx(K,{value:"codex-paper-jobs",children:"Codex Paper Jobs"}),e.jsx(K,{value:"catalog-audit",children:"Catalog Audit"}),e.jsx(K,{value:"chat-compute",children:"Chat Compute"})]}),e.jsxs(G,{value:"critical-jobs",className:"mt-6",children:[x&&e.jsxs("div",{className:"flex items-center justify-center py-12",children:[e.jsx(D,{className:"h-8 w-8 animate-spin cron-info-text"}),e.jsx("span",{className:"ml-3 cron-muted",children:"Loading CRON jobs status..."})]}),R&&e.jsx(v,{className:"cron-status--broken",children:e.jsx(f,{className:"pt-6",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(se,{className:"h-5 w-5"}),e.jsx("p",{children:ae??"Failed to load CRON jobs status. Please try again."})]})})}),g&&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(l=>e.jsxs(v,{children:[e.jsx(b,{className:"pb-2",children:e.jsx(y,{className:"text-sm font-medium cron-muted capitalize",children:l})}),e.jsx(f,{children:e.jsx("div",{className:"text-2xl font-bold",children:g.summary[l]})})]},l))}),g.summary.critical_issues.length>0&&e.jsxs(v,{className:"mb-6 cron-status--broken",children:[e.jsx(b,{children:e.jsxs(y,{className:"flex items-center gap-2",children:[e.jsx(Te,{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:g.summary.critical_issues.map(l=>e.jsx("li",{children:l},l))})})]}),e.jsxs(v,{className:"mb-8",children:[e.jsx(b,{children:e.jsx(y,{className:"text-base",children:"What to check next"})}),e.jsxs(f,{children:[e.jsx("p",{className:"text-sm cron-muted",children:g.summary.what_to_check_next}),e.jsxs("p",{className:"mt-2 text-xs cron-muted flex items-center gap-2",children:[e.jsx(Ee,{className:"h-4 w-4"}),"Last updated: ",_(g.timestamp)," · Health score:"," ",g.summary.health_score.toFixed(0),"%"]})]})]}),e.jsxs(v,{className:`mb-8 ${g.summary.coverage.coverage_gaps?"cron-status--broken":""}`,children:[e.jsxs(b,{children:[e.jsx(y,{className:"text-base",children:"Coverage"}),e.jsx(q,{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:g.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:g.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:g.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:g.summary.coverage.coverage_gaps})]})]})]}),e.jsxs(v,{className:"mb-8",children:[e.jsxs(b,{children:[e.jsx(y,{className:"text-xl",children:"Critical jobs"}),e.jsx(q,{children:"Writers whose stale output breaks the live site"})]}),e.jsx(f,{className:"space-y-4",children:ne.map(U)})]}),e.jsx("div",{className:"space-y-6",children:W.map(l=>e.jsxs(v,{children:[e.jsx(b,{children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs(y,{className:"text-xl capitalize flex items-center gap-2",children:[e.jsx(S,{className:Pe[l]??Pe.hourly,children:l}),e.jsx("span",{children:"Supporting jobs"})]}),e.jsxs(q,{children:[T[l].length," job",T[l].length!==1?"s":""]})]})}),e.jsx(f,{className:"space-y-4",children:T[l].map(U)})]},l))}),r.length>0&&e.jsxs(v,{className:"mt-6",children:[e.jsxs(b,{children:[e.jsx(y,{className:"text-xl",children:"Manual operations"}),e.jsx(q,{children:"Visible invocation history; excluded from scheduled health and coverage"})]}),e.jsx(f,{className:"space-y-4",children:r.map(U)})]})]})]}),e.jsxs(G,{value:"leaderboard-syncs",className:"mt-6",children:[x&&e.jsxs("div",{className:"flex items-center justify-center py-12",children:[e.jsx(D,{className:"h-8 w-8 animate-spin cron-info-text"}),e.jsx("span",{className:"ml-3 cron-muted",children:"Loading leaderboard sync status..."})]}),R&&e.jsx(v,{className:"cron-status--broken",children:e.jsx(f,{className:"pt-6",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(se,{className:"h-5 w-5"}),e.jsx("p",{children:ae??"Failed to load leaderboard sync status. Please try again."})]})})}),g&&e.jsxs(v,{children:[e.jsx(b,{children:e.jsxs("div",{className:"flex items-center justify-between gap-4",children:[e.jsxs("div",{children:[e.jsx(y,{className:"text-xl",children:"Leaderboard syncs"}),e.jsx(q,{children:"Recurring imports from externally maintained benchmark leaderboards"})]}),e.jsxs(S,{children:[B.length," jobs"]})]})}),e.jsx(f,{className:"space-y-4",children:B.map(U)})]})]}),e.jsx(G,{value:"codex-paper-jobs",className:"mt-6",children:e.jsx(Hs,{autoRefresh:a,refreshToken:d})}),e.jsx(G,{value:"catalog-audit",className:"mt-6",children:e.jsx(zs,{})}),e.jsxs(G,{value:"chat-compute",className:"mt-6",children:[e.jsxs(v,{className:"mb-6",children:[e.jsxs(b,{children:[e.jsx(y,{children:"Environment record"}),e.jsx(q,{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:N,onChange:l=>k(l.target.value),placeholder:"staging-q-example",className:"flex-1 rounded border px-3 py-2"}),e.jsx(C,{onClick:()=>c(N.trim()),children:"Load"})]})]}),e.jsx(Ws,{data:F.data,loading:F.isLoading,error:F.error}),s&&e.jsx("div",{className:"mt-6",children:e.jsx(Ks,{data:Y.data,loading:Y.isLoading,error:Y.error})})]})]})]})})};export{Ws as ChatComputePanel,Gs as CronSnapshotNotice,Qs as cronStatusRefetchInterval,pa as default}; diff --git a/assets/ExternalSourceEvalBadge-C5RULLdt.js b/assets/ExternalSourceEvalBadge-BwESq8va.js similarity index 94% rename from assets/ExternalSourceEvalBadge-C5RULLdt.js rename to assets/ExternalSourceEvalBadge-BwESq8va.js index d5d3713338edf976367d97e0661ccb722f392a39..abae641d19ddd37e64a83a1d16b4e484793e4218 100644 --- a/assets/ExternalSourceEvalBadge-C5RULLdt.js +++ b/assets/ExternalSourceEvalBadge-BwESq8va.js @@ -1 +1 @@ -import{a as o}from"./papers-Celoj8_s.js";import{a4 as g,j as a,L as l}from"./index-CkeK0cDg.js";import{H as u,a as c,b as d}from"./hover-card-CAN3Vtea.js";import{s as m}from"./safeExternalHref-CkBrsh84.js";class b{constructor(e){this.request=e}list(e={}){const t=new URLSearchParams(Object.entries(e).filter(r=>r[1]!==void 0).map(([r,n])=>[r,String(n)])).toString();return this.request(`/evaluations/${t?`?${t}`:""}`,{cache:"no-store"})}get(e){return this.request(`/evaluations/${e}`)}async byPaper(e){return this.allPages({paper_id:Number(e),ordering:"-benchmark_popularity"})}async byDataset(e,t){return this.allPages({dataset_id:Number(e),best_metric:t,ordering:"best_rank"})}async byLeaderboard(e,t,r={}){return this.allPages({dataset_id:Number(e),task_id:Number(t),ordering:"best_rank",...r})}create(e){return this.request("/evaluations/",{method:"POST",body:JSON.stringify(e)})}update(e,t){return this.request(`/evaluations/${e}`,{method:"PUT",body:JSON.stringify(t)})}delete(e){return this.request(`/evaluations/${e}`,{method:"DELETE"})}primeCurationState(e,t=!1){return o.primeEvaluations(e,t)}batch(e,t){return o.mutateEvaluations(e,t,"/evaluations/batch",{method:"POST",body:JSON.stringify({paper_id:e,operations:t})})}async allPages(e){const r=await this.list({...e,page_size:100});if(!r.next_page)return r.results;const n=Math.ceil(r.count/100),p=await Promise.all(Array.from({length:n-1},(i,h)=>this.list({...e,page:h+2,page_size:100})));return[r,...p].flatMap(i=>i.results)}}const w=new b(g),j=()=>a.jsxs(u,{openDelay:120,closeDelay:120,children:[a.jsx(c,{asChild:!0,children:a.jsx("button",{type:"button",className:"bm-closed-source-tag","aria-label":"Closed-source model",children:"closed"})}),a.jsxs(d,{side:"top",align:"start",className:"w-auto max-w-[260px] p-3 text-sm leading-snug",children:["This is an evaluation of a closed-source model. You can disable viewing these in your"," ",a.jsx(l,{to:"/settings",className:"closed-eval-tooltip-link",children:"settings"}),"."]})]});function x(s){if(!s)return"Evaluation sourced outside this paper";const e=s.toLowerCase();if(e.includes("open-asr-leaderboard"))return"Open ASR Leaderboard";if(e.includes("arcprize.org"))return"ARC Prize Leaderboard";if(e.includes("frontierswe.com"))return"FrontierSWE";if(e.includes("deepswe.datacurve.ai"))return"DeepSWE";try{const t=new URL(s,"https://paperswithcode.co");return t.pathname.startsWith("/paper/")?"Source paper":t.hostname.replace(/^www\./,"")}catch{return s}}const E=({sourceUrl:s})=>{const e=m(s),t=typeof s=="string"&&s.startsWith("/paper/")?s:null,r=x(s);return a.jsxs(u,{openDelay:120,closeDelay:120,children:[a.jsx(c,{asChild:!0,children:a.jsx("button",{type:"button",className:"bm-external-source-tag","aria-label":`Externally sourced evaluation: ${r}`,children:"External"})}),a.jsxs(d,{side:"top",align:"start",className:"w-auto max-w-[280px] p-3 text-sm leading-snug",children:["This score was sourced outside this paper.",t?a.jsxs(a.Fragment,{children:[" ",a.jsx(l,{to:t,target:"_blank",rel:"noopener noreferrer",className:"external-eval-tooltip-link",children:r}),"."]}):e?a.jsxs(a.Fragment,{children:[" ",a.jsx("a",{href:e,target:"_blank",rel:"noopener noreferrer",className:"external-eval-tooltip-link",children:r}),"."]}):a.jsxs(a.Fragment,{children:[" ",r,"."]})]})]})};export{j as C,E,w as e}; +import{a as o}from"./papers-Ctf2uv0o.js";import{a4 as g,j as a,L as l}from"./index-B7UoLEbn.js";import{H as u,a as c,b as d}from"./hover-card-BM8a6wEE.js";import{s as m}from"./safeExternalHref-CkBrsh84.js";class b{constructor(e){this.request=e}list(e={}){const t=new URLSearchParams(Object.entries(e).filter(r=>r[1]!==void 0).map(([r,n])=>[r,String(n)])).toString();return this.request(`/evaluations/${t?`?${t}`:""}`,{cache:"no-store"})}get(e){return this.request(`/evaluations/${e}`)}async byPaper(e){return this.allPages({paper_id:Number(e),ordering:"-benchmark_popularity"})}async byDataset(e,t){return this.allPages({dataset_id:Number(e),best_metric:t,ordering:"best_rank"})}async byLeaderboard(e,t,r={}){return this.allPages({dataset_id:Number(e),task_id:Number(t),ordering:"best_rank",...r})}create(e){return this.request("/evaluations/",{method:"POST",body:JSON.stringify(e)})}update(e,t){return this.request(`/evaluations/${e}`,{method:"PUT",body:JSON.stringify(t)})}delete(e){return this.request(`/evaluations/${e}`,{method:"DELETE"})}primeCurationState(e,t=!1){return o.primeEvaluations(e,t)}batch(e,t){return o.mutateEvaluations(e,t,"/evaluations/batch",{method:"POST",body:JSON.stringify({paper_id:e,operations:t})})}async allPages(e){const r=await this.list({...e,page_size:100});if(!r.next_page)return r.results;const n=Math.ceil(r.count/100),p=await Promise.all(Array.from({length:n-1},(i,h)=>this.list({...e,page:h+2,page_size:100})));return[r,...p].flatMap(i=>i.results)}}const w=new b(g),j=()=>a.jsxs(u,{openDelay:120,closeDelay:120,children:[a.jsx(c,{asChild:!0,children:a.jsx("button",{type:"button",className:"bm-closed-source-tag","aria-label":"Closed-source model",children:"closed"})}),a.jsxs(d,{side:"top",align:"start",className:"w-auto max-w-[260px] p-3 text-sm leading-snug",children:["This is an evaluation of a closed-source model. You can disable viewing these in your"," ",a.jsx(l,{to:"/settings",className:"closed-eval-tooltip-link",children:"settings"}),"."]})]});function x(s){if(!s)return"Evaluation sourced outside this paper";const e=s.toLowerCase();if(e.includes("open-asr-leaderboard"))return"Open ASR Leaderboard";if(e.includes("arcprize.org"))return"ARC Prize Leaderboard";if(e.includes("frontierswe.com"))return"FrontierSWE";if(e.includes("deepswe.datacurve.ai"))return"DeepSWE";try{const t=new URL(s,"https://paperswithcode.co");return t.pathname.startsWith("/paper/")?"Source paper":t.hostname.replace(/^www\./,"")}catch{return s}}const E=({sourceUrl:s})=>{const e=m(s),t=typeof s=="string"&&s.startsWith("/paper/")?s:null,r=x(s);return a.jsxs(u,{openDelay:120,closeDelay:120,children:[a.jsx(c,{asChild:!0,children:a.jsx("button",{type:"button",className:"bm-external-source-tag","aria-label":`Externally sourced evaluation: ${r}`,children:"External"})}),a.jsxs(d,{side:"top",align:"start",className:"w-auto max-w-[280px] p-3 text-sm leading-snug",children:["This score was sourced outside this paper.",t?a.jsxs(a.Fragment,{children:[" ",a.jsx(l,{to:t,target:"_blank",rel:"noopener noreferrer",className:"external-eval-tooltip-link",children:r}),"."]}):e?a.jsxs(a.Fragment,{children:[" ",a.jsx("a",{href:e,target:"_blank",rel:"noopener noreferrer",className:"external-eval-tooltip-link",children:r}),"."]}):a.jsxs(a.Fragment,{children:[" ",r,"."]})]})]})};export{j as C,E,w as e}; diff --git a/assets/FeedView-CWq49Xub.js b/assets/FeedView-DoZPrMkR.js similarity index 91% rename from assets/FeedView-CWq49Xub.js rename to assets/FeedView-DoZPrMkR.js index 6491e021162e63bb226735f3d89f99d9a73cf36d..0d93ce6e0040e333b04a504169a3216fb3172ab4 100644 --- a/assets/FeedView-CWq49Xub.js +++ b/assets/FeedView-DoZPrMkR.js @@ -1 +1 @@ -import{j as e,H as Z,L as p,b as V,c as ee,d as se,r as m,i as $,e as X,C as ae,f as te}from"./index-CkeK0cDg.js";import{d as U,t as re}from"./colors-DQ-VN9If.js";import{L as ne,F as ie,B as oe,M as le}from"./mail-0F33Vm5v.js";import{P as ce}from"./plus-BaTMbqcZ.js";import{r as G}from"./research-BfGol3BN.js";import{P as de}from"./components-BRrDI9KS.js";import{A as he}from"./AgentLogos-BU5avxAK.js";import{P as me}from"./PaperFeedFilters-D-Ie3cDx.js";import{r as pe,P as ue,w as ge}from"./PaperDateFilter-qc_JVYg0.js";import{D as fe,u as xe,P as je,M as be,S as we,a as ve,R as ye,W as Ne,A as _e,b as Pe,q as ke,c as Se}from"./chatLaunch-NPBTDHUP.js";import{c as Ce}from"./chat-Cvg-XEh-.js";import{c as W}from"./catalog-DGg7xZLW.js";import{S}from"./chatPrompts-DypmWIqx.js";import{u as Ae}from"./usePapers-fMOiVOFB.js";import{u as Le}from"./useIntersectionObserver-Bw5JPCeX.js";import{S as k}from"./skeleton-Cs8haT1C.js";import{A as Te,a as Fe}from"./alert-Vt5eE6re.js";import{u as I}from"./useQuery-_Fj6Jfzr.js";import{u as Me}from"./useInfiniteQuery-gdIFpXB_.js";import"./paperQueryKeys-BP2E-0yf.js";import"./LatexTitle-DPYNzv63.js";import"./papers-Celoj8_s.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-Vq6DwYpn.js";import"./chevron-down-CcbfCW-U.js";function Q({signedIn:t,popularTasks:u=[]}){const l=[...t?[]:[e.jsx(e.Fragment,{children:"Sign in with your Hugging Face account. Your follows stay private."})],e.jsxs(e.Fragment,{children:["Open any task, method, benchmark, author, or organization page and click"," ",e.jsxs("span",{className:"following-intro-pill",children:[e.jsx(ce,{"aria-hidden":"true"}),"Follow"]}),"."]}),e.jsxs(e.Fragment,{children:["New papers and benchmark results from everything you follow appear here, ranked like the trending feed. You can also get them as a weekly email from ",e.jsx(p,{to:"/settings",children:"Settings"}),"."]})];return e.jsxs("section",{className:"following-intro","aria-labelledby":"following-intro-title",children:[e.jsx("h2",{id:"following-intro-title",children:"Build your personal research feed"}),e.jsx("p",{className:"following-intro-lead",children:"Follow the tasks, benchmarks, authors, and organizations you care about, and this page collects their latest papers and results in one place."}),e.jsx("ol",{className:"following-intro-steps",children:l.map((n,o)=>e.jsxs("li",{children:[e.jsx("span",{"aria-hidden":"true",children:o+1}),e.jsx("p",{children:n})]},o))}),!t&&e.jsx("div",{className:"following-intro-signin",children:e.jsx(Z,{returnTo:"/following",label:"Sign in to start following"})}),e.jsxs("div",{className:"following-intro-browse",children:[e.jsxs(p,{to:"/tasks",children:[e.jsx(ne,{"aria-hidden":"true"}),"Browse tasks"]}),e.jsxs(p,{to:"/methods",children:[e.jsx(ie,{"aria-hidden":"true"}),"Browse methods"]}),e.jsxs(p,{to:"/organizations",children:[e.jsx(oe,{"aria-hidden":"true"}),"Browse organizations"]}),t&&e.jsxs(p,{to:"/settings",children:[e.jsx(le,{"aria-hidden":"true"}),"Weekly email"]})]}),u.length>0&&e.jsxs("div",{className:"following-intro-popular",children:[e.jsx("h3",{children:"Popular tasks to follow"}),e.jsx("div",{children:u.map(n=>e.jsx(p,{to:`/tasks/${n.slug}`,children:U(n.name,n.slug)},n.id))})]})]})}const Ee=[["trending","trending"],["date_published","newest"],["citation_count","most cited"]],Y=45,He=1800,De=25,Re=350,Ie=t=>{const[u,l]=m.useState(S[0].slice(0,1));return m.useEffect(()=>{var f,w;if(!t)return;if((w=(f=window.matchMedia)==null?void 0:f.call(window,"(prefers-reduced-motion: reduce)"))!=null&&w.matches){l(S[0]);return}let n=0,o=1,c=!1,g;l(S[0].slice(0,o));const h=()=>{const v=S[n];if(!c){if(o+=1,l(v.slice(0,o)),o===v.length){c=!0,g=window.setTimeout(h,He);return}g=window.setTimeout(h,Y);return}if(o-=1,l(v.slice(0,o)),o===0){c=!1,n=(n+1)%S.length,g=window.setTimeout(h,Re);return}g=window.setTimeout(h,De)};return g=window.setTimeout(h,Y),()=>window.clearTimeout(g)},[t]),u},Oe=t=>t==="trending"||t==="date_published"||t==="citation_count"?t:"trending",qe=()=>{var D,H;const t=V(),u=X(),l=te()?we:ve,[n,o]=m.useState({text:"",paperMentions:[]}),c=n.text,[g,h]=m.useState(0),[f,w]=m.useState(fe),[v,O]=m.useState(!0),[C,A]=m.useState("low"),[b,L]=m.useState(!1),[T,P]=m.useState(null),q=Ie(!c),F=m.useRef(null),M=I({queryKey:["chatAvailability"],queryFn:()=>Ce.getAvailability(),retry:!1,enabled:$()}),x=!!((D=M.data)!=null&&D.web_search_available),y=$()&&((H=M.data)==null?void 0:H.paper_mentions_enabled)!==!1,i=xe({draft:n,onChange:o,enabled:y,textareaRef:F});m.useLayoutEffect(()=>{const a=F.current;if(!a)return;const d=()=>{if(a.style.height="auto",c){a.style.height=`${Math.min(a.scrollHeight,160)}px`;return}const j=a.placeholder,N=S.reduce((_,R)=>(a.placeholder=R,Math.max(_,a.scrollHeight)),0);a.placeholder=j,a.style.height=`${Math.min(N,160)}px`};return d(),window.addEventListener("resize",d),()=>window.removeEventListener("resize",d)},[c]);const E=async(a=n)=>{const d=a.text.trim();if(!(!d||b)){if(u){const j=new URLSearchParams({q:d,model:f}),N=`${ae}?${j}`,_=window.open(N,"_blank");if(!_){P(N);return}_.opener=null,P(null),o({text:"",paperMentions:[]});return}L(!0),ke(a,f,{webSearchEnabled:v,reasoningEffort:C});try{const j=await Se(f,C);t(`/chat/${j.id}`)}catch{t("/chat")}}};return e.jsxs(e.Fragment,{children:[!u&&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(je,{text:n.text,mentions:n.paperMentions,scrollTop:g,variant:"home"}),e.jsx("textarea",{ref:F,rows:1,value:c,placeholder:q,"aria-label":"Ask the assistant",disabled:b,onChange:a=>i.updateText(a.target.value,a.target.selectionStart),onSelect:a=>i.refresh(a.currentTarget.selectionStart),onClick:a=>i.refresh(a.currentTarget.selectionStart),onScroll:a=>h(a.currentTarget.scrollTop),onBlur:a=>{var d,j;(j=(d=a.relatedTarget)==null?void 0:d.closest)!=null&&j.call(d,".chat-paper-picker")||window.setTimeout(i.close,0)},onKeyDown:a=>{i.keyDown(a)||a.key==="Enter"&&!a.shiftKey&&(a.preventDefault(),E())},role:y?"combobox":void 0,"aria-expanded":y?i.open:void 0,"aria-controls":i.open?i.pickerId:void 0,"aria-activedescendant":i.open&&i.results.length?`${i.optionIdPrefix}-${i.activeIndex}`:void 0,"aria-autocomplete":y?"list":void 0,"aria-describedby":i.message?"ask-home-paper-mention-message":void 0})]}),T&&e.jsx("div",{className:"chat-paper-mention-message",role:"alert",children:e.jsx("a",{href:T,target:"_blank",rel:"noreferrer",children:"Open this question on paperswithcode.co"})}),i.message&&e.jsx("div",{id:"ask-home-paper-mention-message",className:"chat-paper-mention-message",role:"alert",children:i.message}),e.jsxs("div",{className:"ask-home-foot",children:[e.jsxs("div",{className:"ask-home-provider-tools",children:[e.jsx(be,{models:l,selectedModel:f,onModelChange:w}),!u&&e.jsx(ye,{value:C,onChange:A,disabled:b}),x&&e.jsx(Ne,{enabled:v,onChange:O,disabled:b})]}),e.jsx("button",{type:"button",className:`chat-send${c.trim()?" chat-send-on":""}`,onClick:()=>void E(),disabled:!c.trim()||b,"aria-label":"Ask the assistant",children:e.jsx(_e,{})})]}),e.jsx(Pe,{open:i.open,query:i.query,results:i.results,activeIndex:i.activeIndex,loading:i.loading,error:i.error,onSelect:i.select,id:i.pickerId,optionIdPrefix:i.optionIdPrefix})]})]})},ms=({following:t=!1})=>{var a,d,j,N,_,R,z;const u=V(),l=ee(),n=l==null?void 0:l.user,[o,c]=se(),g=Oe(o.get("order_by")),h=pe(o,void 0,t?"month":"week"),f=o.get("has_code")==="true",w=o.get("has_hf_artifacts")==="true",v=s=>{const r=new URLSearchParams(o);r.set("order_by",s),t?u(`/?${r}`):c(r)},O=s=>{const r=new URLSearchParams(o);s?r.set("has_code","true"):r.delete("has_code"),c(r)},C=s=>{const r=new URLSearchParams(o);s?r.set("has_hf_artifacts","true"):r.delete("has_hf_artifacts"),c(r)},A=I({queryKey:["top-tasks-sidebar"],queryFn:()=>W.topTasks(8),staleTime:10*60*1e3}),b=I({queryKey:["trending-tasks-sidebar"],queryFn:()=>W.trendingTasks({limit:8,level:0}),staleTime:10*60*1e3}),L=Ae({enabled:!t,page_size:30,order_by:g,order_dir:"desc",start_date:h.startDate,end_date:h.endDate,include_resources:!0,has_code:f,has_hf_artifacts:w}),T={...h,hasCode:f,hasHfArtifacts:w},P=Me({queryKey:["research-feed",n==null?void 0:n.hf_subject,T],queryFn:({pageParam:s})=>G.following(s,T),initialPageParam:0,getNextPageParam:(s,r)=>s.length===40?r.length*40:void 0,enabled:t&&!!n}),q=I({queryKey:["research-follows",n==null?void 0:n.hf_subject],queryFn:G.follows,enabled:t&&!!n}),F=t&&!!n&&((a=q.data)==null?void 0:a.length)===0,M=(d=A.data)==null?void 0:d.slice(0,8),x=t?P:L,y=m.useMemo(()=>{var r,K;return(t?((r=P.data)==null?void 0:r.pages.flatMap(B=>B.map(J=>J.paper)))??[]:((K=L.data)==null?void 0:K.pages.flatMap(B=>B.results))??[]).map(re)},[t,P.data,L.data]),{targetRef:i,isIntersecting:E}=Le({rootMargin:"400px"});m.useEffect(()=>{E&&x.hasNextPage&&!x.isFetchingNextPage&&x.fetchNextPage()},[E,x.hasNextPage,x.isFetchingNextPage]);const D=x.isLoading||t&&(l==null?void 0:l.isLoading),H=x.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"}),A.isLoading&&e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:Array.from({length:6}).map((s,r)=>e.jsx(k,{className:"h-5 w-full"},r))}),(j=A.data)==null?void 0:j.map(s=>e.jsxs(p,{to:`/tasks/${s.slug}`,className:"sidebar-link",children:[U(s.name,s.slug),s.paper_count!=null&&e.jsx("span",{className:"count",children:s.paper_count})]},s.id)),e.jsx(p,{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"}),b.isLoading&&e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:Array.from({length:6}).map((s,r)=>e.jsx(k,{className:"h-5 w-full"},r))}),((_=(N=b.data)==null?void 0:N.results)==null?void 0:_.length)===0&&!b.isLoading&&e.jsx("div",{style:{fontSize:12,color:"var(--ink-faint)"},children:"No domains gaining momentum right now."}),(z=(R=b.data)==null?void 0:R.results)==null?void 0:z.map(s=>e.jsxs(p,{to:`/tasks/${s.slug}`,className:"sidebar-link",children:[U(s.name,s.slug),e.jsxs("span",{className:"count",children:[s.share_lift.toFixed(1),"x"]})]},s.id))]}),e.jsxs("div",{className:"sidebar-section sidebar-section-tools",children:[e.jsx("div",{className:"sidebar-label",children:"Use PwC with your agent"}),e.jsxs(p,{to:"/mcp",className:"action-btn sidebar-tools-mcp",title:"Connect Claude, Codex, Cursor, or OpenCode to the PwC MCP server",children:["MCP server",e.jsx(he,{})]}),e.jsxs("p",{className:"sidebar-tools-copy",children:["Search papers, benchmarks, and leaderboards from any MCP client, or from the terminal with the"," ",e.jsxs("a",{href:"https://github.com/huggingface/pwc-cli",target:"_blank",rel:"noreferrer",children:[e.jsx("code",{children:"pwc"})," CLI"]}),"."]})]})]}),e.jsxs("div",{className:"feed-main",children:[($()||X())&&e.jsx("div",{className:"feed-chat",children:e.jsx(qe,{})}),e.jsxs("div",{className:"feed-content",children:[e.jsxs("div",{className:"sort-bar home-feed-sort-bar",children:[e.jsxs("div",{className:"paper-feed-toolbar-controls",children:[e.jsxs("div",{className:"sort-options",children:[Ee.map(([s,r])=>e.jsx("button",{className:`sort-btn ${!t&&g===s?"active":""}`,onClick:()=>v(s),children:r},s)),e.jsx("button",{className:`sort-btn ${t?"active":""}`,onClick:()=>{const s=new URLSearchParams(o);s.delete("order_by");const r=s.toString();u(r?`/following?${r}`:"/following")},children:"following"})]}),e.jsx(me,{hasCode:f,hasHfArtifacts:w,onHasCodeChange:O,onHasHfArtifactsChange:C})]}),e.jsx(ue,{startDate:h.startDate,endDate:h.endDate,onChange:s=>c(ge(o,s))})]}),H&&e.jsx(Te,{variant:"destructive",className:"mb-4",children:e.jsxs(Fe,{children:["Failed to load papers. ",e.jsx("button",{type:"button",onClick:()=>void x.refetch(),children:"Try again"})]})}),t&&!(l!=null&&l.isLoading)&&!n?e.jsx(Q,{signedIn:!1,popularTasks:M}):F?e.jsx(Q,{signedIn:!0,popularTasks:M}):D?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(k,{className:"paper-thumb-skeleton"})}),e.jsxs("div",{className:"paper-body",style:{flex:1,gap:12},children:[e.jsx(k,{className:"h-6 w-3/4"}),e.jsx(k,{className:"h-4 w-1/2"}),e.jsx(k,{className:"h-12 w-full"})]})]},r))}):y.length===0?H?null:e.jsx("div",{className:"no-results",children:t?e.jsxs(e.Fragment,{children:["No papers from your follows match these filters. Widen the date range, or follow more from ",e.jsx(p,{to:"/tasks",children:"tasks"}),", ",e.jsx(p,{to:"/methods",children:"methods"}),", benchmark, author, or organization pages."]}):"No papers in this window."}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"paper-list",children:y.map((s,r)=>e.jsx(de,{paper:s,rank:r+1},s.id))}),e.jsx("div",{ref:i,style:{height:1}}),x.isFetchingNextPage&&e.jsx("div",{style:{padding:"20px 0",textAlign:"center",color:"var(--ink-faint)"},children:"Loading more…"})]})]})]})]})]})};export{qe as AskAssistant,ms as default}; +import{j as e,H as Z,L as p,b as V,c as ee,d as se,r as m,i as $,e as X,C as ae,f as te}from"./index-B7UoLEbn.js";import{d as U,t as re}from"./colors-COYRNy-F.js";import{L as ne,F as ie,B as oe,M as le}from"./mail-BWFd7V0v.js";import{P as ce}from"./plus-BvN48Xkz.js";import{r as G}from"./research-D7aSz-AO.js";import{P as de}from"./components-Cax1Inob.js";import{A as he}from"./AgentLogos-XWluRn7l.js";import{P as me}from"./PaperFeedFilters-CF3OKsFW.js";import{r as pe,P as ue,w as ge}from"./PaperDateFilter-CGG1OZi6.js";import{D as fe,u as xe,P as je,M as be,S as we,a as ve,R as ye,W as Ne,A as _e,b as Pe,q as ke,c as Se}from"./chatLaunch-BG1GqDpR.js";import{c as Ce}from"./chat-B6IGPjTl.js";import{c as W}from"./catalog-DcbS_7_L.js";import{S}from"./chatPrompts-DypmWIqx.js";import{u as Ae}from"./usePapers-CDuTKuAc.js";import{u as Le}from"./useIntersectionObserver-DOCspj7m.js";import{S as k}from"./skeleton-DLsINbKq.js";import{A as Te,a as Fe}from"./alert-B3UHHG00.js";import{u as I}from"./useQuery-DV2f4JpC.js";import{u as Me}from"./useInfiniteQuery-CoFrg4GN.js";import"./paperQueryKeys-BP2E-0yf.js";import"./LatexTitle-CeC5Gqpu.js";import"./papers-Ctf2uv0o.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-BOnBmrXi.js";import"./chevron-down-CF7sS93G.js";function Q({signedIn:t,popularTasks:u=[]}){const l=[...t?[]:[e.jsx(e.Fragment,{children:"Sign in with your Hugging Face account. Your follows stay private."})],e.jsxs(e.Fragment,{children:["Open any task, method, benchmark, author, or organization page and click"," ",e.jsxs("span",{className:"following-intro-pill",children:[e.jsx(ce,{"aria-hidden":"true"}),"Follow"]}),"."]}),e.jsxs(e.Fragment,{children:["New papers and benchmark results from everything you follow appear here, ranked like the trending feed. You can also get them as a weekly email from ",e.jsx(p,{to:"/settings",children:"Settings"}),"."]})];return e.jsxs("section",{className:"following-intro","aria-labelledby":"following-intro-title",children:[e.jsx("h2",{id:"following-intro-title",children:"Build your personal research feed"}),e.jsx("p",{className:"following-intro-lead",children:"Follow the tasks, benchmarks, authors, and organizations you care about, and this page collects their latest papers and results in one place."}),e.jsx("ol",{className:"following-intro-steps",children:l.map((n,o)=>e.jsxs("li",{children:[e.jsx("span",{"aria-hidden":"true",children:o+1}),e.jsx("p",{children:n})]},o))}),!t&&e.jsx("div",{className:"following-intro-signin",children:e.jsx(Z,{returnTo:"/following",label:"Sign in to start following"})}),e.jsxs("div",{className:"following-intro-browse",children:[e.jsxs(p,{to:"/tasks",children:[e.jsx(ne,{"aria-hidden":"true"}),"Browse tasks"]}),e.jsxs(p,{to:"/methods",children:[e.jsx(ie,{"aria-hidden":"true"}),"Browse methods"]}),e.jsxs(p,{to:"/organizations",children:[e.jsx(oe,{"aria-hidden":"true"}),"Browse organizations"]}),t&&e.jsxs(p,{to:"/settings",children:[e.jsx(le,{"aria-hidden":"true"}),"Weekly email"]})]}),u.length>0&&e.jsxs("div",{className:"following-intro-popular",children:[e.jsx("h3",{children:"Popular tasks to follow"}),e.jsx("div",{children:u.map(n=>e.jsx(p,{to:`/tasks/${n.slug}`,children:U(n.name,n.slug)},n.id))})]})]})}const Ee=[["trending","trending"],["date_published","newest"],["citation_count","most cited"]],Y=45,He=1800,De=25,Re=350,Ie=t=>{const[u,l]=m.useState(S[0].slice(0,1));return m.useEffect(()=>{var f,w;if(!t)return;if((w=(f=window.matchMedia)==null?void 0:f.call(window,"(prefers-reduced-motion: reduce)"))!=null&&w.matches){l(S[0]);return}let n=0,o=1,c=!1,g;l(S[0].slice(0,o));const h=()=>{const v=S[n];if(!c){if(o+=1,l(v.slice(0,o)),o===v.length){c=!0,g=window.setTimeout(h,He);return}g=window.setTimeout(h,Y);return}if(o-=1,l(v.slice(0,o)),o===0){c=!1,n=(n+1)%S.length,g=window.setTimeout(h,Re);return}g=window.setTimeout(h,De)};return g=window.setTimeout(h,Y),()=>window.clearTimeout(g)},[t]),u},Oe=t=>t==="trending"||t==="date_published"||t==="citation_count"?t:"trending",qe=()=>{var D,H;const t=V(),u=X(),l=te()?we:ve,[n,o]=m.useState({text:"",paperMentions:[]}),c=n.text,[g,h]=m.useState(0),[f,w]=m.useState(fe),[v,O]=m.useState(!0),[C,A]=m.useState("low"),[b,L]=m.useState(!1),[T,P]=m.useState(null),q=Ie(!c),F=m.useRef(null),M=I({queryKey:["chatAvailability"],queryFn:()=>Ce.getAvailability(),retry:!1,enabled:$()}),x=!!((D=M.data)!=null&&D.web_search_available),y=$()&&((H=M.data)==null?void 0:H.paper_mentions_enabled)!==!1,i=xe({draft:n,onChange:o,enabled:y,textareaRef:F});m.useLayoutEffect(()=>{const a=F.current;if(!a)return;const d=()=>{if(a.style.height="auto",c){a.style.height=`${Math.min(a.scrollHeight,160)}px`;return}const j=a.placeholder,N=S.reduce((_,R)=>(a.placeholder=R,Math.max(_,a.scrollHeight)),0);a.placeholder=j,a.style.height=`${Math.min(N,160)}px`};return d(),window.addEventListener("resize",d),()=>window.removeEventListener("resize",d)},[c]);const E=async(a=n)=>{const d=a.text.trim();if(!(!d||b)){if(u){const j=new URLSearchParams({q:d,model:f}),N=`${ae}?${j}`,_=window.open(N,"_blank");if(!_){P(N);return}_.opener=null,P(null),o({text:"",paperMentions:[]});return}L(!0),ke(a,f,{webSearchEnabled:v,reasoningEffort:C});try{const j=await Se(f,C);t(`/chat/${j.id}`)}catch{t("/chat")}}};return e.jsxs(e.Fragment,{children:[!u&&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(je,{text:n.text,mentions:n.paperMentions,scrollTop:g,variant:"home"}),e.jsx("textarea",{ref:F,rows:1,value:c,placeholder:q,"aria-label":"Ask the assistant",disabled:b,onChange:a=>i.updateText(a.target.value,a.target.selectionStart),onSelect:a=>i.refresh(a.currentTarget.selectionStart),onClick:a=>i.refresh(a.currentTarget.selectionStart),onScroll:a=>h(a.currentTarget.scrollTop),onBlur:a=>{var d,j;(j=(d=a.relatedTarget)==null?void 0:d.closest)!=null&&j.call(d,".chat-paper-picker")||window.setTimeout(i.close,0)},onKeyDown:a=>{i.keyDown(a)||a.key==="Enter"&&!a.shiftKey&&(a.preventDefault(),E())},role:y?"combobox":void 0,"aria-expanded":y?i.open:void 0,"aria-controls":i.open?i.pickerId:void 0,"aria-activedescendant":i.open&&i.results.length?`${i.optionIdPrefix}-${i.activeIndex}`:void 0,"aria-autocomplete":y?"list":void 0,"aria-describedby":i.message?"ask-home-paper-mention-message":void 0})]}),T&&e.jsx("div",{className:"chat-paper-mention-message",role:"alert",children:e.jsx("a",{href:T,target:"_blank",rel:"noreferrer",children:"Open this question on paperswithcode.co"})}),i.message&&e.jsx("div",{id:"ask-home-paper-mention-message",className:"chat-paper-mention-message",role:"alert",children:i.message}),e.jsxs("div",{className:"ask-home-foot",children:[e.jsxs("div",{className:"ask-home-provider-tools",children:[e.jsx(be,{models:l,selectedModel:f,onModelChange:w}),!u&&e.jsx(ye,{value:C,onChange:A,disabled:b}),x&&e.jsx(Ne,{enabled:v,onChange:O,disabled:b})]}),e.jsx("button",{type:"button",className:`chat-send${c.trim()?" chat-send-on":""}`,onClick:()=>void E(),disabled:!c.trim()||b,"aria-label":"Ask the assistant",children:e.jsx(_e,{})})]}),e.jsx(Pe,{open:i.open,query:i.query,results:i.results,activeIndex:i.activeIndex,loading:i.loading,error:i.error,onSelect:i.select,id:i.pickerId,optionIdPrefix:i.optionIdPrefix})]})]})},ms=({following:t=!1})=>{var a,d,j,N,_,R,z;const u=V(),l=ee(),n=l==null?void 0:l.user,[o,c]=se(),g=Oe(o.get("order_by")),h=pe(o,void 0,t?"month":"week"),f=o.get("has_code")==="true",w=o.get("has_hf_artifacts")==="true",v=s=>{const r=new URLSearchParams(o);r.set("order_by",s),t?u(`/?${r}`):c(r)},O=s=>{const r=new URLSearchParams(o);s?r.set("has_code","true"):r.delete("has_code"),c(r)},C=s=>{const r=new URLSearchParams(o);s?r.set("has_hf_artifacts","true"):r.delete("has_hf_artifacts"),c(r)},A=I({queryKey:["top-tasks-sidebar"],queryFn:()=>W.topTasks(8),staleTime:10*60*1e3}),b=I({queryKey:["trending-tasks-sidebar"],queryFn:()=>W.trendingTasks({limit:8,level:0}),staleTime:10*60*1e3}),L=Ae({enabled:!t,page_size:30,order_by:g,order_dir:"desc",start_date:h.startDate,end_date:h.endDate,include_resources:!0,has_code:f,has_hf_artifacts:w}),T={...h,hasCode:f,hasHfArtifacts:w},P=Me({queryKey:["research-feed",n==null?void 0:n.hf_subject,T],queryFn:({pageParam:s})=>G.following(s,T),initialPageParam:0,getNextPageParam:(s,r)=>s.length===40?r.length*40:void 0,enabled:t&&!!n}),q=I({queryKey:["research-follows",n==null?void 0:n.hf_subject],queryFn:G.follows,enabled:t&&!!n}),F=t&&!!n&&((a=q.data)==null?void 0:a.length)===0,M=(d=A.data)==null?void 0:d.slice(0,8),x=t?P:L,y=m.useMemo(()=>{var r,K;return(t?((r=P.data)==null?void 0:r.pages.flatMap(B=>B.map(J=>J.paper)))??[]:((K=L.data)==null?void 0:K.pages.flatMap(B=>B.results))??[]).map(re)},[t,P.data,L.data]),{targetRef:i,isIntersecting:E}=Le({rootMargin:"400px"});m.useEffect(()=>{E&&x.hasNextPage&&!x.isFetchingNextPage&&x.fetchNextPage()},[E,x.hasNextPage,x.isFetchingNextPage]);const D=x.isLoading||t&&(l==null?void 0:l.isLoading),H=x.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"}),A.isLoading&&e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:Array.from({length:6}).map((s,r)=>e.jsx(k,{className:"h-5 w-full"},r))}),(j=A.data)==null?void 0:j.map(s=>e.jsxs(p,{to:`/tasks/${s.slug}`,className:"sidebar-link",children:[U(s.name,s.slug),s.paper_count!=null&&e.jsx("span",{className:"count",children:s.paper_count})]},s.id)),e.jsx(p,{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"}),b.isLoading&&e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:Array.from({length:6}).map((s,r)=>e.jsx(k,{className:"h-5 w-full"},r))}),((_=(N=b.data)==null?void 0:N.results)==null?void 0:_.length)===0&&!b.isLoading&&e.jsx("div",{style:{fontSize:12,color:"var(--ink-faint)"},children:"No domains gaining momentum right now."}),(z=(R=b.data)==null?void 0:R.results)==null?void 0:z.map(s=>e.jsxs(p,{to:`/tasks/${s.slug}`,className:"sidebar-link",children:[U(s.name,s.slug),e.jsxs("span",{className:"count",children:[s.share_lift.toFixed(1),"x"]})]},s.id))]}),e.jsxs("div",{className:"sidebar-section sidebar-section-tools",children:[e.jsx("div",{className:"sidebar-label",children:"Use PwC with your agent"}),e.jsxs(p,{to:"/mcp",className:"action-btn sidebar-tools-mcp",title:"Connect Claude, Codex, Cursor, or OpenCode to the PwC MCP server",children:["MCP server",e.jsx(he,{})]}),e.jsxs("p",{className:"sidebar-tools-copy",children:["Search papers, benchmarks, and leaderboards from any MCP client, or from the terminal with the"," ",e.jsxs("a",{href:"https://github.com/huggingface/pwc-cli",target:"_blank",rel:"noreferrer",children:[e.jsx("code",{children:"pwc"})," CLI"]}),"."]})]})]}),e.jsxs("div",{className:"feed-main",children:[($()||X())&&e.jsx("div",{className:"feed-chat",children:e.jsx(qe,{})}),e.jsxs("div",{className:"feed-content",children:[e.jsxs("div",{className:"sort-bar home-feed-sort-bar",children:[e.jsxs("div",{className:"paper-feed-toolbar-controls",children:[e.jsxs("div",{className:"sort-options",children:[Ee.map(([s,r])=>e.jsx("button",{className:`sort-btn ${!t&&g===s?"active":""}`,onClick:()=>v(s),children:r},s)),e.jsx("button",{className:`sort-btn ${t?"active":""}`,onClick:()=>{const s=new URLSearchParams(o);s.delete("order_by");const r=s.toString();u(r?`/following?${r}`:"/following")},children:"following"})]}),e.jsx(me,{hasCode:f,hasHfArtifacts:w,onHasCodeChange:O,onHasHfArtifactsChange:C})]}),e.jsx(ue,{startDate:h.startDate,endDate:h.endDate,onChange:s=>c(ge(o,s))})]}),H&&e.jsx(Te,{variant:"destructive",className:"mb-4",children:e.jsxs(Fe,{children:["Failed to load papers. ",e.jsx("button",{type:"button",onClick:()=>void x.refetch(),children:"Try again"})]})}),t&&!(l!=null&&l.isLoading)&&!n?e.jsx(Q,{signedIn:!1,popularTasks:M}):F?e.jsx(Q,{signedIn:!0,popularTasks:M}):D?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(k,{className:"paper-thumb-skeleton"})}),e.jsxs("div",{className:"paper-body",style:{flex:1,gap:12},children:[e.jsx(k,{className:"h-6 w-3/4"}),e.jsx(k,{className:"h-4 w-1/2"}),e.jsx(k,{className:"h-12 w-full"})]})]},r))}):y.length===0?H?null:e.jsx("div",{className:"no-results",children:t?e.jsxs(e.Fragment,{children:["No papers from your follows match these filters. Widen the date range, or follow more from ",e.jsx(p,{to:"/tasks",children:"tasks"}),", ",e.jsx(p,{to:"/methods",children:"methods"}),", benchmark, author, or organization pages."]}):"No papers in this window."}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"paper-list",children:y.map((s,r)=>e.jsx(de,{paper:s,rank:r+1},s.id))}),e.jsx("div",{ref:i,style:{height:1}}),x.isFetchingNextPage&&e.jsx("div",{style:{padding:"20px 0",textAlign:"center",color:"var(--ink-faint)"},children:"Loading more…"})]})]})]})]})]})};export{qe as AskAssistant,ms as default}; diff --git a/assets/FollowingView-EFGemqQ1.js b/assets/FollowingView-EFGemqQ1.js deleted file mode 100644 index 5e590a1f9be9e99aa354928739d31e2d742b8664..0000000000000000000000000000000000000000 --- a/assets/FollowingView-EFGemqQ1.js +++ /dev/null @@ -1 +0,0 @@ -import{j as o}from"./index-CkeK0cDg.js";import r from"./FeedView-CWq49Xub.js";import"./colors-DQ-VN9If.js";import"./mail-0F33Vm5v.js";import"./plus-BaTMbqcZ.js";import"./research-BfGol3BN.js";import"./components-BRrDI9KS.js";import"./paperQueryKeys-BP2E-0yf.js";import"./LatexTitle-DPYNzv63.js";import"./papers-Celoj8_s.js";import"./safeExternalHref-CkBrsh84.js";import"./AgentLogos-BU5avxAK.js";import"./PaperFeedFilters-D-Ie3cDx.js";import"./PaperDateFilter-qc_JVYg0.js";import"./popover-Vq6DwYpn.js";import"./chatLaunch-NPBTDHUP.js";import"./chat-Cvg-XEh-.js";import"./chevron-down-CcbfCW-U.js";import"./useQuery-_Fj6Jfzr.js";import"./catalog-DGg7xZLW.js";import"./chatPrompts-DypmWIqx.js";import"./usePapers-fMOiVOFB.js";import"./useInfiniteQuery-gdIFpXB_.js";import"./useIntersectionObserver-Bw5JPCeX.js";import"./skeleton-Cs8haT1C.js";import"./alert-Vt5eE6re.js";function y(){return o.jsx(r,{following:!0})}export{y as default}; diff --git a/assets/FollowingView-UZ1-6cIq.js b/assets/FollowingView-UZ1-6cIq.js new file mode 100644 index 0000000000000000000000000000000000000000..9b29ae743c619b288e25efbc55d4a5fed2938e95 --- /dev/null +++ b/assets/FollowingView-UZ1-6cIq.js @@ -0,0 +1 @@ +import{j as o}from"./index-B7UoLEbn.js";import r from"./FeedView-DoZPrMkR.js";import"./colors-COYRNy-F.js";import"./mail-BWFd7V0v.js";import"./plus-BvN48Xkz.js";import"./research-D7aSz-AO.js";import"./components-Cax1Inob.js";import"./paperQueryKeys-BP2E-0yf.js";import"./LatexTitle-CeC5Gqpu.js";import"./papers-Ctf2uv0o.js";import"./safeExternalHref-CkBrsh84.js";import"./AgentLogos-XWluRn7l.js";import"./PaperFeedFilters-CF3OKsFW.js";import"./PaperDateFilter-CGG1OZi6.js";import"./popover-BOnBmrXi.js";import"./chatLaunch-BG1GqDpR.js";import"./chat-B6IGPjTl.js";import"./chevron-down-CF7sS93G.js";import"./useQuery-DV2f4JpC.js";import"./catalog-DcbS_7_L.js";import"./chatPrompts-DypmWIqx.js";import"./usePapers-CDuTKuAc.js";import"./useInfiniteQuery-CoFrg4GN.js";import"./useIntersectionObserver-DOCspj7m.js";import"./skeleton-DLsINbKq.js";import"./alert-B3UHHG00.js";function y(){return o.jsx(r,{following:!0})}export{y as default}; diff --git a/assets/FrameworksIndexView-Dq1PTcS8.js b/assets/FrameworksIndexView-C6_FlZ8B.js similarity index 92% rename from assets/FrameworksIndexView-Dq1PTcS8.js rename to assets/FrameworksIndexView-C6_FlZ8B.js index e88d7db3558d4f3d212bb1f217a5dac3ffea3aaa..01f068cd65ef84083255af575ed73c4e6b41d608 100644 --- a/assets/FrameworksIndexView-Dq1PTcS8.js +++ b/assets/FrameworksIndexView-C6_FlZ8B.js @@ -1 +1 @@ -import{b as d,j as e,L as o,F as m}from"./index-CkeK0cDg.js";import{u as p}from"./useQuery-_Fj6Jfzr.js";import{I as h}from"./components-BRrDI9KS.js";import{c as u}from"./catalog-DGg7xZLW.js";import{c as g,h as f}from"./colors-DQ-VN9If.js";import"./paperQueryKeys-BP2E-0yf.js";import"./LatexTitle-DPYNzv63.js";import"./papers-Celoj8_s.js";import"./safeExternalHref-CkBrsh84.js";const x={gpu:"GPU",cpu:"CPU",apple:"Apple silicon"},j={display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:24,paddingBottom:12,borderBottom:"1px solid var(--hairline-strong)"},k={fontFamily:"var(--serif)",fontSize:26,fontWeight:500,letterSpacing:"-0.02em",marginBottom:4},_={fontFamily:"var(--serif)",fontStyle:"italic",fontSize:13,color:"var(--ink-soft)"},v={fontFamily:"var(--mono)",fontSize:13,fontWeight:600,letterSpacing:"0.04em",textTransform:"uppercase",color:"var(--ink)",marginBottom:6},b=({platform:r})=>{const n=g(f(r));return e.jsx("span",{className:"framework-platform-chip",style:{background:n.bg,color:n.text},children:x[r]})},w=({framework:r})=>{const n=d(),l=`/papers?framework=${encodeURIComponent(r.slug)}`;return e.jsxs("article",{id:`framework-${r.slug}`,className:"framework-card framework-card-clickable",role:"link",tabIndex:0,"aria-label":`View papers implemented by ${r.name}`,onClick:a=>{a.target.closest("a, button")||n(l)},onKeyDown:a=>{a.target===a.currentTarget&&(a.key==="Enter"||a.key===" ")&&(a.preventDefault(),n(l))},children:[e.jsxs("div",{className:"framework-card-head",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"framework-card-name",children:r.name}),r.organization_name&&e.jsx("div",{className:"framework-card-org",children:r.organization_name})]}),r.platforms&&r.platforms.length>0&&e.jsx("div",{className:"framework-platform-row",children:r.platforms.map(a=>e.jsx(b,{platform:a},a))})]}),e.jsx("p",{className:"framework-card-desc",children:r.description}),r.when_to_use&&e.jsxs("div",{className:"framework-card-when",children:[e.jsx("span",{className:"framework-card-when-label",children:"When to use"}),r.when_to_use]}),(r.github_url||r.docs_url||r.introducing_paper_arxiv_id)&&e.jsxs("div",{className:"framework-card-links",children:[r.introducing_paper_arxiv_id&&e.jsx(o,{to:`/paper/${r.introducing_paper_arxiv_id}`,className:"framework-link",children:"Introducing paper"}),r.github_url&&r.paper_count>0&&e.jsxs(o,{to:l,className:"framework-link",children:["Implements ",r.paper_count," ",r.paper_count===1?"paper":"papers"]}),r.github_url&&r.paper_count===0&&e.jsx("span",{className:"framework-link framework-link-disabled","aria-disabled":"true",children:"Implements 0 papers"}),r.github_url&&e.jsxs("a",{href:r.github_url,target:"_blank",rel:"noopener noreferrer",className:"framework-link",children:[e.jsx(h,{name:"github",size:13}),"GitHub"]}),r.docs_url&&r.docs_url!==r.github_url&&e.jsx("a",{href:r.docs_url,target:"_blank",rel:"noopener noreferrer",className:"framework-link",children:"Docs"})]})]})},E=()=>{var a;const r=p({queryKey:["framework-catalog"],queryFn:()=>u.frameworkCatalog()}),n=((a=r.data)==null?void 0:a.domains)??[],l=n.reduce((i,s)=>i+s.categories.reduce((t,c)=>t+c.frameworks.length,0),0);return m.useEffect(()=>{var s;const i=window.location.hash.slice(1);i&&((s=document.getElementById(i))==null||s.scrollIntoView())},[r.data]),e.jsxs("div",{className:"page",children:[e.jsx("div",{className:"feed-header",children:e.jsxs("div",{children:[e.jsxs("h1",{className:"feed-title",children:["AI ",e.jsx("em",{children:"Frameworks"})]}),e.jsx("div",{className:"feed-subtitle",children:"Curated libraries and tools to run, serve, and train models — pick the right stack for your hardware and workload."})]})}),r.isLoading&&e.jsx("div",{className:"empty",children:"Loading frameworks…"}),r.isError&&e.jsx("div",{className:"empty",children:"Could not load frameworks."}),n.map(i=>e.jsxs("section",{style:{marginBottom:56},children:[e.jsxs("div",{style:j,children:[e.jsxs("div",{children:[e.jsx("h2",{style:k,children:i.name}),e.jsx("div",{style:_,children:i.description})]}),e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",whiteSpace:"nowrap"},children:[i.categories.length," ",i.categories.length===1?"category":"categories"," ·"," ",i.categories.reduce((s,t)=>s+t.frameworks.length,0)," frameworks"]})]}),i.categories.map(s=>e.jsxs("div",{className:"framework-category",children:[e.jsxs("div",{className:"framework-category-head",children:[e.jsxs("div",{children:[e.jsx("h3",{style:v,children:s.name}),s.description&&e.jsx("p",{className:"framework-category-blurb",children:s.description}),s.guide_url&&e.jsxs("a",{href:s.guide_url,target:"_blank",rel:"noopener noreferrer",className:"framework-guide-link",children:[s.guide_label??"Read guide"," →"]})]}),e.jsxs("div",{className:"framework-category-meta",children:[s.frameworks.length," ",s.frameworks.length===1?"framework":"frameworks"]})]}),e.jsx("div",{className:"framework-grid",children:s.frameworks.map(t=>e.jsx(w,{framework:t},t.slug))})]},s.slug))]},i.slug)),e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",marginTop:8},children:[l," frameworks across ",n.length," ",n.length===1?"domain":"domains",". More areas coming soon."]})]})};export{w as FrameworkCard,E as default}; +import{b as d,j as e,L as o,F as m}from"./index-B7UoLEbn.js";import{u as p}from"./useQuery-DV2f4JpC.js";import{I as h}from"./components-Cax1Inob.js";import{c as u}from"./catalog-DcbS_7_L.js";import{c as g,h as f}from"./colors-COYRNy-F.js";import"./paperQueryKeys-BP2E-0yf.js";import"./LatexTitle-CeC5Gqpu.js";import"./papers-Ctf2uv0o.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-DPYNzv63.js b/assets/LatexTitle-CeC5Gqpu.js similarity index 98% rename from assets/LatexTitle-DPYNzv63.js rename to assets/LatexTitle-CeC5Gqpu.js index b426ee2c8eb1cccac002dd35e391ab4cd726190e..24c65355515f19f40945f99769aabaf2a16ad9bb 100644 --- a/assets/LatexTitle-DPYNzv63.js +++ b/assets/LatexTitle-CeC5Gqpu.js @@ -1,2 +1,2 @@ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/katex-wklAmtGL.css"])))=>i.map(i=>d[i]); -import{j as u,r as A,_ as L}from"./index-CkeK0cDg.js";let g=null,$=null;function M(){return $??($=Promise.all([L(()=>import("./katex-DkKDou_j.js"),[]),L(()=>Promise.resolve({}),__vite__mapDeps([0]))]).then(([n])=>(g=n.default,g))),$}const O=new Set([",",";",":","!"," ","quad","qquad","enspace","thinspace"]),S={a:"á",e:"é",i:"í",o:"ó",u:"ú",y:"ý",A:"Á",E:"É",I:"Í",O:"Ó",U:"Ú",Y:"Ý"},b={a:"à",e:"è",i:"ì",o:"ò",u:"ù",A:"À",E:"È",I:"Ì",O:"Ò",U:"Ù"},w={a:"â",e:"ê",i:"î",o:"ô",u:"û",A:"Â",E:"Ê",I:"Î",O:"Ô",U:"Û"},k={a:"ä",e:"ë",i:"ï",o:"ö",u:"ü",y:"ÿ",A:"Ä",E:"Ë",I:"Ï",O:"Ö",U:"Ü",Y:"Ÿ"},N={"'":S,"`":b,"^":w,'"':k,"~":{n:"ñ",N:"Ñ"}},T={ss:"ß",ae:"æ",AE:"Æ",oe:"œ",OE:"Œ",o:"ø",O:"Ø",l:"ł",L:"Ł"};function I(n,i){var e;return((e=N[n])==null?void 0:e[i])??null}function v(n){const i=[];let e=0,t="";const r=()=>{t&&(i.push({type:"text",content:t}),t="")};for(;e=n.length)return{name:"",end:e};if(!/[a-zA-Z]/.test(n[e]))return{name:n[e],end:e+1};const t=e;for(;e=n.length)return null;if(n[i+1]==="{"){const t=d(n,i+1);return t?{end:t.end}:null}return/[A-Za-z0-9+\-=.]/.test(n[i+1])?{end:i+2}:null}function y(n,i){let e=i;if(n[e]==="\\"){const{name:o,end:s}=j(n,e);if(!o)return null;if(e=s,n[e]==="{"){const a=d(n,e);a&&(e=a.end)}}else if(/[A-Za-z0-9]/.test(n[e])){let o=e+1;for(;oe.length-i.length)}function X(n,i,e){const t=z(i);if(!t.length)return[n];const r=t.map(s=>s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")),o=new RegExp(`(${r.join("|")})`,"gi");return n.split(o).filter(Boolean).map((s,a)=>t.some(p=>p.toLocaleLowerCase()===s.toLocaleLowerCase())?u.jsx("mark",{children:s},`${e}-mark-${a}`):s)}function m(n,i,e){const t=[];let r=0,o=0;const s=()=>`${i}-${o++}`,a=(p,f)=>p==="strong"?u.jsx("strong",{children:f},s()):u.jsx("em",{children:f},s());for(;rr&&t.push(...X(n.slice(r,f),e,s())),r=f}return t}function _({latex:n,display:i}){const[e,t]=A.useState(g);A.useEffect(()=>{if(e)return;let o=!0;return M().then(s=>{o&&t(()=>s)}),()=>{o=!1}},[e]);const r=A.useMemo(()=>{if(e)try{return e.renderToString(n.trim(),{displayMode:i,throwOnError:!1})}catch{return null}},[e,n,i]);return r===void 0?u.jsx(u.Fragment,{children:n}):r?u.jsx("span",{className:i?"katex-display":void 0,dangerouslySetInnerHTML:{__html:r}}):u.jsx(u.Fragment,{children:i?`$$${n}$$`:`$${n}$`})}function D(n,i){const e=v(n),t=[];return e.forEach((r,o)=>{const s=`latex-${o}`;if(r.type==="text"){const a=m(r.content,s,i);a.length===1?t.push(a[0]):a.length>1&&t.push(u.jsx(A.Fragment,{children:a},s));return}if(r.type==="display"){t.push(u.jsx(_,{latex:r.content,display:!0},s));return}t.push(u.jsx(_,{latex:r.content,display:!1},s))}),t.length===1?t[0]:u.jsx(u.Fragment,{children:t})}const P=({text:n,className:i="",highlight:e})=>{const t=A.useMemo(()=>D(n,e),[n,e]);return u.jsx("span",{className:i,children:t})},Z=({title:n,className:i="",highlight:e})=>u.jsx(P,{text:n,className:i,highlight:e});export{Z as L,P as a}; +import{j as u,r as A,_ as L}from"./index-B7UoLEbn.js";let g=null,$=null;function M(){return $??($=Promise.all([L(()=>import("./katex-DkKDou_j.js"),[]),L(()=>Promise.resolve({}),__vite__mapDeps([0]))]).then(([n])=>(g=n.default,g))),$}const O=new Set([",",";",":","!"," ","quad","qquad","enspace","thinspace"]),S={a:"á",e:"é",i:"í",o:"ó",u:"ú",y:"ý",A:"Á",E:"É",I:"Í",O:"Ó",U:"Ú",Y:"Ý"},b={a:"à",e:"è",i:"ì",o:"ò",u:"ù",A:"À",E:"È",I:"Ì",O:"Ò",U:"Ù"},w={a:"â",e:"ê",i:"î",o:"ô",u:"û",A:"Â",E:"Ê",I:"Î",O:"Ô",U:"Û"},k={a:"ä",e:"ë",i:"ï",o:"ö",u:"ü",y:"ÿ",A:"Ä",E:"Ë",I:"Ï",O:"Ö",U:"Ü",Y:"Ÿ"},N={"'":S,"`":b,"^":w,'"':k,"~":{n:"ñ",N:"Ñ"}},T={ss:"ß",ae:"æ",AE:"Æ",oe:"œ",OE:"Œ",o:"ø",O:"Ø",l:"ł",L:"Ł"};function I(n,i){var e;return((e=N[n])==null?void 0:e[i])??null}function v(n){const i=[];let e=0,t="";const r=()=>{t&&(i.push({type:"text",content:t}),t="")};for(;e=n.length)return{name:"",end:e};if(!/[a-zA-Z]/.test(n[e]))return{name:n[e],end:e+1};const t=e;for(;e=n.length)return null;if(n[i+1]==="{"){const t=d(n,i+1);return t?{end:t.end}:null}return/[A-Za-z0-9+\-=.]/.test(n[i+1])?{end:i+2}:null}function y(n,i){let e=i;if(n[e]==="\\"){const{name:o,end:s}=j(n,e);if(!o)return null;if(e=s,n[e]==="{"){const a=d(n,e);a&&(e=a.end)}}else if(/[A-Za-z0-9]/.test(n[e])){let o=e+1;for(;oe.length-i.length)}function X(n,i,e){const t=z(i);if(!t.length)return[n];const r=t.map(s=>s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")),o=new RegExp(`(${r.join("|")})`,"gi");return n.split(o).filter(Boolean).map((s,a)=>t.some(p=>p.toLocaleLowerCase()===s.toLocaleLowerCase())?u.jsx("mark",{children:s},`${e}-mark-${a}`):s)}function m(n,i,e){const t=[];let r=0,o=0;const s=()=>`${i}-${o++}`,a=(p,f)=>p==="strong"?u.jsx("strong",{children:f},s()):u.jsx("em",{children:f},s());for(;rr&&t.push(...X(n.slice(r,f),e,s())),r=f}return t}function _({latex:n,display:i}){const[e,t]=A.useState(g);A.useEffect(()=>{if(e)return;let o=!0;return M().then(s=>{o&&t(()=>s)}),()=>{o=!1}},[e]);const r=A.useMemo(()=>{if(e)try{return e.renderToString(n.trim(),{displayMode:i,throwOnError:!1})}catch{return null}},[e,n,i]);return r===void 0?u.jsx(u.Fragment,{children:n}):r?u.jsx("span",{className:i?"katex-display":void 0,dangerouslySetInnerHTML:{__html:r}}):u.jsx(u.Fragment,{children:i?`$$${n}$$`:`$${n}$`})}function D(n,i){const e=v(n),t=[];return e.forEach((r,o)=>{const s=`latex-${o}`;if(r.type==="text"){const a=m(r.content,s,i);a.length===1?t.push(a[0]):a.length>1&&t.push(u.jsx(A.Fragment,{children:a},s));return}if(r.type==="display"){t.push(u.jsx(_,{latex:r.content,display:!0},s));return}t.push(u.jsx(_,{latex:r.content,display:!1},s))}),t.length===1?t[0]:u.jsx(u.Fragment,{children:t})}const P=({text:n,className:i="",highlight:e})=>{const t=A.useMemo(()=>D(n,e),[n,e]);return u.jsx("span",{className:i,children:t})},Z=({title:n,className:i="",highlight:e})=>u.jsx(P,{text:n,className:i,highlight:e});export{Z as L,P as a}; diff --git a/assets/MarkdownText-DM-IyAfb.js b/assets/MarkdownText-DH4XnT47.js similarity index 85% rename from assets/MarkdownText-DM-IyAfb.js rename to assets/MarkdownText-DH4XnT47.js index 84e41a8e719645e7ee720692b2ac03a9d235917a..b63c64b30f0b4f3317abd398f05a6b7fe095e6e5 100644 --- a/assets/MarkdownText-DM-IyAfb.js +++ b/assets/MarkdownText-DH4XnT47.js @@ -1 +1 @@ -import{n as l,j as s,L as u}from"./index-CkeK0cDg.js";/* empty css */import{r as p,a as m,P as h}from"./PaperPreviewLink-CQ27hqZy.js";import{M as d}from"./index-B1_S53Hb.js";import{r as w}from"./index-DqQiSNg1.js";const x=new Set(["paperswithcode.co","www.paperswithcode.co","localhost","127.0.0.1","167.235.148.241"]),P=["/methods","/paper","/papers","/tasks","/benchmark","/conferences"];function f(n,o=window.location.origin){if(!n)return null;let t;if(n.startsWith("/"))t=n;else try{const e=new URL(n,o);if(!x.has(e.hostname))return null;t=`${e.pathname}${e.search}${e.hash}`}catch{return null}const r=t.split(/[?#]/,1)[0];return P.some(e=>r===e||r.startsWith(`${e}/`))?t:null}function k(n){const t=n.split(/[?#]/,1)[0].match(/^\/papers?\/([^/]+)$/);if(!t||t[1].includes("%"))return null;const r=t[1],e=/^\d{4}[.-]\d{4,5}(?:v\d+)?$/.test(r),a=/^[1-9]\d*$/.test(r);return!e&&!a?null:l(r)}const L=({text:n,className:o=""})=>s.jsx("div",{className:o,children:s.jsx(d,{remarkPlugins:[w,m],rehypePlugins:[p],components:{a:({href:t,children:r,node:e,...a})=>{const i=f(t);if(i){const c=k(i);return c?s.jsx(h,{routeId:c,to:i,...a,children:r}):s.jsx(u,{to:i,...a,children:r})}return s.jsx("a",{href:t,target:"_blank",rel:"noopener noreferrer",...a,children:r})}},children:n})});export{L as M,f as r}; +import{n as l,j as s,L as u}from"./index-B7UoLEbn.js";/* empty css */import{r as p,a as m,P as h}from"./PaperPreviewLink-C5ianbW8.js";import{M as d}from"./index-tHVWANW1.js";import{r as w}from"./index-ClEBI70O.js";const x=new Set(["paperswithcode.co","www.paperswithcode.co","localhost","127.0.0.1","167.235.148.241"]),P=["/methods","/paper","/papers","/tasks","/benchmark","/conferences"];function f(n,o=window.location.origin){if(!n)return null;let t;if(n.startsWith("/"))t=n;else try{const e=new URL(n,o);if(!x.has(e.hostname))return null;t=`${e.pathname}${e.search}${e.hash}`}catch{return null}const r=t.split(/[?#]/,1)[0];return P.some(e=>r===e||r.startsWith(`${e}/`))?t:null}function k(n){const t=n.split(/[?#]/,1)[0].match(/^\/papers?\/([^/]+)$/);if(!t||t[1].includes("%"))return null;const r=t[1],e=/^\d{4}[.-]\d{4,5}(?:v\d+)?$/.test(r),a=/^[1-9]\d*$/.test(r);return!e&&!a?null:l(r)}const L=({text:n,className:o=""})=>s.jsx("div",{className:o,children:s.jsx(d,{remarkPlugins:[w,m],rehypePlugins:[p],components:{a:({href:t,children:r,node:e,...a})=>{const i=f(t);if(i){const c=k(i);return c?s.jsx(h,{routeId:c,to:i,...a,children:r}):s.jsx(u,{to:i,...a,children:r})}return s.jsx("a",{href:t,target:"_blank",rel:"noopener noreferrer",...a,children:r})}},children:n})});export{L as M,f as r}; diff --git a/assets/McpView-DiDGTElx.js b/assets/McpView-CCjkgwIH.js similarity index 97% rename from assets/McpView-DiDGTElx.js rename to assets/McpView-CCjkgwIH.js index 3f235b2b2b71823ef7b28c1750c5a99764066594..3185a4d8d2552b5b7aa99d50f2752bb595cefcfb 100644 --- a/assets/McpView-DiDGTElx.js +++ b/assets/McpView-CCjkgwIH.js @@ -1 +1 @@ -import{F as m,j as e,l as b}from"./index-CkeK0cDg.js";import{u as x}from"./useQuery-_Fj6Jfzr.js";import{f as j,D as f}from"./latexPlainText-DI8YEXVe.js";import{q as y}from"./queryOptions-C9woPjwX.js";import{E as i}from"./external-link-E5LiqyOi.js";import{C as g}from"./copy-BEe19JmS.js";const h="https://paperswithcode.co/mcp",v="https://staging.paperswithcode.co/mcp";function u(s){const a=typeof window>"u"?void 0:window.location;return a?a.hostname==="staging.paperswithcode.co"?v:a.hostname==="paperswithcode.co"||a.hostname==="www.paperswithcode.co"?h:`${a.origin.replace(/\/$/,"")}/mcp`:h}function w(s){if(!s||typeof s!="object"||s.status!=="ok"||s.service!=="pwc-mcp"||typeof s.version!="string"||typeof s.protocol!="string")throw new Error("MCP health response is invalid");return s}async function k(s){const a=new AbortController,c=()=>a.abort();s==null||s.addEventListener("abort",c,{once:!0});const o=window.setTimeout(c,5e3);try{const t=await fetch(`${u()}/health`,{headers:{Accept:"application/json"},signal:a.signal,credentials:"omit"});if(!t.ok)throw new Error("MCP service is unavailable");return w(await t.json())}finally{window.clearTimeout(o),s==null||s.removeEventListener("abort",c)}}const C=()=>y({queryKey:["mcp","health"],queryFn:({signal:s})=>k(s),retry:!1,staleTime:3e4,refetchInterval:6e4,refetchOnWindowFocus:!1}),N=[["search_papers","Search by topic, title, author, or arXiv ID."],["list_papers","Filter and order papers by taxonomy, venue, date, or organization."],["get_paper_info","Read canonical metadata, authors, abstract, links, and resources."],["read_paper","Read stored paper Markdown with safe continuation for long papers."],["list_recent_papers","Browse the most recently indexed research."],["get_related_papers","Find related work already indexed in the catalogue."],["list_trending_papers","Discover papers with recent repository momentum."],["get_paper_evaluations","Inspect benchmark results reported by one paper."],["get_paper_lineage","Follow explicit predecessor and successor relationships."],["list_tasks","Search tasks and retrieve stable slugs for exact lookup."],["get_task","Inspect a research task and its benchmark coverage."],["list_methods","Search methods and retrieve stable slugs for exact lookup."],["get_method","Inspect a method, its source paper, and catalogue metadata."],["list_conferences","Browse conferences with imported papers."],["get_conference","Inspect one exact conference edition."],["list_organizations","Browse research organizations."],["get_organization","Inspect one exact research organization."],["list_frameworks","Browse frameworks by domain, category, or platform."],["get_framework","Inspect one exact research framework."],["list_benchmarks","Browse and filter benchmark leaderboards."],["get_benchmark","Read one benchmark, metrics, datasets, and leading results."]],P=["pwc://papers/{paper}","pwc://papers/{paper}/markdown","pwc://tasks/{task}","pwc://benchmarks/{benchmark}"],_=["Find recent papers on test-time compute and summarize the main approaches.","Compare the methods and reported benchmarks in these three arXiv papers.","What are the leading benchmarks for text-to-video generation?","Trace the predecessor and successor papers for Mamba."],d=[{key:"chatgpt",label:"ChatGPT",summary:"In workspace developer settings, add a custom MCP app and paste the server URL. Availability and admin approval vary by plan."},{key:"claude",label:"Claude",summary:"Open Settings → Connectors → Add custom connector, paste the URL, then enable Papers With Code from Search and tools."},{key:"claude-code",label:"Claude Code",summary:"Add the anonymous Streamable HTTP server from a terminal.",code:s=>`claude mcp add --transport http paperswithcode ${s}`},{key:"cursor",label:"Cursor",summary:"Add this entry to your project or user MCP configuration.",code:s=>JSON.stringify({mcpServers:{paperswithcode:{url:s}}},null,2)},{key:"vscode",label:"VS Code",summary:"Add this Streamable HTTP server to .vscode/mcp.json.",code:s=>JSON.stringify({servers:{paperswithcode:{type:"http",url:s}}},null,2)},{key:"generic",label:"Generic",summary:"Configure an anonymous, stateless Streamable HTTP server using the URL below. No API key or OAuth flow is required."}],l=({value:s,label:a})=>{const[c,o]=m.useState(!1),t=async()=>{var n;(n=navigator.clipboard)!=null&&n.writeText&&(await navigator.clipboard.writeText(s),o(!0),window.setTimeout(()=>o(!1),1500))};return e.jsxs("button",{className:"action-btn mcp-copy",type:"button",onClick:()=>void t(),"aria-label":a,children:[c?e.jsx(b,{size:16,"aria-hidden":!0}):e.jsx(g,{size:16,"aria-hidden":!0}),c?"Copied":"Copy"]})},L=()=>{var n;const s=u(),a=x(C()),[c,o]=m.useState("chatgpt"),t=d.find(r=>r.key===c)??d[0];return m.useEffect(()=>(document.title=j("MCP Server"),()=>{document.title=f}),[]),e.jsxs("article",{className:"page mcp-page",children:[e.jsxs("header",{className:"mcp-hero",children:[e.jsxs("div",{children:[e.jsx("p",{className:"sidebar-label mcp-kicker",children:"Model Context Protocol"}),e.jsx("h1",{className:"feed-title",children:"Use Papers With Code in your AI assistant"}),e.jsx("p",{className:"mcp-lede",children:"Search research, inspect methods and benchmarks, and read complete papers through one anonymous, read-only MCP connection."}),e.jsxs("div",{className:"mcp-status","aria-live":"polite",children:[e.jsx("span",{className:a.isSuccess?"is-up":"is-unknown","aria-hidden":!0}),a.isSuccess?"Operational":"Status unavailable",a.data?` · v${a.data.version}`:""]})]}),e.jsxs("div",{className:"mcp-endpoint-card",children:[e.jsx("span",{children:"Remote MCP URL"}),e.jsx("code",{children:s}),e.jsx(l,{value:s,label:"Copy MCP server URL"})]})]}),e.jsxs("section",{className:"mcp-section","aria-labelledby":"mcp-connect",children:[e.jsxs("div",{className:"mcp-section-heading",children:[e.jsx("p",{className:"sidebar-label",children:"Connect"}),e.jsx("h2",{id:"mcp-connect",children:"One URL, your preferred client"}),e.jsx("span",{children:"Setup matrix reviewed September 13, 2026; staging qualification pending."})]}),e.jsx("div",{className:"mcp-client-tabs",role:"tablist","aria-label":"MCP client setup",children:d.map(r=>e.jsx("button",{type:"button",role:"tab","aria-selected":c===r.key,onClick:()=>o(r.key),children:r.label},r.key))}),e.jsxs("div",{className:"mcp-setup",role:"tabpanel",children:[e.jsx("p",{children:t.summary}),t.code?e.jsxs("div",{className:"mcp-code-row",children:[e.jsx("pre",{children:e.jsx("code",{children:t.code(s)})}),e.jsx(l,{value:t.code(s),label:`Copy ${t.label} setup`})]}):e.jsxs("div",{className:"mcp-code-row",children:[e.jsx("pre",{children:e.jsx("code",{children:s})}),e.jsx(l,{value:s,label:`Copy ${t.label} endpoint`})]})]})]}),e.jsxs("section",{className:"mcp-section","aria-labelledby":"mcp-capabilities",children:[e.jsxs("div",{className:"mcp-section-heading",children:[e.jsx("p",{className:"sidebar-label",children:"Capabilities"}),e.jsx("h2",{id:"mcp-capabilities",children:"Research context, structured for assistants"})]}),e.jsx("div",{className:"mcp-capability-grid",children:[["Discover","Search recent and established work with catalogue filters."],["Read","Continue through long stored papers without presenting a partial document as complete."],["Connect","Explore related work, paper lineage, tasks, and methods."],["Compare","Inspect benchmarks, datasets, metrics, and reported evaluations."]].map(([r,p])=>e.jsxs("div",{children:[e.jsx("h3",{children:r}),e.jsx("p",{children:p})]},r))})]}),e.jsxs("section",{className:"mcp-section","aria-labelledby":"mcp-tools",children:[e.jsxs("div",{className:"mcp-section-heading",children:[e.jsx("p",{className:"sidebar-label",children:"Catalogue"}),e.jsx("h2",{id:"mcp-tools",children:"Twenty-one focused, read-only tools"})]}),e.jsx("div",{className:"mcp-tool-grid",children:N.map(([r,p])=>e.jsxs("div",{className:"mcp-tool",children:[e.jsx("code",{children:r}),e.jsx("p",{children:p})]},r))}),e.jsx("h3",{className:"mcp-subheading",children:"Resource templates"}),e.jsx("div",{className:"mcp-resource-list",children:P.map(r=>e.jsx("code",{children:r},r))})]}),e.jsxs("section",{className:"mcp-section","aria-labelledby":"mcp-prompts",children:[e.jsxs("div",{className:"mcp-section-heading",children:[e.jsx("p",{className:"sidebar-label",children:"Try asking"}),e.jsx("h2",{id:"mcp-prompts",children:"Prompts that start useful research"})]}),e.jsx("div",{className:"mcp-prompt-list",children:_.map(r=>e.jsxs("div",{children:[e.jsx("p",{children:r}),e.jsx(l,{value:r,label:"Copy example prompt"})]},r))})]}),e.jsxs("section",{className:"mcp-section mcp-notes","aria-labelledby":"mcp-limits",children:[e.jsxs("div",{children:[e.jsx("p",{className:"sidebar-label mcp-kicker",children:"Limits & privacy"}),e.jsx("h2",{id:"mcp-limits",children:"Public by design"}),e.jsx("p",{children:"No account, API key, or write access. Fair-use limits are 60 total requests per minute, 10 semantic searches per minute, four concurrent requests per client, and 25 list results per call."}),e.jsx("p",{children:"MCP telemetry retains tool name, status, latency, response size, protocol, and server version—not prompts, paper IDs, cursors, resource URIs, raw IPs, authorization values, or bodies. Catalogue infrastructure has its own operational logging policy."})]}),e.jsxs("div",{children:[e.jsx("p",{className:"sidebar-label mcp-kicker",children:"Protocol & troubleshooting"}),e.jsx("h2",{children:"Streamable HTTP"}),e.jsxs("p",{children:["Primary protocol: ",((n=a.data)==null?void 0:n.protocol)??"verified during connection setup",". If setup fails, confirm your client supports remote Streamable HTTP, that custom servers are enabled by your workspace administrator, and that you pasted the URL exactly."]}),e.jsxs("nav",{className:"mcp-links","aria-label":"MCP documentation links",children:[e.jsxs("a",{href:"https://github.com/huggingface/pwc-cli",target:"_blank",rel:"noreferrer",children:["CLI repository ",e.jsx(i,{size:13})]}),e.jsxs("a",{href:"https://modelcontextprotocol.io/docs/2026-07-28/learn/server-concepts",target:"_blank",rel:"noreferrer",children:["MCP specification ",e.jsx(i,{size:13})]}),e.jsxs("a",{href:"/docs",target:"_blank",rel:"noreferrer",children:["Public API ",e.jsx(i,{size:13})]}),e.jsxs("a",{href:"/mcp/schema",target:"_blank",rel:"noreferrer",children:["MCP tool schema ",e.jsx(i,{size:13})]}),e.jsxs("a",{href:"/llms.txt",target:"_blank",rel:"noreferrer",children:["llms.txt ",e.jsx(i,{size:13})]})]})]})]})]})};export{L as default}; +import{F as m,j as e,l as b}from"./index-B7UoLEbn.js";import{u as x}from"./useQuery-DV2f4JpC.js";import{f as j,D as f}from"./latexPlainText-DI8YEXVe.js";import{q as y}from"./queryOptions-C9woPjwX.js";import{E as i}from"./external-link-mpf7SsAF.js";import{C as g}from"./copy-B2Q-ksVe.js";const h="https://paperswithcode.co/mcp",v="https://staging.paperswithcode.co/mcp";function u(s){const a=typeof window>"u"?void 0:window.location;return a?a.hostname==="staging.paperswithcode.co"?v:a.hostname==="paperswithcode.co"||a.hostname==="www.paperswithcode.co"?h:`${a.origin.replace(/\/$/,"")}/mcp`:h}function w(s){if(!s||typeof s!="object"||s.status!=="ok"||s.service!=="pwc-mcp"||typeof s.version!="string"||typeof s.protocol!="string")throw new Error("MCP health response is invalid");return s}async function k(s){const a=new AbortController,c=()=>a.abort();s==null||s.addEventListener("abort",c,{once:!0});const o=window.setTimeout(c,5e3);try{const t=await fetch(`${u()}/health`,{headers:{Accept:"application/json"},signal:a.signal,credentials:"omit"});if(!t.ok)throw new Error("MCP service is unavailable");return w(await t.json())}finally{window.clearTimeout(o),s==null||s.removeEventListener("abort",c)}}const C=()=>y({queryKey:["mcp","health"],queryFn:({signal:s})=>k(s),retry:!1,staleTime:3e4,refetchInterval:6e4,refetchOnWindowFocus:!1}),N=[["search_papers","Search by topic, title, author, or arXiv ID."],["list_papers","Filter and order papers by taxonomy, venue, date, or organization."],["get_paper_info","Read canonical metadata, authors, abstract, links, and resources."],["read_paper","Read stored paper Markdown with safe continuation for long papers."],["list_recent_papers","Browse the most recently indexed research."],["get_related_papers","Find related work already indexed in the catalogue."],["list_trending_papers","Discover papers with recent repository momentum."],["get_paper_evaluations","Inspect benchmark results reported by one paper."],["get_paper_lineage","Follow explicit predecessor and successor relationships."],["list_tasks","Search tasks and retrieve stable slugs for exact lookup."],["get_task","Inspect a research task and its benchmark coverage."],["list_methods","Search methods and retrieve stable slugs for exact lookup."],["get_method","Inspect a method, its source paper, and catalogue metadata."],["list_conferences","Browse conferences with imported papers."],["get_conference","Inspect one exact conference edition."],["list_organizations","Browse research organizations."],["get_organization","Inspect one exact research organization."],["list_frameworks","Browse frameworks by domain, category, or platform."],["get_framework","Inspect one exact research framework."],["list_benchmarks","Browse and filter benchmark leaderboards."],["get_benchmark","Read one benchmark, metrics, datasets, and leading results."]],P=["pwc://papers/{paper}","pwc://papers/{paper}/markdown","pwc://tasks/{task}","pwc://benchmarks/{benchmark}"],_=["Find recent papers on test-time compute and summarize the main approaches.","Compare the methods and reported benchmarks in these three arXiv papers.","What are the leading benchmarks for text-to-video generation?","Trace the predecessor and successor papers for Mamba."],d=[{key:"chatgpt",label:"ChatGPT",summary:"In workspace developer settings, add a custom MCP app and paste the server URL. Availability and admin approval vary by plan."},{key:"claude",label:"Claude",summary:"Open Settings → Connectors → Add custom connector, paste the URL, then enable Papers With Code from Search and tools."},{key:"claude-code",label:"Claude Code",summary:"Add the anonymous Streamable HTTP server from a terminal.",code:s=>`claude mcp add --transport http paperswithcode ${s}`},{key:"cursor",label:"Cursor",summary:"Add this entry to your project or user MCP configuration.",code:s=>JSON.stringify({mcpServers:{paperswithcode:{url:s}}},null,2)},{key:"vscode",label:"VS Code",summary:"Add this Streamable HTTP server to .vscode/mcp.json.",code:s=>JSON.stringify({servers:{paperswithcode:{type:"http",url:s}}},null,2)},{key:"generic",label:"Generic",summary:"Configure an anonymous, stateless Streamable HTTP server using the URL below. No API key or OAuth flow is required."}],l=({value:s,label:a})=>{const[c,o]=m.useState(!1),t=async()=>{var n;(n=navigator.clipboard)!=null&&n.writeText&&(await navigator.clipboard.writeText(s),o(!0),window.setTimeout(()=>o(!1),1500))};return e.jsxs("button",{className:"action-btn mcp-copy",type:"button",onClick:()=>void t(),"aria-label":a,children:[c?e.jsx(b,{size:16,"aria-hidden":!0}):e.jsx(g,{size:16,"aria-hidden":!0}),c?"Copied":"Copy"]})},L=()=>{var n;const s=u(),a=x(C()),[c,o]=m.useState("chatgpt"),t=d.find(r=>r.key===c)??d[0];return m.useEffect(()=>(document.title=j("MCP Server"),()=>{document.title=f}),[]),e.jsxs("article",{className:"page mcp-page",children:[e.jsxs("header",{className:"mcp-hero",children:[e.jsxs("div",{children:[e.jsx("p",{className:"sidebar-label mcp-kicker",children:"Model Context Protocol"}),e.jsx("h1",{className:"feed-title",children:"Use Papers With Code in your AI assistant"}),e.jsx("p",{className:"mcp-lede",children:"Search research, inspect methods and benchmarks, and read complete papers through one anonymous, read-only MCP connection."}),e.jsxs("div",{className:"mcp-status","aria-live":"polite",children:[e.jsx("span",{className:a.isSuccess?"is-up":"is-unknown","aria-hidden":!0}),a.isSuccess?"Operational":"Status unavailable",a.data?` · v${a.data.version}`:""]})]}),e.jsxs("div",{className:"mcp-endpoint-card",children:[e.jsx("span",{children:"Remote MCP URL"}),e.jsx("code",{children:s}),e.jsx(l,{value:s,label:"Copy MCP server URL"})]})]}),e.jsxs("section",{className:"mcp-section","aria-labelledby":"mcp-connect",children:[e.jsxs("div",{className:"mcp-section-heading",children:[e.jsx("p",{className:"sidebar-label",children:"Connect"}),e.jsx("h2",{id:"mcp-connect",children:"One URL, your preferred client"}),e.jsx("span",{children:"Setup matrix reviewed September 13, 2026; staging qualification pending."})]}),e.jsx("div",{className:"mcp-client-tabs",role:"tablist","aria-label":"MCP client setup",children:d.map(r=>e.jsx("button",{type:"button",role:"tab","aria-selected":c===r.key,onClick:()=>o(r.key),children:r.label},r.key))}),e.jsxs("div",{className:"mcp-setup",role:"tabpanel",children:[e.jsx("p",{children:t.summary}),t.code?e.jsxs("div",{className:"mcp-code-row",children:[e.jsx("pre",{children:e.jsx("code",{children:t.code(s)})}),e.jsx(l,{value:t.code(s),label:`Copy ${t.label} setup`})]}):e.jsxs("div",{className:"mcp-code-row",children:[e.jsx("pre",{children:e.jsx("code",{children:s})}),e.jsx(l,{value:s,label:`Copy ${t.label} endpoint`})]})]})]}),e.jsxs("section",{className:"mcp-section","aria-labelledby":"mcp-capabilities",children:[e.jsxs("div",{className:"mcp-section-heading",children:[e.jsx("p",{className:"sidebar-label",children:"Capabilities"}),e.jsx("h2",{id:"mcp-capabilities",children:"Research context, structured for assistants"})]}),e.jsx("div",{className:"mcp-capability-grid",children:[["Discover","Search recent and established work with catalogue filters."],["Read","Continue through long stored papers without presenting a partial document as complete."],["Connect","Explore related work, paper lineage, tasks, and methods."],["Compare","Inspect benchmarks, datasets, metrics, and reported evaluations."]].map(([r,p])=>e.jsxs("div",{children:[e.jsx("h3",{children:r}),e.jsx("p",{children:p})]},r))})]}),e.jsxs("section",{className:"mcp-section","aria-labelledby":"mcp-tools",children:[e.jsxs("div",{className:"mcp-section-heading",children:[e.jsx("p",{className:"sidebar-label",children:"Catalogue"}),e.jsx("h2",{id:"mcp-tools",children:"Twenty-one focused, read-only tools"})]}),e.jsx("div",{className:"mcp-tool-grid",children:N.map(([r,p])=>e.jsxs("div",{className:"mcp-tool",children:[e.jsx("code",{children:r}),e.jsx("p",{children:p})]},r))}),e.jsx("h3",{className:"mcp-subheading",children:"Resource templates"}),e.jsx("div",{className:"mcp-resource-list",children:P.map(r=>e.jsx("code",{children:r},r))})]}),e.jsxs("section",{className:"mcp-section","aria-labelledby":"mcp-prompts",children:[e.jsxs("div",{className:"mcp-section-heading",children:[e.jsx("p",{className:"sidebar-label",children:"Try asking"}),e.jsx("h2",{id:"mcp-prompts",children:"Prompts that start useful research"})]}),e.jsx("div",{className:"mcp-prompt-list",children:_.map(r=>e.jsxs("div",{children:[e.jsx("p",{children:r}),e.jsx(l,{value:r,label:"Copy example prompt"})]},r))})]}),e.jsxs("section",{className:"mcp-section mcp-notes","aria-labelledby":"mcp-limits",children:[e.jsxs("div",{children:[e.jsx("p",{className:"sidebar-label mcp-kicker",children:"Limits & privacy"}),e.jsx("h2",{id:"mcp-limits",children:"Public by design"}),e.jsx("p",{children:"No account, API key, or write access. Fair-use limits are 60 total requests per minute, 10 semantic searches per minute, four concurrent requests per client, and 25 list results per call."}),e.jsx("p",{children:"MCP telemetry retains tool name, status, latency, response size, protocol, and server version—not prompts, paper IDs, cursors, resource URIs, raw IPs, authorization values, or bodies. Catalogue infrastructure has its own operational logging policy."})]}),e.jsxs("div",{children:[e.jsx("p",{className:"sidebar-label mcp-kicker",children:"Protocol & troubleshooting"}),e.jsx("h2",{children:"Streamable HTTP"}),e.jsxs("p",{children:["Primary protocol: ",((n=a.data)==null?void 0:n.protocol)??"verified during connection setup",". If setup fails, confirm your client supports remote Streamable HTTP, that custom servers are enabled by your workspace administrator, and that you pasted the URL exactly."]}),e.jsxs("nav",{className:"mcp-links","aria-label":"MCP documentation links",children:[e.jsxs("a",{href:"https://github.com/huggingface/pwc-cli",target:"_blank",rel:"noreferrer",children:["CLI repository ",e.jsx(i,{size:13})]}),e.jsxs("a",{href:"https://modelcontextprotocol.io/docs/2026-07-28/learn/server-concepts",target:"_blank",rel:"noreferrer",children:["MCP specification ",e.jsx(i,{size:13})]}),e.jsxs("a",{href:"/docs",target:"_blank",rel:"noreferrer",children:["Public API ",e.jsx(i,{size:13})]}),e.jsxs("a",{href:"/mcp/schema",target:"_blank",rel:"noreferrer",children:["MCP tool schema ",e.jsx(i,{size:13})]}),e.jsxs("a",{href:"/llms.txt",target:"_blank",rel:"noreferrer",children:["llms.txt ",e.jsx(i,{size:13})]})]})]})]})]})};export{L as default}; diff --git a/assets/MethodDetailView-CLQNXnif.js b/assets/MethodDetailView-DsH5xxKe.js similarity index 92% rename from assets/MethodDetailView-CLQNXnif.js rename to assets/MethodDetailView-DsH5xxKe.js index 9c26f285f655be06fc3d7ab6ae88be698c5d36b0..0d55210fd77d095a2fe690d6944a0684105fdc59 100644 --- a/assets/MethodDetailView-CLQNXnif.js +++ b/assets/MethodDetailView-DsH5xxKe.js @@ -1 +1 @@ -import{j as e,r as A,u as Q,d as O,L,af as U}from"./index-CkeK0cDg.js";import{R as G}from"./ResearchFollowButton-Dpqj0_yd.js";import{p as W}from"./paperQueryKeys-BP2E-0yf.js";import{u as w}from"./useQuery-_Fj6Jfzr.js";import{u as Z}from"./useInfiniteQuery-gdIFpXB_.js";import{M as V,P as X}from"./components-BRrDI9KS.js";import{P as Y}from"./PaperFeedFilters-D-Ie3cDx.js";import{a as J,P as ee,b as te}from"./PaperDateFilter-qc_JVYg0.js";import{r as se,M as R}from"./MarkdownText-DM-IyAfb.js";import{c as F}from"./catalog-DGg7xZLW.js";import{p as ae}from"./papers-Celoj8_s.js";import{s as re}from"./slug-BpH-Nkvz.js";import{t as ne}from"./colors-DQ-VN9If.js";import{u as ie}from"./useIntersectionObserver-Bw5JPCeX.js";import{S as M}from"./skeleton-Cs8haT1C.js";import{A as le,a as oe}from"./alert-Vt5eE6re.js";import{s as ce}from"./safeExternalHref-CkBrsh84.js";import"./useMutation-q-fdM2fm.js";import"./research-BfGol3BN.js";import"./plus-BaTMbqcZ.js";import"./LatexTitle-DPYNzv63.js";import"./popover-Vq6DwYpn.js";/* empty css */import"./PaperPreviewLink-CQ27hqZy.js";import"./index-B1_S53Hb.js";import"./index-DqQiSNg1.js";import"./katex-DkKDou_j.js";import"./hover-card-CAN3Vtea.js";const s={pink:"#F8D7D9",pinkS:"#D9B0B3",yellow:"#FBEFC2",yellowS:"#C9B97D",orange:"#F8D7B3",orangeS:"#C99466",blue:"#CDE2EE",blueS:"#7FA4BA",purple:"#D4D2EA",purpleS:"#8E8AC0",green:"#CCE2C5",greenS:"#7DA475",ink:"#1A1814",faint:"#8E8678"},f=({x:t,y:r,w:c,h:d,fill:g,stroke:u,label:h,fontSize:l=10})=>e.jsxs("g",{children:[e.jsx("rect",{x:t,y:r,width:c,height:d,rx:"3",ry:"3",fill:g,stroke:u,strokeWidth:"1"}),e.jsx("text",{x:t+c/2,y:r+d/2,fontSize:l,fontFamily:"var(--sans)",fill:s.ink,textAnchor:"middle",dominantBaseline:"middle",children:h})]}),de=()=>e.jsxs("svg",{viewBox:"0 0 360 420",width:"100%",height:"100%",style:{display:"block"},children:[e.jsx("text",{x:"180",y:"20",fontSize:"11",fontFamily:"var(--serif)",fontStyle:"italic",fill:s.faint,textAnchor:"middle",children:"Scaled Dot-Product Attention"}),e.jsx(f,{x:140,y:40,w:80,h:26,fill:s.yellow,stroke:s.yellowS,label:"MatMul",fontSize:11}),e.jsx("path",{d:"M180 66 L180 80",stroke:s.ink}),e.jsx(f,{x:140,y:80,w:80,h:26,fill:s.green,stroke:s.greenS,label:"SoftMax",fontSize:11}),e.jsx("path",{d:"M180 106 L180 120",stroke:s.ink}),e.jsx(f,{x:140,y:120,w:80,h:26,fill:s.purple,stroke:s.purpleS,label:"Mask (opt.)",fontSize:11}),e.jsx("path",{d:"M180 146 L180 160",stroke:s.ink}),e.jsx(f,{x:140,y:160,w:80,h:26,fill:s.blue,stroke:s.blueS,label:"Scale ÷√dₖ",fontSize:11}),e.jsx("path",{d:"M180 186 L180 200",stroke:s.ink}),e.jsx(f,{x:140,y:200,w:80,h:26,fill:s.yellow,stroke:s.yellowS,label:"MatMul",fontSize:11}),e.jsx("path",{d:"M156 226 L120 270",stroke:s.ink}),e.jsx("path",{d:"M180 226 L180 270",stroke:s.ink}),e.jsx("path",{d:"M204 226 L240 270",stroke:s.ink}),e.jsx(f,{x:100,y:270,w:40,h:24,fill:s.pink,stroke:s.pinkS,label:"Q",fontSize:13}),e.jsx(f,{x:160,y:270,w:40,h:24,fill:s.pink,stroke:s.pinkS,label:"K",fontSize:13}),e.jsx(f,{x:220,y:270,w:40,h:24,fill:s.pink,stroke:s.pinkS,label:"V",fontSize:13}),e.jsxs("text",{x:"180",y:"330",fontSize:"14",fontFamily:"var(--serif)",fontStyle:"italic",fill:s.ink,textAnchor:"middle",children:["softmax(QK",e.jsx("tspan",{fontSize:"9",baselineShift:"super",children:"⊤"})," / √d) V"]})]}),me=[["my-skill/",""],["├── SKILL.md","# Required: metadata + instructions"],["├── scripts/","# Optional: executable code"],["├── references/","# Optional: documentation"],["├── assets/","# Optional: templates, resources"],["└── ...","# Any additional files or directories"]],he=()=>e.jsxs("svg",{viewBox:"0 0 360 420",width:"100%",height:"100%",style:{display:"block"},children:[e.jsx("text",{x:"180",y:"20",fontSize:"11",fontFamily:"var(--serif)",fontStyle:"italic",fill:s.faint,textAnchor:"middle",children:"Skill package layout"}),e.jsx("rect",{x:"28",y:"48",width:"304",height:"318",rx:"8",fill:"#FFFDF8",stroke:s.faint,strokeWidth:"1"}),me.map(([t,r],c)=>{const d=92+c*44;return e.jsxs("g",{children:[e.jsx("text",{x:"44",y:d,fontSize:"11",fontFamily:"var(--mono)",fill:s.ink,dominantBaseline:"middle",children:t}),r?e.jsx("text",{x:"138",y:d,fontSize:"8.5",fontFamily:"var(--mono)",fill:s.faint,dominantBaseline:"middle",children:r}):null]},t)})]}),pe={attention:de,"agent-skills":he},ue=({method:t})=>e.jsxs("svg",{viewBox:"0 0 360 420",width:"100%",height:"100%",children:[e.jsx("text",{x:"180",y:"20",fontSize:"11",fontFamily:"var(--serif)",fontStyle:"italic",fill:s.faint,textAnchor:"middle",children:t.name||"method"}),e.jsx(f,{x:80,y:70,w:200,h:50,fill:s.blue,stroke:s.blueS,label:"Input",fontSize:12}),e.jsx("path",{d:"M180 120 L180 150",stroke:s.ink}),e.jsx(f,{x:80,y:150,w:200,h:70,fill:s.orange,stroke:s.orangeS,label:t.name||"transform",fontSize:13}),e.jsx("path",{d:"M180 220 L180 250",stroke:s.ink}),e.jsx(f,{x:80,y:250,w:200,h:50,fill:s.purple,stroke:s.purpleS,label:"Output",fontSize:12})]}),xe=({method:t})=>{const r=(t.slug||"").toLowerCase(),c=pe[r];if(c)return e.jsx("div",{className:"method-figure-svg method-figure-svg--schematic",children:e.jsx(c,{})});if(t.image_url){const d=r==="transformer"||r==="gpt-4"||r==="gpt-4o"||r==="multi-head-attention"?" method-figure-svg--compact":r==="rpn"?" method-figure-svg--scaled-80":"";return e.jsx("div",{className:`method-figure-svg method-figure-svg--image${d}`,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(ue,{method:t})})},C=720,I=138,p={top:8,right:10,bottom:25,left:36},H=56,ge=new Intl.DateTimeFormat("en",{month:"short",year:"2-digit",timeZone:"UTC"}),fe=new Intl.DateTimeFormat("en",{year:"numeric",timeZone:"UTC"}),T=t=>ge.format(new Date(`${t}T00:00:00Z`)),je=(t,r)=>{if(t===0)return new Set;const c=t>48?12:t>36?6:t>18?3:2,d=Math.max(1,Math.ceil(H/r)),g=Math.max(c,d),u=t-1,h=new Set([0,u]);for(let l=g;l=H&&h.add(l);return h},q=t=>{if(t.coverage_status===void 0||["complete","not_applicable"].includes(t.coverage_status))return null;const r=t.processed_paper_count!==void 0&&t.eligible_paper_count!==void 0?`; ${t.processed_paper_count.toLocaleString()} of ${t.eligible_paper_count.toLocaleString()} eligible papers processed`:"";return`Historical tagging ${t.coverage_status==="failed"?"needs retry":"in progress"}${r}`},_e=({history:t,methodName:r})=>{const[c,d]=A.useState(null),g=Math.max(1,...t.map(o=>o.paper_count)),u=C-p.left-p.right,h=I-p.top-p.bottom,l=t.length?u/t.length:u,S=Math.max(2,l*.68),D=je(t.length,l),_=Array.from(new Set([0,Math.ceil(g/2),g])),j=c==null?null:t[c],x=j?q(j):null;return e.jsxs("div",{className:"method-usage-chart-wrap",children:[e.jsxs("svg",{className:"method-usage-chart",viewBox:`0 0 ${C} ${I}`,role:"group","aria-label":`${r}: papers mentioning this method by publication month`,children:[e.jsxs("title",{children:[r,": papers mentioning this method by publication month"]}),_.map(o=>{const i=p.top+h-o/g*h;return e.jsxs("g",{children:[e.jsx("line",{className:"method-usage-gridline",x1:p.left,x2:C-p.right,y1:i,y2:i}),e.jsx("text",{className:"method-usage-y-label",x:p.left-8,y:i+3,textAnchor:"end",children:o})]},o)}),t.map((o,i)=>{const k=o.paper_count/g*h,y=o.paper_count>0?Math.max(1,k):0,P=p.left+l*i+(l-S)/2,b=p.top+h-y,a=c===i,N=i===t.length-1,v=q(o);return e.jsxs("g",{className:`method-usage-bar${a?" is-active":""}${N?" is-current":""}`,tabIndex:0,role:"img","aria-label":`${T(o.start_date)}: ${o.paper_count} ${o.paper_count===1?"paper":"papers"}${v?`. ${v}`:""}`,onMouseEnter:()=>d(i),onMouseLeave:()=>d(null),onFocus:()=>d(i),onBlur:()=>d(null),children:[e.jsx("rect",{className:"method-usage-bar-hit",x:p.left+l*i,y:p.top,width:l,height:h}),e.jsx("rect",{className:"method-usage-bar-mark",x:P,y:b,width:S,height:y,rx:"1.5"})]},o.start_date)}),t.map((o,i)=>D.has(i)?e.jsx("text",{className:"method-usage-x-label",x:p.left+l*(i+.5),y:I-11,textAnchor:"middle",children:t.length>48?fe.format(new Date(`${o.start_date}T00:00:00Z`)):T(o.start_date)},o.start_date):null)]}),j&&e.jsxs("div",{className:"method-usage-tooltip",role:"status",children:[e.jsx("strong",{children:T(j.start_date)}),e.jsxs("span",{children:[j.paper_count," ",j.paper_count===1?"paper":"papers",c===t.length-1?" · month to date":""]}),e.jsxs("span",{children:[(j.catalog_share??0).toFixed(2),"% of"," ",(j.catalog_paper_count??0).toLocaleString()," catalog papers"]}),x&&e.jsx("span",{children:x})]})]})},ye=[["trending","trending"],["new","newest"],["cited","most cited"]],Ze=()=>{var B,E,$;const{methodSlug:t}=Q(),[r,c]=O(),[d,g]=A.useState("trending"),u=r.get("has_code")==="true",h=r.get("has_hf_artifacts")==="true",l=J(r),S=n=>{const m=new URLSearchParams(r);n?m.set("has_code","true"):m.delete("has_code"),c(m)},D=n=>{const m=new URLSearchParams(r);n?m.set("has_hf_artifacts","true"):m.delete("has_hf_artifacts"),c(m)},_=w({queryKey:["method",t],queryFn:()=>F.getMethod(t),enabled:!!t,staleTime:10*60*1e3}),j=w({queryKey:["areas-all"],queryFn:()=>F.listAreas({page_size:50,ordering:"name"}),enabled:!!((B=_.data)!=null&&B.area_id),staleTime:10*60*1e3}),x=w({queryKey:["method-trend",t],queryFn:()=>F.methodTrend(t),enabled:!!t,staleTime:10*60*1e3}),o=d==="trending"?"trending":d==="cited"?"citation_count":"date_published",i=Z({queryKey:[...W.feeds.method,t,o,u,h,l.startDate,l.endDate],queryFn:({pageParam:n=1})=>ae.forMethod(t,{page:n,page_size:20,order_by:o,order_dir:"desc",include_resources:!0,repository_limit:1,has_code:u,has_hf_artifacts:h,start_date:l.startDate,end_date:l.endDate}),getNextPageParam:n=>n.next_page,initialPageParam:1,enabled:!!t,staleTime:5*60*1e3,placeholderData:U}),k=w({queryKey:["related-methods",t],queryFn:()=>F.relatedMethods(t),enabled:!!t,staleTime:10*60*1e3}),y=A.useMemo(()=>{var m;return(((m=i.data)==null?void 0:m.pages.flatMap(K=>K.results))||[]).map(ne)},[i.data]),{targetRef:P,isIntersecting:b}=ie({rootMargin:"200px"});if(A.useEffect(()=>{b&&i.hasNextPage&&!i.isFetchingNextPage&&i.fetchNextPage()},[b,i.hasNextPage,i.isFetchingNextPage]),_.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(_.error||!_.data)return e.jsx("div",{className:"page",children:e.jsx(le,{variant:"destructive",children:e.jsx(oe,{children:"Method not found."})})});const a=_.data,N=(E=j.data)==null?void 0:E.results.find(n=>n.id===a.area_id),v=se(a.source_url),z=v?null:ce(a.source_url);return e.jsxs("div",{className:"page",children:[e.jsxs("div",{className:"breadcrumb",children:[e.jsx(L,{to:"/methods",children:"Methods"}),N&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"sep",children:"/"}),e.jsx(L,{to:`/methods#area-${re(N.name)}`,children:N.name})]}),e.jsx("span",{className:"sep",children:"/"}),e.jsx("span",{style:{color:"var(--ink)"},children:a.name})]}),e.jsxs("div",{className:`tag-hero method-hero-grid${a.slug==="grokking"||a.slug==="latent-reasoning"||a.slug==="world-action-models"?" method-hero-grid--wide-figure":""}`,children:[e.jsxs("div",{children:[e.jsx("div",{className:"tag-hero-eyebrow",children:"METHOD"}),e.jsx("h1",{className:"tag-hero-title method-hero-title",children:a.name}),e.jsx(G,{kind:"method",entityId:a.id}),a.full_name&&a.full_name!==a.name&&e.jsx("div",{style:{fontFamily:"var(--serif)",fontSize:16,fontStyle:"italic",color:"var(--ink-soft)",marginTop:8},children:a.full_name}),a.description&&e.jsx(R,{className:"method-description",text:a.description}),a.source_url&&a.source_title&&e.jsxs("div",{className:"method-source",children:[e.jsx("span",{className:"method-source-label",children:"Source"}),v?e.jsxs(L,{className:"method-source-link",to:v,target:"_blank",rel:"noopener noreferrer",children:[e.jsx("span",{className:"method-source-title",children:a.source_title}),a.introduced_year&&e.jsx("span",{className:"method-source-meta",children:a.introduced_year})]}):z?e.jsxs("a",{className:"method-source-link",href:z,target:"_blank",rel:"noopener noreferrer",children:[e.jsx("span",{className:"method-source-title",children:a.source_title}),a.introduced_year&&e.jsx("span",{className:"method-source-meta",children:a.introduced_year})]}):e.jsxs("div",{className:"method-source-link is-static",children:[e.jsx("span",{className:"method-source-title",children:a.source_title}),a.introduced_year&&e.jsx("span",{className:"method-source-meta",children:a.introduced_year})]})]}),e.jsxs("div",{className:"tag-hero-meta",children:[e.jsxs("div",{className:"stat",children:[e.jsx("span",{className:"label",children:"Papers mentioning"}),e.jsx("span",{className:"value",children:(a.paper_count??0).toLocaleString()})]}),x.data&&e.jsxs("div",{className:"stat",children:[e.jsx("span",{className:"label",children:"Recent mentions"}),e.jsxs("span",{className:"value",children:[(x.data.recent_paper_count*30/x.data.recent_days).toFixed(1),e.jsx("small",{children:"/mo"})]}),!x.data.comparison_complete&&e.jsx("span",{title:"Tagging is still catching up. This rate reflects mentions found so far.",children:"Partial coverage"})]}),a.introduced_year!=null&&e.jsxs("div",{className:"stat",children:[e.jsx("span",{className:"label",children:"Introduced"}),e.jsx("span",{className:"value",children:a.introduced_year})]})]}),x.isLoading?e.jsx(M,{className:"h-36 w-full method-trend-skeleton"}):x.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:x.data.recent_paper_count}),e.jsxs("span",{children:["papers / ",x.data.recent_days,"d"]})]})]}),e.jsx(_e,{history:x.data.history,methodName:a.name})]}):null]}),e.jsxs("figure",{className:"method-figure-card",children:[e.jsx(xe,{method:a}),a.image_credit&&e.jsx("figcaption",{children:e.jsx(R,{className:"method-image-credit",text:a.image_credit})})]})]}),((($=k.data)==null?void 0:$.results.length)??0)>0&&e.jsxs("div",{className:"filter-row",children:[e.jsx("span",{className:"label",children:"Related methods"}),k.data.results.map(n=>e.jsx(V,{method:{slug:n.slug,name:n.name}},n.id))]}),e.jsxs("div",{className:"sort-bar",children:[e.jsxs("div",{className:"paper-feed-toolbar-controls",children:[e.jsx("div",{className:"sort-options",children:ye.map(([n,m])=>e.jsx("button",{className:`sort-btn ${d===n?"active":""}`,onClick:()=>g(n),children:m},n))}),e.jsx(Y,{hasCode:u,hasHfArtifacts:h,onHasCodeChange:S,onHasHfArtifactsChange:D})]}),e.jsx(ee,{startDate:l.startDate,endDate:l.endDate,onChange:n=>c(te(r,n))}),e.jsxs("div",{className:"results-count",children:[y.length," papers mentioning ",a.name]})]}),i.isLoading?e.jsx("div",{className:"paper-list",children:Array.from({length:4}).map((n,m)=>e.jsx(M,{className:"h-40 w-full"},m))}):y.length===0?e.jsx("div",{className:"no-results",children:"No papers tagged with this method yet."}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"paper-list",children:y.map((n,m)=>e.jsx(X,{paper:n,rank:m+1},n.id))}),e.jsx("div",{ref:P,style:{height:1}}),i.isFetchingNextPage&&e.jsx("div",{style:{padding:"20px 0",textAlign:"center",color:"var(--ink-faint)"},children:"Loading more…"})]})]})};export{Ze as default}; +import{j as e,r as A,u as Q,d as O,L,af as U}from"./index-B7UoLEbn.js";import{R as G}from"./ResearchFollowButton-C31U0bn3.js";import{p as W}from"./paperQueryKeys-BP2E-0yf.js";import{u as w}from"./useQuery-DV2f4JpC.js";import{u as Z}from"./useInfiniteQuery-CoFrg4GN.js";import{M as V,P as X}from"./components-Cax1Inob.js";import{P as Y}from"./PaperFeedFilters-CF3OKsFW.js";import{a as J,P as ee,b as te}from"./PaperDateFilter-CGG1OZi6.js";import{r as se,M as R}from"./MarkdownText-DH4XnT47.js";import{c as F}from"./catalog-DcbS_7_L.js";import{p as ae}from"./papers-Ctf2uv0o.js";import{s as re}from"./slug-BpH-Nkvz.js";import{t as ne}from"./colors-COYRNy-F.js";import{u as ie}from"./useIntersectionObserver-DOCspj7m.js";import{S as M}from"./skeleton-DLsINbKq.js";import{A as le,a as oe}from"./alert-B3UHHG00.js";import{s as ce}from"./safeExternalHref-CkBrsh84.js";import"./useMutation-CuaM6sOT.js";import"./research-D7aSz-AO.js";import"./plus-BvN48Xkz.js";import"./LatexTitle-CeC5Gqpu.js";import"./popover-BOnBmrXi.js";/* empty css */import"./PaperPreviewLink-C5ianbW8.js";import"./index-tHVWANW1.js";import"./index-ClEBI70O.js";import"./katex-DkKDou_j.js";import"./hover-card-BM8a6wEE.js";const s={pink:"#F8D7D9",pinkS:"#D9B0B3",yellow:"#FBEFC2",yellowS:"#C9B97D",orange:"#F8D7B3",orangeS:"#C99466",blue:"#CDE2EE",blueS:"#7FA4BA",purple:"#D4D2EA",purpleS:"#8E8AC0",green:"#CCE2C5",greenS:"#7DA475",ink:"#1A1814",faint:"#8E8678"},f=({x:t,y:r,w:c,h:d,fill:g,stroke:u,label:h,fontSize:l=10})=>e.jsxs("g",{children:[e.jsx("rect",{x:t,y:r,width:c,height:d,rx:"3",ry:"3",fill:g,stroke:u,strokeWidth:"1"}),e.jsx("text",{x:t+c/2,y:r+d/2,fontSize:l,fontFamily:"var(--sans)",fill:s.ink,textAnchor:"middle",dominantBaseline:"middle",children:h})]}),de=()=>e.jsxs("svg",{viewBox:"0 0 360 420",width:"100%",height:"100%",style:{display:"block"},children:[e.jsx("text",{x:"180",y:"20",fontSize:"11",fontFamily:"var(--serif)",fontStyle:"italic",fill:s.faint,textAnchor:"middle",children:"Scaled Dot-Product Attention"}),e.jsx(f,{x:140,y:40,w:80,h:26,fill:s.yellow,stroke:s.yellowS,label:"MatMul",fontSize:11}),e.jsx("path",{d:"M180 66 L180 80",stroke:s.ink}),e.jsx(f,{x:140,y:80,w:80,h:26,fill:s.green,stroke:s.greenS,label:"SoftMax",fontSize:11}),e.jsx("path",{d:"M180 106 L180 120",stroke:s.ink}),e.jsx(f,{x:140,y:120,w:80,h:26,fill:s.purple,stroke:s.purpleS,label:"Mask (opt.)",fontSize:11}),e.jsx("path",{d:"M180 146 L180 160",stroke:s.ink}),e.jsx(f,{x:140,y:160,w:80,h:26,fill:s.blue,stroke:s.blueS,label:"Scale ÷√dₖ",fontSize:11}),e.jsx("path",{d:"M180 186 L180 200",stroke:s.ink}),e.jsx(f,{x:140,y:200,w:80,h:26,fill:s.yellow,stroke:s.yellowS,label:"MatMul",fontSize:11}),e.jsx("path",{d:"M156 226 L120 270",stroke:s.ink}),e.jsx("path",{d:"M180 226 L180 270",stroke:s.ink}),e.jsx("path",{d:"M204 226 L240 270",stroke:s.ink}),e.jsx(f,{x:100,y:270,w:40,h:24,fill:s.pink,stroke:s.pinkS,label:"Q",fontSize:13}),e.jsx(f,{x:160,y:270,w:40,h:24,fill:s.pink,stroke:s.pinkS,label:"K",fontSize:13}),e.jsx(f,{x:220,y:270,w:40,h:24,fill:s.pink,stroke:s.pinkS,label:"V",fontSize:13}),e.jsxs("text",{x:"180",y:"330",fontSize:"14",fontFamily:"var(--serif)",fontStyle:"italic",fill:s.ink,textAnchor:"middle",children:["softmax(QK",e.jsx("tspan",{fontSize:"9",baselineShift:"super",children:"⊤"})," / √d) V"]})]}),me=[["my-skill/",""],["├── SKILL.md","# Required: metadata + instructions"],["├── scripts/","# Optional: executable code"],["├── references/","# Optional: documentation"],["├── assets/","# Optional: templates, resources"],["└── ...","# Any additional files or directories"]],he=()=>e.jsxs("svg",{viewBox:"0 0 360 420",width:"100%",height:"100%",style:{display:"block"},children:[e.jsx("text",{x:"180",y:"20",fontSize:"11",fontFamily:"var(--serif)",fontStyle:"italic",fill:s.faint,textAnchor:"middle",children:"Skill package layout"}),e.jsx("rect",{x:"28",y:"48",width:"304",height:"318",rx:"8",fill:"#FFFDF8",stroke:s.faint,strokeWidth:"1"}),me.map(([t,r],c)=>{const d=92+c*44;return e.jsxs("g",{children:[e.jsx("text",{x:"44",y:d,fontSize:"11",fontFamily:"var(--mono)",fill:s.ink,dominantBaseline:"middle",children:t}),r?e.jsx("text",{x:"138",y:d,fontSize:"8.5",fontFamily:"var(--mono)",fill:s.faint,dominantBaseline:"middle",children:r}):null]},t)})]}),pe={attention:de,"agent-skills":he},ue=({method:t})=>e.jsxs("svg",{viewBox:"0 0 360 420",width:"100%",height:"100%",children:[e.jsx("text",{x:"180",y:"20",fontSize:"11",fontFamily:"var(--serif)",fontStyle:"italic",fill:s.faint,textAnchor:"middle",children:t.name||"method"}),e.jsx(f,{x:80,y:70,w:200,h:50,fill:s.blue,stroke:s.blueS,label:"Input",fontSize:12}),e.jsx("path",{d:"M180 120 L180 150",stroke:s.ink}),e.jsx(f,{x:80,y:150,w:200,h:70,fill:s.orange,stroke:s.orangeS,label:t.name||"transform",fontSize:13}),e.jsx("path",{d:"M180 220 L180 250",stroke:s.ink}),e.jsx(f,{x:80,y:250,w:200,h:50,fill:s.purple,stroke:s.purpleS,label:"Output",fontSize:12})]}),xe=({method:t})=>{const r=(t.slug||"").toLowerCase(),c=pe[r];if(c)return e.jsx("div",{className:"method-figure-svg method-figure-svg--schematic",children:e.jsx(c,{})});if(t.image_url){const d=r==="transformer"||r==="gpt-4"||r==="gpt-4o"||r==="multi-head-attention"?" method-figure-svg--compact":r==="rpn"?" method-figure-svg--scaled-80":"";return e.jsx("div",{className:`method-figure-svg method-figure-svg--image${d}`,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(ue,{method:t})})},C=720,I=138,p={top:8,right:10,bottom:25,left:36},H=56,ge=new Intl.DateTimeFormat("en",{month:"short",year:"2-digit",timeZone:"UTC"}),fe=new Intl.DateTimeFormat("en",{year:"numeric",timeZone:"UTC"}),T=t=>ge.format(new Date(`${t}T00:00:00Z`)),je=(t,r)=>{if(t===0)return new Set;const c=t>48?12:t>36?6:t>18?3:2,d=Math.max(1,Math.ceil(H/r)),g=Math.max(c,d),u=t-1,h=new Set([0,u]);for(let l=g;l=H&&h.add(l);return h},q=t=>{if(t.coverage_status===void 0||["complete","not_applicable"].includes(t.coverage_status))return null;const r=t.processed_paper_count!==void 0&&t.eligible_paper_count!==void 0?`; ${t.processed_paper_count.toLocaleString()} of ${t.eligible_paper_count.toLocaleString()} eligible papers processed`:"";return`Historical tagging ${t.coverage_status==="failed"?"needs retry":"in progress"}${r}`},_e=({history:t,methodName:r})=>{const[c,d]=A.useState(null),g=Math.max(1,...t.map(o=>o.paper_count)),u=C-p.left-p.right,h=I-p.top-p.bottom,l=t.length?u/t.length:u,S=Math.max(2,l*.68),D=je(t.length,l),_=Array.from(new Set([0,Math.ceil(g/2),g])),j=c==null?null:t[c],x=j?q(j):null;return e.jsxs("div",{className:"method-usage-chart-wrap",children:[e.jsxs("svg",{className:"method-usage-chart",viewBox:`0 0 ${C} ${I}`,role:"group","aria-label":`${r}: papers mentioning this method by publication month`,children:[e.jsxs("title",{children:[r,": papers mentioning this method by publication month"]}),_.map(o=>{const i=p.top+h-o/g*h;return e.jsxs("g",{children:[e.jsx("line",{className:"method-usage-gridline",x1:p.left,x2:C-p.right,y1:i,y2:i}),e.jsx("text",{className:"method-usage-y-label",x:p.left-8,y:i+3,textAnchor:"end",children:o})]},o)}),t.map((o,i)=>{const k=o.paper_count/g*h,y=o.paper_count>0?Math.max(1,k):0,P=p.left+l*i+(l-S)/2,b=p.top+h-y,a=c===i,N=i===t.length-1,v=q(o);return e.jsxs("g",{className:`method-usage-bar${a?" is-active":""}${N?" is-current":""}`,tabIndex:0,role:"img","aria-label":`${T(o.start_date)}: ${o.paper_count} ${o.paper_count===1?"paper":"papers"}${v?`. ${v}`:""}`,onMouseEnter:()=>d(i),onMouseLeave:()=>d(null),onFocus:()=>d(i),onBlur:()=>d(null),children:[e.jsx("rect",{className:"method-usage-bar-hit",x:p.left+l*i,y:p.top,width:l,height:h}),e.jsx("rect",{className:"method-usage-bar-mark",x:P,y:b,width:S,height:y,rx:"1.5"})]},o.start_date)}),t.map((o,i)=>D.has(i)?e.jsx("text",{className:"method-usage-x-label",x:p.left+l*(i+.5),y:I-11,textAnchor:"middle",children:t.length>48?fe.format(new Date(`${o.start_date}T00:00:00Z`)):T(o.start_date)},o.start_date):null)]}),j&&e.jsxs("div",{className:"method-usage-tooltip",role:"status",children:[e.jsx("strong",{children:T(j.start_date)}),e.jsxs("span",{children:[j.paper_count," ",j.paper_count===1?"paper":"papers",c===t.length-1?" · month to date":""]}),e.jsxs("span",{children:[(j.catalog_share??0).toFixed(2),"% of"," ",(j.catalog_paper_count??0).toLocaleString()," catalog papers"]}),x&&e.jsx("span",{children:x})]})]})},ye=[["trending","trending"],["new","newest"],["cited","most cited"]],Ze=()=>{var B,E,$;const{methodSlug:t}=Q(),[r,c]=O(),[d,g]=A.useState("trending"),u=r.get("has_code")==="true",h=r.get("has_hf_artifacts")==="true",l=J(r),S=n=>{const m=new URLSearchParams(r);n?m.set("has_code","true"):m.delete("has_code"),c(m)},D=n=>{const m=new URLSearchParams(r);n?m.set("has_hf_artifacts","true"):m.delete("has_hf_artifacts"),c(m)},_=w({queryKey:["method",t],queryFn:()=>F.getMethod(t),enabled:!!t,staleTime:10*60*1e3}),j=w({queryKey:["areas-all"],queryFn:()=>F.listAreas({page_size:50,ordering:"name"}),enabled:!!((B=_.data)!=null&&B.area_id),staleTime:10*60*1e3}),x=w({queryKey:["method-trend",t],queryFn:()=>F.methodTrend(t),enabled:!!t,staleTime:10*60*1e3}),o=d==="trending"?"trending":d==="cited"?"citation_count":"date_published",i=Z({queryKey:[...W.feeds.method,t,o,u,h,l.startDate,l.endDate],queryFn:({pageParam:n=1})=>ae.forMethod(t,{page:n,page_size:20,order_by:o,order_dir:"desc",include_resources:!0,repository_limit:1,has_code:u,has_hf_artifacts:h,start_date:l.startDate,end_date:l.endDate}),getNextPageParam:n=>n.next_page,initialPageParam:1,enabled:!!t,staleTime:5*60*1e3,placeholderData:U}),k=w({queryKey:["related-methods",t],queryFn:()=>F.relatedMethods(t),enabled:!!t,staleTime:10*60*1e3}),y=A.useMemo(()=>{var m;return(((m=i.data)==null?void 0:m.pages.flatMap(K=>K.results))||[]).map(ne)},[i.data]),{targetRef:P,isIntersecting:b}=ie({rootMargin:"200px"});if(A.useEffect(()=>{b&&i.hasNextPage&&!i.isFetchingNextPage&&i.fetchNextPage()},[b,i.hasNextPage,i.isFetchingNextPage]),_.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(_.error||!_.data)return e.jsx("div",{className:"page",children:e.jsx(le,{variant:"destructive",children:e.jsx(oe,{children:"Method not found."})})});const a=_.data,N=(E=j.data)==null?void 0:E.results.find(n=>n.id===a.area_id),v=se(a.source_url),z=v?null:ce(a.source_url);return e.jsxs("div",{className:"page",children:[e.jsxs("div",{className:"breadcrumb",children:[e.jsx(L,{to:"/methods",children:"Methods"}),N&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"sep",children:"/"}),e.jsx(L,{to:`/methods#area-${re(N.name)}`,children:N.name})]}),e.jsx("span",{className:"sep",children:"/"}),e.jsx("span",{style:{color:"var(--ink)"},children:a.name})]}),e.jsxs("div",{className:`tag-hero method-hero-grid${a.slug==="grokking"||a.slug==="latent-reasoning"||a.slug==="world-action-models"?" method-hero-grid--wide-figure":""}`,children:[e.jsxs("div",{children:[e.jsx("div",{className:"tag-hero-eyebrow",children:"METHOD"}),e.jsx("h1",{className:"tag-hero-title method-hero-title",children:a.name}),e.jsx(G,{kind:"method",entityId:a.id}),a.full_name&&a.full_name!==a.name&&e.jsx("div",{style:{fontFamily:"var(--serif)",fontSize:16,fontStyle:"italic",color:"var(--ink-soft)",marginTop:8},children:a.full_name}),a.description&&e.jsx(R,{className:"method-description",text:a.description}),a.source_url&&a.source_title&&e.jsxs("div",{className:"method-source",children:[e.jsx("span",{className:"method-source-label",children:"Source"}),v?e.jsxs(L,{className:"method-source-link",to:v,target:"_blank",rel:"noopener noreferrer",children:[e.jsx("span",{className:"method-source-title",children:a.source_title}),a.introduced_year&&e.jsx("span",{className:"method-source-meta",children:a.introduced_year})]}):z?e.jsxs("a",{className:"method-source-link",href:z,target:"_blank",rel:"noopener noreferrer",children:[e.jsx("span",{className:"method-source-title",children:a.source_title}),a.introduced_year&&e.jsx("span",{className:"method-source-meta",children:a.introduced_year})]}):e.jsxs("div",{className:"method-source-link is-static",children:[e.jsx("span",{className:"method-source-title",children:a.source_title}),a.introduced_year&&e.jsx("span",{className:"method-source-meta",children:a.introduced_year})]})]}),e.jsxs("div",{className:"tag-hero-meta",children:[e.jsxs("div",{className:"stat",children:[e.jsx("span",{className:"label",children:"Papers mentioning"}),e.jsx("span",{className:"value",children:(a.paper_count??0).toLocaleString()})]}),x.data&&e.jsxs("div",{className:"stat",children:[e.jsx("span",{className:"label",children:"Recent mentions"}),e.jsxs("span",{className:"value",children:[(x.data.recent_paper_count*30/x.data.recent_days).toFixed(1),e.jsx("small",{children:"/mo"})]}),!x.data.comparison_complete&&e.jsx("span",{title:"Tagging is still catching up. This rate reflects mentions found so far.",children:"Partial coverage"})]}),a.introduced_year!=null&&e.jsxs("div",{className:"stat",children:[e.jsx("span",{className:"label",children:"Introduced"}),e.jsx("span",{className:"value",children:a.introduced_year})]})]}),x.isLoading?e.jsx(M,{className:"h-36 w-full method-trend-skeleton"}):x.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:x.data.recent_paper_count}),e.jsxs("span",{children:["papers / ",x.data.recent_days,"d"]})]})]}),e.jsx(_e,{history:x.data.history,methodName:a.name})]}):null]}),e.jsxs("figure",{className:"method-figure-card",children:[e.jsx(xe,{method:a}),a.image_credit&&e.jsx("figcaption",{children:e.jsx(R,{className:"method-image-credit",text:a.image_credit})})]})]}),((($=k.data)==null?void 0:$.results.length)??0)>0&&e.jsxs("div",{className:"filter-row",children:[e.jsx("span",{className:"label",children:"Related methods"}),k.data.results.map(n=>e.jsx(V,{method:{slug:n.slug,name:n.name}},n.id))]}),e.jsxs("div",{className:"sort-bar",children:[e.jsxs("div",{className:"paper-feed-toolbar-controls",children:[e.jsx("div",{className:"sort-options",children:ye.map(([n,m])=>e.jsx("button",{className:`sort-btn ${d===n?"active":""}`,onClick:()=>g(n),children:m},n))}),e.jsx(Y,{hasCode:u,hasHfArtifacts:h,onHasCodeChange:S,onHasHfArtifactsChange:D})]}),e.jsx(ee,{startDate:l.startDate,endDate:l.endDate,onChange:n=>c(te(r,n))}),e.jsxs("div",{className:"results-count",children:[y.length," papers mentioning ",a.name]})]}),i.isLoading?e.jsx("div",{className:"paper-list",children:Array.from({length:4}).map((n,m)=>e.jsx(M,{className:"h-40 w-full"},m))}):y.length===0?e.jsx("div",{className:"no-results",children:"No papers tagged with this method yet."}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"paper-list",children:y.map((n,m)=>e.jsx(X,{paper:n,rank:m+1},n.id))}),e.jsx("div",{ref:P,style:{height:1}}),i.isFetchingNextPage&&e.jsx("div",{style:{padding:"20px 0",textAlign:"center",color:"var(--ink-faint)"},children:"Loading more…"})]})]})};export{Ze as default}; diff --git a/assets/MethodsIndexView-sXYUwk5L.js b/assets/MethodsIndexView-otCcFXzJ.js similarity index 85% rename from assets/MethodsIndexView-sXYUwk5L.js rename to assets/MethodsIndexView-otCcFXzJ.js index 259495cfabf33e28b8568897fe921c641c886444..d23f003cbf229c0b0b475b43ef5075826e4487a7 100644 --- a/assets/MethodsIndexView-sXYUwk5L.js +++ b/assets/MethodsIndexView-otCcFXzJ.js @@ -1,4 +1,4 @@ -import{g as _,r as d,j as e,L as v}from"./index-CkeK0cDg.js";import{u as c}from"./useQuery-_Fj6Jfzr.js";import{c as m}from"./catalog-DGg7xZLW.js";import{s as N}from"./slug-BpH-Nkvz.js";import{S as x}from"./skeleton-Cs8haT1C.js";import{A as w,a as F}from"./alert-Vt5eE6re.js";import{T as L}from"./TaxonomySuggestionTile-BltCio9I.js";import{T}from"./TaxonomyTrending-g677Z8nK.js";import"./SignInToEditDialog-CmfnGty-.js";import"./button-CsUrN-GU.js";import"./input-Cnu30n0B.js";import"./textarea-BsaJyP0o.js";import"./searchable-select-DT-5KDJe.js";import"./popover-Vq6DwYpn.js";import"./dialog-CGH-CTnE.js";import"./loader-circle-CTuL2Xdc.js";import"./useMutation-q-fdM2fm.js";import"./submissions-C-uglc0y.js";import"./plus-BaTMbqcZ.js";import"./trending-up-BKEZ18MU.js";/** +import{g as _,r as d,j as e,L as v}from"./index-B7UoLEbn.js";import{u as c}from"./useQuery-DV2f4JpC.js";import{c as m}from"./catalog-DcbS_7_L.js";import{s as N}from"./slug-BpH-Nkvz.js";import{S as x}from"./skeleton-DLsINbKq.js";import{A as w,a as F}from"./alert-B3UHHG00.js";import{T as L}from"./TaxonomySuggestionTile-DX_yob8h.js";import{T}from"./TaxonomyTrending-BQ_4UvnV.js";import"./SignInToEditDialog-BzeqSUHr.js";import"./button-D543yAN8.js";import"./input-hdt3aF12.js";import"./textarea-CpxVQZTZ.js";import"./searchable-select-CceG4fY6.js";import"./popover-BOnBmrXi.js";import"./dialog-BECDhHRn.js";import"./loader-circle-hbMX20oF.js";import"./useMutation-CuaM6sOT.js";import"./submissions-BTKMKNWZ.js";import"./plus-BvN48Xkz.js";import"./trending-up-DOtHjkBv.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/NotFound-3C_Rmvq0.js b/assets/NotFound-DPR3-upZ.js similarity index 89% rename from assets/NotFound-3C_Rmvq0.js rename to assets/NotFound-DPR3-upZ.js index f4eb39e5eceb6be9cd159b2d83621a1a494f6514..67622f8368cd36ec0846ea8d5a5a1cc5e06ada3d 100644 --- a/assets/NotFound-3C_Rmvq0.js +++ b/assets/NotFound-DPR3-upZ.js @@ -1 +1 @@ -import{ar as o,r as a,j as t,L as s}from"./index-CkeK0cDg.js";const r=()=>{const e=o();return a.useEffect(()=>{console.error("404 Error: User attempted to access non-existent route:",e.pathname)},[e.pathname]),t.jsxs("div",{className:"page",style:{textAlign:"center",paddingTop:96},children:[t.jsx("h1",{className:"detail-title",style:{fontSize:96,marginBottom:8},children:"404"}),t.jsx("p",{style:{fontFamily:"var(--serif)",fontStyle:"italic",color:"var(--ink-soft)",marginBottom:24},children:"That route isn't on the map."}),t.jsx(s,{to:"/",className:"action-btn",children:"Return home"})]})};export{r as default}; +import{ar as o,r as a,j as t,L as s}from"./index-B7UoLEbn.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-DmtgA4CC.js b/assets/OrganizationContributionGraph-0fzCjE06.js similarity index 94% rename from assets/OrganizationContributionGraph-DmtgA4CC.js rename to assets/OrganizationContributionGraph-0fzCjE06.js index 438df9818ba7cf06569ed1eb4bd66d591e31e49c..636db70988051c908136808a4a1037a6bb9d1cdf 100644 --- a/assets/OrganizationContributionGraph-DmtgA4CC.js +++ b/assets/OrganizationContributionGraph-0fzCjE06.js @@ -1 +1 @@ -import{r as b,j as o}from"./index-CkeK0cDg.js";import{u as z}from"./useQuery-_Fj6Jfzr.js";import{S as T}from"./skeleton-Cs8haT1C.js";import{c as w}from"./catalog-DGg7xZLW.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-B7UoLEbn.js";import{u as z}from"./useQuery-DV2f4JpC.js";import{S as T}from"./skeleton-DLsINbKq.js";import{c as w}from"./catalog-DcbS_7_L.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-CiX739Oz.js b/assets/OrganizationDetailView-CiX739Oz.js deleted file mode 100644 index 18d89f8b657f233251da01f6792558415794330c..0000000000000000000000000000000000000000 --- a/assets/OrganizationDetailView-CiX739Oz.js +++ /dev/null @@ -1 +0,0 @@ -import{u as t,j as r}from"./index-CkeK0cDg.js";import{O as i}from"./OrganizationPaperFeed-LrCe_Sqd.js";import m from"./NotFound-3C_Rmvq0.js";import"./ResearchFollowButton-Dpqj0_yd.js";import"./useQuery-_Fj6Jfzr.js";import"./useMutation-q-fdM2fm.js";import"./research-BfGol3BN.js";import"./plus-BaTMbqcZ.js";import"./components-BRrDI9KS.js";import"./paperQueryKeys-BP2E-0yf.js";import"./LatexTitle-DPYNzv63.js";import"./colors-DQ-VN9If.js";import"./papers-Celoj8_s.js";import"./safeExternalHref-CkBrsh84.js";import"./MarkdownText-DM-IyAfb.js";/* empty css */import"./PaperPreviewLink-CQ27hqZy.js";import"./index-B1_S53Hb.js";import"./index-DqQiSNg1.js";import"./katex-DkKDou_j.js";import"./hover-card-CAN3Vtea.js";import"./OrganizationContributionGraph-DmtgA4CC.js";import"./skeleton-Cs8haT1C.js";import"./catalog-DGg7xZLW.js";import"./PaperFeedFilters-D-Ie3cDx.js";import"./PaperDateFilter-qc_JVYg0.js";import"./popover-Vq6DwYpn.js";import"./alert-Vt5eE6re.js";import"./searchable-select-DT-5KDJe.js";import"./button-CsUrN-GU.js";import"./dialog-CGH-CTnE.js";import"./loader-circle-CTuL2Xdc.js";import"./useIntersectionObserver-Bw5JPCeX.js";import"./usePapers-fMOiVOFB.js";import"./useInfiniteQuery-gdIFpXB_.js";const I=()=>{const{orgSlug:o}=t();return o?r.jsx(i,{organizationSlug:o}):r.jsx(m,{})};export{I as default}; diff --git a/assets/OrganizationDetailView-prvvF6X7.js b/assets/OrganizationDetailView-prvvF6X7.js new file mode 100644 index 0000000000000000000000000000000000000000..d78bf27ce92e124fd5a9d2b4ce9f3e79919ed6c9 --- /dev/null +++ b/assets/OrganizationDetailView-prvvF6X7.js @@ -0,0 +1 @@ +import{u as t,j as r}from"./index-B7UoLEbn.js";import{O as i}from"./OrganizationPaperFeed-DkjkYb5k.js";import m from"./NotFound-DPR3-upZ.js";import"./ResearchFollowButton-C31U0bn3.js";import"./useQuery-DV2f4JpC.js";import"./useMutation-CuaM6sOT.js";import"./research-D7aSz-AO.js";import"./plus-BvN48Xkz.js";import"./components-Cax1Inob.js";import"./paperQueryKeys-BP2E-0yf.js";import"./LatexTitle-CeC5Gqpu.js";import"./colors-COYRNy-F.js";import"./papers-Ctf2uv0o.js";import"./safeExternalHref-CkBrsh84.js";import"./MarkdownText-DH4XnT47.js";/* empty css */import"./PaperPreviewLink-C5ianbW8.js";import"./index-tHVWANW1.js";import"./index-ClEBI70O.js";import"./katex-DkKDou_j.js";import"./hover-card-BM8a6wEE.js";import"./OrganizationContributionGraph-0fzCjE06.js";import"./skeleton-DLsINbKq.js";import"./catalog-DcbS_7_L.js";import"./PaperFeedFilters-CF3OKsFW.js";import"./PaperDateFilter-CGG1OZi6.js";import"./popover-BOnBmrXi.js";import"./alert-B3UHHG00.js";import"./searchable-select-CceG4fY6.js";import"./button-D543yAN8.js";import"./dialog-BECDhHRn.js";import"./loader-circle-hbMX20oF.js";import"./useIntersectionObserver-DOCspj7m.js";import"./usePapers-CDuTKuAc.js";import"./useInfiniteQuery-CoFrg4GN.js";const I=()=>{const{orgSlug:o}=t();return o?r.jsx(i,{organizationSlug:o}):r.jsx(m,{})};export{I as default}; diff --git a/assets/OrganizationPaperFeed-LrCe_Sqd.js b/assets/OrganizationPaperFeed-DkjkYb5k.js similarity index 87% rename from assets/OrganizationPaperFeed-LrCe_Sqd.js rename to assets/OrganizationPaperFeed-DkjkYb5k.js index 7b349d1ceacdd0b8c2b6ea0f54dc5ddc8ff40371..58df3d7a2a79b4111dbc76bed02853ad1c429748 100644 --- a/assets/OrganizationPaperFeed-LrCe_Sqd.js +++ b/assets/OrganizationPaperFeed-DkjkYb5k.js @@ -1 +1 @@ -import{b as E,d as B,r as d,j as e,L as A}from"./index-CkeK0cDg.js";import{R as Q}from"./ResearchFollowButton-Dpqj0_yd.js";import{u as C}from"./useQuery-_Fj6Jfzr.js";import{P as U}from"./components-BRrDI9KS.js";import{M as G}from"./MarkdownText-DM-IyAfb.js";import{O as K}from"./OrganizationContributionGraph-DmtgA4CC.js";import{P as W}from"./PaperFeedFilters-D-Ie3cDx.js";import{a as Z,P as J,b as V}from"./PaperDateFilter-qc_JVYg0.js";import{A as X,a as Y}from"./alert-Vt5eE6re.js";import{S as z}from"./searchable-select-DT-5KDJe.js";import{S as $}from"./skeleton-Cs8haT1C.js";import{u as ee}from"./useIntersectionObserver-Bw5JPCeX.js";import{e as se}from"./usePapers-fMOiVOFB.js";import{c as R}from"./catalog-DGg7xZLW.js";import{d as D,t as ae}from"./colors-DQ-VN9If.js";import re from"./NotFound-3C_Rmvq0.js";const te=[["trending","trending"],["date_published","newest"],["citation_count","most cited"]],ne=n=>n==="date_published"||n==="citation_count"?n:"trending",ye=({organizationSlug:n,taskSlug:p})=>{var y,P,v,F,L,k,w,O;const T=E(),[o,h]=B(),[I,u]=d.useState(!1),g=ne(o.get("order_by")),f=o.get("has_code")==="true",_=o.get("has_hf_artifacts")==="true",m=Z(o),x=C({queryKey:["organization",n],queryFn:()=>R.getOrganization(n),staleTime:10*60*1e3}),c=C({queryKey:["organization-areas-with-tasks",n],queryFn:()=>R.organizationAreasWithTasks(n),staleTime:10*60*1e3}),i=se({organizationSlug:n,taskSlug:p,page_size:12,order_by:g,order_dir:"desc",include_resources:!0,has_code:f,has_hf_artifacts:_,start_date:m.startDate,end_date:m.endDate,enabled:!!n}),{targetRef:M,isIntersecting:j}=ee({rootMargin:"200px"});d.useEffect(()=>{j&&i.hasNextPage&&!i.isFetchingNextPage&&i.fetchNextPage()},[j,i.hasNextPage,i.isFetchingNextPage]),d.useEffect(()=>{u(!1)},[n,p]);const b=d.useMemo(()=>{var a;return(((a=c.data)==null?void 0:a.results)??[]).flatMap(r=>r.tasks.filter(t=>!!t.slug).map(t=>({...t,slug:t.slug,label:D(t.name,t.slug)})))},[c.data]),l=b.find(a=>a.slug===p),N=d.useMemo(()=>{var a;return(((a=i.data)==null?void 0:a.pages)??[]).flatMap(r=>r.results.map(ae))},[i.data]),s=x.data??((y=c.data)==null?void 0:y.organization),H=((v=(P=i.data)==null?void 0:P.pages[0])==null?void 0:v.count)??0;if(((F=x.error)==null?void 0:F.status)===404||((L=c.error)==null?void 0:L.status)===404||((k=i.error)==null?void 0:k.status)===404)return e.jsx(re,{});if(c.error||i.error)return e.jsx("div",{className:"page",children:e.jsx(X,{variant:"destructive",children:e.jsx(Y,{children:"Failed to load organization papers. Please try again."})})});const q=a=>{const r=a.trim().toLocaleLowerCase();return b.filter(t=>`${t.label} ${t.slug}`.toLocaleLowerCase().includes(r)).map(t=>({value:t.slug,label:t.label,description:`${t.paper_count.toLocaleString()} ${t.paper_count===1?"paper":"papers"}`}))},S=a=>{const r=a==="__all__"?`/orgs/${n}`:`/orgs/${n}/${a}`,t=o.toString();T({pathname:r,search:t?`?${t}`:""})};return e.jsxs("div",{className:"page",children:[e.jsxs("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:[e.jsx(A,{to:"/",children:"Home"}),e.jsx("span",{children:" / "}),e.jsx(A,{to:"/organizations",children:"Organizations"}),e.jsx("span",{children:" / "}),e.jsx("span",{children:(s==null?void 0:s.name)??n}),l&&e.jsxs(e.Fragment,{children:[e.jsx("span",{children:" / "}),e.jsx("span",{children:D(l.name,l.slug)})]})]}),e.jsxs("header",{className:"organization-hero",children:[e.jsxs("div",{className:"organization-hero-profile",children:[e.jsx("div",{className:"organizations-eyebrow",children:"ORGANIZATION"}),e.jsxs("h1",{className:"feed-title organization-hero-title",children:[s!=null&&s.logo_url&&!I?e.jsx("img",{src:s.logo_url,alt:"",width:58,height:58,onError:()=>u(!0)}):s?e.jsx("span",{className:"organization-logo organization-logo--fallback","aria-hidden":"true",children:s.name.slice(0,1).toUpperCase()}):null,(s==null?void 0:s.name)??e.jsx($,{className:"h-12 w-64"})]}),s&&e.jsx(Q,{kind:"organization",entityId:s.id}),s&&e.jsxs("div",{className:"feed-subtitle",children:[((w=s.paper_count)==null?void 0:w.toLocaleString())??0," papers",(s.organization_trending_score??0)>0&&s.trending_rank&&e.jsxs(e.Fragment,{children:[" · #",s.trending_rank," trending this month"]})]}),(s==null?void 0:s.description)&&e.jsx(G,{className:"method-description",text:s.description}),s&&e.jsxs("div",{className:"organization-hero-links",children:[s.website_url&&e.jsx("a",{href:s.website_url,target:"_blank",rel:"noreferrer",children:"Website ↗"}),s.hf_url&&e.jsx("a",{href:s.hf_url,target:"_blank",rel:"noreferrer",children:"Hugging Face ↗"}),s.github_url&&e.jsx("a",{href:s.github_url,target:"_blank",rel:"noreferrer",children:"GitHub ↗"})]})]}),e.jsx(K,{organizationSlug:n,organizationName:(s==null?void 0:s.name)??n})]}),e.jsxs("div",{className:"sort-bar",style:{alignItems:"center",gap:16},children:[e.jsx("div",{style:{minWidth:260},children:e.jsx(z,{value:p??"__all__",onChange:S,placeholder:"All tasks",searchPlaceholder:"Search organization tasks...",emptyMessage:"No matching tasks.",ariaLabel:"Filter papers by task",selectedOption:l?{value:l.slug,label:l.label,description:`${l.paper_count.toLocaleString()} ${l.paper_count===1?"paper":"papers"}`}:{value:"__all__",label:"All tasks",description:`${((O=s==null?void 0:s.paper_count)==null?void 0:O.toLocaleString())??0} papers`},queryKey:["organization-task-options",n],queryFn:async a=>{var r;return[{value:"__all__",label:"All tasks",description:`${((r=s==null?void 0:s.paper_count)==null?void 0:r.toLocaleString())??0} papers`},...q(a)]},enabled:!c.isLoading,className:"h-[38px]"})}),e.jsxs("div",{className:"paper-feed-toolbar-controls",children:[e.jsx("div",{className:"sort-options",children:te.map(([a,r])=>e.jsx("button",{type:"button",className:`sort-btn ${g===a?"active":""}`,onClick:()=>{const t=new URLSearchParams(o);a==="trending"?t.delete("order_by"):t.set("order_by",a),h(t)},children:r},a))}),e.jsx(W,{hasCode:f,hasHfArtifacts:_,onHasCodeChange:a=>{const r=new URLSearchParams(o);a?r.set("has_code","true"):r.delete("has_code"),h(r)},onHasHfArtifactsChange:a=>{const r=new URLSearchParams(o);a?r.set("has_hf_artifacts","true"):r.delete("has_hf_artifacts"),h(r)}})]}),e.jsx(J,{startDate:m.startDate,endDate:m.endDate,onChange:a=>h(V(o,a))}),e.jsxs("div",{className:"results-count",children:[H.toLocaleString()," papers"]})]}),i.isLoading?e.jsx("div",{className:"paper-list",children:Array.from({length:4}).map((a,r)=>e.jsx($,{className:"h-40 w-full"},r))}):N.length===0?e.jsx("div",{className:"no-results",children:(s==null?void 0:s.paper_count)===0?"No papers indexed yet":"No papers found for this selection."}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"paper-list",children:N.map((a,r)=>e.jsx(U,{paper:a,rank:r+1,showInstitution:!1},a.id))}),e.jsx("div",{ref:M,style:{height:1}}),i.isFetchingNextPage&&e.jsx("div",{style:{padding:"20px 0",textAlign:"center"},children:"Loading more…"})]})]})};export{ye as O}; +import{b as E,d as B,r as d,j as e,L as A}from"./index-B7UoLEbn.js";import{R as Q}from"./ResearchFollowButton-C31U0bn3.js";import{u as C}from"./useQuery-DV2f4JpC.js";import{P as U}from"./components-Cax1Inob.js";import{M as G}from"./MarkdownText-DH4XnT47.js";import{O as K}from"./OrganizationContributionGraph-0fzCjE06.js";import{P as W}from"./PaperFeedFilters-CF3OKsFW.js";import{a as Z,P as J,b as V}from"./PaperDateFilter-CGG1OZi6.js";import{A as X,a as Y}from"./alert-B3UHHG00.js";import{S as z}from"./searchable-select-CceG4fY6.js";import{S as $}from"./skeleton-DLsINbKq.js";import{u as ee}from"./useIntersectionObserver-DOCspj7m.js";import{e as se}from"./usePapers-CDuTKuAc.js";import{c as R}from"./catalog-DcbS_7_L.js";import{d as D,t as ae}from"./colors-COYRNy-F.js";import re from"./NotFound-DPR3-upZ.js";const te=[["trending","trending"],["date_published","newest"],["citation_count","most cited"]],ne=n=>n==="date_published"||n==="citation_count"?n:"trending",ye=({organizationSlug:n,taskSlug:p})=>{var y,P,v,F,L,k,w,O;const T=E(),[o,h]=B(),[I,u]=d.useState(!1),g=ne(o.get("order_by")),f=o.get("has_code")==="true",_=o.get("has_hf_artifacts")==="true",m=Z(o),x=C({queryKey:["organization",n],queryFn:()=>R.getOrganization(n),staleTime:10*60*1e3}),c=C({queryKey:["organization-areas-with-tasks",n],queryFn:()=>R.organizationAreasWithTasks(n),staleTime:10*60*1e3}),i=se({organizationSlug:n,taskSlug:p,page_size:12,order_by:g,order_dir:"desc",include_resources:!0,has_code:f,has_hf_artifacts:_,start_date:m.startDate,end_date:m.endDate,enabled:!!n}),{targetRef:M,isIntersecting:j}=ee({rootMargin:"200px"});d.useEffect(()=>{j&&i.hasNextPage&&!i.isFetchingNextPage&&i.fetchNextPage()},[j,i.hasNextPage,i.isFetchingNextPage]),d.useEffect(()=>{u(!1)},[n,p]);const b=d.useMemo(()=>{var a;return(((a=c.data)==null?void 0:a.results)??[]).flatMap(r=>r.tasks.filter(t=>!!t.slug).map(t=>({...t,slug:t.slug,label:D(t.name,t.slug)})))},[c.data]),l=b.find(a=>a.slug===p),N=d.useMemo(()=>{var a;return(((a=i.data)==null?void 0:a.pages)??[]).flatMap(r=>r.results.map(ae))},[i.data]),s=x.data??((y=c.data)==null?void 0:y.organization),H=((v=(P=i.data)==null?void 0:P.pages[0])==null?void 0:v.count)??0;if(((F=x.error)==null?void 0:F.status)===404||((L=c.error)==null?void 0:L.status)===404||((k=i.error)==null?void 0:k.status)===404)return e.jsx(re,{});if(c.error||i.error)return e.jsx("div",{className:"page",children:e.jsx(X,{variant:"destructive",children:e.jsx(Y,{children:"Failed to load organization papers. Please try again."})})});const q=a=>{const r=a.trim().toLocaleLowerCase();return b.filter(t=>`${t.label} ${t.slug}`.toLocaleLowerCase().includes(r)).map(t=>({value:t.slug,label:t.label,description:`${t.paper_count.toLocaleString()} ${t.paper_count===1?"paper":"papers"}`}))},S=a=>{const r=a==="__all__"?`/orgs/${n}`:`/orgs/${n}/${a}`,t=o.toString();T({pathname:r,search:t?`?${t}`:""})};return e.jsxs("div",{className:"page",children:[e.jsxs("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:[e.jsx(A,{to:"/",children:"Home"}),e.jsx("span",{children:" / "}),e.jsx(A,{to:"/organizations",children:"Organizations"}),e.jsx("span",{children:" / "}),e.jsx("span",{children:(s==null?void 0:s.name)??n}),l&&e.jsxs(e.Fragment,{children:[e.jsx("span",{children:" / "}),e.jsx("span",{children:D(l.name,l.slug)})]})]}),e.jsxs("header",{className:"organization-hero",children:[e.jsxs("div",{className:"organization-hero-profile",children:[e.jsx("div",{className:"organizations-eyebrow",children:"ORGANIZATION"}),e.jsxs("h1",{className:"feed-title organization-hero-title",children:[s!=null&&s.logo_url&&!I?e.jsx("img",{src:s.logo_url,alt:"",width:58,height:58,onError:()=>u(!0)}):s?e.jsx("span",{className:"organization-logo organization-logo--fallback","aria-hidden":"true",children:s.name.slice(0,1).toUpperCase()}):null,(s==null?void 0:s.name)??e.jsx($,{className:"h-12 w-64"})]}),s&&e.jsx(Q,{kind:"organization",entityId:s.id}),s&&e.jsxs("div",{className:"feed-subtitle",children:[((w=s.paper_count)==null?void 0:w.toLocaleString())??0," papers",(s.organization_trending_score??0)>0&&s.trending_rank&&e.jsxs(e.Fragment,{children:[" · #",s.trending_rank," trending this month"]})]}),(s==null?void 0:s.description)&&e.jsx(G,{className:"method-description",text:s.description}),s&&e.jsxs("div",{className:"organization-hero-links",children:[s.website_url&&e.jsx("a",{href:s.website_url,target:"_blank",rel:"noreferrer",children:"Website ↗"}),s.hf_url&&e.jsx("a",{href:s.hf_url,target:"_blank",rel:"noreferrer",children:"Hugging Face ↗"}),s.github_url&&e.jsx("a",{href:s.github_url,target:"_blank",rel:"noreferrer",children:"GitHub ↗"})]})]}),e.jsx(K,{organizationSlug:n,organizationName:(s==null?void 0:s.name)??n})]}),e.jsxs("div",{className:"sort-bar",style:{alignItems:"center",gap:16},children:[e.jsx("div",{style:{minWidth:260},children:e.jsx(z,{value:p??"__all__",onChange:S,placeholder:"All tasks",searchPlaceholder:"Search organization tasks...",emptyMessage:"No matching tasks.",ariaLabel:"Filter papers by task",selectedOption:l?{value:l.slug,label:l.label,description:`${l.paper_count.toLocaleString()} ${l.paper_count===1?"paper":"papers"}`}:{value:"__all__",label:"All tasks",description:`${((O=s==null?void 0:s.paper_count)==null?void 0:O.toLocaleString())??0} papers`},queryKey:["organization-task-options",n],queryFn:async a=>{var r;return[{value:"__all__",label:"All tasks",description:`${((r=s==null?void 0:s.paper_count)==null?void 0:r.toLocaleString())??0} papers`},...q(a)]},enabled:!c.isLoading,className:"h-[38px]"})}),e.jsxs("div",{className:"paper-feed-toolbar-controls",children:[e.jsx("div",{className:"sort-options",children:te.map(([a,r])=>e.jsx("button",{type:"button",className:`sort-btn ${g===a?"active":""}`,onClick:()=>{const t=new URLSearchParams(o);a==="trending"?t.delete("order_by"):t.set("order_by",a),h(t)},children:r},a))}),e.jsx(W,{hasCode:f,hasHfArtifacts:_,onHasCodeChange:a=>{const r=new URLSearchParams(o);a?r.set("has_code","true"):r.delete("has_code"),h(r)},onHasHfArtifactsChange:a=>{const r=new URLSearchParams(o);a?r.set("has_hf_artifacts","true"):r.delete("has_hf_artifacts"),h(r)}})]}),e.jsx(J,{startDate:m.startDate,endDate:m.endDate,onChange:a=>h(V(o,a))}),e.jsxs("div",{className:"results-count",children:[H.toLocaleString()," papers"]})]}),i.isLoading?e.jsx("div",{className:"paper-list",children:Array.from({length:4}).map((a,r)=>e.jsx($,{className:"h-40 w-full"},r))}):N.length===0?e.jsx("div",{className:"no-results",children:(s==null?void 0:s.paper_count)===0?"No papers indexed yet":"No papers found for this selection."}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"paper-list",children:N.map((a,r)=>e.jsx(U,{paper:a,rank:r+1,showInstitution:!1},a.id))}),e.jsx("div",{ref:M,style:{height:1}}),i.isFetchingNextPage&&e.jsx("div",{style:{padding:"20px 0",textAlign:"center"},children:"Loading more…"})]})]})};export{ye as O}; diff --git a/assets/OrganizationTaskView-BAUp2ClU.js b/assets/OrganizationTaskView-BAUp2ClU.js new file mode 100644 index 0000000000000000000000000000000000000000..d6eee6a9814f35029492d0b4cf39bf71a35534ad --- /dev/null +++ b/assets/OrganizationTaskView-BAUp2ClU.js @@ -0,0 +1 @@ +import{u as i,j as t}from"./index-B7UoLEbn.js";import{O as m}from"./OrganizationPaperFeed-DkjkYb5k.js";import p from"./NotFound-DPR3-upZ.js";import"./ResearchFollowButton-C31U0bn3.js";import"./useQuery-DV2f4JpC.js";import"./useMutation-CuaM6sOT.js";import"./research-D7aSz-AO.js";import"./plus-BvN48Xkz.js";import"./components-Cax1Inob.js";import"./paperQueryKeys-BP2E-0yf.js";import"./LatexTitle-CeC5Gqpu.js";import"./colors-COYRNy-F.js";import"./papers-Ctf2uv0o.js";import"./safeExternalHref-CkBrsh84.js";import"./MarkdownText-DH4XnT47.js";/* empty css */import"./PaperPreviewLink-C5ianbW8.js";import"./index-tHVWANW1.js";import"./index-ClEBI70O.js";import"./katex-DkKDou_j.js";import"./hover-card-BM8a6wEE.js";import"./OrganizationContributionGraph-0fzCjE06.js";import"./skeleton-DLsINbKq.js";import"./catalog-DcbS_7_L.js";import"./PaperFeedFilters-CF3OKsFW.js";import"./PaperDateFilter-CGG1OZi6.js";import"./popover-BOnBmrXi.js";import"./alert-B3UHHG00.js";import"./searchable-select-CceG4fY6.js";import"./button-D543yAN8.js";import"./dialog-BECDhHRn.js";import"./loader-circle-hbMX20oF.js";import"./useIntersectionObserver-DOCspj7m.js";import"./usePapers-CDuTKuAc.js";import"./useInfiniteQuery-CoFrg4GN.js";const I=()=>{const{orgSlug:o,taskSlug:r}=i();return o&&r?t.jsx(m,{organizationSlug:o,taskSlug:r}):t.jsx(p,{})};export{I as default}; diff --git a/assets/OrganizationTaskView-CHkDgXnx.js b/assets/OrganizationTaskView-CHkDgXnx.js deleted file mode 100644 index d9990d8d645775eea06d962b459f85c894bf18c0..0000000000000000000000000000000000000000 --- a/assets/OrganizationTaskView-CHkDgXnx.js +++ /dev/null @@ -1 +0,0 @@ -import{u as i,j as t}from"./index-CkeK0cDg.js";import{O as m}from"./OrganizationPaperFeed-LrCe_Sqd.js";import p from"./NotFound-3C_Rmvq0.js";import"./ResearchFollowButton-Dpqj0_yd.js";import"./useQuery-_Fj6Jfzr.js";import"./useMutation-q-fdM2fm.js";import"./research-BfGol3BN.js";import"./plus-BaTMbqcZ.js";import"./components-BRrDI9KS.js";import"./paperQueryKeys-BP2E-0yf.js";import"./LatexTitle-DPYNzv63.js";import"./colors-DQ-VN9If.js";import"./papers-Celoj8_s.js";import"./safeExternalHref-CkBrsh84.js";import"./MarkdownText-DM-IyAfb.js";/* empty css */import"./PaperPreviewLink-CQ27hqZy.js";import"./index-B1_S53Hb.js";import"./index-DqQiSNg1.js";import"./katex-DkKDou_j.js";import"./hover-card-CAN3Vtea.js";import"./OrganizationContributionGraph-DmtgA4CC.js";import"./skeleton-Cs8haT1C.js";import"./catalog-DGg7xZLW.js";import"./PaperFeedFilters-D-Ie3cDx.js";import"./PaperDateFilter-qc_JVYg0.js";import"./popover-Vq6DwYpn.js";import"./alert-Vt5eE6re.js";import"./searchable-select-DT-5KDJe.js";import"./button-CsUrN-GU.js";import"./dialog-CGH-CTnE.js";import"./loader-circle-CTuL2Xdc.js";import"./useIntersectionObserver-Bw5JPCeX.js";import"./usePapers-fMOiVOFB.js";import"./useInfiniteQuery-gdIFpXB_.js";const I=()=>{const{orgSlug:o,taskSlug:r}=i();return o&&r?t.jsx(m,{organizationSlug:o,taskSlug:r}):t.jsx(p,{})};export{I as default}; diff --git a/assets/OrganizationsIndexView-cBaBMGWl.js b/assets/OrganizationsIndexView-DJGhJtfP.js similarity index 94% rename from assets/OrganizationsIndexView-cBaBMGWl.js rename to assets/OrganizationsIndexView-DJGhJtfP.js index 75e7be9d58e3487ae92ef9779aecddc55c748a76..547589e5b4bee99d2256c7ffec46004595ca615e 100644 --- a/assets/OrganizationsIndexView-cBaBMGWl.js +++ b/assets/OrganizationsIndexView-DJGhJtfP.js @@ -1 +1 @@ -import{d as u,r as g,j as e,L as x}from"./index-CkeK0cDg.js";import{u as j}from"./useQuery-_Fj6Jfzr.js";import{A as y,a as f}from"./alert-Vt5eE6re.js";import{S as _}from"./skeleton-Cs8haT1C.js";import{c as N}from"./catalog-DGg7xZLW.js";const v=n=>n==="papers"||n==="name"?n:"trending",S=({organization:n})=>{const[d,t]=g.useState(!1);return!n.logo_url||d?e.jsx("span",{className:"organization-logo organization-logo--fallback","aria-hidden":"true",children:n.name.slice(0,1).toUpperCase()}):e.jsx("span",{className:"organization-logo",children:e.jsx("img",{src:n.logo_url,alt:"",width:48,height:48,onError:()=>t(!0)})})},A=()=>{var h;const[n,d]=u(),t=v(n.get("sort")),c=n.get("q")??"",o=j({queryKey:["organizations","featured"],queryFn:()=>N.organizationIndex(),staleTime:10*60*1e3}),p=s=>{const a=new URLSearchParams(n),i=s.sort??t,r=s.query??c;i==="trending"?a.delete("sort"):a.set("sort",i),r.trim()?a.set("q",r):a.delete("q"),d(a)},m=g.useMemo(()=>{var i;const s=c.trim().toLocaleLowerCase(),a=(((i=o.data)==null?void 0:i.results)??[]).filter(r=>[r.name,r.slug,r.hf_slug??""].join(" ").toLocaleLowerCase().includes(s));return t==="papers"?[...a].sort((r,l)=>(l.paper_count??0)-(r.paper_count??0)||r.name.localeCompare(l.name)||r.slug.localeCompare(l.slug)):t==="name"?[...a].sort((r,l)=>r.name.localeCompare(l.name)||r.slug.localeCompare(l.slug)):a},[o.data,c,t]);return e.jsxs("div",{className:"page organizations-page",children:[e.jsx("div",{className:"feed-header",children:e.jsxs("div",{children:[e.jsxs("h1",{className:"feed-title",children:["AI ",e.jsx("em",{children:"Organizations"})]}),e.jsx("div",{className:"feed-subtitle",children:"Explore papers from leading AI organizations, ranked by sustained community momentum over the past 30 days."})]})}),e.jsxs("section",{"aria-labelledby":"organizations-heading",children:[e.jsxs("div",{className:"organizations-section-heading",children:[e.jsxs("h2",{id:"organizations-heading",children:[((h=o.data)==null?void 0:h.count)??21," organizations"]}),e.jsx("span",{children:t==="trending"?"Ranked by 30-day momentum":t==="papers"?"Sorted by linked papers":"Sorted A–Z"})]}),e.jsxs("div",{className:"organizations-controls",children:[e.jsxs("label",{children:[e.jsx("span",{className:"sr-only",children:"Search organizations"}),e.jsx("input",{type:"search",value:c,onChange:s=>p({query:s.target.value}),placeholder:"Search organizations"})]}),e.jsx("div",{className:"organizations-sort","aria-label":"Sort organizations",children:[["trending","Trending"],["papers","Most papers"],["name","A–Z"]].map(([s,a])=>e.jsx("button",{type:"button",className:t===s?"active":"","aria-pressed":t===s,onClick:()=>p({sort:s}),children:a},s))})]}),o.isLoading?e.jsx("div",{className:"organizations-grid","aria-busy":"true",children:Array.from({length:6}).map((s,a)=>e.jsx(_,{className:"organization-card-skeleton"},a))}):o.error?e.jsx(y,{variant:"destructive",children:e.jsxs(f,{children:["Failed to load organizations."," ",e.jsx("button",{type:"button",onClick:()=>o.refetch(),children:"Try again"})]})}):m.length===0?e.jsxs("div",{className:"organizations-empty",children:["No organizations match “",c,"”."]}):e.jsx("div",{className:"organizations-grid",children:m.map(s=>{var r;const a=s.paper_count??0,i=s.first_paper_year&&s.latest_paper_year?s.first_paper_year===s.latest_paper_year?String(s.first_paper_year):`${s.first_paper_year}–${s.latest_paper_year}`:null;return e.jsxs(x,{to:`/orgs/${s.slug}`,className:"organization-card","aria-label":a?`Browse ${a.toLocaleString()} ${s.name} papers`:`Browse ${s.name} papers`,children:[e.jsxs("div",{className:"organization-card-header",children:[e.jsx(S,{organization:s}),e.jsxs("div",{children:[e.jsx("h3",{children:s.name}),e.jsxs("span",{children:["@",s.hf_slug??s.slug]})]})]}),e.jsxs("div",{className:"organization-card-metrics",children:[e.jsx("strong",{children:a.toLocaleString()}),e.jsx("span",{children:a===1?"paper":"papers"}),t==="trending"&&s.trending_rank&&e.jsxs("span",{className:"organization-rank",children:["#",s.trending_rank]})]}),e.jsxs("div",{className:"organization-highlight",children:[e.jsx("span",{children:"Trending paper"}),e.jsx("strong",{children:((r=s.top_trending_paper)==null?void 0:r.title)??"No papers indexed yet"})]}),e.jsxs("div",{className:"organization-card-footer",children:[i?`Publishing ${i}`:"Research archive ready",e.jsx("span",{"aria-hidden":"true",children:"↗"})]})]},s.id)})})]})]})};export{A as default}; +import{d as u,r as g,j as e,L as x}from"./index-B7UoLEbn.js";import{u as j}from"./useQuery-DV2f4JpC.js";import{A as y,a as f}from"./alert-B3UHHG00.js";import{S as _}from"./skeleton-DLsINbKq.js";import{c as N}from"./catalog-DcbS_7_L.js";const v=n=>n==="papers"||n==="name"?n:"trending",S=({organization:n})=>{const[d,t]=g.useState(!1);return!n.logo_url||d?e.jsx("span",{className:"organization-logo organization-logo--fallback","aria-hidden":"true",children:n.name.slice(0,1).toUpperCase()}):e.jsx("span",{className:"organization-logo",children:e.jsx("img",{src:n.logo_url,alt:"",width:48,height:48,onError:()=>t(!0)})})},A=()=>{var h;const[n,d]=u(),t=v(n.get("sort")),c=n.get("q")??"",o=j({queryKey:["organizations","featured"],queryFn:()=>N.organizationIndex(),staleTime:10*60*1e3}),p=s=>{const a=new URLSearchParams(n),i=s.sort??t,r=s.query??c;i==="trending"?a.delete("sort"):a.set("sort",i),r.trim()?a.set("q",r):a.delete("q"),d(a)},m=g.useMemo(()=>{var i;const s=c.trim().toLocaleLowerCase(),a=(((i=o.data)==null?void 0:i.results)??[]).filter(r=>[r.name,r.slug,r.hf_slug??""].join(" ").toLocaleLowerCase().includes(s));return t==="papers"?[...a].sort((r,l)=>(l.paper_count??0)-(r.paper_count??0)||r.name.localeCompare(l.name)||r.slug.localeCompare(l.slug)):t==="name"?[...a].sort((r,l)=>r.name.localeCompare(l.name)||r.slug.localeCompare(l.slug)):a},[o.data,c,t]);return e.jsxs("div",{className:"page organizations-page",children:[e.jsx("div",{className:"feed-header",children:e.jsxs("div",{children:[e.jsxs("h1",{className:"feed-title",children:["AI ",e.jsx("em",{children:"Organizations"})]}),e.jsx("div",{className:"feed-subtitle",children:"Explore papers from leading AI organizations, ranked by sustained community momentum over the past 30 days."})]})}),e.jsxs("section",{"aria-labelledby":"organizations-heading",children:[e.jsxs("div",{className:"organizations-section-heading",children:[e.jsxs("h2",{id:"organizations-heading",children:[((h=o.data)==null?void 0:h.count)??21," organizations"]}),e.jsx("span",{children:t==="trending"?"Ranked by 30-day momentum":t==="papers"?"Sorted by linked papers":"Sorted A–Z"})]}),e.jsxs("div",{className:"organizations-controls",children:[e.jsxs("label",{children:[e.jsx("span",{className:"sr-only",children:"Search organizations"}),e.jsx("input",{type:"search",value:c,onChange:s=>p({query:s.target.value}),placeholder:"Search organizations"})]}),e.jsx("div",{className:"organizations-sort","aria-label":"Sort organizations",children:[["trending","Trending"],["papers","Most papers"],["name","A–Z"]].map(([s,a])=>e.jsx("button",{type:"button",className:t===s?"active":"","aria-pressed":t===s,onClick:()=>p({sort:s}),children:a},s))})]}),o.isLoading?e.jsx("div",{className:"organizations-grid","aria-busy":"true",children:Array.from({length:6}).map((s,a)=>e.jsx(_,{className:"organization-card-skeleton"},a))}):o.error?e.jsx(y,{variant:"destructive",children:e.jsxs(f,{children:["Failed to load organizations."," ",e.jsx("button",{type:"button",onClick:()=>o.refetch(),children:"Try again"})]})}):m.length===0?e.jsxs("div",{className:"organizations-empty",children:["No organizations match “",c,"”."]}):e.jsx("div",{className:"organizations-grid",children:m.map(s=>{var r;const a=s.paper_count??0,i=s.first_paper_year&&s.latest_paper_year?s.first_paper_year===s.latest_paper_year?String(s.first_paper_year):`${s.first_paper_year}–${s.latest_paper_year}`:null;return e.jsxs(x,{to:`/orgs/${s.slug}`,className:"organization-card","aria-label":a?`Browse ${a.toLocaleString()} ${s.name} papers`:`Browse ${s.name} papers`,children:[e.jsxs("div",{className:"organization-card-header",children:[e.jsx(S,{organization:s}),e.jsxs("div",{children:[e.jsx("h3",{children:s.name}),e.jsxs("span",{children:["@",s.hf_slug??s.slug]})]})]}),e.jsxs("div",{className:"organization-card-metrics",children:[e.jsx("strong",{children:a.toLocaleString()}),e.jsx("span",{children:a===1?"paper":"papers"}),t==="trending"&&s.trending_rank&&e.jsxs("span",{className:"organization-rank",children:["#",s.trending_rank]})]}),e.jsxs("div",{className:"organization-highlight",children:[e.jsx("span",{children:"Trending paper"}),e.jsx("strong",{children:((r=s.top_trending_paper)==null?void 0:r.title)??"No papers indexed yet"})]}),e.jsxs("div",{className:"organization-card-footer",children:[i?`Publishing ${i}`:"Research archive ready",e.jsx("span",{"aria-hidden":"true",children:"↗"})]})]},s.id)})})]})]})};export{A as default}; diff --git a/assets/PaperDateFilter-qc_JVYg0.js b/assets/PaperDateFilter-CGG1OZi6.js similarity index 98% rename from assets/PaperDateFilter-qc_JVYg0.js rename to assets/PaperDateFilter-CGG1OZi6.js index 531c051af9428293e0a15991710732997986aa37..dae22811c25062909356ef36baaad56cb247a963 100644 --- a/assets/PaperDateFilter-qc_JVYg0.js +++ b/assets/PaperDateFilter-CGG1OZi6.js @@ -1 +1 @@ -import{r as p,j as n}from"./index-CkeK0cDg.js";import{P as q,a as G,b as Q}from"./popover-Vq6DwYpn.js";const E=(e,t)=>{const a=new Date(t),s=new Date(a);return s.setUTCDate(a.getUTCDate()-(e==="week"?6:29)),{startDate:s.toISOString().slice(0,10),endDate:a.toISOString().slice(0,10)}},z=e=>({startDate:e.get("start_date")||void 0,endDate:e.get("end_date")||void 0}),oe=(e,t=new Date,a="week")=>{const s=z(e);if(s.startDate||s.endDate||e.get("time")==="all_time")return s;const c=new Date(Date.UTC(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()));return E(a,c)},J=(e,t)=>{const a=new URLSearchParams(e);return t.startDate?a.set("start_date",t.startDate):a.delete("start_date"),t.endDate?a.set("end_date",t.endDate):a.delete("end_date"),a.delete("time"),a},ie=(e,t)=>{const a=J(e,t);return!t.startDate&&!t.endDate&&a.set("time","all_time"),a},K=new Intl.DateTimeFormat("en",{month:"long",year:"numeric",timeZone:"UTC"}),O=new Intl.DateTimeFormat("en",{month:"short",timeZone:"UTC"}),L="(max-width: 640px)",X=()=>{const[e,t]=p.useState(()=>typeof window<"u"&&window.matchMedia(L).matches);return p.useEffect(()=>{const a=window.matchMedia(L),s=c=>t(c.matches);return t(a.matches),a.addEventListener("change",s),()=>a.removeEventListener("change",s)},[]),e},V=e=>e.toISOString().slice(0,10),b=e=>new Date(`${e}T00:00:00Z`),ee=()=>{const e=new Date;return new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()))},R=(e,t)=>new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth()+t,1)),M=e=>new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),1)),te=(e,t)=>new Date(Date.UTC(t,e.getUTCMonth(),1)),w=(e,t)=>e.startDate===t.startDate&&e.endDate===t.endDate,ae=(e,t)=>{const a=b(e),s=b(t),c=O.format(a),l=O.format(s),g=a.getUTCDate(),d=s.getUTCDate(),o=a.getUTCFullYear(),u=s.getUTCFullYear();return e===t?`${c} ${g}, ${o}`:o===u&&a.getUTCMonth()===s.getUTCMonth()?`${c} ${g}–${d}, ${o}`:o===u?`${c} ${g}–${l} ${d}, ${o}`:`${c} ${g}, ${o}–${l} ${d}, ${u}`},ne=e=>{const t=e.getUTCFullYear(),a=e.getUTCMonth(),s=new Date(Date.UTC(t,a,1)),c=(s.getUTCDay()+6)%7,l=new Date(s);return l.setUTCDate(s.getUTCDate()-c),Array.from({length:42},(g,d)=>{const o=new Date(l);return o.setUTCDate(l.getUTCDate()+d),{iso:V(o),day:o.getUTCDate(),outsideMonth:o.getUTCMonth()!==a}})},A=({month:e,today:t,startDate:a,endDate:s,onSelect:c,yearLabel:l,yearValue:g,onYearChange:d,secondary:o=!1})=>{const u=p.useMemo(()=>ne(e),[e]);return n.jsxs("section",{className:`paper-date-calendar${o?" paper-date-calendar-secondary":""}`,children:[n.jsxs("label",{className:"paper-date-year",children:[n.jsx("span",{children:l}),n.jsx("input",{type:"number",inputMode:"numeric",min:"1900",max:t.slice(0,4),step:"1",value:g,onChange:r=>d(r.target.value)})]}),n.jsx("h3",{children:K.format(e)}),n.jsx("div",{className:"paper-date-weekdays","aria-hidden":"true",children:["Mon","Tue","Wed","Thu","Fri","Sat","Sun"].map(r=>n.jsx("span",{children:r},r))}),n.jsx("div",{className:"paper-date-days",children:u.map(r=>{const h=r.iso===a||r.iso===s,T=!!(a&&s&&r.iso>a&&r.isot;return n.jsx("button",{type:"button","aria-label":r.iso,"aria-selected":h,disabled:m,className:["paper-date-day",r.outsideMonth?"outside":"",h?"selected":"",T?"in-range":"",r.iso===t?"today":""].filter(Boolean).join(" "),onClick:()=>c(r.iso),children:r.day},r.iso)})})]})},I=({calendar:e,onPrevious:t,onNext:a,secondary:s=!1})=>n.jsxs("div",{className:`paper-date-navigation-group${s?" paper-date-navigation-group-secondary":""}`,children:[n.jsx("button",{type:"button","aria-label":`Previous ${e} month`,onClick:t,children:"←"}),n.jsx("button",{type:"button","aria-label":`Next ${e} month`,onClick:a,children:"→"})]}),ce=({startDate:e,endDate:t,onChange:a,currentDate:s})=>{const c=X(),l=s?b(s):ee(),[g,d]=p.useState(!1),[o,u]=p.useState(),[r,h]=p.useState(),[T,m]=p.useState(()=>M(l)),[$,D]=p.useState(()=>R(M(l),1)),[H,y]=p.useState(()=>String(l.getUTCFullYear())),[B,U]=p.useState(()=>String(l.getUTCFullYear())),f={startDate:e,endDate:t},N=E("week",l),Y=E("month",l),P=V(l),v=!!(e&&t&&!w(f,N)&&!w(f,Y)),Z=()=>{u(e),h(t);const i=M(e?b(e):l),C=M(t?b(t):R(i,1));m(i),D(C),y(String(i.getUTCFullYear())),U(String(C.getUTCFullYear())),d(!0)},k=(i,C,F)=>{if(C(i),!/^\d{4}$/.test(i))return;const x=Number(i);x>=1900&&x<=l.getUTCFullYear()&&F(j=>te(j,x))},S=(i,C,F,x)=>{const j=R(i,C);F(j),x(String(j.getUTCFullYear()))},_=i=>{!o||r?(u(i),h(void 0)):i{a({}),d(!1)};return n.jsxs("div",{className:`paper-date-filter${c?" paper-date-filter-single-calendar":""}`,role:"group","aria-label":"Publication date",children:[n.jsx("button",{type:"button",className:`sort-btn sort-btn-time${w(f,N)?" active":""}`,onClick:()=>a(N),children:"Last Week"}),n.jsx("button",{type:"button",className:`sort-btn sort-btn-time${w(f,Y)?" active":""}`,onClick:()=>a(Y),children:"Last Month"}),n.jsx("button",{type:"button",className:`sort-btn sort-btn-time${!e&&!t?" active":""}`,onClick:()=>a({}),children:"All Time"}),n.jsxs(q,{open:g,onOpenChange:i=>{i?Z():d(!1)},children:[n.jsx(G,{asChild:!0,children:n.jsx("button",{type:"button",className:`sort-btn sort-btn-time${v?" active":""}`,"aria-label":v?"Change date range":"Select a range",children:v&&e&&t?ae(e,t):"Select a range"})}),n.jsxs(Q,{align:"end",className:`paper-date-popover${c?" paper-date-popover-single-calendar":""}`,role:"dialog","aria-label":"Select a date range",children:[n.jsxs("div",{className:"paper-date-popover-header",children:[n.jsx("h2",{children:"Select a date range"}),n.jsx("p",{children:"Choose an inclusive start and end publication date."})]}),n.jsxs("div",{className:"paper-date-navigation",children:[n.jsx(I,{calendar:"start",onPrevious:()=>S(T,-1,m,y),onNext:()=>S(T,1,m,y)}),!c&&n.jsx(I,{calendar:"end",onPrevious:()=>S($,-1,D,U),onNext:()=>S($,1,D,U),secondary:!0})]}),n.jsxs("div",{className:"paper-date-calendars",children:[n.jsx(A,{month:T,today:P,startDate:o,endDate:r,onSelect:_,yearLabel:c?"Year":"Start year",yearValue:H,onYearChange:i=>k(i,y,m)}),!c&&n.jsx(A,{month:$,today:P,startDate:o,endDate:r,onSelect:_,yearLabel:"End year",yearValue:B,onYearChange:i=>k(i,U,D),secondary:!0})]}),n.jsxs("div",{className:"paper-date-actions",children:[n.jsx("button",{type:"button",className:"paper-date-clear",onClick:W,children:"Clear range"}),n.jsxs("div",{children:[n.jsx("button",{type:"button",onClick:()=>d(!1),children:"Cancel"}),n.jsx("button",{type:"button",className:"paper-date-apply",disabled:!o||!r,onClick:()=>{o&&r&&a({startDate:o,endDate:r}),d(!1)},children:"Apply"})]})]})]})]})]})};export{ce as P,z as a,J as b,oe as r,ie as w}; +import{r as p,j as n}from"./index-B7UoLEbn.js";import{P as q,a as G,b as Q}from"./popover-BOnBmrXi.js";const E=(e,t)=>{const a=new Date(t),s=new Date(a);return s.setUTCDate(a.getUTCDate()-(e==="week"?6:29)),{startDate:s.toISOString().slice(0,10),endDate:a.toISOString().slice(0,10)}},z=e=>({startDate:e.get("start_date")||void 0,endDate:e.get("end_date")||void 0}),oe=(e,t=new Date,a="week")=>{const s=z(e);if(s.startDate||s.endDate||e.get("time")==="all_time")return s;const c=new Date(Date.UTC(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()));return E(a,c)},J=(e,t)=>{const a=new URLSearchParams(e);return t.startDate?a.set("start_date",t.startDate):a.delete("start_date"),t.endDate?a.set("end_date",t.endDate):a.delete("end_date"),a.delete("time"),a},ie=(e,t)=>{const a=J(e,t);return!t.startDate&&!t.endDate&&a.set("time","all_time"),a},K=new Intl.DateTimeFormat("en",{month:"long",year:"numeric",timeZone:"UTC"}),O=new Intl.DateTimeFormat("en",{month:"short",timeZone:"UTC"}),L="(max-width: 640px)",X=()=>{const[e,t]=p.useState(()=>typeof window<"u"&&window.matchMedia(L).matches);return p.useEffect(()=>{const a=window.matchMedia(L),s=c=>t(c.matches);return t(a.matches),a.addEventListener("change",s),()=>a.removeEventListener("change",s)},[]),e},V=e=>e.toISOString().slice(0,10),b=e=>new Date(`${e}T00:00:00Z`),ee=()=>{const e=new Date;return new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()))},R=(e,t)=>new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth()+t,1)),M=e=>new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),1)),te=(e,t)=>new Date(Date.UTC(t,e.getUTCMonth(),1)),w=(e,t)=>e.startDate===t.startDate&&e.endDate===t.endDate,ae=(e,t)=>{const a=b(e),s=b(t),c=O.format(a),l=O.format(s),g=a.getUTCDate(),d=s.getUTCDate(),o=a.getUTCFullYear(),u=s.getUTCFullYear();return e===t?`${c} ${g}, ${o}`:o===u&&a.getUTCMonth()===s.getUTCMonth()?`${c} ${g}–${d}, ${o}`:o===u?`${c} ${g}–${l} ${d}, ${o}`:`${c} ${g}, ${o}–${l} ${d}, ${u}`},ne=e=>{const t=e.getUTCFullYear(),a=e.getUTCMonth(),s=new Date(Date.UTC(t,a,1)),c=(s.getUTCDay()+6)%7,l=new Date(s);return l.setUTCDate(s.getUTCDate()-c),Array.from({length:42},(g,d)=>{const o=new Date(l);return o.setUTCDate(l.getUTCDate()+d),{iso:V(o),day:o.getUTCDate(),outsideMonth:o.getUTCMonth()!==a}})},A=({month:e,today:t,startDate:a,endDate:s,onSelect:c,yearLabel:l,yearValue:g,onYearChange:d,secondary:o=!1})=>{const u=p.useMemo(()=>ne(e),[e]);return n.jsxs("section",{className:`paper-date-calendar${o?" paper-date-calendar-secondary":""}`,children:[n.jsxs("label",{className:"paper-date-year",children:[n.jsx("span",{children:l}),n.jsx("input",{type:"number",inputMode:"numeric",min:"1900",max:t.slice(0,4),step:"1",value:g,onChange:r=>d(r.target.value)})]}),n.jsx("h3",{children:K.format(e)}),n.jsx("div",{className:"paper-date-weekdays","aria-hidden":"true",children:["Mon","Tue","Wed","Thu","Fri","Sat","Sun"].map(r=>n.jsx("span",{children:r},r))}),n.jsx("div",{className:"paper-date-days",children:u.map(r=>{const h=r.iso===a||r.iso===s,T=!!(a&&s&&r.iso>a&&r.isot;return n.jsx("button",{type:"button","aria-label":r.iso,"aria-selected":h,disabled:m,className:["paper-date-day",r.outsideMonth?"outside":"",h?"selected":"",T?"in-range":"",r.iso===t?"today":""].filter(Boolean).join(" "),onClick:()=>c(r.iso),children:r.day},r.iso)})})]})},I=({calendar:e,onPrevious:t,onNext:a,secondary:s=!1})=>n.jsxs("div",{className:`paper-date-navigation-group${s?" paper-date-navigation-group-secondary":""}`,children:[n.jsx("button",{type:"button","aria-label":`Previous ${e} month`,onClick:t,children:"←"}),n.jsx("button",{type:"button","aria-label":`Next ${e} month`,onClick:a,children:"→"})]}),ce=({startDate:e,endDate:t,onChange:a,currentDate:s})=>{const c=X(),l=s?b(s):ee(),[g,d]=p.useState(!1),[o,u]=p.useState(),[r,h]=p.useState(),[T,m]=p.useState(()=>M(l)),[$,D]=p.useState(()=>R(M(l),1)),[H,y]=p.useState(()=>String(l.getUTCFullYear())),[B,U]=p.useState(()=>String(l.getUTCFullYear())),f={startDate:e,endDate:t},N=E("week",l),Y=E("month",l),P=V(l),v=!!(e&&t&&!w(f,N)&&!w(f,Y)),Z=()=>{u(e),h(t);const i=M(e?b(e):l),C=M(t?b(t):R(i,1));m(i),D(C),y(String(i.getUTCFullYear())),U(String(C.getUTCFullYear())),d(!0)},k=(i,C,F)=>{if(C(i),!/^\d{4}$/.test(i))return;const x=Number(i);x>=1900&&x<=l.getUTCFullYear()&&F(j=>te(j,x))},S=(i,C,F,x)=>{const j=R(i,C);F(j),x(String(j.getUTCFullYear()))},_=i=>{!o||r?(u(i),h(void 0)):i{a({}),d(!1)};return n.jsxs("div",{className:`paper-date-filter${c?" paper-date-filter-single-calendar":""}`,role:"group","aria-label":"Publication date",children:[n.jsx("button",{type:"button",className:`sort-btn sort-btn-time${w(f,N)?" active":""}`,onClick:()=>a(N),children:"Last Week"}),n.jsx("button",{type:"button",className:`sort-btn sort-btn-time${w(f,Y)?" active":""}`,onClick:()=>a(Y),children:"Last Month"}),n.jsx("button",{type:"button",className:`sort-btn sort-btn-time${!e&&!t?" active":""}`,onClick:()=>a({}),children:"All Time"}),n.jsxs(q,{open:g,onOpenChange:i=>{i?Z():d(!1)},children:[n.jsx(G,{asChild:!0,children:n.jsx("button",{type:"button",className:`sort-btn sort-btn-time${v?" active":""}`,"aria-label":v?"Change date range":"Select a range",children:v&&e&&t?ae(e,t):"Select a range"})}),n.jsxs(Q,{align:"end",className:`paper-date-popover${c?" paper-date-popover-single-calendar":""}`,role:"dialog","aria-label":"Select a date range",children:[n.jsxs("div",{className:"paper-date-popover-header",children:[n.jsx("h2",{children:"Select a date range"}),n.jsx("p",{children:"Choose an inclusive start and end publication date."})]}),n.jsxs("div",{className:"paper-date-navigation",children:[n.jsx(I,{calendar:"start",onPrevious:()=>S(T,-1,m,y),onNext:()=>S(T,1,m,y)}),!c&&n.jsx(I,{calendar:"end",onPrevious:()=>S($,-1,D,U),onNext:()=>S($,1,D,U),secondary:!0})]}),n.jsxs("div",{className:"paper-date-calendars",children:[n.jsx(A,{month:T,today:P,startDate:o,endDate:r,onSelect:_,yearLabel:c?"Year":"Start year",yearValue:H,onYearChange:i=>k(i,y,m)}),!c&&n.jsx(A,{month:$,today:P,startDate:o,endDate:r,onSelect:_,yearLabel:"End year",yearValue:B,onYearChange:i=>k(i,U,D),secondary:!0})]}),n.jsxs("div",{className:"paper-date-actions",children:[n.jsx("button",{type:"button",className:"paper-date-clear",onClick:W,children:"Clear range"}),n.jsxs("div",{children:[n.jsx("button",{type:"button",onClick:()=>d(!1),children:"Cancel"}),n.jsx("button",{type:"button",className:"paper-date-apply",disabled:!o||!r,onClick:()=>{o&&r&&a({startDate:o,endDate:r}),d(!1)},children:"Apply"})]})]})]})]})]})};export{ce as P,z as a,J as b,oe as r,ie as w}; diff --git a/assets/PaperDetailView-CLG-Lnyq.js b/assets/PaperDetailView-DdfjmMoh.js similarity index 55% rename from assets/PaperDetailView-CLG-Lnyq.js rename to assets/PaperDetailView-DdfjmMoh.js index 561aca16a29186287b5b3bca75911d76874bb6a7..f35f80fc0600ec2d660ce6d2f64cf6f103342c2c 100644 --- a/assets/PaperDetailView-CLG-Lnyq.js +++ b/assets/PaperDetailView-DdfjmMoh.js @@ -1,14 +1,14 @@ -import{g as Le,n as Us,b as Wt,h as oe,k as Ds,r as m,j as e,l as me,m as he,o as fe,P as Jt,p as ke,q as Yt,s as Fe,t as Re,v as Zt,w as vt,x as Me,X as yt,L as ue,y as Bs,z as zs,R as Hs,I as Ms,B as es,D as qs,E as Os,T as Ks,A as ht,i as Gs,a as Oe,F as qe,G as pt,J as ts,K as Xs,u as Qs,M as Lt,N as Vs,f as Ft,O as Ws,Q as Js,S as Ys,U as Zs,V as ea}from"./index-CkeK0cDg.js";import{I as J,T as ta,M as sa,A as aa,S as ra,a as na}from"./components-BRrDI9KS.js";import{L as He,a as ia}from"./LatexTitle-DPYNzv63.js";import{e as Ke,C as oa,E as la}from"./ExternalSourceEvalBadge-C5RULLdt.js";import{p as W}from"./papers-Celoj8_s.js";import{r as ss,p as ca}from"./paperReader-BIpQD5HO.js";import{p as ye}from"./paperQueryKeys-BP2E-0yf.js";import{u as ne}from"./useQuery-_Fj6Jfzr.js";import{b as da}from"./usePapers-fMOiVOFB.js";import{f as ua,D as ma}from"./latexPlainText-DI8YEXVe.js";import{s as we}from"./safeExternalHref-CkBrsh84.js";import{s as ha}from"./colors-DQ-VN9If.js";import{S as Ie}from"./skeleton-Cs8haT1C.js";import{A as pa,a as fa}from"./alert-Vt5eE6re.js";import{B as L}from"./button-CsUrN-GU.js";import{D as ee,a as te,b as se,c as ae,d as re,e as le}from"./dialog-CGH-CTnE.js";import{u as ga}from"./useInfiniteQuery-gdIFpXB_.js";import{A as xa,a as ba}from"./AgentLogos-BU5avxAK.js";import{p as ja}from"./paperEdits-DNevMcOH.js";import{C as va}from"./copy-BEe19JmS.js";import{I as V}from"./input-Cnu30n0B.js";import{S as Tt,a as Ae}from"./searchable-select-DT-5KDJe.js";import{u as ce}from"./useMutation-q-fdM2fm.js";import{c as _e}from"./catalog-DGg7xZLW.js";import{s as pe,p as ya}from"./submissions-C-uglc0y.js";import{e as wa,r as _a,a as je}from"./evaluationQueryInvalidation-CC5JhGiX.js";import{S as wt,L as de,a as ka}from"./SignInToEditDialog-CmfnGty-.js";import{L as ie}from"./loader-circle-CTuL2Xdc.js";import{T as Te,n as Ye,g as Ut}from"./github-BxRJHxJc.js";import{D as Na,c as Ca,g as Ea,s as Sa,a as Pa,b as $a,d as Ia,i as Ra,e as Aa}from"./codexAddEvals-Cyz55d6F.js";import{P as Ue}from"./plus-BaTMbqcZ.js";import{u as as}from"./index-DVmlmU_7.js";import{B as rs}from"./badge-DESGN9ka.js";import{G as Dt}from"./github-DHpXYWrC.js";import{M as La}from"./index-B1_S53Hb.js";import{r as Fa}from"./index-DqQiSNg1.js";import{u as Ta}from"./useIntersectionObserver-Bw5JPCeX.js";import{S as Bt,s as Ua}from"./savedPapersAuth-dGFX8cRe.js";import"./hover-card-CAN3Vtea.js";import"./popover-Vq6DwYpn.js";import"./textarea-BsaJyP0o.js";/** +import{g as Le,n as Us,b as Wt,h as oe,k as Ds,r as u,j as e,l as me,m as he,o as fe,P as Yt,p as ke,q as Jt,s as Fe,t as Re,v as Zt,w as vt,x as Me,X as yt,L as ue,y as Bs,z as zs,R as Hs,I as Ms,B as es,D as qs,E as Os,T as Ks,A as ht,i as Gs,a as Oe,F as qe,G as pt,J as ts,K as Xs,u as Qs,M as Lt,N as Vs,f as Ft,O as Ws,Q as Ys,S as Js,U as Zs,V as ea}from"./index-B7UoLEbn.js";import{I as Y,T as ta,M as sa,A as aa,S as ra,a as na}from"./components-Cax1Inob.js";import{L as He,a as ia}from"./LatexTitle-CeC5Gqpu.js";import{e as Ke,C as oa,E as la}from"./ExternalSourceEvalBadge-BwESq8va.js";import{p as W}from"./papers-Ctf2uv0o.js";import{r as ss,p as ca}from"./paperReader-BIpQD5HO.js";import{p as ye}from"./paperQueryKeys-BP2E-0yf.js";import{u as ne}from"./useQuery-DV2f4JpC.js";import{b as da}from"./usePapers-CDuTKuAc.js";import{f as ua,D as ma}from"./latexPlainText-DI8YEXVe.js";import{s as we}from"./safeExternalHref-CkBrsh84.js";import{s as ha}from"./colors-COYRNy-F.js";import{S as Ie}from"./skeleton-DLsINbKq.js";import{A as pa,a as fa}from"./alert-B3UHHG00.js";import{B as L}from"./button-D543yAN8.js";import{D as ee,a as te,b as se,c as ae,d as re,e as le}from"./dialog-BECDhHRn.js";import{u as ga}from"./useInfiniteQuery-CoFrg4GN.js";import{A as xa,a as ba}from"./AgentLogos-XWluRn7l.js";import{p as ja}from"./paperEdits-C__t4BOQ.js";import{C as va}from"./copy-B2Q-ksVe.js";import{I as V}from"./input-hdt3aF12.js";import{S as Tt,a as Ae}from"./searchable-select-CceG4fY6.js";import{u as ce}from"./useMutation-CuaM6sOT.js";import{c as _e}from"./catalog-DcbS_7_L.js";import{s as pe,p as ya}from"./submissions-BTKMKNWZ.js";import{e as wa,r as _a,a as je}from"./evaluationQueryInvalidation-CC5JhGiX.js";import{S as wt,L as de,a as ka}from"./SignInToEditDialog-BzeqSUHr.js";import{L as ie}from"./loader-circle-hbMX20oF.js";import{T as Te,n as Je,g as Ut}from"./github-uiOp6-cP.js";import{D as Na,c as Ca,g as Ea,s as Sa,a as Pa,b as $a,d as Ia,A as Ra,i as Aa,e as La}from"./codexAddEvals-Qz9YXTVy.js";import{P as Ue}from"./plus-BvN48Xkz.js";import{u as as}from"./index-C0YS4OFr.js";import{B as rs}from"./badge-BieMUBSb.js";import{G as Dt}from"./github-CVI7-Ls5.js";import{M as Fa}from"./index-tHVWANW1.js";import{r as Ta}from"./index-ClEBI70O.js";import{u as Ua}from"./useIntersectionObserver-DOCspj7m.js";import{S as Bt,s as Da}from"./savedPapersAuth-axHpepOL.js";import"./hover-card-BM8a6wEE.js";import"./popover-BOnBmrXi.js";import"./textarea-CpxVQZTZ.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 Da=Le("ArrowDown",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);/** + */const Ba=Le("ArrowDown",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Ba=Le("ArrowUp",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);/** + */const za=Le("ArrowUp",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. @@ -18,13 +18,13 @@ import{g as Le,n as Us,b as Wt,h as oe,k as Ds,r as m,j as e,l as me,m as he,o a * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const za=Le("History",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]]);/** + */const Ha=Le("History",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const ns=Le("Star",[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]]);function Ha(t){return t!=null&&t.can_directly_edit_catalog?"direct":"pending"}function Ma(t){return(t??[]).filter(s=>!!(s.dataset_slug&&s.task_slug))}function qa(t,s,a="https://paperswithcode.co"){return s.map(r=>{const n=encodeURIComponent(r.evaluation_id),d=`${a}/api/v1/papers/${encodeURIComponent(t)}/leaderboard-badge.svg?eval=${n}&live=1`,o=`${a}/api/v1/papers/${encodeURIComponent(t)}/leaderboard-badge-link?eval=${n}`;return`[![${`Papers with Code: ${r.best_rank===1?"SOTA":`#${r.best_rank}`} on ${r.dataset_name}`}](${d})](${o})`}).join(` -`)}function Oa(t,s=!0){return ne({queryKey:["evaluations","paper",t],queryFn:()=>{if(!t)throw new Error("Paper ID is required");return Ke.byPaper(t)},enabled:s&&!!t,staleTime:0,refetchOnMount:"always"})}const is=t=>t.replace(/v\d+$/,""),Ka={models:"https://huggingface.co/",datasets:"https://huggingface.co/datasets/",spaces:"https://huggingface.co/spaces/"},Ze=(t,s)=>{const a=(t[s]||[]).length;return a<100?{count:a,isLimited:!1}:{count:a,isLimited:!0}},et=(t,s)=>{const a=t[s];return Array.isArray(a)?a.map(r=>{if(typeof r=="string")return r;if(r&&typeof r=="object"){const n=r;return n.id||n.repoId||null}return null}).filter(r=>!!r).map(r=>`${Ka[s]}${r}`):[]},Ga=async t=>{try{return(await fetch(`https://huggingface.co/api/papers/${is(t)}`)).ok}catch{return!1}},Xa=async t=>{const s=is(t),[a,r]=await Promise.all([fetch(`https://huggingface.co/api/arxiv/${s}/repos`).then(async i=>i.ok?i.json():(console.warn(`Failed to fetch repos for arXiv:${s}, status: ${i.status}`),null)).catch(i=>(console.warn(`Failed to fetch repos for arXiv:${s}:`,i),null)),Ga(s)]);if(!a)return{models:0,datasets:0,spaces:0,modelUrls:[],datasetUrls:[],spaceUrls:[],isLimited:!1,paperExists:r};const n=Ze(a,"models"),d=Ze(a,"datasets"),o=Ze(a,"spaces");return{models:n.count,datasets:d.count,spaces:o.count,modelUrls:et(a,"models"),datasetUrls:et(a,"datasets"),spaceUrls:et(a,"spaces"),isLimited:n.isLimited||d.isLimited||o.isLimited,paperExists:r}},Qa=t=>ne({queryKey:["huggingface-repos",t],queryFn:()=>Xa(t),enabled:!!t,staleTime:10*60*1e3,retry:1});function Va(t,s){try{const a=new URL(t),r=a.pathname.replace(/\/$/,"").split("/").filter(Boolean).at(-1);return(r==null?void 0:r.replace(/[-_]+/g," "))||a.hostname.replace(/^www\./,"")}catch{return s}}function tt(t,s,a){return[...new Set([...t,...s??[]])].map(r=>({href:r,label:Va(r,a)}))}function st(t,s,a){if(a==null&&t.length===0&&!(s!=null&&s.length))return;const r=new Set([...t,...s??[]]);return Math.max(r.size,a??0)}function at(t){return t[0]??"https://huggingface.co"}function rt(t,s){return s[0]??t}function Wa(t){const s=`${t.title.slice(0,60)}${t.title.length>60?"…":""}`,a=`${t.authors[0]||""}${t.authors.length>1?" et al.":""}`,r=t.authors.join(" and "),n=(t.published||"").slice(0,4)||"—",d=(o,i)=>t.arxiv_id?`@article{${t.arxiv_id.replace(".","")}, + */const ns=Le("Star",[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]]);function Ma(t){return t!=null&&t.can_directly_edit_catalog?"direct":"pending"}function qa(t){return(t??[]).filter(s=>!!(s.dataset_slug&&s.task_slug))}function Oa(t,s,a="https://paperswithcode.co"){return s.map(r=>{const n=encodeURIComponent(r.evaluation_id),d=`${a}/api/v1/papers/${encodeURIComponent(t)}/leaderboard-badge.svg?eval=${n}&live=1`,o=`${a}/api/v1/papers/${encodeURIComponent(t)}/leaderboard-badge-link?eval=${n}`;return`[![${`Papers with Code: ${r.best_rank===1?"SOTA":`#${r.best_rank}`} on ${r.dataset_name}`}](${d})](${o})`}).join(` +`)}function Ka(t,s=!0){return ne({queryKey:["evaluations","paper",t],queryFn:()=>{if(!t)throw new Error("Paper ID is required");return Ke.byPaper(t)},enabled:s&&!!t,staleTime:0,refetchOnMount:"always"})}const is=t=>t.replace(/v\d+$/,""),Ga={models:"https://huggingface.co/",datasets:"https://huggingface.co/datasets/",spaces:"https://huggingface.co/spaces/"},Ze=(t,s)=>{const a=(t[s]||[]).length;return a<100?{count:a,isLimited:!1}:{count:a,isLimited:!0}},et=(t,s)=>{const a=t[s];return Array.isArray(a)?a.map(r=>{if(typeof r=="string")return r;if(r&&typeof r=="object"){const n=r;return n.id||n.repoId||null}return null}).filter(r=>!!r).map(r=>`${Ga[s]}${r}`):[]},Xa=async t=>{try{return(await fetch(`https://huggingface.co/api/papers/${is(t)}`)).ok}catch{return!1}},Qa=async t=>{const s=is(t),[a,r]=await Promise.all([fetch(`https://huggingface.co/api/arxiv/${s}/repos`).then(async i=>i.ok?i.json():(console.warn(`Failed to fetch repos for arXiv:${s}, status: ${i.status}`),null)).catch(i=>(console.warn(`Failed to fetch repos for arXiv:${s}:`,i),null)),Xa(s)]);if(!a)return{models:0,datasets:0,spaces:0,modelUrls:[],datasetUrls:[],spaceUrls:[],isLimited:!1,paperExists:r};const n=Ze(a,"models"),d=Ze(a,"datasets"),o=Ze(a,"spaces");return{models:n.count,datasets:d.count,spaces:o.count,modelUrls:et(a,"models"),datasetUrls:et(a,"datasets"),spaceUrls:et(a,"spaces"),isLimited:n.isLimited||d.isLimited||o.isLimited,paperExists:r}},Va=t=>ne({queryKey:["huggingface-repos",t],queryFn:()=>Qa(t),enabled:!!t,staleTime:10*60*1e3,retry:1});function Wa(t,s){try{const a=new URL(t),r=a.pathname.replace(/\/$/,"").split("/").filter(Boolean).at(-1);return(r==null?void 0:r.replace(/[-_]+/g," "))||a.hostname.replace(/^www\./,"")}catch{return s}}function tt(t,s,a){return[...new Set([...t,...s??[]])].map(r=>({href:r,label:Wa(r,a)}))}function st(t,s,a){if(a==null&&t.length===0&&!(s!=null&&s.length))return;const r=new Set([...t,...s??[]]);return Math.max(r.size,a??0)}function at(t){return t[0]??"https://huggingface.co"}function rt(t,s){return s[0]??t}function Ya(t){const s=`${t.title.slice(0,60)}${t.title.length>60?"…":""}`,a=`${t.authors[0]||""}${t.authors.length>1?" et al.":""}`,r=t.authors.join(" and "),n=(t.published||"").slice(0,4)||"—",d=(o,i)=>t.arxiv_id?`@article{${t.arxiv_id.replace(".","")}, title={{${o}}}, author=${i}, year={{${n}}}, @@ -35,5 +35,5 @@ import{g as Le,n as Us,b as Wt,h as oe,k as Ds,r as m,j as e,l as me,m as he,o a author=${i}, year={{${n}}}, url={{${t.source_url||t.url_abs||""}}} -}`;return{citationDisplay:d(s,`{{${a}}}`),citationCopy:d(t.title,`{${r}}`)}}function Ja(t,s,a){var g,b,w,j;const r={models:t.hf_models??[],datasets:t.hf_datasets??[],spaces:t.hf_spaces??[]},n={models:tt(r.models,s==null?void 0:s.modelUrls,"Model"),datasets:tt(r.datasets,s==null?void 0:s.datasetUrls,"Dataset"),spaces:tt(r.spaces,s==null?void 0:s.spaceUrls,"Space")},d={models:n.models.map(({href:v})=>v),datasets:n.datasets.map(({href:v})=>v),spaces:n.spaces.map(({href:v})=>v)},o=((g=t.arxiv_id)==null?void 0:g.replace(/v\d+$/,""))??null,i=t.arxiv_id?{isLoading:a,paperHref:`https://huggingface.co/papers/${o}`,rows:[{label:"Models",href:rt(`https://huggingface.co/models?other=arxiv:${t.arxiv_id}`,r.models),count:st(r.models,s==null?void 0:s.modelUrls,s==null?void 0:s.models),isLimited:s==null?void 0:s.isLimited,links:n.models},{label:"Datasets",href:rt(`https://huggingface.co/datasets?other=arxiv:${t.arxiv_id}`,r.datasets),count:st(r.datasets,s==null?void 0:s.datasetUrls,s==null?void 0:s.datasets),isLimited:s==null?void 0:s.isLimited,links:n.datasets},{label:"Spaces",href:rt(`https://huggingface.co/papers/${o}`,r.spaces),count:st(r.spaces,s==null?void 0:s.spaceUrls,s==null?void 0:s.spaces),isLimited:s==null?void 0:s.isLimited,links:n.spaces}],footer:`Cite arxiv.org/abs/${o} in a HF README to link it here.`}:{isLoading:!1,paperHref:null,rows:[{label:"Models",href:at(r.models),count:r.models.length,links:n.models},{label:"Datasets",href:at(r.datasets),count:r.datasets.length,links:n.datasets},{label:"Spaces",href:at(r.spaces),count:r.spaces.length,links:n.spaces}],footer:null},c=(t.methods??[]).filter(({source_paper_id:v})=>v===t.id),p=t.introduced_benchmarks??[],f=t.introduced_frameworks??[],l=[c.length&&(c.length===1?"this method":"these methods"),p.length&&(p.length===1?"this benchmark":"these benchmarks"),f.length&&(f.length===1?"this framework":"these frameworks")].filter(v=>!!v);return{...Wa(t),allHfArtifactUrls:d,authorEntries:t.authors.map((v,C)=>{var P,I,S,_,u,x;return{name:v,id:((I=(P=t.author_links)==null?void 0:P[C])==null?void 0:I.id)??null,hf_username:((_=(S=t.author_links)==null?void 0:S[C])==null?void 0:_.hf_username)??null,hf_avatar_url:((x=(u=t.author_links)==null?void 0:u[C])==null?void 0:x.hf_avatar_url)??null}}),copyableRanks:Ma(t.leaderboard_ranks),hasIntroducedItems:l.length>0,hasLineageItems:!!((b=t.predecessor_papers)!=null&&b.length||(w=t.successor_papers)!=null&&w.length),hfArtifactViewer:i,hfPaperExists:!!(s!=null&&s.paperExists),introducedBenchmarks:p,introducedFrameworks:f,introducedMethods:c,introducedSummary:l.join(" and "),numPages:t.num_pages||null,paperSourceLabel:t.arxiv_id?`arXiv:${t.arxiv_id}`:"External resource",predecessorPapers:t.predecessor_papers??[],projectPages:((j=t.project_pages)==null?void 0:j.filter(({url:v})=>v).map(v=>({...v,safeHref:we(v.url)})))??[],repoSummary:ha(t.repositories),safeAbstractUrl:we(t.url_abs),safeConferenceUrl:we(t.conference_url_abs),safePdfUrl:we(t.url_pdf),sourceActionLabel:t.source==="external"?"Source page":"arXiv page",successorPapers:t.successor_papers??[]}}const Ya=["tldr","abstract","tasks","methods","results"];function Za(t){if(!t)return{section:null,resultsTaskSlug:null};const[s,a]=t.split("?",2);if(!Ya.includes(s))return{section:null,resultsTaskSlug:null};const r=s;return r!=="results"||!a?{section:r,resultsTaskSlug:null}:{section:r,resultsTaskSlug:new URLSearchParams(a).get("task")}}const os=t=>`results-task-${t}`,er=t=>`#results?task=${encodeURIComponent(t)}`;function tr(t,s){return t&&!!s}function sr({direct:t,paperId:s,refetchEvaluations:a,refetchPaper:r}){r(),a(),!(!t||!s)&&(W.primeCurationState(s,!0).catch(()=>{}),Ke.primeCurationState(s,!0).catch(()=>{}))}function ar(t,s){const a=t?Us(t):"",r=Wt(),{toast:n}=oe(),{preferences:d}=Ds(),o=da(a,!!a),i=o.data,[c,p]=m.useState(!1);m.useEffect(()=>{!t||t===a||r(`/paper/${a}${window.location.search}${window.location.hash}`,{replace:!0})},[a,r,t]),m.useEffect(()=>{if(i!=null&&i.title)return document.title=ua(i.title),()=>{document.title=ma}},[i==null?void 0:i.title]),m.useEffect(()=>{if(p(!1),!(i!=null&&i.id))return;const S=window.setTimeout(()=>p(!0),0);return()=>window.clearTimeout(S)},[i==null?void 0:i.id]);const f=tr(c,i==null?void 0:i.id),l=Qa(c?i==null?void 0:i.arxiv_id:void 0),g=Oa(i==null?void 0:i.id,f),b=ne({queryKey:[...ye.feeds.versions,i==null?void 0:i.arxiv_id],queryFn:()=>W.versions(i.arxiv_id.replace(/v\d+$/,"")),enabled:f&&!!(i!=null&&i.arxiv_id),staleTime:10*60*1e3}),w=ne({queryKey:[...ye.feeds.related,i==null?void 0:i.id],queryFn:()=>W.related(i.arxiv_id||i.id,4),enabled:f,staleTime:10*60*1e3});m.useEffect(()=>{const S=()=>{sr({direct:s==="direct",paperId:i==null?void 0:i.id,refetchEvaluations:g.refetch,refetchPaper:o.refetch}),n({title:"This section changed",description:"The latest state has been reloaded. Review your changes before submitting again.",variant:"destructive"})};return window.addEventListener("pwc:catalog-conflict",S),()=>window.removeEventListener("pwc:catalog-conflict",S)},[s,g.refetch,i==null?void 0:i.id,o.refetch,n]);const j=m.useMemo(()=>{const S=g.data;return!S||!d.hide_closed_source_evals?S:S.filter(_=>_.is_open!==!1)},[g.data,d.hide_closed_source_evals]),v=m.useMemo(()=>{if(!j)return[];const S=new Map;for(const _ of j){const u=S.get(_.task_id);u?u.rows.push(_):S.set(_.task_id,{taskId:_.task_id,taskName:_.task_name||"—",taskSlug:_.task_slug,rows:[_]})}return[...S.values()]},[j]),C=m.useMemo(()=>v.map(({taskSlug:S})=>S??"").join("|"),[v]),P=m.useMemo(()=>i?Ja(i,l.data,l.isLoading):null,[l.data,l.isLoading,i]),I=m.useRef(!1);return m.useEffect(()=>{I.current=!1},[a]),m.useEffect(()=>{let S=0;const _=(x=!1,E=!1)=>{const{section:F,resultsTaskSlug:M}=Za(window.location.hash.slice(1));if(!F||!i||F==="tldr"&&!i.tldr||F==="results"&&(!f||g.isLoading)||!x&&I.current)return;let O=F==="results"&&M?document.getElementById(os(M)):document.getElementById(F);if(!O&&F==="results"&&M){if(v.some(({taskSlug:K})=>K===M))return;O=document.getElementById("results")}O&&(S=window.requestAnimationFrame(()=>{I.current=!0,O.scrollIntoView({block:"start",behavior:E?"smooth":"auto"})}))};_();const u=()=>{I.current=!1,_(!0,!0)};return window.addEventListener("hashchange",u),()=>{window.removeEventListener("hashchange",u),S&&window.cancelAnimationFrame(S)}},[v,g.isLoading,i,C,f]),{arxivId:a,evaluations:g.data,evaluationsByTask:v,evaluationsLoading:g.isLoading,hfLoading:l.isLoading,hfRepos:l.data,paper:i,paperError:o.error,paperLoading:o.isLoading,presentation:P,refetchEvaluations:g.refetch,refetchPaper:o.refetch,relatedQuery:w,versions:b.data??[],visibleEvaluations:j}}const rr={tasks:"tasks",methods:"methods",evaluations:"results",repositories:"repositories",project_pages:"project-pages",hf_artifacts:"hf-artifacts",organizations:"organizations",source_url:"source-url",x_threads:"x-threads"};function nr(t){return rr[t]??null}function ir(){const[t,s]=m.useState(null),a=m.useCallback(n=>{s(n)},[]),r=m.useCallback((n,d)=>{s(o=>d?n:o===n?null:o)},[]);return{activeEditor:t,openEditor:a,setEditorOpen:r}}function or({paperId:t,isAdmin:s}){var g;const[a,r]=m.useState(!1),[n,d]=m.useState(!1),[o,i]=m.useState(!1),[c,p]=m.useState(()=>window.location.hash.startsWith("#edit")),f=ga({queryKey:["paper-edit-history",t],queryFn:({pageParam:b})=>ja.history(t,b),initialPageParam:void 0,getNextPageParam:b=>b.next_cursor??void 0,enabled:s&&c}),l=`Help me edit https://paperswithcode.co/paper/${t} using the public pwc CLI from https://github.com/huggingface/pwc-cli. Install or update the CLI following its README, then run pwc skills add to load its instructions. Run pwc auth login --paper ${t}; I will authorize this paper in my browser. Export with pwc paper edit export ${t} --output edits.json, make explicit operations for the corrections I request, and preview before submitting. For organization changes, use an organizations operation with payload {"organization_ids": [existing organization IDs]}; this replaces the paper’s organization links and publishes directly. Use existing organizations, benchmark and metric definitions, preserve unrelated entries, and cite source URLs where available. Never print or copy credentials. Ask me what to change if I have not specified it.`;return e.jsxs(e.Fragment,{children:[e.jsxs("button",{type:"button",className:"action-btn",title:"Edit this paper page with Claude, Codex, Cursor, or OpenCode",onClick:()=>{r(!1),d(!1),i(!0)},children:["Edit with your agent",e.jsx(xa,{})]}),s&&e.jsxs("button",{type:"button",className:"action-btn",onClick:()=>p(!0),children:[e.jsx(za,{size:12})," View edit history"]}),e.jsx(ee,{open:o,onOpenChange:i,children:e.jsxs(te,{className:"max-w-2xl",children:[e.jsxs(se,{children:[e.jsx(ae,{children:"Edit this paper with your agent"}),e.jsx(re,{children:"Spotted a missing code link, a wrong task, or a missing benchmark result? Your favorite coding agent can fix it for you."})]}),e.jsx(ba,{}),e.jsxs("ol",{className:"list-decimal space-y-1 pl-5 text-sm text-muted-foreground",children:[e.jsx("li",{children:"Copy the prompt below."}),e.jsx("li",{children:"Paste it into Claude Code, Codex, Cursor, OpenCode, or another coding agent, and tell it what to change."}),e.jsxs("li",{children:["The agent installs the ",e.jsx("a",{className:"underline",href:"https://github.com/huggingface/pwc-cli",target:"_blank",rel:"noreferrer",children:"pwc CLI"}),", asks you to authorize this paper with your Hugging Face account, and previews the edits before submitting them."]})]}),e.jsx("textarea",{"aria-label":"Paper edit prompt",readOnly:!0,value:l,className:"h-48 w-full resize-none rounded border bg-muted/40 p-3 font-mono text-xs",onFocus:b=>b.currentTarget.select()}),n&&e.jsx("p",{role:"alert",className:"text-sm text-destructive",children:"Could not copy automatically. Select the prompt above and copy it manually."}),e.jsxs(L,{className:"justify-self-end",onClick:async()=>{try{await navigator.clipboard.writeText(l),r(!0),d(!1)}catch{d(!0)}},children:[a?e.jsx(me,{size:14}):e.jsx(va,{size:14}),a?"Prompt copied":"Copy prompt"]})]})}),e.jsx(ee,{open:s&&c,onOpenChange:p,children:e.jsxs(te,{className:"max-h-[85vh] max-w-3xl overflow-y-auto",id:"edit-history",children:[e.jsxs(se,{children:[e.jsx(ae,{children:"Paper edit history"}),e.jsx(re,{children:"Published changes and their contributors."})]}),e.jsxs("div",{className:"space-y-3",children:[f.isLoading&&e.jsx("p",{children:"Loading edit history…"}),f.error&&e.jsx("p",{role:"alert",children:"Could not load edit history."}),f.data&&!f.data.pages[0].events.length&&e.jsx("p",{className:"text-sm text-muted-foreground",children:"No edits have been recorded here yet."}),(g=f.data)==null?void 0:g.pages.flatMap(b=>b.events).map(b=>e.jsxs("article",{id:`edit-${b.id}`,className:"rounded border p-3",children:[e.jsxs("p",{className:"text-sm",children:[b.actor_username?e.jsxs("a",{className:"underline",href:`https://huggingface.co/${encodeURIComponent(b.actor_username)}`,children:["@",b.actor_username]}):"Catalog administrator"," · ",new Date(b.created_at).toLocaleString()," · ",b.operation==="rollback"?"Reverted an edit":"Updated this paper"]}),e.jsxs("details",{children:[e.jsx("summary",{className:"cursor-pointer text-sm",children:"View changes"}),e.jsx("pre",{className:"max-h-80 overflow-auto whitespace-pre-wrap text-xs",children:JSON.stringify({before:b.before,after:b.after},null,2)})]})]},b.id)),f.hasNextPage&&e.jsx(L,{variant:"outline",disabled:f.isFetchingNextPage,onClick:()=>void f.fetchNextPage(),children:"Load older edits"})]})]})})]})}function lr(t){return t.map(s=>{const a=s.best_metric||Object.keys(s.metrics)[0]||"";return{id:s.id,task_id:s.task_id,dataset_id:s.dataset_id,model_name:s.model_name||"",harness:s.harness||"",metric_name:a,metric_value:String(s.metrics[a]??""),original_metrics:{...s.metrics},original_metric_name:a,best_rank:s.best_rank!=null?String(s.best_rank):"",num_parameters:s.num_parameters!=null?String(s.num_parameters):"",hf_model_url:s.hf_model_url||"",is_open:s.is_open!==!1,operation:"unchanged"}})}function cr(t,s){const a={...t.original_metrics},r=a[t.original_metric_name];return t.original_metric_name!==s&&delete a[t.original_metric_name],a[s]=r!=null&&t.metric_value===String(r)?r:t.metric_value,a}function dr(t){const s=t==null?void 0:t.trim();return s?Number(s):void 0}function Ht(t){const s=t.trim();return s?Number(s):null}function nt(t){return t.trim()||null}function it(t){return!!(t&&/^\d+$/.test(t.trim())&&Number.isSafeInteger(Number(t))&&Number(t)>0)}function ls(t){const s=[];return t.forEach((a,r)=>{var o;if(!a.operation||a.operation==="unchanged")return;const n=(i,c)=>{s.push({rowIndex:r,field:i,message:c})};if(a.operation!=="create"&&!it(a.id)&&n("id","This result has no valid evaluation ID. Reload the paper before editing it."),a.operation==="delete")return;it(a.task_id)||n("task_id","Select a valid task."),it(a.dataset_id)||n("dataset_id","Select a valid dataset.");const d=a.metric_name.trim();d?d!==a.original_metric_name&&Object.prototype.hasOwnProperty.call(a.original_metrics,d)&&n("metric_name",`Cannot rename a metric to "${d}": this evaluation already has that score.`):n("metric_name","Select a metric."),(o=a.best_rank)!=null&&o.trim()&&!Number.isSafeInteger(Number(a.best_rank))&&n("best_rank","Enter a whole-number rank."),a.num_parameters.trim()&&(!Number.isSafeInteger(Number(a.num_parameters))||Number(a.num_parameters)<0)&&n("num_parameters","Enter a non-negative whole-number parameter count."),a.metric_value.trim()||n("metric_value","Enter a metric value.")}),s}function ur(t,s){const a=ls(t);return a.length?{valid:!1,errors:a}:{valid:!0,operations:mr(t,s)}}function mr(t,s){const a=[];for(const r of t){if(r.operation==="delete"){a.push({kind:"delete",evaluationId:Number(r.id)});continue}if(r.operation!=="create"&&r.operation!=="update")continue;const n=r.metric_name.trim(),d=s(r.task_id,r.dataset_id),o={task_id:Number(r.task_id),dataset_id:Number(r.dataset_id),metrics:cr(r,n),best_metric:n,is_open:r.is_open},i=r.model_name.trim(),c=dr(r.best_rank);if(r.operation==="create"){const p=Ht(r.num_parameters),f=nt(r.hf_model_url);a.push({kind:"create",data:{...o,...i?{model_name:i}:{},...d&&r.harness.trim()?{harness:r.harness.trim()}:{},...c!==void 0?{best_rank:c}:{},...p!==null?{num_parameters:p}:{},...f!==null?{hf_model_url:f}:{}}});continue}a.push({kind:"update",evaluationId:Number(r.id),data:{...o,...i?{model_name:i}:{},harness:d?nt(r.harness):null,...c!==void 0?{best_rank:c}:{},num_parameters:Ht(r.num_parameters),hf_model_url:nt(r.hf_model_url)}})}return a}function hr(t,s){return s.map(a=>a.kind==="delete"?{operation:"delete",evaluation_id:a.evaluationId}:{operation:a.kind,...a.kind==="update"?{evaluation_id:a.evaluationId}:{},payload:a.kind==="create"?{paper_id:t,...a.data}:a.data})}function pr(t){return t.map(s=>s.kind==="delete"?{op:"delete",evaluation_id:s.evaluationId}:s.kind==="update"?{op:"update",evaluation_id:s.evaluationId,data:s.data}:{op:"create",data:s.data})}function ge({isAuthor:t=!1}){const s=typeof window<"u"&&window.location.hostname==="staging.paperswithcode.co";return e.jsxs("div",{className:"rounded-md border border-amber-200 bg-amber-50 px-3 py-2 text-xs text-amber-900 dark:border-amber-900 dark:bg-amber-950/40 dark:text-amber-100",children:[e.jsx("p",{className:"font-medium",children:s?"Test-only: this change stays on staging.":"Your changes will be reviewed by an admin."}),e.jsx("p",{className:"mt-1 leading-snug",children:s?"This exercises staging-local pending behavior and is not queued for production review.":t?"We can see this paper is yours. While we're in early access an admin still reviews each edit; this will become automatic for authors soon.":"Submissions are queued for review and don't change the paper page until an admin approves them."})]})}const ot=100;function fr(t){return(t??[]).some(s=>s.slug==="coding-agents"||s.name.trim().toLowerCase()==="coding agents")}function gr(t){const s=new Map;return t.forEach(a=>{a.task_id&&a.task_name&&s.set(a.task_id,{id:a.task_id,name:a.task_name,slug:a.task_slug,level:0})}),s}function xr(t){const s=new Map;return t.forEach(a=>{a.dataset_id&&a.dataset_name&&s.set(a.dataset_id,{id:a.dataset_id,name:a.dataset_name,slug:a.dataset_slug})}),s}function Mt(t,s){return`${t}:${s}`}function br({open:t,onOpenChange:s,paperId:a,arxivId:r,initialEvaluations:n,paperTasks:d,onSuccess:o,submitMode:i="direct",isAdmin:c=!1,isAuthor:p=!1}){const f=m.useId(),l=fr(d),[g,b]=m.useState([]),[w,j]=m.useState(!1),v=w?ls(g):[],[C,P]=m.useState(null),[I,S]=m.useState(new Map),[_,u]=m.useState(new Map),x=he(),{toast:E}=oe(),F=m.useRef(!1),M=m.useRef(!1);m.useEffect(()=>{if(!t){j(!1),F.current=!1,M.current=!1;return}F.current||M.current||n.length!==0&&(F.current=!0,b(lr(n)),S(gr(n)),u(xr(n)))},[t,n]);const O=m.useMemo(()=>Array.from(new Set(g.map(y=>y.task_id).filter(y=>y&&y!==""))),[g]),K=m.useMemo(()=>{const y=new Set;return g.forEach(k=>{k.task_id&&k.dataset_id&&y.add(Mt(k.task_id,k.dataset_id))}),Array.from(y)},[g]),G=ne({queryKey:["datasets-by-tasks-for-eval-edit",O,t],queryFn:async()=>{const y={};return await Promise.all(O.map(async k=>{try{const A=await _e.listDatasets({task_id:parseInt(k),page_size:ot});y[k]=A.results}catch(A){console.error(`Error fetching datasets for task ${k}:`,A),y[k]=[]}})),y},enabled:t&&O.length>0});m.useEffect(()=>{G.data&&u(y=>{const k=new Map(y);return Object.values(G.data).forEach(A=>{A.forEach(D=>{k.set(D.id,D)})}),k})},[G.data]);const h=ne({queryKey:["leaderboard-metrics-for-eval-edit",K,t],queryFn:async()=>{const y={};return await Promise.all(K.map(async k=>{const[A,D]=k.split(":");try{y[k]=await _e.leaderboardMetrics(D,A)}catch(Q){console.error(`Error fetching metrics for leaderboard ${k}:`,Q),y[k]=[]}})),y},enabled:t&&K.length>0}),$=async y=>{const k=await _e.listTasks({page_size:ot,...y?{q:y}:{}});return S(A=>{const D=new Map(A);return k.results.forEach(Q=>D.set(Q.id,Q)),D}),k.results.map(A=>{var D;return{value:A.id,label:A.name,description:(D=A.description)==null?void 0:D.slice(0,100)}})},R=y=>async k=>{const A=await _e.listDatasets({task_id:parseInt(y),page_size:ot,...k?{q:k}:{}});return u(D=>{const Q=new Map(D);return A.results.forEach(X=>Q.set(X.id,X)),Q}),A.results.map(D=>({value:D.id,label:D.name,description:D.full_name}))},T=(y,k)=>{if(!y||!k)return!1;const A=_.get(k);return!!(A!=null&&A.supports_harness)},U=(y,k,A)=>{var X;if(!y||!k)return[];const Q=(((X=h.data)==null?void 0:X[Mt(y,k)])||[]).map(B=>({value:B.metric_name,label:B.metric_name,description:B.metric_direction==="higher_is_better"?"Higher is better":"Lower is better"}));return A&&!Q.some(B=>B.value===A)&&Q.unshift({value:A,label:`${A} (legacy)`}),Q},z=ce({mutationFn:async({paperId:y,canonical:k})=>{if(!c&&i==="direct"&&k.length>50)throw new Error("Contributor evaluation batches are limited to 50 operations; contact an admin.");const A=Number.parseInt(y,10);if(i==="pending")await pe.submit({paper_id:A,edit_type:"evaluations",proposed_payload:{operations:pr(k)}});else{const D=wa(y,n,k,r);await Ke.batch(A,hr(A,k)),_a(x,D)}},onSuccess:()=>{if(i==="pending"){E({title:"Edit submitted for review",description:"Thanks! An admin will review your proposed evaluation changes shortly."}),o==null||o(),s(!1);return}o==null||o(),s(!1)},onError:y=>{const k=fe(y,i==="pending"?"Failed to submit your edit. Please try again.":"Failed to update evaluations.");E({title:i==="pending"?"Could not submit edit":"Could not save evaluations",description:k,variant:"destructive"})}}),H=()=>{M.current=!0,b([...g,{task_id:"",dataset_id:"",model_name:"",harness:"",metric_name:"",metric_value:"",original_metrics:{},original_metric_name:"",best_rank:"",num_parameters:"",hf_model_url:"",is_open:!0,operation:"create"}])},Y=y=>{if(M.current=!0,g[y].id){if(!window.confirm("Delete this evaluation? You will be asked to sign in again if your session is older than 15 minutes."))return;b(g.map((A,D)=>D===y?{...A,operation:"delete"}:A))}else b(g.filter((A,D)=>D!==y))},Z=(y,k,A)=>{M.current=!0,b(g.map((D,Q)=>{if(Q!==y||D[k]===A)return D;const X={...D,[k]:A};return(k==="task_id"||k==="dataset_id")&&(X.original_metrics={},X.original_metric_name="",X.metric_value="",X.best_rank=""),k==="task_id"&&(X.dataset_id="",X.metric_name="",X.harness=""),k==="dataset_id"&&(X.metric_name="",A&&!T(X.task_id,A)&&(X.harness="")),D.operation==="unchanged"&&(X.operation="update"),X}))},Ve=(y,k)=>{M.current=!0,b(g.map((A,D)=>{if(D!==y)return A;const Q={...A,is_open:k};return A.operation==="unchanged"&&(Q.operation="update"),Q}))},De=()=>{j(!0);const y=ur(g,T);if(y.valid){if(y.operations.length===0){E({title:"No changes to submit",description:"Your evaluation list matches the existing data."});return}z.mutate({paperId:a,canonical:y.operations})}},ve=(y,k)=>{const A=v.find(D=>D.rowIndex===y&&D.field===k);return A?e.jsx("p",{id:`${f}-${y}-${k}-error`,className:"text-xs text-destructive",children:A.message}):null};return e.jsxs(ee,{open:t,onOpenChange:s,children:[e.jsxs(te,{className:"max-w-6xl max-h-[800px]",children:[e.jsxs(se,{children:[e.jsx(ae,{children:"Edit Evaluation Results"}),e.jsx(re,{children:"Add, edit, or remove evaluation results for this paper. Each row represents a benchmark result."})]}),i==="pending"&&e.jsx(ge,{isAuthor:p}),v.length>0&&e.jsxs("div",{role:"alert",className:"text-sm text-destructive",children:["Fix the following errors before saving. No changes have been submitted.",e.jsx("ul",{children:v.map(y=>e.jsxs("li",{children:["Row ",g.slice(0,y.rowIndex+1).filter(k=>k.operation!=="delete").length,": ",y.message]},`${y.rowIndex}-${y.field}`))})]}),e.jsxs("div",{className:"py-4 overflow-y-auto max-h-[600px]",children:[g.filter(y=>y.operation!=="delete").length>0?e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full border-collapse",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-border",children:[e.jsx("th",{className:"text-left py-2 px-2 font-medium text-sm min-w-[180px]",children:"Task"}),e.jsx("th",{className:"text-left py-2 px-2 font-medium text-sm min-w-[180px]",children:"Dataset"}),e.jsx("th",{className:`text-left py-2 px-2 font-medium text-sm ${l?"min-w-[140px]":"min-w-[240px]"}`,children:"Model"}),l&&e.jsx("th",{className:"text-left py-2 px-2 font-medium text-sm min-w-[140px]",children:"Harness"}),e.jsx("th",{className:"text-left py-2 px-2 font-medium text-sm min-w-[140px]",children:"Metric"}),e.jsx("th",{className:"text-left py-2 px-2 font-medium text-sm",children:"Value"}),e.jsx("th",{className:"text-left py-2 px-2 font-medium text-sm",children:"Parameters"}),e.jsx("th",{className:"text-left py-2 px-2 font-medium text-sm min-w-[200px]",children:"HF model URL"}),e.jsx("th",{className:"text-left py-2 px-2 font-medium text-sm w-20",children:"Open source"}),e.jsx("th",{className:"text-left py-2 px-2 font-medium text-sm w-16",children:"Action"})]})}),e.jsx("tbody",{children:g.map((y,k)=>{if(y.operation==="delete")return null;const A=I.get(y.task_id),D=_.get(y.dataset_id),Q=U(y.task_id,y.dataset_id,y.metric_name),X=!!(y.task_id&&y.dataset_id)&&h.isFetching;return e.jsxs("tr",{className:"border-b border-border",children:[e.jsx("td",{className:"py-2 px-2",children:e.jsxs("div",{role:"group","aria-label":"Task","aria-describedby":`${f}-${k}-task_id-error`,children:[e.jsx(Tt,{value:y.task_id,onChange:B=>Z(k,"task_id",B),placeholder:"Select task",searchPlaceholder:"Search tasks...",emptyMessage:"No tasks found.",selectedOption:A?{value:A.id,label:A.name}:null,queryKey:["eval-edit-task-search"],queryFn:$,enabled:t}),ve(k,"task_id")]})}),e.jsx("td",{className:"py-2 px-2",children:e.jsxs("div",{role:"group","aria-label":"Dataset","aria-describedby":`${f}-${k}-dataset_id-error`,children:[e.jsx(Tt,{value:y.dataset_id,onChange:B=>Z(k,"dataset_id",B),placeholder:y.task_id?"Select dataset":"Select task first",searchPlaceholder:"Search datasets...",emptyMessage:y.task_id?"No datasets found for this task.":"Select a task first.",disabled:!y.task_id,selectedOption:D?{value:D.id,label:D.name}:null,queryKey:["eval-edit-dataset-search",y.task_id],queryFn:R(y.task_id),enabled:t&&!!y.task_id}),ve(k,"dataset_id")]})}),e.jsx("td",{className:"py-2 px-2",children:e.jsx(V,{type:"text",className:"w-full text-sm",placeholder:"Model name",value:y.model_name,onChange:B=>Z(k,"model_name",B.target.value)})}),l&&e.jsx("td",{className:"py-2 px-2",children:T(y.task_id,y.dataset_id)?e.jsx(V,{type:"text",className:"w-full text-sm",placeholder:"Claude Code, Terminus, ...",value:y.harness,onChange:B=>Z(k,"harness",B.target.value)}):e.jsx("span",{className:"text-xs text-muted-foreground",children:"Not supported"})}),e.jsxs("td",{className:"py-2 px-2",children:[!y.task_id||!y.dataset_id?e.jsx("span",{className:"text-xs text-muted-foreground",children:"Select task + dataset"}):X?e.jsxs("span",{className:"inline-flex items-center text-xs text-muted-foreground",children:[e.jsx(ie,{className:"mr-1 h-3 w-3 animate-spin"}),"Loading metrics..."]}):Q.length>0?e.jsxs("select",{className:"w-full rounded-md border border-border bg-background px-2 py-1 text-sm",id:`${f}-${k}-metric_name`,"aria-invalid":v.some(B=>B.rowIndex===k&&B.field==="metric_name"),"aria-describedby":`${f}-${k}-metric_name-error`,value:y.metric_name,onChange:B=>Z(k,"metric_name",B.target.value),children:[e.jsx("option",{value:"",children:"Select metric"}),Q.map(B=>e.jsx("option",{value:B.value,children:B.label},B.value))]}):e.jsx("span",{className:"text-xs text-muted-foreground",children:"No configured metrics"}),ve(k,"metric_name")]}),e.jsxs("td",{className:"py-2 px-2",children:[e.jsx(V,{type:"text",className:"w-full text-sm",placeholder:"44.9",id:`${f}-${k}-metric_value`,"aria-invalid":v.some(B=>B.rowIndex===k&&B.field==="metric_value"),"aria-describedby":`${f}-${k}-metric_value-error`,value:y.metric_value,onChange:B=>Z(k,"metric_value",B.target.value)}),ve(k,"metric_value")]}),e.jsxs("td",{className:"py-2 px-2",children:[e.jsx(V,{type:"number",min:0,step:1,className:"w-full text-sm",placeholder:"e.g. 7000000000",id:`${f}-${k}-num_parameters`,"aria-invalid":v.some(B=>B.rowIndex===k&&B.field==="num_parameters"),"aria-describedby":`${f}-${k}-num_parameters-error`,value:y.num_parameters,onChange:B=>Z(k,"num_parameters",B.target.value),title:"Raw model parameter count (e.g. 7000000000 for a 7B model). Leave blank if unknown."}),ve(k,"num_parameters")]}),e.jsx("td",{className:"py-2 px-2",children:e.jsx(V,{type:"url",className:"w-full text-sm",placeholder:"https://huggingface.co/org/model",value:y.hf_model_url,onChange:B=>Z(k,"hf_model_url",B.target.value),title:"Hugging Face model page for this row (must start with https://huggingface.co/). Leave blank if none."})}),e.jsx("td",{className:"py-2 px-2 text-center",children:e.jsx("input",{type:"checkbox",className:"h-4 w-4 align-middle",checked:y.is_open,onChange:B=>Ve(k,B.target.checked),title:"Whether the evaluated model is open-source. Uncheck for closed-source models."})}),e.jsx("td",{className:"py-2 px-2",children:e.jsx(L,{variant:"ghost",size:"sm",onClick:()=>Y(k),className:"h-8 w-8 p-0 text-destructive hover:text-destructive",title:y.id&&!c?"Only administrators can delete published results":"Remove row",disabled:!!y.id&&!c,children:e.jsx(Te,{className:"w-4 h-4"})})})]},k)})})]})}):e.jsxs("div",{className:"text-center py-8 text-muted-foreground",children:[e.jsx(Na,{className:"w-12 h-12 mx-auto mb-3 opacity-30"}),e.jsx("p",{children:"No evaluation results yet"}),e.jsx("p",{className:"text-sm mt-2",children:'Click "Add Row" below to add a new evaluation'})]}),e.jsx("div",{className:"mt-4",children:e.jsxs(L,{variant:"outline",size:"sm",onClick:H,className:"flex items-center space-x-2",children:[e.jsx(Ue,{className:"w-4 h-4"}),e.jsx("span",{children:"Add Row"})]})})]}),e.jsxs(le,{children:[e.jsxs("div",{className:"flex flex-wrap gap-2 sm:mr-auto",children:[e.jsx(L,{variant:"ghost",onClick:()=>P("benchmark"),children:"Suggest a new benchmark"}),e.jsx(L,{variant:"ghost",onClick:()=>P("metric"),children:"Suggest a new metric"})]}),e.jsx(L,{variant:"outline",onClick:()=>s(!1),children:"Cancel"}),e.jsx(L,{onClick:De,disabled:z.isPending,children:z.isPending?e.jsxs(e.Fragment,{children:[e.jsx(ie,{className:"w-4 h-4 mr-2 animate-spin"}),i==="pending"?"Submitting...":"Saving..."]}):e.jsxs(e.Fragment,{children:[e.jsx(me,{className:"w-4 h-4 mr-2"}),i==="pending"?"Submit for review":"Save Changes"]})})]})]}),e.jsx(wt,{open:C!==null,onOpenChange:y=>{y||P(null)},paperId:a,kind:C??"benchmark"})]})}const lt=[{key:"hf_models",label:"Models",placeholder:"https://huggingface.co/org/model"},{key:"hf_datasets",label:"Datasets",placeholder:"https://huggingface.co/datasets/org/data"},{key:"hf_spaces",label:"Spaces",placeholder:"https://huggingface.co/spaces/org/demo"}];function qt(t){return t.map(s=>s.trim()).filter(Boolean)}function ct(t,s){const a=qt(t).sort(),r=qt(s).sort();return a.length!==r.length?!1:a.every((n,d)=>n===r[d])}function jr(t,s){return ct(t.hf_models,s.hf_models)&&ct(t.hf_datasets,s.hf_datasets)&&ct(t.hf_spaces,s.hf_spaces)}function vr({open:t,onOpenChange:s,paperId:a,arxivId:r,initialArtifacts:n,onSuccess:d,submitMode:o="direct",isAuthor:i=!1}){const[c,p]=m.useState(n),[f,l]=m.useState({hf_models:"",hf_datasets:"",hf_spaces:""}),g=he(),{toast:b}=oe(),w=m.useRef(!1);m.useEffect(()=>{if(!t){w.current=!1;return}w.current||(w.current=!0,p(n),l({hf_models:"",hf_datasets:"",hf_spaces:""}))},[t,n]);const j=ce({mutationFn:async({paperId:_,artifacts:u})=>o==="pending"?(await pe.submit({paper_id:parseInt(_),edit_type:"hf_artifacts",proposed_payload:u}),null):W.updateHfArtifacts(_,u),onSuccess:_=>{if(o==="pending"){b({title:"Edit submitted for review",description:"Thanks! An admin will review your proposed Hugging Face artifact changes shortly."}),d==null||d(),s(!1),l({hf_models:"",hf_datasets:"",hf_spaces:""});return}_&&je(g,_,[a,r]),d==null||d(),s(!1),l({hf_models:"",hf_datasets:"",hf_spaces:""})},onError:_=>{const u=fe(_,o==="pending"?"Failed to submit your edit. Please try again.":"Failed to update Hugging Face artifacts.");b({title:o==="pending"?"Could not submit edit":"Could not save Hugging Face artifacts",description:u,variant:"destructive"})}}),v=()=>{const _={hf_models:[...c.hf_models],hf_datasets:[...c.hf_datasets],hf_spaces:[...c.hf_spaces]};for(const{key:u}of lt){const x=f[u].trim();if(x){if(_[u].some(E=>E.trim()===x))return alert(`This ${u.replace("hf_","")} URL is already added`),null;_[u]=[..._[u],x]}}return _},C=_=>{const u=f[_].trim();if(u){if(c[_].some(x=>x.trim()===u)){alert(`This ${_.replace("hf_","")} URL is already added`);return}p(x=>({...x,[_]:[...x[_],u]})),l(x=>({...x,[_]:""}))}},P=(_,u)=>{p(x=>({...x,[_]:x[_].filter(E=>E!==u)}))},I=()=>{const _=v();if(_===null)return;const u=Object.keys(n).some(x=>n[x].some(E=>!_[x].includes(E)));o==="direct"&&u&&!window.confirm("Remove one or more Hugging Face artifact links?")||j.mutate({paperId:a,artifacts:_})},S=m.useMemo(()=>{const _={hf_models:[...c.hf_models],hf_datasets:[...c.hf_datasets],hf_spaces:[...c.hf_spaces]};for(const{key:u}of lt){const x=f[u].trim();if(x){if(_[u].some(E=>E.trim()===x))return!1;_[u]=[..._[u],x]}}return!jr(_,n)},[c,f,n]);return e.jsx(ee,{open:t,onOpenChange:s,children:e.jsxs(te,{className:"max-w-2xl max-h-[700px]",children:[e.jsxs(se,{children:[e.jsx(ae,{children:"Edit Hugging Face Artifacts"}),e.jsx(re,{children:"Add or remove linked Hugging Face models, datasets, and Spaces for this paper."})]}),o==="pending"&&e.jsx(ge,{isAuthor:i}),e.jsx("div",{className:"space-y-6 py-2 overflow-y-auto max-h-[460px]",children:lt.map(({key:_,label:u,placeholder:x})=>e.jsxs("div",{className:"space-y-2",children:[e.jsx("label",{className:"text-sm font-medium",children:u}),e.jsxs("div",{className:"flex space-x-2",children:[e.jsx(V,{type:"url",placeholder:x,value:f[_],onChange:E=>l(F=>({...F,[_]:E.target.value})),onKeyPress:E=>{E.key==="Enter"&&(E.preventDefault(),C(_))},className:"flex-1"}),e.jsxs(L,{onClick:()=>C(_),size:"sm",disabled:!f[_].trim(),children:[e.jsx(Ue,{className:"w-4 h-4 mr-1"}),"Add"]})]}),c[_].length>0?e.jsx("div",{className:"space-y-2",children:c[_].map(E=>e.jsxs("div",{className:"flex items-center space-x-2 p-3 bg-muted/30 rounded-lg hover:bg-muted/50 transition-colors",children:[e.jsx("span",{className:"text-sm font-medium text-paper-blue truncate flex-1",children:E}),e.jsx(L,{variant:"ghost",size:"sm",onClick:()=>P(_,E),className:"h-8 px-2 text-destructive hover:text-destructive",title:`Remove ${u.toLowerCase()} URL`,children:e.jsx(Te,{className:"w-4 h-4"})})]},E))}):e.jsxs("div",{className:"text-xs text-muted-foreground",children:["No ",u.toLowerCase()," linked yet."]})]},_))}),e.jsxs(le,{children:[e.jsx(L,{variant:"outline",onClick:()=>s(!1),children:"Cancel"}),e.jsx(L,{onClick:I,disabled:j.isPending||!S,children:j.isPending?e.jsxs(e.Fragment,{children:[e.jsx(ie,{className:"w-4 h-4 mr-2 animate-spin"}),o==="pending"?"Submitting...":"Saving..."]}):e.jsxs(e.Fragment,{children:[e.jsx(me,{className:"w-4 h-4 mr-2"}),o==="pending"?"Submit for review":"Save Changes"]})})]})]})})}var Ge="Checkbox",[yr]=vt(Ge),[wr,_t]=yr(Ge);function _r(t){const{__scopeCheckbox:s,checked:a,children:r,defaultChecked:n,disabled:d,form:o,name:i,onCheckedChange:c,required:p,value:f="on",internal_do_not_use_render:l}=t,[g,b]=Yt({prop:a,defaultProp:n??!1,onChange:c,caller:Ge}),[w,j]=m.useState(null),[v,C]=m.useState(null),P=m.useRef(!1),I=w?!!o||!!w.closest("form"):!0,S={checked:g,disabled:d,setChecked:b,control:w,setControl:j,name:i,form:o,value:f,hasConsumerStoppedPropagationRef:P,required:p,defaultChecked:be(n)?!1:n,isFormControl:I,bubbleInput:v,setBubbleInput:C};return e.jsx(wr,{scope:s,...S,children:kr(l)?l(S):r})}var cs="CheckboxTrigger",ds=m.forwardRef(({__scopeCheckbox:t,onKeyDown:s,onClick:a,...r},n)=>{const{control:d,value:o,disabled:i,checked:c,required:p,setControl:f,setChecked:l,hasConsumerStoppedPropagationRef:g,isFormControl:b,bubbleInput:w}=_t(cs,t),j=Fe(n,f),v=m.useRef(c);return m.useEffect(()=>{const C=d==null?void 0:d.form;if(C){const P=()=>l(v.current);return C.addEventListener("reset",P),()=>C.removeEventListener("reset",P)}},[d,l]),e.jsx(ke.button,{type:"button",role:"checkbox","aria-checked":be(c)?"mixed":c,"aria-required":p,"data-state":fs(c),"data-disabled":i?"":void 0,disabled:i,value:o,...r,ref:j,onKeyDown:Re(s,C=>{C.key==="Enter"&&C.preventDefault()}),onClick:Re(a,C=>{l(P=>be(P)?!0:!P),w&&b&&(g.current=C.isPropagationStopped(),g.current||C.stopPropagation())})})});ds.displayName=cs;var kt=m.forwardRef((t,s)=>{const{__scopeCheckbox:a,name:r,checked:n,defaultChecked:d,required:o,disabled:i,value:c,onCheckedChange:p,form:f,...l}=t;return e.jsx(_r,{__scopeCheckbox:a,checked:n,defaultChecked:d,disabled:i,required:o,onCheckedChange:p,name:r,form:f,value:c,internal_do_not_use_render:({isFormControl:g})=>e.jsxs(e.Fragment,{children:[e.jsx(ds,{...l,ref:s,__scopeCheckbox:a}),g&&e.jsx(ps,{__scopeCheckbox:a})]})})});kt.displayName=Ge;var us="CheckboxIndicator",ms=m.forwardRef((t,s)=>{const{__scopeCheckbox:a,forceMount:r,...n}=t,d=_t(us,a);return e.jsx(Jt,{present:r||be(d.checked)||d.checked===!0,children:e.jsx(ke.span,{"data-state":fs(d.checked),"data-disabled":d.disabled?"":void 0,...n,ref:s,style:{pointerEvents:"none",...t.style}})})});ms.displayName=us;var hs="CheckboxBubbleInput",ps=m.forwardRef(({__scopeCheckbox:t,...s},a)=>{const{control:r,hasConsumerStoppedPropagationRef:n,checked:d,defaultChecked:o,required:i,disabled:c,name:p,value:f,form:l,bubbleInput:g,setBubbleInput:b}=_t(hs,t),w=Fe(a,b),j=as(d),v=Zt(r);m.useEffect(()=>{const P=g;if(!P)return;const I=window.HTMLInputElement.prototype,_=Object.getOwnPropertyDescriptor(I,"checked").set,u=!n.current;if(j!==d&&_){const x=new Event("click",{bubbles:u});P.indeterminate=be(d),_.call(P,be(d)?!1:d),P.dispatchEvent(x)}},[g,j,d,n]);const C=m.useRef(be(d)?!1:d);return e.jsx(ke.input,{type:"checkbox","aria-hidden":!0,defaultChecked:o??C.current,required:i,disabled:c,name:p,value:f,form:l,...s,tabIndex:-1,ref:w,style:{...s.style,...v,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});ps.displayName=hs;function kr(t){return typeof t=="function"}function be(t){return t==="indeterminate"}function fs(t){return be(t)?"indeterminate":t?"checked":"unchecked"}const Xe=m.forwardRef(({className:t,style:s,...a},r)=>e.jsx(kt,{ref:r,className:Me("peer h-4 w-4 shrink-0 rounded-sm ring-offset-background data-[state=checked]:!bg-black data-[state=checked]:!text-white focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",t),style:{border:"1px solid #000",...s},...a,children:e.jsx(ms,{className:Me("flex items-center justify-center text-current"),children:e.jsx(me,{className:"h-4 w-4"})})}));Xe.displayName=kt.displayName;const Nr=250,Cr=100;function Er({open:t,onOpenChange:s,paperId:a,arxivId:r,initialMethodIds:n,initialMethods:d,onSuccess:o,submitMode:i="direct",isAuthor:c=!1}){const[p,f]=m.useState(n),[l,g]=m.useState(!1),[b,w]=m.useState(""),[j,v]=m.useState(""),[C,P]=m.useState(new Map),I=he(),{toast:S}=oe(),_=m.useRef(!1);m.useEffect(()=>{if(!t){_.current=!1;return}if(_.current)return;_.current=!0,f(n),w(""),v("");const h=new Map;(d||[]).forEach($=>{const R=parseInt($.id);Number.isNaN(R)||h.set(R,$)}),P(h)},[t,n,d]),m.useEffect(()=>{const h=window.setTimeout(()=>{v(b.trim())},Nr);return()=>window.clearTimeout(h)},[b]);const{data:u,isFetching:x}=ne({queryKey:["methods-search",j],queryFn:()=>_e.listMethods({page_size:Cr,...j?{q:j}:{}}),enabled:t});m.useEffect(()=>{var h;(h=u==null?void 0:u.results)!=null&&h.length&&P($=>{const R=new Map($);return u.results.forEach(T=>{const U=parseInt(T.id);Number.isNaN(U)||R.set(U,T)}),R})},[u]);const E=m.useMemo(()=>{const h=(u==null?void 0:u.results)||[],$=new Set,R=[],T=(H,Y)=>{!Y||Number.isNaN(H)||$.has(H)||(R.push(Y),$.add(H))},U=()=>p.forEach(H=>T(H,C.get(H))),z=()=>h.forEach(H=>T(parseInt(H.id),H));return j?(z(),U()):(U(),z()),R},[u,p,C,j]),F=ce({mutationFn:async({paperId:h,methodIds:$})=>i==="pending"?(await pe.submit({paper_id:parseInt(h),edit_type:"methods",proposed_payload:{method_ids:$}}),null):W.updateMethods(h,$),onSuccess:h=>{if(i==="pending"){S({title:"Edit submitted for review",description:"Thanks! An admin will review your proposed method changes shortly."}),o==null||o(),s(!1);return}h&&je(I,h,[a,r]),S({title:"Methods updated",description:`Saved ${p.length} method${p.length===1?"":"s"} for this paper.`}),o==null||o(),s(!1)},onError:h=>{const $=fe(h,i==="pending"?"Failed to submit your edit. Please try again.":"Failed to update paper methods.");S({title:i==="pending"?"Could not submit edit":"Could not save methods",description:$,variant:"destructive"})}}),M=()=>{i==="direct"&&n.some(h=>!p.includes(h))&&!window.confirm("Remove one or more method links from this paper?")||F.mutate({paperId:a,methodIds:p})},O=m.useMemo(()=>{if(p.length!==n.length)return!0;const h=new Set(n);return p.some($=>!h.has($))},[p,n]),K=(h,$)=>{f(R=>$?R.includes(h)?R:[...R,h]:R.filter(T=>T!==h))},G=()=>w("");return e.jsxs(ee,{open:t,onOpenChange:s,children:[e.jsxs(te,{className:"max-w-2xl max-h-[600px]",children:[e.jsxs(se,{children:[e.jsx(ae,{children:"Edit Paper Methods"}),e.jsx(re,{children:"Select the methods and techniques used in this paper. You can select multiple methods."})]}),i==="pending"&&e.jsx(ge,{isAuthor:c}),e.jsxs("div",{className:"relative mb-4",children:[e.jsx(Ae,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground"}),e.jsx(V,{type:"text",placeholder:"Search methods...",value:b,onChange:h=>w(h.target.value),className:"pl-9 pr-9"}),b&&e.jsx("button",{type:"button",onClick:G,className:"absolute right-2 top-1/2 -translate-y-1/2 p-1 text-muted-foreground hover:text-foreground","aria-label":"Clear search",children:e.jsx(yt,{className:"w-4 h-4"})})]}),e.jsx("div",{className:"py-4 overflow-y-auto max-h-[400px]",children:E.length>0?e.jsx("div",{className:"space-y-2",children:E.map(h=>{const $=parseInt(h.id),R=p.includes($);return e.jsxs("div",{className:"flex items-center space-x-2 p-2 hover:bg-muted/50 rounded-md",children:[e.jsx(Xe,{id:`method-${h.id}`,checked:R,onCheckedChange:T=>K($,T===!0),className:"!border !border-black data-[state=checked]:!bg-black data-[state=checked]:!text-white"}),e.jsxs("label",{htmlFor:`method-${h.id}`,className:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 cursor-pointer flex-1",children:[h.name,h.full_name&&h.full_name!==h.name&&e.jsx("span",{className:"block text-xs text-muted-foreground font-normal",children:h.full_name}),h.description&&e.jsxs("span",{className:"block text-xs text-muted-foreground font-normal mt-1",children:[h.description.substring(0,100),h.description.length>100?"...":""]})]})]},h.id)})}):x?e.jsxs("div",{className:"text-center py-8 text-muted-foreground",children:[e.jsx(ie,{className:"w-8 h-8 mx-auto mb-2 animate-spin"}),e.jsx("p",{children:"Loading methods..."})]}):e.jsxs("div",{className:"text-center py-8 text-muted-foreground",children:[e.jsx(Ae,{className:"w-8 h-8 mx-auto mb-2 opacity-50"}),e.jsx("p",{children:j?`No methods found matching "${j}"`:"No methods available"})]})}),e.jsxs(le,{children:[e.jsx(L,{variant:"ghost",className:"sm:mr-auto",onClick:()=>g(!0),children:"Suggest a new method"}),e.jsx(L,{variant:"outline",onClick:()=>s(!1),children:"Cancel"}),e.jsx(L,{onClick:M,disabled:F.isPending||!O,children:F.isPending?e.jsxs(e.Fragment,{children:[e.jsx(ie,{className:"w-4 h-4 mr-2 animate-spin"}),i==="pending"?"Submitting...":"Saving..."]}):e.jsxs(e.Fragment,{children:[e.jsx(me,{className:"w-4 h-4 mr-2"}),i==="pending"?"Submit for review":"Save Changes"]})})]})]}),e.jsx(wt,{open:l,onOpenChange:g,paperId:a,kind:"method"})]})}const gs=["image/jpeg","image/png","image/webp","image/gif"],Sr=2*1024*1024;function Pr(t){return gs.includes(t.type)?t.size>Sr?Promise.reject(new Error("Logo must be 2 MB or smaller.")):new Promise((s,a)=>{const r=new FileReader;r.onload=()=>s({file_name:t.name,mime_type:t.type,data_url:String(r.result)}),r.onerror=()=>a(new Error("Could not read that logo.")),r.readAsDataURL(t)}):Promise.reject(new Error("Choose a JPEG, PNG, WebP, or GIF logo."))}function $r({paperId:t,initialName:s}){const[a,r]=m.useState(s),[n,d]=m.useState(""),[o,i]=m.useState(""),[c,p]=m.useState(null),[f,l]=m.useState(""),g=ce({mutationFn:()=>pe.submit(ya(Number(t),"new_organization",{name:a.trim(),...n.trim()?{hf_slug:n.trim()}:{},...o.trim()?{website_url:o.trim()}:{},...c?{image:c}:{}}))});return g.isSuccess?e.jsxs("p",{className:"rounded border p-3 text-sm",children:['Thanks! "',a.trim(),'" was submitted for review. Once an admin approves it, the organization is created and added to this paper.']}):e.jsxs("form",{className:"space-y-2 rounded border p-3",onSubmit:b=>{b.preventDefault(),g.mutate()},children:[e.jsx("p",{className:"text-sm font-medium",children:"Suggest a new organization"}),e.jsx(V,{"aria-label":"Organization name",placeholder:"Name",value:a,maxLength:200,onChange:b=>r(b.target.value)}),e.jsx(V,{"aria-label":"Hugging Face organization",placeholder:"Hugging Face organization (e.g. https://huggingface.co/PrimeIntellect)",value:n,onChange:b=>d(b.target.value)}),e.jsx(V,{"aria-label":"Website",type:"url",placeholder:"Website (e.g. https://www.primeintellect.ai)",value:o,onChange:b=>i(b.target.value)}),e.jsxs("label",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:["Logo (optional)",e.jsx("input",{"aria-label":"Logo",type:"file",accept:gs.join(","),onChange:b=>{var j;const w=(j=b.target.files)==null?void 0:j[0];p(null),l(""),w&&Pr(w).then(p,v=>l(v.message))}})]}),c&&e.jsx("img",{src:c.data_url,alt:"Selected logo",className:"h-12 w-12 rounded border object-contain"}),f&&e.jsx("p",{className:"text-sm text-destructive",children:f}),e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsx("p",{className:"text-xs text-muted-foreground",children:"An admin reviews every new organization."}),e.jsx(L,{type:"submit",variant:"outline",disabled:!a.trim()||!n.trim()&&!o.trim()||g.isPending,children:g.isPending?"Submitting...":"Submit for review"})]}),g.error&&e.jsx("p",{className:"text-sm text-destructive",children:fe(g.error,"Could not submit this organization.")})]})}const Ir=({open:t,onOpenChange:s,paperId:a,initialOrganizationIds:r,submitMode:n,isAuthor:d})=>{var w;const[o,i]=m.useState(r),[c,p]=m.useState(""),f=he();m.useEffect(()=>{t&&(i(r),p(""))},[r,t]);const l=ne({queryKey:["organizations","curation"],queryFn:()=>_e.organizations(!1),enabled:t}),g=m.useMemo(()=>{var C,P;const j=c.trim().toLocaleLowerCase();if(!j)return((C=l.data)==null?void 0:C.results)??[];const v=I=>I===j?0:I.startsWith(j)?1:I.split(/[^\p{L}\p{N}]+/u).some(S=>S.startsWith(j))?2:3;return(((P=l.data)==null?void 0:P.results)??[]).map(I=>({organization:I,name:I.name.toLocaleLowerCase()})).filter(({name:I})=>I.includes(j)).sort((I,S)=>v(I.name)-v(S.name)).map(({organization:I})=>I)},[(w=l.data)==null?void 0:w.results,c]),b=ce({mutationFn:async()=>{if(!(r.some(v=>!o.includes(v))&&!window.confirm("Remove one or more organizations from this paper? Destructive edits may require a fresh sign-in.")))return n==="pending"?(await pe.submit({paper_id:Number(a),edit_type:"organizations",proposed_payload:{organization_ids:o}}),null):W.updateOrganizations(a,o)},onSuccess:j=>{j!==void 0&&(j&&je(f,j,[a]),s(!1))}});return e.jsx(ee,{open:t,onOpenChange:s,children:e.jsxs(te,{children:[e.jsxs(se,{children:[e.jsx(ae,{children:"Edit organizations"}),e.jsx(re,{children:"Associate organizations with this paper. If one is missing, search for it and suggest it for review."})]}),n==="pending"&&e.jsx(ge,{isAuthor:d}),e.jsxs("div",{className:"relative",children:[e.jsx(Ae,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),e.jsx(V,{type:"search","aria-label":"Search organizations",placeholder:"Search organizations...",value:c,onChange:j=>p(j.target.value),className:"pl-9 pr-9"}),c&&e.jsx("button",{type:"button",onClick:()=>p(""),className:"absolute right-2 top-1/2 -translate-y-1/2 p-1 text-muted-foreground hover:text-foreground","aria-label":"Clear organization search",children:e.jsx(yt,{className:"h-4 w-4"})})]}),e.jsxs("div",{className:"max-h-80 space-y-2 overflow-auto",children:[g.map(j=>{const v=Number(j.id);return e.jsxs("label",{className:"flex items-center gap-2 rounded border p-2",children:[e.jsx("input",{type:"checkbox",checked:o.includes(v),onChange:C=>i(P=>C.target.checked?[...P,v]:P.filter(I=>I!==v))}),j.name]},j.id)}),!l.isLoading&&g.length===0&&e.jsx("p",{className:"py-8 text-center text-sm text-muted-foreground",children:c.trim()?`No organizations found matching "${c.trim()}"`:"No organizations available"})]}),!l.isLoading&&g.length===0&&c.trim()&&e.jsx($r,{paperId:a,initialName:c.trim()},c.trim()),e.jsxs(le,{children:[e.jsx(L,{variant:"outline",onClick:()=>s(!1),children:"Cancel"}),e.jsx(L,{onClick:()=>b.mutate(),disabled:b.isPending,children:n==="pending"?"Submit test edit":"Save changes"})]})]})})};function Rr({open:t,onOpenChange:s,paperId:a,arxivId:r,initialProjectPages:n,onSuccess:d,submitMode:o="direct",isAuthor:i=!1}){const[c,p]=m.useState(n),[f,l]=m.useState(""),g=he(),{toast:b}=oe(),w=m.useRef(!1);m.useEffect(()=>{if(!t){w.current=!1;return}w.current||(w.current=!0,p(n),l(""))},[t,n]);const j=ce({mutationFn:async({paperId:u,projectPages:x})=>o==="pending"?(await pe.submit({paper_id:parseInt(u),edit_type:"project_pages",proposed_payload:{project_pages:x}}),null):W.updateProjectPages(u,x),onSuccess:u=>{if(o==="pending"){b({title:"Edit submitted for review",description:"Thanks! An admin will review your proposed project page changes shortly."}),d==null||d(),s(!1),l("");return}u&&je(g,u,[a,r]),d==null||d(),s(!1),l("")},onError:u=>{const x=fe(u,o==="pending"?"Failed to submit your edit. Please try again.":"Failed to update project pages.");b({title:o==="pending"?"Could not submit edit":"Could not save project pages",description:x,variant:"destructive"})}}),v=()=>{const u=f.trim();return u?c.some(x=>x.url===u)?(alert("This project page URL is already added"),null):[...c,{url:u,is_official:!1}]:c},C=()=>{const u=v();u!==null&&u.length!==c.length&&(p(u),l(""))},P=u=>{p(c.filter(x=>x.url!==u))},I=u=>{p(c.map(x=>x.url===u?{...x,is_official:!x.is_official}:x))},S=()=>{const u=v();u!==null&&(o==="direct"&&n.some(x=>!u.some(E=>E.url===x.url))&&!window.confirm("Remove one or more project pages from this paper?")||j.mutate({paperId:a,projectPages:u}))},_=m.useMemo(()=>{const u=f.trim(),x=u?[...c,{url:u,is_official:!1}]:c;if(x.length!==n.length)return!0;const E=new Map(n.map(F=>[F.url.trim(),!!F.is_official]));return x.some(F=>{const M=E.get(F.url.trim());return M===void 0||M!==!!F.is_official})},[c,f,n]);return e.jsx(ee,{open:t,onOpenChange:s,children:e.jsxs(te,{className:"max-w-2xl max-h-[600px]",children:[e.jsxs(se,{children:[e.jsx(ae,{children:"Edit Paper Project Pages"}),e.jsx(re,{children:"Add or remove project page URLs (e.g. authors' demo or landing pages) associated with this paper. Mark pages as official if they are created by the paper authors."})]}),o==="pending"&&e.jsx(ge,{isAuthor:i}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("label",{className:"text-sm font-medium",children:"Add Project Page URL"}),e.jsxs("div",{className:"flex space-x-2",children:[e.jsx(V,{type:"url",placeholder:"https://example.com/project",value:f,onChange:u=>l(u.target.value),onKeyPress:u=>{u.key==="Enter"&&(u.preventDefault(),C())},className:"flex-1"}),e.jsxs(L,{onClick:C,size:"sm",disabled:!f.trim(),children:[e.jsx(Ue,{className:"w-4 h-4 mr-1"}),"Add"]})]})]}),e.jsx("div",{className:"py-4 overflow-y-auto max-h-[350px]",children:c.length>0?e.jsx("div",{className:"space-y-2",children:c.map((u,x)=>e.jsxs("div",{className:"flex items-center space-x-2 p-3 bg-muted/30 rounded-lg hover:bg-muted/50 transition-colors",children:[e.jsx(zt,{className:"w-4 h-4 text-muted-foreground flex-shrink-0"}),e.jsx("div",{className:"flex-1 min-w-0",children:e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx("span",{className:"text-sm font-medium text-paper-blue truncate",children:u.url}),u.is_official&&e.jsx(rs,{variant:"secondary",className:"text-xs",children:"Official"})]})}),e.jsxs("div",{className:"flex items-center space-x-1",children:[e.jsxs(L,{variant:u.is_official?"default":"outline",size:"sm",onClick:()=>I(u.url),className:"h-8 px-2 text-xs",title:u.is_official?"Click to unmark as official (created by paper authors)":"Click to mark as official (created by paper authors)",children:[e.jsx(ns,{className:`w-3.5 h-3.5 mr-1 ${u.is_official?"fill-current":""}`}),u.is_official?"Official":"Mark official"]}),e.jsx(L,{variant:"ghost",size:"sm",onClick:()=>P(u.url),className:"h-8 px-2 text-destructive hover:text-destructive",title:"Remove project page",children:e.jsx(Te,{className:"w-4 h-4"})})]})]},x))}):e.jsxs("div",{className:"text-center py-8 text-muted-foreground",children:[e.jsx(zt,{className:"w-8 h-8 mx-auto mb-2 opacity-50"}),e.jsx("p",{className:"text-sm",children:"No project pages added yet"}),e.jsx("p",{className:"text-xs mt-1",children:"Add a project page URL above to get started"})]})}),e.jsxs(le,{children:[e.jsx(L,{variant:"outline",onClick:()=>s(!1),children:"Cancel"}),e.jsx(L,{onClick:S,disabled:j.isPending||!_,children:j.isPending?e.jsxs(e.Fragment,{children:[e.jsx(ie,{className:"w-4 h-4 mr-2 animate-spin"}),o==="pending"?"Submitting...":"Saving..."]}):e.jsxs(e.Fragment,{children:[e.jsx(me,{className:"w-4 h-4 mr-2"}),o==="pending"?"Submit for review":"Save Changes"]})})]})]})})}function Ar({open:t,onOpenChange:s,paperId:a,arxivId:r,initialRepositories:n,onSuccess:d,submitMode:o="direct",isAuthor:i=!1}){const[c,p]=m.useState(n),[f,l]=m.useState(""),g=he(),{toast:b}=oe(),w=m.useRef(!1);m.useEffect(()=>{if(!t){w.current=!1;return}w.current||(w.current=!0,p(n),l(""))},[t,n]);const j=ce({mutationFn:async({paperId:x,repositories:E})=>o==="pending"?(await pe.submit({paper_id:parseInt(x),edit_type:"repositories",proposed_payload:{repositories:E}}),null):W.updateRepositories(x,E),onSuccess:x=>{if(o==="pending"){b({title:"Edit submitted for review",description:"Thanks! An admin will review your proposed repository changes shortly."}),d==null||d(),s(!1),l("");return}x&&je(g,x,[a,r]),d==null||d(),s(!1),l("")},onError:x=>{const E=fe(x,o==="pending"?"Failed to submit your edit. Please try again.":"Failed to update paper repositories.");b({title:o==="pending"?"Could not submit edit":"Could not save repositories",description:E,variant:"destructive"})}}),v=x=>{const E=[];for(const F of x){const M=E.find(O=>Ut(O.url,F.url));if(M)M.is_official=M.is_official||F.is_official;else{const O=Ye(F.url);E.push({url:O??F.url.trim(),is_official:F.is_official})}}return E},C=()=>{const x=f.trim(),E=x?[...c,{url:x,is_official:!1}]:c;return x&&c.some(F=>Ut(F.url,x))?(alert("This repository URL is already added"),null):v(E)},P=()=>{const x=C();x!==null&&x.length!==c.length&&(p(x),l(""))},I=x=>{p(c.filter(E=>E.url!==x))},S=x=>{p(c.map(E=>E.url===x?{...E,is_official:!E.is_official}:E))},_=()=>{const x=C();x!==null&&(o==="direct"&&n.some(E=>!x.some(F=>F.url===E.url))&&!window.confirm("Remove one or more repositories from this paper?")||j.mutate({paperId:a,repositories:x}))},u=m.useMemo(()=>{const x=f.trim(),E=x?[...c,{url:x,is_official:!1}]:c;if(E.length!==n.length)return!0;const F=v(n),M=v(E);if(M.length!==F.length)return!0;const O=new Map(F.map(K=>[Ye(K.url)??K.url.trim(),!!K.is_official]));return M.some(K=>{const G=Ye(K.url)??K.url.trim(),h=O.get(G);return h===void 0||h!==!!K.is_official})},[c,f,n]);return e.jsx(ee,{open:t,onOpenChange:s,children:e.jsxs(te,{className:"max-w-2xl max-h-[600px]",children:[e.jsxs(se,{children:[e.jsx(ae,{children:"Edit Paper Repositories"}),e.jsx(re,{children:"Add or remove GitHub repository URLs associated with this paper. Mark repositories as official if they are created by the paper authors."})]}),o==="pending"&&e.jsx(ge,{isAuthor:i}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("label",{className:"text-sm font-medium",children:"Add Repository URL"}),e.jsxs("div",{className:"flex space-x-2",children:[e.jsx(V,{type:"url",placeholder:"https://github.com/owner/repo",value:f,onChange:x=>l(x.target.value),onKeyPress:x=>{x.key==="Enter"&&(x.preventDefault(),P())},className:"flex-1"}),e.jsxs(L,{onClick:P,size:"sm",disabled:!f.trim(),children:[e.jsx(Ue,{className:"w-4 h-4 mr-1"}),"Add"]})]})]}),e.jsx("div",{className:"py-4 overflow-y-auto max-h-[350px]",children:c.length>0?e.jsx("div",{className:"space-y-2",children:c.map((x,E)=>e.jsxs("div",{className:"flex items-center space-x-2 p-3 bg-muted/30 rounded-lg hover:bg-muted/50 transition-colors",children:[e.jsx(Dt,{className:"w-4 h-4 text-muted-foreground flex-shrink-0"}),e.jsx("div",{className:"flex-1 min-w-0",children:e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx("span",{className:"text-sm font-medium text-paper-blue truncate",children:x.url}),x.is_official&&e.jsx(rs,{variant:"secondary",className:"text-xs",children:"Official"})]})}),e.jsxs("div",{className:"flex items-center space-x-1",children:[e.jsxs(L,{variant:x.is_official?"default":"outline",size:"sm",onClick:()=>S(x.url),className:"h-8 px-2 text-xs",title:x.is_official?"Click to unmark as official (created by paper authors)":"Click to mark as official (created by paper authors)",children:[e.jsx(ns,{className:`w-3.5 h-3.5 mr-1 ${x.is_official?"fill-current":""}`}),x.is_official?"Official":"Mark official"]}),e.jsx(L,{variant:"ghost",size:"sm",onClick:()=>I(x.url),className:"h-8 px-2 text-destructive hover:text-destructive",title:"Remove repository",children:e.jsx(Te,{className:"w-4 h-4"})})]})]},E))}):e.jsxs("div",{className:"text-center py-8 text-muted-foreground",children:[e.jsx(Dt,{className:"w-8 h-8 mx-auto mb-2 opacity-50"}),e.jsx("p",{className:"text-sm",children:"No repositories added yet"}),e.jsx("p",{className:"text-xs mt-1",children:"Add a repository URL above to get started"})]})}),e.jsxs(le,{children:[e.jsx(L,{variant:"outline",onClick:()=>s(!1),children:"Cancel"}),e.jsx(L,{onClick:_,disabled:j.isPending||!u,children:j.isPending?e.jsxs(e.Fragment,{children:[e.jsx(ie,{className:"w-4 h-4 mr-2 animate-spin"}),o==="pending"?"Submitting...":"Saving..."]}):e.jsxs(e.Fragment,{children:[e.jsx(me,{className:"w-4 h-4 mr-2"}),o==="pending"?"Submit for review":"Save Changes"]})})]})]})})}function Lr({open:t,onOpenChange:s,paperId:a,arxivId:r,initialUrl:n,onSuccess:d,submitMode:o="direct",isAuthor:i=!1}){const[c,p]=m.useState(n),f=he(),{toast:l}=oe(),g=m.useRef(!1);m.useEffect(()=>{if(!t){g.current=!1;return}g.current||(g.current=!0,p(n))},[t,n]);const b=ce({mutationFn:async({paperId:P,sourceUrl:I})=>o==="pending"?(await pe.submit({paper_id:parseInt(P),edit_type:"source_url",proposed_payload:{source_url:I}}),null):W.updateSourceUrl(P,I),onSuccess:P=>{if(o==="pending"){l({title:"Edit submitted for review",description:"Thanks! An admin will review your proposed source URL change shortly."}),d==null||d(),s(!1);return}P&&je(f,P,[a,r]),d==null||d(),s(!1)},onError:P=>{const I=fe(P,o==="pending"?"Failed to submit your edit. Please try again.":"Failed to update source URL.");l({title:o==="pending"?"Could not submit edit":"Could not save source URL",description:I,variant:"destructive"})}}),w=c.trim(),j=/^https?:\/\//i.test(w),v=w!==(n||"").trim(),C=()=>{j&&b.mutate({paperId:a,sourceUrl:w})};return e.jsx(ee,{open:t,onOpenChange:s,children:e.jsxs(te,{className:"max-w-2xl",children:[e.jsxs(se,{children:[e.jsx(ae,{children:"Edit Source URL"}),e.jsxs(re,{children:["Update the canonical URL for this external paper. This is the page the ",'"Source page"'," button links to. ArXiv papers cannot edit this field."]})]}),o==="pending"&&e.jsx(ge,{isAuthor:i}),e.jsxs("div",{className:"space-y-2 py-2",children:[e.jsx("label",{className:"text-sm font-medium",children:"Source URL"}),e.jsx(V,{type:"url",placeholder:"https://example.com/paper",value:c,onChange:P=>p(P.target.value),onKeyPress:P=>{P.key==="Enter"&&j&&v&&(P.preventDefault(),C())}}),!j&&w.length>0&&e.jsx("p",{className:"text-xs text-destructive",children:"URL must start with http:// or https://"})]}),e.jsxs(le,{children:[e.jsx(L,{variant:"outline",onClick:()=>s(!1),children:"Cancel"}),e.jsx(L,{onClick:C,disabled:b.isPending||!j||!v,children:b.isPending?e.jsxs(e.Fragment,{children:[e.jsx(ie,{className:"w-4 h-4 mr-2 animate-spin"}),o==="pending"?"Submitting...":"Saving..."]}):e.jsxs(e.Fragment,{children:[e.jsx(me,{className:"w-4 h-4 mr-2"}),o==="pending"?"Submit for review":"Save Changes"]})})]})]})})}const Fr=250,Tr=100;function Ur({open:t,onOpenChange:s,paperId:a,arxivId:r,initialTaskIds:n,initialTasks:d,onSuccess:o,submitMode:i="direct",isAuthor:c=!1}){const[p,f]=m.useState(n),[l,g]=m.useState(!1),[b,w]=m.useState(""),[j,v]=m.useState(""),[C,P]=m.useState(new Map),I=he(),{toast:S}=oe(),_=m.useRef(!1);m.useEffect(()=>{if(!t){_.current=!1;return}if(_.current)return;_.current=!0,f(n),w(""),v("");const h=new Map;(d||[]).forEach($=>{const R=parseInt($.id);Number.isNaN(R)||h.set(R,$)}),P(h)},[t,n,d]),m.useEffect(()=>{const h=window.setTimeout(()=>{v(b.trim())},Fr);return()=>window.clearTimeout(h)},[b]);const{data:u,isFetching:x}=ne({queryKey:["tasks-search",j],queryFn:()=>_e.listTasks({page_size:Tr,...j?{q:j}:{}}),enabled:t});m.useEffect(()=>{var h;(h=u==null?void 0:u.results)!=null&&h.length&&P($=>{const R=new Map($);return u.results.forEach(T=>{const U=parseInt(T.id);Number.isNaN(U)||R.set(U,T)}),R})},[u]);const E=m.useMemo(()=>{const h=(u==null?void 0:u.results)||[],$=new Set,R=[],T=(H,Y)=>{!Y||Number.isNaN(H)||$.has(H)||(R.push(Y),$.add(H))},U=()=>p.forEach(H=>T(H,C.get(H))),z=()=>h.forEach(H=>T(parseInt(H.id),H));return j?(z(),U()):(U(),z()),R},[u,p,C,j]),F=ce({mutationFn:async({paperId:h,taskIds:$})=>i==="pending"?(await pe.submit({paper_id:parseInt(h),edit_type:"tasks",proposed_payload:{task_ids:$}}),null):W.updateTasks(h,$),onMutate:async({taskIds:h})=>{if(i==="pending")return{snapshots:[]};const $=h.map(U=>C.get(U)).filter(U=>!!U).map(U=>({id:U.id,name:U.name,slug:U.slug})).sort((U,z)=>U.name.localeCompare(z.name)),R=Array.from(new Set([a,r].filter(U=>!!U)));await Promise.all(R.flatMap(U=>[I.cancelQueries({queryKey:ye.detail(U)}),I.cancelQueries({queryKey:ye.arxiv(U)})]));const T=[];return R.forEach(U=>{[ye.detail(U),ye.arxiv(U)].forEach(z=>{const H=I.getQueryData(z);T.push({key:z,data:H}),H&&I.setQueryData(z,{...H,tasks:$})})}),S({title:"Tasks updated",description:`Saved ${h.length} task${h.length===1?"":"s"} for this paper.`}),o==null||o(),s(!1),{snapshots:T}},onSuccess:h=>{if(i==="pending"){S({title:"Edit submitted for review",description:"Thanks! An admin will review your proposed task changes shortly."}),o==null||o(),s(!1);return}h&&je(I,h,[a,r])},onError:(h,$,R)=>{var U;(U=R==null?void 0:R.snapshots)==null||U.forEach(({key:z,data:H})=>{I.setQueryData(z,H)});const T=fe(h,i==="pending"?"Failed to submit your edit. Please try again.":"Failed to update paper tasks.");S({title:i==="pending"?"Could not submit edit":"Could not save tasks",description:T,variant:"destructive"})}}),M=()=>{i==="direct"&&n.some(h=>!p.includes(h))&&!window.confirm("Remove one or more task links from this paper?")||F.mutate({paperId:a,taskIds:p})},O=m.useMemo(()=>{if(p.length!==n.length)return!0;const h=new Set(n);return p.some($=>!h.has($))},[p,n]),K=(h,$)=>{f(R=>$?R.includes(h)?R:[...R,h]:R.filter(T=>T!==h))},G=()=>w("");return e.jsxs(ee,{open:t,onOpenChange:s,children:[e.jsxs(te,{className:"max-w-2xl max-h-[600px]",children:[e.jsxs(se,{children:[e.jsx(ae,{children:"Edit Paper Tasks"}),e.jsx(re,{children:"Select the tasks that this paper addresses. You can select multiple tasks."})]}),i==="pending"&&e.jsx(ge,{isAuthor:c}),e.jsxs("div",{className:"relative mb-4",children:[e.jsx(Ae,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground"}),e.jsx(V,{type:"text",placeholder:"Search tasks...",value:b,onChange:h=>w(h.target.value),className:"pl-9 pr-9"}),b&&e.jsx("button",{type:"button",onClick:G,className:"absolute right-2 top-1/2 -translate-y-1/2 p-1 text-muted-foreground hover:text-foreground","aria-label":"Clear search",children:e.jsx(yt,{className:"w-4 h-4"})})]}),e.jsx("div",{className:"py-4 overflow-y-auto max-h-[400px]",children:E.length>0?e.jsx("div",{className:"space-y-2",children:E.map(h=>{const $=parseInt(h.id),R=p.includes($);return e.jsxs("div",{className:"flex items-center space-x-2 p-2 hover:bg-muted/50 rounded-md",children:[e.jsx(Xe,{id:`task-${h.id}`,checked:R,onCheckedChange:T=>K($,T===!0),className:"!border !border-black data-[state=checked]:!bg-black data-[state=checked]:!text-white"}),e.jsxs("label",{htmlFor:`task-${h.id}`,className:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 cursor-pointer flex-1",children:[h.name,h.description&&e.jsxs("span",{className:"block text-xs text-muted-foreground font-normal mt-1",children:[h.description.substring(0,100),h.description.length>100?"...":""]})]})]},h.id)})}):x?e.jsxs("div",{className:"text-center py-8 text-muted-foreground",children:[e.jsx(ie,{className:"w-8 h-8 mx-auto mb-2 animate-spin"}),e.jsx("p",{children:"Loading tasks..."})]}):e.jsxs("div",{className:"text-center py-8 text-muted-foreground",children:[e.jsx(Ae,{className:"w-8 h-8 mx-auto mb-2 opacity-50"}),e.jsx("p",{children:j?`No tasks found matching "${j}"`:"No tasks available"})]})}),e.jsxs(le,{children:[e.jsx(L,{variant:"ghost",className:"sm:mr-auto",onClick:()=>g(!0),children:"Suggest a new task"}),e.jsx(L,{variant:"outline",onClick:()=>s(!1),children:"Cancel"}),e.jsx(L,{onClick:M,disabled:F.isPending||!O,children:F.isPending?e.jsxs(e.Fragment,{children:[e.jsx(ie,{className:"w-4 h-4 mr-2 animate-spin"}),i==="pending"?"Submitting...":"Saving..."]}):e.jsxs(e.Fragment,{children:[e.jsx(me,{className:"w-4 h-4 mr-2"}),i==="pending"?"Submit for review":"Save Changes"]})})]})]}),e.jsx(wt,{open:l,onOpenChange:g,paperId:a,kind:"task"})]})}const Ot=10,Dr=/^https?:\/\/(?:www\.|mobile\.)?(?:x|twitter)\.com\/(?:[A-Za-z0-9_]{1,15}|i\/web|i)\/status(?:es)?\/(\d{1,25})(?:[/?#].*)?$/;function Ne(t){var s;return((s=Dr.exec(t.trim()))==null?void 0:s[1])??null}function Br({open:t,onOpenChange:s,paperId:a,arxivId:r,initialUrls:n,submitMode:d="direct",isAuthor:o=!1}){const[i,c]=m.useState(n),[p,f]=m.useState(""),[l,g]=m.useState(null),b=he(),{toast:w}=oe(),j=m.useRef(!1);m.useEffect(()=>{if(!t){j.current=!1;return}j.current||(j.current=!0,c(n),f(""),g(null))},[t,n]);const v=ce({mutationFn:async u=>d==="pending"?(await pe.submit({paper_id:parseInt(a),edit_type:"x_threads",proposed_payload:{x_threads:u}}),null):W.updateXThreads(a,u),onSuccess:u=>{d==="pending"?w({title:"Edit submitted for review",description:"Thanks! An admin will review your proposed X threads shortly."}):u&&je(b,u,[a,r]),s(!1)},onError:u=>{w({title:d==="pending"?"Could not submit edit":"Could not save X threads",description:fe(u,d==="pending"?"Failed to submit your edit. Please try again.":"Failed to update X threads."),variant:"destructive"})}}),C=()=>{const u=p.trim();if(!u)return i;const x=Ne(u);return x?i.some(E=>Ne(E)===x)?(g("This post is already listed."),null):i.length>=Ot?(g(`A paper can link at most ${Ot} X threads.`),null):[...i,u]:(g("Paste a post URL such as https://x.com/user/status/123…"),null)},P=()=>{const u=C();u!==null&&(c(u),f(""),g(null))},I=(u,x)=>{const E=[...i];[E[u],E[u+x]]=[E[u+x],E[u]],c(E)},S=()=>{const u=C();u!==null&&(d==="direct"&&n.some(x=>!u.some(E=>Ne(E)===Ne(x)))&&!window.confirm("Remove one or more X threads from this paper?")||v.mutate(u))},_=m.useMemo(()=>(p.trim()?[...i,p.trim()]:i).map(Ne).join()!==n.map(Ne).join(),[i,p,n]);return e.jsx(ee,{open:t,onOpenChange:s,children:e.jsxs(te,{className:"max-w-2xl max-h-[600px]",children:[e.jsxs(se,{children:[e.jsx(ae,{children:"Edit X threads"}),e.jsx(re,{children:"Link posts on X (formerly Twitter) in which the authors introduce this paper. A preview of each post is shown on the paper page."})]}),d==="pending"&&e.jsx(ge,{isAuthor:o}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("label",{className:"text-sm font-medium",htmlFor:"x-thread-url",children:"Add X post URL"}),e.jsxs("div",{className:"flex space-x-2",children:[e.jsx(V,{id:"x-thread-url",type:"url",placeholder:"https://x.com/user/status/1234567890",value:p,onChange:u=>{f(u.target.value),g(null)},onKeyDown:u=>{u.key==="Enter"&&(u.preventDefault(),P())},"aria-invalid":!!l,className:"flex-1"}),e.jsxs(L,{onClick:P,size:"sm",disabled:!p.trim(),children:[e.jsx(Ue,{className:"w-4 h-4 mr-1"}),"Add"]})]}),l&&e.jsx("p",{className:"text-xs text-destructive",children:l})]}),e.jsx("div",{className:"py-4 overflow-y-auto max-h-[350px]",children:i.length>0?e.jsx("div",{className:"space-y-2",children:i.map((u,x)=>e.jsxs("div",{className:"flex items-center space-x-2 p-3 bg-muted/30 rounded-lg",children:[e.jsx("span",{className:"flex-1 min-w-0 truncate text-sm font-medium",children:u}),e.jsx(L,{variant:"ghost",size:"sm",className:"h-8 px-2",disabled:x===0,onClick:()=>I(x,-1),"aria-label":"Move up",children:e.jsx(Ba,{className:"w-4 h-4"})}),e.jsx(L,{variant:"ghost",size:"sm",className:"h-8 px-2",disabled:x===i.length-1,onClick:()=>I(x,1),"aria-label":"Move down",children:e.jsx(Da,{className:"w-4 h-4"})}),e.jsx(L,{variant:"ghost",size:"sm",className:"h-8 px-2 text-destructive hover:text-destructive",onClick:()=>c(i.filter(E=>E!==u)),"aria-label":"Remove X thread",children:e.jsx(Te,{className:"w-4 h-4"})})]},u))}):e.jsx("p",{className:"text-center py-8 text-sm text-muted-foreground",children:"No X threads linked yet"})}),e.jsxs(le,{children:[e.jsx(L,{variant:"outline",onClick:()=>s(!1),children:"Cancel"}),e.jsx(L,{onClick:S,disabled:v.isPending||!_,children:v.isPending?e.jsxs(e.Fragment,{children:[e.jsx(ie,{className:"w-4 h-4 mr-2 animate-spin"}),d==="pending"?"Submitting...":"Saving..."]}):e.jsxs(e.Fragment,{children:[e.jsx(me,{className:"w-4 h-4 mr-2"}),d==="pending"?"Submit for review":"Save Changes"]})})]})]})})}function zr({activeEditor:t,arxivId:s,editSubmitMode:a,evaluations:r,isAdmin:n,isLinkedAuthor:d,onOpenChange:o,paper:i}){if(!t)return null;const c={open:!0,paperId:i.id,arxivId:s,submitMode:a,isAuthor:d},p=l=>g=>o(l,g);return{tasks:()=>{var l;return e.jsx(Ur,{...c,onOpenChange:p("tasks"),initialTaskIds:((l=i.tasks)==null?void 0:l.map(g=>Number(g.id)))??[],initialTasks:i.tasks??[]})},methods:()=>{var l;return e.jsx(Er,{...c,onOpenChange:p("methods"),initialMethodIds:((l=i.methods)==null?void 0:l.map(g=>Number(g.id)))??[],initialMethods:i.methods??[]})},repositories:()=>{var l;return e.jsx(Ar,{...c,onOpenChange:p("repositories"),initialRepositories:((l=i.repositories)==null?void 0:l.map(({url:g,is_official:b})=>({url:g,is_official:!!b})))??[]})},"project-pages":()=>{var l;return e.jsx(Rr,{...c,onOpenChange:p("project-pages"),initialProjectPages:((l=i.project_pages)==null?void 0:l.map(({url:g,is_official:b})=>({url:g,is_official:!!b})))??[]})},results:()=>e.jsx(br,{...c,onOpenChange:p("results"),initialEvaluations:r,paperTasks:i.tasks??[],isAdmin:n}),"source-url":()=>e.jsx(Lr,{...c,onOpenChange:p("source-url"),initialUrl:i.source_url??i.url_abs??""}),"hf-artifacts":()=>e.jsx(vr,{...c,onOpenChange:p("hf-artifacts"),initialArtifacts:{hf_models:i.hf_models??[],hf_datasets:i.hf_datasets??[],hf_spaces:i.hf_spaces??[]}}),"x-threads":()=>{var l;return e.jsx(Br,{...c,onOpenChange:p("x-threads"),initialUrls:((l=i.x_threads)==null?void 0:l.map(({url:g})=>g))??[]})},organizations:()=>e.jsx(Ir,{open:!0,paperId:i.id,onOpenChange:p("organizations"),initialOrganizationIds:(i.organizations??[]).map(({id:l})=>Number(l)),submitMode:a,isAuthor:d})}[t]()}const Hr={"add-evals":{trigger:"add evals",running:"adding evals…",complete:"add evals ✓",title:"Add evaluations with Codex",description:t=>e.jsxs(e.Fragment,{children:["Codex will run the repository’s add-evals skill for “",t,"”. It will import only paper-native results onto existing, metric-compatible leaderboards. Accepted rows are written directly to the live database."]}),notice:"Comparator rows, unknown benchmarks, and unconfigured metrics will be skipped. Jobs run one at a time in submission order.",progress:"Codex is researching the paper and validating results against the configured leaderboards.",action:"Run add-evals",start:Ia,get:$a,cancel:Pa},"enrich-paper":{trigger:"enrich paper",running:"enriching…",complete:"enriched ✓",title:"Enrich paper with Codex",description:t=>e.jsxs(e.Fragment,{children:["Codex will run the repository’s enrich-paper skill for “",t,"”. It will validate official code and project links, merge high-confidence taxonomy tags, and check the paper thumbnail. Accepted changes are written directly to the live database."]}),notice:"Uncertain URLs and missing taxonomy concepts will be reported rather than guessed. Jobs run one at a time in submission order.",progress:"Codex is validating artifacts, taxonomy tags, and thumbnail quality for this paper.",action:"Run enrich-paper",start:Sa,get:Ea,cancel:Ca}};function Mr({report:t}){return e.jsx("div",{className:"min-w-0 max-h-[50vh] overflow-y-auto overflow-x-hidden rounded-md border bg-muted/40 p-4 text-sm leading-relaxed",children:e.jsx(La,{remarkPlugins:[Fa],components:{a:({children:s,...a})=>e.jsx("a",{...a,className:"break-all underline underline-offset-2",target:"_blank",rel:"noreferrer",children:s}),p:({children:s})=>e.jsx("p",{className:"mb-3 break-words last:mb-0",children:s}),ul:({children:s})=>e.jsx("ul",{className:"mb-3 list-disc space-y-1 pl-5 last:mb-0",children:s}),ol:({children:s})=>e.jsx("ol",{className:"mb-3 list-decimal space-y-1 pl-5 last:mb-0",children:s}),h1:({children:s})=>e.jsx("h3",{className:"mb-2 font-semibold",children:s}),h2:({children:s})=>e.jsx("h3",{className:"mb-2 font-semibold",children:s}),h3:({children:s})=>e.jsx("h3",{className:"mb-2 font-semibold",children:s}),code:({children:s})=>e.jsx("code",{className:"break-all rounded bg-background/80 px-1 py-0.5 font-mono text-xs",children:s}),pre:({children:s})=>e.jsx("pre",{className:"mb-3 max-w-full overflow-x-auto whitespace-pre-wrap break-words rounded bg-background/80 p-3 font-mono text-xs last:mb-0",children:s})},children:t})})}function xs({kind:t,paperId:s,paperTitle:a,triggerClassName:r,onComplete:n}){const d=Hr[t],[o,i]=m.useState(!1),[c,p]=m.useState(null),[f,l]=m.useState(!1),[g,b]=m.useState(null),w=m.useRef(null),j=(c==null?void 0:c.status)==="queued"||(c==null?void 0:c.status)==="dispatching"||(c==null?void 0:c.status)==="running",v=c==null?void 0:c.id;m.useEffect(()=>{if(!j||!v)return;let S=!1;const _=window.setInterval(async()=>{try{const u=await d.get(v);S||(p(u),b(null))}catch(u){S||b(u instanceof Error?u.message:"Could not check job status.")}},2e3);return()=>{S=!0,window.clearInterval(_)}},[j,d,v]),m.useEffect(()=>{(c==null?void 0:c.status)!=="completed"||w.current===c.id||(w.current=c.id,n())},[c,n]);const C=async()=>{l(!0),b(null);try{p(await d.start(s))}catch(S){b(S instanceof Error?S.message:"Could not start Codex.")}finally{l(!1)}},P=()=>{p(null),b(null),w.current=null},I=async()=>{if(c){b(null);try{p(await d.cancel(c.id))}catch(S){b(S instanceof Error?S.message:"Could not cancel Codex.")}}};return e.jsxs(ee,{open:o,onOpenChange:i,children:[e.jsx("button",{type:"button",className:r,onClick:()=>i(!0),children:j?d.running:(c==null?void 0:c.status)==="completed"?d.complete:d.trigger}),e.jsxs(te,{className:"max-h-[90vh] w-[calc(100vw-2rem)] min-w-0 max-w-2xl overflow-hidden",children:[e.jsxs(se,{className:"min-w-0",children:[e.jsx(ae,{children:d.title}),e.jsx(re,{children:d.description(a)})]}),c?e.jsxs("div",{className:"min-w-0 space-y-3 overflow-hidden",children:[e.jsxs("div",{className:"font-mono text-xs uppercase tracking-wide text-muted-foreground",children:["Status: ",c.status]}),c.hf_job_url&&e.jsx("a",{className:"text-sm underline",href:c.hf_job_url,target:"_blank",rel:"noreferrer",children:"View Hugging Face Job"}),j&&e.jsxs("div",{className:"rounded-md border bg-muted/40 p-3 text-sm",children:[c.status==="queued"?"This job is queued and will start after the current Codex job finishes.":d.progress," ","This can take several minutes; you can close this window and return."]}),c.report&&e.jsx(Mr,{report:c.report}),c.error&&e.jsx("div",{className:"rounded-md border border-destructive/40 bg-destructive/10 p-3 text-sm text-destructive",children:c.error})]}):e.jsx("div",{className:"rounded-md border bg-muted/40 p-3 text-sm text-muted-foreground",children:d.notice}),g&&e.jsx("div",{className:"rounded-md border border-destructive/40 bg-destructive/10 p-3 text-sm text-destructive",children:g}),e.jsxs(le,{children:[e.jsx(L,{variant:"outline",onClick:()=>i(!1),children:j?"Close":"Cancel"}),j&&e.jsx(L,{variant:"outline",onClick:()=>void I(),children:"Cancel job"}),!c&&e.jsx(L,{onClick:C,disabled:f,children:f?"Starting…":d.action}),c&&!j&&e.jsx(L,{variant:"outline",onClick:P,children:"Run again"})]})]})]})}function qr(t){return e.jsx(xs,{...t,kind:"add-evals",triggerClassName:"edit-link"})}function Pe({accent:t,id:s,label:a}){return e.jsxs("div",{className:"section-rule paper-section-anchor",id:s,children:[e.jsx("span",{children:e.jsx("a",{href:`#${s}`,className:"section-anchor-link",children:a})}),t]})}function Or({canCopyBadge:t,canEdit:s,evaluationsByTask:a,evaluationsLoading:r,isAdmin:n,onCopyBadge:d,onEdit:o,onRefresh:i,paper:c,visibleEvaluationCount:p}){return e.jsxs(e.Fragment,{children:[e.jsx(Pe,{id:"results",label:"Results",accent:e.jsxs("span",{className:"accent",children:[p," benchmarks",t&&e.jsxs("button",{type:"button",className:"edit-link results-badge-copy",onClick:d,title:"Copy live leaderboard badges for your repository README",children:[e.jsx(J,{name:"copy",size:10})," Copy PwC badge"]}),n&&Ra()&&e.jsx(qr,{paperId:Number(c.id),paperTitle:c.title,onComplete:i}),s&&e.jsx("button",{type:"button",onClick:o,className:"edit-link",children:"edit"})]})}),r?e.jsx(Ie,{className:"h-32 w-full"}):a.length>0?a.map(f=>e.jsxs("div",{className:f.taskSlug?"paper-section-anchor":void 0,id:f.taskSlug?os(f.taskSlug):void 0,children:[e.jsxs("div",{className:"section-rule",children:[e.jsx("span",{children:f.taskSlug?e.jsxs(e.Fragment,{children:[e.jsx(ue,{to:`/tasks/${f.taskSlug}`,children:f.taskName}),e.jsx("a",{href:er(f.taskSlug),className:"section-anchor-link results-task-permalink","aria-label":`Permalink to ${f.taskName} results on this paper`,title:"Link to this task's results",children:"#"})]}):f.taskName}),e.jsxs("span",{className:"accent",children:[f.rows.length," ",f.rows.length===1?"result":"results"]})]}),e.jsxs("table",{className:"results-table",children:[e.jsxs("colgroup",{children:[e.jsx("col",{style:{width:"28%"}}),e.jsx("col",{style:{width:"28%"}}),e.jsx("col",{style:{width:"14%"}}),e.jsx("col",{style:{width:"12%"}}),e.jsx("col",{style:{width:"8%"}}),e.jsx("col",{style:{width:"10%"}})]}),e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:"Benchmark"}),e.jsx("th",{children:"Model"}),e.jsx("th",{children:"Metric"}),e.jsx("th",{children:"Value"}),e.jsx("th",{children:"Rank"}),e.jsx("th",{children:"Compare"})]})}),e.jsx("tbody",{children:f.rows.map(l=>{var g;return e.jsxs("tr",{children:[e.jsx("td",{className:"benchmark",children:l.dataset_slug?e.jsx(ue,{to:`/benchmark/${l.dataset_slug}`,children:l.dataset_name||"—"}):l.dataset_name||"—"}),e.jsxs("td",{className:"model",title:l.model_name||void 0,children:[l.hf_model_url?e.jsx("a",{href:l.hf_model_url,target:"_blank",rel:"noopener noreferrer",className:"model-hf-link",title:`Open ${l.model_name||"model"} on Hugging Face`,children:l.model_name||"—"}):l.model_name||"—",l.is_open===!1&&e.jsx(oa,{}),(l.external??l.is_external)&&e.jsx(la,{sourceUrl:l.source_url||l.external_source_url||l.result_url})]}),e.jsx("td",{className:"metric",children:l.best_metric}),e.jsx("td",{className:"value",children:Bs((g=l.metrics)==null?void 0:g[l.best_metric||""])}),e.jsx("td",{className:"rank",children:l.best_rank!=null?`#${l.best_rank}`:"—"}),e.jsx("td",{className:"compare",children:l.dataset_slug&&e.jsx(ue,{to:`/benchmark/${l.dataset_slug}?${[l.task_slug?`task=${encodeURIComponent(l.task_slug)}`:"",`eval=${encodeURIComponent(l.id)}`].filter(Boolean).join("&")}`,children:"Compare →"})})]},l.id)})})]})]},f.taskId)):e.jsx("p",{style:{fontFamily:"var(--mono)",fontSize:12,color:"var(--ink-faint)"},children:"No benchmark results recorded yet."})]})}var Nt="Radio",[Kr,bs]=vt(Nt),[Gr,Xr]=Kr(Nt),js=m.forwardRef((t,s)=>{const{__scopeRadio:a,name:r,checked:n=!1,required:d,disabled:o,value:i="on",onCheck:c,form:p,...f}=t,[l,g]=m.useState(null),b=Fe(s,v=>g(v)),w=m.useRef(!1),j=l?p||!!l.closest("form"):!0;return e.jsxs(Gr,{scope:a,checked:n,disabled:o,children:[e.jsx(ke.button,{type:"button",role:"radio","aria-checked":n,"data-state":_s(n),"data-disabled":o?"":void 0,disabled:o,value:i,...f,ref:b,onClick:Re(t.onClick,v=>{n||c==null||c(),j&&(w.current=v.isPropagationStopped(),w.current||v.stopPropagation())})}),j&&e.jsx(ws,{control:l,bubbles:!w.current,name:r,value:i,checked:n,required:d,disabled:o,form:p,style:{transform:"translateX(-100%)"}})]})});js.displayName=Nt;var vs="RadioIndicator",ys=m.forwardRef((t,s)=>{const{__scopeRadio:a,forceMount:r,...n}=t,d=Xr(vs,a);return e.jsx(Jt,{present:r||d.checked,children:e.jsx(ke.span,{"data-state":_s(d.checked),"data-disabled":d.disabled?"":void 0,...n,ref:s})})});ys.displayName=vs;var Qr="RadioBubbleInput",ws=m.forwardRef(({__scopeRadio:t,control:s,checked:a,bubbles:r=!0,...n},d)=>{const o=m.useRef(null),i=Fe(o,d),c=as(a),p=Zt(s);return m.useEffect(()=>{const f=o.current;if(!f)return;const l=window.HTMLInputElement.prototype,b=Object.getOwnPropertyDescriptor(l,"checked").set;if(c!==a&&b){const w=new Event("click",{bubbles:r});b.call(f,a),f.dispatchEvent(w)}},[c,a,r]),e.jsx(ke.input,{type:"radio","aria-hidden":!0,defaultChecked:a,...n,tabIndex:-1,ref:i,style:{...n.style,...p,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});ws.displayName=Qr;function _s(t){return t?"checked":"unchecked"}var Vr=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Qe="RadioGroup",[Wr]=vt(Qe,[es,bs]),ks=es(),Ns=bs(),[Jr,Yr]=Wr(Qe),Cs=m.forwardRef((t,s)=>{const{__scopeRadioGroup:a,name:r,defaultValue:n,value:d,required:o=!1,disabled:i=!1,orientation:c,dir:p,loop:f=!0,onValueChange:l,...g}=t,b=ks(a),w=zs(p),[j,v]=Yt({prop:d,defaultProp:n??null,onChange:l,caller:Qe});return e.jsx(Jr,{scope:a,name:r,required:o,disabled:i,value:j,onValueChange:v,children:e.jsx(Hs,{asChild:!0,...b,orientation:c,dir:w,loop:f,children:e.jsx(ke.div,{role:"radiogroup","aria-required":o,"aria-orientation":c,"data-disabled":i?"":void 0,dir:w,...g,ref:s})})})});Cs.displayName=Qe;var Es="RadioGroupItem",Ss=m.forwardRef((t,s)=>{const{__scopeRadioGroup:a,disabled:r,...n}=t,d=Yr(Es,a),o=d.disabled||r,i=ks(a),c=Ns(a),p=m.useRef(null),f=Fe(s,p),l=d.value===n.value,g=m.useRef(!1);return m.useEffect(()=>{const b=j=>{Vr.includes(j.key)&&(g.current=!0)},w=()=>g.current=!1;return document.addEventListener("keydown",b),document.addEventListener("keyup",w),()=>{document.removeEventListener("keydown",b),document.removeEventListener("keyup",w)}},[]),e.jsx(Ms,{asChild:!0,...i,focusable:!o,active:l,children:e.jsx(js,{disabled:o,required:d.required,checked:l,...c,...n,name:d.name,ref:f,onCheck:()=>d.onValueChange(n.value),onKeyDown:Re(b=>{b.key==="Enter"&&b.preventDefault()}),onFocus:Re(n.onFocus,()=>{var b;g.current&&((b=p.current)==null||b.click())})})})});Ss.displayName=Es;var Zr="RadioGroupIndicator",Ps=m.forwardRef((t,s)=>{const{__scopeRadioGroup:a,...r}=t,n=Ns(a);return e.jsx(ys,{...n,...r,ref:s})});Ps.displayName=Zr;var $s=Cs,Is=Ss,en=Ps;const ft=m.forwardRef(({className:t,...s},a)=>e.jsx($s,{className:Me("grid gap-2",t),...s,ref:a}));ft.displayName=$s.displayName;const $e=m.forwardRef(({className:t,...s},a)=>e.jsx(Is,{ref:a,className:Me("aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",t),...s,children:e.jsx(en,{className:"flex items-center justify-center",children:e.jsx(qs,{className:"h-2.5 w-2.5 fill-current text-current"})})}));$e.displayName=Is.displayName;const tn={pdf:"PDF",model:"Model",dataset:"Dataset",space:"Space",github:"GitHub"},gt=/^[A-Za-z0-9][A-Za-z0-9._-]*$/,sn=/^[A-Za-z0-9][\w.-]*\/[A-Za-z0-9][\w.-]*$/,an=20,xt="copy_to_bucket";function rn(t){const s=t.trim();if(!sn.test(s))return null;const[a,r]=s.split("/");return`https://huggingface.co/buckets/${encodeURIComponent(a)}/${encodeURIComponent(r)}`}function bt(t){return`pwc:bucket-copy:${t}`}function nn(t){if(typeof window>"u"||new URL(window.location.href).searchParams.get(xt)!==t)return null;try{const a=window.sessionStorage.getItem(bt(t));if(!a)return null;const r=JSON.parse(a);return r.paperId!==t||typeof r.bucketId!="string"||!["new","existing"].includes(r.destinationMode)||!["public","private"].includes(r.visibility)||!Array.isArray(r.selectedIds)||r.selectedIds.some(n=>typeof n!="string")?null:r}catch{return null}}function on(t,s=an){if(s<1)throw new Error("Bucket copy batch size must be positive");const a=[];for(let r=0;r!gt.test(c)))return null;const o=d.join("/"),i=s==="model"?"":`${s}s/`;return{id:`${s}:${o}`,kind:s,label:o,url:`https://huggingface.co/${i}${o}`,source:`hf://${i}${o}/`,destination:`${s}s/${o}/`,repoId:o}}catch{return null}}function ln(t){try{const s=new URL(t);if(s.hostname!=="github.com"&&s.hostname!=="www.github.com")return null;const a=s.pathname.split("/").filter(Boolean);if(a.length<2)return null;const r=a[0],n=a[1].replace(/\.git$/,"");if(!gt.test(r)||!gt.test(n))return null;const d=`${r}/${n}`;return{id:`github:${d}`,kind:"github",label:d,url:`https://github.com/${d}`,source:`https://github.com/${d}.git`,destination:`github/${d}/`}}catch{return null}}function cn({githubUrls:t,hfModelUrls:s,hfDatasetUrls:a,hfSpaceUrls:r,paperId:n,pdfName:d,pdfUrl:o}){const i=[o?{id:"pdf",kind:"pdf",label:"Paper PDF",url:o,source:o,destination:`paper/${d||n}.pdf`}:null,...s.map(p=>dt(p,"model")),...a.map(p=>dt(p,"dataset")),...r.map(p=>dt(p,"space")),...t.map(ln)],c=new Set;return i.filter(p=>!p||c.has(p.id)?!1:(c.add(p.id),!0))}function dn(t,s,a){const r=["# Requires the Hugging Face CLI: https://huggingface.co/docs/huggingface_hub/guides/cli",`HF_BUCKET=${ze(t.trim())}`];a.create&&r.push(`hf buckets create "$HF_BUCKET" --exist-ok${a.isPrivate?" --private":""}`);for(const o of s.filter(i=>i.kind!=="github"&&i.kind!=="pdf"))r.push(`hf cp ${ze(o.source)} "hf://buckets/$HF_BUCKET/${o.destination}"`);const n=s.find(o=>o.kind==="pdf");n&&r.push('PWC_PDF="$(mktemp)"',`trap 'rm -f "$PWC_PDF"' EXIT`,`curl --fail --location ${ze(n.source)} --output "$PWC_PDF"`,`hf cp "$PWC_PDF" "hf://buckets/$HF_BUCKET/${n.destination}"`);const d=s.filter(o=>o.kind==="github");if(d.length){r.push('PWC_COPY_DIR="$(mktemp -d)"',`trap 'rm -rf "$PWC_COPY_DIR"' EXIT`);for(const o of d){const i=`$PWC_COPY_DIR/${o.destination.replace(/\/$/,"")}`;r.push(`git clone --depth 1 -- ${ze(o.source)} "${i}"`,`hf sync "${i}" "hf://buckets/$HF_BUCKET/${o.destination}" --exclude '.git/**'`)}}return r.join(` -`)}function un(t){return`${(t.split(/[:|–—]/,1)[0]||t).normalize("NFKD").replace(/[\u0300-\u036f]/g,"").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"").slice(0,48).replace(/-+$/g,"")||"paper"}-artifacts`}function mn(t){const{toast:s}=oe(),a=m.useMemo(()=>cn({githubUrls:t.githubUrls,hfDatasetUrls:t.hfDatasetUrls,hfModelUrls:t.hfModelUrls,hfSpaceUrls:t.hfSpaceUrls,paperId:t.paperId,pdfName:t.pdfName,pdfUrl:t.pdfUrl}),[t.githubUrls,t.hfDatasetUrls,t.hfModelUrls,t.hfSpaceUrls,t.paperId,t.pdfName,t.pdfUrl]),r=m.useMemo(()=>nn(t.paperId),[t.paperId]),[n,d]=m.useState(!!r),[o,i]=m.useState((r==null?void 0:r.destinationMode)??"new"),[c,p]=m.useState((r==null?void 0:r.bucketId)??""),[f,l]=m.useState((r==null?void 0:r.visibility)??"public"),[g,b]=m.useState(()=>new Set((r==null?void 0:r.selectedIds)??a.map(h=>h.id))),[w,j]=m.useState(!1),[v,C]=m.useState(null),[P,I]=m.useState(!!r),S=a.filter(h=>g.has(h.id)),_=S.length===a.length,u=rn(c),x=u!==null,E=dn(c,S,{create:o==="new",isPrivate:f==="private"}),F=(h,$)=>{b(R=>{const T=new Set(R);return $?T.add(h):T.delete(h),T})},M=async()=>{try{await navigator.clipboard.writeText(E),s({title:"Bucket copy commands copied",description:"Run them in a terminal where the Hugging Face CLI is signed in."})}catch{s({title:"Copy failed",description:"Could not access the clipboard. Select and copy the commands manually.",variant:"destructive"})}},O=m.useCallback(()=>{const h=Os("/api/v1/auth/hf/login"),$=new URL(window.location.href);$.searchParams.set(xt,t.paperId),window.sessionStorage.setItem(bt(t.paperId),JSON.stringify({paperId:t.paperId,bucketId:c.trim(),destinationMode:o,visibility:f,selectedIds:Array.from(g)}));const R=new URLSearchParams({return_to:$.toString(),authorize_bucket:"true"});o==="new"&&R.set("bucket_create","true"),window.location.assign(`${h}?${R.toString()}`)},[c,o,t.paperId,g,f]),K=m.useCallback(async()=>{if(!t.isSignedIn){O();return}j(!0);let h=0,$=0;try{const R=S.filter(z=>z.kind!=="pdf"&&z.kind!=="github"&&!!z.repoId).map(z=>({kind:z.kind,repo_id:z.repoId})),T=on(R);T.length||T.push([]);for(const[z,H]of T.entries()){C({current:z+1,total:T.length});const Y=await W.copyToBucket(t.paperId,{bucket_id:c.trim(),create:z===0&&o==="new",private:f==="private",include_pdf:z===0&&S.some(Z=>Z.kind==="pdf"),artifacts:H});h+=Y.copied.length,$+=Y.errors.length}const U=S.filter(z=>z.kind==="github").length;s({title:$?"Bucket copy partially completed":"Copied to bucket",description:[`${h} item${h===1?"":"s"} copied.`,$?`${$} item${$===1?"":"s"} failed.`:"",U?"Use the generated commands below to copy GitHub repositories.":""].filter(Boolean).join(" "),variant:$?"destructive":void 0,action:u?e.jsx(Ks,{altText:"Open destination bucket",asChild:!0,children:e.jsx("a",{href:u,target:"_blank",rel:"noopener noreferrer",children:"Open bucket"})}):void 0}),!$&&!U&&d(!1)}catch(R){if(R instanceof ht&&R.code==="bucket_authorization_required"){O();return}s({title:h?"Bucket copy partially completed":"Bucket copy failed",description:h?`${h} item${h===1?"":"s"} copied before the request failed. You can retry or use the CLI commands below.`:R instanceof ht&&typeof R.detail=="string"?R.detail:"Hugging Face could not complete the copy. You can still use the CLI commands below.",variant:"destructive"})}finally{j(!1),C(null)}},[O,c,u,o,t.isSignedIn,t.paperId,S,s,f]);m.useEffect(()=>{if(!P||!t.isSignedIn)return;I(!1),window.sessionStorage.removeItem(bt(t.paperId));const h=new URL(window.location.href);h.searchParams.delete(xt),window.history.replaceState({},"",`${h.pathname}${h.search}${h.hash}`),K()},[K,t.isSignedIn,t.paperId,P]);const G=()=>{b(new Set(a.map(h=>h.id))),!c&&t.suggestedBucketId&&p(t.suggestedBucketId),d(!0)};return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"sidebar-card copy-to-bucket-card",children:[e.jsxs("button",{type:"button",className:"copy-to-bucket-trigger",onClick:G,children:[e.jsx("span",{className:"copy-to-bucket-arrow","aria-hidden":"true",children:"→"}),e.jsx("span",{className:"copy-to-bucket-title",children:"Copy to bucket"}),e.jsx("span",{className:"copy-to-bucket-new",children:"New"})]}),e.jsx("div",{className:"copy-to-bucket-meta",children:a.length?`${a.length} linked artifact${a.length===1?"":"s"}`:"No linked artifacts yet"})]}),e.jsx(ee,{open:n,onOpenChange:d,children:e.jsxs(te,{className:"max-h-[90vh] max-w-2xl grid-rows-[auto_minmax(0,1fr)_auto] overflow-hidden",children:[e.jsxs(se,{children:[e.jsxs(ae,{className:"flex items-center gap-2",children:[e.jsx("span",{className:"copy-to-bucket-dialog-arrow","aria-hidden":"true",children:"→"}),"Copy to bucket"]}),e.jsx(re,{children:"Keep your own copy of this paper's PDF, linked code, and Hugging Face artifacts. Hub repositories use Xet's server-side copy; GitHub repositories use the generated CLI fallback."})]}),e.jsx("div",{className:"-mx-6 min-h-0 overflow-y-auto px-6",children:a.length?e.jsxs("div",{className:"space-y-5",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(de,{children:"Choose your destination"}),e.jsxs(ft,{value:o,onValueChange:h=>i(h),className:"grid grid-cols-2 gap-2",children:[e.jsxs(de,{className:"bucket-choice",children:[e.jsx($e,{value:"new"}),"New bucket"]}),e.jsxs(de,{className:"bucket-choice",children:[e.jsx($e,{value:"existing"}),"Existing bucket"]})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(de,{htmlFor:"bucket-id",children:"Bucket name"}),e.jsx(V,{id:"bucket-id",value:c,onChange:h=>p(h.target.value),placeholder:t.suggestedBucketId||"username/paper-artifacts","aria-invalid":c.length>0&&!x}),e.jsxs("div",{className:"flex items-center justify-between gap-3 text-xs",children:[e.jsx("p",{className:"text-muted-foreground",children:"Use the full Hugging Face bucket ID: namespace/name."}),u&&e.jsxs("a",{href:u,target:"_blank",rel:"noopener noreferrer",className:"inline-flex shrink-0 items-center gap-1 underline underline-offset-4",children:["View bucket",e.jsx(J,{name:"external",size:10})]})]})]}),o==="new"&&e.jsxs("div",{className:"space-y-2",children:[e.jsx(de,{children:"Bucket visibility"}),e.jsxs(ft,{value:f,onValueChange:h=>l(h),className:"flex gap-5",children:[e.jsxs(de,{className:"flex items-center gap-2 font-normal",children:[e.jsx($e,{value:"public"}),"Public"]}),e.jsxs(de,{className:"flex items-center gap-2 font-normal",children:[e.jsx($e,{value:"private"}),"Private"]})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center justify-between gap-3",children:[e.jsx(de,{children:"Artifacts"}),e.jsx(L,{type:"button",variant:"outline",size:"sm",className:"h-7 px-2 text-xs",onClick:()=>b(_?new Set:new Set(a.map(h=>h.id))),children:_?"Deselect all":"Select all"})]}),e.jsx("div",{className:"bucket-artifact-list",children:a.map(h=>e.jsxs("div",{className:"bucket-artifact-row",children:[e.jsx(Xe,{id:`bucket-artifact-${h.id}`,checked:g.has(h.id),onCheckedChange:$=>F(h.id,$===!0)}),e.jsxs(de,{htmlFor:`bucket-artifact-${h.id}`,className:"min-w-0 flex-1 cursor-pointer font-normal",children:[e.jsx("span",{className:"bucket-artifact-kind",children:tn[h.kind]}),e.jsx("span",{className:"bucket-artifact-name",children:h.label})]}),e.jsxs("a",{href:we(h.url)??void 0,target:"_blank",rel:"noopener noreferrer",className:"bucket-artifact-open",children:["Open",e.jsx(J,{name:"external",size:10})]})]},h.id))}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"The PDF and Hugging Face artifacts can be copied directly. GitHub repositories require the CLI workflow below."})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(de,{htmlFor:"bucket-copy-commands",children:"CLI fallback"}),e.jsx("pre",{id:"bucket-copy-commands",className:"bucket-copy-commands h-[190px]",children:x?E:"Enter a bucket name above to prepare the copy commands."})]})]}):e.jsx("p",{className:"py-5 text-sm text-muted-foreground",children:"This paper does not have a linked GitHub repository or Hugging Face artifact to copy yet."})}),e.jsxs(le,{children:[e.jsx("a",{href:"https://huggingface.co/docs/huggingface_hub/en/guides/buckets",target:"_blank",rel:"noopener noreferrer",className:"mr-auto text-sm text-muted-foreground underline underline-offset-4",children:"About Hugging Face Buckets"}),e.jsxs(L,{type:"button",onClick:M,variant:"outline",disabled:!x||S.length===0,children:[e.jsx(J,{name:"copy",size:12}),"Copy commands"]}),e.jsx(L,{type:"button",onClick:K,disabled:w||t.isSignedIn&&(!x||!S.some(h=>h.kind!=="github")),children:w?v&&v.total>1?`Copying ${v.current}/${v.total}…`:"Copying…":t.isSignedIn?"Copy now":"Sign in & copy"})]})]})})]})}function hn({isLoading:t,papers:s}){return t?e.jsxs("div",{className:"sidebar-card","aria-busy":"true",children:[e.jsx("div",{className:"sidebar-card-title",children:"Related papers"}),e.jsx("div",{className:"related-meta",children:"Finding related work…"})]}):s!=null&&s.length?e.jsxs("div",{className:"sidebar-card",children:[e.jsx("div",{className:"sidebar-card-title",children:"Related papers"}),s.map(a=>e.jsxs(ue,{to:`/paper/${a.arxiv_id||a.id}`,target:"_blank",rel:"noopener noreferrer",className:"related-paper",style:{textDecoration:"none",color:"inherit"},children:[e.jsx("div",{className:"related-title",children:e.jsx(He,{title:a.title})}),e.jsxs("div",{className:"related-meta",children:[e.jsx("span",{children:a.arxiv_id?`arXiv:${a.arxiv_id}`:"External resource"}),a.citation_count!=null&&e.jsxs("span",{children:[a.citation_count.toLocaleString()," cites"]})]})]},a.id))]}):null}const pn=/(https?:\/\/[^\s]+)/g;function fn({size:t=12}){return e.jsx("svg",{width:t,height:t,viewBox:"0 0 24 24","aria-hidden":"true",focusable:"false",children:e.jsx("path",{fill:"currentColor",d:"M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"})})}function Kt(t){return t>=1e6?`${(t/1e6).toFixed(1)}M`:t>=1e3?`${(t/1e3).toFixed(1)}k`:String(t)}function gn(t){return new Date(t).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"})}function xn({text:t}){return e.jsx("p",{className:"x-thread-text",children:t.split(pn).map((s,a)=>a%2===1?e.jsx("span",{className:"x-thread-link",children:s.replace(/^https?:\/\/(www\.)?/,"").replace(/\/$/,"")},a):e.jsx(m.Fragment,{children:s},a))})}function bn({thread:t}){const[s,a]=m.useState(!1);return!t.author_avatar_url||s?e.jsx("span",{className:"x-thread-avatar x-thread-avatar--fallback","aria-hidden":"true",children:t.author_name.charAt(0).toUpperCase()}):e.jsx("img",{className:"x-thread-avatar",src:t.author_avatar_url,alt:"",loading:"lazy",referrerPolicy:"no-referrer",onError:()=>a(!0)})}function jn(){var t;return((t=window.matchMedia)==null?void 0:t.call(window,"(prefers-reduced-motion: reduce)").matches)??!1}function vn({thread:t}){const[s,a]=m.useState(!1),[r,n]=m.useState(null),[d,o]=m.useState(!1),i=m.useRef(null),{targetRef:c,isIntersecting:p}=Ta({rootMargin:"200px"}),f=t.video_url;if(m.useEffect(()=>{if(!f||r||d||!p||jn())return;const g=new AbortController;return fetch(f,{referrerPolicy:"no-referrer",signal:g.signal}).then(b=>{if(!b.ok)throw new Error(`HTTP ${b.status}`);return b.blob()}).then(b=>n(URL.createObjectURL(b))).catch(()=>{g.signal.aborted||o(!0)}),()=>g.abort()},[f,r,d,p]),m.useEffect(()=>()=>{r&&URL.revokeObjectURL(r)},[r]),m.useEffect(()=>{const g=i.current;g&&(p?g.play().catch(()=>{}):g.pause())},[p,r]),!t.media_url||s)return null;const l=r&&!d;return e.jsx("div",{className:"x-thread-media",ref:c,children:l?e.jsx("video",{ref:i,src:r,poster:t.media_url,muted:!0,loop:!0,playsInline:!0,autoPlay:!0,"aria-label":"Video",onError:()=>o(!0)}):e.jsxs(e.Fragment,{children:[e.jsx("img",{src:t.media_url,alt:"",loading:"lazy",referrerPolicy:"no-referrer",onError:()=>a(!0)}),t.media_type==="video"&&e.jsx("span",{className:"x-thread-play","aria-label":"Video",children:"▶"})]})})}function yn({thread:t}){const s=we(t.url);return s?e.jsxs("a",{href:s,target:"_blank",rel:"noopener noreferrer",className:"x-thread",children:[e.jsxs("div",{className:"x-thread-header",children:[e.jsx(bn,{thread:t}),e.jsxs("span",{className:"x-thread-author",children:[e.jsx("span",{className:"x-thread-name",children:t.author_name}),e.jsxs("span",{className:"x-thread-handle",children:["@",t.author_handle]})]}),e.jsx("span",{className:"x-thread-logo",children:e.jsx(fn,{})})]}),e.jsx(xn,{text:t.text}),e.jsx(vn,{thread:t}),e.jsxs("div",{className:"x-thread-meta",children:[t.posted_at&&e.jsx("time",{dateTime:t.posted_at,children:gn(t.posted_at)}),t.like_count!=null&&e.jsxs("span",{children:["♥ ",Kt(t.like_count)]}),t.reply_count!=null&&t.reply_count>0&&e.jsxs("span",{children:[Kt(t.reply_count)," ",t.reply_count===1?"reply":"replies"]}),e.jsx("span",{className:"x-thread-read",children:"Read on X →"})]})]}):null}function wn({onEdit:t,threads:s}){return e.jsxs("div",{className:"sidebar-card",children:[e.jsxs("div",{className:"sidebar-card-title",children:[e.jsx("span",{children:"X threads"}),e.jsxs("span",{className:"badge",children:[s.length," post",s.length===1?"":"s",e.jsx("button",{type:"button",onClick:t,className:"edit-link",children:"edit"})]})]}),s.length>0?e.jsx("div",{className:"x-thread-list",children:s.map(a=>e.jsx(yn,{thread:a},a.tweet_id))}):e.jsx("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",padding:"6px 0"},children:"No author threads linked yet."})]})}const ut=3,Gt=3;function _n(t){return t>=1e3?`${(t/1e3).toFixed(1)}k`:String(t)}function kn({allHfArtifactUrls:t,citationCopied:s,citationDisplay:a,hfArtifactViewer:r,onCopyCitation:n,onEditHfArtifacts:d,onEditRepositories:o,onEditXThreads:i,paper:c,relatedIsLoading:p,relatedPapers:f,user:l}){var v;const[g,b]=m.useState(!1),w=[...c.repositories??[]].sort((C,P)=>Number(P.is_official)-Number(C.is_official)||(P.num_stars||0)-(C.num_stars||0)),j=(g?w:w.slice(0,ut)).map(C=>({...C,safeHref:we(C.url)}));return e.jsxs("aside",{className:"detail-sidebar",children:[e.jsxs("div",{className:"sidebar-card",children:[e.jsxs("div",{className:"sidebar-card-title",children:[e.jsx("span",{children:"GitHub"}),e.jsxs("span",{className:"badge",children:[w.length," repo",w.length===1?"":"s",e.jsx("button",{type:"button",onClick:o,className:"edit-link",children:"edit"})]})]}),j.filter(({safeHref:C})=>C).map(C=>e.jsxs("a",{href:C.safeHref??void 0,target:"_blank",rel:"noopener noreferrer",className:"code-line",style:{textDecoration:"none"},children:[e.jsxs("span",{className:"code-line-repo",children:[e.jsx(J,{name:"github",size:12}),e.jsxs("span",{className:"code-line-repo-name",children:[C.owner,"/",C.name]}),C.is_official&&e.jsx("span",{className:"code-line-official",children:"· Official"})]}),e.jsxs("span",{className:"code-line-stars",children:["★ ",_n(C.num_stars)]})]},C.id)),w.length===0&&e.jsx("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",padding:"6px 0"},children:"No GitHub repositories linked yet."}),w.length>ut&&e.jsx("button",{type:"button",className:"bench-show-more",onClick:()=>b(C=>!C),children:g?"− show top 3":`+ show ${w.length-ut} more repos`})]}),e.jsx(Nn,{viewer:r,onEdit:d}),e.jsx(wn,{threads:c.x_threads??[],onEdit:i}),e.jsx(mn,{githubUrls:w.map(({url:C})=>C),hfModelUrls:t.models,hfDatasetUrls:t.datasets,hfSpaceUrls:t.spaces,paperId:c.id,pdfName:((v=c.arxiv_id)==null?void 0:v.replace("/","-"))||c.id,pdfUrl:c.url_pdf,isSignedIn:!!l,suggestedBucketId:l?`${l.username}/${un(c.title)}`:void 0}),e.jsx(hn,{isLoading:p,papers:f}),e.jsxs("div",{className:"sidebar-card",children:[e.jsxs("div",{className:"sidebar-card-title",children:[e.jsx("span",{children:"Citation"}),e.jsxs("button",{type:"button",className:"citation-copy-btn",onClick:n,"aria-label":"Copy citation to clipboard",title:"Copy citation to clipboard",children:[e.jsx(J,{name:"copy",size:11}),s?"Copied":"Copy"]})]}),e.jsx("pre",{style:{fontFamily:"var(--mono)",fontSize:10.5,lineHeight:1.5,color:"var(--ink-soft)",whiteSpace:"pre-wrap",wordBreak:"break-word",margin:0},children:a})]})]})}function Nn({onEdit:t,viewer:s}){return e.jsxs("div",{className:"sidebar-card",children:[e.jsxs("div",{className:"sidebar-card-title",children:[s.paperHref?e.jsx("a",{href:s.paperHref,target:"_blank",rel:"noopener noreferrer",style:{color:"inherit",textDecoration:"none"},children:"🤗 Hugging Face"}):e.jsx("span",{children:"🤗 Hugging Face"}),e.jsx("button",{type:"button",onClick:t,className:"edit-link",children:"edit"})]}),s.isLoading?e.jsx(Ie,{className:"h-16 w-full"}):e.jsxs(e.Fragment,{children:[s.rows.map(a=>e.jsx(Cn,{...a},a.label)),s.footer&&e.jsx("div",{style:{fontFamily:"var(--mono)",fontSize:10,color:"var(--ink-faint)",marginTop:12},children:s.footer})]})]})}function Cn({count:t,href:s,isLimited:a,label:r,links:n}){const[d,o]=m.useState(!1),i=((n==null?void 0:n.length)??0)>Gt,c=d?n:n==null?void 0:n.slice(0,Gt),p=t!=null?`${t}${a?"+":""}`:"—";return e.jsxs("div",{className:"hf-artifact-row",children:[e.jsxs("div",{className:"hf-artifact-row-header",children:[e.jsx("span",{children:r}),t?e.jsx("a",{href:s,target:"_blank",rel:"noopener noreferrer",className:"hf-artifact-count",children:p}):e.jsx("span",{className:"hf-artifact-count hf-artifact-count--empty",children:p})]}),c!=null&&c.length?e.jsxs("div",{className:"hf-artifact-links",children:[c.map(f=>e.jsx("a",{href:f.href,target:"_blank",rel:"noopener noreferrer",children:f.label},f.href)),i&&e.jsx("button",{type:"button",className:"hf-artifact-toggle","aria-expanded":d,onClick:()=>o(f=>!f),children:d?"Show fewer":`View all ${n.length}`})]}):null]})}function En(t,s){const a=t.arxiv_id?` (arXiv:${t.arxiv_id.replace(/v\d+$/i,"")})`:"";return`About the paper "${t.title}"${a}: ${s}`}function Sn({paper:t,readerChatRoute:s}){const a=Gs()&&!!(t.id&&t.abstract),r=t.suggested_questions,{data:n}=ne({queryKey:["paper-suggested-questions",t.id],queryFn:()=>W.suggestedQuestions(String(t.id)),enabled:a&&Array.isArray(r)&&r.length===0,staleTime:o=>{var i;return(i=o.state.data)!=null&&i.questions.length?1/0:0},retry:!1}),d=r!=null&&r.length?r:(n==null?void 0:n.questions)??[];return!a||d.length===0?null:e.jsx("ul",{className:"suggested-questions","aria-label":"Ask about this paper",children:d.map(o=>{const i=s?`${s}?q=${encodeURIComponent(o)}`:`/chat?q=${encodeURIComponent(En(t,o))}`;return e.jsx("li",{children:e.jsxs(ue,{className:"suggested-question",to:i,onClick:s?()=>ss(s):void 0,children:[e.jsx(J,{name:"chat",size:12}),e.jsx("span",{children:o})]})},o)})})}const Xt=360;function Pn({canEdit:t,onEditMethods:s,onEditTasks:a,paper:r,readerChatRoute:n}){var f,l;const[d,o]=m.useState(!1),i=r.abstract||"",c=i.length>Xt,p=d||!c?i:`${i.slice(0,Xt)}…`;return e.jsxs(e.Fragment,{children:[r.tldr&&e.jsxs(e.Fragment,{children:[e.jsx(Pe,{id:"tldr",label:"TL;DR"}),e.jsx("div",{className:"tldr-box",children:r.tldr})]}),e.jsx(Sn,{paper:r,readerChatRoute:n}),e.jsx(Pe,{id:"abstract",label:"Abstract"}),e.jsx("p",{className:"abstract-text",style:{marginBottom:8},children:e.jsx(ia,{text:p})}),c&&e.jsx("button",{type:"button",className:"read-full",onClick:()=>o(g=>!g),children:d?"− collapse abstract":"+ read full abstract"}),e.jsx(Pe,{id:"tasks",label:"Tasks",accent:e.jsxs("span",{className:"accent",children:[((f=r.tasks)==null?void 0:f.length)||0," tagged",t&&e.jsx("button",{type:"button",onClick:a,className:"edit-link",children:"edit"})]})}),e.jsx("div",{className:"paper-tags",style:{marginBottom:8},children:(r.tasks??[]).map(g=>e.jsx(ta,{slug:g.slug||"",label:g.name},g.id))}),e.jsx(Pe,{id:"methods",label:"Methods",accent:e.jsxs("span",{className:"accent",children:[((l=r.methods)==null?void 0:l.length)||0," used",t&&e.jsx("button",{type:"button",onClick:s,className:"edit-link",children:"edit"})]})}),e.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:6,marginBottom:8},children:(r.methods??[]).map(g=>e.jsx(sa,{method:g},g.id))})]})}const Ce=["my-bookmark-ids"],jt="pwc:pending-bookmark";function $n(t){window.sessionStorage.setItem(jt,JSON.stringify(t)),window.location.assign(Ua(!0))}function In(){var r,n;const{user:t}=Oe(),s=ne({queryKey:Ce,queryFn:()=>pt.getBookmarkIds(),enabled:!!t,staleTime:60*1e3,refetchOnWindowFocus:!1}),a=qe.useMemo(()=>{var d;return new Set(((d=s.data)==null?void 0:d.paper_ids)??[])},[(r=s.data)==null?void 0:r.paper_ids]);return{ids:((n=s.data)==null?void 0:n.paper_ids)??[],idSet:a,isLoading:s.isLoading,isError:s.isError}}function Rn(){const{user:t}=Oe(),s=he(),a=ce({mutationFn:async({paperId:n,isBookmarked:d})=>{d?await pt.removeBookmark(n):await pt.addBookmark(n)},onMutate:async({paperId:n,isBookmarked:d})=>{await s.cancelQueries({queryKey:Ce});const o=s.getQueryData(Ce),i=typeof n=="string"?Number(n):n,c=(o==null?void 0:o.paper_ids)??[],p=d?c.filter(f=>f!==i):[i,...c.filter(f=>f!==i)];return s.setQueryData(Ce,{paper_ids:p}),{previous:o}},onError:(n,d,o)=>{o!=null&&o.previous&&s.setQueryData(Ce,o.previous),n instanceof ht&&n.code==="saved_papers_bucket_authorization_required"&&$n(d)},onSettled:()=>{s.invalidateQueries({queryKey:Ce}),s.invalidateQueries({queryKey:[...ye.feeds.saved]})}});return qe.useEffect(()=>{if(!t||a.isPending)return;const n=new URL(window.location.href);if(n.searchParams.get(Bt)!=="1")return;n.searchParams.delete(Bt),window.history.replaceState({},"",`${n.pathname}${n.search}${n.hash}`);const d=window.sessionStorage.getItem(jt);if(d){window.sessionStorage.removeItem(jt);try{const o=JSON.parse(d);(typeof o.paperId=="number"||typeof o.paperId=="string")&&typeof o.isBookmarked=="boolean"&&a.mutate(o)}catch{}}},[a,t]),{toggle:qe.useCallback((n,d)=>{if(!t){if(ts())return;const o=typeof window<"u"?window.location.pathname+window.location.search:"/";window.location.href=Xs(`/api/v1/auth/hf/login?return_to=${encodeURIComponent(o)}`);return}a.mutate({paperId:n,isBookmarked:d})},[a,t]),isPending:a.isPending}}const An=({paperId:t})=>{const{user:s}=Oe(),{idSet:a}=In(),{toggle:r,isPending:n}=Rn();if(ts())return null;const d=Number(t),o=!!s&&a.has(d),i=()=>{Number.isFinite(d)&&r(d,o)},c=s&&o?"Saved":"Save",p=s?o?"Remove from saved papers":"Save this paper":"Sign in with Hugging Face to save this paper";return e.jsxs("button",{type:"button",className:`action-btn${o?" is-saved":""}`,onClick:i,disabled:n,"aria-pressed":o,"aria-label":p,title:p,children:[e.jsx(J,{name:"bookmark",size:12}),c]})};function mt({children:t,showEdit:s=!1,onEdit:a,editAriaLabel:r}){return s?e.jsxs("span",{className:"action-btn-composite",children:[t,e.jsx("button",{type:"button",className:"action-btn-segment action-btn-edit",onClick:a,"aria-label":r,children:"edit"})]}):t}function Ln(t){return e.jsx(xs,{...t,kind:"enrich-paper",triggerClassName:"action-btn"})}const Fn={tasks:"tasks",methods:"methods",results:"evaluation results",repositories:"GitHub repositories","project-pages":"project pages","hf-artifacts":"Hugging Face artifacts",organizations:"organizations","source-url":"source URL","x-threads":"X threads"};function Qt(t){if(!t)return"—";try{return new Date(t).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"})}catch{return"—"}}function Vt(t,s){try{const a=new URL(t),n=a.pathname.replace(/\/$/,"").split("/").filter(Boolean).at(-1);return n?n.replace(/[-_]+/g," "):a.hostname.replace(/^www\./,"")}catch{return s}}const _i=()=>{const{arxivId:t}=Qs(),s=Wt(),{toast:a}=oe(),{user:r}=Oe(),n=(r==null?void 0:r.is_admin)??!1,d=!!r,o=Ha(r),{arxivId:i,evaluations:c,evaluationsByTask:p,evaluationsLoading:f,paper:l,paperError:g,paperLoading:b,presentation:w,refetchEvaluations:j,refetchPaper:v,relatedQuery:C,versions:P,visibleEvaluations:I}=ar(t,o),[S,_]=m.useState(!1),{activeEditor:u,openEditor:x,setEditorOpen:E}=ir();m.useEffect(()=>{o!=="direct"||!(l!=null&&l.id)||(u&&u!=="results"&&W.primeCurationState(l.id).catch(()=>{}),u==="results"&&Ke.primeCurationState(l.id).catch(()=>{}))},[u,o,l==null?void 0:l.id]);const[F,M]=m.useState(null),O=m.useRef(!1);m.useEffect(()=>{if(!r||!l||O.current)return;const N=sessionStorage.getItem("pwc:fresh-auth-edit");if(!N)return;O.current=!0;const q=nr(N);if(!W.freshAuthMutationDraft()){sessionStorage.removeItem("pwc:fresh-auth-edit"),q&&x(q);return}if(!window.confirm("You signed in again. Apply the saved destructive catalog edit now? The server will recheck the current catalog version before changing anything.")){a({title:"Edit kept locally",description:"Nothing was changed. Reload this paper when you are ready to confirm the saved edit."});return}W.resumeFreshAuthMutation().then(()=>{a({title:"Edit applied",description:"The restored catalog edit was applied."}),window.location.reload()}).catch(At=>{a({variant:"destructive",title:"Could not apply the saved edit",description:At instanceof Error?At.message:"Please reload and review the edit again."})})},[x,l,a,r]);const K=m.useMemo(()=>{if(!r||!(l!=null&&l.author_links))return!1;const N=r.username.toLowerCase();return l.author_links.some(q=>!!q.hf_username&&q.hf_username.toLowerCase()===N)},[r,l==null?void 0:l.author_links]),G=N=>{if(!d){M(N);return}x(N)},[h,$]=m.useState("idle"),[R,T]=m.useState(null),[U,z]=m.useState(null),H=async()=>{if(i){$("indexing"),T(null),z(null);try{await W.indexFromArxiv(i),a({title:"Indexed",description:"Paper added to database."}),setTimeout(()=>v(),1200),$("idle")}catch(N){const q=N;let xe=q.message||"Failed to index paper";if(q.response)try{xe=JSON.parse(q.response).detail||xe}catch{xe=q.response}T(xe),(q.status===429||q.status===503)&&z("Try again later after arXiv has lifted the temporary limit."),$("idle")}}},Y=(w==null?void 0:w.citationCopy)??"",Z=(w==null?void 0:w.copyableRanks)??[],[Ve,De]=m.useState(!1),ve=async()=>{if(Y)try{await navigator.clipboard.writeText(Y),De(!0),a({title:"Citation copied",description:"BibTeX entry copied to clipboard."}),window.setTimeout(()=>De(!1),1500)}catch{a({title:"Copy failed",description:"Could not access the clipboard. Please copy manually.",variant:"destructive"})}},y=async()=>{if(!l)return;const N=l.arxiv_id||l.id,q=qa(N,Z);if(q)try{await navigator.clipboard.writeText(q),a({title:"PwC badges copied",description:"Each badge follows its current leaderboard result."})}catch{a({title:"Copy failed",description:"Could not access the clipboard. Please try again.",variant:"destructive"})}};if(b)return e.jsxs("div",{className:"page",children:[e.jsx(Ie,{className:"h-12 w-3/4 mb-4"}),e.jsx(Ie,{className:"h-6 w-1/3 mb-8"}),e.jsx(Ie,{className:"h-64 w-full"})]});if(g||!l)return e.jsxs("div",{className:"page",children:[e.jsxs("div",{className:"breadcrumb",children:[e.jsx(ue,{to:"/papers",children:"Papers"}),e.jsx("span",{className:"sep",children:"/"}),e.jsxs("span",{style:{color:"var(--ink)"},children:["arXiv:",i]})]}),e.jsx("h1",{className:"detail-title",children:"Paper not indexed yet"}),e.jsxs("p",{style:{fontFamily:"var(--serif)",color:"var(--ink-soft)",marginTop:16,maxWidth:640},children:["We don't have ",e.jsxs("span",{style:{fontFamily:"var(--mono)"},children:["arXiv:",i]})," in the database. You can index it from arXiv right now."]}),R&&e.jsx(pa,{variant:"destructive",className:"mt-4 max-w-xl",children:e.jsxs(fa,{children:[e.jsx("div",{children:R}),U&&e.jsx("div",{className:"mt-2",children:U})]})}),e.jsxs("div",{className:"action-row",children:[n&&e.jsxs("button",{className:"action-btn",onClick:H,disabled:h==="indexing",children:[e.jsx(J,{name:"sparkle",size:12}),h==="indexing"?"Indexing…":"Index from arXiv"]}),e.jsx(L,{variant:"outline",onClick:()=>s("/papers"),children:"Browse Papers"})]})]});if(!w)return null;const{allHfArtifactUrls:k,authorEntries:A,citationDisplay:D,hasIntroducedItems:Q,hasLineageItems:X,hfArtifactViewer:B,introducedBenchmarks:Rs,introducedFrameworks:Ct,introducedMethods:As,introducedSummary:Ls,numPages:Et,paperSourceLabel:St,predecessorPapers:We,projectPages:Ee,safeAbstractUrl:Pt,safeConferenceUrl:$t,safePdfUrl:It,sourceActionLabel:Fs,successorPapers:Je}=w,Be=12,Se=ca(l,i),Ts=Se&&Lt()&&Vs()&&(!Ft()||n)?Se:null,Rt=S||A.length<=Be?A:A.slice(0,Be);return e.jsxs("div",{className:"page",children:[e.jsxs("div",{className:"breadcrumb",children:[e.jsx(ue,{to:"/",children:"Trending"}),e.jsx("span",{className:"sep",children:"/"}),e.jsx("span",{children:St})]}),e.jsxs("div",{className:"detail-grid",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"detail-hero",children:[e.jsxs("div",{className:"detail-hero-main",children:[e.jsxs("h1",{className:"detail-title",children:[e.jsx(He,{title:l.title}),(l.organizations||[]).map(N=>e.jsx(ue,{to:`/orgs/${N.slug}`,className:`detail-title-org${N.logo_url?" detail-title-org--logo":""}`,title:N.name,"aria-label":N.name,children:N.logo_url?e.jsx("img",{src:N.logo_url,alt:"",onError:q=>{var xe;(xe=q.currentTarget.parentElement)==null||xe.classList.remove("detail-title-org--logo"),q.currentTarget.replaceWith(N.name)}}):N.name},N.id))]}),e.jsxs("div",{className:"detail-meta",children:[e.jsx("span",{children:St}),e.jsx("span",{children:"·"}),e.jsxs("span",{children:["Submitted ",Qt(l.published)]}),Et&&e.jsxs(e.Fragment,{children:[e.jsx("span",{children:"·"}),e.jsxs("span",{children:[Et," pages"]})]}),l.citation_count!=null&&e.jsxs(e.Fragment,{children:[e.jsx("span",{children:"·"}),e.jsxs("span",{children:[l.citation_count.toLocaleString()," citations"]})]}),(l.proceeding||l.conference_slug)&&e.jsxs(e.Fragment,{children:[e.jsx("span",{children:"·"}),l.conference_slug?e.jsx("a",{href:`/conferences/${l.conference_slug}`,target:"_blank",rel:"noopener noreferrer",style:{color:"var(--accent-text)"},children:(l.proceeding||l.conference_name||"").replace(/\s+\d{1,2}$/,"")}):e.jsx("span",{children:l.proceeding.replace(/\s+\d{1,2}$/,"")})]}),P.length>1&&e.jsxs(e.Fragment,{children:[e.jsx("span",{children:"·"}),e.jsx("select",{className:"version-select",value:l.version,onChange:N=>{const q=N.target.value;l.arxiv_id&&s(`/paper/${l.arxiv_id.replace(/v\d+$/,"")}${q?`?version=${q}`:""}`)},children:P.map(N=>e.jsxs("option",{value:N.version,children:[N.version," — ",Qt(N.published)]},N.version))})]})]}),e.jsxs("div",{className:"detail-authors",children:[Rt.map((N,q)=>e.jsxs(qe.Fragment,{children:[N.hf_username&&e.jsx(aa,{className:"detail-author-avatar",url:N.hf_avatar_url}),N.id?e.jsx(ue,{to:`/authors/${N.id}`,children:N.name}):N.hf_username?e.jsx("a",{href:`https://huggingface.co/${N.hf_username}`,target:"_blank",rel:"noopener noreferrer",title:`@${N.hf_username} on Hugging Face`,children:N.name}):e.jsx("a",{children:N.name}),qBe&&e.jsx("button",{className:"show-more-authors",onClick:()=>_(N=>!N),style:{marginLeft:8,background:"none",border:"none",cursor:"pointer",color:"var(--accent-text)",fontFamily:"var(--mono)",fontSize:12},children:S?"show fewer":`+${l.authors.length-Be} more`})]}),e.jsxs("div",{className:"action-row",children:[Se&&Lt()&&(!Ft()||r!=null&&r.is_admin)?e.jsxs(ue,{className:"action-btn",to:Se,onClick:()=>ss(Se),children:[e.jsx(J,{name:"pdf",size:12})," Read paper",e.jsx("span",{className:"nav-new-badge","aria-hidden":"true",children:"New"})]}):It?e.jsxs("a",{className:"action-btn",href:It,target:"_blank",rel:"noopener noreferrer",children:[e.jsx(J,{name:"pdf",size:12})," View PDF"]}):null,Pt&&e.jsx(mt,{showEdit:l.source==="external",onEdit:()=>G("source-url"),editAriaLabel:"Edit source URL",children:e.jsxs("a",{className:l.source==="external"?"action-btn-segment action-btn-main":"action-btn",href:Pt,target:"_blank",rel:"noopener noreferrer",children:[e.jsx(J,{name:"external",size:12})," ",Fs]})}),Ee.length===1?e.jsx(mt,{showEdit:!0,onEdit:()=>G("project-pages"),editAriaLabel:"Edit project pages",children:e.jsxs("a",{className:"action-btn-segment action-btn-main",href:Ee[0].safeHref??void 0,target:"_blank",rel:"noopener noreferrer",children:[e.jsx(J,{name:"globe",size:12})," Project page"]})}):null,Ee.length>1?e.jsx(mt,{showEdit:!0,onEdit:()=>G("project-pages"),editAriaLabel:"Edit project pages",children:e.jsxs(Ws,{children:[e.jsx(Js,{asChild:!0,children:e.jsxs("button",{type:"button",className:"action-btn-segment action-btn-main",children:[e.jsx(J,{name:"globe",size:12})," Project page"]})}),e.jsx(Ys,{align:"start",className:"project-page-menu",children:Ee.map((N,q)=>e.jsx(Zs,{asChild:!0,children:N.safeHref?e.jsx("a",{href:N.safeHref,target:"_blank",rel:"noopener noreferrer",children:Vt(N.url,`Project page ${q+1}`)}):e.jsx("span",{children:Vt(N.url,`Project page ${q+1}`)})},N.url))})]})}):null,Ee.length===0&&d?e.jsxs("button",{type:"button",className:"action-btn",onClick:()=>G("project-pages"),title:"Add project page",children:[e.jsx(J,{name:"globe",size:12})," Add project page"]}):null,$t&&e.jsxs("a",{className:"action-btn",href:$t,target:"_blank",rel:"noopener noreferrer",children:[e.jsx(J,{name:"external",size:12})," Conference"]}),e.jsx("button",{type:"button",className:"action-btn",onClick:()=>G("organizations"),children:"Edit organizations"}),e.jsx(or,{paperId:Number(l.id),isAdmin:n}),n&&Aa()&&e.jsx(Ln,{paperId:Number(l.id),paperTitle:l.title,onComplete:()=>void v()}),e.jsx(An,{paperId:l.id})]}),l.leaderboard_ranks&&l.leaderboard_ranks.length>0&&e.jsx(ra,{wrap:!0,paperHref:`/paper/${l.arxiv_id||l.id}`,ranks:l.leaderboard_ranks.filter(N=>N.best_rank>=1&&N.best_rank<=3).map(N=>({name:N.dataset_name,slug:N.dataset_slug||null,rank:N.best_rank}))})]}),e.jsx("div",{className:"detail-hero-thumb detail-thumb-wrap",children:e.jsx(na,{paperId:l.arxiv_id||l.id,title:l.title,thumbnailUrl:ea(l.thumbnail_url),priority:!0})})]}),Q&&e.jsxs("div",{className:`introduced-banner${Ct.length>0?" introduced-banner--framework":""}`,children:[e.jsx("span",{className:"introduced-label",children:"Introduced"}),e.jsxs("div",{className:"introduced-methods",children:[As.map(N=>e.jsxs("button",{type:"button",className:"introduced-pill",onClick:()=>s(`/methods/${N.slug||N.id}`),children:[N.name,e.jsx("span",{className:"introduced-arrow",children:"→"})]},`method-${N.id}`)),Rs.map(N=>e.jsxs("button",{type:"button",className:"introduced-pill",onClick:()=>s(`/benchmark/${N.slug||N.id}`),children:[N.name,e.jsx("span",{className:"introduced-arrow",children:"→"})]},`benchmark-${N.id}`)),Ct.map(N=>e.jsxs("button",{type:"button",className:"introduced-pill",onClick:()=>s(`/frameworks#framework-${N.slug}`),children:[N.name,e.jsx("span",{className:"introduced-arrow",children:"→"})]},`framework-${N.slug}`))]}),e.jsxs("span",{className:"introduced-note",children:["This paper is the canonical source for ",Ls,"."]})]}),X&&e.jsxs("div",{className:"introduced-banner lineage-banner",children:[Je.length>0&&e.jsxs("div",{className:"lineage-row",children:[e.jsx("span",{className:"introduced-label lineage-label",children:Je.length===1?"Follow-up paper":"Follow-up papers"}),e.jsx("div",{className:"introduced-methods",children:Je.map(N=>e.jsxs("button",{type:"button",className:"introduced-pill lineage-pill",onClick:()=>s(`/paper/${N.route_identifier}`),children:[e.jsx(He,{title:N.title}),e.jsx("span",{className:"introduced-arrow",children:"→"})]},`successor-${N.id}`))})]}),We.length>0&&e.jsxs("div",{className:"lineage-row",children:[e.jsx("span",{className:"introduced-label lineage-label",children:We.length===1?"Predecessor paper":"Predecessor papers"}),e.jsx("div",{className:"introduced-methods",children:We.map(N=>e.jsxs("button",{type:"button",className:"introduced-pill lineage-pill",onClick:()=>s(`/paper/${N.route_identifier}`),children:[e.jsx("span",{className:"introduced-arrow lineage-arrow-back",children:"←"}),e.jsx(He,{title:N.title})]},`predecessor-${N.id}`))})]})]}),e.jsx(Pn,{canEdit:!0,onEditMethods:()=>G("methods"),onEditTasks:()=>G("tasks"),paper:l,readerChatRoute:Ts}),e.jsx(Or,{canCopyBadge:Z.length>0,canEdit:!0,evaluationsByTask:p,evaluationsLoading:f,isAdmin:n,onCopyBadge:y,onEdit:()=>G("results"),onRefresh:()=>void j(),paper:l,visibleEvaluationCount:(I==null?void 0:I.length)??0})]}),e.jsx(kn,{allHfArtifactUrls:k,citationCopied:Ve,citationDisplay:D,hfArtifactViewer:B,onCopyCitation:ve,onEditHfArtifacts:()=>G("hf-artifacts"),onEditRepositories:()=>G("repositories"),onEditXThreads:()=>G("x-threads"),paper:l,relatedIsLoading:C.isLoading,relatedPapers:C.data,user:r})]}),e.jsx(zr,{activeEditor:u,arxivId:i,editSubmitMode:o,evaluations:c??[],isAdmin:n,isLinkedAuthor:K,onOpenChange:E,paper:l}),e.jsx(ka,{open:F!==null,onOpenChange:N=>{N||M(null)},sectionLabel:F?Fn[F]:"this paper",returnTo:typeof window<"u"?window.location.pathname:"/"})]})};export{_i as default}; +}`;return{citationDisplay:d(s,`{{${a}}}`),citationCopy:d(t.title,`{${r}}`)}}function Ja(t,s,a){var g,b,_,j;const r={models:t.hf_models??[],datasets:t.hf_datasets??[],spaces:t.hf_spaces??[]},n={models:tt(r.models,s==null?void 0:s.modelUrls,"Model"),datasets:tt(r.datasets,s==null?void 0:s.datasetUrls,"Dataset"),spaces:tt(r.spaces,s==null?void 0:s.spaceUrls,"Space")},d={models:n.models.map(({href:v})=>v),datasets:n.datasets.map(({href:v})=>v),spaces:n.spaces.map(({href:v})=>v)},o=((g=t.arxiv_id)==null?void 0:g.replace(/v\d+$/,""))??null,i=t.arxiv_id?{isLoading:a,paperHref:`https://huggingface.co/papers/${o}`,rows:[{label:"Models",href:rt(`https://huggingface.co/models?other=arxiv:${t.arxiv_id}`,r.models),count:st(r.models,s==null?void 0:s.modelUrls,s==null?void 0:s.models),isLimited:s==null?void 0:s.isLimited,links:n.models},{label:"Datasets",href:rt(`https://huggingface.co/datasets?other=arxiv:${t.arxiv_id}`,r.datasets),count:st(r.datasets,s==null?void 0:s.datasetUrls,s==null?void 0:s.datasets),isLimited:s==null?void 0:s.isLimited,links:n.datasets},{label:"Spaces",href:rt(`https://huggingface.co/papers/${o}`,r.spaces),count:st(r.spaces,s==null?void 0:s.spaceUrls,s==null?void 0:s.spaces),isLimited:s==null?void 0:s.isLimited,links:n.spaces}],footer:`Cite arxiv.org/abs/${o} in a HF README to link it here.`}:{isLoading:!1,paperHref:null,rows:[{label:"Models",href:at(r.models),count:r.models.length,links:n.models},{label:"Datasets",href:at(r.datasets),count:r.datasets.length,links:n.datasets},{label:"Spaces",href:at(r.spaces),count:r.spaces.length,links:n.spaces}],footer:null},l=(t.methods??[]).filter(({source_paper_id:v})=>v===t.id),p=t.introduced_benchmarks??[],f=t.introduced_frameworks??[],c=[l.length&&(l.length===1?"this method":"these methods"),p.length&&(p.length===1?"this benchmark":"these benchmarks"),f.length&&(f.length===1?"this framework":"these frameworks")].filter(v=>!!v);return{...Ya(t),allHfArtifactUrls:d,authorEntries:t.authors.map((v,N)=>{var S,I,P,y,m,x;return{name:v,id:((I=(S=t.author_links)==null?void 0:S[N])==null?void 0:I.id)??null,hf_username:((y=(P=t.author_links)==null?void 0:P[N])==null?void 0:y.hf_username)??null,hf_avatar_url:((x=(m=t.author_links)==null?void 0:m[N])==null?void 0:x.hf_avatar_url)??null}}),copyableRanks:qa(t.leaderboard_ranks),hasIntroducedItems:c.length>0,hasLineageItems:!!((b=t.predecessor_papers)!=null&&b.length||(_=t.successor_papers)!=null&&_.length),hfArtifactViewer:i,hfPaperExists:!!(s!=null&&s.paperExists),introducedBenchmarks:p,introducedFrameworks:f,introducedMethods:l,introducedSummary:c.join(" and "),numPages:t.num_pages||null,paperSourceLabel:t.arxiv_id?`arXiv:${t.arxiv_id}`:"External resource",predecessorPapers:t.predecessor_papers??[],projectPages:((j=t.project_pages)==null?void 0:j.filter(({url:v})=>v).map(v=>({...v,safeHref:we(v.url)})))??[],repoSummary:ha(t.repositories),safeAbstractUrl:we(t.url_abs),safeConferenceUrl:we(t.conference_url_abs),safePdfUrl:we(t.url_pdf),sourceActionLabel:t.source==="external"?"Source page":"arXiv page",successorPapers:t.successor_papers??[]}}const Za=["tldr","abstract","tasks","methods","results"];function er(t){if(!t)return{section:null,resultsTaskSlug:null};const[s,a]=t.split("?",2);if(!Za.includes(s))return{section:null,resultsTaskSlug:null};const r=s;return r!=="results"||!a?{section:r,resultsTaskSlug:null}:{section:r,resultsTaskSlug:new URLSearchParams(a).get("task")}}const os=t=>`results-task-${t}`,tr=t=>`#results?task=${encodeURIComponent(t)}`;function sr(t,s){return t&&!!s}function ar({direct:t,paperId:s,refetchEvaluations:a,refetchPaper:r}){r(),a(),!(!t||!s)&&(W.primeCurationState(s,!0).catch(()=>{}),Ke.primeCurationState(s,!0).catch(()=>{}))}function rr(t,s){const a=t?Us(t):"",r=Wt(),{toast:n}=oe(),{preferences:d}=Ds(),o=da(a,!!a),i=o.data,[l,p]=u.useState(!1);u.useEffect(()=>{!t||t===a||r(`/paper/${a}${window.location.search}${window.location.hash}`,{replace:!0})},[a,r,t]),u.useEffect(()=>{if(i!=null&&i.title)return document.title=ua(i.title),()=>{document.title=ma}},[i==null?void 0:i.title]),u.useEffect(()=>{if(p(!1),!(i!=null&&i.id))return;const P=window.setTimeout(()=>p(!0),0);return()=>window.clearTimeout(P)},[i==null?void 0:i.id]);const f=sr(l,i==null?void 0:i.id),c=Va(l?i==null?void 0:i.arxiv_id:void 0),g=Ka(i==null?void 0:i.id,f),b=ne({queryKey:[...ye.feeds.versions,i==null?void 0:i.arxiv_id],queryFn:()=>W.versions(i.arxiv_id.replace(/v\d+$/,"")),enabled:f&&!!(i!=null&&i.arxiv_id),staleTime:10*60*1e3}),_=ne({queryKey:[...ye.feeds.related,i==null?void 0:i.id],queryFn:()=>W.related(i.arxiv_id||i.id,4),enabled:f,staleTime:10*60*1e3});u.useEffect(()=>{const P=()=>{ar({direct:s==="direct",paperId:i==null?void 0:i.id,refetchEvaluations:g.refetch,refetchPaper:o.refetch}),n({title:"This section changed",description:"The latest state has been reloaded. Review your changes before submitting again.",variant:"destructive"})};return window.addEventListener("pwc:catalog-conflict",P),()=>window.removeEventListener("pwc:catalog-conflict",P)},[s,g.refetch,i==null?void 0:i.id,o.refetch,n]);const j=u.useMemo(()=>{const P=g.data;return!P||!d.hide_closed_source_evals?P:P.filter(y=>y.is_open!==!1)},[g.data,d.hide_closed_source_evals]),v=u.useMemo(()=>{if(!j)return[];const P=new Map;for(const y of j){const m=P.get(y.task_id);m?m.rows.push(y):P.set(y.task_id,{taskId:y.task_id,taskName:y.task_name||"—",taskSlug:y.task_slug,rows:[y]})}return[...P.values()]},[j]),N=u.useMemo(()=>v.map(({taskSlug:P})=>P??"").join("|"),[v]),S=u.useMemo(()=>i?Ja(i,c.data,c.isLoading):null,[c.data,c.isLoading,i]),I=u.useRef(!1);return u.useEffect(()=>{I.current=!1},[a]),u.useEffect(()=>{let P=0;const y=(x=!1,E=!1)=>{const{section:F,resultsTaskSlug:M}=er(window.location.hash.slice(1));if(!F||!i||F==="tldr"&&!i.tldr||F==="results"&&(!f||g.isLoading)||!x&&I.current)return;let O=F==="results"&&M?document.getElementById(os(M)):document.getElementById(F);if(!O&&F==="results"&&M){if(v.some(({taskSlug:K})=>K===M))return;O=document.getElementById("results")}O&&(P=window.requestAnimationFrame(()=>{I.current=!0,O.scrollIntoView({block:"start",behavior:E?"smooth":"auto"})}))};y();const m=()=>{I.current=!1,y(!0,!0)};return window.addEventListener("hashchange",m),()=>{window.removeEventListener("hashchange",m),P&&window.cancelAnimationFrame(P)}},[v,g.isLoading,i,N,f]),{arxivId:a,evaluations:g.data,evaluationsByTask:v,evaluationsLoading:g.isLoading,hfLoading:c.isLoading,hfRepos:c.data,paper:i,paperError:o.error,paperLoading:o.isLoading,presentation:S,refetchEvaluations:g.refetch,refetchPaper:o.refetch,relatedQuery:_,versions:b.data??[],visibleEvaluations:j}}const nr={tasks:"tasks",methods:"methods",evaluations:"results",repositories:"repositories",project_pages:"project-pages",hf_artifacts:"hf-artifacts",organizations:"organizations",source_url:"source-url",x_threads:"x-threads"};function ir(t){return nr[t]??null}function or(){const[t,s]=u.useState(null),a=u.useCallback(n=>{s(n)},[]),r=u.useCallback((n,d)=>{s(o=>d?n:o===n?null:o)},[]);return{activeEditor:t,openEditor:a,setEditorOpen:r}}function lr({paperId:t,isAdmin:s}){var g;const[a,r]=u.useState(!1),[n,d]=u.useState(!1),[o,i]=u.useState(!1),[l,p]=u.useState(()=>window.location.hash.startsWith("#edit")),f=ga({queryKey:["paper-edit-history",t],queryFn:({pageParam:b})=>ja.history(t,b),initialPageParam:void 0,getNextPageParam:b=>b.next_cursor??void 0,enabled:s&&l}),c=`Help me edit https://paperswithcode.co/paper/${t} using the public pwc CLI from https://github.com/huggingface/pwc-cli. Install or update the CLI following its README, then run pwc skills add to load its instructions. Run pwc auth login --paper ${t}; I will authorize this paper in my browser. Export with pwc paper edit export ${t} --output edits.json, make explicit operations for the corrections I request, and preview before submitting. For organization changes, use an organizations operation with payload {"organization_ids": [existing organization IDs]}; this replaces the paper’s organization links and publishes directly. Use existing organizations, benchmark and metric definitions, preserve unrelated entries, and cite source URLs where available. Never print or copy credentials. Ask me what to change if I have not specified it.`;return e.jsxs(e.Fragment,{children:[e.jsxs("button",{type:"button",className:"action-btn",title:"Edit this paper page with Claude, Codex, Cursor, or OpenCode",onClick:()=>{r(!1),d(!1),i(!0)},children:["Edit with your agent",e.jsx(xa,{})]}),s&&e.jsxs("button",{type:"button",className:"action-btn",onClick:()=>p(!0),children:[e.jsx(Ha,{size:12})," View edit history"]}),e.jsx(ee,{open:o,onOpenChange:i,children:e.jsxs(te,{className:"max-w-2xl",children:[e.jsxs(se,{children:[e.jsx(ae,{children:"Edit this paper with your agent"}),e.jsx(re,{children:"Spotted a missing code link, a wrong task, or a missing benchmark result? Your favorite coding agent can fix it for you."})]}),e.jsx(ba,{}),e.jsxs("ol",{className:"list-decimal space-y-1 pl-5 text-sm text-muted-foreground",children:[e.jsx("li",{children:"Copy the prompt below."}),e.jsx("li",{children:"Paste it into Claude Code, Codex, Cursor, OpenCode, or another coding agent, and tell it what to change."}),e.jsxs("li",{children:["The agent installs the ",e.jsx("a",{className:"underline",href:"https://github.com/huggingface/pwc-cli",target:"_blank",rel:"noreferrer",children:"pwc CLI"}),", asks you to authorize this paper with your Hugging Face account, and previews the edits before submitting them."]})]}),e.jsx("textarea",{"aria-label":"Paper edit prompt",readOnly:!0,value:c,className:"h-48 w-full resize-none rounded border bg-muted/40 p-3 font-mono text-xs",onFocus:b=>b.currentTarget.select()}),n&&e.jsx("p",{role:"alert",className:"text-sm text-destructive",children:"Could not copy automatically. Select the prompt above and copy it manually."}),e.jsxs(L,{className:"justify-self-end",onClick:async()=>{try{await navigator.clipboard.writeText(c),r(!0),d(!1)}catch{d(!0)}},children:[a?e.jsx(me,{size:14}):e.jsx(va,{size:14}),a?"Prompt copied":"Copy prompt"]})]})}),e.jsx(ee,{open:s&&l,onOpenChange:p,children:e.jsxs(te,{className:"max-h-[85vh] max-w-3xl overflow-y-auto",id:"edit-history",children:[e.jsxs(se,{children:[e.jsx(ae,{children:"Paper edit history"}),e.jsx(re,{children:"Published changes and their contributors."})]}),e.jsxs("div",{className:"space-y-3",children:[f.isLoading&&e.jsx("p",{children:"Loading edit history…"}),f.error&&e.jsx("p",{role:"alert",children:"Could not load edit history."}),f.data&&!f.data.pages[0].events.length&&e.jsx("p",{className:"text-sm text-muted-foreground",children:"No edits have been recorded here yet."}),(g=f.data)==null?void 0:g.pages.flatMap(b=>b.events).map(b=>e.jsxs("article",{id:`edit-${b.id}`,className:"rounded border p-3",children:[e.jsxs("p",{className:"text-sm",children:[b.actor_username?e.jsxs("a",{className:"underline",href:`https://huggingface.co/${encodeURIComponent(b.actor_username)}`,children:["@",b.actor_username]}):"Catalog administrator"," · ",new Date(b.created_at).toLocaleString()," · ",b.operation==="rollback"?"Reverted an edit":"Updated this paper"]}),e.jsxs("details",{children:[e.jsx("summary",{className:"cursor-pointer text-sm",children:"View changes"}),e.jsx("pre",{className:"max-h-80 overflow-auto whitespace-pre-wrap text-xs",children:JSON.stringify({before:b.before,after:b.after},null,2)})]})]},b.id)),f.hasNextPage&&e.jsx(L,{variant:"outline",disabled:f.isFetchingNextPage,onClick:()=>void f.fetchNextPage(),children:"Load older edits"})]})]})})]})}function cr(t){return t.map(s=>{const a=s.best_metric||Object.keys(s.metrics)[0]||"";return{id:s.id,task_id:s.task_id,dataset_id:s.dataset_id,model_name:s.model_name||"",harness:s.harness||"",metric_name:a,metric_value:String(s.metrics[a]??""),original_metrics:{...s.metrics},original_metric_name:a,best_rank:s.best_rank!=null?String(s.best_rank):"",num_parameters:s.num_parameters!=null?String(s.num_parameters):"",hf_model_url:s.hf_model_url||"",is_open:s.is_open!==!1,operation:"unchanged"}})}function dr(t,s){const a={...t.original_metrics},r=a[t.original_metric_name];return t.original_metric_name!==s&&delete a[t.original_metric_name],a[s]=r!=null&&t.metric_value===String(r)?r:t.metric_value,a}function ur(t){const s=t==null?void 0:t.trim();return s?Number(s):void 0}function Ht(t){const s=t.trim();return s?Number(s):null}function nt(t){return t.trim()||null}function it(t){return!!(t&&/^\d+$/.test(t.trim())&&Number.isSafeInteger(Number(t))&&Number(t)>0)}function ls(t){const s=[];return t.forEach((a,r)=>{var o;if(!a.operation||a.operation==="unchanged")return;const n=(i,l)=>{s.push({rowIndex:r,field:i,message:l})};if(a.operation!=="create"&&!it(a.id)&&n("id","This result has no valid evaluation ID. Reload the paper before editing it."),a.operation==="delete")return;it(a.task_id)||n("task_id","Select a valid task."),it(a.dataset_id)||n("dataset_id","Select a valid dataset.");const d=a.metric_name.trim();d?d!==a.original_metric_name&&Object.prototype.hasOwnProperty.call(a.original_metrics,d)&&n("metric_name",`Cannot rename a metric to "${d}": this evaluation already has that score.`):n("metric_name","Select a metric."),(o=a.best_rank)!=null&&o.trim()&&!Number.isSafeInteger(Number(a.best_rank))&&n("best_rank","Enter a whole-number rank."),a.num_parameters.trim()&&(!Number.isSafeInteger(Number(a.num_parameters))||Number(a.num_parameters)<0)&&n("num_parameters","Enter a non-negative whole-number parameter count."),a.metric_value.trim()||n("metric_value","Enter a metric value.")}),s}function mr(t,s){const a=ls(t);return a.length?{valid:!1,errors:a}:{valid:!0,operations:hr(t,s)}}function hr(t,s){const a=[];for(const r of t){if(r.operation==="delete"){a.push({kind:"delete",evaluationId:Number(r.id)});continue}if(r.operation!=="create"&&r.operation!=="update")continue;const n=r.metric_name.trim(),d=s(r.task_id,r.dataset_id),o={task_id:Number(r.task_id),dataset_id:Number(r.dataset_id),metrics:dr(r,n),best_metric:n,is_open:r.is_open},i=r.model_name.trim(),l=ur(r.best_rank);if(r.operation==="create"){const p=Ht(r.num_parameters),f=nt(r.hf_model_url);a.push({kind:"create",data:{...o,...i?{model_name:i}:{},...d&&r.harness.trim()?{harness:r.harness.trim()}:{},...l!==void 0?{best_rank:l}:{},...p!==null?{num_parameters:p}:{},...f!==null?{hf_model_url:f}:{}}});continue}a.push({kind:"update",evaluationId:Number(r.id),data:{...o,...i?{model_name:i}:{},harness:d?nt(r.harness):null,...l!==void 0?{best_rank:l}:{},num_parameters:Ht(r.num_parameters),hf_model_url:nt(r.hf_model_url)}})}return a}function pr(t,s){return s.map(a=>a.kind==="delete"?{operation:"delete",evaluation_id:a.evaluationId}:{operation:a.kind,...a.kind==="update"?{evaluation_id:a.evaluationId}:{},payload:a.kind==="create"?{paper_id:t,...a.data}:a.data})}function fr(t){return t.map(s=>s.kind==="delete"?{op:"delete",evaluation_id:s.evaluationId}:s.kind==="update"?{op:"update",evaluation_id:s.evaluationId,data:s.data}:{op:"create",data:s.data})}function ge({isAuthor:t=!1}){const s=typeof window<"u"&&window.location.hostname==="staging.paperswithcode.co";return e.jsxs("div",{className:"rounded-md border border-amber-200 bg-amber-50 px-3 py-2 text-xs text-amber-900 dark:border-amber-900 dark:bg-amber-950/40 dark:text-amber-100",children:[e.jsx("p",{className:"font-medium",children:s?"Test-only: this change stays on staging.":"Your changes will be reviewed by an admin."}),e.jsx("p",{className:"mt-1 leading-snug",children:s?"This exercises staging-local pending behavior and is not queued for production review.":t?"We can see this paper is yours. While we're in early access an admin still reviews each edit; this will become automatic for authors soon.":"Submissions are queued for review and don't change the paper page until an admin approves them."})]})}const ot=100;function gr(t){return(t??[]).some(s=>s.slug==="coding-agents"||s.name.trim().toLowerCase()==="coding agents")}function xr(t){const s=new Map;return t.forEach(a=>{a.task_id&&a.task_name&&s.set(a.task_id,{id:a.task_id,name:a.task_name,slug:a.task_slug,level:0})}),s}function br(t){const s=new Map;return t.forEach(a=>{a.dataset_id&&a.dataset_name&&s.set(a.dataset_id,{id:a.dataset_id,name:a.dataset_name,slug:a.dataset_slug})}),s}function Mt(t,s){return`${t}:${s}`}function jr({open:t,onOpenChange:s,paperId:a,arxivId:r,initialEvaluations:n,paperTasks:d,onSuccess:o,submitMode:i="direct",isAdmin:l=!1,isAuthor:p=!1}){const f=u.useId(),c=gr(d),[g,b]=u.useState([]),[_,j]=u.useState(!1),v=_?ls(g):[],[N,S]=u.useState(null),[I,P]=u.useState(new Map),[y,m]=u.useState(new Map),x=he(),{toast:E}=oe(),F=u.useRef(!1),M=u.useRef(!1);u.useEffect(()=>{if(!t){j(!1),F.current=!1,M.current=!1;return}F.current||M.current||n.length!==0&&(F.current=!0,b(cr(n)),P(xr(n)),m(br(n)))},[t,n]);const O=u.useMemo(()=>Array.from(new Set(g.map(w=>w.task_id).filter(w=>w&&w!==""))),[g]),K=u.useMemo(()=>{const w=new Set;return g.forEach(k=>{k.task_id&&k.dataset_id&&w.add(Mt(k.task_id,k.dataset_id))}),Array.from(w)},[g]),G=ne({queryKey:["datasets-by-tasks-for-eval-edit",O,t],queryFn:async()=>{const w={};return await Promise.all(O.map(async k=>{try{const A=await _e.listDatasets({task_id:parseInt(k),page_size:ot});w[k]=A.results}catch(A){console.error(`Error fetching datasets for task ${k}:`,A),w[k]=[]}})),w},enabled:t&&O.length>0});u.useEffect(()=>{G.data&&m(w=>{const k=new Map(w);return Object.values(G.data).forEach(A=>{A.forEach(D=>{k.set(D.id,D)})}),k})},[G.data]);const h=ne({queryKey:["leaderboard-metrics-for-eval-edit",K,t],queryFn:async()=>{const w={};return await Promise.all(K.map(async k=>{const[A,D]=k.split(":");try{w[k]=await _e.leaderboardMetrics(D,A)}catch(Q){console.error(`Error fetching metrics for leaderboard ${k}:`,Q),w[k]=[]}})),w},enabled:t&&K.length>0}),$=async w=>{const k=await _e.listTasks({page_size:ot,...w?{q:w}:{}});return P(A=>{const D=new Map(A);return k.results.forEach(Q=>D.set(Q.id,Q)),D}),k.results.map(A=>{var D;return{value:A.id,label:A.name,description:(D=A.description)==null?void 0:D.slice(0,100)}})},R=w=>async k=>{const A=await _e.listDatasets({task_id:parseInt(w),page_size:ot,...k?{q:k}:{}});return m(D=>{const Q=new Map(D);return A.results.forEach(X=>Q.set(X.id,X)),Q}),A.results.map(D=>({value:D.id,label:D.name,description:D.full_name}))},T=(w,k)=>{if(!w||!k)return!1;const A=y.get(k);return!!(A!=null&&A.supports_harness)},U=(w,k,A)=>{var X;if(!w||!k)return[];const Q=(((X=h.data)==null?void 0:X[Mt(w,k)])||[]).map(B=>({value:B.metric_name,label:B.metric_name,description:B.metric_direction==="higher_is_better"?"Higher is better":"Lower is better"}));return A&&!Q.some(B=>B.value===A)&&Q.unshift({value:A,label:`${A} (legacy)`}),Q},z=ce({mutationFn:async({paperId:w,canonical:k})=>{if(!l&&i==="direct"&&k.length>50)throw new Error("Contributor evaluation batches are limited to 50 operations; contact an admin.");const A=Number.parseInt(w,10);if(i==="pending")await pe.submit({paper_id:A,edit_type:"evaluations",proposed_payload:{operations:fr(k)}});else{const D=wa(w,n,k,r);await Ke.batch(A,pr(A,k)),_a(x,D)}},onSuccess:()=>{if(i==="pending"){E({title:"Edit submitted for review",description:"Thanks! An admin will review your proposed evaluation changes shortly."}),o==null||o(),s(!1);return}o==null||o(),s(!1)},onError:w=>{const k=fe(w,i==="pending"?"Failed to submit your edit. Please try again.":"Failed to update evaluations.");E({title:i==="pending"?"Could not submit edit":"Could not save evaluations",description:k,variant:"destructive"})}}),H=()=>{M.current=!0,b([...g,{task_id:"",dataset_id:"",model_name:"",harness:"",metric_name:"",metric_value:"",original_metrics:{},original_metric_name:"",best_rank:"",num_parameters:"",hf_model_url:"",is_open:!0,operation:"create"}])},J=w=>{if(M.current=!0,g[w].id){if(!window.confirm("Delete this evaluation? You will be asked to sign in again if your session is older than 15 minutes."))return;b(g.map((A,D)=>D===w?{...A,operation:"delete"}:A))}else b(g.filter((A,D)=>D!==w))},Z=(w,k,A)=>{M.current=!0,b(g.map((D,Q)=>{if(Q!==w||D[k]===A)return D;const X={...D,[k]:A};return(k==="task_id"||k==="dataset_id")&&(X.original_metrics={},X.original_metric_name="",X.metric_value="",X.best_rank=""),k==="task_id"&&(X.dataset_id="",X.metric_name="",X.harness=""),k==="dataset_id"&&(X.metric_name="",A&&!T(X.task_id,A)&&(X.harness="")),D.operation==="unchanged"&&(X.operation="update"),X}))},Ve=(w,k)=>{M.current=!0,b(g.map((A,D)=>{if(D!==w)return A;const Q={...A,is_open:k};return A.operation==="unchanged"&&(Q.operation="update"),Q}))},De=()=>{j(!0);const w=mr(g,T);if(w.valid){if(w.operations.length===0){E({title:"No changes to submit",description:"Your evaluation list matches the existing data."});return}z.mutate({paperId:a,canonical:w.operations})}},ve=(w,k)=>{const A=v.find(D=>D.rowIndex===w&&D.field===k);return A?e.jsx("p",{id:`${f}-${w}-${k}-error`,className:"text-xs text-destructive",children:A.message}):null};return e.jsxs(ee,{open:t,onOpenChange:s,children:[e.jsxs(te,{className:"max-w-6xl max-h-[800px]",children:[e.jsxs(se,{children:[e.jsx(ae,{children:"Edit Evaluation Results"}),e.jsx(re,{children:"Add, edit, or remove evaluation results for this paper. Each row represents a benchmark result."})]}),i==="pending"&&e.jsx(ge,{isAuthor:p}),v.length>0&&e.jsxs("div",{role:"alert",className:"text-sm text-destructive",children:["Fix the following errors before saving. No changes have been submitted.",e.jsx("ul",{children:v.map(w=>e.jsxs("li",{children:["Row ",g.slice(0,w.rowIndex+1).filter(k=>k.operation!=="delete").length,": ",w.message]},`${w.rowIndex}-${w.field}`))})]}),e.jsxs("div",{className:"py-4 overflow-y-auto max-h-[600px]",children:[g.filter(w=>w.operation!=="delete").length>0?e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full border-collapse",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-border",children:[e.jsx("th",{className:"text-left py-2 px-2 font-medium text-sm min-w-[180px]",children:"Task"}),e.jsx("th",{className:"text-left py-2 px-2 font-medium text-sm min-w-[180px]",children:"Dataset"}),e.jsx("th",{className:`text-left py-2 px-2 font-medium text-sm ${c?"min-w-[140px]":"min-w-[240px]"}`,children:"Model"}),c&&e.jsx("th",{className:"text-left py-2 px-2 font-medium text-sm min-w-[140px]",children:"Harness"}),e.jsx("th",{className:"text-left py-2 px-2 font-medium text-sm min-w-[140px]",children:"Metric"}),e.jsx("th",{className:"text-left py-2 px-2 font-medium text-sm",children:"Value"}),e.jsx("th",{className:"text-left py-2 px-2 font-medium text-sm",children:"Parameters"}),e.jsx("th",{className:"text-left py-2 px-2 font-medium text-sm min-w-[200px]",children:"HF model URL"}),e.jsx("th",{className:"text-left py-2 px-2 font-medium text-sm w-20",children:"Open source"}),e.jsx("th",{className:"text-left py-2 px-2 font-medium text-sm w-16",children:"Action"})]})}),e.jsx("tbody",{children:g.map((w,k)=>{if(w.operation==="delete")return null;const A=I.get(w.task_id),D=y.get(w.dataset_id),Q=U(w.task_id,w.dataset_id,w.metric_name),X=!!(w.task_id&&w.dataset_id)&&h.isFetching;return e.jsxs("tr",{className:"border-b border-border",children:[e.jsx("td",{className:"py-2 px-2",children:e.jsxs("div",{role:"group","aria-label":"Task","aria-describedby":`${f}-${k}-task_id-error`,children:[e.jsx(Tt,{value:w.task_id,onChange:B=>Z(k,"task_id",B),placeholder:"Select task",searchPlaceholder:"Search tasks...",emptyMessage:"No tasks found.",selectedOption:A?{value:A.id,label:A.name}:null,queryKey:["eval-edit-task-search"],queryFn:$,enabled:t}),ve(k,"task_id")]})}),e.jsx("td",{className:"py-2 px-2",children:e.jsxs("div",{role:"group","aria-label":"Dataset","aria-describedby":`${f}-${k}-dataset_id-error`,children:[e.jsx(Tt,{value:w.dataset_id,onChange:B=>Z(k,"dataset_id",B),placeholder:w.task_id?"Select dataset":"Select task first",searchPlaceholder:"Search datasets...",emptyMessage:w.task_id?"No datasets found for this task.":"Select a task first.",disabled:!w.task_id,selectedOption:D?{value:D.id,label:D.name}:null,queryKey:["eval-edit-dataset-search",w.task_id],queryFn:R(w.task_id),enabled:t&&!!w.task_id}),ve(k,"dataset_id")]})}),e.jsx("td",{className:"py-2 px-2",children:e.jsx(V,{type:"text",className:"w-full text-sm",placeholder:"Model name",value:w.model_name,onChange:B=>Z(k,"model_name",B.target.value)})}),c&&e.jsx("td",{className:"py-2 px-2",children:T(w.task_id,w.dataset_id)?e.jsx(V,{type:"text",className:"w-full text-sm",placeholder:"Claude Code, Terminus, ...",value:w.harness,onChange:B=>Z(k,"harness",B.target.value)}):e.jsx("span",{className:"text-xs text-muted-foreground",children:"Not supported"})}),e.jsxs("td",{className:"py-2 px-2",children:[!w.task_id||!w.dataset_id?e.jsx("span",{className:"text-xs text-muted-foreground",children:"Select task + dataset"}):X?e.jsxs("span",{className:"inline-flex items-center text-xs text-muted-foreground",children:[e.jsx(ie,{className:"mr-1 h-3 w-3 animate-spin"}),"Loading metrics..."]}):Q.length>0?e.jsxs("select",{className:"w-full rounded-md border border-border bg-background px-2 py-1 text-sm",id:`${f}-${k}-metric_name`,"aria-invalid":v.some(B=>B.rowIndex===k&&B.field==="metric_name"),"aria-describedby":`${f}-${k}-metric_name-error`,value:w.metric_name,onChange:B=>Z(k,"metric_name",B.target.value),children:[e.jsx("option",{value:"",children:"Select metric"}),Q.map(B=>e.jsx("option",{value:B.value,children:B.label},B.value))]}):e.jsx("span",{className:"text-xs text-muted-foreground",children:"No configured metrics"}),ve(k,"metric_name")]}),e.jsxs("td",{className:"py-2 px-2",children:[e.jsx(V,{type:"text",className:"w-full text-sm",placeholder:"44.9",id:`${f}-${k}-metric_value`,"aria-invalid":v.some(B=>B.rowIndex===k&&B.field==="metric_value"),"aria-describedby":`${f}-${k}-metric_value-error`,value:w.metric_value,onChange:B=>Z(k,"metric_value",B.target.value)}),ve(k,"metric_value")]}),e.jsxs("td",{className:"py-2 px-2",children:[e.jsx(V,{type:"number",min:0,step:1,className:"w-full text-sm",placeholder:"e.g. 7000000000",id:`${f}-${k}-num_parameters`,"aria-invalid":v.some(B=>B.rowIndex===k&&B.field==="num_parameters"),"aria-describedby":`${f}-${k}-num_parameters-error`,value:w.num_parameters,onChange:B=>Z(k,"num_parameters",B.target.value),title:"Raw model parameter count (e.g. 7000000000 for a 7B model). Leave blank if unknown."}),ve(k,"num_parameters")]}),e.jsx("td",{className:"py-2 px-2",children:e.jsx(V,{type:"url",className:"w-full text-sm",placeholder:"https://huggingface.co/org/model",value:w.hf_model_url,onChange:B=>Z(k,"hf_model_url",B.target.value),title:"Hugging Face model page for this row (must start with https://huggingface.co/). Leave blank if none."})}),e.jsx("td",{className:"py-2 px-2 text-center",children:e.jsx("input",{type:"checkbox",className:"h-4 w-4 align-middle",checked:w.is_open,onChange:B=>Ve(k,B.target.checked),title:"Whether the evaluated model is open-source. Uncheck for closed-source models."})}),e.jsx("td",{className:"py-2 px-2",children:e.jsx(L,{variant:"ghost",size:"sm",onClick:()=>J(k),className:"h-8 w-8 p-0 text-destructive hover:text-destructive",title:w.id&&!l?"Only administrators can delete published results":"Remove row",disabled:!!w.id&&!l,children:e.jsx(Te,{className:"w-4 h-4"})})})]},k)})})]})}):e.jsxs("div",{className:"text-center py-8 text-muted-foreground",children:[e.jsx(Na,{className:"w-12 h-12 mx-auto mb-3 opacity-30"}),e.jsx("p",{children:"No evaluation results yet"}),e.jsx("p",{className:"text-sm mt-2",children:'Click "Add Row" below to add a new evaluation'})]}),e.jsx("div",{className:"mt-4",children:e.jsxs(L,{variant:"outline",size:"sm",onClick:H,className:"flex items-center space-x-2",children:[e.jsx(Ue,{className:"w-4 h-4"}),e.jsx("span",{children:"Add Row"})]})})]}),e.jsxs(le,{children:[e.jsxs("div",{className:"flex flex-wrap gap-2 sm:mr-auto",children:[e.jsx(L,{variant:"ghost",onClick:()=>S("benchmark"),children:"Suggest a new benchmark"}),e.jsx(L,{variant:"ghost",onClick:()=>S("metric"),children:"Suggest a new metric"})]}),e.jsx(L,{variant:"outline",onClick:()=>s(!1),children:"Cancel"}),e.jsx(L,{onClick:De,disabled:z.isPending,children:z.isPending?e.jsxs(e.Fragment,{children:[e.jsx(ie,{className:"w-4 h-4 mr-2 animate-spin"}),i==="pending"?"Submitting...":"Saving..."]}):e.jsxs(e.Fragment,{children:[e.jsx(me,{className:"w-4 h-4 mr-2"}),i==="pending"?"Submit for review":"Save Changes"]})})]})]}),e.jsx(wt,{open:N!==null,onOpenChange:w=>{w||S(null)},paperId:a,kind:N??"benchmark"})]})}const lt=[{key:"hf_models",label:"Models",placeholder:"https://huggingface.co/org/model"},{key:"hf_datasets",label:"Datasets",placeholder:"https://huggingface.co/datasets/org/data"},{key:"hf_spaces",label:"Spaces",placeholder:"https://huggingface.co/spaces/org/demo"}];function qt(t){return t.map(s=>s.trim()).filter(Boolean)}function ct(t,s){const a=qt(t).sort(),r=qt(s).sort();return a.length!==r.length?!1:a.every((n,d)=>n===r[d])}function vr(t,s){return ct(t.hf_models,s.hf_models)&&ct(t.hf_datasets,s.hf_datasets)&&ct(t.hf_spaces,s.hf_spaces)}function yr({open:t,onOpenChange:s,paperId:a,arxivId:r,initialArtifacts:n,onSuccess:d,submitMode:o="direct",isAuthor:i=!1}){const[l,p]=u.useState(n),[f,c]=u.useState({hf_models:"",hf_datasets:"",hf_spaces:""}),g=he(),{toast:b}=oe(),_=u.useRef(!1);u.useEffect(()=>{if(!t){_.current=!1;return}_.current||(_.current=!0,p(n),c({hf_models:"",hf_datasets:"",hf_spaces:""}))},[t,n]);const j=ce({mutationFn:async({paperId:y,artifacts:m})=>o==="pending"?(await pe.submit({paper_id:parseInt(y),edit_type:"hf_artifacts",proposed_payload:m}),null):W.updateHfArtifacts(y,m),onSuccess:y=>{if(o==="pending"){b({title:"Edit submitted for review",description:"Thanks! An admin will review your proposed Hugging Face artifact changes shortly."}),d==null||d(),s(!1),c({hf_models:"",hf_datasets:"",hf_spaces:""});return}y&&je(g,y,[a,r]),d==null||d(),s(!1),c({hf_models:"",hf_datasets:"",hf_spaces:""})},onError:y=>{const m=fe(y,o==="pending"?"Failed to submit your edit. Please try again.":"Failed to update Hugging Face artifacts.");b({title:o==="pending"?"Could not submit edit":"Could not save Hugging Face artifacts",description:m,variant:"destructive"})}}),v=()=>{const y={hf_models:[...l.hf_models],hf_datasets:[...l.hf_datasets],hf_spaces:[...l.hf_spaces]};for(const{key:m}of lt){const x=f[m].trim();if(x){if(y[m].some(E=>E.trim()===x))return alert(`This ${m.replace("hf_","")} URL is already added`),null;y[m]=[...y[m],x]}}return y},N=y=>{const m=f[y].trim();if(m){if(l[y].some(x=>x.trim()===m)){alert(`This ${y.replace("hf_","")} URL is already added`);return}p(x=>({...x,[y]:[...x[y],m]})),c(x=>({...x,[y]:""}))}},S=(y,m)=>{p(x=>({...x,[y]:x[y].filter(E=>E!==m)}))},I=()=>{const y=v();if(y===null)return;const m=Object.keys(n).some(x=>n[x].some(E=>!y[x].includes(E)));o==="direct"&&m&&!window.confirm("Remove one or more Hugging Face artifact links?")||j.mutate({paperId:a,artifacts:y})},P=u.useMemo(()=>{const y={hf_models:[...l.hf_models],hf_datasets:[...l.hf_datasets],hf_spaces:[...l.hf_spaces]};for(const{key:m}of lt){const x=f[m].trim();if(x){if(y[m].some(E=>E.trim()===x))return!1;y[m]=[...y[m],x]}}return!vr(y,n)},[l,f,n]);return e.jsx(ee,{open:t,onOpenChange:s,children:e.jsxs(te,{className:"max-w-2xl max-h-[700px]",children:[e.jsxs(se,{children:[e.jsx(ae,{children:"Edit Hugging Face Artifacts"}),e.jsx(re,{children:"Add or remove linked Hugging Face models, datasets, and Spaces for this paper."})]}),o==="pending"&&e.jsx(ge,{isAuthor:i}),e.jsx("div",{className:"space-y-6 py-2 overflow-y-auto max-h-[460px]",children:lt.map(({key:y,label:m,placeholder:x})=>e.jsxs("div",{className:"space-y-2",children:[e.jsx("label",{className:"text-sm font-medium",children:m}),e.jsxs("div",{className:"flex space-x-2",children:[e.jsx(V,{type:"url",placeholder:x,value:f[y],onChange:E=>c(F=>({...F,[y]:E.target.value})),onKeyPress:E=>{E.key==="Enter"&&(E.preventDefault(),N(y))},className:"flex-1"}),e.jsxs(L,{onClick:()=>N(y),size:"sm",disabled:!f[y].trim(),children:[e.jsx(Ue,{className:"w-4 h-4 mr-1"}),"Add"]})]}),l[y].length>0?e.jsx("div",{className:"space-y-2",children:l[y].map(E=>e.jsxs("div",{className:"flex items-center space-x-2 p-3 bg-muted/30 rounded-lg hover:bg-muted/50 transition-colors",children:[e.jsx("span",{className:"text-sm font-medium text-paper-blue truncate flex-1",children:E}),e.jsx(L,{variant:"ghost",size:"sm",onClick:()=>S(y,E),className:"h-8 px-2 text-destructive hover:text-destructive",title:`Remove ${m.toLowerCase()} URL`,children:e.jsx(Te,{className:"w-4 h-4"})})]},E))}):e.jsxs("div",{className:"text-xs text-muted-foreground",children:["No ",m.toLowerCase()," linked yet."]})]},y))}),e.jsxs(le,{children:[e.jsx(L,{variant:"outline",onClick:()=>s(!1),children:"Cancel"}),e.jsx(L,{onClick:I,disabled:j.isPending||!P,children:j.isPending?e.jsxs(e.Fragment,{children:[e.jsx(ie,{className:"w-4 h-4 mr-2 animate-spin"}),o==="pending"?"Submitting...":"Saving..."]}):e.jsxs(e.Fragment,{children:[e.jsx(me,{className:"w-4 h-4 mr-2"}),o==="pending"?"Submit for review":"Save Changes"]})})]})]})})}var Ge="Checkbox",[wr]=vt(Ge),[_r,_t]=wr(Ge);function kr(t){const{__scopeCheckbox:s,checked:a,children:r,defaultChecked:n,disabled:d,form:o,name:i,onCheckedChange:l,required:p,value:f="on",internal_do_not_use_render:c}=t,[g,b]=Jt({prop:a,defaultProp:n??!1,onChange:l,caller:Ge}),[_,j]=u.useState(null),[v,N]=u.useState(null),S=u.useRef(!1),I=_?!!o||!!_.closest("form"):!0,P={checked:g,disabled:d,setChecked:b,control:_,setControl:j,name:i,form:o,value:f,hasConsumerStoppedPropagationRef:S,required:p,defaultChecked:be(n)?!1:n,isFormControl:I,bubbleInput:v,setBubbleInput:N};return e.jsx(_r,{scope:s,...P,children:Nr(c)?c(P):r})}var cs="CheckboxTrigger",ds=u.forwardRef(({__scopeCheckbox:t,onKeyDown:s,onClick:a,...r},n)=>{const{control:d,value:o,disabled:i,checked:l,required:p,setControl:f,setChecked:c,hasConsumerStoppedPropagationRef:g,isFormControl:b,bubbleInput:_}=_t(cs,t),j=Fe(n,f),v=u.useRef(l);return u.useEffect(()=>{const N=d==null?void 0:d.form;if(N){const S=()=>c(v.current);return N.addEventListener("reset",S),()=>N.removeEventListener("reset",S)}},[d,c]),e.jsx(ke.button,{type:"button",role:"checkbox","aria-checked":be(l)?"mixed":l,"aria-required":p,"data-state":fs(l),"data-disabled":i?"":void 0,disabled:i,value:o,...r,ref:j,onKeyDown:Re(s,N=>{N.key==="Enter"&&N.preventDefault()}),onClick:Re(a,N=>{c(S=>be(S)?!0:!S),_&&b&&(g.current=N.isPropagationStopped(),g.current||N.stopPropagation())})})});ds.displayName=cs;var kt=u.forwardRef((t,s)=>{const{__scopeCheckbox:a,name:r,checked:n,defaultChecked:d,required:o,disabled:i,value:l,onCheckedChange:p,form:f,...c}=t;return e.jsx(kr,{__scopeCheckbox:a,checked:n,defaultChecked:d,disabled:i,required:o,onCheckedChange:p,name:r,form:f,value:l,internal_do_not_use_render:({isFormControl:g})=>e.jsxs(e.Fragment,{children:[e.jsx(ds,{...c,ref:s,__scopeCheckbox:a}),g&&e.jsx(ps,{__scopeCheckbox:a})]})})});kt.displayName=Ge;var us="CheckboxIndicator",ms=u.forwardRef((t,s)=>{const{__scopeCheckbox:a,forceMount:r,...n}=t,d=_t(us,a);return e.jsx(Yt,{present:r||be(d.checked)||d.checked===!0,children:e.jsx(ke.span,{"data-state":fs(d.checked),"data-disabled":d.disabled?"":void 0,...n,ref:s,style:{pointerEvents:"none",...t.style}})})});ms.displayName=us;var hs="CheckboxBubbleInput",ps=u.forwardRef(({__scopeCheckbox:t,...s},a)=>{const{control:r,hasConsumerStoppedPropagationRef:n,checked:d,defaultChecked:o,required:i,disabled:l,name:p,value:f,form:c,bubbleInput:g,setBubbleInput:b}=_t(hs,t),_=Fe(a,b),j=as(d),v=Zt(r);u.useEffect(()=>{const S=g;if(!S)return;const I=window.HTMLInputElement.prototype,y=Object.getOwnPropertyDescriptor(I,"checked").set,m=!n.current;if(j!==d&&y){const x=new Event("click",{bubbles:m});S.indeterminate=be(d),y.call(S,be(d)?!1:d),S.dispatchEvent(x)}},[g,j,d,n]);const N=u.useRef(be(d)?!1:d);return e.jsx(ke.input,{type:"checkbox","aria-hidden":!0,defaultChecked:o??N.current,required:i,disabled:l,name:p,value:f,form:c,...s,tabIndex:-1,ref:_,style:{...s.style,...v,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});ps.displayName=hs;function Nr(t){return typeof t=="function"}function be(t){return t==="indeterminate"}function fs(t){return be(t)?"indeterminate":t?"checked":"unchecked"}const Xe=u.forwardRef(({className:t,style:s,...a},r)=>e.jsx(kt,{ref:r,className:Me("peer h-4 w-4 shrink-0 rounded-sm ring-offset-background data-[state=checked]:!bg-black data-[state=checked]:!text-white focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",t),style:{border:"1px solid #000",...s},...a,children:e.jsx(ms,{className:Me("flex items-center justify-center text-current"),children:e.jsx(me,{className:"h-4 w-4"})})}));Xe.displayName=kt.displayName;const Cr=250,Er=100;function Sr({open:t,onOpenChange:s,paperId:a,arxivId:r,initialMethodIds:n,initialMethods:d,onSuccess:o,submitMode:i="direct",isAuthor:l=!1}){const[p,f]=u.useState(n),[c,g]=u.useState(!1),[b,_]=u.useState(""),[j,v]=u.useState(""),[N,S]=u.useState(new Map),I=he(),{toast:P}=oe(),y=u.useRef(!1);u.useEffect(()=>{if(!t){y.current=!1;return}if(y.current)return;y.current=!0,f(n),_(""),v("");const h=new Map;(d||[]).forEach($=>{const R=parseInt($.id);Number.isNaN(R)||h.set(R,$)}),S(h)},[t,n,d]),u.useEffect(()=>{const h=window.setTimeout(()=>{v(b.trim())},Cr);return()=>window.clearTimeout(h)},[b]);const{data:m,isFetching:x}=ne({queryKey:["methods-search",j],queryFn:()=>_e.listMethods({page_size:Er,...j?{q:j}:{}}),enabled:t});u.useEffect(()=>{var h;(h=m==null?void 0:m.results)!=null&&h.length&&S($=>{const R=new Map($);return m.results.forEach(T=>{const U=parseInt(T.id);Number.isNaN(U)||R.set(U,T)}),R})},[m]);const E=u.useMemo(()=>{const h=(m==null?void 0:m.results)||[],$=new Set,R=[],T=(H,J)=>{!J||Number.isNaN(H)||$.has(H)||(R.push(J),$.add(H))},U=()=>p.forEach(H=>T(H,N.get(H))),z=()=>h.forEach(H=>T(parseInt(H.id),H));return j?(z(),U()):(U(),z()),R},[m,p,N,j]),F=ce({mutationFn:async({paperId:h,methodIds:$})=>i==="pending"?(await pe.submit({paper_id:parseInt(h),edit_type:"methods",proposed_payload:{method_ids:$}}),null):W.updateMethods(h,$),onSuccess:h=>{if(i==="pending"){P({title:"Edit submitted for review",description:"Thanks! An admin will review your proposed method changes shortly."}),o==null||o(),s(!1);return}h&&je(I,h,[a,r]),P({title:"Methods updated",description:`Saved ${p.length} method${p.length===1?"":"s"} for this paper.`}),o==null||o(),s(!1)},onError:h=>{const $=fe(h,i==="pending"?"Failed to submit your edit. Please try again.":"Failed to update paper methods.");P({title:i==="pending"?"Could not submit edit":"Could not save methods",description:$,variant:"destructive"})}}),M=()=>{i==="direct"&&n.some(h=>!p.includes(h))&&!window.confirm("Remove one or more method links from this paper?")||F.mutate({paperId:a,methodIds:p})},O=u.useMemo(()=>{if(p.length!==n.length)return!0;const h=new Set(n);return p.some($=>!h.has($))},[p,n]),K=(h,$)=>{f(R=>$?R.includes(h)?R:[...R,h]:R.filter(T=>T!==h))},G=()=>_("");return e.jsxs(ee,{open:t,onOpenChange:s,children:[e.jsxs(te,{className:"max-w-2xl max-h-[600px]",children:[e.jsxs(se,{children:[e.jsx(ae,{children:"Edit Paper Methods"}),e.jsx(re,{children:"Select the methods and techniques used in this paper. You can select multiple methods."})]}),i==="pending"&&e.jsx(ge,{isAuthor:l}),e.jsxs("div",{className:"relative mb-4",children:[e.jsx(Ae,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground"}),e.jsx(V,{type:"text",placeholder:"Search methods...",value:b,onChange:h=>_(h.target.value),className:"pl-9 pr-9"}),b&&e.jsx("button",{type:"button",onClick:G,className:"absolute right-2 top-1/2 -translate-y-1/2 p-1 text-muted-foreground hover:text-foreground","aria-label":"Clear search",children:e.jsx(yt,{className:"w-4 h-4"})})]}),e.jsx("div",{className:"py-4 overflow-y-auto max-h-[400px]",children:E.length>0?e.jsx("div",{className:"space-y-2",children:E.map(h=>{const $=parseInt(h.id),R=p.includes($);return e.jsxs("div",{className:"flex items-center space-x-2 p-2 hover:bg-muted/50 rounded-md",children:[e.jsx(Xe,{id:`method-${h.id}`,checked:R,onCheckedChange:T=>K($,T===!0),className:"!border !border-black data-[state=checked]:!bg-black data-[state=checked]:!text-white"}),e.jsxs("label",{htmlFor:`method-${h.id}`,className:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 cursor-pointer flex-1",children:[h.name,h.full_name&&h.full_name!==h.name&&e.jsx("span",{className:"block text-xs text-muted-foreground font-normal",children:h.full_name}),h.description&&e.jsxs("span",{className:"block text-xs text-muted-foreground font-normal mt-1",children:[h.description.substring(0,100),h.description.length>100?"...":""]})]})]},h.id)})}):x?e.jsxs("div",{className:"text-center py-8 text-muted-foreground",children:[e.jsx(ie,{className:"w-8 h-8 mx-auto mb-2 animate-spin"}),e.jsx("p",{children:"Loading methods..."})]}):e.jsxs("div",{className:"text-center py-8 text-muted-foreground",children:[e.jsx(Ae,{className:"w-8 h-8 mx-auto mb-2 opacity-50"}),e.jsx("p",{children:j?`No methods found matching "${j}"`:"No methods available"})]})}),e.jsxs(le,{children:[e.jsx(L,{variant:"ghost",className:"sm:mr-auto",onClick:()=>g(!0),children:"Suggest a new method"}),e.jsx(L,{variant:"outline",onClick:()=>s(!1),children:"Cancel"}),e.jsx(L,{onClick:M,disabled:F.isPending||!O,children:F.isPending?e.jsxs(e.Fragment,{children:[e.jsx(ie,{className:"w-4 h-4 mr-2 animate-spin"}),i==="pending"?"Submitting...":"Saving..."]}):e.jsxs(e.Fragment,{children:[e.jsx(me,{className:"w-4 h-4 mr-2"}),i==="pending"?"Submit for review":"Save Changes"]})})]})]}),e.jsx(wt,{open:c,onOpenChange:g,paperId:a,kind:"method"})]})}const gs=["image/jpeg","image/png","image/webp","image/gif"],Pr=2*1024*1024;function $r(t){return gs.includes(t.type)?t.size>Pr?Promise.reject(new Error("Logo must be 2 MB or smaller.")):new Promise((s,a)=>{const r=new FileReader;r.onload=()=>s({file_name:t.name,mime_type:t.type,data_url:String(r.result)}),r.onerror=()=>a(new Error("Could not read that logo.")),r.readAsDataURL(t)}):Promise.reject(new Error("Choose a JPEG, PNG, WebP, or GIF logo."))}function Ir({paperId:t,initialName:s}){const[a,r]=u.useState(s),[n,d]=u.useState(""),[o,i]=u.useState(""),[l,p]=u.useState(null),[f,c]=u.useState(""),g=ce({mutationFn:()=>pe.submit(ya(Number(t),"new_organization",{name:a.trim(),...n.trim()?{hf_slug:n.trim()}:{},...o.trim()?{website_url:o.trim()}:{},...l?{image:l}:{}}))});return g.isSuccess?e.jsxs("p",{className:"rounded border p-3 text-sm",children:['Thanks! "',a.trim(),'" was submitted for review. Once an admin approves it, the organization is created and added to this paper.']}):e.jsxs("form",{className:"space-y-2 rounded border p-3",onSubmit:b=>{b.preventDefault(),g.mutate()},children:[e.jsx("p",{className:"text-sm font-medium",children:"Suggest a new organization"}),e.jsx(V,{"aria-label":"Organization name",placeholder:"Name",value:a,maxLength:200,onChange:b=>r(b.target.value)}),e.jsx(V,{"aria-label":"Hugging Face organization",placeholder:"Hugging Face organization (e.g. https://huggingface.co/PrimeIntellect)",value:n,onChange:b=>d(b.target.value)}),e.jsx(V,{"aria-label":"Website",type:"url",placeholder:"Website (e.g. https://www.primeintellect.ai)",value:o,onChange:b=>i(b.target.value)}),e.jsxs("label",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:["Logo (optional)",e.jsx("input",{"aria-label":"Logo",type:"file",accept:gs.join(","),onChange:b=>{var j;const _=(j=b.target.files)==null?void 0:j[0];p(null),c(""),_&&$r(_).then(p,v=>c(v.message))}})]}),l&&e.jsx("img",{src:l.data_url,alt:"Selected logo",className:"h-12 w-12 rounded border object-contain"}),f&&e.jsx("p",{className:"text-sm text-destructive",children:f}),e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsx("p",{className:"text-xs text-muted-foreground",children:"An admin reviews every new organization."}),e.jsx(L,{type:"submit",variant:"outline",disabled:!a.trim()||!n.trim()&&!o.trim()||g.isPending,children:g.isPending?"Submitting...":"Submit for review"})]}),g.error&&e.jsx("p",{className:"text-sm text-destructive",children:fe(g.error,"Could not submit this organization.")})]})}const Rr=({open:t,onOpenChange:s,paperId:a,initialOrganizationIds:r,submitMode:n,isAuthor:d})=>{var _;const[o,i]=u.useState(r),[l,p]=u.useState(""),f=he();u.useEffect(()=>{t&&(i(r),p(""))},[r,t]);const c=ne({queryKey:["organizations","curation"],queryFn:()=>_e.organizations(!1),enabled:t}),g=u.useMemo(()=>{var N,S;const j=l.trim().toLocaleLowerCase();if(!j)return((N=c.data)==null?void 0:N.results)??[];const v=I=>I===j?0:I.startsWith(j)?1:I.split(/[^\p{L}\p{N}]+/u).some(P=>P.startsWith(j))?2:3;return(((S=c.data)==null?void 0:S.results)??[]).map(I=>({organization:I,name:I.name.toLocaleLowerCase()})).filter(({name:I})=>I.includes(j)).sort((I,P)=>v(I.name)-v(P.name)).map(({organization:I})=>I)},[(_=c.data)==null?void 0:_.results,l]),b=ce({mutationFn:async()=>{if(!(r.some(v=>!o.includes(v))&&!window.confirm("Remove one or more organizations from this paper? Destructive edits may require a fresh sign-in.")))return n==="pending"?(await pe.submit({paper_id:Number(a),edit_type:"organizations",proposed_payload:{organization_ids:o}}),null):W.updateOrganizations(a,o)},onSuccess:j=>{j!==void 0&&(j&&je(f,j,[a]),s(!1))}});return e.jsx(ee,{open:t,onOpenChange:s,children:e.jsxs(te,{children:[e.jsxs(se,{children:[e.jsx(ae,{children:"Edit organizations"}),e.jsx(re,{children:"Associate organizations with this paper. If one is missing, search for it and suggest it for review."})]}),n==="pending"&&e.jsx(ge,{isAuthor:d}),e.jsxs("div",{className:"relative",children:[e.jsx(Ae,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),e.jsx(V,{type:"search","aria-label":"Search organizations",placeholder:"Search organizations...",value:l,onChange:j=>p(j.target.value),className:"pl-9 pr-9"}),l&&e.jsx("button",{type:"button",onClick:()=>p(""),className:"absolute right-2 top-1/2 -translate-y-1/2 p-1 text-muted-foreground hover:text-foreground","aria-label":"Clear organization search",children:e.jsx(yt,{className:"h-4 w-4"})})]}),e.jsxs("div",{className:"max-h-80 space-y-2 overflow-auto",children:[g.map(j=>{const v=Number(j.id);return e.jsxs("label",{className:"flex items-center gap-2 rounded border p-2",children:[e.jsx("input",{type:"checkbox",checked:o.includes(v),onChange:N=>i(S=>N.target.checked?[...S,v]:S.filter(I=>I!==v))}),j.name]},j.id)}),!c.isLoading&&g.length===0&&e.jsx("p",{className:"py-8 text-center text-sm text-muted-foreground",children:l.trim()?`No organizations found matching "${l.trim()}"`:"No organizations available"})]}),!c.isLoading&&g.length===0&&l.trim()&&e.jsx(Ir,{paperId:a,initialName:l.trim()},l.trim()),e.jsxs(le,{children:[e.jsx(L,{variant:"outline",onClick:()=>s(!1),children:"Cancel"}),e.jsx(L,{onClick:()=>b.mutate(),disabled:b.isPending,children:n==="pending"?"Submit test edit":"Save changes"})]})]})})};function Ar({open:t,onOpenChange:s,paperId:a,arxivId:r,initialProjectPages:n,onSuccess:d,submitMode:o="direct",isAuthor:i=!1}){const[l,p]=u.useState(n),[f,c]=u.useState(""),g=he(),{toast:b}=oe(),_=u.useRef(!1);u.useEffect(()=>{if(!t){_.current=!1;return}_.current||(_.current=!0,p(n),c(""))},[t,n]);const j=ce({mutationFn:async({paperId:m,projectPages:x})=>o==="pending"?(await pe.submit({paper_id:parseInt(m),edit_type:"project_pages",proposed_payload:{project_pages:x}}),null):W.updateProjectPages(m,x),onSuccess:m=>{if(o==="pending"){b({title:"Edit submitted for review",description:"Thanks! An admin will review your proposed project page changes shortly."}),d==null||d(),s(!1),c("");return}m&&je(g,m,[a,r]),d==null||d(),s(!1),c("")},onError:m=>{const x=fe(m,o==="pending"?"Failed to submit your edit. Please try again.":"Failed to update project pages.");b({title:o==="pending"?"Could not submit edit":"Could not save project pages",description:x,variant:"destructive"})}}),v=()=>{const m=f.trim();return m?l.some(x=>x.url===m)?(alert("This project page URL is already added"),null):[...l,{url:m,is_official:!1}]:l},N=()=>{const m=v();m!==null&&m.length!==l.length&&(p(m),c(""))},S=m=>{p(l.filter(x=>x.url!==m))},I=m=>{p(l.map(x=>x.url===m?{...x,is_official:!x.is_official}:x))},P=()=>{const m=v();m!==null&&(o==="direct"&&n.some(x=>!m.some(E=>E.url===x.url))&&!window.confirm("Remove one or more project pages from this paper?")||j.mutate({paperId:a,projectPages:m}))},y=u.useMemo(()=>{const m=f.trim(),x=m?[...l,{url:m,is_official:!1}]:l;if(x.length!==n.length)return!0;const E=new Map(n.map(F=>[F.url.trim(),!!F.is_official]));return x.some(F=>{const M=E.get(F.url.trim());return M===void 0||M!==!!F.is_official})},[l,f,n]);return e.jsx(ee,{open:t,onOpenChange:s,children:e.jsxs(te,{className:"max-w-2xl max-h-[600px]",children:[e.jsxs(se,{children:[e.jsx(ae,{children:"Edit Paper Project Pages"}),e.jsx(re,{children:"Add or remove project page URLs (e.g. authors' demo or landing pages) associated with this paper. Mark pages as official if they are created by the paper authors."})]}),o==="pending"&&e.jsx(ge,{isAuthor:i}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("label",{className:"text-sm font-medium",children:"Add Project Page URL"}),e.jsxs("div",{className:"flex space-x-2",children:[e.jsx(V,{type:"url",placeholder:"https://example.com/project",value:f,onChange:m=>c(m.target.value),onKeyPress:m=>{m.key==="Enter"&&(m.preventDefault(),N())},className:"flex-1"}),e.jsxs(L,{onClick:N,size:"sm",disabled:!f.trim(),children:[e.jsx(Ue,{className:"w-4 h-4 mr-1"}),"Add"]})]})]}),e.jsx("div",{className:"py-4 overflow-y-auto max-h-[350px]",children:l.length>0?e.jsx("div",{className:"space-y-2",children:l.map((m,x)=>e.jsxs("div",{className:"flex items-center space-x-2 p-3 bg-muted/30 rounded-lg hover:bg-muted/50 transition-colors",children:[e.jsx(zt,{className:"w-4 h-4 text-muted-foreground flex-shrink-0"}),e.jsx("div",{className:"flex-1 min-w-0",children:e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx("span",{className:"text-sm font-medium text-paper-blue truncate",children:m.url}),m.is_official&&e.jsx(rs,{variant:"secondary",className:"text-xs",children:"Official"})]})}),e.jsxs("div",{className:"flex items-center space-x-1",children:[e.jsxs(L,{variant:m.is_official?"default":"outline",size:"sm",onClick:()=>I(m.url),className:"h-8 px-2 text-xs",title:m.is_official?"Click to unmark as official (created by paper authors)":"Click to mark as official (created by paper authors)",children:[e.jsx(ns,{className:`w-3.5 h-3.5 mr-1 ${m.is_official?"fill-current":""}`}),m.is_official?"Official":"Mark official"]}),e.jsx(L,{variant:"ghost",size:"sm",onClick:()=>S(m.url),className:"h-8 px-2 text-destructive hover:text-destructive",title:"Remove project page",children:e.jsx(Te,{className:"w-4 h-4"})})]})]},x))}):e.jsxs("div",{className:"text-center py-8 text-muted-foreground",children:[e.jsx(zt,{className:"w-8 h-8 mx-auto mb-2 opacity-50"}),e.jsx("p",{className:"text-sm",children:"No project pages added yet"}),e.jsx("p",{className:"text-xs mt-1",children:"Add a project page URL above to get started"})]})}),e.jsxs(le,{children:[e.jsx(L,{variant:"outline",onClick:()=>s(!1),children:"Cancel"}),e.jsx(L,{onClick:P,disabled:j.isPending||!y,children:j.isPending?e.jsxs(e.Fragment,{children:[e.jsx(ie,{className:"w-4 h-4 mr-2 animate-spin"}),o==="pending"?"Submitting...":"Saving..."]}):e.jsxs(e.Fragment,{children:[e.jsx(me,{className:"w-4 h-4 mr-2"}),o==="pending"?"Submit for review":"Save Changes"]})})]})]})})}function Lr({open:t,onOpenChange:s,paperId:a,arxivId:r,initialRepositories:n,onSuccess:d,submitMode:o="direct",isAuthor:i=!1}){const[l,p]=u.useState(n),[f,c]=u.useState(""),g=he(),{toast:b}=oe(),_=u.useRef(!1);u.useEffect(()=>{if(!t){_.current=!1;return}_.current||(_.current=!0,p(n),c(""))},[t,n]);const j=ce({mutationFn:async({paperId:x,repositories:E})=>o==="pending"?(await pe.submit({paper_id:parseInt(x),edit_type:"repositories",proposed_payload:{repositories:E}}),null):W.updateRepositories(x,E),onSuccess:x=>{if(o==="pending"){b({title:"Edit submitted for review",description:"Thanks! An admin will review your proposed repository changes shortly."}),d==null||d(),s(!1),c("");return}x&&je(g,x,[a,r]),d==null||d(),s(!1),c("")},onError:x=>{const E=fe(x,o==="pending"?"Failed to submit your edit. Please try again.":"Failed to update paper repositories.");b({title:o==="pending"?"Could not submit edit":"Could not save repositories",description:E,variant:"destructive"})}}),v=x=>{const E=[];for(const F of x){const M=E.find(O=>Ut(O.url,F.url));if(M)M.is_official=M.is_official||F.is_official;else{const O=Je(F.url);E.push({url:O??F.url.trim(),is_official:F.is_official})}}return E},N=()=>{const x=f.trim(),E=x?[...l,{url:x,is_official:!1}]:l;return x&&l.some(F=>Ut(F.url,x))?(alert("This repository URL is already added"),null):v(E)},S=()=>{const x=N();x!==null&&x.length!==l.length&&(p(x),c(""))},I=x=>{p(l.filter(E=>E.url!==x))},P=x=>{p(l.map(E=>E.url===x?{...E,is_official:!E.is_official}:E))},y=()=>{const x=N();x!==null&&(o==="direct"&&n.some(E=>!x.some(F=>F.url===E.url))&&!window.confirm("Remove one or more repositories from this paper?")||j.mutate({paperId:a,repositories:x}))},m=u.useMemo(()=>{const x=f.trim(),E=x?[...l,{url:x,is_official:!1}]:l;if(E.length!==n.length)return!0;const F=v(n),M=v(E);if(M.length!==F.length)return!0;const O=new Map(F.map(K=>[Je(K.url)??K.url.trim(),!!K.is_official]));return M.some(K=>{const G=Je(K.url)??K.url.trim(),h=O.get(G);return h===void 0||h!==!!K.is_official})},[l,f,n]);return e.jsx(ee,{open:t,onOpenChange:s,children:e.jsxs(te,{className:"max-w-2xl max-h-[600px]",children:[e.jsxs(se,{children:[e.jsx(ae,{children:"Edit Paper Repositories"}),e.jsx(re,{children:"Add or remove GitHub repository URLs associated with this paper. Mark repositories as official if they are created by the paper authors."})]}),o==="pending"&&e.jsx(ge,{isAuthor:i}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("label",{className:"text-sm font-medium",children:"Add Repository URL"}),e.jsxs("div",{className:"flex space-x-2",children:[e.jsx(V,{type:"url",placeholder:"https://github.com/owner/repo",value:f,onChange:x=>c(x.target.value),onKeyPress:x=>{x.key==="Enter"&&(x.preventDefault(),S())},className:"flex-1"}),e.jsxs(L,{onClick:S,size:"sm",disabled:!f.trim(),children:[e.jsx(Ue,{className:"w-4 h-4 mr-1"}),"Add"]})]})]}),e.jsx("div",{className:"py-4 overflow-y-auto max-h-[350px]",children:l.length>0?e.jsx("div",{className:"space-y-2",children:l.map((x,E)=>e.jsxs("div",{className:"flex items-center space-x-2 p-3 bg-muted/30 rounded-lg hover:bg-muted/50 transition-colors",children:[e.jsx(Dt,{className:"w-4 h-4 text-muted-foreground flex-shrink-0"}),e.jsx("div",{className:"flex-1 min-w-0",children:e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx("span",{className:"text-sm font-medium text-paper-blue truncate",children:x.url}),x.is_official&&e.jsx(rs,{variant:"secondary",className:"text-xs",children:"Official"})]})}),e.jsxs("div",{className:"flex items-center space-x-1",children:[e.jsxs(L,{variant:x.is_official?"default":"outline",size:"sm",onClick:()=>P(x.url),className:"h-8 px-2 text-xs",title:x.is_official?"Click to unmark as official (created by paper authors)":"Click to mark as official (created by paper authors)",children:[e.jsx(ns,{className:`w-3.5 h-3.5 mr-1 ${x.is_official?"fill-current":""}`}),x.is_official?"Official":"Mark official"]}),e.jsx(L,{variant:"ghost",size:"sm",onClick:()=>I(x.url),className:"h-8 px-2 text-destructive hover:text-destructive",title:"Remove repository",children:e.jsx(Te,{className:"w-4 h-4"})})]})]},E))}):e.jsxs("div",{className:"text-center py-8 text-muted-foreground",children:[e.jsx(Dt,{className:"w-8 h-8 mx-auto mb-2 opacity-50"}),e.jsx("p",{className:"text-sm",children:"No repositories added yet"}),e.jsx("p",{className:"text-xs mt-1",children:"Add a repository URL above to get started"})]})}),e.jsxs(le,{children:[e.jsx(L,{variant:"outline",onClick:()=>s(!1),children:"Cancel"}),e.jsx(L,{onClick:y,disabled:j.isPending||!m,children:j.isPending?e.jsxs(e.Fragment,{children:[e.jsx(ie,{className:"w-4 h-4 mr-2 animate-spin"}),o==="pending"?"Submitting...":"Saving..."]}):e.jsxs(e.Fragment,{children:[e.jsx(me,{className:"w-4 h-4 mr-2"}),o==="pending"?"Submit for review":"Save Changes"]})})]})]})})}function Fr({open:t,onOpenChange:s,paperId:a,arxivId:r,initialUrl:n,onSuccess:d,submitMode:o="direct",isAuthor:i=!1}){const[l,p]=u.useState(n),f=he(),{toast:c}=oe(),g=u.useRef(!1);u.useEffect(()=>{if(!t){g.current=!1;return}g.current||(g.current=!0,p(n))},[t,n]);const b=ce({mutationFn:async({paperId:S,sourceUrl:I})=>o==="pending"?(await pe.submit({paper_id:parseInt(S),edit_type:"source_url",proposed_payload:{source_url:I}}),null):W.updateSourceUrl(S,I),onSuccess:S=>{if(o==="pending"){c({title:"Edit submitted for review",description:"Thanks! An admin will review your proposed source URL change shortly."}),d==null||d(),s(!1);return}S&&je(f,S,[a,r]),d==null||d(),s(!1)},onError:S=>{const I=fe(S,o==="pending"?"Failed to submit your edit. Please try again.":"Failed to update source URL.");c({title:o==="pending"?"Could not submit edit":"Could not save source URL",description:I,variant:"destructive"})}}),_=l.trim(),j=/^https?:\/\//i.test(_),v=_!==(n||"").trim(),N=()=>{j&&b.mutate({paperId:a,sourceUrl:_})};return e.jsx(ee,{open:t,onOpenChange:s,children:e.jsxs(te,{className:"max-w-2xl",children:[e.jsxs(se,{children:[e.jsx(ae,{children:"Edit Source URL"}),e.jsxs(re,{children:["Update the canonical URL for this external paper. This is the page the ",'"Source page"'," button links to. ArXiv papers cannot edit this field."]})]}),o==="pending"&&e.jsx(ge,{isAuthor:i}),e.jsxs("div",{className:"space-y-2 py-2",children:[e.jsx("label",{className:"text-sm font-medium",children:"Source URL"}),e.jsx(V,{type:"url",placeholder:"https://example.com/paper",value:l,onChange:S=>p(S.target.value),onKeyPress:S=>{S.key==="Enter"&&j&&v&&(S.preventDefault(),N())}}),!j&&_.length>0&&e.jsx("p",{className:"text-xs text-destructive",children:"URL must start with http:// or https://"})]}),e.jsxs(le,{children:[e.jsx(L,{variant:"outline",onClick:()=>s(!1),children:"Cancel"}),e.jsx(L,{onClick:N,disabled:b.isPending||!j||!v,children:b.isPending?e.jsxs(e.Fragment,{children:[e.jsx(ie,{className:"w-4 h-4 mr-2 animate-spin"}),o==="pending"?"Submitting...":"Saving..."]}):e.jsxs(e.Fragment,{children:[e.jsx(me,{className:"w-4 h-4 mr-2"}),o==="pending"?"Submit for review":"Save Changes"]})})]})]})})}const Tr=250,Ur=100;function Dr({open:t,onOpenChange:s,paperId:a,arxivId:r,initialTaskIds:n,initialTasks:d,onSuccess:o,submitMode:i="direct",isAuthor:l=!1}){const[p,f]=u.useState(n),[c,g]=u.useState(!1),[b,_]=u.useState(""),[j,v]=u.useState(""),[N,S]=u.useState(new Map),I=he(),{toast:P}=oe(),y=u.useRef(!1);u.useEffect(()=>{if(!t){y.current=!1;return}if(y.current)return;y.current=!0,f(n),_(""),v("");const h=new Map;(d||[]).forEach($=>{const R=parseInt($.id);Number.isNaN(R)||h.set(R,$)}),S(h)},[t,n,d]),u.useEffect(()=>{const h=window.setTimeout(()=>{v(b.trim())},Tr);return()=>window.clearTimeout(h)},[b]);const{data:m,isFetching:x}=ne({queryKey:["tasks-search",j],queryFn:()=>_e.listTasks({page_size:Ur,...j?{q:j}:{}}),enabled:t});u.useEffect(()=>{var h;(h=m==null?void 0:m.results)!=null&&h.length&&S($=>{const R=new Map($);return m.results.forEach(T=>{const U=parseInt(T.id);Number.isNaN(U)||R.set(U,T)}),R})},[m]);const E=u.useMemo(()=>{const h=(m==null?void 0:m.results)||[],$=new Set,R=[],T=(H,J)=>{!J||Number.isNaN(H)||$.has(H)||(R.push(J),$.add(H))},U=()=>p.forEach(H=>T(H,N.get(H))),z=()=>h.forEach(H=>T(parseInt(H.id),H));return j?(z(),U()):(U(),z()),R},[m,p,N,j]),F=ce({mutationFn:async({paperId:h,taskIds:$})=>i==="pending"?(await pe.submit({paper_id:parseInt(h),edit_type:"tasks",proposed_payload:{task_ids:$}}),null):W.updateTasks(h,$),onMutate:async({taskIds:h})=>{if(i==="pending")return{snapshots:[]};const $=h.map(U=>N.get(U)).filter(U=>!!U).map(U=>({id:U.id,name:U.name,slug:U.slug})).sort((U,z)=>U.name.localeCompare(z.name)),R=Array.from(new Set([a,r].filter(U=>!!U)));await Promise.all(R.flatMap(U=>[I.cancelQueries({queryKey:ye.detail(U)}),I.cancelQueries({queryKey:ye.arxiv(U)})]));const T=[];return R.forEach(U=>{[ye.detail(U),ye.arxiv(U)].forEach(z=>{const H=I.getQueryData(z);T.push({key:z,data:H}),H&&I.setQueryData(z,{...H,tasks:$})})}),P({title:"Tasks updated",description:`Saved ${h.length} task${h.length===1?"":"s"} for this paper.`}),o==null||o(),s(!1),{snapshots:T}},onSuccess:h=>{if(i==="pending"){P({title:"Edit submitted for review",description:"Thanks! An admin will review your proposed task changes shortly."}),o==null||o(),s(!1);return}h&&je(I,h,[a,r])},onError:(h,$,R)=>{var U;(U=R==null?void 0:R.snapshots)==null||U.forEach(({key:z,data:H})=>{I.setQueryData(z,H)});const T=fe(h,i==="pending"?"Failed to submit your edit. Please try again.":"Failed to update paper tasks.");P({title:i==="pending"?"Could not submit edit":"Could not save tasks",description:T,variant:"destructive"})}}),M=()=>{i==="direct"&&n.some(h=>!p.includes(h))&&!window.confirm("Remove one or more task links from this paper?")||F.mutate({paperId:a,taskIds:p})},O=u.useMemo(()=>{if(p.length!==n.length)return!0;const h=new Set(n);return p.some($=>!h.has($))},[p,n]),K=(h,$)=>{f(R=>$?R.includes(h)?R:[...R,h]:R.filter(T=>T!==h))},G=()=>_("");return e.jsxs(ee,{open:t,onOpenChange:s,children:[e.jsxs(te,{className:"max-w-2xl max-h-[600px]",children:[e.jsxs(se,{children:[e.jsx(ae,{children:"Edit Paper Tasks"}),e.jsx(re,{children:"Select the tasks that this paper addresses. You can select multiple tasks."})]}),i==="pending"&&e.jsx(ge,{isAuthor:l}),e.jsxs("div",{className:"relative mb-4",children:[e.jsx(Ae,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground"}),e.jsx(V,{type:"text",placeholder:"Search tasks...",value:b,onChange:h=>_(h.target.value),className:"pl-9 pr-9"}),b&&e.jsx("button",{type:"button",onClick:G,className:"absolute right-2 top-1/2 -translate-y-1/2 p-1 text-muted-foreground hover:text-foreground","aria-label":"Clear search",children:e.jsx(yt,{className:"w-4 h-4"})})]}),e.jsx("div",{className:"py-4 overflow-y-auto max-h-[400px]",children:E.length>0?e.jsx("div",{className:"space-y-2",children:E.map(h=>{const $=parseInt(h.id),R=p.includes($);return e.jsxs("div",{className:"flex items-center space-x-2 p-2 hover:bg-muted/50 rounded-md",children:[e.jsx(Xe,{id:`task-${h.id}`,checked:R,onCheckedChange:T=>K($,T===!0),className:"!border !border-black data-[state=checked]:!bg-black data-[state=checked]:!text-white"}),e.jsxs("label",{htmlFor:`task-${h.id}`,className:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 cursor-pointer flex-1",children:[h.name,h.description&&e.jsxs("span",{className:"block text-xs text-muted-foreground font-normal mt-1",children:[h.description.substring(0,100),h.description.length>100?"...":""]})]})]},h.id)})}):x?e.jsxs("div",{className:"text-center py-8 text-muted-foreground",children:[e.jsx(ie,{className:"w-8 h-8 mx-auto mb-2 animate-spin"}),e.jsx("p",{children:"Loading tasks..."})]}):e.jsxs("div",{className:"text-center py-8 text-muted-foreground",children:[e.jsx(Ae,{className:"w-8 h-8 mx-auto mb-2 opacity-50"}),e.jsx("p",{children:j?`No tasks found matching "${j}"`:"No tasks available"})]})}),e.jsxs(le,{children:[e.jsx(L,{variant:"ghost",className:"sm:mr-auto",onClick:()=>g(!0),children:"Suggest a new task"}),e.jsx(L,{variant:"outline",onClick:()=>s(!1),children:"Cancel"}),e.jsx(L,{onClick:M,disabled:F.isPending||!O,children:F.isPending?e.jsxs(e.Fragment,{children:[e.jsx(ie,{className:"w-4 h-4 mr-2 animate-spin"}),i==="pending"?"Submitting...":"Saving..."]}):e.jsxs(e.Fragment,{children:[e.jsx(me,{className:"w-4 h-4 mr-2"}),i==="pending"?"Submit for review":"Save Changes"]})})]})]}),e.jsx(wt,{open:c,onOpenChange:g,paperId:a,kind:"task"})]})}const Ot=10,Br=/^https?:\/\/(?:www\.|mobile\.)?(?:x|twitter)\.com\/(?:[A-Za-z0-9_]{1,15}|i\/web|i)\/status(?:es)?\/(\d{1,25})(?:[/?#].*)?$/;function Ne(t){var s;return((s=Br.exec(t.trim()))==null?void 0:s[1])??null}function zr({open:t,onOpenChange:s,paperId:a,arxivId:r,initialUrls:n,submitMode:d="direct",isAuthor:o=!1}){const[i,l]=u.useState(n),[p,f]=u.useState(""),[c,g]=u.useState(null),b=he(),{toast:_}=oe(),j=u.useRef(!1);u.useEffect(()=>{if(!t){j.current=!1;return}j.current||(j.current=!0,l(n),f(""),g(null))},[t,n]);const v=ce({mutationFn:async m=>d==="pending"?(await pe.submit({paper_id:parseInt(a),edit_type:"x_threads",proposed_payload:{x_threads:m}}),null):W.updateXThreads(a,m),onSuccess:m=>{d==="pending"?_({title:"Edit submitted for review",description:"Thanks! An admin will review your proposed X threads shortly."}):m&&je(b,m,[a,r]),s(!1)},onError:m=>{_({title:d==="pending"?"Could not submit edit":"Could not save X threads",description:fe(m,d==="pending"?"Failed to submit your edit. Please try again.":"Failed to update X threads."),variant:"destructive"})}}),N=()=>{const m=p.trim();if(!m)return i;const x=Ne(m);return x?i.some(E=>Ne(E)===x)?(g("This post is already listed."),null):i.length>=Ot?(g(`A paper can link at most ${Ot} X threads.`),null):[...i,m]:(g("Paste a post URL such as https://x.com/user/status/123…"),null)},S=()=>{const m=N();m!==null&&(l(m),f(""),g(null))},I=(m,x)=>{const E=[...i];[E[m],E[m+x]]=[E[m+x],E[m]],l(E)},P=()=>{const m=N();m!==null&&(d==="direct"&&n.some(x=>!m.some(E=>Ne(E)===Ne(x)))&&!window.confirm("Remove one or more X threads from this paper?")||v.mutate(m))},y=u.useMemo(()=>(p.trim()?[...i,p.trim()]:i).map(Ne).join()!==n.map(Ne).join(),[i,p,n]);return e.jsx(ee,{open:t,onOpenChange:s,children:e.jsxs(te,{className:"max-w-2xl max-h-[600px]",children:[e.jsxs(se,{children:[e.jsx(ae,{children:"Edit X threads"}),e.jsx(re,{children:"Link posts on X (formerly Twitter) in which the authors introduce this paper. A preview of each post is shown on the paper page."})]}),d==="pending"&&e.jsx(ge,{isAuthor:o}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("label",{className:"text-sm font-medium",htmlFor:"x-thread-url",children:"Add X post URL"}),e.jsxs("div",{className:"flex space-x-2",children:[e.jsx(V,{id:"x-thread-url",type:"url",placeholder:"https://x.com/user/status/1234567890",value:p,onChange:m=>{f(m.target.value),g(null)},onKeyDown:m=>{m.key==="Enter"&&(m.preventDefault(),S())},"aria-invalid":!!c,className:"flex-1"}),e.jsxs(L,{onClick:S,size:"sm",disabled:!p.trim(),children:[e.jsx(Ue,{className:"w-4 h-4 mr-1"}),"Add"]})]}),c&&e.jsx("p",{className:"text-xs text-destructive",children:c})]}),e.jsx("div",{className:"py-4 overflow-y-auto max-h-[350px]",children:i.length>0?e.jsx("div",{className:"space-y-2",children:i.map((m,x)=>e.jsxs("div",{className:"flex items-center space-x-2 p-3 bg-muted/30 rounded-lg",children:[e.jsx("span",{className:"flex-1 min-w-0 truncate text-sm font-medium",children:m}),e.jsx(L,{variant:"ghost",size:"sm",className:"h-8 px-2",disabled:x===0,onClick:()=>I(x,-1),"aria-label":"Move up",children:e.jsx(za,{className:"w-4 h-4"})}),e.jsx(L,{variant:"ghost",size:"sm",className:"h-8 px-2",disabled:x===i.length-1,onClick:()=>I(x,1),"aria-label":"Move down",children:e.jsx(Ba,{className:"w-4 h-4"})}),e.jsx(L,{variant:"ghost",size:"sm",className:"h-8 px-2 text-destructive hover:text-destructive",onClick:()=>l(i.filter(E=>E!==m)),"aria-label":"Remove X thread",children:e.jsx(Te,{className:"w-4 h-4"})})]},m))}):e.jsx("p",{className:"text-center py-8 text-sm text-muted-foreground",children:"No X threads linked yet"})}),e.jsxs(le,{children:[e.jsx(L,{variant:"outline",onClick:()=>s(!1),children:"Cancel"}),e.jsx(L,{onClick:P,disabled:v.isPending||!y,children:v.isPending?e.jsxs(e.Fragment,{children:[e.jsx(ie,{className:"w-4 h-4 mr-2 animate-spin"}),d==="pending"?"Submitting...":"Saving..."]}):e.jsxs(e.Fragment,{children:[e.jsx(me,{className:"w-4 h-4 mr-2"}),d==="pending"?"Submit for review":"Save Changes"]})})]})]})})}function Hr({activeEditor:t,arxivId:s,editSubmitMode:a,evaluations:r,isAdmin:n,isLinkedAuthor:d,onOpenChange:o,paper:i}){if(!t)return null;const l={open:!0,paperId:i.id,arxivId:s,submitMode:a,isAuthor:d},p=c=>g=>o(c,g);return{tasks:()=>{var c;return e.jsx(Dr,{...l,onOpenChange:p("tasks"),initialTaskIds:((c=i.tasks)==null?void 0:c.map(g=>Number(g.id)))??[],initialTasks:i.tasks??[]})},methods:()=>{var c;return e.jsx(Sr,{...l,onOpenChange:p("methods"),initialMethodIds:((c=i.methods)==null?void 0:c.map(g=>Number(g.id)))??[],initialMethods:i.methods??[]})},repositories:()=>{var c;return e.jsx(Lr,{...l,onOpenChange:p("repositories"),initialRepositories:((c=i.repositories)==null?void 0:c.map(({url:g,is_official:b})=>({url:g,is_official:!!b})))??[]})},"project-pages":()=>{var c;return e.jsx(Ar,{...l,onOpenChange:p("project-pages"),initialProjectPages:((c=i.project_pages)==null?void 0:c.map(({url:g,is_official:b})=>({url:g,is_official:!!b})))??[]})},results:()=>e.jsx(jr,{...l,onOpenChange:p("results"),initialEvaluations:r,paperTasks:i.tasks??[],isAdmin:n}),"source-url":()=>e.jsx(Fr,{...l,onOpenChange:p("source-url"),initialUrl:i.source_url??i.url_abs??""}),"hf-artifacts":()=>e.jsx(yr,{...l,onOpenChange:p("hf-artifacts"),initialArtifacts:{hf_models:i.hf_models??[],hf_datasets:i.hf_datasets??[],hf_spaces:i.hf_spaces??[]}}),"x-threads":()=>{var c;return e.jsx(zr,{...l,onOpenChange:p("x-threads"),initialUrls:((c=i.x_threads)==null?void 0:c.map(({url:g})=>g))??[]})},organizations:()=>e.jsx(Rr,{open:!0,paperId:i.id,onOpenChange:p("organizations"),initialOrganizationIds:(i.organizations??[]).map(({id:c})=>Number(c)),submitMode:a,isAuthor:d})}[t]()}const Mr={"add-evals":{trigger:"add evals",running:"adding evals…",complete:"add evals ✓",title:"Add evaluations with Codex",description:t=>e.jsxs(e.Fragment,{children:["Codex will run the repository’s add-evals skill for “",t,"”. It will import only paper-native results onto existing, metric-compatible leaderboards. Accepted rows are written directly to the live database."]}),notice:"Comparator rows, unknown benchmarks, and unconfigured metrics will be skipped. Jobs run one at a time in submission order.",progress:"Codex is researching the paper and validating results against the configured leaderboards.",action:"Run add-evals",start:Ia,get:$a,cancel:Pa},"enrich-paper":{trigger:"enrich paper",running:"enriching…",complete:"enriched ✓",title:"Enrich paper with Codex",description:t=>e.jsxs(e.Fragment,{children:["Codex will run the repository’s enrich-paper skill for “",t,"”. It will validate official code and project links, merge high-confidence taxonomy tags, and check the paper thumbnail. Accepted changes are written directly to the live database."]}),notice:"Uncertain URLs and missing taxonomy concepts will be reported rather than guessed. Jobs run one at a time in submission order.",progress:"Codex is validating artifacts, taxonomy tags, and thumbnail quality for this paper.",action:"Run enrich-paper",start:Sa,get:Ea,cancel:Ca}};function qr({report:t}){return e.jsx("div",{className:"min-w-0 max-h-[50vh] overflow-y-auto overflow-x-hidden rounded-md border bg-muted/40 p-4 text-sm leading-relaxed",children:e.jsx(Fa,{remarkPlugins:[Ta],components:{a:({children:s,...a})=>e.jsx("a",{...a,className:"break-all underline underline-offset-2",target:"_blank",rel:"noreferrer",children:s}),p:({children:s})=>e.jsx("p",{className:"mb-3 break-words last:mb-0",children:s}),ul:({children:s})=>e.jsx("ul",{className:"mb-3 list-disc space-y-1 pl-5 last:mb-0",children:s}),ol:({children:s})=>e.jsx("ol",{className:"mb-3 list-decimal space-y-1 pl-5 last:mb-0",children:s}),h1:({children:s})=>e.jsx("h3",{className:"mb-2 font-semibold",children:s}),h2:({children:s})=>e.jsx("h3",{className:"mb-2 font-semibold",children:s}),h3:({children:s})=>e.jsx("h3",{className:"mb-2 font-semibold",children:s}),code:({children:s})=>e.jsx("code",{className:"break-all rounded bg-background/80 px-1 py-0.5 font-mono text-xs",children:s}),pre:({children:s})=>e.jsx("pre",{className:"mb-3 max-w-full overflow-x-auto whitespace-pre-wrap break-words rounded bg-background/80 p-3 font-mono text-xs last:mb-0",children:s})},children:t})})}function xs({kind:t,paperId:s,paperTitle:a,triggerClassName:r,onComplete:n}){const d=Mr[t],[o,i]=u.useState(!1),[l,p]=u.useState(null),[f,c]=u.useState(!1),[g,b]=u.useState(null),_=u.useRef(null),j=(l==null?void 0:l.status)==="awaiting_markdown",v=j||(l==null?void 0:l.status)==="queued"||(l==null?void 0:l.status)==="dispatching"||(l==null?void 0:l.status)==="running",N=l==null?void 0:l.id;u.useEffect(()=>{if(!v||!N)return;let y=!1;const m=window.setInterval(async()=>{try{const x=await d.get(N);y||(p(x),b(null))}catch(x){y||b(x instanceof Error?x.message:"Could not check job status.")}},j?6e4:2e3);return()=>{y=!0,window.clearInterval(m)}},[v,j,d,N]),u.useEffect(()=>{(l==null?void 0:l.status)!=="completed"||_.current===l.id||(_.current=l.id,n())},[l,n]);const S=async()=>{c(!0),b(null);try{p(await d.start(s))}catch(y){b(y instanceof Error?y.message:"Could not start Codex.")}finally{c(!1)}},I=()=>{p(null),b(null),_.current=null},P=async()=>{if(l){b(null);try{p(await d.cancel(l.id))}catch(y){b(y instanceof Error?y.message:"Could not cancel Codex.")}}};return e.jsxs(ee,{open:o,onOpenChange:i,children:[e.jsx("button",{type:"button",className:r,onClick:()=>i(!0),children:j?"waiting for Markdown…":v?d.running:(l==null?void 0:l.status)==="completed"?d.complete:d.trigger}),e.jsxs(te,{className:"max-h-[90vh] w-[calc(100vw-2rem)] min-w-0 max-w-2xl overflow-hidden",children:[e.jsxs(se,{className:"min-w-0",children:[e.jsx(ae,{children:d.title}),e.jsx(re,{children:d.description(a)})]}),l?e.jsxs("div",{className:"min-w-0 space-y-3 overflow-hidden",children:[e.jsxs("div",{className:"font-mono text-xs uppercase tracking-wide text-muted-foreground",children:["Status: ",l.status.replace("_"," ")]}),l.hf_job_url&&e.jsx("a",{className:"text-sm underline",href:l.hf_job_url,target:"_blank",rel:"noreferrer",children:"View Hugging Face Job"}),j&&e.jsxs("div",{className:"rounded-md border bg-muted/40 p-3 text-sm",children:[Ra," You can close this window and return."]}),v&&!j&&e.jsxs("div",{className:"rounded-md border bg-muted/40 p-3 text-sm",children:[l.status==="queued"?"This job is queued and will start after the current Codex job finishes.":d.progress," ","This can take several minutes; you can close this window and return."]}),l.report&&e.jsx(qr,{report:l.report}),l.error&&!j&&e.jsx("div",{className:"rounded-md border border-destructive/40 bg-destructive/10 p-3 text-sm text-destructive",children:l.error})]}):e.jsx("div",{className:"rounded-md border bg-muted/40 p-3 text-sm text-muted-foreground",children:d.notice}),g&&e.jsx("div",{className:"rounded-md border border-destructive/40 bg-destructive/10 p-3 text-sm text-destructive",children:g}),e.jsxs(le,{children:[e.jsx(L,{variant:"outline",onClick:()=>i(!1),children:v?"Close":"Cancel"}),v&&e.jsx(L,{variant:"outline",onClick:()=>void P(),children:"Cancel job"}),!l&&e.jsx(L,{onClick:S,disabled:f,children:f?"Starting…":d.action}),l&&!v&&e.jsx(L,{variant:"outline",onClick:I,children:"Run again"})]})]})]})}function Or(t){return e.jsx(xs,{...t,kind:"add-evals",triggerClassName:"edit-link"})}function Pe({accent:t,id:s,label:a}){return e.jsxs("div",{className:"section-rule paper-section-anchor",id:s,children:[e.jsx("span",{children:e.jsx("a",{href:`#${s}`,className:"section-anchor-link",children:a})}),t]})}function Kr({canCopyBadge:t,canEdit:s,evaluationsByTask:a,evaluationsLoading:r,isAdmin:n,onCopyBadge:d,onEdit:o,onRefresh:i,paper:l,visibleEvaluationCount:p}){return e.jsxs(e.Fragment,{children:[e.jsx(Pe,{id:"results",label:"Results",accent:e.jsxs("span",{className:"accent",children:[p," benchmarks",t&&e.jsxs("button",{type:"button",className:"edit-link results-badge-copy",onClick:d,title:"Copy live leaderboard badges for your repository README",children:[e.jsx(Y,{name:"copy",size:10})," Copy PwC badge"]}),n&&Aa()&&e.jsx(Or,{paperId:Number(l.id),paperTitle:l.title,onComplete:i}),s&&e.jsx("button",{type:"button",onClick:o,className:"edit-link",children:"edit"})]})}),r?e.jsx(Ie,{className:"h-32 w-full"}):a.length>0?a.map(f=>e.jsxs("div",{className:f.taskSlug?"paper-section-anchor":void 0,id:f.taskSlug?os(f.taskSlug):void 0,children:[e.jsxs("div",{className:"section-rule",children:[e.jsx("span",{children:f.taskSlug?e.jsxs(e.Fragment,{children:[e.jsx(ue,{to:`/tasks/${f.taskSlug}`,children:f.taskName}),e.jsx("a",{href:tr(f.taskSlug),className:"section-anchor-link results-task-permalink","aria-label":`Permalink to ${f.taskName} results on this paper`,title:"Link to this task's results",children:"#"})]}):f.taskName}),e.jsxs("span",{className:"accent",children:[f.rows.length," ",f.rows.length===1?"result":"results"]})]}),e.jsxs("table",{className:"results-table",children:[e.jsxs("colgroup",{children:[e.jsx("col",{style:{width:"28%"}}),e.jsx("col",{style:{width:"28%"}}),e.jsx("col",{style:{width:"14%"}}),e.jsx("col",{style:{width:"12%"}}),e.jsx("col",{style:{width:"8%"}}),e.jsx("col",{style:{width:"10%"}})]}),e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:"Benchmark"}),e.jsx("th",{children:"Model"}),e.jsx("th",{children:"Metric"}),e.jsx("th",{children:"Value"}),e.jsx("th",{children:"Rank"}),e.jsx("th",{children:"Compare"})]})}),e.jsx("tbody",{children:f.rows.map(c=>{var g;return e.jsxs("tr",{children:[e.jsx("td",{className:"benchmark",children:c.dataset_slug?e.jsx(ue,{to:`/benchmark/${c.dataset_slug}`,children:c.dataset_name||"—"}):c.dataset_name||"—"}),e.jsxs("td",{className:"model",title:c.model_name||void 0,children:[c.hf_model_url?e.jsx("a",{href:c.hf_model_url,target:"_blank",rel:"noopener noreferrer",className:"model-hf-link",title:`Open ${c.model_name||"model"} on Hugging Face`,children:c.model_name||"—"}):c.model_name||"—",c.is_open===!1&&e.jsx(oa,{}),(c.external??c.is_external)&&e.jsx(la,{sourceUrl:c.source_url||c.external_source_url||c.result_url})]}),e.jsx("td",{className:"metric",children:c.best_metric}),e.jsx("td",{className:"value",children:Bs((g=c.metrics)==null?void 0:g[c.best_metric||""])}),e.jsx("td",{className:"rank",children:c.best_rank!=null?`#${c.best_rank}`:"—"}),e.jsx("td",{className:"compare",children:c.dataset_slug&&e.jsx(ue,{to:`/benchmark/${c.dataset_slug}?${[c.task_slug?`task=${encodeURIComponent(c.task_slug)}`:"",`eval=${encodeURIComponent(c.id)}`].filter(Boolean).join("&")}`,children:"Compare →"})})]},c.id)})})]})]},f.taskId)):e.jsx("p",{style:{fontFamily:"var(--mono)",fontSize:12,color:"var(--ink-faint)"},children:"No benchmark results recorded yet."})]})}var Nt="Radio",[Gr,bs]=vt(Nt),[Xr,Qr]=Gr(Nt),js=u.forwardRef((t,s)=>{const{__scopeRadio:a,name:r,checked:n=!1,required:d,disabled:o,value:i="on",onCheck:l,form:p,...f}=t,[c,g]=u.useState(null),b=Fe(s,v=>g(v)),_=u.useRef(!1),j=c?p||!!c.closest("form"):!0;return e.jsxs(Xr,{scope:a,checked:n,disabled:o,children:[e.jsx(ke.button,{type:"button",role:"radio","aria-checked":n,"data-state":_s(n),"data-disabled":o?"":void 0,disabled:o,value:i,...f,ref:b,onClick:Re(t.onClick,v=>{n||l==null||l(),j&&(_.current=v.isPropagationStopped(),_.current||v.stopPropagation())})}),j&&e.jsx(ws,{control:c,bubbles:!_.current,name:r,value:i,checked:n,required:d,disabled:o,form:p,style:{transform:"translateX(-100%)"}})]})});js.displayName=Nt;var vs="RadioIndicator",ys=u.forwardRef((t,s)=>{const{__scopeRadio:a,forceMount:r,...n}=t,d=Qr(vs,a);return e.jsx(Yt,{present:r||d.checked,children:e.jsx(ke.span,{"data-state":_s(d.checked),"data-disabled":d.disabled?"":void 0,...n,ref:s})})});ys.displayName=vs;var Vr="RadioBubbleInput",ws=u.forwardRef(({__scopeRadio:t,control:s,checked:a,bubbles:r=!0,...n},d)=>{const o=u.useRef(null),i=Fe(o,d),l=as(a),p=Zt(s);return u.useEffect(()=>{const f=o.current;if(!f)return;const c=window.HTMLInputElement.prototype,b=Object.getOwnPropertyDescriptor(c,"checked").set;if(l!==a&&b){const _=new Event("click",{bubbles:r});b.call(f,a),f.dispatchEvent(_)}},[l,a,r]),e.jsx(ke.input,{type:"radio","aria-hidden":!0,defaultChecked:a,...n,tabIndex:-1,ref:i,style:{...n.style,...p,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});ws.displayName=Vr;function _s(t){return t?"checked":"unchecked"}var Wr=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Qe="RadioGroup",[Yr]=vt(Qe,[es,bs]),ks=es(),Ns=bs(),[Jr,Zr]=Yr(Qe),Cs=u.forwardRef((t,s)=>{const{__scopeRadioGroup:a,name:r,defaultValue:n,value:d,required:o=!1,disabled:i=!1,orientation:l,dir:p,loop:f=!0,onValueChange:c,...g}=t,b=ks(a),_=zs(p),[j,v]=Jt({prop:d,defaultProp:n??null,onChange:c,caller:Qe});return e.jsx(Jr,{scope:a,name:r,required:o,disabled:i,value:j,onValueChange:v,children:e.jsx(Hs,{asChild:!0,...b,orientation:l,dir:_,loop:f,children:e.jsx(ke.div,{role:"radiogroup","aria-required":o,"aria-orientation":l,"data-disabled":i?"":void 0,dir:_,...g,ref:s})})})});Cs.displayName=Qe;var Es="RadioGroupItem",Ss=u.forwardRef((t,s)=>{const{__scopeRadioGroup:a,disabled:r,...n}=t,d=Zr(Es,a),o=d.disabled||r,i=ks(a),l=Ns(a),p=u.useRef(null),f=Fe(s,p),c=d.value===n.value,g=u.useRef(!1);return u.useEffect(()=>{const b=j=>{Wr.includes(j.key)&&(g.current=!0)},_=()=>g.current=!1;return document.addEventListener("keydown",b),document.addEventListener("keyup",_),()=>{document.removeEventListener("keydown",b),document.removeEventListener("keyup",_)}},[]),e.jsx(Ms,{asChild:!0,...i,focusable:!o,active:c,children:e.jsx(js,{disabled:o,required:d.required,checked:c,...l,...n,name:d.name,ref:f,onCheck:()=>d.onValueChange(n.value),onKeyDown:Re(b=>{b.key==="Enter"&&b.preventDefault()}),onFocus:Re(n.onFocus,()=>{var b;g.current&&((b=p.current)==null||b.click())})})})});Ss.displayName=Es;var en="RadioGroupIndicator",Ps=u.forwardRef((t,s)=>{const{__scopeRadioGroup:a,...r}=t,n=Ns(a);return e.jsx(ys,{...n,...r,ref:s})});Ps.displayName=en;var $s=Cs,Is=Ss,tn=Ps;const ft=u.forwardRef(({className:t,...s},a)=>e.jsx($s,{className:Me("grid gap-2",t),...s,ref:a}));ft.displayName=$s.displayName;const $e=u.forwardRef(({className:t,...s},a)=>e.jsx(Is,{ref:a,className:Me("aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",t),...s,children:e.jsx(tn,{className:"flex items-center justify-center",children:e.jsx(qs,{className:"h-2.5 w-2.5 fill-current text-current"})})}));$e.displayName=Is.displayName;const sn={pdf:"PDF",model:"Model",dataset:"Dataset",space:"Space",github:"GitHub"},gt=/^[A-Za-z0-9][A-Za-z0-9._-]*$/,an=/^[A-Za-z0-9][\w.-]*\/[A-Za-z0-9][\w.-]*$/,rn=20,xt="copy_to_bucket";function nn(t){const s=t.trim();if(!an.test(s))return null;const[a,r]=s.split("/");return`https://huggingface.co/buckets/${encodeURIComponent(a)}/${encodeURIComponent(r)}`}function bt(t){return`pwc:bucket-copy:${t}`}function on(t){if(typeof window>"u"||new URL(window.location.href).searchParams.get(xt)!==t)return null;try{const a=window.sessionStorage.getItem(bt(t));if(!a)return null;const r=JSON.parse(a);return r.paperId!==t||typeof r.bucketId!="string"||!["new","existing"].includes(r.destinationMode)||!["public","private"].includes(r.visibility)||!Array.isArray(r.selectedIds)||r.selectedIds.some(n=>typeof n!="string")?null:r}catch{return null}}function ln(t,s=rn){if(s<1)throw new Error("Bucket copy batch size must be positive");const a=[];for(let r=0;r!gt.test(l)))return null;const o=d.join("/"),i=s==="model"?"":`${s}s/`;return{id:`${s}:${o}`,kind:s,label:o,url:`https://huggingface.co/${i}${o}`,source:`hf://${i}${o}/`,destination:`${s}s/${o}/`,repoId:o}}catch{return null}}function cn(t){try{const s=new URL(t);if(s.hostname!=="github.com"&&s.hostname!=="www.github.com")return null;const a=s.pathname.split("/").filter(Boolean);if(a.length<2)return null;const r=a[0],n=a[1].replace(/\.git$/,"");if(!gt.test(r)||!gt.test(n))return null;const d=`${r}/${n}`;return{id:`github:${d}`,kind:"github",label:d,url:`https://github.com/${d}`,source:`https://github.com/${d}.git`,destination:`github/${d}/`}}catch{return null}}function dn({githubUrls:t,hfModelUrls:s,hfDatasetUrls:a,hfSpaceUrls:r,paperId:n,pdfName:d,pdfUrl:o}){const i=[o?{id:"pdf",kind:"pdf",label:"Paper PDF",url:o,source:o,destination:`paper/${d||n}.pdf`}:null,...s.map(p=>dt(p,"model")),...a.map(p=>dt(p,"dataset")),...r.map(p=>dt(p,"space")),...t.map(cn)],l=new Set;return i.filter(p=>!p||l.has(p.id)?!1:(l.add(p.id),!0))}function un(t,s,a){const r=["# Requires the Hugging Face CLI: https://huggingface.co/docs/huggingface_hub/guides/cli",`HF_BUCKET=${ze(t.trim())}`];a.create&&r.push(`hf buckets create "$HF_BUCKET" --exist-ok${a.isPrivate?" --private":""}`);for(const o of s.filter(i=>i.kind!=="github"&&i.kind!=="pdf"))r.push(`hf cp ${ze(o.source)} "hf://buckets/$HF_BUCKET/${o.destination}"`);const n=s.find(o=>o.kind==="pdf");n&&r.push('PWC_PDF="$(mktemp)"',`trap 'rm -f "$PWC_PDF"' EXIT`,`curl --fail --location ${ze(n.source)} --output "$PWC_PDF"`,`hf cp "$PWC_PDF" "hf://buckets/$HF_BUCKET/${n.destination}"`);const d=s.filter(o=>o.kind==="github");if(d.length){r.push('PWC_COPY_DIR="$(mktemp -d)"',`trap 'rm -rf "$PWC_COPY_DIR"' EXIT`);for(const o of d){const i=`$PWC_COPY_DIR/${o.destination.replace(/\/$/,"")}`;r.push(`git clone --depth 1 -- ${ze(o.source)} "${i}"`,`hf sync "${i}" "hf://buckets/$HF_BUCKET/${o.destination}" --exclude '.git/**'`)}}return r.join(` +`)}function mn(t){return`${(t.split(/[:|–—]/,1)[0]||t).normalize("NFKD").replace(/[\u0300-\u036f]/g,"").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"").slice(0,48).replace(/-+$/g,"")||"paper"}-artifacts`}function hn(t){const{toast:s}=oe(),a=u.useMemo(()=>dn({githubUrls:t.githubUrls,hfDatasetUrls:t.hfDatasetUrls,hfModelUrls:t.hfModelUrls,hfSpaceUrls:t.hfSpaceUrls,paperId:t.paperId,pdfName:t.pdfName,pdfUrl:t.pdfUrl}),[t.githubUrls,t.hfDatasetUrls,t.hfModelUrls,t.hfSpaceUrls,t.paperId,t.pdfName,t.pdfUrl]),r=u.useMemo(()=>on(t.paperId),[t.paperId]),[n,d]=u.useState(!!r),[o,i]=u.useState((r==null?void 0:r.destinationMode)??"new"),[l,p]=u.useState((r==null?void 0:r.bucketId)??""),[f,c]=u.useState((r==null?void 0:r.visibility)??"public"),[g,b]=u.useState(()=>new Set((r==null?void 0:r.selectedIds)??a.map(h=>h.id))),[_,j]=u.useState(!1),[v,N]=u.useState(null),[S,I]=u.useState(!!r),P=a.filter(h=>g.has(h.id)),y=P.length===a.length,m=nn(l),x=m!==null,E=un(l,P,{create:o==="new",isPrivate:f==="private"}),F=(h,$)=>{b(R=>{const T=new Set(R);return $?T.add(h):T.delete(h),T})},M=async()=>{try{await navigator.clipboard.writeText(E),s({title:"Bucket copy commands copied",description:"Run them in a terminal where the Hugging Face CLI is signed in."})}catch{s({title:"Copy failed",description:"Could not access the clipboard. Select and copy the commands manually.",variant:"destructive"})}},O=u.useCallback(()=>{const h=Os("/api/v1/auth/hf/login"),$=new URL(window.location.href);$.searchParams.set(xt,t.paperId),window.sessionStorage.setItem(bt(t.paperId),JSON.stringify({paperId:t.paperId,bucketId:l.trim(),destinationMode:o,visibility:f,selectedIds:Array.from(g)}));const R=new URLSearchParams({return_to:$.toString(),authorize_bucket:"true"});o==="new"&&R.set("bucket_create","true"),window.location.assign(`${h}?${R.toString()}`)},[l,o,t.paperId,g,f]),K=u.useCallback(async()=>{if(!t.isSignedIn){O();return}j(!0);let h=0,$=0;try{const R=P.filter(z=>z.kind!=="pdf"&&z.kind!=="github"&&!!z.repoId).map(z=>({kind:z.kind,repo_id:z.repoId})),T=ln(R);T.length||T.push([]);for(const[z,H]of T.entries()){N({current:z+1,total:T.length});const J=await W.copyToBucket(t.paperId,{bucket_id:l.trim(),create:z===0&&o==="new",private:f==="private",include_pdf:z===0&&P.some(Z=>Z.kind==="pdf"),artifacts:H});h+=J.copied.length,$+=J.errors.length}const U=P.filter(z=>z.kind==="github").length;s({title:$?"Bucket copy partially completed":"Copied to bucket",description:[`${h} item${h===1?"":"s"} copied.`,$?`${$} item${$===1?"":"s"} failed.`:"",U?"Use the generated commands below to copy GitHub repositories.":""].filter(Boolean).join(" "),variant:$?"destructive":void 0,action:m?e.jsx(Ks,{altText:"Open destination bucket",asChild:!0,children:e.jsx("a",{href:m,target:"_blank",rel:"noopener noreferrer",children:"Open bucket"})}):void 0}),!$&&!U&&d(!1)}catch(R){if(R instanceof ht&&R.code==="bucket_authorization_required"){O();return}s({title:h?"Bucket copy partially completed":"Bucket copy failed",description:h?`${h} item${h===1?"":"s"} copied before the request failed. You can retry or use the CLI commands below.`:R instanceof ht&&typeof R.detail=="string"?R.detail:"Hugging Face could not complete the copy. You can still use the CLI commands below.",variant:"destructive"})}finally{j(!1),N(null)}},[O,l,m,o,t.isSignedIn,t.paperId,P,s,f]);u.useEffect(()=>{if(!S||!t.isSignedIn)return;I(!1),window.sessionStorage.removeItem(bt(t.paperId));const h=new URL(window.location.href);h.searchParams.delete(xt),window.history.replaceState({},"",`${h.pathname}${h.search}${h.hash}`),K()},[K,t.isSignedIn,t.paperId,S]);const G=()=>{b(new Set(a.map(h=>h.id))),!l&&t.suggestedBucketId&&p(t.suggestedBucketId),d(!0)};return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"sidebar-card copy-to-bucket-card",children:[e.jsxs("button",{type:"button",className:"copy-to-bucket-trigger",onClick:G,children:[e.jsx("span",{className:"copy-to-bucket-arrow","aria-hidden":"true",children:"→"}),e.jsx("span",{className:"copy-to-bucket-title",children:"Copy to bucket"}),e.jsx("span",{className:"copy-to-bucket-new",children:"New"})]}),e.jsx("div",{className:"copy-to-bucket-meta",children:a.length?`${a.length} linked artifact${a.length===1?"":"s"}`:"No linked artifacts yet"})]}),e.jsx(ee,{open:n,onOpenChange:d,children:e.jsxs(te,{className:"max-h-[90vh] max-w-2xl grid-rows-[auto_minmax(0,1fr)_auto] overflow-hidden",children:[e.jsxs(se,{children:[e.jsxs(ae,{className:"flex items-center gap-2",children:[e.jsx("span",{className:"copy-to-bucket-dialog-arrow","aria-hidden":"true",children:"→"}),"Copy to bucket"]}),e.jsx(re,{children:"Keep your own copy of this paper's PDF, linked code, and Hugging Face artifacts. Hub repositories use Xet's server-side copy; GitHub repositories use the generated CLI fallback."})]}),e.jsx("div",{className:"-mx-6 min-h-0 overflow-y-auto px-6",children:a.length?e.jsxs("div",{className:"space-y-5",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(de,{children:"Choose your destination"}),e.jsxs(ft,{value:o,onValueChange:h=>i(h),className:"grid grid-cols-2 gap-2",children:[e.jsxs(de,{className:"bucket-choice",children:[e.jsx($e,{value:"new"}),"New bucket"]}),e.jsxs(de,{className:"bucket-choice",children:[e.jsx($e,{value:"existing"}),"Existing bucket"]})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(de,{htmlFor:"bucket-id",children:"Bucket name"}),e.jsx(V,{id:"bucket-id",value:l,onChange:h=>p(h.target.value),placeholder:t.suggestedBucketId||"username/paper-artifacts","aria-invalid":l.length>0&&!x}),e.jsxs("div",{className:"flex items-center justify-between gap-3 text-xs",children:[e.jsx("p",{className:"text-muted-foreground",children:"Use the full Hugging Face bucket ID: namespace/name."}),m&&e.jsxs("a",{href:m,target:"_blank",rel:"noopener noreferrer",className:"inline-flex shrink-0 items-center gap-1 underline underline-offset-4",children:["View bucket",e.jsx(Y,{name:"external",size:10})]})]})]}),o==="new"&&e.jsxs("div",{className:"space-y-2",children:[e.jsx(de,{children:"Bucket visibility"}),e.jsxs(ft,{value:f,onValueChange:h=>c(h),className:"flex gap-5",children:[e.jsxs(de,{className:"flex items-center gap-2 font-normal",children:[e.jsx($e,{value:"public"}),"Public"]}),e.jsxs(de,{className:"flex items-center gap-2 font-normal",children:[e.jsx($e,{value:"private"}),"Private"]})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center justify-between gap-3",children:[e.jsx(de,{children:"Artifacts"}),e.jsx(L,{type:"button",variant:"outline",size:"sm",className:"h-7 px-2 text-xs",onClick:()=>b(y?new Set:new Set(a.map(h=>h.id))),children:y?"Deselect all":"Select all"})]}),e.jsx("div",{className:"bucket-artifact-list",children:a.map(h=>e.jsxs("div",{className:"bucket-artifact-row",children:[e.jsx(Xe,{id:`bucket-artifact-${h.id}`,checked:g.has(h.id),onCheckedChange:$=>F(h.id,$===!0)}),e.jsxs(de,{htmlFor:`bucket-artifact-${h.id}`,className:"min-w-0 flex-1 cursor-pointer font-normal",children:[e.jsx("span",{className:"bucket-artifact-kind",children:sn[h.kind]}),e.jsx("span",{className:"bucket-artifact-name",children:h.label})]}),e.jsxs("a",{href:we(h.url)??void 0,target:"_blank",rel:"noopener noreferrer",className:"bucket-artifact-open",children:["Open",e.jsx(Y,{name:"external",size:10})]})]},h.id))}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"The PDF and Hugging Face artifacts can be copied directly. GitHub repositories require the CLI workflow below."})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(de,{htmlFor:"bucket-copy-commands",children:"CLI fallback"}),e.jsx("pre",{id:"bucket-copy-commands",className:"bucket-copy-commands h-[190px]",children:x?E:"Enter a bucket name above to prepare the copy commands."})]})]}):e.jsx("p",{className:"py-5 text-sm text-muted-foreground",children:"This paper does not have a linked GitHub repository or Hugging Face artifact to copy yet."})}),e.jsxs(le,{children:[e.jsx("a",{href:"https://huggingface.co/docs/huggingface_hub/en/guides/buckets",target:"_blank",rel:"noopener noreferrer",className:"mr-auto text-sm text-muted-foreground underline underline-offset-4",children:"About Hugging Face Buckets"}),e.jsxs(L,{type:"button",onClick:M,variant:"outline",disabled:!x||P.length===0,children:[e.jsx(Y,{name:"copy",size:12}),"Copy commands"]}),e.jsx(L,{type:"button",onClick:K,disabled:_||t.isSignedIn&&(!x||!P.some(h=>h.kind!=="github")),children:_?v&&v.total>1?`Copying ${v.current}/${v.total}…`:"Copying…":t.isSignedIn?"Copy now":"Sign in & copy"})]})]})})]})}function pn({isLoading:t,papers:s}){return t?e.jsxs("div",{className:"sidebar-card","aria-busy":"true",children:[e.jsx("div",{className:"sidebar-card-title",children:"Related papers"}),e.jsx("div",{className:"related-meta",children:"Finding related work…"})]}):s!=null&&s.length?e.jsxs("div",{className:"sidebar-card",children:[e.jsx("div",{className:"sidebar-card-title",children:"Related papers"}),s.map(a=>e.jsxs(ue,{to:`/paper/${a.arxiv_id||a.id}`,target:"_blank",rel:"noopener noreferrer",className:"related-paper",style:{textDecoration:"none",color:"inherit"},children:[e.jsx("div",{className:"related-title",children:e.jsx(He,{title:a.title})}),e.jsxs("div",{className:"related-meta",children:[e.jsx("span",{children:a.arxiv_id?`arXiv:${a.arxiv_id}`:"External resource"}),a.citation_count!=null&&e.jsxs("span",{children:[a.citation_count.toLocaleString()," cites"]})]})]},a.id))]}):null}const fn=/(https?:\/\/[^\s]+)/g;function gn({size:t=12}){return e.jsx("svg",{width:t,height:t,viewBox:"0 0 24 24","aria-hidden":"true",focusable:"false",children:e.jsx("path",{fill:"currentColor",d:"M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"})})}function Kt(t){return t>=1e6?`${(t/1e6).toFixed(1)}M`:t>=1e3?`${(t/1e3).toFixed(1)}k`:String(t)}function xn(t){return new Date(t).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"})}function bn({text:t}){return e.jsx("p",{className:"x-thread-text",children:t.split(fn).map((s,a)=>a%2===1?e.jsx("span",{className:"x-thread-link",children:s.replace(/^https?:\/\/(www\.)?/,"").replace(/\/$/,"")},a):e.jsx(u.Fragment,{children:s},a))})}function jn({thread:t}){const[s,a]=u.useState(!1);return!t.author_avatar_url||s?e.jsx("span",{className:"x-thread-avatar x-thread-avatar--fallback","aria-hidden":"true",children:t.author_name.charAt(0).toUpperCase()}):e.jsx("img",{className:"x-thread-avatar",src:t.author_avatar_url,alt:"",loading:"lazy",referrerPolicy:"no-referrer",onError:()=>a(!0)})}function vn(){var t;return((t=window.matchMedia)==null?void 0:t.call(window,"(prefers-reduced-motion: reduce)").matches)??!1}function yn({thread:t}){const[s,a]=u.useState(!1),[r,n]=u.useState(null),[d,o]=u.useState(!1),i=u.useRef(null),{targetRef:l,isIntersecting:p}=Ua({rootMargin:"200px"}),f=t.video_url;if(u.useEffect(()=>{if(!f||r||d||!p||vn())return;const g=new AbortController;return fetch(f,{referrerPolicy:"no-referrer",signal:g.signal}).then(b=>{if(!b.ok)throw new Error(`HTTP ${b.status}`);return b.blob()}).then(b=>n(URL.createObjectURL(b))).catch(()=>{g.signal.aborted||o(!0)}),()=>g.abort()},[f,r,d,p]),u.useEffect(()=>()=>{r&&URL.revokeObjectURL(r)},[r]),u.useEffect(()=>{const g=i.current;g&&(p?g.play().catch(()=>{}):g.pause())},[p,r]),!t.media_url||s)return null;const c=r&&!d;return e.jsx("div",{className:"x-thread-media",ref:l,children:c?e.jsx("video",{ref:i,src:r,poster:t.media_url,muted:!0,loop:!0,playsInline:!0,autoPlay:!0,"aria-label":"Video",onError:()=>o(!0)}):e.jsxs(e.Fragment,{children:[e.jsx("img",{src:t.media_url,alt:"",loading:"lazy",referrerPolicy:"no-referrer",onError:()=>a(!0)}),t.media_type==="video"&&e.jsx("span",{className:"x-thread-play","aria-label":"Video",children:"▶"})]})})}function wn({thread:t}){const s=we(t.url);return s?e.jsxs("a",{href:s,target:"_blank",rel:"noopener noreferrer",className:"x-thread",children:[e.jsxs("div",{className:"x-thread-header",children:[e.jsx(jn,{thread:t}),e.jsxs("span",{className:"x-thread-author",children:[e.jsx("span",{className:"x-thread-name",children:t.author_name}),e.jsxs("span",{className:"x-thread-handle",children:["@",t.author_handle]})]}),e.jsx("span",{className:"x-thread-logo",children:e.jsx(gn,{})})]}),e.jsx(bn,{text:t.text}),e.jsx(yn,{thread:t}),e.jsxs("div",{className:"x-thread-meta",children:[t.posted_at&&e.jsx("time",{dateTime:t.posted_at,children:xn(t.posted_at)}),t.like_count!=null&&e.jsxs("span",{children:["♥ ",Kt(t.like_count)]}),t.reply_count!=null&&t.reply_count>0&&e.jsxs("span",{children:[Kt(t.reply_count)," ",t.reply_count===1?"reply":"replies"]}),e.jsx("span",{className:"x-thread-read",children:"Read on X →"})]})]}):null}function _n({onEdit:t,threads:s}){return e.jsxs("div",{className:"sidebar-card",children:[e.jsxs("div",{className:"sidebar-card-title",children:[e.jsx("span",{children:"X threads"}),e.jsxs("span",{className:"badge",children:[s.length," post",s.length===1?"":"s",e.jsx("button",{type:"button",onClick:t,className:"edit-link",children:"edit"})]})]}),s.length>0?e.jsx("div",{className:"x-thread-list",children:s.map(a=>e.jsx(wn,{thread:a},a.tweet_id))}):e.jsx("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",padding:"6px 0"},children:"No author threads linked yet."})]})}const ut=3,Gt=3;function kn(t){return t>=1e3?`${(t/1e3).toFixed(1)}k`:String(t)}function Nn({allHfArtifactUrls:t,citationCopied:s,citationDisplay:a,hfArtifactViewer:r,onCopyCitation:n,onEditHfArtifacts:d,onEditRepositories:o,onEditXThreads:i,paper:l,relatedIsLoading:p,relatedPapers:f,user:c}){var v;const[g,b]=u.useState(!1),_=[...l.repositories??[]].sort((N,S)=>Number(S.is_official)-Number(N.is_official)||(S.num_stars||0)-(N.num_stars||0)),j=(g?_:_.slice(0,ut)).map(N=>({...N,safeHref:we(N.url)}));return e.jsxs("aside",{className:"detail-sidebar",children:[e.jsxs("div",{className:"sidebar-card",children:[e.jsxs("div",{className:"sidebar-card-title",children:[e.jsx("span",{children:"GitHub"}),e.jsxs("span",{className:"badge",children:[_.length," repo",_.length===1?"":"s",e.jsx("button",{type:"button",onClick:o,className:"edit-link",children:"edit"})]})]}),j.filter(({safeHref:N})=>N).map(N=>e.jsxs("a",{href:N.safeHref??void 0,target:"_blank",rel:"noopener noreferrer",className:"code-line",style:{textDecoration:"none"},children:[e.jsxs("span",{className:"code-line-repo",children:[e.jsx(Y,{name:"github",size:12}),e.jsxs("span",{className:"code-line-repo-name",children:[N.owner,"/",N.name]}),N.is_official&&e.jsx("span",{className:"code-line-official",children:"· Official"})]}),e.jsxs("span",{className:"code-line-stars",children:["★ ",kn(N.num_stars)]})]},N.id)),_.length===0&&e.jsx("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",padding:"6px 0"},children:"No GitHub repositories linked yet."}),_.length>ut&&e.jsx("button",{type:"button",className:"bench-show-more",onClick:()=>b(N=>!N),children:g?"− show top 3":`+ show ${_.length-ut} more repos`})]}),e.jsx(Cn,{viewer:r,onEdit:d}),e.jsx(_n,{threads:l.x_threads??[],onEdit:i}),e.jsx(hn,{githubUrls:_.map(({url:N})=>N),hfModelUrls:t.models,hfDatasetUrls:t.datasets,hfSpaceUrls:t.spaces,paperId:l.id,pdfName:((v=l.arxiv_id)==null?void 0:v.replace("/","-"))||l.id,pdfUrl:l.url_pdf,isSignedIn:!!c,suggestedBucketId:c?`${c.username}/${mn(l.title)}`:void 0}),e.jsx(pn,{isLoading:p,papers:f}),e.jsxs("div",{className:"sidebar-card",children:[e.jsxs("div",{className:"sidebar-card-title",children:[e.jsx("span",{children:"Citation"}),e.jsxs("button",{type:"button",className:"citation-copy-btn",onClick:n,"aria-label":"Copy citation to clipboard",title:"Copy citation to clipboard",children:[e.jsx(Y,{name:"copy",size:11}),s?"Copied":"Copy"]})]}),e.jsx("pre",{style:{fontFamily:"var(--mono)",fontSize:10.5,lineHeight:1.5,color:"var(--ink-soft)",whiteSpace:"pre-wrap",wordBreak:"break-word",margin:0},children:a})]})]})}function Cn({onEdit:t,viewer:s}){return e.jsxs("div",{className:"sidebar-card",children:[e.jsxs("div",{className:"sidebar-card-title",children:[s.paperHref?e.jsx("a",{href:s.paperHref,target:"_blank",rel:"noopener noreferrer",style:{color:"inherit",textDecoration:"none"},children:"🤗 Hugging Face"}):e.jsx("span",{children:"🤗 Hugging Face"}),e.jsx("button",{type:"button",onClick:t,className:"edit-link",children:"edit"})]}),s.isLoading?e.jsx(Ie,{className:"h-16 w-full"}):e.jsxs(e.Fragment,{children:[s.rows.map(a=>e.jsx(En,{...a},a.label)),s.footer&&e.jsx("div",{style:{fontFamily:"var(--mono)",fontSize:10,color:"var(--ink-faint)",marginTop:12},children:s.footer})]})]})}function En({count:t,href:s,isLimited:a,label:r,links:n}){const[d,o]=u.useState(!1),i=((n==null?void 0:n.length)??0)>Gt,l=d?n:n==null?void 0:n.slice(0,Gt),p=t!=null?`${t}${a?"+":""}`:"—";return e.jsxs("div",{className:"hf-artifact-row",children:[e.jsxs("div",{className:"hf-artifact-row-header",children:[e.jsx("span",{children:r}),t?e.jsx("a",{href:s,target:"_blank",rel:"noopener noreferrer",className:"hf-artifact-count",children:p}):e.jsx("span",{className:"hf-artifact-count hf-artifact-count--empty",children:p})]}),l!=null&&l.length?e.jsxs("div",{className:"hf-artifact-links",children:[l.map(f=>e.jsx("a",{href:f.href,target:"_blank",rel:"noopener noreferrer",children:f.label},f.href)),i&&e.jsx("button",{type:"button",className:"hf-artifact-toggle","aria-expanded":d,onClick:()=>o(f=>!f),children:d?"Show fewer":`View all ${n.length}`})]}):null]})}function Sn(t,s){const a=t.arxiv_id?` (arXiv:${t.arxiv_id.replace(/v\d+$/i,"")})`:"";return`About the paper "${t.title}"${a}: ${s}`}function Pn({paper:t,readerChatRoute:s}){const a=Gs()&&!!(t.id&&t.abstract),r=t.suggested_questions,{data:n}=ne({queryKey:["paper-suggested-questions",t.id],queryFn:()=>W.suggestedQuestions(String(t.id)),enabled:a&&Array.isArray(r)&&r.length===0,staleTime:o=>{var i;return(i=o.state.data)!=null&&i.questions.length?1/0:0},retry:!1}),d=r!=null&&r.length?r:(n==null?void 0:n.questions)??[];return!a||d.length===0?null:e.jsx("ul",{className:"suggested-questions","aria-label":"Ask about this paper",children:d.map(o=>{const i=s?`${s}?q=${encodeURIComponent(o)}`:`/chat?q=${encodeURIComponent(Sn(t,o))}`;return e.jsx("li",{children:e.jsxs(ue,{className:"suggested-question",to:i,onClick:s?()=>ss(s):void 0,children:[e.jsx(Y,{name:"chat",size:12}),e.jsx("span",{children:o})]})},o)})})}const Xt=360;function $n({canEdit:t,onEditMethods:s,onEditTasks:a,paper:r,readerChatRoute:n}){var f,c;const[d,o]=u.useState(!1),i=r.abstract||"",l=i.length>Xt,p=d||!l?i:`${i.slice(0,Xt)}…`;return e.jsxs(e.Fragment,{children:[r.tldr&&e.jsxs(e.Fragment,{children:[e.jsx(Pe,{id:"tldr",label:"TL;DR"}),e.jsx("div",{className:"tldr-box",children:r.tldr})]}),e.jsx(Pn,{paper:r,readerChatRoute:n}),e.jsx(Pe,{id:"abstract",label:"Abstract"}),e.jsx("p",{className:"abstract-text",style:{marginBottom:8},children:e.jsx(ia,{text:p})}),l&&e.jsx("button",{type:"button",className:"read-full",onClick:()=>o(g=>!g),children:d?"− collapse abstract":"+ read full abstract"}),e.jsx(Pe,{id:"tasks",label:"Tasks",accent:e.jsxs("span",{className:"accent",children:[((f=r.tasks)==null?void 0:f.length)||0," tagged",t&&e.jsx("button",{type:"button",onClick:a,className:"edit-link",children:"edit"})]})}),e.jsx("div",{className:"paper-tags",style:{marginBottom:8},children:(r.tasks??[]).map(g=>e.jsx(ta,{slug:g.slug||"",label:g.name},g.id))}),e.jsx(Pe,{id:"methods",label:"Methods",accent:e.jsxs("span",{className:"accent",children:[((c=r.methods)==null?void 0:c.length)||0," used",t&&e.jsx("button",{type:"button",onClick:s,className:"edit-link",children:"edit"})]})}),e.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:6,marginBottom:8},children:(r.methods??[]).map(g=>e.jsx(sa,{method:g},g.id))})]})}const Ce=["my-bookmark-ids"],jt="pwc:pending-bookmark";function In(t){window.sessionStorage.setItem(jt,JSON.stringify(t)),window.location.assign(Da(!0))}function Rn(){var r,n;const{user:t}=Oe(),s=ne({queryKey:Ce,queryFn:()=>pt.getBookmarkIds(),enabled:!!t,staleTime:60*1e3,refetchOnWindowFocus:!1}),a=qe.useMemo(()=>{var d;return new Set(((d=s.data)==null?void 0:d.paper_ids)??[])},[(r=s.data)==null?void 0:r.paper_ids]);return{ids:((n=s.data)==null?void 0:n.paper_ids)??[],idSet:a,isLoading:s.isLoading,isError:s.isError}}function An(){const{user:t}=Oe(),s=he(),a=ce({mutationFn:async({paperId:n,isBookmarked:d})=>{d?await pt.removeBookmark(n):await pt.addBookmark(n)},onMutate:async({paperId:n,isBookmarked:d})=>{await s.cancelQueries({queryKey:Ce});const o=s.getQueryData(Ce),i=typeof n=="string"?Number(n):n,l=(o==null?void 0:o.paper_ids)??[],p=d?l.filter(f=>f!==i):[i,...l.filter(f=>f!==i)];return s.setQueryData(Ce,{paper_ids:p}),{previous:o}},onError:(n,d,o)=>{o!=null&&o.previous&&s.setQueryData(Ce,o.previous),n instanceof ht&&n.code==="saved_papers_bucket_authorization_required"&&In(d)},onSettled:()=>{s.invalidateQueries({queryKey:Ce}),s.invalidateQueries({queryKey:[...ye.feeds.saved]})}});return qe.useEffect(()=>{if(!t||a.isPending)return;const n=new URL(window.location.href);if(n.searchParams.get(Bt)!=="1")return;n.searchParams.delete(Bt),window.history.replaceState({},"",`${n.pathname}${n.search}${n.hash}`);const d=window.sessionStorage.getItem(jt);if(d){window.sessionStorage.removeItem(jt);try{const o=JSON.parse(d);(typeof o.paperId=="number"||typeof o.paperId=="string")&&typeof o.isBookmarked=="boolean"&&a.mutate(o)}catch{}}},[a,t]),{toggle:qe.useCallback((n,d)=>{if(!t){if(ts())return;const o=typeof window<"u"?window.location.pathname+window.location.search:"/";window.location.href=Xs(`/api/v1/auth/hf/login?return_to=${encodeURIComponent(o)}`);return}a.mutate({paperId:n,isBookmarked:d})},[a,t]),isPending:a.isPending}}const Ln=({paperId:t})=>{const{user:s}=Oe(),{idSet:a}=Rn(),{toggle:r,isPending:n}=An();if(ts())return null;const d=Number(t),o=!!s&&a.has(d),i=()=>{Number.isFinite(d)&&r(d,o)},l=s&&o?"Saved":"Save",p=s?o?"Remove from saved papers":"Save this paper":"Sign in with Hugging Face to save this paper";return e.jsxs("button",{type:"button",className:`action-btn${o?" is-saved":""}`,onClick:i,disabled:n,"aria-pressed":o,"aria-label":p,title:p,children:[e.jsx(Y,{name:"bookmark",size:12}),l]})};function mt({children:t,showEdit:s=!1,onEdit:a,editAriaLabel:r}){return s?e.jsxs("span",{className:"action-btn-composite",children:[t,e.jsx("button",{type:"button",className:"action-btn-segment action-btn-edit",onClick:a,"aria-label":r,children:"edit"})]}):t}function Fn(t){return e.jsx(xs,{...t,kind:"enrich-paper",triggerClassName:"action-btn"})}const Tn={tasks:"tasks",methods:"methods",results:"evaluation results",repositories:"GitHub repositories","project-pages":"project pages","hf-artifacts":"Hugging Face artifacts",organizations:"organizations","source-url":"source URL","x-threads":"X threads"};function Qt(t){if(!t)return"—";try{return new Date(t).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"})}catch{return"—"}}function Vt(t,s){try{const a=new URL(t),n=a.pathname.replace(/\/$/,"").split("/").filter(Boolean).at(-1);return n?n.replace(/[-_]+/g," "):a.hostname.replace(/^www\./,"")}catch{return s}}const ki=()=>{const{arxivId:t}=Qs(),s=Wt(),{toast:a}=oe(),{user:r}=Oe(),n=(r==null?void 0:r.is_admin)??!1,d=!!r,o=Ma(r),{arxivId:i,evaluations:l,evaluationsByTask:p,evaluationsLoading:f,paper:c,paperError:g,paperLoading:b,presentation:_,refetchEvaluations:j,refetchPaper:v,relatedQuery:N,versions:S,visibleEvaluations:I}=rr(t,o),[P,y]=u.useState(!1),{activeEditor:m,openEditor:x,setEditorOpen:E}=or();u.useEffect(()=>{o!=="direct"||!(c!=null&&c.id)||(m&&m!=="results"&&W.primeCurationState(c.id).catch(()=>{}),m==="results"&&Ke.primeCurationState(c.id).catch(()=>{}))},[m,o,c==null?void 0:c.id]);const[F,M]=u.useState(null),O=u.useRef(!1);u.useEffect(()=>{if(!r||!c||O.current)return;const C=sessionStorage.getItem("pwc:fresh-auth-edit");if(!C)return;O.current=!0;const q=ir(C);if(!W.freshAuthMutationDraft()){sessionStorage.removeItem("pwc:fresh-auth-edit"),q&&x(q);return}if(!window.confirm("You signed in again. Apply the saved destructive catalog edit now? The server will recheck the current catalog version before changing anything.")){a({title:"Edit kept locally",description:"Nothing was changed. Reload this paper when you are ready to confirm the saved edit."});return}W.resumeFreshAuthMutation().then(()=>{a({title:"Edit applied",description:"The restored catalog edit was applied."}),window.location.reload()}).catch(At=>{a({variant:"destructive",title:"Could not apply the saved edit",description:At instanceof Error?At.message:"Please reload and review the edit again."})})},[x,c,a,r]);const K=u.useMemo(()=>{if(!r||!(c!=null&&c.author_links))return!1;const C=r.username.toLowerCase();return c.author_links.some(q=>!!q.hf_username&&q.hf_username.toLowerCase()===C)},[r,c==null?void 0:c.author_links]),G=C=>{if(!d){M(C);return}x(C)},[h,$]=u.useState("idle"),[R,T]=u.useState(null),[U,z]=u.useState(null),H=async()=>{if(i){$("indexing"),T(null),z(null);try{await W.indexFromArxiv(i),a({title:"Indexed",description:"Paper added to database."}),setTimeout(()=>v(),1200),$("idle")}catch(C){const q=C;let xe=q.message||"Failed to index paper";if(q.response)try{xe=JSON.parse(q.response).detail||xe}catch{xe=q.response}T(xe),(q.status===429||q.status===503)&&z("Try again later after arXiv has lifted the temporary limit."),$("idle")}}},J=(_==null?void 0:_.citationCopy)??"",Z=(_==null?void 0:_.copyableRanks)??[],[Ve,De]=u.useState(!1),ve=async()=>{if(J)try{await navigator.clipboard.writeText(J),De(!0),a({title:"Citation copied",description:"BibTeX entry copied to clipboard."}),window.setTimeout(()=>De(!1),1500)}catch{a({title:"Copy failed",description:"Could not access the clipboard. Please copy manually.",variant:"destructive"})}},w=async()=>{if(!c)return;const C=c.arxiv_id||c.id,q=Oa(C,Z);if(q)try{await navigator.clipboard.writeText(q),a({title:"PwC badges copied",description:"Each badge follows its current leaderboard result."})}catch{a({title:"Copy failed",description:"Could not access the clipboard. Please try again.",variant:"destructive"})}};if(b)return e.jsxs("div",{className:"page",children:[e.jsx(Ie,{className:"h-12 w-3/4 mb-4"}),e.jsx(Ie,{className:"h-6 w-1/3 mb-8"}),e.jsx(Ie,{className:"h-64 w-full"})]});if(g||!c)return e.jsxs("div",{className:"page",children:[e.jsxs("div",{className:"breadcrumb",children:[e.jsx(ue,{to:"/papers",children:"Papers"}),e.jsx("span",{className:"sep",children:"/"}),e.jsxs("span",{style:{color:"var(--ink)"},children:["arXiv:",i]})]}),e.jsx("h1",{className:"detail-title",children:"Paper not indexed yet"}),e.jsxs("p",{style:{fontFamily:"var(--serif)",color:"var(--ink-soft)",marginTop:16,maxWidth:640},children:["We don't have ",e.jsxs("span",{style:{fontFamily:"var(--mono)"},children:["arXiv:",i]})," in the database. You can index it from arXiv right now."]}),R&&e.jsx(pa,{variant:"destructive",className:"mt-4 max-w-xl",children:e.jsxs(fa,{children:[e.jsx("div",{children:R}),U&&e.jsx("div",{className:"mt-2",children:U})]})}),e.jsxs("div",{className:"action-row",children:[n&&e.jsxs("button",{className:"action-btn",onClick:H,disabled:h==="indexing",children:[e.jsx(Y,{name:"sparkle",size:12}),h==="indexing"?"Indexing…":"Index from arXiv"]}),e.jsx(L,{variant:"outline",onClick:()=>s("/papers"),children:"Browse Papers"})]})]});if(!_)return null;const{allHfArtifactUrls:k,authorEntries:A,citationDisplay:D,hasIntroducedItems:Q,hasLineageItems:X,hfArtifactViewer:B,introducedBenchmarks:Rs,introducedFrameworks:Ct,introducedMethods:As,introducedSummary:Ls,numPages:Et,paperSourceLabel:St,predecessorPapers:We,projectPages:Ee,safeAbstractUrl:Pt,safeConferenceUrl:$t,safePdfUrl:It,sourceActionLabel:Fs,successorPapers:Ye}=_,Be=12,Se=ca(c,i),Ts=Se&&Lt()&&Vs()&&(!Ft()||n)?Se:null,Rt=P||A.length<=Be?A:A.slice(0,Be);return e.jsxs("div",{className:"page",children:[e.jsxs("div",{className:"breadcrumb",children:[e.jsx(ue,{to:"/",children:"Trending"}),e.jsx("span",{className:"sep",children:"/"}),e.jsx("span",{children:St})]}),e.jsxs("div",{className:"detail-grid",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"detail-hero",children:[e.jsxs("div",{className:"detail-hero-main",children:[e.jsxs("h1",{className:"detail-title",children:[e.jsx(He,{title:c.title}),(c.organizations||[]).map(C=>e.jsx(ue,{to:`/orgs/${C.slug}`,className:`detail-title-org${C.logo_url?" detail-title-org--logo":""}`,title:C.name,"aria-label":C.name,children:C.logo_url?e.jsx("img",{src:C.logo_url,alt:"",onError:q=>{var xe;(xe=q.currentTarget.parentElement)==null||xe.classList.remove("detail-title-org--logo"),q.currentTarget.replaceWith(C.name)}}):C.name},C.id))]}),e.jsxs("div",{className:"detail-meta",children:[e.jsx("span",{children:St}),e.jsx("span",{children:"·"}),e.jsxs("span",{children:["Submitted ",Qt(c.published)]}),Et&&e.jsxs(e.Fragment,{children:[e.jsx("span",{children:"·"}),e.jsxs("span",{children:[Et," pages"]})]}),c.citation_count!=null&&e.jsxs(e.Fragment,{children:[e.jsx("span",{children:"·"}),e.jsxs("span",{children:[c.citation_count.toLocaleString()," citations"]})]}),(c.proceeding||c.conference_slug)&&e.jsxs(e.Fragment,{children:[e.jsx("span",{children:"·"}),c.conference_slug?e.jsx("a",{href:`/conferences/${c.conference_slug}`,target:"_blank",rel:"noopener noreferrer",style:{color:"var(--accent-text)"},children:(c.proceeding||c.conference_name||"").replace(/\s+\d{1,2}$/,"")}):e.jsx("span",{children:c.proceeding.replace(/\s+\d{1,2}$/,"")})]}),S.length>1&&e.jsxs(e.Fragment,{children:[e.jsx("span",{children:"·"}),e.jsx("select",{className:"version-select",value:c.version,onChange:C=>{const q=C.target.value;c.arxiv_id&&s(`/paper/${c.arxiv_id.replace(/v\d+$/,"")}${q?`?version=${q}`:""}`)},children:S.map(C=>e.jsxs("option",{value:C.version,children:[C.version," — ",Qt(C.published)]},C.version))})]})]}),e.jsxs("div",{className:"detail-authors",children:[Rt.map((C,q)=>e.jsxs(qe.Fragment,{children:[C.hf_username&&e.jsx(aa,{className:"detail-author-avatar",url:C.hf_avatar_url}),C.id?e.jsx(ue,{to:`/authors/${C.id}`,children:C.name}):C.hf_username?e.jsx("a",{href:`https://huggingface.co/${C.hf_username}`,target:"_blank",rel:"noopener noreferrer",title:`@${C.hf_username} on Hugging Face`,children:C.name}):e.jsx("a",{children:C.name}),qBe&&e.jsx("button",{className:"show-more-authors",onClick:()=>y(C=>!C),style:{marginLeft:8,background:"none",border:"none",cursor:"pointer",color:"var(--accent-text)",fontFamily:"var(--mono)",fontSize:12},children:P?"show fewer":`+${c.authors.length-Be} more`})]}),e.jsxs("div",{className:"action-row",children:[Se&&Lt()&&(!Ft()||r!=null&&r.is_admin)?e.jsxs(ue,{className:"action-btn",to:Se,onClick:()=>ss(Se),children:[e.jsx(Y,{name:"pdf",size:12})," Read paper",e.jsx("span",{className:"nav-new-badge","aria-hidden":"true",children:"New"})]}):It?e.jsxs("a",{className:"action-btn",href:It,target:"_blank",rel:"noopener noreferrer",children:[e.jsx(Y,{name:"pdf",size:12})," View PDF"]}):null,Pt&&e.jsx(mt,{showEdit:c.source==="external",onEdit:()=>G("source-url"),editAriaLabel:"Edit source URL",children:e.jsxs("a",{className:c.source==="external"?"action-btn-segment action-btn-main":"action-btn",href:Pt,target:"_blank",rel:"noopener noreferrer",children:[e.jsx(Y,{name:"external",size:12})," ",Fs]})}),Ee.length===1?e.jsx(mt,{showEdit:!0,onEdit:()=>G("project-pages"),editAriaLabel:"Edit project pages",children:e.jsxs("a",{className:"action-btn-segment action-btn-main",href:Ee[0].safeHref??void 0,target:"_blank",rel:"noopener noreferrer",children:[e.jsx(Y,{name:"globe",size:12})," Project page"]})}):null,Ee.length>1?e.jsx(mt,{showEdit:!0,onEdit:()=>G("project-pages"),editAriaLabel:"Edit project pages",children:e.jsxs(Ws,{children:[e.jsx(Ys,{asChild:!0,children:e.jsxs("button",{type:"button",className:"action-btn-segment action-btn-main",children:[e.jsx(Y,{name:"globe",size:12})," Project page"]})}),e.jsx(Js,{align:"start",className:"project-page-menu",children:Ee.map((C,q)=>e.jsx(Zs,{asChild:!0,children:C.safeHref?e.jsx("a",{href:C.safeHref,target:"_blank",rel:"noopener noreferrer",children:Vt(C.url,`Project page ${q+1}`)}):e.jsx("span",{children:Vt(C.url,`Project page ${q+1}`)})},C.url))})]})}):null,Ee.length===0&&d?e.jsxs("button",{type:"button",className:"action-btn",onClick:()=>G("project-pages"),title:"Add project page",children:[e.jsx(Y,{name:"globe",size:12})," Add project page"]}):null,$t&&e.jsxs("a",{className:"action-btn",href:$t,target:"_blank",rel:"noopener noreferrer",children:[e.jsx(Y,{name:"external",size:12})," Conference"]}),e.jsx("button",{type:"button",className:"action-btn",onClick:()=>G("organizations"),children:"Edit organizations"}),e.jsx(lr,{paperId:Number(c.id),isAdmin:n}),n&&La()&&e.jsx(Fn,{paperId:Number(c.id),paperTitle:c.title,onComplete:()=>void v()}),e.jsx(Ln,{paperId:c.id})]}),c.leaderboard_ranks&&c.leaderboard_ranks.length>0&&e.jsx(ra,{wrap:!0,paperHref:`/paper/${c.arxiv_id||c.id}`,ranks:c.leaderboard_ranks.filter(C=>C.best_rank>=1&&C.best_rank<=3).map(C=>({name:C.dataset_name,slug:C.dataset_slug||null,rank:C.best_rank}))})]}),e.jsx("div",{className:"detail-hero-thumb detail-thumb-wrap",children:e.jsx(na,{paperId:c.arxiv_id||c.id,title:c.title,thumbnailUrl:ea(c.thumbnail_url),priority:!0})})]}),Q&&e.jsxs("div",{className:`introduced-banner${Ct.length>0?" introduced-banner--framework":""}`,children:[e.jsx("span",{className:"introduced-label",children:"Introduced"}),e.jsxs("div",{className:"introduced-methods",children:[As.map(C=>e.jsxs("button",{type:"button",className:"introduced-pill",onClick:()=>s(`/methods/${C.slug||C.id}`),children:[C.name,e.jsx("span",{className:"introduced-arrow",children:"→"})]},`method-${C.id}`)),Rs.map(C=>e.jsxs("button",{type:"button",className:"introduced-pill",onClick:()=>s(`/benchmark/${C.slug||C.id}`),children:[C.name,e.jsx("span",{className:"introduced-arrow",children:"→"})]},`benchmark-${C.id}`)),Ct.map(C=>e.jsxs("button",{type:"button",className:"introduced-pill",onClick:()=>s(`/frameworks#framework-${C.slug}`),children:[C.name,e.jsx("span",{className:"introduced-arrow",children:"→"})]},`framework-${C.slug}`))]}),e.jsxs("span",{className:"introduced-note",children:["This paper is the canonical source for ",Ls,"."]})]}),X&&e.jsxs("div",{className:"introduced-banner lineage-banner",children:[Ye.length>0&&e.jsxs("div",{className:"lineage-row",children:[e.jsx("span",{className:"introduced-label lineage-label",children:Ye.length===1?"Follow-up paper":"Follow-up papers"}),e.jsx("div",{className:"introduced-methods",children:Ye.map(C=>e.jsxs("button",{type:"button",className:"introduced-pill lineage-pill",onClick:()=>s(`/paper/${C.route_identifier}`),children:[e.jsx(He,{title:C.title}),e.jsx("span",{className:"introduced-arrow",children:"→"})]},`successor-${C.id}`))})]}),We.length>0&&e.jsxs("div",{className:"lineage-row",children:[e.jsx("span",{className:"introduced-label lineage-label",children:We.length===1?"Predecessor paper":"Predecessor papers"}),e.jsx("div",{className:"introduced-methods",children:We.map(C=>e.jsxs("button",{type:"button",className:"introduced-pill lineage-pill",onClick:()=>s(`/paper/${C.route_identifier}`),children:[e.jsx("span",{className:"introduced-arrow lineage-arrow-back",children:"←"}),e.jsx(He,{title:C.title})]},`predecessor-${C.id}`))})]})]}),e.jsx($n,{canEdit:!0,onEditMethods:()=>G("methods"),onEditTasks:()=>G("tasks"),paper:c,readerChatRoute:Ts}),e.jsx(Kr,{canCopyBadge:Z.length>0,canEdit:!0,evaluationsByTask:p,evaluationsLoading:f,isAdmin:n,onCopyBadge:w,onEdit:()=>G("results"),onRefresh:()=>void j(),paper:c,visibleEvaluationCount:(I==null?void 0:I.length)??0})]}),e.jsx(Nn,{allHfArtifactUrls:k,citationCopied:Ve,citationDisplay:D,hfArtifactViewer:B,onCopyCitation:ve,onEditHfArtifacts:()=>G("hf-artifacts"),onEditRepositories:()=>G("repositories"),onEditXThreads:()=>G("x-threads"),paper:c,relatedIsLoading:N.isLoading,relatedPapers:N.data,user:r})]}),e.jsx(Hr,{activeEditor:m,arxivId:i,editSubmitMode:o,evaluations:l??[],isAdmin:n,isLinkedAuthor:K,onOpenChange:E,paper:c}),e.jsx(ka,{open:F!==null,onOpenChange:C=>{C||M(null)},sectionLabel:F?Tn[F]:"this paper",returnTo:typeof window<"u"?window.location.pathname:"/"})]})};export{ki as default}; diff --git a/assets/PaperFeedFilters-D-Ie3cDx.js b/assets/PaperFeedFilters-CF3OKsFW.js similarity index 90% rename from assets/PaperFeedFilters-D-Ie3cDx.js rename to assets/PaperFeedFilters-CF3OKsFW.js index 1422b205625b31364cb61461e826ee5888c1d01d..10c44c825b22f0ae2877d900c4f329c7d6f02c8e 100644 --- a/assets/PaperFeedFilters-D-Ie3cDx.js +++ b/assets/PaperFeedFilters-CF3OKsFW.js @@ -1 +1 @@ -import{j as e}from"./index-CkeK0cDg.js";import{I as n}from"./components-BRrDI9KS.js";const t=()=>e.jsxs("span",{className:"hf-resource-logo",children:[e.jsx("img",{className:"hf-resource-logo-black",src:"/hf-logo-monochrome-black.svg?v=20260729",alt:""}),e.jsx("img",{className:"hf-resource-logo-white",src:"/hf-logo-monochrome-white.svg?v=20260729",alt:""})]}),l=({checked:s,icon:a,label:r,onChange:o})=>e.jsxs("button",{type:"button",className:`paper-feed-filter ${s?"active":""}`,"aria-pressed":s,onClick:()=>o(!s),children:[e.jsxs("span",{className:"paper-feed-filter-content",children:[e.jsx("span",{className:"paper-feed-filter-icon","aria-hidden":"true",children:a}),r]}),s&&e.jsx("span",{className:"paper-feed-filter-check","aria-hidden":"true",children:"✓"})]}),h=({hasCode:s,hasHfArtifacts:a,onHasCodeChange:r,onHasHfArtifactsChange:o,showDivider:c=!0,showHasCode:i=!0})=>e.jsxs("div",{className:"paper-feed-resource-controls",role:"group","aria-label":"Resource filters",children:[c&&e.jsx("span",{className:"paper-feed-resource-divider","aria-hidden":"true"}),e.jsxs("div",{className:"paper-feed-filter-options",children:[i&&e.jsx(l,{checked:s,icon:e.jsx(n,{name:"github",size:14}),label:"Has code",onChange:r}),e.jsx(l,{checked:a,icon:e.jsx(t,{}),label:"Has artifacts",onChange:o})]})]});export{h as P}; +import{j as e}from"./index-B7UoLEbn.js";import{I as n}from"./components-Cax1Inob.js";const t=()=>e.jsxs("span",{className:"hf-resource-logo",children:[e.jsx("img",{className:"hf-resource-logo-black",src:"/hf-logo-monochrome-black.svg?v=20260729",alt:""}),e.jsx("img",{className:"hf-resource-logo-white",src:"/hf-logo-monochrome-white.svg?v=20260729",alt:""})]}),l=({checked:s,icon:a,label:r,onChange:o})=>e.jsxs("button",{type:"button",className:`paper-feed-filter ${s?"active":""}`,"aria-pressed":s,onClick:()=>o(!s),children:[e.jsxs("span",{className:"paper-feed-filter-content",children:[e.jsx("span",{className:"paper-feed-filter-icon","aria-hidden":"true",children:a}),r]}),s&&e.jsx("span",{className:"paper-feed-filter-check","aria-hidden":"true",children:"✓"})]}),h=({hasCode:s,hasHfArtifacts:a,onHasCodeChange:r,onHasHfArtifactsChange:o,showDivider:c=!0,showHasCode:i=!0})=>e.jsxs("div",{className:"paper-feed-resource-controls",role:"group","aria-label":"Resource filters",children:[c&&e.jsx("span",{className:"paper-feed-resource-divider","aria-hidden":"true"}),e.jsxs("div",{className:"paper-feed-filter-options",children:[i&&e.jsx(l,{checked:s,icon:e.jsx(n,{name:"github",size:14}),label:"Has code",onChange:r}),e.jsx(l,{checked:a,icon:e.jsx(t,{}),label:"Has artifacts",onChange:o})]})]});export{h as P}; diff --git a/assets/PaperPreviewLink-CQ27hqZy.js b/assets/PaperPreviewLink-C5ianbW8.js similarity index 97% rename from assets/PaperPreviewLink-CQ27hqZy.js rename to assets/PaperPreviewLink-C5ianbW8.js index 33420506a9e42a2364ef3a92942af9aa18bb5ecf..06ac5ccb6f40abdaa3d29c838c216226164bdbc1 100644 --- a/assets/PaperPreviewLink-CQ27hqZy.js +++ b/assets/PaperPreviewLink-C5ianbW8.js @@ -1,4 +1,4 @@ -import{o as k,f as F,m as b,a as oe,p as L,b as O,n as z,h as le,s as ce,c as ue,v as he,S as pe}from"./index-B1_S53Hb.js";import{l as me}from"./index-DqQiSNg1.js";import D from"./katex-DkKDou_j.js";import{j as m,F as M,V as fe,n as j,c as de,m as ge,L as E,A as xe}from"./index-CkeK0cDg.js";import{u as ye}from"./useQuery-_Fj6Jfzr.js";import{H as we,a as be,b as Ne}from"./hover-card-CAN3Vtea.js";import{p as ve}from"./paperQueryKeys-BP2E-0yf.js";import{p as P}from"./papers-Celoj8_s.js";import{u as ke}from"./useMutation-q-fdM2fm.js";function Fe(){return{enter:{mathFlow:e,mathFlowFenceMeta:t,mathText:s},exit:{mathFlow:i,mathFlowFence:n,mathFlowFenceMeta:r,mathFlowValue:l,mathText:o,mathTextData:l}};function e(a){const c={type:"element",tagName:"code",properties:{className:["language-math","math-display"]},children:[]};this.enter({type:"math",meta:null,value:"",data:{hName:"pre",hChildren:[c]}},a)}function t(){this.buffer()}function r(){const a=this.resume(),c=this.stack[this.stack.length-1];k(c.type==="math"),c.meta=a}function n(){this.data.mathFlowInside||(this.buffer(),this.data.mathFlowInside=!0)}function i(a){const c=this.resume().replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),h=this.stack[this.stack.length-1];k(h.type==="math"),this.exit(a),h.value=c;const f=h.data.hChildren[0];k(f.type==="element"),k(f.tagName==="code"),f.children.push({type:"text",value:c}),this.data.mathFlowInside=void 0}function s(a){this.enter({type:"inlineMath",value:"",data:{hName:"code",hProperties:{className:["language-math","math-inline"]},hChildren:[]}},a),this.buffer()}function o(a){const c=this.resume(),h=this.stack[this.stack.length-1];k(h.type==="inlineMath"),this.exit(a),h.value=c,h.data.hChildren.push({type:"text",value:c})}function l(a){this.config.enter.data.call(this,a),this.config.exit.data.call(this,a)}}function je(e){let t=(e||{}).singleDollarTextMath;return t==null&&(t=!0),n.peek=i,{unsafe:[{character:"\r",inConstruct:"mathFlowMeta"},{character:` +import{o as k,f as F,m as b,a as oe,p as L,b as O,n as z,h as le,s as ce,c as ue,v as he,S as pe}from"./index-tHVWANW1.js";import{l as me}from"./index-ClEBI70O.js";import D from"./katex-DkKDou_j.js";import{j as m,F as M,V as fe,n as j,c as de,m as ge,L as E,A as xe}from"./index-B7UoLEbn.js";import{u as ye}from"./useQuery-DV2f4JpC.js";import{H as we,a as be,b as Ne}from"./hover-card-BM8a6wEE.js";import{p as ve}from"./paperQueryKeys-BP2E-0yf.js";import{p as P}from"./papers-Ctf2uv0o.js";import{u as ke}from"./useMutation-CuaM6sOT.js";function Fe(){return{enter:{mathFlow:e,mathFlowFenceMeta:t,mathText:s},exit:{mathFlow:i,mathFlowFence:n,mathFlowFenceMeta:r,mathFlowValue:l,mathText:o,mathTextData:l}};function e(a){const c={type:"element",tagName:"code",properties:{className:["language-math","math-display"]},children:[]};this.enter({type:"math",meta:null,value:"",data:{hName:"pre",hChildren:[c]}},a)}function t(){this.buffer()}function r(){const a=this.resume(),c=this.stack[this.stack.length-1];k(c.type==="math"),c.meta=a}function n(){this.data.mathFlowInside||(this.buffer(),this.data.mathFlowInside=!0)}function i(a){const c=this.resume().replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),h=this.stack[this.stack.length-1];k(h.type==="math"),this.exit(a),h.value=c;const f=h.data.hChildren[0];k(f.type==="element"),k(f.tagName==="code"),f.children.push({type:"text",value:c}),this.data.mathFlowInside=void 0}function s(a){this.enter({type:"inlineMath",value:"",data:{hName:"code",hProperties:{className:["language-math","math-inline"]},hChildren:[]}},a),this.buffer()}function o(a){const c=this.resume(),h=this.stack[this.stack.length-1];k(h.type==="inlineMath"),this.exit(a),h.value=c,h.data.hChildren.push({type:"text",value:c})}function l(a){this.config.enter.data.call(this,a),this.config.exit.data.call(this,a)}}function je(e){let t=(e||{}).singleDollarTextMath;return t==null&&(t=!0),n.peek=i,{unsafe:[{character:"\r",inConstruct:"mathFlowMeta"},{character:` `,inConstruct:"mathFlowMeta"},{character:"$",after:t?void 0:"\\$",inConstruct:"phrasing"},{character:"$",inConstruct:"mathFlowMeta"},{atBreak:!0,character:"$",after:"\\$"}],handlers:{math:r,inlineMath:n}};function r(s,o,l,a){const c=s.value||"",h=l.createTracker(a),f="$".repeat(Math.max(me(c,"$")+1,2)),g=l.enter("mathFlow");let x=h.move(f);if(s.meta){const d=l.enter("mathFlowMeta");x+=h.move(l.safe(s.meta,{after:` `,before:x,encode:["$"],...h.current()})),d()}return x+=h.move(` `),c&&(x+=h.move(c+` diff --git a/assets/PaperReaderView-CYHEOXgF.js b/assets/PaperReaderView-wkU6OX5E.js similarity index 91% rename from assets/PaperReaderView-CYHEOXgF.js rename to assets/PaperReaderView-wkU6OX5E.js index 1ea02c0928ff9849759e9a9c30b5c48ca6dc38eb..3fc5f8022b6cdbd921e442d55ae27cfcc6e5ba3b 100644 --- a/assets/PaperReaderView-CYHEOXgF.js +++ b/assets/PaperReaderView-wkU6OX5E.js @@ -1 +1 @@ -import{r as s,j as a,A as X,u as me,b as Ee,n as Te,V as he,N as We,L as D}from"./index-CkeK0cDg.js";import{u as ge}from"./useQuery-_Fj6Jfzr.js";import{u as ze,R as Me,A as Le,c as Fe,a as He,P as Ke}from"./ArtifactWorkspace-CRRWXbww.js";import{M as Ue}from"./MarkdownText-DM-IyAfb.js";import{g as qe}from"./papers-Celoj8_s.js";import{w as Be,e as De}from"./paperReader-BIpQD5HO.js";import{b as Oe}from"./usePapers-fMOiVOFB.js";import{c as Ve}from"./chat-Cvg-XEh-.js";import{s as Q}from"./safeExternalHref-CkBrsh84.js";import{ChatExperience as Xe}from"./ChatView-V3k6NvU1.js";import"./chatLaunch-NPBTDHUP.js";import"./chevron-down-CcbfCW-U.js";/* empty css */import"./hover-card-CAN3Vtea.js";import"./github-BxRJHxJc.js";import"./github-DHpXYWrC.js";import"./catalog-DGg7xZLW.js";import"./PaperPreviewLink-CQ27hqZy.js";import"./index-B1_S53Hb.js";import"./index-DqQiSNg1.js";import"./katex-DkKDou_j.js";import"./paperQueryKeys-BP2E-0yf.js";import"./useMutation-q-fdM2fm.js";import"./copy-BEe19JmS.js";import"./file-text-2FXER-SZ.js";import"./external-link-E5LiqyOi.js";import"./useInfiniteQuery-gdIFpXB_.js";import"./chatPrompts-DypmWIqx.js";import"./openrouter-DC0iPeja.js";import"./queryOptions-C9woPjwX.js";function Qe(r){return r instanceof X&&r.status===422?"This page could not be turned into a readable paper.":r instanceof X&&r.status===503?"Paper content is still being prepared. Please try again later.":"The paper could not be loaded."}function Ye({paperId:r,paperKey:i,paperTitle:n,paperHref:b,sourceUrl:c,resources:t,paperVersion:u="",selectionEnabled:v=!1,onReady:g,onPaperSelection:k,onPaperSelectionError:l}){const N=s.useRef(null),p=ge({queryKey:["paperWebMarkdown",r],queryFn:()=>qe(r),staleTime:5*6e4,retry:(y,d)=>y<2&&!(d instanceof X&&d.status<500),retryDelay:3e3}),P=p.isSuccess;s.useEffect(()=>{P&&(g==null||g())},[g,P]),ze({enabled:v&&!!u&&P,pagesRoot:N,routeId:i,paperVersion:u,numPages:1,onSelect:k,onError:l});const w=p.data?Be(p.data):"";return a.jsxs("div",{className:"pdf-viewer",children:[a.jsx(Me,{paperTitle:n,paperHref:b,resources:t,label:"Paper controls",children:a.jsx("div",{className:"pdf-toolbar-controls",children:a.jsx("a",{href:c,target:"_blank",rel:"noopener noreferrer",children:"Open original"})})}),a.jsx("div",{className:"pdf-scroll-frame",children:a.jsx("div",{className:"pdf-scroll",role:"region","aria-label":"Paper web page",children:p.isPending?a.jsx("div",{className:"pdf-loading",role:"status",children:"Preparing a readable version of this page…"}):p.isError?a.jsxs("div",{className:"pdf-error",role:"alert",children:[a.jsx("p",{children:Qe(p.error)}),a.jsxs("div",{children:[a.jsx("button",{type:"button",onClick:()=>void p.refetch(),children:"Retry"})," ",a.jsx("a",{href:c,target:"_blank",rel:"noopener noreferrer",children:"Open original"})]})]}):a.jsxs("article",{ref:N,className:"reader-web-document","data-page":"1",children:[!w.startsWith("# ")&&a.jsx("h1",{children:n}),a.jsx(Ue,{text:w})]})})})]})}const be=66,Ze=240,Y="pwc:reader:split-ratio",z=r=>`pwc:reader:session:${r}`,O=r=>`pwc:reader:assistant-collapsed:${r}`,ve=r=>`pwc:reader:page:${r}`;function V(r){const i=Number(sessionStorage.getItem(ve(r)));return Number.isInteger(i)&&i>0?i:1}function Ge(){const r=Number(localStorage.getItem(Y));return Number.isFinite(r)&&r>=45&&r<=75?r:be}function Je(r){const i=Q(r);if(!i)return null;const n=new URL(i);return(n.hostname==="arxiv.org"||n.hostname==="www.arxiv.org")&&n.pathname.startsWith("/pdf/")&&n.pathname.endsWith(".pdf")&&(n.pathname=n.pathname.slice(0,-4)),n.href}const et=/^\/pdf\/(\d{4}\.\d{4,5}(?:v\d{1,3})?|[a-z]+(?:-[a-z]+)*(?:\.[A-Z]{2})?\/\d{7}(?:v\d{1,3})?)$/;function tt(r){const i=new URL(r),n=i.pathname.match(et);return(i.hostname==="arxiv.org"||i.hostname==="www.arxiv.org")&&n&&!i.search?he(`/paper-assets/arxiv-pdf/${n[1]}`)??r:r}function rt(r){return new URL(r).hostname.replace(/^www\./,"")}function at(r){if(!r)return{};const i={};for(const c of r.repositories??[]){if(!c.is_official)continue;const t=Q(c.url);if(!t)continue;const u=new URL(t),v=u.pathname.split("/").filter(Boolean);if((u.hostname==="github.com"||u.hostname==="www.github.com")&&v.length>=2){i.repository={href:t,stars:c.num_stars||0};break}}const n=[...r.project_pages??[]].sort((c,t)=>Number(t.is_official)-Number(c.is_official));for(const c of n){const t=Q(c.url);if(t){i.projectPage={href:t,label:rt(t)};break}}const b=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 b>0&&r.arxiv_id&&(i.huggingFace={href:`https://huggingface.co/papers/${r.arxiv_id.replace(/v\d+$/i,"")}`,count:b}),i}function st(){var de,ue,pe,fe;const r=Ee(),{paperId:i}=me(),n=Te(i??"").replace(/v\d+$/i,""),b=Oe(n,!!n),c=ge({queryKey:["chatAvailability"],queryFn:()=>Ve.getAvailability(),refetchInterval:3e4,retry:!1}),t=b.data,u=t?De(t):null,v=u?null:(t==null?void 0:t.source)==="external"?he(`/paper-assets/external/${t.id}/paper.pdf`):Je(t==null?void 0:t.url_pdf),g=v&&(t==null?void 0:t.source)!=="external"?tt(v):v,k=at(t),l=((de=t==null?void 0:t.arxiv_id)==null?void 0:de.replace(/v\d+$/i,""))||n,N=s.useCallback(()=>r(`/paper/${l}`),[l,r]),[p,P]=s.useState(()=>sessionStorage.getItem(z(n))||void 0),[w,y]=s.useState(Ge),[d,Z]=s.useState(()=>sessionStorage.getItem(O(n))==="1"),[x,$]=s.useState("paper"),[M,j]=s.useState(),[we,G]=s.useState(!1),xe=s.useCallback(()=>G(!0),[]),[Pe,R]=s.useState(""),[Re,Se]=s.useState(()=>V(n)),[C,ye]=s.useState(0),[J,ee]=s.useState(!1),[je,L]=s.useState(!1),A=s.useRef(null),F=s.useRef(null),H=s.useRef(null),te=s.useRef(null),I=s.useRef(!1),E=s.useRef(0),S=s.useRef(0),K=s.useRef(0),_=s.useRef(w),U=s.useRef(V(n)),q=s.useRef(t==null?void 0:t.version),re=Fe().reset,ae=s.useRef(`${n}:${p??"new"}`),f=C>=840;s.useEffect(()=>{const e=`${n}:${p??"new"}`;ae.current!==e&&(ae.current=e,re())},[p,re,n]),s.useEffect(()=>{t!=null&&t.version&&q.current&&t.version!==q.current&&(j(void 0),R("")),q.current=t==null?void 0:t.version},[t==null?void 0:t.version]),s.useEffect(()=>{window.clearTimeout(E.current),L(!1);const e=sessionStorage.getItem(z(n));P(e||void 0),Z(sessionStorage.getItem(O(n))==="1"),$("paper"),G(!1),j(void 0),R("");const o=V(n);U.current=o,Se(o)},[n]),s.useEffect(()=>()=>{window.clearTimeout(E.current),cancelAnimationFrame(S.current)},[]),s.useLayoutEffect(()=>{const e=A.current;if(!e)return;const o=()=>ye(e.clientWidth);o();const m=new ResizeObserver(o);return m.observe(e),()=>m.disconnect()},[t]),s.useEffect(()=>{if(!t)return;document.title=`${t.title} — Papers With Code reader`;let e=document.querySelector('meta[name="robots"]');const o=!e;e||(e=document.createElement("meta"),e.name="robots",document.head.appendChild(e));const m=e.content;e.content="noindex, nofollow";let h=document.querySelector('link[rel="canonical"]');const Ae=!h;h||(h=document.createElement("link"),h.rel="canonical",document.head.appendChild(h));const Ie=h.href;return h.href=`${window.location.origin}/paper/${l}`,()=>{document.title="Papers With Code",o?e==null||e.remove():e&&(e.content=m),Ae?h==null||h.remove():h&&(h.href=Ie)}},[l,t]);const T=s.useCallback(e=>{if(!C)return Math.max(45,Math.min(75,e));const o=480/C*100,m=100-360/C*100;return Math.max(o,Math.min(m,e))},[C]);s.useEffect(()=>y(e=>{const o=T(e);return _.current=o,o}),[T]);const W=e=>{const o=T(e);_.current=o,y(o),localStorage.setItem(Y,String(o))},se=e=>{var m;const o=T(e);_.current=o,F.current&&(F.current.style.width=`${o}%`),H.current&&(H.current.style.width=`${100-o}%`),(m=te.current)==null||m.setAttribute("aria-valuenow",String(Math.round(o)))},ne=e=>{K.current=e,!S.current&&(S.current=requestAnimationFrame(()=>{var m;S.current=0;const o=(m=A.current)==null?void 0:m.getBoundingClientRect();o!=null&&o.width&&se((K.current-o.left)/o.width*100)}))},Ce=e=>{I.current=!0,ee(!0),e.currentTarget.setPointerCapture(e.pointerId),ne(e.clientX)},B=()=>{var e;if(I.current){if(S.current){cancelAnimationFrame(S.current),S.current=0;const o=(e=A.current)==null?void 0:e.getBoundingClientRect();o!=null&&o.width&&se((K.current-o.left)/o.width*100)}I.current=!1,y(_.current),localStorage.setItem(Y,String(_.current)),ee(!1)}},oe=e=>{window.clearTimeout(E.current),L(!0),Z(e),sessionStorage.setItem(O(n),e?"1":"0"),E.current=window.setTimeout(()=>L(!1),Ze+40)},_e=e=>{P(e),sessionStorage.setItem(z(n),e)},ke=()=>{P(void 0),sessionStorage.removeItem(z(n)),j(void 0),R("")},ie=((ue=c.data)==null?void 0:ue.paper_reader_selection_enabled)===!0,ce=e=>{j(e),R(`Selection from page ${e.page} added to chat`),f&&d&&oe(!1)},Ne=s.useCallback(e=>{j(e),e||R("")},[]),le=We()&&((pe=c.data)==null?void 0:pe.paper_reader_chat_enabled)!==!1,$e=t&&le&&u&&!we?a.jsx("div",{className:"reader-chat-unavailable",role:"status",children:"Chat opens once the paper is ready."}):t&&le?a.jsx(Xe,{mode:"paper",routeSessionId:p,primaryPaper:{id:t.id,routeId:l,title:t.title},currentPage:()=>U.current,paperSelection:M,onPaperSelectionChange:Ne,onSessionId:_e,onReaderSubmit:()=>$("assistant"),onReaderNewChat:ke}):a.jsx("div",{className:"reader-chat-unavailable",children:"Chat is not enabled for this preview."});return b.isLoading?a.jsx("div",{className:"reader-status",role:"status",children:"Loading paper…"}):b.error||!t?a.jsxs("div",{className:"reader-status",role:"alert",children:[a.jsx("p",{children:"Paper not found."}),a.jsx(D,{to:"/papers",children:"Browse papers"})]}):((fe=c.data)==null?void 0:fe.native_pdf_reader_enabled)===!1?a.jsxs("div",{className:"reader-status",role:"alert",children:[a.jsx("p",{children:"The native reader is currently unavailable."}),a.jsx(D,{to:`/paper/${l}`,children:"Back to paper"})]}):!g&&!u?a.jsxs("div",{className:"reader-status",role:"alert",children:[a.jsx("p",{children:"Native reading is unavailable for this resource."}),a.jsx(D,{to:`/paper/${l}`,children:"Back to paper"})]}):a.jsxs("div",{className:"paper-reader-shell",children:[!f&&a.jsxs("div",{className:"reader-tabs",role:"tablist","aria-label":"Reader panels",children:[a.jsx("button",{type:"button",role:"tab","aria-selected":x==="paper",onClick:()=>$("paper"),children:"Paper"}),a.jsxs("button",{type:"button",role:"tab","aria-selected":x==="assistant","aria-label":M&&x!=="assistant"?"Chat, selection attached":"Chat",onClick:()=>$("assistant"),children:["Chat",M&&x!=="assistant"&&a.jsx("span",{className:"reader-tab-pending","aria-hidden":"true"})]})]}),a.jsx(He,{variant:"reader",children:a.jsxs("div",{ref:A,className:`reader-workspace${f?" is-desktop":" is-tabs"}${d?" is-assistant-collapsed":""}${J?" is-resizing":""}`,"data-testid":"paper-chat-workspace",children:[a.jsx("section",{ref:F,className:`reader-paper-pane${!f&&x!=="paper"?" is-hidden":""}`,style:f?{width:d?"100%":`${w}%`}:void 0,role:"tabpanel","aria-label":"Paper","aria-hidden":!f&&x!=="paper",children:u?a.jsx(Ye,{paperId:t.id,paperKey:l,paperTitle:t.title,paperHref:`/paper/${l}`,sourceUrl:u,resources:k,paperVersion:t.version,selectionEnabled:ie,onReady:xe,onPaperSelection:ce,onPaperSelectionError:R}):g&&a.jsx(Ke,{url:g,downloadUrl:v??g,paperKey:l,paperTitle:t.title,paperHref:`/paper/${l}`,onClose:N,resources:k,initialPage:Re,resizeActive:J||je,selectionEnabled:ie,paperVersion:t.version,loadErrorMessage:t.source==="external"?"Paper content is still being prepared. Please try again later.":void 0,onPaperSelection:ce,onPaperSelectionError:R,onPageChange:e=>{U.current=e,sessionStorage.setItem(ve(n),String(e))}})}),f&&!d&&a.jsx("div",{ref:te,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:Ce,onPointerMove:e=>{I.current&&ne(e.clientX)},onPointerUp:B,onPointerCancel:B,onLostPointerCapture:B,onDoubleClick:()=>W(be),onKeyDown:e=>{(e.key==="ArrowLeft"||e.key==="ArrowRight")&&(e.preventDefault(),W(w+(e.key==="ArrowRight"?2:-2))),e.key==="Home"&&W(45),e.key==="End"&&W(75)}}),a.jsx("aside",{ref:H,id:"reader-chat-panel",className:`reader-assistant-pane${!f&&x!=="assistant"?" is-hidden":""}${f&&d?" is-collapsed":""}`,style:f?{width:d?0:`${100-w}%`}:void 0,role:"tabpanel","aria-label":"Chat","aria-hidden":!f&&x!=="assistant"||d,children:$e}),a.jsx("div",{className:"sr-only","aria-live":"polite",children:Pe}),f&&a.jsx("button",{type:"button",className:"reader-collapse-assistant","aria-controls":"reader-chat-panel","aria-expanded":!d,onClick:()=>oe(!d),children:d?"Open chat":"Hide chat"})]})})]})}function zt(){const{paperId:r=""}=me();return a.jsx(Le,{workspaceKey:`reader:${r}`,children:a.jsx(st,{})})}export{zt as default,at as readerToolbarResources}; +import{r as s,j as a,A as X,u as me,b as Ee,n as Te,V as he,N as We,L as D}from"./index-B7UoLEbn.js";import{u as ge}from"./useQuery-DV2f4JpC.js";import{u as ze,R as Me,A as Le,c as Fe,a as He,P as Ke}from"./ArtifactWorkspace-B1pVTYNC.js";import{M as Ue}from"./MarkdownText-DH4XnT47.js";import{g as qe}from"./papers-Ctf2uv0o.js";import{w as Be,e as De}from"./paperReader-BIpQD5HO.js";import{b as Oe}from"./usePapers-CDuTKuAc.js";import{c as Ve}from"./chat-B6IGPjTl.js";import{s as Q}from"./safeExternalHref-CkBrsh84.js";import{ChatExperience as Xe}from"./ChatView-Clbc6HRC.js";import"./chatLaunch-BG1GqDpR.js";import"./chevron-down-CF7sS93G.js";/* empty css */import"./hover-card-BM8a6wEE.js";import"./github-uiOp6-cP.js";import"./github-CVI7-Ls5.js";import"./catalog-DcbS_7_L.js";import"./PaperPreviewLink-C5ianbW8.js";import"./index-tHVWANW1.js";import"./index-ClEBI70O.js";import"./katex-DkKDou_j.js";import"./paperQueryKeys-BP2E-0yf.js";import"./useMutation-CuaM6sOT.js";import"./copy-B2Q-ksVe.js";import"./file-text-CXhRvAOE.js";import"./external-link-mpf7SsAF.js";import"./useInfiniteQuery-CoFrg4GN.js";import"./chatPrompts-DypmWIqx.js";import"./openrouter-Drl-aaDJ.js";import"./queryOptions-C9woPjwX.js";function Qe(r){return r instanceof X&&r.status===422?"This page could not be turned into a readable paper.":r instanceof X&&r.status===503?"Paper content is still being prepared. Please try again later.":"The paper could not be loaded."}function Ye({paperId:r,paperKey:i,paperTitle:n,paperHref:b,sourceUrl:c,resources:t,paperVersion:u="",selectionEnabled:v=!1,onReady:g,onPaperSelection:k,onPaperSelectionError:l}){const N=s.useRef(null),p=ge({queryKey:["paperWebMarkdown",r],queryFn:()=>qe(r),staleTime:5*6e4,retry:(y,d)=>y<2&&!(d instanceof X&&d.status<500),retryDelay:3e3}),P=p.isSuccess;s.useEffect(()=>{P&&(g==null||g())},[g,P]),ze({enabled:v&&!!u&&P,pagesRoot:N,routeId:i,paperVersion:u,numPages:1,onSelect:k,onError:l});const w=p.data?Be(p.data):"";return a.jsxs("div",{className:"pdf-viewer",children:[a.jsx(Me,{paperTitle:n,paperHref:b,resources:t,label:"Paper controls",children:a.jsx("div",{className:"pdf-toolbar-controls",children:a.jsx("a",{href:c,target:"_blank",rel:"noopener noreferrer",children:"Open original"})})}),a.jsx("div",{className:"pdf-scroll-frame",children:a.jsx("div",{className:"pdf-scroll",role:"region","aria-label":"Paper web page",children:p.isPending?a.jsx("div",{className:"pdf-loading",role:"status",children:"Preparing a readable version of this page…"}):p.isError?a.jsxs("div",{className:"pdf-error",role:"alert",children:[a.jsx("p",{children:Qe(p.error)}),a.jsxs("div",{children:[a.jsx("button",{type:"button",onClick:()=>void p.refetch(),children:"Retry"})," ",a.jsx("a",{href:c,target:"_blank",rel:"noopener noreferrer",children:"Open original"})]})]}):a.jsxs("article",{ref:N,className:"reader-web-document","data-page":"1",children:[!w.startsWith("# ")&&a.jsx("h1",{children:n}),a.jsx(Ue,{text:w})]})})})]})}const be=66,Ze=240,Y="pwc:reader:split-ratio",z=r=>`pwc:reader:session:${r}`,O=r=>`pwc:reader:assistant-collapsed:${r}`,ve=r=>`pwc:reader:page:${r}`;function V(r){const i=Number(sessionStorage.getItem(ve(r)));return Number.isInteger(i)&&i>0?i:1}function Ge(){const r=Number(localStorage.getItem(Y));return Number.isFinite(r)&&r>=45&&r<=75?r:be}function Je(r){const i=Q(r);if(!i)return null;const n=new URL(i);return(n.hostname==="arxiv.org"||n.hostname==="www.arxiv.org")&&n.pathname.startsWith("/pdf/")&&n.pathname.endsWith(".pdf")&&(n.pathname=n.pathname.slice(0,-4)),n.href}const et=/^\/pdf\/(\d{4}\.\d{4,5}(?:v\d{1,3})?|[a-z]+(?:-[a-z]+)*(?:\.[A-Z]{2})?\/\d{7}(?:v\d{1,3})?)$/;function tt(r){const i=new URL(r),n=i.pathname.match(et);return(i.hostname==="arxiv.org"||i.hostname==="www.arxiv.org")&&n&&!i.search?he(`/paper-assets/arxiv-pdf/${n[1]}`)??r:r}function rt(r){return new URL(r).hostname.replace(/^www\./,"")}function at(r){if(!r)return{};const i={};for(const c of r.repositories??[]){if(!c.is_official)continue;const t=Q(c.url);if(!t)continue;const u=new URL(t),v=u.pathname.split("/").filter(Boolean);if((u.hostname==="github.com"||u.hostname==="www.github.com")&&v.length>=2){i.repository={href:t,stars:c.num_stars||0};break}}const n=[...r.project_pages??[]].sort((c,t)=>Number(t.is_official)-Number(c.is_official));for(const c of n){const t=Q(c.url);if(t){i.projectPage={href:t,label:rt(t)};break}}const b=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 b>0&&r.arxiv_id&&(i.huggingFace={href:`https://huggingface.co/papers/${r.arxiv_id.replace(/v\d+$/i,"")}`,count:b}),i}function st(){var de,ue,pe,fe;const r=Ee(),{paperId:i}=me(),n=Te(i??"").replace(/v\d+$/i,""),b=Oe(n,!!n),c=ge({queryKey:["chatAvailability"],queryFn:()=>Ve.getAvailability(),refetchInterval:3e4,retry:!1}),t=b.data,u=t?De(t):null,v=u?null:(t==null?void 0:t.source)==="external"?he(`/paper-assets/external/${t.id}/paper.pdf`):Je(t==null?void 0:t.url_pdf),g=v&&(t==null?void 0:t.source)!=="external"?tt(v):v,k=at(t),l=((de=t==null?void 0:t.arxiv_id)==null?void 0:de.replace(/v\d+$/i,""))||n,N=s.useCallback(()=>r(`/paper/${l}`),[l,r]),[p,P]=s.useState(()=>sessionStorage.getItem(z(n))||void 0),[w,y]=s.useState(Ge),[d,Z]=s.useState(()=>sessionStorage.getItem(O(n))==="1"),[x,$]=s.useState("paper"),[M,j]=s.useState(),[we,G]=s.useState(!1),xe=s.useCallback(()=>G(!0),[]),[Pe,R]=s.useState(""),[Re,Se]=s.useState(()=>V(n)),[C,ye]=s.useState(0),[J,ee]=s.useState(!1),[je,L]=s.useState(!1),A=s.useRef(null),F=s.useRef(null),H=s.useRef(null),te=s.useRef(null),I=s.useRef(!1),E=s.useRef(0),S=s.useRef(0),K=s.useRef(0),_=s.useRef(w),U=s.useRef(V(n)),q=s.useRef(t==null?void 0:t.version),re=Fe().reset,ae=s.useRef(`${n}:${p??"new"}`),f=C>=840;s.useEffect(()=>{const e=`${n}:${p??"new"}`;ae.current!==e&&(ae.current=e,re())},[p,re,n]),s.useEffect(()=>{t!=null&&t.version&&q.current&&t.version!==q.current&&(j(void 0),R("")),q.current=t==null?void 0:t.version},[t==null?void 0:t.version]),s.useEffect(()=>{window.clearTimeout(E.current),L(!1);const e=sessionStorage.getItem(z(n));P(e||void 0),Z(sessionStorage.getItem(O(n))==="1"),$("paper"),G(!1),j(void 0),R("");const o=V(n);U.current=o,Se(o)},[n]),s.useEffect(()=>()=>{window.clearTimeout(E.current),cancelAnimationFrame(S.current)},[]),s.useLayoutEffect(()=>{const e=A.current;if(!e)return;const o=()=>ye(e.clientWidth);o();const m=new ResizeObserver(o);return m.observe(e),()=>m.disconnect()},[t]),s.useEffect(()=>{if(!t)return;document.title=`${t.title} — Papers With Code reader`;let e=document.querySelector('meta[name="robots"]');const o=!e;e||(e=document.createElement("meta"),e.name="robots",document.head.appendChild(e));const m=e.content;e.content="noindex, nofollow";let h=document.querySelector('link[rel="canonical"]');const Ae=!h;h||(h=document.createElement("link"),h.rel="canonical",document.head.appendChild(h));const Ie=h.href;return h.href=`${window.location.origin}/paper/${l}`,()=>{document.title="Papers With Code",o?e==null||e.remove():e&&(e.content=m),Ae?h==null||h.remove():h&&(h.href=Ie)}},[l,t]);const T=s.useCallback(e=>{if(!C)return Math.max(45,Math.min(75,e));const o=480/C*100,m=100-360/C*100;return Math.max(o,Math.min(m,e))},[C]);s.useEffect(()=>y(e=>{const o=T(e);return _.current=o,o}),[T]);const W=e=>{const o=T(e);_.current=o,y(o),localStorage.setItem(Y,String(o))},se=e=>{var m;const o=T(e);_.current=o,F.current&&(F.current.style.width=`${o}%`),H.current&&(H.current.style.width=`${100-o}%`),(m=te.current)==null||m.setAttribute("aria-valuenow",String(Math.round(o)))},ne=e=>{K.current=e,!S.current&&(S.current=requestAnimationFrame(()=>{var m;S.current=0;const o=(m=A.current)==null?void 0:m.getBoundingClientRect();o!=null&&o.width&&se((K.current-o.left)/o.width*100)}))},Ce=e=>{I.current=!0,ee(!0),e.currentTarget.setPointerCapture(e.pointerId),ne(e.clientX)},B=()=>{var e;if(I.current){if(S.current){cancelAnimationFrame(S.current),S.current=0;const o=(e=A.current)==null?void 0:e.getBoundingClientRect();o!=null&&o.width&&se((K.current-o.left)/o.width*100)}I.current=!1,y(_.current),localStorage.setItem(Y,String(_.current)),ee(!1)}},oe=e=>{window.clearTimeout(E.current),L(!0),Z(e),sessionStorage.setItem(O(n),e?"1":"0"),E.current=window.setTimeout(()=>L(!1),Ze+40)},_e=e=>{P(e),sessionStorage.setItem(z(n),e)},ke=()=>{P(void 0),sessionStorage.removeItem(z(n)),j(void 0),R("")},ie=((ue=c.data)==null?void 0:ue.paper_reader_selection_enabled)===!0,ce=e=>{j(e),R(`Selection from page ${e.page} added to chat`),f&&d&&oe(!1)},Ne=s.useCallback(e=>{j(e),e||R("")},[]),le=We()&&((pe=c.data)==null?void 0:pe.paper_reader_chat_enabled)!==!1,$e=t&&le&&u&&!we?a.jsx("div",{className:"reader-chat-unavailable",role:"status",children:"Chat opens once the paper is ready."}):t&&le?a.jsx(Xe,{mode:"paper",routeSessionId:p,primaryPaper:{id:t.id,routeId:l,title:t.title},currentPage:()=>U.current,paperSelection:M,onPaperSelectionChange:Ne,onSessionId:_e,onReaderSubmit:()=>$("assistant"),onReaderNewChat:ke}):a.jsx("div",{className:"reader-chat-unavailable",children:"Chat is not enabled for this preview."});return b.isLoading?a.jsx("div",{className:"reader-status",role:"status",children:"Loading paper…"}):b.error||!t?a.jsxs("div",{className:"reader-status",role:"alert",children:[a.jsx("p",{children:"Paper not found."}),a.jsx(D,{to:"/papers",children:"Browse papers"})]}):((fe=c.data)==null?void 0:fe.native_pdf_reader_enabled)===!1?a.jsxs("div",{className:"reader-status",role:"alert",children:[a.jsx("p",{children:"The native reader is currently unavailable."}),a.jsx(D,{to:`/paper/${l}`,children:"Back to paper"})]}):!g&&!u?a.jsxs("div",{className:"reader-status",role:"alert",children:[a.jsx("p",{children:"Native reading is unavailable for this resource."}),a.jsx(D,{to:`/paper/${l}`,children:"Back to paper"})]}):a.jsxs("div",{className:"paper-reader-shell",children:[!f&&a.jsxs("div",{className:"reader-tabs",role:"tablist","aria-label":"Reader panels",children:[a.jsx("button",{type:"button",role:"tab","aria-selected":x==="paper",onClick:()=>$("paper"),children:"Paper"}),a.jsxs("button",{type:"button",role:"tab","aria-selected":x==="assistant","aria-label":M&&x!=="assistant"?"Chat, selection attached":"Chat",onClick:()=>$("assistant"),children:["Chat",M&&x!=="assistant"&&a.jsx("span",{className:"reader-tab-pending","aria-hidden":"true"})]})]}),a.jsx(He,{variant:"reader",children:a.jsxs("div",{ref:A,className:`reader-workspace${f?" is-desktop":" is-tabs"}${d?" is-assistant-collapsed":""}${J?" is-resizing":""}`,"data-testid":"paper-chat-workspace",children:[a.jsx("section",{ref:F,className:`reader-paper-pane${!f&&x!=="paper"?" is-hidden":""}`,style:f?{width:d?"100%":`${w}%`}:void 0,role:"tabpanel","aria-label":"Paper","aria-hidden":!f&&x!=="paper",children:u?a.jsx(Ye,{paperId:t.id,paperKey:l,paperTitle:t.title,paperHref:`/paper/${l}`,sourceUrl:u,resources:k,paperVersion:t.version,selectionEnabled:ie,onReady:xe,onPaperSelection:ce,onPaperSelectionError:R}):g&&a.jsx(Ke,{url:g,downloadUrl:v??g,paperKey:l,paperTitle:t.title,paperHref:`/paper/${l}`,onClose:N,resources:k,initialPage:Re,resizeActive:J||je,selectionEnabled:ie,paperVersion:t.version,loadErrorMessage:t.source==="external"?"Paper content is still being prepared. Please try again later.":void 0,onPaperSelection:ce,onPaperSelectionError:R,onPageChange:e=>{U.current=e,sessionStorage.setItem(ve(n),String(e))}})}),f&&!d&&a.jsx("div",{ref:te,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:Ce,onPointerMove:e=>{I.current&&ne(e.clientX)},onPointerUp:B,onPointerCancel:B,onLostPointerCapture:B,onDoubleClick:()=>W(be),onKeyDown:e=>{(e.key==="ArrowLeft"||e.key==="ArrowRight")&&(e.preventDefault(),W(w+(e.key==="ArrowRight"?2:-2))),e.key==="Home"&&W(45),e.key==="End"&&W(75)}}),a.jsx("aside",{ref:H,id:"reader-chat-panel",className:`reader-assistant-pane${!f&&x!=="assistant"?" is-hidden":""}${f&&d?" is-collapsed":""}`,style:f?{width:d?0:`${100-w}%`}:void 0,role:"tabpanel","aria-label":"Chat","aria-hidden":!f&&x!=="assistant"||d,children:$e}),a.jsx("div",{className:"sr-only","aria-live":"polite",children:Pe}),f&&a.jsx("button",{type:"button",className:"reader-collapse-assistant","aria-controls":"reader-chat-panel","aria-expanded":!d,onClick:()=>oe(!d),children:d?"Open chat":"Hide chat"})]})})]})}function zt(){const{paperId:r=""}=me();return a.jsx(Le,{workspaceKey:`reader:${r}`,children:a.jsx(st,{})})}export{zt as default,at as readerToolbarResources}; diff --git a/assets/PapersListView-CsWnWrRV.js b/assets/PapersListView-D98idr2d.js similarity index 90% rename from assets/PapersListView-CsWnWrRV.js rename to assets/PapersListView-D98idr2d.js index 9af9c5fdd32f2fbf28ab4cc0410ec1d118d135a0..38055592208858f259ff8293bae1d936ed51bb41 100644 --- a/assets/PapersListView-CsWnWrRV.js +++ b/assets/PapersListView-D98idr2d.js @@ -1 +1 @@ -import{d as X,r as x,A as J,j as e,L as j,i as W}from"./index-CkeK0cDg.js";import{I as U,T as Y,P as Z}from"./components-BRrDI9KS.js";import{c as ee}from"./catalog-DGg7xZLW.js";import{t as se,d as ae}from"./colors-DQ-VN9If.js";import{u as re,a as te}from"./usePapers-fMOiVOFB.js";import{u as ne}from"./useDebounce-BX_reoqD.js";import{u as ie}from"./useIntersectionObserver-Bw5JPCeX.js";import{S as _}from"./skeleton-Cs8haT1C.js";import{A as oe,a as ce}from"./alert-Vt5eE6re.js";import{u as le}from"./useQuery-_Fj6Jfzr.js";import{P as de}from"./PaperFeedFilters-D-Ie3cDx.js";import{a as me,P as he,b as pe}from"./PaperDateFilter-qc_JVYg0.js";import"./paperQueryKeys-BP2E-0yf.js";import"./LatexTitle-DPYNzv63.js";import"./papers-Celoj8_s.js";import"./safeExternalHref-CkBrsh84.js";import"./useInfiniteQuery-gdIFpXB_.js";import"./popover-Vq6DwYpn.js";const v=360;function ue(a,o){const m=a.toLocaleLowerCase();return o.trim().split(/\s+/).filter(Boolean).reduce((c,t)=>{const l=m.indexOf(t.toLocaleLowerCase());return l>=0&&(c<0||l=0?t+1:o}function fe(a,o){if(a.length<=v)return a;const m=ue(a,o);if(m<0||m0?"…":""}${a.slice(c,t).trim()}${tnew Intl.NumberFormat("en",{notation:a>=1e3?"compact":"standard",maximumFractionDigits:1}).format(a),Oe=()=>{var I,$,T,O,B,H,M,q,G;const[a,o]=X(),m=a.get("framework")||void 0,c=a.get("repository")||void 0,t=!!(m||c),l=a.get("search")||"",[F,C]=x.useState(l),p=ne(F,300),n=!t&&l.trim().length>0;x.useEffect(()=>C(l),[l]),x.useEffect(()=>{if(p===l)return;const s=new URLSearchParams(a);p?s.set("search",p):s.delete("search"),o(s,{replace:!0})},[p]),x.useEffect(()=>{const s=a.get("order_by"),i=new URLSearchParams(a);n&&!["relevance","date_published","citation_count"].includes(s||"")?(i.set("order_by","relevance"),o(i,{replace:!0})):!n&&s==="relevance"&&(i.delete("order_by"),o(i,{replace:!0}))},[n,a,o]);const L=a.get("order_by"),g=L==="citation_count"?"cited":L==="date_published"?"new":n?"relevance":"trending",u=me(a),w=a.get("has_hf_artifacts")==="true",k=!t&&a.get("has_code")==="true",y=(s,i)=>{const h=new URLSearchParams(a);i?h.set(s,i):h.delete(s),o(h)},Q=s=>{y("order_by",s==="cited"?"citation_count":s==="new"?"date_published":s)},b=re({page_size:20,order_by:g==="trending"?"trending":g==="cited"?"citation_count":"date_published",order_dir:"desc",search:t&&p||void 0,start_date:u.startDate,end_date:u.endDate,include_resources:!0,conference:a.get("conference")||void 0,latest_only:a.get("latest_only")!=="false",has_code:k,has_hf_artifacts:w,framework:m,repository:c,enabled:!n}),R=te({q:p.trim(),order_by:g==="cited"?"citation_count":g==="new"?"date_published":"relevance",start_date:u.startDate,end_date:u.endDate,has_code:k,has_hf_artifacts:w,enabled:n}),d=n?R:b,A=le({queryKey:["top-tasks-sidebar"],queryFn:()=>ee.topTasks(8),enabled:!t&&!n,staleTime:10*60*1e3}),N=x.useMemo(()=>{var i;return(((i=d.data)==null?void 0:i.pages.flatMap(h=>h.results))||[]).map(h=>{const S=se(h);return n?{...S,abstract:fe(S.abstract,l)}:S})},[d.data,n,l]),{targetRef:K,isIntersecting:D}=ie({rootMargin:"200px"});x.useEffect(()=>{D&&d.hasNextPage&&!d.isFetchingNextPage&&d.fetchNextPage()},[D,d.hasNextPage,d.isFetchingNextPage]);const f=((T=($=(I=b.data)==null?void 0:I.pages)==null?void 0:$[0])==null?void 0:T.count)??0,r=(H=(B=(O=b.data)==null?void 0:O.pages)==null?void 0:B[0])==null?void 0:H.scope,P=(q=(M=R.data)==null?void 0:M.pages)==null?void 0:q.at(-1),E=m&&d.error instanceof J&&d.error.status===404,V=(r==null?void 0:r.kind)==="framework"?r.framework_name:r==null?void 0:r.repository;return e.jsxs("div",{className:"page",children:[(r==null?void 0:r.kind)==="framework"&&e.jsxs("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:[e.jsx(j,{to:"/",children:"Papers"}),e.jsx("span",{className:"sep",children:"/"}),e.jsx(j,{to:"/frameworks",children:"Frameworks"}),e.jsx("span",{className:"sep",children:"/"}),e.jsx("span",{style:{color:"var(--ink)"},children:r.framework_name})]}),e.jsxs("div",{className:"feed-header",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"feed-title",children:t?e.jsxs(e.Fragment,{children:["Papers implemented by ",e.jsx("em",{children:V||m||c})]}):n?e.jsxs(e.Fragment,{children:["Search results for ",e.jsxs("em",{children:["“",l,"”"]})]}):e.jsxs(e.Fragment,{children:["All ",e.jsx("em",{children:"Papers"})]})}),e.jsx("div",{className:"feed-subtitle",children:t?(r==null?void 0:r.kind)==="framework"?f>0&&`${f.toLocaleString()} papers.`:r!=null&&r.repository?e.jsxs(e.Fragment,{children:["GitHub repository ",e.jsx("strong",{children:r.repository}),". ",f>0&&`${f.toLocaleString()} papers.`]}):"Repository-scoped paper feed.":n?`${N.length} loaded from the most relevant results.`:e.jsxs(e.Fragment,{children:["Search the full corpus. ",f>0&&`${f.toLocaleString()} papers indexed.`]})}),t&&r&&e.jsxs("div",{className:"paper-feed-scope-links",children:[e.jsxs("div",{className:"paper-feed-primary-links",children:[r.github_url&&e.jsxs("a",{href:r.github_url,target:"_blank",rel:"noopener noreferrer",className:r.kind==="framework"?"task-framework-link":"framework-link",children:[e.jsx(U,{name:"github",size:13}),r.kind==="framework"?e.jsxs(e.Fragment,{children:[e.jsx("span",{children:r.repository||"GitHub"}),r.num_stars!=null&&e.jsxs("span",{className:"task-framework-link-stars",children:["★ ",je(r.num_stars)]})]}):"GitHub"]}),r.kind==="framework"&&r.introducing_paper_arxiv_id&&e.jsx(j,{to:`/paper/${r.introducing_paper_arxiv_id}`,className:"framework-link",children:"Introducing paper"})]}),r.kind==="framework"&&r.recommended_tasks&&r.recommended_tasks.length>0&&e.jsx("div",{className:"paper-feed-task-tags",children:r.recommended_tasks.map(s=>s.slug?e.jsx(Y,{slug:s.slug,label:s.name},s.id):null)})]})]}),e.jsx(he,{startDate:u.startDate,endDate:u.endDate,onChange:s=>o(pe(a,s))})]}),e.jsx("div",{className:"papers-search-row",children:e.jsxs("div",{className:"papers-search-input-wrap",children:[e.jsx(U,{name:"search",size:14}),e.jsx("input",{className:"papers-search-input",placeholder:"Search title or abstract…",value:F,onChange:s=>C(s.target.value)})]})}),e.jsxs("div",{className:t||n?"papers-feed-layout-scoped":"layout-with-sidebar",children:[!t&&!n&&e.jsx("aside",{className:"sidebar",children:e.jsxs("div",{className:"sidebar-section",children:[e.jsx("div",{className:"sidebar-label",children:"Top Domains"}),A.isLoading&&e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:Array.from({length:6}).map((s,i)=>e.jsx(_,{className:"h-5 w-full"},i))}),(G=A.data)==null?void 0:G.map(s=>e.jsxs(j,{to:`/tasks/${s.slug}`,className:"sidebar-link",children:[ae(s.name,s.slug),s.paper_count!=null&&e.jsx("span",{className:"count",children:s.paper_count})]},s.id))]})}),e.jsxs("div",{children:[e.jsxs("div",{className:"sort-bar",children:[e.jsxs("div",{className:"paper-feed-toolbar-controls",children:[e.jsx("div",{className:"sort-options",children:(n?ge:xe).map(([s,i])=>e.jsx("button",{className:`sort-btn ${g===s?"active":""}`,onClick:()=>Q(s),children:i},s))}),e.jsx(de,{hasCode:k,hasHfArtifacts:w,onHasCodeChange:s=>y("has_code",s?"true":void 0),onHasHfArtifactsChange:s=>y("has_hf_artifacts",s?"true":void 0),showHasCode:!t})]}),e.jsxs("div",{className:"results-count",children:[N.length," loaded"]})]}),E?e.jsx("div",{className:"no-results",children:"Framework not found."}):d.error&&e.jsx(oe,{variant:"destructive",className:"mb-4",children:e.jsx(ce,{children:"Failed to load papers. Please try again."})}),!E&&(d.isLoading?e.jsx("div",{className:"paper-list",children:Array.from({length:6}).map((s,i)=>e.jsxs("div",{className:"paper-card",children:[e.jsx(_,{className:"h-[220px] w-[160px]"}),e.jsxs("div",{className:"paper-body",style:{flex:1,gap:12},children:[e.jsx(_,{className:"h-6 w-3/4"}),e.jsx(_,{className:"h-4 w-1/2"}),e.jsx(_,{className:"h-12 w-full"})]})]},i))}):N.length===0?e.jsxs("div",{className:"no-results",children:[e.jsx("p",{children:"No matching papers."}),n&&W()&&e.jsx(j,{to:`/chat?q=${encodeURIComponent(l.trim())}`,children:"Ask the assistant instead"})]}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"paper-list",children:N.map((s,i)=>e.jsx(Z,{paper:s,rank:i+1,highlightQuery:n?l:void 0},s.id))}),e.jsx("div",{ref:K,style:{height:1}}),d.isFetchingNextPage&&e.jsx("div",{style:{padding:"20px 0",textAlign:"center",color:"var(--ink-faint)"},children:"Loading more…"}),!d.hasNextPage&&!d.isFetchingNextPage&&n&&e.jsx("div",{className:"search-results-end",children:P!=null&&P.cap_reached?"End of the top 100 results":"End of results"})]}))]})]})]})};export{Oe as default}; +import{d as X,r as x,A as J,j as e,L as j,i as W}from"./index-B7UoLEbn.js";import{I as U,T as Y,P as Z}from"./components-Cax1Inob.js";import{c as ee}from"./catalog-DcbS_7_L.js";import{t as se,d as ae}from"./colors-COYRNy-F.js";import{u as re,a as te}from"./usePapers-CDuTKuAc.js";import{u as ne}from"./useDebounce-C4Z21BjM.js";import{u as ie}from"./useIntersectionObserver-DOCspj7m.js";import{S as _}from"./skeleton-DLsINbKq.js";import{A as oe,a as ce}from"./alert-B3UHHG00.js";import{u as le}from"./useQuery-DV2f4JpC.js";import{P as de}from"./PaperFeedFilters-CF3OKsFW.js";import{a as me,P as he,b as pe}from"./PaperDateFilter-CGG1OZi6.js";import"./paperQueryKeys-BP2E-0yf.js";import"./LatexTitle-CeC5Gqpu.js";import"./papers-Ctf2uv0o.js";import"./safeExternalHref-CkBrsh84.js";import"./useInfiniteQuery-CoFrg4GN.js";import"./popover-BOnBmrXi.js";const v=360;function ue(a,o){const m=a.toLocaleLowerCase();return o.trim().split(/\s+/).filter(Boolean).reduce((c,t)=>{const l=m.indexOf(t.toLocaleLowerCase());return l>=0&&(c<0||l=0?t+1:o}function fe(a,o){if(a.length<=v)return a;const m=ue(a,o);if(m<0||m0?"…":""}${a.slice(c,t).trim()}${tnew Intl.NumberFormat("en",{notation:a>=1e3?"compact":"standard",maximumFractionDigits:1}).format(a),Oe=()=>{var I,$,T,O,B,H,M,q,G;const[a,o]=X(),m=a.get("framework")||void 0,c=a.get("repository")||void 0,t=!!(m||c),l=a.get("search")||"",[F,C]=x.useState(l),p=ne(F,300),n=!t&&l.trim().length>0;x.useEffect(()=>C(l),[l]),x.useEffect(()=>{if(p===l)return;const s=new URLSearchParams(a);p?s.set("search",p):s.delete("search"),o(s,{replace:!0})},[p]),x.useEffect(()=>{const s=a.get("order_by"),i=new URLSearchParams(a);n&&!["relevance","date_published","citation_count"].includes(s||"")?(i.set("order_by","relevance"),o(i,{replace:!0})):!n&&s==="relevance"&&(i.delete("order_by"),o(i,{replace:!0}))},[n,a,o]);const L=a.get("order_by"),g=L==="citation_count"?"cited":L==="date_published"?"new":n?"relevance":"trending",u=me(a),w=a.get("has_hf_artifacts")==="true",k=!t&&a.get("has_code")==="true",y=(s,i)=>{const h=new URLSearchParams(a);i?h.set(s,i):h.delete(s),o(h)},Q=s=>{y("order_by",s==="cited"?"citation_count":s==="new"?"date_published":s)},b=re({page_size:20,order_by:g==="trending"?"trending":g==="cited"?"citation_count":"date_published",order_dir:"desc",search:t&&p||void 0,start_date:u.startDate,end_date:u.endDate,include_resources:!0,conference:a.get("conference")||void 0,latest_only:a.get("latest_only")!=="false",has_code:k,has_hf_artifacts:w,framework:m,repository:c,enabled:!n}),R=te({q:p.trim(),order_by:g==="cited"?"citation_count":g==="new"?"date_published":"relevance",start_date:u.startDate,end_date:u.endDate,has_code:k,has_hf_artifacts:w,enabled:n}),d=n?R:b,A=le({queryKey:["top-tasks-sidebar"],queryFn:()=>ee.topTasks(8),enabled:!t&&!n,staleTime:10*60*1e3}),N=x.useMemo(()=>{var i;return(((i=d.data)==null?void 0:i.pages.flatMap(h=>h.results))||[]).map(h=>{const S=se(h);return n?{...S,abstract:fe(S.abstract,l)}:S})},[d.data,n,l]),{targetRef:K,isIntersecting:D}=ie({rootMargin:"200px"});x.useEffect(()=>{D&&d.hasNextPage&&!d.isFetchingNextPage&&d.fetchNextPage()},[D,d.hasNextPage,d.isFetchingNextPage]);const f=((T=($=(I=b.data)==null?void 0:I.pages)==null?void 0:$[0])==null?void 0:T.count)??0,r=(H=(B=(O=b.data)==null?void 0:O.pages)==null?void 0:B[0])==null?void 0:H.scope,P=(q=(M=R.data)==null?void 0:M.pages)==null?void 0:q.at(-1),E=m&&d.error instanceof J&&d.error.status===404,V=(r==null?void 0:r.kind)==="framework"?r.framework_name:r==null?void 0:r.repository;return e.jsxs("div",{className:"page",children:[(r==null?void 0:r.kind)==="framework"&&e.jsxs("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:[e.jsx(j,{to:"/",children:"Papers"}),e.jsx("span",{className:"sep",children:"/"}),e.jsx(j,{to:"/frameworks",children:"Frameworks"}),e.jsx("span",{className:"sep",children:"/"}),e.jsx("span",{style:{color:"var(--ink)"},children:r.framework_name})]}),e.jsxs("div",{className:"feed-header",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"feed-title",children:t?e.jsxs(e.Fragment,{children:["Papers implemented by ",e.jsx("em",{children:V||m||c})]}):n?e.jsxs(e.Fragment,{children:["Search results for ",e.jsxs("em",{children:["“",l,"”"]})]}):e.jsxs(e.Fragment,{children:["All ",e.jsx("em",{children:"Papers"})]})}),e.jsx("div",{className:"feed-subtitle",children:t?(r==null?void 0:r.kind)==="framework"?f>0&&`${f.toLocaleString()} papers.`:r!=null&&r.repository?e.jsxs(e.Fragment,{children:["GitHub repository ",e.jsx("strong",{children:r.repository}),". ",f>0&&`${f.toLocaleString()} papers.`]}):"Repository-scoped paper feed.":n?`${N.length} loaded from the most relevant results.`:e.jsxs(e.Fragment,{children:["Search the full corpus. ",f>0&&`${f.toLocaleString()} papers indexed.`]})}),t&&r&&e.jsxs("div",{className:"paper-feed-scope-links",children:[e.jsxs("div",{className:"paper-feed-primary-links",children:[r.github_url&&e.jsxs("a",{href:r.github_url,target:"_blank",rel:"noopener noreferrer",className:r.kind==="framework"?"task-framework-link":"framework-link",children:[e.jsx(U,{name:"github",size:13}),r.kind==="framework"?e.jsxs(e.Fragment,{children:[e.jsx("span",{children:r.repository||"GitHub"}),r.num_stars!=null&&e.jsxs("span",{className:"task-framework-link-stars",children:["★ ",je(r.num_stars)]})]}):"GitHub"]}),r.kind==="framework"&&r.introducing_paper_arxiv_id&&e.jsx(j,{to:`/paper/${r.introducing_paper_arxiv_id}`,className:"framework-link",children:"Introducing paper"})]}),r.kind==="framework"&&r.recommended_tasks&&r.recommended_tasks.length>0&&e.jsx("div",{className:"paper-feed-task-tags",children:r.recommended_tasks.map(s=>s.slug?e.jsx(Y,{slug:s.slug,label:s.name},s.id):null)})]})]}),e.jsx(he,{startDate:u.startDate,endDate:u.endDate,onChange:s=>o(pe(a,s))})]}),e.jsx("div",{className:"papers-search-row",children:e.jsxs("div",{className:"papers-search-input-wrap",children:[e.jsx(U,{name:"search",size:14}),e.jsx("input",{className:"papers-search-input",placeholder:"Search title or abstract…",value:F,onChange:s=>C(s.target.value)})]})}),e.jsxs("div",{className:t||n?"papers-feed-layout-scoped":"layout-with-sidebar",children:[!t&&!n&&e.jsx("aside",{className:"sidebar",children:e.jsxs("div",{className:"sidebar-section",children:[e.jsx("div",{className:"sidebar-label",children:"Top Domains"}),A.isLoading&&e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:Array.from({length:6}).map((s,i)=>e.jsx(_,{className:"h-5 w-full"},i))}),(G=A.data)==null?void 0:G.map(s=>e.jsxs(j,{to:`/tasks/${s.slug}`,className:"sidebar-link",children:[ae(s.name,s.slug),s.paper_count!=null&&e.jsx("span",{className:"count",children:s.paper_count})]},s.id))]})}),e.jsxs("div",{children:[e.jsxs("div",{className:"sort-bar",children:[e.jsxs("div",{className:"paper-feed-toolbar-controls",children:[e.jsx("div",{className:"sort-options",children:(n?ge:xe).map(([s,i])=>e.jsx("button",{className:`sort-btn ${g===s?"active":""}`,onClick:()=>Q(s),children:i},s))}),e.jsx(de,{hasCode:k,hasHfArtifacts:w,onHasCodeChange:s=>y("has_code",s?"true":void 0),onHasHfArtifactsChange:s=>y("has_hf_artifacts",s?"true":void 0),showHasCode:!t})]}),e.jsxs("div",{className:"results-count",children:[N.length," loaded"]})]}),E?e.jsx("div",{className:"no-results",children:"Framework not found."}):d.error&&e.jsx(oe,{variant:"destructive",className:"mb-4",children:e.jsx(ce,{children:"Failed to load papers. Please try again."})}),!E&&(d.isLoading?e.jsx("div",{className:"paper-list",children:Array.from({length:6}).map((s,i)=>e.jsxs("div",{className:"paper-card",children:[e.jsx(_,{className:"h-[220px] w-[160px]"}),e.jsxs("div",{className:"paper-body",style:{flex:1,gap:12},children:[e.jsx(_,{className:"h-6 w-3/4"}),e.jsx(_,{className:"h-4 w-1/2"}),e.jsx(_,{className:"h-12 w-full"})]})]},i))}):N.length===0?e.jsxs("div",{className:"no-results",children:[e.jsx("p",{children:"No matching papers."}),n&&W()&&e.jsx(j,{to:`/chat?q=${encodeURIComponent(l.trim())}`,children:"Ask the assistant instead"})]}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"paper-list",children:N.map((s,i)=>e.jsx(Z,{paper:s,rank:i+1,highlightQuery:n?l:void 0},s.id))}),e.jsx("div",{ref:K,style:{height:1}}),d.isFetchingNextPage&&e.jsx("div",{style:{padding:"20px 0",textAlign:"center",color:"var(--ink-faint)"},children:"Loading more…"}),!d.hasNextPage&&!d.isFetchingNextPage&&n&&e.jsx("div",{className:"search-results-end",children:P!=null&&P.cap_reached?"End of the top 100 results":"End of results"})]}))]})]})]})};export{Oe as default}; diff --git a/assets/PrivacyView-BuZaMRBW.js b/assets/PrivacyView-BVxZN5Ym.js similarity index 99% rename from assets/PrivacyView-BuZaMRBW.js rename to assets/PrivacyView-BVxZN5Ym.js index 59c52a27d7ecc62f9aa83adee9ee38b05c580bda..099144f0d119c4eb2888e88b6024680744d7080d 100644 --- a/assets/PrivacyView-BuZaMRBW.js +++ b/assets/PrivacyView-BVxZN5Ym.js @@ -1 +1 @@ -import{F as s,j as e}from"./index-CkeK0cDg.js";import{f as i,D as r}from"./latexPlainText-DI8YEXVe.js";const n=()=>(s.useEffect(()=>(document.title=i("Privacy Policy"),()=>{document.title=r}),[]),e.jsxs("article",{className:"page legal-page",children:[e.jsxs("header",{className:"legal-header",children:[e.jsx("p",{className:"legal-kicker",children:"Legal"}),e.jsx("h1",{children:"Privacy Policy"}),e.jsx("p",{className:"legal-effective-date",children:"Effective August 11, 2026"})]}),e.jsx("p",{children:"This Privacy Policy explains how Hugging Face, Inc. (“Hugging Face,” “we,” or “us”) collects, uses, and shares information when you use Papers With Code, including its website, research assistant, APIs, and related services (the “Service”)."}),e.jsxs("section",{children:[e.jsx("h2",{children:"1. Information we collect"}),e.jsx("h3",{children:"Information you provide"}),e.jsxs("ul",{children:[e.jsxs("li",{children:[e.jsx("strong",{children:"Account information."})," If you sign in with Hugging Face, we receive account identifiers and profile details needed to authenticate you, such as your user ID, username, and avatar. If you request contributor access, we also receive and retain the verified email address associated with your Hugging Face account so we can review and communicate about your request."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Contributions and preferences."})," We collect information you submit or save, such as paper submissions and edits, bookmarks, display preferences, feedback, and communications with us. Material you submit to a public research page may be publicly visible."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Research assistant content."})," We collect your questions, conversation history, generated answers, citations, tool calls and results, and feedback about answers. Chats are private to your account unless you choose to create a share link; anyone with that link may be able to view the shared chat."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Provider and billing information."})," If you enable a model provider, we process the authorization or API credentials needed to make requests on your behalf. Hugging Face or another provider processes its own billing information under its terms. Papers With Code does not collect your payment-card details."]})]}),e.jsx("h3",{children:"Information collected automatically"}),e.jsx("p",{children:"We collect technical and usage information such as IP address, browser and device type, operating system, pages or features used, dates and times, referring pages, request identifiers, cookies, logs, and diagnostic data. For research-assistant requests, this may include the selected model, token and cost details, latency, errors, and other operational metadata."}),e.jsx("h3",{children:"Research assistant tracing"}),e.jsxs("p",{children:["To evaluate, debug, secure, and improve the research assistant, we use Langfuse to record traces. A trace may contain the complete text of your question and the assistant's answer, as well as tool inputs, tool outputs, retrieved research material, model details, usage data, and related operational metadata.",e.jsx("strong",{children:" This trace content is not redacted before it is sent to Langfuse."})]}),e.jsx("p",{children:"Papers With Code is designed for questions about research literature. Do not put passwords, API keys, confidential information, health or financial data, or other sensitive personal information in research-assistant prompts."})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"2. How we use information"}),e.jsx("p",{children:"We use information to:"}),e.jsxs("ul",{children:[e.jsx("li",{children:"provide, personalize, maintain, and operate the Service;"}),e.jsx("li",{children:"authenticate users and keep accounts and the Service secure;"}),e.jsx("li",{children:"run research-assistant requests and preserve conversation history;"}),e.jsx("li",{children:"measure performance, troubleshoot failures, and improve quality;"}),e.jsx("li",{children:"review contributions, prevent abuse, and enforce applicable terms;"}),e.jsx("li",{children:"communicate with you and respond to requests; and"}),e.jsx("li",{children:"comply with law and protect users, Hugging Face, and the public."})]})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"3. How we share information"}),e.jsx("p",{children:"We may share information in these circumstances:"}),e.jsxs("ul",{children:[e.jsxs("li",{children:[e.jsx("strong",{children:"Service providers."})," Vendors process information for hosting, authentication, analytics, observability, security, and support. These include Hugging Face services, Langfuse for research-assistant tracing, Plausible for website analytics, and infrastructure providers."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Model providers."})," Research-assistant content is sent to the model provider you use, such as Hugging Face Inference Providers or OpenRouter, so it can generate a response. That provider's privacy terms also apply to its processing."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Public and shared content."})," Contributions intended for public pages are public. A chat is disclosed through the Service when you create and distribute a share link."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Legal, safety, and corporate events."})," We may disclose information when reasonably necessary to comply with law, protect rights and safety, investigate abuse, or complete a merger, acquisition, financing, or transfer of assets."]})]}),e.jsx("p",{children:"We do not sell your personal information."})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"4. Cookies and analytics"}),e.jsx("p",{children:"We use cookies and similar storage when needed for sign-in, security, preferences, and operation of the Service. We also use Plausible to understand aggregate website usage. You can control cookies through your browser, but disabling necessary cookies may prevent account features from working."})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"5. Legal bases"}),e.jsx("p",{children:"Where applicable law requires a legal basis, we process information as needed to perform our agreement with you, with your consent, to comply with legal obligations, and for legitimate interests such as operating, securing, and improving the Service. You may withdraw consent where consent is the basis for processing, without affecting earlier processing."})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"6. Retention and deletion"}),e.jsx("p",{children:"Private chats are retained until you delete them, subject to limits of 500 active chats and 100 MB of chat data per user. Archiving hides a chat and frees active-chat quota but does not delete it. You may deliberately share an unlisted snapshot; deleting its private chat removes the durable transcript, workspace reference, and share link after deletion is verified. No dedicated private-chat export format is currently offered."}),e.jsx("p",{children:"We keep information for as long as reasonably needed for the purposes described here, including providing the Service, maintaining security and audit records, resolving disputes, and meeting legal obligations. Retention periods vary by data type and service provider. You can delete individual chats in the Service. Deletion may not immediately remove information from backups, security logs, or third-party systems where limited retention is required."})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"7. Security and international transfers"}),e.jsx("p",{children:"We use reasonable administrative, technical, and organizational safeguards, but no internet service can guarantee absolute security. We and our service providers may process information in the United States and other countries, which may have different data-protection laws from your country. Where required, we use appropriate safeguards for international transfers."})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"8. Your privacy rights"}),e.jsx("p",{children:"Depending on where you live, you may have rights to access, correct, delete, or receive a copy of your personal information; object to or restrict processing; withdraw consent; or appeal a decision about a request. You may also have the right to complain to a data-protection authority. We may need to verify your identity before fulfilling a request."})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"9. Children"}),e.jsx("p",{children:"The Service is not directed to children under 13, and we do not knowingly collect personal information from children under 13. If you believe a child has provided personal information, please contact us."})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"10. Changes to this policy"}),e.jsx("p",{children:"We may update this policy as the Service changes. We will post the revised policy here and update its effective date. If a change is material, we will provide additional notice when appropriate."})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"11. Contact us"}),e.jsxs("p",{children:["For questions or privacy requests, contact"," ",e.jsx("a",{href:"mailto:privacy@huggingface.co",children:"privacy@huggingface.co"}),". Please do not include passwords, API keys, or other sensitive credentials in your message."]})]})]}));export{n as default}; +import{F as s,j as e}from"./index-B7UoLEbn.js";import{f as i,D as r}from"./latexPlainText-DI8YEXVe.js";const n=()=>(s.useEffect(()=>(document.title=i("Privacy Policy"),()=>{document.title=r}),[]),e.jsxs("article",{className:"page legal-page",children:[e.jsxs("header",{className:"legal-header",children:[e.jsx("p",{className:"legal-kicker",children:"Legal"}),e.jsx("h1",{children:"Privacy Policy"}),e.jsx("p",{className:"legal-effective-date",children:"Effective August 11, 2026"})]}),e.jsx("p",{children:"This Privacy Policy explains how Hugging Face, Inc. (“Hugging Face,” “we,” or “us”) collects, uses, and shares information when you use Papers With Code, including its website, research assistant, APIs, and related services (the “Service”)."}),e.jsxs("section",{children:[e.jsx("h2",{children:"1. Information we collect"}),e.jsx("h3",{children:"Information you provide"}),e.jsxs("ul",{children:[e.jsxs("li",{children:[e.jsx("strong",{children:"Account information."})," If you sign in with Hugging Face, we receive account identifiers and profile details needed to authenticate you, such as your user ID, username, and avatar. If you request contributor access, we also receive and retain the verified email address associated with your Hugging Face account so we can review and communicate about your request."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Contributions and preferences."})," We collect information you submit or save, such as paper submissions and edits, bookmarks, display preferences, feedback, and communications with us. Material you submit to a public research page may be publicly visible."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Research assistant content."})," We collect your questions, conversation history, generated answers, citations, tool calls and results, and feedback about answers. Chats are private to your account unless you choose to create a share link; anyone with that link may be able to view the shared chat."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Provider and billing information."})," If you enable a model provider, we process the authorization or API credentials needed to make requests on your behalf. Hugging Face or another provider processes its own billing information under its terms. Papers With Code does not collect your payment-card details."]})]}),e.jsx("h3",{children:"Information collected automatically"}),e.jsx("p",{children:"We collect technical and usage information such as IP address, browser and device type, operating system, pages or features used, dates and times, referring pages, request identifiers, cookies, logs, and diagnostic data. For research-assistant requests, this may include the selected model, token and cost details, latency, errors, and other operational metadata."}),e.jsx("h3",{children:"Research assistant tracing"}),e.jsxs("p",{children:["To evaluate, debug, secure, and improve the research assistant, we use Langfuse to record traces. A trace may contain the complete text of your question and the assistant's answer, as well as tool inputs, tool outputs, retrieved research material, model details, usage data, and related operational metadata.",e.jsx("strong",{children:" This trace content is not redacted before it is sent to Langfuse."})]}),e.jsx("p",{children:"Papers With Code is designed for questions about research literature. Do not put passwords, API keys, confidential information, health or financial data, or other sensitive personal information in research-assistant prompts."})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"2. How we use information"}),e.jsx("p",{children:"We use information to:"}),e.jsxs("ul",{children:[e.jsx("li",{children:"provide, personalize, maintain, and operate the Service;"}),e.jsx("li",{children:"authenticate users and keep accounts and the Service secure;"}),e.jsx("li",{children:"run research-assistant requests and preserve conversation history;"}),e.jsx("li",{children:"measure performance, troubleshoot failures, and improve quality;"}),e.jsx("li",{children:"review contributions, prevent abuse, and enforce applicable terms;"}),e.jsx("li",{children:"communicate with you and respond to requests; and"}),e.jsx("li",{children:"comply with law and protect users, Hugging Face, and the public."})]})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"3. How we share information"}),e.jsx("p",{children:"We may share information in these circumstances:"}),e.jsxs("ul",{children:[e.jsxs("li",{children:[e.jsx("strong",{children:"Service providers."})," Vendors process information for hosting, authentication, analytics, observability, security, and support. These include Hugging Face services, Langfuse for research-assistant tracing, Plausible for website analytics, and infrastructure providers."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Model providers."})," Research-assistant content is sent to the model provider you use, such as Hugging Face Inference Providers or OpenRouter, so it can generate a response. That provider's privacy terms also apply to its processing."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Public and shared content."})," Contributions intended for public pages are public. A chat is disclosed through the Service when you create and distribute a share link."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Legal, safety, and corporate events."})," We may disclose information when reasonably necessary to comply with law, protect rights and safety, investigate abuse, or complete a merger, acquisition, financing, or transfer of assets."]})]}),e.jsx("p",{children:"We do not sell your personal information."})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"4. Cookies and analytics"}),e.jsx("p",{children:"We use cookies and similar storage when needed for sign-in, security, preferences, and operation of the Service. We also use Plausible to understand aggregate website usage. You can control cookies through your browser, but disabling necessary cookies may prevent account features from working."})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"5. Legal bases"}),e.jsx("p",{children:"Where applicable law requires a legal basis, we process information as needed to perform our agreement with you, with your consent, to comply with legal obligations, and for legitimate interests such as operating, securing, and improving the Service. You may withdraw consent where consent is the basis for processing, without affecting earlier processing."})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"6. Retention and deletion"}),e.jsx("p",{children:"Private chats are retained until you delete them, subject to limits of 500 active chats and 100 MB of chat data per user. Archiving hides a chat and frees active-chat quota but does not delete it. You may deliberately share an unlisted snapshot; deleting its private chat removes the durable transcript, workspace reference, and share link after deletion is verified. No dedicated private-chat export format is currently offered."}),e.jsx("p",{children:"We keep information for as long as reasonably needed for the purposes described here, including providing the Service, maintaining security and audit records, resolving disputes, and meeting legal obligations. Retention periods vary by data type and service provider. You can delete individual chats in the Service. Deletion may not immediately remove information from backups, security logs, or third-party systems where limited retention is required."})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"7. Security and international transfers"}),e.jsx("p",{children:"We use reasonable administrative, technical, and organizational safeguards, but no internet service can guarantee absolute security. We and our service providers may process information in the United States and other countries, which may have different data-protection laws from your country. Where required, we use appropriate safeguards for international transfers."})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"8. Your privacy rights"}),e.jsx("p",{children:"Depending on where you live, you may have rights to access, correct, delete, or receive a copy of your personal information; object to or restrict processing; withdraw consent; or appeal a decision about a request. You may also have the right to complain to a data-protection authority. We may need to verify your identity before fulfilling a request."})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"9. Children"}),e.jsx("p",{children:"The Service is not directed to children under 13, and we do not knowingly collect personal information from children under 13. If you believe a child has provided personal information, please contact us."})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"10. Changes to this policy"}),e.jsx("p",{children:"We may update this policy as the Service changes. We will post the revised policy here and update its effective date. If a change is material, we will provide additional notice when appropriate."})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"11. Contact us"}),e.jsxs("p",{children:["For questions or privacy requests, contact"," ",e.jsx("a",{href:"mailto:privacy@huggingface.co",children:"privacy@huggingface.co"}),". Please do not include passwords, API keys, or other sensitive credentials in your message."]})]})]}));export{n as default}; diff --git a/assets/RateLimitsView-vCH7Yezm.js b/assets/RateLimitsView-BsiDpNim.js similarity index 87% rename from assets/RateLimitsView-vCH7Yezm.js rename to assets/RateLimitsView-BsiDpNim.js index 3b9ad4067e1f8a012aab40b327c7a1488771c2d0..5bda530cf97522aedaf14094490cef09b552105c 100644 --- a/assets/RateLimitsView-vCH7Yezm.js +++ b/assets/RateLimitsView-BsiDpNim.js @@ -1 +1 @@ -import{j as e,G as t}from"./index-CkeK0cDg.js";import{u as s}from"./useQuery-_Fj6Jfzr.js";const n=()=>{const i=s({queryKey:["submission-rate-limit-policy"],queryFn:()=>t.getRateLimitPolicy()}).data;return e.jsxs("div",{className:"page",style:{maxWidth:760},children:[e.jsx("h1",{children:"Submission and rate-limit policy"}),i?e.jsxs(e.Fragment,{children:[e.jsxs("p",{children:["Each account may have up to ",i.active_pending," active submissions."]}),e.jsxs("p",{children:["New submissions are limited to ",i.subject_per_hour," per account and ",i.ip_per_hour," per source network in a rolling hour."]})]}):e.jsx("p",{children:"Loading current limits…"}),e.jsx("p",{children:"Duplicate, no-op, and idempotently replayed requests do not consume creation quota."}),e.jsx("p",{children:"Rate-limited responses use HTTP 429 with Retry-After, RateLimit, and RateLimit-Policy headers."}),e.jsx("p",{children:"Good-faith contributors who are blocked should contact the Papers with Code maintainers with their Hugging Face username."})]})};export{n as default}; +import{j as e,G as t}from"./index-B7UoLEbn.js";import{u as s}from"./useQuery-DV2f4JpC.js";const n=()=>{const i=s({queryKey:["submission-rate-limit-policy"],queryFn:()=>t.getRateLimitPolicy()}).data;return e.jsxs("div",{className:"page",style:{maxWidth:760},children:[e.jsx("h1",{children:"Submission and rate-limit policy"}),i?e.jsxs(e.Fragment,{children:[e.jsxs("p",{children:["Each account may have up to ",i.active_pending," active submissions."]}),e.jsxs("p",{children:["New submissions are limited to ",i.subject_per_hour," per account and ",i.ip_per_hour," per source network in a rolling hour."]})]}):e.jsx("p",{children:"Loading current limits…"}),e.jsx("p",{children:"Duplicate, no-op, and idempotently replayed requests do not consume creation quota."}),e.jsx("p",{children:"Rate-limited responses use HTTP 429 with Retry-After, RateLimit, and RateLimit-Policy headers."}),e.jsx("p",{children:"Good-faith contributors who are blocked should contact the Papers with Code maintainers with their Hugging Face username."})]})};export{n as default}; diff --git a/assets/ResearchFollowButton-Dpqj0_yd.js b/assets/ResearchFollowButton-C31U0bn3.js similarity index 89% rename from assets/ResearchFollowButton-Dpqj0_yd.js rename to assets/ResearchFollowButton-C31U0bn3.js index 4621fc769cde2610fe0bcf5d3cea73481a37a819..dc299a6fd20dfe140613b7368d1995de1babbf70 100644 --- a/assets/ResearchFollowButton-Dpqj0_yd.js +++ b/assets/ResearchFollowButton-C31U0bn3.js @@ -1 +1 @@ -import{c as y,ar as F,m as N,r as S,J as L,j as e,Y as v,l as C,L as i}from"./index-CkeK0cDg.js";import{u as G}from"./useQuery-_Fj6Jfzr.js";import{u as k}from"./useMutation-q-fdM2fm.js";import{r as m}from"./research-BfGol3BN.js";import{P as p}from"./plus-BaTMbqcZ.js";const j={task:"Get new papers on this task",method:"Get new papers using this method",benchmark:"Get new results on this benchmark",author:"Get new papers by this author",organization:"Get new papers from this organization"};function R({kind:a,entityId:n}){var f;const l=y(),s=l==null?void 0:l.user,c=F(),h=N(),[x,g]=S.useState(null),u=`${a}:${n}`,d=["research-follows",s==null?void 0:s.hf_subject],r=G({queryKey:d,queryFn:m.follows,enabled:!!s}),o=((f=r.data)==null?void 0:f.some(w=>w.kind===a&&String(w.entity_id)===String(n)))??!1,t=k({mutationFn:()=>m.setFollow(a,n,!o),onSuccess:async()=>{g(o?null:u),await h.invalidateQueries({queryKey:d}),await h.invalidateQueries({queryKey:["research-feed",s==null?void 0:s.hf_subject]})}});if(!l||!s&&L())return null;if(!s)return e.jsxs("div",{className:"research-follow",children:[e.jsxs("a",{className:"research-follow-btn",href:v(c.pathname+c.search),children:[e.jsx(p,{"aria-hidden":"true"}),"Follow"]}),e.jsxs("span",{className:"research-follow-hint",children:["Sign in to ",j[a].toLowerCase(),"."]})]});const b=t.error||r.error;return e.jsxs("div",{className:"research-follow",children:[e.jsx("button",{type:"button",className:o?"research-follow-btn is-following":"research-follow-btn",disabled:r.isLoading||!!r.error||t.isPending,"aria-pressed":o,"aria-label":o?"Unfollow":"Follow",onClick:()=>t.mutate(),children:o?e.jsxs(e.Fragment,{children:[e.jsx(C,{"aria-hidden":"true"}),e.jsx("span",{className:"research-follow-label",children:"Following"}),e.jsx("span",{className:"research-follow-label-hover",children:"Unfollow"})]}):e.jsxs(e.Fragment,{children:[e.jsx(p,{"aria-hidden":"true"}),"Follow"]})}),b?e.jsx("span",{className:"research-follow-hint is-error",role:"alert",children:"Could not update follows. Please try again."}):o?x===u&&e.jsxs("span",{className:"research-follow-hint",role:"status",children:["Added to ",e.jsx(i,{to:"/following",children:"your Following feed"})," · ",e.jsx(i,{to:"/settings",children:"Manage in Settings"})]}):e.jsxs("span",{className:"research-follow-hint",children:[j[a]," in ",e.jsx(i,{to:"/following",children:"your Following feed"}),"."]})]})}export{R}; +import{c as y,ar as F,m as N,r as S,J as L,j as e,Y as v,l as C,L as i}from"./index-B7UoLEbn.js";import{u as G}from"./useQuery-DV2f4JpC.js";import{u as k}from"./useMutation-CuaM6sOT.js";import{r as m}from"./research-D7aSz-AO.js";import{P as p}from"./plus-BvN48Xkz.js";const j={task:"Get new papers on this task",method:"Get new papers using this method",benchmark:"Get new results on this benchmark",author:"Get new papers by this author",organization:"Get new papers from this organization"};function R({kind:a,entityId:n}){var f;const l=y(),s=l==null?void 0:l.user,c=F(),h=N(),[x,g]=S.useState(null),u=`${a}:${n}`,d=["research-follows",s==null?void 0:s.hf_subject],r=G({queryKey:d,queryFn:m.follows,enabled:!!s}),o=((f=r.data)==null?void 0:f.some(w=>w.kind===a&&String(w.entity_id)===String(n)))??!1,t=k({mutationFn:()=>m.setFollow(a,n,!o),onSuccess:async()=>{g(o?null:u),await h.invalidateQueries({queryKey:d}),await h.invalidateQueries({queryKey:["research-feed",s==null?void 0:s.hf_subject]})}});if(!l||!s&&L())return null;if(!s)return e.jsxs("div",{className:"research-follow",children:[e.jsxs("a",{className:"research-follow-btn",href:v(c.pathname+c.search),children:[e.jsx(p,{"aria-hidden":"true"}),"Follow"]}),e.jsxs("span",{className:"research-follow-hint",children:["Sign in to ",j[a].toLowerCase(),"."]})]});const b=t.error||r.error;return e.jsxs("div",{className:"research-follow",children:[e.jsx("button",{type:"button",className:o?"research-follow-btn is-following":"research-follow-btn",disabled:r.isLoading||!!r.error||t.isPending,"aria-pressed":o,"aria-label":o?"Unfollow":"Follow",onClick:()=>t.mutate(),children:o?e.jsxs(e.Fragment,{children:[e.jsx(C,{"aria-hidden":"true"}),e.jsx("span",{className:"research-follow-label",children:"Following"}),e.jsx("span",{className:"research-follow-label-hover",children:"Unfollow"})]}):e.jsxs(e.Fragment,{children:[e.jsx(p,{"aria-hidden":"true"}),"Follow"]})}),b?e.jsx("span",{className:"research-follow-hint is-error",role:"alert",children:"Could not update follows. Please try again."}):o?x===u&&e.jsxs("span",{className:"research-follow-hint",role:"status",children:["Added to ",e.jsx(i,{to:"/following",children:"your Following feed"})," · ",e.jsx(i,{to:"/settings",children:"Manage in Settings"})]}):e.jsxs("span",{className:"research-follow-hint",children:[j[a]," in ",e.jsx(i,{to:"/following",children:"your Following feed"}),"."]})]})}export{R}; diff --git a/assets/SavedPapersView-mfFmqcEo.js b/assets/SavedPapersView-BGMVrPGI.js similarity index 88% rename from assets/SavedPapersView-mfFmqcEo.js rename to assets/SavedPapersView-BGMVrPGI.js index 025b717e5bbe4dc5744b5831f4c9ec53397d57ca..e6da0b78493a1eea62572e2dca0fbc8b1c207508 100644 --- a/assets/SavedPapersView-mfFmqcEo.js +++ b/assets/SavedPapersView-BGMVrPGI.js @@ -1 +1 @@ -import{a as h,A as g,j as e,H as v,L as x,G as j}from"./index-CkeK0cDg.js";import{p as f}from"./paperQueryKeys-BP2E-0yf.js";import{u as N}from"./useQuery-_Fj6Jfzr.js";import{T as b,P as k}from"./components-BRrDI9KS.js";import{S as r}from"./skeleton-Cs8haT1C.js";import{A as y,a as w}from"./alert-Vt5eE6re.js";import{t as A}from"./colors-DQ-VN9If.js";import{s as B}from"./savedPapersAuth-dGFX8cRe.js";import"./LatexTitle-DPYNzv63.js";import"./papers-Celoj8_s.js";import"./safeExternalHref-CkBrsh84.js";const W=()=>{var c,o;const{user:t,isLoading:u}=h(),a=N({queryKey:[...f.feeds.saved],queryFn:()=>j.getBookmarks(),enabled:!!t,staleTime:30*1e3,refetchOnWindowFocus:!1}),n=a.error instanceof g&&a.error.code==="saved_papers_bucket_authorization_required",m=!!a.data&&!a.data.bucket_connected,d=()=>{window.location.assign(B())};return u?e.jsxs("div",{className:"page",children:[e.jsx(r,{className:"h-10 w-1/3 mb-4"}),e.jsx(r,{className:"h-6 w-1/2 mb-8"})]}):t?e.jsxs("div",{className:"page",children:[e.jsx("div",{className:"feed-header",children:e.jsxs("div",{children:[e.jsxs("h1",{className:"feed-title",children:["Saved ",e.jsx("em",{children:"Papers"})]}),e.jsxs("div",{className:"feed-subtitle",children:[(c=a.data)!=null&&c.count?`${a.data.count.toLocaleString()} saved · grouped by domain`:"Your bookmarked papers, grouped by domain.",(o=a.data)!=null&&o.bucket_connected?e.jsxs(e.Fragment,{children:[" · ",e.jsx("a",{href:`https://huggingface.co/buckets/${t.username}/pwc-saved-papers`,target:"_blank",rel:"noopener noreferrer",children:"Open your Hugging Face Bucket"})]}):null]})]})}),n?e.jsxs("div",{className:"saved-bucket-migration",children:[e.jsx("p",{children:"Your saved papers are still safe in Papers With Code. Approve Bucket access to copy them into a private Hugging Face Bucket that belongs to you."}),e.jsx("button",{type:"button",className:"hf-signin-btn",onClick:d,children:"Approve and migrate saved papers"})]}):a.error?e.jsx(y,{variant:"destructive",className:"mb-4",children:e.jsx(w,{children:"Failed to load your saved papers. Please try again."})}):null,m?e.jsxs("div",{className:"saved-bucket-migration",children:[e.jsxs("p",{children:[a.data.count?`Your ${a.data.count.toLocaleString()} saved ${a.data.count===1?"paper is":"papers are"} still available below. `:"When you save your first paper, ","Approve Bucket access to copy saved papers into a private Hugging Face Bucket that belongs to you. The existing data is kept until the copy is verified."]}),e.jsx("button",{type:"button",className:"hf-signin-btn",onClick:d,children:a.data.count?"Approve and migrate saved papers":"Use a Hugging Face Bucket"})]}):null,n||a.error?null:a.isLoading?e.jsx("div",{className:"paper-list",children:Array.from({length:4}).map((i,s)=>e.jsxs("div",{className:"paper-card",children:[e.jsx(r,{className:"h-[220px] w-[160px]"}),e.jsxs("div",{className:"paper-body",style:{flex:1,gap:12},children:[e.jsx(r,{className:"h-6 w-3/4"}),e.jsx(r,{className:"h-4 w-1/2"}),e.jsx(r,{className:"h-12 w-full"})]})]},s))}):!a.data||a.data.count===0?e.jsxs("div",{className:"no-results",children:["No saved papers yet."," ",e.jsx(x,{to:"/papers",className:"sidebar-link",style:{display:"inline"},children:"Browse papers →"})]}):a.data.areas.map(i=>e.jsxs("section",{className:"saved-area-section",children:[e.jsx("h2",{className:"saved-area-heading",children:i.name}),i.tasks.map(s=>{const l=s.papers.length;return e.jsxs("div",{className:"saved-task-block",children:[e.jsxs("div",{className:"saved-task-row",children:[s.slug?e.jsx(b,{slug:s.slug,label:s.name}):e.jsx("span",{className:"tag-chip",style:{background:"var(--surface)"},children:s.name}),e.jsxs("span",{className:"saved-task-count",children:[l," ",l===1?"paper":"papers"]})]}),e.jsx("div",{className:"paper-list",children:s.papers.map(p=>e.jsx(k,{paper:A(p),rank:1},p.id))})]},`task-${i.id??"other"}-${s.id??"untagged"}`)})]},`area-${i.id??"other"}`))]}):e.jsxs("div",{className:"page",children:[e.jsx("div",{className:"feed-header",children:e.jsxs("div",{children:[e.jsxs("h1",{className:"feed-title",children:["Saved ",e.jsx("em",{children:"Papers"})]}),e.jsx("div",{className:"feed-subtitle",children:"Sign in with Hugging Face to save papers and revisit them later."})]})}),e.jsx("div",{className:"saved-signin-panel",children:e.jsx(v,{returnTo:"/saved"})})]})};export{W as default}; +import{a as h,A as g,j as e,H as v,L as x,G as j}from"./index-B7UoLEbn.js";import{p as f}from"./paperQueryKeys-BP2E-0yf.js";import{u as N}from"./useQuery-DV2f4JpC.js";import{T as b,P as k}from"./components-Cax1Inob.js";import{S as r}from"./skeleton-DLsINbKq.js";import{A as y,a as w}from"./alert-B3UHHG00.js";import{t as A}from"./colors-COYRNy-F.js";import{s as B}from"./savedPapersAuth-axHpepOL.js";import"./LatexTitle-CeC5Gqpu.js";import"./papers-Ctf2uv0o.js";import"./safeExternalHref-CkBrsh84.js";const W=()=>{var c,o;const{user:t,isLoading:u}=h(),a=N({queryKey:[...f.feeds.saved],queryFn:()=>j.getBookmarks(),enabled:!!t,staleTime:30*1e3,refetchOnWindowFocus:!1}),n=a.error instanceof g&&a.error.code==="saved_papers_bucket_authorization_required",m=!!a.data&&!a.data.bucket_connected,d=()=>{window.location.assign(B())};return u?e.jsxs("div",{className:"page",children:[e.jsx(r,{className:"h-10 w-1/3 mb-4"}),e.jsx(r,{className:"h-6 w-1/2 mb-8"})]}):t?e.jsxs("div",{className:"page",children:[e.jsx("div",{className:"feed-header",children:e.jsxs("div",{children:[e.jsxs("h1",{className:"feed-title",children:["Saved ",e.jsx("em",{children:"Papers"})]}),e.jsxs("div",{className:"feed-subtitle",children:[(c=a.data)!=null&&c.count?`${a.data.count.toLocaleString()} saved · grouped by domain`:"Your bookmarked papers, grouped by domain.",(o=a.data)!=null&&o.bucket_connected?e.jsxs(e.Fragment,{children:[" · ",e.jsx("a",{href:`https://huggingface.co/buckets/${t.username}/pwc-saved-papers`,target:"_blank",rel:"noopener noreferrer",children:"Open your Hugging Face Bucket"})]}):null]})]})}),n?e.jsxs("div",{className:"saved-bucket-migration",children:[e.jsx("p",{children:"Your saved papers are still safe in Papers With Code. Approve Bucket access to copy them into a private Hugging Face Bucket that belongs to you."}),e.jsx("button",{type:"button",className:"hf-signin-btn",onClick:d,children:"Approve and migrate saved papers"})]}):a.error?e.jsx(y,{variant:"destructive",className:"mb-4",children:e.jsx(w,{children:"Failed to load your saved papers. Please try again."})}):null,m?e.jsxs("div",{className:"saved-bucket-migration",children:[e.jsxs("p",{children:[a.data.count?`Your ${a.data.count.toLocaleString()} saved ${a.data.count===1?"paper is":"papers are"} still available below. `:"When you save your first paper, ","Approve Bucket access to copy saved papers into a private Hugging Face Bucket that belongs to you. The existing data is kept until the copy is verified."]}),e.jsx("button",{type:"button",className:"hf-signin-btn",onClick:d,children:a.data.count?"Approve and migrate saved papers":"Use a Hugging Face Bucket"})]}):null,n||a.error?null:a.isLoading?e.jsx("div",{className:"paper-list",children:Array.from({length:4}).map((i,s)=>e.jsxs("div",{className:"paper-card",children:[e.jsx(r,{className:"h-[220px] w-[160px]"}),e.jsxs("div",{className:"paper-body",style:{flex:1,gap:12},children:[e.jsx(r,{className:"h-6 w-3/4"}),e.jsx(r,{className:"h-4 w-1/2"}),e.jsx(r,{className:"h-12 w-full"})]})]},s))}):!a.data||a.data.count===0?e.jsxs("div",{className:"no-results",children:["No saved papers yet."," ",e.jsx(x,{to:"/papers",className:"sidebar-link",style:{display:"inline"},children:"Browse papers →"})]}):a.data.areas.map(i=>e.jsxs("section",{className:"saved-area-section",children:[e.jsx("h2",{className:"saved-area-heading",children:i.name}),i.tasks.map(s=>{const l=s.papers.length;return e.jsxs("div",{className:"saved-task-block",children:[e.jsxs("div",{className:"saved-task-row",children:[s.slug?e.jsx(b,{slug:s.slug,label:s.name}):e.jsx("span",{className:"tag-chip",style:{background:"var(--surface)"},children:s.name}),e.jsxs("span",{className:"saved-task-count",children:[l," ",l===1?"paper":"papers"]})]}),e.jsx("div",{className:"paper-list",children:s.papers.map(p=>e.jsx(k,{paper:A(p),rank:1},p.id))})]},`task-${i.id??"other"}-${s.id??"untagged"}`)})]},`area-${i.id??"other"}`))]}):e.jsxs("div",{className:"page",children:[e.jsx("div",{className:"feed-header",children:e.jsxs("div",{children:[e.jsxs("h1",{className:"feed-title",children:["Saved ",e.jsx("em",{children:"Papers"})]}),e.jsx("div",{className:"feed-subtitle",children:"Sign in with Hugging Face to save papers and revisit them later."})]})}),e.jsx("div",{className:"saved-signin-panel",children:e.jsx(v,{returnTo:"/saved"})})]})};export{W as default}; diff --git a/assets/SearchOverlay-D30M3sCW.js b/assets/SearchOverlay-D6omh4TK.js similarity index 93% rename from assets/SearchOverlay-D30M3sCW.js rename to assets/SearchOverlay-D6omh4TK.js index fd2c4edfc56ae0fbcfa3a08c2200304e0fe6456b..bf860797734e9af1855c2ce9c7db32283a423764 100644 --- a/assets/SearchOverlay-D30M3sCW.js +++ b/assets/SearchOverlay-D6omh4TK.js @@ -1 +1 @@ -import{r as C,b as Q,F as S,i as D,j as e}from"./index-CkeK0cDg.js";import{p as K}from"./paperQueryKeys-BP2E-0yf.js";import{u}from"./useQuery-_Fj6Jfzr.js";import{L as $}from"./LatexTitle-DPYNzv63.js";import{c as j}from"./catalog-DGg7xZLW.js";import{p as L}from"./papers-Celoj8_s.js";import{u as M}from"./useDebounce-BX_reoqD.js";import{c as I,h as z,d as B}from"./colors-DQ-VN9If.js";const H=10,O=350,y=3,ss=({open:t,onClose:i})=>{var E,F,q,w;const v=C.useRef(null),T=Q(),[r,A]=S.useState(""),a=M(r,O),p=r.trim(),c=a.length>=y,x=D();C.useEffect(()=>{var n;if(!t)return;(n=v.current)==null||n.focus();const s=g=>{g.key==="Escape"&&(g.preventDefault(),g.stopPropagation(),i())};return window.addEventListener("keydown",s,!0),()=>window.removeEventListener("keydown",s,!0)},[t,i]);const f=u({queryKey:[...K.feeds.searchOverlay,a],queryFn:()=>L.search(a,1,H),enabled:t&&c,staleTime:6e4,retry:!1}),k=u({queryKey:["search-tasks",a],queryFn:()=>j.listTasks({q:a,page_size:6}),enabled:t&&c,staleTime:6e4,retry:!1}),N=u({queryKey:["search-methods",a],queryFn:()=>j.listMethods({q:a,page_size:6}),enabled:t&&c,staleTime:6e4,retry:!1}),b=u({queryKey:["search-benchmarks",a],queryFn:()=>j.listDatasets({q:a,page_size:6}),enabled:t&&c,staleTime:6e4,retry:!1});if(!t)return null;const o=((E=k.data)==null?void 0:E.results)||[],h=((F=N.data)==null?void 0:F.results)||[],d=((q=b.data)==null?void 0:q.results)||[],m=((w=f.data)==null?void 0:w.results)||[],P=f.isFetching||k.isFetching||N.isFetching||b.isFetching,R=o.length||m.length||h.length||d.length,l=s=>{i(),T(s)},_=()=>{const s=r.trim();s&&l(`/chat?q=${encodeURIComponent(s)}`)};return e.jsx("div",{className:"search-overlay",onClick:i,children:e.jsxs("div",{className:"search-modal",onClick:s=>s.stopPropagation(),children:[e.jsx("input",{ref:v,className:"search-modal-input",placeholder:"Search papers, tasks, methods, or benchmarks…",value:r,onChange:s=>A(s.target.value),onKeyDown:s=>{x&&s.key==="Enter"&&(s.preventDefault(),_())}}),e.jsxs("div",{className:"search-results",children:[x&&r.trim()&&e.jsxs("button",{type:"button",className:"search-ask-row",onClick:_,children:[e.jsx("span",{className:"search-ask-chip",children:"assistant"}),e.jsxs("span",{className:"search-ask-text",children:["Ask: “",r.trim(),"”"]}),e.jsx("kbd",{children:"↵"})]}),!a&&e.jsxs("div",{className:"search-empty",children:["Try “diffusion”, “object detection”, or an arXiv id.",x&&e.jsx("span",{className:"search-empty-sub",children:"Press Enter to ask the assistant"})]}),a&&!c&&e.jsxs("div",{className:"search-empty",children:["Keep typing: results appear from ",y," characters."]}),c&&!P&&!R&&e.jsxs("div",{className:"search-empty",children:['No matches for "',r,'"']}),o.length>0&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"search-section-label",children:["Tasks · ",o.length]}),o.map(s=>{const n=I(z(s.slug||""));return e.jsxs("div",{className:"search-result-tag",onClick:()=>l(`/tasks/${s.slug}`),children:[e.jsx("span",{className:"dot",style:{width:6,height:6,borderRadius:"50%",background:n.dot}}),e.jsx("span",{className:"name",children:B(s.name,s.slug)}),s.paper_count!=null&&e.jsxs("span",{className:"count",children:[s.paper_count," papers"]})]},s.id)})]}),h.length>0&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"search-section-label",children:["Methods · ",h.length]}),h.map(s=>e.jsxs("div",{className:"search-result-tag",onClick:()=>l(`/methods/${s.slug||s.id}`),children:[e.jsx("span",{style:{fontFamily:"var(--mono)",fontWeight:600},children:s.name}),s.paper_count!=null&&e.jsxs("span",{className:"count",children:[s.paper_count," papers"]})]},s.id))]}),d.length>0&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"search-section-label",children:["Benchmarks · ",d.length]}),d.map(s=>e.jsxs("div",{className:"search-result-tag",onClick:()=>l(`/benchmark/${s.slug||s.id}`),children:[e.jsx("span",{className:"name",children:s.name}),s.paper_count!=null&&s.paper_count>0&&e.jsxs("span",{className:"count",children:[s.paper_count," entries"]})]},s.id))]}),m.length>0&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"search-section-label",children:["Papers · ",m.length]}),m.map(s=>{var n;return e.jsxs("div",{className:"search-result",onClick:()=>l(`/paper/${s.arxiv_id||s.id}`),children:[e.jsx("div",{className:"search-result-title",children:e.jsx($,{title:s.title})}),e.jsxs("div",{className:"search-result-meta",children:[e.jsx("span",{children:s.arxiv_id?`arXiv:${s.arxiv_id}`:"External resource"}),((n=s.authors)==null?void 0:n[0])&&e.jsxs(e.Fragment,{children:[e.jsx("span",{children:"·"}),e.jsxs("span",{children:[s.authors[0],s.authors.length>1?" et al.":""]})]}),s.citation_count!=null&&e.jsxs(e.Fragment,{children:[e.jsx("span",{children:"·"}),e.jsxs("span",{children:["↑ ",s.citation_count.toLocaleString()]})]})]})]},s.id)})]}),p.length>=y&&e.jsxs("button",{type:"button",className:"search-view-all-row",onClick:()=>l(`/papers?search=${encodeURIComponent(p)}`),children:["View all paper results for “",p,"”"]})]})]})})};export{ss as default}; +import{r as C,b as Q,F as S,i as D,j as e}from"./index-B7UoLEbn.js";import{p as K}from"./paperQueryKeys-BP2E-0yf.js";import{u}from"./useQuery-DV2f4JpC.js";import{L as $}from"./LatexTitle-CeC5Gqpu.js";import{c as j}from"./catalog-DcbS_7_L.js";import{p as L}from"./papers-Ctf2uv0o.js";import{u as M}from"./useDebounce-C4Z21BjM.js";import{c as I,h as z,d as B}from"./colors-COYRNy-F.js";const H=10,O=350,y=3,ss=({open:t,onClose:i})=>{var E,F,q,w;const v=C.useRef(null),T=Q(),[r,A]=S.useState(""),a=M(r,O),p=r.trim(),c=a.length>=y,x=D();C.useEffect(()=>{var n;if(!t)return;(n=v.current)==null||n.focus();const s=g=>{g.key==="Escape"&&(g.preventDefault(),g.stopPropagation(),i())};return window.addEventListener("keydown",s,!0),()=>window.removeEventListener("keydown",s,!0)},[t,i]);const f=u({queryKey:[...K.feeds.searchOverlay,a],queryFn:()=>L.search(a,1,H),enabled:t&&c,staleTime:6e4,retry:!1}),k=u({queryKey:["search-tasks",a],queryFn:()=>j.listTasks({q:a,page_size:6}),enabled:t&&c,staleTime:6e4,retry:!1}),N=u({queryKey:["search-methods",a],queryFn:()=>j.listMethods({q:a,page_size:6}),enabled:t&&c,staleTime:6e4,retry:!1}),b=u({queryKey:["search-benchmarks",a],queryFn:()=>j.listDatasets({q:a,page_size:6}),enabled:t&&c,staleTime:6e4,retry:!1});if(!t)return null;const o=((E=k.data)==null?void 0:E.results)||[],h=((F=N.data)==null?void 0:F.results)||[],d=((q=b.data)==null?void 0:q.results)||[],m=((w=f.data)==null?void 0:w.results)||[],P=f.isFetching||k.isFetching||N.isFetching||b.isFetching,R=o.length||m.length||h.length||d.length,l=s=>{i(),T(s)},_=()=>{const s=r.trim();s&&l(`/chat?q=${encodeURIComponent(s)}`)};return e.jsx("div",{className:"search-overlay",onClick:i,children:e.jsxs("div",{className:"search-modal",onClick:s=>s.stopPropagation(),children:[e.jsx("input",{ref:v,className:"search-modal-input",placeholder:"Search papers, tasks, methods, or benchmarks…",value:r,onChange:s=>A(s.target.value),onKeyDown:s=>{x&&s.key==="Enter"&&(s.preventDefault(),_())}}),e.jsxs("div",{className:"search-results",children:[x&&r.trim()&&e.jsxs("button",{type:"button",className:"search-ask-row",onClick:_,children:[e.jsx("span",{className:"search-ask-chip",children:"assistant"}),e.jsxs("span",{className:"search-ask-text",children:["Ask: “",r.trim(),"”"]}),e.jsx("kbd",{children:"↵"})]}),!a&&e.jsxs("div",{className:"search-empty",children:["Try “diffusion”, “object detection”, or an arXiv id.",x&&e.jsx("span",{className:"search-empty-sub",children:"Press Enter to ask the assistant"})]}),a&&!c&&e.jsxs("div",{className:"search-empty",children:["Keep typing: results appear from ",y," characters."]}),c&&!P&&!R&&e.jsxs("div",{className:"search-empty",children:['No matches for "',r,'"']}),o.length>0&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"search-section-label",children:["Tasks · ",o.length]}),o.map(s=>{const n=I(z(s.slug||""));return e.jsxs("div",{className:"search-result-tag",onClick:()=>l(`/tasks/${s.slug}`),children:[e.jsx("span",{className:"dot",style:{width:6,height:6,borderRadius:"50%",background:n.dot}}),e.jsx("span",{className:"name",children:B(s.name,s.slug)}),s.paper_count!=null&&e.jsxs("span",{className:"count",children:[s.paper_count," papers"]})]},s.id)})]}),h.length>0&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"search-section-label",children:["Methods · ",h.length]}),h.map(s=>e.jsxs("div",{className:"search-result-tag",onClick:()=>l(`/methods/${s.slug||s.id}`),children:[e.jsx("span",{style:{fontFamily:"var(--mono)",fontWeight:600},children:s.name}),s.paper_count!=null&&e.jsxs("span",{className:"count",children:[s.paper_count," papers"]})]},s.id))]}),d.length>0&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"search-section-label",children:["Benchmarks · ",d.length]}),d.map(s=>e.jsxs("div",{className:"search-result-tag",onClick:()=>l(`/benchmark/${s.slug||s.id}`),children:[e.jsx("span",{className:"name",children:s.name}),s.paper_count!=null&&s.paper_count>0&&e.jsxs("span",{className:"count",children:[s.paper_count," entries"]})]},s.id))]}),m.length>0&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"search-section-label",children:["Papers · ",m.length]}),m.map(s=>{var n;return e.jsxs("div",{className:"search-result",onClick:()=>l(`/paper/${s.arxiv_id||s.id}`),children:[e.jsx("div",{className:"search-result-title",children:e.jsx($,{title:s.title})}),e.jsxs("div",{className:"search-result-meta",children:[e.jsx("span",{children:s.arxiv_id?`arXiv:${s.arxiv_id}`:"External resource"}),((n=s.authors)==null?void 0:n[0])&&e.jsxs(e.Fragment,{children:[e.jsx("span",{children:"·"}),e.jsxs("span",{children:[s.authors[0],s.authors.length>1?" et al.":""]})]}),s.citation_count!=null&&e.jsxs(e.Fragment,{children:[e.jsx("span",{children:"·"}),e.jsxs("span",{children:["↑ ",s.citation_count.toLocaleString()]})]})]})]},s.id)})]}),p.length>=y&&e.jsxs("button",{type:"button",className:"search-view-all-row",onClick:()=>l(`/papers?search=${encodeURIComponent(p)}`),children:["View all paper results for “",p,"”"]})]})]})})};export{ss as default}; diff --git a/assets/SettingsView-CNX_Ys8s.js b/assets/SettingsView-kMZuD2XF.js similarity index 97% rename from assets/SettingsView-CNX_Ys8s.js rename to assets/SettingsView-kMZuD2XF.js index 328d61f97312946b11757faa3a9421fefd791ff7..ca7bd6a93a738a7b04d984da5fa9b9360ed34526 100644 --- a/assets/SettingsView-CNX_Ys8s.js +++ b/assets/SettingsView-kMZuD2XF.js @@ -1,4 +1,4 @@ -import{g as I,a as B,m as Y,j as e,L as Q,H as w,Y as le,r as re,k as oe,as as ce,i as de,F as k,A as ee}from"./index-CkeK0cDg.js";import{u as P}from"./useQuery-_Fj6Jfzr.js";import{u as N}from"./useMutation-q-fdM2fm.js";import{r as O}from"./research-BfGol3BN.js";import{S as H}from"./switch-DlTd3dHA.js";import{A as he,T as ue}from"./trophy-B-BD7RmH.js";import{M as ge,L as me,F as pe,B as xe}from"./mail-0F33Vm5v.js";import{c as v}from"./chat-Cvg-XEh-.js";import{f as je,D as be}from"./latexPlainText-DI8YEXVe.js";import{a as ye,u as fe,r as ve,O as U}from"./openrouter-DC0iPeja.js";import{E as J}from"./external-link-E5LiqyOi.js";import"./index-DVmlmU_7.js";/** +import{g as I,a as B,m as Y,j as e,L as Q,H as w,Y as le,r as re,k as oe,as as ce,i as de,F as k,A as ee}from"./index-B7UoLEbn.js";import{u as P}from"./useQuery-DV2f4JpC.js";import{u as N}from"./useMutation-CuaM6sOT.js";import{r as O}from"./research-D7aSz-AO.js";import{S as H}from"./switch-Dard85vE.js";import{A as he,T as ue}from"./trophy-Dv8UTCAs.js";import{M as ge,L as me,F as pe,B as xe}from"./mail-BWFd7V0v.js";import{c as v}from"./chat-B6IGPjTl.js";import{f as je,D as be}from"./latexPlainText-DI8YEXVe.js";import{a as ye,u as fe,r as ve,O as U}from"./openrouter-Drl-aaDJ.js";import{E as J}from"./external-link-mpf7SsAF.js";import"./index-C0YS4OFr.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/SharedChatView-BPiynfM9.js b/assets/SharedChatView-2Rg43kIf.js similarity index 83% rename from assets/SharedChatView-BPiynfM9.js rename to assets/SharedChatView-2Rg43kIf.js index b12df0b6b9416d48d0358f5fe82dc07ef5df2688..03a1e30776a4ee4c7b4e3f9c57ca01fd14b1aad7 100644 --- a/assets/SharedChatView-BPiynfM9.js +++ b/assets/SharedChatView-2Rg43kIf.js @@ -1 +1 @@ -import{u as f,b as x,r as h,j as e,f as g}from"./index-CkeK0cDg.js";import{u as v}from"./useQuery-_Fj6Jfzr.js";import{A as j,a as b,C as y,U as S,b as k}from"./ArtifactWorkspace-CRRWXbww.js";import{C as m,d as w,p as N,q as C,g as q}from"./chatLaunch-NPBTDHUP.js";/* empty css */import"./hover-card-CAN3Vtea.js";import"./github-BxRJHxJc.js";import"./github-DHpXYWrC.js";import"./catalog-DGg7xZLW.js";import"./PaperPreviewLink-CQ27hqZy.js";import"./index-B1_S53Hb.js";import"./index-DqQiSNg1.js";import"./katex-DkKDou_j.js";import"./paperQueryKeys-BP2E-0yf.js";import"./papers-Celoj8_s.js";import"./useMutation-q-fdM2fm.js";import"./chat-Cvg-XEh-.js";import"./copy-BEe19JmS.js";import"./file-text-2FXER-SZ.js";import"./external-link-E5LiqyOi.js";import"./chevron-down-CcbfCW-U.js";const _=({detail:i})=>{const[d,l]=h.useState(()=>N(i)),p=h.useMemo(()=>{const t={};for(const c of d)for(const n of c.blocks??[])if(n.kind==="tool")for(const r of n.results??[])t[r.route_id]=r;return t},[d]),u=(t,c)=>{l(n=>n.map(r=>{var a;return r.id!==t?r:{...r,blocks:(a=r.blocks)==null?void 0:a.map((s,o)=>o===c&&(s.kind==="reasoning"||s.kind==="tool")?{...s,open:!s.open}:s)}}))};return e.jsx("div",{className:"shared-chat-transcript",children:d.map(t=>t.role==="user"?e.jsx(S,{id:t.id,text:t.text??"",paperMentions:t.paperMentions??[],paperSelection:t.paperSelection},t.id):e.jsx(k,{msg:t,papers:p,onToggleBlock:u},t.id))})},D=()=>{const{shareId:i=""}=f(),d=x(),l=g(),[p,u]=h.useState(60),t=v({queryKey:["shared-chat",i],queryFn:()=>q(i),retry:(r,a)=>!(a instanceof m&&a.status===404)&&r<1});h.useEffect(()=>{const r=document.title,a=document.head.querySelector('meta[name="robots"]'),s=a==null?void 0:a.content,o=a??document.createElement("meta");return o.name="robots",o.content="noindex,nofollow",a||document.head.appendChild(o),document.title="Shared conversation",()=>{document.title=r,a?a.content=s??"":o.remove()}},[]),h.useLayoutEffect(()=>{const r=document.querySelector(".app-header");if(!r)return;const a=()=>u(r.offsetHeight);a();const s=new ResizeObserver(a);return s.observe(r),()=>s.disconnect()},[]);const c=r=>{C(r,void 0,{autoSend:!1}),d("/chat")},n=t.error instanceof m&&t.error.status===404;return t.isLoading?e.jsxs("div",{className:"shared-chat-state",role:"status",children:[e.jsx(w,{})," Loading shared conversation…"]}):n?e.jsxs("div",{className:"shared-chat-state shared-chat-not-found",children:[e.jsx("h1",{children:"Shared conversation not found"}),e.jsx("p",{children:"This link is invalid or is no longer available."})]}):t.isError||!t.data?e.jsxs("div",{className:"shared-chat-state",role:"alert",children:[e.jsx("h1",{children:"Couldn’t load this conversation"}),e.jsx("p",{children:"Please check your connection and try again."}),e.jsx("button",{type:"button",onClick:()=>void t.refetch(),children:"Try again"})]}):e.jsx(j,{workspaceKey:`share:${i}:${t.data.updated_at}`,autoOpenOnMount:!0,children:e.jsxs("div",{className:"shared-chat-page",style:{height:`calc(100dvh - ${p}px)`},children:[e.jsxs("div",{className:"shared-chat-heading",children:[e.jsx("h1",{children:"Shared conversation"}),l&&e.jsx("span",{className:"chat-staging-badge",children:"Staging"})]}),e.jsx(b,{variant:"shared",children:e.jsxs("div",{className:"shared-chat-content","data-testid":"shared-conversation-pane",children:[e.jsx(_,{detail:t.data},t.data.updated_at),t.data.model_label&&e.jsxs("div",{className:"shared-chat-attribution",children:[e.jsxs("span",{children:["Generated with ",t.data.model_label]}),t.data.model_provider==="huggingface"&&e.jsxs("span",{children:["Powered by ",e.jsx("span",{"aria-hidden":"true",children:"🤗"})," ",e.jsx("a",{href:"https://huggingface.co/docs/inference-providers/en/index",target:"_blank",rel:"noreferrer",children:"Inference Providers"})]}),t.data.model_provider==="openrouter"&&e.jsxs("span",{children:["Powered by ",e.jsx("a",{href:"https://openrouter.ai",target:"_blank",rel:"noreferrer",children:"OpenRouter"})]}),t.data.model_provider==="openai"&&e.jsx("span",{children:"Powered by OpenAI"})]}),e.jsxs("section",{className:"shared-chat-fresh","aria-labelledby":"shared-chat-fresh-title",children:[e.jsx("h2",{id:"shared-chat-fresh-title",children:"Start a new conversation"}),e.jsx("p",{children:"Your new question starts with an empty context."}),l&&e.jsxs("div",{className:"shared-chat-access-note",role:"note",children:[e.jsx("strong",{children:"Limited staging preview."})," Starting a chat is available only to approved Hugging Face users."]}),e.jsx(y,{onSend:r=>c(r.text),placeholder:"Ask a new research question…"})]})]})})]})})};export{D as default}; +import{u as f,b as x,r as h,j as e,f as g}from"./index-B7UoLEbn.js";import{u as v}from"./useQuery-DV2f4JpC.js";import{A as j,a as b,C as y,U as S,b as k}from"./ArtifactWorkspace-B1pVTYNC.js";import{C as m,d as w,p as N,q as C,g as q}from"./chatLaunch-BG1GqDpR.js";/* empty css */import"./hover-card-BM8a6wEE.js";import"./github-uiOp6-cP.js";import"./github-CVI7-Ls5.js";import"./catalog-DcbS_7_L.js";import"./PaperPreviewLink-C5ianbW8.js";import"./index-tHVWANW1.js";import"./index-ClEBI70O.js";import"./katex-DkKDou_j.js";import"./paperQueryKeys-BP2E-0yf.js";import"./papers-Ctf2uv0o.js";import"./useMutation-CuaM6sOT.js";import"./chat-B6IGPjTl.js";import"./copy-B2Q-ksVe.js";import"./file-text-CXhRvAOE.js";import"./external-link-mpf7SsAF.js";import"./chevron-down-CF7sS93G.js";const _=({detail:i})=>{const[d,l]=h.useState(()=>N(i)),p=h.useMemo(()=>{const t={};for(const c of d)for(const n of c.blocks??[])if(n.kind==="tool")for(const r of n.results??[])t[r.route_id]=r;return t},[d]),u=(t,c)=>{l(n=>n.map(r=>{var a;return r.id!==t?r:{...r,blocks:(a=r.blocks)==null?void 0:a.map((s,o)=>o===c&&(s.kind==="reasoning"||s.kind==="tool")?{...s,open:!s.open}:s)}}))};return e.jsx("div",{className:"shared-chat-transcript",children:d.map(t=>t.role==="user"?e.jsx(S,{id:t.id,text:t.text??"",paperMentions:t.paperMentions??[],paperSelection:t.paperSelection},t.id):e.jsx(k,{msg:t,papers:p,onToggleBlock:u},t.id))})},D=()=>{const{shareId:i=""}=f(),d=x(),l=g(),[p,u]=h.useState(60),t=v({queryKey:["shared-chat",i],queryFn:()=>q(i),retry:(r,a)=>!(a instanceof m&&a.status===404)&&r<1});h.useEffect(()=>{const r=document.title,a=document.head.querySelector('meta[name="robots"]'),s=a==null?void 0:a.content,o=a??document.createElement("meta");return o.name="robots",o.content="noindex,nofollow",a||document.head.appendChild(o),document.title="Shared conversation",()=>{document.title=r,a?a.content=s??"":o.remove()}},[]),h.useLayoutEffect(()=>{const r=document.querySelector(".app-header");if(!r)return;const a=()=>u(r.offsetHeight);a();const s=new ResizeObserver(a);return s.observe(r),()=>s.disconnect()},[]);const c=r=>{C(r,void 0,{autoSend:!1}),d("/chat")},n=t.error instanceof m&&t.error.status===404;return t.isLoading?e.jsxs("div",{className:"shared-chat-state",role:"status",children:[e.jsx(w,{})," Loading shared conversation…"]}):n?e.jsxs("div",{className:"shared-chat-state shared-chat-not-found",children:[e.jsx("h1",{children:"Shared conversation not found"}),e.jsx("p",{children:"This link is invalid or is no longer available."})]}):t.isError||!t.data?e.jsxs("div",{className:"shared-chat-state",role:"alert",children:[e.jsx("h1",{children:"Couldn’t load this conversation"}),e.jsx("p",{children:"Please check your connection and try again."}),e.jsx("button",{type:"button",onClick:()=>void t.refetch(),children:"Try again"})]}):e.jsx(j,{workspaceKey:`share:${i}:${t.data.updated_at}`,autoOpenOnMount:!0,children:e.jsxs("div",{className:"shared-chat-page",style:{height:`calc(100dvh - ${p}px)`},children:[e.jsxs("div",{className:"shared-chat-heading",children:[e.jsx("h1",{children:"Shared conversation"}),l&&e.jsx("span",{className:"chat-staging-badge",children:"Staging"})]}),e.jsx(b,{variant:"shared",children:e.jsxs("div",{className:"shared-chat-content","data-testid":"shared-conversation-pane",children:[e.jsx(_,{detail:t.data},t.data.updated_at),t.data.model_label&&e.jsxs("div",{className:"shared-chat-attribution",children:[e.jsxs("span",{children:["Generated with ",t.data.model_label]}),t.data.model_provider==="huggingface"&&e.jsxs("span",{children:["Powered by ",e.jsx("span",{"aria-hidden":"true",children:"🤗"})," ",e.jsx("a",{href:"https://huggingface.co/docs/inference-providers/en/index",target:"_blank",rel:"noreferrer",children:"Inference Providers"})]}),t.data.model_provider==="openrouter"&&e.jsxs("span",{children:["Powered by ",e.jsx("a",{href:"https://openrouter.ai",target:"_blank",rel:"noreferrer",children:"OpenRouter"})]}),t.data.model_provider==="openai"&&e.jsx("span",{children:"Powered by OpenAI"})]}),e.jsxs("section",{className:"shared-chat-fresh","aria-labelledby":"shared-chat-fresh-title",children:[e.jsx("h2",{id:"shared-chat-fresh-title",children:"Start a new conversation"}),e.jsx("p",{children:"Your new question starts with an empty context."}),l&&e.jsxs("div",{className:"shared-chat-access-note",role:"note",children:[e.jsx("strong",{children:"Limited staging preview."})," Starting a chat is available only to approved Hugging Face users."]}),e.jsx(y,{onSend:r=>c(r.text),placeholder:"Ask a new research question…"})]})]})})]})})};export{D as default}; diff --git a/assets/SignInToEditDialog-CmfnGty-.js b/assets/SignInToEditDialog-BzeqSUHr.js similarity index 95% rename from assets/SignInToEditDialog-CmfnGty-.js rename to assets/SignInToEditDialog-BzeqSUHr.js index 1f26ea7f8409871327cabecccf91522fea31cbbb..6d5da2c8d11524dadcecd4999bf06db9020f8686 100644 --- a/assets/SignInToEditDialog-CmfnGty-.js +++ b/assets/SignInToEditDialog-BzeqSUHr.js @@ -1,4 +1,4 @@ -import{g as be,r as a,j as e,a5 as je,x as fe,a6 as ye,h as Ne,o as we,X as Se,l as _e,H as ke}from"./index-CkeK0cDg.js";import{B as P}from"./button-CsUrN-GU.js";import{I as u}from"./input-Cnu30n0B.js";import{T as Ce}from"./textarea-BsaJyP0o.js";import{S as se}from"./searchable-select-DT-5KDJe.js";import{D as ie,a as oe,b as le,c as ce,d as de,e as De}from"./dialog-CGH-CTnE.js";import{u as Ie}from"./useMutation-q-fdM2fm.js";import{s as b,p as j}from"./submissions-C-uglc0y.js";import{c as te}from"./catalog-DGg7xZLW.js";import{L as Ee}from"./loader-circle-CTuL2Xdc.js";/** +import{g as be,r as a,j as e,a5 as je,x as fe,a6 as ye,h as Ne,o as we,X as Se,l as _e,H as ke}from"./index-B7UoLEbn.js";import{B as P}from"./button-D543yAN8.js";import{I as u}from"./input-hdt3aF12.js";import{T as Ce}from"./textarea-CpxVQZTZ.js";import{S as se}from"./searchable-select-CceG4fY6.js";import{D as ie,a as oe,b as le,c as ce,d as de,e as De}from"./dialog-BECDhHRn.js";import{u as Ie}from"./useMutation-CuaM6sOT.js";import{s as b,p as j}from"./submissions-BTKMKNWZ.js";import{c as te}from"./catalog-DcbS_7_L.js";import{L as Ee}from"./loader-circle-hbMX20oF.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/StagingAccessRequestView-DbFH2yKq.js b/assets/StagingAccessRequestView-Bjz7RlyX.js similarity index 95% rename from assets/StagingAccessRequestView-DbFH2yKq.js rename to assets/StagingAccessRequestView-Bjz7RlyX.js index ed703b201c1414759650e295d7a1ca68e161ca44..f2f49fece894739f89776e45fc585e5867576b8c 100644 --- a/assets/StagingAccessRequestView-DbFH2yKq.js +++ b/assets/StagingAccessRequestView-Bjz7RlyX.js @@ -1 +1 @@ -import{a as m,F as a,j as e,H as g,aU as p}from"./index-CkeK0cDg.js";import{C as j}from"./circle-check-BZ6y-zRa.js";const f=()=>{const{user:s,isLoading:u}=m(),[l,d]=a.useState(!1),[r,t]=a.useState(!1),[c,i]=a.useState(null),o=async h=>{h.preventDefault(),t(!0),i(null);try{await p.requestStagingAccess(),d(!0)}catch(n){i(n instanceof Error?n.message:"Could not submit your request.")}finally{t(!1)}};return e.jsx("main",{className:"access-request-page",children:e.jsxs("section",{className:"access-request-card","aria-labelledby":"access-request-title",children:[e.jsxs("a",{className:"access-request-brand",href:"https://paperswithcode.co",children:[e.jsx("span",{className:"brand-mark","aria-hidden":"true"}),e.jsxs("span",{className:"brand-name",children:["Papers ",e.jsx("em",{children:"with"})," Code"]})]}),l?e.jsxs("div",{className:"access-request-success",role:"status",children:[e.jsx(j,{size:34,strokeWidth:1.6,"aria-hidden":"true"}),e.jsx("h1",{id:"access-request-title",children:"Request received"}),e.jsxs("p",{children:["Thanks, @",s==null?void 0:s.username,". We’ll review your contributor access request."]})]}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"access-request-heading",children:[e.jsx("p",{className:"access-request-eyebrow",children:"Staging preview"}),e.jsx("h1",{id:"access-request-title",children:"Request access"}),e.jsx("p",{children:"This preview is limited to project contributors. Send us your verified Hugging Face username and email address to request access."})]}),u?e.jsx("p",{className:"access-request-status",role:"status",children:"Checking your Hugging Face account…"}):s?e.jsxs("form",{className:"access-request-form",onSubmit:o,children:[e.jsx("label",{htmlFor:"hf-username",children:"Hugging Face username"}),e.jsxs("div",{className:"access-request-input-wrap",children:[e.jsx("span",{"aria-hidden":"true",children:"@"}),e.jsx("input",{id:"hf-username",name:"hf_username",value:s.username,readOnly:!0,autoComplete:"username"})]}),e.jsxs("p",{className:"access-request-verified",children:["Username and email verified through Hugging Face sign-in. See our"," ",e.jsx("a",{href:"https://paperswithcode.co/privacy",children:"Privacy Policy"}),"."]}),c&&e.jsx("p",{className:"access-request-error",role:"alert",children:c}),e.jsx("button",{className:"access-request-submit",type:"submit",disabled:r,children:r?"Sending…":"Request access"})]}):e.jsxs("div",{className:"access-request-signin",children:[e.jsx("p",{children:"Sign in first so we can verify the account you’re requesting access for."}),e.jsx(g,{returnTo:"/request-access",label:"Sign in with Hugging Face",collectEmail:!0})]})]})]})})};export{f as default}; +import{a as m,F as a,j as e,H as g,aU as p}from"./index-B7UoLEbn.js";import{C as j}from"./circle-check-CDmFoooL.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-CU1SgfgM.js b/assets/SubmissionsDashboard-MVmNy5zG.js similarity index 98% rename from assets/SubmissionsDashboard-CU1SgfgM.js rename to assets/SubmissionsDashboard-MVmNy5zG.js index 9db52a9926c72eefe0aa99a2ecc710c7d239f927..918f356bf40aeeea6a4654b6c9504924acdbbb40 100644 --- a/assets/SubmissionsDashboard-CU1SgfgM.js +++ b/assets/SubmissionsDashboard-MVmNy5zG.js @@ -1,4 +1,4 @@ -var be=s=>{throw TypeError(s)};var ne=(s,t,i)=>t.has(s)||be("Cannot "+i);var g=(s,t,i)=>(ne(s,t,"read from private field"),i?i.call(s):t.get(s)),C=(s,t,i)=>t.has(s)?be("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(s):t.set(s,i),k=(s,t,i,n)=>(ne(s,t,"write to private field"),n?n.call(s,i):t.set(s,i),i),O=(s,t,i)=>(ne(s,t,"access private method"),i);import{aw as Oe,aJ as ae,az as Me,aP as Te,m as we,r as P,aB as Ie,g as Ae,j as e,V as Se,x as L,F as w,a as Fe,h as Ee,aQ as Ue,aR as Le,aS as Qe}from"./index-CkeK0cDg.js";import{i as De,r as qe,e as ze,b as $e}from"./evaluationQueryInvalidation-CC5JhGiX.js";import{p as He}from"./paperQueryKeys-BP2E-0yf.js";import{Q as Re,b as Be,c as Pe,e as Je,d as Ke,f as Ge,s as xe,g as Ve,h as We,u as oe}from"./useQuery-_Fj6Jfzr.js";import{u as je}from"./useMutation-q-fdM2fm.js";import{c as Q}from"./catalog-DGg7xZLW.js";import{s as q}from"./safeExternalHref-CkBrsh84.js";import{p as Ye}from"./papers-Celoj8_s.js";import{s as G}from"./submissions-C-uglc0y.js";import{R as Xe,C as Ze}from"./refresh-cw-ty41it1O.js";import{L as V}from"./loader-circle-CTuL2Xdc.js";import{S as es}from"./shield-alert-CvBQiZwU.js";import{C as ss}from"./circle-check-BZ6y-zRa.js";function _e(s,t){const i=new Set(t);return s.filter(n=>!i.has(n))}function ts(s,t,i){const n=s.slice(0);return n[t]=i,n}var $,E,H,D,R,U,W,Y,X,Z,N,le,ce,Ce,de,ue,me,ke,is=(ke=class extends Oe{constructor(t,i,n){super();C(this,N);C(this,$);C(this,E);C(this,H);C(this,D);C(this,R);C(this,U);C(this,W);C(this,Y);C(this,X);C(this,Z,[]);k(this,$,t),k(this,D,n),k(this,H,[]),k(this,R,[]),k(this,E,[]),this.setQueries(i)}onSubscribe(){this.listeners.size===1&&g(this,R).forEach(t=>{t.subscribe(i=>{O(this,N,ue).call(this,t,i)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,g(this,R).forEach(t=>{t.destroy()})}setQueries(t,i){k(this,H,t),k(this,D,i),ae.batch(()=>{const n=g(this,R),r=O(this,N,de).call(this,g(this,H));r.forEach(a=>a.observer.setOptions(a.defaultedQueryOptions));const l=r.map(a=>a.observer),o=l.map(a=>a.getCurrentResult()),d=n.length!==l.length,m=l.some((a,h)=>a!==n[h]),f=d||m,_=f?!0:o.some((a,h)=>{const c=g(this,E)[h];return!c||!Me(a,c)});!f&&!_||(f&&(k(this,Z,r),k(this,R,l)),k(this,E,o),this.hasListeners()&&(f&&(_e(n,l).forEach(a=>{a.destroy()}),_e(l,n).forEach(a=>{a.subscribe(h=>{O(this,N,ue).call(this,a,h)})})),O(this,N,me).call(this)))})}getCurrentResult(){return g(this,E)}getQueries(){return g(this,R).map(t=>t.getCurrentQuery())}getObservers(){return g(this,R)}getOptimisticResult(t,i){const n=O(this,N,de).call(this,t),r=n.map(o=>o.observer.getOptimisticResult(o.defaultedQueryOptions)),l=n.map(o=>o.defaultedQueryOptions.queryHash);return[r,o=>O(this,N,ce).call(this,o??r,i,l),()=>O(this,N,le).call(this,r,n)]}},$=new WeakMap,E=new WeakMap,H=new WeakMap,D=new WeakMap,R=new WeakMap,U=new WeakMap,W=new WeakMap,Y=new WeakMap,X=new WeakMap,Z=new WeakMap,N=new WeakSet,le=function(t,i){return i.map((n,r)=>{const l=t[r];return n.defaultedQueryOptions.notifyOnChangeProps?l:n.observer.trackResult(l,o=>{i.forEach(d=>{d.observer.trackProp(o)})})})},ce=function(t,i,n){if(i){const r=g(this,X),l=n!==void 0&&r!==void 0&&(r.length!==n.length||n.some((o,d)=>o!==r[d]));return(!g(this,U)||g(this,E)!==g(this,Y)||l||i!==g(this,W))&&(k(this,W,i),k(this,Y,g(this,E)),n!==void 0&&k(this,X,n),k(this,U,Te(g(this,U),i(t)))),g(this,U)}return t},Ce=function(){var t;return((t=g(this,D))==null?void 0:t.combine)!==void 0&&g(this,R).some((i,n)=>{var r;return i.options.suspense&&((r=g(this,E)[n])==null?void 0:r.data)===void 0})},de=function(t){const i=new Map;g(this,R).forEach(r=>{const l=r.options.queryHash;if(!l)return;const o=i.get(l);o?o.push(r):i.set(l,[r])});const n=[];return t.forEach(r=>{var m;const l=g(this,$).defaultQueryOptions(r),d=((m=i.get(l.queryHash))==null?void 0:m.shift())??new Re(g(this,$),l);n.push({defaultedQueryOptions:l,observer:d})}),n},ue=function(t,i){const n=g(this,R).indexOf(t);n!==-1&&(k(this,E,ts(g(this,E),n,i)),O(this,N,me).call(this))},me=function(){var t;if(this.hasListeners()){const i=O(this,N,le).call(this,g(this,E),g(this,Z)),n=O(this,N,Ce).call(this),r=g(this,U),l=n?r:O(this,N,ce).call(this,i,(t=g(this,D))==null?void 0:t.combine);(n||r!==l)&&ae.batch(()=>{this.listeners.forEach(o=>{o(g(this,E))})})}},ke);function te({queries:s,...t},i){const n=we(),r=Be(),l=Pe(),o=P.useMemo(()=>s.map(u=>{const v=n.defaultQueryOptions(u);return v._optimisticResults=r?"isRestoring":"optimistic",v}),[s,n,r]);o.forEach(u=>{Je(u);const v=n.getQueryCache().get(u.queryHash);Ke(u,l,v)}),Ge(l);const[d]=P.useState(()=>new is(n,o,t)),[m,f,_]=d.getOptimisticResult(o,t.combine),a=!r&&t.subscribed!==!1;P.useSyncExternalStore(P.useCallback(u=>a?d.subscribe(ae.batchCalls(u)):Ie,[d,a]),()=>d.getCurrentResult(),()=>d.getCurrentResult()),P.useEffect(()=>{d.setQueries(o,t)},[o,t,d]);const c=m.some((u,v)=>xe(o[v],u))?m.flatMap((u,v)=>{const S=o[v];if(S&&xe(S,u)){const M=new Re(n,S);return Ve(S,M,l)}return[]}):[];if(c.length>0)throw Promise.all(c);const p=m.find((u,v)=>{const S=o[v];return S&&We({result:u,errorResetBoundary:l,throwOnError:S.throwOnError,query:n.getQueryCache().get(S.queryHash),suspense:S.suspense})});if(p!=null&&p.error)throw p.error;return f(_())}/** +var be=s=>{throw TypeError(s)};var ne=(s,t,i)=>t.has(s)||be("Cannot "+i);var g=(s,t,i)=>(ne(s,t,"read from private field"),i?i.call(s):t.get(s)),C=(s,t,i)=>t.has(s)?be("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(s):t.set(s,i),k=(s,t,i,n)=>(ne(s,t,"write to private field"),n?n.call(s,i):t.set(s,i),i),O=(s,t,i)=>(ne(s,t,"access private method"),i);import{aw as Oe,aJ as ae,az as Me,aP as Te,m as we,r as P,aB as Ie,g as Ae,j as e,V as Se,x as L,F as w,a as Fe,h as Ee,aQ as Ue,aR as Le,aS as Qe}from"./index-B7UoLEbn.js";import{i as De,r as qe,e as ze,b as $e}from"./evaluationQueryInvalidation-CC5JhGiX.js";import{p as He}from"./paperQueryKeys-BP2E-0yf.js";import{Q as Re,b as Be,c as Pe,e as Je,d as Ke,f as Ge,s as xe,g as Ve,h as We,u as oe}from"./useQuery-DV2f4JpC.js";import{u as je}from"./useMutation-CuaM6sOT.js";import{c as Q}from"./catalog-DcbS_7_L.js";import{s as q}from"./safeExternalHref-CkBrsh84.js";import{p as Ye}from"./papers-Ctf2uv0o.js";import{s as G}from"./submissions-BTKMKNWZ.js";import{R as Xe,C as Ze}from"./refresh-cw-Gb7Np-Ie.js";import{L as V}from"./loader-circle-hbMX20oF.js";import{S as es}from"./shield-alert-BnMa8lt8.js";import{C as ss}from"./circle-check-CDmFoooL.js";function _e(s,t){const i=new Set(t);return s.filter(n=>!i.has(n))}function ts(s,t,i){const n=s.slice(0);return n[t]=i,n}var $,E,H,D,R,U,W,Y,X,Z,N,le,ce,Ce,de,ue,me,ke,is=(ke=class extends Oe{constructor(t,i,n){super();C(this,N);C(this,$);C(this,E);C(this,H);C(this,D);C(this,R);C(this,U);C(this,W);C(this,Y);C(this,X);C(this,Z,[]);k(this,$,t),k(this,D,n),k(this,H,[]),k(this,R,[]),k(this,E,[]),this.setQueries(i)}onSubscribe(){this.listeners.size===1&&g(this,R).forEach(t=>{t.subscribe(i=>{O(this,N,ue).call(this,t,i)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,g(this,R).forEach(t=>{t.destroy()})}setQueries(t,i){k(this,H,t),k(this,D,i),ae.batch(()=>{const n=g(this,R),r=O(this,N,de).call(this,g(this,H));r.forEach(a=>a.observer.setOptions(a.defaultedQueryOptions));const l=r.map(a=>a.observer),o=l.map(a=>a.getCurrentResult()),d=n.length!==l.length,m=l.some((a,h)=>a!==n[h]),f=d||m,_=f?!0:o.some((a,h)=>{const c=g(this,E)[h];return!c||!Me(a,c)});!f&&!_||(f&&(k(this,Z,r),k(this,R,l)),k(this,E,o),this.hasListeners()&&(f&&(_e(n,l).forEach(a=>{a.destroy()}),_e(l,n).forEach(a=>{a.subscribe(h=>{O(this,N,ue).call(this,a,h)})})),O(this,N,me).call(this)))})}getCurrentResult(){return g(this,E)}getQueries(){return g(this,R).map(t=>t.getCurrentQuery())}getObservers(){return g(this,R)}getOptimisticResult(t,i){const n=O(this,N,de).call(this,t),r=n.map(o=>o.observer.getOptimisticResult(o.defaultedQueryOptions)),l=n.map(o=>o.defaultedQueryOptions.queryHash);return[r,o=>O(this,N,ce).call(this,o??r,i,l),()=>O(this,N,le).call(this,r,n)]}},$=new WeakMap,E=new WeakMap,H=new WeakMap,D=new WeakMap,R=new WeakMap,U=new WeakMap,W=new WeakMap,Y=new WeakMap,X=new WeakMap,Z=new WeakMap,N=new WeakSet,le=function(t,i){return i.map((n,r)=>{const l=t[r];return n.defaultedQueryOptions.notifyOnChangeProps?l:n.observer.trackResult(l,o=>{i.forEach(d=>{d.observer.trackProp(o)})})})},ce=function(t,i,n){if(i){const r=g(this,X),l=n!==void 0&&r!==void 0&&(r.length!==n.length||n.some((o,d)=>o!==r[d]));return(!g(this,U)||g(this,E)!==g(this,Y)||l||i!==g(this,W))&&(k(this,W,i),k(this,Y,g(this,E)),n!==void 0&&k(this,X,n),k(this,U,Te(g(this,U),i(t)))),g(this,U)}return t},Ce=function(){var t;return((t=g(this,D))==null?void 0:t.combine)!==void 0&&g(this,R).some((i,n)=>{var r;return i.options.suspense&&((r=g(this,E)[n])==null?void 0:r.data)===void 0})},de=function(t){const i=new Map;g(this,R).forEach(r=>{const l=r.options.queryHash;if(!l)return;const o=i.get(l);o?o.push(r):i.set(l,[r])});const n=[];return t.forEach(r=>{var m;const l=g(this,$).defaultQueryOptions(r),d=((m=i.get(l.queryHash))==null?void 0:m.shift())??new Re(g(this,$),l);n.push({defaultedQueryOptions:l,observer:d})}),n},ue=function(t,i){const n=g(this,R).indexOf(t);n!==-1&&(k(this,E,ts(g(this,E),n,i)),O(this,N,me).call(this))},me=function(){var t;if(this.hasListeners()){const i=O(this,N,le).call(this,g(this,E),g(this,Z)),n=O(this,N,Ce).call(this),r=g(this,U),l=n?r:O(this,N,ce).call(this,i,(t=g(this,D))==null?void 0:t.combine);(n||r!==l)&&ae.batch(()=>{this.listeners.forEach(o=>{o(g(this,E))})})}},ke);function te({queries:s,...t},i){const n=we(),r=Be(),l=Pe(),o=P.useMemo(()=>s.map(u=>{const v=n.defaultQueryOptions(u);return v._optimisticResults=r?"isRestoring":"optimistic",v}),[s,n,r]);o.forEach(u=>{Je(u);const v=n.getQueryCache().get(u.queryHash);Ke(u,l,v)}),Ge(l);const[d]=P.useState(()=>new is(n,o,t)),[m,f,_]=d.getOptimisticResult(o,t.combine),a=!r&&t.subscribed!==!1;P.useSyncExternalStore(P.useCallback(u=>a?d.subscribe(ae.batchCalls(u)):Ie,[d,a]),()=>d.getCurrentResult(),()=>d.getCurrentResult()),P.useEffect(()=>{d.setQueries(o,t)},[o,t,d]);const c=m.some((u,v)=>xe(o[v],u))?m.flatMap((u,v)=>{const S=o[v];if(S&&xe(S,u)){const M=new Re(n,S);return Ve(S,M,l)}return[]}):[];if(c.length>0)throw Promise.all(c);const p=m.find((u,v)=>{const S=o[v];return S&&We({result:u,errorResetBoundary:l,throwOnError:S.throwOnError,query:n.getQueryCache().get(S.queryHash),suspense:S.suspense})});if(p!=null&&p.error)throw p.error;return f(_())}/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/SubmitView-uKaxJMOl.js b/assets/SubmitView-Cz7qubn4.js similarity index 94% rename from assets/SubmitView-uKaxJMOl.js rename to assets/SubmitView-Cz7qubn4.js index 7c3ea1087d96e7d72fe03c14d0a09a83b8b69ad3..3711b517bdd70fa6c2900d5f51ce677652c9455f 100644 --- a/assets/SubmitView-uKaxJMOl.js +++ b/assets/SubmitView-Cz7qubn4.js @@ -1 +1 @@ -import{b as k,m as C,h as F,a as L,d as z,F as d,j as e,E as X}from"./index-CkeK0cDg.js";import{u as q}from"./useMutation-q-fdM2fm.js";import{A as N,a as U}from"./alert-Vt5eE6re.js";import{B as P}from"./button-CsUrN-GU.js";import{I as g}from"./input-Cnu30n0B.js";import{T as $}from"./textarea-BsaJyP0o.js";import{p as O}from"./papers-Celoj8_s.js";const S="pwc:paper-submit-draft",B=/^\d{4}\.\d{4,5}(v\d+)?$/i,J=/^[a-z-]+(\.[A-Z]{2})?\/\d{7}$/,V=/^https?:\/\/(?:www\.)?arxiv\.org\//i;function R(n){const i=n.trim();return i?B.test(i)||J.test(i)||V.test(i)?"arxiv":/^https?:\/\//i.test(i)?"external":"arxiv":"empty"}function K(n,i){const a=n.trim();if(R(a)==="arxiv")return/^https?:\/\//i.test(a)?{source_url:a}:{arxiv_id:a};const o={source_url:a},c=i.title.trim();c&&(o.title=c);const u=i.abstract.trim();u&&(o.abstract=u);const l=i.authors.split(/[,\n]/).map(m=>m.trim()).filter(Boolean);return l.length>0&&(o.authors=l),i.datePublished&&(o.date_published=i.datePublished),o}function M(n){var a;const i=n;if(!i)return"Submission failed";if(i.response)try{const s=JSON.parse(i.response);if(typeof s.detail=="string")return s.detail;if((a=s.detail)!=null&&a.message)return`${s.detail.message} See ${s.detail.help||"/rate-limits"} for help.`}catch{return i.response}return i.message||"Submission failed"}const te=()=>{const n=k(),i=C(),{toast:a}=F(),{user:s,isLoading:o}=L(),[c]=z(),u=c.get("arxiv_id")??"",[l,m]=d.useState(u),[f,j]=d.useState(""),[x,w]=d.useState(""),[b,I]=d.useState(""),[y,_]=d.useState(""),[A,v]=d.useState(null);d.useEffect(()=>{if(u)return;const t=sessionStorage.getItem(S);if(t){sessionStorage.removeItem(S);try{const r=JSON.parse(t);m(r.input??""),j(r.title??""),w(r.abstract??""),I(r.authors??""),_(r.datePublished??"")}catch{}}},[u]);const h=R(l),T=h==="external",p=q({mutationFn:t=>O.submit(t),onSuccess:t=>{if(t.pending_review){a({title:"Submission queued for review",description:"No source page was fetched and no catalog row was changed."}),p.reset();return}i.invalidateQueries({queryKey:["papers"],refetchType:"none"}),i.invalidateQueries({queryKey:["papers-infinite"],refetchType:"none"}),i.invalidateQueries({queryKey:["trending-papers"],refetchType:"none"});const r=t.refreshed&&t.created&&t.latest_version;a({title:r?`Paper updated to ${t.latest_version}`:t.created?"Paper submitted":"Paper already indexed",description:r?"Opening the updated paper page…":t.created?"Opening the paper page…":"Opening the existing paper page…"}),t.route_identifier&&n(`/paper/${t.route_identifier}`)},onError:t=>{v(M(t))}}),D=t=>{if(t.preventDefault(),v(null),h==="empty"){v("Enter an arXiv ID or a paper URL to submit.");return}if(!s){sessionStorage.setItem(S,JSON.stringify({input:l,title:f,abstract:x,authors:b,datePublished:y}));const E=X("/api/v1/auth/hf/login");window.location.assign(`${E}?return_to=${encodeURIComponent(window.location.href)}`);return}const r=K(l,{title:f,abstract:x,authors:b,datePublished:y});p.mutate(r)};return e.jsxs("div",{className:"page",style:{maxWidth:720},children:[e.jsx("h1",{className:"detail-title",children:"Submit a paper"}),e.jsxs("p",{style:{fontFamily:"var(--serif)",color:"var(--ink-soft)",marginTop:12,lineHeight:1.55},children:["Index an arXiv paper or propose a non-arXiv paper (blog post, technical report, model release page). External papers enter the submission queue and appear only after review."," ",e.jsx("a",{href:"/rate-limits",children:"Read the submission and rate-limit policy."})]}),e.jsxs("form",{onSubmit:D,style:{marginTop:28,display:"grid",gap:20},children:[e.jsxs("div",{style:{display:"grid",gap:8},children:[e.jsx("label",{htmlFor:"submit-input",style:{fontWeight:600,fontSize:14},children:"arXiv ID or paper URL"}),e.jsx(g,{id:"submit-input",value:l,onChange:t=>m(t.target.value),placeholder:"2501.12345 · https://arxiv.org/abs/2501.12345 · https://blog.example.com/release",autoFocus:!0,required:!0}),e.jsx("div",{style:{fontSize:12,color:"var(--ink-soft)",minHeight:18},children:h==="arxiv"?"Detected: arXiv paper — metadata will be fetched automatically.":h==="external"?"Detected: external URL — we'll extract metadata and you can override below.":"Paste an arXiv ID like 2501.12345 or any paper/blog URL."})]}),T&&e.jsxs("fieldset",{style:{border:"1px solid var(--rule)",borderRadius:8,padding:"16px 20px 20px",display:"grid",gap:16},children:[e.jsx("legend",{style:{padding:"0 8px",fontSize:12,color:"var(--ink-soft)",textTransform:"uppercase",letterSpacing:.5},children:"External paper details (optional)"}),e.jsxs("div",{style:{display:"grid",gap:8},children:[e.jsx("label",{htmlFor:"submit-title",style:{fontSize:13},children:"Title"}),e.jsx(g,{id:"submit-title",value:f,onChange:t=>j(t.target.value),placeholder:"Leave blank to extract automatically"})]}),e.jsxs("div",{style:{display:"grid",gap:8},children:[e.jsx("label",{htmlFor:"submit-abstract",style:{fontSize:13},children:"Abstract or summary"}),e.jsx($,{id:"submit-abstract",value:x,onChange:t=>w(t.target.value),rows:4,placeholder:"Leave blank to extract automatically"})]}),e.jsxs("div",{style:{display:"grid",gap:8},children:[e.jsx("label",{htmlFor:"submit-authors",style:{fontSize:13},children:"Authors (comma-separated)"}),e.jsx(g,{id:"submit-authors",value:b,onChange:t=>I(t.target.value),placeholder:"Jane Smith, John Doe"})]}),e.jsxs("div",{style:{display:"grid",gap:8},children:[e.jsx("label",{htmlFor:"submit-date",style:{fontSize:13},children:"Publication date"}),e.jsx(g,{id:"submit-date",type:"date",value:y,onChange:t=>_(t.target.value),style:{maxWidth:220}}),e.jsx("div",{style:{fontSize:12,color:"var(--ink-soft)"},children:"Required only if we cannot infer a date from the page."})]})]}),A&&e.jsx(N,{variant:"destructive",children:e.jsx(U,{children:A})}),e.jsxs("div",{style:{display:"flex",gap:12,alignItems:"center"},children:[e.jsx(P,{type:"submit",disabled:p.isPending||o,children:o?"Checking sign-in…":p.isPending?"Submitting…":s?"Submit paper":"Sign in to submit"}),e.jsx(P,{type:"button",variant:"outline",onClick:()=>n(-1),disabled:p.isPending,children:"Cancel"})]})]})]})};export{te as default}; +import{b as k,m as C,h as F,a as L,d as z,F as d,j as e,E as X}from"./index-B7UoLEbn.js";import{u as q}from"./useMutation-CuaM6sOT.js";import{A as N,a as U}from"./alert-B3UHHG00.js";import{B as P}from"./button-D543yAN8.js";import{I as g}from"./input-hdt3aF12.js";import{T as $}from"./textarea-CpxVQZTZ.js";import{p as O}from"./papers-Ctf2uv0o.js";const S="pwc:paper-submit-draft",B=/^\d{4}\.\d{4,5}(v\d+)?$/i,J=/^[a-z-]+(\.[A-Z]{2})?\/\d{7}$/,V=/^https?:\/\/(?:www\.)?arxiv\.org\//i;function R(n){const i=n.trim();return i?B.test(i)||J.test(i)||V.test(i)?"arxiv":/^https?:\/\//i.test(i)?"external":"arxiv":"empty"}function K(n,i){const a=n.trim();if(R(a)==="arxiv")return/^https?:\/\//i.test(a)?{source_url:a}:{arxiv_id:a};const o={source_url:a},c=i.title.trim();c&&(o.title=c);const u=i.abstract.trim();u&&(o.abstract=u);const l=i.authors.split(/[,\n]/).map(m=>m.trim()).filter(Boolean);return l.length>0&&(o.authors=l),i.datePublished&&(o.date_published=i.datePublished),o}function M(n){var a;const i=n;if(!i)return"Submission failed";if(i.response)try{const s=JSON.parse(i.response);if(typeof s.detail=="string")return s.detail;if((a=s.detail)!=null&&a.message)return`${s.detail.message} See ${s.detail.help||"/rate-limits"} for help.`}catch{return i.response}return i.message||"Submission failed"}const te=()=>{const n=k(),i=C(),{toast:a}=F(),{user:s,isLoading:o}=L(),[c]=z(),u=c.get("arxiv_id")??"",[l,m]=d.useState(u),[f,j]=d.useState(""),[x,w]=d.useState(""),[b,I]=d.useState(""),[y,_]=d.useState(""),[A,v]=d.useState(null);d.useEffect(()=>{if(u)return;const t=sessionStorage.getItem(S);if(t){sessionStorage.removeItem(S);try{const r=JSON.parse(t);m(r.input??""),j(r.title??""),w(r.abstract??""),I(r.authors??""),_(r.datePublished??"")}catch{}}},[u]);const h=R(l),T=h==="external",p=q({mutationFn:t=>O.submit(t),onSuccess:t=>{if(t.pending_review){a({title:"Submission queued for review",description:"No source page was fetched and no catalog row was changed."}),p.reset();return}i.invalidateQueries({queryKey:["papers"],refetchType:"none"}),i.invalidateQueries({queryKey:["papers-infinite"],refetchType:"none"}),i.invalidateQueries({queryKey:["trending-papers"],refetchType:"none"});const r=t.refreshed&&t.created&&t.latest_version;a({title:r?`Paper updated to ${t.latest_version}`:t.created?"Paper submitted":"Paper already indexed",description:r?"Opening the updated paper page…":t.created?"Opening the paper page…":"Opening the existing paper page…"}),t.route_identifier&&n(`/paper/${t.route_identifier}`)},onError:t=>{v(M(t))}}),D=t=>{if(t.preventDefault(),v(null),h==="empty"){v("Enter an arXiv ID or a paper URL to submit.");return}if(!s){sessionStorage.setItem(S,JSON.stringify({input:l,title:f,abstract:x,authors:b,datePublished:y}));const E=X("/api/v1/auth/hf/login");window.location.assign(`${E}?return_to=${encodeURIComponent(window.location.href)}`);return}const r=K(l,{title:f,abstract:x,authors:b,datePublished:y});p.mutate(r)};return e.jsxs("div",{className:"page",style:{maxWidth:720},children:[e.jsx("h1",{className:"detail-title",children:"Submit a paper"}),e.jsxs("p",{style:{fontFamily:"var(--serif)",color:"var(--ink-soft)",marginTop:12,lineHeight:1.55},children:["Index an arXiv paper or propose a non-arXiv paper (blog post, technical report, model release page). External papers enter the submission queue and appear only after review."," ",e.jsx("a",{href:"/rate-limits",children:"Read the submission and rate-limit policy."})]}),e.jsxs("form",{onSubmit:D,style:{marginTop:28,display:"grid",gap:20},children:[e.jsxs("div",{style:{display:"grid",gap:8},children:[e.jsx("label",{htmlFor:"submit-input",style:{fontWeight:600,fontSize:14},children:"arXiv ID or paper URL"}),e.jsx(g,{id:"submit-input",value:l,onChange:t=>m(t.target.value),placeholder:"2501.12345 · https://arxiv.org/abs/2501.12345 · https://blog.example.com/release",autoFocus:!0,required:!0}),e.jsx("div",{style:{fontSize:12,color:"var(--ink-soft)",minHeight:18},children:h==="arxiv"?"Detected: arXiv paper — metadata will be fetched automatically.":h==="external"?"Detected: external URL — we'll extract metadata and you can override below.":"Paste an arXiv ID like 2501.12345 or any paper/blog URL."})]}),T&&e.jsxs("fieldset",{style:{border:"1px solid var(--rule)",borderRadius:8,padding:"16px 20px 20px",display:"grid",gap:16},children:[e.jsx("legend",{style:{padding:"0 8px",fontSize:12,color:"var(--ink-soft)",textTransform:"uppercase",letterSpacing:.5},children:"External paper details (optional)"}),e.jsxs("div",{style:{display:"grid",gap:8},children:[e.jsx("label",{htmlFor:"submit-title",style:{fontSize:13},children:"Title"}),e.jsx(g,{id:"submit-title",value:f,onChange:t=>j(t.target.value),placeholder:"Leave blank to extract automatically"})]}),e.jsxs("div",{style:{display:"grid",gap:8},children:[e.jsx("label",{htmlFor:"submit-abstract",style:{fontSize:13},children:"Abstract or summary"}),e.jsx($,{id:"submit-abstract",value:x,onChange:t=>w(t.target.value),rows:4,placeholder:"Leave blank to extract automatically"})]}),e.jsxs("div",{style:{display:"grid",gap:8},children:[e.jsx("label",{htmlFor:"submit-authors",style:{fontSize:13},children:"Authors (comma-separated)"}),e.jsx(g,{id:"submit-authors",value:b,onChange:t=>I(t.target.value),placeholder:"Jane Smith, John Doe"})]}),e.jsxs("div",{style:{display:"grid",gap:8},children:[e.jsx("label",{htmlFor:"submit-date",style:{fontSize:13},children:"Publication date"}),e.jsx(g,{id:"submit-date",type:"date",value:y,onChange:t=>_(t.target.value),style:{maxWidth:220}}),e.jsx("div",{style:{fontSize:12,color:"var(--ink-soft)"},children:"Required only if we cannot infer a date from the page."})]})]}),A&&e.jsx(N,{variant:"destructive",children:e.jsx(U,{children:A})}),e.jsxs("div",{style:{display:"flex",gap:12,alignItems:"center"},children:[e.jsx(P,{type:"submit",disabled:p.isPending||o,children:o?"Checking sign-in…":p.isPending?"Submitting…":s?"Submit paper":"Sign in to submit"}),e.jsx(P,{type:"button",variant:"outline",onClick:()=>n(-1),disabled:p.isPending,children:"Cancel"})]})]})]})};export{te as default}; diff --git a/assets/TagBrowseView-DuYYWtvR.js b/assets/TagBrowseView-BfCOFExx.js similarity index 94% rename from assets/TagBrowseView-DuYYWtvR.js rename to assets/TagBrowseView-BfCOFExx.js index f00cd808cda9d2edc29e6cf552d4a6efe47f1831..bdd47d156956305490b2ebd72f71f4e72cd86871 100644 --- a/assets/TagBrowseView-DuYYWtvR.js +++ b/assets/TagBrowseView-BfCOFExx.js @@ -1 +1 @@ -import{j as e,L as C,r as u,q as ae,p as H,a1 as ke,t as Ne,P as ts,w as we,s as Ce,a2 as rs,F as k,a3 as ns,z as os,x as te,u as cs,b as is,d as ls,k as ds,V as ms}from"./index-CkeK0cDg.js";import{R as ps}from"./ResearchFollowButton-Dpqj0_yd.js";import{u as je}from"./useQuery-_Fj6Jfzr.js";import{P as hs,M as us}from"./components-BRrDI9KS.js";import{A as re,T as gs}from"./trophy-B-BD7RmH.js";import{B as xs}from"./BenchmarkTrendSparkline-DtMXUNJJ.js";import{P as bs}from"./PaperFeedFilters-D-Ie3cDx.js";import{a as fs,P as js,b as _s}from"./PaperDateFilter-qc_JVYg0.js";import{M as Z}from"./MarkdownText-DM-IyAfb.js";import{c as _e}from"./catalog-DGg7xZLW.js";import{s as vs}from"./slug-BpH-Nkvz.js";import{d as O,t as ks}from"./colors-DQ-VN9If.js";import{c as Ns}from"./usePapers-fMOiVOFB.js";import{u as ws}from"./useIntersectionObserver-Bw5JPCeX.js";import{S as U}from"./skeleton-Cs8haT1C.js";import{A as Cs,a as ys}from"./alert-Vt5eE6re.js";import{C as As}from"./chevron-down-CcbfCW-U.js";import{G as Ss}from"./github-DHpXYWrC.js";import"./useMutation-q-fdM2fm.js";import"./research-BfGol3BN.js";import"./plus-BaTMbqcZ.js";import"./paperQueryKeys-BP2E-0yf.js";import"./LatexTitle-DPYNzv63.js";import"./papers-Celoj8_s.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-Vq6DwYpn.js";/* empty css */import"./PaperPreviewLink-CQ27hqZy.js";import"./index-B1_S53Hb.js";import"./index-DqQiSNg1.js";import"./katex-DkKDou_j.js";import"./hover-card-CAN3Vtea.js";import"./useInfiniteQuery-gdIFpXB_.js";const Ps=()=>e.jsxs(C,{to:"/astra-for-robotics",className:"task-featured-collection","aria-label":"Featured collection: GPT-6 Astra for Robotics",children:[e.jsx("span",{className:"task-featured-collection-eyebrow",children:"Featured collection"}),e.jsx("strong",{children:"GPT-6 Astra for Robotics"}),e.jsx("span",{className:"task-featured-collection-description",children:"Papers and demos that put GPT-6 Astra in control of real and simulated robots, as the policy itself or as an agent orchestrating the stack."}),e.jsxs("span",{className:"task-featured-collection-meta",children:["Explore the collection",e.jsx(re,{size:14,"aria-hidden":"true"})]})]}),ve=a=>{const c=a.match(/\(([^()]*)\)\s*$/);return c?c[1].split(",").map(r=>r.trim()).filter(Boolean):[]};function Rs(a,c){const r=ve(a);if(c===void 0)return"standard";const n=new Set(ve(c).map(o=>o.toLowerCase())),i=r.filter(o=>!n.has(o.toLowerCase()));return i.length?i.join(", "):a}function Is(a,c){const r=new Map(a.map(o=>[o.id,o])),n=o=>{const m=new Set([o.id]);let p=o;for(;;){const b=c(p),x=b?r.get(b):void 0;if(!x)return p.id;if(m.has(x.id))return o.id;m.add(x.id),p=x}},i=new Map;return a.forEach(o=>{const m=n(o);i.set(m,[...i.get(m)||[],o])}),[...i].map(([o,m])=>({key:o,members:[r.get(o),...m.filter(p=>p.id!==o)]}))}var G="Collapsible",[Es,ye]=we(G),[Ts,ne]=Es(G),Ae=u.forwardRef((a,c)=>{const{__scopeCollapsible:r,open:n,defaultOpen:i,disabled:o,onOpenChange:m,...p}=a,[b,x]=ae({prop:n,defaultProp:i??!1,onChange:m,caller:G});return e.jsx(Ts,{scope:r,disabled:o,contentId:ke(),open:b,onOpenToggle:u.useCallback(()=>x(N=>!N),[x]),children:e.jsx(H.div,{"data-state":ce(b),"data-disabled":o?"":void 0,...p,ref:c})})});Ae.displayName=G;var Se="CollapsibleTrigger",Pe=u.forwardRef((a,c)=>{const{__scopeCollapsible:r,...n}=a,i=ne(Se,r);return e.jsx(H.button,{type:"button","aria-controls":i.contentId,"aria-expanded":i.open||!1,"data-state":ce(i.open),"data-disabled":i.disabled?"":void 0,disabled:i.disabled,...n,ref:c,onClick:Ne(a.onClick,i.onOpenToggle)})});Pe.displayName=Se;var oe="CollapsibleContent",Re=u.forwardRef((a,c)=>{const{forceMount:r,...n}=a,i=ne(oe,a.__scopeCollapsible);return e.jsx(ts,{present:r||i.open,children:({present:o})=>e.jsx(Ms,{...n,ref:c,present:o})})});Re.displayName=oe;var Ms=u.forwardRef((a,c)=>{const{__scopeCollapsible:r,present:n,children:i,...o}=a,m=ne(oe,r),[p,b]=u.useState(n),x=u.useRef(null),N=Ce(c,x),j=u.useRef(0),T=j.current,P=u.useRef(0),$=P.current,R=m.open||p,I=u.useRef(R),E=u.useRef(void 0);return u.useEffect(()=>{const h=requestAnimationFrame(()=>I.current=!1);return()=>cancelAnimationFrame(h)},[]),rs(()=>{const h=x.current;if(h){E.current=E.current||{transitionDuration:h.style.transitionDuration,animationName:h.style.animationName},h.style.transitionDuration="0s",h.style.animationName="none";const y=h.getBoundingClientRect();j.current=y.height,P.current=y.width,I.current||(h.style.transitionDuration=E.current.transitionDuration,h.style.animationName=E.current.animationName),b(n)}},[m.open,n]),e.jsx(H.div,{"data-state":ce(m.open),"data-disabled":m.disabled?"":void 0,id:m.contentId,hidden:!R,...o,ref:N,style:{"--radix-collapsible-content-height":T?`${T}px`:void 0,"--radix-collapsible-content-width":$?`${$}px`:void 0,...a.style},children:R&&i})});function ce(a){return a?"open":"closed"}var $s=Ae,Ds=Pe,Bs=Re,A="Accordion",Fs=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[ie,Ls,Os]=ns(A),[K]=we(A,[Os,ye]),le=ye(),Ie=k.forwardRef((a,c)=>{const{type:r,...n}=a,i=n,o=n;return e.jsx(ie.Provider,{scope:a.__scopeAccordion,children:r==="multiple"?e.jsx(Us,{...o,ref:c}):e.jsx(qs,{...i,ref:c})})});Ie.displayName=A;var[Ee,Hs]=K(A),[Te,Vs]=K(A,{collapsible:!1}),qs=k.forwardRef((a,c)=>{const{value:r,defaultValue:n,onValueChange:i=()=>{},collapsible:o=!1,...m}=a,[p,b]=ae({prop:r,defaultProp:n??"",onChange:i,caller:A});return e.jsx(Ee,{scope:a.__scopeAccordion,value:k.useMemo(()=>p?[p]:[],[p]),onItemOpen:b,onItemClose:k.useCallback(()=>o&&b(""),[o,b]),children:e.jsx(Te,{scope:a.__scopeAccordion,collapsible:o,children:e.jsx(Me,{...m,ref:c})})})}),Us=k.forwardRef((a,c)=>{const{value:r,defaultValue:n,onValueChange:i=()=>{},...o}=a,[m,p]=ae({prop:r,defaultProp:n??[],onChange:i,caller:A}),b=k.useCallback(N=>p((j=[])=>[...j,N]),[p]),x=k.useCallback(N=>p((j=[])=>j.filter(T=>T!==N)),[p]);return e.jsx(Ee,{scope:a.__scopeAccordion,value:m,onItemOpen:b,onItemClose:x,children:e.jsx(Te,{scope:a.__scopeAccordion,collapsible:!0,children:e.jsx(Me,{...o,ref:c})})})}),[zs,Q]=K(A),Me=k.forwardRef((a,c)=>{const{__scopeAccordion:r,disabled:n,dir:i,orientation:o="vertical",...m}=a,p=k.useRef(null),b=Ce(p,c),x=Ls(r),j=os(i)==="ltr",T=Ne(a.onKeyDown,P=>{var _;if(!Fs.includes(P.key))return;const $=P.target,R=x().filter(B=>{var F;return!((F=B.ref.current)!=null&&F.disabled)}),I=R.findIndex(B=>B.ref.current===$),E=R.length;if(I===-1)return;P.preventDefault();let h=I;const y=0,f=E-1,D=()=>{h=I+1,h>f&&(h=y)},M=()=>{h=I-1,h{const{__scopeAccordion:r,value:n,...i}=a,o=Q(z,r),m=Hs(z,r),p=le(r),b=ke(),x=n&&m.value.includes(n)||!1,N=o.disabled||a.disabled;return e.jsx(Gs,{scope:r,open:x,disabled:N,triggerId:b,children:e.jsx($s,{"data-orientation":o.orientation,"data-state":He(x),...p,...i,ref:c,disabled:N,open:x,onOpenChange:j=>{j?m.onItemOpen(n):m.onItemClose(n)}})})});$e.displayName=z;var De="AccordionHeader",Be=k.forwardRef((a,c)=>{const{__scopeAccordion:r,...n}=a,i=Q(A,r),o=de(De,r);return e.jsx(H.h3,{"data-orientation":i.orientation,"data-state":He(o.open),"data-disabled":o.disabled?"":void 0,...n,ref:c})});Be.displayName=De;var se="AccordionTrigger",Fe=k.forwardRef((a,c)=>{const{__scopeAccordion:r,...n}=a,i=Q(A,r),o=de(se,r),m=Vs(se,r),p=le(r);return e.jsx(ie.ItemSlot,{scope:r,children:e.jsx(Ds,{"aria-disabled":o.open&&!m.collapsible||void 0,"data-orientation":i.orientation,id:o.triggerId,...p,...n,ref:c})})});Fe.displayName=se;var Le="AccordionContent",Oe=k.forwardRef((a,c)=>{const{__scopeAccordion:r,...n}=a,i=Q(A,r),o=de(Le,r),m=le(r);return e.jsx(Bs,{role:"region","aria-labelledby":o.triggerId,"data-orientation":i.orientation,...m,...n,ref:c,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...a.style}})});Oe.displayName=Le;function He(a){return a?"open":"closed"}var Ks=Ie,Qs=$e,Ws=Be,Ve=Fe,qe=Oe;const Ys=Ks,Ue=u.forwardRef(({className:a,...c},r)=>e.jsx(Qs,{ref:r,className:te("border-b",a),...c}));Ue.displayName="AccordionItem";const ze=u.forwardRef(({className:a,children:c,...r},n)=>e.jsx(Ws,{className:"flex",children:e.jsxs(Ve,{ref:n,className:te("flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",a),...r,children:[c,e.jsx(As,{className:"h-4 w-4 shrink-0 transition-transform duration-200"})]})}));ze.displayName=Ve.displayName;const Ge=u.forwardRef(({className:a,children:c,...r},n)=>e.jsx(qe,{ref:n,className:"overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...r,children:e.jsx("div",{className:te("pb-4 pt-0",a),children:c})}));Ge.displayName=qe.displayName;const Js=[["trending","trending"],["date_published","newest"],["citation_count","most cited"]],Xs=a=>a==="trending"||a==="date_published"||a==="citation_count"?a:"trending",ee=3,Zs=[{slug:"healthcare",eyebrow:"Clinical systems",title:"Clinical AI & Healthcare",description:"Agents, clinical workflows, medical calculators, safety, and decision support.",href:"#benchmarks"},{slug:"medical-question-answering",eyebrow:"Language & reasoning",title:"Medical Question Answering",description:"Medical exams, biomedical evidence, clinical comprehension, and explanations.",href:"/tasks/medical-question-answering"},{slug:"medical-imaging",eyebrow:"Vision",title:"Medical Imaging",description:"Radiology, pathology, ophthalmology, ultrasound, and diagnostic imaging.",href:"/tasks/medical-imaging"},{slug:"medical-visual-question-answering",eyebrow:"Multimodal",title:"Medical Visual Question Answering",description:"Questions grounded in radiology, pathology, and other biomedical images.",href:"/tasks/medical-visual-question-answering"}],ea=a=>new Intl.NumberFormat("en",{notation:a>=1e3?"compact":"standard",maximumFractionDigits:1}).format(a),sa=({frameworks:a})=>a.length===0?null:e.jsxs("div",{className:"task-framework-links",children:[e.jsx("span",{className:"task-framework-links-label",children:"Recommended frameworks"}),a.map(c=>e.jsxs(C,{to:`/papers?framework=${encodeURIComponent(c.framework_slug)}`,className:"task-framework-link",children:[e.jsx("span",{children:c.framework_name}),e.jsxs("span",{className:"task-framework-link-stars",children:["★ ",ea(c.num_stars)]})]},c.framework_id))]}),aa=({task:a,area:c,parents:r})=>e.jsxs("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:[e.jsx(C,{to:"/tasks",children:"Tasks"}),c&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"sep",children:"/"}),e.jsx(C,{to:`/tasks#area-${vs(c.name)}`,children:c.name})]}),[...r].reverse().map(n=>e.jsxs(k.Fragment,{children:[e.jsx("span",{className:"sep",children:"/"}),e.jsx(C,{to:`/tasks/${n.slug||n.id}`,children:O(n.name,n.slug)})]},n.id)),e.jsx("span",{className:"sep",children:"/"}),e.jsx("span",{style:{color:"var(--accent-text)"},children:O(a.name,a.slug)})]}),ta=({task:a,relatedTasks:c})=>{const r=new Map([a,...c].map(n=>[n.slug,n]));return e.jsxs("section",{className:"medical-ai-hub","aria-labelledby":"medical-ai-hub-title",children:[e.jsxs("div",{className:"medical-ai-hub-heading",children:[e.jsx("span",{children:"Medical AI directory"}),e.jsx("h2",{id:"medical-ai-hub-title",children:"Explore Healthcare & Medical AI"}),e.jsx("p",{children:"Browse the field by clinical application, language, vision, or multimodal reasoning."})]}),e.jsx("div",{className:"medical-ai-hub-grid",children:Zs.map(n=>{const i=r.get(n.slug),o=e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"medical-ai-hub-card-eyebrow",children:n.eyebrow}),e.jsx("strong",{children:n.title}),e.jsx("span",{className:"medical-ai-hub-card-description",children:n.description}),e.jsxs("span",{className:"medical-ai-hub-card-meta",children:[(i==null?void 0:i.paper_count)!=null?`${i.paper_count.toLocaleString()} papers`:"Explore task",e.jsx(re,{size:14,"aria-hidden":"true"})]})]});return n.slug==="healthcare"?e.jsx("a",{href:n.href,className:"medical-ai-hub-card",children:o},n.slug):e.jsx(C,{to:n.href,className:"medical-ai-hub-card",children:o},n.slug)})})]})},ra=a=>[...a].sort((c,r)=>{const n=c.slug==="classic-language-modeling",i=r.slug==="classic-language-modeling";return n!==i?n?1:-1:0}),Fa=()=>{var xe,be,fe;const{taskSlug:a}=cs(),c=is(),[r,n]=ls(),i=Xs(r.get("order_by")),o=r.get("has_code")==="true",m=r.get("has_hf_artifacts")==="true",p=fs(r),b=s=>{const t=new URLSearchParams(r);t.set("order_by",s),n(t)},x=s=>{const t=new URLSearchParams(r);s?t.set("has_code","true"):t.delete("has_code"),n(t)},N=s=>{const t=new URLSearchParams(r);s?t.set("has_hf_artifacts","true"):t.delete("has_hf_artifacts"),n(t)},[j,T]=u.useState(!1),[P,$]=u.useState({}),[R,I]=u.useState(()=>new Set),{preferences:E}=ds(),h=(s,t)=>{const d=s||"";return t?`/benchmark/${d}?task=${encodeURIComponent(t)}`:`/benchmark/${d}`},y=E.hide_closed_source_evals?!0:void 0,f=je({queryKey:["task-page",a,y],queryFn:()=>_e.taskPage(a,{is_open:y}),enabled:!!a,staleTime:10*60*1e3});u.useEffect(()=>{var d;const s=(d=f.data)==null?void 0:d.task.slug;if(!a||!s||s===a)return;const t=r.toString();c(`/tasks/${s}${t?`?${t}`:""}`,{replace:!0})},[c,(xe=f.data)==null?void 0:xe.task.slug,r,a]);const D=je({queryKey:["task-benchmark-trends",a,y],queryFn:()=>_e.trendingBenchmarks(a,{limit:100,min_recent_papers:0,is_open:y}),enabled:!!a,staleTime:10*60*1e3}),M=u.useMemo(()=>{var s;return ra(((s=f.data)==null?void 0:s.children)||[])},[f.data]),L=u.useMemo(()=>{var t;const s=new Map;return(((t=f.data)==null?void 0:t.subtask_benchmarks)||[]).forEach(d=>{s.set(d.subtask_id,d.benchmarks||[])}),s},[f.data]),_=Ns({taskId:a||"",page_size:20,order_by:i,order_dir:"desc",include_resources:!0,has_code:o,has_hf_artifacts:m,start_date:p.startDate,end_date:p.endDate,enabled:!!a}),B=u.useMemo(()=>{var t;return(((t=_.data)==null?void 0:t.pages.flatMap(d=>d.results))||[]).map(ks)},[_.data]),F=u.useMemo(()=>{var t;const s={};return(t=_.data)==null||t.pages.forEach(d=>d.results.forEach(S=>(S.methods||[]).forEach(w=>{const l=w.slug||w.id;s[l]||(s[l]={id:w.id,name:w.name,slug:w.slug||"",count:0}),s[l].count++}))),Object.values(s).sort((d,S)=>S.count-d.count).slice(0,8)},[_.data]),{targetRef:Ke,isIntersecting:me}=ws({rootMargin:"200px"});if(u.useEffect(()=>{me&&_.hasNextPage&&!_.isFetchingNextPage&&_.fetchNextPage()},[me,_.hasNextPage,_.isFetchingNextPage]),f.isLoading)return e.jsxs("div",{className:"page",children:[e.jsx(U,{className:"h-12 w-1/2 mb-4"}),e.jsx(U,{className:"h-6 w-1/3 mb-8"}),e.jsx(U,{className:"h-64 w-full"})]});if(f.error||!f.data)return e.jsx("div",{className:"page",children:e.jsx(Cs,{variant:"destructive",children:e.jsx(ys,{children:"Task not found."})})});const g=f.data.task,Qe=f.data.parents||[],W=O(g.name,g.slug),Y=(f.data.sisters||[]).filter(s=>s.id!==g.id),We=f.data.recommended_frameworks||[],V=f.data.benchmarks||[],pe=new Map(V.map(s=>[s.id,s])),Ye=new Set(V.map(s=>s.id)),he=(((be=D.data)==null?void 0:be.results)||[]).filter(s=>Ye.has(s.id)).map(s=>{const t=pe.get(s.id);return{...s,best_model_name:(t==null?void 0:t.best_model_name)??s.best_model_name,best_paper_route:t==null?void 0:t.best_paper_route,best_paper_title:t==null?void 0:t.best_paper_title,best_code_url:t==null?void 0:t.best_code_url}}),J=he.length?he:V.map(s=>({id:s.id,name:s.name,slug:s.slug,full_name:s.full_name,recent_paper_count:0,baseline_paper_count:0,all_time_paper_count:s.paper_count||0,trend_score:0,support_weighted_score:0,rate_change:null,latest_reported_on:null,best_model_name:s.best_model_name,best_paper_route:s.best_paper_route,best_paper_title:s.best_paper_title,best_code_url:s.best_code_url,history:[]})),q=Is(J,s=>{var t;return(t=pe.get(s.id))==null?void 0:t.parent_dataset_id}),Je=j?q:q.slice(0,5),Xe=q.slice(5).reduce((s,t)=>s+t.members.length,0),ue=((fe=D.data)==null?void 0:fe.recent_days)||90,Ze=M.some(s=>(L.get(s.id)||[]).length>0),es=M.length>0,ge=J.length>0,ss=(()=>{const s=new Set;return V.forEach(t=>s.add(t.id)),L.forEach(t=>t.forEach(d=>s.add(d.id))),s.size})(),as=s=>{I(t=>{const d=new Set(t);return d.has(s)?d.delete(s):d.add(s),d})};return e.jsxs("div",{className:"page",children:[e.jsx(aa,{task:g,area:f.data.area,parents:Qe}),e.jsxs("div",{className:g.image_url?"task-hero-grid":void 0,children:[e.jsxs("div",{children:[e.jsx("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--accent-text)",letterSpacing:"0.1em",marginBottom:8},children:"TASK"}),e.jsx("h1",{className:"domain-mega-title",children:W}),e.jsx(ps,{kind:"task",entityId:g.id}),g.description&&e.jsx(Z,{className:"task-explainer",text:g.description}),g.research_trends&&g.research_trends.length>0&&e.jsx(Ys,{className:"task-research-trends",type:"single",collapsible:!0,children:e.jsxs(Ue,{className:"task-research-trends-item",value:"key-trends",children:[e.jsx(ze,{className:"task-research-trends-trigger",children:e.jsx("span",{className:"task-research-trends-title",children:"Key trends"})}),e.jsx(Ge,{className:"task-research-trends-content",children:e.jsx("ul",{children:g.research_trends.map((s,t)=>e.jsx("li",{children:e.jsx(Z,{text:s})},t))})})]})}),e.jsxs("div",{className:"task-quickstats",children:[e.jsxs("span",{children:[e.jsx("span",{className:"num",children:(g.paper_count??0).toLocaleString()}),"PAPERS"]}),e.jsxs("span",{children:[e.jsx("span",{className:"num",children:ss}),"BENCHMARKS"]}),e.jsxs("span",{children:[e.jsxs("span",{className:"num",children:[F.length,"+"]}),"METHODS USED"]})]}),e.jsx(sa,{frameworks:We})]}),g.image_url&&e.jsxs("figure",{className:`task-figure-card${g.slug==="omni-models"?" task-figure-card--compact":""}`,children:[e.jsx("div",{className:"task-figure-img-wrap",children:e.jsx("img",{className:"task-figure-img",src:ms(g.image_url)??void 0,alt:`${W} schematic`,onError:s=>{var t,d;(d=(t=s.currentTarget.parentElement)==null?void 0:t.parentElement)==null||d.style.setProperty("display","none")}})}),e.jsxs("figcaption",{children:["Figure · ",W,g.image_credit&&e.jsxs(e.Fragment,{children:[e.jsx("br",{}),e.jsx(Z,{className:"task-image-credit",text:g.image_credit})]})]})]})]}),g.slug==="healthcare"&&e.jsx(ta,{task:g,relatedTasks:Y}),g.slug==="robotics"&&e.jsx(Ps,{}),e.jsxs("div",{className:"task-page-grid",style:{marginTop:28},children:[e.jsxs("div",{children:[ge&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"task-section-head",id:"benchmarks",children:[e.jsxs("div",{className:"task-section-eyebrow",children:[ue,"-day reporting activity · select a benchmark"]}),e.jsxs("div",{className:"task-section-title",children:["Benchmarks ",e.jsxs("span",{className:"meta",children:["[",J.length,"]"]})]})]}),e.jsxs("div",{className:"benchmark-trend-table",role:"table","aria-label":"Trending benchmarks",children:[e.jsxs("div",{className:"benchmark-trend-head",role:"row",children:[e.jsx("span",{role:"columnheader",children:"Trend"}),e.jsx("span",{role:"columnheader",children:"Benchmark"}),e.jsx("span",{role:"columnheader",children:"Best model"}),e.jsx("span",{role:"columnheader",children:"Paper title"}),e.jsx("span",{role:"columnheader",children:"Code"}),e.jsx("span",{role:"columnheader",children:"Compare"})]}),Je.map(({key:s,members:t})=>{const d=t[0],S=v=>v===d?"standard":Rs(v.name,d.name),w=[d,...t.slice(1).sort((v,X)=>S(v).localeCompare(S(X),void 0,{sensitivity:"base"}))],l=w.find(v=>v.id===P[s])??d;return e.jsxs("div",{className:"benchmark-trend-row",role:"row",children:[e.jsxs("div",{className:"benchmark-trend-cell",role:"cell",children:[e.jsx(xs,{history:l.history,benchmarkName:l.name}),e.jsxs("div",{className:"benchmark-trend-meta",children:[e.jsxs("span",{children:[e.jsx("strong",{children:l.recent_paper_count})," ",l.recent_paper_count===1?"paper":"papers"," /"," ",ue,"d"]}),l.rate_change==null?l.recent_paper_count>0&&e.jsx("span",{className:"benchmark-trend-change is-new",children:"new"}):e.jsxs("span",{className:`benchmark-trend-change ${l.rate_change>=1?"is-up":"is-down"}`,children:[l.rate_change>=1?"↑":"↓"," ",l.rate_change.toFixed(1),"×"]})]})]}),e.jsxs("div",{className:"benchmark-trend-benchmark",role:"cell",children:[e.jsx(C,{className:"bench-row-name",to:h(l.slug||l.id,a),children:l.name}),w.length>1&&e.jsx("div",{className:"bench-row-variants",role:"group","aria-label":`Evaluation protocols for ${d.name}`,children:w.map(v=>e.jsx("button",{type:"button",className:"bench-row-variant","aria-pressed":v.id===l.id,title:v.name,onClick:()=>$(X=>({...X,[s]:v.id})),children:S(v)},v.id))}),e.jsx("div",{className:"bench-row-sub",children:e.jsxs("span",{children:[e.jsx("strong",{children:l.all_time_paper_count})," reporting papers"]})})]}),e.jsx("div",{className:"bench-row-best",role:"cell",children:l.best_model_name?e.jsxs(e.Fragment,{children:[e.jsx(gs,{size:13,className:"bench-row-best-icon"}),e.jsx("span",{className:"bench-row-best-name",children:l.best_model_name})]}):e.jsx("span",{className:"bench-row-best-empty",children:"—"})}),e.jsx("div",{className:"bench-row-paper",role:"cell",children:l.best_paper_route&&l.best_paper_title?e.jsx(C,{to:`/paper/${encodeURIComponent(l.best_paper_route)}`,children:l.best_paper_title}):e.jsx("span",{className:"bench-row-best-empty",children:"—"})}),e.jsx("div",{className:"bench-row-code",role:"cell",children:l.best_code_url?e.jsx("a",{href:l.best_code_url,target:"_blank",rel:"noopener noreferrer","aria-label":`Code for ${l.best_paper_title||l.best_model_name}`,children:e.jsx(Ss,{size:18,strokeWidth:1.8,"aria-hidden":"true"})}):e.jsx("span",{className:"bench-row-best-empty",children:"—"})}),e.jsx("div",{className:"bench-row-compare",role:"cell",children:e.jsxs(C,{to:h(l.slug||l.id,a),"aria-label":`Compare ${l.best_model_name||"the best model"} with all results on ${l.name}`,children:[e.jsx("span",{children:"See all"}),e.jsx(re,{size:11,strokeWidth:2,"aria-hidden":"true"})]})})]},s)})]}),q.length>5&&e.jsx("button",{type:"button",className:"bench-show-more",onClick:()=>T(s=>!s),children:j?"− show top 5":`+ show ${Xe} more benchmarks`})]}),es&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"task-section-head",style:ge?{marginTop:36}:void 0,children:[e.jsx("div",{className:"task-section-eyebrow",children:Ze?"Benchmarks by capability":"Task hierarchy"}),e.jsxs("div",{className:"task-section-title",children:["Subtasks ",e.jsxs("span",{className:"meta",children:["[",M.length,"]"]})]})]}),e.jsx("div",{className:"subtask-grid",children:M.map(s=>{const t=L.get(s.id)||[],d=R.has(s.id),S=d?t:t.slice(0,ee),w=t.length-ee;return e.jsxs("div",{className:"subtask-section",children:[e.jsxs("div",{className:"subtask-head",children:[e.jsx(C,{to:`/tasks/${s.slug||s.id}`,className:"subtask-head-name",children:O(s.name,s.slug)}),e.jsx("span",{className:"subtask-head-meta",children:t.length>0?`[${t.length} benchmark${t.length===1?"":"s"}]`:`[${(s.paper_count??0).toLocaleString()} papers]`})]}),S.length>0?S.map((l,v)=>e.jsxs("div",{className:"bench-row",onClick:()=>c(h(l.slug||l.id,s.slug||s.id)),children:[e.jsx("div",{className:"bench-row-num",children:String(v+1).padStart(2,"0")}),e.jsxs("div",{className:"bench-row-main",children:[e.jsx("div",{className:"bench-row-name",children:l.name}),e.jsx("div",{className:"bench-row-sub",children:l.paper_count!=null&&e.jsxs("span",{children:[e.jsx("strong",{children:l.paper_count})," ENTRIES"]})})]}),e.jsx("div",{className:"bench-row-arrow",children:"→"})]},l.id)):e.jsxs(C,{to:`/tasks/${s.slug||s.id}`,className:"subtask-summary",children:[e.jsxs("span",{children:[(s.paper_count??0).toLocaleString()," papers"]}),s.description&&e.jsx("span",{className:"subtask-summary-desc",children:s.description})]}),w>0&&e.jsx("button",{type:"button",className:"bench-show-more",onClick:()=>as(s.id),children:d?`− show top ${ee}`:`+ show ${w} more benchmark${w===1?"":"s"}`})]},s.id)})})]}),e.jsxs("div",{className:"task-section-head",style:{marginTop:36},children:[e.jsx("div",{className:"task-section-eyebrow",children:"Top trending · sort below"}),e.jsxs("div",{className:"task-section-title",children:["Papers ",e.jsxs("span",{className:"meta",children:["[",(g.paper_count??0).toLocaleString(),"]"]})]})]}),e.jsxs("div",{className:"sort-bar",children:[e.jsxs("div",{className:"paper-feed-toolbar-controls",children:[e.jsx("div",{className:"sort-options",children:Js.map(([s,t])=>e.jsx("button",{className:`sort-btn ${i===s?"active":""}`,onClick:()=>b(s),children:t},s))}),e.jsx(bs,{hasCode:o,hasHfArtifacts:m,onHasCodeChange:x,onHasHfArtifactsChange:N})]}),e.jsx(js,{startDate:p.startDate,endDate:p.endDate,onChange:s=>n(_s(r,s))})]}),_.isLoading?e.jsx("div",{className:"paper-list",children:Array.from({length:4}).map((s,t)=>e.jsx(U,{className:"h-40 w-full"},t))}):B.length===0?e.jsx("div",{className:"no-results",children:"No papers in this task yet."}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"paper-list",children:B.map((s,t)=>e.jsx(hs,{paper:s,rank:t+1},s.id))}),e.jsx("div",{ref:Ke,style:{height:1}}),_.isFetchingNextPage&&e.jsx("div",{style:{padding:"20px 0",textAlign:"center",color:"var(--ink-faint)"},children:"Loading more…"})]})]}),e.jsxs("aside",{className:"task-side",children:[Y.length>0&&g.slug!=="healthcare"&&e.jsxs("div",{className:"side-block",children:[e.jsx("div",{className:"side-block-num",children:"01/"}),e.jsx("div",{className:"side-block-label",children:"Sister Tasks"}),Y.slice(0,8).map(s=>e.jsxs(C,{to:`/tasks/${s.slug||s.id}`,className:"side-link-row",children:[e.jsx("span",{children:O(s.name,s.slug)}),s.paper_count!=null&&e.jsx("span",{className:"count",children:s.paper_count.toLocaleString()})]},s.id))]}),F.length>0&&e.jsxs("div",{className:"side-block",children:[e.jsx("div",{className:"side-block-num",children:"02/"}),e.jsx("div",{className:"side-block-label",children:"Common Methods"}),F.map(s=>e.jsxs("div",{className:"side-method-row",children:[e.jsx(us,{method:{slug:s.slug,name:s.name}}),e.jsxs("span",{className:"num",children:["·",s.count]})]},s.id))]})]})]})]})};export{ta as HealthcareMedicalAiHub,sa as RecommendedFrameworkLinks,aa as TaskBreadcrumb,Fa as default}; +import{j as e,L as C,r as u,q as ae,p as H,a1 as ke,t as Ne,P as ts,w as we,s as Ce,a2 as rs,F as k,a3 as ns,z as os,x as te,u as cs,b as is,d as ls,k as ds,V as ms}from"./index-B7UoLEbn.js";import{R as ps}from"./ResearchFollowButton-C31U0bn3.js";import{u as je}from"./useQuery-DV2f4JpC.js";import{P as hs,M as us}from"./components-Cax1Inob.js";import{A as re,T as gs}from"./trophy-Dv8UTCAs.js";import{B as xs}from"./BenchmarkTrendSparkline-DoEe-tuL.js";import{P as bs}from"./PaperFeedFilters-CF3OKsFW.js";import{a as fs,P as js,b as _s}from"./PaperDateFilter-CGG1OZi6.js";import{M as Z}from"./MarkdownText-DH4XnT47.js";import{c as _e}from"./catalog-DcbS_7_L.js";import{s as vs}from"./slug-BpH-Nkvz.js";import{d as O,t as ks}from"./colors-COYRNy-F.js";import{c as Ns}from"./usePapers-CDuTKuAc.js";import{u as ws}from"./useIntersectionObserver-DOCspj7m.js";import{S as U}from"./skeleton-DLsINbKq.js";import{A as Cs,a as ys}from"./alert-B3UHHG00.js";import{C as As}from"./chevron-down-CF7sS93G.js";import{G as Ss}from"./github-CVI7-Ls5.js";import"./useMutation-CuaM6sOT.js";import"./research-D7aSz-AO.js";import"./plus-BvN48Xkz.js";import"./paperQueryKeys-BP2E-0yf.js";import"./LatexTitle-CeC5Gqpu.js";import"./papers-Ctf2uv0o.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-BOnBmrXi.js";/* empty css */import"./PaperPreviewLink-C5ianbW8.js";import"./index-tHVWANW1.js";import"./index-ClEBI70O.js";import"./katex-DkKDou_j.js";import"./hover-card-BM8a6wEE.js";import"./useInfiniteQuery-CoFrg4GN.js";const Ps=()=>e.jsxs(C,{to:"/astra-for-robotics",className:"task-featured-collection","aria-label":"Featured collection: GPT-6 Astra for Robotics",children:[e.jsx("span",{className:"task-featured-collection-eyebrow",children:"Featured collection"}),e.jsx("strong",{children:"GPT-6 Astra for Robotics"}),e.jsx("span",{className:"task-featured-collection-description",children:"Papers and demos that put GPT-6 Astra in control of real and simulated robots, as the policy itself or as an agent orchestrating the stack."}),e.jsxs("span",{className:"task-featured-collection-meta",children:["Explore the collection",e.jsx(re,{size:14,"aria-hidden":"true"})]})]}),ve=a=>{const c=a.match(/\(([^()]*)\)\s*$/);return c?c[1].split(",").map(r=>r.trim()).filter(Boolean):[]};function Rs(a,c){const r=ve(a);if(c===void 0)return"standard";const n=new Set(ve(c).map(o=>o.toLowerCase())),i=r.filter(o=>!n.has(o.toLowerCase()));return i.length?i.join(", "):a}function Is(a,c){const r=new Map(a.map(o=>[o.id,o])),n=o=>{const m=new Set([o.id]);let p=o;for(;;){const b=c(p),x=b?r.get(b):void 0;if(!x)return p.id;if(m.has(x.id))return o.id;m.add(x.id),p=x}},i=new Map;return a.forEach(o=>{const m=n(o);i.set(m,[...i.get(m)||[],o])}),[...i].map(([o,m])=>({key:o,members:[r.get(o),...m.filter(p=>p.id!==o)]}))}var G="Collapsible",[Es,ye]=we(G),[Ts,ne]=Es(G),Ae=u.forwardRef((a,c)=>{const{__scopeCollapsible:r,open:n,defaultOpen:i,disabled:o,onOpenChange:m,...p}=a,[b,x]=ae({prop:n,defaultProp:i??!1,onChange:m,caller:G});return e.jsx(Ts,{scope:r,disabled:o,contentId:ke(),open:b,onOpenToggle:u.useCallback(()=>x(N=>!N),[x]),children:e.jsx(H.div,{"data-state":ce(b),"data-disabled":o?"":void 0,...p,ref:c})})});Ae.displayName=G;var Se="CollapsibleTrigger",Pe=u.forwardRef((a,c)=>{const{__scopeCollapsible:r,...n}=a,i=ne(Se,r);return e.jsx(H.button,{type:"button","aria-controls":i.contentId,"aria-expanded":i.open||!1,"data-state":ce(i.open),"data-disabled":i.disabled?"":void 0,disabled:i.disabled,...n,ref:c,onClick:Ne(a.onClick,i.onOpenToggle)})});Pe.displayName=Se;var oe="CollapsibleContent",Re=u.forwardRef((a,c)=>{const{forceMount:r,...n}=a,i=ne(oe,a.__scopeCollapsible);return e.jsx(ts,{present:r||i.open,children:({present:o})=>e.jsx(Ms,{...n,ref:c,present:o})})});Re.displayName=oe;var Ms=u.forwardRef((a,c)=>{const{__scopeCollapsible:r,present:n,children:i,...o}=a,m=ne(oe,r),[p,b]=u.useState(n),x=u.useRef(null),N=Ce(c,x),j=u.useRef(0),T=j.current,P=u.useRef(0),$=P.current,R=m.open||p,I=u.useRef(R),E=u.useRef(void 0);return u.useEffect(()=>{const h=requestAnimationFrame(()=>I.current=!1);return()=>cancelAnimationFrame(h)},[]),rs(()=>{const h=x.current;if(h){E.current=E.current||{transitionDuration:h.style.transitionDuration,animationName:h.style.animationName},h.style.transitionDuration="0s",h.style.animationName="none";const y=h.getBoundingClientRect();j.current=y.height,P.current=y.width,I.current||(h.style.transitionDuration=E.current.transitionDuration,h.style.animationName=E.current.animationName),b(n)}},[m.open,n]),e.jsx(H.div,{"data-state":ce(m.open),"data-disabled":m.disabled?"":void 0,id:m.contentId,hidden:!R,...o,ref:N,style:{"--radix-collapsible-content-height":T?`${T}px`:void 0,"--radix-collapsible-content-width":$?`${$}px`:void 0,...a.style},children:R&&i})});function ce(a){return a?"open":"closed"}var $s=Ae,Ds=Pe,Bs=Re,A="Accordion",Fs=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[ie,Ls,Os]=ns(A),[K]=we(A,[Os,ye]),le=ye(),Ie=k.forwardRef((a,c)=>{const{type:r,...n}=a,i=n,o=n;return e.jsx(ie.Provider,{scope:a.__scopeAccordion,children:r==="multiple"?e.jsx(Us,{...o,ref:c}):e.jsx(qs,{...i,ref:c})})});Ie.displayName=A;var[Ee,Hs]=K(A),[Te,Vs]=K(A,{collapsible:!1}),qs=k.forwardRef((a,c)=>{const{value:r,defaultValue:n,onValueChange:i=()=>{},collapsible:o=!1,...m}=a,[p,b]=ae({prop:r,defaultProp:n??"",onChange:i,caller:A});return e.jsx(Ee,{scope:a.__scopeAccordion,value:k.useMemo(()=>p?[p]:[],[p]),onItemOpen:b,onItemClose:k.useCallback(()=>o&&b(""),[o,b]),children:e.jsx(Te,{scope:a.__scopeAccordion,collapsible:o,children:e.jsx(Me,{...m,ref:c})})})}),Us=k.forwardRef((a,c)=>{const{value:r,defaultValue:n,onValueChange:i=()=>{},...o}=a,[m,p]=ae({prop:r,defaultProp:n??[],onChange:i,caller:A}),b=k.useCallback(N=>p((j=[])=>[...j,N]),[p]),x=k.useCallback(N=>p((j=[])=>j.filter(T=>T!==N)),[p]);return e.jsx(Ee,{scope:a.__scopeAccordion,value:m,onItemOpen:b,onItemClose:x,children:e.jsx(Te,{scope:a.__scopeAccordion,collapsible:!0,children:e.jsx(Me,{...o,ref:c})})})}),[zs,Q]=K(A),Me=k.forwardRef((a,c)=>{const{__scopeAccordion:r,disabled:n,dir:i,orientation:o="vertical",...m}=a,p=k.useRef(null),b=Ce(p,c),x=Ls(r),j=os(i)==="ltr",T=Ne(a.onKeyDown,P=>{var _;if(!Fs.includes(P.key))return;const $=P.target,R=x().filter(B=>{var F;return!((F=B.ref.current)!=null&&F.disabled)}),I=R.findIndex(B=>B.ref.current===$),E=R.length;if(I===-1)return;P.preventDefault();let h=I;const y=0,f=E-1,D=()=>{h=I+1,h>f&&(h=y)},M=()=>{h=I-1,h{const{__scopeAccordion:r,value:n,...i}=a,o=Q(z,r),m=Hs(z,r),p=le(r),b=ke(),x=n&&m.value.includes(n)||!1,N=o.disabled||a.disabled;return e.jsx(Gs,{scope:r,open:x,disabled:N,triggerId:b,children:e.jsx($s,{"data-orientation":o.orientation,"data-state":He(x),...p,...i,ref:c,disabled:N,open:x,onOpenChange:j=>{j?m.onItemOpen(n):m.onItemClose(n)}})})});$e.displayName=z;var De="AccordionHeader",Be=k.forwardRef((a,c)=>{const{__scopeAccordion:r,...n}=a,i=Q(A,r),o=de(De,r);return e.jsx(H.h3,{"data-orientation":i.orientation,"data-state":He(o.open),"data-disabled":o.disabled?"":void 0,...n,ref:c})});Be.displayName=De;var se="AccordionTrigger",Fe=k.forwardRef((a,c)=>{const{__scopeAccordion:r,...n}=a,i=Q(A,r),o=de(se,r),m=Vs(se,r),p=le(r);return e.jsx(ie.ItemSlot,{scope:r,children:e.jsx(Ds,{"aria-disabled":o.open&&!m.collapsible||void 0,"data-orientation":i.orientation,id:o.triggerId,...p,...n,ref:c})})});Fe.displayName=se;var Le="AccordionContent",Oe=k.forwardRef((a,c)=>{const{__scopeAccordion:r,...n}=a,i=Q(A,r),o=de(Le,r),m=le(r);return e.jsx(Bs,{role:"region","aria-labelledby":o.triggerId,"data-orientation":i.orientation,...m,...n,ref:c,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...a.style}})});Oe.displayName=Le;function He(a){return a?"open":"closed"}var Ks=Ie,Qs=$e,Ws=Be,Ve=Fe,qe=Oe;const Ys=Ks,Ue=u.forwardRef(({className:a,...c},r)=>e.jsx(Qs,{ref:r,className:te("border-b",a),...c}));Ue.displayName="AccordionItem";const ze=u.forwardRef(({className:a,children:c,...r},n)=>e.jsx(Ws,{className:"flex",children:e.jsxs(Ve,{ref:n,className:te("flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",a),...r,children:[c,e.jsx(As,{className:"h-4 w-4 shrink-0 transition-transform duration-200"})]})}));ze.displayName=Ve.displayName;const Ge=u.forwardRef(({className:a,children:c,...r},n)=>e.jsx(qe,{ref:n,className:"overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...r,children:e.jsx("div",{className:te("pb-4 pt-0",a),children:c})}));Ge.displayName=qe.displayName;const Js=[["trending","trending"],["date_published","newest"],["citation_count","most cited"]],Xs=a=>a==="trending"||a==="date_published"||a==="citation_count"?a:"trending",ee=3,Zs=[{slug:"healthcare",eyebrow:"Clinical systems",title:"Clinical AI & Healthcare",description:"Agents, clinical workflows, medical calculators, safety, and decision support.",href:"#benchmarks"},{slug:"medical-question-answering",eyebrow:"Language & reasoning",title:"Medical Question Answering",description:"Medical exams, biomedical evidence, clinical comprehension, and explanations.",href:"/tasks/medical-question-answering"},{slug:"medical-imaging",eyebrow:"Vision",title:"Medical Imaging",description:"Radiology, pathology, ophthalmology, ultrasound, and diagnostic imaging.",href:"/tasks/medical-imaging"},{slug:"medical-visual-question-answering",eyebrow:"Multimodal",title:"Medical Visual Question Answering",description:"Questions grounded in radiology, pathology, and other biomedical images.",href:"/tasks/medical-visual-question-answering"}],ea=a=>new Intl.NumberFormat("en",{notation:a>=1e3?"compact":"standard",maximumFractionDigits:1}).format(a),sa=({frameworks:a})=>a.length===0?null:e.jsxs("div",{className:"task-framework-links",children:[e.jsx("span",{className:"task-framework-links-label",children:"Recommended frameworks"}),a.map(c=>e.jsxs(C,{to:`/papers?framework=${encodeURIComponent(c.framework_slug)}`,className:"task-framework-link",children:[e.jsx("span",{children:c.framework_name}),e.jsxs("span",{className:"task-framework-link-stars",children:["★ ",ea(c.num_stars)]})]},c.framework_id))]}),aa=({task:a,area:c,parents:r})=>e.jsxs("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:[e.jsx(C,{to:"/tasks",children:"Tasks"}),c&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"sep",children:"/"}),e.jsx(C,{to:`/tasks#area-${vs(c.name)}`,children:c.name})]}),[...r].reverse().map(n=>e.jsxs(k.Fragment,{children:[e.jsx("span",{className:"sep",children:"/"}),e.jsx(C,{to:`/tasks/${n.slug||n.id}`,children:O(n.name,n.slug)})]},n.id)),e.jsx("span",{className:"sep",children:"/"}),e.jsx("span",{style:{color:"var(--accent-text)"},children:O(a.name,a.slug)})]}),ta=({task:a,relatedTasks:c})=>{const r=new Map([a,...c].map(n=>[n.slug,n]));return e.jsxs("section",{className:"medical-ai-hub","aria-labelledby":"medical-ai-hub-title",children:[e.jsxs("div",{className:"medical-ai-hub-heading",children:[e.jsx("span",{children:"Medical AI directory"}),e.jsx("h2",{id:"medical-ai-hub-title",children:"Explore Healthcare & Medical AI"}),e.jsx("p",{children:"Browse the field by clinical application, language, vision, or multimodal reasoning."})]}),e.jsx("div",{className:"medical-ai-hub-grid",children:Zs.map(n=>{const i=r.get(n.slug),o=e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"medical-ai-hub-card-eyebrow",children:n.eyebrow}),e.jsx("strong",{children:n.title}),e.jsx("span",{className:"medical-ai-hub-card-description",children:n.description}),e.jsxs("span",{className:"medical-ai-hub-card-meta",children:[(i==null?void 0:i.paper_count)!=null?`${i.paper_count.toLocaleString()} papers`:"Explore task",e.jsx(re,{size:14,"aria-hidden":"true"})]})]});return n.slug==="healthcare"?e.jsx("a",{href:n.href,className:"medical-ai-hub-card",children:o},n.slug):e.jsx(C,{to:n.href,className:"medical-ai-hub-card",children:o},n.slug)})})]})},ra=a=>[...a].sort((c,r)=>{const n=c.slug==="classic-language-modeling",i=r.slug==="classic-language-modeling";return n!==i?n?1:-1:0}),Fa=()=>{var xe,be,fe;const{taskSlug:a}=cs(),c=is(),[r,n]=ls(),i=Xs(r.get("order_by")),o=r.get("has_code")==="true",m=r.get("has_hf_artifacts")==="true",p=fs(r),b=s=>{const t=new URLSearchParams(r);t.set("order_by",s),n(t)},x=s=>{const t=new URLSearchParams(r);s?t.set("has_code","true"):t.delete("has_code"),n(t)},N=s=>{const t=new URLSearchParams(r);s?t.set("has_hf_artifacts","true"):t.delete("has_hf_artifacts"),n(t)},[j,T]=u.useState(!1),[P,$]=u.useState({}),[R,I]=u.useState(()=>new Set),{preferences:E}=ds(),h=(s,t)=>{const d=s||"";return t?`/benchmark/${d}?task=${encodeURIComponent(t)}`:`/benchmark/${d}`},y=E.hide_closed_source_evals?!0:void 0,f=je({queryKey:["task-page",a,y],queryFn:()=>_e.taskPage(a,{is_open:y}),enabled:!!a,staleTime:10*60*1e3});u.useEffect(()=>{var d;const s=(d=f.data)==null?void 0:d.task.slug;if(!a||!s||s===a)return;const t=r.toString();c(`/tasks/${s}${t?`?${t}`:""}`,{replace:!0})},[c,(xe=f.data)==null?void 0:xe.task.slug,r,a]);const D=je({queryKey:["task-benchmark-trends",a,y],queryFn:()=>_e.trendingBenchmarks(a,{limit:100,min_recent_papers:0,is_open:y}),enabled:!!a,staleTime:10*60*1e3}),M=u.useMemo(()=>{var s;return ra(((s=f.data)==null?void 0:s.children)||[])},[f.data]),L=u.useMemo(()=>{var t;const s=new Map;return(((t=f.data)==null?void 0:t.subtask_benchmarks)||[]).forEach(d=>{s.set(d.subtask_id,d.benchmarks||[])}),s},[f.data]),_=Ns({taskId:a||"",page_size:20,order_by:i,order_dir:"desc",include_resources:!0,has_code:o,has_hf_artifacts:m,start_date:p.startDate,end_date:p.endDate,enabled:!!a}),B=u.useMemo(()=>{var t;return(((t=_.data)==null?void 0:t.pages.flatMap(d=>d.results))||[]).map(ks)},[_.data]),F=u.useMemo(()=>{var t;const s={};return(t=_.data)==null||t.pages.forEach(d=>d.results.forEach(S=>(S.methods||[]).forEach(w=>{const l=w.slug||w.id;s[l]||(s[l]={id:w.id,name:w.name,slug:w.slug||"",count:0}),s[l].count++}))),Object.values(s).sort((d,S)=>S.count-d.count).slice(0,8)},[_.data]),{targetRef:Ke,isIntersecting:me}=ws({rootMargin:"200px"});if(u.useEffect(()=>{me&&_.hasNextPage&&!_.isFetchingNextPage&&_.fetchNextPage()},[me,_.hasNextPage,_.isFetchingNextPage]),f.isLoading)return e.jsxs("div",{className:"page",children:[e.jsx(U,{className:"h-12 w-1/2 mb-4"}),e.jsx(U,{className:"h-6 w-1/3 mb-8"}),e.jsx(U,{className:"h-64 w-full"})]});if(f.error||!f.data)return e.jsx("div",{className:"page",children:e.jsx(Cs,{variant:"destructive",children:e.jsx(ys,{children:"Task not found."})})});const g=f.data.task,Qe=f.data.parents||[],W=O(g.name,g.slug),Y=(f.data.sisters||[]).filter(s=>s.id!==g.id),We=f.data.recommended_frameworks||[],V=f.data.benchmarks||[],pe=new Map(V.map(s=>[s.id,s])),Ye=new Set(V.map(s=>s.id)),he=(((be=D.data)==null?void 0:be.results)||[]).filter(s=>Ye.has(s.id)).map(s=>{const t=pe.get(s.id);return{...s,best_model_name:(t==null?void 0:t.best_model_name)??s.best_model_name,best_paper_route:t==null?void 0:t.best_paper_route,best_paper_title:t==null?void 0:t.best_paper_title,best_code_url:t==null?void 0:t.best_code_url}}),J=he.length?he:V.map(s=>({id:s.id,name:s.name,slug:s.slug,full_name:s.full_name,recent_paper_count:0,baseline_paper_count:0,all_time_paper_count:s.paper_count||0,trend_score:0,support_weighted_score:0,rate_change:null,latest_reported_on:null,best_model_name:s.best_model_name,best_paper_route:s.best_paper_route,best_paper_title:s.best_paper_title,best_code_url:s.best_code_url,history:[]})),q=Is(J,s=>{var t;return(t=pe.get(s.id))==null?void 0:t.parent_dataset_id}),Je=j?q:q.slice(0,5),Xe=q.slice(5).reduce((s,t)=>s+t.members.length,0),ue=((fe=D.data)==null?void 0:fe.recent_days)||90,Ze=M.some(s=>(L.get(s.id)||[]).length>0),es=M.length>0,ge=J.length>0,ss=(()=>{const s=new Set;return V.forEach(t=>s.add(t.id)),L.forEach(t=>t.forEach(d=>s.add(d.id))),s.size})(),as=s=>{I(t=>{const d=new Set(t);return d.has(s)?d.delete(s):d.add(s),d})};return e.jsxs("div",{className:"page",children:[e.jsx(aa,{task:g,area:f.data.area,parents:Qe}),e.jsxs("div",{className:g.image_url?"task-hero-grid":void 0,children:[e.jsxs("div",{children:[e.jsx("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--accent-text)",letterSpacing:"0.1em",marginBottom:8},children:"TASK"}),e.jsx("h1",{className:"domain-mega-title",children:W}),e.jsx(ps,{kind:"task",entityId:g.id}),g.description&&e.jsx(Z,{className:"task-explainer",text:g.description}),g.research_trends&&g.research_trends.length>0&&e.jsx(Ys,{className:"task-research-trends",type:"single",collapsible:!0,children:e.jsxs(Ue,{className:"task-research-trends-item",value:"key-trends",children:[e.jsx(ze,{className:"task-research-trends-trigger",children:e.jsx("span",{className:"task-research-trends-title",children:"Key trends"})}),e.jsx(Ge,{className:"task-research-trends-content",children:e.jsx("ul",{children:g.research_trends.map((s,t)=>e.jsx("li",{children:e.jsx(Z,{text:s})},t))})})]})}),e.jsxs("div",{className:"task-quickstats",children:[e.jsxs("span",{children:[e.jsx("span",{className:"num",children:(g.paper_count??0).toLocaleString()}),"PAPERS"]}),e.jsxs("span",{children:[e.jsx("span",{className:"num",children:ss}),"BENCHMARKS"]}),e.jsxs("span",{children:[e.jsxs("span",{className:"num",children:[F.length,"+"]}),"METHODS USED"]})]}),e.jsx(sa,{frameworks:We})]}),g.image_url&&e.jsxs("figure",{className:`task-figure-card${g.slug==="omni-models"?" task-figure-card--compact":""}`,children:[e.jsx("div",{className:"task-figure-img-wrap",children:e.jsx("img",{className:"task-figure-img",src:ms(g.image_url)??void 0,alt:`${W} schematic`,onError:s=>{var t,d;(d=(t=s.currentTarget.parentElement)==null?void 0:t.parentElement)==null||d.style.setProperty("display","none")}})}),e.jsxs("figcaption",{children:["Figure · ",W,g.image_credit&&e.jsxs(e.Fragment,{children:[e.jsx("br",{}),e.jsx(Z,{className:"task-image-credit",text:g.image_credit})]})]})]})]}),g.slug==="healthcare"&&e.jsx(ta,{task:g,relatedTasks:Y}),g.slug==="robotics"&&e.jsx(Ps,{}),e.jsxs("div",{className:"task-page-grid",style:{marginTop:28},children:[e.jsxs("div",{children:[ge&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"task-section-head",id:"benchmarks",children:[e.jsxs("div",{className:"task-section-eyebrow",children:[ue,"-day reporting activity · select a benchmark"]}),e.jsxs("div",{className:"task-section-title",children:["Benchmarks ",e.jsxs("span",{className:"meta",children:["[",J.length,"]"]})]})]}),e.jsxs("div",{className:"benchmark-trend-table",role:"table","aria-label":"Trending benchmarks",children:[e.jsxs("div",{className:"benchmark-trend-head",role:"row",children:[e.jsx("span",{role:"columnheader",children:"Trend"}),e.jsx("span",{role:"columnheader",children:"Benchmark"}),e.jsx("span",{role:"columnheader",children:"Best model"}),e.jsx("span",{role:"columnheader",children:"Paper title"}),e.jsx("span",{role:"columnheader",children:"Code"}),e.jsx("span",{role:"columnheader",children:"Compare"})]}),Je.map(({key:s,members:t})=>{const d=t[0],S=v=>v===d?"standard":Rs(v.name,d.name),w=[d,...t.slice(1).sort((v,X)=>S(v).localeCompare(S(X),void 0,{sensitivity:"base"}))],l=w.find(v=>v.id===P[s])??d;return e.jsxs("div",{className:"benchmark-trend-row",role:"row",children:[e.jsxs("div",{className:"benchmark-trend-cell",role:"cell",children:[e.jsx(xs,{history:l.history,benchmarkName:l.name}),e.jsxs("div",{className:"benchmark-trend-meta",children:[e.jsxs("span",{children:[e.jsx("strong",{children:l.recent_paper_count})," ",l.recent_paper_count===1?"paper":"papers"," /"," ",ue,"d"]}),l.rate_change==null?l.recent_paper_count>0&&e.jsx("span",{className:"benchmark-trend-change is-new",children:"new"}):e.jsxs("span",{className:`benchmark-trend-change ${l.rate_change>=1?"is-up":"is-down"}`,children:[l.rate_change>=1?"↑":"↓"," ",l.rate_change.toFixed(1),"×"]})]})]}),e.jsxs("div",{className:"benchmark-trend-benchmark",role:"cell",children:[e.jsx(C,{className:"bench-row-name",to:h(l.slug||l.id,a),children:l.name}),w.length>1&&e.jsx("div",{className:"bench-row-variants",role:"group","aria-label":`Evaluation protocols for ${d.name}`,children:w.map(v=>e.jsx("button",{type:"button",className:"bench-row-variant","aria-pressed":v.id===l.id,title:v.name,onClick:()=>$(X=>({...X,[s]:v.id})),children:S(v)},v.id))}),e.jsx("div",{className:"bench-row-sub",children:e.jsxs("span",{children:[e.jsx("strong",{children:l.all_time_paper_count})," reporting papers"]})})]}),e.jsx("div",{className:"bench-row-best",role:"cell",children:l.best_model_name?e.jsxs(e.Fragment,{children:[e.jsx(gs,{size:13,className:"bench-row-best-icon"}),e.jsx("span",{className:"bench-row-best-name",children:l.best_model_name})]}):e.jsx("span",{className:"bench-row-best-empty",children:"—"})}),e.jsx("div",{className:"bench-row-paper",role:"cell",children:l.best_paper_route&&l.best_paper_title?e.jsx(C,{to:`/paper/${encodeURIComponent(l.best_paper_route)}`,children:l.best_paper_title}):e.jsx("span",{className:"bench-row-best-empty",children:"—"})}),e.jsx("div",{className:"bench-row-code",role:"cell",children:l.best_code_url?e.jsx("a",{href:l.best_code_url,target:"_blank",rel:"noopener noreferrer","aria-label":`Code for ${l.best_paper_title||l.best_model_name}`,children:e.jsx(Ss,{size:18,strokeWidth:1.8,"aria-hidden":"true"})}):e.jsx("span",{className:"bench-row-best-empty",children:"—"})}),e.jsx("div",{className:"bench-row-compare",role:"cell",children:e.jsxs(C,{to:h(l.slug||l.id,a),"aria-label":`Compare ${l.best_model_name||"the best model"} with all results on ${l.name}`,children:[e.jsx("span",{children:"See all"}),e.jsx(re,{size:11,strokeWidth:2,"aria-hidden":"true"})]})})]},s)})]}),q.length>5&&e.jsx("button",{type:"button",className:"bench-show-more",onClick:()=>T(s=>!s),children:j?"− show top 5":`+ show ${Xe} more benchmarks`})]}),es&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"task-section-head",style:ge?{marginTop:36}:void 0,children:[e.jsx("div",{className:"task-section-eyebrow",children:Ze?"Benchmarks by capability":"Task hierarchy"}),e.jsxs("div",{className:"task-section-title",children:["Subtasks ",e.jsxs("span",{className:"meta",children:["[",M.length,"]"]})]})]}),e.jsx("div",{className:"subtask-grid",children:M.map(s=>{const t=L.get(s.id)||[],d=R.has(s.id),S=d?t:t.slice(0,ee),w=t.length-ee;return e.jsxs("div",{className:"subtask-section",children:[e.jsxs("div",{className:"subtask-head",children:[e.jsx(C,{to:`/tasks/${s.slug||s.id}`,className:"subtask-head-name",children:O(s.name,s.slug)}),e.jsx("span",{className:"subtask-head-meta",children:t.length>0?`[${t.length} benchmark${t.length===1?"":"s"}]`:`[${(s.paper_count??0).toLocaleString()} papers]`})]}),S.length>0?S.map((l,v)=>e.jsxs("div",{className:"bench-row",onClick:()=>c(h(l.slug||l.id,s.slug||s.id)),children:[e.jsx("div",{className:"bench-row-num",children:String(v+1).padStart(2,"0")}),e.jsxs("div",{className:"bench-row-main",children:[e.jsx("div",{className:"bench-row-name",children:l.name}),e.jsx("div",{className:"bench-row-sub",children:l.paper_count!=null&&e.jsxs("span",{children:[e.jsx("strong",{children:l.paper_count})," ENTRIES"]})})]}),e.jsx("div",{className:"bench-row-arrow",children:"→"})]},l.id)):e.jsxs(C,{to:`/tasks/${s.slug||s.id}`,className:"subtask-summary",children:[e.jsxs("span",{children:[(s.paper_count??0).toLocaleString()," papers"]}),s.description&&e.jsx("span",{className:"subtask-summary-desc",children:s.description})]}),w>0&&e.jsx("button",{type:"button",className:"bench-show-more",onClick:()=>as(s.id),children:d?`− show top ${ee}`:`+ show ${w} more benchmark${w===1?"":"s"}`})]},s.id)})})]}),e.jsxs("div",{className:"task-section-head",style:{marginTop:36},children:[e.jsx("div",{className:"task-section-eyebrow",children:"Top trending · sort below"}),e.jsxs("div",{className:"task-section-title",children:["Papers ",e.jsxs("span",{className:"meta",children:["[",(g.paper_count??0).toLocaleString(),"]"]})]})]}),e.jsxs("div",{className:"sort-bar",children:[e.jsxs("div",{className:"paper-feed-toolbar-controls",children:[e.jsx("div",{className:"sort-options",children:Js.map(([s,t])=>e.jsx("button",{className:`sort-btn ${i===s?"active":""}`,onClick:()=>b(s),children:t},s))}),e.jsx(bs,{hasCode:o,hasHfArtifacts:m,onHasCodeChange:x,onHasHfArtifactsChange:N})]}),e.jsx(js,{startDate:p.startDate,endDate:p.endDate,onChange:s=>n(_s(r,s))})]}),_.isLoading?e.jsx("div",{className:"paper-list",children:Array.from({length:4}).map((s,t)=>e.jsx(U,{className:"h-40 w-full"},t))}):B.length===0?e.jsx("div",{className:"no-results",children:"No papers in this task yet."}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"paper-list",children:B.map((s,t)=>e.jsx(hs,{paper:s,rank:t+1},s.id))}),e.jsx("div",{ref:Ke,style:{height:1}}),_.isFetchingNextPage&&e.jsx("div",{style:{padding:"20px 0",textAlign:"center",color:"var(--ink-faint)"},children:"Loading more…"})]})]}),e.jsxs("aside",{className:"task-side",children:[Y.length>0&&g.slug!=="healthcare"&&e.jsxs("div",{className:"side-block",children:[e.jsx("div",{className:"side-block-num",children:"01/"}),e.jsx("div",{className:"side-block-label",children:"Sister Tasks"}),Y.slice(0,8).map(s=>e.jsxs(C,{to:`/tasks/${s.slug||s.id}`,className:"side-link-row",children:[e.jsx("span",{children:O(s.name,s.slug)}),s.paper_count!=null&&e.jsx("span",{className:"count",children:s.paper_count.toLocaleString()})]},s.id))]}),F.length>0&&e.jsxs("div",{className:"side-block",children:[e.jsx("div",{className:"side-block-num",children:"02/"}),e.jsx("div",{className:"side-block-label",children:"Common Methods"}),F.map(s=>e.jsxs("div",{className:"side-method-row",children:[e.jsx(us,{method:{slug:s.slug,name:s.name}}),e.jsxs("span",{className:"num",children:["·",s.count]})]},s.id))]})]})]})]})};export{ta as HealthcareMedicalAiHub,sa as RecommendedFrameworkLinks,aa as TaskBreadcrumb,Fa as default}; diff --git a/assets/TagsIndexView-Dq1B1h6G.js b/assets/TagsIndexView-D9ct36Oa.js similarity index 83% rename from assets/TagsIndexView-Dq1B1h6G.js rename to assets/TagsIndexView-D9ct36Oa.js index b512ec43ca94a45d0deac8e8690a029c4962184d..98160124986240269b2a3b4424106fad0bd97106 100644 --- a/assets/TagsIndexView-Dq1B1h6G.js +++ b/assets/TagsIndexView-D9ct36Oa.js @@ -1 +1 @@ -import{r as m,j as e,L as v}from"./index-CkeK0cDg.js";import{u as c}from"./useQuery-_Fj6Jfzr.js";import{c as p}from"./catalog-DGg7xZLW.js";import{d as y,c as k,h as _}from"./colors-DQ-VN9If.js";import{s as N}from"./slug-BpH-Nkvz.js";import{S as x}from"./skeleton-Cs8haT1C.js";import{A as T,a as w}from"./alert-Vt5eE6re.js";import{T as S}from"./TaxonomySuggestionTile-BltCio9I.js";import{T as b}from"./TaxonomyTrending-g677Z8nK.js";import"./SignInToEditDialog-CmfnGty-.js";import"./button-CsUrN-GU.js";import"./input-Cnu30n0B.js";import"./textarea-BsaJyP0o.js";import"./searchable-select-DT-5KDJe.js";import"./popover-Vq6DwYpn.js";import"./dialog-CGH-CTnE.js";import"./loader-circle-CTuL2Xdc.js";import"./useMutation-q-fdM2fm.js";import"./submissions-C-uglc0y.js";import"./plus-BaTMbqcZ.js";import"./trending-up-BKEZ18MU.js";const A=t=>(t==null?void 0:t.trim().toLowerCase().replace(/[\s_]+/g,"-"))??"",U=()=>{var u,f;const t=c({queryKey:["areas-with-tasks"],queryFn:()=>p.areasWithTasks(),staleTime:6e5}),n=c({queryKey:["trending-tasks-directory"],queryFn:()=>p.trendingTasks({limit:12,min_recent_papers:10}),staleTime:10*60*1e3}),g=c({queryKey:["areas-all"],queryFn:()=>p.listAreas({page_size:50,ordering:"name"}),staleTime:10*60*1e3}),j=m.useMemo(()=>{var r,i;const a=new Map((((r=g.data)==null?void 0:r.results)??[]).map(s=>[s.id,s.name]));return(i=n.data)==null?void 0:i.results.map(s=>({id:s.id,name:y(s.name,s.slug),href:`/tasks/${s.slug}`,areaName:s.area_id?a.get(s.area_id):void 0,recentPaperCount:s.recent_paper_count,shareLift:s.share_lift}))},[n.data,g.data]),l=m.useMemo(()=>{if(!t.data)return[];const a={general:0,vision:1,video:2,language:3,audio:4,other:5},r=i=>a[A(i)]??999;return[...t.data.results].sort((i,s)=>{const o=r(i.name),d=r(s.name);return o!==d?o-d:i.name.localeCompare(s.name)})},[t.data]);m.useEffect(()=>{var a;!t.data||n.isLoading||!window.location.hash||(a=document.getElementById(window.location.hash.slice(1)))==null||a.scrollIntoView({block:"start"})},[t.data,n.isLoading]);const h=m.useMemo(()=>l.reduce((a,r)=>a+r.tasks.length,0),[l]);return t.error?e.jsx("div",{className:"page",children:e.jsx(T,{variant:"destructive",children:e.jsx(w,{children:"Failed to load taxonomy. Please try again."})})}):e.jsxs("div",{className:"page",children:[e.jsx("div",{className:"feed-header",children:e.jsxs("div",{children:[e.jsxs("h1",{className:"feed-title",children:["All ",e.jsx("em",{children:"Domains"})]}),e.jsx("div",{className:"feed-subtitle",children:"Browse research by area. Click any task to see trending work."})]})}),e.jsx(b,{noun:"task",items:j,recentDays:(u=n.data)==null?void 0:u.recent_days,baselineDays:(f=n.data)==null?void 0:f.baseline_days,isLoading:n.isLoading,error:n.error}),t.isLoading?e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:32},children:Array.from({length:4}).map((a,r)=>e.jsxs("div",{children:[e.jsx(x,{className:"h-8 w-1/3 mb-4"}),e.jsx("div",{className:"tag-grid",children:Array.from({length:6}).map((i,s)=>e.jsx(x,{className:"h-24"},s))})]},r))}):l.map(a=>{const r=a.tasks;if(r.length===0)return null;const i=r.reduce((s,o)=>s+(o.paper_count||0),0);return e.jsxs("section",{id:`area-${N(a.name)}`,style:{marginBottom:48,scrollMarginTop:80},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:a.name}),a.description&&e.jsx("div",{style:{fontFamily:"var(--serif)",fontStyle:"italic",fontSize:13,color:"var(--ink-soft)"},children:a.description})]}),e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",whiteSpace:"nowrap"},children:[r.length," ",r.length===1?"task":"tasks"," · ",i.toLocaleString()," papers"]})]}),e.jsxs("div",{className:"tag-grid",children:[r.map(s=>{const o=s.slug||"",d=k(_(o));return e.jsxs(v,{to:`/tasks/${o}`,className:"tag-cell",children:[e.jsxs("div",{className:"name",children:[e.jsx("span",{className:"dot",style:{background:d.dot}}),y(s.name,o)]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[(s.paper_count??0).toLocaleString()," papers"]})})]},s.id)}),e.jsx(S,{kind:"task"})]})]},a.id)}),h>0&&e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",marginTop:24},children:[h," tasks across ",l.filter(a=>a.tasks.length>0).length," areas."]})]})};export{U as default}; +import{r as m,j as e,L as v}from"./index-B7UoLEbn.js";import{u as c}from"./useQuery-DV2f4JpC.js";import{c as p}from"./catalog-DcbS_7_L.js";import{d as y,c as k,h as _}from"./colors-COYRNy-F.js";import{s as N}from"./slug-BpH-Nkvz.js";import{S as x}from"./skeleton-DLsINbKq.js";import{A as T,a as w}from"./alert-B3UHHG00.js";import{T as S}from"./TaxonomySuggestionTile-DX_yob8h.js";import{T as b}from"./TaxonomyTrending-BQ_4UvnV.js";import"./SignInToEditDialog-BzeqSUHr.js";import"./button-D543yAN8.js";import"./input-hdt3aF12.js";import"./textarea-CpxVQZTZ.js";import"./searchable-select-CceG4fY6.js";import"./popover-BOnBmrXi.js";import"./dialog-BECDhHRn.js";import"./loader-circle-hbMX20oF.js";import"./useMutation-CuaM6sOT.js";import"./submissions-BTKMKNWZ.js";import"./plus-BvN48Xkz.js";import"./trending-up-DOtHjkBv.js";const A=t=>(t==null?void 0:t.trim().toLowerCase().replace(/[\s_]+/g,"-"))??"",U=()=>{var u,f;const t=c({queryKey:["areas-with-tasks"],queryFn:()=>p.areasWithTasks(),staleTime:6e5}),n=c({queryKey:["trending-tasks-directory"],queryFn:()=>p.trendingTasks({limit:12,min_recent_papers:10}),staleTime:10*60*1e3}),g=c({queryKey:["areas-all"],queryFn:()=>p.listAreas({page_size:50,ordering:"name"}),staleTime:10*60*1e3}),j=m.useMemo(()=>{var r,i;const a=new Map((((r=g.data)==null?void 0:r.results)??[]).map(s=>[s.id,s.name]));return(i=n.data)==null?void 0:i.results.map(s=>({id:s.id,name:y(s.name,s.slug),href:`/tasks/${s.slug}`,areaName:s.area_id?a.get(s.area_id):void 0,recentPaperCount:s.recent_paper_count,shareLift:s.share_lift}))},[n.data,g.data]),l=m.useMemo(()=>{if(!t.data)return[];const a={general:0,vision:1,video:2,language:3,audio:4,other:5},r=i=>a[A(i)]??999;return[...t.data.results].sort((i,s)=>{const o=r(i.name),d=r(s.name);return o!==d?o-d:i.name.localeCompare(s.name)})},[t.data]);m.useEffect(()=>{var a;!t.data||n.isLoading||!window.location.hash||(a=document.getElementById(window.location.hash.slice(1)))==null||a.scrollIntoView({block:"start"})},[t.data,n.isLoading]);const h=m.useMemo(()=>l.reduce((a,r)=>a+r.tasks.length,0),[l]);return t.error?e.jsx("div",{className:"page",children:e.jsx(T,{variant:"destructive",children:e.jsx(w,{children:"Failed to load taxonomy. Please try again."})})}):e.jsxs("div",{className:"page",children:[e.jsx("div",{className:"feed-header",children:e.jsxs("div",{children:[e.jsxs("h1",{className:"feed-title",children:["All ",e.jsx("em",{children:"Domains"})]}),e.jsx("div",{className:"feed-subtitle",children:"Browse research by area. Click any task to see trending work."})]})}),e.jsx(b,{noun:"task",items:j,recentDays:(u=n.data)==null?void 0:u.recent_days,baselineDays:(f=n.data)==null?void 0:f.baseline_days,isLoading:n.isLoading,error:n.error}),t.isLoading?e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:32},children:Array.from({length:4}).map((a,r)=>e.jsxs("div",{children:[e.jsx(x,{className:"h-8 w-1/3 mb-4"}),e.jsx("div",{className:"tag-grid",children:Array.from({length:6}).map((i,s)=>e.jsx(x,{className:"h-24"},s))})]},r))}):l.map(a=>{const r=a.tasks;if(r.length===0)return null;const i=r.reduce((s,o)=>s+(o.paper_count||0),0);return e.jsxs("section",{id:`area-${N(a.name)}`,style:{marginBottom:48,scrollMarginTop:80},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:a.name}),a.description&&e.jsx("div",{style:{fontFamily:"var(--serif)",fontStyle:"italic",fontSize:13,color:"var(--ink-soft)"},children:a.description})]}),e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",whiteSpace:"nowrap"},children:[r.length," ",r.length===1?"task":"tasks"," · ",i.toLocaleString()," papers"]})]}),e.jsxs("div",{className:"tag-grid",children:[r.map(s=>{const o=s.slug||"",d=k(_(o));return e.jsxs(v,{to:`/tasks/${o}`,className:"tag-cell",children:[e.jsxs("div",{className:"name",children:[e.jsx("span",{className:"dot",style:{background:d.dot}}),y(s.name,o)]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[(s.paper_count??0).toLocaleString()," papers"]})})]},s.id)}),e.jsx(S,{kind:"task"})]})]},a.id)}),h>0&&e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",marginTop:24},children:[h," tasks across ",l.filter(a=>a.tasks.length>0).length," areas."]})]})};export{U as default}; diff --git a/assets/TaxonomySuggestionTile-BltCio9I.js b/assets/TaxonomySuggestionTile-DX_yob8h.js similarity index 76% rename from assets/TaxonomySuggestionTile-BltCio9I.js rename to assets/TaxonomySuggestionTile-DX_yob8h.js index ac05bba2daef472ab6625e48aaa8d87ea5c6ba9f..e0aa884b10b95ba3ae971ee47989245465c23f32 100644 --- a/assets/TaxonomySuggestionTile-BltCio9I.js +++ b/assets/TaxonomySuggestionTile-DX_yob8h.js @@ -1 +1 @@ -import{a as u,r as t,j as e}from"./index-CkeK0cDg.js";import{S as c,a as m}from"./SignInToEditDialog-CmfnGty-.js";import{P as p}from"./plus-BaTMbqcZ.js";function j({kind:s}){const{user:a}=u(),[i,n]=t.useState(!1),[r,o]=t.useState(!1),l=`Suggest a new ${s}...`,g=()=>{a?n(!0):o(!0)};return e.jsxs(e.Fragment,{children:[e.jsxs("button",{type:"button",className:"tag-cell taxonomy-suggestion-cell",onClick:g,children:[e.jsxs("div",{className:"name",children:[e.jsx(p,{className:"taxonomy-suggestion-icon","aria-hidden":"true"}),l]}),e.jsx("div",{className:"meta",children:e.jsx("span",{children:"Propose an addition"})})]}),e.jsx(c,{open:i,onOpenChange:n,kind:s}),e.jsx(m,{open:r,onOpenChange:o,sectionLabel:`${s}s`,returnTo:typeof window<"u"?window.location.pathname:`/${s}s`,taxonomySuggestion:!0})]})}export{j as T}; +import{a as u,r as t,j as e}from"./index-B7UoLEbn.js";import{S as c,a as m}from"./SignInToEditDialog-BzeqSUHr.js";import{P as p}from"./plus-BvN48Xkz.js";function j({kind:s}){const{user:a}=u(),[i,n]=t.useState(!1),[r,o]=t.useState(!1),l=`Suggest a new ${s}...`,g=()=>{a?n(!0):o(!0)};return e.jsxs(e.Fragment,{children:[e.jsxs("button",{type:"button",className:"tag-cell taxonomy-suggestion-cell",onClick:g,children:[e.jsxs("div",{className:"name",children:[e.jsx(p,{className:"taxonomy-suggestion-icon","aria-hidden":"true"}),l]}),e.jsx("div",{className:"meta",children:e.jsx("span",{children:"Propose an addition"})})]}),e.jsx(c,{open:i,onOpenChange:n,kind:s}),e.jsx(m,{open:r,onOpenChange:o,sectionLabel:`${s}s`,returnTo:typeof window<"u"?window.location.pathname:`/${s}s`,taxonomySuggestion:!0})]})}export{j as T}; diff --git a/assets/TaxonomyTrending-g677Z8nK.js b/assets/TaxonomyTrending-BQ_4UvnV.js similarity index 89% rename from assets/TaxonomyTrending-g677Z8nK.js rename to assets/TaxonomyTrending-BQ_4UvnV.js index 9c5b970094c204f96db1f9d3636a559717a43283..13a8aece13b21dbad079925221afa8ed9a8ef746 100644 --- a/assets/TaxonomyTrending-g677Z8nK.js +++ b/assets/TaxonomyTrending-BQ_4UvnV.js @@ -1 +1 @@ -import{j as a,L as h}from"./index-CkeK0cDg.js";import{S as x}from"./skeleton-Cs8haT1C.js";import{A as m,a as p}from"./alert-Vt5eE6re.js";import{T as l}from"./trending-up-BKEZ18MU.js";const y=({noun:r,items:s,recentDays:i=30,baselineDays:o=180,isLoading:d,error:t,mono:c})=>!d&&!t&&!(s!=null&&s.length)?null:a.jsxs("section",{id:"trending",className:"taxonomy-trending","aria-label":`Trending ${r}s`,children:[a.jsxs("div",{className:"taxonomy-trending-header",children:[a.jsxs("h2",{children:[a.jsx(l,{size:22,"aria-hidden":"true"}),"Trending"]}),a.jsxs("p",{className:"taxonomy-trending-note",children:[r==="task"?"Tasks":"Methods"," across all areas whose share of papers in the last ",i," days grew the most against the preceding ",o," days."]})]}),t?a.jsx(m,{variant:"destructive",children:a.jsxs(p,{children:["Failed to load trending ",r,"s."]})}):d?a.jsx("div",{className:"tag-grid",children:Array.from({length:6}).map((e,n)=>a.jsx(x,{className:"h-20"},n))}):a.jsx("div",{className:"tag-grid",children:s==null?void 0:s.map((e,n)=>a.jsxs(h,{to:e.href,className:"tag-cell",children:[a.jsxs("div",{className:"name",style:c?{fontFamily:"var(--mono)",fontSize:15}:void 0,children:[a.jsx("span",{className:"taxonomy-trending-rank",children:n+1}),e.name]}),a.jsxs("div",{className:"meta taxonomy-trending-meta",children:[e.areaName&&a.jsxs(a.Fragment,{children:[a.jsx("span",{children:e.areaName}),a.jsx("span",{children:"·"})]}),a.jsxs("span",{children:[e.recentPaperCount.toLocaleString()," papers / ",i,"d"]}),a.jsx("span",{children:"·"}),a.jsxs("span",{className:"method-trend-score taxonomy-trending-lift",title:`Share of recent papers is ${e.shareLift.toFixed(1)}× its baseline share`,children:[a.jsx(l,{size:12,"aria-hidden":"true"}),e.shareLift.toFixed(1),"×"]})]})]},e.id))})]});export{y as T}; +import{j as a,L as h}from"./index-B7UoLEbn.js";import{S as x}from"./skeleton-DLsINbKq.js";import{A as m,a as p}from"./alert-B3UHHG00.js";import{T as l}from"./trending-up-DOtHjkBv.js";const y=({noun:r,items:s,recentDays:i=30,baselineDays:o=180,isLoading:d,error:t,mono:c})=>!d&&!t&&!(s!=null&&s.length)?null:a.jsxs("section",{id:"trending",className:"taxonomy-trending","aria-label":`Trending ${r}s`,children:[a.jsxs("div",{className:"taxonomy-trending-header",children:[a.jsxs("h2",{children:[a.jsx(l,{size:22,"aria-hidden":"true"}),"Trending"]}),a.jsxs("p",{className:"taxonomy-trending-note",children:[r==="task"?"Tasks":"Methods"," across all areas whose share of papers in the last ",i," days grew the most against the preceding ",o," days."]})]}),t?a.jsx(m,{variant:"destructive",children:a.jsxs(p,{children:["Failed to load trending ",r,"s."]})}):d?a.jsx("div",{className:"tag-grid",children:Array.from({length:6}).map((e,n)=>a.jsx(x,{className:"h-20"},n))}):a.jsx("div",{className:"tag-grid",children:s==null?void 0:s.map((e,n)=>a.jsxs(h,{to:e.href,className:"tag-cell",children:[a.jsxs("div",{className:"name",style:c?{fontFamily:"var(--mono)",fontSize:15}:void 0,children:[a.jsx("span",{className:"taxonomy-trending-rank",children:n+1}),e.name]}),a.jsxs("div",{className:"meta taxonomy-trending-meta",children:[e.areaName&&a.jsxs(a.Fragment,{children:[a.jsx("span",{children:e.areaName}),a.jsx("span",{children:"·"})]}),a.jsxs("span",{children:[e.recentPaperCount.toLocaleString()," papers / ",i,"d"]}),a.jsx("span",{children:"·"}),a.jsxs("span",{className:"method-trend-score taxonomy-trending-lift",title:`Share of recent papers is ${e.shareLift.toFixed(1)}× its baseline share`,children:[a.jsx(l,{size:12,"aria-hidden":"true"}),e.shareLift.toFixed(1),"×"]})]})]},e.id))})]});export{y as T}; diff --git a/assets/TrendsView-0qWm9HI5.js b/assets/TrendsView-kqxWmThB.js similarity index 97% rename from assets/TrendsView-0qWm9HI5.js rename to assets/TrendsView-kqxWmThB.js index ffaf9909bf83316640f609471297753e968e2e52..68b80e4c606991f430d26329543b7fc87b221068 100644 --- a/assets/TrendsView-0qWm9HI5.js +++ b/assets/TrendsView-kqxWmThB.js @@ -1 +1 @@ -import{a4 as I,F as X,j as e}from"./index-CkeK0cDg.js";import{u as G}from"./useQuery-_Fj6Jfzr.js";import{A as J,a as E}from"./alert-Vt5eE6re.js";import{S as P}from"./skeleton-Cs8haT1C.js";class Q{constructor(r){this.request=r}trends(){return this.request("/stats/trends")}}const V=new Q(I),m=t=>{const r=/^(\d{4})-(0[1-9]|1[0-2])$/.exec(t);if(!r)return t;const[,s,l]=r;return`${["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"][Number(l)-1]} '${s.slice(2)}`},Y=()=>V.trends(),f=980,j=400,x=62,B=26,g=30,K=58,u=f-x-B,F=j-g-K,v=g+F,Z=t=>{if(t.length<3)return t.map((s,l)=>`${l?"L":"M"}${s[0]} ${s[1]}`).join(" ");let r=`M${t[0][0]} ${t[0][1]}`;for(let s=0;s{const[a,y]=X.useState(null),i=r.length,b=l[l.length-1],d=n=>x+u*(i===1?0:n/(i-1)),p=n=>g+F*(1-n/b);if(i===0)return null;const R=r.map((n,h)=>[d(h),p(n.percent)]),A=Z(R),_=`${A} L ${d(i-1)} ${v} L ${x} ${v} Z`,w=i<=12?1:Math.ceil(i/8),O=n=>{const h=n.currentTarget.getBoundingClientRect(),S=(n.clientX-h.left)/h.width*f,k=i>1?u/(i-1):u,q=Math.max(0,Math.min(i-1,Math.round((S-x)/k)));y(q)},H=`trend-gradient-${t}`;return e.jsxs("figure",{className:"trend-chart",children:[e.jsxs("div",{className:"trend-chart-visual",children:[e.jsxs("svg",{viewBox:`0 0 ${f} ${j}`,width:"100%",role:"img","aria-label":`${c} by ${o.toLowerCase()}, from ${m(r[0].month)} (${r[0].percent}%) to ${m(r[i-1].month)} (${r[i-1].percent}%)`,style:{display:"block",overflow:"visible",cursor:"crosshair"},onPointerMove:O,onPointerLeave:()=>y(null),children:[e.jsx("defs",{children:e.jsxs("linearGradient",{id:H,x1:"0",y1:"0",x2:"0",y2:"1",children:[e.jsx("stop",{offset:"0%",style:{stopColor:s,stopOpacity:.26}}),e.jsx("stop",{offset:"100%",style:{stopColor:s,stopOpacity:.02}})]})}),l.map(n=>e.jsxs("g",{children:[e.jsx("line",{x1:x,x2:f-B,y1:p(n),y2:p(n),stroke:"var(--hairline)",strokeWidth:1}),e.jsxs("text",{x:x-14,y:p(n)+4,textAnchor:"end",style:W,children:[n,"%"]})]},n)),e.jsx("path",{d:_,fill:`url(#${H})`}),e.jsx("path",{d:A,fill:"none",stroke:s,strokeWidth:2,strokeLinejoin:"round",strokeLinecap:"round"}),r.map((n,h)=>{const S=h===i-1,k=h%w===0&&i-1-h>=w/2;return!S&&!k?null:e.jsx("text",{x:d(h),y:v+24,textAnchor:"middle",style:W,children:m(n.month)},n.month)}),e.jsx("text",{x:x+u/2,y:j-4,textAnchor:"middle",style:z,children:o}),e.jsx("text",{transform:`translate(16 ${g+F/2}) rotate(-90)`,textAnchor:"middle",style:z,children:c}),a!=null&&e.jsxs(e.Fragment,{children:[e.jsx("line",{x1:d(a),x2:d(a),y1:g,y2:v,stroke:s,strokeWidth:1,strokeDasharray:"3 4",opacity:.5}),e.jsx("circle",{cx:d(a),cy:p(r[a].percent),r:5,fill:"var(--bg)",stroke:s,strokeWidth:2})]})]}),a!=null&&e.jsxs("div",{style:{position:"absolute",left:`${d(a)/f*100}%`,top:`${p(r[a].percent)/j*100}%`,transform:"translate(-50%, calc(-100% - 14px))",background:"var(--bg-elevated)",border:"1px solid var(--hairline)",borderRadius:6,boxShadow:"0 8px 26px rgba(0,0,0,.13)",padding:"7px 12px",pointerEvents:"none",whiteSpace:"nowrap",zIndex:3},children:[e.jsx("div",{style:{fontFamily:"var(--serif)",fontStyle:"italic",color:"var(--ink-faint)",fontSize:13,marginBottom:2},children:m(r[a].month)}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:7,fontFamily:"var(--mono)",fontWeight:600,fontSize:15,color:"var(--ink)"},children:[e.jsx("span",{style:{width:8,height:8,borderRadius:2,background:s,display:"inline-block"}}),r[a].percent,"%"]})]})]}),e.jsxs("details",{className:"trend-chart-table",children:[e.jsx("summary",{style:{fontFamily:"var(--mono)",fontSize:11,letterSpacing:"0.04em",color:"var(--ink-faint)",cursor:"pointer"},children:"View data table"}),e.jsxs("table",{style:{marginTop:8,borderCollapse:"collapse",fontFamily:"var(--mono)",fontSize:12,color:"var(--ink-soft)"},children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{style:{textAlign:"left",padding:"3px 18px 3px 0"},children:o}),e.jsx("th",{style:{textAlign:"right",padding:"3px 0"},children:c})]})}),e.jsx("tbody",{children:r.map(n=>e.jsxs("tr",{children:[e.jsx("td",{style:{padding:"2px 18px 2px 0"},children:m(n.month)}),e.jsxs("td",{style:{textAlign:"right",padding:"2px 0"},children:[n.percent,"%"]})]},n.month))})]})]})]})},$={maxWidth:960,padding:"48px 0 8px",borderTop:"1px solid var(--hairline)",marginTop:48},T={fontFamily:"var(--serif)",fontSize:34,fontWeight:500,letterSpacing:"-0.02em",margin:"0 0 10px",color:"var(--ink)"},M={fontFamily:"var(--serif)",fontSize:18,lineHeight:1.55,color:"var(--ink-soft)",maxWidth:620,margin:"0 0 8px"},C={fontFamily:"var(--mono)",fontSize:12,fontWeight:600,letterSpacing:"0.14em",textTransform:"uppercase",color:"var(--ink-faint)",marginBottom:8},N={fontFamily:"var(--serif)",fontSize:17,lineHeight:1.6,color:"var(--ink-soft)",margin:0},D={height:320,marginTop:26},re=()=>{const t=G({queryKey:["research-trends"],queryFn:Y,staleTime:36e5});return e.jsxs("div",{className:"page",children:[e.jsx("div",{className:"feed-header",children:e.jsxs("div",{children:[e.jsxs("h1",{className:"feed-title",children:["Research ",e.jsx("em",{children:"Trends"})]}),e.jsx("div",{className:"feed-subtitle",children:"How open science is changing across machine learning — tracked over time from arXiv and the Hugging Face Hub."})]})}),t.error&&e.jsx(J,{variant:"destructive",children:e.jsx(E,{children:"Failed to load research trends. Please try again."})}),e.jsxs("section",{style:$,children:[e.jsx("h2",{style:T,children:"Code Availability"}),e.jsx("p",{style:M,children:"The percentage of published papers that have at least one official code implementation on GitHub."}),e.jsx("div",{style:{marginTop:26},children:t.data?e.jsx(L,{id:"code",data:t.data.code_availability,color:"var(--trend-code)",yTicks:[0,20,40,60,80],yLabel:"Code Availability",xLabel:"Paper Publication Date"}):!t.error&&e.jsx(P,{style:D})})]}),e.jsxs("section",{style:$,children:[e.jsx("h2",{style:T,children:"Papers with Hugging Face artifacts"}),e.jsx("p",{style:M,children:"The percentage of published papers linked to at least one Hugging Face artifact — a model, dataset or Space — making the work directly runnable and reusable."}),e.jsx("div",{style:{marginTop:26},children:t.data?e.jsx(L,{id:"hf",data:t.data.hf_artifacts,color:"var(--trend-hf)",yTicks:[0,10,20,30,40,50],yLabel:"HF Artifact Coverage",xLabel:"Paper Publication Date"}):!t.error&&e.jsx(P,{style:D})})]}),e.jsxs("section",{style:{...$,paddingBottom:72},children:[e.jsx("h2",{style:{...T,fontSize:27},children:"How the data is collected"}),e.jsxs("div",{style:{display:"grid",gap:24,maxWidth:680},children:[e.jsxs("div",{children:[e.jsx("div",{style:C,children:"Code Availability"}),e.jsx("p",{style:N,children:"For every open-access machine learning paper, we check whether an official code implementation is linked on GitHub. The date axis is the paper's publication date."})]}),e.jsxs("div",{children:[e.jsx("div",{style:C,children:"Hugging Face artifacts"}),e.jsx("p",{style:N,children:"We resolve links between papers and the Hugging Face Hub, counting a paper as covered when it references at least one model, dataset or Space. The date axis is the paper's publication date."})]}),e.jsx("p",{style:{fontFamily:"var(--mono)",fontSize:12,lineHeight:1.6,color:"var(--ink-faint)",margin:"8px 0 0",letterSpacing:"0.02em"},children:"Figures use complete publication months. Historical Hugging Face coverage reflects artifacts currently linked in the catalog."})]})]})]})};export{re as default}; +import{a4 as I,F as X,j as e}from"./index-B7UoLEbn.js";import{u as G}from"./useQuery-DV2f4JpC.js";import{A as J,a as E}from"./alert-B3UHHG00.js";import{S as P}from"./skeleton-DLsINbKq.js";class Q{constructor(r){this.request=r}trends(){return this.request("/stats/trends")}}const V=new Q(I),m=t=>{const r=/^(\d{4})-(0[1-9]|1[0-2])$/.exec(t);if(!r)return t;const[,s,l]=r;return`${["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"][Number(l)-1]} '${s.slice(2)}`},Y=()=>V.trends(),f=980,j=400,x=62,B=26,g=30,K=58,u=f-x-B,F=j-g-K,v=g+F,Z=t=>{if(t.length<3)return t.map((s,l)=>`${l?"L":"M"}${s[0]} ${s[1]}`).join(" ");let r=`M${t[0][0]} ${t[0][1]}`;for(let s=0;s{const[a,y]=X.useState(null),i=r.length,b=l[l.length-1],d=n=>x+u*(i===1?0:n/(i-1)),p=n=>g+F*(1-n/b);if(i===0)return null;const R=r.map((n,h)=>[d(h),p(n.percent)]),A=Z(R),_=`${A} L ${d(i-1)} ${v} L ${x} ${v} Z`,w=i<=12?1:Math.ceil(i/8),O=n=>{const h=n.currentTarget.getBoundingClientRect(),S=(n.clientX-h.left)/h.width*f,k=i>1?u/(i-1):u,q=Math.max(0,Math.min(i-1,Math.round((S-x)/k)));y(q)},H=`trend-gradient-${t}`;return e.jsxs("figure",{className:"trend-chart",children:[e.jsxs("div",{className:"trend-chart-visual",children:[e.jsxs("svg",{viewBox:`0 0 ${f} ${j}`,width:"100%",role:"img","aria-label":`${c} by ${o.toLowerCase()}, from ${m(r[0].month)} (${r[0].percent}%) to ${m(r[i-1].month)} (${r[i-1].percent}%)`,style:{display:"block",overflow:"visible",cursor:"crosshair"},onPointerMove:O,onPointerLeave:()=>y(null),children:[e.jsx("defs",{children:e.jsxs("linearGradient",{id:H,x1:"0",y1:"0",x2:"0",y2:"1",children:[e.jsx("stop",{offset:"0%",style:{stopColor:s,stopOpacity:.26}}),e.jsx("stop",{offset:"100%",style:{stopColor:s,stopOpacity:.02}})]})}),l.map(n=>e.jsxs("g",{children:[e.jsx("line",{x1:x,x2:f-B,y1:p(n),y2:p(n),stroke:"var(--hairline)",strokeWidth:1}),e.jsxs("text",{x:x-14,y:p(n)+4,textAnchor:"end",style:W,children:[n,"%"]})]},n)),e.jsx("path",{d:_,fill:`url(#${H})`}),e.jsx("path",{d:A,fill:"none",stroke:s,strokeWidth:2,strokeLinejoin:"round",strokeLinecap:"round"}),r.map((n,h)=>{const S=h===i-1,k=h%w===0&&i-1-h>=w/2;return!S&&!k?null:e.jsx("text",{x:d(h),y:v+24,textAnchor:"middle",style:W,children:m(n.month)},n.month)}),e.jsx("text",{x:x+u/2,y:j-4,textAnchor:"middle",style:z,children:o}),e.jsx("text",{transform:`translate(16 ${g+F/2}) rotate(-90)`,textAnchor:"middle",style:z,children:c}),a!=null&&e.jsxs(e.Fragment,{children:[e.jsx("line",{x1:d(a),x2:d(a),y1:g,y2:v,stroke:s,strokeWidth:1,strokeDasharray:"3 4",opacity:.5}),e.jsx("circle",{cx:d(a),cy:p(r[a].percent),r:5,fill:"var(--bg)",stroke:s,strokeWidth:2})]})]}),a!=null&&e.jsxs("div",{style:{position:"absolute",left:`${d(a)/f*100}%`,top:`${p(r[a].percent)/j*100}%`,transform:"translate(-50%, calc(-100% - 14px))",background:"var(--bg-elevated)",border:"1px solid var(--hairline)",borderRadius:6,boxShadow:"0 8px 26px rgba(0,0,0,.13)",padding:"7px 12px",pointerEvents:"none",whiteSpace:"nowrap",zIndex:3},children:[e.jsx("div",{style:{fontFamily:"var(--serif)",fontStyle:"italic",color:"var(--ink-faint)",fontSize:13,marginBottom:2},children:m(r[a].month)}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:7,fontFamily:"var(--mono)",fontWeight:600,fontSize:15,color:"var(--ink)"},children:[e.jsx("span",{style:{width:8,height:8,borderRadius:2,background:s,display:"inline-block"}}),r[a].percent,"%"]})]})]}),e.jsxs("details",{className:"trend-chart-table",children:[e.jsx("summary",{style:{fontFamily:"var(--mono)",fontSize:11,letterSpacing:"0.04em",color:"var(--ink-faint)",cursor:"pointer"},children:"View data table"}),e.jsxs("table",{style:{marginTop:8,borderCollapse:"collapse",fontFamily:"var(--mono)",fontSize:12,color:"var(--ink-soft)"},children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{style:{textAlign:"left",padding:"3px 18px 3px 0"},children:o}),e.jsx("th",{style:{textAlign:"right",padding:"3px 0"},children:c})]})}),e.jsx("tbody",{children:r.map(n=>e.jsxs("tr",{children:[e.jsx("td",{style:{padding:"2px 18px 2px 0"},children:m(n.month)}),e.jsxs("td",{style:{textAlign:"right",padding:"2px 0"},children:[n.percent,"%"]})]},n.month))})]})]})]})},$={maxWidth:960,padding:"48px 0 8px",borderTop:"1px solid var(--hairline)",marginTop:48},T={fontFamily:"var(--serif)",fontSize:34,fontWeight:500,letterSpacing:"-0.02em",margin:"0 0 10px",color:"var(--ink)"},M={fontFamily:"var(--serif)",fontSize:18,lineHeight:1.55,color:"var(--ink-soft)",maxWidth:620,margin:"0 0 8px"},C={fontFamily:"var(--mono)",fontSize:12,fontWeight:600,letterSpacing:"0.14em",textTransform:"uppercase",color:"var(--ink-faint)",marginBottom:8},N={fontFamily:"var(--serif)",fontSize:17,lineHeight:1.6,color:"var(--ink-soft)",margin:0},D={height:320,marginTop:26},re=()=>{const t=G({queryKey:["research-trends"],queryFn:Y,staleTime:36e5});return e.jsxs("div",{className:"page",children:[e.jsx("div",{className:"feed-header",children:e.jsxs("div",{children:[e.jsxs("h1",{className:"feed-title",children:["Research ",e.jsx("em",{children:"Trends"})]}),e.jsx("div",{className:"feed-subtitle",children:"How open science is changing across machine learning — tracked over time from arXiv and the Hugging Face Hub."})]})}),t.error&&e.jsx(J,{variant:"destructive",children:e.jsx(E,{children:"Failed to load research trends. Please try again."})}),e.jsxs("section",{style:$,children:[e.jsx("h2",{style:T,children:"Code Availability"}),e.jsx("p",{style:M,children:"The percentage of published papers that have at least one official code implementation on GitHub."}),e.jsx("div",{style:{marginTop:26},children:t.data?e.jsx(L,{id:"code",data:t.data.code_availability,color:"var(--trend-code)",yTicks:[0,20,40,60,80],yLabel:"Code Availability",xLabel:"Paper Publication Date"}):!t.error&&e.jsx(P,{style:D})})]}),e.jsxs("section",{style:$,children:[e.jsx("h2",{style:T,children:"Papers with Hugging Face artifacts"}),e.jsx("p",{style:M,children:"The percentage of published papers linked to at least one Hugging Face artifact — a model, dataset or Space — making the work directly runnable and reusable."}),e.jsx("div",{style:{marginTop:26},children:t.data?e.jsx(L,{id:"hf",data:t.data.hf_artifacts,color:"var(--trend-hf)",yTicks:[0,10,20,30,40,50],yLabel:"HF Artifact Coverage",xLabel:"Paper Publication Date"}):!t.error&&e.jsx(P,{style:D})})]}),e.jsxs("section",{style:{...$,paddingBottom:72},children:[e.jsx("h2",{style:{...T,fontSize:27},children:"How the data is collected"}),e.jsxs("div",{style:{display:"grid",gap:24,maxWidth:680},children:[e.jsxs("div",{children:[e.jsx("div",{style:C,children:"Code Availability"}),e.jsx("p",{style:N,children:"For every open-access machine learning paper, we check whether an official code implementation is linked on GitHub. The date axis is the paper's publication date."})]}),e.jsxs("div",{children:[e.jsx("div",{style:C,children:"Hugging Face artifacts"}),e.jsx("p",{style:N,children:"We resolve links between papers and the Hugging Face Hub, counting a paper as covered when it references at least one model, dataset or Space. The date axis is the paper's publication date."})]}),e.jsx("p",{style:{fontFamily:"var(--mono)",fontSize:12,lineHeight:1.6,color:"var(--ink-faint)",margin:"8px 0 0",letterSpacing:"0.02em"},children:"Figures use complete publication months. Historical Hugging Face coverage reflects artifacts currently linked in the catalog."})]})]})]})};export{re as default}; diff --git a/assets/UserProfileView-DyszpB1t.js b/assets/UserProfileView-T9Rs7-BZ.js similarity index 87% rename from assets/UserProfileView-DyszpB1t.js rename to assets/UserProfileView-T9Rs7-BZ.js index 3eeceae91c49affe59c48358516de336c70ecbd2..871fd72fb33117b424d8cf7546c1fbe6c0edb9a3 100644 --- a/assets/UserProfileView-DyszpB1t.js +++ b/assets/UserProfileView-T9Rs7-BZ.js @@ -1 +1 @@ -import{au as i,A as n,u as o,j as e,aT as d}from"./index-CkeK0cDg.js";import{u as l}from"./useQuery-_Fj6Jfzr.js";import{C as c}from"./OrganizationContributionGraph-DmtgA4CC.js";import"./skeleton-Cs8haT1C.js";import"./catalog-DGg7xZLW.js";const p={async get(t){const a=await i(`/profiles/${encodeURIComponent(t)}`);if(!a.ok)throw new n(a,await a.text());const r=await a.json();if(!a.redirected)return r;const s=decodeURIComponent(new URL(a.url).pathname.split("/").pop()||r.username);return{...r,username:s,redirected_from_alias:!0}}},f=()=>{const{username:t=""}=o(),a=l({queryKey:["user-profile",t.toLowerCase()],queryFn:()=>p.get(t)});return a.isLoading?e.jsx("div",{className:"page",children:"Loading profile…"}):a.data?a.data.redirected_from_alias?e.jsx(d,{to:`/${a.data.username}`,replace:!0}):e.jsxs("div",{className:"page",style:{maxWidth:960},children:[e.jsxs("h1",{children:["@",a.data.username]}),e.jsx("p",{children:"Canonical Papers with Code contributions"}),e.jsx(c,{data:a.data.calendar,organizationName:`@${a.data.username}`,title:"Canonical contributions",noun:"contribution"}),a.data.is_owner&&e.jsxs("section",{className:"mt-10",children:[e.jsx("h2",{children:"Your submissions"}),e.jsxs("p",{className:"text-sm text-muted-foreground",children:["Limits and duplicate behavior are documented on ",e.jsx("a",{href:"/rate-limits",children:"the policy page"}),"."]}),e.jsx("div",{className:"mt-4 space-y-3",children:a.data.submissions.map(r=>e.jsxs("article",{className:"rounded-md border p-4",children:[e.jsx("strong",{children:r.edit_type})," · ",r.status,e.jsxs("details",{className:"mt-2 text-xs",children:[e.jsx("summary",{children:"Original and applied payload"}),e.jsx("pre",{children:JSON.stringify({proposed:r.proposed_payload,applied:r.applied_payload},null,2)})]}),r.review_reason&&e.jsx("p",{children:r.review_reason})]},r.id))})]})]}):e.jsx("div",{className:"page",children:e.jsx("h1",{children:"Profile not found"})})};export{f as default}; +import{au as i,A as n,u as o,j as e,aT as d}from"./index-B7UoLEbn.js";import{u as l}from"./useQuery-DV2f4JpC.js";import{C as c}from"./OrganizationContributionGraph-0fzCjE06.js";import"./skeleton-DLsINbKq.js";import"./catalog-DcbS_7_L.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-Vt5eE6re.js b/assets/alert-B3UHHG00.js similarity index 92% rename from assets/alert-Vt5eE6re.js rename to assets/alert-B3UHHG00.js index 166420a67842b838b51f4433797edd08dfabb51e..75f8c7b65d650b5537b3ea50a2f75701258f87ab 100644 --- a/assets/alert-Vt5eE6re.js +++ b/assets/alert-B3UHHG00.js @@ -1 +1 @@ -import{r as a,j as s,x as l,a6 as i}from"./index-CkeK0cDg.js";const o=i("relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),n=a.forwardRef(({className:e,variant:t,...r},d)=>s.jsx("div",{ref:d,role:"alert",className:l(o({variant:t}),e),...r}));n.displayName="Alert";const v=a.forwardRef(({className:e,...t},r)=>s.jsx("h5",{ref:r,className:l("mb-1 font-medium leading-none tracking-tight",e),...t}));v.displayName="AlertTitle";const c=a.forwardRef(({className:e,...t},r)=>s.jsx("div",{ref:r,className:l("text-sm [&_p]:leading-relaxed",e),...t}));c.displayName="AlertDescription";export{n as A,c as a}; +import{r as a,j as s,x as l,a6 as i}from"./index-B7UoLEbn.js";const o=i("relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),n=a.forwardRef(({className:e,variant:t,...r},d)=>s.jsx("div",{ref:d,role:"alert",className:l(o({variant:t}),e),...r}));n.displayName="Alert";const v=a.forwardRef(({className:e,...t},r)=>s.jsx("h5",{ref:r,className:l("mb-1 font-medium leading-none tracking-tight",e),...t}));v.displayName="AlertTitle";const c=a.forwardRef(({className:e,...t},r)=>s.jsx("div",{ref:r,className:l("text-sm [&_p]:leading-relaxed",e),...t}));c.displayName="AlertDescription";export{n as A,c as a}; diff --git a/assets/badge-DESGN9ka.js b/assets/badge-BieMUBSb.js similarity index 90% rename from assets/badge-DESGN9ka.js rename to assets/badge-BieMUBSb.js index 855ba2fe50339c8698ef85a234ef0de0bdfeb326..01ed9ee0e9d57d2c476734bc5c3d790d1797e517 100644 --- a/assets/badge-DESGN9ka.js +++ b/assets/badge-BieMUBSb.js @@ -1 +1 @@ -import{j as n,x as o,a6 as a}from"./index-CkeK0cDg.js";const s=a("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function d({className:r,variant:e,...t}){return n.jsx("div",{className:o(s({variant:e}),r),...t})}export{d as B}; +import{j as n,x as o,a6 as a}from"./index-B7UoLEbn.js";const s=a("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function d({className:r,variant:e,...t}){return n.jsx("div",{className:o(s({variant:e}),r),...t})}export{d as B}; diff --git a/assets/button-CsUrN-GU.js b/assets/button-D543yAN8.js similarity index 89% rename from assets/button-CsUrN-GU.js rename to assets/button-D543yAN8.js index f51e52bc867961ff7c99913ca90c48478c385097..eebd4bba0b8102d6393a4ed019528286ca56a3b6 100644 --- a/assets/button-CsUrN-GU.js +++ b/assets/button-D543yAN8.js @@ -1 +1 @@ -import{r as a,j as d,av as u,x as c,a6 as f}from"./index-CkeK0cDg.js";const g=f("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),v=a.forwardRef(({className:e,variant:t,size:r,asChild:n=!1,...o},s)=>{const i=n?u:"button";return d.jsx(i,{className:c(g({variant:t,size:r,className:e})),ref:s,...o})});v.displayName="Button";export{v as B}; +import{r as a,j as d,av as u,x as c,a6 as f}from"./index-B7UoLEbn.js";const g=f("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),v=a.forwardRef(({className:e,variant:t,size:r,asChild:n=!1,...o},s)=>{const i=n?u:"button";return d.jsx(i,{className:c(g({variant:t,size:r,className:e})),ref:s,...o})});v.displayName="Button";export{v as B}; diff --git a/assets/catalog-DGg7xZLW.js b/assets/catalog-DcbS_7_L.js similarity index 97% rename from assets/catalog-DGg7xZLW.js rename to assets/catalog-DcbS_7_L.js index 7e95a0cb2cd5e7396b668bb20630c453217da181..babf96af21ab5c10440013bb532f2dc2ed5bfd12 100644 --- a/assets/catalog-DGg7xZLW.js +++ b/assets/catalog-DcbS_7_L.js @@ -1 +1 @@ -import{a4 as o}from"./index-CkeK0cDg.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")}trendingMethods(e){return this.request(s("/methods/trending",e))}getMethod(e){return this.request(`/methods/${encodeURIComponent(e)}`)}relatedMethods(e){return this.request(`/methods/${encodeURIComponent(e)}/related`)}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 d=new u(o);export{d as c}; +import{a4 as o}from"./index-B7UoLEbn.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")}trendingMethods(e){return this.request(s("/methods/trending",e))}getMethod(e){return this.request(`/methods/${encodeURIComponent(e)}`)}relatedMethods(e){return this.request(`/methods/${encodeURIComponent(e)}/related`)}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 d=new u(o);export{d as c}; diff --git a/assets/chat-Cvg-XEh-.js b/assets/chat-B6IGPjTl.js similarity index 97% rename from assets/chat-Cvg-XEh-.js rename to assets/chat-B6IGPjTl.js index 0e9df60deec193dab35039c1f50f54e4fc52d622..dd2ee358d39ed9755e537f832eab01a9409d9edb 100644 --- a/assets/chat-Cvg-XEh-.js +++ b/assets/chat-B6IGPjTl.js @@ -1 +1 @@ -import{a4 as n,au as r}from"./index-CkeK0cDg.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"})}getSessionPublicShare(e){return this.request(`/chat/sessions/${encodeURIComponent(e)}/public-share`,{credentials:"omit"})}getSharedChat(e){return this.request(`/chat/shares/${encodeURIComponent(e)}`,{credentials:"omit"})}getModels(){return this.request("/chat/models")}getUsage(){return this.request("/chat/usage",{cache:"no-store"})}getOpenAIUsage(){return this.request("/chat/openai-usage",{cache:"no-store"})}getAvailability(){return this.request("/chat/availability",{cache:"no-store"})}getInferenceBilling(){return this.request("/me/inference-billing",{cache:"no-store"})}selectInferenceBillingAccount(e){return this.request("/me/inference-billing",{method:"PATCH",body:JSON.stringify({bill_to:e})})}prewarmPaperContext(e){return this.request("/chat/paper-context/prewarm",{method:"POST",body:JSON.stringify({route_id:e}),credentials:"omit",cache:"no-store"})}getSandboxSpend(e){const t=e?`?environment=${encodeURIComponent(e)}`:"";return this.request(`/chat/admin/sandbox-spend${t}`,{cache:"no-store"})}getWebSearchBudget(){return this.request("/chat/admin/web-search-budget",{cache:"no-store"})}getOpenRouterCredential(){return this.request("/chat/openrouter-key",{cache:"no-store"})}connectOpenRouterCredential(e){return this.request("/chat/openrouter-key",{method:"PUT",body:JSON.stringify({api_key:e})})}setOpenRouterFallback(e){return this.request("/chat/openrouter-key",{method:"PATCH",body:JSON.stringify({enabled:e})})}disconnectOpenRouterCredential(){return this.request("/chat/openrouter-key",{method:"DELETE"})}reportLatency(e,t){return r(`/chat/latency/${encodeURIComponent(e)}`,{method:"POST",keepalive:!0,body:JSON.stringify(t)})}reportFeedback(e,t,s){return this.request(`/chat/messages/${encodeURIComponent(e)}/feedback`,{method:"POST",body:JSON.stringify({value:t,...s?{comment:s}:{}})})}stream(e,t){return r("/chat/stream",{method:"POST",headers:{Accept:"text/event-stream"},body:JSON.stringify(e),signal:t})}resumeStream(e,t,s){return r(`/chat/sessions/${encodeURIComponent(e)}/stream`,{method:"GET",headers:{Accept:"text/event-stream",...s&&s>0?{"Last-Event-ID":String(s)}:{}},signal:t})}}const h=new o(n);export{h as c}; +import{a4 as n,au as r}from"./index-B7UoLEbn.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"})}getSessionPublicShare(e){return this.request(`/chat/sessions/${encodeURIComponent(e)}/public-share`,{credentials:"omit"})}getSharedChat(e){return this.request(`/chat/shares/${encodeURIComponent(e)}`,{credentials:"omit"})}getModels(){return this.request("/chat/models")}getUsage(){return this.request("/chat/usage",{cache:"no-store"})}getOpenAIUsage(){return this.request("/chat/openai-usage",{cache:"no-store"})}getAvailability(){return this.request("/chat/availability",{cache:"no-store"})}getInferenceBilling(){return this.request("/me/inference-billing",{cache:"no-store"})}selectInferenceBillingAccount(e){return this.request("/me/inference-billing",{method:"PATCH",body:JSON.stringify({bill_to:e})})}prewarmPaperContext(e){return this.request("/chat/paper-context/prewarm",{method:"POST",body:JSON.stringify({route_id:e}),credentials:"omit",cache:"no-store"})}getSandboxSpend(e){const t=e?`?environment=${encodeURIComponent(e)}`:"";return this.request(`/chat/admin/sandbox-spend${t}`,{cache:"no-store"})}getWebSearchBudget(){return this.request("/chat/admin/web-search-budget",{cache:"no-store"})}getOpenRouterCredential(){return this.request("/chat/openrouter-key",{cache:"no-store"})}connectOpenRouterCredential(e){return this.request("/chat/openrouter-key",{method:"PUT",body:JSON.stringify({api_key:e})})}setOpenRouterFallback(e){return this.request("/chat/openrouter-key",{method:"PATCH",body:JSON.stringify({enabled:e})})}disconnectOpenRouterCredential(){return this.request("/chat/openrouter-key",{method:"DELETE"})}reportLatency(e,t){return r(`/chat/latency/${encodeURIComponent(e)}`,{method:"POST",keepalive:!0,body:JSON.stringify(t)})}reportFeedback(e,t,s){return this.request(`/chat/messages/${encodeURIComponent(e)}/feedback`,{method:"POST",body:JSON.stringify({value:t,...s?{comment:s}:{}})})}stream(e,t){return r("/chat/stream",{method:"POST",headers:{Accept:"text/event-stream"},body:JSON.stringify(e),signal:t})}resumeStream(e,t,s){return r(`/chat/sessions/${encodeURIComponent(e)}/stream`,{method:"GET",headers:{Accept:"text/event-stream",...s&&s>0?{"Last-Event-ID":String(s)}:{}},signal:t})}}const h=new o(n);export{h as c}; diff --git a/assets/chatLaunch-NPBTDHUP.js b/assets/chatLaunch-BG1GqDpR.js similarity index 99% rename from assets/chatLaunch-NPBTDHUP.js rename to assets/chatLaunch-BG1GqDpR.js index a95ee488f783af3d83acd3b87a0ad84c5f03aa29..01b77fd6594d0a7259ac2cbdcfce72c412e4e033 100644 --- a/assets/chatLaunch-NPBTDHUP.js +++ b/assets/chatLaunch-BG1GqDpR.js @@ -1,4 +1,4 @@ -import{g as ae,j as a,A as ce,r as T,l as le,F as h}from"./index-CkeK0cDg.js";import{c as m}from"./chat-Cvg-XEh-.js";import{C as ue}from"./chevron-down-CcbfCW-U.js";import{u as pe}from"./useQuery-_Fj6Jfzr.js";import{p as de}from"./papers-Celoj8_s.js";/** +import{g as ae,j as a,A as ce,r as T,l as le,F as h}from"./index-B7UoLEbn.js";import{c as m}from"./chat-B6IGPjTl.js";import{C as ue}from"./chevron-down-CF7sS93G.js";import{u as pe}from"./useQuery-DV2f4JpC.js";import{p as de}from"./papers-Ctf2uv0o.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/chevron-down-CcbfCW-U.js b/assets/chevron-down-CF7sS93G.js similarity index 85% rename from assets/chevron-down-CcbfCW-U.js rename to assets/chevron-down-CF7sS93G.js index a95eef2a9678f8e3fca7c59d7d5d867be36b0f9d..0399e9f32a75fe11013542b78d822774bda281c6 100644 --- a/assets/chevron-down-CcbfCW-U.js +++ b/assets/chevron-down-CF7sS93G.js @@ -1,4 +1,4 @@ -import{g as o}from"./index-CkeK0cDg.js";/** +import{g as o}from"./index-B7UoLEbn.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/circle-check-BZ6y-zRa.js b/assets/circle-check-CDmFoooL.js similarity index 87% rename from assets/circle-check-BZ6y-zRa.js rename to assets/circle-check-CDmFoooL.js index 052f2a0064e42a11781a0b0fd6ce604400e74f78..6e9e7b3e1ff3558a79cdb9f23429f1fbc929224b 100644 --- a/assets/circle-check-BZ6y-zRa.js +++ b/assets/circle-check-CDmFoooL.js @@ -1,4 +1,4 @@ -import{g as c}from"./index-CkeK0cDg.js";/** +import{g as c}from"./index-B7UoLEbn.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/codexAddEvals-Cyz55d6F.js b/assets/codexAddEvals-Cyz55d6F.js deleted file mode 100644 index 47b8f39f8a97651c6ae38c7079cb8cb99db3d374..0000000000000000000000000000000000000000 --- a/assets/codexAddEvals-Cyz55d6F.js +++ /dev/null @@ -1,6 +0,0 @@ -import{g as d,K as t}from"./index-CkeK0cDg.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 u=d("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]);async function p(e,a){const n=await fetch(t(`/api/v1/admin/codex-curation/jobs/benchmark-candidates/${e}/promote`),{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)});if(!n.ok){const o=await n.json().catch(()=>null);throw new Error((o==null?void 0:o.detail)??`Could not promote benchmark candidate (${n.status}).`)}}async function h(e){const a=await fetch(t(`/api/v1/admin/codex-curation/jobs/benchmark-candidates/${e}/rollback`),{method:"POST",credentials:"include"});if(!a.ok){const n=await a.json().catch(()=>null);throw new Error((n==null?void 0:n.detail)??`Could not roll back benchmark candidate (${a.status}).`)}}function f(){const e="0".toLowerCase();return e==="1"||e==="true"||e==="yes"}function m(){const e="0".toLowerCase();return e==="1"||e==="true"||e==="yes"}async function c(e){var o;if(e.ok)return await e.json();const a=await e.json().catch(()=>null),n=((o=a==null?void 0:a.detail)==null?void 0:o.message)??(a==null?void 0:a.detail);throw new Error(typeof n=="string"?n:"Could not run Codex.")}async function w(e){const a=await fetch(t("/api/v1/admin/codex-add-evals/jobs"),{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({paper_id:e})});return c(a)}async function b(e){const a=await fetch(t(`/api/v1/admin/codex-add-evals/jobs/${e}`),{credentials:"include"});return c(a)}async function y(e){return c(await fetch(t(`/api/v1/admin/codex-add-evals/jobs/${e}`),{method:"DELETE",credentials:"include"}))}async function x(e){const a=await fetch(t("/api/v1/admin/codex-enrich-paper/jobs"),{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({paper_id:e})});return c(a)}async function C(e){const a=await fetch(t(`/api/v1/admin/codex-enrich-paper/jobs/${e}`),{credentials:"include"});return c(a)}async function E(e){return c(await fetch(t(`/api/v1/admin/codex-enrich-paper/jobs/${e}`),{method:"DELETE",credentials:"include"}))}async function j(e=100,a={}){const n=new URLSearchParams({limit:String(e)});Object.entries(a).forEach(([i,s])=>{s&&n.set(i,s)});const o=await fetch(t(`/api/v1/admin/codex-curation/jobs?${n}`),{credentials:"include",cache:"no-store"});if(o.ok)return await o.json();const r=new Error(`Could not load Codex jobs (${o.status}).`);throw Object.assign(r,{status:o.status}),r}async function v(e){return c(await fetch(t(`/api/v1/admin/codex-curation/jobs/${e}/retry`),{method:"POST",credentials:"include"}))}async function k(e){const a=await fetch(t(`/api/v1/admin/codex-curation/jobs/${e}/retry-trace`),{method:"POST",credentials:"include"});if(!a.ok)throw new Error(`Could not retry trace upload (${a.status}).`)}async function $(e){return c(await fetch(t(`/api/v1/admin/codex-curation/jobs/${e}`),{method:"DELETE",credentials:"include"}))}async function P(e){const a=await fetch(t(`/api/v1/admin/codex-curation/jobs/scheduler/${e}`),{method:"POST",credentials:"include"});if(!a.ok)throw new Error(`Could not ${e} scheduled curation (${a.status}).`)}export{u as D,y as a,b,E as c,w as d,m as e,$ as f,C as g,k as h,f as i,P as j,h as k,j as l,p,v as r,x as s}; diff --git a/assets/codexAddEvals-Qz9YXTVy.js b/assets/codexAddEvals-Qz9YXTVy.js new file mode 100644 index 0000000000000000000000000000000000000000..47d2282b08ac5275dc43e2ee6d1ca5dfe2666d46 --- /dev/null +++ b/assets/codexAddEvals-Qz9YXTVy.js @@ -0,0 +1,6 @@ +import{g as d,K as n}from"./index-B7UoLEbn.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 u=d("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]),p="No paper text was available yet. This job starts again automatically within an hour of the paper's Markdown being extracted.";async function h(e,a){const t=await fetch(n(`/api/v1/admin/codex-curation/jobs/benchmark-candidates/${e}/promote`),{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)});if(!t.ok){const o=await t.json().catch(()=>null);throw new Error((o==null?void 0:o.detail)??`Could not promote benchmark candidate (${t.status}).`)}}async function f(e){const a=await fetch(n(`/api/v1/admin/codex-curation/jobs/benchmark-candidates/${e}/rollback`),{method:"POST",credentials:"include"});if(!a.ok){const t=await a.json().catch(()=>null);throw new Error((t==null?void 0:t.detail)??`Could not roll back benchmark candidate (${a.status}).`)}}function m(){const e="0".toLowerCase();return e==="1"||e==="true"||e==="yes"}function w(){const e="0".toLowerCase();return e==="1"||e==="true"||e==="yes"}async function s(e){var o;if(e.ok)return await e.json();const a=await e.json().catch(()=>null),t=((o=a==null?void 0:a.detail)==null?void 0:o.message)??(a==null?void 0:a.detail);throw new Error(typeof t=="string"?t:"Could not run Codex.")}async function b(e){const a=await fetch(n("/api/v1/admin/codex-add-evals/jobs"),{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({paper_id:e})});return s(a)}async function y(e){const a=await fetch(n(`/api/v1/admin/codex-add-evals/jobs/${e}`),{credentials:"include"});return s(a)}async function x(e){return s(await fetch(n(`/api/v1/admin/codex-add-evals/jobs/${e}`),{method:"DELETE",credentials:"include"}))}async function C(e){const a=await fetch(n("/api/v1/admin/codex-enrich-paper/jobs"),{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({paper_id:e})});return s(a)}async function E(e){const a=await fetch(n(`/api/v1/admin/codex-enrich-paper/jobs/${e}`),{credentials:"include"});return s(a)}async function j(e){return s(await fetch(n(`/api/v1/admin/codex-enrich-paper/jobs/${e}`),{method:"DELETE",credentials:"include"}))}async function v(e=100,a={}){const t=new URLSearchParams({limit:String(e)});Object.entries(a).forEach(([i,r])=>{r&&t.set(i,r)});const o=await fetch(n(`/api/v1/admin/codex-curation/jobs?${t}`),{credentials:"include",cache:"no-store"});if(o.ok)return await o.json();const c=new Error(`Could not load Codex jobs (${o.status}).`);throw Object.assign(c,{status:o.status}),c}async function k(e){return s(await fetch(n(`/api/v1/admin/codex-curation/jobs/${e}/retry`),{method:"POST",credentials:"include"}))}async function S(e){const a=await fetch(n(`/api/v1/admin/codex-curation/jobs/${e}/retry-trace`),{method:"POST",credentials:"include"});if(!a.ok)throw new Error(`Could not retry trace upload (${a.status}).`)}async function $(e){return s(await fetch(n(`/api/v1/admin/codex-curation/jobs/${e}`),{method:"DELETE",credentials:"include"}))}async function g(e){const a=await fetch(n(`/api/v1/admin/codex-curation/jobs/scheduler/${e}`),{method:"POST",credentials:"include"});if(!a.ok)throw new Error(`Could not ${e} scheduled curation (${a.status}).`)}export{p as A,u as D,x as a,y as b,j as c,b as d,w as e,$ as f,E as g,S as h,m as i,g as j,f as k,v as l,h as p,k as r,C as s}; diff --git a/assets/colors-DQ-VN9If.js b/assets/colors-COYRNy-F.js similarity index 99% rename from assets/colors-DQ-VN9If.js rename to assets/colors-COYRNy-F.js index 8250718d58eddefcfeae7d225a9a3f493cecc42d..1b51662c1f07e9072f9f488e29778399cf449e34 100644 --- a/assets/colors-DQ-VN9If.js +++ b/assets/colors-COYRNy-F.js @@ -1 +1 @@ -import{V as _}from"./index-CkeK0cDg.js";function w(t){const e=Object.prototype.toString.call(t);return t instanceof Date||typeof t=="object"&&e==="[object Date]"?new t.constructor(+t):typeof t=="number"||e==="[object Number]"||typeof t=="string"||e==="[object String]"?new Date(t):new Date(NaN)}function D(t,e){return t instanceof Date?new t.constructor(e):new Date(e)}const I=6048e5,z=864e5,A=6e4,R=36e5;let V={};function W(){return V}function v(t,e){var s,u,l,f;const n=W(),r=(e==null?void 0:e.weekStartsOn)??((u=(s=e==null?void 0:e.locale)==null?void 0:s.options)==null?void 0:u.weekStartsOn)??n.weekStartsOn??((f=(l=n.locale)==null?void 0:l.options)==null?void 0:f.weekStartsOn)??0,a=w(t),i=a.getDay(),o=(i=a.getTime()?n+1:e.getTime()>=o.getTime()?n:n-1}function F(t){const e=w(t);return e.setHours(0,0,0,0),e}function E(t){const e=w(t),n=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return n.setUTCFullYear(e.getFullYear()),+t-+n}function J(t,e){const n=F(t),r=F(e),a=+n-E(n),i=+r-E(r);return Math.round((a-i)/z)}function Z(t){const e=j(t),n=D(t,0);return n.setFullYear(e,0,4),n.setHours(0,0,0,0),S(n)}function K(t){return t instanceof Date||typeof t=="object"&&Object.prototype.toString.call(t)==="[object Date]"}function tt(t){if(!K(t)&&typeof t!="number")return!1;const e=w(t);return!isNaN(Number(e))}function et(t){const e=w(t),n=D(t,0);return n.setFullYear(e.getFullYear(),0,1),n.setHours(0,0,0,0),n}const nt={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},rt=(t,e,n)=>{let r;const a=nt[t];return typeof a=="string"?r=a:e===1?r=a.one:r=a.other.replace("{{count}}",e.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function C(t){return(e={})=>{const n=e.width?String(e.width):t.defaultWidth;return t.formats[n]||t.formats[t.defaultWidth]}}const at={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},it={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},ot={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},st={date:C({formats:at,defaultWidth:"full"}),time:C({formats:it,defaultWidth:"full"}),dateTime:C({formats:ot,defaultWidth:"full"})},ut={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},ct=(t,e,n,r)=>ut[t];function O(t){return(e,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let a;if(r==="formatting"&&t.formattingValues){const o=t.defaultFormattingWidth||t.defaultWidth,s=n!=null&&n.width?String(n.width):o;a=t.formattingValues[s]||t.formattingValues[o]}else{const o=t.defaultWidth,s=n!=null&&n.width?String(n.width):t.defaultWidth;a=t.values[s]||t.values[o]}const i=t.argumentCallback?t.argumentCallback(e):e;return a[i]}}const dt={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},lt={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},ft={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},ht={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},mt={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},gt={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},wt=(t,e)=>{const n=Number(t),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},yt={ordinalNumber:wt,era:O({values:dt,defaultWidth:"wide"}),quarter:O({values:lt,defaultWidth:"wide",argumentCallback:t=>t-1}),month:O({values:ft,defaultWidth:"wide"}),day:O({values:ht,defaultWidth:"wide"}),dayPeriod:O({values:mt,defaultWidth:"wide",formattingValues:gt,defaultFormattingWidth:"wide"})};function P(t){return(e,n={})=>{const r=n.width,a=r&&t.matchPatterns[r]||t.matchPatterns[t.defaultMatchWidth],i=e.match(a);if(!i)return null;const o=i[0],s=r&&t.parsePatterns[r]||t.parsePatterns[t.defaultParseWidth],u=Array.isArray(s)?Dt(s,g=>g.test(o)):bt(s,g=>g.test(o));let l;l=t.valueCallback?t.valueCallback(u):u,l=n.valueCallback?n.valueCallback(l):l;const f=e.slice(o.length);return{value:l,rest:f}}}function bt(t,e){for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&e(t[n]))return n}function Dt(t,e){for(let n=0;n{const r=e.match(t.matchPattern);if(!r)return null;const a=r[0],i=e.match(t.parsePattern);if(!i)return null;let o=t.valueCallback?t.valueCallback(i[0]):i[0];o=n.valueCallback?n.valueCallback(o):o;const s=e.slice(a.length);return{value:o,rest:s}}}const kt=/^(\d+)(th|st|nd|rd)?/i,Ot=/\d+/i,Pt={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},pt={any:[/^b/i,/^(a|c)/i]},vt={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},xt={any:[/1/i,/2/i,/3/i,/4/i]},Tt={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},St={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Wt={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Yt={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},Ct={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Nt={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},_t={ordinalNumber:Mt({matchPattern:kt,parsePattern:Ot,valueCallback:t=>parseInt(t,10)}),era:P({matchPatterns:Pt,defaultMatchWidth:"wide",parsePatterns:pt,defaultParseWidth:"any"}),quarter:P({matchPatterns:vt,defaultMatchWidth:"wide",parsePatterns:xt,defaultParseWidth:"any",valueCallback:t=>t+1}),month:P({matchPatterns:Tt,defaultMatchWidth:"wide",parsePatterns:St,defaultParseWidth:"any"}),day:P({matchPatterns:Wt,defaultMatchWidth:"wide",parsePatterns:Yt,defaultParseWidth:"any"}),dayPeriod:P({matchPatterns:Ct,defaultMatchWidth:"any",parsePatterns:Nt,defaultParseWidth:"any"})},Ft={code:"en-US",formatDistance:rt,formatLong:st,formatRelative:ct,localize:yt,match:_t,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Et(t){const e=w(t);return J(e,et(e))+1}function qt(t){const e=w(t),n=+S(e)-+Z(e);return Math.round(n/I)+1}function Q(t,e){var f,g,d,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=(d=a.locale)==null?void 0:d.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=v(o,e),u=D(t,0);u.setFullYear(r,0,i),u.setHours(0,0,0,0);const l=v(u,e);return n.getTime()>=s.getTime()?r+1:n.getTime()>=l.getTime()?r:r-1}function Ut(t,e){var s,u,l,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=(l=n.locale)==null?void 0:l.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),v(i,e)}function Lt(t,e){const n=w(t),r=+v(n,e)-+Ut(n,e);return Math.round(r/I)+1}function c(t,e){const n=t<0?"-":"",r=Math.abs(t).toString().padStart(e,"0");return n+r}const y={y(t,e){const n=t.getFullYear(),r=n>0?n:1-n;return c(e==="yy"?r%100:r,e.length)},M(t,e){const n=t.getMonth();return e==="M"?String(n+1):c(n+1,2)},d(t,e){return c(t.getDate(),e.length)},a(t,e){const n=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(t,e){return c(t.getHours()%12||12,e.length)},H(t,e){return c(t.getHours(),e.length)},m(t,e){return c(t.getMinutes(),e.length)},s(t,e){return c(t.getSeconds(),e.length)},S(t,e){const n=e.length,r=t.getMilliseconds(),a=Math.trunc(r*Math.pow(10,n-3));return c(a,e.length)}},M={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},q={G:function(t,e,n){const r=t.getFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(t,e,n){if(e==="yo"){const r=t.getFullYear(),a=r>0?r:1-r;return n.ordinalNumber(a,{unit:"year"})}return y.y(t,e)},Y:function(t,e,n,r){const a=Q(t,r),i=a>0?a:1-a;if(e==="YY"){const o=i%100;return c(o,2)}return e==="Yo"?n.ordinalNumber(i,{unit:"year"}):c(i,e.length)},R:function(t,e){const n=j(t);return c(n,e.length)},u:function(t,e){const n=t.getFullYear();return c(n,e.length)},Q:function(t,e,n){const r=Math.ceil((t.getMonth()+1)/3);switch(e){case"Q":return String(r);case"QQ":return c(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(t,e,n){const r=Math.ceil((t.getMonth()+1)/3);switch(e){case"q":return String(r);case"qq":return c(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(t,e,n){const r=t.getMonth();switch(e){case"M":case"MM":return y.M(t,e);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(t,e,n){const r=t.getMonth();switch(e){case"L":return String(r+1);case"LL":return c(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(t,e,n,r){const a=Lt(t,r);return e==="wo"?n.ordinalNumber(a,{unit:"week"}):c(a,e.length)},I:function(t,e,n){const r=qt(t);return e==="Io"?n.ordinalNumber(r,{unit:"week"}):c(r,e.length)},d:function(t,e,n){return e==="do"?n.ordinalNumber(t.getDate(),{unit:"date"}):y.d(t,e)},D:function(t,e,n){const r=Et(t);return e==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):c(r,e.length)},E:function(t,e,n){const r=t.getDay();switch(e){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(t,e,n,r){const a=t.getDay(),i=(a-r.weekStartsOn+8)%7||7;switch(e){case"e":return String(i);case"ee":return c(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(a,{width:"short",context:"formatting"});case"eeee":default:return n.day(a,{width:"wide",context:"formatting"})}},c:function(t,e,n,r){const a=t.getDay(),i=(a-r.weekStartsOn+8)%7||7;switch(e){case"c":return String(i);case"cc":return c(i,e.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(a,{width:"narrow",context:"standalone"});case"cccccc":return n.day(a,{width:"short",context:"standalone"});case"cccc":default:return n.day(a,{width:"wide",context:"standalone"})}},i:function(t,e,n){const r=t.getDay(),a=r===0?7:r;switch(e){case"i":return String(a);case"ii":return c(a,e.length);case"io":return n.ordinalNumber(a,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(t,e,n){const a=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},b:function(t,e,n){const r=t.getHours();let a;switch(r===12?a=M.noon:r===0?a=M.midnight:a=r/12>=1?"pm":"am",e){case"b":case"bb":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(t,e,n){const r=t.getHours();let a;switch(r>=17?a=M.evening:r>=12?a=M.afternoon:r>=4?a=M.morning:a=M.night,e){case"B":case"BB":case"BBB":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(t,e,n){if(e==="ho"){let r=t.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return y.h(t,e)},H:function(t,e,n){return e==="Ho"?n.ordinalNumber(t.getHours(),{unit:"hour"}):y.H(t,e)},K:function(t,e,n){const r=t.getHours()%12;return e==="Ko"?n.ordinalNumber(r,{unit:"hour"}):c(r,e.length)},k:function(t,e,n){let r=t.getHours();return r===0&&(r=24),e==="ko"?n.ordinalNumber(r,{unit:"hour"}):c(r,e.length)},m:function(t,e,n){return e==="mo"?n.ordinalNumber(t.getMinutes(),{unit:"minute"}):y.m(t,e)},s:function(t,e,n){return e==="so"?n.ordinalNumber(t.getSeconds(),{unit:"second"}):y.s(t,e)},S:function(t,e){return y.S(t,e)},X:function(t,e,n){const r=t.getTimezoneOffset();if(r===0)return"Z";switch(e){case"X":return L(r);case"XXXX":case"XX":return b(r);case"XXXXX":case"XXX":default:return b(r,":")}},x:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"x":return L(r);case"xxxx":case"xx":return b(r);case"xxxxx":case"xxx":default:return b(r,":")}},O:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+U(r,":");case"OOOO":default:return"GMT"+b(r,":")}},z:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+U(r,":");case"zzzz":default:return"GMT"+b(r,":")}},t:function(t,e,n){const r=Math.trunc(t.getTime()/1e3);return c(r,e.length)},T:function(t,e,n){const r=t.getTime();return c(r,e.length)}};function U(t,e=""){const n=t>0?"-":"+",r=Math.abs(t),a=Math.trunc(r/60),i=r%60;return i===0?n+String(a):n+String(a)+e+c(i,2)}function L(t,e){return t%60===0?(t>0?"-":"+")+c(Math.abs(t)/60,2):b(t,e)}function b(t,e=""){const n=t>0?"-":"+",r=Math.abs(t),a=c(Math.trunc(r/60),2),i=c(r%60,2);return n+a+e+i}const H=(t,e)=>{switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});case"PPPP":default:return e.date({width:"full"})}},X=(t,e)=>{switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});case"pppp":default:return e.time({width:"full"})}},Ht=(t,e)=>{const n=t.match(/(P+)(p+)?/)||[],r=n[1],a=n[2];if(!a)return H(t,e);let i;switch(r){case"P":i=e.dateTime({width:"short"});break;case"PP":i=e.dateTime({width:"medium"});break;case"PPP":i=e.dateTime({width:"long"});break;case"PPPP":default:i=e.dateTime({width:"full"});break}return i.replace("{{date}}",H(r,e)).replace("{{time}}",X(a,e))},It={p:X,P:Ht},At=/^D+$/,Rt=/^Y+$/,jt=["D","DD","YY","YYYY"];function Qt(t){return At.test(t)}function Xt(t){return Rt.test(t)}function Bt(t,e,n){const r=Gt(t,e,n);if(console.warn(r),jt.includes(t))throw new RangeError(r)}function Gt(t,e,n){const r=t[0]==="Y"?"years":"days of the month";return`Use \`${t.toLowerCase()}\` instead of \`${t}\` (in \`${e}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const $t=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,zt=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Vt=/^'([^]*?)'?$/,Jt=/''/g,Zt=/[a-zA-Z]/;function Kt(t,e,n){var f,g,d,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=(d=r.locale)==null?void 0:d.options)==null?void 0:k.weekStartsOn)??0,s=w(t);if(!tt(s))throw new RangeError("Invalid time value");let u=e.match(zt).map(m=>{const h=m[0];if(h==="p"||h==="P"){const Y=It[h];return Y(m,a.formatLong)}return m}).join("").match($t).map(m=>{if(m==="''")return{isToken:!1,value:"'"};const h=m[0];if(h==="'")return{isToken:!1,value:te(m)};if(q[h])return{isToken:!0,value:m};if(h.match(Zt))throw new RangeError("Format string contains an unescaped latin alphabet character `"+h+"`");return{isToken:!1,value:m}});a.localize.preprocessor&&(u=a.localize.preprocessor(s,u));const l={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,l)}).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),l=new Date(0);return l.setFullYear(u.getUTCFullYear(),u.getUTCMonth(),u.getUTCDate()),l.setHours(u.getUTCHours(),u.getUTCMinutes(),u.getUTCSeconds(),u.getUTCMilliseconds()),l}return new Date(i+o+s)}const x={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},ee=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,ne=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,re=/^([+-])(\d{2})(?::?(\d{2}))?$/;function ae(t){const e={},n=t.split(x.dateTimeDelimiter);let r;if(n.length>2)return e;if(/:/.test(n[0])?r=n[0]:(e.date=n[0],r=n[1],x.timeZoneDelimiter.test(e.date)&&(e.date=t.split(x.timeZoneDelimiter)[0],r=t.substr(e.date.length,t.length))),r){const a=x.timezone.exec(r);a?(e.time=r.replace(a[1],""),e.timezone=a[1]):e.time=r}return e}function ie(t,e){const n=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+e)+"})|(\\d{2}|[+-]\\d{"+(2+e)+"})$)"),r=t.match(n);if(!r)return{year:NaN,restDateString:""};const a=r[1]?parseInt(r[1]):null,i=r[2]?parseInt(r[2]):null;return{year:i===null?a:i*100,restDateString:t.slice((r[1]||r[2]).length)}}function oe(t,e){if(e===null)return new Date(NaN);const n=t.match(ee);if(!n)return new Date(NaN);const r=!!n[4],a=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 l=new Date(0);return!le(e,i,o)||!fe(e,a)?new Date(NaN):(l.setUTCFullYear(e,i,Math.max(a,o)),l)}}function p(t){return t?parseInt(t):1}function se(t){const e=t.match(ne);if(!e)return NaN;const n=N(e[1]),r=N(e[2]),a=N(e[3]);return me(n,r,a)?n*R+r*A+a*1e3:NaN}function N(t){return t&&parseFloat(t.replace(",","."))||0}function ue(t){if(t==="Z")return 0;const e=t.match(re);if(!e)return 0;const n=e[1]==="+"?-1:1,r=parseInt(e[2]),a=e[3]&&parseInt(e[3])||0;return ge(r,a)?n*(r*R+a*A):NaN}function ce(t,e,n){const r=new Date(0);r.setUTCFullYear(t,0,4);const a=r.getUTCDay()||7,i=(e-1)*7+n+1-a;return r.setUTCDate(r.getUTCDate()+i),r}const de=[31,null,31,30,31,30,31,31,30,31,30,31];function G(t){return t%400===0||t%4===0&&t%100!==0}function le(t,e,n){return e>=0&&e<=11&&n>=1&&n<=(de[e]||(G(t)?29:28))}function fe(t,e){return e>=1&&e<=(G(t)?366:365)}function he(t,e,n){return e>=1&&e<=53&&n>=0&&n<=6}function me(t,e,n){return t===24?e===0&&n===0:n>=0&&n<60&&e>=0&&e<60&&t>=0&&t<25}function ge(t,e){return e>=0&&e<=59}const we={model:"models",dataset:"datasets",space:"spaces"};function ye(t){const e=t.hf_artifact_summary;return!e||!e.best_kind||!e.best_url||e.best_count<=0?{hfKind:null,hfCount:0,hfUrl:null}:{hfKind:we[e.best_kind]??null,hfCount:e.best_count,hfUrl:e.best_url}}function be(t){if(!t||t.length===0)return{github:null,githubUrl:null,velocity24h:null};const e=t.filter(a=>a.is_official),r=[...e.length>0?e:t].sort((a,i)=>(i.num_stars||0)-(a.num_stars||0))[0];return{github:r&&r.num_stars>0?r.num_stars:null,githubUrl:(r==null?void 0:r.url)||null,velocity24h:(r==null?void 0:r.trending_score)??null}}function De(t){if(!t)return null;try{const e=typeof t=="string"?B(t):t;return Kt(e,"MMM d, yyyy")}catch{return null}}function Me(t){if(!t)return null;try{return B(t).getFullYear()}catch{return null}}function pe(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(d=>d.slug||"").filter(Boolean),u=(t.methods||[]).map(d=>({id:d.id,name:d.name,slug:d.slug})),l=(t.leaderboard_ranks||[]).filter(d=>d.best_rank>=1&&d.best_rank<=3).map(d=>({name:d.dataset_name,slug:d.dataset_slug||null,rank:d.best_rank}));return{id:t.arxiv_id||t.id,dbId:t.id,title:t.title,abstract:t.abstract||"",authors:t.authors||[],authorIds:(t.author_links||[]).map(d=>d.id??null),authorHfProfiles:(t.author_links||[]).map(d=>d.hf_username?{username:d.hf_username,avatarUrl:d.hf_avatar_url??null}:null),tags:s,methods:u,organizations:(t.organizations||[]).map(d=>({name:d.name,slug:d.slug,logoUrl:_(d.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:l}}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(["3D","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 ve(t,e){const n=t||ke(e||""),r=$.get((e==null?void 0:e.toLowerCase())||Oe(n));if(r)return r;const a=e==null?void 0:e.toUpperCase(),i=n.toUpperCase();return/^[A-Z0-9][A-Z0-9-]{1,}$/.test(n)||a&&T.has(a)||T.has(i)?i:n.toLowerCase().replace(/\b\w/g,s=>s.toUpperCase()).replace(/\b[A-Za-z0-9]+\b/g,s=>T.has(s.toUpperCase())?s.toUpperCase():s)}function Oe(t){return t.trim().toLowerCase().replace(/[\s_]+/g,"-")}function xe(t){let e=2166136261;const n=t||"";for(let r=0;r=a.getTime()?n+1:e.getTime()>=o.getTime()?n:n-1}function F(t){const e=w(t);return e.setHours(0,0,0,0),e}function E(t){const e=w(t),n=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return n.setUTCFullYear(e.getFullYear()),+t-+n}function J(t,e){const n=F(t),r=F(e),a=+n-E(n),i=+r-E(r);return Math.round((a-i)/z)}function Z(t){const e=j(t),n=D(t,0);return n.setFullYear(e,0,4),n.setHours(0,0,0,0),S(n)}function K(t){return t instanceof Date||typeof t=="object"&&Object.prototype.toString.call(t)==="[object Date]"}function tt(t){if(!K(t)&&typeof t!="number")return!1;const e=w(t);return!isNaN(Number(e))}function et(t){const e=w(t),n=D(t,0);return n.setFullYear(e.getFullYear(),0,1),n.setHours(0,0,0,0),n}const nt={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},rt=(t,e,n)=>{let r;const a=nt[t];return typeof a=="string"?r=a:e===1?r=a.one:r=a.other.replace("{{count}}",e.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function C(t){return(e={})=>{const n=e.width?String(e.width):t.defaultWidth;return t.formats[n]||t.formats[t.defaultWidth]}}const at={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},it={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},ot={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},st={date:C({formats:at,defaultWidth:"full"}),time:C({formats:it,defaultWidth:"full"}),dateTime:C({formats:ot,defaultWidth:"full"})},ut={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},ct=(t,e,n,r)=>ut[t];function O(t){return(e,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let a;if(r==="formatting"&&t.formattingValues){const o=t.defaultFormattingWidth||t.defaultWidth,s=n!=null&&n.width?String(n.width):o;a=t.formattingValues[s]||t.formattingValues[o]}else{const o=t.defaultWidth,s=n!=null&&n.width?String(n.width):t.defaultWidth;a=t.values[s]||t.values[o]}const i=t.argumentCallback?t.argumentCallback(e):e;return a[i]}}const dt={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},lt={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},ft={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},ht={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},mt={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},gt={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},wt=(t,e)=>{const n=Number(t),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},yt={ordinalNumber:wt,era:O({values:dt,defaultWidth:"wide"}),quarter:O({values:lt,defaultWidth:"wide",argumentCallback:t=>t-1}),month:O({values:ft,defaultWidth:"wide"}),day:O({values:ht,defaultWidth:"wide"}),dayPeriod:O({values:mt,defaultWidth:"wide",formattingValues:gt,defaultFormattingWidth:"wide"})};function P(t){return(e,n={})=>{const r=n.width,a=r&&t.matchPatterns[r]||t.matchPatterns[t.defaultMatchWidth],i=e.match(a);if(!i)return null;const o=i[0],s=r&&t.parsePatterns[r]||t.parsePatterns[t.defaultParseWidth],u=Array.isArray(s)?Dt(s,g=>g.test(o)):bt(s,g=>g.test(o));let l;l=t.valueCallback?t.valueCallback(u):u,l=n.valueCallback?n.valueCallback(l):l;const f=e.slice(o.length);return{value:l,rest:f}}}function bt(t,e){for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&e(t[n]))return n}function Dt(t,e){for(let n=0;n{const r=e.match(t.matchPattern);if(!r)return null;const a=r[0],i=e.match(t.parsePattern);if(!i)return null;let o=t.valueCallback?t.valueCallback(i[0]):i[0];o=n.valueCallback?n.valueCallback(o):o;const s=e.slice(a.length);return{value:o,rest:s}}}const kt=/^(\d+)(th|st|nd|rd)?/i,Ot=/\d+/i,Pt={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},pt={any:[/^b/i,/^(a|c)/i]},vt={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},xt={any:[/1/i,/2/i,/3/i,/4/i]},Tt={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},St={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Wt={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Yt={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},Ct={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Nt={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},_t={ordinalNumber:Mt({matchPattern:kt,parsePattern:Ot,valueCallback:t=>parseInt(t,10)}),era:P({matchPatterns:Pt,defaultMatchWidth:"wide",parsePatterns:pt,defaultParseWidth:"any"}),quarter:P({matchPatterns:vt,defaultMatchWidth:"wide",parsePatterns:xt,defaultParseWidth:"any",valueCallback:t=>t+1}),month:P({matchPatterns:Tt,defaultMatchWidth:"wide",parsePatterns:St,defaultParseWidth:"any"}),day:P({matchPatterns:Wt,defaultMatchWidth:"wide",parsePatterns:Yt,defaultParseWidth:"any"}),dayPeriod:P({matchPatterns:Ct,defaultMatchWidth:"any",parsePatterns:Nt,defaultParseWidth:"any"})},Ft={code:"en-US",formatDistance:rt,formatLong:st,formatRelative:ct,localize:yt,match:_t,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Et(t){const e=w(t);return J(e,et(e))+1}function qt(t){const e=w(t),n=+S(e)-+Z(e);return Math.round(n/I)+1}function Q(t,e){var f,g,d,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=(d=a.locale)==null?void 0:d.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=v(o,e),u=D(t,0);u.setFullYear(r,0,i),u.setHours(0,0,0,0);const l=v(u,e);return n.getTime()>=s.getTime()?r+1:n.getTime()>=l.getTime()?r:r-1}function Ut(t,e){var s,u,l,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=(l=n.locale)==null?void 0:l.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),v(i,e)}function Lt(t,e){const n=w(t),r=+v(n,e)-+Ut(n,e);return Math.round(r/I)+1}function c(t,e){const n=t<0?"-":"",r=Math.abs(t).toString().padStart(e,"0");return n+r}const y={y(t,e){const n=t.getFullYear(),r=n>0?n:1-n;return c(e==="yy"?r%100:r,e.length)},M(t,e){const n=t.getMonth();return e==="M"?String(n+1):c(n+1,2)},d(t,e){return c(t.getDate(),e.length)},a(t,e){const n=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(t,e){return c(t.getHours()%12||12,e.length)},H(t,e){return c(t.getHours(),e.length)},m(t,e){return c(t.getMinutes(),e.length)},s(t,e){return c(t.getSeconds(),e.length)},S(t,e){const n=e.length,r=t.getMilliseconds(),a=Math.trunc(r*Math.pow(10,n-3));return c(a,e.length)}},M={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},q={G:function(t,e,n){const r=t.getFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(t,e,n){if(e==="yo"){const r=t.getFullYear(),a=r>0?r:1-r;return n.ordinalNumber(a,{unit:"year"})}return y.y(t,e)},Y:function(t,e,n,r){const a=Q(t,r),i=a>0?a:1-a;if(e==="YY"){const o=i%100;return c(o,2)}return e==="Yo"?n.ordinalNumber(i,{unit:"year"}):c(i,e.length)},R:function(t,e){const n=j(t);return c(n,e.length)},u:function(t,e){const n=t.getFullYear();return c(n,e.length)},Q:function(t,e,n){const r=Math.ceil((t.getMonth()+1)/3);switch(e){case"Q":return String(r);case"QQ":return c(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(t,e,n){const r=Math.ceil((t.getMonth()+1)/3);switch(e){case"q":return String(r);case"qq":return c(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(t,e,n){const r=t.getMonth();switch(e){case"M":case"MM":return y.M(t,e);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(t,e,n){const r=t.getMonth();switch(e){case"L":return String(r+1);case"LL":return c(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(t,e,n,r){const a=Lt(t,r);return e==="wo"?n.ordinalNumber(a,{unit:"week"}):c(a,e.length)},I:function(t,e,n){const r=qt(t);return e==="Io"?n.ordinalNumber(r,{unit:"week"}):c(r,e.length)},d:function(t,e,n){return e==="do"?n.ordinalNumber(t.getDate(),{unit:"date"}):y.d(t,e)},D:function(t,e,n){const r=Et(t);return e==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):c(r,e.length)},E:function(t,e,n){const r=t.getDay();switch(e){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(t,e,n,r){const a=t.getDay(),i=(a-r.weekStartsOn+8)%7||7;switch(e){case"e":return String(i);case"ee":return c(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(a,{width:"short",context:"formatting"});case"eeee":default:return n.day(a,{width:"wide",context:"formatting"})}},c:function(t,e,n,r){const a=t.getDay(),i=(a-r.weekStartsOn+8)%7||7;switch(e){case"c":return String(i);case"cc":return c(i,e.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(a,{width:"narrow",context:"standalone"});case"cccccc":return n.day(a,{width:"short",context:"standalone"});case"cccc":default:return n.day(a,{width:"wide",context:"standalone"})}},i:function(t,e,n){const r=t.getDay(),a=r===0?7:r;switch(e){case"i":return String(a);case"ii":return c(a,e.length);case"io":return n.ordinalNumber(a,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(t,e,n){const a=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},b:function(t,e,n){const r=t.getHours();let a;switch(r===12?a=M.noon:r===0?a=M.midnight:a=r/12>=1?"pm":"am",e){case"b":case"bb":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(t,e,n){const r=t.getHours();let a;switch(r>=17?a=M.evening:r>=12?a=M.afternoon:r>=4?a=M.morning:a=M.night,e){case"B":case"BB":case"BBB":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(t,e,n){if(e==="ho"){let r=t.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return y.h(t,e)},H:function(t,e,n){return e==="Ho"?n.ordinalNumber(t.getHours(),{unit:"hour"}):y.H(t,e)},K:function(t,e,n){const r=t.getHours()%12;return e==="Ko"?n.ordinalNumber(r,{unit:"hour"}):c(r,e.length)},k:function(t,e,n){let r=t.getHours();return r===0&&(r=24),e==="ko"?n.ordinalNumber(r,{unit:"hour"}):c(r,e.length)},m:function(t,e,n){return e==="mo"?n.ordinalNumber(t.getMinutes(),{unit:"minute"}):y.m(t,e)},s:function(t,e,n){return e==="so"?n.ordinalNumber(t.getSeconds(),{unit:"second"}):y.s(t,e)},S:function(t,e){return y.S(t,e)},X:function(t,e,n){const r=t.getTimezoneOffset();if(r===0)return"Z";switch(e){case"X":return L(r);case"XXXX":case"XX":return b(r);case"XXXXX":case"XXX":default:return b(r,":")}},x:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"x":return L(r);case"xxxx":case"xx":return b(r);case"xxxxx":case"xxx":default:return b(r,":")}},O:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+U(r,":");case"OOOO":default:return"GMT"+b(r,":")}},z:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+U(r,":");case"zzzz":default:return"GMT"+b(r,":")}},t:function(t,e,n){const r=Math.trunc(t.getTime()/1e3);return c(r,e.length)},T:function(t,e,n){const r=t.getTime();return c(r,e.length)}};function U(t,e=""){const n=t>0?"-":"+",r=Math.abs(t),a=Math.trunc(r/60),i=r%60;return i===0?n+String(a):n+String(a)+e+c(i,2)}function L(t,e){return t%60===0?(t>0?"-":"+")+c(Math.abs(t)/60,2):b(t,e)}function b(t,e=""){const n=t>0?"-":"+",r=Math.abs(t),a=c(Math.trunc(r/60),2),i=c(r%60,2);return n+a+e+i}const H=(t,e)=>{switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});case"PPPP":default:return e.date({width:"full"})}},X=(t,e)=>{switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});case"pppp":default:return e.time({width:"full"})}},Ht=(t,e)=>{const n=t.match(/(P+)(p+)?/)||[],r=n[1],a=n[2];if(!a)return H(t,e);let i;switch(r){case"P":i=e.dateTime({width:"short"});break;case"PP":i=e.dateTime({width:"medium"});break;case"PPP":i=e.dateTime({width:"long"});break;case"PPPP":default:i=e.dateTime({width:"full"});break}return i.replace("{{date}}",H(r,e)).replace("{{time}}",X(a,e))},It={p:X,P:Ht},At=/^D+$/,Rt=/^Y+$/,jt=["D","DD","YY","YYYY"];function Qt(t){return At.test(t)}function Xt(t){return Rt.test(t)}function Bt(t,e,n){const r=Gt(t,e,n);if(console.warn(r),jt.includes(t))throw new RangeError(r)}function Gt(t,e,n){const r=t[0]==="Y"?"years":"days of the month";return`Use \`${t.toLowerCase()}\` instead of \`${t}\` (in \`${e}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const $t=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,zt=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Vt=/^'([^]*?)'?$/,Jt=/''/g,Zt=/[a-zA-Z]/;function Kt(t,e,n){var f,g,d,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=(d=r.locale)==null?void 0:d.options)==null?void 0:k.weekStartsOn)??0,s=w(t);if(!tt(s))throw new RangeError("Invalid time value");let u=e.match(zt).map(m=>{const h=m[0];if(h==="p"||h==="P"){const Y=It[h];return Y(m,a.formatLong)}return m}).join("").match($t).map(m=>{if(m==="''")return{isToken:!1,value:"'"};const h=m[0];if(h==="'")return{isToken:!1,value:te(m)};if(q[h])return{isToken:!0,value:m};if(h.match(Zt))throw new RangeError("Format string contains an unescaped latin alphabet character `"+h+"`");return{isToken:!1,value:m}});a.localize.preprocessor&&(u=a.localize.preprocessor(s,u));const l={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,l)}).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),l=new Date(0);return l.setFullYear(u.getUTCFullYear(),u.getUTCMonth(),u.getUTCDate()),l.setHours(u.getUTCHours(),u.getUTCMinutes(),u.getUTCSeconds(),u.getUTCMilliseconds()),l}return new Date(i+o+s)}const x={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},ee=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,ne=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,re=/^([+-])(\d{2})(?::?(\d{2}))?$/;function ae(t){const e={},n=t.split(x.dateTimeDelimiter);let r;if(n.length>2)return e;if(/:/.test(n[0])?r=n[0]:(e.date=n[0],r=n[1],x.timeZoneDelimiter.test(e.date)&&(e.date=t.split(x.timeZoneDelimiter)[0],r=t.substr(e.date.length,t.length))),r){const a=x.timezone.exec(r);a?(e.time=r.replace(a[1],""),e.timezone=a[1]):e.time=r}return e}function ie(t,e){const n=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+e)+"})|(\\d{2}|[+-]\\d{"+(2+e)+"})$)"),r=t.match(n);if(!r)return{year:NaN,restDateString:""};const a=r[1]?parseInt(r[1]):null,i=r[2]?parseInt(r[2]):null;return{year:i===null?a:i*100,restDateString:t.slice((r[1]||r[2]).length)}}function oe(t,e){if(e===null)return new Date(NaN);const n=t.match(ee);if(!n)return new Date(NaN);const r=!!n[4],a=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 l=new Date(0);return!le(e,i,o)||!fe(e,a)?new Date(NaN):(l.setUTCFullYear(e,i,Math.max(a,o)),l)}}function p(t){return t?parseInt(t):1}function se(t){const e=t.match(ne);if(!e)return NaN;const n=N(e[1]),r=N(e[2]),a=N(e[3]);return me(n,r,a)?n*R+r*A+a*1e3:NaN}function N(t){return t&&parseFloat(t.replace(",","."))||0}function ue(t){if(t==="Z")return 0;const e=t.match(re);if(!e)return 0;const n=e[1]==="+"?-1:1,r=parseInt(e[2]),a=e[3]&&parseInt(e[3])||0;return ge(r,a)?n*(r*R+a*A):NaN}function ce(t,e,n){const r=new Date(0);r.setUTCFullYear(t,0,4);const a=r.getUTCDay()||7,i=(e-1)*7+n+1-a;return r.setUTCDate(r.getUTCDate()+i),r}const de=[31,null,31,30,31,30,31,31,30,31,30,31];function G(t){return t%400===0||t%4===0&&t%100!==0}function le(t,e,n){return e>=0&&e<=11&&n>=1&&n<=(de[e]||(G(t)?29:28))}function fe(t,e){return e>=1&&e<=(G(t)?366:365)}function he(t,e,n){return e>=1&&e<=53&&n>=0&&n<=6}function me(t,e,n){return t===24?e===0&&n===0:n>=0&&n<60&&e>=0&&e<60&&t>=0&&t<25}function ge(t,e){return e>=0&&e<=59}const we={model:"models",dataset:"datasets",space:"spaces"};function ye(t){const e=t.hf_artifact_summary;return!e||!e.best_kind||!e.best_url||e.best_count<=0?{hfKind:null,hfCount:0,hfUrl:null}:{hfKind:we[e.best_kind]??null,hfCount:e.best_count,hfUrl:e.best_url}}function be(t){if(!t||t.length===0)return{github:null,githubUrl:null,velocity24h:null};const e=t.filter(a=>a.is_official),r=[...e.length>0?e:t].sort((a,i)=>(i.num_stars||0)-(a.num_stars||0))[0];return{github:r&&r.num_stars>0?r.num_stars:null,githubUrl:(r==null?void 0:r.url)||null,velocity24h:(r==null?void 0:r.trending_score)??null}}function De(t){if(!t)return null;try{const e=typeof t=="string"?B(t):t;return Kt(e,"MMM d, yyyy")}catch{return null}}function Me(t){if(!t)return null;try{return B(t).getFullYear()}catch{return null}}function pe(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(d=>d.slug||"").filter(Boolean),u=(t.methods||[]).map(d=>({id:d.id,name:d.name,slug:d.slug})),l=(t.leaderboard_ranks||[]).filter(d=>d.best_rank>=1&&d.best_rank<=3).map(d=>({name:d.dataset_name,slug:d.dataset_slug||null,rank:d.best_rank}));return{id:t.arxiv_id||t.id,dbId:t.id,title:t.title,abstract:t.abstract||"",authors:t.authors||[],authorIds:(t.author_links||[]).map(d=>d.id??null),authorHfProfiles:(t.author_links||[]).map(d=>d.hf_username?{username:d.hf_username,avatarUrl:d.hf_avatar_url??null}:null),tags:s,methods:u,organizations:(t.organizations||[]).map(d=>({name:d.name,slug:d.slug,logoUrl:_(d.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:l}}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(["3D","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 ve(t,e){const n=t||ke(e||""),r=$.get((e==null?void 0:e.toLowerCase())||Oe(n));if(r)return r;const a=e==null?void 0:e.toUpperCase(),i=n.toUpperCase();return/^[A-Z0-9][A-Z0-9-]{1,}$/.test(n)||a&&T.has(a)||T.has(i)?i:n.toLowerCase().replace(/\b\w/g,s=>s.toUpperCase()).replace(/\b[A-Za-z0-9]+\b/g,s=>T.has(s.toUpperCase())?s.toUpperCase():s)}function Oe(t){return t.trim().toLowerCase().replace(/[\s_]+/g,"-")}function xe(t){let e=2166136261;const n=t||"";for(let r=0;rt!=null&&t.startsWith("https://")&&!t.startsWith("https://huggingface.co/avatars/")?t:null,K=({url:t,className:s,href:r,label:o})=>{const[g,n]=E.useState(!1),c=g?null:O(t);if(!c)return null;const i=e.jsx("img",{className:`author-avatar-base ${s}`,src:c,alt:"",loading:"lazy",onError:()=>n(!0)});return r?e.jsx("a",{href:r,target:"_blank",rel:"noopener noreferrer","aria-label":o,children:i}):i},U=({slug:t,label:s,onClick:r})=>{const o=S(),g=H(t),n=G(g),c=i=>{if(i.stopPropagation(),r){r(t);return}o(`/tasks/${t}`)};return e.jsxs("span",{className:"tag-chip",style:{background:n.bg,color:n.text},onClick:c,children:[e.jsx("span",{className:"dot",style:{background:n.dot}}),B(s||D(t),t)]})},_=({method:t,onClick:s})=>{const r=S(),o=t.slug||t.id||"";if(!o)return null;const g=n=>{if(n.stopPropagation(),s){s(o);return}r(`/methods/${o}`)};return e.jsx("span",{className:"method-chip",onClick:g,children:t.name})},F={1:"SOTA 🏆",2:"#2",3:"#3"},$=({units:t,paperHref:s})=>{const r=p.useRef(null),o=p.useRef(null),[g,n]=p.useState(t.length);if(p.useLayoutEffect(()=>{const a=r.current,h=o.current;if(!a||!h||t.length===0)return;const m=f=>(h.textContent=f,h.scrollWidth),l=()=>{const f=a.clientWidth;if(f<=0)return;let d=0,x=0;for(const y of t){const j=m(y.measureText);if(d+j<=f)d+=j,x+=1;else break}if(x0&&d+m(` · +${t.length-x} more`)>f;)x-=1,d-=m(t[x].measureText);x===0&&(x=1)}n(x)};l();const u=new ResizeObserver(l);return u.observe(a),()=>u.disconnect()},[t]),t.length===0)return null;const c=t.slice(0,Math.max(1,Math.min(g,t.length))),i=t.length-c.length;return e.jsxs("div",{className:"paper-sota",ref:r,children:[e.jsx("span",{ref:o,className:"paper-sota-measure","aria-hidden":"true"}),c.map((a,h)=>e.jsxs(p.Fragment,{children:[a.isGroupStart?e.jsxs(e.Fragment,{children:[h>0&&e.jsx("span",{className:"paper-sota-sep",children:" · "}),e.jsx("span",{className:`paper-sota-label${a.rank===1?" paper-sota-label--sota":""}`,children:F[a.rank]}),e.jsx("span",{className:"paper-sota-on",children:" on "})]}):e.jsx("span",{className:"paper-sota-sep",children:", "}),a.slug?e.jsx(L,{to:`/benchmark/${a.slug}`,className:"paper-sota-name",onClick:m=>m.stopPropagation(),children:a.name}):e.jsx("span",{className:"paper-sota-name",children:a.name})]},`${a.slug||a.name}-${h}`)),i>0&&e.jsxs(L,{to:`${s}#results`,className:"paper-sota-more",onClick:a=>a.stopPropagation(),children:[" · +",i," more"]})]})},V=({ranks:t,paperHref:s,wrap:r=!1})=>{const o=p.useMemo(()=>{const n=[];let c=!0;for(const i of[1,2,3]){const a=t.filter(h=>h.rank===i);a.forEach((h,m)=>{const l=m===0,u=l?`${c?"":" · "}${F[i]} on `:", ";n.push({name:h.name,slug:h.slug,rank:i,isGroupStart:l,measureText:u+h.name})}),a.length>0&&(c=!1)}return n},[t]),g=p.useMemo(()=>[1,2,3].map(n=>t.filter(i=>i.rank===n).map((i,a)=>({name:i.name,slug:i.slug,rank:n,isGroupStart:a===0,measureText:(a===0?`${F[n]} on `:", ")+i.name}))).filter(n=>n.length>0),[t]);return r?g.length===0?null:e.jsx("div",{className:"paper-sota-stack",children:g.map(n=>e.jsx($,{units:n,paperHref:s},n[0].rank))}):o.length===0?null:e.jsx($,{units:o,paperHref:s})},q=({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]})},Y=({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"})]}),Q=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)},J=({paperId:t})=>{const s=Q(t),r=160,o=220,g=[.85+s()*.1,.55+s()*.25],n=.45+s()*.3,c=[],i=9+Math.floor(s()*3);for(let v=0;v.3,h=Math.floor(s()*3),m=[],l=6+Math.floor(s()*3);for(let v=0;ve.jsx("rect",{x:d+(r-d*2)*(1-v)/2,y:A+M*2.4,width:(r-d*2)*v,height:1.4,fill:f,rx:.3},`t${M}`)),e.jsx("rect",{x:d+(r-d*2)*(1-n)/2,y:W,width:(r-d*2)*n,height:.9,fill:u,opacity:.7,rx:.2}),e.jsx("rect",{x:d,y:z,width:6,height:1,fill:f,opacity:.6}),c.map((v,M)=>{const C=k+M*2.1;return C>o-d-1?null:e.jsx("rect",{x:y,y:C,width:x*v,height:.8,fill:u,opacity:.55,rx:.2},`l${M}`)}),a&&e.jsxs("g",{children:[e.jsx("rect",{x:j,y:k,width:x,height:14,fill:"#F0EBE0",stroke:u,strokeWidth:.3,opacity:.9}),h===0&&e.jsx("g",{stroke:f,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}`})}),h===1&&e.jsxs("g",{opacity:.55,children:[e.jsx("circle",{cx:j+x/2,cy:k+7,r:3.5,fill:f}),e.jsx("rect",{x:j+2,y:k+11,width:x-4,height:1.5,fill:u})]}),h===2&&e.jsxs("g",{opacity:.55,children:[e.jsx("rect",{x:j+3,y:k+5,width:x-6,height:1,fill:f}),e.jsx("rect",{x:j+6,y:k+8,width:x-12,height:.8,fill:f})]})]}),m.map((v,M)=>{const C=k+(a?16:0)+M*2.1;return C>o-d-1?null:e.jsx("rect",{x:j,y:C,width:x*v,height:.8,fill:u,opacity:.55,rx:.2},`r${M}`)})]})})},X=({paperId:t,title:s,thumbnailUrl:r,priority:o=!1})=>{const[g,n]=p.useState(!1),[c,i]=p.useState(0),[a,h]=p.useState(o),m=p.useRef(null);p.useEffect(()=>{n(!1),i(0)},[r]);const l=p.useMemo(()=>{if(!r)return null;if(c===0)return r;const u=r.includes("?")?"&":"?";return`${r}${u}retry=${c}`},[r,c]);return p.useEffect(()=>{if(o||a)return;const u=m.current;if(!u)return;const f=new IntersectionObserver(([d])=>{d.isIntersecting&&(h(!0),f.disconnect())},{rootMargin:"250px"});return f.observe(u),()=>f.disconnect()},[o,a]),r&&!g?e.jsx("div",{ref:m,style:{width:160,height:220,background:"#FDFCF9",border:"1px solid var(--hairline-strong)",borderRadius:2,boxShadow:"0 1px 0 rgba(0,0,0,0.04), 0 4px 8px -4px rgba(0,0,0,0.08)",flexShrink:0,overflow:"hidden",position:"relative"},children:(o||a)&&l&&e.jsx("img",{src:l,alt:`Thumbnail for ${s}`,loading:o?"eager":"lazy",decoding:"async",fetchPriority:o?"high":"auto",style:{width:"100%",height:"100%",objectFit:"contain",display:"block"},onError:()=>{if(c<1){i(u=>u+1);return}n(!0)}},l)}):e.jsx(J,{paperId:t})},ee="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 te(t){return w(t.slug)==="large language model"||w(t.name)==="large language model"}function se(t){return t.tags.includes(ee)?t.methods.filter(s=>!te(s)):t.methods}const re=({name:t,slug:s,logoUrl:r})=>{const[o,g]=p.useState(!1);return!r||o?null:e.jsx(L,{to:`/orgs/${s}`,className:"paper-organization-logo","aria-label":`View ${t} organization`,title:t,children:e.jsx("img",{src:r,alt:"",onError:()=>g(!0)})})},de=({paper:t,rank:s,showInstitution:r=!0,onClickTag:o,highlightQuery:g})=>{const n=R(),c=`/paper/${t.id}`,i=p.useCallback(()=>{n.prefetchQuery({queryKey:T.detail(t.id),queryFn:()=>I.get(t.id,!0),staleTime:10*60*1e3})},[t.id,n]),a=t.authors.slice(0,3).map((l,u)=>{var x,y;const f=(x=t.authorIds)==null?void 0:x[u],d=(y=t.authorHfProfiles)==null?void 0:y[u];return e.jsxs(p.Fragment,{children:[u>0&&", ",d&&e.jsx(K,{className:"paper-card-author-avatar",url:d.avatarUrl}),f?e.jsx(L,{to:`/authors/${f}`,children:l}):l]},u)}),h=t.authors.length,m=se(t);return e.jsxs("article",{className:"paper-card",children:[s!=null&&e.jsx(L,{to:c,className:"paper-thumb-wrap",onFocus:i,onMouseEnter:i,children:e.jsx(X,{paperId:t.id,title:t.title,thumbnailUrl:t.thumbnailUrl,priority:s<=3})}),e.jsxs("div",{className:"paper-body",children:[e.jsxs("div",{className:"paper-body-main",children:[e.jsxs("h3",{className:"paper-title",children:[e.jsx(L,{to:c,onFocus:i,onMouseEnter:i,children:e.jsx(P,{title:t.title,highlight:g})}),r&&t.organizations.length>0&&e.jsx("span",{className:"paper-organization-logos",children:t.organizations.map(l=>e.jsx(re,{...l},l.slug))})]}),e.jsxs("div",{className:"paper-authors",children:[a,h>3&&e.jsxs("span",{children:[", ","+",h-3," authors"]}),t.date&&e.jsxs(e.Fragment,{children:[h>0?" · ":"",e.jsx("span",{children:t.date})]}),t.citations>0&&e.jsxs(e.Fragment,{children:[h>0||t.date?" · ":"",e.jsxs("span",{children:[t.citations.toLocaleString()," citations"]})]})]}),t.abstract&&e.jsx("p",{className:"paper-abstract",children:e.jsx(Z,{text:t.abstract,highlight:g})}),t.sotaRanks.length>0&&e.jsx(V,{ranks:t.sotaRanks,paperHref:c}),(t.tags.length>0||m.length>0)&&e.jsxs("div",{className:"paper-tags paper-tags--clamped",children:[t.tags.map(l=>e.jsx(U,{slug:l,onClick:o},l)),m.map(l=>e.jsx(_,{method:l},l.id||l.slug||l.name))]})]}),(t.githubUrl||t.hfUrl)&&e.jsxs("div",{className:"paper-resources",children:[N(t.githubUrl)&&e.jsxs("a",{className:"paper-resource is-link",href:N(t.githubUrl)??void 0,target:"_blank",rel:"noopener noreferrer","aria-label":"Open GitHub repository",onClick:l=>l.stopPropagation(),children:[e.jsx(q,{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:"↑"}),oe(t.velocity24h)]}),e.jsx("span",{className:"resource-label",children:"stars / hr"})]})]}),N(t.hfUrl)&&t.hfKind&&e.jsxs("a",{className:"paper-resource is-link",href:N(t.hfUrl)??void 0,target:"_blank",rel:"noopener noreferrer","aria-label":`Open Hugging Face ${t.hfKind}`,onClick:l=>l.stopPropagation(),children:[e.jsx(Y,{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 oe(t){return t.toFixed(1)}export{K as A,q as I,_ as M,de as P,V as S,U as T,X as a}; +import{r as E,j as e,m as R,F as p,L,b as S}from"./index-B7UoLEbn.js";import{p as T}from"./paperQueryKeys-BP2E-0yf.js";import{L as P,a as Z}from"./LatexTitle-CeC5Gqpu.js";import{h as H,d as B,a as D,c as G}from"./colors-COYRNy-F.js";import{p as I}from"./papers-Ctf2uv0o.js";import{s as N}from"./safeExternalHref-CkBrsh84.js";const O=t=>t!=null&&t.startsWith("https://")&&!t.startsWith("https://huggingface.co/avatars/")?t:null,K=({url:t,className:s,href:r,label:o})=>{const[g,n]=E.useState(!1),c=g?null:O(t);if(!c)return null;const i=e.jsx("img",{className:`author-avatar-base ${s}`,src:c,alt:"",loading:"lazy",onError:()=>n(!0)});return r?e.jsx("a",{href:r,target:"_blank",rel:"noopener noreferrer","aria-label":o,children:i}):i},U=({slug:t,label:s,onClick:r})=>{const o=S(),g=H(t),n=G(g),c=i=>{if(i.stopPropagation(),r){r(t);return}o(`/tasks/${t}`)};return e.jsxs("span",{className:"tag-chip",style:{background:n.bg,color:n.text},onClick:c,children:[e.jsx("span",{className:"dot",style:{background:n.dot}}),B(s||D(t),t)]})},_=({method:t,onClick:s})=>{const r=S(),o=t.slug||t.id||"";if(!o)return null;const g=n=>{if(n.stopPropagation(),s){s(o);return}r(`/methods/${o}`)};return e.jsx("span",{className:"method-chip",onClick:g,children:t.name})},F={1:"SOTA 🏆",2:"#2",3:"#3"},$=({units:t,paperHref:s})=>{const r=p.useRef(null),o=p.useRef(null),[g,n]=p.useState(t.length);if(p.useLayoutEffect(()=>{const a=r.current,h=o.current;if(!a||!h||t.length===0)return;const m=f=>(h.textContent=f,h.scrollWidth),l=()=>{const f=a.clientWidth;if(f<=0)return;let d=0,x=0;for(const y of t){const j=m(y.measureText);if(d+j<=f)d+=j,x+=1;else break}if(x0&&d+m(` · +${t.length-x} more`)>f;)x-=1,d-=m(t[x].measureText);x===0&&(x=1)}n(x)};l();const u=new ResizeObserver(l);return u.observe(a),()=>u.disconnect()},[t]),t.length===0)return null;const c=t.slice(0,Math.max(1,Math.min(g,t.length))),i=t.length-c.length;return e.jsxs("div",{className:"paper-sota",ref:r,children:[e.jsx("span",{ref:o,className:"paper-sota-measure","aria-hidden":"true"}),c.map((a,h)=>e.jsxs(p.Fragment,{children:[a.isGroupStart?e.jsxs(e.Fragment,{children:[h>0&&e.jsx("span",{className:"paper-sota-sep",children:" · "}),e.jsx("span",{className:`paper-sota-label${a.rank===1?" paper-sota-label--sota":""}`,children:F[a.rank]}),e.jsx("span",{className:"paper-sota-on",children:" on "})]}):e.jsx("span",{className:"paper-sota-sep",children:", "}),a.slug?e.jsx(L,{to:`/benchmark/${a.slug}`,className:"paper-sota-name",onClick:m=>m.stopPropagation(),children:a.name}):e.jsx("span",{className:"paper-sota-name",children:a.name})]},`${a.slug||a.name}-${h}`)),i>0&&e.jsxs(L,{to:`${s}#results`,className:"paper-sota-more",onClick:a=>a.stopPropagation(),children:[" · +",i," more"]})]})},V=({ranks:t,paperHref:s,wrap:r=!1})=>{const o=p.useMemo(()=>{const n=[];let c=!0;for(const i of[1,2,3]){const a=t.filter(h=>h.rank===i);a.forEach((h,m)=>{const l=m===0,u=l?`${c?"":" · "}${F[i]} on `:", ";n.push({name:h.name,slug:h.slug,rank:i,isGroupStart:l,measureText:u+h.name})}),a.length>0&&(c=!1)}return n},[t]),g=p.useMemo(()=>[1,2,3].map(n=>t.filter(i=>i.rank===n).map((i,a)=>({name:i.name,slug:i.slug,rank:n,isGroupStart:a===0,measureText:(a===0?`${F[n]} on `:", ")+i.name}))).filter(n=>n.length>0),[t]);return r?g.length===0?null:e.jsx("div",{className:"paper-sota-stack",children:g.map(n=>e.jsx($,{units:n,paperHref:s},n[0].rank))}):o.length===0?null:e.jsx($,{units:o,paperHref:s})},q=({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]})},Y=({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"})]}),Q=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)},J=({paperId:t})=>{const s=Q(t),r=160,o=220,g=[.85+s()*.1,.55+s()*.25],n=.45+s()*.3,c=[],i=9+Math.floor(s()*3);for(let v=0;v.3,h=Math.floor(s()*3),m=[],l=6+Math.floor(s()*3);for(let v=0;ve.jsx("rect",{x:d+(r-d*2)*(1-v)/2,y:A+M*2.4,width:(r-d*2)*v,height:1.4,fill:f,rx:.3},`t${M}`)),e.jsx("rect",{x:d+(r-d*2)*(1-n)/2,y:W,width:(r-d*2)*n,height:.9,fill:u,opacity:.7,rx:.2}),e.jsx("rect",{x:d,y:z,width:6,height:1,fill:f,opacity:.6}),c.map((v,M)=>{const C=k+M*2.1;return C>o-d-1?null:e.jsx("rect",{x:y,y:C,width:x*v,height:.8,fill:u,opacity:.55,rx:.2},`l${M}`)}),a&&e.jsxs("g",{children:[e.jsx("rect",{x:j,y:k,width:x,height:14,fill:"#F0EBE0",stroke:u,strokeWidth:.3,opacity:.9}),h===0&&e.jsx("g",{stroke:f,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}`})}),h===1&&e.jsxs("g",{opacity:.55,children:[e.jsx("circle",{cx:j+x/2,cy:k+7,r:3.5,fill:f}),e.jsx("rect",{x:j+2,y:k+11,width:x-4,height:1.5,fill:u})]}),h===2&&e.jsxs("g",{opacity:.55,children:[e.jsx("rect",{x:j+3,y:k+5,width:x-6,height:1,fill:f}),e.jsx("rect",{x:j+6,y:k+8,width:x-12,height:.8,fill:f})]})]}),m.map((v,M)=>{const C=k+(a?16:0)+M*2.1;return C>o-d-1?null:e.jsx("rect",{x:j,y:C,width:x*v,height:.8,fill:u,opacity:.55,rx:.2},`r${M}`)})]})})},X=({paperId:t,title:s,thumbnailUrl:r,priority:o=!1})=>{const[g,n]=p.useState(!1),[c,i]=p.useState(0),[a,h]=p.useState(o),m=p.useRef(null);p.useEffect(()=>{n(!1),i(0)},[r]);const l=p.useMemo(()=>{if(!r)return null;if(c===0)return r;const u=r.includes("?")?"&":"?";return`${r}${u}retry=${c}`},[r,c]);return p.useEffect(()=>{if(o||a)return;const u=m.current;if(!u)return;const f=new IntersectionObserver(([d])=>{d.isIntersecting&&(h(!0),f.disconnect())},{rootMargin:"250px"});return f.observe(u),()=>f.disconnect()},[o,a]),r&&!g?e.jsx("div",{ref:m,style:{width:160,height:220,background:"#FDFCF9",border:"1px solid var(--hairline-strong)",borderRadius:2,boxShadow:"0 1px 0 rgba(0,0,0,0.04), 0 4px 8px -4px rgba(0,0,0,0.08)",flexShrink:0,overflow:"hidden",position:"relative"},children:(o||a)&&l&&e.jsx("img",{src:l,alt:`Thumbnail for ${s}`,loading:o?"eager":"lazy",decoding:"async",fetchPriority:o?"high":"auto",style:{width:"100%",height:"100%",objectFit:"contain",display:"block"},onError:()=>{if(c<1){i(u=>u+1);return}n(!0)}},l)}):e.jsx(J,{paperId:t})},ee="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 te(t){return w(t.slug)==="large language model"||w(t.name)==="large language model"}function se(t){return t.tags.includes(ee)?t.methods.filter(s=>!te(s)):t.methods}const re=({name:t,slug:s,logoUrl:r})=>{const[o,g]=p.useState(!1);return!r||o?null:e.jsx(L,{to:`/orgs/${s}`,className:"paper-organization-logo","aria-label":`View ${t} organization`,title:t,children:e.jsx("img",{src:r,alt:"",onError:()=>g(!0)})})},de=({paper:t,rank:s,showInstitution:r=!0,onClickTag:o,highlightQuery:g})=>{const n=R(),c=`/paper/${t.id}`,i=p.useCallback(()=>{n.prefetchQuery({queryKey:T.detail(t.id),queryFn:()=>I.get(t.id,!0),staleTime:10*60*1e3})},[t.id,n]),a=t.authors.slice(0,3).map((l,u)=>{var x,y;const f=(x=t.authorIds)==null?void 0:x[u],d=(y=t.authorHfProfiles)==null?void 0:y[u];return e.jsxs(p.Fragment,{children:[u>0&&", ",d&&e.jsx(K,{className:"paper-card-author-avatar",url:d.avatarUrl}),f?e.jsx(L,{to:`/authors/${f}`,children:l}):l]},u)}),h=t.authors.length,m=se(t);return e.jsxs("article",{className:"paper-card",children:[s!=null&&e.jsx(L,{to:c,className:"paper-thumb-wrap",onFocus:i,onMouseEnter:i,children:e.jsx(X,{paperId:t.id,title:t.title,thumbnailUrl:t.thumbnailUrl,priority:s<=3})}),e.jsxs("div",{className:"paper-body",children:[e.jsxs("div",{className:"paper-body-main",children:[e.jsxs("h3",{className:"paper-title",children:[e.jsx(L,{to:c,onFocus:i,onMouseEnter:i,children:e.jsx(P,{title:t.title,highlight:g})}),r&&t.organizations.length>0&&e.jsx("span",{className:"paper-organization-logos",children:t.organizations.map(l=>e.jsx(re,{...l},l.slug))})]}),e.jsxs("div",{className:"paper-authors",children:[a,h>3&&e.jsxs("span",{children:[", ","+",h-3," authors"]}),t.date&&e.jsxs(e.Fragment,{children:[h>0?" · ":"",e.jsx("span",{children:t.date})]}),t.citations>0&&e.jsxs(e.Fragment,{children:[h>0||t.date?" · ":"",e.jsxs("span",{children:[t.citations.toLocaleString()," citations"]})]})]}),t.abstract&&e.jsx("p",{className:"paper-abstract",children:e.jsx(Z,{text:t.abstract,highlight:g})}),t.sotaRanks.length>0&&e.jsx(V,{ranks:t.sotaRanks,paperHref:c}),(t.tags.length>0||m.length>0)&&e.jsxs("div",{className:"paper-tags paper-tags--clamped",children:[t.tags.map(l=>e.jsx(U,{slug:l,onClick:o},l)),m.map(l=>e.jsx(_,{method:l},l.id||l.slug||l.name))]})]}),(t.githubUrl||t.hfUrl)&&e.jsxs("div",{className:"paper-resources",children:[N(t.githubUrl)&&e.jsxs("a",{className:"paper-resource is-link",href:N(t.githubUrl)??void 0,target:"_blank",rel:"noopener noreferrer","aria-label":"Open GitHub repository",onClick:l=>l.stopPropagation(),children:[e.jsx(q,{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:"↑"}),oe(t.velocity24h)]}),e.jsx("span",{className:"resource-label",children:"stars / hr"})]})]}),N(t.hfUrl)&&t.hfKind&&e.jsxs("a",{className:"paper-resource is-link",href:N(t.hfUrl)??void 0,target:"_blank",rel:"noopener noreferrer","aria-label":`Open Hugging Face ${t.hfKind}`,onClick:l=>l.stopPropagation(),children:[e.jsx(Y,{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 oe(t){return t.toFixed(1)}export{K as A,q as I,_ as M,de as P,V as S,U as T,X as a}; diff --git a/assets/copy-BEe19JmS.js b/assets/copy-B2Q-ksVe.js similarity index 89% rename from assets/copy-BEe19JmS.js rename to assets/copy-B2Q-ksVe.js index 3344670d59d674588a7a418643fc561759e21576..a43b36e6729f82c16ed14d8d8ced944e86026fb0 100644 --- a/assets/copy-BEe19JmS.js +++ b/assets/copy-B2Q-ksVe.js @@ -1,4 +1,4 @@ -import{g as e}from"./index-CkeK0cDg.js";/** +import{g as e}from"./index-B7UoLEbn.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/dialog-CGH-CTnE.js b/assets/dialog-BECDhHRn.js similarity index 96% rename from assets/dialog-CGH-CTnE.js rename to assets/dialog-BECDhHRn.js index 44489e754243251e6e346768018ca2f089718eab..342993ea22ede77d9eca0b5086db571395e7030c 100644 --- a/assets/dialog-CGH-CTnE.js +++ b/assets/dialog-BECDhHRn.js @@ -1 +1 @@ -import{a7 as f,r as l,j as t,a8 as p,aa as d,ac as g,X as x,x as o,ad as n,ae as i,a9 as r}from"./index-CkeK0cDg.js";const w=f,u=p,c=l.forwardRef(({className:a,...e},s)=>t.jsx(r,{ref:s,className:o("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",a),...e}));c.displayName=r.displayName;const y=l.forwardRef(({className:a,children:e,...s},m)=>t.jsxs(u,{children:[t.jsx(c,{}),t.jsxs(d,{ref:m,className:o("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",a),...s,children:[e,t.jsxs(g,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity data-[state=open]:bg-accent data-[state=open]:text-muted-foreground hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none",children:[t.jsx(x,{className:"h-4 w-4"}),t.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));y.displayName=d.displayName;const N=({className:a,...e})=>t.jsx("div",{className:o("flex flex-col space-y-1.5 text-center sm:text-left",a),...e});N.displayName="DialogHeader";const j=({className:a,...e})=>t.jsx("div",{className:o("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",a),...e});j.displayName="DialogFooter";const D=l.forwardRef(({className:a,...e},s)=>t.jsx(n,{ref:s,className:o("text-lg font-semibold leading-none tracking-tight",a),...e}));D.displayName=n.displayName;const b=l.forwardRef(({className:a,...e},s)=>t.jsx(i,{ref:s,className:o("text-sm text-muted-foreground",a),...e}));b.displayName=i.displayName;export{w as D,y as a,N as b,D as c,b as d,j as e}; +import{a7 as f,r as l,j as t,a8 as p,aa as d,ac as g,X as x,x as o,ad as n,ae as i,a9 as r}from"./index-B7UoLEbn.js";const w=f,u=p,c=l.forwardRef(({className:a,...e},s)=>t.jsx(r,{ref:s,className:o("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",a),...e}));c.displayName=r.displayName;const y=l.forwardRef(({className:a,children:e,...s},m)=>t.jsxs(u,{children:[t.jsx(c,{}),t.jsxs(d,{ref:m,className:o("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",a),...s,children:[e,t.jsxs(g,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity data-[state=open]:bg-accent data-[state=open]:text-muted-foreground hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none",children:[t.jsx(x,{className:"h-4 w-4"}),t.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));y.displayName=d.displayName;const N=({className:a,...e})=>t.jsx("div",{className:o("flex flex-col space-y-1.5 text-center sm:text-left",a),...e});N.displayName="DialogHeader";const j=({className:a,...e})=>t.jsx("div",{className:o("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",a),...e});j.displayName="DialogFooter";const D=l.forwardRef(({className:a,...e},s)=>t.jsx(n,{ref:s,className:o("text-lg font-semibold leading-none tracking-tight",a),...e}));D.displayName=n.displayName;const b=l.forwardRef(({className:a,...e},s)=>t.jsx(i,{ref:s,className:o("text-sm text-muted-foreground",a),...e}));b.displayName=i.displayName;export{w as D,y as a,N as b,D as c,b as d,j as e}; diff --git a/assets/external-link-E5LiqyOi.js b/assets/external-link-mpf7SsAF.js similarity index 89% rename from assets/external-link-E5LiqyOi.js rename to assets/external-link-mpf7SsAF.js index 51943a0bf757672bce15cbba698b52890e1c6067..057d58cb9064aa16f7ded6b5a5d15c40def28731 100644 --- a/assets/external-link-E5LiqyOi.js +++ b/assets/external-link-mpf7SsAF.js @@ -1,4 +1,4 @@ -import{g as a}from"./index-CkeK0cDg.js";/** +import{g as a}from"./index-B7UoLEbn.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/file-text-2FXER-SZ.js b/assets/file-text-CXhRvAOE.js similarity index 91% rename from assets/file-text-2FXER-SZ.js rename to assets/file-text-CXhRvAOE.js index 7b0596e91b327276b8100d8863e3a5663e8156ce..89b80b4ccbda47dda9a10f1d83ed56825d382733 100644 --- a/assets/file-text-2FXER-SZ.js +++ b/assets/file-text-CXhRvAOE.js @@ -1,4 +1,4 @@ -import{g as e}from"./index-CkeK0cDg.js";/** +import{g as e}from"./index-B7UoLEbn.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/github-DHpXYWrC.js b/assets/github-CVI7-Ls5.js similarity index 92% rename from assets/github-DHpXYWrC.js rename to assets/github-CVI7-Ls5.js index 3532d2e66948563743ae54c7a18b7605fdb583d5..83450d23d68ef29e7bd712dcc68141e3eb3a7d66 100644 --- a/assets/github-DHpXYWrC.js +++ b/assets/github-CVI7-Ls5.js @@ -1,4 +1,4 @@ -import{g as c}from"./index-CkeK0cDg.js";/** +import{g as c}from"./index-B7UoLEbn.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/github-BxRJHxJc.js b/assets/github-uiOp6-cP.js similarity index 97% rename from assets/github-BxRJHxJc.js rename to assets/github-uiOp6-cP.js index 03676d4a2b3df808481b9db8b4a91aeebeab288c..fc73125b743185f1d265ca4a6e23c779e4b969fe 100644 --- a/assets/github-BxRJHxJc.js +++ b/assets/github-uiOp6-cP.js @@ -1,4 +1,4 @@ -import{g as l,K as u}from"./index-CkeK0cDg.js";/** +import{g as l,K as u}from"./index-B7UoLEbn.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/hover-card-CAN3Vtea.js b/assets/hover-card-BM8a6wEE.js similarity index 98% rename from assets/hover-card-CAN3Vtea.js rename to assets/hover-card-BM8a6wEE.js index d3c566b0a4f05dee8c816f6d552ed8010209fae3..2f83cec1e2f35b21bbedb09bfa4e67dbd34c1182 100644 --- a/assets/hover-card-CAN3Vtea.js +++ b/assets/hover-card-BM8a6wEE.js @@ -1 +1 @@ -import{r as n,q as k,j as i,ag as F,ah as I,p as U,t as l,ai as T,P as O,aj as $,w as W,s as z,ao as B,ap as q,aq as G,x as K}from"./index-CkeK0cDg.js";var E,w="HoverCard",[y]=W(w,[T]),b=T(),[V,S]=y(w),N=e=>{const{__scopeHoverCard:o,children:r,open:s,defaultOpen:a,onOpenChange:c,openDelay:f=700,closeDelay:v=300}=e,d=b(o),C=n.useRef(0),u=n.useRef(0),h=n.useRef(!1),p=n.useRef(!1),[m,t]=k({prop:s,defaultProp:a??!1,onChange:c,caller:w}),x=n.useCallback(()=>{clearTimeout(u.current),C.current=window.setTimeout(()=>t(!0),f)},[f,t]),P=n.useCallback(()=>{clearTimeout(C.current),!h.current&&!p.current&&(u.current=window.setTimeout(()=>t(!1),v))},[v,t]),M=n.useCallback(()=>t(!1),[t]);return n.useEffect(()=>()=>{clearTimeout(C.current),clearTimeout(u.current)},[]),i.jsx(V,{scope:o,open:m,onOpenChange:t,onOpen:x,onClose:P,onDismiss:M,hasSelectionRef:h,isPointerDownOnContentRef:p,children:i.jsx(F,{...d,children:r})})};N.displayName=w;var _="HoverCardTrigger",D=n.forwardRef((e,o)=>{const{__scopeHoverCard:r,...s}=e,a=S(_,r),c=b(r);return i.jsx(I,{asChild:!0,...c,children:i.jsx(U.a,{"data-state":a.open?"open":"closed",...s,ref:o,onPointerEnter:l(e.onPointerEnter,g(a.onOpen)),onPointerLeave:l(e.onPointerLeave,g(a.onClose)),onFocus:l(e.onFocus,a.onOpen),onBlur:l(e.onBlur,a.onClose),onTouchStart:l(e.onTouchStart,f=>f.preventDefault())})})});D.displayName=_;var H="HoverCardPortal",[J,Q]=y(H,{forceMount:void 0}),j=e=>{const{__scopeHoverCard:o,forceMount:r,children:s,container:a}=e,c=S(H,o);return i.jsx(J,{scope:o,forceMount:r,children:i.jsx(O,{present:r||c.open,children:i.jsx($,{asChild:!0,container:a,children:s})})})};j.displayName=H;var R="HoverCardContent",A=n.forwardRef((e,o)=>{const r=Q(R,e.__scopeHoverCard),{forceMount:s=r.forceMount,...a}=e,c=S(R,e.__scopeHoverCard);return i.jsx(O,{present:s||c.open,children:i.jsx(X,{"data-state":c.open?"open":"closed",...a,onPointerEnter:l(e.onPointerEnter,g(c.onOpen)),onPointerLeave:l(e.onPointerLeave,g(c.onClose)),ref:o})})});A.displayName=R;var X=n.forwardRef((e,o)=>{const{__scopeHoverCard:r,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:c,onInteractOutside:f,...v}=e,d=S(R,r),C=b(r),u=n.useRef(null),h=z(o,u),[p,m]=n.useState(!1);return n.useEffect(()=>{if(p){const t=document.body;return E=t.style.userSelect||t.style.webkitUserSelect,t.style.userSelect="none",t.style.webkitUserSelect="none",()=>{t.style.userSelect=E,t.style.webkitUserSelect=E}}},[p]),n.useEffect(()=>{if(u.current){const t=()=>{m(!1),d.isPointerDownOnContentRef.current=!1,setTimeout(()=>{var P;((P=document.getSelection())==null?void 0:P.toString())!==""&&(d.hasSelectionRef.current=!0)})};return document.addEventListener("pointerup",t),()=>{document.removeEventListener("pointerup",t),d.hasSelectionRef.current=!1,d.isPointerDownOnContentRef.current=!1}}},[d.isPointerDownOnContentRef,d.hasSelectionRef]),n.useEffect(()=>{u.current&&ee(u.current).forEach(x=>x.setAttribute("tabindex","-1"))}),i.jsx(B,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:f,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:l(c,t=>{t.preventDefault()}),onDismiss:d.onDismiss,children:i.jsx(q,{...C,...v,onPointerDown:l(v.onPointerDown,t=>{t.currentTarget.contains(t.target)&&m(!0),d.hasSelectionRef.current=!1,d.isPointerDownOnContentRef.current=!0}),ref:h,style:{...v.style,userSelect:p?"text":void 0,WebkitUserSelect:p?"text":void 0,"--radix-hover-card-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-hover-card-content-available-width":"var(--radix-popper-available-width)","--radix-hover-card-content-available-height":"var(--radix-popper-available-height)","--radix-hover-card-trigger-width":"var(--radix-popper-anchor-width)","--radix-hover-card-trigger-height":"var(--radix-popper-anchor-height)"}})})}),Y="HoverCardArrow",Z=n.forwardRef((e,o)=>{const{__scopeHoverCard:r,...s}=e,a=b(r);return i.jsx(G,{...a,...s,ref:o})});Z.displayName=Y;function g(e){return o=>o.pointerType==="touch"?void 0:e()}function ee(e){const o=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:s=>s.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});for(;r.nextNode();)o.push(r.currentNode);return o}var te=N,oe=D,re=j,L=A;const se=te,ie=oe,ne=n.forwardRef(({className:e,align:o="center",sideOffset:r=4,...s},a)=>i.jsx(re,{children:i.jsx(L,{ref:a,align:o,sideOffset:r,className:K("z-50 w-64 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...s})}));ne.displayName=L.displayName;export{se as H,ie as a,ne as b}; +import{r as n,q as k,j as i,ag as F,ah as I,p as U,t as l,ai as T,P as O,aj as $,w as W,s as z,ao as B,ap as q,aq as G,x as K}from"./index-B7UoLEbn.js";var E,w="HoverCard",[y]=W(w,[T]),b=T(),[V,S]=y(w),N=e=>{const{__scopeHoverCard:o,children:r,open:s,defaultOpen:a,onOpenChange:c,openDelay:f=700,closeDelay:v=300}=e,d=b(o),C=n.useRef(0),u=n.useRef(0),h=n.useRef(!1),p=n.useRef(!1),[m,t]=k({prop:s,defaultProp:a??!1,onChange:c,caller:w}),x=n.useCallback(()=>{clearTimeout(u.current),C.current=window.setTimeout(()=>t(!0),f)},[f,t]),P=n.useCallback(()=>{clearTimeout(C.current),!h.current&&!p.current&&(u.current=window.setTimeout(()=>t(!1),v))},[v,t]),M=n.useCallback(()=>t(!1),[t]);return n.useEffect(()=>()=>{clearTimeout(C.current),clearTimeout(u.current)},[]),i.jsx(V,{scope:o,open:m,onOpenChange:t,onOpen:x,onClose:P,onDismiss:M,hasSelectionRef:h,isPointerDownOnContentRef:p,children:i.jsx(F,{...d,children:r})})};N.displayName=w;var _="HoverCardTrigger",D=n.forwardRef((e,o)=>{const{__scopeHoverCard:r,...s}=e,a=S(_,r),c=b(r);return i.jsx(I,{asChild:!0,...c,children:i.jsx(U.a,{"data-state":a.open?"open":"closed",...s,ref:o,onPointerEnter:l(e.onPointerEnter,g(a.onOpen)),onPointerLeave:l(e.onPointerLeave,g(a.onClose)),onFocus:l(e.onFocus,a.onOpen),onBlur:l(e.onBlur,a.onClose),onTouchStart:l(e.onTouchStart,f=>f.preventDefault())})})});D.displayName=_;var H="HoverCardPortal",[J,Q]=y(H,{forceMount:void 0}),j=e=>{const{__scopeHoverCard:o,forceMount:r,children:s,container:a}=e,c=S(H,o);return i.jsx(J,{scope:o,forceMount:r,children:i.jsx(O,{present:r||c.open,children:i.jsx($,{asChild:!0,container:a,children:s})})})};j.displayName=H;var R="HoverCardContent",A=n.forwardRef((e,o)=>{const r=Q(R,e.__scopeHoverCard),{forceMount:s=r.forceMount,...a}=e,c=S(R,e.__scopeHoverCard);return i.jsx(O,{present:s||c.open,children:i.jsx(X,{"data-state":c.open?"open":"closed",...a,onPointerEnter:l(e.onPointerEnter,g(c.onOpen)),onPointerLeave:l(e.onPointerLeave,g(c.onClose)),ref:o})})});A.displayName=R;var X=n.forwardRef((e,o)=>{const{__scopeHoverCard:r,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:c,onInteractOutside:f,...v}=e,d=S(R,r),C=b(r),u=n.useRef(null),h=z(o,u),[p,m]=n.useState(!1);return n.useEffect(()=>{if(p){const t=document.body;return E=t.style.userSelect||t.style.webkitUserSelect,t.style.userSelect="none",t.style.webkitUserSelect="none",()=>{t.style.userSelect=E,t.style.webkitUserSelect=E}}},[p]),n.useEffect(()=>{if(u.current){const t=()=>{m(!1),d.isPointerDownOnContentRef.current=!1,setTimeout(()=>{var P;((P=document.getSelection())==null?void 0:P.toString())!==""&&(d.hasSelectionRef.current=!0)})};return document.addEventListener("pointerup",t),()=>{document.removeEventListener("pointerup",t),d.hasSelectionRef.current=!1,d.isPointerDownOnContentRef.current=!1}}},[d.isPointerDownOnContentRef,d.hasSelectionRef]),n.useEffect(()=>{u.current&&ee(u.current).forEach(x=>x.setAttribute("tabindex","-1"))}),i.jsx(B,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:f,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:l(c,t=>{t.preventDefault()}),onDismiss:d.onDismiss,children:i.jsx(q,{...C,...v,onPointerDown:l(v.onPointerDown,t=>{t.currentTarget.contains(t.target)&&m(!0),d.hasSelectionRef.current=!1,d.isPointerDownOnContentRef.current=!0}),ref:h,style:{...v.style,userSelect:p?"text":void 0,WebkitUserSelect:p?"text":void 0,"--radix-hover-card-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-hover-card-content-available-width":"var(--radix-popper-available-width)","--radix-hover-card-content-available-height":"var(--radix-popper-available-height)","--radix-hover-card-trigger-width":"var(--radix-popper-anchor-width)","--radix-hover-card-trigger-height":"var(--radix-popper-anchor-height)"}})})}),Y="HoverCardArrow",Z=n.forwardRef((e,o)=>{const{__scopeHoverCard:r,...s}=e,a=b(r);return i.jsx(G,{...a,...s,ref:o})});Z.displayName=Y;function g(e){return o=>o.pointerType==="touch"?void 0:e()}function ee(e){const o=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:s=>s.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});for(;r.nextNode();)o.push(r.currentNode);return o}var te=N,oe=D,re=j,L=A;const se=te,ie=oe,ne=n.forwardRef(({className:e,align:o="center",sideOffset:r=4,...s},a)=>i.jsx(re,{children:i.jsx(L,{ref:a,align:o,sideOffset:r,className:K("z-50 w-64 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...s})}));ne.displayName=L.displayName;export{se as H,ie as a,ne as b}; diff --git a/assets/index-CkeK0cDg.js b/assets/index-B7UoLEbn.js similarity index 98% rename from assets/index-CkeK0cDg.js rename to assets/index-B7UoLEbn.js index dd17f21711b1929f14cbe26a68b03cd8cfe43f90..0de5625a5b92ef70873dae1d9c10730df2a8d255 100644 --- a/assets/index-CkeK0cDg.js +++ b/assets/index-B7UoLEbn.js @@ -1,4 +1,4 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/AuthorizePaperEditView-BfRwxwFE.js","assets/useQuery-_Fj6Jfzr.js","assets/useMutation-q-fdM2fm.js","assets/button-CsUrN-GU.js","assets/paperEdits-DNevMcOH.js","assets/FollowingView-EFGemqQ1.js","assets/FeedView-CWq49Xub.js","assets/colors-DQ-VN9If.js","assets/mail-0F33Vm5v.js","assets/plus-BaTMbqcZ.js","assets/research-BfGol3BN.js","assets/components-BRrDI9KS.js","assets/paperQueryKeys-BP2E-0yf.js","assets/LatexTitle-DPYNzv63.js","assets/papers-Celoj8_s.js","assets/safeExternalHref-CkBrsh84.js","assets/components-o5W6pl_W.css","assets/AgentLogos-BU5avxAK.js","assets/PaperFeedFilters-D-Ie3cDx.js","assets/PaperDateFilter-qc_JVYg0.js","assets/popover-Vq6DwYpn.js","assets/chatLaunch-NPBTDHUP.js","assets/chat-Cvg-XEh-.js","assets/chevron-down-CcbfCW-U.js","assets/catalog-DGg7xZLW.js","assets/chatPrompts-DypmWIqx.js","assets/usePapers-fMOiVOFB.js","assets/useInfiniteQuery-gdIFpXB_.js","assets/useIntersectionObserver-Bw5JPCeX.js","assets/skeleton-Cs8haT1C.js","assets/alert-Vt5eE6re.js","assets/ChatView-V3k6NvU1.js","assets/ArtifactWorkspace-CRRWXbww.js","assets/hover-card-CAN3Vtea.js","assets/github-BxRJHxJc.js","assets/github-DHpXYWrC.js","assets/PaperPreviewLink-CQ27hqZy.js","assets/index-B1_S53Hb.js","assets/index-DqQiSNg1.js","assets/katex-DkKDou_j.js","assets/copy-BEe19JmS.js","assets/file-text-2FXER-SZ.js","assets/external-link-E5LiqyOi.js","assets/ArtifactWorkspace-Lr_OJaUk.css","assets/katex-wklAmtGL.css","assets/openrouter-DC0iPeja.js","assets/queryOptions-C9woPjwX.js","assets/SharedChatView-BPiynfM9.js","assets/PapersListView-CsWnWrRV.js","assets/useDebounce-BX_reoqD.js","assets/PaperDetailView-CLG-Lnyq.js","assets/ExternalSourceEvalBadge-C5RULLdt.js","assets/ExternalSourceEvalBadge-DXfuqNnO.css","assets/paperReader-BIpQD5HO.js","assets/latexPlainText-DI8YEXVe.js","assets/dialog-CGH-CTnE.js","assets/input-Cnu30n0B.js","assets/searchable-select-DT-5KDJe.js","assets/loader-circle-CTuL2Xdc.js","assets/submissions-C-uglc0y.js","assets/evaluationQueryInvalidation-CC5JhGiX.js","assets/SignInToEditDialog-CmfnGty-.js","assets/textarea-BsaJyP0o.js","assets/codexAddEvals-Cyz55d6F.js","assets/index-DVmlmU_7.js","assets/badge-DESGN9ka.js","assets/savedPapersAuth-dGFX8cRe.js","assets/PaperDetailView-gEwMf3J2.css","assets/PaperReaderView-CYHEOXgF.js","assets/MarkdownText-DM-IyAfb.js","assets/TagsIndexView-Dq1B1h6G.js","assets/slug-BpH-Nkvz.js","assets/TaxonomySuggestionTile-BltCio9I.js","assets/TaxonomyTrending-g677Z8nK.js","assets/trending-up-BKEZ18MU.js","assets/TagBrowseView-DuYYWtvR.js","assets/ResearchFollowButton-Dpqj0_yd.js","assets/trophy-B-BD7RmH.js","assets/BenchmarkTrendSparkline-DtMXUNJJ.js","assets/MethodsIndexView-sXYUwk5L.js","assets/FrameworksIndexView-Dq1PTcS8.js","assets/TrendsView-0qWm9HI5.js","assets/ConferencesIndexView-BAG6HQgJ.js","assets/AiDeadlinesView-xAdHZPwo.js","assets/switch-DlTd3dHA.js","assets/ConferenceDetailView-DCFcy6HY.js","assets/ConferenceTaskView-B3KC6Cjp.js","assets/OrganizationsIndexView-cBaBMGWl.js","assets/OrganizationsIndexView-dniuSNch.css","assets/OrganizationDetailView-CiX739Oz.js","assets/OrganizationPaperFeed-LrCe_Sqd.js","assets/OrganizationContributionGraph-DmtgA4CC.js","assets/NotFound-3C_Rmvq0.js","assets/OrganizationTaskView-CHkDgXnx.js","assets/AuthorDetailView-D5GOZaKX.js","assets/MethodDetailView-CLQNXnif.js","assets/BenchmarkDetailView-Do-phYU9.js","assets/BenchmarkDetailView-qL8oJ-Im.css","assets/SavedPapersView-mfFmqcEo.js","assets/SettingsView-CNX_Ys8s.js","assets/PrivacyView-BuZaMRBW.js","assets/ApiDocsView-CTgUj-zh.js","assets/ApiDocsView-DPuMdYvY.css","assets/McpView-DiDGTElx.js","assets/McpView-x81xs7uB.css","assets/SubmitView-uKaxJMOl.js","assets/CronDashboard-Sgu7FsUW.js","assets/operations-bzcC9DQN.js","assets/shield-alert-CvBQiZwU.js","assets/refresh-cw-ty41it1O.js","assets/circle-check-BZ6y-zRa.js","assets/CronDashboard-DwChfW9h.css","assets/AutonomousOperations-BUS5tzl6.js","assets/SubmissionsDashboard-CU1SgfgM.js","assets/SubmissionsDashboard-2iSRk_ue.css","assets/UserProfileView-DyszpB1t.js","assets/RateLimitsView-vCH7Yezm.js","assets/AstraForRoboticsView-D_kBWqyr.js","assets/AstraForRoboticsView-C_lTF_XB.css","assets/SearchOverlay-D30M3sCW.js","assets/StagingAccessRequestView-DbFH2yKq.js"])))=>i.map(i=>d[i]); +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/AuthorizePaperEditView-gluuntVq.js","assets/useQuery-DV2f4JpC.js","assets/useMutation-CuaM6sOT.js","assets/button-D543yAN8.js","assets/paperEdits-C__t4BOQ.js","assets/FollowingView-UZ1-6cIq.js","assets/FeedView-DoZPrMkR.js","assets/colors-COYRNy-F.js","assets/mail-BWFd7V0v.js","assets/plus-BvN48Xkz.js","assets/research-D7aSz-AO.js","assets/components-Cax1Inob.js","assets/paperQueryKeys-BP2E-0yf.js","assets/LatexTitle-CeC5Gqpu.js","assets/papers-Ctf2uv0o.js","assets/safeExternalHref-CkBrsh84.js","assets/components-o5W6pl_W.css","assets/AgentLogos-XWluRn7l.js","assets/PaperFeedFilters-CF3OKsFW.js","assets/PaperDateFilter-CGG1OZi6.js","assets/popover-BOnBmrXi.js","assets/chatLaunch-BG1GqDpR.js","assets/chat-B6IGPjTl.js","assets/chevron-down-CF7sS93G.js","assets/catalog-DcbS_7_L.js","assets/chatPrompts-DypmWIqx.js","assets/usePapers-CDuTKuAc.js","assets/useInfiniteQuery-CoFrg4GN.js","assets/useIntersectionObserver-DOCspj7m.js","assets/skeleton-DLsINbKq.js","assets/alert-B3UHHG00.js","assets/ChatView-Clbc6HRC.js","assets/ArtifactWorkspace-B1pVTYNC.js","assets/hover-card-BM8a6wEE.js","assets/github-uiOp6-cP.js","assets/github-CVI7-Ls5.js","assets/PaperPreviewLink-C5ianbW8.js","assets/index-tHVWANW1.js","assets/index-ClEBI70O.js","assets/katex-DkKDou_j.js","assets/copy-B2Q-ksVe.js","assets/file-text-CXhRvAOE.js","assets/external-link-mpf7SsAF.js","assets/ArtifactWorkspace-Lr_OJaUk.css","assets/katex-wklAmtGL.css","assets/openrouter-Drl-aaDJ.js","assets/queryOptions-C9woPjwX.js","assets/SharedChatView-2Rg43kIf.js","assets/PapersListView-D98idr2d.js","assets/useDebounce-C4Z21BjM.js","assets/PaperDetailView-DdfjmMoh.js","assets/ExternalSourceEvalBadge-BwESq8va.js","assets/ExternalSourceEvalBadge-DXfuqNnO.css","assets/paperReader-BIpQD5HO.js","assets/latexPlainText-DI8YEXVe.js","assets/dialog-BECDhHRn.js","assets/input-hdt3aF12.js","assets/searchable-select-CceG4fY6.js","assets/loader-circle-hbMX20oF.js","assets/submissions-BTKMKNWZ.js","assets/evaluationQueryInvalidation-CC5JhGiX.js","assets/SignInToEditDialog-BzeqSUHr.js","assets/textarea-CpxVQZTZ.js","assets/codexAddEvals-Qz9YXTVy.js","assets/index-C0YS4OFr.js","assets/badge-BieMUBSb.js","assets/savedPapersAuth-axHpepOL.js","assets/PaperDetailView-gEwMf3J2.css","assets/PaperReaderView-wkU6OX5E.js","assets/MarkdownText-DH4XnT47.js","assets/TagsIndexView-D9ct36Oa.js","assets/slug-BpH-Nkvz.js","assets/TaxonomySuggestionTile-DX_yob8h.js","assets/TaxonomyTrending-BQ_4UvnV.js","assets/trending-up-DOtHjkBv.js","assets/TagBrowseView-BfCOFExx.js","assets/ResearchFollowButton-C31U0bn3.js","assets/trophy-Dv8UTCAs.js","assets/BenchmarkTrendSparkline-DoEe-tuL.js","assets/MethodsIndexView-otCcFXzJ.js","assets/FrameworksIndexView-C6_FlZ8B.js","assets/TrendsView-kqxWmThB.js","assets/ConferencesIndexView-VSV18uHC.js","assets/AiDeadlinesView-CVIN6p8v.js","assets/switch-Dard85vE.js","assets/ConferenceDetailView-BppSWd5G.js","assets/ConferenceTaskView-GaHTKHQE.js","assets/OrganizationsIndexView-DJGhJtfP.js","assets/OrganizationsIndexView-dniuSNch.css","assets/OrganizationDetailView-prvvF6X7.js","assets/OrganizationPaperFeed-DkjkYb5k.js","assets/OrganizationContributionGraph-0fzCjE06.js","assets/NotFound-DPR3-upZ.js","assets/OrganizationTaskView-BAUp2ClU.js","assets/AuthorDetailView-BwAC3iti.js","assets/MethodDetailView-DsH5xxKe.js","assets/BenchmarkDetailView-BoBxL96j.js","assets/BenchmarkDetailView-qL8oJ-Im.css","assets/SavedPapersView-BGMVrPGI.js","assets/SettingsView-kMZuD2XF.js","assets/PrivacyView-BVxZN5Ym.js","assets/ApiDocsView-BHw_NlA8.js","assets/ApiDocsView-DPuMdYvY.css","assets/McpView-CCjkgwIH.js","assets/McpView-x81xs7uB.css","assets/SubmitView-Cz7qubn4.js","assets/CronDashboard-Da9cHEaM.js","assets/operations-GXAv7423.js","assets/shield-alert-BnMa8lt8.js","assets/refresh-cw-Gb7Np-Ie.js","assets/circle-check-CDmFoooL.js","assets/CronDashboard-DwChfW9h.css","assets/AutonomousOperations-BcSbSeEV.js","assets/SubmissionsDashboard-MVmNy5zG.js","assets/SubmissionsDashboard-2iSRk_ue.css","assets/UserProfileView-T9Rs7-BZ.js","assets/RateLimitsView-BsiDpNim.js","assets/AstraForRoboticsView-Ddft2N0b.js","assets/AstraForRoboticsView-C_lTF_XB.css","assets/SearchOverlay-D6omh4TK.js","assets/StagingAccessRequestView-Bjz7RlyX.js"])))=>i.map(i=>d[i]); var tP=Object.defineProperty;var vm=t=>{throw TypeError(t)};var nP=(t,e,n)=>e in t?tP(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var Fr=(t,e,n)=>nP(t,typeof e!="symbol"?e+"":e,n),jd=(t,e,n)=>e.has(t)||vm("Cannot "+n);var A=(t,e,n)=>(jd(t,e,"read from private field"),n?n.call(t):e.get(t)),fe=(t,e,n)=>e.has(t)?vm("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),ne=(t,e,n,r)=>(jd(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n),ut=(t,e,n)=>(jd(t,e,"access private method"),n);var Rl=(t,e,n,r)=>({set _(s){ne(t,e,s,n)},get _(){return A(t,e,r)}});function rP(t,e){for(var n=0;nr[s]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const i of s)if(i.type==="childList")for(const o of i.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(s){const i={};return s.integrity&&(i.integrity=s.integrity),s.referrerPolicy&&(i.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?i.credentials="include":s.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(s){if(s.ep)return;s.ep=!0;const i=n(s);fetch(s.href,i)}})();var Zz=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function iw(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var ow={exports:{}},Wc={},aw={exports:{}},de={};/** * @license React * react.production.min.js @@ -160,4 +160,4 @@ For more information, see https://radix-ui.com/primitives/docs/components/${e.do * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const cD=Id("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),dD=tD,fD=nD,hD=g.forwardRef(({className:t,inset:e,children:n,...r},s)=>w.jsxs(ik,{ref:s,className:at("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[state=open]:bg-accent focus:bg-accent",e&&"pl-8",t),...r,children:[n,w.jsx(lD,{className:"ml-auto h-4 w-4"})]}));hD.displayName=ik.displayName;const pD=g.forwardRef(({className:t,...e},n)=>w.jsx(ok,{ref:n,className:at("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t),...e}));pD.displayName=ok.displayName;const lk=g.forwardRef(({className:t,sideOffset:e=4,...n},r)=>w.jsx(rD,{children:w.jsx(JC,{ref:r,sideOffset:e,className:at("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t),...n})}));lk.displayName=JC.displayName;const lr=g.forwardRef(({className:t,inset:e,...n},r)=>w.jsx(ek,{ref:r,className:at("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",e&&"pl-8",t),...n}));lr.displayName=ek.displayName;const vD=g.forwardRef(({className:t,children:e,checked:n,...r},s)=>w.jsxs(tk,{ref:s,className:at("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",t),checked:n,...r,children:[w.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:w.jsx(rk,{children:w.jsx(aD,{className:"h-4 w-4"})})}),e]}));vD.displayName=tk.displayName;const gD=g.forwardRef(({className:t,children:e,...n},r)=>w.jsxs(nk,{ref:r,className:at("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",t),...n,children:[w.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:w.jsx(rk,{children:w.jsx(uD,{className:"h-2 w-2 fill-current"})})}),e]}));gD.displayName=nk.displayName;const uk=g.forwardRef(({className:t,inset:e,...n},r)=>w.jsx(ZC,{ref:r,className:at("px-2 py-1.5 text-sm font-semibold",e&&"pl-8",t),...n}));uk.displayName=ZC.displayName;const sv=g.forwardRef(({className:t,...e},n)=>w.jsx(sk,{ref:n,className:at("-mx-1 my-1 h-px bg-muted",t),...e}));sv.displayName=sk.displayName;function mD(t){const n=(t.name||t.username||"?").trim().split(/\s+/).filter(Boolean);return n.length===0?"?":n.length===1?n[0][0].toUpperCase():(n[0][0]+n[n.length-1][0]).toUpperCase()}const yD=({user:t,onLogout:e})=>w.jsxs(dD,{children:[w.jsx(fD,{asChild:!0,children:w.jsx("button",{type:"button",className:"user-avatar-btn","aria-label":`Account menu for ${t.username}`,children:w.jsxs(AS,{className:"h-8 w-8",children:[t.avatar_url&&w.jsx($S,{src:t.avatar_url,alt:t.username}),w.jsx(LS,{className:"text-xs",children:mD(t)})]})})}),w.jsxs(lk,{align:"end",className:"w-56",children:[w.jsxs(uk,{className:"flex flex-col gap-0.5 py-2",children:[w.jsx("span",{className:"text-sm font-medium leading-tight",children:t.name||t.username}),w.jsxs("span",{className:"text-xs font-normal text-muted-foreground",children:["@",t.username]}),t.is_admin&&w.jsx("span",{className:"mt-1 inline-flex w-fit items-center rounded-full bg-amber-100 px-2 py-0.5 text-[10px] font-medium uppercase tracking-wide text-amber-900",children:"Admin"}),t.role==="contributor"&&w.jsx("span",{className:"mt-1 inline-flex w-fit items-center rounded-full bg-blue-100 px-2 py-0.5 text-[10px] font-medium uppercase tracking-wide text-blue-900",children:"Contributor"})]}),w.jsx(sv,{}),w.jsx(lr,{asChild:!0,children:w.jsx("a",{href:`https://huggingface.co/${encodeURIComponent(t.username)}`,target:"_blank",rel:"noopener noreferrer",children:"Hugging Face profile"})}),w.jsx(lr,{asChild:!0,children:w.jsx(Rn,{to:"/frameworks",children:"Frameworks"})}),w.jsx(lr,{asChild:!0,children:w.jsx(Rn,{to:"/trends",children:"Trends"})}),t.is_admin&&w.jsxs(w.Fragment,{children:[w.jsx(lr,{asChild:!0,children:w.jsx(Rn,{to:"/admin-dashboard",children:"Admin dashboard"})}),w.jsx(lr,{asChild:!0,children:w.jsx(Rn,{to:"/submissions",children:"Review submissions"})})]}),w.jsx(lr,{asChild:!0,children:w.jsx(Rn,{to:`/${encodeURIComponent(t.username)}`,children:"My contributions"})}),w.jsx(lr,{asChild:!0,children:w.jsx(Rn,{to:"/settings",children:"Settings"})}),w.jsx(sv,{}),w.jsx(lr,{onSelect:n=>{n.preventDefault(),e()},children:"Log out"})]})]}),_D="cronAdminToken";function wD(){var t;return typeof window>"u"?"":((t=window.localStorage.getItem(_D))==null?void 0:t.trim())??""}const xD=!1;class sm extends Error{constructor(n,r){var s;super(`API request failed: ${n.status} ${n.statusText}`);Fr(this,"status");Fr(this,"statusText");Fr(this,"response");Fr(this,"detail");Fr(this,"code");Fr(this,"displayMessage");this.name="ApiError",this.status=n.status,this.statusText=n.statusText,this.response=r;try{if(this.detail=(s=JSON.parse(r))==null?void 0:s.detail,typeof this.detail=="string"&&(this.message=this.detail),Array.isArray(this.detail)){const i=this.detail[0];typeof i=="object"&&i!==null&&"msg"in i&&typeof i.msg=="string"&&(this.message=i.msg)}if(typeof this.detail=="object"&&this.detail!==null&&"code"in this.detail&&typeof this.detail.code=="string"&&(this.code=this.detail.code),typeof this.detail=="object"&&this.detail!==null&&"message"in this.detail&&typeof this.detail.message=="string"){const i="help"in this.detail&&typeof this.detail.help=="string"?` See ${this.detail.help} for help.`:"";this.message=`${this.detail.message}${i}`}}catch{this.detail=void 0,this.displayMessage=r||this.message;return}this.displayMessage=this.message}}function g4(t,e){return t instanceof sm?t.displayMessage||e:typeof t=="object"&&t!==null&&"message"in t&&typeof t.message=="string"&&t.message||e}class bD{constructor(e){this.baseUrl=e}async fetch(e,n){const r=`${this.baseUrl}${e}`;try{const{headers:s,...i}=n??{},a=(i.method??"GET").toUpperCase()==="GET"?"default":"no-store",l=wD(),u=new Headers(s);return u.has("Content-Type")||u.set("Content-Type","application/json"),l&&!u.has("X-Admin-Token")&&u.set("X-Admin-Token",l),await fetch(r,{...i,cache:i.cache??a,credentials:i.credentials??"include",headers:u})}catch(s){throw console.error(`[API] Request to ${r} failed:`,s),s}}async request(e,n){const r=await this.fetch(e,n);if(!r.ok){const i=new sm(r,await r.text());throw console.error("[API] Error response:",i.response),i}return r.status===204?void 0:await r.json()}}function ED(t){t instanceof sm&&t.status===401&&t.code!=="fresh_auth_required"&&t.code!=="saved_papers_bucket_authorization_required"&&typeof window<"u"&&window.dispatchEvent(new CustomEvent("pwc:auth-stale"))}async function SD(t){try{return await t()}catch(e){throw ED(e),e}}const ck=new bD(`${jg()}/api/v1`),CD=(t,e)=>ck.fetch(t,e),iv=(t,e)=>SD(()=>ck.request(t,e)),$0={async getCurrentUser(){if(jo())return null;const t=await CD("/auth/me",{cache:"no-store"});return t.status===401||!t.ok?null:t.json()},async logout(){await iv("/auth/logout",{method:"POST"})},async requestStagingAccess(){await iv("/staging-access-request",{method:"POST"})}},im=R.createContext(null),L0="pwc:auth-stale",kD=({children:t})=>{const[e,n]=R.useState(null),[r,s]=R.useState(!0),i=R.useCallback(async()=>{s(!0);const l=await $0.getCurrentUser();n(l),s(!1)},[]),o=R.useCallback(async()=>{const l=Fg("/api/v1/auth/logout");if(new URL(l,window.location.origin).origin!==window.location.origin){const u=document.createElement("form");u.method="POST",u.action=`${l}?return_to=${encodeURIComponent(window.location.href)}`,document.body.appendChild(u),u.submit();return}await $0.logout(),n(null)},[]);R.useEffect(()=>{i()},[i]),R.useEffect(()=>{},[e]),R.useEffect(()=>{const l=()=>{n(null)};return window.addEventListener(L0,l),()=>window.removeEventListener(L0,l)},[]);const a=R.useMemo(()=>({user:e,isLoading:r,refresh:i,logout:o}),[e,r,i,o]);return w.jsx(im.Provider,{value:a,children:t})};function om(){const t=R.useContext(im);if(!t)throw new Error("useAuth must be used inside an ");return t}function m4(){return R.useContext(im)}const Os=({name:t,size:e=14})=>{const n={search:w.jsx("path",{d:"M11 11l3 3M7 12.5a5.5 5.5 0 110-11 5.5 5.5 0 010 11z",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinecap:"round"}),bookmark:w.jsx("path",{d:"M4 2h8v12l-4-3-4 3V2z",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinejoin:"round"}),menu:w.jsx("path",{d:"M2 4h12M2 8h12M2 12h12",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"}),close:w.jsx("path",{d:"M3 3l10 10M13 3L3 13",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"})};return w.jsx("svg",{className:e===11?"icon-sm":"icon",viewBox:"0 0 16 16",width:e,height:e,children:n[t]})},j0="https://github.com/huggingface/paperswithcode-feedback/issues",PD="https://paperswithcode.co/following",F0="pwc:announcement:following-feed:v1:dismissed",sh=[{to:"/",label:"Trending",end:!0},{to:"/tasks",label:"Browse state-of-the-art",end:!1},{to:"/methods",label:"Methods",end:!1},{to:"/conferences",label:"Conferences",end:!1},{to:"/organizations",label:"Organizations",end:!1},{to:"/submit",label:"Submit",end:!1}],RD=()=>{if(typeof navigator>"u")return!1;const t=navigator.userAgentData,e=(t==null?void 0:t.platform)||navigator.platform||navigator.userAgent||"";return/Mac|iPhone|iPad|iPod/i.test(e)},TD=()=>{const[t,e]=R.useState(!1);return R.useEffect(()=>{e(RD())},[]),w.jsx("kbd",{children:t?"⌘K":"Ctrl K"})},D0=({onOpenSearch:t})=>{const[e,n]=R.useState(!1),[r,s]=R.useState(()=>localStorage.getItem(F0)!=="1"),i=R.useRef(null),o=R.useRef(null),a=()=>n(!1),{user:l,logout:u}=om(),c=$n(),d=c.pathname.startsWith("/pdf/"),f=`${c.pathname}${c.search}`||"/",h=jo(),_=al()?{to:"/chat",label:"Chat",end:!1,badge:"New"}:rL()?{to:"/chat",label:"Chat",end:!1,badge:"New",href:nL}:null,p=_?[sh[0],_,...sh.slice(1)]:sh;return R.useLayoutEffect(()=>{var S;const y=i.current,v=o.current;if(!y||!v)return;let m=!1;const x=()=>{if(m)return;const k=y.querySelector(".nav-item.active"),C=(k==null?void 0:k.offsetWidth)??0;v.style.width=`${C}px`,v.style.transform=`translateX(${(k==null?void 0:k.offsetLeft)??0}px)`,v.style.opacity=C>0?"1":"0"};x();const b=window.requestAnimationFrame(()=>{v.classList.add("nav-indicator-ready")}),E=typeof ResizeObserver>"u"?null:new ResizeObserver(x);return E==null||E.observe(y),window.addEventListener("resize",x),(S=document.fonts)==null||S.ready.then(x),()=>{m=!0,window.cancelAnimationFrame(b),E==null||E.disconnect(),window.removeEventListener("resize",x)}},[c.pathname,p.length]),w.jsxs(G$,{open:e,onOpenChange:n,children:[w.jsxs("header",{className:"app-header",children:[w.jsxs("div",{className:"app-header-inner",children:[w.jsxs(bi,{to:"/",className:"brand",onClick:a,children:[w.jsx("span",{className:"brand-mark"}),w.jsxs("span",{className:"brand-name",children:["Papers ",w.jsx("em",{children:"With Code"})]})]}),w.jsxs("nav",{className:"nav",ref:i,children:[p.map(({to:y,label:v,end:m,badge:x,href:b})=>{const E=w.jsxs(w.Fragment,{children:[w.jsx("span",{children:v}),x&&w.jsx("span",{className:"nav-new-badge","aria-hidden":"true",children:x})]});return b?w.jsx("a",{href:b,target:"_blank",rel:"noreferrer",className:`nav-item${x?" nav-item-with-badge":""}`,children:E},y):w.jsx(bi,{to:y,end:m,className:({isActive:S})=>`nav-item${x?" nav-item-with-badge":""}${S?" active":""}`,children:E},y)}),w.jsx("span",{ref:o,className:"nav-indicator","aria-hidden":"true"})]}),w.jsx("div",{className:"header-spacer"}),w.jsx("a",{className:"feedback-link header-feedback-link",href:j0,target:"_blank",rel:"noreferrer",children:"Submit feedback"}),w.jsxs("button",{className:"search-trigger",onClick:t,children:[w.jsx(Os,{name:"search",size:13}),w.jsx("span",{children:"Search papers, authors, domains…"}),w.jsx(TD,{})]}),w.jsx("button",{className:"icon-btn mobile-search-btn","aria-label":"Search",onClick:t,children:w.jsx(Os,{name:"search",size:14})}),!h&&w.jsx(bi,{to:"/saved",className:"icon-btn header-bookmark-btn","aria-label":"Saved papers",title:"Saved papers",children:w.jsx(Os,{name:"bookmark",size:13})}),h?null:l?w.jsx(yD,{user:l,onLogout:u}):w.jsx(hS,{returnTo:f}),w.jsx(K$,{asChild:!0,children:w.jsx("button",{className:"icon-btn mobile-menu-btn","aria-label":"Open menu",children:w.jsx(Os,{name:"menu",size:14})})})]}),!d&&r&&w.jsxs("div",{className:"site-announcement",role:"status",children:[w.jsx("span",{children:"New: "}),h?w.jsx("a",{href:PD,target:"_blank",rel:"noreferrer",children:"following feed"}):w.jsx(Rn,{to:"/following",children:"following feed"}),w.jsx("span",{children:", follow your favorite tasks, benchmarks, authors or organizations"}),w.jsx("button",{type:"button",className:"site-announcement-close","aria-label":"Dismiss announcement",onClick:()=>{localStorage.setItem(F0,"1"),s(!1)},children:w.jsx(Os,{name:"close",size:11})})]})]}),w.jsx(Q$,{children:w.jsx(Y$,{className:"mobile-nav-drawer",children:w.jsxs(X$,{className:"mobile-nav-panel","aria-describedby":void 0,children:[w.jsx(J$,{className:"sr-only",children:"Navigation menu"}),w.jsx(Z$,{className:"icon-btn mobile-nav-close","aria-label":"Close menu",children:w.jsx(Os,{name:"close",size:14})}),w.jsxs("button",{type:"button",className:"mobile-nav-link mobile-nav-search",onClick:()=>{a(),t()},children:[w.jsx(Os,{name:"search",size:14}),w.jsx("span",{children:"Search papers, authors, domains…"})]}),p.map(({to:y,label:v,end:m,badge:x,href:b})=>{const E=`mobile-nav-link${x?" mobile-nav-link-with-badge":""}`,S=w.jsxs(w.Fragment,{children:[w.jsx("span",{children:v}),x&&w.jsx("span",{className:"nav-new-badge","aria-hidden":"true",children:x})]});return b?w.jsx("a",{href:b,target:"_blank",rel:"noreferrer",className:E,onClick:a,children:S},y):w.jsx(bi,{to:y,end:m,className:E,onClick:a,children:S},y)}),w.jsx("a",{className:"mobile-nav-link",href:j0,target:"_blank",rel:"noreferrer",onClick:a,children:"Submit feedback"}),!h&&w.jsx(bi,{to:"/saved",className:"mobile-nav-link",onClick:a,children:"Saved papers"}),!h&&(l==null?void 0:l.is_admin)&&w.jsx(bi,{to:"/admin-dashboard",className:"mobile-nav-link",onClick:a,children:"Admin dashboard"})]})})})]})},ID=()=>{const{pathname:t}=$n();return t==="/chat"||t.startsWith("/chat/")||t.startsWith("/pdf/")?null:w.jsx("footer",{className:"site-footer",children:w.jsxs("div",{className:"site-footer-inner",children:[w.jsxs("span",{children:["© ",new Date().getFullYear()," Hugging Face"]}),w.jsx(Rn,{to:"/docs/api",children:"API"}),w.jsx(Rn,{to:"/mcp",children:"MCP"}),w.jsx(Rn,{to:"/privacy",children:"Privacy"}),w.jsx("a",{href:"https://github.com/huggingface/paperswithcode-feedback/issues",target:"_blank",rel:"noreferrer",children:"Feedback"})]})})},OD=1,MD=1e6;let ih=0;function ND(){return ih=(ih+1)%Number.MAX_SAFE_INTEGER,ih.toString()}const oh=new Map,z0=t=>{if(oh.has(t))return;const e=setTimeout(()=>{oh.delete(t),Oa({type:"REMOVE_TOAST",toastId:t})},MD);oh.set(t,e)},AD=(t,e)=>{switch(e.type){case"ADD_TOAST":return{...t,toasts:[e.toast,...t.toasts].slice(0,OD)};case"UPDATE_TOAST":return{...t,toasts:t.toasts.map(n=>n.id===e.toast.id?{...n,...e.toast}:n)};case"DISMISS_TOAST":{const{toastId:n}=e;return n?z0(n):t.toasts.forEach(r=>{z0(r.id)}),{...t,toasts:t.toasts.map(r=>r.id===n||n===void 0?{...r,open:!1}:r)}}case"REMOVE_TOAST":return e.toastId===void 0?{...t,toasts:[]}:{...t,toasts:t.toasts.filter(n=>n.id!==e.toastId)}}},Lu=[];let ju={toasts:[]};function Oa(t){ju=AD(ju,t),Lu.forEach(e=>{e(ju)})}function $D({...t}){const e=ND(),n=s=>Oa({type:"UPDATE_TOAST",toast:{...s,id:e}}),r=()=>Oa({type:"DISMISS_TOAST",toastId:e});return Oa({type:"ADD_TOAST",toast:{...t,id:e,open:!0,onOpenChange:s=>{s||r()}}}),{id:e,dismiss:r,update:n}}function LD(){const[t,e]=g.useState(ju);return g.useEffect(()=>(Lu.push(e),()=>{const n=Lu.indexOf(e);n>-1&&Lu.splice(n,1)}),[t]),{...t,toast:$D,dismiss:n=>Oa({type:"DISMISS_TOAST",toastId:n})}}var jD=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),FD="VisuallyHidden",Od=g.forwardRef((t,e)=>w.jsx(Re.span,{...t,ref:e,style:{...jD,...t.style}}));Od.displayName=FD;var DD=Od,am="ToastProvider",[lm,zD,BD]=Ug("Toast"),[dk]=Ss("Toast",[BD]),[UD,Md]=dk(am),fk=t=>{const{__scopeToast:e,label:n="Notification",duration:r=5e3,swipeDirection:s="right",swipeThreshold:i=50,children:o}=t,[a,l]=g.useState(null),[u,c]=g.useState(0),d=g.useRef(!1),f=g.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${am}\`. Expected non-empty \`string\`.`),w.jsx(lm.Provider,{scope:e,children:w.jsx(UD,{scope:e,label:n,duration:r,swipeDirection:s,swipeThreshold:i,toastCount:u,viewport:a,onViewportChange:l,onToastAdd:g.useCallback(()=>c(h=>h+1),[]),onToastRemove:g.useCallback(()=>c(h=>h-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:f,children:o})})};fk.displayName=am;var hk="ToastViewport",VD=["F8"],ov="toast.viewportPause",av="toast.viewportResume",pk=g.forwardRef((t,e)=>{const{__scopeToast:n,hotkey:r=VD,label:s="Notifications ({hotkey})",...i}=t,o=Md(hk,n),a=zD(n),l=g.useRef(null),u=g.useRef(null),c=g.useRef(null),d=g.useRef(null),f=Xe(e,d,o.onViewportChange),h=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),_=o.toastCount>0;g.useEffect(()=>{const y=v=>{var x;r.length!==0&&r.every(b=>v[b]||v.code===b)&&((x=d.current)==null||x.focus())};return document.addEventListener("keydown",y),()=>document.removeEventListener("keydown",y)},[r]),g.useEffect(()=>{const y=l.current,v=d.current;if(_&&y&&v){const m=()=>{if(!o.isClosePausedRef.current){const S=new CustomEvent(ov);v.dispatchEvent(S),o.isClosePausedRef.current=!0}},x=()=>{if(o.isClosePausedRef.current){const S=new CustomEvent(av);v.dispatchEvent(S),o.isClosePausedRef.current=!1}},b=S=>{!y.contains(S.relatedTarget)&&x()},E=()=>{y.contains(document.activeElement)||x()};return y.addEventListener("focusin",m),y.addEventListener("focusout",b),y.addEventListener("pointermove",m),y.addEventListener("pointerleave",E),window.addEventListener("blur",m),window.addEventListener("focus",x),()=>{y.removeEventListener("focusin",m),y.removeEventListener("focusout",b),y.removeEventListener("pointermove",m),y.removeEventListener("pointerleave",E),window.removeEventListener("blur",m),window.removeEventListener("focus",x)}}},[_,o.isClosePausedRef]);const p=g.useCallback(({tabbingDirection:y})=>{const m=a().map(x=>{const b=x.ref.current,E=[b,...n3(b)];return y==="forwards"?E:E.reverse()});return(y==="forwards"?m.reverse():m).flat()},[a]);return g.useEffect(()=>{const y=d.current;if(y){const v=m=>{var E,S,k;const x=m.altKey||m.ctrlKey||m.metaKey;if(m.key==="Tab"&&!x){const C=document.activeElement,I=m.shiftKey;if(m.target===y&&I){(E=u.current)==null||E.focus();return}const N=p({tabbingDirection:I?"backwards":"forwards"}),B=N.findIndex(j=>j===C);ah(N.slice(B+1))?m.preventDefault():I?(S=u.current)==null||S.focus():(k=c.current)==null||k.focus()}};return y.addEventListener("keydown",v),()=>y.removeEventListener("keydown",v)}},[a,p]),w.jsxs($A,{ref:l,role:"region","aria-label":s.replace("{hotkey}",h),tabIndex:-1,style:{pointerEvents:_?void 0:"none"},children:[_&&w.jsx(lv,{ref:u,onFocusFromOutsideViewport:()=>{const y=p({tabbingDirection:"forwards"});ah(y)}}),w.jsx(lm.Slot,{scope:n,children:w.jsx(Re.ol,{tabIndex:-1,...i,ref:f})}),_&&w.jsx(lv,{ref:c,onFocusFromOutsideViewport:()=>{const y=p({tabbingDirection:"backwards"});ah(y)}})]})});pk.displayName=hk;var vk="ToastFocusProxy",lv=g.forwardRef((t,e)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...s}=t,i=Md(vk,n);return w.jsx(Od,{tabIndex:0,...s,ref:e,style:{position:"fixed"},onFocus:o=>{var u;const a=o.relatedTarget;!((u=i.viewport)!=null&&u.contains(a))&&r()}})});lv.displayName=vk;var kl="Toast",qD="toast.swipeStart",HD="toast.swipeMove",WD="toast.swipeCancel",GD="toast.swipeEnd",gk=g.forwardRef((t,e)=>{const{forceMount:n,open:r,defaultOpen:s,onOpenChange:i,...o}=t,[a,l]=yd({prop:r,defaultProp:s??!0,onChange:i,caller:kl});return w.jsx(er,{present:n||a,children:w.jsx(YD,{open:a,...o,ref:e,onClose:()=>l(!1),onPause:Bt(t.onPause),onResume:Bt(t.onResume),onSwipeStart:Z(t.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:Z(t.onSwipeMove,u=>{const{x:c,y:d}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","move"),u.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${c}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${d}px`)}),onSwipeCancel:Z(t.onSwipeCancel,u=>{u.currentTarget.setAttribute("data-swipe","cancel"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:Z(t.onSwipeEnd,u=>{const{x:c,y:d}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","end"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${c}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${d}px`),l(!1)})})})});gk.displayName=kl;var[KD,QD]=dk(kl,{onClose(){}}),YD=g.forwardRef((t,e)=>{const{__scopeToast:n,type:r="foreground",duration:s,open:i,onClose:o,onEscapeKeyDown:a,onPause:l,onResume:u,onSwipeStart:c,onSwipeMove:d,onSwipeCancel:f,onSwipeEnd:h,..._}=t,p=Md(kl,n),[y,v]=g.useState(null),m=Xe(e,j=>v(j)),x=g.useRef(null),b=g.useRef(null),E=s||p.duration,S=g.useRef(0),k=g.useRef(E),C=g.useRef(0),{onToastAdd:I,onToastRemove:P}=p,$=Bt(()=>{var W;(y==null?void 0:y.contains(document.activeElement))&&((W=p.viewport)==null||W.focus()),o()}),N=g.useCallback(j=>{!j||j===1/0||(window.clearTimeout(C.current),S.current=new Date().getTime(),C.current=window.setTimeout($,j))},[$]);g.useEffect(()=>{const j=p.viewport;if(j){const W=()=>{N(k.current),u==null||u()},q=()=>{const G=new Date().getTime()-S.current;k.current=k.current-G,window.clearTimeout(C.current),l==null||l()};return j.addEventListener(ov,q),j.addEventListener(av,W),()=>{j.removeEventListener(ov,q),j.removeEventListener(av,W)}}},[p.viewport,E,l,u,N]),g.useEffect(()=>{i&&!p.isClosePausedRef.current&&N(E)},[i,E,p.isClosePausedRef,N]),g.useEffect(()=>(I(),()=>P()),[I,P]);const B=g.useMemo(()=>y?Ek(y):null,[y]);return p.viewport?w.jsxs(w.Fragment,{children:[B&&w.jsx(XD,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite",children:B}),w.jsx(KD,{scope:n,onClose:$,children:_l.createPortal(w.jsx(lm.ItemSlot,{scope:n,children:w.jsx(AA,{asChild:!0,onEscapeKeyDown:Z(a,()=>{p.isFocusedToastEscapeKeyDownRef.current||$(),p.isFocusedToastEscapeKeyDownRef.current=!1}),children:w.jsx(Re.li,{tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":p.swipeDirection,..._,ref:m,style:{userSelect:"none",touchAction:"none",...t.style},onKeyDown:Z(t.onKeyDown,j=>{j.key==="Escape"&&(a==null||a(j.nativeEvent),j.nativeEvent.defaultPrevented||(p.isFocusedToastEscapeKeyDownRef.current=!0,$()))}),onPointerDown:Z(t.onPointerDown,j=>{j.button===0&&(x.current={x:j.clientX,y:j.clientY})}),onPointerMove:Z(t.onPointerMove,j=>{if(!x.current)return;const W=j.clientX-x.current.x,q=j.clientY-x.current.y,G=!!b.current,M=["left","right"].includes(p.swipeDirection),T=["left","up"].includes(p.swipeDirection)?Math.min:Math.max,z=M?T(0,W):0,K=M?0:T(0,q),H=j.pointerType==="touch"?10:2,Q={x:z,y:K},X={originalEvent:j,delta:Q};G?(b.current=Q,fu(HD,d,X,{discrete:!1})):B0(Q,p.swipeDirection,H)?(b.current=Q,fu(qD,c,X,{discrete:!1}),j.target.setPointerCapture(j.pointerId)):(Math.abs(W)>H||Math.abs(q)>H)&&(x.current=null)}),onPointerUp:Z(t.onPointerUp,j=>{const W=b.current,q=j.target;if(q.hasPointerCapture(j.pointerId)&&q.releasePointerCapture(j.pointerId),b.current=null,x.current=null,W){const G=j.currentTarget,M={originalEvent:j,delta:W};B0(W,p.swipeDirection,p.swipeThreshold)?fu(GD,h,M,{discrete:!0}):fu(WD,f,M,{discrete:!0}),G.addEventListener("click",T=>T.preventDefault(),{once:!0})}})})})}),p.viewport)})]}):null}),XD=t=>{const{__scopeToast:e,children:n,...r}=t,s=Md(kl,e),[i,o]=g.useState(!1),[a,l]=g.useState(!1);return e3(()=>o(!0)),g.useEffect(()=>{const u=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(u)},[]),a?null:w.jsx(_d,{asChild:!0,children:w.jsx(Od,{...r,children:i&&w.jsxs(w.Fragment,{children:[s.label," ",n]})})})},JD="ToastTitle",mk=g.forwardRef((t,e)=>{const{__scopeToast:n,...r}=t;return w.jsx(Re.div,{...r,ref:e})});mk.displayName=JD;var ZD="ToastDescription",yk=g.forwardRef((t,e)=>{const{__scopeToast:n,...r}=t;return w.jsx(Re.div,{...r,ref:e})});yk.displayName=ZD;var _k="ToastAction",wk=g.forwardRef((t,e)=>{const{altText:n,...r}=t;return n.trim()?w.jsx(bk,{altText:n,asChild:!0,children:w.jsx(um,{...r,ref:e})}):(console.error(`Invalid prop \`altText\` supplied to \`${_k}\`. Expected non-empty \`string\`.`),null)});wk.displayName=_k;var xk="ToastClose",um=g.forwardRef((t,e)=>{const{__scopeToast:n,...r}=t,s=QD(xk,n);return w.jsx(bk,{asChild:!0,children:w.jsx(Re.button,{type:"button",...r,ref:e,onClick:Z(t.onClick,s.onClose)})})});um.displayName=xk;var bk=g.forwardRef((t,e)=>{const{__scopeToast:n,altText:r,...s}=t;return w.jsx(Re.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...s,ref:e})});function Ek(t){const e=[];return Array.from(t.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&e.push(r.textContent),t3(r)){const s=r.ariaHidden||r.hidden||r.style.display==="none",i=r.dataset.radixToastAnnounceExclude==="";if(!s)if(i){const o=r.dataset.radixToastAnnounceAlt;o&&e.push(o)}else e.push(...Ek(r))}}),e}function fu(t,e,n,{discrete:r}){const s=n.originalEvent.currentTarget,i=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:n});e&&s.addEventListener(t,e,{once:!0}),r?Og(s,i):s.dispatchEvent(i)}var B0=(t,e,n=0)=>{const r=Math.abs(t.x),s=Math.abs(t.y),i=r>s;return e==="left"||e==="right"?i&&r>n:!i&&s>n};function e3(t=()=>{}){const e=Bt(t);pn(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(e)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[e])}function t3(t){return t.nodeType===t.ELEMENT_NODE}function n3(t){const e=[],n=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const s=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||s?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)e.push(n.currentNode);return e}function ah(t){const e=document.activeElement;return t.some(n=>n===e?!0:(n.focus(),document.activeElement!==e))}var r3=fk,Sk=pk,Ck=gk,kk=mk,Pk=yk,Rk=wk,Tk=um;const U0=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,V0=RS,s3=(t,e)=>n=>{var r;if((e==null?void 0:e.variants)==null)return V0(t,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:s,defaultVariants:i}=e,o=Object.keys(s).map(u=>{const c=n==null?void 0:n[u],d=i==null?void 0:i[u];if(c===null)return null;const f=U0(c)||U0(d);return s[u][f]}),a=n&&Object.entries(n).reduce((u,c)=>{let[d,f]=c;return f===void 0||(u[d]=f),u},{}),l=e==null||(r=e.compoundVariants)===null||r===void 0?void 0:r.reduce((u,c)=>{let{class:d,className:f,...h}=c;return Object.entries(h).every(_=>{let[p,y]=_;return Array.isArray(y)?y.includes({...i,...a}[p]):{...i,...a}[p]===y})?[...u,d,f]:u},[]);return V0(t,o,l,n==null?void 0:n.class,n==null?void 0:n.className)},i3=r3,Ik=g.forwardRef(({className:t,...e},n)=>w.jsx(Sk,{ref:n,className:at("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",t),...e}));Ik.displayName=Sk.displayName;const o3=s3("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-16 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),Ok=g.forwardRef(({className:t,variant:e,...n},r)=>w.jsx(Ck,{ref:r,className:at(o3({variant:e}),t),...n}));Ok.displayName=Ck.displayName;const a3=g.forwardRef(({className:t,...e},n)=>w.jsx(Rk,{ref:n,className:at("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors group-[.destructive]:border-muted/40 hover:bg-secondary group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 group-[.destructive]:focus:ring-destructive disabled:pointer-events-none disabled:opacity-50",t),...e}));a3.displayName=Rk.displayName;const Mk=g.forwardRef(({className:t,...e},n)=>w.jsx(Tk,{ref:n,className:at("absolute right-2 top-2 inline-flex h-11 w-11 items-center justify-center rounded-md text-foreground transition-colors hover:bg-muted focus:outline-none focus:ring-2 focus:ring-ring group-[.destructive]:text-destructive-foreground group-[.destructive]:hover:bg-destructive-foreground/10 group-[.destructive]:focus:ring-destructive-foreground",t),"aria-label":"Dismiss notification","toast-close":"",...e,children:w.jsx(cD,{className:"h-4 w-4"})}));Mk.displayName=Tk.displayName;const Nk=g.forwardRef(({className:t,...e},n)=>w.jsx(kk,{ref:n,className:at("text-sm font-semibold",t),...e}));Nk.displayName=kk.displayName;const Ak=g.forwardRef(({className:t,...e},n)=>w.jsx(Pk,{ref:n,className:at("text-sm opacity-90",t),...e}));Ak.displayName=Pk.displayName;function l3(){const{toasts:t}=LD();return w.jsxs(i3,{children:[t.map(function({id:e,title:n,description:r,action:s,...i}){return w.jsxs(Ok,{...i,children:[w.jsxs("div",{className:"grid gap-1",children:[n&&w.jsx(Nk,{children:n}),r&&w.jsx(Ak,{children:r})]}),s,w.jsx(Mk,{})]},e)}),w.jsx(Ik,{})]})}var u3=t=>{switch(t){case"success":return f3;case"info":return p3;case"warning":return h3;case"error":return v3;default:return null}},c3=Array(12).fill(0),d3=({visible:t,className:e})=>R.createElement("div",{className:["sonner-loading-wrapper",e].filter(Boolean).join(" "),"data-visible":t},R.createElement("div",{className:"sonner-spinner"},c3.map((n,r)=>R.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),f3=R.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},R.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),h3=R.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},R.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),p3=R.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},R.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),v3=R.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},R.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),g3=R.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},R.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),R.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),m3=()=>{let[t,e]=R.useState(document.hidden);return R.useEffect(()=>{let n=()=>{e(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),t},uv=1,y3=class{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{let e=this.subscribers.indexOf(t);this.subscribers.splice(e,1)}),this.publish=t=>{this.subscribers.forEach(e=>e(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var e;let{message:n,...r}=t,s=typeof(t==null?void 0:t.id)=="number"||((e=t.id)==null?void 0:e.length)>0?t.id:uv++,i=this.toasts.find(a=>a.id===s),o=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(s)&&this.dismissedToasts.delete(s),i?this.toasts=this.toasts.map(a=>a.id===s?(this.publish({...a,...t,id:s,title:n}),{...a,...t,id:s,dismissible:o,title:n}):a):this.addToast({title:n,...r,dismissible:o,id:s}),s},this.dismiss=t=>(this.dismissedToasts.add(t),t||this.toasts.forEach(e=>{this.subscribers.forEach(n=>n({id:e.id,dismiss:!0}))}),this.subscribers.forEach(e=>e({id:t,dismiss:!0})),t),this.message=(t,e)=>this.create({...e,message:t}),this.error=(t,e)=>this.create({...e,message:t,type:"error"}),this.success=(t,e)=>this.create({...e,type:"success",message:t}),this.info=(t,e)=>this.create({...e,type:"info",message:t}),this.warning=(t,e)=>this.create({...e,type:"warning",message:t}),this.loading=(t,e)=>this.create({...e,type:"loading",message:t}),this.promise=(t,e)=>{if(!e)return;let n;e.loading!==void 0&&(n=this.create({...e,promise:t,type:"loading",message:e.loading,description:typeof e.description!="function"?e.description:void 0}));let r=t instanceof Promise?t:t(),s=n!==void 0,i,o=r.then(async l=>{if(i=["resolve",l],R.isValidElement(l))s=!1,this.create({id:n,type:"default",message:l});else if(w3(l)&&!l.ok){s=!1;let u=typeof e.error=="function"?await e.error(`HTTP error! status: ${l.status}`):e.error,c=typeof e.description=="function"?await e.description(`HTTP error! status: ${l.status}`):e.description;this.create({id:n,type:"error",message:u,description:c})}else if(e.success!==void 0){s=!1;let u=typeof e.success=="function"?await e.success(l):e.success,c=typeof e.description=="function"?await e.description(l):e.description;this.create({id:n,type:"success",message:u,description:c})}}).catch(async l=>{if(i=["reject",l],e.error!==void 0){s=!1;let u=typeof e.error=="function"?await e.error(l):e.error,c=typeof e.description=="function"?await e.description(l):e.description;this.create({id:n,type:"error",message:u,description:c})}}).finally(()=>{var l;s&&(this.dismiss(n),n=void 0),(l=e.finally)==null||l.call(e)}),a=()=>new Promise((l,u)=>o.then(()=>i[0]==="reject"?u(i[1]):l(i[1])).catch(u));return typeof n!="string"&&typeof n!="number"?{unwrap:a}:Object.assign(n,{unwrap:a})},this.custom=(t,e)=>{let n=(e==null?void 0:e.id)||uv++;return this.create({jsx:t(n),id:n,...e}),n},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},Nt=new y3,_3=(t,e)=>{let n=(e==null?void 0:e.id)||uv++;return Nt.addToast({title:t,...e,id:n}),n},w3=t=>t&&typeof t=="object"&&"ok"in t&&typeof t.ok=="boolean"&&"status"in t&&typeof t.status=="number",x3=_3,b3=()=>Nt.toasts,E3=()=>Nt.getActiveToasts();Object.assign(x3,{success:Nt.success,info:Nt.info,warning:Nt.warning,error:Nt.error,custom:Nt.custom,message:Nt.message,promise:Nt.promise,dismiss:Nt.dismiss,loading:Nt.loading},{getHistory:b3,getToasts:E3});function S3(t,{insertAt:e}={}){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",e==="top"&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=t:r.appendChild(document.createTextNode(t))}S3(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:var(--offset-right)}:where([data-sonner-toaster][data-x-position="left"]){left:var(--offset-left)}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:var(--offset-top)}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:var(--offset-bottom)}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:-50%;right:-50%;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y, 0px)) translate(var(--swipe-amount-x, 0px));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-bg-hover: hsl(0, 0%, 12%);--normal-border: hsl(0, 0%, 20%);--normal-border-hover: hsl(0, 0%, 25%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);--error-text: hsl(358, 100%, 81%)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)} -`);function hu(t){return t.label!==void 0}var C3=3,k3="32px",P3="16px",q0=4e3,R3=356,T3=14,I3=20,O3=200;function xn(...t){return t.filter(Boolean).join(" ")}function M3(t){let[e,n]=t.split("-"),r=[];return e&&r.push(e),n&&r.push(n),r}var N3=t=>{var e,n,r,s,i,o,a,l,u,c,d;let{invert:f,toast:h,unstyled:_,interacting:p,setHeights:y,visibleToasts:v,heights:m,index:x,toasts:b,expanded:E,removeToast:S,defaultRichColors:k,closeButton:C,style:I,cancelButtonStyle:P,actionButtonStyle:$,className:N="",descriptionClassName:B="",duration:j,position:W,gap:q,loadingIcon:G,expandByDefault:M,classNames:T,icons:z,closeButtonAriaLabel:K="Close toast",pauseWhenPageIsHidden:H}=t,[Q,X]=R.useState(null),[ie,pe]=R.useState(null),[se,ve]=R.useState(!1),[_e,Ze]=R.useState(!1),[Ot,et]=R.useState(!1),[ze,nr]=R.useState(!1),[Or,lt]=R.useState(!1),[Mr,tn]=R.useState(0),[Ut,Nr]=R.useState(0),Ar=R.useRef(h.duration||j||q0),Bo=R.useRef(null),vn=R.useRef(null),Wk=x===0,Gk=x+1<=v,nn=h.type,hi=h.dismissible!==!1,Kk=h.className||"",Qk=h.descriptionClassName||"",Pl=R.useMemo(()=>m.findIndex(oe=>oe.toastId===h.id)||0,[m,h.id]),Yk=R.useMemo(()=>{var oe;return(oe=h.closeButton)!=null?oe:C},[h.closeButton,C]),dm=R.useMemo(()=>h.duration||j||q0,[h.duration,j]),$d=R.useRef(0),pi=R.useRef(0),fm=R.useRef(0),vi=R.useRef(null),[Xk,Jk]=W.split("-"),hm=R.useMemo(()=>m.reduce((oe,Se,je)=>je>=Pl?oe:oe+Se.height,0),[m,Pl]),pm=m3(),Zk=h.invert||f,Ld=nn==="loading";pi.current=R.useMemo(()=>Pl*q+hm,[Pl,hm]),R.useEffect(()=>{Ar.current=dm},[dm]),R.useEffect(()=>{ve(!0)},[]),R.useEffect(()=>{let oe=vn.current;if(oe){let Se=oe.getBoundingClientRect().height;return Nr(Se),y(je=>[{toastId:h.id,height:Se,position:h.position},...je]),()=>y(je=>je.filter(gn=>gn.toastId!==h.id))}},[y,h.id]),R.useLayoutEffect(()=>{if(!se)return;let oe=vn.current,Se=oe.style.height;oe.style.height="auto";let je=oe.getBoundingClientRect().height;oe.style.height=Se,Nr(je),y(gn=>gn.find(mn=>mn.toastId===h.id)?gn.map(mn=>mn.toastId===h.id?{...mn,height:je}:mn):[{toastId:h.id,height:je,position:h.position},...gn])},[se,h.title,h.description,y,h.id]);let $r=R.useCallback(()=>{Ze(!0),tn(pi.current),y(oe=>oe.filter(Se=>Se.toastId!==h.id)),setTimeout(()=>{S(h)},O3)},[h,S,y,pi]);R.useEffect(()=>{if(h.promise&&nn==="loading"||h.duration===1/0||h.type==="loading")return;let oe;return E||p||H&&pm?(()=>{if(fm.current<$d.current){let Se=new Date().getTime()-$d.current;Ar.current=Ar.current-Se}fm.current=new Date().getTime()})():Ar.current!==1/0&&($d.current=new Date().getTime(),oe=setTimeout(()=>{var Se;(Se=h.onAutoClose)==null||Se.call(h,h),$r()},Ar.current)),()=>clearTimeout(oe)},[E,p,h,nn,H,pm,$r]),R.useEffect(()=>{h.delete&&$r()},[$r,h.delete]);function eP(){var oe,Se,je;return z!=null&&z.loading?R.createElement("div",{className:xn(T==null?void 0:T.loader,(oe=h==null?void 0:h.classNames)==null?void 0:oe.loader,"sonner-loader"),"data-visible":nn==="loading"},z.loading):G?R.createElement("div",{className:xn(T==null?void 0:T.loader,(Se=h==null?void 0:h.classNames)==null?void 0:Se.loader,"sonner-loader"),"data-visible":nn==="loading"},G):R.createElement(d3,{className:xn(T==null?void 0:T.loader,(je=h==null?void 0:h.classNames)==null?void 0:je.loader),visible:nn==="loading"})}return R.createElement("li",{tabIndex:0,ref:vn,className:xn(N,Kk,T==null?void 0:T.toast,(e=h==null?void 0:h.classNames)==null?void 0:e.toast,T==null?void 0:T.default,T==null?void 0:T[nn],(n=h==null?void 0:h.classNames)==null?void 0:n[nn]),"data-sonner-toast":"","data-rich-colors":(r=h.richColors)!=null?r:k,"data-styled":!(h.jsx||h.unstyled||_),"data-mounted":se,"data-promise":!!h.promise,"data-swiped":Or,"data-removed":_e,"data-visible":Gk,"data-y-position":Xk,"data-x-position":Jk,"data-index":x,"data-front":Wk,"data-swiping":Ot,"data-dismissible":hi,"data-type":nn,"data-invert":Zk,"data-swipe-out":ze,"data-swipe-direction":ie,"data-expanded":!!(E||M&&se),style:{"--index":x,"--toasts-before":x,"--z-index":b.length-x,"--offset":`${_e?Mr:pi.current}px`,"--initial-height":M?"auto":`${Ut}px`,...I,...h.style},onDragEnd:()=>{et(!1),X(null),vi.current=null},onPointerDown:oe=>{Ld||!hi||(Bo.current=new Date,tn(pi.current),oe.target.setPointerCapture(oe.pointerId),oe.target.tagName!=="BUTTON"&&(et(!0),vi.current={x:oe.clientX,y:oe.clientY}))},onPointerUp:()=>{var oe,Se,je,gn;if(ze||!hi)return;vi.current=null;let mn=Number(((oe=vn.current)==null?void 0:oe.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Lr=Number(((Se=vn.current)==null?void 0:Se.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Cs=new Date().getTime()-((je=Bo.current)==null?void 0:je.getTime()),yn=Q==="x"?mn:Lr,jr=Math.abs(yn)/Cs;if(Math.abs(yn)>=I3||jr>.11){tn(pi.current),(gn=h.onDismiss)==null||gn.call(h,h),pe(Q==="x"?mn>0?"right":"left":Lr>0?"down":"up"),$r(),nr(!0),lt(!1);return}et(!1),X(null)},onPointerMove:oe=>{var Se,je,gn,mn;if(!vi.current||!hi||((Se=window.getSelection())==null?void 0:Se.toString().length)>0)return;let Lr=oe.clientY-vi.current.y,Cs=oe.clientX-vi.current.x,yn=(je=t.swipeDirections)!=null?je:M3(W);!Q&&(Math.abs(Cs)>1||Math.abs(Lr)>1)&&X(Math.abs(Cs)>Math.abs(Lr)?"x":"y");let jr={x:0,y:0};Q==="y"?(yn.includes("top")||yn.includes("bottom"))&&(yn.includes("top")&&Lr<0||yn.includes("bottom")&&Lr>0)&&(jr.y=Lr):Q==="x"&&(yn.includes("left")||yn.includes("right"))&&(yn.includes("left")&&Cs<0||yn.includes("right")&&Cs>0)&&(jr.x=Cs),(Math.abs(jr.x)>0||Math.abs(jr.y)>0)&<(!0),(gn=vn.current)==null||gn.style.setProperty("--swipe-amount-x",`${jr.x}px`),(mn=vn.current)==null||mn.style.setProperty("--swipe-amount-y",`${jr.y}px`)}},Yk&&!h.jsx?R.createElement("button",{"aria-label":K,"data-disabled":Ld,"data-close-button":!0,onClick:Ld||!hi?()=>{}:()=>{var oe;$r(),(oe=h.onDismiss)==null||oe.call(h,h)},className:xn(T==null?void 0:T.closeButton,(s=h==null?void 0:h.classNames)==null?void 0:s.closeButton)},(i=z==null?void 0:z.close)!=null?i:g3):null,h.jsx||g.isValidElement(h.title)?h.jsx?h.jsx:typeof h.title=="function"?h.title():h.title:R.createElement(R.Fragment,null,nn||h.icon||h.promise?R.createElement("div",{"data-icon":"",className:xn(T==null?void 0:T.icon,(o=h==null?void 0:h.classNames)==null?void 0:o.icon)},h.promise||h.type==="loading"&&!h.icon?h.icon||eP():null,h.type!=="loading"?h.icon||(z==null?void 0:z[nn])||u3(nn):null):null,R.createElement("div",{"data-content":"",className:xn(T==null?void 0:T.content,(a=h==null?void 0:h.classNames)==null?void 0:a.content)},R.createElement("div",{"data-title":"",className:xn(T==null?void 0:T.title,(l=h==null?void 0:h.classNames)==null?void 0:l.title)},typeof h.title=="function"?h.title():h.title),h.description?R.createElement("div",{"data-description":"",className:xn(B,Qk,T==null?void 0:T.description,(u=h==null?void 0:h.classNames)==null?void 0:u.description)},typeof h.description=="function"?h.description():h.description):null),g.isValidElement(h.cancel)?h.cancel:h.cancel&&hu(h.cancel)?R.createElement("button",{"data-button":!0,"data-cancel":!0,style:h.cancelButtonStyle||P,onClick:oe=>{var Se,je;hu(h.cancel)&&hi&&((je=(Se=h.cancel).onClick)==null||je.call(Se,oe),$r())},className:xn(T==null?void 0:T.cancelButton,(c=h==null?void 0:h.classNames)==null?void 0:c.cancelButton)},h.cancel.label):null,g.isValidElement(h.action)?h.action:h.action&&hu(h.action)?R.createElement("button",{"data-button":!0,"data-action":!0,style:h.actionButtonStyle||$,onClick:oe=>{var Se,je;hu(h.action)&&((je=(Se=h.action).onClick)==null||je.call(Se,oe),!oe.defaultPrevented&&$r())},className:xn(T==null?void 0:T.actionButton,(d=h==null?void 0:h.classNames)==null?void 0:d.actionButton)},h.action.label):null))};function H0(){if(typeof window>"u"||typeof document>"u")return"ltr";let t=document.documentElement.getAttribute("dir");return t==="auto"||!t?window.getComputedStyle(document.documentElement).direction:t}function A3(t,e){let n={};return[t,e].forEach((r,s)=>{let i=s===1,o=i?"--mobile-offset":"--offset",a=i?P3:k3;function l(u){["top","right","bottom","left"].forEach(c=>{n[`${o}-${c}`]=typeof u=="number"?`${u}px`:u})}typeof r=="number"||typeof r=="string"?l(r):typeof r=="object"?["top","right","bottom","left"].forEach(u=>{r[u]===void 0?n[`${o}-${u}`]=a:n[`${o}-${u}`]=typeof r[u]=="number"?`${r[u]}px`:r[u]}):l(a)}),n}var $3=g.forwardRef(function(t,e){let{invert:n,position:r="bottom-right",hotkey:s=["altKey","KeyT"],expand:i,closeButton:o,className:a,offset:l,mobileOffset:u,theme:c="light",richColors:d,duration:f,style:h,visibleToasts:_=C3,toastOptions:p,dir:y=H0(),gap:v=T3,loadingIcon:m,icons:x,containerAriaLabel:b="Notifications",pauseWhenPageIsHidden:E}=t,[S,k]=R.useState([]),C=R.useMemo(()=>Array.from(new Set([r].concat(S.filter(H=>H.position).map(H=>H.position)))),[S,r]),[I,P]=R.useState([]),[$,N]=R.useState(!1),[B,j]=R.useState(!1),[W,q]=R.useState(c!=="system"?c:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),G=R.useRef(null),M=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),T=R.useRef(null),z=R.useRef(!1),K=R.useCallback(H=>{k(Q=>{var X;return(X=Q.find(ie=>ie.id===H.id))!=null&&X.delete||Nt.dismiss(H.id),Q.filter(({id:ie})=>ie!==H.id)})},[]);return R.useEffect(()=>Nt.subscribe(H=>{if(H.dismiss){k(Q=>Q.map(X=>X.id===H.id?{...X,delete:!0}:X));return}setTimeout(()=>{yb.flushSync(()=>{k(Q=>{let X=Q.findIndex(ie=>ie.id===H.id);return X!==-1?[...Q.slice(0,X),{...Q[X],...H},...Q.slice(X+1)]:[H,...Q]})})})}),[]),R.useEffect(()=>{if(c!=="system"){q(c);return}if(c==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?q("dark"):q("light")),typeof window>"u")return;let H=window.matchMedia("(prefers-color-scheme: dark)");try{H.addEventListener("change",({matches:Q})=>{q(Q?"dark":"light")})}catch{H.addListener(({matches:X})=>{try{q(X?"dark":"light")}catch(ie){console.error(ie)}})}},[c]),R.useEffect(()=>{S.length<=1&&N(!1)},[S]),R.useEffect(()=>{let H=Q=>{var X,ie;s.every(pe=>Q[pe]||Q.code===pe)&&(N(!0),(X=G.current)==null||X.focus()),Q.code==="Escape"&&(document.activeElement===G.current||(ie=G.current)!=null&&ie.contains(document.activeElement))&&N(!1)};return document.addEventListener("keydown",H),()=>document.removeEventListener("keydown",H)},[s]),R.useEffect(()=>{if(G.current)return()=>{T.current&&(T.current.focus({preventScroll:!0}),T.current=null,z.current=!1)}},[G.current]),R.createElement("section",{ref:e,"aria-label":`${b} ${M}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},C.map((H,Q)=>{var X;let[ie,pe]=H.split("-");return S.length?R.createElement("ol",{key:H,dir:y==="auto"?H0():y,tabIndex:-1,ref:G,className:a,"data-sonner-toaster":!0,"data-theme":W,"data-y-position":ie,"data-lifted":$&&S.length>1&&!i,"data-x-position":pe,style:{"--front-toast-height":`${((X=I[0])==null?void 0:X.height)||0}px`,"--width":`${R3}px`,"--gap":`${v}px`,...h,...A3(l,u)},onBlur:se=>{z.current&&!se.currentTarget.contains(se.relatedTarget)&&(z.current=!1,T.current&&(T.current.focus({preventScroll:!0}),T.current=null))},onFocus:se=>{se.target instanceof HTMLElement&&se.target.dataset.dismissible==="false"||z.current||(z.current=!0,T.current=se.relatedTarget)},onMouseEnter:()=>N(!0),onMouseMove:()=>N(!0),onMouseLeave:()=>{B||N(!1)},onDragEnd:()=>N(!1),onPointerDown:se=>{se.target instanceof HTMLElement&&se.target.dataset.dismissible==="false"||j(!0)},onPointerUp:()=>j(!1)},S.filter(se=>!se.position&&Q===0||se.position===H).map((se,ve)=>{var _e,Ze;return R.createElement(N3,{key:se.id,icons:x,index:ve,toast:se,defaultRichColors:d,duration:(_e=p==null?void 0:p.duration)!=null?_e:f,className:p==null?void 0:p.className,descriptionClassName:p==null?void 0:p.descriptionClassName,invert:n,visibleToasts:_,closeButton:(Ze=p==null?void 0:p.closeButton)!=null?Ze:o,interacting:B,position:H,style:p==null?void 0:p.style,unstyled:p==null?void 0:p.unstyled,classNames:p==null?void 0:p.classNames,cancelButtonStyle:p==null?void 0:p.cancelButtonStyle,actionButtonStyle:p==null?void 0:p.actionButtonStyle,removeToast:K,toasts:S.filter(Ot=>Ot.position==se.position),heights:I.filter(Ot=>Ot.position==se.position),setHeights:P,expandByDefault:i,gap:v,loadingIcon:m,expanded:$,pauseWhenPageIsHidden:E,swipeDirections:t.swipeDirections})})):null}))});const L3=({...t})=>{const{theme:e="system"}=OT();return w.jsx($3,{theme:e,className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...t})};var j3=Symbol("radix.slottable");function F3(t){const e=({children:n})=>w.jsx(w.Fragment,{children:n});return e.displayName=`${t}.Slottable`,e.__radixId=j3,e}var[Nd]=Ss("Tooltip",[kd]),cm=kd(),$k="TooltipProvider",D3=700,W0="tooltip.open",[z3,Lk]=Nd($k),jk=t=>{const{__scopeTooltip:e,delayDuration:n=D3,skipDelayDuration:r=300,disableHoverableContent:s=!1,children:i}=t,o=g.useRef(!0),a=g.useRef(!1),l=g.useRef(0);return g.useEffect(()=>{const u=l.current;return()=>window.clearTimeout(u)},[]),w.jsx(z3,{scope:e,isOpenDelayedRef:o,delayDuration:n,onOpen:g.useCallback(()=>{window.clearTimeout(l.current),o.current=!1},[]),onClose:g.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>o.current=!0,r)},[r]),isPointerInTransitRef:a,onPointerInTransitChange:g.useCallback(u=>{a.current=u},[]),disableHoverableContent:s,children:i})};jk.displayName=$k;var Fk="Tooltip",[y4,Ad]=Nd(Fk),cv="TooltipTrigger",B3=g.forwardRef((t,e)=>{const{__scopeTooltip:n,...r}=t,s=Ad(cv,n),i=Lk(cv,n),o=cm(n),a=g.useRef(null),l=Xe(e,a,s.onTriggerChange),u=g.useRef(!1),c=g.useRef(!1),d=g.useCallback(()=>u.current=!1,[]);return g.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),w.jsx(iC,{asChild:!0,...o,children:w.jsx(Re.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...r,ref:l,onPointerMove:Z(t.onPointerMove,f=>{f.pointerType!=="touch"&&!c.current&&!i.isPointerInTransitRef.current&&(s.onTriggerEnter(),c.current=!0)}),onPointerLeave:Z(t.onPointerLeave,()=>{s.onTriggerLeave(),c.current=!1}),onPointerDown:Z(t.onPointerDown,()=>{s.open&&s.onClose(),u.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:Z(t.onFocus,()=>{u.current||s.onOpen()}),onBlur:Z(t.onBlur,s.onClose),onClick:Z(t.onClick,s.onClose)})})});B3.displayName=cv;var U3="TooltipPortal",[_4,V3]=Nd(U3,{forceMount:void 0}),Mo="TooltipContent",Dk=g.forwardRef((t,e)=>{const n=V3(Mo,t.__scopeTooltip),{forceMount:r=n.forceMount,side:s="top",...i}=t,o=Ad(Mo,t.__scopeTooltip);return w.jsx(er,{present:r||o.open,children:o.disableHoverableContent?w.jsx(zk,{side:s,...i,ref:e}):w.jsx(q3,{side:s,...i,ref:e})})}),q3=g.forwardRef((t,e)=>{const n=Ad(Mo,t.__scopeTooltip),r=Lk(Mo,t.__scopeTooltip),s=g.useRef(null),i=Xe(e,s),[o,a]=g.useState(null),{trigger:l,onClose:u}=n,c=s.current,{onPointerInTransitChange:d}=r,f=g.useCallback(()=>{a(null),d(!1)},[d]),h=g.useCallback((_,p)=>{const y=_.currentTarget,v={x:_.clientX,y:_.clientY},m=Q3(v,y.getBoundingClientRect()),x=Y3(v,m),b=X3(p.getBoundingClientRect()),E=Z3([...x,...b]);a(E),d(!0)},[d]);return g.useEffect(()=>()=>f(),[f]),g.useEffect(()=>{if(l&&c){const _=y=>h(y,c),p=y=>h(y,l);return l.addEventListener("pointerleave",_),c.addEventListener("pointerleave",p),()=>{l.removeEventListener("pointerleave",_),c.removeEventListener("pointerleave",p)}}},[l,c,h,f]),g.useEffect(()=>{if(o){const _=p=>{const y=p.target,v={x:p.clientX,y:p.clientY},m=(l==null?void 0:l.contains(y))||(c==null?void 0:c.contains(y)),x=!J3(v,o);m?f():x&&(f(),u())};return document.addEventListener("pointermove",_),()=>document.removeEventListener("pointermove",_)}},[l,c,o,u,f]),w.jsx(zk,{...t,ref:i})}),[H3,W3]=Nd(Fk,{isInside:!1}),G3=F3("TooltipContent"),zk=g.forwardRef((t,e)=>{const{__scopeTooltip:n,children:r,"aria-label":s,onEscapeKeyDown:i,onPointerDownOutside:o,...a}=t,l=Ad(Mo,n),u=cm(n),{onClose:c}=l;return g.useEffect(()=>(document.addEventListener(W0,c),()=>document.removeEventListener(W0,c)),[c]),g.useEffect(()=>{if(l.trigger){const d=f=>{const h=f.target;h!=null&&h.contains(l.trigger)&&c()};return window.addEventListener("scroll",d,{capture:!0}),()=>window.removeEventListener("scroll",d,{capture:!0})}},[l.trigger,c]),w.jsx(xl,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:d=>d.preventDefault(),onDismiss:c,children:w.jsxs(oC,{"data-state":l.stateAttribute,...u,...a,ref:e,style:{...a.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[w.jsx(G3,{children:r}),w.jsx(H3,{scope:n,isInside:!0,children:w.jsx(DD,{id:l.contentId,role:"tooltip",children:s||r})})]})})});Dk.displayName=Mo;var Bk="TooltipArrow",K3=g.forwardRef((t,e)=>{const{__scopeTooltip:n,...r}=t,s=cm(n);return W3(Bk,n).isInside?null:w.jsx(aC,{...s,...r,ref:e})});K3.displayName=Bk;function Q3(t,e){const n=Math.abs(e.top-t.y),r=Math.abs(e.bottom-t.y),s=Math.abs(e.right-t.x),i=Math.abs(e.left-t.x);switch(Math.min(n,r,s,i)){case i:return"left";case s:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function Y3(t,e,n=5){const r=[];switch(e){case"top":r.push({x:t.x-n,y:t.y+n},{x:t.x+n,y:t.y+n});break;case"bottom":r.push({x:t.x-n,y:t.y-n},{x:t.x+n,y:t.y-n});break;case"left":r.push({x:t.x+n,y:t.y-n},{x:t.x+n,y:t.y+n});break;case"right":r.push({x:t.x-n,y:t.y-n},{x:t.x-n,y:t.y+n});break}return r}function X3(t){const{top:e,right:n,bottom:r,left:s}=t;return[{x:s,y:e},{x:n,y:e},{x:n,y:r},{x:s,y:r}]}function J3(t,e){const{x:n,y:r}=t;let s=!1;for(let i=0,o=e.length-1;ir!=f>r&&n<(d-u)*(r-c)/(f-c)+u&&(s=!s)}return s}function Z3(t){const e=t.slice();return e.sort((n,r)=>n.xr.x?1:n.yr.y?1:0),ez(e)}function ez(t){if(t.length<=1)return t.slice();const e=[];for(let r=0;r=2;){const i=e[e.length-1],o=e[e.length-2];if((i.x-o.x)*(s.y-o.y)>=(i.y-o.y)*(s.x-o.x))e.pop();else break}e.push(s)}e.pop();const n=[];for(let r=t.length-1;r>=0;r--){const s=t[r];for(;n.length>=2;){const i=n[n.length-1],o=n[n.length-2];if((i.x-o.x)*(s.y-o.y)>=(i.y-o.y)*(s.x-o.x))n.pop();else break}n.push(s)}return n.pop(),e.length===1&&n.length===1&&e[0].x===n[0].x&&e[0].y===n[0].y?e:e.concat(n)}var tz=jk,Uk=Dk;const nz=tz,rz=g.forwardRef(({className:t,sideOffset:e=4,...n},r)=>w.jsx(Uk,{ref:r,sideOffset:e,className:at("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t),...n}));rz.displayName=Uk.displayName;function sz(){const{pathname:t,hash:e}=$n();g.useLayoutEffect(()=>{e||window.scrollTo({top:0,left:0,behavior:"instant"})},[t,e])}class iz{constructor(e){this.request=e}getPreferences(){return this.request("/me/preferences")}updatePreferences(e){return this.request("/me/preferences",{method:"PUT",body:JSON.stringify(e)})}getRateLimitPolicy(){return this.request("/rate-limits",{credentials:"omit"})}getBookmarkIds(){return this.request("/me/bookmarks/ids")}getBookmarks(){return this.request("/me/bookmarks")}addBookmark(e){return this.request(`/me/bookmarks/${e}`,{method:"POST"})}removeBookmark(e){return this.request(`/me/bookmarks/${e}`,{method:"DELETE"})}}const G0=new iz(iv),lh={hide_closed_source_evals:!1},Vk=R.createContext(null),oz=({children:t})=>{const{user:e}=om(),[n,r]=R.useState(lh),[s,i]=R.useState(!1);R.useEffect(()=>{let l=!1;if(!e){r(lh);return}return i(!0),G0.getPreferences().then(u=>{l||r(u)}).catch(()=>{l||r(lh)}).finally(()=>{l||i(!1)}),()=>{l=!0}},[e]);const o=R.useCallback(async l=>{const u={...n,hide_closed_source_evals:l};if(r(u),!!e)try{const c=await G0.updatePreferences(u);r(c)}catch{r(n)}},[n,e]),a=R.useMemo(()=>({preferences:n,canPersist:!!e,isLoading:s,setHideClosedSourceEvals:o}),[n,e,s,o]);return w.jsx(Vk.Provider,{value:a,children:t})};function w4(){const t=R.useContext(Vk);if(!t)throw new Error("usePreferences must be used inside a ");return t}const qk=iL(),az=qk?MN:ON;if(!qk&&typeof window<"u"){const t=window.location.hash;t.startsWith("#/")&&!t.startsWith("#//")&&window.history.replaceState(null,"",t.slice(1))}const lz=R.lazy(()=>ce(()=>import("./AuthorizePaperEditView-BfRwxwFE.js"),__vite__mapDeps([0,1,2,3,4]))),uz=R.lazy(()=>ce(()=>import("./FollowingView-EFGemqQ1.js"),__vite__mapDeps([5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,1,24,25,26,27,28,29,30]))),cz=R.lazy(()=>ce(()=>import("./FeedView-CWq49Xub.js"),__vite__mapDeps([6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,1,24,25,26,27,28,29,30]))),dz=R.lazy(()=>ce(()=>import("./ChatView-V3k6NvU1.js"),__vite__mapDeps([31,1,32,21,22,23,14,33,34,35,24,36,37,38,39,12,2,40,41,42,43,44,25,45,46]))),fz=R.lazy(()=>ce(()=>import("./SharedChatView-BPiynfM9.js"),__vite__mapDeps([47,1,32,21,22,23,14,33,34,35,24,36,37,38,39,12,2,40,41,42,43,44]))),hz=R.lazy(()=>ce(()=>import("./PapersListView-CsWnWrRV.js"),__vite__mapDeps([48,11,12,13,7,14,15,16,24,26,1,27,49,28,29,30,18,19,20]))),pz=R.lazy(()=>ce(()=>import("./PaperDetailView-CLG-Lnyq.js"),__vite__mapDeps([50,11,12,13,7,14,15,16,51,33,52,53,1,26,27,54,29,30,3,55,17,4,40,56,57,20,58,2,24,59,60,61,62,34,63,9,64,65,35,37,38,28,66,67]))),vz=R.lazy(()=>ce(()=>import("./PaperReaderView-CYHEOXgF.js"),__vite__mapDeps([68,1,32,21,22,23,14,33,34,35,24,36,37,38,39,12,2,40,41,42,43,44,69,53,15,26,27,31,25,45,46]))),gz=R.lazy(()=>ce(()=>import("./TagsIndexView-Dq1B1h6G.js"),__vite__mapDeps([70,1,24,7,71,29,30,72,61,3,56,62,57,20,55,58,2,59,9,73,74]))),mz=R.lazy(()=>ce(()=>import("./TagBrowseView-DuYYWtvR.js"),__vite__mapDeps([75,76,1,2,10,9,11,12,13,7,14,15,16,77,78,18,19,20,69,36,37,38,39,33,44,24,71,26,27,28,29,30,23,35]))),yz=R.lazy(()=>ce(()=>import("./MethodsIndexView-sXYUwk5L.js"),__vite__mapDeps([79,1,24,71,29,30,72,61,3,56,62,57,20,55,58,2,59,9,73,74]))),_z=R.lazy(()=>ce(()=>import("./FrameworksIndexView-Dq1PTcS8.js"),__vite__mapDeps([80,1,11,12,13,7,14,15,16,24]))),wz=R.lazy(()=>ce(()=>import("./TrendsView-0qWm9HI5.js"),__vite__mapDeps([81,1,30,29]))),xz=R.lazy(()=>ce(()=>import("./ConferencesIndexView-BAG6HQgJ.js"),__vite__mapDeps([82,1,24,29,30,72,61,3,56,62,57,20,55,58,2,59,9]))),bz=R.lazy(()=>ce(()=>import("./AiDeadlinesView-xAdHZPwo.js"),__vite__mapDeps([83,1,24,84,64,29,30,15,55]))),Ez=R.lazy(()=>ce(()=>import("./ConferenceDetailView-DCFcy6HY.js"),__vite__mapDeps([85,1,69,36,37,38,39,33,12,14,2,44,24,7,29,30,15]))),Sz=R.lazy(()=>ce(()=>import("./ConferenceTaskView-B3KC6Cjp.js"),__vite__mapDeps([86,1,11,12,13,7,14,15,16,18,19,20,69,36,37,38,39,33,2,44,24,26,27,28,29,30]))),Cz=R.lazy(()=>ce(()=>import("./OrganizationsIndexView-cBaBMGWl.js"),__vite__mapDeps([87,1,30,29,24,88]))),kz=R.lazy(()=>ce(()=>import("./OrganizationDetailView-CiX739Oz.js"),__vite__mapDeps([89,90,76,1,2,10,9,11,12,13,7,14,15,16,69,36,37,38,39,33,44,91,29,24,18,19,20,30,57,3,55,58,28,26,27,92]))),Pz=R.lazy(()=>ce(()=>import("./OrganizationTaskView-CHkDgXnx.js"),__vite__mapDeps([93,90,76,1,2,10,9,11,12,13,7,14,15,16,69,36,37,38,39,33,44,91,29,24,18,19,20,30,57,3,55,58,28,26,27,92]))),Rz=R.lazy(()=>ce(()=>import("./AuthorDetailView-D5GOZaKX.js"),__vite__mapDeps([94,1,11,12,13,7,14,15,16,19,20,18,76,2,10,9,30,29,28,26,27,92]))),Tz=R.lazy(()=>ce(()=>import("./MethodDetailView-CLQNXnif.js"),__vite__mapDeps([95,76,1,2,10,9,12,27,11,13,7,14,15,16,18,19,20,69,36,37,38,39,33,44,24,71,28,29,30]))),Iz=R.lazy(()=>ce(()=>import("./BenchmarkDetailView-Do-phYU9.js"),__vite__mapDeps([96,76,1,2,10,9,24,51,14,33,15,52,13,84,64,11,12,7,16,29,30,78,71,97]))),Oz=R.lazy(()=>ce(()=>import("./SavedPapersView-mfFmqcEo.js"),__vite__mapDeps([98,12,1,11,13,7,14,15,16,29,30,66]))),Mz=R.lazy(()=>ce(()=>import("./SettingsView-CNX_Ys8s.js"),__vite__mapDeps([99,1,2,10,84,64,77,8,22,54,45,42]))),Nz=R.lazy(()=>ce(()=>import("./PrivacyView-BuZaMRBW.js"),__vite__mapDeps([100,54]))),Az=R.lazy(()=>ce(()=>import("./ApiDocsView-CTgUj-zh.js"),__vite__mapDeps([101,1,37,102]))),$z=R.lazy(()=>ce(()=>import("./McpView-DiDGTElx.js"),__vite__mapDeps([103,1,54,46,42,40,104]))),Lz=R.lazy(()=>ce(()=>import("./SubmitView-uKaxJMOl.js"),__vite__mapDeps([105,2,30,3,56,62,14]))),jz=R.lazy(()=>ce(()=>import("./CronDashboard-Sgu7FsUW.js"),__vite__mapDeps([106,1,107,65,3,23,63,74,41,108,42,109,58,110,2,27,4,24,22,111]))),Fz=R.lazy(()=>ce(()=>import("./AutonomousOperations-BUS5tzl6.js"),__vite__mapDeps([112,1,2,65,3,107,56,108]))),Dz=R.lazy(()=>ce(()=>import("./SubmissionsDashboard-CU1SgfgM.js"),__vite__mapDeps([113,60,12,1,2,24,15,14,59,109,58,108,110,114]))),zz=R.lazy(()=>ce(()=>import("./UserProfileView-DyszpB1t.js"),__vite__mapDeps([115,1,91,29,24]))),Bz=R.lazy(()=>ce(()=>import("./RateLimitsView-vCH7Yezm.js"),__vite__mapDeps([116,1]))),Uz=R.lazy(()=>ce(()=>import("./AstraForRoboticsView-D_kBWqyr.js"),__vite__mapDeps([117,11,12,13,7,14,15,16,18,30,29,28,26,1,27,54,118]))),uh=R.lazy(()=>ce(()=>import("./NotFound-3C_Rmvq0.js"),[])),K0=R.lazy(()=>ce(()=>import("./SearchOverlay-D30M3sCW.js"),__vite__mapDeps([119,12,1,13,24,14,49,7]))),Vz=R.lazy(()=>ce(()=>import("./StagingAccessRequestView-DbFH2yKq.js"),__vite__mapDeps([120,110]))),ch=()=>w.jsxs("div",{className:"page","aria-busy":"true","aria-live":"polite",children:[w.jsx("div",{className:"animate-pulse rounded-md bg-muted",style:{height:24,width:"30%",marginBottom:24}}),w.jsx("div",{className:"animate-pulse rounded-md bg-muted",style:{height:64,width:"60%",marginBottom:32}}),w.jsxs("div",{className:"paper-list",style:{display:"grid",gap:16},children:[w.jsx("div",{className:"animate-pulse rounded-md bg-muted",style:{height:96}}),w.jsx("div",{className:"animate-pulse rounded-md bg-muted",style:{height:96}}),w.jsx("div",{className:"animate-pulse rounded-md bg-muted",style:{height:96}})]})]}),qz=new dA({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:1}}}),Hz=()=>{const{arxivId:t}=_1();return w.jsx(To,{to:t?`/paper/${t}`:"/papers",replace:!0})},Wz=()=>{const{taskSlug:t}=_1();return w.jsx(To,{to:t?`/tasks/${t}`:"/tasks",replace:!0})},Q0=({element:t})=>jo()?w.jsx(To,{to:"/",replace:!0}):w.jsx(w.Fragment,{children:t}),Hk=({element:t})=>{const{user:e,isLoading:n}=om();return jo()?w.jsx(To,{to:"/",replace:!0}):n?w.jsx("div",{className:"page",children:w.jsx("div",{className:"submission-loading",children:w.jsx("span",{children:"Checking admin session..."})})}):e?e.is_admin?w.jsx(w.Fragment,{children:t}):w.jsx("div",{className:"page",children:w.jsxs("div",{className:"submission-empty submission-empty-warn",children:[w.jsx("h1",{children:"Admin access required"}),w.jsxs("p",{children:["Signed in as @",e.username,". This dashboard is limited to allowlisted admin accounts."]})]})}):w.jsx("div",{className:"page",children:w.jsxs("div",{className:"submission-empty submission-empty-warn",children:[w.jsx("h1",{children:"Sign in required"}),w.jsx("p",{children:"Sign in with an allowlisted Hugging Face admin account to view admin operations."}),w.jsx(hS,{returnTo:"/admin-dashboard"})]})})},Gz=()=>{const t=tL(),e=typeof window<"u"&&new URL(t,window.location.origin).origin!==window.location.origin;return R.useEffect(()=>{e&&window.location.replace(t)},[t,e]),e?w.jsx("div",{className:"page",children:w.jsxs("div",{className:"submission-loading",children:[w.jsx("span",{children:"Opening the production admin dashboard..."}),w.jsx("a",{href:t,children:"Continue"})]})}):w.jsx(Hk,{element:w.jsx(jz,{})})},Kz=()=>{const[t,e]=R.useState(!1),n=$n();return sz(),R.useLayoutEffect(()=>{var r;(r=document.getElementById("initial-discovery-footer"))==null||r.remove()},[]),R.useEffect(()=>{const r=s=>{(s.metaKey||s.ctrlKey)&&s.key==="k"&&(s.preventDefault(),e(!0))};return window.addEventListener("keydown",r),()=>window.removeEventListener("keydown",r)},[]),n.pathname==="/request-access"?w.jsx(R.Suspense,{fallback:w.jsx(ch,{}),children:w.jsx(Vz,{})}):n.pathname.startsWith("/pdf/")?w.jsxs("div",{className:"reader-route-shell",children:[w.jsx(D0,{onOpenSearch:()=>e(!0)}),w.jsx("div",{className:"reader-route-content",children:w.jsx(R.Suspense,{fallback:w.jsx(ch,{}),children:w.jsx(Y_,{children:w.jsx(ue,{path:"/pdf/:paperId",element:sL()?w.jsx(vz,{}):w.jsx(uh,{})})})})}),t&&w.jsx(R.Suspense,{fallback:null,children:w.jsx(K0,{open:t,onClose:()=>e(!1)})})]}):w.jsxs(w.Fragment,{children:[w.jsx(D0,{onOpenSearch:()=>e(!0)}),w.jsx("main",{children:w.jsx(R.Suspense,{fallback:w.jsx(ch,{}),children:w.jsxs(Y_,{children:[w.jsx(ue,{path:"/",element:w.jsx(cz,{})}),w.jsx(ue,{path:"/following",element:w.jsx(uz,{})}),w.jsx(ue,{path:"/chat/:sessionId?",element:al()?w.jsx(dz,{}):w.jsx(To,{to:"/",replace:!0})}),w.jsx(ue,{path:"/share/:shareId",element:al()?w.jsx(fz,{}):w.jsx(uh,{})}),w.jsx(ue,{path:"/papers",element:w.jsx(hz,{})}),w.jsx(ue,{path:"/papers/:arxivId",element:w.jsx(Hz,{})}),w.jsx(ue,{path:"/paper/:arxivId",element:w.jsx(pz,{})}),w.jsx(ue,{path:"/tasks",element:w.jsx(gz,{})}),w.jsx(ue,{path:"/tasks/:taskSlug",element:w.jsx(mz,{})}),w.jsx(ue,{path:"/task/:taskSlug",element:w.jsx(Wz,{})}),w.jsx(ue,{path:"/methods",element:w.jsx(yz,{})}),w.jsx(ue,{path:"/methods/:methodSlug",element:w.jsx(Tz,{})}),w.jsx(ue,{path:"/frameworks",element:w.jsx(_z,{})}),w.jsx(ue,{path:"/trends",element:w.jsx(wz,{})}),w.jsx(ue,{path:"/conferences",element:w.jsx(xz,{})}),w.jsx(ue,{path:"/ai-deadlines",element:w.jsx(bz,{})}),w.jsx(ue,{path:"/conferences/:confSlug",element:w.jsx(Ez,{})}),w.jsx(ue,{path:"/conferences/:confSlug/:taskSlug",element:w.jsx(Sz,{})}),w.jsx(ue,{path:"/organizations",element:w.jsx(Cz,{})}),w.jsx(ue,{path:"/orgs/:orgSlug",element:w.jsx(kz,{})}),w.jsx(ue,{path:"/orgs/:orgSlug/:taskSlug",element:w.jsx(Pz,{})}),w.jsx(ue,{path:"/authors/:authorId",element:w.jsx(Rz,{})}),w.jsx(ue,{path:"/benchmark/:datasetSlug",element:w.jsx(Iz,{})}),w.jsx(ue,{path:"/authorize-paper-edit/:authorizationId",element:w.jsx(lz,{})}),w.jsx(ue,{path:"/submit",element:w.jsx(Lz,{})}),w.jsx(ue,{path:"/saved",element:w.jsx(Q0,{element:w.jsx(Oz,{})})}),w.jsx(ue,{path:"/settings",element:w.jsx(Mz,{})}),w.jsx(ue,{path:"/privacy",element:w.jsx(Nz,{})}),w.jsx(ue,{path:"/docs/api",element:w.jsx(Az,{})}),w.jsx(ue,{path:"/mcp",element:w.jsx($z,{})}),w.jsx(ue,{path:"/admin-dashboard",element:w.jsx(Gz,{})}),w.jsx(ue,{path:"/autonomous-operations",element:w.jsx(Hk,{element:w.jsx(Fz,{})})}),w.jsx(ue,{path:"/cron-dashboard",element:w.jsx(To,{to:"/admin-dashboard",replace:!0})}),w.jsx(ue,{path:"/submissions",element:w.jsx(Q0,{element:w.jsx(Dz,{})})}),w.jsx(ue,{path:"/rate-limits",element:w.jsx(Bz,{})}),w.jsx(ue,{path:"/astra-for-robotics",element:w.jsx(Uz,{})}),w.jsx(ue,{path:"/:username",element:w.jsx(zz,{})}),w.jsx(ue,{path:"*",element:w.jsx(uh,{})})]})})}),w.jsx(ID,{}),t&&w.jsx(R.Suspense,{fallback:null,children:w.jsx(K0,{open:t,onClose:()=>e(!1)})})]})},Qz=()=>w.jsx(fA,{client:qz,children:w.jsx(kD,{children:w.jsx(oz,{children:w.jsxs(nz,{children:[w.jsx(az,{children:w.jsx(Kz,{})}),w.jsx(l3,{}),w.jsx(L3,{}),!1]})})})});NM();const Yz=w.jsx(MT,{attribute:"class",defaultTheme:"system",enableSystem:!0,disableTransitionOnChange:!0,storageKey:"pwc-theme",children:w.jsx(OM,{children:w.jsx(Qz,{})})}),Xz=_b(document.getElementById("root"));Xz.render(w.jsx(R.StrictMode,{children:Yz}));export{RS as $,sm as A,uC as B,nL as C,uD as D,Fg as E,R as F,G0 as G,hS as H,UF as I,jo as J,eL as K,Rn as L,sL as M,c4 as N,dD as O,er as P,fD as Q,BF as R,lk as S,a3 as T,lr as U,u4 as V,ED as W,cD as X,aL as Y,iw as Z,ce as _,om as a,_l as a0,eo as a1,pn as a2,Ug as a3,iv as a4,vS as a5,s3 as a6,G$ as a7,Q$ as a8,Y$ as a9,Wp as aA,Sn as aB,T1 as aC,qN as aD,HN as aE,Hp as aF,k1 as aG,oA as aH,QN as aI,Ct as aJ,r4 as aK,il as aL,lA as aM,i4 as aN,s4 as aO,P1 as aP,AS as aQ,$S as aR,LS as aS,To as aT,$0 as aU,X$ as aa,Es as ab,Z$ as ac,J$ as ad,l4 as ae,n4 as af,IF as ag,iC as ah,kd as ai,_d as aj,Q1 as ak,Ng as al,z1 as am,Mg as an,xl as ao,oC as ap,aC as aq,$n as ar,OT as as,Zz as at,CD as au,f4 as av,md as aw,ZN as ax,WN as ay,t4 as az,Rg as b,m4 as c,e4 as d,rL as e,d4 as f,Id as g,LD as h,al as i,w as j,w4 as k,aD as l,o4 as m,h4 as n,g4 as o,Re as p,yd as q,g as r,Xe as s,Z as t,_1 as u,EF as v,Ss as w,at as x,p4 as y,jS as z}; +`);function hu(t){return t.label!==void 0}var C3=3,k3="32px",P3="16px",q0=4e3,R3=356,T3=14,I3=20,O3=200;function xn(...t){return t.filter(Boolean).join(" ")}function M3(t){let[e,n]=t.split("-"),r=[];return e&&r.push(e),n&&r.push(n),r}var N3=t=>{var e,n,r,s,i,o,a,l,u,c,d;let{invert:f,toast:h,unstyled:_,interacting:p,setHeights:y,visibleToasts:v,heights:m,index:x,toasts:b,expanded:E,removeToast:S,defaultRichColors:k,closeButton:C,style:I,cancelButtonStyle:P,actionButtonStyle:$,className:N="",descriptionClassName:B="",duration:j,position:W,gap:q,loadingIcon:G,expandByDefault:M,classNames:T,icons:z,closeButtonAriaLabel:K="Close toast",pauseWhenPageIsHidden:H}=t,[Q,X]=R.useState(null),[ie,pe]=R.useState(null),[se,ve]=R.useState(!1),[_e,Ze]=R.useState(!1),[Ot,et]=R.useState(!1),[ze,nr]=R.useState(!1),[Or,lt]=R.useState(!1),[Mr,tn]=R.useState(0),[Ut,Nr]=R.useState(0),Ar=R.useRef(h.duration||j||q0),Bo=R.useRef(null),vn=R.useRef(null),Wk=x===0,Gk=x+1<=v,nn=h.type,hi=h.dismissible!==!1,Kk=h.className||"",Qk=h.descriptionClassName||"",Pl=R.useMemo(()=>m.findIndex(oe=>oe.toastId===h.id)||0,[m,h.id]),Yk=R.useMemo(()=>{var oe;return(oe=h.closeButton)!=null?oe:C},[h.closeButton,C]),dm=R.useMemo(()=>h.duration||j||q0,[h.duration,j]),$d=R.useRef(0),pi=R.useRef(0),fm=R.useRef(0),vi=R.useRef(null),[Xk,Jk]=W.split("-"),hm=R.useMemo(()=>m.reduce((oe,Se,je)=>je>=Pl?oe:oe+Se.height,0),[m,Pl]),pm=m3(),Zk=h.invert||f,Ld=nn==="loading";pi.current=R.useMemo(()=>Pl*q+hm,[Pl,hm]),R.useEffect(()=>{Ar.current=dm},[dm]),R.useEffect(()=>{ve(!0)},[]),R.useEffect(()=>{let oe=vn.current;if(oe){let Se=oe.getBoundingClientRect().height;return Nr(Se),y(je=>[{toastId:h.id,height:Se,position:h.position},...je]),()=>y(je=>je.filter(gn=>gn.toastId!==h.id))}},[y,h.id]),R.useLayoutEffect(()=>{if(!se)return;let oe=vn.current,Se=oe.style.height;oe.style.height="auto";let je=oe.getBoundingClientRect().height;oe.style.height=Se,Nr(je),y(gn=>gn.find(mn=>mn.toastId===h.id)?gn.map(mn=>mn.toastId===h.id?{...mn,height:je}:mn):[{toastId:h.id,height:je,position:h.position},...gn])},[se,h.title,h.description,y,h.id]);let $r=R.useCallback(()=>{Ze(!0),tn(pi.current),y(oe=>oe.filter(Se=>Se.toastId!==h.id)),setTimeout(()=>{S(h)},O3)},[h,S,y,pi]);R.useEffect(()=>{if(h.promise&&nn==="loading"||h.duration===1/0||h.type==="loading")return;let oe;return E||p||H&&pm?(()=>{if(fm.current<$d.current){let Se=new Date().getTime()-$d.current;Ar.current=Ar.current-Se}fm.current=new Date().getTime()})():Ar.current!==1/0&&($d.current=new Date().getTime(),oe=setTimeout(()=>{var Se;(Se=h.onAutoClose)==null||Se.call(h,h),$r()},Ar.current)),()=>clearTimeout(oe)},[E,p,h,nn,H,pm,$r]),R.useEffect(()=>{h.delete&&$r()},[$r,h.delete]);function eP(){var oe,Se,je;return z!=null&&z.loading?R.createElement("div",{className:xn(T==null?void 0:T.loader,(oe=h==null?void 0:h.classNames)==null?void 0:oe.loader,"sonner-loader"),"data-visible":nn==="loading"},z.loading):G?R.createElement("div",{className:xn(T==null?void 0:T.loader,(Se=h==null?void 0:h.classNames)==null?void 0:Se.loader,"sonner-loader"),"data-visible":nn==="loading"},G):R.createElement(d3,{className:xn(T==null?void 0:T.loader,(je=h==null?void 0:h.classNames)==null?void 0:je.loader),visible:nn==="loading"})}return R.createElement("li",{tabIndex:0,ref:vn,className:xn(N,Kk,T==null?void 0:T.toast,(e=h==null?void 0:h.classNames)==null?void 0:e.toast,T==null?void 0:T.default,T==null?void 0:T[nn],(n=h==null?void 0:h.classNames)==null?void 0:n[nn]),"data-sonner-toast":"","data-rich-colors":(r=h.richColors)!=null?r:k,"data-styled":!(h.jsx||h.unstyled||_),"data-mounted":se,"data-promise":!!h.promise,"data-swiped":Or,"data-removed":_e,"data-visible":Gk,"data-y-position":Xk,"data-x-position":Jk,"data-index":x,"data-front":Wk,"data-swiping":Ot,"data-dismissible":hi,"data-type":nn,"data-invert":Zk,"data-swipe-out":ze,"data-swipe-direction":ie,"data-expanded":!!(E||M&&se),style:{"--index":x,"--toasts-before":x,"--z-index":b.length-x,"--offset":`${_e?Mr:pi.current}px`,"--initial-height":M?"auto":`${Ut}px`,...I,...h.style},onDragEnd:()=>{et(!1),X(null),vi.current=null},onPointerDown:oe=>{Ld||!hi||(Bo.current=new Date,tn(pi.current),oe.target.setPointerCapture(oe.pointerId),oe.target.tagName!=="BUTTON"&&(et(!0),vi.current={x:oe.clientX,y:oe.clientY}))},onPointerUp:()=>{var oe,Se,je,gn;if(ze||!hi)return;vi.current=null;let mn=Number(((oe=vn.current)==null?void 0:oe.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Lr=Number(((Se=vn.current)==null?void 0:Se.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Cs=new Date().getTime()-((je=Bo.current)==null?void 0:je.getTime()),yn=Q==="x"?mn:Lr,jr=Math.abs(yn)/Cs;if(Math.abs(yn)>=I3||jr>.11){tn(pi.current),(gn=h.onDismiss)==null||gn.call(h,h),pe(Q==="x"?mn>0?"right":"left":Lr>0?"down":"up"),$r(),nr(!0),lt(!1);return}et(!1),X(null)},onPointerMove:oe=>{var Se,je,gn,mn;if(!vi.current||!hi||((Se=window.getSelection())==null?void 0:Se.toString().length)>0)return;let Lr=oe.clientY-vi.current.y,Cs=oe.clientX-vi.current.x,yn=(je=t.swipeDirections)!=null?je:M3(W);!Q&&(Math.abs(Cs)>1||Math.abs(Lr)>1)&&X(Math.abs(Cs)>Math.abs(Lr)?"x":"y");let jr={x:0,y:0};Q==="y"?(yn.includes("top")||yn.includes("bottom"))&&(yn.includes("top")&&Lr<0||yn.includes("bottom")&&Lr>0)&&(jr.y=Lr):Q==="x"&&(yn.includes("left")||yn.includes("right"))&&(yn.includes("left")&&Cs<0||yn.includes("right")&&Cs>0)&&(jr.x=Cs),(Math.abs(jr.x)>0||Math.abs(jr.y)>0)&<(!0),(gn=vn.current)==null||gn.style.setProperty("--swipe-amount-x",`${jr.x}px`),(mn=vn.current)==null||mn.style.setProperty("--swipe-amount-y",`${jr.y}px`)}},Yk&&!h.jsx?R.createElement("button",{"aria-label":K,"data-disabled":Ld,"data-close-button":!0,onClick:Ld||!hi?()=>{}:()=>{var oe;$r(),(oe=h.onDismiss)==null||oe.call(h,h)},className:xn(T==null?void 0:T.closeButton,(s=h==null?void 0:h.classNames)==null?void 0:s.closeButton)},(i=z==null?void 0:z.close)!=null?i:g3):null,h.jsx||g.isValidElement(h.title)?h.jsx?h.jsx:typeof h.title=="function"?h.title():h.title:R.createElement(R.Fragment,null,nn||h.icon||h.promise?R.createElement("div",{"data-icon":"",className:xn(T==null?void 0:T.icon,(o=h==null?void 0:h.classNames)==null?void 0:o.icon)},h.promise||h.type==="loading"&&!h.icon?h.icon||eP():null,h.type!=="loading"?h.icon||(z==null?void 0:z[nn])||u3(nn):null):null,R.createElement("div",{"data-content":"",className:xn(T==null?void 0:T.content,(a=h==null?void 0:h.classNames)==null?void 0:a.content)},R.createElement("div",{"data-title":"",className:xn(T==null?void 0:T.title,(l=h==null?void 0:h.classNames)==null?void 0:l.title)},typeof h.title=="function"?h.title():h.title),h.description?R.createElement("div",{"data-description":"",className:xn(B,Qk,T==null?void 0:T.description,(u=h==null?void 0:h.classNames)==null?void 0:u.description)},typeof h.description=="function"?h.description():h.description):null),g.isValidElement(h.cancel)?h.cancel:h.cancel&&hu(h.cancel)?R.createElement("button",{"data-button":!0,"data-cancel":!0,style:h.cancelButtonStyle||P,onClick:oe=>{var Se,je;hu(h.cancel)&&hi&&((je=(Se=h.cancel).onClick)==null||je.call(Se,oe),$r())},className:xn(T==null?void 0:T.cancelButton,(c=h==null?void 0:h.classNames)==null?void 0:c.cancelButton)},h.cancel.label):null,g.isValidElement(h.action)?h.action:h.action&&hu(h.action)?R.createElement("button",{"data-button":!0,"data-action":!0,style:h.actionButtonStyle||$,onClick:oe=>{var Se,je;hu(h.action)&&((je=(Se=h.action).onClick)==null||je.call(Se,oe),!oe.defaultPrevented&&$r())},className:xn(T==null?void 0:T.actionButton,(d=h==null?void 0:h.classNames)==null?void 0:d.actionButton)},h.action.label):null))};function H0(){if(typeof window>"u"||typeof document>"u")return"ltr";let t=document.documentElement.getAttribute("dir");return t==="auto"||!t?window.getComputedStyle(document.documentElement).direction:t}function A3(t,e){let n={};return[t,e].forEach((r,s)=>{let i=s===1,o=i?"--mobile-offset":"--offset",a=i?P3:k3;function l(u){["top","right","bottom","left"].forEach(c=>{n[`${o}-${c}`]=typeof u=="number"?`${u}px`:u})}typeof r=="number"||typeof r=="string"?l(r):typeof r=="object"?["top","right","bottom","left"].forEach(u=>{r[u]===void 0?n[`${o}-${u}`]=a:n[`${o}-${u}`]=typeof r[u]=="number"?`${r[u]}px`:r[u]}):l(a)}),n}var $3=g.forwardRef(function(t,e){let{invert:n,position:r="bottom-right",hotkey:s=["altKey","KeyT"],expand:i,closeButton:o,className:a,offset:l,mobileOffset:u,theme:c="light",richColors:d,duration:f,style:h,visibleToasts:_=C3,toastOptions:p,dir:y=H0(),gap:v=T3,loadingIcon:m,icons:x,containerAriaLabel:b="Notifications",pauseWhenPageIsHidden:E}=t,[S,k]=R.useState([]),C=R.useMemo(()=>Array.from(new Set([r].concat(S.filter(H=>H.position).map(H=>H.position)))),[S,r]),[I,P]=R.useState([]),[$,N]=R.useState(!1),[B,j]=R.useState(!1),[W,q]=R.useState(c!=="system"?c:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),G=R.useRef(null),M=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),T=R.useRef(null),z=R.useRef(!1),K=R.useCallback(H=>{k(Q=>{var X;return(X=Q.find(ie=>ie.id===H.id))!=null&&X.delete||Nt.dismiss(H.id),Q.filter(({id:ie})=>ie!==H.id)})},[]);return R.useEffect(()=>Nt.subscribe(H=>{if(H.dismiss){k(Q=>Q.map(X=>X.id===H.id?{...X,delete:!0}:X));return}setTimeout(()=>{yb.flushSync(()=>{k(Q=>{let X=Q.findIndex(ie=>ie.id===H.id);return X!==-1?[...Q.slice(0,X),{...Q[X],...H},...Q.slice(X+1)]:[H,...Q]})})})}),[]),R.useEffect(()=>{if(c!=="system"){q(c);return}if(c==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?q("dark"):q("light")),typeof window>"u")return;let H=window.matchMedia("(prefers-color-scheme: dark)");try{H.addEventListener("change",({matches:Q})=>{q(Q?"dark":"light")})}catch{H.addListener(({matches:X})=>{try{q(X?"dark":"light")}catch(ie){console.error(ie)}})}},[c]),R.useEffect(()=>{S.length<=1&&N(!1)},[S]),R.useEffect(()=>{let H=Q=>{var X,ie;s.every(pe=>Q[pe]||Q.code===pe)&&(N(!0),(X=G.current)==null||X.focus()),Q.code==="Escape"&&(document.activeElement===G.current||(ie=G.current)!=null&&ie.contains(document.activeElement))&&N(!1)};return document.addEventListener("keydown",H),()=>document.removeEventListener("keydown",H)},[s]),R.useEffect(()=>{if(G.current)return()=>{T.current&&(T.current.focus({preventScroll:!0}),T.current=null,z.current=!1)}},[G.current]),R.createElement("section",{ref:e,"aria-label":`${b} ${M}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},C.map((H,Q)=>{var X;let[ie,pe]=H.split("-");return S.length?R.createElement("ol",{key:H,dir:y==="auto"?H0():y,tabIndex:-1,ref:G,className:a,"data-sonner-toaster":!0,"data-theme":W,"data-y-position":ie,"data-lifted":$&&S.length>1&&!i,"data-x-position":pe,style:{"--front-toast-height":`${((X=I[0])==null?void 0:X.height)||0}px`,"--width":`${R3}px`,"--gap":`${v}px`,...h,...A3(l,u)},onBlur:se=>{z.current&&!se.currentTarget.contains(se.relatedTarget)&&(z.current=!1,T.current&&(T.current.focus({preventScroll:!0}),T.current=null))},onFocus:se=>{se.target instanceof HTMLElement&&se.target.dataset.dismissible==="false"||z.current||(z.current=!0,T.current=se.relatedTarget)},onMouseEnter:()=>N(!0),onMouseMove:()=>N(!0),onMouseLeave:()=>{B||N(!1)},onDragEnd:()=>N(!1),onPointerDown:se=>{se.target instanceof HTMLElement&&se.target.dataset.dismissible==="false"||j(!0)},onPointerUp:()=>j(!1)},S.filter(se=>!se.position&&Q===0||se.position===H).map((se,ve)=>{var _e,Ze;return R.createElement(N3,{key:se.id,icons:x,index:ve,toast:se,defaultRichColors:d,duration:(_e=p==null?void 0:p.duration)!=null?_e:f,className:p==null?void 0:p.className,descriptionClassName:p==null?void 0:p.descriptionClassName,invert:n,visibleToasts:_,closeButton:(Ze=p==null?void 0:p.closeButton)!=null?Ze:o,interacting:B,position:H,style:p==null?void 0:p.style,unstyled:p==null?void 0:p.unstyled,classNames:p==null?void 0:p.classNames,cancelButtonStyle:p==null?void 0:p.cancelButtonStyle,actionButtonStyle:p==null?void 0:p.actionButtonStyle,removeToast:K,toasts:S.filter(Ot=>Ot.position==se.position),heights:I.filter(Ot=>Ot.position==se.position),setHeights:P,expandByDefault:i,gap:v,loadingIcon:m,expanded:$,pauseWhenPageIsHidden:E,swipeDirections:t.swipeDirections})})):null}))});const L3=({...t})=>{const{theme:e="system"}=OT();return w.jsx($3,{theme:e,className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...t})};var j3=Symbol("radix.slottable");function F3(t){const e=({children:n})=>w.jsx(w.Fragment,{children:n});return e.displayName=`${t}.Slottable`,e.__radixId=j3,e}var[Nd]=Ss("Tooltip",[kd]),cm=kd(),$k="TooltipProvider",D3=700,W0="tooltip.open",[z3,Lk]=Nd($k),jk=t=>{const{__scopeTooltip:e,delayDuration:n=D3,skipDelayDuration:r=300,disableHoverableContent:s=!1,children:i}=t,o=g.useRef(!0),a=g.useRef(!1),l=g.useRef(0);return g.useEffect(()=>{const u=l.current;return()=>window.clearTimeout(u)},[]),w.jsx(z3,{scope:e,isOpenDelayedRef:o,delayDuration:n,onOpen:g.useCallback(()=>{window.clearTimeout(l.current),o.current=!1},[]),onClose:g.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>o.current=!0,r)},[r]),isPointerInTransitRef:a,onPointerInTransitChange:g.useCallback(u=>{a.current=u},[]),disableHoverableContent:s,children:i})};jk.displayName=$k;var Fk="Tooltip",[y4,Ad]=Nd(Fk),cv="TooltipTrigger",B3=g.forwardRef((t,e)=>{const{__scopeTooltip:n,...r}=t,s=Ad(cv,n),i=Lk(cv,n),o=cm(n),a=g.useRef(null),l=Xe(e,a,s.onTriggerChange),u=g.useRef(!1),c=g.useRef(!1),d=g.useCallback(()=>u.current=!1,[]);return g.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),w.jsx(iC,{asChild:!0,...o,children:w.jsx(Re.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...r,ref:l,onPointerMove:Z(t.onPointerMove,f=>{f.pointerType!=="touch"&&!c.current&&!i.isPointerInTransitRef.current&&(s.onTriggerEnter(),c.current=!0)}),onPointerLeave:Z(t.onPointerLeave,()=>{s.onTriggerLeave(),c.current=!1}),onPointerDown:Z(t.onPointerDown,()=>{s.open&&s.onClose(),u.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:Z(t.onFocus,()=>{u.current||s.onOpen()}),onBlur:Z(t.onBlur,s.onClose),onClick:Z(t.onClick,s.onClose)})})});B3.displayName=cv;var U3="TooltipPortal",[_4,V3]=Nd(U3,{forceMount:void 0}),Mo="TooltipContent",Dk=g.forwardRef((t,e)=>{const n=V3(Mo,t.__scopeTooltip),{forceMount:r=n.forceMount,side:s="top",...i}=t,o=Ad(Mo,t.__scopeTooltip);return w.jsx(er,{present:r||o.open,children:o.disableHoverableContent?w.jsx(zk,{side:s,...i,ref:e}):w.jsx(q3,{side:s,...i,ref:e})})}),q3=g.forwardRef((t,e)=>{const n=Ad(Mo,t.__scopeTooltip),r=Lk(Mo,t.__scopeTooltip),s=g.useRef(null),i=Xe(e,s),[o,a]=g.useState(null),{trigger:l,onClose:u}=n,c=s.current,{onPointerInTransitChange:d}=r,f=g.useCallback(()=>{a(null),d(!1)},[d]),h=g.useCallback((_,p)=>{const y=_.currentTarget,v={x:_.clientX,y:_.clientY},m=Q3(v,y.getBoundingClientRect()),x=Y3(v,m),b=X3(p.getBoundingClientRect()),E=Z3([...x,...b]);a(E),d(!0)},[d]);return g.useEffect(()=>()=>f(),[f]),g.useEffect(()=>{if(l&&c){const _=y=>h(y,c),p=y=>h(y,l);return l.addEventListener("pointerleave",_),c.addEventListener("pointerleave",p),()=>{l.removeEventListener("pointerleave",_),c.removeEventListener("pointerleave",p)}}},[l,c,h,f]),g.useEffect(()=>{if(o){const _=p=>{const y=p.target,v={x:p.clientX,y:p.clientY},m=(l==null?void 0:l.contains(y))||(c==null?void 0:c.contains(y)),x=!J3(v,o);m?f():x&&(f(),u())};return document.addEventListener("pointermove",_),()=>document.removeEventListener("pointermove",_)}},[l,c,o,u,f]),w.jsx(zk,{...t,ref:i})}),[H3,W3]=Nd(Fk,{isInside:!1}),G3=F3("TooltipContent"),zk=g.forwardRef((t,e)=>{const{__scopeTooltip:n,children:r,"aria-label":s,onEscapeKeyDown:i,onPointerDownOutside:o,...a}=t,l=Ad(Mo,n),u=cm(n),{onClose:c}=l;return g.useEffect(()=>(document.addEventListener(W0,c),()=>document.removeEventListener(W0,c)),[c]),g.useEffect(()=>{if(l.trigger){const d=f=>{const h=f.target;h!=null&&h.contains(l.trigger)&&c()};return window.addEventListener("scroll",d,{capture:!0}),()=>window.removeEventListener("scroll",d,{capture:!0})}},[l.trigger,c]),w.jsx(xl,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:d=>d.preventDefault(),onDismiss:c,children:w.jsxs(oC,{"data-state":l.stateAttribute,...u,...a,ref:e,style:{...a.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[w.jsx(G3,{children:r}),w.jsx(H3,{scope:n,isInside:!0,children:w.jsx(DD,{id:l.contentId,role:"tooltip",children:s||r})})]})})});Dk.displayName=Mo;var Bk="TooltipArrow",K3=g.forwardRef((t,e)=>{const{__scopeTooltip:n,...r}=t,s=cm(n);return W3(Bk,n).isInside?null:w.jsx(aC,{...s,...r,ref:e})});K3.displayName=Bk;function Q3(t,e){const n=Math.abs(e.top-t.y),r=Math.abs(e.bottom-t.y),s=Math.abs(e.right-t.x),i=Math.abs(e.left-t.x);switch(Math.min(n,r,s,i)){case i:return"left";case s:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function Y3(t,e,n=5){const r=[];switch(e){case"top":r.push({x:t.x-n,y:t.y+n},{x:t.x+n,y:t.y+n});break;case"bottom":r.push({x:t.x-n,y:t.y-n},{x:t.x+n,y:t.y-n});break;case"left":r.push({x:t.x+n,y:t.y-n},{x:t.x+n,y:t.y+n});break;case"right":r.push({x:t.x-n,y:t.y-n},{x:t.x-n,y:t.y+n});break}return r}function X3(t){const{top:e,right:n,bottom:r,left:s}=t;return[{x:s,y:e},{x:n,y:e},{x:n,y:r},{x:s,y:r}]}function J3(t,e){const{x:n,y:r}=t;let s=!1;for(let i=0,o=e.length-1;ir!=f>r&&n<(d-u)*(r-c)/(f-c)+u&&(s=!s)}return s}function Z3(t){const e=t.slice();return e.sort((n,r)=>n.xr.x?1:n.yr.y?1:0),ez(e)}function ez(t){if(t.length<=1)return t.slice();const e=[];for(let r=0;r=2;){const i=e[e.length-1],o=e[e.length-2];if((i.x-o.x)*(s.y-o.y)>=(i.y-o.y)*(s.x-o.x))e.pop();else break}e.push(s)}e.pop();const n=[];for(let r=t.length-1;r>=0;r--){const s=t[r];for(;n.length>=2;){const i=n[n.length-1],o=n[n.length-2];if((i.x-o.x)*(s.y-o.y)>=(i.y-o.y)*(s.x-o.x))n.pop();else break}n.push(s)}return n.pop(),e.length===1&&n.length===1&&e[0].x===n[0].x&&e[0].y===n[0].y?e:e.concat(n)}var tz=jk,Uk=Dk;const nz=tz,rz=g.forwardRef(({className:t,sideOffset:e=4,...n},r)=>w.jsx(Uk,{ref:r,sideOffset:e,className:at("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t),...n}));rz.displayName=Uk.displayName;function sz(){const{pathname:t,hash:e}=$n();g.useLayoutEffect(()=>{e||window.scrollTo({top:0,left:0,behavior:"instant"})},[t,e])}class iz{constructor(e){this.request=e}getPreferences(){return this.request("/me/preferences")}updatePreferences(e){return this.request("/me/preferences",{method:"PUT",body:JSON.stringify(e)})}getRateLimitPolicy(){return this.request("/rate-limits",{credentials:"omit"})}getBookmarkIds(){return this.request("/me/bookmarks/ids")}getBookmarks(){return this.request("/me/bookmarks")}addBookmark(e){return this.request(`/me/bookmarks/${e}`,{method:"POST"})}removeBookmark(e){return this.request(`/me/bookmarks/${e}`,{method:"DELETE"})}}const G0=new iz(iv),lh={hide_closed_source_evals:!1},Vk=R.createContext(null),oz=({children:t})=>{const{user:e}=om(),[n,r]=R.useState(lh),[s,i]=R.useState(!1);R.useEffect(()=>{let l=!1;if(!e){r(lh);return}return i(!0),G0.getPreferences().then(u=>{l||r(u)}).catch(()=>{l||r(lh)}).finally(()=>{l||i(!1)}),()=>{l=!0}},[e]);const o=R.useCallback(async l=>{const u={...n,hide_closed_source_evals:l};if(r(u),!!e)try{const c=await G0.updatePreferences(u);r(c)}catch{r(n)}},[n,e]),a=R.useMemo(()=>({preferences:n,canPersist:!!e,isLoading:s,setHideClosedSourceEvals:o}),[n,e,s,o]);return w.jsx(Vk.Provider,{value:a,children:t})};function w4(){const t=R.useContext(Vk);if(!t)throw new Error("usePreferences must be used inside a ");return t}const qk=iL(),az=qk?MN:ON;if(!qk&&typeof window<"u"){const t=window.location.hash;t.startsWith("#/")&&!t.startsWith("#//")&&window.history.replaceState(null,"",t.slice(1))}const lz=R.lazy(()=>ce(()=>import("./AuthorizePaperEditView-gluuntVq.js"),__vite__mapDeps([0,1,2,3,4]))),uz=R.lazy(()=>ce(()=>import("./FollowingView-UZ1-6cIq.js"),__vite__mapDeps([5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,1,24,25,26,27,28,29,30]))),cz=R.lazy(()=>ce(()=>import("./FeedView-DoZPrMkR.js"),__vite__mapDeps([6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,1,24,25,26,27,28,29,30]))),dz=R.lazy(()=>ce(()=>import("./ChatView-Clbc6HRC.js"),__vite__mapDeps([31,1,32,21,22,23,14,33,34,35,24,36,37,38,39,12,2,40,41,42,43,44,25,45,46]))),fz=R.lazy(()=>ce(()=>import("./SharedChatView-2Rg43kIf.js"),__vite__mapDeps([47,1,32,21,22,23,14,33,34,35,24,36,37,38,39,12,2,40,41,42,43,44]))),hz=R.lazy(()=>ce(()=>import("./PapersListView-D98idr2d.js"),__vite__mapDeps([48,11,12,13,7,14,15,16,24,26,1,27,49,28,29,30,18,19,20]))),pz=R.lazy(()=>ce(()=>import("./PaperDetailView-DdfjmMoh.js"),__vite__mapDeps([50,11,12,13,7,14,15,16,51,33,52,53,1,26,27,54,29,30,3,55,17,4,40,56,57,20,58,2,24,59,60,61,62,34,63,9,64,65,35,37,38,28,66,67]))),vz=R.lazy(()=>ce(()=>import("./PaperReaderView-wkU6OX5E.js"),__vite__mapDeps([68,1,32,21,22,23,14,33,34,35,24,36,37,38,39,12,2,40,41,42,43,44,69,53,15,26,27,31,25,45,46]))),gz=R.lazy(()=>ce(()=>import("./TagsIndexView-D9ct36Oa.js"),__vite__mapDeps([70,1,24,7,71,29,30,72,61,3,56,62,57,20,55,58,2,59,9,73,74]))),mz=R.lazy(()=>ce(()=>import("./TagBrowseView-BfCOFExx.js"),__vite__mapDeps([75,76,1,2,10,9,11,12,13,7,14,15,16,77,78,18,19,20,69,36,37,38,39,33,44,24,71,26,27,28,29,30,23,35]))),yz=R.lazy(()=>ce(()=>import("./MethodsIndexView-otCcFXzJ.js"),__vite__mapDeps([79,1,24,71,29,30,72,61,3,56,62,57,20,55,58,2,59,9,73,74]))),_z=R.lazy(()=>ce(()=>import("./FrameworksIndexView-C6_FlZ8B.js"),__vite__mapDeps([80,1,11,12,13,7,14,15,16,24]))),wz=R.lazy(()=>ce(()=>import("./TrendsView-kqxWmThB.js"),__vite__mapDeps([81,1,30,29]))),xz=R.lazy(()=>ce(()=>import("./ConferencesIndexView-VSV18uHC.js"),__vite__mapDeps([82,1,24,29,30,72,61,3,56,62,57,20,55,58,2,59,9]))),bz=R.lazy(()=>ce(()=>import("./AiDeadlinesView-CVIN6p8v.js"),__vite__mapDeps([83,1,24,84,64,29,30,15,55]))),Ez=R.lazy(()=>ce(()=>import("./ConferenceDetailView-BppSWd5G.js"),__vite__mapDeps([85,1,69,36,37,38,39,33,12,14,2,44,24,7,29,30,15]))),Sz=R.lazy(()=>ce(()=>import("./ConferenceTaskView-GaHTKHQE.js"),__vite__mapDeps([86,1,11,12,13,7,14,15,16,18,19,20,69,36,37,38,39,33,2,44,24,26,27,28,29,30]))),Cz=R.lazy(()=>ce(()=>import("./OrganizationsIndexView-DJGhJtfP.js"),__vite__mapDeps([87,1,30,29,24,88]))),kz=R.lazy(()=>ce(()=>import("./OrganizationDetailView-prvvF6X7.js"),__vite__mapDeps([89,90,76,1,2,10,9,11,12,13,7,14,15,16,69,36,37,38,39,33,44,91,29,24,18,19,20,30,57,3,55,58,28,26,27,92]))),Pz=R.lazy(()=>ce(()=>import("./OrganizationTaskView-BAUp2ClU.js"),__vite__mapDeps([93,90,76,1,2,10,9,11,12,13,7,14,15,16,69,36,37,38,39,33,44,91,29,24,18,19,20,30,57,3,55,58,28,26,27,92]))),Rz=R.lazy(()=>ce(()=>import("./AuthorDetailView-BwAC3iti.js"),__vite__mapDeps([94,1,11,12,13,7,14,15,16,19,20,18,76,2,10,9,30,29,28,26,27,92]))),Tz=R.lazy(()=>ce(()=>import("./MethodDetailView-DsH5xxKe.js"),__vite__mapDeps([95,76,1,2,10,9,12,27,11,13,7,14,15,16,18,19,20,69,36,37,38,39,33,44,24,71,28,29,30]))),Iz=R.lazy(()=>ce(()=>import("./BenchmarkDetailView-BoBxL96j.js"),__vite__mapDeps([96,76,1,2,10,9,24,51,14,33,15,52,13,84,64,11,12,7,16,29,30,78,71,97]))),Oz=R.lazy(()=>ce(()=>import("./SavedPapersView-BGMVrPGI.js"),__vite__mapDeps([98,12,1,11,13,7,14,15,16,29,30,66]))),Mz=R.lazy(()=>ce(()=>import("./SettingsView-kMZuD2XF.js"),__vite__mapDeps([99,1,2,10,84,64,77,8,22,54,45,42]))),Nz=R.lazy(()=>ce(()=>import("./PrivacyView-BVxZN5Ym.js"),__vite__mapDeps([100,54]))),Az=R.lazy(()=>ce(()=>import("./ApiDocsView-BHw_NlA8.js"),__vite__mapDeps([101,1,37,102]))),$z=R.lazy(()=>ce(()=>import("./McpView-CCjkgwIH.js"),__vite__mapDeps([103,1,54,46,42,40,104]))),Lz=R.lazy(()=>ce(()=>import("./SubmitView-Cz7qubn4.js"),__vite__mapDeps([105,2,30,3,56,62,14]))),jz=R.lazy(()=>ce(()=>import("./CronDashboard-Da9cHEaM.js"),__vite__mapDeps([106,1,107,65,3,23,63,74,41,108,42,109,58,110,2,27,4,24,22,111]))),Fz=R.lazy(()=>ce(()=>import("./AutonomousOperations-BcSbSeEV.js"),__vite__mapDeps([112,1,2,65,3,107,56,108]))),Dz=R.lazy(()=>ce(()=>import("./SubmissionsDashboard-MVmNy5zG.js"),__vite__mapDeps([113,60,12,1,2,24,15,14,59,109,58,108,110,114]))),zz=R.lazy(()=>ce(()=>import("./UserProfileView-T9Rs7-BZ.js"),__vite__mapDeps([115,1,91,29,24]))),Bz=R.lazy(()=>ce(()=>import("./RateLimitsView-BsiDpNim.js"),__vite__mapDeps([116,1]))),Uz=R.lazy(()=>ce(()=>import("./AstraForRoboticsView-Ddft2N0b.js"),__vite__mapDeps([117,11,12,13,7,14,15,16,18,30,29,28,26,1,27,54,118]))),uh=R.lazy(()=>ce(()=>import("./NotFound-DPR3-upZ.js"),[])),K0=R.lazy(()=>ce(()=>import("./SearchOverlay-D6omh4TK.js"),__vite__mapDeps([119,12,1,13,24,14,49,7]))),Vz=R.lazy(()=>ce(()=>import("./StagingAccessRequestView-Bjz7RlyX.js"),__vite__mapDeps([120,110]))),ch=()=>w.jsxs("div",{className:"page","aria-busy":"true","aria-live":"polite",children:[w.jsx("div",{className:"animate-pulse rounded-md bg-muted",style:{height:24,width:"30%",marginBottom:24}}),w.jsx("div",{className:"animate-pulse rounded-md bg-muted",style:{height:64,width:"60%",marginBottom:32}}),w.jsxs("div",{className:"paper-list",style:{display:"grid",gap:16},children:[w.jsx("div",{className:"animate-pulse rounded-md bg-muted",style:{height:96}}),w.jsx("div",{className:"animate-pulse rounded-md bg-muted",style:{height:96}}),w.jsx("div",{className:"animate-pulse rounded-md bg-muted",style:{height:96}})]})]}),qz=new dA({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:1}}}),Hz=()=>{const{arxivId:t}=_1();return w.jsx(To,{to:t?`/paper/${t}`:"/papers",replace:!0})},Wz=()=>{const{taskSlug:t}=_1();return w.jsx(To,{to:t?`/tasks/${t}`:"/tasks",replace:!0})},Q0=({element:t})=>jo()?w.jsx(To,{to:"/",replace:!0}):w.jsx(w.Fragment,{children:t}),Hk=({element:t})=>{const{user:e,isLoading:n}=om();return jo()?w.jsx(To,{to:"/",replace:!0}):n?w.jsx("div",{className:"page",children:w.jsx("div",{className:"submission-loading",children:w.jsx("span",{children:"Checking admin session..."})})}):e?e.is_admin?w.jsx(w.Fragment,{children:t}):w.jsx("div",{className:"page",children:w.jsxs("div",{className:"submission-empty submission-empty-warn",children:[w.jsx("h1",{children:"Admin access required"}),w.jsxs("p",{children:["Signed in as @",e.username,". This dashboard is limited to allowlisted admin accounts."]})]})}):w.jsx("div",{className:"page",children:w.jsxs("div",{className:"submission-empty submission-empty-warn",children:[w.jsx("h1",{children:"Sign in required"}),w.jsx("p",{children:"Sign in with an allowlisted Hugging Face admin account to view admin operations."}),w.jsx(hS,{returnTo:"/admin-dashboard"})]})})},Gz=()=>{const t=tL(),e=typeof window<"u"&&new URL(t,window.location.origin).origin!==window.location.origin;return R.useEffect(()=>{e&&window.location.replace(t)},[t,e]),e?w.jsx("div",{className:"page",children:w.jsxs("div",{className:"submission-loading",children:[w.jsx("span",{children:"Opening the production admin dashboard..."}),w.jsx("a",{href:t,children:"Continue"})]})}):w.jsx(Hk,{element:w.jsx(jz,{})})},Kz=()=>{const[t,e]=R.useState(!1),n=$n();return sz(),R.useLayoutEffect(()=>{var r;(r=document.getElementById("initial-discovery-footer"))==null||r.remove()},[]),R.useEffect(()=>{const r=s=>{(s.metaKey||s.ctrlKey)&&s.key==="k"&&(s.preventDefault(),e(!0))};return window.addEventListener("keydown",r),()=>window.removeEventListener("keydown",r)},[]),n.pathname==="/request-access"?w.jsx(R.Suspense,{fallback:w.jsx(ch,{}),children:w.jsx(Vz,{})}):n.pathname.startsWith("/pdf/")?w.jsxs("div",{className:"reader-route-shell",children:[w.jsx(D0,{onOpenSearch:()=>e(!0)}),w.jsx("div",{className:"reader-route-content",children:w.jsx(R.Suspense,{fallback:w.jsx(ch,{}),children:w.jsx(Y_,{children:w.jsx(ue,{path:"/pdf/:paperId",element:sL()?w.jsx(vz,{}):w.jsx(uh,{})})})})}),t&&w.jsx(R.Suspense,{fallback:null,children:w.jsx(K0,{open:t,onClose:()=>e(!1)})})]}):w.jsxs(w.Fragment,{children:[w.jsx(D0,{onOpenSearch:()=>e(!0)}),w.jsx("main",{children:w.jsx(R.Suspense,{fallback:w.jsx(ch,{}),children:w.jsxs(Y_,{children:[w.jsx(ue,{path:"/",element:w.jsx(cz,{})}),w.jsx(ue,{path:"/following",element:w.jsx(uz,{})}),w.jsx(ue,{path:"/chat/:sessionId?",element:al()?w.jsx(dz,{}):w.jsx(To,{to:"/",replace:!0})}),w.jsx(ue,{path:"/share/:shareId",element:al()?w.jsx(fz,{}):w.jsx(uh,{})}),w.jsx(ue,{path:"/papers",element:w.jsx(hz,{})}),w.jsx(ue,{path:"/papers/:arxivId",element:w.jsx(Hz,{})}),w.jsx(ue,{path:"/paper/:arxivId",element:w.jsx(pz,{})}),w.jsx(ue,{path:"/tasks",element:w.jsx(gz,{})}),w.jsx(ue,{path:"/tasks/:taskSlug",element:w.jsx(mz,{})}),w.jsx(ue,{path:"/task/:taskSlug",element:w.jsx(Wz,{})}),w.jsx(ue,{path:"/methods",element:w.jsx(yz,{})}),w.jsx(ue,{path:"/methods/:methodSlug",element:w.jsx(Tz,{})}),w.jsx(ue,{path:"/frameworks",element:w.jsx(_z,{})}),w.jsx(ue,{path:"/trends",element:w.jsx(wz,{})}),w.jsx(ue,{path:"/conferences",element:w.jsx(xz,{})}),w.jsx(ue,{path:"/ai-deadlines",element:w.jsx(bz,{})}),w.jsx(ue,{path:"/conferences/:confSlug",element:w.jsx(Ez,{})}),w.jsx(ue,{path:"/conferences/:confSlug/:taskSlug",element:w.jsx(Sz,{})}),w.jsx(ue,{path:"/organizations",element:w.jsx(Cz,{})}),w.jsx(ue,{path:"/orgs/:orgSlug",element:w.jsx(kz,{})}),w.jsx(ue,{path:"/orgs/:orgSlug/:taskSlug",element:w.jsx(Pz,{})}),w.jsx(ue,{path:"/authors/:authorId",element:w.jsx(Rz,{})}),w.jsx(ue,{path:"/benchmark/:datasetSlug",element:w.jsx(Iz,{})}),w.jsx(ue,{path:"/authorize-paper-edit/:authorizationId",element:w.jsx(lz,{})}),w.jsx(ue,{path:"/submit",element:w.jsx(Lz,{})}),w.jsx(ue,{path:"/saved",element:w.jsx(Q0,{element:w.jsx(Oz,{})})}),w.jsx(ue,{path:"/settings",element:w.jsx(Mz,{})}),w.jsx(ue,{path:"/privacy",element:w.jsx(Nz,{})}),w.jsx(ue,{path:"/docs/api",element:w.jsx(Az,{})}),w.jsx(ue,{path:"/mcp",element:w.jsx($z,{})}),w.jsx(ue,{path:"/admin-dashboard",element:w.jsx(Gz,{})}),w.jsx(ue,{path:"/autonomous-operations",element:w.jsx(Hk,{element:w.jsx(Fz,{})})}),w.jsx(ue,{path:"/cron-dashboard",element:w.jsx(To,{to:"/admin-dashboard",replace:!0})}),w.jsx(ue,{path:"/submissions",element:w.jsx(Q0,{element:w.jsx(Dz,{})})}),w.jsx(ue,{path:"/rate-limits",element:w.jsx(Bz,{})}),w.jsx(ue,{path:"/astra-for-robotics",element:w.jsx(Uz,{})}),w.jsx(ue,{path:"/:username",element:w.jsx(zz,{})}),w.jsx(ue,{path:"*",element:w.jsx(uh,{})})]})})}),w.jsx(ID,{}),t&&w.jsx(R.Suspense,{fallback:null,children:w.jsx(K0,{open:t,onClose:()=>e(!1)})})]})},Qz=()=>w.jsx(fA,{client:qz,children:w.jsx(kD,{children:w.jsx(oz,{children:w.jsxs(nz,{children:[w.jsx(az,{children:w.jsx(Kz,{})}),w.jsx(l3,{}),w.jsx(L3,{}),!1]})})})});NM();const Yz=w.jsx(MT,{attribute:"class",defaultTheme:"system",enableSystem:!0,disableTransitionOnChange:!0,storageKey:"pwc-theme",children:w.jsx(OM,{children:w.jsx(Qz,{})})}),Xz=_b(document.getElementById("root"));Xz.render(w.jsx(R.StrictMode,{children:Yz}));export{RS as $,sm as A,uC as B,nL as C,uD as D,Fg as E,R as F,G0 as G,hS as H,UF as I,jo as J,eL as K,Rn as L,sL as M,c4 as N,dD as O,er as P,fD as Q,BF as R,lk as S,a3 as T,lr as U,u4 as V,ED as W,cD as X,aL as Y,iw as Z,ce as _,om as a,_l as a0,eo as a1,pn as a2,Ug as a3,iv as a4,vS as a5,s3 as a6,G$ as a7,Q$ as a8,Y$ as a9,Wp as aA,Sn as aB,T1 as aC,qN as aD,HN as aE,Hp as aF,k1 as aG,oA as aH,QN as aI,Ct as aJ,r4 as aK,il as aL,lA as aM,i4 as aN,s4 as aO,P1 as aP,AS as aQ,$S as aR,LS as aS,To as aT,$0 as aU,X$ as aa,Es as ab,Z$ as ac,J$ as ad,l4 as ae,n4 as af,IF as ag,iC as ah,kd as ai,_d as aj,Q1 as ak,Ng as al,z1 as am,Mg as an,xl as ao,oC as ap,aC as aq,$n as ar,OT as as,Zz as at,CD as au,f4 as av,md as aw,ZN as ax,WN as ay,t4 as az,Rg as b,m4 as c,e4 as d,rL as e,d4 as f,Id as g,LD as h,al as i,w as j,w4 as k,aD as l,o4 as m,h4 as n,g4 as o,Re as p,yd as q,g as r,Xe as s,Z as t,_1 as u,EF as v,Ss as w,at as x,p4 as y,jS as z}; diff --git a/assets/index-DVmlmU_7.js b/assets/index-C0YS4OFr.js similarity index 72% rename from assets/index-DVmlmU_7.js rename to assets/index-C0YS4OFr.js index 8b4f6ecd792acc30f18a24161f17a78e3a2c0af5..270318c84a92f53693875df6a6cd7df4f1267809 100644 --- a/assets/index-DVmlmU_7.js +++ b/assets/index-C0YS4OFr.js @@ -1 +1 @@ -import{r as u}from"./index-CkeK0cDg.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-B7UoLEbn.js";function o(r){const e=u.useRef({value:r,previous:r});return u.useMemo(()=>(e.current.value!==r&&(e.current.previous=e.current.value,e.current.value=r),e.current.previous),[r])}export{o as u}; diff --git a/assets/index-DqQiSNg1.js b/assets/index-ClEBI70O.js similarity index 99% rename from assets/index-DqQiSNg1.js rename to assets/index-ClEBI70O.js index 8c07713527ef82dff863fd574401cc3be13824ea..6c13fc73d3f7968da61546ff6e0522d0afcb1ca8 100644 --- a/assets/index-DqQiSNg1.js +++ b/assets/index-ClEBI70O.js @@ -1,4 +1,4 @@ -import{c as ce,v as _e,o as E,u as I,e as Z,g as O,i as W,j as Oe,t as fe,E as je,k as J,l as M,q as A,r as Be,w as qe,f as S,x as H,y as We,m as P,z as T,A as $e}from"./index-B1_S53Hb.js";function re(e,n){const t=String(e);if(typeof n!="string")throw new TypeError("Expected character");let i=0,o=t.indexOf(n);for(;o!==-1;)i++,o=t.indexOf(n,o+n.length);return i}function He(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function Ue(e,n,t){const o=ce((t||{}).ignore||[]),a=Ve(n);let r=-1;for(;++r0?{type:"text",value:y}:void 0),y===!1?p.lastIndex=v+1:(m!==v&&w.push({type:"text",value:s.value.slice(m,v)}),Array.isArray(y)?w.push(...y):y&&w.push(y),m=v+d[0].length,k=!0),!p.global)break;d=p.exec(s.value)}return k?(m?\]}]+$/.exec(e);if(!n)return[e,void 0];e=e.slice(0,n.index);let t=n[0],i=t.indexOf(")");const o=re(e,"(");let a=re(e,")");for(;i!==-1&&o>a;)e+=t.slice(0,i+1),t=t.slice(i+1),i=t.indexOf(")"),a++;return[e,t]}function he(e,n){const t=e.input.charCodeAt(e.index-1);return(e.index===0||I(t)||Z(t))&&(!n||t!==47)}me.peek=pt;function ot(){this.buffer()}function at(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function ut(){this.buffer()}function st(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function ct(e){const n=this.resume(),t=this.stack[this.stack.length-1];E(t.type==="footnoteReference"),t.identifier=O(this.sliceSerialize(e)).toLowerCase(),t.label=n}function ft(e){this.exit(e)}function ht(e){const n=this.resume(),t=this.stack[this.stack.length-1];E(t.type==="footnoteDefinition"),t.identifier=O(this.sliceSerialize(e)).toLowerCase(),t.label=n}function mt(e){this.exit(e)}function pt(){return"["}function me(e,n,t,i){const o=t.createTracker(i);let a=o.move("[^");const r=t.enter("footnoteReference"),u=t.enter("reference");return a+=o.move(t.safe(t.associationId(e),{after:"]",before:a})),u(),r(),a+=o.move("]"),a}function gt(){return{enter:{gfmFootnoteCallString:ot,gfmFootnoteCall:at,gfmFootnoteDefinitionLabelString:ut,gfmFootnoteDefinition:st},exit:{gfmFootnoteCallString:ct,gfmFootnoteCall:ft,gfmFootnoteDefinitionLabelString:ht,gfmFootnoteDefinition:mt}}}function kt(e){let n=!1;return e&&e.firstLineBlank&&(n=!0),{handlers:{footnoteDefinition:t,footnoteReference:me},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function t(i,o,a,r){const u=a.createTracker(r);let l=u.move("[^");const s=a.enter("footnoteDefinition"),h=a.enter("label");return l+=u.move(a.safe(a.associationId(i),{before:l,after:"]"})),h(),l+=u.move("]:"),i.children&&i.children.length>0&&(u.shift(4),l+=u.move((n?` +import{c as ce,v as _e,o as E,u as I,e as Z,g as O,i as W,j as Oe,t as fe,E as je,k as J,l as M,q as A,r as Be,w as qe,f as S,x as H,y as We,m as P,z as T,A as $e}from"./index-tHVWANW1.js";function re(e,n){const t=String(e);if(typeof n!="string")throw new TypeError("Expected character");let i=0,o=t.indexOf(n);for(;o!==-1;)i++,o=t.indexOf(n,o+n.length);return i}function He(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function Ue(e,n,t){const o=ce((t||{}).ignore||[]),a=Ve(n);let r=-1;for(;++r0?{type:"text",value:y}:void 0),y===!1?p.lastIndex=v+1:(m!==v&&w.push({type:"text",value:s.value.slice(m,v)}),Array.isArray(y)?w.push(...y):y&&w.push(y),m=v+d[0].length,k=!0),!p.global)break;d=p.exec(s.value)}return k?(m?\]}]+$/.exec(e);if(!n)return[e,void 0];e=e.slice(0,n.index);let t=n[0],i=t.indexOf(")");const o=re(e,"(");let a=re(e,")");for(;i!==-1&&o>a;)e+=t.slice(0,i+1),t=t.slice(i+1),i=t.indexOf(")"),a++;return[e,t]}function he(e,n){const t=e.input.charCodeAt(e.index-1);return(e.index===0||I(t)||Z(t))&&(!n||t!==47)}me.peek=pt;function ot(){this.buffer()}function at(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function ut(){this.buffer()}function st(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function ct(e){const n=this.resume(),t=this.stack[this.stack.length-1];E(t.type==="footnoteReference"),t.identifier=O(this.sliceSerialize(e)).toLowerCase(),t.label=n}function ft(e){this.exit(e)}function ht(e){const n=this.resume(),t=this.stack[this.stack.length-1];E(t.type==="footnoteDefinition"),t.identifier=O(this.sliceSerialize(e)).toLowerCase(),t.label=n}function mt(e){this.exit(e)}function pt(){return"["}function me(e,n,t,i){const o=t.createTracker(i);let a=o.move("[^");const r=t.enter("footnoteReference"),u=t.enter("reference");return a+=o.move(t.safe(t.associationId(e),{after:"]",before:a})),u(),r(),a+=o.move("]"),a}function gt(){return{enter:{gfmFootnoteCallString:ot,gfmFootnoteCall:at,gfmFootnoteDefinitionLabelString:ut,gfmFootnoteDefinition:st},exit:{gfmFootnoteCallString:ct,gfmFootnoteCall:ft,gfmFootnoteDefinitionLabelString:ht,gfmFootnoteDefinition:mt}}}function kt(e){let n=!1;return e&&e.firstLineBlank&&(n=!0),{handlers:{footnoteDefinition:t,footnoteReference:me},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function t(i,o,a,r){const u=a.createTracker(r);let l=u.move("[^");const s=a.enter("footnoteDefinition"),h=a.enter("label");return l+=u.move(a.safe(a.associationId(i),{before:l,after:"]"})),h(),l+=u.move("]:"),i.children&&i.children.length>0&&(u.shift(4),l+=u.move((n?` `:" ")+a.indentLines(a.containerFlow(i,u.current()),n?pe:bt))),s(),l}}function bt(e,n,t){return n===0?e:pe(e,n,t)}function pe(e,n,t){return(t?"":" ")+e}const xt=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];ge.peek=vt;function wt(){return{canContainEols:["delete"],enter:{strikethrough:yt},exit:{strikethrough:Ct}}}function dt(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:xt}],handlers:{delete:ge}}}function yt(e){this.enter({type:"delete",children:[]},e)}function Ct(e){this.exit(e)}function ge(e,n,t,i){const o=t.createTracker(i),a=t.enter("strikethrough");let r=o.move("~~");return r+=t.containerPhrasing(e,{...o.current(),before:r,after:"~"}),r+=o.move("~~"),a(),r}function vt(){return"~"}function At(e){return e.length}function Dt(e,n){const t=n||{},i=(t.align||[]).concat(),o=t.stringLength||At,a=[],r=[],u=[],l=[];let s=0,h=-1;for(;++hs&&(s=e[h].length);++kl[k])&&(l[k]=d)}b.push(w)}r[h]=b,u[h]=x}let c=-1;if(typeof i=="object"&&"length"in i)for(;++cl[c]&&(l[c]=w),g[c]=w),p[c]=d}r.splice(1,0,p),u.splice(1,0,g),h=-1;const m=[];for(;++h "),a.shift(2);const r=t.indentLines(t.containerFlow(e,a.current()),Lt);return o(),r}function Lt(e,n,t){return">"+(t?"":" ")+e}function Tt(e,n){return le(e,n.inConstruct,!0)&&!le(e,n.notInConstruct,!1)}function le(e,n,t){if(typeof n=="string"&&(n=[n]),!n||n.length===0)return t;let i=-1;for(;++i:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.25rem * var(--tw-space-x-reverse));margin-left:calc(.25rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(1rem * var(--tw-space-x-reverse));margin-left:calc(1rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-1\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.375rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.375rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.25rem * var(--tw-space-y-reverse))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * var(--tw-space-y-reverse))}.justify-self-end{justify-self:end}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.overscroll-contain{overscroll-behavior:contain}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-sm{border-radius:calc(var(--radius) - 4px)}.\!border{border-width:1px!important}.border{border-width:1px}.border-2{border-width:2px}.border-b{border-bottom-width:1px}.border-t{border-top-width:1px}.border-dashed{border-style:dashed}.\!border-black{--tw-border-opacity: 1 !important;border-color:rgb(0 0 0 / var(--tw-border-opacity, 1))!important}.border-amber-200{--tw-border-opacity: 1;border-color:rgb(253 230 138 / var(--tw-border-opacity, 1))}.border-amber-500{--tw-border-opacity: 1;border-color:rgb(245 158 11 / var(--tw-border-opacity, 1))}.border-border{border-color:hsl(var(--border))}.border-destructive{border-color:hsl(var(--destructive))}.border-destructive\/40{border-color:hsl(var(--destructive) / .4)}.border-destructive\/50{border-color:hsl(var(--destructive) / .5)}.border-input{border-color:hsl(var(--input))}.border-primary{border-color:hsl(var(--primary))}.border-red-500{--tw-border-opacity: 1;border-color:rgb(239 68 68 / var(--tw-border-opacity, 1))}.border-transparent{border-color:transparent}.bg-accent{background-color:hsl(var(--accent-tw))}.bg-amber-100{--tw-bg-opacity: 1;background-color:rgb(254 243 199 / var(--tw-bg-opacity, 1))}.bg-amber-50{--tw-bg-opacity: 1;background-color:rgb(255 251 235 / var(--tw-bg-opacity, 1))}.bg-background{background-color:hsl(var(--background))}.bg-background\/80{background-color:hsl(var(--background) / .8)}.bg-black\/80{background-color:#000c}.bg-blue-100{--tw-bg-opacity: 1;background-color:rgb(219 234 254 / var(--tw-bg-opacity, 1))}.bg-border{background-color:hsl(var(--border))}.bg-card{background-color:hsl(var(--card))}.bg-destructive{background-color:hsl(var(--destructive))}.bg-destructive\/10{background-color:hsl(var(--destructive) / .1)}.bg-muted{background-color:hsl(var(--muted))}.bg-muted\/30{background-color:hsl(var(--muted) / .3)}.bg-muted\/40{background-color:hsl(var(--muted) / .4)}.bg-muted\/50{background-color:hsl(var(--muted) / .5)}.bg-popover{background-color:hsl(var(--popover))}.bg-primary{background-color:hsl(var(--primary))}.bg-red-50\/50{background-color:#fef2f280}.bg-secondary{background-color:hsl(var(--secondary))}.bg-transparent{background-color:transparent}.fill-current{fill:currentColor}.object-contain{-o-object-fit:contain;object-fit:contain}.p-0{padding:0}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-8{padding-left:2rem;padding-right:2rem}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-10{padding-top:2.5rem;padding-bottom:2.5rem}.py-12{padding-top:3rem;padding-bottom:3rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-5{padding-top:1.25rem;padding-bottom:1.25rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.py-8{padding-top:2rem;padding-bottom:2rem}.pb-2{padding-bottom:.5rem}.pb-4{padding-bottom:1rem}.pl-4{padding-left:1rem}.pl-5{padding-left:1.25rem}.pl-8{padding-left:2rem}.pl-9{padding-left:2.25rem}.pr-16{padding-right:4rem}.pr-2{padding-right:.5rem}.pr-9{padding-right:2.25rem}.pt-0{padding-top:0}.pt-2{padding-top:.5rem}.pt-6{padding-top:1.5rem}.text-left{text-align:left}.text-center{text-align:center}.align-top{vertical-align:top}.align-middle{vertical-align:middle}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-\[10px\]{font-size:10px}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.lowercase{text-transform:lowercase}.capitalize{text-transform:capitalize}.italic{font-style:italic}.leading-none{line-height:1}.leading-relaxed{line-height:1.625}.leading-snug{line-height:1.375}.leading-tight{line-height:1.25}.tracking-tight{letter-spacing:-.025em}.tracking-wide{letter-spacing:.025em}.tracking-widest{letter-spacing:.1em}.text-amber-900{--tw-text-opacity: 1;color:rgb(120 53 15 / var(--tw-text-opacity, 1))}.text-blue-900{--tw-text-opacity: 1;color:rgb(30 58 138 / var(--tw-text-opacity, 1))}.text-card-foreground{color:hsl(var(--card-foreground))}.text-current{color:currentColor}.text-destructive{color:hsl(var(--destructive))}.text-destructive-foreground{color:hsl(var(--destructive-foreground))}.text-foreground{color:hsl(var(--foreground))}.text-muted-foreground{color:hsl(var(--muted-foreground))}.text-popover-foreground{color:hsl(var(--popover-foreground))}.text-primary{color:hsl(var(--primary))}.text-primary-foreground{color:hsl(var(--primary-foreground))}.text-red-700{--tw-text-opacity: 1;color:rgb(185 28 28 / var(--tw-text-opacity, 1))}.text-secondary-foreground{color:hsl(var(--secondary-foreground))}.underline{text-decoration-line:underline}.underline-offset-2{text-underline-offset:2px}.underline-offset-4{text-underline-offset:4px}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-30{opacity:.3}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.opacity-90{opacity:.9}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.ring-0{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-offset-background{--tw-ring-offset-color: hsl(var(--background))}.blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.drop-shadow{--tw-drop-shadow: drop-shadow(0 1px 2px rgb(0 0 0 / .1)) drop-shadow(0 1px 1px rgb(0 0 0 / .06));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-200{transition-duration:.2s}@keyframes enter{0%{opacity:var(--tw-enter-opacity, 1);transform:translate3d(var(--tw-enter-translate-x, 0),var(--tw-enter-translate-y, 0),0) scale3d(var(--tw-enter-scale, 1),var(--tw-enter-scale, 1),var(--tw-enter-scale, 1)) rotate(var(--tw-enter-rotate, 0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity, 1);transform:translate3d(var(--tw-exit-translate-x, 0),var(--tw-exit-translate-y, 0),0) scale3d(var(--tw-exit-scale, 1),var(--tw-exit-scale, 1),var(--tw-exit-scale, 1)) rotate(var(--tw-exit-rotate, 0))}}.animate-in{animation-name:enter;animation-duration:.15s;--tw-enter-opacity: initial;--tw-enter-scale: initial;--tw-enter-rotate: initial;--tw-enter-translate-x: initial;--tw-enter-translate-y: initial}.fade-in-0{--tw-enter-opacity: 0}.zoom-in-95{--tw-enter-scale: .95}.duration-200{animation-duration:.2s}.\!running{animation-play-state:running!important}.running{animation-play-state:running}.paused{animation-play-state:paused}.file\:border-0::file-selector-button{border-width:0px}.file\:bg-transparent::file-selector-button{background-color:transparent}.file\:text-sm::file-selector-button{font-size:.875rem;line-height:1.25rem}.file\:font-medium::file-selector-button{font-weight:500}.file\:text-foreground::file-selector-button{color:hsl(var(--foreground))}.placeholder\:text-muted-foreground::-moz-placeholder{color:hsl(var(--muted-foreground))}.placeholder\:text-muted-foreground::placeholder{color:hsl(var(--muted-foreground))}.last\:mb-0:last-child{margin-bottom:0}.hover\:border-foreground\/50:hover{border-color:hsl(var(--foreground) / .5)}.hover\:bg-accent:hover{background-color:hsl(var(--accent-tw))}.hover\:bg-destructive\/80:hover{background-color:hsl(var(--destructive) / .8)}.hover\:bg-destructive\/90:hover{background-color:hsl(var(--destructive) / .9)}.hover\:bg-muted:hover{background-color:hsl(var(--muted))}.hover\:bg-muted\/50:hover{background-color:hsl(var(--muted) / .5)}.hover\:bg-primary\/80:hover{background-color:hsl(var(--primary) / .8)}.hover\:bg-primary\/90:hover{background-color:hsl(var(--primary) / .9)}.hover\:bg-secondary:hover{background-color:hsl(var(--secondary))}.hover\:bg-secondary\/80:hover{background-color:hsl(var(--secondary) / .8)}.hover\:text-accent-foreground:hover{color:hsl(var(--accent-foreground))}.hover\:text-destructive:hover{color:hsl(var(--destructive))}.hover\:text-foreground:hover{color:hsl(var(--foreground))}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-100:hover{opacity:1}.focus\:bg-accent:focus{background-color:hsl(var(--accent-tw))}.focus\:text-accent-foreground:focus{color:hsl(var(--accent-foreground))}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-ring:focus{--tw-ring-color: hsl(var(--ring))}.focus\:ring-offset-2:focus{--tw-ring-offset-width: 2px}.focus-visible\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\:ring-2:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-visible\:ring-ring:focus-visible{--tw-ring-color: hsl(var(--ring))}.focus-visible\:ring-offset-2:focus-visible{--tw-ring-offset-width: 2px}.focus-visible\:ring-offset-background:focus-visible{--tw-ring-offset-color: hsl(var(--background))}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-50:disabled{opacity:.5}.group.destructive .group-\[\.destructive\]\:border-muted\/40{border-color:hsl(var(--muted) / .4)}.group.toaster .group-\[\.toaster\]\:border-border{border-color:hsl(var(--border))}.group.toast .group-\[\.toast\]\:bg-muted{background-color:hsl(var(--muted))}.group.toast .group-\[\.toast\]\:bg-primary{background-color:hsl(var(--primary))}.group.toaster .group-\[\.toaster\]\:bg-background{background-color:hsl(var(--background))}.group.destructive .group-\[\.destructive\]\:text-destructive-foreground{color:hsl(var(--destructive-foreground))}.group.toast .group-\[\.toast\]\:text-muted-foreground{color:hsl(var(--muted-foreground))}.group.toast .group-\[\.toast\]\:text-primary-foreground{color:hsl(var(--primary-foreground))}.group.toaster .group-\[\.toaster\]\:text-foreground{color:hsl(var(--foreground))}.group.toaster .group-\[\.toaster\]\:shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.group.destructive .group-\[\.destructive\]\:hover\:border-destructive\/30:hover{border-color:hsl(var(--destructive) / .3)}.group.destructive .group-\[\.destructive\]\:hover\:bg-destructive:hover{background-color:hsl(var(--destructive))}.group.destructive .group-\[\.destructive\]\:hover\:bg-destructive-foreground\/10:hover{background-color:hsl(var(--destructive-foreground) / .1)}.group.destructive .group-\[\.destructive\]\:hover\:text-destructive-foreground:hover{color:hsl(var(--destructive-foreground))}.group.destructive .group-\[\.destructive\]\:focus\:ring-destructive:focus{--tw-ring-color: hsl(var(--destructive))}.group.destructive .group-\[\.destructive\]\:focus\:ring-destructive-foreground:focus{--tw-ring-color: hsl(var(--destructive-foreground))}.peer:disabled~.peer-disabled\:cursor-not-allowed{cursor:not-allowed}.peer:disabled~.peer-disabled\:opacity-70{opacity:.7}.data-\[disabled\=true\]\:pointer-events-none[data-disabled=true],.data-\[disabled\]\:pointer-events-none[data-disabled]{pointer-events:none}.data-\[state\=checked\]\:translate-x-5[data-state=checked]{--tw-translate-x: 1.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[state\=unchecked\]\:translate-x-0[data-state=unchecked],.data-\[swipe\=cancel\]\:translate-x-0[data-swipe=cancel]{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[swipe\=end\]\:translate-x-\[var\(--radix-toast-swipe-end-x\)\][data-swipe=end]{--tw-translate-x: var(--radix-toast-swipe-end-x);transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[swipe\=move\]\:translate-x-\[var\(--radix-toast-swipe-move-x\)\][data-swipe=move]{--tw-translate-x: var(--radix-toast-swipe-move-x);transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes accordion-up{0%{height:var(--radix-accordion-content-height)}to{height:0}}.data-\[state\=closed\]\:animate-accordion-up[data-state=closed]{animation:accordion-up .2s ease-out}@keyframes accordion-down{0%{height:0}to{height:var(--radix-accordion-content-height)}}.data-\[state\=open\]\:animate-accordion-down[data-state=open]{animation:accordion-down .2s ease-out}.data-\[selected\=\'true\'\]\:bg-accent[data-selected=true]{background-color:hsl(var(--accent-tw))}.data-\[state\=active\]\:bg-background[data-state=active]{background-color:hsl(var(--background))}.data-\[state\=checked\]\:\!bg-black[data-state=checked]{--tw-bg-opacity: 1 !important;background-color:rgb(0 0 0 / var(--tw-bg-opacity, 1))!important}.data-\[state\=checked\]\:bg-primary[data-state=checked]{background-color:hsl(var(--primary))}.data-\[state\=open\]\:bg-accent[data-state=open]{background-color:hsl(var(--accent-tw))}.data-\[state\=selected\]\:bg-muted[data-state=selected]{background-color:hsl(var(--muted))}.data-\[state\=unchecked\]\:bg-input[data-state=unchecked]{background-color:hsl(var(--input))}.data-\[selected\=true\]\:text-accent-foreground[data-selected=true]{color:hsl(var(--accent-foreground))}.data-\[state\=active\]\:text-foreground[data-state=active]{color:hsl(var(--foreground))}.data-\[state\=checked\]\:\!text-white[data-state=checked]{--tw-text-opacity: 1 !important;color:rgb(255 255 255 / var(--tw-text-opacity, 1))!important}.data-\[state\=open\]\:text-muted-foreground[data-state=open]{color:hsl(var(--muted-foreground))}.data-\[disabled\=true\]\:opacity-50[data-disabled=true],.data-\[disabled\]\:opacity-50[data-disabled]{opacity:.5}.data-\[state\=active\]\:shadow-sm[data-state=active]{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.data-\[swipe\=move\]\:transition-none[data-swipe=move]{transition-property:none}.data-\[state\=open\]\:animate-in[data-state=open]{animation-name:enter;animation-duration:.15s;--tw-enter-opacity: initial;--tw-enter-scale: initial;--tw-enter-rotate: initial;--tw-enter-translate-x: initial;--tw-enter-translate-y: initial}.data-\[state\=closed\]\:animate-out[data-state=closed],.data-\[swipe\=end\]\:animate-out[data-swipe=end]{animation-name:exit;animation-duration:.15s;--tw-exit-opacity: initial;--tw-exit-scale: initial;--tw-exit-rotate: initial;--tw-exit-translate-x: initial;--tw-exit-translate-y: initial}.data-\[state\=closed\]\:fade-out-0[data-state=closed]{--tw-exit-opacity: 0}.data-\[state\=closed\]\:fade-out-80[data-state=closed]{--tw-exit-opacity: .8}.data-\[state\=open\]\:fade-in-0[data-state=open]{--tw-enter-opacity: 0}.data-\[state\=closed\]\:zoom-out-95[data-state=closed]{--tw-exit-scale: .95}.data-\[state\=open\]\:zoom-in-95[data-state=open]{--tw-enter-scale: .95}.data-\[side\=bottom\]\:slide-in-from-top-2[data-side=bottom]{--tw-enter-translate-y: -.5rem}.data-\[side\=left\]\:slide-in-from-right-2[data-side=left]{--tw-enter-translate-x: .5rem}.data-\[side\=right\]\:slide-in-from-left-2[data-side=right]{--tw-enter-translate-x: -.5rem}.data-\[side\=top\]\:slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y: .5rem}.data-\[state\=closed\]\:slide-out-to-left-1\/2[data-state=closed]{--tw-exit-translate-x: -50%}.data-\[state\=closed\]\:slide-out-to-right-full[data-state=closed]{--tw-exit-translate-x: 100%}.data-\[state\=closed\]\:slide-out-to-top-\[48\%\][data-state=closed]{--tw-exit-translate-y: -48%}.data-\[state\=open\]\:slide-in-from-left-1\/2[data-state=open]{--tw-enter-translate-x: -50%}.data-\[state\=open\]\:slide-in-from-top-\[48\%\][data-state=open]{--tw-enter-translate-y: -48%}.data-\[state\=open\]\:slide-in-from-top-full[data-state=open]{--tw-enter-translate-y: -100%}.dark\:block:is(.dark *){display:block}.dark\:hidden:is(.dark *){display:none}.dark\:border-amber-900:is(.dark *){--tw-border-opacity: 1;border-color:rgb(120 53 15 / var(--tw-border-opacity, 1))}.dark\:border-destructive:is(.dark *){border-color:hsl(var(--destructive))}.dark\:bg-amber-950\/40:is(.dark *){background-color:#451a0366}.dark\:text-amber-100:is(.dark *){--tw-text-opacity: 1;color:rgb(254 243 199 / var(--tw-text-opacity, 1))}@media (min-width: 640px){.sm\:bottom-0{bottom:0}.sm\:right-0{right:0}.sm\:top-auto{top:auto}.sm\:mr-auto{margin-right:auto}.sm\:w-auto{width:auto}.sm\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.sm\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.sm\:flex-row{flex-direction:row}.sm\:flex-col{flex-direction:column}.sm\:justify-end{justify-content:flex-end}.sm\:space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.sm\:rounded-lg{border-radius:var(--radius)}.sm\:px-6{padding-left:1.5rem;padding-right:1.5rem}.sm\:text-left{text-align:left}.data-\[state\=open\]\:sm\:slide-in-from-bottom-full[data-state=open]{--tw-enter-translate-y: 100%}}@media (min-width: 768px){.md\:col-span-2{grid-column:span 2 / span 2}.md\:max-w-\[420px\]{max-width:420px}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.md\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.md\:grid-cols-\[1fr_1fr_auto\]{grid-template-columns:1fr 1fr auto}.md\:text-sm{font-size:.875rem;line-height:1.25rem}}@media (min-width: 1024px){.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.lg\:grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}.lg\:grid-cols-7{grid-template-columns:repeat(7,minmax(0,1fr))}.lg\:px-8{padding-left:2rem;padding-right:2rem}}@media (min-width: 1280px){.xl\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.xl\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}}.\[\&\:has\(\[role\=checkbox\]\)\]\:pr-0:has([role=checkbox]){padding-right:0}.\[\&\>svg\+div\]\:translate-y-\[-3px\]>svg+div{--tw-translate-y: -3px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.\[\&\>svg\]\:absolute>svg{position:absolute}.\[\&\>svg\]\:left-4>svg{left:1rem}.\[\&\>svg\]\:top-4>svg{top:1rem}.\[\&\>svg\]\:text-destructive>svg{color:hsl(var(--destructive))}.\[\&\>svg\]\:text-foreground>svg{color:hsl(var(--foreground))}.\[\&\>svg\~\*\]\:pl-7>svg~*{padding-left:1.75rem}.\[\&\>tr\]\:last\:border-b-0:last-child>tr{border-bottom-width:0px}.\[\&\[data-state\=open\]\>svg\]\:rotate-180[data-state=open]>svg{--tw-rotate: 180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.\[\&_\[cmdk-group-heading\]\]\:px-2 [cmdk-group-heading]{padding-left:.5rem;padding-right:.5rem}.\[\&_\[cmdk-group-heading\]\]\:py-1\.5 [cmdk-group-heading]{padding-top:.375rem;padding-bottom:.375rem}.\[\&_\[cmdk-group-heading\]\]\:text-xs [cmdk-group-heading]{font-size:.75rem;line-height:1rem}.\[\&_\[cmdk-group-heading\]\]\:font-medium [cmdk-group-heading]{font-weight:500}.\[\&_\[cmdk-group-heading\]\]\:text-muted-foreground [cmdk-group-heading]{color:hsl(var(--muted-foreground))}.\[\&_\[cmdk-group\]\:not\(\[hidden\]\)_\~\[cmdk-group\]\]\:pt-0 [cmdk-group]:not([hidden])~[cmdk-group]{padding-top:0}.\[\&_\[cmdk-group\]\]\:px-2 [cmdk-group]{padding-left:.5rem;padding-right:.5rem}.\[\&_\[cmdk-input-wrapper\]_svg\]\:h-5 [cmdk-input-wrapper] svg{height:1.25rem}.\[\&_\[cmdk-input-wrapper\]_svg\]\:w-5 [cmdk-input-wrapper] svg{width:1.25rem}.\[\&_\[cmdk-input\]\]\:h-12 [cmdk-input]{height:3rem}.\[\&_\[cmdk-item\]\]\:px-2 [cmdk-item]{padding-left:.5rem;padding-right:.5rem}.\[\&_\[cmdk-item\]\]\:py-3 [cmdk-item]{padding-top:.75rem;padding-bottom:.75rem}.\[\&_\[cmdk-item\]_svg\]\:h-5 [cmdk-item] svg{height:1.25rem}.\[\&_\[cmdk-item\]_svg\]\:w-5 [cmdk-item] svg{width:1.25rem}.\[\&_p\]\:leading-relaxed p{line-height:1.625}.\[\&_svg\]\:pointer-events-none svg{pointer-events:none}.\[\&_svg\]\:size-4 svg{width:1rem;height:1rem}.\[\&_svg\]\:shrink-0 svg{flex-shrink:0}.\[\&_tr\:last-child\]\:border-0 tr:last-child{border-width:0px}.\[\&_tr\]\:border-b tr{border-bottom-width:1px}:root{--bg: #FAF8F4;--bg-elevated: #FFFFFF;--bg-subtle: #F2EFE8;--ink: #1A1814;--ink-soft: #5A554C;--ink-faint: #8E8678;--hairline: #E4DFD4;--hairline-strong: #C8C2B3;--accent: oklch(.45 .08 250);--accent-soft: oklch(.92 .03 250);--accent-text: oklch(.35 .1 250);--warn: oklch(.55 .12 30);--positive-bg: oklch(.96 .03 145);--positive-text: oklch(.34 .1 145);--positive-border: oklch(.86 .06 145);--negative-bg: oklch(.96 .03 25);--negative-text: oklch(.4 .12 25);--negative-border: oklch(.86 .06 25);--highlight-bg: oklch(.97 .04 70);--highlight-text: oklch(.42 .1 60);--highlight-border: oklch(.85 .07 70);--info-bg: oklch(.97 .04 230);--info-text: oklch(.42 .1 240);--info-border: oklch(.86 .07 230);--trend-code: #33639E;--trend-hf: #AA7D24;--app-leading-column-width: 280px;--serif: "Newsreader", Georgia, serif;--sans: "Inter", -apple-system, sans-serif;--mono: "JetBrains Mono", ui-monospace, monospace;color-scheme:light}.dark{--bg: #11100E;--bg-elevated: #1A1815;--bg-subtle: #24211D;--ink: #F3EFE7;--ink-soft: #B9B2A6;--ink-faint: #989084;--hairline: #332F29;--hairline-strong: #514A40;--accent: oklch(.72 .09 250);--accent-soft: oklch(.28 .04 250);--accent-text: oklch(.8 .08 250);--warn: oklch(.72 .12 30);--positive-bg: oklch(.25 .035 145);--positive-text: oklch(.79 .1 145);--positive-border: oklch(.43 .06 145);--negative-bg: oklch(.25 .04 25);--negative-text: oklch(.79 .1 25);--negative-border: oklch(.43 .06 25);--highlight-bg: oklch(.27 .04 70);--highlight-text: oklch(.82 .1 70);--highlight-border: oklch(.46 .07 70);--info-bg: oklch(.25 .04 230);--info-text: oklch(.8 .08 235);--info-border: oklch(.43 .07 230);--trend-code: #5C8FD6;--trend-hf: #B3831F;color-scheme:dark}*{box-sizing:border-box;margin:0;padding:0}html,body{background:var(--bg);color:var(--ink);font-family:var(--sans);font-size:14px;line-height:1.5;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}a{color:inherit;text-decoration:none}button{font-family:inherit;cursor:pointer;border:none;background:none;color:inherit}.app-header{border-bottom:1px solid var(--hairline);background:var(--bg);position:sticky;top:0;z-index:50}.app-header-inner{max-width:calc(50vw + 640px);margin:0 auto;padding:18px 32px;display:flex;align-items:center;gap:24px;min-width:0}.site-announcement{position:relative;min-height:28px;padding:5px 52px 6px;border-top:1px solid var(--hairline);background:var(--bg-subtle);color:var(--ink-soft);font-size:12px;line-height:16px;text-align:center}.site-announcement a{color:var(--accent-text);font-weight:600;text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:2px}.site-announcement a:hover{color:var(--ink)}.site-announcement-close{position:absolute;top:50%;right:20px;display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;padding:0;border:0;border-radius:4px;background:transparent;color:var(--ink-soft);cursor:pointer;transform:translateY(-50%)}.site-announcement-close:hover{background:var(--hairline);color:var(--ink)}.site-announcement-close:focus-visible{outline:2px solid var(--accent-text);outline-offset:1px}.brand{display:flex;align-items:baseline;gap:10px;font-family:var(--serif);cursor:pointer}.brand-mark{width:22px;height:22px;background:var(--ink);position:relative;align-self:center;flex-shrink:0}.brand-mark:after{content:"";position:absolute;top:4px;left:4px;right:4px;bottom:4px;background:var(--bg)}.brand-mark:before{content:"";position:absolute;top:8px;left:8px;width:6px;height:6px;background:var(--ink);z-index:1}.brand-name{font-size:20px;font-weight:600;letter-spacing:-.02em;white-space:nowrap}.brand-name em{font-style:italic;font-weight:400;color:var(--ink-soft)}.nav{display:flex;gap:24px;margin-left:8px;flex-shrink:0;position:relative}@media (min-width: 901px){.app-header-inner{max-width:none;padding-left:0}.brand{width:var(--app-leading-column-width);flex:none;justify-content:center}.nav{margin-left:0}}@media (max-width: 1100px){.nav{gap:18px}.nav-item:nth-child(n+4){display:none}}@media (max-width: 920px){.search-trigger kbd{display:none}}.nav-item{font-size:13px;color:var(--ink-soft);padding:4px 0;transition:color .15s}.nav-indicator{position:absolute;bottom:0;left:0;height:1px;background:var(--ink);pointer-events:none;will-change:transform,width}.nav-indicator-ready{transition:transform .22s cubic-bezier(.4,0,.2,1),width .22s cubic-bezier(.4,0,.2,1),opacity .12s ease}.nav-item-with-badge{display:inline-flex;align-items:center;gap:5px}.nav-new-badge{display:inline-flex;align-items:center;min-height:17px;padding:1px 5px;border-radius:5px;background:#dfe7ff;color:#1458e8;font-size:9px;font-weight:700;line-height:1;letter-spacing:.02em;text-transform:uppercase}.nav-item:hover,.nav-item.active{color:var(--ink)}@media (prefers-reduced-motion: reduce){.nav-indicator-ready{transition:none}}.header-spacer{flex:1}.search-trigger{display:flex;align-items:center;gap:8px;padding:7px 12px;border:1px solid var(--hairline);border-radius:6px;background:var(--bg-elevated);font-size:13px;color:var(--ink-faint);width:240px;min-width:0;flex-shrink:1;transition:border-color .15s;overflow:hidden}.search-trigger>span:not(:first-child){white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}.search-trigger:hover{border-color:var(--hairline-strong)}.search-trigger kbd{margin-left:auto;font-family:var(--mono);font-size:11px;padding:1px 5px;border:1px solid var(--hairline);border-radius:3px;background:var(--bg-subtle);color:var(--ink-soft)}.icon-btn{width:32px;height:32px;display:flex;align-items:center;justify-content:center;border:1px solid var(--hairline);border-radius:6px;background:var(--bg-elevated);transition:border-color .15s}.icon-btn:hover{border-color:var(--hairline-strong)}.hf-signin-btn{display:inline-flex;align-items:center;gap:8px;max-width:100%;min-height:32px;padding:5px 12px;border:1px solid var(--hairline);border-radius:6px;background:var(--bg-elevated);font-size:13px;color:var(--ink);line-height:20px;white-space:normal;overflow-wrap:anywhere;transition:border-color .15s,background .15s}.hf-signin-btn>img{flex-shrink:0}.app-header .hf-signin-btn{flex-shrink:0;white-space:nowrap;overflow-wrap:normal}.hf-signin-btn:hover{border-color:var(--hairline-strong);background:var(--bg-subtle)}.user-avatar-btn{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;border:1px solid var(--hairline);border-radius:999px;background:var(--bg-elevated);padding:0;overflow:hidden;transition:border-color .15s}.user-avatar-btn:hover{border-color:var(--hairline-strong)}.user-avatar-btn:focus-visible{outline:2px solid var(--hairline-strong);outline-offset:2px}.page{max-width:calc(50vw + 640px);margin:0 auto;padding:32px}.site-footer{border-top:1px solid var(--hairline);color:var(--ink-faint);font-size:12px}.site-footer-inner{display:flex;flex-wrap:wrap;gap:14px;max-width:calc(50vw + 640px);margin:0 auto;padding:20px 32px 28px}.site-footer a{color:var(--ink-soft)}.site-footer a:hover{color:var(--ink)}.layout-with-sidebar{display:grid;grid-template-columns:220px 1fr;gap:48px;align-items:start}.sidebar{position:sticky;top:100px}.sidebar-section{margin-bottom:28px}.sidebar-label{font-family:var(--mono);font-size:10px;letter-spacing:.1em;text-transform:uppercase;color:var(--ink-faint);margin-bottom:12px}.sidebar-link{display:block;font-size:13px;color:var(--ink-soft);padding:5px 0;border-bottom:1px dotted transparent;transition:color .15s}.sidebar-link:hover{color:var(--ink)}.sidebar-link.active{color:var(--ink);font-weight:500}.sidebar-link .count{font-family:var(--mono);font-size:11px;color:var(--ink-faint);margin-left:6px}.breadcrumb{display:flex;align-items:center;gap:8px;font-family:var(--mono);font-size:11px;color:var(--ink-faint);margin-bottom:24px}.breadcrumb a{color:var(--ink-soft)}.breadcrumb a:hover{color:var(--ink)}.breadcrumb .sep{color:var(--hairline-strong)}.detail-title{font-family:var(--serif);font-size:38px;font-weight:500;line-height:1.15;letter-spacing:-.02em;margin-bottom:16px;text-wrap:balance}.detail-title-org{margin-left:.6em;font-family:var(--mono);font-size:13px;letter-spacing:0;color:var(--accent-text);white-space:nowrap}.detail-title-org--logo{display:inline-flex;align-items:center;justify-content:center;margin-left:.3em;font-size:inherit;width:.8em;height:.8em;border-radius:4px;overflow:hidden;vertical-align:-.05em}.detail-title-org--logo img{width:100%;height:100%;-o-object-fit:contain;object-fit:contain}.action-btn{display:inline-flex;align-items:center;gap:6px;padding:7px 12px;border:1px solid var(--hairline);border-radius:6px;background:var(--bg-elevated);font-size:12px;font-weight:500;color:var(--ink);transition:all .15s}.action-btn:hover{border-color:var(--ink)}.action-btn.primary{background:var(--ink);color:var(--bg);border-color:var(--ink)}.action-btn.primary:hover{background:color-mix(in oklch,var(--ink) 88%,var(--accent))}.no-results{padding:80px 0;text-align:center;font-family:var(--serif);color:var(--ink-faint);font-style:italic}.icon{width:14px;height:14px;flex-shrink:0}.icon-sm{width:11px;height:11px;flex-shrink:0}html{scroll-behavior:smooth}::-moz-selection{background:var(--accent-soft);color:var(--accent-text)}::selection{background:var(--accent-soft);color:var(--accent-text)}.mobile-menu-btn,.mobile-search-btn{display:none;width:36px;height:36px;align-items:center;justify-content:center;border-radius:4px;flex-shrink:0}.mobile-menu-btn:hover,.mobile-search-btn:hover{background:var(--bg-subtle)}.mobile-nav-drawer{position:fixed;top:0;right:0;bottom:0;left:0;background:#1a181466;z-index:100;display:flex;justify-content:flex-end}.mobile-nav-panel{width:min(320px,80vw);background:var(--bg-elevated);border-left:1px solid var(--hairline-strong);padding:16px 24px max(32px,env(safe-area-inset-bottom));display:flex;flex-direction:column;gap:4px;height:100%;min-height:0;overscroll-behavior-y:contain;overflow-y:auto;box-shadow:-8px 0 24px #0000000f}.mobile-nav-close{align-self:flex-end;min-width:44px;min-height:44px}.mobile-nav-link{flex-shrink:0;font-family:var(--serif);font-size:17px;padding:12px 4px;color:var(--ink);border-bottom:1px solid var(--hairline)}.mobile-nav-link-with-badge{display:flex;align-items:center;gap:6px}.mobile-nav-link.active{color:var(--accent-text);font-style:italic}.mobile-nav-search{display:flex;align-items:center;gap:10px;width:100%;font-family:var(--sans);font-size:14px;color:var(--ink-faint);background:var(--bg-subtle);border:1px solid var(--hairline);border-radius:6px;padding:10px 12px;margin-bottom:8px;text-align:left}.mobile-nav-search:hover{border-color:var(--hairline-strong);color:var(--ink)}@media (max-width: 880px){.nav,.search-trigger,.app-header .header-feedback-link{display:none}.mobile-menu-btn,.mobile-search-btn{display:inline-flex}}@media (max-width: 640px){.app-header-inner,.brand{gap:8px}.brand-mark{width:20px;height:20px}.brand-name{font-size:18px}.header-bookmark-btn{display:none}.app-header .hf-signin-btn{width:36px;height:36px;padding:0;gap:0;justify-content:center;flex-shrink:0}.app-header .hf-signin-btn>span{display:none}}@media (max-width: 880px){.app-header-inner{padding:14px 16px;gap:12px}.page{padding:24px 16px}.layout-with-sidebar{grid-template-columns:1fr;gap:24px}.layout-with-sidebar .sidebar{position:static;top:auto}.detail-title{font-size:28px}}@media (max-width: 640px){.app-header-inner{padding:12px 14px;gap:8px}.page{padding:20px 14px}.detail-title{font-size:24px}.brand-name{font-size:17px}}.access-request-page{min-height:100vh;min-height:100svh;display:grid;place-items:center;padding:32px 20px;background:radial-gradient(circle at 50% 8%,color-mix(in srgb,var(--accent-soft) 60%,transparent),transparent 42%),var(--bg)}.access-request-card{width:min(100%,470px);padding:38px;border:1px solid var(--hairline);border-radius:12px;background:color-mix(in srgb,var(--bg-elevated) 94%,transparent);box-shadow:0 20px 60px #1a181414}.access-request-brand{display:inline-flex;align-items:center;gap:10px;margin-bottom:42px;font-family:var(--serif)}.access-request-heading h1,.access-request-success h1{margin-bottom:12px;font-family:var(--serif);font-size:clamp(36px,8vw,48px);font-weight:500;line-height:1;letter-spacing:-.035em}.access-request-heading>p:last-child,.access-request-success p,.access-request-signin>p{color:var(--ink-soft);font-size:15px;line-height:1.65}.access-request-eyebrow{margin-bottom:10px;color:var(--accent-text);font-size:11px;font-weight:700;letter-spacing:.12em;text-transform:uppercase}.access-request-form,.access-request-signin{margin-top:30px}.access-request-form label{display:block;margin-bottom:8px;font-size:12px;font-weight:600}.access-request-input-wrap{display:flex;align-items:center;border:1px solid var(--hairline-strong);border-radius:7px;background:var(--bg);color:var(--ink-faint);transition:border-color .15s,box-shadow .15s}.access-request-input-wrap:focus-within{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-soft)}.access-request-input-wrap>span{padding-left:13px;font-size:15px}.access-request-input-wrap input{width:100%;padding:11px 13px 11px 3px;border:0;outline:0;background:transparent;color:var(--ink);font:500 14px var(--sans)}.access-request-verified{margin-top:7px;color:var(--ink-faint);font-size:11px}.access-request-submit{width:100%;margin-top:20px;padding:12px 18px;border-radius:7px;background:var(--ink);color:var(--bg);font-size:13px;font-weight:600;transition:opacity .15s,transform .15s}.access-request-submit:hover:not(:disabled){transform:translateY(-1px)}.access-request-submit:disabled{cursor:wait;opacity:.6}.access-request-error{margin-top:12px;color:var(--negative-text);font-size:12px}.access-request-status{margin-top:30px;color:var(--ink-soft)}.access-request-signin .hf-signin-btn{margin-top:18px}.access-request-success svg{margin-bottom:24px;color:var(--positive-text)}@media (max-width: 520px){.access-request-card{padding:28px 24px}.access-request-brand{margin-bottom:34px}}.legal-page{max-width:880px;padding-bottom:72px;color:var(--ink-soft);font-family:var(--sans);font-size:15px;line-height:1.7}.legal-header{margin-bottom:34px;padding-bottom:24px;border-bottom:1px solid var(--hairline)}.legal-kicker{margin:0 0 6px;color:var(--accent-text);font-size:11px;font-weight:700;letter-spacing:.1em;text-transform:uppercase}.legal-header h1{margin:0;color:var(--ink);font-family:var(--serif);font-size:clamp(38px,6vw,56px);font-weight:500;letter-spacing:-.025em;line-height:1.05}.legal-effective-date{margin:12px 0 0;color:var(--ink-faint)}.legal-page section{margin-top:34px}.legal-page h2{margin:0 0 10px;color:var(--ink);font-family:var(--serif);font-size:25px;font-weight:600;line-height:1.25}.legal-page h3{margin:22px 0 6px;color:var(--ink);font-size:15px;font-weight:700}.legal-page p{margin:0 0 14px}.legal-page ul{margin:8px 0 16px;padding-left:22px}.legal-page li{margin:7px 0}.legal-page a{color:var(--accent-text);text-decoration:underline}.legal-page strong{color:var(--ink)}.feed-header{display:flex;align-items:flex-end;justify-content:space-between;margin-bottom:32px;gap:24px;flex-wrap:wrap}.feed-title{font-family:var(--serif);font-size:44px;font-weight:500;letter-spacing:-.025em;line-height:1}.feed-title em{font-style:italic;font-weight:400;color:var(--accent)}.feed-subtitle{font-size:13px;color:var(--ink-soft);margin-top:8px;font-family:var(--serif);font-style:italic}.conference-deadlines-link{font-size:16px;color:var(--ink-soft);margin-top:12px}.trend-chart{margin:0;width:100%}.trend-chart-visual{position:relative;min-width:0}.trend-chart-table{margin-top:10px}.feedback-link{display:inline-flex;align-items:center;height:32px;padding:0 12px;border:1px solid var(--hairline);border-radius:6px;background:var(--bg-elevated);color:var(--ink-soft);font-size:13px;font-weight:500;white-space:nowrap;transition:border-color .15s,color .15s,background .15s}.feedback-link:hover{border-color:var(--hairline-strong);background:var(--bg-subtle);color:var(--ink)}.period-switch{display:flex;align-items:center;gap:2px;background:var(--bg-elevated);border:1px solid var(--hairline);border-radius:6px;padding:3px}.period-btn{padding:5px 12px;font-size:12px;font-weight:500;color:var(--ink-soft);border-radius:4px;transition:all .15s}.period-btn.active{background:var(--ink);color:var(--bg)}.period-btn:not(.active):hover{background:var(--bg-subtle);color:var(--ink)}.date-nav{display:flex;align-items:center;gap:12px;font-family:var(--mono);font-size:12px;color:var(--ink-soft)}.date-nav button{width:26px;height:26px;border:1px solid var(--hairline);border-radius:4px;display:flex;align-items:center;justify-content:center;background:var(--bg-elevated)}.date-nav button:hover{background:var(--bg-subtle)}.paper-list{display:flex;flex-direction:column}.paper-card{display:grid;grid-template-columns:170px 1fr;gap:28px;padding:24px 0;border-bottom:1px solid var(--hairline);align-items:stretch}.paper-thumb-wrap{transition:transform .15s;display:flex;align-items:flex-end;justify-content:flex-start}.paper-thumb-wrap:hover{transform:translateY(-2px)}.paper-thumb-skeleton{width:160px;height:220px}.paper-card:first-child{padding-top:0}.paper-rank{font-family:var(--serif);font-size:32px;font-weight:500;color:var(--ink-faint);font-feature-settings:"tnum";line-height:.9;font-style:italic}.paper-body{min-width:0;display:flex;align-items:stretch;gap:28px}.paper-body-main{min-width:0;flex:1}.paper-resources{display:flex;flex-direction:column;justify-content:center;align-items:center;gap:18px;flex:0 0 auto;width:92px;border-left:1px solid var(--hairline);padding-left:20px}.paper-resource{display:flex;flex-direction:column;align-items:center;gap:4px;color:inherit}a.paper-resource.is-link{text-decoration:none;cursor:pointer;border-radius:4px;transition:transform .15s}a.paper-resource.is-link:hover{transform:translateY(-1px)}a.paper-resource.is-link:hover .resource-value{text-decoration:underline;text-underline-offset:2px}a.paper-resource.is-link:focus-visible{outline:2px solid var(--ink);outline-offset:2px}.paper-resource .resource-stat{display:flex;flex-direction:column;align-items:center;gap:2px}.paper-resource .resource-value{display:inline-flex;align-items:center;gap:3px;font-family:var(--mono);font-size:14px;color:var(--ink);font-weight:500;font-variant-numeric:tabular-nums;letter-spacing:-.01em}.paper-resource .resource-label{font-family:var(--mono);font-size:10px;letter-spacing:.06em;text-transform:uppercase;color:var(--ink-faint)}.paper-resource .gh-rate-arrow{color:var(--accent-text);font-size:13px;transform:translateY(-.5px)}.paper-meta-line{display:flex;align-items:center;gap:12px;font-family:var(--mono);font-size:11px;color:var(--ink-faint);margin-bottom:6px}.paper-meta-line .sep{color:var(--hairline-strong)}.paper-title{font-family:var(--serif);font-size:22px;font-weight:500;line-height:1.2;letter-spacing:-.015em;margin-bottom:6px;color:var(--ink);cursor:pointer;text-wrap:pretty}.paper-title:hover{color:var(--accent-text)}.paper-organization-logos{display:inline-flex;align-items:center;gap:4px;margin-left:7px;vertical-align:-4px}.paper-organization-logo{display:inline-grid;width:24px;height:24px;flex:0 0 24px;place-items:center;overflow:hidden;border:1px solid var(--hairline);border-radius:4px;background:var(--bg)}.paper-organization-logo:hover{border-color:var(--hairline-strong)}.paper-organization-logo img{width:100%;height:100%;padding:2px;-o-object-fit:contain;object-fit:contain}.paper-authors{font-size:13px;color:var(--ink-soft);margin-bottom:10px;font-family:var(--serif)}.paper-card-author-avatar{width:16px;height:16px;margin-right:4px;vertical-align:-3px}.paper-authors a{color:inherit;text-decoration:none}.paper-authors a:hover{color:var(--accent-text);text-decoration:underline;text-underline-offset:2px}.paper-abstract{font-size:13.5px;color:var(--ink-soft);line-height:1.55;max-height:4.65em;margin-bottom:12px;font-family:var(--serif);text-wrap:pretty;display:-webkit-box;line-clamp:3;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}.paper-title mark,.paper-abstract mark{background:color-mix(in srgb,var(--accent) 24%,transparent);color:inherit;border-radius:2px;padding:0 1px}.search-results-end{padding:24px 0;text-align:center;color:var(--ink-faint);font:11px var(--mono)}.paper-tags{display:flex;flex-wrap:wrap;gap:6px}.paper-tags--clamped{--tag-row-height: 26px;max-height:calc(var(--tag-row-height) * 2 + 6px);overflow:hidden}.paper-sota{position:relative;white-space:nowrap;overflow:hidden;margin-bottom:12px;font-family:var(--mono);font-size:12px;line-height:1.6}.paper-sota-stack{margin-top:16px;padding-top:16px;border-top:1px solid var(--hairline)}.paper-sota-stack .paper-sota{margin-bottom:4px}.paper-sota-stack .paper-sota:last-child{margin-bottom:0}.paper-sota-measure{position:absolute;left:-9999px;top:0;visibility:hidden;white-space:pre;pointer-events:none}.paper-sota-label{font-weight:500;color:var(--ink-faint)}.paper-sota-label--sota{color:#b8860b}.paper-sota-sep,.paper-sota-on{color:var(--ink-faint)}.paper-sota-name{color:var(--accent-text)}.paper-sota-name:hover{text-decoration:underline}.paper-sota-more{font-size:11px;color:var(--ink-faint);cursor:pointer}.paper-sota-more:hover{color:var(--accent-text);text-decoration:underline}.paper-stats{display:flex;flex-direction:column;align-items:flex-end;gap:8px;font-family:var(--mono);font-size:11px;color:var(--ink-soft)}.upvote-btn{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:8px 14px;border:1px solid var(--hairline);border-radius:6px;background:var(--bg-elevated);font-family:var(--mono);font-size:13px;font-weight:500;min-width:56px;transition:all .15s}.upvote-btn:hover{border-color:var(--ink)}.upvote-btn.upvoted{background:var(--accent-soft);border-color:var(--accent);color:var(--accent-text)}.upvote-btn .arrow{font-size:9px;line-height:1;margin-bottom:2px}.upvote-btn .count{font-feature-settings:"tnum"}.stat-line{display:flex;align-items:center;gap:5px}.sort-bar{display:flex;align-items:center;justify-content:space-between;padding-bottom:16px;border-bottom:1px solid var(--hairline);margin-bottom:16px}.sort-options{display:flex;gap:4px}.sort-btn{padding:4px 10px;font-family:var(--mono);font-size:11px;font-weight:500;letter-spacing:.02em;color:var(--ink-soft);border-radius:4px;transition:all .15s;text-transform:lowercase}.sort-btn.active{background:var(--ink);color:var(--bg)}.sort-btn:not(.active):hover{background:var(--bg-subtle);color:var(--ink)}.paper-feed-toolbar-controls,.paper-feed-resource-controls,.paper-feed-filter-options{display:flex;align-items:center}.paper-feed-toolbar-controls{gap:14px;flex-wrap:wrap}.paper-feed-resource-controls{gap:10px}.paper-feed-resource-divider{width:1px;height:22px;background:var(--hairline)}.paper-feed-filter-options{gap:6px;flex-wrap:wrap}.paper-feed-filter{display:inline-flex;align-items:center;gap:6px;min-height:30px;padding:5px 10px;border:1px solid var(--hairline);border-radius:999px;background:var(--bg);color:var(--ink-soft);font-family:var(--mono);font-size:11px;letter-spacing:.01em;cursor:pointer;transition:border-color .15s,background .15s,color .15s}.paper-feed-filter-content{display:inline-flex;align-items:center;gap:6px}.paper-feed-filter:hover{border-color:var(--ink-faint);color:var(--ink)}.paper-feed-filter.active{border-color:var(--ink);background:var(--ink);color:var(--bg)}.paper-feed-filter:focus-visible{outline:2px solid var(--ink);outline-offset:2px}.paper-feed-filter-icon{display:inline-flex;color:currentColor;filter:grayscale(1)}.hf-resource-logo{position:relative;display:inline-flex;width:15px;height:15px}.hf-resource-logo img{position:absolute;top:0;right:0;bottom:0;left:0;display:block;width:15px;height:15px}.hf-resource-logo-white,.paper-feed-filter.active .hf-resource-logo-black{visibility:hidden}.paper-feed-filter.active .hf-resource-logo-white{visibility:visible}.paper-feed-filter-check{display:inline-flex;align-items:center;justify-content:center;width:17px;height:17px;border-radius:50%;background:color-mix(in srgb,var(--bg) 18%,transparent);color:currentColor;font-size:10px;line-height:1}.home-feed-sort-bar{flex-wrap:wrap;row-gap:10px}.results-count{font-family:var(--mono);font-size:11px;color:var(--ink-faint)}.paper-feed-scope-links{margin-top:12px;display:flex;flex-direction:column;align-items:flex-start;gap:8px}.paper-feed-primary-links,.paper-feed-task-tags{display:flex;flex-wrap:wrap;align-items:center;gap:10px}.papers-feed-layout-scoped{display:block}.paper-thumb{display:none}.papers-search-row{display:flex;margin-top:12px;margin-bottom:24px}.papers-search-input-wrap{display:flex;align-items:center;gap:8px;border:1px solid var(--hairline-strong);background:var(--bg-elevated);padding:10px 14px;border-radius:4px;flex:1;max-width:600px;color:var(--ink-faint)}.papers-search-input-wrap:focus-within{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-soft)}.papers-search-input{flex:1;border:none;outline:none;background:transparent;font-family:var(--sans);font-size:14px;color:var(--ink)}.papers-search-input::-moz-placeholder{color:var(--ink-faint)}.papers-search-input::placeholder{color:var(--ink-faint)}@media (max-width: 880px){.feed-title{font-size:32px}.paper-card{grid-template-columns:120px 1fr;gap:16px;padding:20px 0}.paper-body{flex-direction:column;align-items:stretch;gap:12px}.paper-resources{width:auto;flex-direction:row;align-items:center;justify-content:flex-start;gap:24px;border-left:none;border-top:1px solid var(--hairline);padding-left:0;padding-top:12px}.paper-resource{flex-direction:row;gap:8px}.paper-resource .resource-stat{align-items:flex-start}}@media (min-width: 641px) and (max-width: 880px){.paper-thumb-wrap{min-width:0}.paper-thumb-wrap>div{width:100%!important;max-width:120px;height:auto!important;aspect-ratio:160 / 220}.paper-thumb-wrap>div>img,.paper-thumb-wrap>div>svg{width:100%!important;height:100%!important}.paper-thumb-skeleton{width:100%;max-width:120px;height:auto;aspect-ratio:160 / 220}}@media (max-width: 640px){.feed-header{margin-bottom:24px;gap:16px}.feed-title{font-size:26px}.paper-card{grid-template-columns:1fr;gap:12px}.paper-resources{border-top:none;padding-top:0}.paper-thumb-wrap{align-self:flex-start}.paper-title{font-size:19px}.paper-abstract{max-height:6.2em;-webkit-line-clamp:4;line-clamp:4}}.sort-options-time{margin-left:auto}.sort-btn-time{text-transform:none}@media (max-width: 900px){.sort-bar{flex-wrap:wrap;gap:8px}.sort-options-time{margin-left:0}}@media (max-width: 560px){.paper-feed-resource-divider{display:none}.paper-feed-resource-controls{gap:0}}.paper-date-filter{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:4px}.paper-date-popover{width:min(760px,calc(100vw - 32px));max-width:760px;padding:14px 18px;max-height:calc(100vh - 24px);overflow-y:auto}.paper-date-popover-header{margin-bottom:8px}.paper-date-popover-header h2{margin:0;font-family:var(--serif);font-size:21px}.paper-date-popover-header p{margin:5px 0 0;color:var(--ink-soft)}.paper-date-navigation{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:36px;margin-bottom:-38px;pointer-events:none;position:relative;z-index:1}.paper-date-navigation-group{display:flex;justify-content:space-between}.paper-date-navigation button{pointer-events:auto}.paper-date-navigation button,.paper-date-actions button{border:1px solid var(--hairline);border-radius:6px;background:var(--bg-elevated);color:var(--ink);padding:7px 11px;font:inherit;cursor:pointer}.paper-date-calendars{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:36px}.paper-date-year{display:flex;align-items:center;justify-content:center;gap:8px;margin-bottom:6px;color:var(--ink-soft);font-size:13px;font-weight:600}.paper-date-year input{width:5.5rem;border:1px solid var(--hairline);border-radius:5px;background:var(--bg-elevated);color:var(--ink);padding:5px 7px;font:inherit}.paper-date-year input:focus-visible{outline:2px solid var(--accent);outline-offset:1px}.paper-date-calendar h3{margin:0 0 10px;text-align:center;font-family:var(--serif);font-size:17px}.paper-date-weekdays,.paper-date-days{display:grid;grid-template-columns:repeat(7,minmax(0,1fr))}.paper-date-weekdays span{padding:3px 0 4px;color:var(--ink-faint);text-align:center;font-size:11px;font-weight:600}.paper-date-day{width:28px;height:28px;justify-self:center;border:0;border-radius:999px;background:transparent;color:var(--ink);font:inherit;cursor:pointer}.paper-date-day:hover:not(:disabled),.paper-date-day:focus-visible{background:var(--bg-subtle);outline:2px solid var(--accent);outline-offset:-2px}.paper-date-day.in-range{border-radius:0;background:color-mix(in srgb,var(--accent) 14%,transparent)}.paper-date-day.selected{background:var(--accent);color:#fff;font-weight:700}.paper-date-day.today:not(.selected){box-shadow:inset 0 0 0 1px var(--accent)}.paper-date-day:disabled{color:var(--ink-faint);cursor:not-allowed;opacity:.42}.paper-date-day.outside{visibility:hidden}.paper-date-actions{display:flex;align-items:center;justify-content:space-between;gap:12px;padding-top:10px;border-top:1px solid var(--hairline)}.paper-date-actions>div{display:flex;gap:8px}.paper-date-actions .paper-date-clear{border-color:transparent;color:var(--ink-soft)}.paper-date-actions .paper-date-apply{border-color:var(--accent);background:var(--accent);color:#fff}.paper-date-actions button:disabled{cursor:not-allowed;opacity:.45}.paper-date-filter-single-calendar{justify-content:flex-start}.paper-date-popover-single-calendar{width:calc(100vw - 20px);padding:20px 14px}.paper-date-popover-single-calendar .paper-date-calendars,.paper-date-popover-single-calendar .paper-date-navigation{display:block}.paper-date-popover-single-calendar .paper-date-day{width:36px;height:36px}.organization-hero{display:grid;grid-template-columns:minmax(260px,.34fr) minmax(0,1fr);align-items:center;gap:48px;margin:24px 0 32px}.organization-hero-profile{min-width:0}.organization-hero-title{display:flex;align-items:center;gap:14px}.organization-hero-title img{flex:none;-o-object-fit:contain;object-fit:contain}.organization-hero-links{display:flex;flex-wrap:wrap;gap:12px;margin-top:12px}.organization-contributions{width:100%;min-width:0}.organization-contributions-header{margin-bottom:12px}.organization-contributions-title{font-family:var(--serif);font-size:20px;font-weight:600;line-height:1.2}.organization-contributions-summary{margin-top:3px;color:var(--ink-soft);font-size:12px}.organization-contributions-legend{display:flex;align-items:center;justify-content:flex-start;gap:4px;margin-top:8px;color:var(--ink-faint);font-family:var(--mono);font-size:10px;white-space:nowrap}.organization-contributions-legend span:first-child{margin-right:3px}.organization-contributions-legend span:last-child{margin-left:3px}.organization-contributions-scroll{width:calc(100% + 34px);max-width:none;margin-left:-34px;overflow-x:auto;padding:2px 0;scrollbar-width:thin;scrollbar-color:var(--hairline-strong) transparent}.organization-contributions-plot{display:grid;grid-template-columns:25px auto;gap:9px;margin:0}.organization-contributions-weekdays{display:grid;grid-template-rows:repeat(7,12px);gap:3px;padding-top:24px;color:var(--ink-faint);font-family:var(--mono);font-size:9px;line-height:12px;text-align:right}.organization-contributions-months{display:grid;gap:3px;height:20px;color:var(--ink-faint);font-family:var(--mono);font-size:9px;line-height:12px}.organization-contributions-months span{grid-row:1;white-space:nowrap}.organization-contributions-grid{display:grid;grid-template-rows:repeat(7,12px);grid-auto-flow:column;gap:3px}.organization-contribution-cell{display:block;width:12px;height:12px;border:1px solid color-mix(in srgb,var(--hairline) 78%,transparent);border-radius:2px;background:var(--bg-subtle)}.organization-contribution-cell.level-1{border-color:color-mix(in srgb,var(--positive-border) 60%,transparent);background:color-mix(in srgb,var(--positive-bg) 65%,var(--positive-border))}.organization-contribution-cell.level-2{border-color:transparent;background:color-mix(in srgb,var(--positive-text) 35%,var(--positive-bg))}.organization-contribution-cell.level-3{border-color:transparent;background:color-mix(in srgb,var(--positive-text) 60%,var(--positive-bg))}.organization-contribution-cell.level-4{border-color:transparent;background:var(--positive-text)}.organization-contribution-cell.is-outside{visibility:hidden}.organization-contributions-skeleton{width:100%;height:154px;border-radius:6px}@media (max-width: 960px){.organization-hero{grid-template-columns:1fr;align-items:start;gap:28px}.organization-contributions-plot{margin:0 auto}.organization-contributions-scroll{width:100%;max-width:100%;margin-left:0}.organization-contributions-legend{justify-content:center;width:min(100%,826px);margin:8px auto 0}}@media (max-width: 640px){.organization-hero{margin-bottom:28px}.organization-contributions{max-width:calc(100vw - 28px)}}.author-hero{margin:8px 0 20px}.author-hero-title{display:flex;align-items:center;gap:20px}.author-avatar{display:block;width:96px;height:96px}@media (max-width: 640px){.author-avatar{width:64px;height:64px}}.author-hero .feed-subtitle a{color:var(--accent-text);text-decoration:none}.author-hero .feed-subtitle a:hover{text-decoration:underline;text-underline-offset:2px}.tag-chip{display:inline-flex;align-items:center;gap:5px;padding:3px 9px;font-family:var(--mono);font-size:11px;font-weight:500;border-radius:4px;cursor:pointer;transition:filter .15s,transform .15s;white-space:nowrap;border:1px solid transparent}.tag-chip:hover{filter:brightness(.96);transform:translateY(-1px)}.tag-chip .dot{width:5px;height:5px;border-radius:50%}.paper-tags--clamped .tag-chip{line-height:16px}.tag-hero{padding:48px 0 32px;border-bottom:1px solid var(--hairline);margin-bottom:32px}.tag-hero-eyebrow{font-family:var(--mono);font-size:11px;letter-spacing:.12em;text-transform:uppercase;color:var(--ink-faint);margin-bottom:12px;display:flex;align-items:center;gap:8px}.tag-hero-title{font-family:var(--serif);font-size:56px;font-weight:500;letter-spacing:-.025em;line-height:1;margin-bottom:16px;overflow-wrap:break-word}.tag-hero-meta{display:flex;gap:32px;margin-top:24px;font-family:var(--mono);font-size:12px;color:var(--ink-soft)}.tag-hero-meta .stat{display:flex;flex-direction:column;gap:4px}.tag-hero-meta .stat .label{font-size:10px;letter-spacing:.1em;text-transform:uppercase;color:var(--ink-faint)}.tag-hero-meta .stat .value{font-family:var(--serif);font-size:22px;font-weight:500;color:var(--ink)}.tag-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:0;border-top:1px solid var(--hairline)}.tag-cell{padding:20px 24px;border-bottom:1px solid var(--hairline);border-right:1px solid var(--hairline);cursor:pointer;transition:background .15s;display:flex;flex-direction:column;gap:8px}.tag-cell:nth-child(3n){border-right:none}.tag-cell:hover{background:var(--bg-elevated)}.tag-cell .name{font-family:var(--serif);font-size:18px;font-weight:500;display:flex;align-items:center;gap:8px}.tag-cell .name .dot{width:8px;height:8px;border-radius:50%}.tag-cell .meta{font-family:var(--mono);font-size:11px;color:var(--ink-faint);display:flex;gap:12px}.taxonomy-trending{margin-bottom:48px;scroll-margin-top:80px}.taxonomy-trending-header{padding-bottom:12px;border-bottom:1px solid var(--hairline-strong)}.taxonomy-trending-header h2{display:flex;align-items:center;gap:10px;margin-bottom:4px;font-family:var(--serif);font-size:26px;font-weight:500;letter-spacing:-.02em}.taxonomy-trending-header h2 svg{color:var(--accent-text)}.taxonomy-trending-note{margin:0;font-family:var(--serif);font-style:italic;font-size:13px;color:var(--ink-soft)}.taxonomy-trending-rank{min-width:1.6em;font-family:var(--mono);font-size:11px;font-style:normal;color:var(--ink-faint)}.taxonomy-trending-meta{flex-wrap:wrap}.taxonomy-trending-lift{display:inline-flex;align-items:center;gap:3px}.tag-hero-meta .stat .value small{margin-left:2px;font-family:var(--mono);font-size:10px;font-weight:500;color:var(--ink-faint)}.framework-category{margin-top:32px}.framework-category-head{display:flex;align-items:flex-start;justify-content:space-between;gap:24px;margin-bottom:16px}.framework-category-blurb{font-family:var(--serif);font-size:14px;line-height:1.55;color:var(--ink-soft);max-width:720px;margin:0}.framework-category-meta{font-family:var(--mono);font-size:11px;color:var(--ink-faint);white-space:nowrap}.framework-guide-link{display:inline-block;margin-top:8px;font-family:var(--mono);font-size:11px;color:var(--accent-text);text-decoration:none}.framework-guide-link:hover{text-decoration:underline}.framework-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:14px}.framework-card{border:1px solid var(--hairline);background:var(--bg-elevated);border-radius:6px;padding:18px 22px;scroll-margin-top:24px;display:flex;flex-direction:column;gap:12px;transition:border-color .15s}.framework-card:hover{border-color:var(--ink)}.framework-card-clickable{cursor:pointer}.framework-card-clickable:focus-visible{border-color:var(--ink);outline:2px solid var(--accent);outline-offset:2px}.framework-card-head{display:flex;justify-content:space-between;align-items:flex-start;gap:16px}.framework-card-name{font-family:var(--serif);font-size:20px;font-weight:500;letter-spacing:-.01em;margin:0;color:var(--ink)}.framework-card-org{font-family:var(--mono);font-size:11px;color:var(--ink-faint);margin-top:4px}.framework-platform-row{display:flex;flex-wrap:wrap;gap:6px;justify-content:flex-end}.framework-platform-chip{font-family:var(--mono);font-size:10px;letter-spacing:.03em;text-transform:uppercase;padding:3px 8px;border-radius:3px;white-space:nowrap}.framework-card-desc{font-family:var(--sans);font-size:14px;line-height:1.55;color:var(--ink-soft);margin:0}.framework-card-when{font-family:var(--serif);font-style:italic;font-size:13px;line-height:1.5;color:var(--ink-soft);padding-top:4px;border-top:1px solid var(--hairline)}.framework-card-when-label{display:block;font-family:var(--mono);font-size:10px;font-style:normal;letter-spacing:.06em;text-transform:uppercase;color:var(--ink-faint);margin-bottom:4px}.framework-card-links{display:flex;flex-wrap:wrap;gap:10px;margin-top:auto}.framework-link{display:inline-flex;align-items:center;gap:6px;font-family:var(--mono);font-size:11px;color:var(--accent-text);text-decoration:none;padding:4px 10px;border:1px solid var(--hairline);border-radius:4px;transition:border-color .15s,background .15s}.framework-link:hover{border-color:var(--ink);background:var(--bg-subtle)}.framework-link-disabled,.framework-link-disabled:hover{color:var(--ink-faint);background:transparent;border-color:var(--hairline);cursor:not-allowed}@media (max-width: 880px){.tag-grid{grid-template-columns:repeat(2,1fr)}.tag-cell:nth-child(3n){border-right:1px solid var(--hairline)}.tag-cell:nth-child(2n){border-right:none}.framework-category-head{flex-direction:column;gap:8px}.framework-card-head{flex-direction:column;gap:10px}.framework-platform-row{justify-content:flex-start}.tag-hero-title{font-size:40px}}@media (max-width: 640px){.tag-hero{padding:32px 0 24px;margin-bottom:24px}.tag-hero-title{font-size:30px}.tag-grid{grid-template-columns:1fr}.tag-cell{padding:16px;border-right:none!important}.framework-grid{grid-template-columns:1fr}.tag-hero-meta{gap:20px;flex-wrap:wrap}}.task-hero-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(320px,480px);gap:48px;align-items:start}.task-figure-card{background:var(--bg-elevated);border:1px solid var(--hairline);border-radius:6px;padding:16px 16px 12px;margin:0;box-shadow:0 1px #00000005}.task-figure-img-wrap{width:100%;background:var(--bg);border-radius:4px;overflow:hidden;line-height:0}.task-figure-img{width:100%;height:auto;display:block}.task-figure-card--compact .task-figure-img{width:50%;margin:0 auto}.task-figure-card figcaption{font-family:var(--serif);font-style:italic;font-size:12px;color:var(--ink-faint);text-align:center;margin-top:10px;border-top:1px solid var(--hairline);padding-top:10px}.task-image-credit{color:var(--ink-faint);font-family:var(--mono);font-size:10px;font-style:normal}.task-image-credit p{margin:0}.task-image-credit a{color:inherit;text-decoration:underline;text-underline-offset:2px}.task-image-credit a:hover{color:var(--accent-text)}@media (max-width: 900px){.task-hero-grid{grid-template-columns:1fr;gap:24px}}.taxonomy-suggestion-cell{-webkit-appearance:none;-moz-appearance:none;appearance:none;width:100%;border-top:0;border-left:0;background:transparent;color:var(--ink-soft);text-align:left}.taxonomy-suggestion-cell .name{font-style:italic}.taxonomy-suggestion-icon{width:14px;height:14px}.task-page-grid{display:grid;grid-template-columns:1fr 260px;gap:56px;align-items:start}.task-featured-collection{display:grid;grid-template-columns:1fr auto;gap:4px 24px;align-items:center;margin-top:32px;padding:18px 24px;border:1px solid var(--hairline);border-left:3px solid var(--accent);border-radius:6px;background:var(--bg-elevated);color:var(--ink);text-decoration:none;transition:border-color .15s}.task-featured-collection:hover{border-color:var(--accent)}.task-featured-collection-eyebrow{grid-column:1;font-family:var(--mono);font-size:10px;font-weight:600;letter-spacing:.12em;text-transform:uppercase;color:var(--accent-text)}.task-featured-collection strong{grid-column:1;font-family:var(--serif);font-size:22px;line-height:1.2}.task-featured-collection-description{grid-column:1;color:var(--ink-soft);font-size:14px;line-height:1.45}.task-featured-collection-meta{grid-column:2;grid-row:1 / span 3;display:inline-flex;align-items:center;gap:6px;font-family:var(--mono);font-size:11px;letter-spacing:.08em;text-transform:uppercase;color:var(--accent-text);white-space:nowrap}.medical-ai-hub{margin-top:32px;padding:24px;border:1px solid var(--hairline);border-top:3px solid var(--accent);border-radius:6px;background:var(--bg-elevated)}.medical-ai-hub-heading>span,.medical-ai-hub-card-eyebrow{display:block;font-family:var(--mono);font-size:10px;font-weight:600;letter-spacing:.12em;text-transform:uppercase;color:var(--accent-text)}.medical-ai-hub-heading h2{margin:6px 0 4px;font-family:var(--serif);font-size:26px;line-height:1.2;color:var(--ink)}.medical-ai-hub-heading p{margin:0;color:var(--ink-soft);font-size:14px}.medical-ai-hub-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-top:20px}.medical-ai-hub-card{display:flex;min-width:0;min-height:176px;flex-direction:column;padding:16px;border:1px solid var(--hairline);border-radius:5px;background:var(--bg);color:var(--ink);text-decoration:none;transition:border-color .15s,transform .15s}.medical-ai-hub-card:hover{border-color:var(--accent);transform:translateY(-2px)}.medical-ai-hub-card strong{margin-top:10px;font-family:var(--serif);font-size:18px;line-height:1.2}.medical-ai-hub-card-description{margin-top:8px;color:var(--ink-soft);font-size:13px;line-height:1.45}.medical-ai-hub-card-meta{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:auto;padding-top:16px;font-family:var(--mono);font-size:10px;letter-spacing:.04em;text-transform:uppercase;color:var(--ink-faint)}.task-explainer{font-family:var(--serif);font-size:17px;line-height:1.55;color:var(--ink);max-width:720px;margin-top:16px;margin-bottom:28px;text-wrap:pretty}.task-explainer p{margin:0 0 12px}.task-explainer p:last-child{margin-bottom:0}.task-explainer a{color:var(--accent-text);text-decoration:underline;text-underline-offset:2px;text-decoration-thickness:1px}.task-explainer a:hover{color:var(--accent)}.task-explainer strong{color:var(--ink);font-weight:600}.task-explainer em{font-style:italic}.task-explainer code{font-family:var(--mono);font-size:.9em;background:var(--bg-elevated);padding:1px 5px;border-radius:3px}.task-research-trends{max-width:760px;margin:-8px 0 28px;border-left:2px solid var(--accent);background:var(--bg-elevated)}.task-research-trends-item{border-bottom:0}.task-research-trends-trigger{padding:18px 20px;color:var(--accent-text)}.task-research-trends-trigger:hover{text-decoration:none}.task-research-trends-trigger svg{width:16px;height:16px}.task-research-trends-title{font-family:var(--mono);font-size:11px;font-weight:600;letter-spacing:.08em;text-transform:uppercase;color:var(--accent-text)}.task-research-trends-content{padding:0 20px 16px}.task-research-trends ul{margin:0;padding-left:19px}.task-research-trends li{padding-left:4px;font-family:var(--serif);font-size:15px;line-height:1.5;color:var(--ink)}.task-research-trends li+li{margin-top:8px}.task-research-trends li::marker{color:var(--accent-text)}.task-research-trends p{margin:0}.task-research-trends a{color:var(--accent-text);text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:2px}.task-quickstats{display:flex;gap:28px;font-family:var(--mono);font-size:11px;color:var(--ink-faint);letter-spacing:.05em;padding-bottom:14px;margin-bottom:0;border-bottom:1px solid var(--accent)}.task-quickstats .num{color:var(--ink);font-weight:600;font-size:12px;margin-right:5px;font-feature-settings:"tnum"}.task-framework-links{display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px;margin-top:14px}.task-framework-links-label{font-family:var(--mono);font-size:10px;letter-spacing:.12em;text-transform:uppercase;color:var(--ink-faint);font-weight:600}.task-framework-link{display:inline-flex;align-items:center;gap:6px;font-family:var(--mono);font-size:12px;color:var(--ink);text-decoration:none;padding:4px 10px;border:1px solid var(--hairline);border-radius:999px;background:var(--bg-elevated);transition:color .15s,border-color .15s}.task-framework-link:hover{color:var(--accent-text);border-color:var(--accent)}.task-framework-link-stars{color:var(--ink-faint);font-size:11px}.task-side{position:sticky;top:100px;font-size:13px}.side-block{margin-bottom:28px}.side-block-num{font-family:var(--mono);font-size:10px;color:var(--accent-text);letter-spacing:.1em;margin-bottom:4px}.side-block-label{font-family:var(--mono);font-size:12px;letter-spacing:.12em;text-transform:uppercase;color:var(--ink);font-weight:600;padding-bottom:8px;border-bottom:1px solid var(--hairline);margin-bottom:10px}.side-link-row{display:flex;justify-content:space-between;align-items:baseline;padding:5px 0;cursor:pointer;font-family:var(--serif);font-size:14px}.side-link-row:hover{color:var(--accent-text)}.side-link-row .count{font-family:var(--mono);font-size:11px;color:var(--ink-faint)}.side-domain-pill{font-family:var(--mono);font-size:11px;color:var(--accent-text);padding:6px 0}.side-method-row{display:flex;justify-content:space-between;align-items:center;padding:4px 0}.side-method-row .num{font-family:var(--mono);font-size:10.5px;color:var(--ink-faint)}.task-section-head{scroll-margin-top:96px;margin-top:28px;margin-bottom:14px}.task-section-eyebrow{font-family:var(--mono);font-size:10px;letter-spacing:.12em;text-transform:uppercase;color:var(--accent-text);margin-bottom:6px}.task-section-title{font-family:var(--mono);font-size:18px;font-weight:600;color:var(--ink);letter-spacing:.04em;text-transform:uppercase;display:flex;align-items:baseline;gap:10px}.task-section-title .meta{font-family:var(--mono);font-size:11px;color:var(--ink-faint);font-weight:400;letter-spacing:.05em;text-transform:none}.subtask-section{margin-bottom:24px}.subtask-section+.subtask-section{margin-top:8px}.subtask-head{display:flex;align-items:baseline;gap:10px;margin:18px 0 10px}.subtask-head-name{font-family:var(--mono);font-size:14px;font-weight:600;color:var(--ink);letter-spacing:.04em;text-transform:uppercase;text-decoration:none;transition:color .15s}.subtask-head-name:hover{color:var(--accent-text)}.subtask-head-meta{font-family:var(--mono);font-size:11px;color:var(--ink-faint);letter-spacing:.05em}.subtask-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;align-items:start}.subtask-grid .subtask-section{margin-bottom:0;border:1px solid var(--hairline);background:var(--bg-elevated);border-radius:6px;padding:12px 14px 10px}.subtask-grid .subtask-section+.subtask-section{margin-top:0}.subtask-grid .subtask-head{margin:0 0 8px;padding-bottom:8px;border-bottom:1px solid var(--hairline)}.subtask-grid .subtask-head-name{font-size:12px}.subtask-grid .subtask-head-meta{font-size:10px}.subtask-summary{display:flex;flex-direction:column;gap:7px;min-height:86px;color:var(--ink-soft);text-decoration:none;font-family:var(--mono);font-size:10px;line-height:1.4;letter-spacing:.05em;text-transform:uppercase}.subtask-summary:hover{color:var(--ink)}.subtask-summary-desc{display:-webkit-box;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:3;font-family:var(--serif);font-size:13px;line-height:1.35;letter-spacing:0;text-transform:none;color:var(--ink-soft)}.subtask-grid .bench-row{display:grid;grid-template-columns:22px 1fr 16px;gap:10px;align-items:center;border:0;background:transparent;border-radius:0;padding:8px 0;margin-bottom:0;border-bottom:1px dashed var(--hairline);transition:none}.subtask-grid .bench-row:last-of-type{border-bottom:0}.subtask-grid .bench-row:hover{border-color:transparent}.subtask-grid .bench-row:hover .bench-row-name{color:var(--accent-text)}.subtask-grid .bench-row-num{font-size:10px}.subtask-grid .bench-row-name{font-size:13.5px;margin-bottom:2px;line-height:1.2}.subtask-grid .bench-row-sub{font-size:9.5px;letter-spacing:.06em}.subtask-grid .bench-row-arrow{font-size:14px}.subtask-grid .bench-show-more{font-size:10px;padding:6px 0 0;margin-top:2px}.bench-card{border:1px solid var(--hairline);background:var(--bg-elevated);border-radius:6px;padding:18px 22px;margin-bottom:14px;cursor:pointer;transition:border-color .15s}.bench-card:hover{border-color:var(--ink)}.bench-head{display:flex;justify-content:space-between;align-items:baseline;margin-bottom:14px;gap:16px}.bench-name{font-family:var(--mono);font-size:14px;font-weight:600;letter-spacing:.02em;text-transform:uppercase;color:var(--ink)}.bench-sub{font-family:var(--mono);font-size:10px;letter-spacing:.1em;text-transform:uppercase;color:var(--ink-faint);margin-top:4px}.bench-sota-value{font-family:var(--serif);font-size:36px;font-weight:500;color:var(--accent);font-feature-settings:"tnum";line-height:1}.bench-sota-tag{font-family:var(--mono);font-size:10px;letter-spacing:.08em;text-transform:uppercase;color:var(--ink-faint);text-align:right;margin-top:4px}.bench-task-tag{font-family:var(--mono);font-size:10px;letter-spacing:.08em;text-transform:uppercase;color:var(--accent-text)}.domain-mega-title{font-family:var(--mono);font-size:56px;font-weight:600;letter-spacing:-.01em;line-height:1;text-transform:uppercase;margin-bottom:0;color:var(--ink);overflow-wrap:break-word}.benchmark-trend-table{border-top:1px solid var(--hairline)}.benchmark-trend-head,.benchmark-trend-row{display:grid;grid-template-columns:124px minmax(150px,.8fr) minmax(150px,.9fr) minmax(200px,1.3fr) 44px 78px;gap:20px;align-items:center}.benchmark-trend-head{padding:9px 16px;border-bottom:1px solid var(--hairline);font-family:var(--mono);font-size:9.5px;font-weight:600;letter-spacing:.1em;text-transform:uppercase;color:var(--ink-faint)}.benchmark-trend-row{min-height:92px;padding:12px 16px;border-bottom:1px solid var(--hairline);background:transparent;transition:background .15s,border-color .15s}.benchmark-trend-row:hover{background:var(--bg-elevated);border-color:var(--hairline-strong)}.benchmark-trend-row:hover .bench-row-name{color:var(--accent-text)}.benchmark-trend-cell{min-width:0}.benchmark-trend-sparkline{display:block;width:112px;height:42px;overflow:visible}.benchmark-trend-axis{stroke:var(--hairline-strong);stroke-width:.8;stroke-dasharray:1.5 2.5;vector-effect:non-scaling-stroke}.benchmark-trend-area{fill:var(--accent-soft);opacity:.68}.benchmark-trend-line{fill:none;stroke:var(--accent);stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round;vector-effect:non-scaling-stroke}.benchmark-trend-dot{fill:var(--bg-elevated);stroke:var(--accent);stroke-width:1.8;vector-effect:non-scaling-stroke}.benchmark-trend-point{cursor:crosshair;outline:none}.benchmark-trend-point-hit{fill:transparent}.benchmark-trend-point-mark{fill:var(--bg-elevated);stroke:var(--accent);stroke-width:1.25;opacity:0;transition:opacity .12s,r .12s;vector-effect:non-scaling-stroke}.benchmark-trend-point:hover .benchmark-trend-point-mark,.benchmark-trend-point:focus .benchmark-trend-point-mark{opacity:1;r:2.3px}.benchmark-trend-tooltip rect{fill:var(--ink);opacity:.94}.benchmark-trend-tooltip text{fill:var(--bg);font-family:var(--mono);font-size:3.2px;letter-spacing:.01em}.benchmark-trend-tooltip .benchmark-trend-tooltip-value{font-weight:700}.benchmark-trend-meta{display:flex;align-items:center;gap:6px;margin-top:3px;font-family:var(--mono);font-size:8.5px;letter-spacing:.035em;color:var(--ink-faint);white-space:nowrap}.benchmark-trend-meta strong{color:var(--ink-soft);font-weight:600}.benchmark-trend-change{padding:1px 4px;border-radius:999px;font-size:8px;font-weight:600}.benchmark-trend-change.is-up,.benchmark-trend-change.is-new{color:var(--positive-text);background:var(--positive-bg)}.benchmark-trend-change.is-down{color:var(--negative-text);background:var(--negative-bg)}.benchmark-trend-benchmark{min-width:0}.benchmark-trend-row .bench-row-name{display:block;margin-bottom:5px}.benchmark-trend-row .bench-row-best{width:100%;justify-content:flex-start;text-align:left}.bench-row-best-empty{color:var(--ink-faint);font-family:var(--mono)}.bench-row-paper{min-width:0;font-family:var(--serif);font-size:14px;line-height:1.35}.bench-row-paper a{color:var(--accent-text)}.bench-row-paper a:hover{text-decoration:underline}.bench-row-code{display:flex;justify-content:center}.bench-row-code a{display:inline-flex;color:var(--ink-soft);transition:color .15s,transform .15s}.bench-row-code a:hover{color:var(--accent-text);transform:translateY(-1px)}.bench-row-compare{display:flex;justify-content:center}.bench-row-compare a{display:inline-flex;align-items:center;justify-content:center;gap:5px;min-height:30px;padding:0 10px;border:1px solid var(--accent);border-radius:999px;color:var(--accent-text);font-family:var(--mono);font-size:9px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;white-space:nowrap;transition:color .15s,background .15s}.bench-row-compare a svg{transition:transform .15s}.bench-row-compare a:hover{color:var(--bg);background:var(--accent)}.bench-row-compare a:hover svg{transform:translate(2px)}.bench-row-compare a:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.bench-row{display:grid;grid-template-columns:36px 1fr auto 28px;gap:18px;align-items:center;padding:16px 18px;border:1px solid var(--hairline);background:var(--bg-elevated);border-radius:6px;margin-bottom:8px;cursor:pointer;transition:border-color .15s,transform .15s}.bench-row:hover{border-color:var(--ink)}.bench-row:hover .bench-row-arrow{color:var(--accent-text);transform:translate(3px)}.bench-row-num{font-family:var(--mono);font-size:11px;color:var(--ink-faint);letter-spacing:.05em;font-feature-settings:"tnum"}.bench-row-name{font-family:var(--serif);font-size:18px;font-weight:500;color:var(--ink);letter-spacing:-.005em;margin-bottom:4px}.bench-row-sub{display:flex;align-items:center;gap:8px;font-family:var(--mono);font-size:10px;letter-spacing:.08em;text-transform:uppercase;color:var(--ink-faint)}.bench-row-sub strong{color:var(--ink-soft);font-weight:600}.bench-row-variants{display:flex;flex-wrap:wrap;gap:4px;margin:2px 0 6px}.bench-row-variant{font-family:var(--mono);font-size:9.5px;letter-spacing:.02em;white-space:nowrap;padding:1px 5px;border:1px solid var(--hairline);border-radius:3px;background:transparent;color:var(--ink-faint);cursor:pointer;transition:border-color .15s,color .15s}.bench-row-variant:hover{border-color:var(--ink);color:var(--ink)}.bench-row-variant[aria-pressed=true]{border-color:var(--accent);color:var(--accent-text)}.bench-row-variant:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.bench-row-sub .dot-sep{color:var(--hairline-strong)}.bench-row-sota{text-align:right}.bench-row-sota-value{font-family:var(--serif);font-size:22px;font-weight:500;color:var(--accent-text);font-feature-settings:"tnum";line-height:1}.bench-row-sota-tag{font-family:var(--mono);font-size:9.5px;letter-spacing:.08em;text-transform:uppercase;color:var(--ink-faint);margin-top:4px}.bench-row-arrow{font-family:var(--serif);font-size:18px;color:var(--hairline-strong);text-align:center;transition:color .15s,transform .15s}.bench-row-best{display:flex;align-items:center;justify-content:flex-end;gap:6px;max-width:240px;text-align:right}.bench-row-best-icon{color:var(--accent-text);flex:0 0 auto}.bench-row-best-name{font-family:var(--serif);font-size:14px;color:var(--ink-soft);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.bench-show-more{font-family:var(--mono);font-size:11px;letter-spacing:.05em;color:var(--ink-faint);background:transparent;border:0;padding:8px 2px 2px;margin-top:4px;cursor:pointer;text-transform:lowercase;transition:color .15s}.bench-show-more:hover{color:var(--accent-text)}.bm-action-btn{display:inline-flex;align-items:center;gap:8px;padding:8px 14px;border:1px solid var(--hairline);border-radius:6px;background:var(--bg-elevated);font-family:var(--sans);font-size:13px;font-style:normal;color:var(--ink);cursor:pointer;transition:border-color .15s}.bm-action-btn:hover{border-color:var(--ink)}.bm-action-btn svg{display:block}@media (max-width: 880px){.task-page-grid{grid-template-columns:1fr;gap:32px}.task-side{position:static;top:auto;order:-1}.subtask-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.medical-ai-hub-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.domain-mega-title{font-size:40px}.bench-row{grid-template-columns:28px 1fr auto;gap:12px;padding:14px}.bench-row>.bench-row-arrow{display:none}.bench-row-best{max-width:130px}.bench-row-best-name{font-size:12.5px}.benchmark-trend-head,.benchmark-trend-row{grid-template-columns:112px minmax(130px,.8fr) minmax(120px,.8fr) minmax(160px,1.2fr) 36px 72px;gap:14px}.benchmark-trend-sparkline{width:104px}}@media (max-width: 640px){.domain-mega-title{font-size:30px}.subtask-grid{grid-template-columns:1fr}.medical-ai-hub{padding:18px}.task-featured-collection{grid-template-columns:1fr;padding:16px 18px}.task-featured-collection-meta{grid-column:1;grid-row:auto;margin-top:8px}.medical-ai-hub-grid{grid-template-columns:1fr}.medical-ai-hub-card{min-height:0}.benchmark-trend-head{display:none}.benchmark-trend-row{grid-template-columns:100px minmax(0,1fr) 28px;grid-template-areas:"trend benchmark code" "trend best code" "trend paper paper" "trend compare compare";gap:4px 12px;min-height:120px;padding:12px 4px}.benchmark-trend-cell{grid-area:trend}.benchmark-trend-benchmark{grid-area:benchmark}.benchmark-trend-row .bench-row-best{grid-area:best;justify-content:flex-start;max-width:none;text-align:left}.benchmark-trend-row .bench-row-paper{grid-area:paper}.benchmark-trend-row .bench-row-code{grid-area:code}.benchmark-trend-row .bench-row-compare{grid-area:compare;justify-content:flex-start;margin-top:4px}.bench-row-compare a{min-height:26px;padding:0 9px;font-size:8.5px}.benchmark-trend-sparkline{width:96px}.benchmark-trend-meta{flex-wrap:wrap;gap:3px;white-space:normal}.task-quickstats{flex-wrap:wrap;gap:16px}}.paper-meta-line .arxiv-id{color:var(--accent-text)}.paper-authors .institution{font-style:italic;color:var(--ink-faint)}.paper-tags--clamped .method-chip{line-height:16px}.method-hero-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(360px,560px);gap:56px;align-items:start}.method-hero-grid--wide-figure{grid-template-columns:minmax(0,1fr) minmax(480px,640px)}.method-figure-card{background:var(--bg-elevated);border:1px solid var(--hairline);border-radius:6px;padding:16px 16px 12px;margin:0;box-shadow:0 1px #00000005;align-self:center}.method-figure-svg{width:100%;display:block}.method-figure-svg--schematic{aspect-ratio:360 / 420}.method-figure-img{width:100%;height:auto;display:block}.method-figure-svg--compact .method-figure-img{width:50%;margin:0 auto}.method-figure-svg--scaled-80 .method-figure-img{width:80%;margin:0 auto}.method-figure-card figcaption{font-family:var(--serif);font-style:italic;font-size:12px;color:var(--ink-faint);text-align:center;margin-top:10px;border-top:1px solid var(--hairline);padding-top:10px}.method-image-credit{color:var(--ink-faint);font-family:var(--mono);font-size:10px;font-style:normal}.method-image-credit p{margin:0}.method-image-credit a{color:inherit;text-decoration:underline;text-underline-offset:2px}.method-image-credit a:hover{color:var(--accent-text)}.method-description{font-family:var(--serif);font-size:17px;color:var(--ink-soft);max-width:720px;line-height:1.6;margin-top:16px;text-wrap:pretty}.method-description p{margin:0 0 12px}.method-description p:last-child{margin-bottom:0}.method-description a{color:var(--accent-text);text-decoration:underline;text-underline-offset:2px;text-decoration-thickness:1px}.method-description a:hover{color:var(--accent)}.method-description strong{color:var(--ink);font-weight:600}.method-description code{font-family:var(--mono);font-size:.9em;background:var(--bg-elevated);padding:1px 5px;border-radius:3px}.method-description ul,.method-description ol{padding-left:22px;margin:0 0 12px}.method-description ul{list-style-type:disc}.method-description ol{list-style-type:decimal}.method-description li{margin-bottom:4px}.method-description .katex-display{margin:14px 0;overflow-x:auto;overflow-y:hidden;padding:4px 0}.method-description .katex{font-size:1em}.method-source{margin-top:22px;display:flex;flex-direction:column;gap:6px;max-width:720px}.method-source-label{font-family:var(--mono);font-size:10px;letter-spacing:.14em;text-transform:uppercase;color:var(--ink-faint)}.method-source-link{display:flex;flex-direction:column;gap:2px;padding:12px 14px;background:var(--bg-elevated);border:1px solid var(--hairline);border-left:3px solid var(--accent-text);border-radius:3px;cursor:pointer;transition:background .12s,border-color .12s;text-decoration:none}.method-source-link:not(.is-static):hover{background:var(--bg-subtle);border-color:var(--hairline-strong);border-left-color:var(--accent)}.method-source-link.is-static{cursor:default}.method-source-title{font-family:var(--serif);font-size:17px;font-weight:500;color:var(--ink);letter-spacing:-.005em}.method-source-link:not(.is-static):hover .method-source-title{text-decoration:underline;text-underline-offset:3px;text-decoration-thickness:1px}.method-source-meta{font-family:var(--mono);font-size:11px;color:var(--ink-faint)}@media (max-width: 1024px){.method-hero-grid{grid-template-columns:1fr;gap:24px}.method-figure-card{max-width:560px}.method-hero-grid--wide-figure .method-figure-card{max-width:640px}}.method-hero-title{font-family:var(--mono);font-size:48px;letter-spacing:-.01em}.method-trending-icon{flex:0 0 auto;color:var(--accent-text);fill:color-mix(in srgb,var(--accent-text) 18%,transparent)}.method-trend-score{color:var(--accent-text);font-weight:600}.method-trend-panel{margin-top:20px;padding-top:14px;border-top:1px solid var(--hairline-strong)}.method-trend-header{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;margin-bottom:4px}.method-trend-eyebrow{margin-bottom:5px;font-family:var(--mono);font-size:10px;letter-spacing:.1em;text-transform:uppercase;color:var(--accent-text)}.method-trend-header p{margin:3px 0 0;font-family:var(--mono);font-size:11px;color:var(--ink-faint)}.method-trend-summary{display:flex;flex-direction:column;align-items:flex-end;flex:0 0 auto;font-family:var(--mono);font-size:10px;color:var(--ink-faint)}.method-trend-summary>strong{font-family:var(--serif);font-size:19px;font-weight:500;line-height:1;color:var(--ink)}.method-usage-chart-wrap{position:relative;width:100%}.method-usage-chart{display:block;width:100%;height:auto;overflow:visible}.method-usage-gridline{stroke:var(--hairline);stroke-width:1}.method-usage-y-label,.method-usage-x-label{fill:var(--ink-faint);font-family:var(--mono);font-size:9px}.method-usage-bar-hit{fill:transparent}.method-usage-bar-mark{fill:color-mix(in srgb,var(--accent-text) 48%,var(--bg));transition:fill .12s}.method-usage-bar.is-current .method-usage-bar-mark{opacity:.55}.method-usage-bar:hover .method-usage-bar-mark,.method-usage-bar:focus .method-usage-bar-mark,.method-usage-bar.is-active .method-usage-bar-mark{fill:var(--accent-text)}.method-usage-bar:focus{outline:none}.method-usage-tooltip{position:absolute;top:4px;right:8px;display:flex;gap:8px;padding:5px 8px;border:1px solid var(--hairline-strong);background:var(--bg);font-family:var(--mono);font-size:10px;color:var(--ink-soft);pointer-events:none}.method-trend-skeleton{margin-top:20px}.method-trend-note{margin:6px 0 0;color:var(--ink-faint);font-family:var(--mono);font-size:10px}@media (max-width: 640px){.method-trend-header{flex-direction:column;gap:12px}.method-trend-summary{align-items:flex-start}}.method-chip{display:inline-flex;align-items:center;padding:4px 10px;font-family:var(--mono);font-size:11px;font-weight:500;color:var(--ink);background:var(--bg-elevated);border:1px solid var(--hairline);border-radius:4px;cursor:pointer;transition:all .15s;white-space:nowrap}.method-chip:hover{border-color:var(--ink);background:var(--bg-subtle)}.side-method-row .method-chip{font-size:10.5px;padding:3px 8px}@media (max-width: 880px){.method-hero-title{font-size:40px}}@media (max-width: 640px){.method-hero-title{font-size:30px}}.filter-row{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin-bottom:24px;padding:12px 16px;border:1px solid var(--hairline);border-radius:8px;background:var(--bg-elevated)}.filter-row .label{margin-right:8px;color:var(--ink-faint);font-family:var(--mono);font-size:10px;letter-spacing:.1em;text-transform:uppercase}.search-overlay{position:fixed;top:0;right:0;bottom:0;left:0;background:#1a181466;-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px);z-index:100;display:flex;align-items:flex-start;justify-content:center;padding-top:100px}.search-modal{width:640px;max-width:calc(100vw - 32px);background:var(--bg);border:1px solid var(--hairline-strong);border-radius:12px;box-shadow:0 20px 60px #00000026;overflow:hidden}.search-modal-input{width:100%;padding:18px 20px;font-size:16px;font-family:var(--serif);border:none;background:transparent;outline:none;border-bottom:1px solid var(--hairline);color:var(--ink)}.search-modal-input::-moz-placeholder{color:var(--ink-faint);font-style:italic}.search-modal-input::placeholder{color:var(--ink-faint);font-style:italic}.search-results{max-height:480px;overflow-y:auto;padding:8px}.search-empty{padding:32px;text-align:center;color:var(--ink-faint);font-family:var(--serif);font-style:italic}.search-section-label{font-family:var(--mono);font-size:10px;letter-spacing:.12em;text-transform:uppercase;color:var(--ink-faint);padding:10px 12px 6px}.search-result{display:flex;flex-direction:column;padding:10px 12px;border-radius:6px;cursor:pointer;gap:4px}.search-result:hover,.search-result.focused{background:var(--bg-subtle)}.search-result-title{font-family:var(--serif);font-size:14.5px;font-weight:500;line-height:1.3}.search-result-meta{font-family:var(--mono);font-size:10.5px;color:var(--ink-faint);display:flex;gap:10px}.search-result-tag{display:flex;align-items:center;gap:8px;padding:8px 12px;border-radius:6px;cursor:pointer}.search-result-tag:hover,.search-result-tag.focused{background:var(--bg-subtle)}.search-result-tag .name{font-family:var(--mono);font-size:12px}.search-result-tag .count{margin-left:auto;font-family:var(--mono);font-size:10px;color:var(--ink-faint)}.search-view-all-row{width:100%;border:0;border-top:1px solid var(--hairline);background:var(--bg-subtle);color:var(--accent-text);padding:12px;text-align:left;font:600 11px var(--mono);cursor:pointer}.search-view-all-row:hover,.search-view-all-row:focus-visible{background:var(--bg-subtle);outline:2px solid var(--accent);outline-offset:-2px}@media (max-width: 640px){.search-modal-input{font-size:16px;padding:14px 16px}}.search-ask-row{display:flex;align-items:center;gap:10px;width:100%;padding:10px 12px;border-radius:6px;text-align:left;color:var(--ink)}.search-ask-row:hover{background:var(--bg-subtle)}.search-ask-chip{display:inline-flex;align-items:center;font-family:var(--mono);font-size:10.5px;color:var(--accent-text);background:var(--accent-soft);border-radius:5px;padding:2px 7px;flex:none}.search-ask-text{flex:1;min-width:0;font-family:var(--serif);font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.search-ask-row kbd{font-family:var(--sans);font-size:11px;color:var(--ink-faint);border:1px solid var(--hairline);border-radius:5px;padding:1px 6px}.search-empty-sub{display:block;margin-top:10px;font-family:var(--sans);font-style:normal;font-size:12px;color:var(--ink-faint)}.settings-page-content,.settings-page-loading{min-height:min(680px,calc(100vh - 180px))}.settings-section{border:1px solid var(--hairline);border-radius:10px;padding:20px 22px;margin-top:8px;max-width:760px}.settings-section-title{font-size:12px;font-weight:600;text-transform:uppercase;letter-spacing:.06em;color:var(--ink-faint);margin:0 0 14px}.settings-note.settings-note-flush{margin-top:0;padding-top:0;border-top:0}.settings-billing-loading{color:var(--ink-soft);font-size:13px}.settings-billing,.settings-billing-connect{display:flex;flex-direction:column;gap:14px}.settings-provider-grid{display:grid;gap:14px}.settings-provider-card{display:flex;flex-direction:column;gap:14px;padding:16px;border:1px solid var(--hairline);border-radius:8px;background:var(--bg-subtle)}.settings-provider-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}.settings-provider-heading h3{margin:0;color:var(--ink);font-size:16px;font-weight:650}.settings-provider-heading p{margin:3px 0 0;color:var(--ink-soft);font-size:12px}.settings-usage-row{display:flex;flex-direction:column;gap:9px;padding:13px;border:1px solid var(--hairline);border-radius:7px;background:var(--bg-elevated)}.settings-usage-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}.settings-usage-heading strong{flex-shrink:0;color:var(--ink);font-size:14px}.settings-usage-track{height:7px;overflow:hidden;border-radius:999px;background:var(--hairline)}.settings-usage-track>span{display:block;height:100%;border-radius:inherit;background:var(--accent)}.settings-limit-note{margin:0;color:var(--danger, #b42318);font-size:12px;line-height:1.45}.settings-byok-controls{display:flex;flex-direction:column;gap:10px;padding-top:2px}.settings-byok-controls form{display:flex;flex-direction:column;gap:10px}.settings-byok-controls input{width:100%;border:1px solid var(--hairline-strong);border-radius:7px;padding:10px 12px;color:var(--ink);background:var(--bg-elevated);font:inherit}.settings-fallback-control{display:flex;align-items:flex-start;gap:11px;cursor:pointer}.settings-fallback-control>span{display:flex;flex-direction:column;gap:4px}.settings-fallback-control strong{color:var(--ink);font-size:12px;line-height:1.4}.settings-fallback-control small{color:var(--ink-soft);font-size:11px;line-height:1.45}.settings-plan-row{display:flex;justify-content:space-between;align-items:flex-start;gap:20px}.settings-connected-badge{border-radius:999px;padding:4px 9px;color:var(--accent-text);background:var(--accent-soft);font-size:11px;font-weight:600}.settings-billing-help{color:var(--ink-soft);font-size:11px;margin:0;line-height:1.5}.settings-billing-actions{display:flex;flex-wrap:wrap;gap:8px}.settings-billing-actions .button{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:34px;padding:7px 11px;border:1px solid var(--hairline-strong);border-radius:7px;color:var(--ink);background:var(--bg-elevated);font-size:12px;font-weight:600;text-decoration:none}.settings-billing-actions .button:hover{background:var(--bg-subtle)}.settings-billing-actions .button-primary{border-color:var(--accent);color:var(--accent-text);background:var(--accent-soft)}.settings-billing-actions .button:disabled{cursor:not-allowed;opacity:.55}.settings-billing-actions svg{width:12px;height:12px}.settings-token-label{color:var(--ink);font-size:12px;font-weight:600;margin-bottom:-8px}.settings-billing-connect input{width:100%;border:1px solid var(--hairline-strong);border-radius:7px;padding:10px 12px;color:var(--ink);background:var(--bg-elevated);font:inherit}.settings-billing-select{width:100%;min-height:42px;padding:9px 34px 9px 12px;border:1px solid var(--border);border-radius:7px;background:var(--bg-elevated);color:var(--ink);font:inherit}.settings-billing-select:focus{outline:2px solid var(--accent);outline-offset:1px}.settings-billing-select:disabled{cursor:wait;opacity:.7}.settings-billing-connect input:focus{border-color:var(--accent);outline:2px solid var(--accent-soft)}.settings-token-error{color:var(--danger, #b42318);font-size:12px}.theme-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.theme-option{display:flex;align-items:flex-start;gap:10px;min-width:0;padding:12px;border:1px solid var(--hairline);border-radius:7px;background:var(--bg-elevated);color:var(--ink-soft);text-align:left;transition:background .15s,border-color .15s,color .15s}.theme-option:hover{border-color:var(--hairline-strong);background:var(--bg-subtle);color:var(--ink)}.theme-option.is-selected{border-color:var(--accent);background:var(--accent-soft);color:var(--accent-text)}.theme-option:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.theme-option>svg{width:16px;height:16px;margin-top:1px;flex-shrink:0}.theme-option-copy{display:flex;flex-direction:column;gap:2px;min-width:0}.theme-option-label{color:var(--ink);font-size:13px;font-weight:600}.theme-option-desc{color:var(--ink-soft);font-size:11px;line-height:1.35}.theme-option.is-selected .theme-option-label,.theme-option.is-selected .theme-option-desc{color:var(--accent-text)}.settings-row{display:flex;align-items:flex-start;justify-content:space-between;gap:24px}.settings-row-text{display:flex;flex-direction:column;gap:4px;cursor:pointer}.settings-row-label{font-size:15px;font-weight:500;color:var(--ink)}.settings-row-desc{font-size:13px;color:var(--ink-soft);line-height:1.5;max-width:460px}.settings-note{margin-top:16px;padding-top:16px;border-top:1px solid var(--hairline);font-size:13px;color:var(--ink-soft);line-height:1.5}.settings-note-action{margin-top:10px}.research-section-heading{display:flex;align-items:baseline;justify-content:space-between;gap:16px}.research-section-heading .settings-section-title{display:inline-flex;align-items:center;gap:8px}.research-follow-count{border-radius:999px;padding:1px 7px;color:var(--ink-soft);background:var(--bg-subtle);font-size:11px;letter-spacing:0}.research-feed-link{display:inline-flex;align-items:center;gap:5px;flex-shrink:0;color:var(--accent-text);font-size:13px;font-weight:600;text-decoration:none}.research-feed-link:hover{text-decoration:underline;text-underline-offset:2px}.research-feed-link svg{width:14px;height:14px}.research-section-intro{margin:-6px 0 6px}.research-follow-group{margin-top:16px}.research-follow-group-title{display:flex;align-items:center;gap:6px;margin:0 0 6px;color:var(--ink-soft);font-size:12px;font-weight:600}.research-follow-group-title svg{width:14px;height:14px}.research-follow-list{margin:0;padding:0;list-style:none;border:1px solid var(--hairline);border-radius:8px;background:var(--bg-elevated)}.research-follow-row{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:52px;padding:8px 8px 8px 14px}.research-follow-row+.research-follow-row{border-top:1px solid var(--hairline)}.research-follow-text{display:flex;flex-direction:column;gap:1px;min-width:0}.research-follow-text a{overflow:hidden;color:var(--ink);font-size:14px;font-weight:500;text-overflow:ellipsis;white-space:nowrap;text-decoration:none}.research-follow-text a:hover{color:var(--accent-text);text-decoration:underline;text-underline-offset:2px}.research-follow-text span{color:var(--ink-faint);font-size:12px}.research-follow-row.is-unfollowed .research-follow-text a{color:var(--ink-faint);text-decoration:line-through}.research-follow-action{flex-shrink:0;min-height:30px;padding:5px 10px;border:1px solid transparent;border-radius:6px;color:var(--ink-soft);background:transparent;font-size:12px;font-weight:600}.research-follow-action:hover{border-color:var(--hairline-strong);color:var(--danger, #b42318);background:var(--bg-subtle)}.research-follow-action.is-refollow{border-color:var(--accent);color:var(--accent-text);background:var(--accent-soft)}.research-follow-action:disabled{cursor:wait;opacity:.55}.research-follow-action:focus-visible{outline:2px solid var(--accent);outline-offset:1px}.research-follow-empty{margin-top:14px;padding:18px;border:1px dashed var(--hairline-strong);border-radius:8px;color:var(--ink-soft);font-size:13px;line-height:1.5}.research-follow-empty p{margin:0}.research-follow-empty strong{color:var(--ink);font-weight:600}.research-follow-browse{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}.research-follow-browse a{display:inline-flex;align-items:center;gap:6px;padding:6px 10px;border:1px solid var(--hairline-strong);border-radius:7px;color:var(--ink);background:var(--bg-elevated);font-size:12px;font-weight:600;text-decoration:none}.research-follow-browse a:hover{background:var(--bg-subtle)}.research-follow-browse svg{width:13px;height:13px}.research-email-destination{display:flex;flex-wrap:wrap;align-items:center;gap:8px 10px;margin-top:16px;padding:10px 12px;border:1px solid var(--hairline);border-radius:8px;color:var(--ink-soft);background:var(--bg-subtle);font-size:13px}.research-email-destination>svg{width:15px;height:15px;flex-shrink:0}.research-email-destination strong{color:var(--ink);font-weight:600;overflow-wrap:anywhere}.research-email-destination>span{flex:1 1 220px}.research-email-destination a{color:var(--accent-text);font-size:12px;font-weight:600;text-decoration:none}.research-email-destination a:hover{text-decoration:underline;text-underline-offset:2px}.research-email-status{margin:10px 0 0;color:var(--ink-soft);font-size:12px;line-height:1.5}.research-email-status.is-warning{color:var(--danger, #b42318)}.closed-eval-tooltip-link,.external-eval-tooltip-link{font-weight:600;text-decoration:underline;text-underline-offset:2px}@media (max-width: 640px){.theme-options{grid-template-columns:1fr}}.research-follow{display:flex;flex-wrap:wrap;align-items:center;gap:6px 12px;margin:14px 0 18px}.research-follow-btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-width:112px;min-height:36px;padding:7px 16px 7px 13px;border:1px solid var(--accent);border-radius:999px;color:var(--bg);background:var(--accent);font-family:var(--sans);font-size:14px;font-weight:600;line-height:1;text-decoration:none;cursor:pointer;box-shadow:0 1px 2px #00000014;transition:background .15s,border-color .15s,color .15s,filter .15s}.research-follow-btn:hover{filter:brightness(1.1)}.research-follow-btn:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.research-follow-btn:disabled{cursor:wait;opacity:.6}.research-follow-btn svg{width:16px;height:16px;flex-shrink:0}.research-follow-btn.is-following{border-color:var(--hairline-strong);color:var(--ink);background:var(--bg-elevated);box-shadow:none}.research-follow-btn.is-following svg{color:var(--accent-text)}.research-follow-label-hover{display:none}@media (hover: hover){.research-follow-btn.is-following:hover{filter:none;border-color:var(--danger, #b42318);color:var(--danger, #b42318)}.research-follow-btn.is-following:hover svg,.research-follow-btn.is-following:hover .research-follow-label{display:none}.research-follow-btn.is-following:hover .research-follow-label-hover{display:inline}}.research-follow-hint{color:var(--ink-soft);font-family:var(--sans);font-size:13px;line-height:1.4}.research-follow-hint a{color:var(--accent-text);font-weight:600;text-decoration:none}.research-follow-hint a:hover{text-decoration:underline;text-underline-offset:2px}.research-follow-hint.is-error{color:var(--danger, #b42318)}.following-intro{max-width:720px;margin:8px 0 32px;padding:28px 30px;border:1px solid var(--hairline);border-radius:12px;background:var(--bg-elevated)}.following-intro h2{margin:0;color:var(--ink);font-family:var(--serif);font-size:26px;font-weight:500;line-height:1.2}.following-intro-lead{margin:10px 0 0;color:var(--ink-soft);font-size:15px;line-height:1.55}.following-intro-steps{display:grid;gap:14px;margin:22px 0 0;padding:0;list-style:none}.following-intro-steps li{display:flex;align-items:flex-start;gap:12px}.following-intro-steps li>span{display:inline-flex;flex-shrink:0;align-items:center;justify-content:center;width:26px;height:26px;border-radius:999px;color:var(--accent-text);background:var(--accent-soft);font-family:var(--sans);font-size:13px;font-weight:700}.following-intro-steps p{margin:2px 0 0;color:var(--ink);font-size:14px;line-height:1.55}.following-intro-steps a,.following-intro-popular a:hover{color:var(--accent-text)}.following-intro-pill{display:inline-flex;align-items:center;gap:3px;padding:1px 9px 1px 7px;border-radius:999px;color:var(--bg);background:var(--accent);font-size:12px;font-weight:600;vertical-align:1px}.following-intro-pill svg{width:12px;height:12px}.following-intro-signin{margin-top:20px}.following-intro-browse{display:flex;flex-wrap:wrap;gap:8px;margin-top:20px}.following-intro-browse a{display:inline-flex;align-items:center;gap:6px;padding:7px 12px;border:1px solid var(--hairline-strong);border-radius:8px;color:var(--ink);background:var(--bg-elevated);font-size:13px;font-weight:600;text-decoration:none}.following-intro-browse a:hover{background:var(--bg-subtle)}.following-intro-browse svg{width:14px;height:14px}.following-intro-popular{margin-top:22px;padding-top:18px;border-top:1px solid var(--hairline)}.following-intro-popular h3{margin:0 0 10px;color:var(--ink-faint);font-family:var(--sans);font-size:12px;font-weight:600;letter-spacing:.06em;text-transform:uppercase}.following-intro-popular div{display:flex;flex-wrap:wrap;gap:8px}.following-intro-popular a{padding:4px 10px;border:1px solid var(--hairline);border-radius:999px;color:var(--ink-soft);font-size:13px;text-decoration:none}@media (max-width: 640px){.following-intro{padding:22px 18px}}.reader-route-shell{height:100dvh;min-height:0;display:flex;flex-direction:column;overflow:hidden}.reader-route-shell>.app-header{position:static;flex:0 0 auto}.reader-route-content{min-height:0;flex:1}.paper-reader-shell{height:100%;min-height:0;display:flex;flex-direction:column;background:var(--bg);color:var(--ink);overflow:hidden}.reader-workspace{position:relative;min-height:0;flex:1;display:flex;overflow:hidden}.reader-paper-pane,.reader-assistant-pane{min-width:0;min-height:0;display:flex;flex-direction:column;overflow:hidden}.reader-paper-pane{background:#fff;transition:width .24s cubic-bezier(.22,1,.36,1)}.reader-assistant-pane{visibility:visible;background:var(--bg);opacity:1;transform:translate(0);transition:width .24s cubic-bezier(.22,1,.36,1),opacity .18s ease,transform .24s cubic-bezier(.22,1,.36,1),visibility 0s}.reader-assistant-pane.is-collapsed{visibility:hidden;opacity:0;transform:translate(28px);pointer-events:none;transition:width .24s cubic-bezier(.22,1,.36,1),opacity .14s ease,transform .24s cubic-bezier(.22,1,.36,1),visibility 0s linear .24s}.reader-workspace.is-resizing{cursor:col-resize;-webkit-user-select:none;-moz-user-select:none;user-select:none}.reader-workspace.is-resizing .reader-paper-pane,.reader-workspace.is-resizing .reader-assistant-pane{transition:none}.reader-resize-handle{position:relative;z-index:5;width:1px;flex:0 0 1px;cursor:col-resize;background:var(--hairline-strong);touch-action:none;outline:none}.reader-resize-handle:before{content:"";position:absolute;top:0;right:-8px;bottom:0;left:0}.reader-resize-handle:focus-visible{box-shadow:0 0 0 2px var(--accent)}.reader-collapse-assistant{position:absolute;z-index:8;top:0;right:16px;height:48px;display:flex;align-items:center;border:0;padding:0;background:transparent;color:var(--ink);font-size:12px;line-height:1.5}.reader-workspace.is-assistant-collapsed .pdf-toolbar{padding-right:96px}.reader-tabs{height:40px;flex:0 0 auto;display:flex;border-bottom:1px solid var(--border);background:var(--surface)}.reader-tabs button{flex:1;border:0;border-bottom:2px solid transparent;background:transparent;color:var(--ink-muted)}.reader-tabs button[aria-selected=true]{border-bottom-color:var(--accent);color:var(--ink);font-weight:600}.reader-tab-pending{display:inline-block;width:7px;height:7px;margin-left:6px;border-radius:50%;background:var(--accent);vertical-align:1px}@media (forced-colors: active){.reader-tab-pending{border:1px solid ButtonText}}.reader-workspace .is-hidden{position:absolute!important;top:0;right:0;bottom:0;left:0;width:100%!important;visibility:hidden;pointer-events:none}.reader-workspace.is-tabs>.reader-paper-pane,.reader-workspace.is-tabs>.reader-assistant-pane{width:100%}.reader-status{min-height:100dvh;display:grid;place-content:center;gap:12px;text-align:center}.reader-chat-unavailable{height:100%;display:grid;place-content:center;color:var(--ink-muted);padding:24px;text-align:center}.pdf-viewer{min-height:0;flex:1;display:flex;flex-direction:column}.pdf-toolbar{position:relative;min-height:48px;flex:0 0 auto;display:flex;align-items:center;gap:16px;padding:7px 10px 7px var(--reader-title-inset, 32px);border-bottom:1px solid var(--hairline);background:var(--bg);color:var(--ink);font-size:12px}.pdf-toolbar-paper{min-width:0;flex:1;display:flex;align-items:center;gap:8px;overflow:hidden}.pdf-toolbar-back{flex:0 0 auto;min-height:30px;border:1px solid var(--hairline);border-radius:5px;padding:4px 8px;background:var(--bg-elevated);color:var(--ink);line-height:20px;text-decoration:none;white-space:nowrap}.pdf-toolbar-back:hover{border-color:var(--hairline-strong);background:var(--bg-subtle);color:var(--ink);text-decoration:none}.pdf-toolbar-title{min-width:0;overflow:hidden;color:var(--ink);font-size:14px;font-weight:600;text-overflow:ellipsis;white-space:nowrap}.pdf-toolbar-title:hover{color:var(--accent-text);text-decoration:underline;text-underline-offset:3px}.pdf-toolbar-resource{flex:0 0 auto;display:inline-flex;align-items:center;gap:4px;color:var(--ink-soft);font-size:11px;white-space:nowrap}.pdf-toolbar-resource:before{content:"|";margin-right:4px;color:var(--hairline-strong)}.pdf-toolbar-resource:hover{color:var(--ink);text-decoration:none}.pdf-toolbar-controls{flex:0 0 auto;display:flex;align-items:center;gap:10px}.pdf-toolbar-group{display:flex;align-items:center;gap:5px}.pdf-toolbar button,.pdf-toolbar-controls a{min-height:30px;border:1px solid var(--hairline);border-radius:5px;padding:4px 8px;background:var(--bg-elevated);color:var(--ink);text-decoration:none}.pdf-toolbar button:hover:not(:disabled),.pdf-toolbar-controls a:hover{border-color:var(--hairline-strong);background:var(--bg-subtle)}.pdf-toolbar button:focus-visible,.pdf-toolbar a:focus-visible,.pdf-search-controls input:focus-visible{outline:2px solid var(--accent);outline-offset:1px}.pdf-toolbar button:disabled{opacity:.45}.pdf-page-form{display:flex;align-items:center;gap:4px}.pdf-page-form input{width:32px;height:30px;-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield;border:1px solid var(--hairline);border-radius:5px;padding:0 3px;background:var(--bg-elevated);color:var(--ink);text-align:center}.pdf-page-form input::-webkit-inner-spin-button,.pdf-page-form input::-webkit-outer-spin-button{margin:0;-webkit-appearance:none;-moz-appearance:none;appearance:none}.pdf-zoom-value{width:52px;height:30px;border:1px solid transparent;border-radius:5px;padding:0 3px;background:transparent;color:var(--ink);text-align:center;font:inherit;font-variant-numeric:tabular-nums}.pdf-zoom-value:hover,.pdf-zoom-value:focus{border-color:var(--hairline);background:var(--bg-elevated)}.pdf-search-controls{position:absolute;z-index:10;right:8px;top:calc(100% + 5px);display:flex;align-items:center;gap:5px;padding:7px;border:1px solid var(--hairline);border-radius:6px;background:var(--bg-elevated);box-shadow:0 5px 20px #0003}.pdf-search-controls input{width:min(260px,45vw);min-height:30px;border:1px solid var(--hairline);border-radius:4px;padding:4px 7px;background:var(--bg);color:var(--ink)}.pdf-search-controls span{min-width:70px;color:var(--ink-soft);text-align:center}.pdf-search-controls button{display:inline-flex;align-items:center;justify-content:center}.pdf-scroll-frame{position:relative;min-height:0;flex:1;display:flex;flex-direction:column}.pdf-scroll{min-height:0;flex:1;overflow:auto;overscroll-behavior:contain;background:#fff;scrollbar-color:var(--ink-faint) var(--bg-subtle);scrollbar-gutter:stable}.pdf-scroll::-webkit-scrollbar{width:12px;height:12px}.pdf-scroll::-webkit-scrollbar-track{background:var(--bg-subtle)}.pdf-scroll::-webkit-scrollbar-thumb{border:3px solid var(--bg-subtle);border-radius:999px;background:var(--ink-faint)}.pdf-pages{display:flex;width:-moz-max-content;width:max-content;min-width:100%;flex-direction:column;align-items:center;gap:8px;zoom:var(--pdf-live-scale, 1)}.pdf-page{position:relative;background:#fff}.pdf-page-layer{zoom:var(--pdf-layer-scale, 1)}.pdf-page-layer.is-pending{position:absolute;top:0;left:0;visibility:hidden;pointer-events:none}.pdf-page .react-pdf__Page{margin:0}.pdf-page .textLayer ::-moz-selection{background:#2d7dff4d;color:transparent}.pdf-page .textLayer ::selection{background:#2d7dff4d;color:transparent}.pdf-search-highlight{border-radius:1px;background:#2d7dff57;color:inherit;box-shadow:0 0 0 1px #2d7dff2e}.pdf-search-highlight.is-active{background:#1c68ef85;box-shadow:0 0 0 1px #1c68ef57}.pdf-outline{position:absolute;z-index:9;top:0;right:14px;bottom:0;display:flex;align-items:center;pointer-events:none}.pdf-outline-rail{display:flex;flex-direction:column;align-items:flex-end;justify-content:center;gap:5px;max-height:100%;overflow:hidden;border:0;padding:12px 6px 12px 10px;background:transparent;cursor:pointer;pointer-events:auto}.pdf-outline-rail:focus-visible{outline:2px solid var(--accent);outline-offset:-2px;border-radius:6px}.pdf-outline-tick{display:block;width:18px;height:2px;border-radius:1px;background:var(--ink-faint);transition:background .12s ease,width .12s ease}.pdf-outline-tick.level-1{width:10px}.pdf-outline-tick.is-active{width:22px;background:var(--accent)}.pdf-outline-panel{position:absolute;right:100%;top:50%;width:min(320px,60vw);max-height:min(70vh,100%);overflow-y:auto;margin-right:-6px;padding:10px 6px;border:1px solid var(--hairline);border-radius:12px;background:var(--bg-elevated);color:var(--ink);box-shadow:0 8px 28px #0003;font-size:14px;line-height:1.35;opacity:0;visibility:hidden;transform:translate(6px,-50%);transition:opacity .12s ease,transform .12s ease,visibility 0s linear .12s;pointer-events:none}.pdf-outline:hover .pdf-outline-panel,.pdf-outline:focus-within .pdf-outline-panel,.pdf-outline.is-pinned .pdf-outline-panel{opacity:1;visibility:visible;transform:translateY(-50%);transition-delay:0s;pointer-events:auto}.pdf-outline-panel ol{margin:0;padding:0;list-style:none}.pdf-outline-panel li.level-1 a{padding-left:32px;font-size:13px;color:var(--ink-soft)}.pdf-outline-panel a{display:block;padding:7px 16px;border-radius:6px;color:var(--ink-muted);text-decoration:none;overflow-wrap:anywhere}.pdf-outline-panel a:hover{background:var(--bg-subtle);color:var(--ink);text-decoration:none}.pdf-outline-panel a:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}.pdf-outline-panel a[aria-current=location]{color:var(--accent-text);font-weight:600}@media (hover: none){.pdf-outline:hover:not(.is-pinned) .pdf-outline-panel{opacity:0;visibility:hidden;pointer-events:none}}@media (forced-colors: active){.pdf-outline-tick{background:ButtonText}.pdf-outline-tick.is-active{background:Highlight}}@media (prefers-reduced-motion: reduce){.pdf-outline-panel,.pdf-outline-tick{transition:none}}.pdf-loading,.pdf-error{min-height:50vh;display:grid;place-content:center;color:var(--ink);text-align:center;padding:24px}.pdf-error a,.pdf-error button{color:inherit}.chat-page--reader .chat-main{min-width:0}.chat-page--reader .chat-topbar{min-height:48px;padding:7px 112px 7px 20px}.chat-page--reader .chat-empty-inner{width:min(100%,560px);padding-inline:16px}.chat-page--reader .chat-examples{width:min(100%,300px);margin-inline:auto;flex-direction:column;align-items:stretch}.chat-page--reader .chat-example{width:100%}.chat-reader-action{border:0;background:transparent;color:var(--accent-text);text-decoration:none;font-size:12px;white-space:nowrap}@media (max-width: 880px){.pdf-toolbar{padding-left:16px}}@media (max-width: 640px){.pdf-zoom-value{display:none}.pdf-toolbar{gap:8px;overflow-x:auto;padding-left:14px}.pdf-toolbar-paper{min-width:150px}.pdf-toolbar-group{gap:3px}.pdf-toolbar button,.pdf-toolbar a{padding-inline:6px}}@media (forced-colors: active){.reader-resize-handle,.pdf-toolbar button,.pdf-toolbar a{border:1px solid ButtonText}}@media (prefers-reduced-motion: reduce){.paper-reader-shell *{scroll-behavior:auto!important}.reader-paper-pane,.reader-assistant-pane{transition-duration:.01ms!important}}.pdf-page .linkAnnotation>.pdf-paper-preview-link{position:absolute;top:0;right:0;bottom:0;left:0;display:block;width:100%;height:100%}.pdf-paper-preview-actions{display:flex;justify-content:space-between;gap:12px;padding:10px 14px;border-top:1px solid var(--hairline);font-size:12px}.pdf-paper-preview-actions a,.pdf-paper-preview-actions button{color:var(--accent)}.pdf-paper-preview-actions button{border:0;background:transparent;cursor:pointer;padding:0;font:inherit}.pdf-paper-preview-actions a:focus-visible,.pdf-paper-preview-actions button:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.reader-web-document{max-width:760px;margin:0 auto;padding:32px 28px 64px;color:#1a1a1a;font-size:16px;line-height:1.65;overflow-wrap:anywhere}.reader-web-document h1{margin:0 0 20px;font-size:28px;line-height:1.25}.reader-web-document h2{margin:32px 0 12px;font-size:22px;line-height:1.3}.reader-web-document h3{margin:24px 0 8px;font-size:18px}.reader-web-document img{max-width:100%;height:auto}.reader-web-document pre{overflow-x:auto;padding:12px;border-radius:6px;background:#f4f4f5;font-size:13px}.reader-web-document table{display:block;max-width:100%;overflow-x:auto;border-collapse:collapse;font-size:14px}.reader-web-document th,.reader-web-document td{padding:6px 10px;border:1px solid #e4e4e7}.reader-web-document a{color:#1c68ef}.reader-web-document ::-moz-selection{background:#2d7dff4d}.reader-web-document ::selection{background:#2d7dff4d}@media (max-width: 640px){.reader-web-document{padding:20px 16px 48px;font-size:15px}}.saved-area-section{margin-top:28px}.saved-area-section:first-of-type{margin-top:4px}.saved-area-heading{font-family:var(--serif);font-size:22px;font-weight:500;color:var(--ink);margin:0 0 6px;padding-bottom:6px;border-bottom:1px solid var(--hairline-strong)}.saved-task-block{margin-top:16px}.saved-task-row{display:flex;align-items:center;gap:10px;margin-bottom:6px}.saved-task-count{font-size:12px;color:var(--ink-faint)}.saved-signin-panel{display:flex;justify-content:center;padding:80px 0}.saved-bucket-migration{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:24px;padding:14px 16px;border:1px solid var(--info-border);border-radius:6px;background:var(--info-bg);color:var(--info-text)}.saved-bucket-migration p{max-width:760px;font-size:13px;line-height:1.5}.saved-bucket-migration .hf-signin-btn{flex-shrink:0;max-width:100%;height:auto;min-height:36px;padding:8px 12px;white-space:normal;overflow-wrap:anywhere}@media (max-width: 700px){.saved-bucket-migration{align-items:flex-start;flex-direction:column}}.action-btn.is-saved{background:var(--ink);color:var(--bg);border-color:var(--ink)}.action-btn.is-saved:hover{background:color-mix(in oklch,var(--ink) 88%,var(--accent))}.ask-home-new{max-width:640px;margin:0 auto 6px;padding-left:9px;color:var(--ink-faint);font-size:14px;font-weight:700}.ask-home{position:relative;max-width:640px;margin:0 auto 36px;background:var(--bg-elevated);border:1px solid var(--hairline);border-radius:14px;box-shadow:0 1px 2px #1e1c140a,0 12px 34px -18px #1e1c1447;padding:8px}.ask-home-textarea-wrap{position:relative}.ask-home textarea{position:relative;z-index:1;width:100%;border:0;outline:0;resize:none;background:transparent;font-family:var(--serif);font-size:17px;line-height:1.45;color:transparent;caret-color:var(--ink);padding:12px 12px 4px}.ask-home textarea::-moz-placeholder{color:var(--ink-faint)}.ask-home textarea::placeholder{color:var(--ink-faint)}.ask-home-foot{display:flex;align-items:center;justify-content:space-between;padding:4px 6px 4px 12px}.ask-home-provider-tools{display:flex;align-items:center;gap:10px;flex-wrap:wrap}@media (max-width: 880px){.layout-with-sidebar>.sidebar,.layout-with-sidebar>.feed-main{display:contents}.feed-chat{order:1}.sidebar-section-top-domains{order:2}.sidebar-section-trending-domains{order:3}.feed-content{order:4}.sidebar-section-tools{order:5}}.sidebar-tools-mcp{width:100%;justify-content:space-between;padding:10px 14px;font-size:15px;font-weight:600}.sidebar-tools-mcp:hover{border-color:var(--ink-faint)}.sidebar-tools-copy{font-size:12px;line-height:1.5;color:var(--ink-faint);margin:10px 0 0}.sidebar-tools-copy a{color:var(--ink-soft);text-decoration:underline;text-decoration-style:dotted}.sidebar-tools-copy code{font-family:var(--mono);font-size:11px}.chat-page{position:relative;display:flex;overflow:hidden;background:var(--bg)}.chat-main{flex:1;display:flex;flex-direction:column;min-width:0;background:var(--bg)}.chat-topbar{display:flex;align-items:center;gap:14px;padding:10px 24px;border-bottom:1px solid var(--hairline)}.chat-topbar-title{flex:1;min-width:0;font-family:var(--serif);font-size:14px;color:var(--ink-soft);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.chat-empty{flex:1;display:flex;align-items:flex-start;justify-content:center;padding:40px 24px;overflow-y:auto}.chat-empty-inner{max-width:680px;width:100%;margin-block:auto;text-align:center}.chat-empty-eyebrow{font-family:var(--mono);font-size:11px;letter-spacing:.16em;text-transform:uppercase;color:var(--ink-faint);margin-bottom:18px}.chat-empty-title{font-family:var(--serif);font-weight:500;font-size:44px;line-height:1.05;letter-spacing:-.02em;margin-bottom:14px}.chat-empty-title em{font-style:italic;font-weight:400;color:var(--accent)}.chat-empty-sub{font-family:var(--serif);font-size:16px;line-height:1.5;color:var(--ink-soft);max-width:520px;margin:0 auto 26px;text-wrap:pretty}.chat-staging-access-note{max-width:560px;margin:-12px auto 18px;color:var(--ink-soft);font-size:13px;line-height:1.45}.chat-staging-badge{flex:none;border:1px solid color-mix(in oklch,var(--accent) 36%,var(--hairline));border-radius:999px;padding:3px 7px;color:var(--accent-text);background:color-mix(in oklch,var(--accent) 7%,var(--bg-elevated));font-family:var(--mono);font-size:10px;font-weight:700;letter-spacing:.08em;line-height:1;text-transform:uppercase}.chat-examples{display:flex;flex-wrap:wrap;gap:10px;justify-content:center;margin-top:24px}.chat-example{font-family:var(--serif);font-size:14px;color:var(--ink-soft);background:var(--bg-elevated);border:1px solid var(--hairline);border-radius:999px;padding:8px 16px;transition:border-color .15s,color .15s}.chat-example:hover{border-color:var(--hairline-strong);color:var(--ink)}.chat-paper-inline-highlight{color:var(--accent-text);text-decoration-line:underline;text-decoration-color:color-mix(in oklch,var(--accent) 40%,transparent);text-decoration-thickness:1px;text-underline-offset:2px}.chat-paper-inline-highlight.is-unavailable{color:var(--negative-text);text-decoration-color:var(--negative-border)}@media (max-width: 900px){.chat-empty-title{font-size:34px}}@media (forced-colors: active){.chat-paper-inline-highlight{outline:1px solid CanvasText}}@media (max-width: 560px){.chat-topbar{padding-inline:14px}}.chat-credits-notice{position:relative;display:flex;align-items:center;justify-content:center;min-height:28px;padding:5px 52px 6px;border-bottom:1px solid var(--hairline);background:var(--bg-subtle);color:var(--ink-soft);font-size:12px;line-height:16px;text-align:center}.chat-credits-notice-close{position:absolute;top:50%;right:20px;display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;padding:0;border:0;border-radius:4px;background:transparent;color:var(--ink-soft);font-size:16px;line-height:1;cursor:pointer;transform:translateY(-50%)}.chat-credits-notice-close:hover{background:var(--hairline);color:var(--ink)}.chat-credits-notice-close:focus-visible{outline:2px solid var(--accent-text);outline-offset:1px}.chat-sidebar{position:relative;width:var(--chat-sidebar-width, var(--app-leading-column-width));flex:none;background:var(--bg-subtle);border-right:1px solid var(--hairline);display:flex;flex-direction:column;transition:margin-left .2s ease}.chat-sidebar-resize-handle{position:absolute;top:0;right:-4px;bottom:0;z-index:2;width:8px;cursor:col-resize;touch-action:none}.chat-sidebar-resize-handle:after{content:"";position:absolute;top:0;right:3px;bottom:0;left:3px;background:var(--hairline-strong);opacity:0;transition:opacity .15s}.chat-sidebar-resize-handle:hover:after,.chat-sidebar-resize-handle:focus-visible:after{opacity:1}.chat-sidebar-resize-handle:focus-visible{outline:2px solid var(--link);outline-offset:-3px}.chat-sidebar-closed{margin-left:calc(-1 * (var(--chat-sidebar-width, var(--app-leading-column-width)) + 1px))}.chat-sidebar-top{display:flex;align-items:center;gap:8px;padding:14px 12px 8px}.chat-sidebar-top .icon-btn{flex:none}.chat-new-chat{flex:1;display:flex;align-items:center;justify-content:center;gap:8px;padding:9px;background:var(--bg-elevated);border:1px solid var(--hairline);border-radius:8px;font-size:13px;font-weight:500;color:var(--ink);transition:border-color .15s}.chat-new-chat:hover{border-color:var(--hairline-strong)}.chat-sessions{flex:1;overflow-y:auto;padding:4px 8px 20px}.chat-sessions-empty{padding:18px 10px;font-family:var(--serif);font-style:italic;font-size:13px;color:var(--ink-faint)}.chat-session-group{margin-top:14px}.chat-session-group-label{font-family:var(--mono);font-size:10px;letter-spacing:.12em;text-transform:uppercase;color:var(--ink-faint);padding:6px 10px}.chat-session{display:flex;align-items:center;gap:6px;width:100%;text-align:left;padding:7px 10px;border-radius:7px;font-size:13px;color:var(--ink-soft);transition:background .12s,color .12s}.chat-session:hover{background:var(--hairline);color:var(--ink)}.chat-session-active{background:var(--hairline);color:var(--ink);font-weight:500}.chat-session-title{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.chat-session-delete{display:inline-flex;align-items:center;color:var(--ink-faint);padding:2px;border-radius:4px;flex:none}.chat-session-delete:hover{color:var(--negative-text)}.chat-session-menu{display:inline-flex;border:0;background:transparent;color:inherit;cursor:pointer;padding:0 3px;font-size:17px;line-height:1}@media (hover: hover) and (pointer: fine){.chat-session-delete,.chat-session-menu{display:none}.chat-session:hover .chat-session-delete,.chat-session:hover .chat-session-menu,.chat-session:focus-within .chat-session-delete,.chat-session:focus-within .chat-session-menu{display:inline-flex}}.chat-session-title-input{min-width:0;flex:1;border:1px solid var(--border);border-radius:4px;background:var(--surface);color:var(--ink);font:inherit;padding:2px 4px}.chat-session-context-menu{position:fixed;z-index:1000;width:150px;padding:4px;border:1px solid var(--border);border-radius:7px;background:var(--surface);box-shadow:0 8px 24px #00000029}.chat-session-context-menu button{width:100%;border:0;border-radius:4px;background:transparent;color:var(--ink);padding:7px 9px;text-align:left;cursor:pointer}.chat-session-context-menu button:hover,.chat-session-context-menu button:focus{background:var(--hairline)}.chat-session-loading,.chat-session-load-error{flex:1;display:flex;align-items:center;justify-content:center;gap:10px;color:var(--ink-soft);font-family:var(--serif);font-size:14px}.chat-session-load-error{flex-direction:column}.chat-session-load-error p{margin:0}.chat-session-load-error button{border:1px solid var(--border);border-radius:5px;padding:7px 12px;background:var(--surface);color:var(--ink);cursor:pointer}.chat-session-load-error button:hover{background:var(--bg-subtle)}@media (max-width: 900px){.chat-sidebar{position:absolute;top:0;bottom:0;left:0;z-index:60;box-shadow:0 0 40px #0003;width:var(--app-leading-column-width)}.chat-sidebar-resize-handle{display:none}.chat-sidebar-closed{margin-left:0;transform:translate(-101%);box-shadow:none}}.chat-share-button{flex:none;display:inline-flex;align-items:center;gap:7px;min-height:34px;padding:6px 11px;border:1px solid var(--hairline-strong);border-radius:8px;background:var(--bg-elevated);color:var(--ink);font-size:13px;font-weight:600}.chat-share-button:hover:not(:disabled){background:var(--bg-subtle)}.chat-share-button:disabled{cursor:not-allowed;opacity:.55}.chat-share-button:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.chat-share-button svg{width:15px;height:15px}.chat-share-toast{position:fixed;top:18px;left:50%;width:min(420px,calc(100vw - 32px));transform:translate(-50%)}.chat-share-dialog-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:110;display:grid;place-items:center;padding:20px;background:#0000006b}.chat-share-dialog{width:min(520px,100%);padding:22px;border:1px solid var(--hairline-strong);border-radius:12px;background:var(--bg-elevated);box-shadow:0 18px 60px #00000038}.chat-share-dialog h2{margin:0 0 8px;font-family:var(--serif);font-size:21px}.chat-share-dialog p{margin:0 0 14px;color:var(--ink-soft)}.chat-share-dialog input{width:100%;padding:9px 10px;border:1px solid var(--hairline-strong);border-radius:7px;background:var(--bg);color:var(--ink);font-family:var(--mono);font-size:12px}.chat-share-dialog input:focus{outline:2px solid var(--accent);outline-offset:2px}.chat-share-dialog button{display:block;margin:16px 0 0 auto;padding:7px 14px;border-radius:7px;background:var(--accent);color:#fff;font-weight:600}@media (max-width: 560px){.chat-share-button{width:34px;padding:6px;justify-content:center}.chat-share-button span{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}}.chat-capacity-dialog-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:120;display:grid;place-items:center;padding:20px;background:#0000007a}.chat-capacity-dialog{width:min(500px,100%);padding:24px;border:1px solid var(--hairline-strong);border-radius:12px;background:var(--bg-elevated);box-shadow:0 18px 60px #0000003d}.chat-capacity-dialog h2{margin:0 0 9px;font-family:var(--serif);font-size:22px}.chat-capacity-dialog p{margin:0;color:var(--ink-soft);line-height:1.5}.chat-capacity-countdown{min-height:24px;padding-top:12px;font-size:13px}.chat-capacity-dialog-actions{display:flex;justify-content:flex-end;gap:9px;margin-top:20px}.chat-capacity-dialog-actions button{padding:8px 14px;border-radius:7px;font-weight:600}.chat-capacity-cancel{border:1px solid var(--hairline-strong);background:var(--bg);color:var(--ink)}.chat-capacity-retry{background:var(--accent);color:#fff}.chat-capacity-retry:disabled{cursor:not-allowed;opacity:.5}.chat-capacity-dialog-actions button:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.chat-paused-banner{margin-bottom:.75rem;border:1px solid var(--border);border-radius:.65rem;background:var(--muted);padding:.7rem .85rem;color:var(--muted-foreground);font-size:.875rem;line-height:1.4}.chat-composer-error{margin-bottom:.75rem;border:1px solid color-mix(in oklch,#c33 35%,var(--hairline));border-radius:.65rem;background:color-mix(in oklch,#c33 8%,var(--bg-elevated));padding:.7rem .85rem;color:var(--ink);font-size:.875rem;line-height:1.4}.chat-billing-notice{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px;margin:0 0 10px;padding:9px 11px;border:1px solid color-mix(in oklch,var(--accent) 24%,var(--hairline));border-radius:9px;color:var(--ink-soft);background:color-mix(in oklch,var(--accent) 5%,var(--bg-elevated));font-size:12px;line-height:1.4}.chat-billing-notice a{flex:none;color:var(--accent-text);font-weight:600;text-decoration:none}.chat-billing-notice a:hover{text-decoration:underline}.chat-billing-notice-actions{display:flex;align-items:center;gap:10px;flex:none}.chat-billing-notice-dismiss{display:inline-flex;align-items:center;justify-content:center;width:26px;height:26px;padding:0;border:0;border-radius:6px;color:var(--ink-soft);background:transparent;cursor:pointer}.chat-billing-notice-dismiss:hover{color:var(--ink);background:color-mix(in oklch,var(--ink) 7%,transparent)}.chat-billing-notice-dismiss:focus-visible{outline:2px solid var(--accent);outline-offset:1px}.ask-home>.chat-paper-picker{top:calc(100% + 6px);bottom:auto}.chat-model-picker{position:relative;display:inline-grid;max-width:190px;flex:0 0 auto}.chat-model-picker-sizer,.chat-model-select{min-width:0;max-width:190px;padding:3px 22px 3px 8px;font-family:var(--mono);font-size:11px}.chat-model-picker-sizer{visibility:hidden;overflow:hidden;white-space:nowrap}.chat-model-select{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;height:100%;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:0;border-radius:6px;background:var(--accent-soft);color:var(--accent-text);cursor:pointer}.chat-model-picker-chevron{position:absolute;top:50%;right:6px;width:10px;height:7px;transform:translateY(-50%);fill:none;stroke:var(--accent-text);stroke-linecap:round;stroke-linejoin:round;stroke-width:1.75;pointer-events:none}.chat-model-picker.is-disabled{opacity:.65}.chat-model-select:disabled{cursor:default}.chat-model-label{max-width:190px;border-radius:6px;background:var(--accent-soft);color:var(--accent-text);padding:3px 8px;font-family:var(--mono);font-size:11px}.chat-empty .chat-composer{text-align:left}.chat-composer-wrap{border-top:1px solid var(--hairline);background:var(--bg);padding:14px 28px 16px}.chat-composer-inner{max-width:820px;margin:0 auto}.chat-composer{position:relative;background:var(--bg-elevated);border:1px solid var(--hairline);border-radius:14px;box-shadow:0 1px 2px #1e1c140a,0 10px 30px -20px #1e1c144d;padding:6px}.chat-composer-textarea-wrap{position:relative}.chat-paper-highlight-layer{position:absolute;z-index:0;top:0;right:0;bottom:0;left:0;box-sizing:border-box;overflow:hidden;pointer-events:none;color:transparent}.chat-paper-highlight-layer>div{min-height:100%;white-space:pre-wrap;overflow-wrap:break-word;word-break:break-word;color:var(--ink)}.chat-paper-highlight-layer-composer{padding:12px 12px 4px;font-family:var(--serif);font-size:16px;line-height:1.45}.chat-paper-highlight-layer-editor{padding:9px 11px;font-family:var(--serif);font-size:16px;line-height:1.45}.chat-paper-highlight-layer-home{padding:12px 12px 4px;font-family:var(--serif);font-size:17px;line-height:1.45}.chat-paper-picker{position:absolute;z-index:50;left:8px;bottom:calc(100% + 6px);width:min(560px,calc(100vw - 48px));max-height:384px;overflow-y:auto;border:1px solid var(--hairline-strong);border-radius:11px;background:var(--bg-elevated);box-shadow:0 16px 38px -16px #1e1c1473}.chat-slash-command{position:absolute;z-index:50;left:8px;bottom:calc(100% + 6px);display:flex;width:min(560px,calc(100vw - 48px));min-height:52px;align-items:center;gap:10px;padding:9px 12px;border:1px solid var(--hairline-strong);border-radius:11px;color:var(--ink);background:var(--bg-elevated);box-shadow:0 16px 38px -16px #1e1c1473;text-align:left}.chat-slash-command:hover{background:var(--accent-soft)}.chat-slash-command span{color:var(--ink-faint);font-size:12px}.chat-paper-picker-status{padding:10px 12px;color:var(--ink-faint);font-size:12px}.chat-paper-option{display:flex;width:100%;min-height:64px;flex-direction:column;justify-content:center;gap:3px;padding:9px 12px;border:0;border-top:1px solid var(--hairline);color:var(--ink);background:transparent;text-align:left}.chat-paper-option.is-active,.chat-paper-option:hover{background:var(--accent-soft)}.chat-paper-option-title{font-family:var(--serif);font-size:14px;line-height:1.25}.chat-paper-option-meta{color:var(--ink-faint);font-family:var(--mono);font-size:10.5px}.chat-paper-mention-message{padding:3px 12px;color:var(--negative-text);font-size:11.5px}.chat-inline-paper-mention{display:inline}.chat-inline-paper-mention svg{display:inline-block;margin-right:3px;color:var(--accent-text);vertical-align:-.12em}.chat-inline-paper-link{color:var(--accent-text);font-weight:600;text-decoration-line:underline;text-decoration-color:color-mix(in oklch,var(--accent) 40%,transparent);text-decoration-thickness:1px;text-underline-offset:2px}.chat-inline-paper-link:hover{text-decoration-color:var(--accent-text)}.chat-composer textarea{position:relative;z-index:1;width:100%;border:0;outline:0;resize:none;background:transparent;font-family:var(--serif);font-size:16px;line-height:1.45;color:transparent;caret-color:var(--ink);padding:12px 12px 4px}.chat-composer textarea::-moz-placeholder{color:var(--ink-faint)}.chat-composer textarea::placeholder{color:var(--ink-faint)}.chat-composer-row{display:flex;align-items:center;justify-content:space-between;padding:2px 6px 4px}.chat-composer-tools{display:flex;align-items:center;flex-wrap:wrap;gap:12px}.chat-web-search-toggle{display:inline-flex;align-items:center;gap:5px;min-height:30px;padding:4px 9px;border:1px solid var(--hairline);border-radius:8px;background:transparent;color:var(--ink-muted);font:inherit;font-size:12px;cursor:pointer}.chat-web-search-toggle:hover:not(:disabled){border-color:var(--hairline-strong);color:var(--ink)}.chat-web-search-toggle.is-enabled{border-color:var(--accent);background:var(--accent-soft);color:var(--accent-text)}.chat-web-search-toggle:disabled{cursor:default;opacity:.55}.chat-effort-picker{position:relative}.chat-effort-trigger{display:inline-flex;align-items:center;gap:4px;min-height:30px;padding:4px 8px 4px 10px;border:1px solid var(--hairline);border-radius:8px;background:transparent;color:var(--ink-muted);font:inherit;font-size:12px;cursor:pointer}.chat-effort-trigger:hover:not(:disabled){border-color:var(--hairline-strong);color:var(--ink)}.chat-effort-trigger:disabled{cursor:default;opacity:.55}.chat-effort-menu{position:absolute;z-index:40;left:0;bottom:calc(100% + 7px);width:220px;padding:6px;border:1px solid var(--hairline);border-radius:11px;background:var(--bg-elevated);box-shadow:0 14px 36px -14px #1e1c1473}.ask-home .chat-effort-menu{top:calc(100% + 7px);bottom:auto}.chat-effort-menu-label{padding:5px 10px 6px;color:var(--ink-faint);font-size:11px;font-weight:600;letter-spacing:.02em}.chat-effort-option{display:flex;align-items:center;justify-content:space-between;gap:10px;width:100%;padding:9px 10px;border:0;border-radius:7px;background:transparent;color:var(--ink);text-align:left;cursor:pointer}.chat-effort-option:hover,.chat-effort-option.is-selected{background:var(--bg-subtle)}.chat-effort-option-copy{display:flex;flex-direction:column;gap:2px}.chat-effort-option-copy strong{font-size:13px;font-weight:600}.chat-effort-option-copy small{color:var(--ink-faint);font-size:11px}.chat-composer-hint{font-size:11.5px;color:var(--ink-faint)}.chat-composer-foot{display:flex;align-items:center;justify-content:center;gap:6px;text-align:center;font-size:11.5px;color:var(--ink-faint);margin-top:9px}.chat-provider-attribution{white-space:nowrap}.chat-send{display:flex;align-items:center;justify-content:center;width:38px;height:38px;border-radius:10px;background:var(--hairline);color:var(--bg-elevated);cursor:not-allowed;transition:background .15s;flex:none}.chat-send-on{background:var(--ink);cursor:pointer}.chat-send-on:hover{background:color-mix(in oklch,var(--ink) 88%,var(--accent))}@media (max-width: 900px){.chat-composer-wrap{padding:12px 16px 14px}.chat-composer-foot,.chat-composer-hint{display:none}}@media (prefers-reduced-motion: reduce){.chat-paper-option{scroll-behavior:auto}}@media (forced-colors: active){.chat-paper-option.is-active,.chat-inline-paper-link{outline:1px solid CanvasText}.chat-paper-selection,.chat-paper-selection-remove,.chat-paper-selection-toggle{border:1px solid ButtonText}}.chat-paper-selection{margin:6px 6px 0;padding:8px 10px;border:1px solid var(--hairline);border-radius:10px;background:var(--bg-subtle);text-align:left}.chat-paper-selection-header{display:flex;align-items:center;justify-content:space-between;gap:8px}.chat-paper-selection-label{color:var(--ink-soft);font-size:11px;font-weight:600;letter-spacing:.02em;text-transform:uppercase}.chat-paper-selection-actions{display:flex;align-items:center;gap:6px}.chat-paper-selection-toggle,.chat-paper-selection-remove{border:0;padding:2px 6px;background:transparent;color:var(--accent-text);font-size:11.5px}.chat-paper-selection-quote{display:-webkit-box;max-height:4.35em;margin:6px 0 0;overflow:hidden;color:var(--ink);font-family:var(--serif);font-size:13px;line-height:1.45;white-space:pre-wrap;-webkit-box-orient:vertical;-webkit-line-clamp:3}.chat-paper-selection-quote.is-expanded{display:block;max-height:8.5em;overflow:auto;-webkit-line-clamp:unset}.chat-paper-selection-disabled{padding:4px 12px 0;color:var(--negative-text);font-size:11.5px}.chat-paper-link{color:var(--accent-text);border-bottom:1px solid color-mix(in oklch,var(--accent-text) 35%,transparent);white-space:normal}.chat-paper-link:hover{border-bottom-color:var(--accent-text)}.chat-hf-link:after{content:" 🤗";font-size:.85em;white-space:nowrap}.chat-github-link{color:var(--accent-text);border-bottom:1px solid color-mix(in oklch,var(--accent-text) 35%,transparent)}.chat-github-link:hover{border-bottom-color:var(--accent-text)}.chat-github-link svg{display:inline-block;width:1em;height:1em;margin-right:.3em;vertical-align:-.14em}.chat-external-link{color:var(--accent-text);text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:2px}.chat-external-link:hover{text-decoration-thickness:2px}.chat-web-citation{color:var(--accent-text);text-decoration:underline;text-decoration-style:dotted;text-underline-offset:2px}.chat-external-paper-citation{color:var(--chat-link);text-decoration:underline;text-decoration-color:color-mix(in srgb,var(--chat-link) 35%,transparent);text-underline-offset:2px}.external-paper-preview-pop.external-paper-preview-pop{width:min(390px,calc(100vw - 24px));padding:0;overflow:hidden;border-color:var(--chat-border);background:var(--chat-surface);color:var(--chat-text)}.external-paper-preview-card{padding:14px}.external-paper-preview-source{display:flex;gap:6px;margin-bottom:7px;color:var(--chat-muted);font-size:12px}.external-paper-preview-card strong{display:block;color:var(--chat-text);font-size:14px;line-height:1.35}.external-paper-preview-card p{margin:7px 0 0;color:var(--chat-muted);font-size:12px;line-height:1.45;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:4;overflow:hidden}.external-paper-preview-authors{-webkit-line-clamp:2!important}.external-paper-preview-citations{display:block;margin-top:9px;color:var(--chat-muted);font-size:11px}.web-preview-pop.web-preview-pop{width:min(360px,calc(100vw - 24px));padding:0;overflow:hidden;border:1px solid var(--hairline);border-radius:12px;background:var(--bg-elevated);color:var(--ink);box-shadow:0 14px 44px -12px #1e1c1466}.web-preview-card{display:flex;flex-direction:column}.web-preview-image{display:block;width:100%;height:174px;-o-object-fit:cover;object-fit:cover;background:var(--bg-subtle);border-bottom:1px solid var(--hairline)}.web-preview-meta{padding:13px 14px 14px;min-width:0}.web-preview-source{display:flex;align-items:center;gap:5px;margin-bottom:6px;color:var(--ink-faint);font-size:11px}.web-preview-source img{width:14px;height:14px;border-radius:3px}.web-preview-meta strong{display:block;font-family:var(--serif);font-size:15px;font-weight:500;line-height:1.3}.web-preview-meta p{display:-webkit-box;overflow:hidden;margin:7px 0 0;color:var(--ink-soft);font-size:12px;line-height:1.4;-webkit-box-orient:vertical;-webkit-line-clamp:3}.paper-preview-pop.paper-preview-pop{width:min(344px,calc(100vw - 24px));padding:0;border:1px solid var(--hairline);border-radius:12px;background:var(--bg-elevated);color:var(--ink);box-shadow:0 14px 44px -12px #1e1c1466;overflow:hidden}.paper-preview-inner{display:flex;gap:14px;padding:14px}.paper-preview-meta{min-width:0;flex:1}.paper-preview-title{font-family:var(--serif);font-weight:500;font-size:15px;line-height:1.25;margin-bottom:5px}.paper-preview-auth{font-size:12px;color:var(--ink-soft);line-height:1.35}.paper-preview-venue{font-size:11.5px;color:var(--ink-faint);margin-top:3px;font-variant-numeric:tabular-nums}.paper-preview-tags{display:flex;flex-wrap:wrap;gap:5px;margin:9px 0}.paper-preview-tag{font-size:10.5px;font-family:var(--mono);background:var(--positive-bg);color:var(--positive-text);border-radius:5px;padding:2px 7px}.paper-preview-status{min-height:48px;padding:14px;display:flex;align-items:center;color:var(--ink-soft);font-size:12px}.paper-preview-index-request{flex-wrap:wrap;gap:6px 12px}.paper-preview-index-request a,.paper-preview-index-request button{color:var(--accent);font:inherit;border:0;background:transparent;padding:0;cursor:pointer}.paper-preview-index-request button:disabled{color:var(--ink-soft);cursor:default}.paper-preview-index-request a:focus-visible,.paper-preview-index-request button:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.paper-preview-index-request [role=alert]{flex-basis:100%;color:var(--negative-text, var(--ink-soft))}.paper-preview-thumb{position:relative;width:96px;height:124px;flex:none;background:var(--bg-elevated);border:1px solid var(--hairline);border-radius:3px;box-shadow:0 1px 3px #1e1c1414;overflow:hidden;padding:11px 10px}.paper-preview-thumb-real{padding:0}.paper-preview-thumb-real img{display:block;width:100%;height:100%;-o-object-fit:contain;object-fit:contain}.paper-preview-thumb-title{display:flex;flex-direction:column;align-items:center;gap:3px;margin-bottom:8px}.paper-preview-thumb-title span{height:3px;background:var(--ink);border-radius:2px}.paper-preview-thumb-title span:first-child{width:70%}.paper-preview-thumb-title span:last-child{width:52%}.paper-preview-thumb-auth{height:2px;width:40%;margin:0 auto 9px;background:var(--ink-faint);border-radius:2px}.paper-preview-thumb-cols{display:flex;gap:7px}.paper-preview-thumb-col{flex:1;height:74px;background:repeating-linear-gradient(var(--hairline-strong) 0 2px,transparent 2px 5px);opacity:.7}.paper-preview-thumb-fig{position:absolute;left:14px;right:14px;height:22px;background:var(--bg-subtle);border:1px solid var(--hairline);border-radius:2px}.hf-preview-pop.hf-preview-pop{width:min(172px,calc(100vw - 24px));padding:0;border:1px solid var(--hairline);border-radius:12px;background:var(--bg-elevated);color:var(--ink);box-shadow:0 14px 44px -12px #1e1c1466;overflow:hidden}.hf-preview-card{display:grid}.hf-preview-image,.hf-preview-fallback{display:block;width:100%;aspect-ratio:2 / 1;-o-object-fit:cover;object-fit:cover;background:var(--bg-subtle)}.hf-preview-fallback{display:grid;place-items:center;font-size:48px;background:radial-gradient(circle at 70% 35%,rgba(84,104,255,.4),transparent 45%),linear-gradient(135deg,#0f6d79,#d18a48)}.hf-preview-meta{display:grid;gap:3px;padding:12px 14px 14px}.hf-preview-meta strong{overflow-wrap:anywhere;font-size:14px}.hf-preview-kind,.hf-preview-meta>span:last-child{color:var(--ink-faint);font-size:11.5px}.github-preview-pop.github-preview-pop{width:min(344px,calc(100vw - 24px));padding:0;border:1px solid var(--hairline);border-radius:12px;background:var(--bg-elevated);color:var(--ink);box-shadow:0 14px 44px -12px #1e1c1466;overflow:hidden}.github-preview-card{display:flex;gap:14px;padding:14px}.github-preview-image,.github-preview-fallback{display:block;width:72px;height:72px;flex:none;-o-object-fit:cover;object-fit:cover;border-radius:12px;background:var(--bg-subtle)}.github-preview-fallback{display:grid;place-items:center;color:#fff;background:linear-gradient(135deg,#24292f,#57606a)}.github-preview-fallback svg{width:36px;height:36px}.github-preview-meta{display:grid;gap:3px;min-width:0}.github-preview-meta strong{overflow-wrap:anywhere;font-size:14px}.github-preview-kind,.github-preview-meta>span:last-child{color:var(--ink-faint);font-size:11.5px}.github-preview-description{display:-webkit-box;overflow:hidden;color:var(--ink-soft);font-size:12px;line-height:1.35;-webkit-box-orient:vertical;-webkit-line-clamp:2}.github-preview-stats{font-variant-numeric:tabular-nums}.catalog-preview-pop.catalog-preview-pop{width:min(320px,calc(100vw - 24px));padding:0;border:1px solid var(--hairline);border-radius:12px;background:var(--bg-elevated);color:var(--ink);box-shadow:0 14px 44px -12px #1e1c1466;overflow:hidden}.catalog-preview-card{display:grid}.catalog-preview-image{display:block;width:100%;aspect-ratio:2 / 1;-o-object-fit:cover;object-fit:cover;background:var(--bg-subtle);border-bottom:1px solid var(--hairline)}.catalog-preview-meta{display:grid;gap:3px;padding:12px 14px 14px}.catalog-preview-meta strong{font-family:var(--serif);font-weight:500;font-size:15px;line-height:1.25}.catalog-preview-meta p{display:-webkit-box;overflow:hidden;margin:3px 0 0;color:var(--ink-soft);font-size:12px;line-height:1.4;-webkit-box-orient:vertical;-webkit-line-clamp:3}.catalog-preview-kind,.catalog-preview-stats{color:var(--ink-faint);font-size:11.5px;font-variant-numeric:tabular-nums}.catalog-preview-stats{margin-top:4px}.chat-artifact-card{width:min(100%,620px);display:flex;gap:14px;align-items:stretch;padding:0;overflow:hidden;text-align:left;color:var(--chat-text, #182230);background:#fff;border:1px solid #d8dee8;border-radius:14px;box-shadow:0 5px 18px #0f172a12}button.chat-artifact-card{cursor:pointer}.chat-artifact-card.is-selected{border-color:var(--accent);box-shadow:0 0 0 2px color-mix(in oklch,var(--accent) 22%,transparent)}.chat-artifact-card>img{width:190px;aspect-ratio:5 / 3;-o-object-fit:cover;object-fit:cover;background:#eef1f5}.chat-artifact-card-copy{display:flex;min-width:0;flex:1;flex-direction:column;justify-content:center;gap:7px;padding:14px 14px 14px 0}.chat-artifact-card-copy strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.chat-artifact-kicker{display:flex;align-items:center;gap:6px;color:#637083;font-size:12px}.chat-artifact-kicker svg{width:14px;height:14px}.chat-artifact-gate{width:-moz-fit-content;width:fit-content;padding:3px 8px;border-radius:999px;color:#11643b;background:#e7f7ee;font-size:11px;font-weight:650}.chat-artifact-gate-warnings{color:#7a4a00;background:#fff3d6}.chat-artifact-gate-failed{color:#9b2c2c;background:#fee9e7}.chat-artifact-generating,.chat-artifact-error{align-items:center;padding:16px}.chat-artifact-generating span:not(.chat-artifact-pulse),.chat-artifact-error span{display:flex;flex-direction:column;gap:3px}.chat-artifact-generating small,.chat-artifact-error small{color:#687386}.chat-artifact-error{border-color:#efb7b1}.chat-artifact-error>svg{width:24px;color:#b3372d}.chat-artifact-pulse{width:22px;height:22px;border:3px solid #d7dde8;border-top-color:#5367d9;border-radius:50%;animation:chat-artifact-spin .8s linear infinite}@keyframes chat-artifact-spin{to{transform:rotate(360deg)}}.chat-artifact-workspace{position:relative;min-width:0;min-height:0;flex:1;display:flex;overflow:hidden}.chat-artifact-workspace-content{min-width:0;min-height:0;flex:1;display:flex;overflow:hidden}.chat-artifact-workspace-chat>.chat-artifact-workspace-content>.chat-main{width:100%}.chat-artifact-workspace-shared{min-height:0}.chat-artifact-workspace-shared>.chat-artifact-workspace-content{overflow:auto}.chat-artifact-workspace-reader{height:100%}.chat-artifact-workspace-reader>.chat-artifact-workspace-content>.reader-workspace{width:100%}.chat-artifact-workspace-pane{min-width:0;min-height:0;flex:none;display:flex;overflow:hidden}.chat-artifact-resize-handle{position:relative;z-index:7;width:1px;flex:0 0 1px;cursor:col-resize;background:var(--hairline-strong);touch-action:none;outline:none}.chat-artifact-resize-handle:before{content:"";position:absolute;top:0;right:-8px;bottom:0;left:-8px}.chat-artifact-resize-handle:focus-visible{box-shadow:0 0 0 2px var(--accent)}.chat-artifact-panel{width:100%;height:100%;min-width:0;min-height:0;display:grid;grid-template-rows:auto auto minmax(0,1fr) auto;overflow:hidden;color:var(--ink);background:#f6f7f9;border-left:1px solid var(--hairline)}.chat-artifact-panel.is-dialog{position:fixed;z-index:1200;top:0;right:0;bottom:0;left:0;border:0}.chat-artifact-panel.is-reader-fallback{position:absolute}.chat-artifact-panel header{display:flex;align-items:center;justify-content:space-between;padding:16px 20px;background:#fff;border-bottom:1px solid #dce1e8}.chat-artifact-panel header span{color:#6d7788;font-size:12px;text-transform:uppercase;letter-spacing:.06em}.chat-artifact-panel h2{margin:2px 0 0;font-size:18px}.chat-artifact-panel header button{display:grid;place-items:center;width:36px;height:36px;border:0;border-radius:8px;background:transparent;cursor:pointer}.chat-paper-status{margin:4px 0 0;color:#687386;font-size:12px}.chat-artifact-header-actions{display:flex;align-items:center;gap:6px}.chat-artifact-header-actions>button:first-child{width:auto;min-height:36px;padding:7px 10px;border:1px solid #cfd6e4;color:#253143;background:#fff;font-size:12px}.chat-artifact-version{display:flex;align-items:center;gap:7px;margin-left:auto;margin-right:8px;color:#687386;font-size:12px}.chat-artifact-version select{padding:6px 8px;border:1px solid #cfd6e4;border-radius:7px;background:#fff}.chat-artifact-panel>nav{position:sticky;z-index:1;top:0;display:flex;gap:4px;padding:8px 18px 0;background:#fff}.chat-artifact-panel nav button{padding:9px 14px;border:0;border-bottom:2px solid transparent;color:#667085;background:transparent;cursor:pointer}.chat-artifact-panel nav button.active{color:#273a91;border-bottom-color:#5367d9;font-weight:650}.chat-artifact-panel button:focus-visible,.chat-artifact-panel a:focus-visible,.chat-artifact-panel input:focus-visible,.latex-source-editor .cm-content:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.chat-artifact-panel-body{min-height:0;display:grid;place-items:center;overflow:auto;padding:20px}.chat-artifact-panel-body>.pdf-viewer{align-self:stretch;justify-self:stretch;width:100%;height:100%}.chat-artifact-panel-body>img{max-width:100%;max-height:100%;-o-object-fit:contain;object-fit:contain;background:#fff;box-shadow:0 4px 22px #0f172a1f}.chat-artifact-panel-body>pre{align-self:stretch;justify-self:stretch;overflow:auto;margin:0;padding:18px;color:#d8dee9;background:#18202c;border-radius:10px;font-size:12px;white-space:pre-wrap}.chat-artifact-source-workspace{width:100%;height:100%;min-height:0;display:flex;overflow:hidden;border-radius:10px;background:#18202c}.chat-artifact-source-workspace>nav{width:min(180px,28%);flex:none;display:flex;flex-direction:column;overflow:auto;padding:10px;border-right:1px solid #ffffff24}.chat-artifact-source-workspace>nav button{overflow:hidden;border:0;padding:7px 8px;color:#aeb8c8;background:transparent;text-align:left;text-overflow:ellipsis;white-space:nowrap}.chat-artifact-source-workspace>nav button[aria-pressed=true]{color:#fff;background:#ffffff14}.chat-artifact-source-workspace>pre{min-width:0;flex:1;overflow:auto;margin:0;padding:18px;color:#d8dee9;font-size:12px;white-space:pre-wrap}.latex-editor-column{min-width:0;flex:1;display:flex;flex-direction:column;color:#d8dee9}.latex-source-editor{min-width:0;min-height:0;flex:1;overflow:auto}.latex-source-editor .cm-editor{height:100%;min-height:320px;font-size:13px}.latex-source-editor .cm-scroller{overflow:auto;font-family:ui-monospace,SFMono-Regular,Menlo,monospace}.latex-file-action{display:flex;align-items:center;gap:6px;margin-top:8px}.latex-file-action svg,.latex-file-buttons svg{width:14px;height:14px}.latex-file-buttons{display:flex;gap:8px;padding:8px;border-top:1px solid #ffffff24}.latex-file-buttons button,.chat-artifact-actions button{display:inline-flex;align-items:center;gap:7px;border:0;border-radius:7px;padding:8px 10px;cursor:pointer}.chat-artifact-actions button:disabled{cursor:not-allowed;opacity:.55}.chat-artifact-panel footer{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;padding:14px 20px;background:#fff;border-top:1px solid #dce1e8}.chat-artifact-metadata{display:flex;min-width:0;flex-direction:column;gap:3px;color:#687386;font-size:12px}.chat-artifact-metadata strong{color:#253143}.chat-artifact-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:8px}.chat-artifact-actions a{display:inline-flex;align-items:center;gap:5px;padding:8px 10px;color:#263b94;border:1px solid #cfd6e4;border-radius:8px;text-decoration:none;font-size:12px;font-weight:600}.chat-artifact-actions svg{width:14px;height:14px}.paper-pdf-toolbar{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px;width:100%;padding:8px;border-bottom:1px solid #dce1e8;background:#fff}.paper-pdf-toolbar-group{display:flex;align-items:center;gap:6px}.paper-pdf-toolbar button,.paper-pdf-toolbar input,.paper-pdf-toolbar a{min-height:32px;border:1px solid #cfd6e4;border-radius:7px;padding:5px 8px;color:#253143;background:#fff;font-size:12px;text-decoration:none}.paper-pdf-toolbar input{width:56px}.paper-pdf-toolbar button:disabled{cursor:not-allowed;opacity:.55}@media (max-width: 700px){.chat-artifact-card>img{width:120px}.chat-artifact-panel{width:100vw;height:100dvh}.chat-artifact-panel footer{align-items:stretch;flex-direction:column}.chat-artifact-actions{justify-content:flex-start}.chat-artifact-panel header{padding:12px 14px}.chat-artifact-header-actions>button:first-child{padding-inline:8px}.paper-pdf-toolbar{align-items:flex-start;flex-direction:column}}@media (forced-colors: active){.chat-artifact-resize-handle,.chat-artifact-card.is-selected{border:1px solid ButtonText}}@media (prefers-reduced-motion: reduce){.chat-artifact-pulse{animation-duration:.01ms}}.chat-ghost-link{color:var(--ink-soft);font-size:13px;padding:6px 10px;border-radius:6px}.chat-ghost-link:hover{color:var(--ink);background:var(--bg-subtle)}.chat-conversation-viewport{position:relative;display:flex;flex-direction:column;flex:1;min-height:0}.chat-conversation{flex:1;min-height:0;overflow-y:auto}.chat-jump-latest{position:absolute;bottom:12px;left:50%;transform:translate(-50%);border:1px solid var(--border);border-radius:20px;padding:8px 14px;background:var(--bg);color:var(--ink);box-shadow:0 2px 8px #0000001f;white-space:nowrap;cursor:pointer}.chat-conversation-inner{max-width:820px;margin:0 auto;padding:30px 28px 40px}.chat-msg{margin-bottom:26px}.chat-msg-user{display:flex;justify-content:flex-end}.chat-user-message-wrap{display:flex;flex-direction:column;align-items:flex-end;max-width:74%}.chat-bubble{background:var(--accent-soft);color:var(--ink);border:1px solid color-mix(in oklch,var(--accent-soft) 70%,var(--hairline));border-radius:16px 16px 4px;padding:12px 18px;font-family:var(--serif);font-size:16px;line-height:1.45;max-width:100%;white-space:pre-wrap;overflow-wrap:anywhere;-webkit-user-select:text;-moz-user-select:text;user-select:text;cursor:text}.chat-bubble::-moz-selection,.chat-bubble *::-moz-selection{background:var(--accent);color:var(--bg)}.chat-bubble::selection,.chat-bubble *::selection{background:var(--accent);color:var(--bg)}.chat-user-actions{display:flex;justify-content:flex-end;gap:2px;min-height:30px;padding:4px 2px 0;opacity:0;transform:translateY(-2px);transition:opacity .14s ease,transform .14s ease;-webkit-user-select:none;-moz-user-select:none;user-select:none}.chat-msg-user:hover .chat-user-actions,.chat-msg-user:focus-within .chat-user-actions{opacity:1;transform:translateY(0)}.chat-user-action{width:28px;height:28px;display:inline-flex;align-items:center;justify-content:center;border:1px solid transparent;border-radius:999px;color:var(--ink-soft);background:transparent}.chat-user-action:hover{color:var(--ink);background:var(--bg-elevated);border-color:var(--hairline)}.chat-user-action:focus-visible{outline:2px solid var(--accent);outline-offset:2px;opacity:1}.chat-user-action svg{width:14px;height:14px}.chat-inline-editor{width:min(620px,74%);min-width:min(360px,100%);padding:12px;border:1px solid color-mix(in oklch,var(--accent) 45%,var(--hairline));border-radius:16px 16px 4px;background:var(--accent-soft);box-shadow:0 8px 28px #00000014}.chat-inline-editor-textarea{position:relative;z-index:1;display:block;width:100%;min-height:72px;padding:8px 10px;resize:none;border:1px solid var(--hairline-strong);border-radius:10px;color:var(--ink);background:transparent;font-family:var(--serif);font-size:16px;line-height:1.45;white-space:pre-wrap}.chat-inline-editor-textarea-wrap{position:relative;background:var(--bg-elevated);border-radius:10px}.chat-inline-editor-textarea-wrap .chat-inline-editor-textarea{color:transparent;caret-color:var(--ink)}.chat-inline-editor-textarea:focus{outline:2px solid var(--accent);outline-offset:1px}.chat-inline-editor-notice{margin:8px 2px 0;color:var(--ink-soft);font-size:12.5px;line-height:1.4}.chat-inline-editor-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:10px}.chat-inline-editor-actions button{min-height:34px;padding:6px 14px;border:1px solid var(--hairline-strong);border-radius:999px;color:var(--ink);background:var(--bg-elevated);font-size:13px;font-weight:600}.chat-inline-editor-actions button:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.chat-inline-editor-actions .chat-inline-editor-send{color:#fff;border-color:var(--accent);background:var(--accent)}.chat-inline-editor-actions button:disabled{cursor:not-allowed;opacity:.5}.chat-msg-blocks{display:flex;flex-direction:column;gap:14px}.chat-waiting{min-height:20px;display:flex;align-items:center;font-size:13px;font-weight:600}.chat-thinking{color:transparent;background:linear-gradient(100deg,var(--ink-faint) 30%,var(--accent-text) 50%,var(--ink-faint) 70%);background-size:220% 100%;background-clip:text;-webkit-background-clip:text;animation:chat-thinking-glow 1.8s ease-in-out infinite}@keyframes chat-thinking-glow{0%{background-position:100% 0}to{background-position:-100% 0}}@media (prefers-reduced-motion: reduce){.chat-thinking{color:var(--accent-text);background:none;animation:none}}.chat-reason-live{border:1px solid var(--hairline);border-left:2px solid var(--accent);background:var(--bg-elevated);border-radius:10px;padding:14px 16px}.chat-reason-live-head{display:flex;align-items:center;gap:9px;font-size:12.5px;font-weight:600;color:var(--accent-text)}.chat-reason-live-body{margin-top:9px;font-family:var(--serif);font-size:14.5px;line-height:1.6;color:var(--ink-soft)}.chat-reason-done{border:1px solid var(--hairline);border-radius:10px;background:var(--bg-elevated);overflow:hidden}.chat-reason-done-head{display:flex;align-items:center;gap:9px;width:100%;padding:11px 15px;font-size:13px;color:var(--ink-soft);font-weight:500;text-align:left}.chat-reason-done-head svg:first-child{color:var(--positive-text);flex:none}.chat-reason-done-head .chat-chev{margin-left:auto}.chat-reason-done-head:hover{color:var(--ink)}.chat-reason-done-body{padding:2px 16px 16px 39px;font-family:var(--serif);font-size:14px;line-height:1.65;color:var(--ink-soft)}.chat-answer.chat-reason-markdown{padding-top:0;padding-right:0;padding-bottom:0;font-size:inherit;line-height:inherit;color:inherit;white-space:normal}.chat-answer.chat-reason-live-body{padding-left:23px}.chat-answer.chat-reason-done-body{padding:2px 16px 16px 39px}.chat-tool{border:1px solid var(--hairline);border-radius:10px;background:var(--bg-elevated);overflow:hidden}.chat-tool-running{border-color:color-mix(in oklch,var(--accent) 35%,var(--hairline))}.chat-tool-failed{border-color:color-mix(in oklch,#b42318 55%,var(--hairline))}.chat-tool-failed .chat-tool-status{color:#b42318;font-weight:600}.chat-tool-head{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;padding:11px 15px;text-align:left}.chat-tool-head:disabled{cursor:default}.chat-tool-head-left{display:flex;align-items:center;gap:9px;min-width:0}.chat-tool-head-left>svg{color:var(--accent-text);flex:none}.chat-tool-name{font-family:var(--mono);font-size:12px;font-weight:600;color:var(--ink);background:var(--bg-subtle);border:1px solid var(--hairline);border-radius:5px;padding:2px 7px;flex:none}.chat-tool-query{font-family:var(--serif);font-style:italic;font-size:13.5px;color:var(--ink-soft);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.chat-tool-head-right{display:flex;align-items:center;gap:10px;flex:none}.chat-tool-status{font-size:11.5px;color:var(--ink-soft);font-variant-numeric:tabular-nums}.chat-tool-body{padding:4px 16px 16px;border-top:1px solid var(--hairline)}.chat-tool-args{margin:12px 0 4px}.chat-tool-label{display:block;font-family:var(--mono);font-size:10px;letter-spacing:.1em;text-transform:uppercase;color:var(--ink-faint);margin-bottom:6px}.chat-tool-args pre{margin:0;background:var(--bg-subtle);border:1px solid var(--hairline);border-radius:8px;padding:10px 12px;font-family:var(--mono);font-size:11.5px;line-height:1.5;color:var(--ink-soft);overflow-x:auto}.chat-tool-results-label{margin-top:16px}.chat-tool-output-head{display:flex;align-items:center;justify-content:space-between;margin-top:14px}.chat-tool-output-head .chat-tool-label{margin-bottom:0}.chat-tool-copy{color:var(--accent-text);font-family:var(--mono);font-size:11px}.chat-tool-output{max-height:320px;margin:7px 0 0;overflow:auto;white-space:pre;-moz-tab-size:4;-o-tab-size:4;tab-size:4;border:1px solid var(--hairline);border-radius:8px;background:var(--bg-subtle);padding:11px 12px;color:var(--ink);font-family:var(--mono);font-size:11.5px;line-height:1.5}.chat-tool-truncated{margin-top:7px;color:var(--ink-faint);font-size:11px}.chat-mcp-app{border:1px solid var(--chat-border, #d8d8de);border-radius:12px;overflow:hidden;background:var(--chat-surface, #fff)}.chat-mcp-app>header{display:flex;justify-content:flex-end;padding:8px 10px 0}.chat-mcp-app button{border:0;border-radius:6px;background:#eef1f5;padding:5px 8px;cursor:pointer}.chat-mcp-app iframe{display:block;width:100%;border:0;background:#fff;aspect-ratio:4 / 3}.chat-mcp-loading,.chat-mcp-error{min-height:180px;aspect-ratio:4 / 3;display:grid;place-items:center;padding:18px;color:#52606d;text-align:center}.chat-mcp-error{gap:12px}.chat-mcp-app-fullscreen{position:fixed;top:16px;right:16px;bottom:16px;left:16px;z-index:1000}.chat-mcp-app-fullscreen iframe{height:calc(100vh - 72px)!important;aspect-ratio:auto}.chat-tool-results{list-style:none;margin:0;padding:0}.chat-hit{padding:11px 0;border-top:1px solid var(--hairline)}.chat-hit:first-child{border-top:0}.chat-hit-top{display:flex;align-items:baseline;gap:12px}.chat-hit-title{font-family:var(--serif);font-size:14.5px;font-weight:600;color:var(--accent-text);flex:1;line-height:1.3}.chat-hit-title:hover{text-decoration:underline}.chat-hit-meta{font-size:12px;color:var(--ink-faint);margin-top:2px}.chat-hit-truncated{color:var(--ink-faint);font-style:italic}.chat-hit-snippet{font-family:var(--serif);font-size:13.5px;line-height:1.5;color:var(--ink-soft);margin-top:5px;text-wrap:pretty}.chat-answer{font-family:var(--serif);font-size:16.5px;line-height:1.65;color:var(--ink);text-wrap:pretty;padding:2px}.chat-answer>:first-child{margin-top:0}.chat-answer>:last-child{margin-bottom:0}.chat-answer p{margin:0 0 .9em}.chat-answer h1,.chat-answer h2,.chat-answer h3,.chat-answer h4{font-family:var(--sans);font-weight:600;line-height:1.3;margin:1.35em 0 .5em}.chat-answer h1{font-size:1.45em}.chat-answer h2{font-size:1.25em}.chat-answer h3{font-size:1.08em}.chat-answer h4{font-size:1em}.chat-answer ul,.chat-answer ol{margin:0 0 .9em;padding-left:1.5em}.chat-answer ul{list-style-type:disc}.chat-answer ol{list-style-type:decimal}.chat-answer ul ul{list-style-type:circle}.chat-answer ul ul ul{list-style-type:square}.chat-answer li{margin:.2em 0}.chat-answer li>p{margin:0}.chat-answer blockquote{margin:0 0 .9em;padding-left:1em;border-left:3px solid var(--hairline-strong);color:var(--ink-soft)}.chat-answer code{font-family:var(--mono);font-size:.84em;background:var(--bg-subtle);border:1px solid var(--hairline);border-radius:4px;padding:.1em .3em}.chat-answer pre{margin:0 0 1em;padding:12px 14px;overflow-x:auto;background:var(--bg-subtle);border:1px solid var(--hairline);border-radius:8px;line-height:1.5}.chat-answer pre code{background:none;border:0;padding:0}.chat-answer table{display:block;width:-moz-max-content;width:max-content;max-width:100%;overflow-x:auto;border-collapse:collapse;margin:0 0 1em;font-family:var(--sans);font-size:.88em}.chat-answer th,.chat-answer td{border:1px solid var(--hairline);padding:6px 10px;text-align:left}.chat-answer th{background:var(--bg-subtle);font-weight:600}.chat-answer hr{border:0;border-top:1px solid var(--hairline);margin:1.25em 0}.chat-answer input[type=checkbox]{margin-right:.4em}.chat-answer strong{font-weight:600}.chat-error{display:flex;flex-wrap:wrap;align-items:flex-start;justify-content:space-between;gap:12px;border:1px solid var(--negative-border);background:var(--negative-bg);color:var(--negative-text);border-radius:10px;padding:12px 16px;font-size:13.5px;overflow-wrap:anywhere}.chat-error>span:first-child{flex:1 1 280px;min-width:0}.chat-finish-note{font-family:var(--serif);font-style:italic;font-size:13px;color:var(--ink-faint)}.chat-feedback{display:flex;align-items:center;gap:4px;min-height:30px;margin-top:8px;color:var(--ink-faint);font-size:12px}.chat-feedback-label{margin-right:2px}.chat-feedback-action{width:28px;height:28px;display:inline-flex;align-items:center;justify-content:center;border:1px solid transparent;border-radius:999px;color:var(--ink-soft);background:transparent}.chat-feedback-action:hover:not(:disabled),.chat-feedback-action-selected{color:var(--accent-text);background:var(--accent-soft);border-color:color-mix(in oklch,var(--accent) 35%,var(--hairline))}.chat-feedback-action:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.chat-feedback-action:disabled{cursor:wait}.chat-feedback-action svg{width:14px;height:14px}.chat-feedback-error{color:var(--negative-text);margin-left:4px}.chat-feedback-panel{width:min(460px,100%);margin-top:8px;padding:16px;border:1px solid var(--hairline);border-radius:12px;background:var(--bg-elevated);box-shadow:0 10px 30px #0000001a}.chat-feedback-panel-title{color:var(--ink);font-size:15px;font-weight:600}.chat-feedback-panel-label{display:block;margin-top:4px;color:var(--ink-soft);font-size:13px}.chat-feedback-comment{display:block;width:100%;min-height:92px;margin-top:12px;padding:10px 12px;resize:vertical;border:1px solid var(--hairline-strong);border-radius:8px;color:var(--ink);background:var(--bg);font:14px/1.45 var(--sans)}.chat-feedback-comment:focus{border-color:var(--accent);outline:2px solid color-mix(in oklch,var(--accent) 25%,transparent);outline-offset:1px}.chat-feedback-panel-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:12px}.chat-feedback-panel-actions button{min-width:72px;padding:8px 14px;border-radius:8px;font:600 13px var(--sans)}.chat-feedback-skip{border:1px solid transparent;color:var(--ink-soft);background:transparent}.chat-feedback-submit{border:1px solid var(--ink);color:var(--bg);background:var(--ink)}.chat-feedback-panel-actions button:disabled{cursor:wait;opacity:.65}.chat-error a,.chat-error button{flex:none;max-width:100%;color:var(--accent-text);font-weight:600;text-decoration:none}.chat-error button{border:0;padding:0;background:transparent;cursor:pointer;font:inherit;text-align:left;white-space:normal}.chat-error button:disabled{cursor:wait;opacity:.65}.chat-error-actions{display:flex;flex:0 1 auto;min-width:0;max-width:100%;flex-wrap:wrap;justify-content:flex-start;gap:8px 16px}.chat-error a:hover,.chat-error button:hover:not(:disabled){text-decoration:underline}@media (max-width: 900px){.chat-user-message-wrap{max-width:90%}.chat-inline-editor{width:90%;min-width:0}.chat-conversation-inner{padding:22px 16px 32px}}@media (max-width: 560px){.shared-chat-content .chat-user-message-wrap{max-width:88%}}@media (hover: none),(pointer: coarse){.chat-user-actions{opacity:1;transform:none}}.chat-compaction-status{flex-direction:column;align-items:flex-start}.chat-compaction-explanation{margin-top:4px;color:var(--ink-faint);font-weight:400}.chat-caret{display:inline-block;width:7px;height:1.05em;background:var(--accent);margin-left:1px;vertical-align:text-bottom;animation:chat-blink 1s steps(1) infinite}@keyframes chat-blink{50%{opacity:0}}.chat-chev{transition:transform .18s;color:var(--ink-faint)}.chat-chev-open{transform:rotate(180deg)}.chat-spinner{width:14px;height:14px;border:2px solid color-mix(in oklch,var(--accent) 25%,transparent);border-top-color:var(--accent);border-radius:50%;display:inline-block;animation:chat-spin .7s linear infinite;flex:none}.chat-spinner-light{border-color:#fff6;border-top-color:#fff}@keyframes chat-spin{to{transform:rotate(360deg)}}.shared-chat-page{min-height:0;display:flex;flex-direction:column;overflow:hidden;background:var(--bg)}.shared-chat-heading{flex:none;border-bottom:1px solid var(--hairline);display:flex;align-items:center;gap:10px}.shared-chat-heading h1{max-width:calc(50vw + 640px);margin:0 auto;padding:13px 32px;color:var(--ink);font-family:var(--serif);font-size:20px;font-weight:600;line-height:1.1}.shared-chat-content{width:min(876px,100%);margin:0 auto;padding:34px 28px 64px}.shared-chat-transcript{padding:0 0 26px}.shared-chat-attribution{display:flex;flex-wrap:wrap;justify-content:center;gap:5px 12px;color:var(--ink-faint);font-size:12px;line-height:1.5}.shared-chat-attribution a{color:inherit;font-weight:600;text-decoration:none}.shared-chat-attribution a:hover{color:var(--accent-text);text-decoration:underline}.shared-chat-fresh{margin-top:26px;padding-top:28px;border-top:1px solid var(--hairline)}.shared-chat-fresh h2{margin:0 0 6px;font-family:var(--serif);font-size:21px;font-weight:600}.shared-chat-fresh>p{margin:0 0 16px;color:var(--ink-soft);font-family:var(--serif)}.shared-chat-access-note{margin:-6px 0 16px;padding:10px 12px;border:1px solid color-mix(in oklch,var(--accent) 24%,var(--hairline));border-radius:9px;color:var(--ink-soft);background:color-mix(in oklch,var(--accent) 5%,var(--bg-elevated));font-size:13px;line-height:1.45}.shared-chat-access-note a{color:var(--accent-text);font-weight:600}.shared-chat-state{min-height:55vh;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;padding:48px 24px;text-align:center;color:var(--ink-soft)}.shared-chat-state h1{margin:0;color:var(--ink);font-family:var(--serif);font-size:27px}.shared-chat-state p{margin:0}.shared-chat-state button{margin-top:8px;padding:7px 13px;border:1px solid var(--hairline-strong);border-radius:7px;background:var(--bg-elevated);color:var(--ink)}@media (max-width: 900px){.shared-chat-heading h1{padding-inline:16px}}@media (max-width: 640px){.shared-chat-heading h1{padding-inline:14px}}@media (max-width: 560px){.shared-chat-content{padding:26px 16px 48px}} +@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!important}.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-48{height:12rem}.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-\[18px\]{height:18px}.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-32{max-height:8rem}.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-\[85vh\]{max-height:85vh}.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-\[18px\]{width:18px}.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-\[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-3xl{max-width:48rem}.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}.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-none{resize: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-center{justify-content:center}.justify-between{justify-content:space-between}.gap-0\.5{gap:.125rem}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.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-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(1rem * var(--tw-space-x-reverse));margin-left:calc(1rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-1\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.375rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.375rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.25rem * var(--tw-space-y-reverse))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * var(--tw-space-y-reverse))}.justify-self-end{justify-self:end}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.overscroll-contain{overscroll-behavior:contain}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-sm{border-radius:calc(var(--radius) - 4px)}.\!border{border-width:1px!important}.border{border-width:1px}.border-2{border-width:2px}.border-b{border-bottom-width:1px}.border-t{border-top-width:1px}.border-dashed{border-style:dashed}.\!border-black{--tw-border-opacity: 1 !important;border-color:rgb(0 0 0 / var(--tw-border-opacity, 1))!important}.border-amber-200{--tw-border-opacity: 1;border-color:rgb(253 230 138 / var(--tw-border-opacity, 1))}.border-amber-500{--tw-border-opacity: 1;border-color:rgb(245 158 11 / var(--tw-border-opacity, 1))}.border-border{border-color:hsl(var(--border))}.border-destructive{border-color:hsl(var(--destructive))}.border-destructive\/40{border-color:hsl(var(--destructive) / .4)}.border-destructive\/50{border-color:hsl(var(--destructive) / .5)}.border-input{border-color:hsl(var(--input))}.border-primary{border-color:hsl(var(--primary))}.border-red-500{--tw-border-opacity: 1;border-color:rgb(239 68 68 / var(--tw-border-opacity, 1))}.border-transparent{border-color:transparent}.bg-accent{background-color:hsl(var(--accent-tw))}.bg-amber-100{--tw-bg-opacity: 1;background-color:rgb(254 243 199 / var(--tw-bg-opacity, 1))}.bg-amber-50{--tw-bg-opacity: 1;background-color:rgb(255 251 235 / var(--tw-bg-opacity, 1))}.bg-background{background-color:hsl(var(--background))}.bg-background\/80{background-color:hsl(var(--background) / .8)}.bg-black\/80{background-color:#000c}.bg-blue-100{--tw-bg-opacity: 1;background-color:rgb(219 234 254 / var(--tw-bg-opacity, 1))}.bg-border{background-color:hsl(var(--border))}.bg-card{background-color:hsl(var(--card))}.bg-destructive{background-color:hsl(var(--destructive))}.bg-destructive\/10{background-color:hsl(var(--destructive) / .1)}.bg-muted{background-color:hsl(var(--muted))}.bg-muted\/30{background-color:hsl(var(--muted) / .3)}.bg-muted\/40{background-color:hsl(var(--muted) / .4)}.bg-muted\/50{background-color:hsl(var(--muted) / .5)}.bg-popover{background-color:hsl(var(--popover))}.bg-primary{background-color:hsl(var(--primary))}.bg-red-50\/50{background-color:#fef2f280}.bg-secondary{background-color:hsl(var(--secondary))}.bg-transparent{background-color:transparent}.fill-current{fill:currentColor}.object-contain{-o-object-fit:contain;object-fit:contain}.p-0{padding:0}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-8{padding-left:2rem;padding-right:2rem}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-10{padding-top:2.5rem;padding-bottom:2.5rem}.py-12{padding-top:3rem;padding-bottom:3rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-5{padding-top:1.25rem;padding-bottom:1.25rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.py-8{padding-top:2rem;padding-bottom:2rem}.pb-2{padding-bottom:.5rem}.pb-4{padding-bottom:1rem}.pl-4{padding-left:1rem}.pl-5{padding-left:1.25rem}.pl-8{padding-left:2rem}.pl-9{padding-left:2.25rem}.pr-16{padding-right:4rem}.pr-2{padding-right:.5rem}.pr-9{padding-right:2.25rem}.pt-0{padding-top:0}.pt-2{padding-top:.5rem}.pt-6{padding-top:1.5rem}.text-left{text-align:left}.text-center{text-align:center}.align-top{vertical-align:top}.align-middle{vertical-align:middle}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-\[10px\]{font-size:10px}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.lowercase{text-transform:lowercase}.capitalize{text-transform:capitalize}.italic{font-style:italic}.leading-none{line-height:1}.leading-relaxed{line-height:1.625}.leading-snug{line-height:1.375}.leading-tight{line-height:1.25}.tracking-tight{letter-spacing:-.025em}.tracking-wide{letter-spacing:.025em}.tracking-widest{letter-spacing:.1em}.text-amber-900{--tw-text-opacity: 1;color:rgb(120 53 15 / var(--tw-text-opacity, 1))}.text-blue-900{--tw-text-opacity: 1;color:rgb(30 58 138 / var(--tw-text-opacity, 1))}.text-card-foreground{color:hsl(var(--card-foreground))}.text-current{color:currentColor}.text-destructive{color:hsl(var(--destructive))}.text-destructive-foreground{color:hsl(var(--destructive-foreground))}.text-foreground{color:hsl(var(--foreground))}.text-muted-foreground{color:hsl(var(--muted-foreground))}.text-popover-foreground{color:hsl(var(--popover-foreground))}.text-primary{color:hsl(var(--primary))}.text-primary-foreground{color:hsl(var(--primary-foreground))}.text-red-700{--tw-text-opacity: 1;color:rgb(185 28 28 / var(--tw-text-opacity, 1))}.text-secondary-foreground{color:hsl(var(--secondary-foreground))}.underline{text-decoration-line:underline}.underline-offset-2{text-underline-offset:2px}.underline-offset-4{text-underline-offset:4px}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-30{opacity:.3}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.opacity-90{opacity:.9}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.ring-0{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-offset-background{--tw-ring-offset-color: hsl(var(--background))}.blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.drop-shadow{--tw-drop-shadow: drop-shadow(0 1px 2px rgb(0 0 0 / .1)) drop-shadow(0 1px 1px rgb(0 0 0 / .06));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-200{transition-duration:.2s}@keyframes enter{0%{opacity:var(--tw-enter-opacity, 1);transform:translate3d(var(--tw-enter-translate-x, 0),var(--tw-enter-translate-y, 0),0) scale3d(var(--tw-enter-scale, 1),var(--tw-enter-scale, 1),var(--tw-enter-scale, 1)) rotate(var(--tw-enter-rotate, 0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity, 1);transform:translate3d(var(--tw-exit-translate-x, 0),var(--tw-exit-translate-y, 0),0) scale3d(var(--tw-exit-scale, 1),var(--tw-exit-scale, 1),var(--tw-exit-scale, 1)) rotate(var(--tw-exit-rotate, 0))}}.animate-in{animation-name:enter;animation-duration:.15s;--tw-enter-opacity: initial;--tw-enter-scale: initial;--tw-enter-rotate: initial;--tw-enter-translate-x: initial;--tw-enter-translate-y: initial}.fade-in-0{--tw-enter-opacity: 0}.zoom-in-95{--tw-enter-scale: .95}.duration-200{animation-duration:.2s}.\!running{animation-play-state:running!important}.running{animation-play-state:running}.paused{animation-play-state:paused}.file\:border-0::file-selector-button{border-width:0px}.file\:bg-transparent::file-selector-button{background-color:transparent}.file\:text-sm::file-selector-button{font-size:.875rem;line-height:1.25rem}.file\:font-medium::file-selector-button{font-weight:500}.file\:text-foreground::file-selector-button{color:hsl(var(--foreground))}.placeholder\:text-muted-foreground::-moz-placeholder{color:hsl(var(--muted-foreground))}.placeholder\:text-muted-foreground::placeholder{color:hsl(var(--muted-foreground))}.last\:mb-0:last-child{margin-bottom:0}.hover\:border-foreground\/50:hover{border-color:hsl(var(--foreground) / .5)}.hover\:bg-accent:hover{background-color:hsl(var(--accent-tw))}.hover\:bg-destructive\/80:hover{background-color:hsl(var(--destructive) / .8)}.hover\:bg-destructive\/90:hover{background-color:hsl(var(--destructive) / .9)}.hover\:bg-muted:hover{background-color:hsl(var(--muted))}.hover\:bg-muted\/50:hover{background-color:hsl(var(--muted) / .5)}.hover\:bg-primary\/80:hover{background-color:hsl(var(--primary) / .8)}.hover\:bg-primary\/90:hover{background-color:hsl(var(--primary) / .9)}.hover\:bg-secondary:hover{background-color:hsl(var(--secondary))}.hover\:bg-secondary\/80:hover{background-color:hsl(var(--secondary) / .8)}.hover\:text-accent-foreground:hover{color:hsl(var(--accent-foreground))}.hover\:text-destructive:hover{color:hsl(var(--destructive))}.hover\:text-foreground:hover{color:hsl(var(--foreground))}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-100:hover{opacity:1}.focus\:bg-accent:focus{background-color:hsl(var(--accent-tw))}.focus\:text-accent-foreground:focus{color:hsl(var(--accent-foreground))}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-ring:focus{--tw-ring-color: hsl(var(--ring))}.focus\:ring-offset-2:focus{--tw-ring-offset-width: 2px}.focus-visible\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\:ring-2:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-visible\:ring-ring:focus-visible{--tw-ring-color: hsl(var(--ring))}.focus-visible\:ring-offset-2:focus-visible{--tw-ring-offset-width: 2px}.focus-visible\:ring-offset-background:focus-visible{--tw-ring-offset-color: hsl(var(--background))}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-50:disabled{opacity:.5}.group.destructive .group-\[\.destructive\]\:border-muted\/40{border-color:hsl(var(--muted) / .4)}.group.toaster .group-\[\.toaster\]\:border-border{border-color:hsl(var(--border))}.group.toast .group-\[\.toast\]\:bg-muted{background-color:hsl(var(--muted))}.group.toast .group-\[\.toast\]\:bg-primary{background-color:hsl(var(--primary))}.group.toaster .group-\[\.toaster\]\:bg-background{background-color:hsl(var(--background))}.group.destructive .group-\[\.destructive\]\:text-destructive-foreground{color:hsl(var(--destructive-foreground))}.group.toast .group-\[\.toast\]\:text-muted-foreground{color:hsl(var(--muted-foreground))}.group.toast .group-\[\.toast\]\:text-primary-foreground{color:hsl(var(--primary-foreground))}.group.toaster .group-\[\.toaster\]\:text-foreground{color:hsl(var(--foreground))}.group.toaster .group-\[\.toaster\]\:shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.group.destructive .group-\[\.destructive\]\:hover\:border-destructive\/30:hover{border-color:hsl(var(--destructive) / .3)}.group.destructive .group-\[\.destructive\]\:hover\:bg-destructive:hover{background-color:hsl(var(--destructive))}.group.destructive .group-\[\.destructive\]\:hover\:bg-destructive-foreground\/10:hover{background-color:hsl(var(--destructive-foreground) / .1)}.group.destructive .group-\[\.destructive\]\:hover\:text-destructive-foreground:hover{color:hsl(var(--destructive-foreground))}.group.destructive .group-\[\.destructive\]\:focus\:ring-destructive:focus{--tw-ring-color: hsl(var(--destructive))}.group.destructive .group-\[\.destructive\]\:focus\:ring-destructive-foreground:focus{--tw-ring-color: hsl(var(--destructive-foreground))}.peer:disabled~.peer-disabled\:cursor-not-allowed{cursor:not-allowed}.peer:disabled~.peer-disabled\:opacity-70{opacity:.7}.data-\[disabled\=true\]\:pointer-events-none[data-disabled=true],.data-\[disabled\]\:pointer-events-none[data-disabled]{pointer-events:none}.data-\[state\=checked\]\:translate-x-5[data-state=checked]{--tw-translate-x: 1.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[state\=unchecked\]\:translate-x-0[data-state=unchecked],.data-\[swipe\=cancel\]\:translate-x-0[data-swipe=cancel]{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[swipe\=end\]\:translate-x-\[var\(--radix-toast-swipe-end-x\)\][data-swipe=end]{--tw-translate-x: var(--radix-toast-swipe-end-x);transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[swipe\=move\]\:translate-x-\[var\(--radix-toast-swipe-move-x\)\][data-swipe=move]{--tw-translate-x: var(--radix-toast-swipe-move-x);transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes accordion-up{0%{height:var(--radix-accordion-content-height)}to{height:0}}.data-\[state\=closed\]\:animate-accordion-up[data-state=closed]{animation:accordion-up .2s ease-out}@keyframes accordion-down{0%{height:0}to{height:var(--radix-accordion-content-height)}}.data-\[state\=open\]\:animate-accordion-down[data-state=open]{animation:accordion-down .2s ease-out}.data-\[selected\=\'true\'\]\:bg-accent[data-selected=true]{background-color:hsl(var(--accent-tw))}.data-\[state\=active\]\:bg-background[data-state=active]{background-color:hsl(var(--background))}.data-\[state\=checked\]\:\!bg-black[data-state=checked]{--tw-bg-opacity: 1 !important;background-color:rgb(0 0 0 / var(--tw-bg-opacity, 1))!important}.data-\[state\=checked\]\:bg-primary[data-state=checked]{background-color:hsl(var(--primary))}.data-\[state\=open\]\:bg-accent[data-state=open]{background-color:hsl(var(--accent-tw))}.data-\[state\=selected\]\:bg-muted[data-state=selected]{background-color:hsl(var(--muted))}.data-\[state\=unchecked\]\:bg-input[data-state=unchecked]{background-color:hsl(var(--input))}.data-\[selected\=true\]\:text-accent-foreground[data-selected=true]{color:hsl(var(--accent-foreground))}.data-\[state\=active\]\:text-foreground[data-state=active]{color:hsl(var(--foreground))}.data-\[state\=checked\]\:\!text-white[data-state=checked]{--tw-text-opacity: 1 !important;color:rgb(255 255 255 / var(--tw-text-opacity, 1))!important}.data-\[state\=open\]\:text-muted-foreground[data-state=open]{color:hsl(var(--muted-foreground))}.data-\[disabled\=true\]\:opacity-50[data-disabled=true],.data-\[disabled\]\:opacity-50[data-disabled]{opacity:.5}.data-\[state\=active\]\:shadow-sm[data-state=active]{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.data-\[swipe\=move\]\:transition-none[data-swipe=move]{transition-property:none}.data-\[state\=open\]\:animate-in[data-state=open]{animation-name:enter;animation-duration:.15s;--tw-enter-opacity: initial;--tw-enter-scale: initial;--tw-enter-rotate: initial;--tw-enter-translate-x: initial;--tw-enter-translate-y: initial}.data-\[state\=closed\]\:animate-out[data-state=closed],.data-\[swipe\=end\]\:animate-out[data-swipe=end]{animation-name:exit;animation-duration:.15s;--tw-exit-opacity: initial;--tw-exit-scale: initial;--tw-exit-rotate: initial;--tw-exit-translate-x: initial;--tw-exit-translate-y: initial}.data-\[state\=closed\]\:fade-out-0[data-state=closed]{--tw-exit-opacity: 0}.data-\[state\=closed\]\:fade-out-80[data-state=closed]{--tw-exit-opacity: .8}.data-\[state\=open\]\:fade-in-0[data-state=open]{--tw-enter-opacity: 0}.data-\[state\=closed\]\:zoom-out-95[data-state=closed]{--tw-exit-scale: .95}.data-\[state\=open\]\:zoom-in-95[data-state=open]{--tw-enter-scale: .95}.data-\[side\=bottom\]\:slide-in-from-top-2[data-side=bottom]{--tw-enter-translate-y: -.5rem}.data-\[side\=left\]\:slide-in-from-right-2[data-side=left]{--tw-enter-translate-x: .5rem}.data-\[side\=right\]\:slide-in-from-left-2[data-side=right]{--tw-enter-translate-x: -.5rem}.data-\[side\=top\]\:slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y: .5rem}.data-\[state\=closed\]\:slide-out-to-left-1\/2[data-state=closed]{--tw-exit-translate-x: -50%}.data-\[state\=closed\]\:slide-out-to-right-full[data-state=closed]{--tw-exit-translate-x: 100%}.data-\[state\=closed\]\:slide-out-to-top-\[48\%\][data-state=closed]{--tw-exit-translate-y: -48%}.data-\[state\=open\]\:slide-in-from-left-1\/2[data-state=open]{--tw-enter-translate-x: -50%}.data-\[state\=open\]\:slide-in-from-top-\[48\%\][data-state=open]{--tw-enter-translate-y: -48%}.data-\[state\=open\]\:slide-in-from-top-full[data-state=open]{--tw-enter-translate-y: -100%}.dark\:block:is(.dark *){display:block}.dark\:hidden:is(.dark *){display:none}.dark\:border-amber-900:is(.dark *){--tw-border-opacity: 1;border-color:rgb(120 53 15 / var(--tw-border-opacity, 1))}.dark\:border-destructive:is(.dark *){border-color:hsl(var(--destructive))}.dark\:bg-amber-950\/40:is(.dark *){background-color:#451a0366}.dark\:text-amber-100:is(.dark *){--tw-text-opacity: 1;color:rgb(254 243 199 / var(--tw-text-opacity, 1))}@media (min-width: 640px){.sm\:bottom-0{bottom:0}.sm\:right-0{right:0}.sm\:top-auto{top:auto}.sm\:mr-auto{margin-right:auto}.sm\:w-auto{width:auto}.sm\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.sm\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.sm\:flex-row{flex-direction:row}.sm\:flex-col{flex-direction:column}.sm\:justify-end{justify-content:flex-end}.sm\:space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.sm\:rounded-lg{border-radius:var(--radius)}.sm\:px-6{padding-left:1.5rem;padding-right:1.5rem}.sm\:text-left{text-align:left}.data-\[state\=open\]\:sm\:slide-in-from-bottom-full[data-state=open]{--tw-enter-translate-y: 100%}}@media (min-width: 768px){.md\:col-span-2{grid-column:span 2 / span 2}.md\:max-w-\[420px\]{max-width:420px}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.md\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.md\:grid-cols-\[1fr_1fr_auto\]{grid-template-columns:1fr 1fr auto}.md\:text-sm{font-size:.875rem;line-height:1.25rem}}@media (min-width: 1024px){.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.lg\:grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}.lg\:grid-cols-8{grid-template-columns:repeat(8,minmax(0,1fr))}.lg\:px-8{padding-left:2rem;padding-right:2rem}}@media (min-width: 1280px){.xl\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.xl\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}}.\[\&\:has\(\[role\=checkbox\]\)\]\:pr-0:has([role=checkbox]){padding-right:0}.\[\&\>svg\+div\]\:translate-y-\[-3px\]>svg+div{--tw-translate-y: -3px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.\[\&\>svg\]\:absolute>svg{position:absolute}.\[\&\>svg\]\:left-4>svg{left:1rem}.\[\&\>svg\]\:top-4>svg{top:1rem}.\[\&\>svg\]\:text-destructive>svg{color:hsl(var(--destructive))}.\[\&\>svg\]\:text-foreground>svg{color:hsl(var(--foreground))}.\[\&\>svg\~\*\]\:pl-7>svg~*{padding-left:1.75rem}.\[\&\>tr\]\:last\:border-b-0:last-child>tr{border-bottom-width:0px}.\[\&\[data-state\=open\]\>svg\]\:rotate-180[data-state=open]>svg{--tw-rotate: 180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.\[\&_\[cmdk-group-heading\]\]\:px-2 [cmdk-group-heading]{padding-left:.5rem;padding-right:.5rem}.\[\&_\[cmdk-group-heading\]\]\:py-1\.5 [cmdk-group-heading]{padding-top:.375rem;padding-bottom:.375rem}.\[\&_\[cmdk-group-heading\]\]\:text-xs [cmdk-group-heading]{font-size:.75rem;line-height:1rem}.\[\&_\[cmdk-group-heading\]\]\:font-medium [cmdk-group-heading]{font-weight:500}.\[\&_\[cmdk-group-heading\]\]\:text-muted-foreground [cmdk-group-heading]{color:hsl(var(--muted-foreground))}.\[\&_\[cmdk-group\]\:not\(\[hidden\]\)_\~\[cmdk-group\]\]\:pt-0 [cmdk-group]:not([hidden])~[cmdk-group]{padding-top:0}.\[\&_\[cmdk-group\]\]\:px-2 [cmdk-group]{padding-left:.5rem;padding-right:.5rem}.\[\&_\[cmdk-input-wrapper\]_svg\]\:h-5 [cmdk-input-wrapper] svg{height:1.25rem}.\[\&_\[cmdk-input-wrapper\]_svg\]\:w-5 [cmdk-input-wrapper] svg{width:1.25rem}.\[\&_\[cmdk-input\]\]\:h-12 [cmdk-input]{height:3rem}.\[\&_\[cmdk-item\]\]\:px-2 [cmdk-item]{padding-left:.5rem;padding-right:.5rem}.\[\&_\[cmdk-item\]\]\:py-3 [cmdk-item]{padding-top:.75rem;padding-bottom:.75rem}.\[\&_\[cmdk-item\]_svg\]\:h-5 [cmdk-item] svg{height:1.25rem}.\[\&_\[cmdk-item\]_svg\]\:w-5 [cmdk-item] svg{width:1.25rem}.\[\&_p\]\:leading-relaxed p{line-height:1.625}.\[\&_svg\]\:pointer-events-none svg{pointer-events:none}.\[\&_svg\]\:size-4 svg{width:1rem;height:1rem}.\[\&_svg\]\:shrink-0 svg{flex-shrink:0}.\[\&_tr\:last-child\]\:border-0 tr:last-child{border-width:0px}.\[\&_tr\]\:border-b tr{border-bottom-width:1px}:root{--bg: #FAF8F4;--bg-elevated: #FFFFFF;--bg-subtle: #F2EFE8;--ink: #1A1814;--ink-soft: #5A554C;--ink-faint: #8E8678;--hairline: #E4DFD4;--hairline-strong: #C8C2B3;--accent: oklch(.45 .08 250);--accent-soft: oklch(.92 .03 250);--accent-text: oklch(.35 .1 250);--warn: oklch(.55 .12 30);--positive-bg: oklch(.96 .03 145);--positive-text: oklch(.34 .1 145);--positive-border: oklch(.86 .06 145);--negative-bg: oklch(.96 .03 25);--negative-text: oklch(.4 .12 25);--negative-border: oklch(.86 .06 25);--highlight-bg: oklch(.97 .04 70);--highlight-text: oklch(.42 .1 60);--highlight-border: oklch(.85 .07 70);--info-bg: oklch(.97 .04 230);--info-text: oklch(.42 .1 240);--info-border: oklch(.86 .07 230);--trend-code: #33639E;--trend-hf: #AA7D24;--app-leading-column-width: 280px;--serif: "Newsreader", Georgia, serif;--sans: "Inter", -apple-system, sans-serif;--mono: "JetBrains Mono", ui-monospace, monospace;color-scheme:light}.dark{--bg: #11100E;--bg-elevated: #1A1815;--bg-subtle: #24211D;--ink: #F3EFE7;--ink-soft: #B9B2A6;--ink-faint: #989084;--hairline: #332F29;--hairline-strong: #514A40;--accent: oklch(.72 .09 250);--accent-soft: oklch(.28 .04 250);--accent-text: oklch(.8 .08 250);--warn: oklch(.72 .12 30);--positive-bg: oklch(.25 .035 145);--positive-text: oklch(.79 .1 145);--positive-border: oklch(.43 .06 145);--negative-bg: oklch(.25 .04 25);--negative-text: oklch(.79 .1 25);--negative-border: oklch(.43 .06 25);--highlight-bg: oklch(.27 .04 70);--highlight-text: oklch(.82 .1 70);--highlight-border: oklch(.46 .07 70);--info-bg: oklch(.25 .04 230);--info-text: oklch(.8 .08 235);--info-border: oklch(.43 .07 230);--trend-code: #5C8FD6;--trend-hf: #B3831F;color-scheme:dark}*{box-sizing:border-box;margin:0;padding:0}html,body{background:var(--bg);color:var(--ink);font-family:var(--sans);font-size:14px;line-height:1.5;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}a{color:inherit;text-decoration:none}button{font-family:inherit;cursor:pointer;border:none;background:none;color:inherit}.app-header{border-bottom:1px solid var(--hairline);background:var(--bg);position:sticky;top:0;z-index:50}.app-header-inner{max-width:calc(50vw + 640px);margin:0 auto;padding:18px 32px;display:flex;align-items:center;gap:24px;min-width:0}.site-announcement{position:relative;min-height:28px;padding:5px 52px 6px;border-top:1px solid var(--hairline);background:var(--bg-subtle);color:var(--ink-soft);font-size:12px;line-height:16px;text-align:center}.site-announcement a{color:var(--accent-text);font-weight:600;text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:2px}.site-announcement a:hover{color:var(--ink)}.site-announcement-close{position:absolute;top:50%;right:20px;display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;padding:0;border:0;border-radius:4px;background:transparent;color:var(--ink-soft);cursor:pointer;transform:translateY(-50%)}.site-announcement-close:hover{background:var(--hairline);color:var(--ink)}.site-announcement-close:focus-visible{outline:2px solid var(--accent-text);outline-offset:1px}.brand{display:flex;align-items:baseline;gap:10px;font-family:var(--serif);cursor:pointer}.brand-mark{width:22px;height:22px;background:var(--ink);position:relative;align-self:center;flex-shrink:0}.brand-mark:after{content:"";position:absolute;top:4px;left:4px;right:4px;bottom:4px;background:var(--bg)}.brand-mark:before{content:"";position:absolute;top:8px;left:8px;width:6px;height:6px;background:var(--ink);z-index:1}.brand-name{font-size:20px;font-weight:600;letter-spacing:-.02em;white-space:nowrap}.brand-name em{font-style:italic;font-weight:400;color:var(--ink-soft)}.nav{display:flex;gap:24px;margin-left:8px;flex-shrink:0;position:relative}@media (min-width: 901px){.app-header-inner{max-width:none;padding-left:0}.brand{width:var(--app-leading-column-width);flex:none;justify-content:center}.nav{margin-left:0}}@media (max-width: 1100px){.nav{gap:18px}.nav-item:nth-child(n+4){display:none}}@media (max-width: 920px){.search-trigger kbd{display:none}}.nav-item{font-size:13px;color:var(--ink-soft);padding:4px 0;transition:color .15s}.nav-indicator{position:absolute;bottom:0;left:0;height:1px;background:var(--ink);pointer-events:none;will-change:transform,width}.nav-indicator-ready{transition:transform .22s cubic-bezier(.4,0,.2,1),width .22s cubic-bezier(.4,0,.2,1),opacity .12s ease}.nav-item-with-badge{display:inline-flex;align-items:center;gap:5px}.nav-new-badge{display:inline-flex;align-items:center;min-height:17px;padding:1px 5px;border-radius:5px;background:#dfe7ff;color:#1458e8;font-size:9px;font-weight:700;line-height:1;letter-spacing:.02em;text-transform:uppercase}.nav-item:hover,.nav-item.active{color:var(--ink)}@media (prefers-reduced-motion: reduce){.nav-indicator-ready{transition:none}}.header-spacer{flex:1}.search-trigger{display:flex;align-items:center;gap:8px;padding:7px 12px;border:1px solid var(--hairline);border-radius:6px;background:var(--bg-elevated);font-size:13px;color:var(--ink-faint);width:240px;min-width:0;flex-shrink:1;transition:border-color .15s;overflow:hidden}.search-trigger>span:not(:first-child){white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}.search-trigger:hover{border-color:var(--hairline-strong)}.search-trigger kbd{margin-left:auto;font-family:var(--mono);font-size:11px;padding:1px 5px;border:1px solid var(--hairline);border-radius:3px;background:var(--bg-subtle);color:var(--ink-soft)}.icon-btn{width:32px;height:32px;display:flex;align-items:center;justify-content:center;border:1px solid var(--hairline);border-radius:6px;background:var(--bg-elevated);transition:border-color .15s}.icon-btn:hover{border-color:var(--hairline-strong)}.hf-signin-btn{display:inline-flex;align-items:center;gap:8px;max-width:100%;min-height:32px;padding:5px 12px;border:1px solid var(--hairline);border-radius:6px;background:var(--bg-elevated);font-size:13px;color:var(--ink);line-height:20px;white-space:normal;overflow-wrap:anywhere;transition:border-color .15s,background .15s}.hf-signin-btn>img{flex-shrink:0}.app-header .hf-signin-btn{flex-shrink:0;white-space:nowrap;overflow-wrap:normal}.hf-signin-btn:hover{border-color:var(--hairline-strong);background:var(--bg-subtle)}.user-avatar-btn{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;border:1px solid var(--hairline);border-radius:999px;background:var(--bg-elevated);padding:0;overflow:hidden;transition:border-color .15s}.user-avatar-btn:hover{border-color:var(--hairline-strong)}.user-avatar-btn:focus-visible{outline:2px solid var(--hairline-strong);outline-offset:2px}.page{max-width:calc(50vw + 640px);margin:0 auto;padding:32px}.site-footer{border-top:1px solid var(--hairline);color:var(--ink-faint);font-size:12px}.site-footer-inner{display:flex;flex-wrap:wrap;gap:14px;max-width:calc(50vw + 640px);margin:0 auto;padding:20px 32px 28px}.site-footer a{color:var(--ink-soft)}.site-footer a:hover{color:var(--ink)}.layout-with-sidebar{display:grid;grid-template-columns:220px 1fr;gap:48px;align-items:start}.sidebar{position:sticky;top:100px}.sidebar-section{margin-bottom:28px}.sidebar-label{font-family:var(--mono);font-size:10px;letter-spacing:.1em;text-transform:uppercase;color:var(--ink-faint);margin-bottom:12px}.sidebar-link{display:block;font-size:13px;color:var(--ink-soft);padding:5px 0;border-bottom:1px dotted transparent;transition:color .15s}.sidebar-link:hover{color:var(--ink)}.sidebar-link.active{color:var(--ink);font-weight:500}.sidebar-link .count{font-family:var(--mono);font-size:11px;color:var(--ink-faint);margin-left:6px}.breadcrumb{display:flex;align-items:center;gap:8px;font-family:var(--mono);font-size:11px;color:var(--ink-faint);margin-bottom:24px}.breadcrumb a{color:var(--ink-soft)}.breadcrumb a:hover{color:var(--ink)}.breadcrumb .sep{color:var(--hairline-strong)}.detail-title{font-family:var(--serif);font-size:38px;font-weight:500;line-height:1.15;letter-spacing:-.02em;margin-bottom:16px;text-wrap:balance}.detail-title-org{margin-left:.6em;font-family:var(--mono);font-size:13px;letter-spacing:0;color:var(--accent-text);white-space:nowrap}.detail-title-org--logo{display:inline-flex;align-items:center;justify-content:center;margin-left:.3em;font-size:inherit;width:.8em;height:.8em;border-radius:4px;overflow:hidden;vertical-align:-.05em}.detail-title-org--logo img{width:100%;height:100%;-o-object-fit:contain;object-fit:contain}.action-btn{display:inline-flex;align-items:center;gap:6px;padding:7px 12px;border:1px solid var(--hairline);border-radius:6px;background:var(--bg-elevated);font-size:12px;font-weight:500;color:var(--ink);transition:all .15s}.action-btn:hover{border-color:var(--ink)}.action-btn.primary{background:var(--ink);color:var(--bg);border-color:var(--ink)}.action-btn.primary:hover{background:color-mix(in oklch,var(--ink) 88%,var(--accent))}.no-results{padding:80px 0;text-align:center;font-family:var(--serif);color:var(--ink-faint);font-style:italic}.icon{width:14px;height:14px;flex-shrink:0}.icon-sm{width:11px;height:11px;flex-shrink:0}html{scroll-behavior:smooth}::-moz-selection{background:var(--accent-soft);color:var(--accent-text)}::selection{background:var(--accent-soft);color:var(--accent-text)}.mobile-menu-btn,.mobile-search-btn{display:none;width:36px;height:36px;align-items:center;justify-content:center;border-radius:4px;flex-shrink:0}.mobile-menu-btn:hover,.mobile-search-btn:hover{background:var(--bg-subtle)}.mobile-nav-drawer{position:fixed;top:0;right:0;bottom:0;left:0;background:#1a181466;z-index:100;display:flex;justify-content:flex-end}.mobile-nav-panel{width:min(320px,80vw);background:var(--bg-elevated);border-left:1px solid var(--hairline-strong);padding:16px 24px max(32px,env(safe-area-inset-bottom));display:flex;flex-direction:column;gap:4px;height:100%;min-height:0;overscroll-behavior-y:contain;overflow-y:auto;box-shadow:-8px 0 24px #0000000f}.mobile-nav-close{align-self:flex-end;min-width:44px;min-height:44px}.mobile-nav-link{flex-shrink:0;font-family:var(--serif);font-size:17px;padding:12px 4px;color:var(--ink);border-bottom:1px solid var(--hairline)}.mobile-nav-link-with-badge{display:flex;align-items:center;gap:6px}.mobile-nav-link.active{color:var(--accent-text);font-style:italic}.mobile-nav-search{display:flex;align-items:center;gap:10px;width:100%;font-family:var(--sans);font-size:14px;color:var(--ink-faint);background:var(--bg-subtle);border:1px solid var(--hairline);border-radius:6px;padding:10px 12px;margin-bottom:8px;text-align:left}.mobile-nav-search:hover{border-color:var(--hairline-strong);color:var(--ink)}@media (max-width: 880px){.nav,.search-trigger,.app-header .header-feedback-link{display:none}.mobile-menu-btn,.mobile-search-btn{display:inline-flex}}@media (max-width: 640px){.app-header-inner,.brand{gap:8px}.brand-mark{width:20px;height:20px}.brand-name{font-size:18px}.header-bookmark-btn{display:none}.app-header .hf-signin-btn{width:36px;height:36px;padding:0;gap:0;justify-content:center;flex-shrink:0}.app-header .hf-signin-btn>span{display:none}}@media (max-width: 880px){.app-header-inner{padding:14px 16px;gap:12px}.page{padding:24px 16px}.layout-with-sidebar{grid-template-columns:1fr;gap:24px}.layout-with-sidebar .sidebar{position:static;top:auto}.detail-title{font-size:28px}}@media (max-width: 640px){.app-header-inner{padding:12px 14px;gap:8px}.page{padding:20px 14px}.detail-title{font-size:24px}.brand-name{font-size:17px}}.access-request-page{min-height:100vh;min-height:100svh;display:grid;place-items:center;padding:32px 20px;background:radial-gradient(circle at 50% 8%,color-mix(in srgb,var(--accent-soft) 60%,transparent),transparent 42%),var(--bg)}.access-request-card{width:min(100%,470px);padding:38px;border:1px solid var(--hairline);border-radius:12px;background:color-mix(in srgb,var(--bg-elevated) 94%,transparent);box-shadow:0 20px 60px #1a181414}.access-request-brand{display:inline-flex;align-items:center;gap:10px;margin-bottom:42px;font-family:var(--serif)}.access-request-heading h1,.access-request-success h1{margin-bottom:12px;font-family:var(--serif);font-size:clamp(36px,8vw,48px);font-weight:500;line-height:1;letter-spacing:-.035em}.access-request-heading>p:last-child,.access-request-success p,.access-request-signin>p{color:var(--ink-soft);font-size:15px;line-height:1.65}.access-request-eyebrow{margin-bottom:10px;color:var(--accent-text);font-size:11px;font-weight:700;letter-spacing:.12em;text-transform:uppercase}.access-request-form,.access-request-signin{margin-top:30px}.access-request-form label{display:block;margin-bottom:8px;font-size:12px;font-weight:600}.access-request-input-wrap{display:flex;align-items:center;border:1px solid var(--hairline-strong);border-radius:7px;background:var(--bg);color:var(--ink-faint);transition:border-color .15s,box-shadow .15s}.access-request-input-wrap:focus-within{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-soft)}.access-request-input-wrap>span{padding-left:13px;font-size:15px}.access-request-input-wrap input{width:100%;padding:11px 13px 11px 3px;border:0;outline:0;background:transparent;color:var(--ink);font:500 14px var(--sans)}.access-request-verified{margin-top:7px;color:var(--ink-faint);font-size:11px}.access-request-submit{width:100%;margin-top:20px;padding:12px 18px;border-radius:7px;background:var(--ink);color:var(--bg);font-size:13px;font-weight:600;transition:opacity .15s,transform .15s}.access-request-submit:hover:not(:disabled){transform:translateY(-1px)}.access-request-submit:disabled{cursor:wait;opacity:.6}.access-request-error{margin-top:12px;color:var(--negative-text);font-size:12px}.access-request-status{margin-top:30px;color:var(--ink-soft)}.access-request-signin .hf-signin-btn{margin-top:18px}.access-request-success svg{margin-bottom:24px;color:var(--positive-text)}@media (max-width: 520px){.access-request-card{padding:28px 24px}.access-request-brand{margin-bottom:34px}}.legal-page{max-width:880px;padding-bottom:72px;color:var(--ink-soft);font-family:var(--sans);font-size:15px;line-height:1.7}.legal-header{margin-bottom:34px;padding-bottom:24px;border-bottom:1px solid var(--hairline)}.legal-kicker{margin:0 0 6px;color:var(--accent-text);font-size:11px;font-weight:700;letter-spacing:.1em;text-transform:uppercase}.legal-header h1{margin:0;color:var(--ink);font-family:var(--serif);font-size:clamp(38px,6vw,56px);font-weight:500;letter-spacing:-.025em;line-height:1.05}.legal-effective-date{margin:12px 0 0;color:var(--ink-faint)}.legal-page section{margin-top:34px}.legal-page h2{margin:0 0 10px;color:var(--ink);font-family:var(--serif);font-size:25px;font-weight:600;line-height:1.25}.legal-page h3{margin:22px 0 6px;color:var(--ink);font-size:15px;font-weight:700}.legal-page p{margin:0 0 14px}.legal-page ul{margin:8px 0 16px;padding-left:22px}.legal-page li{margin:7px 0}.legal-page a{color:var(--accent-text);text-decoration:underline}.legal-page strong{color:var(--ink)}.feed-header{display:flex;align-items:flex-end;justify-content:space-between;margin-bottom:32px;gap:24px;flex-wrap:wrap}.feed-title{font-family:var(--serif);font-size:44px;font-weight:500;letter-spacing:-.025em;line-height:1}.feed-title em{font-style:italic;font-weight:400;color:var(--accent)}.feed-subtitle{font-size:13px;color:var(--ink-soft);margin-top:8px;font-family:var(--serif);font-style:italic}.conference-deadlines-link{font-size:16px;color:var(--ink-soft);margin-top:12px}.trend-chart{margin:0;width:100%}.trend-chart-visual{position:relative;min-width:0}.trend-chart-table{margin-top:10px}.feedback-link{display:inline-flex;align-items:center;height:32px;padding:0 12px;border:1px solid var(--hairline);border-radius:6px;background:var(--bg-elevated);color:var(--ink-soft);font-size:13px;font-weight:500;white-space:nowrap;transition:border-color .15s,color .15s,background .15s}.feedback-link:hover{border-color:var(--hairline-strong);background:var(--bg-subtle);color:var(--ink)}.period-switch{display:flex;align-items:center;gap:2px;background:var(--bg-elevated);border:1px solid var(--hairline);border-radius:6px;padding:3px}.period-btn{padding:5px 12px;font-size:12px;font-weight:500;color:var(--ink-soft);border-radius:4px;transition:all .15s}.period-btn.active{background:var(--ink);color:var(--bg)}.period-btn:not(.active):hover{background:var(--bg-subtle);color:var(--ink)}.date-nav{display:flex;align-items:center;gap:12px;font-family:var(--mono);font-size:12px;color:var(--ink-soft)}.date-nav button{width:26px;height:26px;border:1px solid var(--hairline);border-radius:4px;display:flex;align-items:center;justify-content:center;background:var(--bg-elevated)}.date-nav button:hover{background:var(--bg-subtle)}.paper-list{display:flex;flex-direction:column}.paper-card{display:grid;grid-template-columns:170px 1fr;gap:28px;padding:24px 0;border-bottom:1px solid var(--hairline);align-items:stretch}.paper-thumb-wrap{transition:transform .15s;display:flex;align-items:flex-end;justify-content:flex-start}.paper-thumb-wrap:hover{transform:translateY(-2px)}.paper-thumb-skeleton{width:160px;height:220px}.paper-card:first-child{padding-top:0}.paper-rank{font-family:var(--serif);font-size:32px;font-weight:500;color:var(--ink-faint);font-feature-settings:"tnum";line-height:.9;font-style:italic}.paper-body{min-width:0;display:flex;align-items:stretch;gap:28px}.paper-body-main{min-width:0;flex:1}.paper-resources{display:flex;flex-direction:column;justify-content:center;align-items:center;gap:18px;flex:0 0 auto;width:92px;border-left:1px solid var(--hairline);padding-left:20px}.paper-resource{display:flex;flex-direction:column;align-items:center;gap:4px;color:inherit}a.paper-resource.is-link{text-decoration:none;cursor:pointer;border-radius:4px;transition:transform .15s}a.paper-resource.is-link:hover{transform:translateY(-1px)}a.paper-resource.is-link:hover .resource-value{text-decoration:underline;text-underline-offset:2px}a.paper-resource.is-link:focus-visible{outline:2px solid var(--ink);outline-offset:2px}.paper-resource .resource-stat{display:flex;flex-direction:column;align-items:center;gap:2px}.paper-resource .resource-value{display:inline-flex;align-items:center;gap:3px;font-family:var(--mono);font-size:14px;color:var(--ink);font-weight:500;font-variant-numeric:tabular-nums;letter-spacing:-.01em}.paper-resource .resource-label{font-family:var(--mono);font-size:10px;letter-spacing:.06em;text-transform:uppercase;color:var(--ink-faint)}.paper-resource .gh-rate-arrow{color:var(--accent-text);font-size:13px;transform:translateY(-.5px)}.paper-meta-line{display:flex;align-items:center;gap:12px;font-family:var(--mono);font-size:11px;color:var(--ink-faint);margin-bottom:6px}.paper-meta-line .sep{color:var(--hairline-strong)}.paper-title{font-family:var(--serif);font-size:22px;font-weight:500;line-height:1.2;letter-spacing:-.015em;margin-bottom:6px;color:var(--ink);cursor:pointer;text-wrap:pretty}.paper-title:hover{color:var(--accent-text)}.paper-organization-logos{display:inline-flex;align-items:center;gap:4px;margin-left:7px;vertical-align:-4px}.paper-organization-logo{display:inline-grid;width:24px;height:24px;flex:0 0 24px;place-items:center;overflow:hidden;border:1px solid var(--hairline);border-radius:4px;background:var(--bg)}.paper-organization-logo:hover{border-color:var(--hairline-strong)}.paper-organization-logo img{width:100%;height:100%;padding:2px;-o-object-fit:contain;object-fit:contain}.paper-authors{font-size:13px;color:var(--ink-soft);margin-bottom:10px;font-family:var(--serif)}.paper-card-author-avatar{width:16px;height:16px;margin-right:4px;vertical-align:-3px}.paper-authors a{color:inherit;text-decoration:none}.paper-authors a:hover{color:var(--accent-text);text-decoration:underline;text-underline-offset:2px}.paper-abstract{font-size:13.5px;color:var(--ink-soft);line-height:1.55;max-height:4.65em;margin-bottom:12px;font-family:var(--serif);text-wrap:pretty;display:-webkit-box;line-clamp:3;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}.paper-title mark,.paper-abstract mark{background:color-mix(in srgb,var(--accent) 24%,transparent);color:inherit;border-radius:2px;padding:0 1px}.search-results-end{padding:24px 0;text-align:center;color:var(--ink-faint);font:11px var(--mono)}.paper-tags{display:flex;flex-wrap:wrap;gap:6px}.paper-tags--clamped{--tag-row-height: 26px;max-height:calc(var(--tag-row-height) * 2 + 6px);overflow:hidden}.paper-sota{position:relative;white-space:nowrap;overflow:hidden;margin-bottom:12px;font-family:var(--mono);font-size:12px;line-height:1.6}.paper-sota-stack{margin-top:16px;padding-top:16px;border-top:1px solid var(--hairline)}.paper-sota-stack .paper-sota{margin-bottom:4px}.paper-sota-stack .paper-sota:last-child{margin-bottom:0}.paper-sota-measure{position:absolute;left:-9999px;top:0;visibility:hidden;white-space:pre;pointer-events:none}.paper-sota-label{font-weight:500;color:var(--ink-faint)}.paper-sota-label--sota{color:#b8860b}.paper-sota-sep,.paper-sota-on{color:var(--ink-faint)}.paper-sota-name{color:var(--accent-text)}.paper-sota-name:hover{text-decoration:underline}.paper-sota-more{font-size:11px;color:var(--ink-faint);cursor:pointer}.paper-sota-more:hover{color:var(--accent-text);text-decoration:underline}.paper-stats{display:flex;flex-direction:column;align-items:flex-end;gap:8px;font-family:var(--mono);font-size:11px;color:var(--ink-soft)}.upvote-btn{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:8px 14px;border:1px solid var(--hairline);border-radius:6px;background:var(--bg-elevated);font-family:var(--mono);font-size:13px;font-weight:500;min-width:56px;transition:all .15s}.upvote-btn:hover{border-color:var(--ink)}.upvote-btn.upvoted{background:var(--accent-soft);border-color:var(--accent);color:var(--accent-text)}.upvote-btn .arrow{font-size:9px;line-height:1;margin-bottom:2px}.upvote-btn .count{font-feature-settings:"tnum"}.stat-line{display:flex;align-items:center;gap:5px}.sort-bar{display:flex;align-items:center;justify-content:space-between;padding-bottom:16px;border-bottom:1px solid var(--hairline);margin-bottom:16px}.sort-options{display:flex;gap:4px}.sort-btn{padding:4px 10px;font-family:var(--mono);font-size:11px;font-weight:500;letter-spacing:.02em;color:var(--ink-soft);border-radius:4px;transition:all .15s;text-transform:lowercase}.sort-btn.active{background:var(--ink);color:var(--bg)}.sort-btn:not(.active):hover{background:var(--bg-subtle);color:var(--ink)}.paper-feed-toolbar-controls,.paper-feed-resource-controls,.paper-feed-filter-options{display:flex;align-items:center}.paper-feed-toolbar-controls{gap:14px;flex-wrap:wrap}.paper-feed-resource-controls{gap:10px}.paper-feed-resource-divider{width:1px;height:22px;background:var(--hairline)}.paper-feed-filter-options{gap:6px;flex-wrap:wrap}.paper-feed-filter{display:inline-flex;align-items:center;gap:6px;min-height:30px;padding:5px 10px;border:1px solid var(--hairline);border-radius:999px;background:var(--bg);color:var(--ink-soft);font-family:var(--mono);font-size:11px;letter-spacing:.01em;cursor:pointer;transition:border-color .15s,background .15s,color .15s}.paper-feed-filter-content{display:inline-flex;align-items:center;gap:6px}.paper-feed-filter:hover{border-color:var(--ink-faint);color:var(--ink)}.paper-feed-filter.active{border-color:var(--ink);background:var(--ink);color:var(--bg)}.paper-feed-filter:focus-visible{outline:2px solid var(--ink);outline-offset:2px}.paper-feed-filter-icon{display:inline-flex;color:currentColor;filter:grayscale(1)}.hf-resource-logo{position:relative;display:inline-flex;width:15px;height:15px}.hf-resource-logo img{position:absolute;top:0;right:0;bottom:0;left:0;display:block;width:15px;height:15px}.hf-resource-logo-white,.paper-feed-filter.active .hf-resource-logo-black{visibility:hidden}.paper-feed-filter.active .hf-resource-logo-white{visibility:visible}.paper-feed-filter-check{display:inline-flex;align-items:center;justify-content:center;width:17px;height:17px;border-radius:50%;background:color-mix(in srgb,var(--bg) 18%,transparent);color:currentColor;font-size:10px;line-height:1}.home-feed-sort-bar{flex-wrap:wrap;row-gap:10px}.results-count{font-family:var(--mono);font-size:11px;color:var(--ink-faint)}.paper-feed-scope-links{margin-top:12px;display:flex;flex-direction:column;align-items:flex-start;gap:8px}.paper-feed-primary-links,.paper-feed-task-tags{display:flex;flex-wrap:wrap;align-items:center;gap:10px}.papers-feed-layout-scoped{display:block}.paper-thumb{display:none}.papers-search-row{display:flex;margin-top:12px;margin-bottom:24px}.papers-search-input-wrap{display:flex;align-items:center;gap:8px;border:1px solid var(--hairline-strong);background:var(--bg-elevated);padding:10px 14px;border-radius:4px;flex:1;max-width:600px;color:var(--ink-faint)}.papers-search-input-wrap:focus-within{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-soft)}.papers-search-input{flex:1;border:none;outline:none;background:transparent;font-family:var(--sans);font-size:14px;color:var(--ink)}.papers-search-input::-moz-placeholder{color:var(--ink-faint)}.papers-search-input::placeholder{color:var(--ink-faint)}@media (max-width: 880px){.feed-title{font-size:32px}.paper-card{grid-template-columns:120px 1fr;gap:16px;padding:20px 0}.paper-body{flex-direction:column;align-items:stretch;gap:12px}.paper-resources{width:auto;flex-direction:row;align-items:center;justify-content:flex-start;gap:24px;border-left:none;border-top:1px solid var(--hairline);padding-left:0;padding-top:12px}.paper-resource{flex-direction:row;gap:8px}.paper-resource .resource-stat{align-items:flex-start}}@media (min-width: 641px) and (max-width: 880px){.paper-thumb-wrap{min-width:0}.paper-thumb-wrap>div{width:100%!important;max-width:120px;height:auto!important;aspect-ratio:160 / 220}.paper-thumb-wrap>div>img,.paper-thumb-wrap>div>svg{width:100%!important;height:100%!important}.paper-thumb-skeleton{width:100%;max-width:120px;height:auto;aspect-ratio:160 / 220}}@media (max-width: 640px){.feed-header{margin-bottom:24px;gap:16px}.feed-title{font-size:26px}.paper-card{grid-template-columns:1fr;gap:12px}.paper-resources{border-top:none;padding-top:0}.paper-thumb-wrap{align-self:flex-start}.paper-title{font-size:19px}.paper-abstract{max-height:6.2em;-webkit-line-clamp:4;line-clamp:4}}.sort-options-time{margin-left:auto}.sort-btn-time{text-transform:none}@media (max-width: 900px){.sort-bar{flex-wrap:wrap;gap:8px}.sort-options-time{margin-left:0}}@media (max-width: 560px){.paper-feed-resource-divider{display:none}.paper-feed-resource-controls{gap:0}}.paper-date-filter{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:4px}.paper-date-popover{width:min(760px,calc(100vw - 32px));max-width:760px;padding:14px 18px;max-height:calc(100vh - 24px);overflow-y:auto}.paper-date-popover-header{margin-bottom:8px}.paper-date-popover-header h2{margin:0;font-family:var(--serif);font-size:21px}.paper-date-popover-header p{margin:5px 0 0;color:var(--ink-soft)}.paper-date-navigation{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:36px;margin-bottom:-38px;pointer-events:none;position:relative;z-index:1}.paper-date-navigation-group{display:flex;justify-content:space-between}.paper-date-navigation button{pointer-events:auto}.paper-date-navigation button,.paper-date-actions button{border:1px solid var(--hairline);border-radius:6px;background:var(--bg-elevated);color:var(--ink);padding:7px 11px;font:inherit;cursor:pointer}.paper-date-calendars{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:36px}.paper-date-year{display:flex;align-items:center;justify-content:center;gap:8px;margin-bottom:6px;color:var(--ink-soft);font-size:13px;font-weight:600}.paper-date-year input{width:5.5rem;border:1px solid var(--hairline);border-radius:5px;background:var(--bg-elevated);color:var(--ink);padding:5px 7px;font:inherit}.paper-date-year input:focus-visible{outline:2px solid var(--accent);outline-offset:1px}.paper-date-calendar h3{margin:0 0 10px;text-align:center;font-family:var(--serif);font-size:17px}.paper-date-weekdays,.paper-date-days{display:grid;grid-template-columns:repeat(7,minmax(0,1fr))}.paper-date-weekdays span{padding:3px 0 4px;color:var(--ink-faint);text-align:center;font-size:11px;font-weight:600}.paper-date-day{width:28px;height:28px;justify-self:center;border:0;border-radius:999px;background:transparent;color:var(--ink);font:inherit;cursor:pointer}.paper-date-day:hover:not(:disabled),.paper-date-day:focus-visible{background:var(--bg-subtle);outline:2px solid var(--accent);outline-offset:-2px}.paper-date-day.in-range{border-radius:0;background:color-mix(in srgb,var(--accent) 14%,transparent)}.paper-date-day.selected{background:var(--accent);color:#fff;font-weight:700}.paper-date-day.today:not(.selected){box-shadow:inset 0 0 0 1px var(--accent)}.paper-date-day:disabled{color:var(--ink-faint);cursor:not-allowed;opacity:.42}.paper-date-day.outside{visibility:hidden}.paper-date-actions{display:flex;align-items:center;justify-content:space-between;gap:12px;padding-top:10px;border-top:1px solid var(--hairline)}.paper-date-actions>div{display:flex;gap:8px}.paper-date-actions .paper-date-clear{border-color:transparent;color:var(--ink-soft)}.paper-date-actions .paper-date-apply{border-color:var(--accent);background:var(--accent);color:#fff}.paper-date-actions button:disabled{cursor:not-allowed;opacity:.45}.paper-date-filter-single-calendar{justify-content:flex-start}.paper-date-popover-single-calendar{width:calc(100vw - 20px);padding:20px 14px}.paper-date-popover-single-calendar .paper-date-calendars,.paper-date-popover-single-calendar .paper-date-navigation{display:block}.paper-date-popover-single-calendar .paper-date-day{width:36px;height:36px}.organization-hero{display:grid;grid-template-columns:minmax(260px,.34fr) minmax(0,1fr);align-items:center;gap:48px;margin:24px 0 32px}.organization-hero-profile{min-width:0}.organization-hero-title{display:flex;align-items:center;gap:14px}.organization-hero-title img{flex:none;-o-object-fit:contain;object-fit:contain}.organization-hero-links{display:flex;flex-wrap:wrap;gap:12px;margin-top:12px}.organization-contributions{width:100%;min-width:0}.organization-contributions-header{margin-bottom:12px}.organization-contributions-title{font-family:var(--serif);font-size:20px;font-weight:600;line-height:1.2}.organization-contributions-summary{margin-top:3px;color:var(--ink-soft);font-size:12px}.organization-contributions-legend{display:flex;align-items:center;justify-content:flex-start;gap:4px;margin-top:8px;color:var(--ink-faint);font-family:var(--mono);font-size:10px;white-space:nowrap}.organization-contributions-legend span:first-child{margin-right:3px}.organization-contributions-legend span:last-child{margin-left:3px}.organization-contributions-scroll{width:calc(100% + 34px);max-width:none;margin-left:-34px;overflow-x:auto;padding:2px 0;scrollbar-width:thin;scrollbar-color:var(--hairline-strong) transparent}.organization-contributions-plot{display:grid;grid-template-columns:25px auto;gap:9px;margin:0}.organization-contributions-weekdays{display:grid;grid-template-rows:repeat(7,12px);gap:3px;padding-top:24px;color:var(--ink-faint);font-family:var(--mono);font-size:9px;line-height:12px;text-align:right}.organization-contributions-months{display:grid;gap:3px;height:20px;color:var(--ink-faint);font-family:var(--mono);font-size:9px;line-height:12px}.organization-contributions-months span{grid-row:1;white-space:nowrap}.organization-contributions-grid{display:grid;grid-template-rows:repeat(7,12px);grid-auto-flow:column;gap:3px}.organization-contribution-cell{display:block;width:12px;height:12px;border:1px solid color-mix(in srgb,var(--hairline) 78%,transparent);border-radius:2px;background:var(--bg-subtle)}.organization-contribution-cell.level-1{border-color:color-mix(in srgb,var(--positive-border) 60%,transparent);background:color-mix(in srgb,var(--positive-bg) 65%,var(--positive-border))}.organization-contribution-cell.level-2{border-color:transparent;background:color-mix(in srgb,var(--positive-text) 35%,var(--positive-bg))}.organization-contribution-cell.level-3{border-color:transparent;background:color-mix(in srgb,var(--positive-text) 60%,var(--positive-bg))}.organization-contribution-cell.level-4{border-color:transparent;background:var(--positive-text)}.organization-contribution-cell.is-outside{visibility:hidden}.organization-contributions-skeleton{width:100%;height:154px;border-radius:6px}@media (max-width: 960px){.organization-hero{grid-template-columns:1fr;align-items:start;gap:28px}.organization-contributions-plot{margin:0 auto}.organization-contributions-scroll{width:100%;max-width:100%;margin-left:0}.organization-contributions-legend{justify-content:center;width:min(100%,826px);margin:8px auto 0}}@media (max-width: 640px){.organization-hero{margin-bottom:28px}.organization-contributions{max-width:calc(100vw - 28px)}}.author-hero{margin:8px 0 20px}.author-hero-title{display:flex;align-items:center;gap:20px}.author-avatar{display:block;width:96px;height:96px}@media (max-width: 640px){.author-avatar{width:64px;height:64px}}.author-hero .feed-subtitle a{color:var(--accent-text);text-decoration:none}.author-hero .feed-subtitle a:hover{text-decoration:underline;text-underline-offset:2px}.tag-chip{display:inline-flex;align-items:center;gap:5px;padding:3px 9px;font-family:var(--mono);font-size:11px;font-weight:500;border-radius:4px;cursor:pointer;transition:filter .15s,transform .15s;white-space:nowrap;border:1px solid transparent}.tag-chip:hover{filter:brightness(.96);transform:translateY(-1px)}.tag-chip .dot{width:5px;height:5px;border-radius:50%}.paper-tags--clamped .tag-chip{line-height:16px}.tag-hero{padding:48px 0 32px;border-bottom:1px solid var(--hairline);margin-bottom:32px}.tag-hero-eyebrow{font-family:var(--mono);font-size:11px;letter-spacing:.12em;text-transform:uppercase;color:var(--ink-faint);margin-bottom:12px;display:flex;align-items:center;gap:8px}.tag-hero-title{font-family:var(--serif);font-size:56px;font-weight:500;letter-spacing:-.025em;line-height:1;margin-bottom:16px;overflow-wrap:break-word}.tag-hero-meta{display:flex;gap:32px;margin-top:24px;font-family:var(--mono);font-size:12px;color:var(--ink-soft)}.tag-hero-meta .stat{display:flex;flex-direction:column;gap:4px}.tag-hero-meta .stat .label{font-size:10px;letter-spacing:.1em;text-transform:uppercase;color:var(--ink-faint)}.tag-hero-meta .stat .value{font-family:var(--serif);font-size:22px;font-weight:500;color:var(--ink)}.tag-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:0;border-top:1px solid var(--hairline)}.tag-cell{padding:20px 24px;border-bottom:1px solid var(--hairline);border-right:1px solid var(--hairline);cursor:pointer;transition:background .15s;display:flex;flex-direction:column;gap:8px}.tag-cell:nth-child(3n){border-right:none}.tag-cell:hover{background:var(--bg-elevated)}.tag-cell .name{font-family:var(--serif);font-size:18px;font-weight:500;display:flex;align-items:center;gap:8px}.tag-cell .name .dot{width:8px;height:8px;border-radius:50%}.tag-cell .meta{font-family:var(--mono);font-size:11px;color:var(--ink-faint);display:flex;gap:12px}.taxonomy-trending{margin-bottom:48px;scroll-margin-top:80px}.taxonomy-trending-header{padding-bottom:12px;border-bottom:1px solid var(--hairline-strong)}.taxonomy-trending-header h2{display:flex;align-items:center;gap:10px;margin-bottom:4px;font-family:var(--serif);font-size:26px;font-weight:500;letter-spacing:-.02em}.taxonomy-trending-header h2 svg{color:var(--accent-text)}.taxonomy-trending-note{margin:0;font-family:var(--serif);font-style:italic;font-size:13px;color:var(--ink-soft)}.taxonomy-trending-rank{min-width:1.6em;font-family:var(--mono);font-size:11px;font-style:normal;color:var(--ink-faint)}.taxonomy-trending-meta{flex-wrap:wrap}.taxonomy-trending-lift{display:inline-flex;align-items:center;gap:3px}.tag-hero-meta .stat .value small{margin-left:2px;font-family:var(--mono);font-size:10px;font-weight:500;color:var(--ink-faint)}.framework-category{margin-top:32px}.framework-category-head{display:flex;align-items:flex-start;justify-content:space-between;gap:24px;margin-bottom:16px}.framework-category-blurb{font-family:var(--serif);font-size:14px;line-height:1.55;color:var(--ink-soft);max-width:720px;margin:0}.framework-category-meta{font-family:var(--mono);font-size:11px;color:var(--ink-faint);white-space:nowrap}.framework-guide-link{display:inline-block;margin-top:8px;font-family:var(--mono);font-size:11px;color:var(--accent-text);text-decoration:none}.framework-guide-link:hover{text-decoration:underline}.framework-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:14px}.framework-card{border:1px solid var(--hairline);background:var(--bg-elevated);border-radius:6px;padding:18px 22px;scroll-margin-top:24px;display:flex;flex-direction:column;gap:12px;transition:border-color .15s}.framework-card:hover{border-color:var(--ink)}.framework-card-clickable{cursor:pointer}.framework-card-clickable:focus-visible{border-color:var(--ink);outline:2px solid var(--accent);outline-offset:2px}.framework-card-head{display:flex;justify-content:space-between;align-items:flex-start;gap:16px}.framework-card-name{font-family:var(--serif);font-size:20px;font-weight:500;letter-spacing:-.01em;margin:0;color:var(--ink)}.framework-card-org{font-family:var(--mono);font-size:11px;color:var(--ink-faint);margin-top:4px}.framework-platform-row{display:flex;flex-wrap:wrap;gap:6px;justify-content:flex-end}.framework-platform-chip{font-family:var(--mono);font-size:10px;letter-spacing:.03em;text-transform:uppercase;padding:3px 8px;border-radius:3px;white-space:nowrap}.framework-card-desc{font-family:var(--sans);font-size:14px;line-height:1.55;color:var(--ink-soft);margin:0}.framework-card-when{font-family:var(--serif);font-style:italic;font-size:13px;line-height:1.5;color:var(--ink-soft);padding-top:4px;border-top:1px solid var(--hairline)}.framework-card-when-label{display:block;font-family:var(--mono);font-size:10px;font-style:normal;letter-spacing:.06em;text-transform:uppercase;color:var(--ink-faint);margin-bottom:4px}.framework-card-links{display:flex;flex-wrap:wrap;gap:10px;margin-top:auto}.framework-link{display:inline-flex;align-items:center;gap:6px;font-family:var(--mono);font-size:11px;color:var(--accent-text);text-decoration:none;padding:4px 10px;border:1px solid var(--hairline);border-radius:4px;transition:border-color .15s,background .15s}.framework-link:hover{border-color:var(--ink);background:var(--bg-subtle)}.framework-link-disabled,.framework-link-disabled:hover{color:var(--ink-faint);background:transparent;border-color:var(--hairline);cursor:not-allowed}@media (max-width: 880px){.tag-grid{grid-template-columns:repeat(2,1fr)}.tag-cell:nth-child(3n){border-right:1px solid var(--hairline)}.tag-cell:nth-child(2n){border-right:none}.framework-category-head{flex-direction:column;gap:8px}.framework-card-head{flex-direction:column;gap:10px}.framework-platform-row{justify-content:flex-start}.tag-hero-title{font-size:40px}}@media (max-width: 640px){.tag-hero{padding:32px 0 24px;margin-bottom:24px}.tag-hero-title{font-size:30px}.tag-grid{grid-template-columns:1fr}.tag-cell{padding:16px;border-right:none!important}.framework-grid{grid-template-columns:1fr}.tag-hero-meta{gap:20px;flex-wrap:wrap}}.task-hero-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(320px,480px);gap:48px;align-items:start}.task-figure-card{background:var(--bg-elevated);border:1px solid var(--hairline);border-radius:6px;padding:16px 16px 12px;margin:0;box-shadow:0 1px #00000005}.task-figure-img-wrap{width:100%;background:var(--bg);border-radius:4px;overflow:hidden;line-height:0}.task-figure-img{width:100%;height:auto;display:block}.task-figure-card--compact .task-figure-img{width:50%;margin:0 auto}.task-figure-card figcaption{font-family:var(--serif);font-style:italic;font-size:12px;color:var(--ink-faint);text-align:center;margin-top:10px;border-top:1px solid var(--hairline);padding-top:10px}.task-image-credit{color:var(--ink-faint);font-family:var(--mono);font-size:10px;font-style:normal}.task-image-credit p{margin:0}.task-image-credit a{color:inherit;text-decoration:underline;text-underline-offset:2px}.task-image-credit a:hover{color:var(--accent-text)}@media (max-width: 900px){.task-hero-grid{grid-template-columns:1fr;gap:24px}}.taxonomy-suggestion-cell{-webkit-appearance:none;-moz-appearance:none;appearance:none;width:100%;border-top:0;border-left:0;background:transparent;color:var(--ink-soft);text-align:left}.taxonomy-suggestion-cell .name{font-style:italic}.taxonomy-suggestion-icon{width:14px;height:14px}.task-page-grid{display:grid;grid-template-columns:1fr 260px;gap:56px;align-items:start}.task-featured-collection{display:grid;grid-template-columns:1fr auto;gap:4px 24px;align-items:center;margin-top:32px;padding:18px 24px;border:1px solid var(--hairline);border-left:3px solid var(--accent);border-radius:6px;background:var(--bg-elevated);color:var(--ink);text-decoration:none;transition:border-color .15s}.task-featured-collection:hover{border-color:var(--accent)}.task-featured-collection-eyebrow{grid-column:1;font-family:var(--mono);font-size:10px;font-weight:600;letter-spacing:.12em;text-transform:uppercase;color:var(--accent-text)}.task-featured-collection strong{grid-column:1;font-family:var(--serif);font-size:22px;line-height:1.2}.task-featured-collection-description{grid-column:1;color:var(--ink-soft);font-size:14px;line-height:1.45}.task-featured-collection-meta{grid-column:2;grid-row:1 / span 3;display:inline-flex;align-items:center;gap:6px;font-family:var(--mono);font-size:11px;letter-spacing:.08em;text-transform:uppercase;color:var(--accent-text);white-space:nowrap}.medical-ai-hub{margin-top:32px;padding:24px;border:1px solid var(--hairline);border-top:3px solid var(--accent);border-radius:6px;background:var(--bg-elevated)}.medical-ai-hub-heading>span,.medical-ai-hub-card-eyebrow{display:block;font-family:var(--mono);font-size:10px;font-weight:600;letter-spacing:.12em;text-transform:uppercase;color:var(--accent-text)}.medical-ai-hub-heading h2{margin:6px 0 4px;font-family:var(--serif);font-size:26px;line-height:1.2;color:var(--ink)}.medical-ai-hub-heading p{margin:0;color:var(--ink-soft);font-size:14px}.medical-ai-hub-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-top:20px}.medical-ai-hub-card{display:flex;min-width:0;min-height:176px;flex-direction:column;padding:16px;border:1px solid var(--hairline);border-radius:5px;background:var(--bg);color:var(--ink);text-decoration:none;transition:border-color .15s,transform .15s}.medical-ai-hub-card:hover{border-color:var(--accent);transform:translateY(-2px)}.medical-ai-hub-card strong{margin-top:10px;font-family:var(--serif);font-size:18px;line-height:1.2}.medical-ai-hub-card-description{margin-top:8px;color:var(--ink-soft);font-size:13px;line-height:1.45}.medical-ai-hub-card-meta{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:auto;padding-top:16px;font-family:var(--mono);font-size:10px;letter-spacing:.04em;text-transform:uppercase;color:var(--ink-faint)}.task-explainer{font-family:var(--serif);font-size:17px;line-height:1.55;color:var(--ink);max-width:720px;margin-top:16px;margin-bottom:28px;text-wrap:pretty}.task-explainer p{margin:0 0 12px}.task-explainer p:last-child{margin-bottom:0}.task-explainer a{color:var(--accent-text);text-decoration:underline;text-underline-offset:2px;text-decoration-thickness:1px}.task-explainer a:hover{color:var(--accent)}.task-explainer strong{color:var(--ink);font-weight:600}.task-explainer em{font-style:italic}.task-explainer code{font-family:var(--mono);font-size:.9em;background:var(--bg-elevated);padding:1px 5px;border-radius:3px}.task-research-trends{max-width:760px;margin:-8px 0 28px;border-left:2px solid var(--accent);background:var(--bg-elevated)}.task-research-trends-item{border-bottom:0}.task-research-trends-trigger{padding:18px 20px;color:var(--accent-text)}.task-research-trends-trigger:hover{text-decoration:none}.task-research-trends-trigger svg{width:16px;height:16px}.task-research-trends-title{font-family:var(--mono);font-size:11px;font-weight:600;letter-spacing:.08em;text-transform:uppercase;color:var(--accent-text)}.task-research-trends-content{padding:0 20px 16px}.task-research-trends ul{margin:0;padding-left:19px}.task-research-trends li{padding-left:4px;font-family:var(--serif);font-size:15px;line-height:1.5;color:var(--ink)}.task-research-trends li+li{margin-top:8px}.task-research-trends li::marker{color:var(--accent-text)}.task-research-trends p{margin:0}.task-research-trends a{color:var(--accent-text);text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:2px}.task-quickstats{display:flex;gap:28px;font-family:var(--mono);font-size:11px;color:var(--ink-faint);letter-spacing:.05em;padding-bottom:14px;margin-bottom:0;border-bottom:1px solid var(--accent)}.task-quickstats .num{color:var(--ink);font-weight:600;font-size:12px;margin-right:5px;font-feature-settings:"tnum"}.task-framework-links{display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px;margin-top:14px}.task-framework-links-label{font-family:var(--mono);font-size:10px;letter-spacing:.12em;text-transform:uppercase;color:var(--ink-faint);font-weight:600}.task-framework-link{display:inline-flex;align-items:center;gap:6px;font-family:var(--mono);font-size:12px;color:var(--ink);text-decoration:none;padding:4px 10px;border:1px solid var(--hairline);border-radius:999px;background:var(--bg-elevated);transition:color .15s,border-color .15s}.task-framework-link:hover{color:var(--accent-text);border-color:var(--accent)}.task-framework-link-stars{color:var(--ink-faint);font-size:11px}.task-side{position:sticky;top:100px;font-size:13px}.side-block{margin-bottom:28px}.side-block-num{font-family:var(--mono);font-size:10px;color:var(--accent-text);letter-spacing:.1em;margin-bottom:4px}.side-block-label{font-family:var(--mono);font-size:12px;letter-spacing:.12em;text-transform:uppercase;color:var(--ink);font-weight:600;padding-bottom:8px;border-bottom:1px solid var(--hairline);margin-bottom:10px}.side-link-row{display:flex;justify-content:space-between;align-items:baseline;padding:5px 0;cursor:pointer;font-family:var(--serif);font-size:14px}.side-link-row:hover{color:var(--accent-text)}.side-link-row .count{font-family:var(--mono);font-size:11px;color:var(--ink-faint)}.side-domain-pill{font-family:var(--mono);font-size:11px;color:var(--accent-text);padding:6px 0}.side-method-row{display:flex;justify-content:space-between;align-items:center;padding:4px 0}.side-method-row .num{font-family:var(--mono);font-size:10.5px;color:var(--ink-faint)}.task-section-head{scroll-margin-top:96px;margin-top:28px;margin-bottom:14px}.task-section-eyebrow{font-family:var(--mono);font-size:10px;letter-spacing:.12em;text-transform:uppercase;color:var(--accent-text);margin-bottom:6px}.task-section-title{font-family:var(--mono);font-size:18px;font-weight:600;color:var(--ink);letter-spacing:.04em;text-transform:uppercase;display:flex;align-items:baseline;gap:10px}.task-section-title .meta{font-family:var(--mono);font-size:11px;color:var(--ink-faint);font-weight:400;letter-spacing:.05em;text-transform:none}.subtask-section{margin-bottom:24px}.subtask-section+.subtask-section{margin-top:8px}.subtask-head{display:flex;align-items:baseline;gap:10px;margin:18px 0 10px}.subtask-head-name{font-family:var(--mono);font-size:14px;font-weight:600;color:var(--ink);letter-spacing:.04em;text-transform:uppercase;text-decoration:none;transition:color .15s}.subtask-head-name:hover{color:var(--accent-text)}.subtask-head-meta{font-family:var(--mono);font-size:11px;color:var(--ink-faint);letter-spacing:.05em}.subtask-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;align-items:start}.subtask-grid .subtask-section{margin-bottom:0;border:1px solid var(--hairline);background:var(--bg-elevated);border-radius:6px;padding:12px 14px 10px}.subtask-grid .subtask-section+.subtask-section{margin-top:0}.subtask-grid .subtask-head{margin:0 0 8px;padding-bottom:8px;border-bottom:1px solid var(--hairline)}.subtask-grid .subtask-head-name{font-size:12px}.subtask-grid .subtask-head-meta{font-size:10px}.subtask-summary{display:flex;flex-direction:column;gap:7px;min-height:86px;color:var(--ink-soft);text-decoration:none;font-family:var(--mono);font-size:10px;line-height:1.4;letter-spacing:.05em;text-transform:uppercase}.subtask-summary:hover{color:var(--ink)}.subtask-summary-desc{display:-webkit-box;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:3;font-family:var(--serif);font-size:13px;line-height:1.35;letter-spacing:0;text-transform:none;color:var(--ink-soft)}.subtask-grid .bench-row{display:grid;grid-template-columns:22px 1fr 16px;gap:10px;align-items:center;border:0;background:transparent;border-radius:0;padding:8px 0;margin-bottom:0;border-bottom:1px dashed var(--hairline);transition:none}.subtask-grid .bench-row:last-of-type{border-bottom:0}.subtask-grid .bench-row:hover{border-color:transparent}.subtask-grid .bench-row:hover .bench-row-name{color:var(--accent-text)}.subtask-grid .bench-row-num{font-size:10px}.subtask-grid .bench-row-name{font-size:13.5px;margin-bottom:2px;line-height:1.2}.subtask-grid .bench-row-sub{font-size:9.5px;letter-spacing:.06em}.subtask-grid .bench-row-arrow{font-size:14px}.subtask-grid .bench-show-more{font-size:10px;padding:6px 0 0;margin-top:2px}.bench-card{border:1px solid var(--hairline);background:var(--bg-elevated);border-radius:6px;padding:18px 22px;margin-bottom:14px;cursor:pointer;transition:border-color .15s}.bench-card:hover{border-color:var(--ink)}.bench-head{display:flex;justify-content:space-between;align-items:baseline;margin-bottom:14px;gap:16px}.bench-name{font-family:var(--mono);font-size:14px;font-weight:600;letter-spacing:.02em;text-transform:uppercase;color:var(--ink)}.bench-sub{font-family:var(--mono);font-size:10px;letter-spacing:.1em;text-transform:uppercase;color:var(--ink-faint);margin-top:4px}.bench-sota-value{font-family:var(--serif);font-size:36px;font-weight:500;color:var(--accent);font-feature-settings:"tnum";line-height:1}.bench-sota-tag{font-family:var(--mono);font-size:10px;letter-spacing:.08em;text-transform:uppercase;color:var(--ink-faint);text-align:right;margin-top:4px}.bench-task-tag{font-family:var(--mono);font-size:10px;letter-spacing:.08em;text-transform:uppercase;color:var(--accent-text)}.domain-mega-title{font-family:var(--mono);font-size:56px;font-weight:600;letter-spacing:-.01em;line-height:1;text-transform:uppercase;margin-bottom:0;color:var(--ink);overflow-wrap:break-word}.benchmark-trend-table{border-top:1px solid var(--hairline)}.benchmark-trend-head,.benchmark-trend-row{display:grid;grid-template-columns:124px minmax(150px,.8fr) minmax(150px,.9fr) minmax(200px,1.3fr) 44px 78px;gap:20px;align-items:center}.benchmark-trend-head{padding:9px 16px;border-bottom:1px solid var(--hairline);font-family:var(--mono);font-size:9.5px;font-weight:600;letter-spacing:.1em;text-transform:uppercase;color:var(--ink-faint)}.benchmark-trend-row{min-height:92px;padding:12px 16px;border-bottom:1px solid var(--hairline);background:transparent;transition:background .15s,border-color .15s}.benchmark-trend-row:hover{background:var(--bg-elevated);border-color:var(--hairline-strong)}.benchmark-trend-row:hover .bench-row-name{color:var(--accent-text)}.benchmark-trend-cell{min-width:0}.benchmark-trend-sparkline{display:block;width:112px;height:42px;overflow:visible}.benchmark-trend-axis{stroke:var(--hairline-strong);stroke-width:.8;stroke-dasharray:1.5 2.5;vector-effect:non-scaling-stroke}.benchmark-trend-area{fill:var(--accent-soft);opacity:.68}.benchmark-trend-line{fill:none;stroke:var(--accent);stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round;vector-effect:non-scaling-stroke}.benchmark-trend-dot{fill:var(--bg-elevated);stroke:var(--accent);stroke-width:1.8;vector-effect:non-scaling-stroke}.benchmark-trend-point{cursor:crosshair;outline:none}.benchmark-trend-point-hit{fill:transparent}.benchmark-trend-point-mark{fill:var(--bg-elevated);stroke:var(--accent);stroke-width:1.25;opacity:0;transition:opacity .12s,r .12s;vector-effect:non-scaling-stroke}.benchmark-trend-point:hover .benchmark-trend-point-mark,.benchmark-trend-point:focus .benchmark-trend-point-mark{opacity:1;r:2.3px}.benchmark-trend-tooltip rect{fill:var(--ink);opacity:.94}.benchmark-trend-tooltip text{fill:var(--bg);font-family:var(--mono);font-size:3.2px;letter-spacing:.01em}.benchmark-trend-tooltip .benchmark-trend-tooltip-value{font-weight:700}.benchmark-trend-meta{display:flex;align-items:center;gap:6px;margin-top:3px;font-family:var(--mono);font-size:8.5px;letter-spacing:.035em;color:var(--ink-faint);white-space:nowrap}.benchmark-trend-meta strong{color:var(--ink-soft);font-weight:600}.benchmark-trend-change{padding:1px 4px;border-radius:999px;font-size:8px;font-weight:600}.benchmark-trend-change.is-up,.benchmark-trend-change.is-new{color:var(--positive-text);background:var(--positive-bg)}.benchmark-trend-change.is-down{color:var(--negative-text);background:var(--negative-bg)}.benchmark-trend-benchmark{min-width:0}.benchmark-trend-row .bench-row-name{display:block;margin-bottom:5px}.benchmark-trend-row .bench-row-best{width:100%;justify-content:flex-start;text-align:left}.bench-row-best-empty{color:var(--ink-faint);font-family:var(--mono)}.bench-row-paper{min-width:0;font-family:var(--serif);font-size:14px;line-height:1.35}.bench-row-paper a{color:var(--accent-text)}.bench-row-paper a:hover{text-decoration:underline}.bench-row-code{display:flex;justify-content:center}.bench-row-code a{display:inline-flex;color:var(--ink-soft);transition:color .15s,transform .15s}.bench-row-code a:hover{color:var(--accent-text);transform:translateY(-1px)}.bench-row-compare{display:flex;justify-content:center}.bench-row-compare a{display:inline-flex;align-items:center;justify-content:center;gap:5px;min-height:30px;padding:0 10px;border:1px solid var(--accent);border-radius:999px;color:var(--accent-text);font-family:var(--mono);font-size:9px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;white-space:nowrap;transition:color .15s,background .15s}.bench-row-compare a svg{transition:transform .15s}.bench-row-compare a:hover{color:var(--bg);background:var(--accent)}.bench-row-compare a:hover svg{transform:translate(2px)}.bench-row-compare a:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.bench-row{display:grid;grid-template-columns:36px 1fr auto 28px;gap:18px;align-items:center;padding:16px 18px;border:1px solid var(--hairline);background:var(--bg-elevated);border-radius:6px;margin-bottom:8px;cursor:pointer;transition:border-color .15s,transform .15s}.bench-row:hover{border-color:var(--ink)}.bench-row:hover .bench-row-arrow{color:var(--accent-text);transform:translate(3px)}.bench-row-num{font-family:var(--mono);font-size:11px;color:var(--ink-faint);letter-spacing:.05em;font-feature-settings:"tnum"}.bench-row-name{font-family:var(--serif);font-size:18px;font-weight:500;color:var(--ink);letter-spacing:-.005em;margin-bottom:4px}.bench-row-sub{display:flex;align-items:center;gap:8px;font-family:var(--mono);font-size:10px;letter-spacing:.08em;text-transform:uppercase;color:var(--ink-faint)}.bench-row-sub strong{color:var(--ink-soft);font-weight:600}.bench-row-variants{display:flex;flex-wrap:wrap;gap:4px;margin:2px 0 6px}.bench-row-variant{font-family:var(--mono);font-size:9.5px;letter-spacing:.02em;white-space:nowrap;padding:1px 5px;border:1px solid var(--hairline);border-radius:3px;background:transparent;color:var(--ink-faint);cursor:pointer;transition:border-color .15s,color .15s}.bench-row-variant:hover{border-color:var(--ink);color:var(--ink)}.bench-row-variant[aria-pressed=true]{border-color:var(--accent);color:var(--accent-text)}.bench-row-variant:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.bench-row-sub .dot-sep{color:var(--hairline-strong)}.bench-row-sota{text-align:right}.bench-row-sota-value{font-family:var(--serif);font-size:22px;font-weight:500;color:var(--accent-text);font-feature-settings:"tnum";line-height:1}.bench-row-sota-tag{font-family:var(--mono);font-size:9.5px;letter-spacing:.08em;text-transform:uppercase;color:var(--ink-faint);margin-top:4px}.bench-row-arrow{font-family:var(--serif);font-size:18px;color:var(--hairline-strong);text-align:center;transition:color .15s,transform .15s}.bench-row-best{display:flex;align-items:center;justify-content:flex-end;gap:6px;max-width:240px;text-align:right}.bench-row-best-icon{color:var(--accent-text);flex:0 0 auto}.bench-row-best-name{font-family:var(--serif);font-size:14px;color:var(--ink-soft);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.bench-show-more{font-family:var(--mono);font-size:11px;letter-spacing:.05em;color:var(--ink-faint);background:transparent;border:0;padding:8px 2px 2px;margin-top:4px;cursor:pointer;text-transform:lowercase;transition:color .15s}.bench-show-more:hover{color:var(--accent-text)}.bm-action-btn{display:inline-flex;align-items:center;gap:8px;padding:8px 14px;border:1px solid var(--hairline);border-radius:6px;background:var(--bg-elevated);font-family:var(--sans);font-size:13px;font-style:normal;color:var(--ink);cursor:pointer;transition:border-color .15s}.bm-action-btn:hover{border-color:var(--ink)}.bm-action-btn svg{display:block}@media (max-width: 880px){.task-page-grid{grid-template-columns:1fr;gap:32px}.task-side{position:static;top:auto;order:-1}.subtask-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.medical-ai-hub-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.domain-mega-title{font-size:40px}.bench-row{grid-template-columns:28px 1fr auto;gap:12px;padding:14px}.bench-row>.bench-row-arrow{display:none}.bench-row-best{max-width:130px}.bench-row-best-name{font-size:12.5px}.benchmark-trend-head,.benchmark-trend-row{grid-template-columns:112px minmax(130px,.8fr) minmax(120px,.8fr) minmax(160px,1.2fr) 36px 72px;gap:14px}.benchmark-trend-sparkline{width:104px}}@media (max-width: 640px){.domain-mega-title{font-size:30px}.subtask-grid{grid-template-columns:1fr}.medical-ai-hub{padding:18px}.task-featured-collection{grid-template-columns:1fr;padding:16px 18px}.task-featured-collection-meta{grid-column:1;grid-row:auto;margin-top:8px}.medical-ai-hub-grid{grid-template-columns:1fr}.medical-ai-hub-card{min-height:0}.benchmark-trend-head{display:none}.benchmark-trend-row{grid-template-columns:100px minmax(0,1fr) 28px;grid-template-areas:"trend benchmark code" "trend best code" "trend paper paper" "trend compare compare";gap:4px 12px;min-height:120px;padding:12px 4px}.benchmark-trend-cell{grid-area:trend}.benchmark-trend-benchmark{grid-area:benchmark}.benchmark-trend-row .bench-row-best{grid-area:best;justify-content:flex-start;max-width:none;text-align:left}.benchmark-trend-row .bench-row-paper{grid-area:paper}.benchmark-trend-row .bench-row-code{grid-area:code}.benchmark-trend-row .bench-row-compare{grid-area:compare;justify-content:flex-start;margin-top:4px}.bench-row-compare a{min-height:26px;padding:0 9px;font-size:8.5px}.benchmark-trend-sparkline{width:96px}.benchmark-trend-meta{flex-wrap:wrap;gap:3px;white-space:normal}.task-quickstats{flex-wrap:wrap;gap:16px}}.paper-meta-line .arxiv-id{color:var(--accent-text)}.paper-authors .institution{font-style:italic;color:var(--ink-faint)}.paper-tags--clamped .method-chip{line-height:16px}.method-hero-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(360px,560px);gap:56px;align-items:start}.method-hero-grid--wide-figure{grid-template-columns:minmax(0,1fr) minmax(480px,640px)}.method-figure-card{background:var(--bg-elevated);border:1px solid var(--hairline);border-radius:6px;padding:16px 16px 12px;margin:0;box-shadow:0 1px #00000005;align-self:center}.method-figure-svg{width:100%;display:block}.method-figure-svg--schematic{aspect-ratio:360 / 420}.method-figure-img{width:100%;height:auto;display:block}.method-figure-svg--compact .method-figure-img{width:50%;margin:0 auto}.method-figure-svg--scaled-80 .method-figure-img{width:80%;margin:0 auto}.method-figure-card figcaption{font-family:var(--serif);font-style:italic;font-size:12px;color:var(--ink-faint);text-align:center;margin-top:10px;border-top:1px solid var(--hairline);padding-top:10px}.method-image-credit{color:var(--ink-faint);font-family:var(--mono);font-size:10px;font-style:normal}.method-image-credit p{margin:0}.method-image-credit a{color:inherit;text-decoration:underline;text-underline-offset:2px}.method-image-credit a:hover{color:var(--accent-text)}.method-description{font-family:var(--serif);font-size:17px;color:var(--ink-soft);max-width:720px;line-height:1.6;margin-top:16px;text-wrap:pretty}.method-description p{margin:0 0 12px}.method-description p:last-child{margin-bottom:0}.method-description a{color:var(--accent-text);text-decoration:underline;text-underline-offset:2px;text-decoration-thickness:1px}.method-description a:hover{color:var(--accent)}.method-description strong{color:var(--ink);font-weight:600}.method-description code{font-family:var(--mono);font-size:.9em;background:var(--bg-elevated);padding:1px 5px;border-radius:3px}.method-description ul,.method-description ol{padding-left:22px;margin:0 0 12px}.method-description ul{list-style-type:disc}.method-description ol{list-style-type:decimal}.method-description li{margin-bottom:4px}.method-description .katex-display{margin:14px 0;overflow-x:auto;overflow-y:hidden;padding:4px 0}.method-description .katex{font-size:1em}.method-source{margin-top:22px;display:flex;flex-direction:column;gap:6px;max-width:720px}.method-source-label{font-family:var(--mono);font-size:10px;letter-spacing:.14em;text-transform:uppercase;color:var(--ink-faint)}.method-source-link{display:flex;flex-direction:column;gap:2px;padding:12px 14px;background:var(--bg-elevated);border:1px solid var(--hairline);border-left:3px solid var(--accent-text);border-radius:3px;cursor:pointer;transition:background .12s,border-color .12s;text-decoration:none}.method-source-link:not(.is-static):hover{background:var(--bg-subtle);border-color:var(--hairline-strong);border-left-color:var(--accent)}.method-source-link.is-static{cursor:default}.method-source-title{font-family:var(--serif);font-size:17px;font-weight:500;color:var(--ink);letter-spacing:-.005em}.method-source-link:not(.is-static):hover .method-source-title{text-decoration:underline;text-underline-offset:3px;text-decoration-thickness:1px}.method-source-meta{font-family:var(--mono);font-size:11px;color:var(--ink-faint)}@media (max-width: 1024px){.method-hero-grid{grid-template-columns:1fr;gap:24px}.method-figure-card{max-width:560px}.method-hero-grid--wide-figure .method-figure-card{max-width:640px}}.method-hero-title{font-family:var(--mono);font-size:48px;letter-spacing:-.01em}.method-trending-icon{flex:0 0 auto;color:var(--accent-text);fill:color-mix(in srgb,var(--accent-text) 18%,transparent)}.method-trend-score{color:var(--accent-text);font-weight:600}.method-trend-panel{margin-top:20px;padding-top:14px;border-top:1px solid var(--hairline-strong)}.method-trend-header{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;margin-bottom:4px}.method-trend-eyebrow{margin-bottom:5px;font-family:var(--mono);font-size:10px;letter-spacing:.1em;text-transform:uppercase;color:var(--accent-text)}.method-trend-header p{margin:3px 0 0;font-family:var(--mono);font-size:11px;color:var(--ink-faint)}.method-trend-summary{display:flex;flex-direction:column;align-items:flex-end;flex:0 0 auto;font-family:var(--mono);font-size:10px;color:var(--ink-faint)}.method-trend-summary>strong{font-family:var(--serif);font-size:19px;font-weight:500;line-height:1;color:var(--ink)}.method-usage-chart-wrap{position:relative;width:100%}.method-usage-chart{display:block;width:100%;height:auto;overflow:visible}.method-usage-gridline{stroke:var(--hairline);stroke-width:1}.method-usage-y-label,.method-usage-x-label{fill:var(--ink-faint);font-family:var(--mono);font-size:9px}.method-usage-bar-hit{fill:transparent}.method-usage-bar-mark{fill:color-mix(in srgb,var(--accent-text) 48%,var(--bg));transition:fill .12s}.method-usage-bar.is-current .method-usage-bar-mark{opacity:.55}.method-usage-bar:hover .method-usage-bar-mark,.method-usage-bar:focus .method-usage-bar-mark,.method-usage-bar.is-active .method-usage-bar-mark{fill:var(--accent-text)}.method-usage-bar:focus{outline:none}.method-usage-tooltip{position:absolute;top:4px;right:8px;display:flex;gap:8px;padding:5px 8px;border:1px solid var(--hairline-strong);background:var(--bg);font-family:var(--mono);font-size:10px;color:var(--ink-soft);pointer-events:none}.method-trend-skeleton{margin-top:20px}.method-trend-note{margin:6px 0 0;color:var(--ink-faint);font-family:var(--mono);font-size:10px}@media (max-width: 640px){.method-trend-header{flex-direction:column;gap:12px}.method-trend-summary{align-items:flex-start}}.method-chip{display:inline-flex;align-items:center;padding:4px 10px;font-family:var(--mono);font-size:11px;font-weight:500;color:var(--ink);background:var(--bg-elevated);border:1px solid var(--hairline);border-radius:4px;cursor:pointer;transition:all .15s;white-space:nowrap}.method-chip:hover{border-color:var(--ink);background:var(--bg-subtle)}.side-method-row .method-chip{font-size:10.5px;padding:3px 8px}@media (max-width: 880px){.method-hero-title{font-size:40px}}@media (max-width: 640px){.method-hero-title{font-size:30px}}.filter-row{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin-bottom:24px;padding:12px 16px;border:1px solid var(--hairline);border-radius:8px;background:var(--bg-elevated)}.filter-row .label{margin-right:8px;color:var(--ink-faint);font-family:var(--mono);font-size:10px;letter-spacing:.1em;text-transform:uppercase}.search-overlay{position:fixed;top:0;right:0;bottom:0;left:0;background:#1a181466;-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px);z-index:100;display:flex;align-items:flex-start;justify-content:center;padding-top:100px}.search-modal{width:640px;max-width:calc(100vw - 32px);background:var(--bg);border:1px solid var(--hairline-strong);border-radius:12px;box-shadow:0 20px 60px #00000026;overflow:hidden}.search-modal-input{width:100%;padding:18px 20px;font-size:16px;font-family:var(--serif);border:none;background:transparent;outline:none;border-bottom:1px solid var(--hairline);color:var(--ink)}.search-modal-input::-moz-placeholder{color:var(--ink-faint);font-style:italic}.search-modal-input::placeholder{color:var(--ink-faint);font-style:italic}.search-results{max-height:480px;overflow-y:auto;padding:8px}.search-empty{padding:32px;text-align:center;color:var(--ink-faint);font-family:var(--serif);font-style:italic}.search-section-label{font-family:var(--mono);font-size:10px;letter-spacing:.12em;text-transform:uppercase;color:var(--ink-faint);padding:10px 12px 6px}.search-result{display:flex;flex-direction:column;padding:10px 12px;border-radius:6px;cursor:pointer;gap:4px}.search-result:hover,.search-result.focused{background:var(--bg-subtle)}.search-result-title{font-family:var(--serif);font-size:14.5px;font-weight:500;line-height:1.3}.search-result-meta{font-family:var(--mono);font-size:10.5px;color:var(--ink-faint);display:flex;gap:10px}.search-result-tag{display:flex;align-items:center;gap:8px;padding:8px 12px;border-radius:6px;cursor:pointer}.search-result-tag:hover,.search-result-tag.focused{background:var(--bg-subtle)}.search-result-tag .name{font-family:var(--mono);font-size:12px}.search-result-tag .count{margin-left:auto;font-family:var(--mono);font-size:10px;color:var(--ink-faint)}.search-view-all-row{width:100%;border:0;border-top:1px solid var(--hairline);background:var(--bg-subtle);color:var(--accent-text);padding:12px;text-align:left;font:600 11px var(--mono);cursor:pointer}.search-view-all-row:hover,.search-view-all-row:focus-visible{background:var(--bg-subtle);outline:2px solid var(--accent);outline-offset:-2px}@media (max-width: 640px){.search-modal-input{font-size:16px;padding:14px 16px}}.search-ask-row{display:flex;align-items:center;gap:10px;width:100%;padding:10px 12px;border-radius:6px;text-align:left;color:var(--ink)}.search-ask-row:hover{background:var(--bg-subtle)}.search-ask-chip{display:inline-flex;align-items:center;font-family:var(--mono);font-size:10.5px;color:var(--accent-text);background:var(--accent-soft);border-radius:5px;padding:2px 7px;flex:none}.search-ask-text{flex:1;min-width:0;font-family:var(--serif);font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.search-ask-row kbd{font-family:var(--sans);font-size:11px;color:var(--ink-faint);border:1px solid var(--hairline);border-radius:5px;padding:1px 6px}.search-empty-sub{display:block;margin-top:10px;font-family:var(--sans);font-style:normal;font-size:12px;color:var(--ink-faint)}.settings-page-content,.settings-page-loading{min-height:min(680px,calc(100vh - 180px))}.settings-section{border:1px solid var(--hairline);border-radius:10px;padding:20px 22px;margin-top:8px;max-width:760px}.settings-section-title{font-size:12px;font-weight:600;text-transform:uppercase;letter-spacing:.06em;color:var(--ink-faint);margin:0 0 14px}.settings-note.settings-note-flush{margin-top:0;padding-top:0;border-top:0}.settings-billing-loading{color:var(--ink-soft);font-size:13px}.settings-billing,.settings-billing-connect{display:flex;flex-direction:column;gap:14px}.settings-provider-grid{display:grid;gap:14px}.settings-provider-card{display:flex;flex-direction:column;gap:14px;padding:16px;border:1px solid var(--hairline);border-radius:8px;background:var(--bg-subtle)}.settings-provider-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}.settings-provider-heading h3{margin:0;color:var(--ink);font-size:16px;font-weight:650}.settings-provider-heading p{margin:3px 0 0;color:var(--ink-soft);font-size:12px}.settings-usage-row{display:flex;flex-direction:column;gap:9px;padding:13px;border:1px solid var(--hairline);border-radius:7px;background:var(--bg-elevated)}.settings-usage-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}.settings-usage-heading strong{flex-shrink:0;color:var(--ink);font-size:14px}.settings-usage-track{height:7px;overflow:hidden;border-radius:999px;background:var(--hairline)}.settings-usage-track>span{display:block;height:100%;border-radius:inherit;background:var(--accent)}.settings-limit-note{margin:0;color:var(--danger, #b42318);font-size:12px;line-height:1.45}.settings-byok-controls{display:flex;flex-direction:column;gap:10px;padding-top:2px}.settings-byok-controls form{display:flex;flex-direction:column;gap:10px}.settings-byok-controls input{width:100%;border:1px solid var(--hairline-strong);border-radius:7px;padding:10px 12px;color:var(--ink);background:var(--bg-elevated);font:inherit}.settings-fallback-control{display:flex;align-items:flex-start;gap:11px;cursor:pointer}.settings-fallback-control>span{display:flex;flex-direction:column;gap:4px}.settings-fallback-control strong{color:var(--ink);font-size:12px;line-height:1.4}.settings-fallback-control small{color:var(--ink-soft);font-size:11px;line-height:1.45}.settings-plan-row{display:flex;justify-content:space-between;align-items:flex-start;gap:20px}.settings-connected-badge{border-radius:999px;padding:4px 9px;color:var(--accent-text);background:var(--accent-soft);font-size:11px;font-weight:600}.settings-billing-help{color:var(--ink-soft);font-size:11px;margin:0;line-height:1.5}.settings-billing-actions{display:flex;flex-wrap:wrap;gap:8px}.settings-billing-actions .button{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:34px;padding:7px 11px;border:1px solid var(--hairline-strong);border-radius:7px;color:var(--ink);background:var(--bg-elevated);font-size:12px;font-weight:600;text-decoration:none}.settings-billing-actions .button:hover{background:var(--bg-subtle)}.settings-billing-actions .button-primary{border-color:var(--accent);color:var(--accent-text);background:var(--accent-soft)}.settings-billing-actions .button:disabled{cursor:not-allowed;opacity:.55}.settings-billing-actions svg{width:12px;height:12px}.settings-token-label{color:var(--ink);font-size:12px;font-weight:600;margin-bottom:-8px}.settings-billing-connect input{width:100%;border:1px solid var(--hairline-strong);border-radius:7px;padding:10px 12px;color:var(--ink);background:var(--bg-elevated);font:inherit}.settings-billing-select{width:100%;min-height:42px;padding:9px 34px 9px 12px;border:1px solid var(--border);border-radius:7px;background:var(--bg-elevated);color:var(--ink);font:inherit}.settings-billing-select:focus{outline:2px solid var(--accent);outline-offset:1px}.settings-billing-select:disabled{cursor:wait;opacity:.7}.settings-billing-connect input:focus{border-color:var(--accent);outline:2px solid var(--accent-soft)}.settings-token-error{color:var(--danger, #b42318);font-size:12px}.theme-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.theme-option{display:flex;align-items:flex-start;gap:10px;min-width:0;padding:12px;border:1px solid var(--hairline);border-radius:7px;background:var(--bg-elevated);color:var(--ink-soft);text-align:left;transition:background .15s,border-color .15s,color .15s}.theme-option:hover{border-color:var(--hairline-strong);background:var(--bg-subtle);color:var(--ink)}.theme-option.is-selected{border-color:var(--accent);background:var(--accent-soft);color:var(--accent-text)}.theme-option:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.theme-option>svg{width:16px;height:16px;margin-top:1px;flex-shrink:0}.theme-option-copy{display:flex;flex-direction:column;gap:2px;min-width:0}.theme-option-label{color:var(--ink);font-size:13px;font-weight:600}.theme-option-desc{color:var(--ink-soft);font-size:11px;line-height:1.35}.theme-option.is-selected .theme-option-label,.theme-option.is-selected .theme-option-desc{color:var(--accent-text)}.settings-row{display:flex;align-items:flex-start;justify-content:space-between;gap:24px}.settings-row-text{display:flex;flex-direction:column;gap:4px;cursor:pointer}.settings-row-label{font-size:15px;font-weight:500;color:var(--ink)}.settings-row-desc{font-size:13px;color:var(--ink-soft);line-height:1.5;max-width:460px}.settings-note{margin-top:16px;padding-top:16px;border-top:1px solid var(--hairline);font-size:13px;color:var(--ink-soft);line-height:1.5}.settings-note-action{margin-top:10px}.research-section-heading{display:flex;align-items:baseline;justify-content:space-between;gap:16px}.research-section-heading .settings-section-title{display:inline-flex;align-items:center;gap:8px}.research-follow-count{border-radius:999px;padding:1px 7px;color:var(--ink-soft);background:var(--bg-subtle);font-size:11px;letter-spacing:0}.research-feed-link{display:inline-flex;align-items:center;gap:5px;flex-shrink:0;color:var(--accent-text);font-size:13px;font-weight:600;text-decoration:none}.research-feed-link:hover{text-decoration:underline;text-underline-offset:2px}.research-feed-link svg{width:14px;height:14px}.research-section-intro{margin:-6px 0 6px}.research-follow-group{margin-top:16px}.research-follow-group-title{display:flex;align-items:center;gap:6px;margin:0 0 6px;color:var(--ink-soft);font-size:12px;font-weight:600}.research-follow-group-title svg{width:14px;height:14px}.research-follow-list{margin:0;padding:0;list-style:none;border:1px solid var(--hairline);border-radius:8px;background:var(--bg-elevated)}.research-follow-row{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:52px;padding:8px 8px 8px 14px}.research-follow-row+.research-follow-row{border-top:1px solid var(--hairline)}.research-follow-text{display:flex;flex-direction:column;gap:1px;min-width:0}.research-follow-text a{overflow:hidden;color:var(--ink);font-size:14px;font-weight:500;text-overflow:ellipsis;white-space:nowrap;text-decoration:none}.research-follow-text a:hover{color:var(--accent-text);text-decoration:underline;text-underline-offset:2px}.research-follow-text span{color:var(--ink-faint);font-size:12px}.research-follow-row.is-unfollowed .research-follow-text a{color:var(--ink-faint);text-decoration:line-through}.research-follow-action{flex-shrink:0;min-height:30px;padding:5px 10px;border:1px solid transparent;border-radius:6px;color:var(--ink-soft);background:transparent;font-size:12px;font-weight:600}.research-follow-action:hover{border-color:var(--hairline-strong);color:var(--danger, #b42318);background:var(--bg-subtle)}.research-follow-action.is-refollow{border-color:var(--accent);color:var(--accent-text);background:var(--accent-soft)}.research-follow-action:disabled{cursor:wait;opacity:.55}.research-follow-action:focus-visible{outline:2px solid var(--accent);outline-offset:1px}.research-follow-empty{margin-top:14px;padding:18px;border:1px dashed var(--hairline-strong);border-radius:8px;color:var(--ink-soft);font-size:13px;line-height:1.5}.research-follow-empty p{margin:0}.research-follow-empty strong{color:var(--ink);font-weight:600}.research-follow-browse{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}.research-follow-browse a{display:inline-flex;align-items:center;gap:6px;padding:6px 10px;border:1px solid var(--hairline-strong);border-radius:7px;color:var(--ink);background:var(--bg-elevated);font-size:12px;font-weight:600;text-decoration:none}.research-follow-browse a:hover{background:var(--bg-subtle)}.research-follow-browse svg{width:13px;height:13px}.research-email-destination{display:flex;flex-wrap:wrap;align-items:center;gap:8px 10px;margin-top:16px;padding:10px 12px;border:1px solid var(--hairline);border-radius:8px;color:var(--ink-soft);background:var(--bg-subtle);font-size:13px}.research-email-destination>svg{width:15px;height:15px;flex-shrink:0}.research-email-destination strong{color:var(--ink);font-weight:600;overflow-wrap:anywhere}.research-email-destination>span{flex:1 1 220px}.research-email-destination a{color:var(--accent-text);font-size:12px;font-weight:600;text-decoration:none}.research-email-destination a:hover{text-decoration:underline;text-underline-offset:2px}.research-email-status{margin:10px 0 0;color:var(--ink-soft);font-size:12px;line-height:1.5}.research-email-status.is-warning{color:var(--danger, #b42318)}.closed-eval-tooltip-link,.external-eval-tooltip-link{font-weight:600;text-decoration:underline;text-underline-offset:2px}@media (max-width: 640px){.theme-options{grid-template-columns:1fr}}.research-follow{display:flex;flex-wrap:wrap;align-items:center;gap:6px 12px;margin:14px 0 18px}.research-follow-btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-width:112px;min-height:36px;padding:7px 16px 7px 13px;border:1px solid var(--accent);border-radius:999px;color:var(--bg);background:var(--accent);font-family:var(--sans);font-size:14px;font-weight:600;line-height:1;text-decoration:none;cursor:pointer;box-shadow:0 1px 2px #00000014;transition:background .15s,border-color .15s,color .15s,filter .15s}.research-follow-btn:hover{filter:brightness(1.1)}.research-follow-btn:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.research-follow-btn:disabled{cursor:wait;opacity:.6}.research-follow-btn svg{width:16px;height:16px;flex-shrink:0}.research-follow-btn.is-following{border-color:var(--hairline-strong);color:var(--ink);background:var(--bg-elevated);box-shadow:none}.research-follow-btn.is-following svg{color:var(--accent-text)}.research-follow-label-hover{display:none}@media (hover: hover){.research-follow-btn.is-following:hover{filter:none;border-color:var(--danger, #b42318);color:var(--danger, #b42318)}.research-follow-btn.is-following:hover svg,.research-follow-btn.is-following:hover .research-follow-label{display:none}.research-follow-btn.is-following:hover .research-follow-label-hover{display:inline}}.research-follow-hint{color:var(--ink-soft);font-family:var(--sans);font-size:13px;line-height:1.4}.research-follow-hint a{color:var(--accent-text);font-weight:600;text-decoration:none}.research-follow-hint a:hover{text-decoration:underline;text-underline-offset:2px}.research-follow-hint.is-error{color:var(--danger, #b42318)}.following-intro{max-width:720px;margin:8px 0 32px;padding:28px 30px;border:1px solid var(--hairline);border-radius:12px;background:var(--bg-elevated)}.following-intro h2{margin:0;color:var(--ink);font-family:var(--serif);font-size:26px;font-weight:500;line-height:1.2}.following-intro-lead{margin:10px 0 0;color:var(--ink-soft);font-size:15px;line-height:1.55}.following-intro-steps{display:grid;gap:14px;margin:22px 0 0;padding:0;list-style:none}.following-intro-steps li{display:flex;align-items:flex-start;gap:12px}.following-intro-steps li>span{display:inline-flex;flex-shrink:0;align-items:center;justify-content:center;width:26px;height:26px;border-radius:999px;color:var(--accent-text);background:var(--accent-soft);font-family:var(--sans);font-size:13px;font-weight:700}.following-intro-steps p{margin:2px 0 0;color:var(--ink);font-size:14px;line-height:1.55}.following-intro-steps a,.following-intro-popular a:hover{color:var(--accent-text)}.following-intro-pill{display:inline-flex;align-items:center;gap:3px;padding:1px 9px 1px 7px;border-radius:999px;color:var(--bg);background:var(--accent);font-size:12px;font-weight:600;vertical-align:1px}.following-intro-pill svg{width:12px;height:12px}.following-intro-signin{margin-top:20px}.following-intro-browse{display:flex;flex-wrap:wrap;gap:8px;margin-top:20px}.following-intro-browse a{display:inline-flex;align-items:center;gap:6px;padding:7px 12px;border:1px solid var(--hairline-strong);border-radius:8px;color:var(--ink);background:var(--bg-elevated);font-size:13px;font-weight:600;text-decoration:none}.following-intro-browse a:hover{background:var(--bg-subtle)}.following-intro-browse svg{width:14px;height:14px}.following-intro-popular{margin-top:22px;padding-top:18px;border-top:1px solid var(--hairline)}.following-intro-popular h3{margin:0 0 10px;color:var(--ink-faint);font-family:var(--sans);font-size:12px;font-weight:600;letter-spacing:.06em;text-transform:uppercase}.following-intro-popular div{display:flex;flex-wrap:wrap;gap:8px}.following-intro-popular a{padding:4px 10px;border:1px solid var(--hairline);border-radius:999px;color:var(--ink-soft);font-size:13px;text-decoration:none}@media (max-width: 640px){.following-intro{padding:22px 18px}}.reader-route-shell{height:100dvh;min-height:0;display:flex;flex-direction:column;overflow:hidden}.reader-route-shell>.app-header{position:static;flex:0 0 auto}.reader-route-content{min-height:0;flex:1}.paper-reader-shell{height:100%;min-height:0;display:flex;flex-direction:column;background:var(--bg);color:var(--ink);overflow:hidden}.reader-workspace{position:relative;min-height:0;flex:1;display:flex;overflow:hidden}.reader-paper-pane,.reader-assistant-pane{min-width:0;min-height:0;display:flex;flex-direction:column;overflow:hidden}.reader-paper-pane{background:#fff;transition:width .24s cubic-bezier(.22,1,.36,1)}.reader-assistant-pane{visibility:visible;background:var(--bg);opacity:1;transform:translate(0);transition:width .24s cubic-bezier(.22,1,.36,1),opacity .18s ease,transform .24s cubic-bezier(.22,1,.36,1),visibility 0s}.reader-assistant-pane.is-collapsed{visibility:hidden;opacity:0;transform:translate(28px);pointer-events:none;transition:width .24s cubic-bezier(.22,1,.36,1),opacity .14s ease,transform .24s cubic-bezier(.22,1,.36,1),visibility 0s linear .24s}.reader-workspace.is-resizing{cursor:col-resize;-webkit-user-select:none;-moz-user-select:none;user-select:none}.reader-workspace.is-resizing .reader-paper-pane,.reader-workspace.is-resizing .reader-assistant-pane{transition:none}.reader-resize-handle{position:relative;z-index:5;width:1px;flex:0 0 1px;cursor:col-resize;background:var(--hairline-strong);touch-action:none;outline:none}.reader-resize-handle:before{content:"";position:absolute;top:0;right:-8px;bottom:0;left:0}.reader-resize-handle:focus-visible{box-shadow:0 0 0 2px var(--accent)}.reader-collapse-assistant{position:absolute;z-index:8;top:0;right:16px;height:48px;display:flex;align-items:center;border:0;padding:0;background:transparent;color:var(--ink);font-size:12px;line-height:1.5}.reader-workspace.is-assistant-collapsed .pdf-toolbar{padding-right:96px}.reader-tabs{height:40px;flex:0 0 auto;display:flex;border-bottom:1px solid var(--border);background:var(--surface)}.reader-tabs button{flex:1;border:0;border-bottom:2px solid transparent;background:transparent;color:var(--ink-muted)}.reader-tabs button[aria-selected=true]{border-bottom-color:var(--accent);color:var(--ink);font-weight:600}.reader-tab-pending{display:inline-block;width:7px;height:7px;margin-left:6px;border-radius:50%;background:var(--accent);vertical-align:1px}@media (forced-colors: active){.reader-tab-pending{border:1px solid ButtonText}}.reader-workspace .is-hidden{position:absolute!important;top:0;right:0;bottom:0;left:0;width:100%!important;visibility:hidden;pointer-events:none}.reader-workspace.is-tabs>.reader-paper-pane,.reader-workspace.is-tabs>.reader-assistant-pane{width:100%}.reader-status{min-height:100dvh;display:grid;place-content:center;gap:12px;text-align:center}.reader-chat-unavailable{height:100%;display:grid;place-content:center;color:var(--ink-muted);padding:24px;text-align:center}.pdf-viewer{min-height:0;flex:1;display:flex;flex-direction:column}.pdf-toolbar{position:relative;min-height:48px;flex:0 0 auto;display:flex;align-items:center;gap:16px;padding:7px 10px 7px var(--reader-title-inset, 32px);border-bottom:1px solid var(--hairline);background:var(--bg);color:var(--ink);font-size:12px}.pdf-toolbar-paper{min-width:0;flex:1;display:flex;align-items:center;gap:8px;overflow:hidden}.pdf-toolbar-back{flex:0 0 auto;min-height:30px;border:1px solid var(--hairline);border-radius:5px;padding:4px 8px;background:var(--bg-elevated);color:var(--ink);line-height:20px;text-decoration:none;white-space:nowrap}.pdf-toolbar-back:hover{border-color:var(--hairline-strong);background:var(--bg-subtle);color:var(--ink);text-decoration:none}.pdf-toolbar-title{min-width:0;overflow:hidden;color:var(--ink);font-size:14px;font-weight:600;text-overflow:ellipsis;white-space:nowrap}.pdf-toolbar-title:hover{color:var(--accent-text);text-decoration:underline;text-underline-offset:3px}.pdf-toolbar-resource{flex:0 0 auto;display:inline-flex;align-items:center;gap:4px;color:var(--ink-soft);font-size:11px;white-space:nowrap}.pdf-toolbar-resource:before{content:"|";margin-right:4px;color:var(--hairline-strong)}.pdf-toolbar-resource:hover{color:var(--ink);text-decoration:none}.pdf-toolbar-controls{flex:0 0 auto;display:flex;align-items:center;gap:10px}.pdf-toolbar-group{display:flex;align-items:center;gap:5px}.pdf-toolbar button,.pdf-toolbar-controls a{min-height:30px;border:1px solid var(--hairline);border-radius:5px;padding:4px 8px;background:var(--bg-elevated);color:var(--ink);text-decoration:none}.pdf-toolbar button:hover:not(:disabled),.pdf-toolbar-controls a:hover{border-color:var(--hairline-strong);background:var(--bg-subtle)}.pdf-toolbar button:focus-visible,.pdf-toolbar a:focus-visible,.pdf-search-controls input:focus-visible{outline:2px solid var(--accent);outline-offset:1px}.pdf-toolbar button:disabled{opacity:.45}.pdf-page-form{display:flex;align-items:center;gap:4px}.pdf-page-form input{width:32px;height:30px;-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield;border:1px solid var(--hairline);border-radius:5px;padding:0 3px;background:var(--bg-elevated);color:var(--ink);text-align:center}.pdf-page-form input::-webkit-inner-spin-button,.pdf-page-form input::-webkit-outer-spin-button{margin:0;-webkit-appearance:none;-moz-appearance:none;appearance:none}.pdf-zoom-value{width:52px;height:30px;border:1px solid transparent;border-radius:5px;padding:0 3px;background:transparent;color:var(--ink);text-align:center;font:inherit;font-variant-numeric:tabular-nums}.pdf-zoom-value:hover,.pdf-zoom-value:focus{border-color:var(--hairline);background:var(--bg-elevated)}.pdf-search-controls{position:absolute;z-index:10;right:8px;top:calc(100% + 5px);display:flex;align-items:center;gap:5px;padding:7px;border:1px solid var(--hairline);border-radius:6px;background:var(--bg-elevated);box-shadow:0 5px 20px #0003}.pdf-search-controls input{width:min(260px,45vw);min-height:30px;border:1px solid var(--hairline);border-radius:4px;padding:4px 7px;background:var(--bg);color:var(--ink)}.pdf-search-controls span{min-width:70px;color:var(--ink-soft);text-align:center}.pdf-search-controls button{display:inline-flex;align-items:center;justify-content:center}.pdf-scroll-frame{position:relative;min-height:0;flex:1;display:flex;flex-direction:column}.pdf-scroll{min-height:0;flex:1;overflow:auto;overscroll-behavior:contain;background:#fff;scrollbar-color:var(--ink-faint) var(--bg-subtle);scrollbar-gutter:stable}.pdf-scroll::-webkit-scrollbar{width:12px;height:12px}.pdf-scroll::-webkit-scrollbar-track{background:var(--bg-subtle)}.pdf-scroll::-webkit-scrollbar-thumb{border:3px solid var(--bg-subtle);border-radius:999px;background:var(--ink-faint)}.pdf-pages{display:flex;width:-moz-max-content;width:max-content;min-width:100%;flex-direction:column;align-items:center;gap:8px;zoom:var(--pdf-live-scale, 1)}.pdf-page{position:relative;background:#fff}.pdf-page-layer{zoom:var(--pdf-layer-scale, 1)}.pdf-page-layer.is-pending{position:absolute;top:0;left:0;visibility:hidden;pointer-events:none}.pdf-page .react-pdf__Page{margin:0}.pdf-page .textLayer ::-moz-selection{background:#2d7dff4d;color:transparent}.pdf-page .textLayer ::selection{background:#2d7dff4d;color:transparent}.pdf-search-highlight{border-radius:1px;background:#2d7dff57;color:inherit;box-shadow:0 0 0 1px #2d7dff2e}.pdf-search-highlight.is-active{background:#1c68ef85;box-shadow:0 0 0 1px #1c68ef57}.pdf-outline{position:absolute;z-index:9;top:0;right:14px;bottom:0;display:flex;align-items:center;pointer-events:none}.pdf-outline-rail{display:flex;flex-direction:column;align-items:flex-end;justify-content:center;gap:5px;max-height:100%;overflow:hidden;border:0;padding:12px 6px 12px 10px;background:transparent;cursor:pointer;pointer-events:auto}.pdf-outline-rail:focus-visible{outline:2px solid var(--accent);outline-offset:-2px;border-radius:6px}.pdf-outline-tick{display:block;width:18px;height:2px;border-radius:1px;background:var(--ink-faint);transition:background .12s ease,width .12s ease}.pdf-outline-tick.level-1{width:10px}.pdf-outline-tick.is-active{width:22px;background:var(--accent)}.pdf-outline-panel{position:absolute;right:100%;top:50%;width:min(320px,60vw);max-height:min(70vh,100%);overflow-y:auto;margin-right:-6px;padding:10px 6px;border:1px solid var(--hairline);border-radius:12px;background:var(--bg-elevated);color:var(--ink);box-shadow:0 8px 28px #0003;font-size:14px;line-height:1.35;opacity:0;visibility:hidden;transform:translate(6px,-50%);transition:opacity .12s ease,transform .12s ease,visibility 0s linear .12s;pointer-events:none}.pdf-outline:hover .pdf-outline-panel,.pdf-outline:focus-within .pdf-outline-panel,.pdf-outline.is-pinned .pdf-outline-panel{opacity:1;visibility:visible;transform:translateY(-50%);transition-delay:0s;pointer-events:auto}.pdf-outline-panel ol{margin:0;padding:0;list-style:none}.pdf-outline-panel li.level-1 a{padding-left:32px;font-size:13px;color:var(--ink-soft)}.pdf-outline-panel a{display:block;padding:7px 16px;border-radius:6px;color:var(--ink-muted);text-decoration:none;overflow-wrap:anywhere}.pdf-outline-panel a:hover{background:var(--bg-subtle);color:var(--ink);text-decoration:none}.pdf-outline-panel a:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}.pdf-outline-panel a[aria-current=location]{color:var(--accent-text);font-weight:600}@media (hover: none){.pdf-outline:hover:not(.is-pinned) .pdf-outline-panel{opacity:0;visibility:hidden;pointer-events:none}}@media (forced-colors: active){.pdf-outline-tick{background:ButtonText}.pdf-outline-tick.is-active{background:Highlight}}@media (prefers-reduced-motion: reduce){.pdf-outline-panel,.pdf-outline-tick{transition:none}}.pdf-loading,.pdf-error{min-height:50vh;display:grid;place-content:center;color:var(--ink);text-align:center;padding:24px}.pdf-error a,.pdf-error button{color:inherit}.chat-page--reader .chat-main{min-width:0}.chat-page--reader .chat-topbar{min-height:48px;padding:7px 112px 7px 20px}.chat-page--reader .chat-empty-inner{width:min(100%,560px);padding-inline:16px}.chat-page--reader .chat-examples{width:min(100%,300px);margin-inline:auto;flex-direction:column;align-items:stretch}.chat-page--reader .chat-example{width:100%}.chat-reader-action{border:0;background:transparent;color:var(--accent-text);text-decoration:none;font-size:12px;white-space:nowrap}@media (max-width: 880px){.pdf-toolbar{padding-left:16px}}@media (max-width: 640px){.pdf-zoom-value{display:none}.pdf-toolbar{gap:8px;overflow-x:auto;padding-left:14px}.pdf-toolbar-paper{min-width:150px}.pdf-toolbar-group{gap:3px}.pdf-toolbar button,.pdf-toolbar a{padding-inline:6px}}@media (forced-colors: active){.reader-resize-handle,.pdf-toolbar button,.pdf-toolbar a{border:1px solid ButtonText}}@media (prefers-reduced-motion: reduce){.paper-reader-shell *{scroll-behavior:auto!important}.reader-paper-pane,.reader-assistant-pane{transition-duration:.01ms!important}}.pdf-page .linkAnnotation>.pdf-paper-preview-link{position:absolute;top:0;right:0;bottom:0;left:0;display:block;width:100%;height:100%}.pdf-paper-preview-actions{display:flex;justify-content:space-between;gap:12px;padding:10px 14px;border-top:1px solid var(--hairline);font-size:12px}.pdf-paper-preview-actions a,.pdf-paper-preview-actions button{color:var(--accent)}.pdf-paper-preview-actions button{border:0;background:transparent;cursor:pointer;padding:0;font:inherit}.pdf-paper-preview-actions a:focus-visible,.pdf-paper-preview-actions button:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.reader-web-document{max-width:760px;margin:0 auto;padding:32px 28px 64px;color:#1a1a1a;font-size:16px;line-height:1.65;overflow-wrap:anywhere}.reader-web-document h1{margin:0 0 20px;font-size:28px;line-height:1.25}.reader-web-document h2{margin:32px 0 12px;font-size:22px;line-height:1.3}.reader-web-document h3{margin:24px 0 8px;font-size:18px}.reader-web-document img{max-width:100%;height:auto}.reader-web-document pre{overflow-x:auto;padding:12px;border-radius:6px;background:#f4f4f5;font-size:13px}.reader-web-document table{display:block;max-width:100%;overflow-x:auto;border-collapse:collapse;font-size:14px}.reader-web-document th,.reader-web-document td{padding:6px 10px;border:1px solid #e4e4e7}.reader-web-document a{color:#1c68ef}.reader-web-document ::-moz-selection{background:#2d7dff4d}.reader-web-document ::selection{background:#2d7dff4d}@media (max-width: 640px){.reader-web-document{padding:20px 16px 48px;font-size:15px}}.saved-area-section{margin-top:28px}.saved-area-section:first-of-type{margin-top:4px}.saved-area-heading{font-family:var(--serif);font-size:22px;font-weight:500;color:var(--ink);margin:0 0 6px;padding-bottom:6px;border-bottom:1px solid var(--hairline-strong)}.saved-task-block{margin-top:16px}.saved-task-row{display:flex;align-items:center;gap:10px;margin-bottom:6px}.saved-task-count{font-size:12px;color:var(--ink-faint)}.saved-signin-panel{display:flex;justify-content:center;padding:80px 0}.saved-bucket-migration{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:24px;padding:14px 16px;border:1px solid var(--info-border);border-radius:6px;background:var(--info-bg);color:var(--info-text)}.saved-bucket-migration p{max-width:760px;font-size:13px;line-height:1.5}.saved-bucket-migration .hf-signin-btn{flex-shrink:0;max-width:100%;height:auto;min-height:36px;padding:8px 12px;white-space:normal;overflow-wrap:anywhere}@media (max-width: 700px){.saved-bucket-migration{align-items:flex-start;flex-direction:column}}.action-btn.is-saved{background:var(--ink);color:var(--bg);border-color:var(--ink)}.action-btn.is-saved:hover{background:color-mix(in oklch,var(--ink) 88%,var(--accent))}.ask-home-new{max-width:640px;margin:0 auto 6px;padding-left:9px;color:var(--ink-faint);font-size:14px;font-weight:700}.ask-home{position:relative;max-width:640px;margin:0 auto 36px;background:var(--bg-elevated);border:1px solid var(--hairline);border-radius:14px;box-shadow:0 1px 2px #1e1c140a,0 12px 34px -18px #1e1c1447;padding:8px}.ask-home-textarea-wrap{position:relative}.ask-home textarea{position:relative;z-index:1;width:100%;border:0;outline:0;resize:none;background:transparent;font-family:var(--serif);font-size:17px;line-height:1.45;color:transparent;caret-color:var(--ink);padding:12px 12px 4px}.ask-home textarea::-moz-placeholder{color:var(--ink-faint)}.ask-home textarea::placeholder{color:var(--ink-faint)}.ask-home-foot{display:flex;align-items:center;justify-content:space-between;padding:4px 6px 4px 12px}.ask-home-provider-tools{display:flex;align-items:center;gap:10px;flex-wrap:wrap}@media (max-width: 880px){.layout-with-sidebar>.sidebar,.layout-with-sidebar>.feed-main{display:contents}.feed-chat{order:1}.sidebar-section-top-domains{order:2}.sidebar-section-trending-domains{order:3}.feed-content{order:4}.sidebar-section-tools{order:5}}.sidebar-tools-mcp{width:100%;justify-content:space-between;padding:10px 14px;font-size:15px;font-weight:600}.sidebar-tools-mcp:hover{border-color:var(--ink-faint)}.sidebar-tools-copy{font-size:12px;line-height:1.5;color:var(--ink-faint);margin:10px 0 0}.sidebar-tools-copy a{color:var(--ink-soft);text-decoration:underline;text-decoration-style:dotted}.sidebar-tools-copy code{font-family:var(--mono);font-size:11px}.chat-page{position:relative;display:flex;overflow:hidden;background:var(--bg)}.chat-main{flex:1;display:flex;flex-direction:column;min-width:0;background:var(--bg)}.chat-topbar{display:flex;align-items:center;gap:14px;padding:10px 24px;border-bottom:1px solid var(--hairline)}.chat-topbar-title{flex:1;min-width:0;font-family:var(--serif);font-size:14px;color:var(--ink-soft);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.chat-empty{flex:1;display:flex;align-items:flex-start;justify-content:center;padding:40px 24px;overflow-y:auto}.chat-empty-inner{max-width:680px;width:100%;margin-block:auto;text-align:center}.chat-empty-eyebrow{font-family:var(--mono);font-size:11px;letter-spacing:.16em;text-transform:uppercase;color:var(--ink-faint);margin-bottom:18px}.chat-empty-title{font-family:var(--serif);font-weight:500;font-size:44px;line-height:1.05;letter-spacing:-.02em;margin-bottom:14px}.chat-empty-title em{font-style:italic;font-weight:400;color:var(--accent)}.chat-empty-sub{font-family:var(--serif);font-size:16px;line-height:1.5;color:var(--ink-soft);max-width:520px;margin:0 auto 26px;text-wrap:pretty}.chat-staging-access-note{max-width:560px;margin:-12px auto 18px;color:var(--ink-soft);font-size:13px;line-height:1.45}.chat-staging-badge{flex:none;border:1px solid color-mix(in oklch,var(--accent) 36%,var(--hairline));border-radius:999px;padding:3px 7px;color:var(--accent-text);background:color-mix(in oklch,var(--accent) 7%,var(--bg-elevated));font-family:var(--mono);font-size:10px;font-weight:700;letter-spacing:.08em;line-height:1;text-transform:uppercase}.chat-examples{display:flex;flex-wrap:wrap;gap:10px;justify-content:center;margin-top:24px}.chat-example{font-family:var(--serif);font-size:14px;color:var(--ink-soft);background:var(--bg-elevated);border:1px solid var(--hairline);border-radius:999px;padding:8px 16px;transition:border-color .15s,color .15s}.chat-example:hover{border-color:var(--hairline-strong);color:var(--ink)}.chat-paper-inline-highlight{color:var(--accent-text);text-decoration-line:underline;text-decoration-color:color-mix(in oklch,var(--accent) 40%,transparent);text-decoration-thickness:1px;text-underline-offset:2px}.chat-paper-inline-highlight.is-unavailable{color:var(--negative-text);text-decoration-color:var(--negative-border)}@media (max-width: 900px){.chat-empty-title{font-size:34px}}@media (forced-colors: active){.chat-paper-inline-highlight{outline:1px solid CanvasText}}@media (max-width: 560px){.chat-topbar{padding-inline:14px}}.chat-credits-notice{position:relative;display:flex;align-items:center;justify-content:center;min-height:28px;padding:5px 52px 6px;border-bottom:1px solid var(--hairline);background:var(--bg-subtle);color:var(--ink-soft);font-size:12px;line-height:16px;text-align:center}.chat-credits-notice-close{position:absolute;top:50%;right:20px;display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;padding:0;border:0;border-radius:4px;background:transparent;color:var(--ink-soft);font-size:16px;line-height:1;cursor:pointer;transform:translateY(-50%)}.chat-credits-notice-close:hover{background:var(--hairline);color:var(--ink)}.chat-credits-notice-close:focus-visible{outline:2px solid var(--accent-text);outline-offset:1px}.chat-sidebar{position:relative;width:var(--chat-sidebar-width, var(--app-leading-column-width));flex:none;background:var(--bg-subtle);border-right:1px solid var(--hairline);display:flex;flex-direction:column;transition:margin-left .2s ease}.chat-sidebar-resize-handle{position:absolute;top:0;right:-4px;bottom:0;z-index:2;width:8px;cursor:col-resize;touch-action:none}.chat-sidebar-resize-handle:after{content:"";position:absolute;top:0;right:3px;bottom:0;left:3px;background:var(--hairline-strong);opacity:0;transition:opacity .15s}.chat-sidebar-resize-handle:hover:after,.chat-sidebar-resize-handle:focus-visible:after{opacity:1}.chat-sidebar-resize-handle:focus-visible{outline:2px solid var(--link);outline-offset:-3px}.chat-sidebar-closed{margin-left:calc(-1 * (var(--chat-sidebar-width, var(--app-leading-column-width)) + 1px))}.chat-sidebar-top{display:flex;align-items:center;gap:8px;padding:14px 12px 8px}.chat-sidebar-top .icon-btn{flex:none}.chat-new-chat{flex:1;display:flex;align-items:center;justify-content:center;gap:8px;padding:9px;background:var(--bg-elevated);border:1px solid var(--hairline);border-radius:8px;font-size:13px;font-weight:500;color:var(--ink);transition:border-color .15s}.chat-new-chat:hover{border-color:var(--hairline-strong)}.chat-sessions{flex:1;overflow-y:auto;padding:4px 8px 20px}.chat-sessions-empty{padding:18px 10px;font-family:var(--serif);font-style:italic;font-size:13px;color:var(--ink-faint)}.chat-session-group{margin-top:14px}.chat-session-group-label{font-family:var(--mono);font-size:10px;letter-spacing:.12em;text-transform:uppercase;color:var(--ink-faint);padding:6px 10px}.chat-session{display:flex;align-items:center;gap:6px;width:100%;text-align:left;padding:7px 10px;border-radius:7px;font-size:13px;color:var(--ink-soft);transition:background .12s,color .12s}.chat-session:hover{background:var(--hairline);color:var(--ink)}.chat-session-active{background:var(--hairline);color:var(--ink);font-weight:500}.chat-session-title{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.chat-session-delete{display:inline-flex;align-items:center;color:var(--ink-faint);padding:2px;border-radius:4px;flex:none}.chat-session-delete:hover{color:var(--negative-text)}.chat-session-menu{display:inline-flex;border:0;background:transparent;color:inherit;cursor:pointer;padding:0 3px;font-size:17px;line-height:1}@media (hover: hover) and (pointer: fine){.chat-session-delete,.chat-session-menu{display:none}.chat-session:hover .chat-session-delete,.chat-session:hover .chat-session-menu,.chat-session:focus-within .chat-session-delete,.chat-session:focus-within .chat-session-menu{display:inline-flex}}.chat-session-title-input{min-width:0;flex:1;border:1px solid var(--border);border-radius:4px;background:var(--surface);color:var(--ink);font:inherit;padding:2px 4px}.chat-session-context-menu{position:fixed;z-index:1000;width:150px;padding:4px;border:1px solid var(--border);border-radius:7px;background:var(--surface);box-shadow:0 8px 24px #00000029}.chat-session-context-menu button{width:100%;border:0;border-radius:4px;background:transparent;color:var(--ink);padding:7px 9px;text-align:left;cursor:pointer}.chat-session-context-menu button:hover,.chat-session-context-menu button:focus{background:var(--hairline)}.chat-session-loading,.chat-session-load-error{flex:1;display:flex;align-items:center;justify-content:center;gap:10px;color:var(--ink-soft);font-family:var(--serif);font-size:14px}.chat-session-load-error{flex-direction:column}.chat-session-load-error p{margin:0}.chat-session-load-error button{border:1px solid var(--border);border-radius:5px;padding:7px 12px;background:var(--surface);color:var(--ink);cursor:pointer}.chat-session-load-error button:hover{background:var(--bg-subtle)}@media (max-width: 900px){.chat-sidebar{position:absolute;top:0;bottom:0;left:0;z-index:60;box-shadow:0 0 40px #0003;width:var(--app-leading-column-width)}.chat-sidebar-resize-handle{display:none}.chat-sidebar-closed{margin-left:0;transform:translate(-101%);box-shadow:none}}.chat-share-button{flex:none;display:inline-flex;align-items:center;gap:7px;min-height:34px;padding:6px 11px;border:1px solid var(--hairline-strong);border-radius:8px;background:var(--bg-elevated);color:var(--ink);font-size:13px;font-weight:600}.chat-share-button:hover:not(:disabled){background:var(--bg-subtle)}.chat-share-button:disabled{cursor:not-allowed;opacity:.55}.chat-share-button:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.chat-share-button svg{width:15px;height:15px}.chat-share-toast{position:fixed;top:18px;left:50%;width:min(420px,calc(100vw - 32px));transform:translate(-50%)}.chat-share-dialog-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:110;display:grid;place-items:center;padding:20px;background:#0000006b}.chat-share-dialog{width:min(520px,100%);padding:22px;border:1px solid var(--hairline-strong);border-radius:12px;background:var(--bg-elevated);box-shadow:0 18px 60px #00000038}.chat-share-dialog h2{margin:0 0 8px;font-family:var(--serif);font-size:21px}.chat-share-dialog p{margin:0 0 14px;color:var(--ink-soft)}.chat-share-dialog input{width:100%;padding:9px 10px;border:1px solid var(--hairline-strong);border-radius:7px;background:var(--bg);color:var(--ink);font-family:var(--mono);font-size:12px}.chat-share-dialog input:focus{outline:2px solid var(--accent);outline-offset:2px}.chat-share-dialog button{display:block;margin:16px 0 0 auto;padding:7px 14px;border-radius:7px;background:var(--accent);color:#fff;font-weight:600}@media (max-width: 560px){.chat-share-button{width:34px;padding:6px;justify-content:center}.chat-share-button span{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}}.chat-capacity-dialog-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:120;display:grid;place-items:center;padding:20px;background:#0000007a}.chat-capacity-dialog{width:min(500px,100%);padding:24px;border:1px solid var(--hairline-strong);border-radius:12px;background:var(--bg-elevated);box-shadow:0 18px 60px #0000003d}.chat-capacity-dialog h2{margin:0 0 9px;font-family:var(--serif);font-size:22px}.chat-capacity-dialog p{margin:0;color:var(--ink-soft);line-height:1.5}.chat-capacity-countdown{min-height:24px;padding-top:12px;font-size:13px}.chat-capacity-dialog-actions{display:flex;justify-content:flex-end;gap:9px;margin-top:20px}.chat-capacity-dialog-actions button{padding:8px 14px;border-radius:7px;font-weight:600}.chat-capacity-cancel{border:1px solid var(--hairline-strong);background:var(--bg);color:var(--ink)}.chat-capacity-retry{background:var(--accent);color:#fff}.chat-capacity-retry:disabled{cursor:not-allowed;opacity:.5}.chat-capacity-dialog-actions button:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.chat-paused-banner{margin-bottom:.75rem;border:1px solid var(--border);border-radius:.65rem;background:var(--muted);padding:.7rem .85rem;color:var(--muted-foreground);font-size:.875rem;line-height:1.4}.chat-composer-error{margin-bottom:.75rem;border:1px solid color-mix(in oklch,#c33 35%,var(--hairline));border-radius:.65rem;background:color-mix(in oklch,#c33 8%,var(--bg-elevated));padding:.7rem .85rem;color:var(--ink);font-size:.875rem;line-height:1.4}.chat-billing-notice{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px;margin:0 0 10px;padding:9px 11px;border:1px solid color-mix(in oklch,var(--accent) 24%,var(--hairline));border-radius:9px;color:var(--ink-soft);background:color-mix(in oklch,var(--accent) 5%,var(--bg-elevated));font-size:12px;line-height:1.4}.chat-billing-notice a{flex:none;color:var(--accent-text);font-weight:600;text-decoration:none}.chat-billing-notice a:hover{text-decoration:underline}.chat-billing-notice-actions{display:flex;align-items:center;gap:10px;flex:none}.chat-billing-notice-dismiss{display:inline-flex;align-items:center;justify-content:center;width:26px;height:26px;padding:0;border:0;border-radius:6px;color:var(--ink-soft);background:transparent;cursor:pointer}.chat-billing-notice-dismiss:hover{color:var(--ink);background:color-mix(in oklch,var(--ink) 7%,transparent)}.chat-billing-notice-dismiss:focus-visible{outline:2px solid var(--accent);outline-offset:1px}.ask-home>.chat-paper-picker{top:calc(100% + 6px);bottom:auto}.chat-model-picker{position:relative;display:inline-grid;max-width:190px;flex:0 0 auto}.chat-model-picker-sizer,.chat-model-select{min-width:0;max-width:190px;padding:3px 22px 3px 8px;font-family:var(--mono);font-size:11px}.chat-model-picker-sizer{visibility:hidden;overflow:hidden;white-space:nowrap}.chat-model-select{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;height:100%;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:0;border-radius:6px;background:var(--accent-soft);color:var(--accent-text);cursor:pointer}.chat-model-picker-chevron{position:absolute;top:50%;right:6px;width:10px;height:7px;transform:translateY(-50%);fill:none;stroke:var(--accent-text);stroke-linecap:round;stroke-linejoin:round;stroke-width:1.75;pointer-events:none}.chat-model-picker.is-disabled{opacity:.65}.chat-model-select:disabled{cursor:default}.chat-model-label{max-width:190px;border-radius:6px;background:var(--accent-soft);color:var(--accent-text);padding:3px 8px;font-family:var(--mono);font-size:11px}.chat-empty .chat-composer{text-align:left}.chat-composer-wrap{border-top:1px solid var(--hairline);background:var(--bg);padding:14px 28px 16px}.chat-composer-inner{max-width:820px;margin:0 auto}.chat-composer{position:relative;background:var(--bg-elevated);border:1px solid var(--hairline);border-radius:14px;box-shadow:0 1px 2px #1e1c140a,0 10px 30px -20px #1e1c144d;padding:6px}.chat-composer-textarea-wrap{position:relative}.chat-paper-highlight-layer{position:absolute;z-index:0;top:0;right:0;bottom:0;left:0;box-sizing:border-box;overflow:hidden;pointer-events:none;color:transparent}.chat-paper-highlight-layer>div{min-height:100%;white-space:pre-wrap;overflow-wrap:break-word;word-break:break-word;color:var(--ink)}.chat-paper-highlight-layer-composer{padding:12px 12px 4px;font-family:var(--serif);font-size:16px;line-height:1.45}.chat-paper-highlight-layer-editor{padding:9px 11px;font-family:var(--serif);font-size:16px;line-height:1.45}.chat-paper-highlight-layer-home{padding:12px 12px 4px;font-family:var(--serif);font-size:17px;line-height:1.45}.chat-paper-picker{position:absolute;z-index:50;left:8px;bottom:calc(100% + 6px);width:min(560px,calc(100vw - 48px));max-height:384px;overflow-y:auto;border:1px solid var(--hairline-strong);border-radius:11px;background:var(--bg-elevated);box-shadow:0 16px 38px -16px #1e1c1473}.chat-slash-command{position:absolute;z-index:50;left:8px;bottom:calc(100% + 6px);display:flex;width:min(560px,calc(100vw - 48px));min-height:52px;align-items:center;gap:10px;padding:9px 12px;border:1px solid var(--hairline-strong);border-radius:11px;color:var(--ink);background:var(--bg-elevated);box-shadow:0 16px 38px -16px #1e1c1473;text-align:left}.chat-slash-command:hover{background:var(--accent-soft)}.chat-slash-command span{color:var(--ink-faint);font-size:12px}.chat-paper-picker-status{padding:10px 12px;color:var(--ink-faint);font-size:12px}.chat-paper-option{display:flex;width:100%;min-height:64px;flex-direction:column;justify-content:center;gap:3px;padding:9px 12px;border:0;border-top:1px solid var(--hairline);color:var(--ink);background:transparent;text-align:left}.chat-paper-option.is-active,.chat-paper-option:hover{background:var(--accent-soft)}.chat-paper-option-title{font-family:var(--serif);font-size:14px;line-height:1.25}.chat-paper-option-meta{color:var(--ink-faint);font-family:var(--mono);font-size:10.5px}.chat-paper-mention-message{padding:3px 12px;color:var(--negative-text);font-size:11.5px}.chat-inline-paper-mention{display:inline}.chat-inline-paper-mention svg{display:inline-block;margin-right:3px;color:var(--accent-text);vertical-align:-.12em}.chat-inline-paper-link{color:var(--accent-text);font-weight:600;text-decoration-line:underline;text-decoration-color:color-mix(in oklch,var(--accent) 40%,transparent);text-decoration-thickness:1px;text-underline-offset:2px}.chat-inline-paper-link:hover{text-decoration-color:var(--accent-text)}.chat-composer textarea{position:relative;z-index:1;width:100%;border:0;outline:0;resize:none;background:transparent;font-family:var(--serif);font-size:16px;line-height:1.45;color:transparent;caret-color:var(--ink);padding:12px 12px 4px}.chat-composer textarea::-moz-placeholder{color:var(--ink-faint)}.chat-composer textarea::placeholder{color:var(--ink-faint)}.chat-composer-row{display:flex;align-items:center;justify-content:space-between;padding:2px 6px 4px}.chat-composer-tools{display:flex;align-items:center;flex-wrap:wrap;gap:12px}.chat-web-search-toggle{display:inline-flex;align-items:center;gap:5px;min-height:30px;padding:4px 9px;border:1px solid var(--hairline);border-radius:8px;background:transparent;color:var(--ink-muted);font:inherit;font-size:12px;cursor:pointer}.chat-web-search-toggle:hover:not(:disabled){border-color:var(--hairline-strong);color:var(--ink)}.chat-web-search-toggle.is-enabled{border-color:var(--accent);background:var(--accent-soft);color:var(--accent-text)}.chat-web-search-toggle:disabled{cursor:default;opacity:.55}.chat-effort-picker{position:relative}.chat-effort-trigger{display:inline-flex;align-items:center;gap:4px;min-height:30px;padding:4px 8px 4px 10px;border:1px solid var(--hairline);border-radius:8px;background:transparent;color:var(--ink-muted);font:inherit;font-size:12px;cursor:pointer}.chat-effort-trigger:hover:not(:disabled){border-color:var(--hairline-strong);color:var(--ink)}.chat-effort-trigger:disabled{cursor:default;opacity:.55}.chat-effort-menu{position:absolute;z-index:40;left:0;bottom:calc(100% + 7px);width:220px;padding:6px;border:1px solid var(--hairline);border-radius:11px;background:var(--bg-elevated);box-shadow:0 14px 36px -14px #1e1c1473}.ask-home .chat-effort-menu{top:calc(100% + 7px);bottom:auto}.chat-effort-menu-label{padding:5px 10px 6px;color:var(--ink-faint);font-size:11px;font-weight:600;letter-spacing:.02em}.chat-effort-option{display:flex;align-items:center;justify-content:space-between;gap:10px;width:100%;padding:9px 10px;border:0;border-radius:7px;background:transparent;color:var(--ink);text-align:left;cursor:pointer}.chat-effort-option:hover,.chat-effort-option.is-selected{background:var(--bg-subtle)}.chat-effort-option-copy{display:flex;flex-direction:column;gap:2px}.chat-effort-option-copy strong{font-size:13px;font-weight:600}.chat-effort-option-copy small{color:var(--ink-faint);font-size:11px}.chat-composer-hint{font-size:11.5px;color:var(--ink-faint)}.chat-composer-foot{display:flex;align-items:center;justify-content:center;gap:6px;text-align:center;font-size:11.5px;color:var(--ink-faint);margin-top:9px}.chat-provider-attribution{white-space:nowrap}.chat-send{display:flex;align-items:center;justify-content:center;width:38px;height:38px;border-radius:10px;background:var(--hairline);color:var(--bg-elevated);cursor:not-allowed;transition:background .15s;flex:none}.chat-send-on{background:var(--ink);cursor:pointer}.chat-send-on:hover{background:color-mix(in oklch,var(--ink) 88%,var(--accent))}@media (max-width: 900px){.chat-composer-wrap{padding:12px 16px 14px}.chat-composer-foot,.chat-composer-hint{display:none}}@media (prefers-reduced-motion: reduce){.chat-paper-option{scroll-behavior:auto}}@media (forced-colors: active){.chat-paper-option.is-active,.chat-inline-paper-link{outline:1px solid CanvasText}.chat-paper-selection,.chat-paper-selection-remove,.chat-paper-selection-toggle{border:1px solid ButtonText}}.chat-paper-selection{margin:6px 6px 0;padding:8px 10px;border:1px solid var(--hairline);border-radius:10px;background:var(--bg-subtle);text-align:left}.chat-paper-selection-header{display:flex;align-items:center;justify-content:space-between;gap:8px}.chat-paper-selection-label{color:var(--ink-soft);font-size:11px;font-weight:600;letter-spacing:.02em;text-transform:uppercase}.chat-paper-selection-actions{display:flex;align-items:center;gap:6px}.chat-paper-selection-toggle,.chat-paper-selection-remove{border:0;padding:2px 6px;background:transparent;color:var(--accent-text);font-size:11.5px}.chat-paper-selection-quote{display:-webkit-box;max-height:4.35em;margin:6px 0 0;overflow:hidden;color:var(--ink);font-family:var(--serif);font-size:13px;line-height:1.45;white-space:pre-wrap;-webkit-box-orient:vertical;-webkit-line-clamp:3}.chat-paper-selection-quote.is-expanded{display:block;max-height:8.5em;overflow:auto;-webkit-line-clamp:unset}.chat-paper-selection-disabled{padding:4px 12px 0;color:var(--negative-text);font-size:11.5px}.chat-paper-link{color:var(--accent-text);border-bottom:1px solid color-mix(in oklch,var(--accent-text) 35%,transparent);white-space:normal}.chat-paper-link:hover{border-bottom-color:var(--accent-text)}.chat-hf-link:after{content:" 🤗";font-size:.85em;white-space:nowrap}.chat-github-link{color:var(--accent-text);border-bottom:1px solid color-mix(in oklch,var(--accent-text) 35%,transparent)}.chat-github-link:hover{border-bottom-color:var(--accent-text)}.chat-github-link svg{display:inline-block;width:1em;height:1em;margin-right:.3em;vertical-align:-.14em}.chat-external-link{color:var(--accent-text);text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:2px}.chat-external-link:hover{text-decoration-thickness:2px}.chat-web-citation{color:var(--accent-text);text-decoration:underline;text-decoration-style:dotted;text-underline-offset:2px}.chat-external-paper-citation{color:var(--chat-link);text-decoration:underline;text-decoration-color:color-mix(in srgb,var(--chat-link) 35%,transparent);text-underline-offset:2px}.external-paper-preview-pop.external-paper-preview-pop{width:min(390px,calc(100vw - 24px));padding:0;overflow:hidden;border-color:var(--chat-border);background:var(--chat-surface);color:var(--chat-text)}.external-paper-preview-card{padding:14px}.external-paper-preview-source{display:flex;gap:6px;margin-bottom:7px;color:var(--chat-muted);font-size:12px}.external-paper-preview-card strong{display:block;color:var(--chat-text);font-size:14px;line-height:1.35}.external-paper-preview-card p{margin:7px 0 0;color:var(--chat-muted);font-size:12px;line-height:1.45;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:4;overflow:hidden}.external-paper-preview-authors{-webkit-line-clamp:2!important}.external-paper-preview-citations{display:block;margin-top:9px;color:var(--chat-muted);font-size:11px}.web-preview-pop.web-preview-pop{width:min(360px,calc(100vw - 24px));padding:0;overflow:hidden;border:1px solid var(--hairline);border-radius:12px;background:var(--bg-elevated);color:var(--ink);box-shadow:0 14px 44px -12px #1e1c1466}.web-preview-card{display:flex;flex-direction:column}.web-preview-image{display:block;width:100%;height:174px;-o-object-fit:cover;object-fit:cover;background:var(--bg-subtle);border-bottom:1px solid var(--hairline)}.web-preview-meta{padding:13px 14px 14px;min-width:0}.web-preview-source{display:flex;align-items:center;gap:5px;margin-bottom:6px;color:var(--ink-faint);font-size:11px}.web-preview-source img{width:14px;height:14px;border-radius:3px}.web-preview-meta strong{display:block;font-family:var(--serif);font-size:15px;font-weight:500;line-height:1.3}.web-preview-meta p{display:-webkit-box;overflow:hidden;margin:7px 0 0;color:var(--ink-soft);font-size:12px;line-height:1.4;-webkit-box-orient:vertical;-webkit-line-clamp:3}.paper-preview-pop.paper-preview-pop{width:min(344px,calc(100vw - 24px));padding:0;border:1px solid var(--hairline);border-radius:12px;background:var(--bg-elevated);color:var(--ink);box-shadow:0 14px 44px -12px #1e1c1466;overflow:hidden}.paper-preview-inner{display:flex;gap:14px;padding:14px}.paper-preview-meta{min-width:0;flex:1}.paper-preview-title{font-family:var(--serif);font-weight:500;font-size:15px;line-height:1.25;margin-bottom:5px}.paper-preview-auth{font-size:12px;color:var(--ink-soft);line-height:1.35}.paper-preview-venue{font-size:11.5px;color:var(--ink-faint);margin-top:3px;font-variant-numeric:tabular-nums}.paper-preview-tags{display:flex;flex-wrap:wrap;gap:5px;margin:9px 0}.paper-preview-tag{font-size:10.5px;font-family:var(--mono);background:var(--positive-bg);color:var(--positive-text);border-radius:5px;padding:2px 7px}.paper-preview-status{min-height:48px;padding:14px;display:flex;align-items:center;color:var(--ink-soft);font-size:12px}.paper-preview-index-request{flex-wrap:wrap;gap:6px 12px}.paper-preview-index-request a,.paper-preview-index-request button{color:var(--accent);font:inherit;border:0;background:transparent;padding:0;cursor:pointer}.paper-preview-index-request button:disabled{color:var(--ink-soft);cursor:default}.paper-preview-index-request a:focus-visible,.paper-preview-index-request button:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.paper-preview-index-request [role=alert]{flex-basis:100%;color:var(--negative-text, var(--ink-soft))}.paper-preview-thumb{position:relative;width:96px;height:124px;flex:none;background:var(--bg-elevated);border:1px solid var(--hairline);border-radius:3px;box-shadow:0 1px 3px #1e1c1414;overflow:hidden;padding:11px 10px}.paper-preview-thumb-real{padding:0}.paper-preview-thumb-real img{display:block;width:100%;height:100%;-o-object-fit:contain;object-fit:contain}.paper-preview-thumb-title{display:flex;flex-direction:column;align-items:center;gap:3px;margin-bottom:8px}.paper-preview-thumb-title span{height:3px;background:var(--ink);border-radius:2px}.paper-preview-thumb-title span:first-child{width:70%}.paper-preview-thumb-title span:last-child{width:52%}.paper-preview-thumb-auth{height:2px;width:40%;margin:0 auto 9px;background:var(--ink-faint);border-radius:2px}.paper-preview-thumb-cols{display:flex;gap:7px}.paper-preview-thumb-col{flex:1;height:74px;background:repeating-linear-gradient(var(--hairline-strong) 0 2px,transparent 2px 5px);opacity:.7}.paper-preview-thumb-fig{position:absolute;left:14px;right:14px;height:22px;background:var(--bg-subtle);border:1px solid var(--hairline);border-radius:2px}.hf-preview-pop.hf-preview-pop{width:min(172px,calc(100vw - 24px));padding:0;border:1px solid var(--hairline);border-radius:12px;background:var(--bg-elevated);color:var(--ink);box-shadow:0 14px 44px -12px #1e1c1466;overflow:hidden}.hf-preview-card{display:grid}.hf-preview-image,.hf-preview-fallback{display:block;width:100%;aspect-ratio:2 / 1;-o-object-fit:cover;object-fit:cover;background:var(--bg-subtle)}.hf-preview-fallback{display:grid;place-items:center;font-size:48px;background:radial-gradient(circle at 70% 35%,rgba(84,104,255,.4),transparent 45%),linear-gradient(135deg,#0f6d79,#d18a48)}.hf-preview-meta{display:grid;gap:3px;padding:12px 14px 14px}.hf-preview-meta strong{overflow-wrap:anywhere;font-size:14px}.hf-preview-kind,.hf-preview-meta>span:last-child{color:var(--ink-faint);font-size:11.5px}.github-preview-pop.github-preview-pop{width:min(344px,calc(100vw - 24px));padding:0;border:1px solid var(--hairline);border-radius:12px;background:var(--bg-elevated);color:var(--ink);box-shadow:0 14px 44px -12px #1e1c1466;overflow:hidden}.github-preview-card{display:flex;gap:14px;padding:14px}.github-preview-image,.github-preview-fallback{display:block;width:72px;height:72px;flex:none;-o-object-fit:cover;object-fit:cover;border-radius:12px;background:var(--bg-subtle)}.github-preview-fallback{display:grid;place-items:center;color:#fff;background:linear-gradient(135deg,#24292f,#57606a)}.github-preview-fallback svg{width:36px;height:36px}.github-preview-meta{display:grid;gap:3px;min-width:0}.github-preview-meta strong{overflow-wrap:anywhere;font-size:14px}.github-preview-kind,.github-preview-meta>span:last-child{color:var(--ink-faint);font-size:11.5px}.github-preview-description{display:-webkit-box;overflow:hidden;color:var(--ink-soft);font-size:12px;line-height:1.35;-webkit-box-orient:vertical;-webkit-line-clamp:2}.github-preview-stats{font-variant-numeric:tabular-nums}.catalog-preview-pop.catalog-preview-pop{width:min(320px,calc(100vw - 24px));padding:0;border:1px solid var(--hairline);border-radius:12px;background:var(--bg-elevated);color:var(--ink);box-shadow:0 14px 44px -12px #1e1c1466;overflow:hidden}.catalog-preview-card{display:grid}.catalog-preview-image{display:block;width:100%;aspect-ratio:2 / 1;-o-object-fit:cover;object-fit:cover;background:var(--bg-subtle);border-bottom:1px solid var(--hairline)}.catalog-preview-meta{display:grid;gap:3px;padding:12px 14px 14px}.catalog-preview-meta strong{font-family:var(--serif);font-weight:500;font-size:15px;line-height:1.25}.catalog-preview-meta p{display:-webkit-box;overflow:hidden;margin:3px 0 0;color:var(--ink-soft);font-size:12px;line-height:1.4;-webkit-box-orient:vertical;-webkit-line-clamp:3}.catalog-preview-kind,.catalog-preview-stats{color:var(--ink-faint);font-size:11.5px;font-variant-numeric:tabular-nums}.catalog-preview-stats{margin-top:4px}.chat-artifact-card{width:min(100%,620px);display:flex;gap:14px;align-items:stretch;padding:0;overflow:hidden;text-align:left;color:var(--chat-text, #182230);background:#fff;border:1px solid #d8dee8;border-radius:14px;box-shadow:0 5px 18px #0f172a12}button.chat-artifact-card{cursor:pointer}.chat-artifact-card.is-selected{border-color:var(--accent);box-shadow:0 0 0 2px color-mix(in oklch,var(--accent) 22%,transparent)}.chat-artifact-card>img{width:190px;aspect-ratio:5 / 3;-o-object-fit:cover;object-fit:cover;background:#eef1f5}.chat-artifact-card-copy{display:flex;min-width:0;flex:1;flex-direction:column;justify-content:center;gap:7px;padding:14px 14px 14px 0}.chat-artifact-card-copy strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.chat-artifact-kicker{display:flex;align-items:center;gap:6px;color:#637083;font-size:12px}.chat-artifact-kicker svg{width:14px;height:14px}.chat-artifact-gate{width:-moz-fit-content;width:fit-content;padding:3px 8px;border-radius:999px;color:#11643b;background:#e7f7ee;font-size:11px;font-weight:650}.chat-artifact-gate-warnings{color:#7a4a00;background:#fff3d6}.chat-artifact-gate-failed{color:#9b2c2c;background:#fee9e7}.chat-artifact-generating,.chat-artifact-error{align-items:center;padding:16px}.chat-artifact-generating span:not(.chat-artifact-pulse),.chat-artifact-error span{display:flex;flex-direction:column;gap:3px}.chat-artifact-generating small,.chat-artifact-error small{color:#687386}.chat-artifact-error{border-color:#efb7b1}.chat-artifact-error>svg{width:24px;color:#b3372d}.chat-artifact-pulse{width:22px;height:22px;border:3px solid #d7dde8;border-top-color:#5367d9;border-radius:50%;animation:chat-artifact-spin .8s linear infinite}@keyframes chat-artifact-spin{to{transform:rotate(360deg)}}.chat-artifact-workspace{position:relative;min-width:0;min-height:0;flex:1;display:flex;overflow:hidden}.chat-artifact-workspace-content{min-width:0;min-height:0;flex:1;display:flex;overflow:hidden}.chat-artifact-workspace-chat>.chat-artifact-workspace-content>.chat-main{width:100%}.chat-artifact-workspace-shared{min-height:0}.chat-artifact-workspace-shared>.chat-artifact-workspace-content{overflow:auto}.chat-artifact-workspace-reader{height:100%}.chat-artifact-workspace-reader>.chat-artifact-workspace-content>.reader-workspace{width:100%}.chat-artifact-workspace-pane{min-width:0;min-height:0;flex:none;display:flex;overflow:hidden}.chat-artifact-resize-handle{position:relative;z-index:7;width:1px;flex:0 0 1px;cursor:col-resize;background:var(--hairline-strong);touch-action:none;outline:none}.chat-artifact-resize-handle:before{content:"";position:absolute;top:0;right:-8px;bottom:0;left:-8px}.chat-artifact-resize-handle:focus-visible{box-shadow:0 0 0 2px var(--accent)}.chat-artifact-panel{width:100%;height:100%;min-width:0;min-height:0;display:grid;grid-template-rows:auto auto minmax(0,1fr) auto;overflow:hidden;color:var(--ink);background:#f6f7f9;border-left:1px solid var(--hairline)}.chat-artifact-panel.is-dialog{position:fixed;z-index:1200;top:0;right:0;bottom:0;left:0;border:0}.chat-artifact-panel.is-reader-fallback{position:absolute}.chat-artifact-panel header{display:flex;align-items:center;justify-content:space-between;padding:16px 20px;background:#fff;border-bottom:1px solid #dce1e8}.chat-artifact-panel header span{color:#6d7788;font-size:12px;text-transform:uppercase;letter-spacing:.06em}.chat-artifact-panel h2{margin:2px 0 0;font-size:18px}.chat-artifact-panel header button{display:grid;place-items:center;width:36px;height:36px;border:0;border-radius:8px;background:transparent;cursor:pointer}.chat-paper-status{margin:4px 0 0;color:#687386;font-size:12px}.chat-artifact-header-actions{display:flex;align-items:center;gap:6px}.chat-artifact-header-actions>button:first-child{width:auto;min-height:36px;padding:7px 10px;border:1px solid #cfd6e4;color:#253143;background:#fff;font-size:12px}.chat-artifact-version{display:flex;align-items:center;gap:7px;margin-left:auto;margin-right:8px;color:#687386;font-size:12px}.chat-artifact-version select{padding:6px 8px;border:1px solid #cfd6e4;border-radius:7px;background:#fff}.chat-artifact-panel>nav{position:sticky;z-index:1;top:0;display:flex;gap:4px;padding:8px 18px 0;background:#fff}.chat-artifact-panel nav button{padding:9px 14px;border:0;border-bottom:2px solid transparent;color:#667085;background:transparent;cursor:pointer}.chat-artifact-panel nav button.active{color:#273a91;border-bottom-color:#5367d9;font-weight:650}.chat-artifact-panel button:focus-visible,.chat-artifact-panel a:focus-visible,.chat-artifact-panel input:focus-visible,.latex-source-editor .cm-content:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.chat-artifact-panel-body{min-height:0;display:grid;place-items:center;overflow:auto;padding:20px}.chat-artifact-panel-body>.pdf-viewer{align-self:stretch;justify-self:stretch;width:100%;height:100%}.chat-artifact-panel-body>img{max-width:100%;max-height:100%;-o-object-fit:contain;object-fit:contain;background:#fff;box-shadow:0 4px 22px #0f172a1f}.chat-artifact-panel-body>pre{align-self:stretch;justify-self:stretch;overflow:auto;margin:0;padding:18px;color:#d8dee9;background:#18202c;border-radius:10px;font-size:12px;white-space:pre-wrap}.chat-artifact-source-workspace{width:100%;height:100%;min-height:0;display:flex;overflow:hidden;border-radius:10px;background:#18202c}.chat-artifact-source-workspace>nav{width:min(180px,28%);flex:none;display:flex;flex-direction:column;overflow:auto;padding:10px;border-right:1px solid #ffffff24}.chat-artifact-source-workspace>nav button{overflow:hidden;border:0;padding:7px 8px;color:#aeb8c8;background:transparent;text-align:left;text-overflow:ellipsis;white-space:nowrap}.chat-artifact-source-workspace>nav button[aria-pressed=true]{color:#fff;background:#ffffff14}.chat-artifact-source-workspace>pre{min-width:0;flex:1;overflow:auto;margin:0;padding:18px;color:#d8dee9;font-size:12px;white-space:pre-wrap}.latex-editor-column{min-width:0;flex:1;display:flex;flex-direction:column;color:#d8dee9}.latex-source-editor{min-width:0;min-height:0;flex:1;overflow:auto}.latex-source-editor .cm-editor{height:100%;min-height:320px;font-size:13px}.latex-source-editor .cm-scroller{overflow:auto;font-family:ui-monospace,SFMono-Regular,Menlo,monospace}.latex-file-action{display:flex;align-items:center;gap:6px;margin-top:8px}.latex-file-action svg,.latex-file-buttons svg{width:14px;height:14px}.latex-file-buttons{display:flex;gap:8px;padding:8px;border-top:1px solid #ffffff24}.latex-file-buttons button,.chat-artifact-actions button{display:inline-flex;align-items:center;gap:7px;border:0;border-radius:7px;padding:8px 10px;cursor:pointer}.chat-artifact-actions button:disabled{cursor:not-allowed;opacity:.55}.chat-artifact-panel footer{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;padding:14px 20px;background:#fff;border-top:1px solid #dce1e8}.chat-artifact-metadata{display:flex;min-width:0;flex-direction:column;gap:3px;color:#687386;font-size:12px}.chat-artifact-metadata strong{color:#253143}.chat-artifact-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:8px}.chat-artifact-actions a{display:inline-flex;align-items:center;gap:5px;padding:8px 10px;color:#263b94;border:1px solid #cfd6e4;border-radius:8px;text-decoration:none;font-size:12px;font-weight:600}.chat-artifact-actions svg{width:14px;height:14px}.paper-pdf-toolbar{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px;width:100%;padding:8px;border-bottom:1px solid #dce1e8;background:#fff}.paper-pdf-toolbar-group{display:flex;align-items:center;gap:6px}.paper-pdf-toolbar button,.paper-pdf-toolbar input,.paper-pdf-toolbar a{min-height:32px;border:1px solid #cfd6e4;border-radius:7px;padding:5px 8px;color:#253143;background:#fff;font-size:12px;text-decoration:none}.paper-pdf-toolbar input{width:56px}.paper-pdf-toolbar button:disabled{cursor:not-allowed;opacity:.55}@media (max-width: 700px){.chat-artifact-card>img{width:120px}.chat-artifact-panel{width:100vw;height:100dvh}.chat-artifact-panel footer{align-items:stretch;flex-direction:column}.chat-artifact-actions{justify-content:flex-start}.chat-artifact-panel header{padding:12px 14px}.chat-artifact-header-actions>button:first-child{padding-inline:8px}.paper-pdf-toolbar{align-items:flex-start;flex-direction:column}}@media (forced-colors: active){.chat-artifact-resize-handle,.chat-artifact-card.is-selected{border:1px solid ButtonText}}@media (prefers-reduced-motion: reduce){.chat-artifact-pulse{animation-duration:.01ms}}.chat-ghost-link{color:var(--ink-soft);font-size:13px;padding:6px 10px;border-radius:6px}.chat-ghost-link:hover{color:var(--ink);background:var(--bg-subtle)}.chat-conversation-viewport{position:relative;display:flex;flex-direction:column;flex:1;min-height:0}.chat-conversation{flex:1;min-height:0;overflow-y:auto}.chat-jump-latest{position:absolute;bottom:12px;left:50%;transform:translate(-50%);border:1px solid var(--border);border-radius:20px;padding:8px 14px;background:var(--bg);color:var(--ink);box-shadow:0 2px 8px #0000001f;white-space:nowrap;cursor:pointer}.chat-conversation-inner{max-width:820px;margin:0 auto;padding:30px 28px 40px}.chat-msg{margin-bottom:26px}.chat-msg-user{display:flex;justify-content:flex-end}.chat-user-message-wrap{display:flex;flex-direction:column;align-items:flex-end;max-width:74%}.chat-bubble{background:var(--accent-soft);color:var(--ink);border:1px solid color-mix(in oklch,var(--accent-soft) 70%,var(--hairline));border-radius:16px 16px 4px;padding:12px 18px;font-family:var(--serif);font-size:16px;line-height:1.45;max-width:100%;white-space:pre-wrap;overflow-wrap:anywhere;-webkit-user-select:text;-moz-user-select:text;user-select:text;cursor:text}.chat-bubble::-moz-selection,.chat-bubble *::-moz-selection{background:var(--accent);color:var(--bg)}.chat-bubble::selection,.chat-bubble *::selection{background:var(--accent);color:var(--bg)}.chat-user-actions{display:flex;justify-content:flex-end;gap:2px;min-height:30px;padding:4px 2px 0;opacity:0;transform:translateY(-2px);transition:opacity .14s ease,transform .14s ease;-webkit-user-select:none;-moz-user-select:none;user-select:none}.chat-msg-user:hover .chat-user-actions,.chat-msg-user:focus-within .chat-user-actions{opacity:1;transform:translateY(0)}.chat-user-action{width:28px;height:28px;display:inline-flex;align-items:center;justify-content:center;border:1px solid transparent;border-radius:999px;color:var(--ink-soft);background:transparent}.chat-user-action:hover{color:var(--ink);background:var(--bg-elevated);border-color:var(--hairline)}.chat-user-action:focus-visible{outline:2px solid var(--accent);outline-offset:2px;opacity:1}.chat-user-action svg{width:14px;height:14px}.chat-inline-editor{width:min(620px,74%);min-width:min(360px,100%);padding:12px;border:1px solid color-mix(in oklch,var(--accent) 45%,var(--hairline));border-radius:16px 16px 4px;background:var(--accent-soft);box-shadow:0 8px 28px #00000014}.chat-inline-editor-textarea{position:relative;z-index:1;display:block;width:100%;min-height:72px;padding:8px 10px;resize:none;border:1px solid var(--hairline-strong);border-radius:10px;color:var(--ink);background:transparent;font-family:var(--serif);font-size:16px;line-height:1.45;white-space:pre-wrap}.chat-inline-editor-textarea-wrap{position:relative;background:var(--bg-elevated);border-radius:10px}.chat-inline-editor-textarea-wrap .chat-inline-editor-textarea{color:transparent;caret-color:var(--ink)}.chat-inline-editor-textarea:focus{outline:2px solid var(--accent);outline-offset:1px}.chat-inline-editor-notice{margin:8px 2px 0;color:var(--ink-soft);font-size:12.5px;line-height:1.4}.chat-inline-editor-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:10px}.chat-inline-editor-actions button{min-height:34px;padding:6px 14px;border:1px solid var(--hairline-strong);border-radius:999px;color:var(--ink);background:var(--bg-elevated);font-size:13px;font-weight:600}.chat-inline-editor-actions button:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.chat-inline-editor-actions .chat-inline-editor-send{color:#fff;border-color:var(--accent);background:var(--accent)}.chat-inline-editor-actions button:disabled{cursor:not-allowed;opacity:.5}.chat-msg-blocks{display:flex;flex-direction:column;gap:14px}.chat-waiting{min-height:20px;display:flex;align-items:center;font-size:13px;font-weight:600}.chat-thinking{color:transparent;background:linear-gradient(100deg,var(--ink-faint) 30%,var(--accent-text) 50%,var(--ink-faint) 70%);background-size:220% 100%;background-clip:text;-webkit-background-clip:text;animation:chat-thinking-glow 1.8s ease-in-out infinite}@keyframes chat-thinking-glow{0%{background-position:100% 0}to{background-position:-100% 0}}@media (prefers-reduced-motion: reduce){.chat-thinking{color:var(--accent-text);background:none;animation:none}}.chat-reason-live{border:1px solid var(--hairline);border-left:2px solid var(--accent);background:var(--bg-elevated);border-radius:10px;padding:14px 16px}.chat-reason-live-head{display:flex;align-items:center;gap:9px;font-size:12.5px;font-weight:600;color:var(--accent-text)}.chat-reason-live-body{margin-top:9px;font-family:var(--serif);font-size:14.5px;line-height:1.6;color:var(--ink-soft)}.chat-reason-done{border:1px solid var(--hairline);border-radius:10px;background:var(--bg-elevated);overflow:hidden}.chat-reason-done-head{display:flex;align-items:center;gap:9px;width:100%;padding:11px 15px;font-size:13px;color:var(--ink-soft);font-weight:500;text-align:left}.chat-reason-done-head svg:first-child{color:var(--positive-text);flex:none}.chat-reason-done-head .chat-chev{margin-left:auto}.chat-reason-done-head:hover{color:var(--ink)}.chat-reason-done-body{padding:2px 16px 16px 39px;font-family:var(--serif);font-size:14px;line-height:1.65;color:var(--ink-soft)}.chat-answer.chat-reason-markdown{padding-top:0;padding-right:0;padding-bottom:0;font-size:inherit;line-height:inherit;color:inherit;white-space:normal}.chat-answer.chat-reason-live-body{padding-left:23px}.chat-answer.chat-reason-done-body{padding:2px 16px 16px 39px}.chat-tool{border:1px solid var(--hairline);border-radius:10px;background:var(--bg-elevated);overflow:hidden}.chat-tool-running{border-color:color-mix(in oklch,var(--accent) 35%,var(--hairline))}.chat-tool-failed{border-color:color-mix(in oklch,#b42318 55%,var(--hairline))}.chat-tool-failed .chat-tool-status{color:#b42318;font-weight:600}.chat-tool-head{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;padding:11px 15px;text-align:left}.chat-tool-head:disabled{cursor:default}.chat-tool-head-left{display:flex;align-items:center;gap:9px;min-width:0}.chat-tool-head-left>svg{color:var(--accent-text);flex:none}.chat-tool-name{font-family:var(--mono);font-size:12px;font-weight:600;color:var(--ink);background:var(--bg-subtle);border:1px solid var(--hairline);border-radius:5px;padding:2px 7px;flex:none}.chat-tool-query{font-family:var(--serif);font-style:italic;font-size:13.5px;color:var(--ink-soft);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.chat-tool-head-right{display:flex;align-items:center;gap:10px;flex:none}.chat-tool-status{font-size:11.5px;color:var(--ink-soft);font-variant-numeric:tabular-nums}.chat-tool-body{padding:4px 16px 16px;border-top:1px solid var(--hairline)}.chat-tool-args{margin:12px 0 4px}.chat-tool-label{display:block;font-family:var(--mono);font-size:10px;letter-spacing:.1em;text-transform:uppercase;color:var(--ink-faint);margin-bottom:6px}.chat-tool-args pre{margin:0;background:var(--bg-subtle);border:1px solid var(--hairline);border-radius:8px;padding:10px 12px;font-family:var(--mono);font-size:11.5px;line-height:1.5;color:var(--ink-soft);overflow-x:auto}.chat-tool-results-label{margin-top:16px}.chat-tool-output-head{display:flex;align-items:center;justify-content:space-between;margin-top:14px}.chat-tool-output-head .chat-tool-label{margin-bottom:0}.chat-tool-copy{color:var(--accent-text);font-family:var(--mono);font-size:11px}.chat-tool-output{max-height:320px;margin:7px 0 0;overflow:auto;white-space:pre;-moz-tab-size:4;-o-tab-size:4;tab-size:4;border:1px solid var(--hairline);border-radius:8px;background:var(--bg-subtle);padding:11px 12px;color:var(--ink);font-family:var(--mono);font-size:11.5px;line-height:1.5}.chat-tool-truncated{margin-top:7px;color:var(--ink-faint);font-size:11px}.chat-mcp-app{border:1px solid var(--chat-border, #d8d8de);border-radius:12px;overflow:hidden;background:var(--chat-surface, #fff)}.chat-mcp-app>header{display:flex;justify-content:flex-end;padding:8px 10px 0}.chat-mcp-app button{border:0;border-radius:6px;background:#eef1f5;padding:5px 8px;cursor:pointer}.chat-mcp-app iframe{display:block;width:100%;border:0;background:#fff;aspect-ratio:4 / 3}.chat-mcp-loading,.chat-mcp-error{min-height:180px;aspect-ratio:4 / 3;display:grid;place-items:center;padding:18px;color:#52606d;text-align:center}.chat-mcp-error{gap:12px}.chat-mcp-app-fullscreen{position:fixed;top:16px;right:16px;bottom:16px;left:16px;z-index:1000}.chat-mcp-app-fullscreen iframe{height:calc(100vh - 72px)!important;aspect-ratio:auto}.chat-tool-results{list-style:none;margin:0;padding:0}.chat-hit{padding:11px 0;border-top:1px solid var(--hairline)}.chat-hit:first-child{border-top:0}.chat-hit-top{display:flex;align-items:baseline;gap:12px}.chat-hit-title{font-family:var(--serif);font-size:14.5px;font-weight:600;color:var(--accent-text);flex:1;line-height:1.3}.chat-hit-title:hover{text-decoration:underline}.chat-hit-meta{font-size:12px;color:var(--ink-faint);margin-top:2px}.chat-hit-truncated{color:var(--ink-faint);font-style:italic}.chat-hit-snippet{font-family:var(--serif);font-size:13.5px;line-height:1.5;color:var(--ink-soft);margin-top:5px;text-wrap:pretty}.chat-answer{font-family:var(--serif);font-size:16.5px;line-height:1.65;color:var(--ink);text-wrap:pretty;padding:2px}.chat-answer>:first-child{margin-top:0}.chat-answer>:last-child{margin-bottom:0}.chat-answer p{margin:0 0 .9em}.chat-answer h1,.chat-answer h2,.chat-answer h3,.chat-answer h4{font-family:var(--sans);font-weight:600;line-height:1.3;margin:1.35em 0 .5em}.chat-answer h1{font-size:1.45em}.chat-answer h2{font-size:1.25em}.chat-answer h3{font-size:1.08em}.chat-answer h4{font-size:1em}.chat-answer ul,.chat-answer ol{margin:0 0 .9em;padding-left:1.5em}.chat-answer ul{list-style-type:disc}.chat-answer ol{list-style-type:decimal}.chat-answer ul ul{list-style-type:circle}.chat-answer ul ul ul{list-style-type:square}.chat-answer li{margin:.2em 0}.chat-answer li>p{margin:0}.chat-answer blockquote{margin:0 0 .9em;padding-left:1em;border-left:3px solid var(--hairline-strong);color:var(--ink-soft)}.chat-answer code{font-family:var(--mono);font-size:.84em;background:var(--bg-subtle);border:1px solid var(--hairline);border-radius:4px;padding:.1em .3em}.chat-answer pre{margin:0 0 1em;padding:12px 14px;overflow-x:auto;background:var(--bg-subtle);border:1px solid var(--hairline);border-radius:8px;line-height:1.5}.chat-answer pre code{background:none;border:0;padding:0}.chat-answer table{display:block;width:-moz-max-content;width:max-content;max-width:100%;overflow-x:auto;border-collapse:collapse;margin:0 0 1em;font-family:var(--sans);font-size:.88em}.chat-answer th,.chat-answer td{border:1px solid var(--hairline);padding:6px 10px;text-align:left}.chat-answer th{background:var(--bg-subtle);font-weight:600}.chat-answer hr{border:0;border-top:1px solid var(--hairline);margin:1.25em 0}.chat-answer input[type=checkbox]{margin-right:.4em}.chat-answer strong{font-weight:600}.chat-error{display:flex;flex-wrap:wrap;align-items:flex-start;justify-content:space-between;gap:12px;border:1px solid var(--negative-border);background:var(--negative-bg);color:var(--negative-text);border-radius:10px;padding:12px 16px;font-size:13.5px;overflow-wrap:anywhere}.chat-error>span:first-child{flex:1 1 280px;min-width:0}.chat-finish-note{font-family:var(--serif);font-style:italic;font-size:13px;color:var(--ink-faint)}.chat-feedback{display:flex;align-items:center;gap:4px;min-height:30px;margin-top:8px;color:var(--ink-faint);font-size:12px}.chat-feedback-label{margin-right:2px}.chat-feedback-action{width:28px;height:28px;display:inline-flex;align-items:center;justify-content:center;border:1px solid transparent;border-radius:999px;color:var(--ink-soft);background:transparent}.chat-feedback-action:hover:not(:disabled),.chat-feedback-action-selected{color:var(--accent-text);background:var(--accent-soft);border-color:color-mix(in oklch,var(--accent) 35%,var(--hairline))}.chat-feedback-action:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.chat-feedback-action:disabled{cursor:wait}.chat-feedback-action svg{width:14px;height:14px}.chat-feedback-error{color:var(--negative-text);margin-left:4px}.chat-feedback-panel{width:min(460px,100%);margin-top:8px;padding:16px;border:1px solid var(--hairline);border-radius:12px;background:var(--bg-elevated);box-shadow:0 10px 30px #0000001a}.chat-feedback-panel-title{color:var(--ink);font-size:15px;font-weight:600}.chat-feedback-panel-label{display:block;margin-top:4px;color:var(--ink-soft);font-size:13px}.chat-feedback-comment{display:block;width:100%;min-height:92px;margin-top:12px;padding:10px 12px;resize:vertical;border:1px solid var(--hairline-strong);border-radius:8px;color:var(--ink);background:var(--bg);font:14px/1.45 var(--sans)}.chat-feedback-comment:focus{border-color:var(--accent);outline:2px solid color-mix(in oklch,var(--accent) 25%,transparent);outline-offset:1px}.chat-feedback-panel-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:12px}.chat-feedback-panel-actions button{min-width:72px;padding:8px 14px;border-radius:8px;font:600 13px var(--sans)}.chat-feedback-skip{border:1px solid transparent;color:var(--ink-soft);background:transparent}.chat-feedback-submit{border:1px solid var(--ink);color:var(--bg);background:var(--ink)}.chat-feedback-panel-actions button:disabled{cursor:wait;opacity:.65}.chat-error a,.chat-error button{flex:none;max-width:100%;color:var(--accent-text);font-weight:600;text-decoration:none}.chat-error button{border:0;padding:0;background:transparent;cursor:pointer;font:inherit;text-align:left;white-space:normal}.chat-error button:disabled{cursor:wait;opacity:.65}.chat-error-actions{display:flex;flex:0 1 auto;min-width:0;max-width:100%;flex-wrap:wrap;justify-content:flex-start;gap:8px 16px}.chat-error a:hover,.chat-error button:hover:not(:disabled){text-decoration:underline}@media (max-width: 900px){.chat-user-message-wrap{max-width:90%}.chat-inline-editor{width:90%;min-width:0}.chat-conversation-inner{padding:22px 16px 32px}}@media (max-width: 560px){.shared-chat-content .chat-user-message-wrap{max-width:88%}}@media (hover: none),(pointer: coarse){.chat-user-actions{opacity:1;transform:none}}.chat-compaction-status{flex-direction:column;align-items:flex-start}.chat-compaction-explanation{margin-top:4px;color:var(--ink-faint);font-weight:400}.chat-caret{display:inline-block;width:7px;height:1.05em;background:var(--accent);margin-left:1px;vertical-align:text-bottom;animation:chat-blink 1s steps(1) infinite}@keyframes chat-blink{50%{opacity:0}}.chat-chev{transition:transform .18s;color:var(--ink-faint)}.chat-chev-open{transform:rotate(180deg)}.chat-spinner{width:14px;height:14px;border:2px solid color-mix(in oklch,var(--accent) 25%,transparent);border-top-color:var(--accent);border-radius:50%;display:inline-block;animation:chat-spin .7s linear infinite;flex:none}.chat-spinner-light{border-color:#fff6;border-top-color:#fff}@keyframes chat-spin{to{transform:rotate(360deg)}}.shared-chat-page{min-height:0;display:flex;flex-direction:column;overflow:hidden;background:var(--bg)}.shared-chat-heading{flex:none;border-bottom:1px solid var(--hairline);display:flex;align-items:center;gap:10px}.shared-chat-heading h1{max-width:calc(50vw + 640px);margin:0 auto;padding:13px 32px;color:var(--ink);font-family:var(--serif);font-size:20px;font-weight:600;line-height:1.1}.shared-chat-content{width:min(876px,100%);margin:0 auto;padding:34px 28px 64px}.shared-chat-transcript{padding:0 0 26px}.shared-chat-attribution{display:flex;flex-wrap:wrap;justify-content:center;gap:5px 12px;color:var(--ink-faint);font-size:12px;line-height:1.5}.shared-chat-attribution a{color:inherit;font-weight:600;text-decoration:none}.shared-chat-attribution a:hover{color:var(--accent-text);text-decoration:underline}.shared-chat-fresh{margin-top:26px;padding-top:28px;border-top:1px solid var(--hairline)}.shared-chat-fresh h2{margin:0 0 6px;font-family:var(--serif);font-size:21px;font-weight:600}.shared-chat-fresh>p{margin:0 0 16px;color:var(--ink-soft);font-family:var(--serif)}.shared-chat-access-note{margin:-6px 0 16px;padding:10px 12px;border:1px solid color-mix(in oklch,var(--accent) 24%,var(--hairline));border-radius:9px;color:var(--ink-soft);background:color-mix(in oklch,var(--accent) 5%,var(--bg-elevated));font-size:13px;line-height:1.45}.shared-chat-access-note a{color:var(--accent-text);font-weight:600}.shared-chat-state{min-height:55vh;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;padding:48px 24px;text-align:center;color:var(--ink-soft)}.shared-chat-state h1{margin:0;color:var(--ink);font-family:var(--serif);font-size:27px}.shared-chat-state p{margin:0}.shared-chat-state button{margin-top:8px;padding:7px 13px;border:1px solid var(--hairline-strong);border-radius:7px;background:var(--bg-elevated);color:var(--ink)}@media (max-width: 900px){.shared-chat-heading h1{padding-inline:16px}}@media (max-width: 640px){.shared-chat-heading h1{padding-inline:14px}}@media (max-width: 560px){.shared-chat-content{padding:26px 16px 48px}} diff --git a/assets/index-B1_S53Hb.js b/assets/index-tHVWANW1.js similarity index 99% rename from assets/index-B1_S53Hb.js rename to assets/index-tHVWANW1.js index 5ca79c378aa7c381908be9f9ebafc0efbd86c9e0..6d90502dccc0d55858122a48b5ec177f0405b2d4 100644 --- a/assets/index-B1_S53Hb.js +++ b/assets/index-tHVWANW1.js @@ -1,4 +1,4 @@ -import{at as We,Z as Ot,j as Ze}from"./index-CkeK0cDg.js";function hu(){}function mu(e){const n=[],t=String(e||"");let r=t.indexOf(","),i=0,l=!1;for(;!l;){r===-1&&(r=t.length,l=!0);const o=t.slice(i,r).trim();(o||!l)&&n.push(o),i=r+1,r=t.indexOf(",",i)}return n}function Ir(e,n){const t={};return(e[e.length-1]===""?[...e,""]:e).join((t.padRight?" ":"")+","+(t.padLeft===!1?"":" ")).trim()}const Tr=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Ar=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Pr={};function Vn(e,n){return(Pr.jsx?Ar:Tr).test(e)}const zr=/[ \t\n\f\r]/g;function Lr(e){return typeof e=="object"?e.type==="text"?qn(e.value):!1:qn(e)}function qn(e){return e.replace(zr,"")===""}class Me{constructor(n,t,r){this.normal=t,this.property=n,r&&(this.space=r)}}Me.prototype.normal={};Me.prototype.property={};Me.prototype.space=void 0;function _t(e,n){const t={},r={};for(const i of e)Object.assign(t,i.property),Object.assign(r,i.normal);return new Me(t,r,n)}function fn(e){return e.toLowerCase()}class J{constructor(n,t){this.attribute=t,this.property=n}}J.prototype.attribute="";J.prototype.booleanish=!1;J.prototype.boolean=!1;J.prototype.commaOrSpaceSeparated=!1;J.prototype.commaSeparated=!1;J.prototype.defined=!1;J.prototype.mustUseProperty=!1;J.prototype.number=!1;J.prototype.overloadedBoolean=!1;J.prototype.property="";J.prototype.spaceSeparated=!1;J.prototype.space=void 0;let vr=0;const z=be(),$=be(),hn=be(),k=be(),R=be(),Ie=be(),ee=be();function be(){return 2**++vr}const mn=Object.freeze(Object.defineProperty({__proto__:null,boolean:z,booleanish:$,commaOrSpaceSeparated:ee,commaSeparated:Ie,number:k,overloadedBoolean:hn,spaceSeparated:R},Symbol.toStringTag,{value:"Module"})),en=Object.keys(mn);class En extends J{constructor(n,t,r,i){let l=-1;if(super(n,t),$n(this,"space",i),typeof r=="number")for(;++l4&&t.slice(0,4)==="data"&&Fr.test(n)){if(n.charAt(4)==="-"){const l=n.slice(5).replace(Wn,Br);r="data"+l.charAt(0).toUpperCase()+l.slice(1)}else{const l=n.slice(4);if(!Wn.test(l)){let o=l.replace(Nr,Mr);o.charAt(0)!=="-"&&(o="-"+o),n="data"+o}}i=En}return new i(r,n)}function Mr(e){return"-"+e.toLowerCase()}function Br(e){return e.charAt(1).toUpperCase()}const jr=_t([Nt,Dr,Mt,Bt,jt],"html"),Cn=_t([Nt,Or,Mt,Bt,jt],"svg");function du(e){const n=String(e||"").trim();return n?n.split(/[ \t\n\r\f]+/g):[]}function Hr(e){return e.join(" ").trim()}var In={},Yn=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,Ur=/\n/g,Vr=/^\s*/,qr=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,$r=/^:\s*/,Wr=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,Yr=/^[;\s]*/,Xr=/^\s+|\s+$/g,Qr=` +import{at as We,Z as Ot,j as Ze}from"./index-B7UoLEbn.js";function hu(){}function mu(e){const n=[],t=String(e||"");let r=t.indexOf(","),i=0,l=!1;for(;!l;){r===-1&&(r=t.length,l=!0);const o=t.slice(i,r).trim();(o||!l)&&n.push(o),i=r+1,r=t.indexOf(",",i)}return n}function Ir(e,n){const t={};return(e[e.length-1]===""?[...e,""]:e).join((t.padRight?" ":"")+","+(t.padLeft===!1?"":" ")).trim()}const Tr=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Ar=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Pr={};function Vn(e,n){return(Pr.jsx?Ar:Tr).test(e)}const zr=/[ \t\n\f\r]/g;function Lr(e){return typeof e=="object"?e.type==="text"?qn(e.value):!1:qn(e)}function qn(e){return e.replace(zr,"")===""}class Me{constructor(n,t,r){this.normal=t,this.property=n,r&&(this.space=r)}}Me.prototype.normal={};Me.prototype.property={};Me.prototype.space=void 0;function _t(e,n){const t={},r={};for(const i of e)Object.assign(t,i.property),Object.assign(r,i.normal);return new Me(t,r,n)}function fn(e){return e.toLowerCase()}class J{constructor(n,t){this.attribute=t,this.property=n}}J.prototype.attribute="";J.prototype.booleanish=!1;J.prototype.boolean=!1;J.prototype.commaOrSpaceSeparated=!1;J.prototype.commaSeparated=!1;J.prototype.defined=!1;J.prototype.mustUseProperty=!1;J.prototype.number=!1;J.prototype.overloadedBoolean=!1;J.prototype.property="";J.prototype.spaceSeparated=!1;J.prototype.space=void 0;let vr=0;const z=be(),$=be(),hn=be(),k=be(),R=be(),Ie=be(),ee=be();function be(){return 2**++vr}const mn=Object.freeze(Object.defineProperty({__proto__:null,boolean:z,booleanish:$,commaOrSpaceSeparated:ee,commaSeparated:Ie,number:k,overloadedBoolean:hn,spaceSeparated:R},Symbol.toStringTag,{value:"Module"})),en=Object.keys(mn);class En extends J{constructor(n,t,r,i){let l=-1;if(super(n,t),$n(this,"space",i),typeof r=="number")for(;++l4&&t.slice(0,4)==="data"&&Fr.test(n)){if(n.charAt(4)==="-"){const l=n.slice(5).replace(Wn,Br);r="data"+l.charAt(0).toUpperCase()+l.slice(1)}else{const l=n.slice(4);if(!Wn.test(l)){let o=l.replace(Nr,Mr);o.charAt(0)!=="-"&&(o="-"+o),n="data"+o}}i=En}return new i(r,n)}function Mr(e){return"-"+e.toLowerCase()}function Br(e){return e.charAt(1).toUpperCase()}const jr=_t([Nt,Dr,Mt,Bt,jt],"html"),Cn=_t([Nt,Or,Mt,Bt,jt],"svg");function du(e){const n=String(e||"").trim();return n?n.split(/[ \t\n\r\f]+/g):[]}function Hr(e){return e.join(" ").trim()}var In={},Yn=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,Ur=/\n/g,Vr=/^\s*/,qr=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,$r=/^:\s*/,Wr=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,Yr=/^[;\s]*/,Xr=/^\s+|\s+$/g,Qr=` `,Xn="/",Qn="*",ke="",Gr="comment",Kr="declaration";function Jr(e,n){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];n=n||{};var t=1,r=1;function i(y){var b=y.match(Ur);b&&(t+=b.length);var T=y.lastIndexOf(Qr);r=~T?y.length-T:r+y.length}function l(){var y={line:t,column:r};return function(b){return b.position=new o(y),c(),b}}function o(y){this.start=y,this.end={line:t,column:r},this.source=n.source}o.prototype.content=e;function a(y){var b=new Error(n.source+":"+t+":"+r+": "+y);if(b.reason=y,b.filename=n.source,b.line=t,b.column=r,b.source=e,!n.silent)throw b}function u(y){var b=y.exec(e);if(b){var T=b[0];return i(T),e=e.slice(T.length),b}}function c(){u(Vr)}function s(y){var b;for(y=y||[];b=f();)b!==!1&&y.push(b);return y}function f(){var y=l();if(!(Xn!=e.charAt(0)||Qn!=e.charAt(1))){for(var b=2;ke!=e.charAt(b)&&(Qn!=e.charAt(b)||Xn!=e.charAt(b+1));)++b;if(b+=2,ke===e.charAt(b-1))return a("End of comment missing");var T=e.slice(2,b-2);return r+=2,i(T),e=e.slice(b),r+=2,y({type:Gr,comment:T})}}function d(){var y=l(),b=u(qr);if(b){if(f(),!u($r))return a("property missing ':'");var T=u(Wr),w=y({type:Kr,property:Gn(b[0].replace(Yn,ke)),value:T?Gn(T[0].replace(Yn,ke)):ke});return u(Yr),w}}function p(){var y=[];s(y);for(var b;b=d();)b!==!1&&(y.push(b),s(y));return y}return c(),p()}function Gn(e){return e?e.replace(Xr,ke):ke}var Zr=Jr,ei=We&&We.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(In,"__esModule",{value:!0});In.default=ti;const ni=ei(Zr);function ti(e,n){let t=null;if(!e||typeof e!="string")return t;const r=(0,ni.default)(e),i=typeof n=="function";return r.forEach(l=>{if(l.type!=="declaration")return;const{property:o,value:a}=l;i?n(o,a,l):a&&(t=t||{},t[o]=a)}),t}var Qe={};Object.defineProperty(Qe,"__esModule",{value:!0});Qe.camelCase=void 0;var ri=/^--[a-zA-Z0-9_-]+$/,ii=/-([a-z])/g,li=/^[^-]+$/,oi=/^-(webkit|moz|ms|o|khtml)-/,ai=/^-(ms)-/,ui=function(e){return!e||li.test(e)||ri.test(e)},si=function(e,n){return n.toUpperCase()},Kn=function(e,n){return"".concat(n,"-")},ci=function(e,n){return n===void 0&&(n={}),ui(e)?e:(e=e.toLowerCase(),n.reactCompat?e=e.replace(ai,Kn):e=e.replace(oi,Kn),e.replace(ii,si))};Qe.camelCase=ci;var pi=We&&We.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},fi=pi(In),hi=Qe;function dn(e,n){var t={};return!e||typeof e!="string"||(0,fi.default)(e,function(r,i){r&&i&&(t[(0,hi.camelCase)(r,n)]=i)}),t}dn.default=dn;var mi=dn;const di=Ot(mi),Ht=Ut("end"),Tn=Ut("start");function Ut(e){return n;function n(t){const r=t&&t.position&&t.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function gi(e){const n=Tn(e),t=Ht(e);if(n&&t)return{start:n,end:t}}function _e(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Jn(e.position):"start"in e||"end"in e?Jn(e):"line"in e||"column"in e?gn(e):""}function gn(e){return Zn(e&&e.line)+":"+Zn(e&&e.column)}function Jn(e){return gn(e&&e.start)+"-"+gn(e&&e.end)}function Zn(e){return e&&typeof e=="number"?e:1}class Q extends Error{constructor(n,t,r){super(),typeof t=="string"&&(r=t,t=void 0);let i="",l={},o=!1;if(t&&("line"in t&&"column"in t?l={place:t}:"start"in t&&"end"in t?l={place:t}:"type"in t?l={ancestors:[t],place:t.position}:l={...t}),typeof n=="string"?i=n:!l.cause&&n&&(o=!0,i=n.message,l.cause=n),!l.ruleId&&!l.source&&typeof r=="string"){const u=r.indexOf(":");u===-1?l.ruleId=r:(l.source=r.slice(0,u),l.ruleId=r.slice(u+1))}if(!l.place&&l.ancestors&&l.ancestors){const u=l.ancestors[l.ancestors.length-1];u&&(l.place=u.position)}const a=l.place&&"start"in l.place?l.place.start:l.place;this.ancestors=l.ancestors||void 0,this.cause=l.cause||void 0,this.column=a?a.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=a?a.line:void 0,this.name=_e(l.place)||"1:1",this.place=l.place||void 0,this.reason=this.message,this.ruleId=l.ruleId||void 0,this.source=l.source||void 0,this.stack=o&&l.cause&&typeof l.cause.stack=="string"?l.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Q.prototype.file="";Q.prototype.name="";Q.prototype.reason="";Q.prototype.message="";Q.prototype.stack="";Q.prototype.column=void 0;Q.prototype.line=void 0;Q.prototype.ancestors=void 0;Q.prototype.cause=void 0;Q.prototype.fatal=void 0;Q.prototype.place=void 0;Q.prototype.ruleId=void 0;Q.prototype.source=void 0;const An={}.hasOwnProperty,yi=new Map,xi=/[A-Z]/g,ki=new Set(["table","tbody","thead","tfoot","tr"]),bi=new Set(["td","th"]),Vt="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function wi(e,n){if(!n||n.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const t=n.filePath||void 0;let r;if(n.development){if(typeof n.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=zi(t,n.jsxDEV)}else{if(typeof n.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof n.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=Pi(t,n.jsx,n.jsxs)}const i={Fragment:n.Fragment,ancestors:[],components:n.components||{},create:r,elementAttributeNameCase:n.elementAttributeNameCase||"react",evaluater:n.createEvaluater?n.createEvaluater():void 0,filePath:t,ignoreInvalidStyle:n.ignoreInvalidStyle||!1,passKeys:n.passKeys!==!1,passNode:n.passNode||!1,schema:n.space==="svg"?Cn:jr,stylePropertyNameCase:n.stylePropertyNameCase||"dom",tableCellAlignToStyle:n.tableCellAlignToStyle!==!1},l=qt(i,e,void 0);return l&&typeof l!="string"?l:i.create(e,i.Fragment,{children:l||void 0},void 0)}function qt(e,n,t){if(n.type==="element")return Si(e,n,t);if(n.type==="mdxFlowExpression"||n.type==="mdxTextExpression")return Ei(e,n);if(n.type==="mdxJsxFlowElement"||n.type==="mdxJsxTextElement")return Ii(e,n,t);if(n.type==="mdxjsEsm")return Ci(e,n);if(n.type==="root")return Ti(e,n,t);if(n.type==="text")return Ai(e,n)}function Si(e,n,t){const r=e.schema;let i=r;n.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=Cn,e.schema=i),e.ancestors.push(n);const l=Wt(e,n.tagName,!1),o=Li(e,n);let a=zn(e,n);return ki.has(n.tagName)&&(a=a.filter(function(u){return typeof u=="string"?!Lr(u):!0})),$t(e,o,l,n),Pn(o,a),e.ancestors.pop(),e.schema=r,e.create(n,l,o,t)}function Ei(e,n){if(n.data&&n.data.estree&&e.evaluater){const r=n.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}Re(e,n.position)}function Ci(e,n){if(n.data&&n.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(n.data.estree);Re(e,n.position)}function Ii(e,n,t){const r=e.schema;let i=r;n.name==="svg"&&r.space==="html"&&(i=Cn,e.schema=i),e.ancestors.push(n);const l=n.name===null?e.Fragment:Wt(e,n.name,!0),o=vi(e,n),a=zn(e,n);return $t(e,o,l,n),Pn(o,a),e.ancestors.pop(),e.schema=r,e.create(n,l,o,t)}function Ti(e,n,t){const r={};return Pn(r,zn(e,n)),e.create(n,e.Fragment,r,t)}function Ai(e,n){return n.value}function $t(e,n,t,r){typeof t!="string"&&t!==e.Fragment&&e.passNode&&(n.node=r)}function Pn(e,n){if(n.length>0){const t=n.length>1?n:n[0];t&&(e.children=t)}}function Pi(e,n,t){return r;function r(i,l,o,a){const c=Array.isArray(o.children)?t:n;return a?c(l,o,a):c(l,o)}}function zi(e,n){return t;function t(r,i,l,o){const a=Array.isArray(l.children),u=Tn(r);return n(i,l,o,a,{columnNumber:u?u.column-1:void 0,fileName:e,lineNumber:u?u.line:void 0},void 0)}}function Li(e,n){const t={};let r,i;for(i in n.properties)if(i!=="children"&&An.call(n.properties,i)){const l=Di(e,i,n.properties[i]);if(l){const[o,a]=l;e.tableCellAlignToStyle&&o==="align"&&typeof a=="string"&&bi.has(n.tagName)?r=a:t[o]=a}}if(r){const l=t.style||(t.style={});l[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return t}function vi(e,n){const t={};for(const r of n.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const l=r.data.estree.body[0];l.type;const o=l.expression;o.type;const a=o.properties[0];a.type,Object.assign(t,e.evaluater.evaluateExpression(a.argument))}else Re(e,n.position);else{const i=r.name;let l;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const a=r.value.data.estree.body[0];a.type,l=e.evaluater.evaluateExpression(a.expression)}else Re(e,n.position);else l=r.value===null?!0:r.value;t[i]=l}return t}function zn(e,n){const t=[];let r=-1;const i=e.passKeys?new Map:yi;for(;++ri?0:i+n:n=n>i?i:n,t=t>0?t:0,r.length<1e4)o=Array.from(r),o.unshift(n,t),e.splice(...o);else for(t&&e.splice(n,t);l0?(se(e,e.length,0,n),e):n}const tt={}.hasOwnProperty;function ji(e){const n={};let t=-1;for(;++t13&&t<32||t>126&&t<160||t>55295&&t<57344||t>64975&&t<65008||(t&65535)===65535||(t&65535)===65534||t>1114111?"�":String.fromCodePoint(t)}function Te(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const ue=ge(/[A-Za-z]/),ne=ge(/[\dA-Za-z]/),Vi=ge(/[#-'*+\--9=?A-Z^-~]/);function yn(e){return e!==null&&(e<32||e===127)}const xn=ge(/\d/),qi=ge(/[\dA-Fa-f]/),$i=ge(/[!-/:-@[-`{-~]/);function A(e){return e!==null&&e<-2}function K(e){return e!==null&&(e<0||e===32)}function O(e){return e===-2||e===-1||e===32}const Wi=ge(new RegExp("\\p{P}|\\p{S}","u")),Yi=ge(/\s/);function ge(e){return n;function n(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function Pe(e){const n=[];let t=-1,r=0,i=0;for(;++t55295&&l<57344){const a=e.charCodeAt(t+1);l<56320&&a>56319&&a<57344?(o=String.fromCharCode(l,a),i=1):o="�"}else o=String.fromCharCode(l);o&&(n.push(e.slice(r,t),encodeURIComponent(o)),r=t+i+1,o=""),i&&(t+=i,i=0)}return n.join("")+e.slice(r)}function M(e,n,t,r){const i=r?r-1:Number.POSITIVE_INFINITY;let l=0;return o;function o(u){return O(u)?(e.enter(t),a(u)):n(u)}function a(u){return O(u)&&l++o))return;const _=n.events.length;let V=_,N,B;for(;V--;)if(n.events[V][0]==="exit"&&n.events[V][1].type==="chunkFlow"){if(N){B=n.events[V][1].end;break}N=!0}for(w(r),x=_;xE;){const U=t[j];n.containerState=U[1],U[0].exit.call(n,e)}t.length=E}function L(){i.write([null]),l=void 0,i=void 0,n.containerState._closeFlow=void 0}}function Ji(e,n,t){return M(e,e.attempt(this.parser.constructs.document,n,t),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function it(e){if(e===null||K(e)||Yi(e))return 1;if(Wi(e))return 2}function vn(e,n,t){const r=[];let i=-1;for(;++i1&&e[t][1].end.offset-e[t][1].start.offset>1?2:1;const f={...e[r][1].end},d={...e[t][1].start};lt(f,-u),lt(d,u),o={type:u>1?"strongSequence":"emphasisSequence",start:f,end:{...e[r][1].end}},a={type:u>1?"strongSequence":"emphasisSequence",start:{...e[t][1].start},end:d},l={type:u>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[t][1].start}},i={type:u>1?"strong":"emphasis",start:{...o.start},end:{...a.end}},e[r][1].end={...o.start},e[t][1].start={...a.end},c=[],e[r][1].end.offset-e[r][1].start.offset&&(c=te(c,[["enter",e[r][1],n],["exit",e[r][1],n]])),c=te(c,[["enter",i,n],["enter",o,n],["exit",o,n],["enter",l,n]]),c=te(c,vn(n.parser.constructs.insideSpan.null,e.slice(r+1,t),n)),c=te(c,[["exit",l,n],["enter",a,n],["exit",a,n],["exit",i,n]]),e[t][1].end.offset-e[t][1].start.offset?(s=2,c=te(c,[["enter",e[t][1],n],["exit",e[t][1],n]])):s=0,se(e,r-1,t-r+3,c),t=r+c.length-s-2;break}}for(t=-1;++t0&&O(x)?M(e,L,"linePrefix",l+1)(x):L(x)}function L(x){return x===null||A(x)?e.check(ot,b,j)(x):(e.enter("codeFlowValue"),E(x))}function E(x){return x===null||A(x)?(e.exit("codeFlowValue"),L(x)):(e.consume(x),E)}function j(x){return e.exit("codeFenced"),n(x)}function U(x,_,V){let N=0;return B;function B(D){return x.enter("lineEnding"),x.consume(D),x.exit("lineEnding"),I}function I(D){return x.enter("codeFencedFence"),O(D)?M(x,C,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(D):C(D)}function C(D){return D===a?(x.enter("codeFencedFenceSequence"),H(D)):V(D)}function H(D){return D===a?(N++,x.consume(D),H):N>=o?(x.exit("codeFencedFenceSequence"),O(D)?M(x,q,"whitespace")(D):q(D)):V(D)}function q(D){return D===null||A(D)?(x.exit("codeFencedFence"),_(D)):V(D)}}}function cl(e,n,t){const r=this;return i;function i(o){return o===null?t(o):(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),l)}function l(o){return r.parser.lazy[r.now().line]?t(o):n(o)}}const tn={name:"codeIndented",tokenize:fl},pl={partial:!0,tokenize:hl};function fl(e,n,t){const r=this;return i;function i(c){return e.enter("codeIndented"),M(e,l,"linePrefix",5)(c)}function l(c){const s=r.events[r.events.length-1];return s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?o(c):t(c)}function o(c){return c===null?u(c):A(c)?e.attempt(pl,o,u)(c):(e.enter("codeFlowValue"),a(c))}function a(c){return c===null||A(c)?(e.exit("codeFlowValue"),o(c)):(e.consume(c),a)}function u(c){return e.exit("codeIndented"),n(c)}}function hl(e,n,t){const r=this;return i;function i(o){return r.parser.lazy[r.now().line]?t(o):A(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),i):M(e,l,"linePrefix",5)(o)}function l(o){const a=r.events[r.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?n(o):A(o)?i(o):t(o)}}const ml={name:"codeText",previous:gl,resolve:dl,tokenize:yl};function dl(e){let n=e.length-4,t=3,r,i;if((e[t][1].type==="lineEnding"||e[t][1].type==="space")&&(e[n][1].type==="lineEnding"||e[n][1].type==="space")){for(r=t;++r=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+n+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return nthis.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-n+this.left.length).reverse():this.left.slice(n).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(n,t,r){const i=t||0;this.setCursor(Math.trunc(n));const l=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&De(this.left,r),l.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(n){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(n)}pushMany(n){this.setCursor(Number.POSITIVE_INFINITY),De(this.left,n)}unshift(n){this.setCursor(0),this.right.push(n)}unshiftMany(n){this.setCursor(0),De(this.right,n.reverse())}setCursor(n){if(!(n===this.left.length||n>this.left.length&&this.right.length===0||n<0&&this.left.length===0))if(n=4?n(o):e.interrupt(r.parser.constructs.flow,t,n)(o)}}function Zt(e,n,t,r,i,l,o,a,u){const c=u||Number.POSITIVE_INFINITY;let s=0;return f;function f(w){return w===60?(e.enter(r),e.enter(i),e.enter(l),e.consume(w),e.exit(l),d):w===null||w===32||w===41||yn(w)?t(w):(e.enter(r),e.enter(o),e.enter(a),e.enter("chunkString",{contentType:"string"}),b(w))}function d(w){return w===62?(e.enter(l),e.consume(w),e.exit(l),e.exit(i),e.exit(r),n):(e.enter(a),e.enter("chunkString",{contentType:"string"}),p(w))}function p(w){return w===62?(e.exit("chunkString"),e.exit(a),d(w)):w===null||w===60||A(w)?t(w):(e.consume(w),w===92?y:p)}function y(w){return w===60||w===62||w===92?(e.consume(w),p):p(w)}function b(w){return!s&&(w===null||w===41||K(w))?(e.exit("chunkString"),e.exit(a),e.exit(o),e.exit(r),n(w)):s999||p===null||p===91||p===93&&!u||p===94&&!a&&"_hiddenFootnoteSupport"in o.parser.constructs?t(p):p===93?(e.exit(l),e.enter(i),e.consume(p),e.exit(i),e.exit(r),n):A(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),s):(e.enter("chunkString",{contentType:"string"}),f(p))}function f(p){return p===null||p===91||p===93||A(p)||a++>999?(e.exit("chunkString"),s(p)):(e.consume(p),u||(u=!O(p)),p===92?d:f)}function d(p){return p===91||p===92||p===93?(e.consume(p),a++,f):f(p)}}function nr(e,n,t,r,i,l){let o;return a;function a(d){return d===34||d===39||d===40?(e.enter(r),e.enter(i),e.consume(d),e.exit(i),o=d===40?41:d,u):t(d)}function u(d){return d===o?(e.enter(i),e.consume(d),e.exit(i),e.exit(r),n):(e.enter(l),c(d))}function c(d){return d===o?(e.exit(l),u(o)):d===null?t(d):A(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),M(e,c,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),s(d))}function s(d){return d===o||d===null||A(d)?(e.exit("chunkString"),c(d)):(e.consume(d),d===92?f:s)}function f(d){return d===o||d===92?(e.consume(d),s):s(d)}}function Ne(e,n){let t;return r;function r(i){return A(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),t=!0,r):O(i)?M(e,r,t?"linePrefix":"lineSuffix")(i):n(i)}}const Il={name:"definition",tokenize:Al},Tl={partial:!0,tokenize:Pl};function Al(e,n,t){const r=this;let i;return l;function l(p){return e.enter("definition"),o(p)}function o(p){return er.call(r,e,a,t,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function a(p){return i=Te(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),u):t(p)}function u(p){return K(p)?Ne(e,c)(p):c(p)}function c(p){return Zt(e,s,t,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function s(p){return e.attempt(Tl,f,f)(p)}function f(p){return O(p)?M(e,d,"whitespace")(p):d(p)}function d(p){return p===null||A(p)?(e.exit("definition"),r.parser.defined.push(i),n(p)):t(p)}}function Pl(e,n,t){return r;function r(a){return K(a)?Ne(e,i)(a):t(a)}function i(a){return nr(e,l,t,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function l(a){return O(a)?M(e,o,"whitespace")(a):o(a)}function o(a){return a===null||A(a)?n(a):t(a)}}const zl={name:"hardBreakEscape",tokenize:Ll};function Ll(e,n,t){return r;function r(l){return e.enter("hardBreakEscape"),e.consume(l),i}function i(l){return A(l)?(e.exit("hardBreakEscape"),n(l)):t(l)}}const vl={name:"headingAtx",resolve:Dl,tokenize:Ol};function Dl(e,n){let t=e.length-2,r=3,i,l;return e[r][1].type==="whitespace"&&(r+=2),t-2>r&&e[t][1].type==="whitespace"&&(t-=2),e[t][1].type==="atxHeadingSequence"&&(r===t-1||t-4>r&&e[t-2][1].type==="whitespace")&&(t-=r+1===t?2:4),t>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[t][1].end},l={type:"chunkText",start:e[r][1].start,end:e[t][1].end,contentType:"text"},se(e,r,t-r+1,[["enter",i,n],["enter",l,n],["exit",l,n],["exit",i,n]])),e}function Ol(e,n,t){let r=0;return i;function i(s){return e.enter("atxHeading"),l(s)}function l(s){return e.enter("atxHeadingSequence"),o(s)}function o(s){return s===35&&r++<6?(e.consume(s),o):s===null||K(s)?(e.exit("atxHeadingSequence"),a(s)):t(s)}function a(s){return s===35?(e.enter("atxHeadingSequence"),u(s)):s===null||A(s)?(e.exit("atxHeading"),n(s)):O(s)?M(e,a,"whitespace")(s):(e.enter("atxHeadingText"),c(s))}function u(s){return s===35?(e.consume(s),u):(e.exit("atxHeadingSequence"),a(s))}function c(s){return s===null||s===35||K(s)?(e.exit("atxHeadingText"),a(s)):(e.consume(s),c)}}const _l=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],ut=["pre","script","style","textarea"],Nl={concrete:!0,name:"htmlFlow",resolveTo:Ml,tokenize:Bl},Fl={partial:!0,tokenize:Hl},Rl={partial:!0,tokenize:jl};function Ml(e){let n=e.length;for(;n--&&!(e[n][0]==="enter"&&e[n][1].type==="htmlFlow"););return n>1&&e[n-2][1].type==="linePrefix"&&(e[n][1].start=e[n-2][1].start,e[n+1][1].start=e[n-2][1].start,e.splice(n-2,2)),e}function Bl(e,n,t){const r=this;let i,l,o,a,u;return c;function c(m){return s(m)}function s(m){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(m),f}function f(m){return m===33?(e.consume(m),d):m===47?(e.consume(m),l=!0,b):m===63?(e.consume(m),i=3,r.interrupt?n:h):ue(m)?(e.consume(m),o=String.fromCharCode(m),T):t(m)}function d(m){return m===45?(e.consume(m),i=2,p):m===91?(e.consume(m),i=5,a=0,y):ue(m)?(e.consume(m),i=4,r.interrupt?n:h):t(m)}function p(m){return m===45?(e.consume(m),r.interrupt?n:h):t(m)}function y(m){const le="CDATA[";return m===le.charCodeAt(a++)?(e.consume(m),a===le.length?r.interrupt?n:C:y):t(m)}function b(m){return ue(m)?(e.consume(m),o=String.fromCharCode(m),T):t(m)}function T(m){if(m===null||m===47||m===62||K(m)){const le=m===47,ye=o.toLowerCase();return!le&&!l&&ut.includes(ye)?(i=1,r.interrupt?n(m):C(m)):_l.includes(o.toLowerCase())?(i=6,le?(e.consume(m),w):r.interrupt?n(m):C(m)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?t(m):l?L(m):E(m))}return m===45||ne(m)?(e.consume(m),o+=String.fromCharCode(m),T):t(m)}function w(m){return m===62?(e.consume(m),r.interrupt?n:C):t(m)}function L(m){return O(m)?(e.consume(m),L):B(m)}function E(m){return m===47?(e.consume(m),B):m===58||m===95||ue(m)?(e.consume(m),j):O(m)?(e.consume(m),E):B(m)}function j(m){return m===45||m===46||m===58||m===95||ne(m)?(e.consume(m),j):U(m)}function U(m){return m===61?(e.consume(m),x):O(m)?(e.consume(m),U):E(m)}function x(m){return m===null||m===60||m===61||m===62||m===96?t(m):m===34||m===39?(e.consume(m),u=m,_):O(m)?(e.consume(m),x):V(m)}function _(m){return m===u?(e.consume(m),u=null,N):m===null||A(m)?t(m):(e.consume(m),_)}function V(m){return m===null||m===34||m===39||m===47||m===60||m===61||m===62||m===96||K(m)?U(m):(e.consume(m),V)}function N(m){return m===47||m===62||O(m)?E(m):t(m)}function B(m){return m===62?(e.consume(m),I):t(m)}function I(m){return m===null||A(m)?C(m):O(m)?(e.consume(m),I):t(m)}function C(m){return m===45&&i===2?(e.consume(m),X):m===60&&i===1?(e.consume(m),W):m===62&&i===4?(e.consume(m),ie):m===63&&i===3?(e.consume(m),h):m===93&&i===5?(e.consume(m),ce):A(m)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(Fl,pe,H)(m)):m===null||A(m)?(e.exit("htmlFlowData"),H(m)):(e.consume(m),C)}function H(m){return e.check(Rl,q,pe)(m)}function q(m){return e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),D}function D(m){return m===null||A(m)?H(m):(e.enter("htmlFlowData"),C(m))}function X(m){return m===45?(e.consume(m),h):C(m)}function W(m){return m===47?(e.consume(m),o="",re):C(m)}function re(m){if(m===62){const le=o.toLowerCase();return ut.includes(le)?(e.consume(m),ie):C(m)}return ue(m)&&o.length<8?(e.consume(m),o+=String.fromCharCode(m),re):C(m)}function ce(m){return m===93?(e.consume(m),h):C(m)}function h(m){return m===62?(e.consume(m),ie):m===45&&i===2?(e.consume(m),h):C(m)}function ie(m){return m===null||A(m)?(e.exit("htmlFlowData"),pe(m)):(e.consume(m),ie)}function pe(m){return e.exit("htmlFlow"),n(m)}}function jl(e,n,t){const r=this;return i;function i(o){return A(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),l):t(o)}function l(o){return r.parser.lazy[r.now().line]?t(o):n(o)}}function Hl(e,n,t){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Ge,n,t)}}const Ul={name:"htmlText",tokenize:Vl};function Vl(e,n,t){const r=this;let i,l,o;return a;function a(h){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(h),u}function u(h){return h===33?(e.consume(h),c):h===47?(e.consume(h),U):h===63?(e.consume(h),E):ue(h)?(e.consume(h),V):t(h)}function c(h){return h===45?(e.consume(h),s):h===91?(e.consume(h),l=0,y):ue(h)?(e.consume(h),L):t(h)}function s(h){return h===45?(e.consume(h),p):t(h)}function f(h){return h===null?t(h):h===45?(e.consume(h),d):A(h)?(o=f,W(h)):(e.consume(h),f)}function d(h){return h===45?(e.consume(h),p):f(h)}function p(h){return h===62?X(h):h===45?d(h):f(h)}function y(h){const ie="CDATA[";return h===ie.charCodeAt(l++)?(e.consume(h),l===ie.length?b:y):t(h)}function b(h){return h===null?t(h):h===93?(e.consume(h),T):A(h)?(o=b,W(h)):(e.consume(h),b)}function T(h){return h===93?(e.consume(h),w):b(h)}function w(h){return h===62?X(h):h===93?(e.consume(h),w):b(h)}function L(h){return h===null||h===62?X(h):A(h)?(o=L,W(h)):(e.consume(h),L)}function E(h){return h===null?t(h):h===63?(e.consume(h),j):A(h)?(o=E,W(h)):(e.consume(h),E)}function j(h){return h===62?X(h):E(h)}function U(h){return ue(h)?(e.consume(h),x):t(h)}function x(h){return h===45||ne(h)?(e.consume(h),x):_(h)}function _(h){return A(h)?(o=_,W(h)):O(h)?(e.consume(h),_):X(h)}function V(h){return h===45||ne(h)?(e.consume(h),V):h===47||h===62||K(h)?N(h):t(h)}function N(h){return h===47?(e.consume(h),X):h===58||h===95||ue(h)?(e.consume(h),B):A(h)?(o=N,W(h)):O(h)?(e.consume(h),N):X(h)}function B(h){return h===45||h===46||h===58||h===95||ne(h)?(e.consume(h),B):I(h)}function I(h){return h===61?(e.consume(h),C):A(h)?(o=I,W(h)):O(h)?(e.consume(h),I):N(h)}function C(h){return h===null||h===60||h===61||h===62||h===96?t(h):h===34||h===39?(e.consume(h),i=h,H):A(h)?(o=C,W(h)):O(h)?(e.consume(h),C):(e.consume(h),q)}function H(h){return h===i?(e.consume(h),i=void 0,D):h===null?t(h):A(h)?(o=H,W(h)):(e.consume(h),H)}function q(h){return h===null||h===34||h===39||h===60||h===61||h===96?t(h):h===47||h===62||K(h)?N(h):(e.consume(h),q)}function D(h){return h===47||h===62||K(h)?N(h):t(h)}function X(h){return h===62?(e.consume(h),e.exit("htmlTextData"),e.exit("htmlText"),n):t(h)}function W(h){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),re}function re(h){return O(h)?M(e,ce,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(h):ce(h)}function ce(h){return e.enter("htmlTextData"),o(h)}}const Dn={name:"labelEnd",resolveAll:Yl,resolveTo:Xl,tokenize:Ql},ql={tokenize:Gl},$l={tokenize:Kl},Wl={tokenize:Jl};function Yl(e){let n=-1;const t=[];for(;++n=3&&(c===null||A(c))?(e.exit("thematicBreak"),n(c)):t(c)}function u(c){return c===i?(e.consume(c),r++,u):(e.exit("thematicBreakSequence"),O(c)?M(e,a,"whitespace")(c):a(c))}}const G={continuation:{tokenize:uo},exit:co,name:"list",tokenize:ao},lo={partial:!0,tokenize:po},oo={partial:!0,tokenize:so};function ao(e,n,t){const r=this,i=r.events[r.events.length-1];let l=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,o=0;return a;function a(p){const y=r.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(y==="listUnordered"?!r.containerState.marker||p===r.containerState.marker:xn(p)){if(r.containerState.type||(r.containerState.type=y,e.enter(y,{_container:!0})),y==="listUnordered")return e.enter("listItemPrefix"),p===42||p===45?e.check(qe,t,c)(p):c(p);if(!r.interrupt||p===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),u(p)}return t(p)}function u(p){return xn(p)&&++o<10?(e.consume(p),u):(!r.interrupt||o<2)&&(r.containerState.marker?p===r.containerState.marker:p===41||p===46)?(e.exit("listItemValue"),c(p)):t(p)}function c(p){return e.enter("listItemMarker"),e.consume(p),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||p,e.check(Ge,r.interrupt?t:s,e.attempt(lo,d,f))}function s(p){return r.containerState.initialBlankLine=!0,l++,d(p)}function f(p){return O(p)?(e.enter("listItemPrefixWhitespace"),e.consume(p),e.exit("listItemPrefixWhitespace"),d):t(p)}function d(p){return r.containerState.size=l+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,n(p)}}function uo(e,n,t){const r=this;return r.containerState._closeFlow=void 0,e.check(Ge,i,l);function i(a){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,M(e,n,"listItemIndent",r.containerState.size+1)(a)}function l(a){return r.containerState.furtherBlankLines||!O(a)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(a)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(oo,n,o)(a))}function o(a){return r.containerState._closeFlow=!0,r.interrupt=void 0,M(e,e.attempt(G,n,t),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function so(e,n,t){const r=this;return M(e,i,"listItemIndent",r.containerState.size+1);function i(l){const o=r.events[r.events.length-1];return o&&o[1].type==="listItemIndent"&&o[2].sliceSerialize(o[1],!0).length===r.containerState.size?n(l):t(l)}}function co(e){e.exit(this.containerState.type)}function po(e,n,t){const r=this;return M(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(l){const o=r.events[r.events.length-1];return!O(l)&&o&&o[1].type==="listItemPrefixWhitespace"?n(l):t(l)}}const st={name:"setextUnderline",resolveTo:fo,tokenize:ho};function fo(e,n){let t=e.length,r,i,l;for(;t--;)if(e[t][0]==="enter"){if(e[t][1].type==="content"){r=t;break}e[t][1].type==="paragraph"&&(i=t)}else e[t][1].type==="content"&&e.splice(t,1),!l&&e[t][1].type==="definition"&&(l=t);const o={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",l?(e.splice(i,0,["enter",o,n]),e.splice(l+1,0,["exit",e[r][1],n]),e[r][1].end={...e[l][1].end}):e[r][1]=o,e.push(["exit",o,n]),e}function ho(e,n,t){const r=this;let i;return l;function l(c){let s=r.events.length,f;for(;s--;)if(r.events[s][1].type!=="lineEnding"&&r.events[s][1].type!=="linePrefix"&&r.events[s][1].type!=="content"){f=r.events[s][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||f)?(e.enter("setextHeadingLine"),i=c,o(c)):t(c)}function o(c){return e.enter("setextHeadingLineSequence"),a(c)}function a(c){return c===i?(e.consume(c),a):(e.exit("setextHeadingLineSequence"),O(c)?M(e,u,"lineSuffix")(c):u(c))}function u(c){return c===null||A(c)?(e.exit("setextHeadingLine"),n(c)):t(c)}}const mo={tokenize:go};function go(e){const n=this,t=e.attempt(Ge,r,e.attempt(this.parser.constructs.flowInitial,i,M(e,e.attempt(this.parser.constructs.flow,i,e.attempt(bl,i)),"linePrefix")));return t;function r(l){if(l===null){e.consume(l);return}return e.enter("lineEndingBlank"),e.consume(l),e.exit("lineEndingBlank"),n.currentConstruct=void 0,t}function i(l){if(l===null){e.consume(l);return}return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),n.currentConstruct=void 0,t}}const yo={resolveAll:rr()},xo=tr("string"),ko=tr("text");function tr(e){return{resolveAll:rr(e==="text"?bo:void 0),tokenize:n};function n(t){const r=this,i=this.parser.constructs[e],l=t.attempt(i,o,a);return o;function o(s){return c(s)?l(s):a(s)}function a(s){if(s===null){t.consume(s);return}return t.enter("data"),t.consume(s),u}function u(s){return c(s)?(t.exit("data"),l(s)):(t.consume(s),u)}function c(s){if(s===null)return!0;const f=i[s];let d=-1;if(f)for(;++d-1){const a=o[0];typeof a=="string"?o[0]=a.slice(r):o.shift()}l>0&&o.push(e[i].slice(0,l))}return o}function Oo(e,n){let t=-1;const r=[];let i;for(;++t0){const oe=P.tokenStack[P.tokenStack.length-1];(oe[1]||pt).call(P,void 0,oe[0])}for(S.position={start:de(g.length>0?g[0][1].start:{line:1,column:1,offset:0}),end:de(g.length>0?g[g.length-2][1].end:{line:1,column:1,offset:0})},F=-1;++Fi.jsx("input",{type:r,className:n("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:t,...o}));d.displayName="Input";export{d as I}; +import{r as s,j as i,x as n}from"./index-B7UoLEbn.js";const d=s.forwardRef(({className:e,type:r,...o},t)=>i.jsx("input",{type:r,className:n("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:t,...o}));d.displayName="Input";export{d as I}; diff --git a/assets/loader-circle-CTuL2Xdc.js b/assets/loader-circle-hbMX20oF.js similarity index 85% rename from assets/loader-circle-CTuL2Xdc.js rename to assets/loader-circle-hbMX20oF.js index 7f58e1745d9f3f2aa3d52ddfc7a8427f972ccd7e..72997ffce94948f43cca57275c5c74144f8e5f91 100644 --- a/assets/loader-circle-CTuL2Xdc.js +++ b/assets/loader-circle-hbMX20oF.js @@ -1,4 +1,4 @@ -import{g as e}from"./index-CkeK0cDg.js";/** +import{g as e}from"./index-B7UoLEbn.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/mail-0F33Vm5v.js b/assets/mail-BWFd7V0v.js similarity index 97% rename from assets/mail-0F33Vm5v.js rename to assets/mail-BWFd7V0v.js index e7ace6139bdf8a2932c41a19375045534369a554..773e40b8b2488fd4ef79d66cd7e5802102779fe7 100644 --- a/assets/mail-0F33Vm5v.js +++ b/assets/mail-BWFd7V0v.js @@ -1,4 +1,4 @@ -import{g as a}from"./index-CkeK0cDg.js";/** +import{g as a}from"./index-B7UoLEbn.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/openrouter-DC0iPeja.js b/assets/openrouter-Drl-aaDJ.js similarity index 82% rename from assets/openrouter-DC0iPeja.js rename to assets/openrouter-Drl-aaDJ.js index d2e1b9c913a8705d66f6898fa7892cf4c8f73e66..8b29c9e78b0bf6e8bde434a4d11fc1adb11185ad 100644 --- a/assets/openrouter-DC0iPeja.js +++ b/assets/openrouter-Drl-aaDJ.js @@ -1 +1 @@ -import{u as r}from"./useQuery-_Fj6Jfzr.js";import{c as n}from"./chat-Cvg-XEh-.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-DV2f4JpC.js";import{c as n}from"./chat-B6IGPjTl.js";const u=["chat","openrouter","usage"],o=["chat","openrouter","credential"];function s(e=!0){return r({queryKey:u,queryFn:()=>n.getUsage(),enabled:e,staleTime:3e4,refetchOnWindowFocus:!0})}function c(e=!0){return r({queryKey:o,queryFn:()=>n.getOpenRouterCredential(),enabled:e,refetchOnWindowFocus:!0})}function m(e){const t=new Date(e);return{local:new Intl.DateTimeFormat(void 0,{year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"2-digit",timeZoneName:"short"}).format(t),utc:`${t.toLocaleString("en-GB",{timeZone:"UTC",year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})} UTC`}}export{o as O,s as a,m as r,c as u}; diff --git a/assets/operations-bzcC9DQN.js b/assets/operations-GXAv7423.js similarity index 97% rename from assets/operations-bzcC9DQN.js rename to assets/operations-GXAv7423.js index c1c1aa5162af881712ce6ad04c6dc6862ac27990..5600d18bf09ac5579886dc4fb0393e1f03079755 100644 --- a/assets/operations-bzcC9DQN.js +++ b/assets/operations-GXAv7423.js @@ -1,4 +1,4 @@ -import{g as c,r as s,j as r,x as n,a4 as u}from"./index-CkeK0cDg.js";/** +import{g as c,r as s,j as r,x as n,a4 as u}from"./index-B7UoLEbn.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/paperEdits-DNevMcOH.js b/assets/paperEdits-C__t4BOQ.js similarity index 87% rename from assets/paperEdits-DNevMcOH.js rename to assets/paperEdits-C__t4BOQ.js index cbf99230eed1fd37bab78b4094f69df6cbaf9092..e09745b6e4006095851da9e61e0eba7dcfb48c31 100644 --- a/assets/paperEdits-DNevMcOH.js +++ b/assets/paperEdits-C__t4BOQ.js @@ -1 +1 @@ -import{a4 as p}from"./index-CkeK0cDg.js";const i={authorization:e=>p(`/paper-edit-authorizations/${encodeURIComponent(e)}`),approve:e=>p(`/paper-edit-authorizations/${encodeURIComponent(e)}/approve`,{method:"POST"}),history:(e,o)=>p(`/papers/${e}/edit-history${o?`?cursor=${encodeURIComponent(o)}`:""}`),digest:(e,o)=>p(`/admin/paper-edit-digest?day=${e}&page=${o}`),suspend:(e,o)=>p("/admin/paper-edit-suspension",{method:"POST",body:JSON.stringify({hf_subject:e,suspended:o})})};export{i as p}; +import{a4 as p}from"./index-B7UoLEbn.js";const i={authorization:e=>p(`/paper-edit-authorizations/${encodeURIComponent(e)}`),approve:e=>p(`/paper-edit-authorizations/${encodeURIComponent(e)}/approve`,{method:"POST"}),history:(e,o)=>p(`/papers/${e}/edit-history${o?`?cursor=${encodeURIComponent(o)}`:""}`),digest:(e,o)=>p(`/admin/paper-edit-digest?day=${e}&page=${o}`),suspend:(e,o)=>p("/admin/paper-edit-suspension",{method:"POST",body:JSON.stringify({hf_subject:e,suspended:o})})};export{i as p}; diff --git a/assets/papers-Celoj8_s.js b/assets/papers-Ctf2uv0o.js similarity index 99% rename from assets/papers-Celoj8_s.js rename to assets/papers-Ctf2uv0o.js index f255567642bbd50a2e88a6582dd0a485a8a997b1..7fb5f7c76908c902846f1372586c51188ebdfaf2 100644 --- a/assets/papers-Celoj8_s.js +++ b/assets/papers-Ctf2uv0o.js @@ -1 +1 @@ -var y=Object.defineProperty;var w=(n,e,t)=>e in n?y(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var m=(n,e,t)=>w(n,typeof e!="symbol"?e+"":e,t);import{A as f,E as S,a4 as l,au as $}from"./index-CkeK0cDg.js";const d="pwc:fresh-auth-mutation";function v(n){if(typeof window>"u")return;sessionStorage.setItem("pwc:fresh-auth-edit",n);const e=S("/api/v1/auth/hf/login");window.location.assign(`${e}?return_to=${encodeURIComponent(window.location.href)}`)}class P{constructor(e,t=v){m(this,"paperLoads",new Map);m(this,"evaluationLoads",new Map);this.request=e,this.recoverFreshAuth=t}primePaper(e,t=!1){t&&this.paperLoads.delete(e);let r=this.paperLoads.get(e);return r||(r=this.request(`/papers/${e}/curation-state`).catch(s=>{throw this.paperLoads.delete(e),s}),this.paperLoads.set(e,r)),r}primeEvaluations(e,t=!1){t&&this.evaluationLoads.delete(e);let r=this.evaluationLoads.get(e);return r||(r=this.request(`/evaluations/curation-state?paper_id=${e}`).catch(s=>{throw this.evaluationLoads.delete(e),s}),this.evaluationLoads.set(e,r)),r}async mutatePaper(e,t,r,s,o){const a=this.paperLoads.get(e);if(!a)throw new Error("The catalog version was not loaded when this editor opened. Close and reopen the editor.");const i=(await a).sections[t];if(!i)throw new Error(`Missing curation version for ${t}`);return this.mutate(t,s,r,i,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 i=new Headers(o.headers);Object.entries(this.idempotencyHeaders(a,r,s)).forEach(([h,g])=>i.set(h,g));const p={...o,headers:i};try{const h=await this.request(t,p);return this.clearAttempt(p),h}catch(h){throw h instanceof f&&h.status===401&&h.code==="fresh_auth_required"?(this.saveFreshAuthMutation(e,t,r,p),this.recoverFreshAuth(e)):h instanceof f&&h.status===409&&(this.clearAttempt(p),typeof window<"u"&&window.dispatchEvent(new CustomEvent("pwc:catalog-conflict",{detail:{endpoint:t}}))),h}}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 i=JSON.parse(o);return{"Idempotency-Key":i.key,"If-Match":i.version}}const a=crypto.randomUUID();return sessionStorage.setItem(s,JSON.stringify({key:a,version:r})),sessionStorage.setItem(`pwc:mutation-key:${a}`,s),{"Idempotency-Key":a,"If-Match":r}}clearAttempt(e){const t=new Headers(e.headers).get("Idempotency-Key");if(!t)return;const r=sessionStorage.getItem(`pwc:mutation-key:${t}`);r&&sessionStorage.removeItem(r),sessionStorage.removeItem(`pwc:mutation-key:${t}`),this.paperLoads.clear(),this.evaluationLoads.clear()}}const u=new P(l);function c(n){const e=new URLSearchParams;for(const[r,s]of Object.entries(n??{}))s!==void 0&&s!==""&&e.set(r,String(s));const t=e.toString();return t?`?${t}`:""}class q{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 i=new URLSearchParams({q:e,page:t.toString(),page_size:r.toString()});return s&&i.set("mode",s),a!=null&&a.start_date&&i.set("start_date",a.start_date),a!=null&&a.end_date&&i.set("end_date",a.end_date),this.request(`/papers/search?${i.toString()}`,{signal:o})}searchFeed(e){return this.request(`/papers/search/feed${c(e)}`,{cache:"no-cache"})}get(e,t=!0){const r=t?"?include_resources=true":"";return this.request(`/papers/${e}${r}`)}getByArxivId(e,t=!0){const r=t?"?include_resources=true":"";return this.request(`/papers/arxiv/${e}${r}`)}lookup(e){return this.request("/papers/lookup",{method:"POST",body:JSON.stringify({references:e})})}related(e,t=4){return this.request(`/papers/${encodeURIComponent(e)}/related?limit=${t}`)}suggestedQuestions(e){return this.request(`/papers/${encodeURIComponent(e)}/suggested-questions`)}versions(e){return this.request(`/papers/arxiv/${e}/versions`)}indexFromArxiv(e){return this.request(`/papers/index/${e}`,{method:"POST"})}submit(e){return this.request("/papers/submit",{method:"POST",body:JSON.stringify(e)})}copyToBucket(e,t){return this.request(`/papers/${encodeURIComponent(e)}/copy-to-bucket`,{method:"POST",body:JSON.stringify(t)})}trending(e){const t=new URLSearchParams;for(const[s,o]of Object.entries(e??{}))o!==void 0&&t.set(s,String(o));const r=t.toString();return this.request(`/papers/trending${r?`?${r}`:""}`,{cache:"no-store"})}forTask(e,t){return this.request(`/tasks/${e}/papers${c(t)}`)}forMethod(e,t){return this.request(`/methods/${encodeURIComponent(e)}/papers${c(t)}`)}forConference(e,t){return this.request(`/conferences/${e}/papers${c(t)}`)}forOrganization(e,t){return this.request(`/organizations/${e}/papers${c(t)}`)}getAuthor(e){return this.request(`/authors/${e}`)}primeCurationState(e,t=!1){return u.primePaper(e,t)}freshAuthMutationDraft(){return u.freshAuthMutationDraft()}resumeFreshAuthMutation(){return u.resumeFreshAuthMutation()}updateTasks(e,t){const r=new URLSearchParams(t.map(s=>["task_ids",String(s)])).toString();return u.mutatePaper(e,"tasks",t,`/papers/${e}/tasks?${r}`,{method:"PUT"})}updateMethods(e,t){const r=new URLSearchParams(t.map(s=>["method_ids",String(s)])).toString();return u.mutatePaper(e,"methods",t,`/papers/${e}/methods?${r}`,{method:"PUT"})}updateOrganizations(e,t){const r=new URLSearchParams(t.map(s=>["organization_ids",String(s)])).toString();return u.mutatePaper(e,"organizations",t,`/papers/${e}/organizations?${r}`,{method:"PUT"})}updateRepositories(e,t){return u.mutatePaper(e,"repositories",t,`/papers/${e}/repositories`,{method:"PUT",body:JSON.stringify({repositories:t})})}updateProjectPages(e,t){return u.mutatePaper(e,"project_pages",t,`/papers/${e}/project-pages`,{method:"PUT",body:JSON.stringify({project_pages:t})})}updateXThreads(e,t){return u.mutatePaper(e,"x_threads",t,`/papers/${e}/x-threads`,{method:"PUT",body:JSON.stringify({x_threads:t})})}updateSourceUrl(e,t){return u.mutatePaper(e,"source_url",t,`/papers/${e}/source-url`,{method:"PUT",body:JSON.stringify({source_url:t})})}updateHfArtifacts(e,t){return u.mutatePaper(e,"hf_artifacts",t,`/papers/${e}/hf-artifacts`,{method:"PUT",body:JSON.stringify(t)})}}const A=new q(l);async function T(n){const e=await $(`/papers/${encodeURIComponent(n)}/web-markdown`);if(!e.ok)throw new f(e,await e.text());return e.text()}export{u as a,T as g,A as p}; +var y=Object.defineProperty;var w=(n,e,t)=>e in n?y(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var m=(n,e,t)=>w(n,typeof e!="symbol"?e+"":e,t);import{A as f,E as S,a4 as l,au as $}from"./index-B7UoLEbn.js";const d="pwc:fresh-auth-mutation";function v(n){if(typeof window>"u")return;sessionStorage.setItem("pwc:fresh-auth-edit",n);const e=S("/api/v1/auth/hf/login");window.location.assign(`${e}?return_to=${encodeURIComponent(window.location.href)}`)}class P{constructor(e,t=v){m(this,"paperLoads",new Map);m(this,"evaluationLoads",new Map);this.request=e,this.recoverFreshAuth=t}primePaper(e,t=!1){t&&this.paperLoads.delete(e);let r=this.paperLoads.get(e);return r||(r=this.request(`/papers/${e}/curation-state`).catch(s=>{throw this.paperLoads.delete(e),s}),this.paperLoads.set(e,r)),r}primeEvaluations(e,t=!1){t&&this.evaluationLoads.delete(e);let r=this.evaluationLoads.get(e);return r||(r=this.request(`/evaluations/curation-state?paper_id=${e}`).catch(s=>{throw this.evaluationLoads.delete(e),s}),this.evaluationLoads.set(e,r)),r}async mutatePaper(e,t,r,s,o){const a=this.paperLoads.get(e);if(!a)throw new Error("The catalog version was not loaded when this editor opened. Close and reopen the editor.");const i=(await a).sections[t];if(!i)throw new Error(`Missing curation version for ${t}`);return this.mutate(t,s,r,i,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 i=new Headers(o.headers);Object.entries(this.idempotencyHeaders(a,r,s)).forEach(([h,g])=>i.set(h,g));const p={...o,headers:i};try{const h=await this.request(t,p);return this.clearAttempt(p),h}catch(h){throw h instanceof f&&h.status===401&&h.code==="fresh_auth_required"?(this.saveFreshAuthMutation(e,t,r,p),this.recoverFreshAuth(e)):h instanceof f&&h.status===409&&(this.clearAttempt(p),typeof window<"u"&&window.dispatchEvent(new CustomEvent("pwc:catalog-conflict",{detail:{endpoint:t}}))),h}}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 i=JSON.parse(o);return{"Idempotency-Key":i.key,"If-Match":i.version}}const a=crypto.randomUUID();return sessionStorage.setItem(s,JSON.stringify({key:a,version:r})),sessionStorage.setItem(`pwc:mutation-key:${a}`,s),{"Idempotency-Key":a,"If-Match":r}}clearAttempt(e){const t=new Headers(e.headers).get("Idempotency-Key");if(!t)return;const r=sessionStorage.getItem(`pwc:mutation-key:${t}`);r&&sessionStorage.removeItem(r),sessionStorage.removeItem(`pwc:mutation-key:${t}`),this.paperLoads.clear(),this.evaluationLoads.clear()}}const u=new P(l);function c(n){const e=new URLSearchParams;for(const[r,s]of Object.entries(n??{}))s!==void 0&&s!==""&&e.set(r,String(s));const t=e.toString();return t?`?${t}`:""}class q{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 i=new URLSearchParams({q:e,page:t.toString(),page_size:r.toString()});return s&&i.set("mode",s),a!=null&&a.start_date&&i.set("start_date",a.start_date),a!=null&&a.end_date&&i.set("end_date",a.end_date),this.request(`/papers/search?${i.toString()}`,{signal:o})}searchFeed(e){return this.request(`/papers/search/feed${c(e)}`,{cache:"no-cache"})}get(e,t=!0){const r=t?"?include_resources=true":"";return this.request(`/papers/${e}${r}`)}getByArxivId(e,t=!0){const r=t?"?include_resources=true":"";return this.request(`/papers/arxiv/${e}${r}`)}lookup(e){return this.request("/papers/lookup",{method:"POST",body:JSON.stringify({references:e})})}related(e,t=4){return this.request(`/papers/${encodeURIComponent(e)}/related?limit=${t}`)}suggestedQuestions(e){return this.request(`/papers/${encodeURIComponent(e)}/suggested-questions`)}versions(e){return this.request(`/papers/arxiv/${e}/versions`)}indexFromArxiv(e){return this.request(`/papers/index/${e}`,{method:"POST"})}submit(e){return this.request("/papers/submit",{method:"POST",body:JSON.stringify(e)})}copyToBucket(e,t){return this.request(`/papers/${encodeURIComponent(e)}/copy-to-bucket`,{method:"POST",body:JSON.stringify(t)})}trending(e){const t=new URLSearchParams;for(const[s,o]of Object.entries(e??{}))o!==void 0&&t.set(s,String(o));const r=t.toString();return this.request(`/papers/trending${r?`?${r}`:""}`,{cache:"no-store"})}forTask(e,t){return this.request(`/tasks/${e}/papers${c(t)}`)}forMethod(e,t){return this.request(`/methods/${encodeURIComponent(e)}/papers${c(t)}`)}forConference(e,t){return this.request(`/conferences/${e}/papers${c(t)}`)}forOrganization(e,t){return this.request(`/organizations/${e}/papers${c(t)}`)}getAuthor(e){return this.request(`/authors/${e}`)}primeCurationState(e,t=!1){return u.primePaper(e,t)}freshAuthMutationDraft(){return u.freshAuthMutationDraft()}resumeFreshAuthMutation(){return u.resumeFreshAuthMutation()}updateTasks(e,t){const r=new URLSearchParams(t.map(s=>["task_ids",String(s)])).toString();return u.mutatePaper(e,"tasks",t,`/papers/${e}/tasks?${r}`,{method:"PUT"})}updateMethods(e,t){const r=new URLSearchParams(t.map(s=>["method_ids",String(s)])).toString();return u.mutatePaper(e,"methods",t,`/papers/${e}/methods?${r}`,{method:"PUT"})}updateOrganizations(e,t){const r=new URLSearchParams(t.map(s=>["organization_ids",String(s)])).toString();return u.mutatePaper(e,"organizations",t,`/papers/${e}/organizations?${r}`,{method:"PUT"})}updateRepositories(e,t){return u.mutatePaper(e,"repositories",t,`/papers/${e}/repositories`,{method:"PUT",body:JSON.stringify({repositories:t})})}updateProjectPages(e,t){return u.mutatePaper(e,"project_pages",t,`/papers/${e}/project-pages`,{method:"PUT",body:JSON.stringify({project_pages:t})})}updateXThreads(e,t){return u.mutatePaper(e,"x_threads",t,`/papers/${e}/x-threads`,{method:"PUT",body:JSON.stringify({x_threads:t})})}updateSourceUrl(e,t){return u.mutatePaper(e,"source_url",t,`/papers/${e}/source-url`,{method:"PUT",body:JSON.stringify({source_url:t})})}updateHfArtifacts(e,t){return u.mutatePaper(e,"hf_artifacts",t,`/papers/${e}/hf-artifacts`,{method:"PUT",body:JSON.stringify(t)})}}const A=new q(l);async function T(n){const e=await $(`/papers/${encodeURIComponent(n)}/web-markdown`);if(!e.ok)throw new f(e,await e.text());return e.text()}export{u as a,T as g,A as p}; diff --git a/assets/plus-BaTMbqcZ.js b/assets/plus-BvN48Xkz.js similarity index 86% rename from assets/plus-BaTMbqcZ.js rename to assets/plus-BvN48Xkz.js index 3c5df82d38c831ddd4e08c7cd6c45e5d4112a073..b871aed38b5b985ae2972ad920d3ec55ce3ed1cf 100644 --- a/assets/plus-BaTMbqcZ.js +++ b/assets/plus-BvN48Xkz.js @@ -1,4 +1,4 @@ -import{g as e}from"./index-CkeK0cDg.js";/** +import{g as e}from"./index-B7UoLEbn.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/popover-Vq6DwYpn.js b/assets/popover-BOnBmrXi.js similarity index 98% rename from assets/popover-Vq6DwYpn.js rename to assets/popover-BOnBmrXi.js index 9b8c62652cb36b53403a9d03b089660af226cbe6..eda1746f7b5eba607e79ead3d044116131734ab8 100644 --- a/assets/popover-Vq6DwYpn.js +++ b/assets/popover-BOnBmrXi.js @@ -1 +1 @@ -import{r as s,j as l,ab as V,q as $,ag as L,a1 as W,s as A,p as O,t as h,ah as E,ai as y,P as _,aj as H,w as z,ak as G,al as q,am as B,an as K,ao as Z,ap as U,aq as J,x as Q}from"./index-CkeK0cDg.js";function X(e){const t=Y(e),r=s.forwardRef((n,o)=>{const{children:a,...c}=n,i=s.Children.toArray(a),p=i.find(oe);if(p){const u=p.props.children,P=i.map(f=>f===p?s.Children.count(u)>1?s.Children.only(null):s.isValidElement(u)?u.props.children:null:f);return l.jsx(t,{...c,ref:o,children:s.isValidElement(u)?s.cloneElement(u,void 0,P):null})}return l.jsx(t,{...c,ref:o,children:a})});return r.displayName=`${e}.Slot`,r}function Y(e){const t=s.forwardRef((r,n)=>{const{children:o,...a}=r;if(s.isValidElement(o)){const c=re(o),i=te(a,o.props);return o.type!==s.Fragment&&(i.ref=n?V(n,c):c),s.cloneElement(o,i)}return s.Children.count(o)>1?s.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var ee=Symbol("radix.slottable");function oe(e){return s.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===ee}function te(e,t){const r={...t};for(const n in t){const o=e[n],a=t[n];/^on[A-Z]/.test(n)?o&&a?r[n]=(...i)=>{const p=a(...i);return o(...i),p}:o&&(r[n]=o):n==="style"?r[n]={...o,...a}:n==="className"&&(r[n]=[o,a].filter(Boolean).join(" "))}return{...e,...r}}function re(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var C="Popover",[b]=z(C,[y]),m=y(),[ne,d]=b(C),j=e=>{const{__scopePopover:t,children:r,open:n,defaultOpen:o,onOpenChange:a,modal:c=!1}=e,i=m(t),p=s.useRef(null),[u,P]=s.useState(!1),[f,v]=$({prop:n,defaultProp:o??!1,onChange:a,caller:C});return l.jsx(L,{...i,children:l.jsx(ne,{scope:t,contentId:W(),triggerRef:p,open:f,onOpenChange:v,onOpenToggle:s.useCallback(()=>v(x=>!x),[v]),hasCustomAnchor:u,onCustomAnchorAdd:s.useCallback(()=>P(!0),[]),onCustomAnchorRemove:s.useCallback(()=>P(!1),[]),modal:c,children:r})})};j.displayName=C;var w="PopoverAnchor",ae=s.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=d(w,r),a=m(r),{onCustomAnchorAdd:c,onCustomAnchorRemove:i}=o;return s.useEffect(()=>(c(),()=>i()),[c,i]),l.jsx(E,{...a,...n,ref:t})});ae.displayName=w;var S="PopoverTrigger",N=s.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=d(S,r),a=m(r),c=A(t,o.triggerRef),i=l.jsx(O.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":M(o.open),...n,ref:c,onClick:h(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?i:l.jsx(E,{asChild:!0,...a,children:i})});N.displayName=S;var R="PopoverPortal",[se,ce]=b(R,{forceMount:void 0}),F=e=>{const{__scopePopover:t,forceMount:r,children:n,container:o}=e,a=d(R,t);return l.jsx(se,{scope:t,forceMount:r,children:l.jsx(_,{present:r||a.open,children:l.jsx(H,{asChild:!0,container:o,children:n})})})};F.displayName=R;var g="PopoverContent",D=s.forwardRef((e,t)=>{const r=ce(g,e.__scopePopover),{forceMount:n=r.forceMount,...o}=e,a=d(g,e.__scopePopover);return l.jsx(_,{present:n||a.open,children:a.modal?l.jsx(le,{...o,ref:t}):l.jsx(pe,{...o,ref:t})})});D.displayName=g;var ie=X("PopoverContent.RemoveScroll"),le=s.forwardRef((e,t)=>{const r=d(g,e.__scopePopover),n=s.useRef(null),o=A(t,n),a=s.useRef(!1);return s.useEffect(()=>{const c=n.current;if(c)return G(c)},[]),l.jsx(q,{as:ie,allowPinchZoom:!0,children:l.jsx(I,{...e,ref:o,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:h(e.onCloseAutoFocus,c=>{var i;c.preventDefault(),a.current||(i=r.triggerRef.current)==null||i.focus()}),onPointerDownOutside:h(e.onPointerDownOutside,c=>{const i=c.detail.originalEvent,p=i.button===0&&i.ctrlKey===!0,u=i.button===2||p;a.current=u},{checkForDefaultPrevented:!1}),onFocusOutside:h(e.onFocusOutside,c=>c.preventDefault(),{checkForDefaultPrevented:!1})})})}),pe=s.forwardRef((e,t)=>{const r=d(g,e.__scopePopover),n=s.useRef(!1),o=s.useRef(!1);return l.jsx(I,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var c,i;(c=e.onCloseAutoFocus)==null||c.call(e,a),a.defaultPrevented||(n.current||(i=r.triggerRef.current)==null||i.focus(),a.preventDefault()),n.current=!1,o.current=!1},onInteractOutside:a=>{var p,u;(p=e.onInteractOutside)==null||p.call(e,a),a.defaultPrevented||(n.current=!0,a.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const c=a.target;((u=r.triggerRef.current)==null?void 0:u.contains(c))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&o.current&&a.preventDefault()}})}),I=s.forwardRef((e,t)=>{const{__scopePopover:r,trapFocus:n,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:c,onEscapeKeyDown:i,onPointerDownOutside:p,onFocusOutside:u,onInteractOutside:P,...f}=e,v=d(g,r),x=m(r);return B(),l.jsx(K,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:o,onUnmountAutoFocus:a,children:l.jsx(Z,{asChild:!0,disableOutsidePointerEvents:c,onInteractOutside:P,onEscapeKeyDown:i,onPointerDownOutside:p,onFocusOutside:u,onDismiss:()=>v.onOpenChange(!1),children:l.jsx(U,{"data-state":M(v.open),role:"dialog",id:v.contentId,...x,...f,ref:t,style:{...f.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),T="PopoverClose",ue=s.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=d(T,r);return l.jsx(O.button,{type:"button",...n,ref:t,onClick:h(e.onClick,()=>o.onOpenChange(!1))})});ue.displayName=T;var de="PopoverArrow",fe=s.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=m(r);return l.jsx(J,{...o,...n,ref:t})});fe.displayName=de;function M(e){return e?"open":"closed"}var ve=j,Pe=N,ge=F,k=D;const Ce=ve,xe=Pe,he=s.forwardRef(({className:e,align:t="center",sideOffset:r=4,...n},o)=>l.jsx(ge,{children:l.jsx(k,{ref:o,align:t,sideOffset:r,className:Q("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n})}));he.displayName=k.displayName;export{Ce as P,xe as a,he as b}; +import{r as s,j as l,ab as V,q as $,ag as L,a1 as W,s as A,p as O,t as h,ah as E,ai as y,P as _,aj as H,w as z,ak as G,al as q,am as B,an as K,ao as Z,ap as U,aq as J,x as Q}from"./index-B7UoLEbn.js";function X(e){const t=Y(e),r=s.forwardRef((n,o)=>{const{children:a,...c}=n,i=s.Children.toArray(a),p=i.find(oe);if(p){const u=p.props.children,P=i.map(f=>f===p?s.Children.count(u)>1?s.Children.only(null):s.isValidElement(u)?u.props.children:null:f);return l.jsx(t,{...c,ref:o,children:s.isValidElement(u)?s.cloneElement(u,void 0,P):null})}return l.jsx(t,{...c,ref:o,children:a})});return r.displayName=`${e}.Slot`,r}function Y(e){const t=s.forwardRef((r,n)=>{const{children:o,...a}=r;if(s.isValidElement(o)){const c=re(o),i=te(a,o.props);return o.type!==s.Fragment&&(i.ref=n?V(n,c):c),s.cloneElement(o,i)}return s.Children.count(o)>1?s.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var ee=Symbol("radix.slottable");function oe(e){return s.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===ee}function te(e,t){const r={...t};for(const n in t){const o=e[n],a=t[n];/^on[A-Z]/.test(n)?o&&a?r[n]=(...i)=>{const p=a(...i);return o(...i),p}:o&&(r[n]=o):n==="style"?r[n]={...o,...a}:n==="className"&&(r[n]=[o,a].filter(Boolean).join(" "))}return{...e,...r}}function re(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var C="Popover",[b]=z(C,[y]),m=y(),[ne,d]=b(C),j=e=>{const{__scopePopover:t,children:r,open:n,defaultOpen:o,onOpenChange:a,modal:c=!1}=e,i=m(t),p=s.useRef(null),[u,P]=s.useState(!1),[f,v]=$({prop:n,defaultProp:o??!1,onChange:a,caller:C});return l.jsx(L,{...i,children:l.jsx(ne,{scope:t,contentId:W(),triggerRef:p,open:f,onOpenChange:v,onOpenToggle:s.useCallback(()=>v(x=>!x),[v]),hasCustomAnchor:u,onCustomAnchorAdd:s.useCallback(()=>P(!0),[]),onCustomAnchorRemove:s.useCallback(()=>P(!1),[]),modal:c,children:r})})};j.displayName=C;var w="PopoverAnchor",ae=s.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=d(w,r),a=m(r),{onCustomAnchorAdd:c,onCustomAnchorRemove:i}=o;return s.useEffect(()=>(c(),()=>i()),[c,i]),l.jsx(E,{...a,...n,ref:t})});ae.displayName=w;var S="PopoverTrigger",N=s.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=d(S,r),a=m(r),c=A(t,o.triggerRef),i=l.jsx(O.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":M(o.open),...n,ref:c,onClick:h(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?i:l.jsx(E,{asChild:!0,...a,children:i})});N.displayName=S;var R="PopoverPortal",[se,ce]=b(R,{forceMount:void 0}),F=e=>{const{__scopePopover:t,forceMount:r,children:n,container:o}=e,a=d(R,t);return l.jsx(se,{scope:t,forceMount:r,children:l.jsx(_,{present:r||a.open,children:l.jsx(H,{asChild:!0,container:o,children:n})})})};F.displayName=R;var g="PopoverContent",D=s.forwardRef((e,t)=>{const r=ce(g,e.__scopePopover),{forceMount:n=r.forceMount,...o}=e,a=d(g,e.__scopePopover);return l.jsx(_,{present:n||a.open,children:a.modal?l.jsx(le,{...o,ref:t}):l.jsx(pe,{...o,ref:t})})});D.displayName=g;var ie=X("PopoverContent.RemoveScroll"),le=s.forwardRef((e,t)=>{const r=d(g,e.__scopePopover),n=s.useRef(null),o=A(t,n),a=s.useRef(!1);return s.useEffect(()=>{const c=n.current;if(c)return G(c)},[]),l.jsx(q,{as:ie,allowPinchZoom:!0,children:l.jsx(I,{...e,ref:o,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:h(e.onCloseAutoFocus,c=>{var i;c.preventDefault(),a.current||(i=r.triggerRef.current)==null||i.focus()}),onPointerDownOutside:h(e.onPointerDownOutside,c=>{const i=c.detail.originalEvent,p=i.button===0&&i.ctrlKey===!0,u=i.button===2||p;a.current=u},{checkForDefaultPrevented:!1}),onFocusOutside:h(e.onFocusOutside,c=>c.preventDefault(),{checkForDefaultPrevented:!1})})})}),pe=s.forwardRef((e,t)=>{const r=d(g,e.__scopePopover),n=s.useRef(!1),o=s.useRef(!1);return l.jsx(I,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var c,i;(c=e.onCloseAutoFocus)==null||c.call(e,a),a.defaultPrevented||(n.current||(i=r.triggerRef.current)==null||i.focus(),a.preventDefault()),n.current=!1,o.current=!1},onInteractOutside:a=>{var p,u;(p=e.onInteractOutside)==null||p.call(e,a),a.defaultPrevented||(n.current=!0,a.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const c=a.target;((u=r.triggerRef.current)==null?void 0:u.contains(c))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&o.current&&a.preventDefault()}})}),I=s.forwardRef((e,t)=>{const{__scopePopover:r,trapFocus:n,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:c,onEscapeKeyDown:i,onPointerDownOutside:p,onFocusOutside:u,onInteractOutside:P,...f}=e,v=d(g,r),x=m(r);return B(),l.jsx(K,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:o,onUnmountAutoFocus:a,children:l.jsx(Z,{asChild:!0,disableOutsidePointerEvents:c,onInteractOutside:P,onEscapeKeyDown:i,onPointerDownOutside:p,onFocusOutside:u,onDismiss:()=>v.onOpenChange(!1),children:l.jsx(U,{"data-state":M(v.open),role:"dialog",id:v.contentId,...x,...f,ref:t,style:{...f.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),T="PopoverClose",ue=s.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=d(T,r);return l.jsx(O.button,{type:"button",...n,ref:t,onClick:h(e.onClick,()=>o.onOpenChange(!1))})});ue.displayName=T;var de="PopoverArrow",fe=s.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=m(r);return l.jsx(J,{...o,...n,ref:t})});fe.displayName=de;function M(e){return e?"open":"closed"}var ve=j,Pe=N,ge=F,k=D;const Ce=ve,xe=Pe,he=s.forwardRef(({className:e,align:t="center",sideOffset:r=4,...n},o)=>l.jsx(ge,{children:l.jsx(k,{ref:o,align:t,sideOffset:r,className:Q("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n})}));he.displayName=k.displayName;export{Ce as P,xe as a,he as b}; diff --git a/assets/refresh-cw-ty41it1O.js b/assets/refresh-cw-Gb7Np-Ie.js similarity index 94% rename from assets/refresh-cw-ty41it1O.js rename to assets/refresh-cw-Gb7Np-Ie.js index c9cceacfe547c70bed6ddc64b58a95cd7c10ff50..64dab20f0d5ee5ac16ca5443caef18eca844d91d 100644 --- a/assets/refresh-cw-ty41it1O.js +++ b/assets/refresh-cw-Gb7Np-Ie.js @@ -1,4 +1,4 @@ -import{g as e}from"./index-CkeK0cDg.js";/** +import{g as e}from"./index-B7UoLEbn.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/research-BfGol3BN.js b/assets/research-D7aSz-AO.js similarity index 89% rename from assets/research-BfGol3BN.js rename to assets/research-D7aSz-AO.js index 7ae6223de62fb3265a85c6e7d5887e5b14a84a53..3114404fcb9635272826b64b016c8dee2f0b1b04 100644 --- a/assets/research-BfGol3BN.js +++ b/assets/research-D7aSz-AO.js @@ -1 +1 @@ -import{a4 as s}from"./index-CkeK0cDg.js";const r={follows:()=>s("/me/follows"),setFollow:(t,e,a)=>s(`/me/follows/${t}/${e}`,{method:a?"PUT":"DELETE"}),following:(t=0,e={})=>{const a=new URLSearchParams({offset:String(t),limit:"40"});return e.startDate&&a.set("start_date",e.startDate),e.endDate&&a.set("end_date",e.endDate),!e.startDate&&!e.endDate&&a.set("all_time","true"),e.hasCode&&a.set("has_code","true"),e.hasHfArtifacts&&a.set("has_hf_artifacts","true"),s(`/me/following?${a}`)},email:()=>s("/me/research-email"),setEmail:t=>s("/me/research-email",{method:"PUT",body:JSON.stringify({enabled:t})})};export{r}; +import{a4 as s}from"./index-B7UoLEbn.js";const r={follows:()=>s("/me/follows"),setFollow:(t,e,a)=>s(`/me/follows/${t}/${e}`,{method:a?"PUT":"DELETE"}),following:(t=0,e={})=>{const a=new URLSearchParams({offset:String(t),limit:"40"});return e.startDate&&a.set("start_date",e.startDate),e.endDate&&a.set("end_date",e.endDate),!e.startDate&&!e.endDate&&a.set("all_time","true"),e.hasCode&&a.set("has_code","true"),e.hasHfArtifacts&&a.set("has_hf_artifacts","true"),s(`/me/following?${a}`)},email:()=>s("/me/research-email"),setEmail:t=>s("/me/research-email",{method:"PUT",body:JSON.stringify({enabled:t})})};export{r}; diff --git a/assets/savedPapersAuth-dGFX8cRe.js b/assets/savedPapersAuth-axHpepOL.js similarity index 85% rename from assets/savedPapersAuth-dGFX8cRe.js rename to assets/savedPapersAuth-axHpepOL.js index 66b168bd104a3d5db8bc275d8bfda9050c497901..39940b11deabd178422acb2286121bd79619e0b7 100644 --- a/assets/savedPapersAuth-dGFX8cRe.js +++ b/assets/savedPapersAuth-axHpepOL.js @@ -1 +1 @@ -import{E as i}from"./index-CkeK0cDg.js";const s="saved_papers_authorized";function u(n=!1){const r=i("/api/v1/auth/hf/login"),o=new URL(r,window.location.origin).origin,t=new URL(window.location.href);n&&t.searchParams.set(s,"1");const a=o===window.location.origin?`${t.pathname}${t.search}${t.hash}`:t.toString(),e=new URLSearchParams({return_to:a,authorize_bucket:"true",bucket_create:"true"});return`${r}?${e.toString()}`}export{s as S,u as s}; +import{E as i}from"./index-B7UoLEbn.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-DT-5KDJe.js b/assets/searchable-select-CceG4fY6.js similarity index 98% rename from assets/searchable-select-DT-5KDJe.js rename to assets/searchable-select-CceG4fY6.js index 189722250f9cb3138fdbdef9fe8712bc131fd9bd..0bba8c5bd834aec3166cbb6257139ed2fdf2833f 100644 --- a/assets/searchable-select-DT-5KDJe.js +++ b/assets/searchable-select-CceG4fY6.js @@ -1,4 +1,4 @@ -import{g as he,r as a,a1 as Q,p as L,a7 as Me,a8 as De,a9 as $e,aa as Le,ab as H,j as p,x as D,l as Pe}from"./index-CkeK0cDg.js";import{u as Fe}from"./useQuery-_Fj6Jfzr.js";import{B as qe}from"./button-CsUrN-GU.js";import{P as Ke,a as Ve,b as Be}from"./popover-Vq6DwYpn.js";import"./dialog-CGH-CTnE.js";import{L as Ue}from"./loader-circle-CTuL2Xdc.js";/** +import{g as he,r as a,a1 as Q,p as L,a7 as Me,a8 as De,a9 as $e,aa as Le,ab as H,j as p,x as D,l as Pe}from"./index-B7UoLEbn.js";import{u as Fe}from"./useQuery-DV2f4JpC.js";import{B as qe}from"./button-D543yAN8.js";import{P as Ke,a as Ve,b as Be}from"./popover-BOnBmrXi.js";import"./dialog-BECDhHRn.js";import{L as Ue}from"./loader-circle-hbMX20oF.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/shield-alert-CvBQiZwU.js b/assets/shield-alert-BnMa8lt8.js similarity index 91% rename from assets/shield-alert-CvBQiZwU.js rename to assets/shield-alert-BnMa8lt8.js index 3f815c0a3f99e9924fdaefe3b794a8e2c6219f77..dfceb98539b70d0cc1c15ea8d0f4b5ad47160ef6 100644 --- a/assets/shield-alert-CvBQiZwU.js +++ b/assets/shield-alert-BnMa8lt8.js @@ -1,4 +1,4 @@ -import{g as e}from"./index-CkeK0cDg.js";/** +import{g as e}from"./index-B7UoLEbn.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/skeleton-Cs8haT1C.js b/assets/skeleton-DLsINbKq.js similarity index 62% rename from assets/skeleton-Cs8haT1C.js rename to assets/skeleton-DLsINbKq.js index 1f9edaa25e956323aef5e0cafc09b90b0d2647df..048b69744c0b029d068828238bce14f5b31b4fe7 100644 --- a/assets/skeleton-Cs8haT1C.js +++ b/assets/skeleton-DLsINbKq.js @@ -1 +1 @@ -import{j as t,x as n}from"./index-CkeK0cDg.js";function m({className:e,...s}){return t.jsx("div",{className:n("animate-pulse rounded-md bg-muted",e),...s})}export{m as S}; +import{j as t,x as n}from"./index-B7UoLEbn.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-C-uglc0y.js b/assets/submissions-BTKMKNWZ.js similarity index 99% rename from assets/submissions-C-uglc0y.js rename to assets/submissions-BTKMKNWZ.js index aa26df09c5f760bcbbb746359ad697256557d0e5..f8083d71b4c1de7e1b2326579b1dfa62d9b24ab3 100644 --- a/assets/submissions-C-uglc0y.js +++ b/assets/submissions-BTKMKNWZ.js @@ -1 +1 @@ -import{a4 as qe}from"./index-CkeK0cDg.js";var v;(function(s){s.assertEqual=n=>{};function e(n){}s.assertIs=e;function t(n){throw new Error}s.assertNever=t,s.arrayToEnum=n=>{const a={};for(const i of n)a[i]=i;return a},s.getValidEnumValues=n=>{const a=s.objectKeys(n).filter(o=>typeof n[n[o]]!="number"),i={};for(const o of a)i[o]=n[o];return s.objectValues(i)},s.objectValues=n=>s.objectKeys(n).map(function(a){return n[a]}),s.objectKeys=typeof Object.keys=="function"?n=>Object.keys(n):n=>{const a=[];for(const i in n)Object.prototype.hasOwnProperty.call(n,i)&&a.push(i);return a},s.find=(n,a)=>{for(const i of n)if(a(i))return i},s.isInteger=typeof Number.isInteger=="function"?n=>Number.isInteger(n):n=>typeof n=="number"&&Number.isFinite(n)&&Math.floor(n)===n;function r(n,a=" | "){return n.map(i=>typeof i=="string"?`'${i}'`:i).join(a)}s.joinValues=r,s.jsonStringifyReplacer=(n,a)=>typeof a=="bigint"?a.toString():a})(v||(v={}));var Te;(function(s){s.mergeShapes=(e,t)=>({...e,...t})})(Te||(Te={}));const u=v.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),$=s=>{switch(typeof s){case"undefined":return u.undefined;case"string":return u.string;case"number":return Number.isNaN(s)?u.nan:u.number;case"boolean":return u.boolean;case"function":return u.function;case"bigint":return u.bigint;case"symbol":return u.symbol;case"object":return Array.isArray(s)?u.array:s===null?u.null:s.then&&typeof s.then=="function"&&s.catch&&typeof s.catch=="function"?u.promise:typeof Map<"u"&&s instanceof Map?u.map:typeof Set<"u"&&s instanceof Set?u.set:typeof Date<"u"&&s instanceof Date?u.date:u.object;default:return u.unknown}},d=v.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class I extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}format(e){const t=e||function(a){return a.message},r={_errors:[]},n=a=>{for(const i of a.issues)if(i.code==="invalid_union")i.unionErrors.map(n);else if(i.code==="invalid_return_type")n(i.returnTypeError);else if(i.code==="invalid_arguments")n(i.argumentsError);else if(i.path.length===0)r._errors.push(t(i));else{let o=r,f=0;for(;ft.message){const t={},r=[];for(const n of this.issues)if(n.path.length>0){const a=n.path[0];t[a]=t[a]||[],t[a].push(e(n))}else r.push(e(n));return{formErrors:r,fieldErrors:t}}get formErrors(){return this.flatten()}}I.create=s=>new I(s);const ue=(s,e)=>{let t;switch(s.code){case d.invalid_type:s.received===u.undefined?t="Required":t=`Expected ${s.expected}, received ${s.received}`;break;case d.invalid_literal:t=`Invalid literal value, expected ${JSON.stringify(s.expected,v.jsonStringifyReplacer)}`;break;case d.unrecognized_keys:t=`Unrecognized key(s) in object: ${v.joinValues(s.keys,", ")}`;break;case d.invalid_union:t="Invalid input";break;case d.invalid_union_discriminator:t=`Invalid discriminator value. Expected ${v.joinValues(s.options)}`;break;case d.invalid_enum_value:t=`Invalid enum value. Expected ${v.joinValues(s.options)}, received '${s.received}'`;break;case d.invalid_arguments:t="Invalid function arguments";break;case d.invalid_return_type:t="Invalid function return type";break;case d.invalid_date:t="Invalid date";break;case d.invalid_string:typeof s.validation=="object"?"includes"in s.validation?(t=`Invalid input: must include "${s.validation.includes}"`,typeof s.validation.position=="number"&&(t=`${t} at one or more positions greater than or equal to ${s.validation.position}`)):"startsWith"in s.validation?t=`Invalid input: must start with "${s.validation.startsWith}"`:"endsWith"in s.validation?t=`Invalid input: must end with "${s.validation.endsWith}"`:v.assertNever(s.validation):s.validation!=="regex"?t=`Invalid ${s.validation}`:t="Invalid";break;case d.too_small:s.type==="array"?t=`Array must contain ${s.exact?"exactly":s.inclusive?"at least":"more than"} ${s.minimum} element(s)`:s.type==="string"?t=`String must contain ${s.exact?"exactly":s.inclusive?"at least":"over"} ${s.minimum} character(s)`:s.type==="number"?t=`Number must be ${s.exact?"exactly equal to ":s.inclusive?"greater than or equal to ":"greater than "}${s.minimum}`:s.type==="bigint"?t=`Number must be ${s.exact?"exactly equal to ":s.inclusive?"greater than or equal to ":"greater than "}${s.minimum}`:s.type==="date"?t=`Date must be ${s.exact?"exactly equal to ":s.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(s.minimum))}`:t="Invalid input";break;case d.too_big:s.type==="array"?t=`Array must contain ${s.exact?"exactly":s.inclusive?"at most":"less than"} ${s.maximum} element(s)`:s.type==="string"?t=`String must contain ${s.exact?"exactly":s.inclusive?"at most":"under"} ${s.maximum} character(s)`:s.type==="number"?t=`Number must be ${s.exact?"exactly":s.inclusive?"less than or equal to":"less than"} ${s.maximum}`:s.type==="bigint"?t=`BigInt must be ${s.exact?"exactly":s.inclusive?"less than or equal to":"less than"} ${s.maximum}`:s.type==="date"?t=`Date must be ${s.exact?"exactly":s.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(s.maximum))}`:t="Invalid input";break;case d.custom:t="Invalid input";break;case d.invalid_intersection_types:t="Intersection results could not be merged";break;case d.not_multiple_of:t=`Number must be a multiple of ${s.multipleOf}`;break;case d.not_finite:t="Number must be finite";break;default:t=e.defaultError,v.assertNever(s)}return{message:t}};let Fe=ue;function We(){return Fe}const Je=s=>{const{data:e,path:t,errorMaps:r,issueData:n}=s,a=[...t,...n.path||[]],i={...n,path:a};if(n.message!==void 0)return{...n,path:a,message:n.message};let o="";const f=r.filter(p=>!!p).slice().reverse();for(const p of f)o=p(i,{data:e,defaultError:o}).message;return{...n,path:a,message:o}};function c(s,e){const t=We(),r=Je({issueData:e,data:s.data,path:s.path,errorMaps:[s.common.contextualErrorMap,s.schemaErrorMap,t,t===ue?void 0:ue].filter(n=>!!n)});s.common.issues.push(r)}class C{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,t){const r=[];for(const n of t){if(n.status==="aborted")return m;n.status==="dirty"&&e.dirty(),r.push(n.value)}return{status:e.value,value:r}}static async mergeObjectAsync(e,t){const r=[];for(const n of t){const a=await n.key,i=await n.value;r.push({key:a,value:i})}return C.mergeObjectSync(e,r)}static mergeObjectSync(e,t){const r={};for(const n of t){const{key:a,value:i}=n;if(a.status==="aborted"||i.status==="aborted")return m;a.status==="dirty"&&e.dirty(),i.status==="dirty"&&e.dirty(),a.value!=="__proto__"&&(typeof i.value<"u"||n.alwaysSet)&&(r[a.value]=i.value)}return{status:e.value,value:r}}}const m=Object.freeze({status:"aborted"}),W=s=>({status:"dirty",value:s}),O=s=>({status:"valid",value:s}),Se=s=>s.status==="aborted",Ce=s=>s.status==="dirty",U=s=>s.status==="valid",Q=s=>typeof Promise<"u"&&s instanceof Promise;var h;(function(s){s.errToObj=e=>typeof e=="string"?{message:e}:e||{},s.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(h||(h={}));class Z{constructor(e,t,r,n){this._cachedPath=[],this.parent=e,this.data=t,this._path=r,this._key=n}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const Oe=(s,e)=>{if(U(e))return{success:!0,data:e.value};if(!s.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const t=new I(s.common.issues);return this._error=t,this._error}}};function y(s){if(!s)return{};const{errorMap:e,invalid_type_error:t,required_error:r,description:n}=s;if(e&&(t||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:n}:{errorMap:(i,o)=>{const{message:f}=s;return i.code==="invalid_enum_value"?{message:f??o.defaultError}:typeof o.data>"u"?{message:f??r??o.defaultError}:i.code!=="invalid_type"?{message:o.defaultError}:{message:f??t??o.defaultError}},description:n}}class g{get description(){return this._def.description}_getType(e){return $(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:$(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new C,ctx:{common:e.parent.common,data:e.data,parsedType:$(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(Q(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){const t=this._parse(e);return Promise.resolve(t)}parse(e,t){const r=this.safeParse(e,t);if(r.success)return r.data;throw r.error}safeParse(e,t){const r={common:{issues:[],async:(t==null?void 0:t.async)??!1,contextualErrorMap:t==null?void 0:t.errorMap},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:$(e)},n=this._parseSync({data:e,path:r.path,parent:r});return Oe(r,n)}"~validate"(e){var r,n;const t={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:$(e)};if(!this["~standard"].async)try{const a=this._parseSync({data:e,path:[],parent:t});return U(a)?{value:a.value}:{issues:t.common.issues}}catch(a){(n=(r=a==null?void 0:a.message)==null?void 0:r.toLowerCase())!=null&&n.includes("encountered")&&(this["~standard"].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then(a=>U(a)?{value:a.value}:{issues:t.common.issues})}async parseAsync(e,t){const r=await this.safeParseAsync(e,t);if(r.success)return r.data;throw r.error}async safeParseAsync(e,t){const r={common:{issues:[],contextualErrorMap:t==null?void 0:t.errorMap,async:!0},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:$(e)},n=this._parse({data:e,path:r.path,parent:r}),a=await(Q(n)?n:Promise.resolve(n));return Oe(r,a)}refine(e,t){const r=n=>typeof t=="string"||typeof t>"u"?{message:t}:typeof t=="function"?t(n):t;return this._refinement((n,a)=>{const i=e(n),o=()=>a.addIssue({code:d.custom,...r(n)});return typeof Promise<"u"&&i instanceof Promise?i.then(f=>f?!0:(o(),!1)):i?!0:(o(),!1)})}refinement(e,t){return this._refinement((r,n)=>e(r)?!0:(n.addIssue(typeof t=="function"?t(r,n):t),!1))}_refinement(e){return new z({schema:this,typeName:_.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:t=>this["~validate"](t)}}optional(){return j.create(this,this._def)}nullable(){return L.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return N.create(this)}promise(){return re.create(this,this._def)}or(e){return K.create([this,e],this._def)}and(e){return ee.create(this,e,this._def)}transform(e){return new z({...y(this._def),schema:this,typeName:_.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t=typeof e=="function"?e:()=>e;return new ne({...y(this._def),innerType:this,defaultValue:t,typeName:_.ZodDefault})}brand(){return new Me({typeName:_.ZodBranded,type:this,...y(this._def)})}catch(e){const t=typeof e=="function"?e:()=>e;return new ae({...y(this._def),innerType:this,catchValue:t,typeName:_.ZodCatch})}describe(e){const t=this.constructor;return new t({...this._def,description:e})}pipe(e){return ke.create(this,e)}readonly(){return ie.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const Ye=/^c[^\s-]{8,}$/i,He=/^[0-9a-z]+$/,Ge=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Qe=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,Xe=/^[a-z0-9_-]{21}$/i,Ke=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,et=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,tt=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,st="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let ce;const rt=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,nt=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,at=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,it=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,ot=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,dt=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Ie="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",ct=new RegExp(`^${Ie}$`);function $e(s){let e="[0-5]\\d";s.precision?e=`${e}\\.\\d{${s.precision}}`:s.precision==null&&(e=`${e}(\\.\\d+)?`);const t=s.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${t}`}function ut(s){return new RegExp(`^${$e(s)}$`)}function lt(s){let e=`${Ie}T${$e(s)}`;const t=[];return t.push(s.local?"Z?":"Z"),s.offset&&t.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${t.join("|")})`,new RegExp(`^${e}$`)}function ht(s,e){return!!((e==="v4"||!e)&&rt.test(s)||(e==="v6"||!e)&&at.test(s))}function ft(s,e){if(!Ke.test(s))return!1;try{const[t]=s.split(".");if(!t)return!1;const r=t.replace(/-/g,"+").replace(/_/g,"/").padEnd(t.length+(4-t.length%4)%4,"="),n=JSON.parse(atob(r));return!(typeof n!="object"||n===null||"typ"in n&&(n==null?void 0:n.typ)!=="JWT"||!n.alg||e&&n.alg!==e)}catch{return!1}}function pt(s,e){return!!((e==="v4"||!e)&&nt.test(s)||(e==="v6"||!e)&&it.test(s))}class R extends g{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==u.string){const a=this._getOrReturnCtx(e);return c(a,{code:d.invalid_type,expected:u.string,received:a.parsedType}),m}const r=new C;let n;for(const a of this._def.checks)if(a.kind==="min")e.data.lengtha.value&&(n=this._getOrReturnCtx(e,n),c(n,{code:d.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),r.dirty());else if(a.kind==="length"){const i=e.data.length>a.value,o=e.data.lengthe.test(n),{validation:t,code:d.invalid_string,...h.errToObj(r)})}_addCheck(e){return new R({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...h.errToObj(e)})}url(e){return this._addCheck({kind:"url",...h.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...h.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...h.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...h.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...h.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...h.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...h.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...h.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...h.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...h.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...h.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...h.errToObj(e)})}datetime(e){return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,offset:(e==null?void 0:e.offset)??!1,local:(e==null?void 0:e.local)??!1,...h.errToObj(e==null?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,...h.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...h.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...h.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t==null?void 0:t.position,...h.errToObj(t==null?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...h.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...h.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...h.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...h.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...h.errToObj(t)})}nonempty(e){return this.min(1,h.errToObj(e))}trim(){return new R({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new R({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new R({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.valuenew R({checks:[],typeName:_.ZodString,coerce:(s==null?void 0:s.coerce)??!1,...y(s)});function mt(s,e){const t=(s.toString().split(".")[1]||"").length,r=(e.toString().split(".")[1]||"").length,n=t>r?t:r,a=Number.parseInt(s.toFixed(n).replace(".","")),i=Number.parseInt(e.toFixed(n).replace(".",""));return a%i/10**n}class B extends g{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==u.number){const a=this._getOrReturnCtx(e);return c(a,{code:d.invalid_type,expected:u.number,received:a.parsedType}),m}let r;const n=new C;for(const a of this._def.checks)a.kind==="int"?v.isInteger(e.data)||(r=this._getOrReturnCtx(e,r),c(r,{code:d.invalid_type,expected:"integer",received:"float",message:a.message}),n.dirty()):a.kind==="min"?(a.inclusive?e.dataa.value:e.data>=a.value)&&(r=this._getOrReturnCtx(e,r),c(r,{code:d.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),n.dirty()):a.kind==="multipleOf"?mt(e.data,a.value)!==0&&(r=this._getOrReturnCtx(e,r),c(r,{code:d.not_multiple_of,multipleOf:a.value,message:a.message}),n.dirty()):a.kind==="finite"?Number.isFinite(e.data)||(r=this._getOrReturnCtx(e,r),c(r,{code:d.not_finite,message:a.message}),n.dirty()):v.assertNever(a);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,h.toString(t))}gt(e,t){return this.setLimit("min",e,!1,h.toString(t))}lte(e,t){return this.setLimit("max",e,!0,h.toString(t))}lt(e,t){return this.setLimit("max",e,!1,h.toString(t))}setLimit(e,t,r,n){return new B({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:h.toString(n)}]})}_addCheck(e){return new B({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:h.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:h.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:h.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:h.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:h.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:h.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:h.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:h.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:h.toString(e)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.valuee.kind==="int"||e.kind==="multipleOf"&&v.isInteger(e.value))}get isFinite(){let e=null,t=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(t===null||r.value>t)&&(t=r.value):r.kind==="max"&&(e===null||r.valuenew B({checks:[],typeName:_.ZodNumber,coerce:(s==null?void 0:s.coerce)||!1,...y(s)});class J extends g{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==u.bigint)return this._getInvalidInput(e);let r;const n=new C;for(const a of this._def.checks)a.kind==="min"?(a.inclusive?e.dataa.value:e.data>=a.value)&&(r=this._getOrReturnCtx(e,r),c(r,{code:d.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),n.dirty()):a.kind==="multipleOf"?e.data%a.value!==BigInt(0)&&(r=this._getOrReturnCtx(e,r),c(r,{code:d.not_multiple_of,multipleOf:a.value,message:a.message}),n.dirty()):v.assertNever(a);return{status:n.value,value:e.data}}_getInvalidInput(e){const t=this._getOrReturnCtx(e);return c(t,{code:d.invalid_type,expected:u.bigint,received:t.parsedType}),m}gte(e,t){return this.setLimit("min",e,!0,h.toString(t))}gt(e,t){return this.setLimit("min",e,!1,h.toString(t))}lte(e,t){return this.setLimit("max",e,!0,h.toString(t))}lt(e,t){return this.setLimit("max",e,!1,h.toString(t))}setLimit(e,t,r,n){return new J({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:h.toString(n)}]})}_addCheck(e){return new J({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:h.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:h.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:h.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:h.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:h.toString(t)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.valuenew J({checks:[],typeName:_.ZodBigInt,coerce:(s==null?void 0:s.coerce)??!1,...y(s)});class le extends g{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==u.boolean){const r=this._getOrReturnCtx(e);return c(r,{code:d.invalid_type,expected:u.boolean,received:r.parsedType}),m}return O(e.data)}}le.create=s=>new le({typeName:_.ZodBoolean,coerce:(s==null?void 0:s.coerce)||!1,...y(s)});class X extends g{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==u.date){const a=this._getOrReturnCtx(e);return c(a,{code:d.invalid_type,expected:u.date,received:a.parsedType}),m}if(Number.isNaN(e.data.getTime())){const a=this._getOrReturnCtx(e);return c(a,{code:d.invalid_date}),m}const r=new C;let n;for(const a of this._def.checks)a.kind==="min"?e.data.getTime()a.value&&(n=this._getOrReturnCtx(e,n),c(n,{code:d.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),r.dirty()):v.assertNever(a);return{status:r.value,value:new Date(e.data.getTime())}}_addCheck(e){return new X({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:h.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:h.toString(t)})}get minDate(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.valuenew X({checks:[],coerce:(s==null?void 0:s.coerce)||!1,typeName:_.ZodDate,...y(s)});class Ne extends g{_parse(e){if(this._getType(e)!==u.symbol){const r=this._getOrReturnCtx(e);return c(r,{code:d.invalid_type,expected:u.symbol,received:r.parsedType}),m}return O(e.data)}}Ne.create=s=>new Ne({typeName:_.ZodSymbol,...y(s)});class he extends g{_parse(e){if(this._getType(e)!==u.undefined){const r=this._getOrReturnCtx(e);return c(r,{code:d.invalid_type,expected:u.undefined,received:r.parsedType}),m}return O(e.data)}}he.create=s=>new he({typeName:_.ZodUndefined,...y(s)});class fe extends g{_parse(e){if(this._getType(e)!==u.null){const r=this._getOrReturnCtx(e);return c(r,{code:d.invalid_type,expected:u.null,received:r.parsedType}),m}return O(e.data)}}fe.create=s=>new fe({typeName:_.ZodNull,...y(s)});class Ae extends g{constructor(){super(...arguments),this._any=!0}_parse(e){return O(e.data)}}Ae.create=s=>new Ae({typeName:_.ZodAny,...y(s)});class pe extends g{constructor(){super(...arguments),this._unknown=!0}_parse(e){return O(e.data)}}pe.create=s=>new pe({typeName:_.ZodUnknown,...y(s)});class P extends g{_parse(e){const t=this._getOrReturnCtx(e);return c(t,{code:d.invalid_type,expected:u.never,received:t.parsedType}),m}}P.create=s=>new P({typeName:_.ZodNever,...y(s)});class Ze extends g{_parse(e){if(this._getType(e)!==u.undefined){const r=this._getOrReturnCtx(e);return c(r,{code:d.invalid_type,expected:u.void,received:r.parsedType}),m}return O(e.data)}}Ze.create=s=>new Ze({typeName:_.ZodVoid,...y(s)});class N extends g{_parse(e){const{ctx:t,status:r}=this._processInputParams(e),n=this._def;if(t.parsedType!==u.array)return c(t,{code:d.invalid_type,expected:u.array,received:t.parsedType}),m;if(n.exactLength!==null){const i=t.data.length>n.exactLength.value,o=t.data.lengthn.maxLength.value&&(c(t,{code:d.too_big,maximum:n.maxLength.value,type:"array",inclusive:!0,exact:!1,message:n.maxLength.message}),r.dirty()),t.common.async)return Promise.all([...t.data].map((i,o)=>n.type._parseAsync(new Z(t,i,t.path,o)))).then(i=>C.mergeArray(r,i));const a=[...t.data].map((i,o)=>n.type._parseSync(new Z(t,i,t.path,o)));return C.mergeArray(r,a)}get element(){return this._def.type}min(e,t){return new N({...this._def,minLength:{value:e,message:h.toString(t)}})}max(e,t){return new N({...this._def,maxLength:{value:e,message:h.toString(t)}})}length(e,t){return new N({...this._def,exactLength:{value:e,message:h.toString(t)}})}nonempty(e){return this.min(1,e)}}N.create=(s,e)=>new N({type:s,minLength:null,maxLength:null,exactLength:null,typeName:_.ZodArray,...y(e)});function D(s){if(s instanceof w){const e={};for(const t in s.shape){const r=s.shape[t];e[t]=j.create(D(r))}return new w({...s._def,shape:()=>e})}else return s instanceof N?new N({...s._def,type:D(s.element)}):s instanceof j?j.create(D(s.unwrap())):s instanceof L?L.create(D(s.unwrap())):s instanceof M?M.create(s.items.map(e=>D(e))):s}class w extends g{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),t=v.objectKeys(e);return this._cached={shape:e,keys:t},this._cached}_parse(e){if(this._getType(e)!==u.object){const p=this._getOrReturnCtx(e);return c(p,{code:d.invalid_type,expected:u.object,received:p.parsedType}),m}const{status:r,ctx:n}=this._processInputParams(e),{shape:a,keys:i}=this._getCached(),o=[];if(!(this._def.catchall instanceof P&&this._def.unknownKeys==="strip"))for(const p in n.data)i.includes(p)||o.push(p);const f=[];for(const p of i){const x=a[p],F=n.data[p];f.push({key:{status:"valid",value:p},value:x._parse(new Z(n,F,n.path,p)),alwaysSet:p in n.data})}if(this._def.catchall instanceof P){const p=this._def.unknownKeys;if(p==="passthrough")for(const x of o)f.push({key:{status:"valid",value:x},value:{status:"valid",value:n.data[x]}});else if(p==="strict")o.length>0&&(c(n,{code:d.unrecognized_keys,keys:o}),r.dirty());else if(p!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const p=this._def.catchall;for(const x of o){const F=n.data[x];f.push({key:{status:"valid",value:x},value:p._parse(new Z(n,F,n.path,x)),alwaysSet:x in n.data})}}return n.common.async?Promise.resolve().then(async()=>{const p=[];for(const x of f){const F=await x.key,Be=await x.value;p.push({key:F,value:Be,alwaysSet:x.alwaysSet})}return p}).then(p=>C.mergeObjectSync(r,p)):C.mergeObjectSync(r,f)}get shape(){return this._def.shape()}strict(e){return h.errToObj,new w({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(t,r)=>{var a,i;const n=((i=(a=this._def).errorMap)==null?void 0:i.call(a,t,r).message)??r.defaultError;return t.code==="unrecognized_keys"?{message:h.errToObj(e).message??n}:{message:n}}}:{}})}strip(){return new w({...this._def,unknownKeys:"strip"})}passthrough(){return new w({...this._def,unknownKeys:"passthrough"})}extend(e){return new w({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new w({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:_.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new w({...this._def,catchall:e})}pick(e){const t={};for(const r of v.objectKeys(e))e[r]&&this.shape[r]&&(t[r]=this.shape[r]);return new w({...this._def,shape:()=>t})}omit(e){const t={};for(const r of v.objectKeys(this.shape))e[r]||(t[r]=this.shape[r]);return new w({...this._def,shape:()=>t})}deepPartial(){return D(this)}partial(e){const t={};for(const r of v.objectKeys(this.shape)){const n=this.shape[r];e&&!e[r]?t[r]=n:t[r]=n.optional()}return new w({...this._def,shape:()=>t})}required(e){const t={};for(const r of v.objectKeys(this.shape))if(e&&!e[r])t[r]=this.shape[r];else{let a=this.shape[r];for(;a instanceof j;)a=a._def.innerType;t[r]=a}return new w({...this._def,shape:()=>t})}keyof(){return Pe(v.objectKeys(this.shape))}}w.create=(s,e)=>new w({shape:()=>s,unknownKeys:"strip",catchall:P.create(),typeName:_.ZodObject,...y(e)});w.strictCreate=(s,e)=>new w({shape:()=>s,unknownKeys:"strict",catchall:P.create(),typeName:_.ZodObject,...y(e)});w.lazycreate=(s,e)=>new w({shape:s,unknownKeys:"strip",catchall:P.create(),typeName:_.ZodObject,...y(e)});class K extends g{_parse(e){const{ctx:t}=this._processInputParams(e),r=this._def.options;function n(a){for(const o of a)if(o.result.status==="valid")return o.result;for(const o of a)if(o.result.status==="dirty")return t.common.issues.push(...o.ctx.common.issues),o.result;const i=a.map(o=>new I(o.ctx.common.issues));return c(t,{code:d.invalid_union,unionErrors:i}),m}if(t.common.async)return Promise.all(r.map(async a=>{const i={...t,common:{...t.common,issues:[]},parent:null};return{result:await a._parseAsync({data:t.data,path:t.path,parent:i}),ctx:i}})).then(n);{let a;const i=[];for(const f of r){const p={...t,common:{...t.common,issues:[]},parent:null},x=f._parseSync({data:t.data,path:t.path,parent:p});if(x.status==="valid")return x;x.status==="dirty"&&!a&&(a={result:x,ctx:p}),p.common.issues.length&&i.push(p.common.issues)}if(a)return t.common.issues.push(...a.ctx.common.issues),a.result;const o=i.map(f=>new I(f));return c(t,{code:d.invalid_union,unionErrors:o}),m}}get options(){return this._def.options}}K.create=(s,e)=>new K({options:s,typeName:_.ZodUnion,...y(e)});const E=s=>s instanceof _e?E(s.schema):s instanceof z?E(s.innerType()):s instanceof se?[s.value]:s instanceof V?s.options:s instanceof ye?v.objectValues(s.enum):s instanceof ne?E(s._def.innerType):s instanceof he?[void 0]:s instanceof fe?[null]:s instanceof j?[void 0,...E(s.unwrap())]:s instanceof L?[null,...E(s.unwrap())]:s instanceof Me||s instanceof ie?E(s.unwrap()):s instanceof ae?E(s._def.innerType):[];class xe extends g{_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==u.object)return c(t,{code:d.invalid_type,expected:u.object,received:t.parsedType}),m;const r=this.discriminator,n=t.data[r],a=this.optionsMap.get(n);return a?t.common.async?a._parseAsync({data:t.data,path:t.path,parent:t}):a._parseSync({data:t.data,path:t.path,parent:t}):(c(t,{code:d.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),m)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,r){const n=new Map;for(const a of t){const i=E(a.shape[e]);if(!i.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const o of i){if(n.has(o))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(o)}`);n.set(o,a)}}return new xe({typeName:_.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:n,...y(r)})}}function me(s,e){const t=$(s),r=$(e);if(s===e)return{valid:!0,data:s};if(t===u.object&&r===u.object){const n=v.objectKeys(e),a=v.objectKeys(s).filter(o=>n.indexOf(o)!==-1),i={...s,...e};for(const o of a){const f=me(s[o],e[o]);if(!f.valid)return{valid:!1};i[o]=f.data}return{valid:!0,data:i}}else if(t===u.array&&r===u.array){if(s.length!==e.length)return{valid:!1};const n=[];for(let a=0;a{if(Se(a)||Se(i))return m;const o=me(a.value,i.value);return o.valid?((Ce(a)||Ce(i))&&t.dirty(),{status:t.value,value:o.data}):(c(r,{code:d.invalid_intersection_types}),m)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([a,i])=>n(a,i)):n(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}ee.create=(s,e,t)=>new ee({left:s,right:e,typeName:_.ZodIntersection,...y(t)});class M extends g{_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==u.array)return c(r,{code:d.invalid_type,expected:u.array,received:r.parsedType}),m;if(r.data.lengththis._def.items.length&&(c(r,{code:d.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const a=[...r.data].map((i,o)=>{const f=this._def.items[o]||this._def.rest;return f?f._parse(new Z(r,i,r.path,o)):null}).filter(i=>!!i);return r.common.async?Promise.all(a).then(i=>C.mergeArray(t,i)):C.mergeArray(t,a)}get items(){return this._def.items}rest(e){return new M({...this._def,rest:e})}}M.create=(s,e)=>{if(!Array.isArray(s))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new M({items:s,typeName:_.ZodTuple,rest:null,...y(e)})};class te extends g{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==u.object)return c(r,{code:d.invalid_type,expected:u.object,received:r.parsedType}),m;const n=[],a=this._def.keyType,i=this._def.valueType;for(const o in r.data)n.push({key:a._parse(new Z(r,o,r.path,o)),value:i._parse(new Z(r,r.data[o],r.path,o)),alwaysSet:o in r.data});return r.common.async?C.mergeObjectAsync(t,n):C.mergeObjectSync(t,n)}get element(){return this._def.valueType}static create(e,t,r){return t instanceof g?new te({keyType:e,valueType:t,typeName:_.ZodRecord,...y(r)}):new te({keyType:R.create(),valueType:e,typeName:_.ZodRecord,...y(t)})}}class Ee extends g{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==u.map)return c(r,{code:d.invalid_type,expected:u.map,received:r.parsedType}),m;const n=this._def.keyType,a=this._def.valueType,i=[...r.data.entries()].map(([o,f],p)=>({key:n._parse(new Z(r,o,r.path,[p,"key"])),value:a._parse(new Z(r,f,r.path,[p,"value"]))}));if(r.common.async){const o=new Map;return Promise.resolve().then(async()=>{for(const f of i){const p=await f.key,x=await f.value;if(p.status==="aborted"||x.status==="aborted")return m;(p.status==="dirty"||x.status==="dirty")&&t.dirty(),o.set(p.value,x.value)}return{status:t.value,value:o}})}else{const o=new Map;for(const f of i){const p=f.key,x=f.value;if(p.status==="aborted"||x.status==="aborted")return m;(p.status==="dirty"||x.status==="dirty")&&t.dirty(),o.set(p.value,x.value)}return{status:t.value,value:o}}}}Ee.create=(s,e,t)=>new Ee({valueType:e,keyType:s,typeName:_.ZodMap,...y(t)});class Y extends g{_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==u.set)return c(r,{code:d.invalid_type,expected:u.set,received:r.parsedType}),m;const n=this._def;n.minSize!==null&&r.data.sizen.maxSize.value&&(c(r,{code:d.too_big,maximum:n.maxSize.value,type:"set",inclusive:!0,exact:!1,message:n.maxSize.message}),t.dirty());const a=this._def.valueType;function i(f){const p=new Set;for(const x of f){if(x.status==="aborted")return m;x.status==="dirty"&&t.dirty(),p.add(x.value)}return{status:t.value,value:p}}const o=[...r.data.values()].map((f,p)=>a._parse(new Z(r,f,r.path,p)));return r.common.async?Promise.all(o).then(f=>i(f)):i(o)}min(e,t){return new Y({...this._def,minSize:{value:e,message:h.toString(t)}})}max(e,t){return new Y({...this._def,maxSize:{value:e,message:h.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}Y.create=(s,e)=>new Y({valueType:s,minSize:null,maxSize:null,typeName:_.ZodSet,...y(e)});class _e extends g{get schema(){return this._def.getter()}_parse(e){const{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}_e.create=(s,e)=>new _e({getter:s,typeName:_.ZodLazy,...y(e)});class se extends g{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return c(t,{received:t.data,code:d.invalid_literal,expected:this._def.value}),m}return{status:"valid",value:e.data}}get value(){return this._def.value}}se.create=(s,e)=>new se({value:s,typeName:_.ZodLiteral,...y(e)});function Pe(s,e){return new V({values:s,typeName:_.ZodEnum,...y(e)})}class V extends g{_parse(e){if(typeof e.data!="string"){const t=this._getOrReturnCtx(e),r=this._def.values;return c(t,{expected:v.joinValues(r),received:t.parsedType,code:d.invalid_type}),m}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){const t=this._getOrReturnCtx(e),r=this._def.values;return c(t,{received:t.data,code:d.invalid_enum_value,options:r}),m}return O(e.data)}get options(){return this._def.values}get enum(){const e={};for(const t of this._def.values)e[t]=t;return e}get Values(){const e={};for(const t of this._def.values)e[t]=t;return e}get Enum(){const e={};for(const t of this._def.values)e[t]=t;return e}extract(e,t=this._def){return V.create(e,{...this._def,...t})}exclude(e,t=this._def){return V.create(this.options.filter(r=>!e.includes(r)),{...this._def,...t})}}V.create=Pe;class ye extends g{_parse(e){const t=v.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(e);if(r.parsedType!==u.string&&r.parsedType!==u.number){const n=v.objectValues(t);return c(r,{expected:v.joinValues(n),received:r.parsedType,code:d.invalid_type}),m}if(this._cache||(this._cache=new Set(v.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){const n=v.objectValues(t);return c(r,{received:r.data,code:d.invalid_enum_value,options:n}),m}return O(e.data)}get enum(){return this._def.values}}ye.create=(s,e)=>new ye({values:s,typeName:_.ZodNativeEnum,...y(e)});class re extends g{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==u.promise&&t.common.async===!1)return c(t,{code:d.invalid_type,expected:u.promise,received:t.parsedType}),m;const r=t.parsedType===u.promise?t.data:Promise.resolve(t.data);return O(r.then(n=>this._def.type.parseAsync(n,{path:t.path,errorMap:t.common.contextualErrorMap})))}}re.create=(s,e)=>new re({type:s,typeName:_.ZodPromise,...y(e)});class z extends g{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===_.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:r}=this._processInputParams(e),n=this._def.effect||null,a={addIssue:i=>{c(r,i),i.fatal?t.abort():t.dirty()},get path(){return r.path}};if(a.addIssue=a.addIssue.bind(a),n.type==="preprocess"){const i=n.transform(r.data,a);if(r.common.async)return Promise.resolve(i).then(async o=>{if(t.value==="aborted")return m;const f=await this._def.schema._parseAsync({data:o,path:r.path,parent:r});return f.status==="aborted"?m:f.status==="dirty"||t.value==="dirty"?W(f.value):f});{if(t.value==="aborted")return m;const o=this._def.schema._parseSync({data:i,path:r.path,parent:r});return o.status==="aborted"?m:o.status==="dirty"||t.value==="dirty"?W(o.value):o}}if(n.type==="refinement"){const i=o=>{const f=n.refinement(o,a);if(r.common.async)return Promise.resolve(f);if(f instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return o};if(r.common.async===!1){const o=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?m:(o.status==="dirty"&&t.dirty(),i(o.value),{status:t.value,value:o.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(o=>o.status==="aborted"?m:(o.status==="dirty"&&t.dirty(),i(o.value).then(()=>({status:t.value,value:o.value}))))}if(n.type==="transform")if(r.common.async===!1){const i=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!U(i))return m;const o=n.transform(i.value,a);if(o instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:o}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(i=>U(i)?Promise.resolve(n.transform(i.value,a)).then(o=>({status:t.value,value:o})):m);v.assertNever(n)}}z.create=(s,e,t)=>new z({schema:s,typeName:_.ZodEffects,effect:e,...y(t)});z.createWithPreprocess=(s,e,t)=>new z({schema:e,effect:{type:"preprocess",transform:s},typeName:_.ZodEffects,...y(t)});class j extends g{_parse(e){return this._getType(e)===u.undefined?O(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}j.create=(s,e)=>new j({innerType:s,typeName:_.ZodOptional,...y(e)});class L extends g{_parse(e){return this._getType(e)===u.null?O(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}L.create=(s,e)=>new L({innerType:s,typeName:_.ZodNullable,...y(e)});class ne extends g{_parse(e){const{ctx:t}=this._processInputParams(e);let r=t.data;return t.parsedType===u.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}ne.create=(s,e)=>new ne({innerType:s,typeName:_.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...y(e)});class ae extends g{_parse(e){const{ctx:t}=this._processInputParams(e),r={...t,common:{...t.common,issues:[]}},n=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return Q(n)?n.then(a=>({status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new I(r.common.issues)},input:r.data})})):{status:"valid",value:n.status==="valid"?n.value:this._def.catchValue({get error(){return new I(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}ae.create=(s,e)=>new ae({innerType:s,typeName:_.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...y(e)});class Re extends g{_parse(e){if(this._getType(e)!==u.nan){const r=this._getOrReturnCtx(e);return c(r,{code:d.invalid_type,expected:u.nan,received:r.parsedType}),m}return{status:"valid",value:e.data}}}Re.create=s=>new Re({typeName:_.ZodNaN,...y(s)});class Me extends g{_parse(e){const{ctx:t}=this._processInputParams(e),r=t.data;return this._def.type._parse({data:r,path:t.path,parent:t})}unwrap(){return this._def.type}}class ke extends g{_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.common.async)return(async()=>{const a=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?m:a.status==="dirty"?(t.dirty(),W(a.value)):this._def.out._parseAsync({data:a.value,path:r.path,parent:r})})();{const n=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return n.status==="aborted"?m:n.status==="dirty"?(t.dirty(),{status:"dirty",value:n.value}):this._def.out._parseSync({data:n.value,path:r.path,parent:r})}}static create(e,t){return new ke({in:e,out:t,typeName:_.ZodPipeline})}}class ie extends g{_parse(e){const t=this._def.innerType._parse(e),r=n=>(U(n)&&(n.value=Object.freeze(n.value)),n);return Q(t)?t.then(n=>r(n)):r(t)}unwrap(){return this._def.innerType}}ie.create=(s,e)=>new ie({innerType:s,typeName:_.ZodReadonly,...y(e)});var _;(function(s){s.ZodString="ZodString",s.ZodNumber="ZodNumber",s.ZodNaN="ZodNaN",s.ZodBigInt="ZodBigInt",s.ZodBoolean="ZodBoolean",s.ZodDate="ZodDate",s.ZodSymbol="ZodSymbol",s.ZodUndefined="ZodUndefined",s.ZodNull="ZodNull",s.ZodAny="ZodAny",s.ZodUnknown="ZodUnknown",s.ZodNever="ZodNever",s.ZodVoid="ZodVoid",s.ZodArray="ZodArray",s.ZodObject="ZodObject",s.ZodUnion="ZodUnion",s.ZodDiscriminatedUnion="ZodDiscriminatedUnion",s.ZodIntersection="ZodIntersection",s.ZodTuple="ZodTuple",s.ZodRecord="ZodRecord",s.ZodMap="ZodMap",s.ZodSet="ZodSet",s.ZodFunction="ZodFunction",s.ZodLazy="ZodLazy",s.ZodLiteral="ZodLiteral",s.ZodEnum="ZodEnum",s.ZodEffects="ZodEffects",s.ZodNativeEnum="ZodNativeEnum",s.ZodOptional="ZodOptional",s.ZodNullable="ZodNullable",s.ZodDefault="ZodDefault",s.ZodCatch="ZodCatch",s.ZodPromise="ZodPromise",s.ZodBranded="ZodBranded",s.ZodPipeline="ZodPipeline",s.ZodReadonly="ZodReadonly"})(_||(_={}));const l=R.create,b=B.create,oe=le.create,_t=pe.create;P.create;const T=N.create,k=w.create,Ve=K.create,ze=xe.create;ee.create;M.create;const Le=te.create,G=se.create,ge=V.create;re.create;j.create;L.create;const A=Le(_t()),be=k({id:b(),name:l(),slug:l().optional()}).passthrough(),de=k({url:l(),is_official:oe()}),ve=k({task_id:b(),dataset_id:b(),model_name:l().nullish(),harness:l().nullish(),methodology:l().nullish(),metrics:Le(Ve([l(),b()])),uses_additional_data:oe().optional(),is_open:oe().optional(),best_rank:b().nullish(),best_metric:l().nullish(),evaluated_on:l().nullish(),external_source_url:l().nullish(),num_parameters:b().nullish(),hf_model_url:l().nullish()}).passthrough(),yt=ve.partial().extend({id:b().optional()}),gt=ze("op",[k({op:G("create"),data:ve}),k({op:G("update"),evaluation_id:b(),data:ve}),k({op:G("delete"),evaluation_id:b()})]),je=k({hf_models:T(l()),hf_datasets:T(l()),hf_spaces:T(l())}),we=k({file_name:l(),mime_type:l(),data_url:l().optional(),url:l().optional()}),q=k({name:l(),description:l().optional()}),vt=q.extend({image:we.optional(),image_credit:l().optional(),parent_id:b().optional(),area_id:b().optional(),keywords:l().optional()}),xt=q.extend({image:we.optional(),image_credit:l().optional(),source_paper_id:b().optional(),source_url:l().optional(),source_title:l().optional()}),kt=Ve([k({benchmark:l(),task:l(),description:l()}),q.extend({description:l(),task_ids:T(b()),full_name:l().optional(),url:l().optional(),hf_url:l().optional(),paper_url:l().optional(),license_name:l().optional(),license_url:l().optional()})]),bt=q.extend({description:l(),direction:ge(["higher_is_better","lower_is_better"]),full_name:l().optional(),scale:l().optional(),task_id:b(),dataset_id:b()}),wt=q.extend({short_name:l().optional(),venue:l().optional(),location:l().optional(),url:l(),year:b(),start_date:l().optional(),end_date:l().optional()}),Tt=q.extend({hf_slug:l().optional(),website_url:l().optional(),image:we.optional()}),St=k({id:b(),paper_id:b().nullable(),hf_username:l(),is_author:oe(),status:ge(["pending","approved","rejected"]),applied_payload:A.nullish(),conflict_payload:A.nullish(),result_entity_type:l().nullish(),result_entity_id:l().nullish(),admin_note:l().nullish(),user_review_reason:l().nullish(),reviewed_by:l().nullish(),reviewed_by_kind:ge(["human","codex"]).nullish(),review_evidence:A.nullish(),created_at:l(),updated_at:l(),reviewed_at:l().nullish()});function S(s,e,t){return St.extend({edit_type:G(s),proposed_payload:e,current_payload:t.nullish()})}const Ct=S("tasks",k({task_ids:T(b())}),k({tasks:T(be)})),Ot=S("methods",k({method_ids:T(b())}),k({methods:T(be)})),Nt=S("evaluations",k({operations:T(gt)}),k({evaluations:T(yt)})),At=S("repositories",k({repositories:T(de)}),k({repositories:T(de)})),Zt=S("project_pages",k({project_pages:T(de)}),k({project_pages:T(de)})),Et=S("source_url",k({source_url:l()}),k({source_url:l().nullish()})),Rt=S("hf_artifacts",je,je),jt=S("x_threads",k({x_threads:T(l())}),k({x_threads:T(k({url:l()}))})),It=S("organizations",k({organization_ids:T(b())}),k({organizations:T(be)})),$t=S("new_task",vt,A),Pt=S("new_method",xt,A),Mt=S("new_benchmark",kt,A),Vt=S("new_metric",bt,A),zt=S("new_conference",wt,A),Lt=S("new_organization",Tt,A),Dt=S("new_external_paper",k({title:l().optional(),source_url:l(),authors:T(l()),date_published:l().optional(),abstract:l().optional()}),A),De=ze("edit_type",[Ct,Ot,Nt,At,Zt,Et,Rt,jt,It,$t,Pt,Mt,Vt,zt,Lt,Dt]);function Jt(s,e,t){return{paper_id:s,edit_type:e,proposed_payload:t}}const Ut=k({count:b(),results:T(De)});class Bt extends Error{constructor(e){super(`Malformed pending-edit payload: ${e}`),this.name="PendingEditPayloadError"}}function Ue(s,e){const t=s.safeParse(e);if(t.success)return t.data;const r=t.error.issues[0];throw new Bt(`${(r==null?void 0:r.path.join("."))||"response"}: ${(r==null?void 0:r.message)||"invalid value"}`)}const H=s=>Ue(De,s),qt=s=>Ue(Ut,s);class Ft{constructor(e){this.request=e}async submit(e){return H(await this.request("/me/paper-edits",{method:"POST",body:JSON.stringify(e)}))}list(e){const t=new URLSearchParams;for(const[n,a]of Object.entries(e??{}))a!==void 0&&t.set(n,String(a));const r=t.toString();return this.request(`/admin/paper-edits${r?`?${r}`:""}`).then(qt)}async get(e){return H(await this.request(`/admin/paper-edits/${e}`))}async approve(e,t={}){return H(await this.request(`/admin/paper-edits/${e}/approve`,{method:"POST",body:JSON.stringify(t)}))}async reject(e,t={}){return H(await this.request(`/admin/paper-edits/${e}/reject`,{method:"POST",body:JSON.stringify(t)}))}}const Yt=new Ft(qe);export{Jt as p,Yt as s}; +import{a4 as qe}from"./index-B7UoLEbn.js";var v;(function(s){s.assertEqual=n=>{};function e(n){}s.assertIs=e;function t(n){throw new Error}s.assertNever=t,s.arrayToEnum=n=>{const a={};for(const i of n)a[i]=i;return a},s.getValidEnumValues=n=>{const a=s.objectKeys(n).filter(o=>typeof n[n[o]]!="number"),i={};for(const o of a)i[o]=n[o];return s.objectValues(i)},s.objectValues=n=>s.objectKeys(n).map(function(a){return n[a]}),s.objectKeys=typeof Object.keys=="function"?n=>Object.keys(n):n=>{const a=[];for(const i in n)Object.prototype.hasOwnProperty.call(n,i)&&a.push(i);return a},s.find=(n,a)=>{for(const i of n)if(a(i))return i},s.isInteger=typeof Number.isInteger=="function"?n=>Number.isInteger(n):n=>typeof n=="number"&&Number.isFinite(n)&&Math.floor(n)===n;function r(n,a=" | "){return n.map(i=>typeof i=="string"?`'${i}'`:i).join(a)}s.joinValues=r,s.jsonStringifyReplacer=(n,a)=>typeof a=="bigint"?a.toString():a})(v||(v={}));var Te;(function(s){s.mergeShapes=(e,t)=>({...e,...t})})(Te||(Te={}));const u=v.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),$=s=>{switch(typeof s){case"undefined":return u.undefined;case"string":return u.string;case"number":return Number.isNaN(s)?u.nan:u.number;case"boolean":return u.boolean;case"function":return u.function;case"bigint":return u.bigint;case"symbol":return u.symbol;case"object":return Array.isArray(s)?u.array:s===null?u.null:s.then&&typeof s.then=="function"&&s.catch&&typeof s.catch=="function"?u.promise:typeof Map<"u"&&s instanceof Map?u.map:typeof Set<"u"&&s instanceof Set?u.set:typeof Date<"u"&&s instanceof Date?u.date:u.object;default:return u.unknown}},d=v.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class I extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}format(e){const t=e||function(a){return a.message},r={_errors:[]},n=a=>{for(const i of a.issues)if(i.code==="invalid_union")i.unionErrors.map(n);else if(i.code==="invalid_return_type")n(i.returnTypeError);else if(i.code==="invalid_arguments")n(i.argumentsError);else if(i.path.length===0)r._errors.push(t(i));else{let o=r,f=0;for(;ft.message){const t={},r=[];for(const n of this.issues)if(n.path.length>0){const a=n.path[0];t[a]=t[a]||[],t[a].push(e(n))}else r.push(e(n));return{formErrors:r,fieldErrors:t}}get formErrors(){return this.flatten()}}I.create=s=>new I(s);const ue=(s,e)=>{let t;switch(s.code){case d.invalid_type:s.received===u.undefined?t="Required":t=`Expected ${s.expected}, received ${s.received}`;break;case d.invalid_literal:t=`Invalid literal value, expected ${JSON.stringify(s.expected,v.jsonStringifyReplacer)}`;break;case d.unrecognized_keys:t=`Unrecognized key(s) in object: ${v.joinValues(s.keys,", ")}`;break;case d.invalid_union:t="Invalid input";break;case d.invalid_union_discriminator:t=`Invalid discriminator value. Expected ${v.joinValues(s.options)}`;break;case d.invalid_enum_value:t=`Invalid enum value. Expected ${v.joinValues(s.options)}, received '${s.received}'`;break;case d.invalid_arguments:t="Invalid function arguments";break;case d.invalid_return_type:t="Invalid function return type";break;case d.invalid_date:t="Invalid date";break;case d.invalid_string:typeof s.validation=="object"?"includes"in s.validation?(t=`Invalid input: must include "${s.validation.includes}"`,typeof s.validation.position=="number"&&(t=`${t} at one or more positions greater than or equal to ${s.validation.position}`)):"startsWith"in s.validation?t=`Invalid input: must start with "${s.validation.startsWith}"`:"endsWith"in s.validation?t=`Invalid input: must end with "${s.validation.endsWith}"`:v.assertNever(s.validation):s.validation!=="regex"?t=`Invalid ${s.validation}`:t="Invalid";break;case d.too_small:s.type==="array"?t=`Array must contain ${s.exact?"exactly":s.inclusive?"at least":"more than"} ${s.minimum} element(s)`:s.type==="string"?t=`String must contain ${s.exact?"exactly":s.inclusive?"at least":"over"} ${s.minimum} character(s)`:s.type==="number"?t=`Number must be ${s.exact?"exactly equal to ":s.inclusive?"greater than or equal to ":"greater than "}${s.minimum}`:s.type==="bigint"?t=`Number must be ${s.exact?"exactly equal to ":s.inclusive?"greater than or equal to ":"greater than "}${s.minimum}`:s.type==="date"?t=`Date must be ${s.exact?"exactly equal to ":s.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(s.minimum))}`:t="Invalid input";break;case d.too_big:s.type==="array"?t=`Array must contain ${s.exact?"exactly":s.inclusive?"at most":"less than"} ${s.maximum} element(s)`:s.type==="string"?t=`String must contain ${s.exact?"exactly":s.inclusive?"at most":"under"} ${s.maximum} character(s)`:s.type==="number"?t=`Number must be ${s.exact?"exactly":s.inclusive?"less than or equal to":"less than"} ${s.maximum}`:s.type==="bigint"?t=`BigInt must be ${s.exact?"exactly":s.inclusive?"less than or equal to":"less than"} ${s.maximum}`:s.type==="date"?t=`Date must be ${s.exact?"exactly":s.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(s.maximum))}`:t="Invalid input";break;case d.custom:t="Invalid input";break;case d.invalid_intersection_types:t="Intersection results could not be merged";break;case d.not_multiple_of:t=`Number must be a multiple of ${s.multipleOf}`;break;case d.not_finite:t="Number must be finite";break;default:t=e.defaultError,v.assertNever(s)}return{message:t}};let Fe=ue;function We(){return Fe}const Je=s=>{const{data:e,path:t,errorMaps:r,issueData:n}=s,a=[...t,...n.path||[]],i={...n,path:a};if(n.message!==void 0)return{...n,path:a,message:n.message};let o="";const f=r.filter(p=>!!p).slice().reverse();for(const p of f)o=p(i,{data:e,defaultError:o}).message;return{...n,path:a,message:o}};function c(s,e){const t=We(),r=Je({issueData:e,data:s.data,path:s.path,errorMaps:[s.common.contextualErrorMap,s.schemaErrorMap,t,t===ue?void 0:ue].filter(n=>!!n)});s.common.issues.push(r)}class C{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,t){const r=[];for(const n of t){if(n.status==="aborted")return m;n.status==="dirty"&&e.dirty(),r.push(n.value)}return{status:e.value,value:r}}static async mergeObjectAsync(e,t){const r=[];for(const n of t){const a=await n.key,i=await n.value;r.push({key:a,value:i})}return C.mergeObjectSync(e,r)}static mergeObjectSync(e,t){const r={};for(const n of t){const{key:a,value:i}=n;if(a.status==="aborted"||i.status==="aborted")return m;a.status==="dirty"&&e.dirty(),i.status==="dirty"&&e.dirty(),a.value!=="__proto__"&&(typeof i.value<"u"||n.alwaysSet)&&(r[a.value]=i.value)}return{status:e.value,value:r}}}const m=Object.freeze({status:"aborted"}),W=s=>({status:"dirty",value:s}),O=s=>({status:"valid",value:s}),Se=s=>s.status==="aborted",Ce=s=>s.status==="dirty",U=s=>s.status==="valid",Q=s=>typeof Promise<"u"&&s instanceof Promise;var h;(function(s){s.errToObj=e=>typeof e=="string"?{message:e}:e||{},s.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(h||(h={}));class Z{constructor(e,t,r,n){this._cachedPath=[],this.parent=e,this.data=t,this._path=r,this._key=n}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const Oe=(s,e)=>{if(U(e))return{success:!0,data:e.value};if(!s.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const t=new I(s.common.issues);return this._error=t,this._error}}};function y(s){if(!s)return{};const{errorMap:e,invalid_type_error:t,required_error:r,description:n}=s;if(e&&(t||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:n}:{errorMap:(i,o)=>{const{message:f}=s;return i.code==="invalid_enum_value"?{message:f??o.defaultError}:typeof o.data>"u"?{message:f??r??o.defaultError}:i.code!=="invalid_type"?{message:o.defaultError}:{message:f??t??o.defaultError}},description:n}}class g{get description(){return this._def.description}_getType(e){return $(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:$(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new C,ctx:{common:e.parent.common,data:e.data,parsedType:$(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(Q(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){const t=this._parse(e);return Promise.resolve(t)}parse(e,t){const r=this.safeParse(e,t);if(r.success)return r.data;throw r.error}safeParse(e,t){const r={common:{issues:[],async:(t==null?void 0:t.async)??!1,contextualErrorMap:t==null?void 0:t.errorMap},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:$(e)},n=this._parseSync({data:e,path:r.path,parent:r});return Oe(r,n)}"~validate"(e){var r,n;const t={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:$(e)};if(!this["~standard"].async)try{const a=this._parseSync({data:e,path:[],parent:t});return U(a)?{value:a.value}:{issues:t.common.issues}}catch(a){(n=(r=a==null?void 0:a.message)==null?void 0:r.toLowerCase())!=null&&n.includes("encountered")&&(this["~standard"].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then(a=>U(a)?{value:a.value}:{issues:t.common.issues})}async parseAsync(e,t){const r=await this.safeParseAsync(e,t);if(r.success)return r.data;throw r.error}async safeParseAsync(e,t){const r={common:{issues:[],contextualErrorMap:t==null?void 0:t.errorMap,async:!0},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:$(e)},n=this._parse({data:e,path:r.path,parent:r}),a=await(Q(n)?n:Promise.resolve(n));return Oe(r,a)}refine(e,t){const r=n=>typeof t=="string"||typeof t>"u"?{message:t}:typeof t=="function"?t(n):t;return this._refinement((n,a)=>{const i=e(n),o=()=>a.addIssue({code:d.custom,...r(n)});return typeof Promise<"u"&&i instanceof Promise?i.then(f=>f?!0:(o(),!1)):i?!0:(o(),!1)})}refinement(e,t){return this._refinement((r,n)=>e(r)?!0:(n.addIssue(typeof t=="function"?t(r,n):t),!1))}_refinement(e){return new z({schema:this,typeName:_.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:t=>this["~validate"](t)}}optional(){return j.create(this,this._def)}nullable(){return L.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return N.create(this)}promise(){return re.create(this,this._def)}or(e){return K.create([this,e],this._def)}and(e){return ee.create(this,e,this._def)}transform(e){return new z({...y(this._def),schema:this,typeName:_.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t=typeof e=="function"?e:()=>e;return new ne({...y(this._def),innerType:this,defaultValue:t,typeName:_.ZodDefault})}brand(){return new Me({typeName:_.ZodBranded,type:this,...y(this._def)})}catch(e){const t=typeof e=="function"?e:()=>e;return new ae({...y(this._def),innerType:this,catchValue:t,typeName:_.ZodCatch})}describe(e){const t=this.constructor;return new t({...this._def,description:e})}pipe(e){return ke.create(this,e)}readonly(){return ie.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const Ye=/^c[^\s-]{8,}$/i,He=/^[0-9a-z]+$/,Ge=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Qe=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,Xe=/^[a-z0-9_-]{21}$/i,Ke=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,et=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,tt=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,st="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let ce;const rt=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,nt=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,at=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,it=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,ot=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,dt=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Ie="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",ct=new RegExp(`^${Ie}$`);function $e(s){let e="[0-5]\\d";s.precision?e=`${e}\\.\\d{${s.precision}}`:s.precision==null&&(e=`${e}(\\.\\d+)?`);const t=s.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${t}`}function ut(s){return new RegExp(`^${$e(s)}$`)}function lt(s){let e=`${Ie}T${$e(s)}`;const t=[];return t.push(s.local?"Z?":"Z"),s.offset&&t.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${t.join("|")})`,new RegExp(`^${e}$`)}function ht(s,e){return!!((e==="v4"||!e)&&rt.test(s)||(e==="v6"||!e)&&at.test(s))}function ft(s,e){if(!Ke.test(s))return!1;try{const[t]=s.split(".");if(!t)return!1;const r=t.replace(/-/g,"+").replace(/_/g,"/").padEnd(t.length+(4-t.length%4)%4,"="),n=JSON.parse(atob(r));return!(typeof n!="object"||n===null||"typ"in n&&(n==null?void 0:n.typ)!=="JWT"||!n.alg||e&&n.alg!==e)}catch{return!1}}function pt(s,e){return!!((e==="v4"||!e)&&nt.test(s)||(e==="v6"||!e)&&it.test(s))}class R extends g{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==u.string){const a=this._getOrReturnCtx(e);return c(a,{code:d.invalid_type,expected:u.string,received:a.parsedType}),m}const r=new C;let n;for(const a of this._def.checks)if(a.kind==="min")e.data.lengtha.value&&(n=this._getOrReturnCtx(e,n),c(n,{code:d.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),r.dirty());else if(a.kind==="length"){const i=e.data.length>a.value,o=e.data.lengthe.test(n),{validation:t,code:d.invalid_string,...h.errToObj(r)})}_addCheck(e){return new R({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...h.errToObj(e)})}url(e){return this._addCheck({kind:"url",...h.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...h.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...h.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...h.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...h.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...h.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...h.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...h.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...h.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...h.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...h.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...h.errToObj(e)})}datetime(e){return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,offset:(e==null?void 0:e.offset)??!1,local:(e==null?void 0:e.local)??!1,...h.errToObj(e==null?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,...h.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...h.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...h.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t==null?void 0:t.position,...h.errToObj(t==null?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...h.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...h.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...h.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...h.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...h.errToObj(t)})}nonempty(e){return this.min(1,h.errToObj(e))}trim(){return new R({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new R({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new R({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.valuenew R({checks:[],typeName:_.ZodString,coerce:(s==null?void 0:s.coerce)??!1,...y(s)});function mt(s,e){const t=(s.toString().split(".")[1]||"").length,r=(e.toString().split(".")[1]||"").length,n=t>r?t:r,a=Number.parseInt(s.toFixed(n).replace(".","")),i=Number.parseInt(e.toFixed(n).replace(".",""));return a%i/10**n}class B extends g{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==u.number){const a=this._getOrReturnCtx(e);return c(a,{code:d.invalid_type,expected:u.number,received:a.parsedType}),m}let r;const n=new C;for(const a of this._def.checks)a.kind==="int"?v.isInteger(e.data)||(r=this._getOrReturnCtx(e,r),c(r,{code:d.invalid_type,expected:"integer",received:"float",message:a.message}),n.dirty()):a.kind==="min"?(a.inclusive?e.dataa.value:e.data>=a.value)&&(r=this._getOrReturnCtx(e,r),c(r,{code:d.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),n.dirty()):a.kind==="multipleOf"?mt(e.data,a.value)!==0&&(r=this._getOrReturnCtx(e,r),c(r,{code:d.not_multiple_of,multipleOf:a.value,message:a.message}),n.dirty()):a.kind==="finite"?Number.isFinite(e.data)||(r=this._getOrReturnCtx(e,r),c(r,{code:d.not_finite,message:a.message}),n.dirty()):v.assertNever(a);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,h.toString(t))}gt(e,t){return this.setLimit("min",e,!1,h.toString(t))}lte(e,t){return this.setLimit("max",e,!0,h.toString(t))}lt(e,t){return this.setLimit("max",e,!1,h.toString(t))}setLimit(e,t,r,n){return new B({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:h.toString(n)}]})}_addCheck(e){return new B({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:h.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:h.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:h.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:h.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:h.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:h.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:h.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:h.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:h.toString(e)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.valuee.kind==="int"||e.kind==="multipleOf"&&v.isInteger(e.value))}get isFinite(){let e=null,t=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(t===null||r.value>t)&&(t=r.value):r.kind==="max"&&(e===null||r.valuenew B({checks:[],typeName:_.ZodNumber,coerce:(s==null?void 0:s.coerce)||!1,...y(s)});class J extends g{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==u.bigint)return this._getInvalidInput(e);let r;const n=new C;for(const a of this._def.checks)a.kind==="min"?(a.inclusive?e.dataa.value:e.data>=a.value)&&(r=this._getOrReturnCtx(e,r),c(r,{code:d.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),n.dirty()):a.kind==="multipleOf"?e.data%a.value!==BigInt(0)&&(r=this._getOrReturnCtx(e,r),c(r,{code:d.not_multiple_of,multipleOf:a.value,message:a.message}),n.dirty()):v.assertNever(a);return{status:n.value,value:e.data}}_getInvalidInput(e){const t=this._getOrReturnCtx(e);return c(t,{code:d.invalid_type,expected:u.bigint,received:t.parsedType}),m}gte(e,t){return this.setLimit("min",e,!0,h.toString(t))}gt(e,t){return this.setLimit("min",e,!1,h.toString(t))}lte(e,t){return this.setLimit("max",e,!0,h.toString(t))}lt(e,t){return this.setLimit("max",e,!1,h.toString(t))}setLimit(e,t,r,n){return new J({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:h.toString(n)}]})}_addCheck(e){return new J({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:h.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:h.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:h.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:h.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:h.toString(t)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.valuenew J({checks:[],typeName:_.ZodBigInt,coerce:(s==null?void 0:s.coerce)??!1,...y(s)});class le extends g{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==u.boolean){const r=this._getOrReturnCtx(e);return c(r,{code:d.invalid_type,expected:u.boolean,received:r.parsedType}),m}return O(e.data)}}le.create=s=>new le({typeName:_.ZodBoolean,coerce:(s==null?void 0:s.coerce)||!1,...y(s)});class X extends g{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==u.date){const a=this._getOrReturnCtx(e);return c(a,{code:d.invalid_type,expected:u.date,received:a.parsedType}),m}if(Number.isNaN(e.data.getTime())){const a=this._getOrReturnCtx(e);return c(a,{code:d.invalid_date}),m}const r=new C;let n;for(const a of this._def.checks)a.kind==="min"?e.data.getTime()a.value&&(n=this._getOrReturnCtx(e,n),c(n,{code:d.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),r.dirty()):v.assertNever(a);return{status:r.value,value:new Date(e.data.getTime())}}_addCheck(e){return new X({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:h.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:h.toString(t)})}get minDate(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.valuenew X({checks:[],coerce:(s==null?void 0:s.coerce)||!1,typeName:_.ZodDate,...y(s)});class Ne extends g{_parse(e){if(this._getType(e)!==u.symbol){const r=this._getOrReturnCtx(e);return c(r,{code:d.invalid_type,expected:u.symbol,received:r.parsedType}),m}return O(e.data)}}Ne.create=s=>new Ne({typeName:_.ZodSymbol,...y(s)});class he extends g{_parse(e){if(this._getType(e)!==u.undefined){const r=this._getOrReturnCtx(e);return c(r,{code:d.invalid_type,expected:u.undefined,received:r.parsedType}),m}return O(e.data)}}he.create=s=>new he({typeName:_.ZodUndefined,...y(s)});class fe extends g{_parse(e){if(this._getType(e)!==u.null){const r=this._getOrReturnCtx(e);return c(r,{code:d.invalid_type,expected:u.null,received:r.parsedType}),m}return O(e.data)}}fe.create=s=>new fe({typeName:_.ZodNull,...y(s)});class Ae extends g{constructor(){super(...arguments),this._any=!0}_parse(e){return O(e.data)}}Ae.create=s=>new Ae({typeName:_.ZodAny,...y(s)});class pe extends g{constructor(){super(...arguments),this._unknown=!0}_parse(e){return O(e.data)}}pe.create=s=>new pe({typeName:_.ZodUnknown,...y(s)});class P extends g{_parse(e){const t=this._getOrReturnCtx(e);return c(t,{code:d.invalid_type,expected:u.never,received:t.parsedType}),m}}P.create=s=>new P({typeName:_.ZodNever,...y(s)});class Ze extends g{_parse(e){if(this._getType(e)!==u.undefined){const r=this._getOrReturnCtx(e);return c(r,{code:d.invalid_type,expected:u.void,received:r.parsedType}),m}return O(e.data)}}Ze.create=s=>new Ze({typeName:_.ZodVoid,...y(s)});class N extends g{_parse(e){const{ctx:t,status:r}=this._processInputParams(e),n=this._def;if(t.parsedType!==u.array)return c(t,{code:d.invalid_type,expected:u.array,received:t.parsedType}),m;if(n.exactLength!==null){const i=t.data.length>n.exactLength.value,o=t.data.lengthn.maxLength.value&&(c(t,{code:d.too_big,maximum:n.maxLength.value,type:"array",inclusive:!0,exact:!1,message:n.maxLength.message}),r.dirty()),t.common.async)return Promise.all([...t.data].map((i,o)=>n.type._parseAsync(new Z(t,i,t.path,o)))).then(i=>C.mergeArray(r,i));const a=[...t.data].map((i,o)=>n.type._parseSync(new Z(t,i,t.path,o)));return C.mergeArray(r,a)}get element(){return this._def.type}min(e,t){return new N({...this._def,minLength:{value:e,message:h.toString(t)}})}max(e,t){return new N({...this._def,maxLength:{value:e,message:h.toString(t)}})}length(e,t){return new N({...this._def,exactLength:{value:e,message:h.toString(t)}})}nonempty(e){return this.min(1,e)}}N.create=(s,e)=>new N({type:s,minLength:null,maxLength:null,exactLength:null,typeName:_.ZodArray,...y(e)});function D(s){if(s instanceof w){const e={};for(const t in s.shape){const r=s.shape[t];e[t]=j.create(D(r))}return new w({...s._def,shape:()=>e})}else return s instanceof N?new N({...s._def,type:D(s.element)}):s instanceof j?j.create(D(s.unwrap())):s instanceof L?L.create(D(s.unwrap())):s instanceof M?M.create(s.items.map(e=>D(e))):s}class w extends g{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),t=v.objectKeys(e);return this._cached={shape:e,keys:t},this._cached}_parse(e){if(this._getType(e)!==u.object){const p=this._getOrReturnCtx(e);return c(p,{code:d.invalid_type,expected:u.object,received:p.parsedType}),m}const{status:r,ctx:n}=this._processInputParams(e),{shape:a,keys:i}=this._getCached(),o=[];if(!(this._def.catchall instanceof P&&this._def.unknownKeys==="strip"))for(const p in n.data)i.includes(p)||o.push(p);const f=[];for(const p of i){const x=a[p],F=n.data[p];f.push({key:{status:"valid",value:p},value:x._parse(new Z(n,F,n.path,p)),alwaysSet:p in n.data})}if(this._def.catchall instanceof P){const p=this._def.unknownKeys;if(p==="passthrough")for(const x of o)f.push({key:{status:"valid",value:x},value:{status:"valid",value:n.data[x]}});else if(p==="strict")o.length>0&&(c(n,{code:d.unrecognized_keys,keys:o}),r.dirty());else if(p!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const p=this._def.catchall;for(const x of o){const F=n.data[x];f.push({key:{status:"valid",value:x},value:p._parse(new Z(n,F,n.path,x)),alwaysSet:x in n.data})}}return n.common.async?Promise.resolve().then(async()=>{const p=[];for(const x of f){const F=await x.key,Be=await x.value;p.push({key:F,value:Be,alwaysSet:x.alwaysSet})}return p}).then(p=>C.mergeObjectSync(r,p)):C.mergeObjectSync(r,f)}get shape(){return this._def.shape()}strict(e){return h.errToObj,new w({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(t,r)=>{var a,i;const n=((i=(a=this._def).errorMap)==null?void 0:i.call(a,t,r).message)??r.defaultError;return t.code==="unrecognized_keys"?{message:h.errToObj(e).message??n}:{message:n}}}:{}})}strip(){return new w({...this._def,unknownKeys:"strip"})}passthrough(){return new w({...this._def,unknownKeys:"passthrough"})}extend(e){return new w({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new w({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:_.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new w({...this._def,catchall:e})}pick(e){const t={};for(const r of v.objectKeys(e))e[r]&&this.shape[r]&&(t[r]=this.shape[r]);return new w({...this._def,shape:()=>t})}omit(e){const t={};for(const r of v.objectKeys(this.shape))e[r]||(t[r]=this.shape[r]);return new w({...this._def,shape:()=>t})}deepPartial(){return D(this)}partial(e){const t={};for(const r of v.objectKeys(this.shape)){const n=this.shape[r];e&&!e[r]?t[r]=n:t[r]=n.optional()}return new w({...this._def,shape:()=>t})}required(e){const t={};for(const r of v.objectKeys(this.shape))if(e&&!e[r])t[r]=this.shape[r];else{let a=this.shape[r];for(;a instanceof j;)a=a._def.innerType;t[r]=a}return new w({...this._def,shape:()=>t})}keyof(){return Pe(v.objectKeys(this.shape))}}w.create=(s,e)=>new w({shape:()=>s,unknownKeys:"strip",catchall:P.create(),typeName:_.ZodObject,...y(e)});w.strictCreate=(s,e)=>new w({shape:()=>s,unknownKeys:"strict",catchall:P.create(),typeName:_.ZodObject,...y(e)});w.lazycreate=(s,e)=>new w({shape:s,unknownKeys:"strip",catchall:P.create(),typeName:_.ZodObject,...y(e)});class K extends g{_parse(e){const{ctx:t}=this._processInputParams(e),r=this._def.options;function n(a){for(const o of a)if(o.result.status==="valid")return o.result;for(const o of a)if(o.result.status==="dirty")return t.common.issues.push(...o.ctx.common.issues),o.result;const i=a.map(o=>new I(o.ctx.common.issues));return c(t,{code:d.invalid_union,unionErrors:i}),m}if(t.common.async)return Promise.all(r.map(async a=>{const i={...t,common:{...t.common,issues:[]},parent:null};return{result:await a._parseAsync({data:t.data,path:t.path,parent:i}),ctx:i}})).then(n);{let a;const i=[];for(const f of r){const p={...t,common:{...t.common,issues:[]},parent:null},x=f._parseSync({data:t.data,path:t.path,parent:p});if(x.status==="valid")return x;x.status==="dirty"&&!a&&(a={result:x,ctx:p}),p.common.issues.length&&i.push(p.common.issues)}if(a)return t.common.issues.push(...a.ctx.common.issues),a.result;const o=i.map(f=>new I(f));return c(t,{code:d.invalid_union,unionErrors:o}),m}}get options(){return this._def.options}}K.create=(s,e)=>new K({options:s,typeName:_.ZodUnion,...y(e)});const E=s=>s instanceof _e?E(s.schema):s instanceof z?E(s.innerType()):s instanceof se?[s.value]:s instanceof V?s.options:s instanceof ye?v.objectValues(s.enum):s instanceof ne?E(s._def.innerType):s instanceof he?[void 0]:s instanceof fe?[null]:s instanceof j?[void 0,...E(s.unwrap())]:s instanceof L?[null,...E(s.unwrap())]:s instanceof Me||s instanceof ie?E(s.unwrap()):s instanceof ae?E(s._def.innerType):[];class xe extends g{_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==u.object)return c(t,{code:d.invalid_type,expected:u.object,received:t.parsedType}),m;const r=this.discriminator,n=t.data[r],a=this.optionsMap.get(n);return a?t.common.async?a._parseAsync({data:t.data,path:t.path,parent:t}):a._parseSync({data:t.data,path:t.path,parent:t}):(c(t,{code:d.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),m)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,r){const n=new Map;for(const a of t){const i=E(a.shape[e]);if(!i.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const o of i){if(n.has(o))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(o)}`);n.set(o,a)}}return new xe({typeName:_.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:n,...y(r)})}}function me(s,e){const t=$(s),r=$(e);if(s===e)return{valid:!0,data:s};if(t===u.object&&r===u.object){const n=v.objectKeys(e),a=v.objectKeys(s).filter(o=>n.indexOf(o)!==-1),i={...s,...e};for(const o of a){const f=me(s[o],e[o]);if(!f.valid)return{valid:!1};i[o]=f.data}return{valid:!0,data:i}}else if(t===u.array&&r===u.array){if(s.length!==e.length)return{valid:!1};const n=[];for(let a=0;a{if(Se(a)||Se(i))return m;const o=me(a.value,i.value);return o.valid?((Ce(a)||Ce(i))&&t.dirty(),{status:t.value,value:o.data}):(c(r,{code:d.invalid_intersection_types}),m)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([a,i])=>n(a,i)):n(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}ee.create=(s,e,t)=>new ee({left:s,right:e,typeName:_.ZodIntersection,...y(t)});class M extends g{_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==u.array)return c(r,{code:d.invalid_type,expected:u.array,received:r.parsedType}),m;if(r.data.lengththis._def.items.length&&(c(r,{code:d.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const a=[...r.data].map((i,o)=>{const f=this._def.items[o]||this._def.rest;return f?f._parse(new Z(r,i,r.path,o)):null}).filter(i=>!!i);return r.common.async?Promise.all(a).then(i=>C.mergeArray(t,i)):C.mergeArray(t,a)}get items(){return this._def.items}rest(e){return new M({...this._def,rest:e})}}M.create=(s,e)=>{if(!Array.isArray(s))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new M({items:s,typeName:_.ZodTuple,rest:null,...y(e)})};class te extends g{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==u.object)return c(r,{code:d.invalid_type,expected:u.object,received:r.parsedType}),m;const n=[],a=this._def.keyType,i=this._def.valueType;for(const o in r.data)n.push({key:a._parse(new Z(r,o,r.path,o)),value:i._parse(new Z(r,r.data[o],r.path,o)),alwaysSet:o in r.data});return r.common.async?C.mergeObjectAsync(t,n):C.mergeObjectSync(t,n)}get element(){return this._def.valueType}static create(e,t,r){return t instanceof g?new te({keyType:e,valueType:t,typeName:_.ZodRecord,...y(r)}):new te({keyType:R.create(),valueType:e,typeName:_.ZodRecord,...y(t)})}}class Ee extends g{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==u.map)return c(r,{code:d.invalid_type,expected:u.map,received:r.parsedType}),m;const n=this._def.keyType,a=this._def.valueType,i=[...r.data.entries()].map(([o,f],p)=>({key:n._parse(new Z(r,o,r.path,[p,"key"])),value:a._parse(new Z(r,f,r.path,[p,"value"]))}));if(r.common.async){const o=new Map;return Promise.resolve().then(async()=>{for(const f of i){const p=await f.key,x=await f.value;if(p.status==="aborted"||x.status==="aborted")return m;(p.status==="dirty"||x.status==="dirty")&&t.dirty(),o.set(p.value,x.value)}return{status:t.value,value:o}})}else{const o=new Map;for(const f of i){const p=f.key,x=f.value;if(p.status==="aborted"||x.status==="aborted")return m;(p.status==="dirty"||x.status==="dirty")&&t.dirty(),o.set(p.value,x.value)}return{status:t.value,value:o}}}}Ee.create=(s,e,t)=>new Ee({valueType:e,keyType:s,typeName:_.ZodMap,...y(t)});class Y extends g{_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==u.set)return c(r,{code:d.invalid_type,expected:u.set,received:r.parsedType}),m;const n=this._def;n.minSize!==null&&r.data.sizen.maxSize.value&&(c(r,{code:d.too_big,maximum:n.maxSize.value,type:"set",inclusive:!0,exact:!1,message:n.maxSize.message}),t.dirty());const a=this._def.valueType;function i(f){const p=new Set;for(const x of f){if(x.status==="aborted")return m;x.status==="dirty"&&t.dirty(),p.add(x.value)}return{status:t.value,value:p}}const o=[...r.data.values()].map((f,p)=>a._parse(new Z(r,f,r.path,p)));return r.common.async?Promise.all(o).then(f=>i(f)):i(o)}min(e,t){return new Y({...this._def,minSize:{value:e,message:h.toString(t)}})}max(e,t){return new Y({...this._def,maxSize:{value:e,message:h.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}Y.create=(s,e)=>new Y({valueType:s,minSize:null,maxSize:null,typeName:_.ZodSet,...y(e)});class _e extends g{get schema(){return this._def.getter()}_parse(e){const{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}_e.create=(s,e)=>new _e({getter:s,typeName:_.ZodLazy,...y(e)});class se extends g{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return c(t,{received:t.data,code:d.invalid_literal,expected:this._def.value}),m}return{status:"valid",value:e.data}}get value(){return this._def.value}}se.create=(s,e)=>new se({value:s,typeName:_.ZodLiteral,...y(e)});function Pe(s,e){return new V({values:s,typeName:_.ZodEnum,...y(e)})}class V extends g{_parse(e){if(typeof e.data!="string"){const t=this._getOrReturnCtx(e),r=this._def.values;return c(t,{expected:v.joinValues(r),received:t.parsedType,code:d.invalid_type}),m}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){const t=this._getOrReturnCtx(e),r=this._def.values;return c(t,{received:t.data,code:d.invalid_enum_value,options:r}),m}return O(e.data)}get options(){return this._def.values}get enum(){const e={};for(const t of this._def.values)e[t]=t;return e}get Values(){const e={};for(const t of this._def.values)e[t]=t;return e}get Enum(){const e={};for(const t of this._def.values)e[t]=t;return e}extract(e,t=this._def){return V.create(e,{...this._def,...t})}exclude(e,t=this._def){return V.create(this.options.filter(r=>!e.includes(r)),{...this._def,...t})}}V.create=Pe;class ye extends g{_parse(e){const t=v.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(e);if(r.parsedType!==u.string&&r.parsedType!==u.number){const n=v.objectValues(t);return c(r,{expected:v.joinValues(n),received:r.parsedType,code:d.invalid_type}),m}if(this._cache||(this._cache=new Set(v.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){const n=v.objectValues(t);return c(r,{received:r.data,code:d.invalid_enum_value,options:n}),m}return O(e.data)}get enum(){return this._def.values}}ye.create=(s,e)=>new ye({values:s,typeName:_.ZodNativeEnum,...y(e)});class re extends g{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==u.promise&&t.common.async===!1)return c(t,{code:d.invalid_type,expected:u.promise,received:t.parsedType}),m;const r=t.parsedType===u.promise?t.data:Promise.resolve(t.data);return O(r.then(n=>this._def.type.parseAsync(n,{path:t.path,errorMap:t.common.contextualErrorMap})))}}re.create=(s,e)=>new re({type:s,typeName:_.ZodPromise,...y(e)});class z extends g{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===_.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:r}=this._processInputParams(e),n=this._def.effect||null,a={addIssue:i=>{c(r,i),i.fatal?t.abort():t.dirty()},get path(){return r.path}};if(a.addIssue=a.addIssue.bind(a),n.type==="preprocess"){const i=n.transform(r.data,a);if(r.common.async)return Promise.resolve(i).then(async o=>{if(t.value==="aborted")return m;const f=await this._def.schema._parseAsync({data:o,path:r.path,parent:r});return f.status==="aborted"?m:f.status==="dirty"||t.value==="dirty"?W(f.value):f});{if(t.value==="aborted")return m;const o=this._def.schema._parseSync({data:i,path:r.path,parent:r});return o.status==="aborted"?m:o.status==="dirty"||t.value==="dirty"?W(o.value):o}}if(n.type==="refinement"){const i=o=>{const f=n.refinement(o,a);if(r.common.async)return Promise.resolve(f);if(f instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return o};if(r.common.async===!1){const o=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?m:(o.status==="dirty"&&t.dirty(),i(o.value),{status:t.value,value:o.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(o=>o.status==="aborted"?m:(o.status==="dirty"&&t.dirty(),i(o.value).then(()=>({status:t.value,value:o.value}))))}if(n.type==="transform")if(r.common.async===!1){const i=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!U(i))return m;const o=n.transform(i.value,a);if(o instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:o}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(i=>U(i)?Promise.resolve(n.transform(i.value,a)).then(o=>({status:t.value,value:o})):m);v.assertNever(n)}}z.create=(s,e,t)=>new z({schema:s,typeName:_.ZodEffects,effect:e,...y(t)});z.createWithPreprocess=(s,e,t)=>new z({schema:e,effect:{type:"preprocess",transform:s},typeName:_.ZodEffects,...y(t)});class j extends g{_parse(e){return this._getType(e)===u.undefined?O(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}j.create=(s,e)=>new j({innerType:s,typeName:_.ZodOptional,...y(e)});class L extends g{_parse(e){return this._getType(e)===u.null?O(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}L.create=(s,e)=>new L({innerType:s,typeName:_.ZodNullable,...y(e)});class ne extends g{_parse(e){const{ctx:t}=this._processInputParams(e);let r=t.data;return t.parsedType===u.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}ne.create=(s,e)=>new ne({innerType:s,typeName:_.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...y(e)});class ae extends g{_parse(e){const{ctx:t}=this._processInputParams(e),r={...t,common:{...t.common,issues:[]}},n=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return Q(n)?n.then(a=>({status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new I(r.common.issues)},input:r.data})})):{status:"valid",value:n.status==="valid"?n.value:this._def.catchValue({get error(){return new I(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}ae.create=(s,e)=>new ae({innerType:s,typeName:_.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...y(e)});class Re extends g{_parse(e){if(this._getType(e)!==u.nan){const r=this._getOrReturnCtx(e);return c(r,{code:d.invalid_type,expected:u.nan,received:r.parsedType}),m}return{status:"valid",value:e.data}}}Re.create=s=>new Re({typeName:_.ZodNaN,...y(s)});class Me extends g{_parse(e){const{ctx:t}=this._processInputParams(e),r=t.data;return this._def.type._parse({data:r,path:t.path,parent:t})}unwrap(){return this._def.type}}class ke extends g{_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.common.async)return(async()=>{const a=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?m:a.status==="dirty"?(t.dirty(),W(a.value)):this._def.out._parseAsync({data:a.value,path:r.path,parent:r})})();{const n=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return n.status==="aborted"?m:n.status==="dirty"?(t.dirty(),{status:"dirty",value:n.value}):this._def.out._parseSync({data:n.value,path:r.path,parent:r})}}static create(e,t){return new ke({in:e,out:t,typeName:_.ZodPipeline})}}class ie extends g{_parse(e){const t=this._def.innerType._parse(e),r=n=>(U(n)&&(n.value=Object.freeze(n.value)),n);return Q(t)?t.then(n=>r(n)):r(t)}unwrap(){return this._def.innerType}}ie.create=(s,e)=>new ie({innerType:s,typeName:_.ZodReadonly,...y(e)});var _;(function(s){s.ZodString="ZodString",s.ZodNumber="ZodNumber",s.ZodNaN="ZodNaN",s.ZodBigInt="ZodBigInt",s.ZodBoolean="ZodBoolean",s.ZodDate="ZodDate",s.ZodSymbol="ZodSymbol",s.ZodUndefined="ZodUndefined",s.ZodNull="ZodNull",s.ZodAny="ZodAny",s.ZodUnknown="ZodUnknown",s.ZodNever="ZodNever",s.ZodVoid="ZodVoid",s.ZodArray="ZodArray",s.ZodObject="ZodObject",s.ZodUnion="ZodUnion",s.ZodDiscriminatedUnion="ZodDiscriminatedUnion",s.ZodIntersection="ZodIntersection",s.ZodTuple="ZodTuple",s.ZodRecord="ZodRecord",s.ZodMap="ZodMap",s.ZodSet="ZodSet",s.ZodFunction="ZodFunction",s.ZodLazy="ZodLazy",s.ZodLiteral="ZodLiteral",s.ZodEnum="ZodEnum",s.ZodEffects="ZodEffects",s.ZodNativeEnum="ZodNativeEnum",s.ZodOptional="ZodOptional",s.ZodNullable="ZodNullable",s.ZodDefault="ZodDefault",s.ZodCatch="ZodCatch",s.ZodPromise="ZodPromise",s.ZodBranded="ZodBranded",s.ZodPipeline="ZodPipeline",s.ZodReadonly="ZodReadonly"})(_||(_={}));const l=R.create,b=B.create,oe=le.create,_t=pe.create;P.create;const T=N.create,k=w.create,Ve=K.create,ze=xe.create;ee.create;M.create;const Le=te.create,G=se.create,ge=V.create;re.create;j.create;L.create;const A=Le(_t()),be=k({id:b(),name:l(),slug:l().optional()}).passthrough(),de=k({url:l(),is_official:oe()}),ve=k({task_id:b(),dataset_id:b(),model_name:l().nullish(),harness:l().nullish(),methodology:l().nullish(),metrics:Le(Ve([l(),b()])),uses_additional_data:oe().optional(),is_open:oe().optional(),best_rank:b().nullish(),best_metric:l().nullish(),evaluated_on:l().nullish(),external_source_url:l().nullish(),num_parameters:b().nullish(),hf_model_url:l().nullish()}).passthrough(),yt=ve.partial().extend({id:b().optional()}),gt=ze("op",[k({op:G("create"),data:ve}),k({op:G("update"),evaluation_id:b(),data:ve}),k({op:G("delete"),evaluation_id:b()})]),je=k({hf_models:T(l()),hf_datasets:T(l()),hf_spaces:T(l())}),we=k({file_name:l(),mime_type:l(),data_url:l().optional(),url:l().optional()}),q=k({name:l(),description:l().optional()}),vt=q.extend({image:we.optional(),image_credit:l().optional(),parent_id:b().optional(),area_id:b().optional(),keywords:l().optional()}),xt=q.extend({image:we.optional(),image_credit:l().optional(),source_paper_id:b().optional(),source_url:l().optional(),source_title:l().optional()}),kt=Ve([k({benchmark:l(),task:l(),description:l()}),q.extend({description:l(),task_ids:T(b()),full_name:l().optional(),url:l().optional(),hf_url:l().optional(),paper_url:l().optional(),license_name:l().optional(),license_url:l().optional()})]),bt=q.extend({description:l(),direction:ge(["higher_is_better","lower_is_better"]),full_name:l().optional(),scale:l().optional(),task_id:b(),dataset_id:b()}),wt=q.extend({short_name:l().optional(),venue:l().optional(),location:l().optional(),url:l(),year:b(),start_date:l().optional(),end_date:l().optional()}),Tt=q.extend({hf_slug:l().optional(),website_url:l().optional(),image:we.optional()}),St=k({id:b(),paper_id:b().nullable(),hf_username:l(),is_author:oe(),status:ge(["pending","approved","rejected"]),applied_payload:A.nullish(),conflict_payload:A.nullish(),result_entity_type:l().nullish(),result_entity_id:l().nullish(),admin_note:l().nullish(),user_review_reason:l().nullish(),reviewed_by:l().nullish(),reviewed_by_kind:ge(["human","codex"]).nullish(),review_evidence:A.nullish(),created_at:l(),updated_at:l(),reviewed_at:l().nullish()});function S(s,e,t){return St.extend({edit_type:G(s),proposed_payload:e,current_payload:t.nullish()})}const Ct=S("tasks",k({task_ids:T(b())}),k({tasks:T(be)})),Ot=S("methods",k({method_ids:T(b())}),k({methods:T(be)})),Nt=S("evaluations",k({operations:T(gt)}),k({evaluations:T(yt)})),At=S("repositories",k({repositories:T(de)}),k({repositories:T(de)})),Zt=S("project_pages",k({project_pages:T(de)}),k({project_pages:T(de)})),Et=S("source_url",k({source_url:l()}),k({source_url:l().nullish()})),Rt=S("hf_artifacts",je,je),jt=S("x_threads",k({x_threads:T(l())}),k({x_threads:T(k({url:l()}))})),It=S("organizations",k({organization_ids:T(b())}),k({organizations:T(be)})),$t=S("new_task",vt,A),Pt=S("new_method",xt,A),Mt=S("new_benchmark",kt,A),Vt=S("new_metric",bt,A),zt=S("new_conference",wt,A),Lt=S("new_organization",Tt,A),Dt=S("new_external_paper",k({title:l().optional(),source_url:l(),authors:T(l()),date_published:l().optional(),abstract:l().optional()}),A),De=ze("edit_type",[Ct,Ot,Nt,At,Zt,Et,Rt,jt,It,$t,Pt,Mt,Vt,zt,Lt,Dt]);function Jt(s,e,t){return{paper_id:s,edit_type:e,proposed_payload:t}}const Ut=k({count:b(),results:T(De)});class Bt extends Error{constructor(e){super(`Malformed pending-edit payload: ${e}`),this.name="PendingEditPayloadError"}}function Ue(s,e){const t=s.safeParse(e);if(t.success)return t.data;const r=t.error.issues[0];throw new Bt(`${(r==null?void 0:r.path.join("."))||"response"}: ${(r==null?void 0:r.message)||"invalid value"}`)}const H=s=>Ue(De,s),qt=s=>Ue(Ut,s);class Ft{constructor(e){this.request=e}async submit(e){return H(await this.request("/me/paper-edits",{method:"POST",body:JSON.stringify(e)}))}list(e){const t=new URLSearchParams;for(const[n,a]of Object.entries(e??{}))a!==void 0&&t.set(n,String(a));const r=t.toString();return this.request(`/admin/paper-edits${r?`?${r}`:""}`).then(qt)}async get(e){return H(await this.request(`/admin/paper-edits/${e}`))}async approve(e,t={}){return H(await this.request(`/admin/paper-edits/${e}/approve`,{method:"POST",body:JSON.stringify(t)}))}async reject(e,t={}){return H(await this.request(`/admin/paper-edits/${e}/reject`,{method:"POST",body:JSON.stringify(t)}))}}const Yt=new Ft(qe);export{Jt as p,Yt as s}; diff --git a/assets/switch-DlTd3dHA.js b/assets/switch-Dard85vE.js similarity index 94% rename from assets/switch-DlTd3dHA.js rename to assets/switch-Dard85vE.js index 0120e896743305ecec2069d53927481d4293ad2e..7c12e9379e08ec3f909eb244eb9d6207a5ec3db2 100644 --- a/assets/switch-DlTd3dHA.js +++ b/assets/switch-Dard85vE.js @@ -1 +1 @@ -import{r as s,s as C,q as I,j as a,p as y,t as M,v as H,w as q,x as g}from"./index-CkeK0cDg.js";import{u as A}from"./index-DVmlmU_7.js";var b="Switch",[U]=q(b),[z,L]=U(b),P=s.forwardRef((t,o)=>{const{__scopeSwitch:e,name:n,checked:r,defaultChecked:m,required:d,disabled:c,value:u="on",onCheckedChange:v,form:i,...w}=t,[l,p]=s.useState(null),S=C(o,h=>p(h)),k=s.useRef(!1),x=l?i||!!l.closest("form"):!0,[f,B]=I({prop:r,defaultProp:m??!1,onChange:v,caller:b});return a.jsxs(z,{scope:e,checked:f,disabled:c,children:[a.jsx(y.button,{type:"button",role:"switch","aria-checked":f,"aria-required":d,"data-state":j(f),"data-disabled":c?"":void 0,disabled:c,value:u,...w,ref:S,onClick:M(t.onClick,h=>{B(T=>!T),x&&(k.current=h.isPropagationStopped(),k.current||h.stopPropagation())})}),x&&a.jsx(N,{control:l,bubbles:!k.current,name:n,value:u,checked:f,required:d,disabled:c,form:i,style:{transform:"translateX(-100%)"}})]})});P.displayName=b;var E="SwitchThumb",R=s.forwardRef((t,o)=>{const{__scopeSwitch:e,...n}=t,r=L(E,e);return a.jsx(y.span,{"data-state":j(r.checked),"data-disabled":r.disabled?"":void 0,...n,ref:o})});R.displayName=E;var O="SwitchBubbleInput",N=s.forwardRef(({__scopeSwitch:t,control:o,checked:e,bubbles:n=!0,...r},m)=>{const d=s.useRef(null),c=C(d,m),u=A(e),v=H(o);return s.useEffect(()=>{const i=d.current;if(!i)return;const w=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(w,"checked").set;if(u!==e&&p){const S=new Event("click",{bubbles:n});p.call(i,e),i.dispatchEvent(S)}},[u,e,n]),a.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:e,...r,tabIndex:-1,ref:c,style:{...r.style,...v,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});N.displayName=O;function j(t){return t?"checked":"unchecked"}var _=P,D=R;const F=s.forwardRef(({className:t,...o},e)=>a.jsx(_,{className:g("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50",t),...o,ref:e,children:a.jsx(D,{className:g("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})}));F.displayName=_.displayName;export{F as S}; +import{r as s,s as C,q as I,j as a,p as y,t as M,v as H,w as q,x as g}from"./index-B7UoLEbn.js";import{u as A}from"./index-C0YS4OFr.js";var b="Switch",[U]=q(b),[z,L]=U(b),P=s.forwardRef((t,o)=>{const{__scopeSwitch:e,name:n,checked:r,defaultChecked:m,required:d,disabled:c,value:u="on",onCheckedChange:v,form:i,...w}=t,[l,p]=s.useState(null),S=C(o,h=>p(h)),k=s.useRef(!1),x=l?i||!!l.closest("form"):!0,[f,B]=I({prop:r,defaultProp:m??!1,onChange:v,caller:b});return a.jsxs(z,{scope:e,checked:f,disabled:c,children:[a.jsx(y.button,{type:"button",role:"switch","aria-checked":f,"aria-required":d,"data-state":j(f),"data-disabled":c?"":void 0,disabled:c,value:u,...w,ref:S,onClick:M(t.onClick,h=>{B(T=>!T),x&&(k.current=h.isPropagationStopped(),k.current||h.stopPropagation())})}),x&&a.jsx(N,{control:l,bubbles:!k.current,name:n,value:u,checked:f,required:d,disabled:c,form:i,style:{transform:"translateX(-100%)"}})]})});P.displayName=b;var E="SwitchThumb",R=s.forwardRef((t,o)=>{const{__scopeSwitch:e,...n}=t,r=L(E,e);return a.jsx(y.span,{"data-state":j(r.checked),"data-disabled":r.disabled?"":void 0,...n,ref:o})});R.displayName=E;var O="SwitchBubbleInput",N=s.forwardRef(({__scopeSwitch:t,control:o,checked:e,bubbles:n=!0,...r},m)=>{const d=s.useRef(null),c=C(d,m),u=A(e),v=H(o);return s.useEffect(()=>{const i=d.current;if(!i)return;const w=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(w,"checked").set;if(u!==e&&p){const S=new Event("click",{bubbles:n});p.call(i,e),i.dispatchEvent(S)}},[u,e,n]),a.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:e,...r,tabIndex:-1,ref:c,style:{...r.style,...v,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});N.displayName=O;function j(t){return t?"checked":"unchecked"}var _=P,D=R;const F=s.forwardRef(({className:t,...o},e)=>a.jsx(_,{className:g("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50",t),...o,ref:e,children:a.jsx(D,{className:g("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})}));F.displayName=_.displayName;export{F as S}; diff --git a/assets/textarea-BsaJyP0o.js b/assets/textarea-CpxVQZTZ.js similarity index 86% rename from assets/textarea-BsaJyP0o.js rename to assets/textarea-CpxVQZTZ.js index 45951968f43604a05caf11d2e225168c287c794e..825de7d8ca046058475d9a89ac220c65c6ec7965 100644 --- a/assets/textarea-BsaJyP0o.js +++ b/assets/textarea-CpxVQZTZ.js @@ -1 +1 @@ -import{r as s,j as a,x as t}from"./index-CkeK0cDg.js";const i=s.forwardRef(({className:e,...r},o)=>a.jsx("textarea",{className:t("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:o,...r}));i.displayName="Textarea";export{i as T}; +import{r as s,j as a,x as t}from"./index-B7UoLEbn.js";const i=s.forwardRef(({className:e,...r},o)=>a.jsx("textarea",{className:t("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:o,...r}));i.displayName="Textarea";export{i as T}; diff --git a/assets/trending-up-BKEZ18MU.js b/assets/trending-up-DOtHjkBv.js similarity index 88% rename from assets/trending-up-BKEZ18MU.js rename to assets/trending-up-DOtHjkBv.js index d89d23791d7c87b896f4ec551fdb7ccb356757af..261530c3f234f80304716b332076b8fc1b46bc38 100644 --- a/assets/trending-up-BKEZ18MU.js +++ b/assets/trending-up-DOtHjkBv.js @@ -1,4 +1,4 @@ -import{g as e}from"./index-CkeK0cDg.js";/** +import{g as e}from"./index-B7UoLEbn.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/trophy-B-BD7RmH.js b/assets/trophy-Dv8UTCAs.js similarity index 95% rename from assets/trophy-B-BD7RmH.js rename to assets/trophy-Dv8UTCAs.js index 679258e26cdf331e6c679a1894c4a995d4ac6232..a74deb21d423543ae79d20763377e4fef236b85a 100644 --- a/assets/trophy-B-BD7RmH.js +++ b/assets/trophy-Dv8UTCAs.js @@ -1,4 +1,4 @@ -import{g as a}from"./index-CkeK0cDg.js";/** +import{g as a}from"./index-B7UoLEbn.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/useDebounce-BX_reoqD.js b/assets/useDebounce-C4Z21BjM.js similarity index 66% rename from assets/useDebounce-BX_reoqD.js rename to assets/useDebounce-C4Z21BjM.js index 80367edacc3a00bfb870cea1fa85fc54f3d25a7b..93473736bf4a3b9d024dca84cea83fc50a640bdb 100644 --- a/assets/useDebounce-BX_reoqD.js +++ b/assets/useDebounce-C4Z21BjM.js @@ -1 +1 @@ -import{r as o}from"./index-CkeK0cDg.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-B7UoLEbn.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-gdIFpXB_.js b/assets/useInfiniteQuery-CoFrg4GN.js similarity index 89% rename from assets/useInfiniteQuery-gdIFpXB_.js rename to assets/useInfiniteQuery-CoFrg4GN.js index d29203126a1a3352a0ce04027cae8803e2595c7a..72388278e9f5d3604933ef9530f4223af7ed2550 100644 --- a/assets/useInfiniteQuery-gdIFpXB_.js +++ b/assets/useInfiniteQuery-CoFrg4GN.js @@ -1 +1 @@ -import{Q as v,a as p}from"./useQuery-_Fj6Jfzr.js";import{aN as x,aO as N}from"./index-CkeK0cDg.js";var b=class extends v{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){e._type="infinite",super.setOptions(e)}getOptimisticResult(e){return e._type="infinite",super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,t){var f,P;const{state:s}=e,i=super.createResult(e,t),{isFetching:a,isRefetching:g,isError:c,isRefetchError:d}=i,r=(P=(f=s.fetchMeta)==null?void 0:f.fetchMore)==null?void 0:P.direction,h=c&&r==="forward",n=a&&r==="forward",o=c&&r==="backward",u=a&&r==="backward";return{...i,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:N(t,s.data),hasPreviousPage:x(t,s.data),isFetchNextPageError:h,isFetchingNextPage:n,isFetchPreviousPageError:o,isFetchingPreviousPage:u,isRefetchError:d&&!h&&!o,isRefetching:g&&!n&&!u}}};function O(e,t){return p(e,b)}export{O as u}; +import{Q as v,a as p}from"./useQuery-DV2f4JpC.js";import{aN as x,aO as N}from"./index-B7UoLEbn.js";var b=class extends v{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){e._type="infinite",super.setOptions(e)}getOptimisticResult(e){return e._type="infinite",super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,t){var f,P;const{state:s}=e,i=super.createResult(e,t),{isFetching:a,isRefetching:g,isError:c,isRefetchError:d}=i,r=(P=(f=s.fetchMeta)==null?void 0:f.fetchMore)==null?void 0:P.direction,h=c&&r==="forward",n=a&&r==="forward",o=c&&r==="backward",u=a&&r==="backward";return{...i,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:N(t,s.data),hasPreviousPage:x(t,s.data),isFetchNextPageError:h,isFetchingNextPage:n,isFetchPreviousPageError:o,isFetchingPreviousPage:u,isRefetchError:d&&!h&&!o,isRefetching:g&&!n&&!u}}};function O(e,t){return p(e,b)}export{O as u}; diff --git a/assets/useIntersectionObserver-Bw5JPCeX.js b/assets/useIntersectionObserver-DOCspj7m.js similarity index 86% rename from assets/useIntersectionObserver-Bw5JPCeX.js rename to assets/useIntersectionObserver-DOCspj7m.js index a0696b35872910b9abac7259e4c06a1fb54f57ac..4bcd683c0a1de4d54ca270c350476b5fdafa189b 100644 --- a/assets/useIntersectionObserver-Bw5JPCeX.js +++ b/assets/useIntersectionObserver-DOCspj7m.js @@ -1 +1 @@ -import{r}from"./index-CkeK0cDg.js";function b(u={}){const{threshold:t=0,rootMargin:n="0px"}=u,[i,s]=r.useState(!1),e=r.useRef(null),f=r.useCallback(c=>{if(e.current&&(e.current.disconnect(),e.current=null),!c){s(!1);return}const o=new IntersectionObserver(([l])=>s(l.isIntersecting),{threshold:t,rootMargin:n});o.observe(c),e.current=o},[t,n]);return r.useEffect(()=>()=>{e.current&&(e.current.disconnect(),e.current=null)},[]),{targetRef:f,isIntersecting:i}}export{b as u}; +import{r}from"./index-B7UoLEbn.js";function b(u={}){const{threshold:t=0,rootMargin:n="0px"}=u,[i,s]=r.useState(!1),e=r.useRef(null),f=r.useCallback(c=>{if(e.current&&(e.current.disconnect(),e.current=null),!c){s(!1);return}const o=new IntersectionObserver(([l])=>s(l.isIntersecting),{threshold:t,rootMargin:n});o.observe(c),e.current=o},[t,n]);return r.useEffect(()=>()=>{e.current&&(e.current.disconnect(),e.current=null)},[]),{targetRef:f,isIntersecting:i}}export{b as u}; diff --git a/assets/useMutation-q-fdM2fm.js b/assets/useMutation-CuaM6sOT.js similarity index 97% rename from assets/useMutation-q-fdM2fm.js rename to assets/useMutation-CuaM6sOT.js index 91c259701a4e5614df3c48526bfc6c01dd5944cd..25342358c3b62bcd942c5e48bbc88ba987bd6c7c 100644 --- a/assets/useMutation-q-fdM2fm.js +++ b/assets/useMutation-CuaM6sOT.js @@ -1 +1 @@ -var w=i=>{throw TypeError(i)};var E=(i,t,s)=>t.has(i)||w("Cannot "+s);var e=(i,t,s)=>(E(i,t,"read from private field"),s?s.call(i):t.get(i)),b=(i,t,s)=>t.has(i)?w("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(i):t.set(i,s),p=(i,t,s,r)=>(E(i,t,"write to private field"),r?r.call(i,s):t.set(i,s),s),y=(i,t,s)=>(E(i,t,"access private method"),s);import{aw as L,az as U,aL as R,aM as k,aJ as P,m as q,r as v,aB as z,aK as A}from"./index-CkeK0cDg.js";var a,c,o,h,n,C,S,j,B=(j=class extends L{constructor(t,s){super();b(this,n);b(this,a);b(this,c);b(this,o);b(this,h);p(this,a,t),this.setOptions(s),this.bindMethods(),y(this,n,C).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){var r;const s=this.options;this.options=e(this,a).defaultMutationOptions(t),U(this.options,s)||e(this,a).getMutationCache().notify({type:"observerOptionsUpdated",mutation:e(this,o),observer:this}),s!=null&&s.mutationKey&&this.options.mutationKey&&R(s.mutationKey)!==R(this.options.mutationKey)?this.reset():((r=e(this,o))==null?void 0:r.state.status)==="pending"&&e(this,o).setOptions(this.options)}onUnsubscribe(){var t;this.hasListeners()||(t=e(this,o))==null||t.removeObserver(this)}onMutationUpdate(t){y(this,n,C).call(this),y(this,n,S).call(this,t)}getCurrentResult(){return e(this,c)}reset(){var t;(t=e(this,o))==null||t.removeObserver(this),p(this,o,void 0),y(this,n,C).call(this),y(this,n,S).call(this)}mutate(t,s){var r;return p(this,h,s),(r=e(this,o))==null||r.removeObserver(this),p(this,o,e(this,a).getMutationCache().build(e(this,a),this.options)),e(this,o).addObserver(this),e(this,o).execute(t)}},a=new WeakMap,c=new WeakMap,o=new WeakMap,h=new WeakMap,n=new WeakSet,C=function(){var s;const t=((s=e(this,o))==null?void 0:s.state)??k();p(this,c,{...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset})},S=function(t){P.batch(()=>{var s,r,u,f,d,O,K,x;if(e(this,h)&&this.hasListeners()){const m=e(this,c).variables,M=e(this,c).context,g={client:e(this,a),meta:this.options.meta,mutationKey:this.options.mutationKey};if((t==null?void 0:t.type)==="success"){try{(r=(s=e(this,h)).onSuccess)==null||r.call(s,t.data,m,M,g)}catch(l){Promise.reject(l)}try{(f=(u=e(this,h)).onSettled)==null||f.call(u,t.data,null,m,M,g)}catch(l){Promise.reject(l)}}else if((t==null?void 0:t.type)==="error"){try{(O=(d=e(this,h)).onError)==null||O.call(d,t.error,m,M,g)}catch(l){Promise.reject(l)}try{(x=(K=e(this,h)).onSettled)==null||x.call(K,void 0,t.error,m,M,g)}catch(l){Promise.reject(l)}}}this.listeners.forEach(m=>{m(e(this,c))})})},j);function J(i,t){const s=q(),[r]=v.useState(()=>new B(s,i));v.useEffect(()=>{r.setOptions(i)},[r,i]);const u=v.useSyncExternalStore(v.useCallback(d=>r.subscribe(P.batchCalls(d)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),f=v.useCallback((d,O)=>{r.mutate(d,O).catch(z)},[r]);if(u.error&&A(r.options.throwOnError,[u.error]))throw u.error;return{...u,mutate:f,mutateAsync:u.mutate}}export{J as u}; +var w=i=>{throw TypeError(i)};var E=(i,t,s)=>t.has(i)||w("Cannot "+s);var e=(i,t,s)=>(E(i,t,"read from private field"),s?s.call(i):t.get(i)),b=(i,t,s)=>t.has(i)?w("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(i):t.set(i,s),p=(i,t,s,r)=>(E(i,t,"write to private field"),r?r.call(i,s):t.set(i,s),s),y=(i,t,s)=>(E(i,t,"access private method"),s);import{aw as L,az as U,aL as R,aM as k,aJ as P,m as q,r as v,aB as z,aK as A}from"./index-B7UoLEbn.js";var a,c,o,h,n,C,S,j,B=(j=class extends L{constructor(t,s){super();b(this,n);b(this,a);b(this,c);b(this,o);b(this,h);p(this,a,t),this.setOptions(s),this.bindMethods(),y(this,n,C).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){var r;const s=this.options;this.options=e(this,a).defaultMutationOptions(t),U(this.options,s)||e(this,a).getMutationCache().notify({type:"observerOptionsUpdated",mutation:e(this,o),observer:this}),s!=null&&s.mutationKey&&this.options.mutationKey&&R(s.mutationKey)!==R(this.options.mutationKey)?this.reset():((r=e(this,o))==null?void 0:r.state.status)==="pending"&&e(this,o).setOptions(this.options)}onUnsubscribe(){var t;this.hasListeners()||(t=e(this,o))==null||t.removeObserver(this)}onMutationUpdate(t){y(this,n,C).call(this),y(this,n,S).call(this,t)}getCurrentResult(){return e(this,c)}reset(){var t;(t=e(this,o))==null||t.removeObserver(this),p(this,o,void 0),y(this,n,C).call(this),y(this,n,S).call(this)}mutate(t,s){var r;return p(this,h,s),(r=e(this,o))==null||r.removeObserver(this),p(this,o,e(this,a).getMutationCache().build(e(this,a),this.options)),e(this,o).addObserver(this),e(this,o).execute(t)}},a=new WeakMap,c=new WeakMap,o=new WeakMap,h=new WeakMap,n=new WeakSet,C=function(){var s;const t=((s=e(this,o))==null?void 0:s.state)??k();p(this,c,{...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset})},S=function(t){P.batch(()=>{var s,r,u,f,d,O,K,x;if(e(this,h)&&this.hasListeners()){const m=e(this,c).variables,M=e(this,c).context,g={client:e(this,a),meta:this.options.meta,mutationKey:this.options.mutationKey};if((t==null?void 0:t.type)==="success"){try{(r=(s=e(this,h)).onSuccess)==null||r.call(s,t.data,m,M,g)}catch(l){Promise.reject(l)}try{(f=(u=e(this,h)).onSettled)==null||f.call(u,t.data,null,m,M,g)}catch(l){Promise.reject(l)}}else if((t==null?void 0:t.type)==="error"){try{(O=(d=e(this,h)).onError)==null||O.call(d,t.error,m,M,g)}catch(l){Promise.reject(l)}try{(x=(K=e(this,h)).onSettled)==null||x.call(K,void 0,t.error,m,M,g)}catch(l){Promise.reject(l)}}}this.listeners.forEach(m=>{m(e(this,c))})})},j);function J(i,t){const s=q(),[r]=v.useState(()=>new B(s,i));v.useEffect(()=>{r.setOptions(i)},[r,i]);const u=v.useSyncExternalStore(v.useCallback(d=>r.subscribe(P.batchCalls(d)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),f=v.useCallback((d,O)=>{r.mutate(d,O).catch(z)},[r]);if(u.error&&A(r.options.throwOnError,[u.error]))throw u.error;return{...u,mutate:f,mutateAsync:u.mutate}}export{J as u}; diff --git a/assets/usePapers-fMOiVOFB.js b/assets/usePapers-CDuTKuAc.js similarity index 95% rename from assets/usePapers-fMOiVOFB.js rename to assets/usePapers-CDuTKuAc.js index da2565915dfd080456482deb5382847ab9e46fb0..a39ba8b99d7cb2f4138923546990210af3f34b2e 100644 --- a/assets/usePapers-fMOiVOFB.js +++ b/assets/usePapers-CDuTKuAc.js @@ -1 +1 @@ -import{p as g}from"./paperQueryKeys-BP2E-0yf.js";import{af as y}from"./index-CkeK0cDg.js";import{u as x}from"./useQuery-_Fj6Jfzr.js";import{u as m}from"./useInfiniteQuery-gdIFpXB_.js";import{p as h}from"./papers-Celoj8_s.js";function I(a,e=!0){return x({queryKey:g.detail(a),queryFn:()=>h.get(a),enabled:e&&!!a,staleTime:10*60*1e3,refetchOnWindowFocus:!1})}function K(a={}){const{page_size:e=20,search:t,order_by:s="date_published",order_dir:n="desc",start_date:i,end_date:o,conference:r,task:u,method:l,latest_only:d=!0,include_resources:c=!1,has_code:f=!1,has_hf_artifacts:p=!1,framework:_,repository:b,author:F,enabled:k=!0}=a;return m({queryKey:[...g.feeds.infinite,{page_size:e,search:t,order_by:s,order_dir:n,start_date:i,end_date:o,conference:r,task:u,method:l,latest_only:d,include_resources:c,has_code:f,has_hf_artifacts:p,framework:_,repository:b,author:F}],queryFn:({pageParam:P=1})=>h.list({page:P,page_size:e,search:t,order_by:s,order_dir:n,start_date:i,end_date:o,conference:r,task:u,method:l,latest_only:d,include_resources:c,has_code:f,has_hf_artifacts:p,framework:_,repository:b,author:F}),getNextPageParam:P=>P.next_page,initialPageParam:1,enabled:k,staleTime:5*60*1e3,placeholderData:y,refetchOnWindowFocus:!1})}function D({q:a,order_by:e="relevance",start_date:t,end_date:s,has_code:n=!1,has_hf_artifacts:i=!1,enabled:o=!0}){return m({queryKey:[...g.feeds.search,{q:a,order_by:e,start_date:t,end_date:s,has_code:n,has_hf_artifacts:i}],queryFn:({pageParam:r=1})=>h.searchFeed({q:a,page:r,page_size:20,order_by:e,start_date:t,end_date:s,has_code:n,has_hf_artifacts:i,mode:"hybrid"}),getNextPageParam:r=>r.next_page,initialPageParam:1,enabled:o&&a.trim().length>0,staleTime:5*60*1e3,placeholderData:y,refetchOnWindowFocus:!1})}function W(a){const{taskId:e,page_size:t=20,order_by:s="date_published",order_dir:n="desc",latest_only:i=!0,include_resources:o=!0,has_code:r=!1,has_hf_artifacts:u=!1,start_date:l,end_date:d,enabled:c=!0}=a;return m({queryKey:[...g.feeds.task,e,{page_size:t,order_by:s,order_dir:n,latest_only:i,include_resources:o,has_code:r,has_hf_artifacts:u,start_date:l,end_date:d}],queryFn:({pageParam:f=1})=>h.forTask(e,{page:f,page_size:t,order_by:s,order_dir:n,latest_only:i,include_resources:o,repository_limit:1,has_code:r,has_hf_artifacts:u,start_date:l,end_date:d}),getNextPageParam:f=>f.next_page,initialPageParam:1,enabled:c&&!!e,staleTime:5*60*1e3,placeholderData:y,refetchOnWindowFocus:!1})}function N(a){const{conferenceSlug:e,taskSlug:t,presentation:s,page_size:n=20,order_by:i="date_published",order_dir:o="desc",latest_only:r=!0,include_resources:u=!0,has_code:l=!1,has_hf_artifacts:d=!1,start_date:c,end_date:f,enabled:p=!0}=a;return m({queryKey:[...g.feeds.conference,e,t,s,{page_size:n,order_by:i,order_dir:o,latest_only:r,include_resources:u,has_code:l,has_hf_artifacts:d,start_date:c,end_date:f}],queryFn:({pageParam:_=1})=>h.forConference(e,{task:t,presentation:s,page:_,page_size:n,order_by:i,order_dir:o,latest_only:r,include_resources:u,has_code:l,has_hf_artifacts:d,start_date:c,end_date:f}),getNextPageParam:_=>_.next_page,initialPageParam:1,enabled:p&&!!e,staleTime:5*60*1e3,placeholderData:y,refetchOnWindowFocus:!1})}function S(a){const{organizationSlug:e,taskSlug:t,page_size:s=20,order_by:n="date_published",order_dir:i="desc",latest_only:o=!0,include_resources:r=!0,has_code:u=!1,has_hf_artifacts:l=!1,start_date:d,end_date:c,enabled:f=!0}=a;return m({queryKey:[...g.feeds.organization,e,t,{page_size:s,order_by:n,order_dir:i,latest_only:o,include_resources:r,has_code:u,has_hf_artifacts:l,start_date:d,end_date:c}],queryFn:({pageParam:p=1})=>h.forOrganization(e,{task:t,page:p,page_size:s,order_by:n,order_dir:i,latest_only:o,include_resources:r,has_code:u,has_hf_artifacts:l,start_date:d,end_date:c}),getNextPageParam:p=>p.next_page,initialPageParam:1,enabled:f&&!!e,staleTime:5*60*1e3,placeholderData:y,refetchOnWindowFocus:!1})}export{D as a,I as b,W as c,N as d,S as e,K as u}; +import{p as g}from"./paperQueryKeys-BP2E-0yf.js";import{af as y}from"./index-B7UoLEbn.js";import{u as x}from"./useQuery-DV2f4JpC.js";import{u as m}from"./useInfiniteQuery-CoFrg4GN.js";import{p as h}from"./papers-Ctf2uv0o.js";function I(a,e=!0){return x({queryKey:g.detail(a),queryFn:()=>h.get(a),enabled:e&&!!a,staleTime:10*60*1e3,refetchOnWindowFocus:!1})}function K(a={}){const{page_size:e=20,search:t,order_by:s="date_published",order_dir:n="desc",start_date:i,end_date:o,conference:r,task:u,method:l,latest_only:d=!0,include_resources:c=!1,has_code:f=!1,has_hf_artifacts:p=!1,framework:_,repository:b,author:F,enabled:k=!0}=a;return m({queryKey:[...g.feeds.infinite,{page_size:e,search:t,order_by:s,order_dir:n,start_date:i,end_date:o,conference:r,task:u,method:l,latest_only:d,include_resources:c,has_code:f,has_hf_artifacts:p,framework:_,repository:b,author:F}],queryFn:({pageParam:P=1})=>h.list({page:P,page_size:e,search:t,order_by:s,order_dir:n,start_date:i,end_date:o,conference:r,task:u,method:l,latest_only:d,include_resources:c,has_code:f,has_hf_artifacts:p,framework:_,repository:b,author:F}),getNextPageParam:P=>P.next_page,initialPageParam:1,enabled:k,staleTime:5*60*1e3,placeholderData:y,refetchOnWindowFocus:!1})}function D({q:a,order_by:e="relevance",start_date:t,end_date:s,has_code:n=!1,has_hf_artifacts:i=!1,enabled:o=!0}){return m({queryKey:[...g.feeds.search,{q:a,order_by:e,start_date:t,end_date:s,has_code:n,has_hf_artifacts:i}],queryFn:({pageParam:r=1})=>h.searchFeed({q:a,page:r,page_size:20,order_by:e,start_date:t,end_date:s,has_code:n,has_hf_artifacts:i,mode:"hybrid"}),getNextPageParam:r=>r.next_page,initialPageParam:1,enabled:o&&a.trim().length>0,staleTime:5*60*1e3,placeholderData:y,refetchOnWindowFocus:!1})}function W(a){const{taskId:e,page_size:t=20,order_by:s="date_published",order_dir:n="desc",latest_only:i=!0,include_resources:o=!0,has_code:r=!1,has_hf_artifacts:u=!1,start_date:l,end_date:d,enabled:c=!0}=a;return m({queryKey:[...g.feeds.task,e,{page_size:t,order_by:s,order_dir:n,latest_only:i,include_resources:o,has_code:r,has_hf_artifacts:u,start_date:l,end_date:d}],queryFn:({pageParam:f=1})=>h.forTask(e,{page:f,page_size:t,order_by:s,order_dir:n,latest_only:i,include_resources:o,repository_limit:1,has_code:r,has_hf_artifacts:u,start_date:l,end_date:d}),getNextPageParam:f=>f.next_page,initialPageParam:1,enabled:c&&!!e,staleTime:5*60*1e3,placeholderData:y,refetchOnWindowFocus:!1})}function N(a){const{conferenceSlug:e,taskSlug:t,presentation:s,page_size:n=20,order_by:i="date_published",order_dir:o="desc",latest_only:r=!0,include_resources:u=!0,has_code:l=!1,has_hf_artifacts:d=!1,start_date:c,end_date:f,enabled:p=!0}=a;return m({queryKey:[...g.feeds.conference,e,t,s,{page_size:n,order_by:i,order_dir:o,latest_only:r,include_resources:u,has_code:l,has_hf_artifacts:d,start_date:c,end_date:f}],queryFn:({pageParam:_=1})=>h.forConference(e,{task:t,presentation:s,page:_,page_size:n,order_by:i,order_dir:o,latest_only:r,include_resources:u,has_code:l,has_hf_artifacts:d,start_date:c,end_date:f}),getNextPageParam:_=>_.next_page,initialPageParam:1,enabled:p&&!!e,staleTime:5*60*1e3,placeholderData:y,refetchOnWindowFocus:!1})}function S(a){const{organizationSlug:e,taskSlug:t,page_size:s=20,order_by:n="date_published",order_dir:i="desc",latest_only:o=!0,include_resources:r=!0,has_code:u=!1,has_hf_artifacts:l=!1,start_date:d,end_date:c,enabled:f=!0}=a;return m({queryKey:[...g.feeds.organization,e,t,{page_size:s,order_by:n,order_dir:i,latest_only:o,include_resources:r,has_code:u,has_hf_artifacts:l,start_date:d,end_date:c}],queryFn:({pageParam:p=1})=>h.forOrganization(e,{task:t,page:p,page_size:s,order_by:n,order_dir:i,latest_only:o,include_resources:r,has_code:u,has_hf_artifacts:l,start_date:d,end_date:c}),getNextPageParam:p=>p.next_page,initialPageParam:1,enabled:f&&!!e,staleTime:5*60*1e3,placeholderData:y,refetchOnWindowFocus:!1})}export{D as a,I as b,W as c,N as d,S as e,K as u}; diff --git a/assets/useQuery-_Fj6Jfzr.js b/assets/useQuery-DV2f4JpC.js similarity index 99% rename from assets/useQuery-_Fj6Jfzr.js rename to assets/useQuery-DV2f4JpC.js index 8904ce22de432c36765fa54bd9888b84e98fd40f..66db7311d4e50bfca5c048f796d34a4de670a9c3 100644 --- a/assets/useQuery-_Fj6Jfzr.js +++ b/assets/useQuery-DV2f4JpC.js @@ -1 +1 @@ -var bt=s=>{throw TypeError(s)};var $=(s,t,e)=>t.has(s)||bt("Cannot "+e);var i=(s,t,e)=>($(s,t,"read from private field"),e?e.call(s):t.get(s)),p=(s,t,e)=>t.has(s)?bt("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(s):t.set(s,e),u=(s,t,e,r)=>($(s,t,"write to private field"),r?r.call(s,e):t.set(s,e),e),l=(s,t,e)=>($(s,t,"access private method"),e);import{aw as Tt,ax as gt,ay as S,az as q,aA as H,aB as tt,aC as et,aD as mt,aE as Mt,aF as J,aG as Qt,aH as xt,aI as vt,aJ as Ct,r as O,aK as Ot,m as _t}from"./index-CkeK0cDg.js";var m,a,j,g,x,U,C,w,z,P,L,_,F,T,N,n,A,st,it,rt,at,nt,ht,ot,It,Et,Ft=(Et=class extends Tt{constructor(t,e){super();p(this,n);p(this,m);p(this,a);p(this,j);p(this,g);p(this,x);p(this,U);p(this,C);p(this,w);p(this,z);p(this,P);p(this,L);p(this,_);p(this,F);p(this,T);p(this,N,new Set);this.options=e,u(this,m,t),u(this,w,null),u(this,C,gt()),this.bindMethods(),this.setOptions(e)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(i(this,a).addObserver(this),Rt(i(this,a),this.options)?l(this,n,A).call(this):this.updateResult(),l(this,n,at).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return ct(i(this,a),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return ct(i(this,a),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,l(this,n,nt).call(this),l(this,n,ht).call(this),i(this,a).removeObserver(this)}setOptions(t){const e=this.options,r=i(this,a);if(this.options=i(this,m).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof S(this.options.enabled,i(this,a))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");l(this,n,ot).call(this),i(this,a).setOptions(this.options),e._defaulted&&!q(this.options,e)&&i(this,m).getQueryCache().notify({type:"observerOptionsUpdated",query:i(this,a),observer:this});const h=this.hasListeners();h&&St(i(this,a),r,this.options,e)&&l(this,n,A).call(this),this.updateResult(),h&&(i(this,a)!==r||S(this.options.enabled,i(this,a))!==S(e.enabled,i(this,a))||H(this.options.staleTime,i(this,a))!==H(e.staleTime,i(this,a)))&&l(this,n,st).call(this);const o=l(this,n,it).call(this);h&&(i(this,a)!==r||S(this.options.enabled,i(this,a))!==S(e.enabled,i(this,a))||o!==i(this,T))&&l(this,n,rt).call(this,o)}getOptimisticResult(t){const e=i(this,m).getQueryCache().build(i(this,m),t),r=this.createResult(e,t);return Ut(this,r)&&(u(this,g,r),u(this,U,this.options),u(this,x,i(this,a).state)),r}getCurrentResult(){return i(this,g)}trackResult(t,e){return new Proxy(t,{get:(r,h)=>(this.trackProp(h),e==null||e(h),h==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&i(this,C).status==="pending"&&i(this,C).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(r,h))})}trackProp(t){i(this,N).add(t)}getCurrentQuery(){return i(this,a)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const e=i(this,m).defaultQueryOptions(t),r=i(this,m).getQueryCache().build(i(this,m),e);return r.fetch().then(()=>this.createResult(r,e))}fetch(t){return l(this,n,A).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),i(this,g)))}createResult(t,e){var ft;const r=i(this,a),h=this.options,o=i(this,g),c=i(this,x),y=i(this,U),b=t!==r?t.state:i(this,j),{state:E}=t;let d={...E},M=!1,f;if(e._optimisticResults){const R=this.hasListeners(),k=!R&&Rt(t,e),V=R&&St(t,r,e,h);(k||V)&&(d={...d,...xt(E.data,t.options)}),e._optimisticResults==="isRestoring"&&(d.fetchStatus="idle")}let{error:Q,errorUpdatedAt:B,status:v}=d;f=d.data;let W=!1;if(e.placeholderData!==void 0&&f===void 0&&v==="pending"){let R;o!=null&&o.isPlaceholderData&&e.placeholderData===(y==null?void 0:y.placeholderData)?(R=o.data,W=!0):R=typeof e.placeholderData=="function"?e.placeholderData((ft=i(this,L))==null?void 0:ft.state.data,i(this,L)):e.placeholderData,R!==void 0&&(v="success",f=vt(o==null?void 0:o.data,R,e),M=!0)}if(e.select&&f!==void 0&&!W)if(o&&f===(c==null?void 0:c.data)&&e.select===i(this,z))f=i(this,P);else try{u(this,z,e.select),f=e.select(f),f=vt(o==null?void 0:o.data,f,e),u(this,P,f),u(this,w,null)}catch(R){u(this,w,R)}i(this,w)&&(Q=i(this,w),f=i(this,P),B=Date.now(),v="error");const X=d.fetchStatus==="fetching",Y=v==="pending",Z=v==="error",lt=Y&&X,dt=f!==void 0,I={status:v,fetchStatus:d.fetchStatus,isPending:Y,isSuccess:v==="success",isError:Z,isInitialLoading:lt,isLoading:lt,data:f,dataUpdatedAt:d.dataUpdatedAt,error:Q,errorUpdatedAt:B,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:d.dataUpdateCount>b.dataUpdateCount||d.errorUpdateCount>b.errorUpdateCount,isFetching:X,isRefetching:X&&!Y,isLoadingError:Z&&!dt,isPaused:d.fetchStatus==="paused",isPlaceholderData:M,isRefetchError:Z&&dt,isStale:ut(t,e),refetch:this.refetch,promise:i(this,C),isEnabled:S(e.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const R=I.data!==void 0,k=I.status==="error"&&!R,V=G=>{k?G.reject(I.error):R&&G.resolve(I.data)},pt=()=>{const G=u(this,C,I.promise=gt());V(G)},K=i(this,C);switch(K.status){case"pending":t.queryHash===r.queryHash&&V(K);break;case"fulfilled":(k||I.data!==K.value)&&pt();break;case"rejected":(!k||I.error!==K.reason)&&pt();break}}return I}updateResult(){const t=i(this,g),e=this.createResult(i(this,a),this.options);if(u(this,x,i(this,a).state),u(this,U,this.options),i(this,x).data!==void 0&&u(this,L,i(this,a)),q(e,t))return;u(this,g,e);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:h}=this.options,o=typeof h=="function"?h():h;if(o==="all"||!o&&!i(this,N).size)return!0;const c=new Set(o??i(this,N));return this.options.throwOnError&&c.add("error"),Object.keys(i(this,g)).some(y=>{const D=y;return i(this,g)[D]!==t[D]&&c.has(D)})};l(this,n,It).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&l(this,n,at).call(this)}},m=new WeakMap,a=new WeakMap,j=new WeakMap,g=new WeakMap,x=new WeakMap,U=new WeakMap,C=new WeakMap,w=new WeakMap,z=new WeakMap,P=new WeakMap,L=new WeakMap,_=new WeakMap,F=new WeakMap,T=new WeakMap,N=new WeakMap,n=new WeakSet,A=function(t){l(this,n,ot).call(this);let e=i(this,a).fetch(this.options,t);return t!=null&&t.throwOnError||(e=e.catch(tt)),e},st=function(){l(this,n,nt).call(this);const t=H(this.options.staleTime,i(this,a));if(et.isServer()||i(this,g).isStale||!mt(t))return;const r=Mt(i(this,g).dataUpdatedAt,t)+1;u(this,_,J.setTimeout(()=>{i(this,g).isStale||this.updateResult()},r))},it=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(i(this,a)):this.options.refetchInterval)??!1},rt=function(t){l(this,n,ht).call(this),u(this,T,t),!(et.isServer()||S(this.options.enabled,i(this,a))===!1||!mt(i(this,T))||i(this,T)===0)&&u(this,F,J.setInterval(()=>{(this.options.refetchIntervalInBackground||Qt.isFocused())&&l(this,n,A).call(this)},i(this,T)))},at=function(){l(this,n,st).call(this),l(this,n,rt).call(this,l(this,n,it).call(this))},nt=function(){i(this,_)!==void 0&&(J.clearTimeout(i(this,_)),u(this,_,void 0))},ht=function(){i(this,F)!==void 0&&(J.clearInterval(i(this,F)),u(this,F,void 0))},ot=function(){const t=i(this,m).getQueryCache().build(i(this,m),this.options);if(t===i(this,a))return;const e=i(this,a);u(this,a,t),u(this,j,t.state),this.hasListeners()&&(e==null||e.removeObserver(this),t.addObserver(this))},It=function(t){Ct.batch(()=>{t.listeners&&this.listeners.forEach(e=>{e(i(this,g))}),i(this,m).getQueryCache().notify({query:i(this,a),type:"observerResultsUpdated"})})},Et);function Dt(s,t){return S(t.enabled,s)!==!1&&s.state.data===void 0&&!(s.state.status==="error"&&S(t.retryOnMount,s)===!1)}function Rt(s,t){return Dt(s,t)||s.state.data!==void 0&&ct(s,t,t.refetchOnMount)}function ct(s,t,e){if(S(t.enabled,s)!==!1&&H(t.staleTime,s)!=="static"){const r=typeof e=="function"?e(s):e;return r==="always"||r!==!1&&ut(s,t)}return!1}function St(s,t,e,r){return(s!==t||S(r.enabled,s)===!1)&&(!e.suspense||s.state.status!=="error")&&ut(s,e)}function ut(s,t){return S(t.enabled,s)!==!1&&s.isStaleByTime(H(t.staleTime,s))}function Ut(s,t){return!q(s.getCurrentResult(),t)}var wt=O.createContext(!1),Pt=()=>O.useContext(wt);wt.Provider;function Lt(){let s=!1;return{clearReset:()=>{s=!1},reset:()=>{s=!0},isReset:()=>s}}var Nt=O.createContext(Lt()),Bt=()=>O.useContext(Nt),kt=(s,t,e)=>{const r=e!=null&&e.state.error&&typeof s.throwOnError=="function"?Ot(s.throwOnError,[e.state.error,e]):s.throwOnError;(s.suspense||s.experimental_prefetchInRender||r)&&(t.isReset()||(s.retryOnMount=!1))},At=s=>{O.useEffect(()=>{s.clearReset()},[s])},Ht=({result:s,errorResetBoundary:t,throwOnError:e,query:r,suspense:h})=>s.isError&&!t.isReset()&&!s.isFetching&&r&&(h&&s.data===void 0||Ot(e,[s.error,r])),jt=s=>{if(s.suspense){const e=h=>h==="static"?h:Math.max(h??1e3,1e3),r=s.staleTime;s.staleTime=typeof r=="function"?(...h)=>e(r(...h)):e(r),typeof s.gcTime=="number"&&(s.gcTime=Math.max(s.gcTime,1e3))}},zt=(s,t)=>s.isLoading&&s.isFetching&&!t,Wt=(s,t)=>(s==null?void 0:s.suspense)&&t.isPending,yt=(s,t,e)=>t.fetchOptimistic(s).catch(()=>{e.clearReset()});function Vt(s,t,e){var M,f,Q,B;const r=Pt(),h=Bt(),o=_t(),c=o.defaultQueryOptions(s);(f=(M=o.getDefaultOptions().queries)==null?void 0:M._experimental_beforeQuery)==null||f.call(M,c);const y=o.getQueryCache().get(c.queryHash);c._optimisticResults=r?"isRestoring":"optimistic",jt(c),kt(c,h,y),At(h);const D=!o.getQueryCache().get(c.queryHash),[b]=O.useState(()=>new t(o,c)),E=b.getOptimisticResult(c),d=!r&&s.subscribed!==!1;if(O.useSyncExternalStore(O.useCallback(v=>{const W=d?b.subscribe(Ct.batchCalls(v)):tt;return b.updateResult(),W},[b,d]),()=>b.getCurrentResult(),()=>b.getCurrentResult()),O.useEffect(()=>{b.setOptions(c)},[c,b]),Wt(c,E))throw yt(c,b,h);if(Ht({result:E,errorResetBoundary:h,throwOnError:c.throwOnError,query:y,suspense:c.suspense}))throw E.error;if((B=(Q=o.getDefaultOptions().queries)==null?void 0:Q._experimental_afterQuery)==null||B.call(Q,c,E),c.experimental_prefetchInRender&&!et.isServer()&&zt(E,r)){const v=D?yt(c,b,h):y==null?void 0:y.promise;v==null||v.catch(tt).finally(()=>{b.updateResult()})}return c.notifyOnChangeProps?E:b.trackResult(E)}function Xt(s,t){return Vt(s,Ft)}export{Ft as Q,Vt as a,Pt as b,Bt as c,kt as d,jt as e,At as f,yt as g,Ht as h,Wt as s,Xt as u}; +var bt=s=>{throw TypeError(s)};var $=(s,t,e)=>t.has(s)||bt("Cannot "+e);var i=(s,t,e)=>($(s,t,"read from private field"),e?e.call(s):t.get(s)),p=(s,t,e)=>t.has(s)?bt("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(s):t.set(s,e),u=(s,t,e,r)=>($(s,t,"write to private field"),r?r.call(s,e):t.set(s,e),e),l=(s,t,e)=>($(s,t,"access private method"),e);import{aw as Tt,ax as gt,ay as S,az as q,aA as H,aB as tt,aC as et,aD as mt,aE as Mt,aF as J,aG as Qt,aH as xt,aI as vt,aJ as Ct,r as O,aK as Ot,m as _t}from"./index-B7UoLEbn.js";var m,a,j,g,x,U,C,w,z,P,L,_,F,T,N,n,A,st,it,rt,at,nt,ht,ot,It,Et,Ft=(Et=class extends Tt{constructor(t,e){super();p(this,n);p(this,m);p(this,a);p(this,j);p(this,g);p(this,x);p(this,U);p(this,C);p(this,w);p(this,z);p(this,P);p(this,L);p(this,_);p(this,F);p(this,T);p(this,N,new Set);this.options=e,u(this,m,t),u(this,w,null),u(this,C,gt()),this.bindMethods(),this.setOptions(e)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(i(this,a).addObserver(this),Rt(i(this,a),this.options)?l(this,n,A).call(this):this.updateResult(),l(this,n,at).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return ct(i(this,a),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return ct(i(this,a),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,l(this,n,nt).call(this),l(this,n,ht).call(this),i(this,a).removeObserver(this)}setOptions(t){const e=this.options,r=i(this,a);if(this.options=i(this,m).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof S(this.options.enabled,i(this,a))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");l(this,n,ot).call(this),i(this,a).setOptions(this.options),e._defaulted&&!q(this.options,e)&&i(this,m).getQueryCache().notify({type:"observerOptionsUpdated",query:i(this,a),observer:this});const h=this.hasListeners();h&&St(i(this,a),r,this.options,e)&&l(this,n,A).call(this),this.updateResult(),h&&(i(this,a)!==r||S(this.options.enabled,i(this,a))!==S(e.enabled,i(this,a))||H(this.options.staleTime,i(this,a))!==H(e.staleTime,i(this,a)))&&l(this,n,st).call(this);const o=l(this,n,it).call(this);h&&(i(this,a)!==r||S(this.options.enabled,i(this,a))!==S(e.enabled,i(this,a))||o!==i(this,T))&&l(this,n,rt).call(this,o)}getOptimisticResult(t){const e=i(this,m).getQueryCache().build(i(this,m),t),r=this.createResult(e,t);return Ut(this,r)&&(u(this,g,r),u(this,U,this.options),u(this,x,i(this,a).state)),r}getCurrentResult(){return i(this,g)}trackResult(t,e){return new Proxy(t,{get:(r,h)=>(this.trackProp(h),e==null||e(h),h==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&i(this,C).status==="pending"&&i(this,C).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(r,h))})}trackProp(t){i(this,N).add(t)}getCurrentQuery(){return i(this,a)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const e=i(this,m).defaultQueryOptions(t),r=i(this,m).getQueryCache().build(i(this,m),e);return r.fetch().then(()=>this.createResult(r,e))}fetch(t){return l(this,n,A).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),i(this,g)))}createResult(t,e){var ft;const r=i(this,a),h=this.options,o=i(this,g),c=i(this,x),y=i(this,U),b=t!==r?t.state:i(this,j),{state:E}=t;let d={...E},M=!1,f;if(e._optimisticResults){const R=this.hasListeners(),k=!R&&Rt(t,e),V=R&&St(t,r,e,h);(k||V)&&(d={...d,...xt(E.data,t.options)}),e._optimisticResults==="isRestoring"&&(d.fetchStatus="idle")}let{error:Q,errorUpdatedAt:B,status:v}=d;f=d.data;let W=!1;if(e.placeholderData!==void 0&&f===void 0&&v==="pending"){let R;o!=null&&o.isPlaceholderData&&e.placeholderData===(y==null?void 0:y.placeholderData)?(R=o.data,W=!0):R=typeof e.placeholderData=="function"?e.placeholderData((ft=i(this,L))==null?void 0:ft.state.data,i(this,L)):e.placeholderData,R!==void 0&&(v="success",f=vt(o==null?void 0:o.data,R,e),M=!0)}if(e.select&&f!==void 0&&!W)if(o&&f===(c==null?void 0:c.data)&&e.select===i(this,z))f=i(this,P);else try{u(this,z,e.select),f=e.select(f),f=vt(o==null?void 0:o.data,f,e),u(this,P,f),u(this,w,null)}catch(R){u(this,w,R)}i(this,w)&&(Q=i(this,w),f=i(this,P),B=Date.now(),v="error");const X=d.fetchStatus==="fetching",Y=v==="pending",Z=v==="error",lt=Y&&X,dt=f!==void 0,I={status:v,fetchStatus:d.fetchStatus,isPending:Y,isSuccess:v==="success",isError:Z,isInitialLoading:lt,isLoading:lt,data:f,dataUpdatedAt:d.dataUpdatedAt,error:Q,errorUpdatedAt:B,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:d.dataUpdateCount>b.dataUpdateCount||d.errorUpdateCount>b.errorUpdateCount,isFetching:X,isRefetching:X&&!Y,isLoadingError:Z&&!dt,isPaused:d.fetchStatus==="paused",isPlaceholderData:M,isRefetchError:Z&&dt,isStale:ut(t,e),refetch:this.refetch,promise:i(this,C),isEnabled:S(e.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const R=I.data!==void 0,k=I.status==="error"&&!R,V=G=>{k?G.reject(I.error):R&&G.resolve(I.data)},pt=()=>{const G=u(this,C,I.promise=gt());V(G)},K=i(this,C);switch(K.status){case"pending":t.queryHash===r.queryHash&&V(K);break;case"fulfilled":(k||I.data!==K.value)&&pt();break;case"rejected":(!k||I.error!==K.reason)&&pt();break}}return I}updateResult(){const t=i(this,g),e=this.createResult(i(this,a),this.options);if(u(this,x,i(this,a).state),u(this,U,this.options),i(this,x).data!==void 0&&u(this,L,i(this,a)),q(e,t))return;u(this,g,e);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:h}=this.options,o=typeof h=="function"?h():h;if(o==="all"||!o&&!i(this,N).size)return!0;const c=new Set(o??i(this,N));return this.options.throwOnError&&c.add("error"),Object.keys(i(this,g)).some(y=>{const D=y;return i(this,g)[D]!==t[D]&&c.has(D)})};l(this,n,It).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&l(this,n,at).call(this)}},m=new WeakMap,a=new WeakMap,j=new WeakMap,g=new WeakMap,x=new WeakMap,U=new WeakMap,C=new WeakMap,w=new WeakMap,z=new WeakMap,P=new WeakMap,L=new WeakMap,_=new WeakMap,F=new WeakMap,T=new WeakMap,N=new WeakMap,n=new WeakSet,A=function(t){l(this,n,ot).call(this);let e=i(this,a).fetch(this.options,t);return t!=null&&t.throwOnError||(e=e.catch(tt)),e},st=function(){l(this,n,nt).call(this);const t=H(this.options.staleTime,i(this,a));if(et.isServer()||i(this,g).isStale||!mt(t))return;const r=Mt(i(this,g).dataUpdatedAt,t)+1;u(this,_,J.setTimeout(()=>{i(this,g).isStale||this.updateResult()},r))},it=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(i(this,a)):this.options.refetchInterval)??!1},rt=function(t){l(this,n,ht).call(this),u(this,T,t),!(et.isServer()||S(this.options.enabled,i(this,a))===!1||!mt(i(this,T))||i(this,T)===0)&&u(this,F,J.setInterval(()=>{(this.options.refetchIntervalInBackground||Qt.isFocused())&&l(this,n,A).call(this)},i(this,T)))},at=function(){l(this,n,st).call(this),l(this,n,rt).call(this,l(this,n,it).call(this))},nt=function(){i(this,_)!==void 0&&(J.clearTimeout(i(this,_)),u(this,_,void 0))},ht=function(){i(this,F)!==void 0&&(J.clearInterval(i(this,F)),u(this,F,void 0))},ot=function(){const t=i(this,m).getQueryCache().build(i(this,m),this.options);if(t===i(this,a))return;const e=i(this,a);u(this,a,t),u(this,j,t.state),this.hasListeners()&&(e==null||e.removeObserver(this),t.addObserver(this))},It=function(t){Ct.batch(()=>{t.listeners&&this.listeners.forEach(e=>{e(i(this,g))}),i(this,m).getQueryCache().notify({query:i(this,a),type:"observerResultsUpdated"})})},Et);function Dt(s,t){return S(t.enabled,s)!==!1&&s.state.data===void 0&&!(s.state.status==="error"&&S(t.retryOnMount,s)===!1)}function Rt(s,t){return Dt(s,t)||s.state.data!==void 0&&ct(s,t,t.refetchOnMount)}function ct(s,t,e){if(S(t.enabled,s)!==!1&&H(t.staleTime,s)!=="static"){const r=typeof e=="function"?e(s):e;return r==="always"||r!==!1&&ut(s,t)}return!1}function St(s,t,e,r){return(s!==t||S(r.enabled,s)===!1)&&(!e.suspense||s.state.status!=="error")&&ut(s,e)}function ut(s,t){return S(t.enabled,s)!==!1&&s.isStaleByTime(H(t.staleTime,s))}function Ut(s,t){return!q(s.getCurrentResult(),t)}var wt=O.createContext(!1),Pt=()=>O.useContext(wt);wt.Provider;function Lt(){let s=!1;return{clearReset:()=>{s=!1},reset:()=>{s=!0},isReset:()=>s}}var Nt=O.createContext(Lt()),Bt=()=>O.useContext(Nt),kt=(s,t,e)=>{const r=e!=null&&e.state.error&&typeof s.throwOnError=="function"?Ot(s.throwOnError,[e.state.error,e]):s.throwOnError;(s.suspense||s.experimental_prefetchInRender||r)&&(t.isReset()||(s.retryOnMount=!1))},At=s=>{O.useEffect(()=>{s.clearReset()},[s])},Ht=({result:s,errorResetBoundary:t,throwOnError:e,query:r,suspense:h})=>s.isError&&!t.isReset()&&!s.isFetching&&r&&(h&&s.data===void 0||Ot(e,[s.error,r])),jt=s=>{if(s.suspense){const e=h=>h==="static"?h:Math.max(h??1e3,1e3),r=s.staleTime;s.staleTime=typeof r=="function"?(...h)=>e(r(...h)):e(r),typeof s.gcTime=="number"&&(s.gcTime=Math.max(s.gcTime,1e3))}},zt=(s,t)=>s.isLoading&&s.isFetching&&!t,Wt=(s,t)=>(s==null?void 0:s.suspense)&&t.isPending,yt=(s,t,e)=>t.fetchOptimistic(s).catch(()=>{e.clearReset()});function Vt(s,t,e){var M,f,Q,B;const r=Pt(),h=Bt(),o=_t(),c=o.defaultQueryOptions(s);(f=(M=o.getDefaultOptions().queries)==null?void 0:M._experimental_beforeQuery)==null||f.call(M,c);const y=o.getQueryCache().get(c.queryHash);c._optimisticResults=r?"isRestoring":"optimistic",jt(c),kt(c,h,y),At(h);const D=!o.getQueryCache().get(c.queryHash),[b]=O.useState(()=>new t(o,c)),E=b.getOptimisticResult(c),d=!r&&s.subscribed!==!1;if(O.useSyncExternalStore(O.useCallback(v=>{const W=d?b.subscribe(Ct.batchCalls(v)):tt;return b.updateResult(),W},[b,d]),()=>b.getCurrentResult(),()=>b.getCurrentResult()),O.useEffect(()=>{b.setOptions(c)},[c,b]),Wt(c,E))throw yt(c,b,h);if(Ht({result:E,errorResetBoundary:h,throwOnError:c.throwOnError,query:y,suspense:c.suspense}))throw E.error;if((B=(Q=o.getDefaultOptions().queries)==null?void 0:Q._experimental_afterQuery)==null||B.call(Q,c,E),c.experimental_prefetchInRender&&!et.isServer()&&zt(E,r)){const v=D?yt(c,b,h):y==null?void 0:y.promise;v==null||v.catch(tt).finally(()=>{b.updateResult()})}return c.notifyOnChangeProps?E:b.trackResult(E)}function Xt(s,t){return Vt(s,Ft)}export{Ft as Q,Vt as a,Pt as b,Bt as c,kt as d,jt as e,At as f,yt as g,Ht as h,Wt as s,Xt as u}; diff --git a/index.html b/index.html index 37af1ca679932e0bd82c85af90cb9fa3d769bc17..c883a20801b6aefb6ccd2e2c528cc829295c14e1 100644 --- a/index.html +++ b/index.html @@ -72,8 +72,8 @@ plausible.init(); })(); - - + +