diff --git a/assets/AgentLogos-CDnvpl-X.js b/assets/AgentLogos-B5etEEwg.js similarity index 99% rename from assets/AgentLogos-CDnvpl-X.js rename to assets/AgentLogos-B5etEEwg.js index 7ae06e06622c1653db8570d2278e917a7a3f00ed..8fc803d5c342790594c93532925e7b36412237b7 100644 --- a/assets/AgentLogos-CDnvpl-X.js +++ b/assets/AgentLogos-B5etEEwg.js @@ -1 +1 @@ -import{j as e}from"./index-CTkdBAwI.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:"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 x(){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,x as a}; +import{j as e}from"./index-D2fBL-s6.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:"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 x(){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,x as a}; diff --git a/assets/AiDeadlinesView-C3PsBfDN.js b/assets/AiDeadlinesView-BG77EAes.js similarity index 96% rename from assets/AiDeadlinesView-C3PsBfDN.js rename to assets/AiDeadlinesView-BG77EAes.js index a8c8a18ce886493af0b833e555cd7a574c467a24..c1e4daaad6c916887dcf25745564dadd1d17acfc 100644 --- a/assets/AiDeadlinesView-C3PsBfDN.js +++ b/assets/AiDeadlinesView-BG77EAes.js @@ -1,3 +1,3 @@ -import{f as y,j as t,b as A,T as L}from"./index-CTkdBAwI.js";import{c as B}from"./catalog-ZV4aeC2F.js";import{S as U}from"./switch-B-_Aen3O.js";import{S as W}from"./skeleton-p2_v-2W8.js";import{A as M,a as O}from"./alert-5nuL0v_r.js";import{s as _}from"./safeExternalHref-CkBrsh84.js";import{D as V,a as P,c as G,b as H,d as K}from"./dialog-C7LLEadk.js";import{s as Y,n as S,f as $,p as q,u as N,l as k,a as z,c as b,D as Q,i as E,b as F,d as J}from"./deadlines-BG5SWwEG.js";import"./index-tW8cPsfP.js";const w={fontFamily:"var(--mono)",fontSize:10,letterSpacing:"0.12em",textTransform:"uppercase",color:"var(--ink-faint)"},X=(e,s)=>{const l=Math.ceil((e-s)/Q);return l<=0?"passed":`${l} ${l===1?"day":"days"}`},R=(e,s)=>{const l=$(e.start_date,e.end_date),r=e.venue||[e.city,e.country].filter(Boolean).join(", ");return[`${s.label||s.type||"Deadline"} for ${e.name}`,l?`Dates: ${l}`:null,r?`Location: ${r}`:null,e.url?`Website: ${e.url}`:null].filter(Boolean).join(` +import{f as y,j as t,b as A,T as L}from"./index-D2fBL-s6.js";import{c as B}from"./catalog-5AxvKr4D.js";import{S as U}from"./switch-B4eVY4fu.js";import{S as W}from"./skeleton-BDwfco0_.js";import{A as M,a as O}from"./alert-PnePcfgX.js";import{s as _}from"./safeExternalHref-CkBrsh84.js";import{D as V,a as P,c as G,b as H,d as K}from"./dialog-DgUROq2j.js";import{s as Y,n as S,f as $,p as q,u as N,l as k,a as z,c as b,D as Q,i as E,b as F,d as J}from"./deadlines-BG5SWwEG.js";import"./index-C_9KPu-E.js";const w={fontFamily:"var(--mono)",fontSize:10,letterSpacing:"0.12em",textTransform:"uppercase",color:"var(--ink-faint)"},X=(e,s)=>{const l=Math.ceil((e-s)/Q);return l<=0?"passed":`${l} ${l===1?"day":"days"}`},R=(e,s)=>{const l=$(e.start_date,e.end_date),r=e.venue||[e.city,e.country].filter(Boolean).join(", ");return[`${s.label||s.type||"Deadline"} for ${e.name}`,l?`Dates: ${l}`:null,r?`Location: ${r}`:null,e.url?`Website: ${e.url}`:null].filter(Boolean).join(` `)},T=e=>e.toISOString().replace(/[-:]/g,"").replace(/\.\d{3}/,""),Z=(e,s)=>{const l=new Date(s.deadline_at),r=new Date(l.getTime()+60*60*1e3),o=`${e.short_name||e.name} ${s.label||s.type||"deadline"}`,h=e.venue||[e.city,e.country].filter(Boolean).join(", "),n=`https://calendar.google.com/calendar/render?action=TEMPLATE&text=${encodeURIComponent(o)}&dates=${T(l)}/${T(r)}&details=${encodeURIComponent(R(e,s))}&location=${encodeURIComponent(h)}`,p=_(n);p&&window.open(p,"_blank","noopener,noreferrer")},ee=(e,s)=>{const l=new Date(s.deadline_at),r=new Date(l.getTime()+60*60*1e3),o=`${e.short_name||e.name} ${s.label||s.type||"deadline"}`,h=e.venue||[e.city,e.country].filter(Boolean).join(", "),n=["BEGIN:VCALENDAR","VERSION:2.0","BEGIN:VEVENT",e.url?`URL:${e.url}`:null,`DTSTART:${T(l)}`,`DTEND:${T(r)}`,`SUMMARY:${o}`,`DESCRIPTION:${R(e,s).replace(/\n/g,"\\n")}`,h?`LOCATION:${h}`:null,"END:VEVENT","END:VCALENDAR"].filter(Boolean).join(` `),p=new Blob([n],{type:"text/calendar;charset=utf-8"}),d=document.createElement("a");d.href=URL.createObjectURL(p),d.download=`${(e.short_name||e.name).toLowerCase().replace(/\s+/g,"-")}-deadline.ics`,document.body.appendChild(d),d.click(),document.body.removeChild(d),URL.revokeObjectURL(d.href)},te=({conf:e,open:s,onOpenChange:l})=>{const[r,o]=y.useState(()=>Date.now());y.useEffect(()=>{if(!s)return;o(Date.now());const i=setInterval(()=>o(Date.now()),1e3);return()=>clearInterval(i)},[s]);const h=y.useMemo(()=>e?Y(e):[],[e]),n=y.useMemo(()=>e?S(e,r):null,[e,r]),p=e?$(e.start_date,e.end_date):null,d=e?e.venue||[e.city,e.country].filter(Boolean).join(", ")||e.location:null,m=n?new Date(n.deadline_at).getTime():null;return t.jsx(V,{open:s,onOpenChange:l,children:t.jsx(P,{className:"max-w-xl",style:{background:"var(--bg-elevated)",maxHeight:"85vh",overflowY:"auto"},children:e&&t.jsxs(t.Fragment,{children:[t.jsxs(G,{children:[t.jsx(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:[p&&t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:4},children:[t.jsx("span",{style:w,children:"Dates"}),t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:13,color:"var(--ink-soft)"},children:p})]}),d&&t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:4},children:[t.jsx("span",{style:w,children:"Venue"}),t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:13,color:"var(--ink-soft)"},children:d})]})]}),m!=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:w,children:"Next deadline in"}),t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:22,fontWeight:600,color:N(m,r)},children:q(m,r)})]}),t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:8},children:[t.jsx("span",{style:w,children:"Important deadlines"}),h.length===0?t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:13,color:"var(--ink-faint)"},children:"Deadlines not announced yet"}):h.map((i,c)=>{const f=new Date(i.deadline_at).getTime(),a=n!=null&&i.deadline_at===n.deadline_at&&i.type===n.type,u=f<=r;return t.jsxs("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:12,padding:"8px 12px",borderRadius:6,background:a?"var(--accent-soft)":"transparent",border:a?"1px solid var(--hairline-strong)":"1px solid var(--hairline)",opacity:u&&!a?.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:a?600:400},children:[i.label||k(i.type||"deadline"),a&&t.jsx("span",{style:{...w,marginLeft:8},children:"Next"})]}),t.jsxs("span",{style:{fontFamily:"var(--mono)",fontSize:12,color:"var(--ink-faint)"},children:[z(i.deadline_at),i.timezone?` · ${i.timezone}`:""]})]}),t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:12,fontWeight:600,whiteSpace:"nowrap",color:N(u?null:f,r)},children:X(f,r)})]},`${i.type??"deadline"}-${c}`)})]}),b(e).length>0&&t.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:6},children:b(e).map(i=>t.jsx("span",{className:"tag-chip",style:{background:"var(--bg-subtle)",color:"var(--ink-soft)"},children:k(i)},i))}),t.jsxs("div",{style:{display:"flex",flexWrap:"wrap",alignItems:"center",gap:16,paddingTop:12,borderTop:"1px solid var(--hairline)"},children:[e.url&&t.jsx("a",{href:_(e.url)??void 0,target:"_blank",rel:"noopener noreferrer",style:{fontFamily:"var(--mono)",fontSize:12,color:"var(--accent-text)"},children:"Visit website ↗"}),n&&t.jsxs("div",{style:{display:"flex",gap:12,marginLeft:"auto"},children:[t.jsx("button",{type:"button",className:"tag-chip",onClick:()=>Z(e,n),style:{background:"var(--bg-subtle)",color:"var(--ink-soft)"},children:"+ Google Calendar"}),t.jsx("button",{type:"button",className:"tag-chip",onClick:()=>ee(e,n),style:{background:"var(--bg-subtle)",color:"var(--ink-soft)"},children:"+ Apple / .ics"})]})]})]})]})})})},I=({id:e,label:s,checked:l,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:l,onCheckedChange:r}),t.jsx("label",{htmlFor:e,style:{cursor:"pointer"},children:s})]}),ne=({conf:e,now:s,selectedDomains:l,onToggleDomain:r,onOpen:o})=>{const h=S(e,s),n=h??F(e),p=n?new Date(n.deadline_at).getTime():null,d=N(h?p:null,s),m=$(e.start_date,e.end_date),i=[e.city??null,e.country??null].filter(Boolean).join(", ");return t.jsxs("div",{role:"button",tabIndex:0,onClick:()=>o(e),onKeyDown:c=>{(c.key==="Enter"||c.key===" ")&&(c.preventDefault(),o(e))},style:{border:"1px solid var(--hairline)",borderRadius:8,padding:20,background:"var(--bg-elevated)",display:"flex",flexDirection:"column",gap:12,cursor:"pointer"},children:[t.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"baseline",gap:12},children:[t.jsx("h3",{style:{fontFamily:"var(--serif)",fontSize:20,fontWeight:500,letterSpacing:"-0.01em",margin:0},children:e.short_name?`${e.short_name} ${e.year??""}`.trim():e.name}),e.url&&t.jsx("a",{href:_(e.url)??void 0,target:"_blank",rel:"noopener noreferrer",onClick:c=>c.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:(n==null?void 0:n.label)||(n==null?void 0:n.type)||"Deadlines"}),t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:12,color:"var(--ink-soft)"},children:n?`${z(n.deadline_at)}${n.timezone?` · ${n.timezone}`:""}`:"Not announced yet"})]}),t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:14,fontWeight:600,color:d,whiteSpace:"nowrap"},children:p!=null?J(p,s):"TBA"})]}),t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:4,fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)"},children:[m&&t.jsx("span",{children:m}),i&&t.jsx("span",{children:i})]}),b(e).length>0&&t.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:6},children:b(e).map(c=>{const f=l.has(c);return t.jsx("button",{className:"tag-chip",onClick:a=>{a.stopPropagation(),r(c)},style:{background:f?"var(--ink)":"var(--bg-subtle)",color:f?"var(--bg)":"var(--ink-soft)"},children:k(c)},c)})})]})},me=()=>{const[e,s]=y.useState(!0),[l,r]=y.useState(!1),[o,h]=y.useState(new Set),[n,p]=y.useState(null),d=y.useMemo(()=>Date.now(),[]),m=A({queryKey:["conference-deadlines"],queryFn:()=>B.conferenceDeadlines(),staleTime:L}),i=a=>{h(u=>{const x=new Set(u);return x.has(a)?x.delete(a):x.add(a),x})},c=y.useMemo(()=>{var u;const a=new Map;return(u=m.data)==null||u.results.forEach(x=>{b(x).forEach(j=>a.set(j,(a.get(j)??0)+1))}),Array.from(a.entries()).sort((x,j)=>j[1]-x[1]).map(([x])=>x)},[m.data]),f=y.useMemo(()=>{var j;const u=(((j=m.data)==null?void 0:j.results)??[]).filter(g=>!(e&&g.tier!=="a"||o.size>0&&!b(g).some(v=>o.has(v))||!l&&!E(g)&&!S(g,d))),x=g=>{const D=S(g,d);if(D)return{group:0,time:new Date(D.deadline_at).getTime()};if(E(g))return{group:1,time:g.start_date?new Date(g.start_date).getTime():0};const v=F(g);return{group:2,time:-(v?new Date(v.deadline_at).getTime():0)}};return[...u].sort((g,D)=>{const v=x(g),C=x(D);return v.group!==C.group?v.group-C.group:v.time-C.time})},[m.data,e,l,o,d]);return m.error?t.jsx("div",{className:"page",children:t.jsx(M,{variant:"destructive",children:t.jsx(O,{children:"Failed to load conference deadlines. Please try again."})})}):t.jsxs("div",{className:"page",children:[t.jsx("div",{className:"feed-header",children:t.jsxs("div",{children:[t.jsxs("h1",{className:"feed-title",children:["AI Conference ",t.jsx("em",{children:"Deadlines"})]}),t.jsx("div",{className:"feed-subtitle",children:"Upcoming submission deadlines for major AI conferences, counting down."})]})}),t.jsxs("div",{style:{display:"flex",flexWrap:"wrap",alignItems:"center",gap:20,padding:"16px 0",borderBottom:"1px solid var(--hairline)",marginBottom:24},children:[t.jsx(I,{id:"top-tier-only",label:"Top tier only",checked:e,onChange:s}),t.jsx(I,{id:"show-past",label:"Show past conferences",checked:l,onChange:r})]}),c.length>0&&t.jsxs("div",{style:{display:"flex",flexWrap:"wrap",gap:6,marginBottom:24},children:[c.map(a=>{const u=o.has(a);return t.jsx("button",{className:"tag-chip",onClick:()=>i(a),style:{background:u?"var(--ink)":"var(--bg-subtle)",color:u?"var(--bg)":"var(--ink-soft)"},children:k(a)},a)}),o.size>0&&t.jsx("button",{className:"tag-chip",onClick:()=>h(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:m.isLoading?"…":`${f.length} conferences`})}),m.isLoading?t.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(320px, 1fr))",gap:16},children:Array.from({length:6}).map((a,u)=>t.jsx(W,{className:"h-44"},u))}):f.length===0?t.jsxs("div",{className:"no-results",children:["No conferences match these filters",l?".":" — try enabling “Show past conferences”."]}):t.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(320px, 1fr))",gap:16},children:f.map(a=>t.jsx(ne,{conf:a,now:d,selectedDomains:o,onToggleDomain:i,onOpen:p},a.id))}),t.jsx(te,{conf:n,open:n!==null,onOpenChange:a=>{a||p(null)}})]})};export{me as default}; diff --git a/assets/ApiDocsView-Bz-VouOg.js b/assets/ApiDocsView-C6VvPmjf.js similarity index 98% rename from assets/ApiDocsView-Bz-VouOg.js rename to assets/ApiDocsView-C6VvPmjf.js index 19421c0b1997ca863f822cbe96257c9eee1e329e..eac7978f5ec19756f80e2c4ff179e39d82e61a3d 100644 --- a/assets/ApiDocsView-Bz-VouOg.js +++ b/assets/ApiDocsView-C6VvPmjf.js @@ -1,4 +1,4 @@ -import{ac as m,b as f,f as h,j as e}from"./index-CTkdBAwI.js";import{u as g}from"./useDocumentTitle-WlHj7EYH.js";import{M as y}from"./index-RLQgt3ff.js";const b={queryKey:["public-api-schema"],queryFn:()=>m("/openapi.json",{credentials:"omit"}),staleTime:5*60*1e3};function w(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 v(s,r){return r==="Python"?`import requests +import{ac as m,b as f,f as h,j as e}from"./index-D2fBL-s6.js";import{u as g}from"./useDocumentTitle-ibepJVy2.js";import{M as y}from"./index-BPshewTi.js";const b={queryKey:["public-api-schema"],queryFn:()=>m("/openapi.json",{credentials:"omit"}),staleTime:5*60*1e3};function w(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 v(s,r){return r==="Python"?`import requests response = requests.get(${JSON.stringify(s)}, timeout=30) response.raise_for_status() diff --git a/assets/AreaSection-DTNPiFl-.js b/assets/AreaSection-COKqvfmt.js similarity index 88% rename from assets/AreaSection-DTNPiFl-.js rename to assets/AreaSection-COKqvfmt.js index e232393ca6e1299d9533a76a5d32f1dcf1ce0549..9884d9d462432f2f6e263942ecd75755f91170de 100644 --- a/assets/AreaSection-DTNPiFl-.js +++ b/assets/AreaSection-COKqvfmt.js @@ -1 +1 @@ -import{j as s}from"./index-CTkdBAwI.js";import{S as l}from"./skeleton-p2_v-2W8.js";const m=({id:t,title:a,description:e,meta:r,style:c,children:i})=>s.jsxs("section",{id:t,className:"area-section",style:c,children:[s.jsxs("div",{className:"area-section-head",children:[s.jsxs("div",{children:[s.jsx("h2",{className:"area-section-title",children:a}),e&&s.jsx("div",{className:"area-section-description",children:e})]}),s.jsx("div",{className:"area-section-meta",children:r})]}),s.jsx("div",{className:"tag-grid",children:i})]}),h=({sections:t=4,tiles:a,tileClassName:e})=>s.jsx("div",{className:"area-directory-skeleton",children:Array.from({length:t}).map((r,c)=>s.jsxs("div",{children:[s.jsx(l,{className:"h-8 w-1/3 mb-4"}),s.jsx("div",{className:"tag-grid",children:Array.from({length:a}).map((i,n)=>s.jsx(l,{className:e},n))})]},c))}),x=({areas:t})=>{const a=t.filter(r=>r.tasks.length>0),e=a.reduce((r,c)=>r+c.tasks.length,0);return e===0?null:s.jsxs("div",{className:"area-directory-footer",children:[e," tasks across ",a.length," areas."]})};export{h as A,m as a,x as b}; +import{j as s}from"./index-D2fBL-s6.js";import{S as l}from"./skeleton-BDwfco0_.js";const m=({id:t,title:a,description:e,meta:r,style:c,children:i})=>s.jsxs("section",{id:t,className:"area-section",style:c,children:[s.jsxs("div",{className:"area-section-head",children:[s.jsxs("div",{children:[s.jsx("h2",{className:"area-section-title",children:a}),e&&s.jsx("div",{className:"area-section-description",children:e})]}),s.jsx("div",{className:"area-section-meta",children:r})]}),s.jsx("div",{className:"tag-grid",children:i})]}),h=({sections:t=4,tiles:a,tileClassName:e})=>s.jsx("div",{className:"area-directory-skeleton",children:Array.from({length:t}).map((r,c)=>s.jsxs("div",{children:[s.jsx(l,{className:"h-8 w-1/3 mb-4"}),s.jsx("div",{className:"tag-grid",children:Array.from({length:a}).map((i,n)=>s.jsx(l,{className:e},n))})]},c))}),x=({areas:t})=>{const a=t.filter(r=>r.tasks.length>0),e=a.reduce((r,c)=>r+c.tasks.length,0);return e===0?null:s.jsxs("div",{className:"area-directory-footer",children:[e," tasks across ",a.length," areas."]})};export{h as A,m as a,x as b}; diff --git a/assets/AstraForRoboticsView-Dy0LNyoX.js b/assets/AstraForRoboticsView-4cqZq7Uv.js similarity index 89% rename from assets/AstraForRoboticsView-Dy0LNyoX.js rename to assets/AstraForRoboticsView-4cqZq7Uv.js index fe9b0c1780d7194e1fb001450eb52b213c173da8..1cbc05599713f500410de5dfaabd61e1672d731f 100644 --- a/assets/AstraForRoboticsView-Dy0LNyoX.js +++ b/assets/AstraForRoboticsView-4cqZq7Uv.js @@ -1 +1 @@ -import{p,f as u,j as a,L as o}from"./index-CTkdBAwI.js";import{u as g,b as x,P as f}from"./PaperFeed-2BMpWfem.js";import{A as b,a as j}from"./alert-5nuL0v_r.js";import{u as y}from"./usePapers-Cu-zovv8.js";import{p as v}from"./papers-POQWk4vk.js";import{u as k,f as w}from"./useDocumentTitle-WlHj7EYH.js";import{t as A}from"./transform-CZL79kIa.js";import"./PaperCard--WllvTq0.js";import"./AuthorAvatar-DjiI2pGP.js";import"./SotaBadges-CyyWKB0V.js";import"./colors-BkWRhvFI.js";import"./Icon-DSoTeS9V.js";import"./LatexTitle-BmCQe_rK.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-CZErm3i7.js";import"./skeleton-p2_v-2W8.js";import"./useIntersectionObserver-BnA8TYxZ.js";import"./useInfiniteQuery-CLH4OKrI.js";import"./curation-BlGrJ3z2.js";const n="robotics",i="gpt-6-astra",_="https://x.com/YuXiang_IRVL/status/2100395131924840570",P=[{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"}],R=[{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"}],h=({posts:s,label:e})=>a.jsxs("div",{className:"astra-posts",children:[a.jsx("div",{className:"astra-posts-label",children:e}),a.jsx("ul",{children:s.map(t=>a.jsxs("li",{children:[a.jsxs("a",{href:t.url,target:"_blank",rel:"noreferrer",children:["@",t.handle]}),a.jsxs("span",{className:"astra-post-author",children:[" ",t.author]}),a.jsxs("span",{className:"astra-post-summary",children:[" — ",t.summary]})]},t.url))})]}),B=()=>{var l,c;const s=g(),e=y([...p.feeds.infinite,{task:n,method:i,...s.filters}],r=>v.list({...s.filters,task:n,method:i,page:r,page_size:12}));k(w("GPT-6 Astra for Robotics"));const t=u.useMemo(()=>{var r;return(((r=e.data)==null?void 0:r.pages)??[]).flatMap(d=>d.results.map(A))},[e.data]),m=((c=(l=e.data)==null?void 0:l.pages[0])==null?void 0:c.count)??0;return a.jsxs("div",{className:"page",children:[a.jsxs("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:[a.jsx(o,{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:_,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(h,{posts:P,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(h,{posts:R,label:"Seen on X"})]})]}),a.jsxs("p",{className:"astra-note",children:["Listing is automatic: any paper tagged with both the"," ",a.jsx(o,{to:`/tasks/${n}`,children:"Robotics"})," task and the"," ",a.jsx(o,{to:`/methods/${i}`,children:"GPT-6 Astra"})," method appears here. Missing a report or preprint?"," ",a.jsx(o,{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:["[",m.toLocaleString(),"]"]})]})]}),a.jsx(x,{feed:s,showDateFilter:!1}),e.error?a.jsx(b,{variant:"destructive",children:a.jsx(j,{children:"Failed to load the collection. Please try again."})}):a.jsx(f,{query:e,cards:t,empty:"No papers match this selection yet."})]})};export{B as default}; +import{p,f as u,j as a,L as o}from"./index-D2fBL-s6.js";import{u as g,b as x,P as f}from"./PaperFeed-BERxHjrg.js";import{A as b,a as j}from"./alert-PnePcfgX.js";import{u as y}from"./usePapers-CAjdcUuj.js";import{p as v}from"./papers-khuZaSFb.js";import{u as k,f as w}from"./useDocumentTitle-ibepJVy2.js";import{t as A}from"./transform-B_GaHMvk.js";import"./PaperCard-DhorusY5.js";import"./AuthorAvatar-C8tz_syh.js";import"./SotaBadges-r6iGzLRW.js";import"./colors-BkWRhvFI.js";import"./Icon-Uhh78KjL.js";import"./LatexTitle-WIQJ1ke0.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-DS5Jzsg5.js";import"./skeleton-BDwfco0_.js";import"./useIntersectionObserver-C0Rq0EXm.js";import"./useInfiniteQuery-CjJA-90e.js";import"./curation-BtfabyzA.js";const n="robotics",i="gpt-6-astra",_="https://x.com/YuXiang_IRVL/status/2100395131924840570",P=[{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"}],R=[{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"}],h=({posts:s,label:e})=>a.jsxs("div",{className:"astra-posts",children:[a.jsx("div",{className:"astra-posts-label",children:e}),a.jsx("ul",{children:s.map(t=>a.jsxs("li",{children:[a.jsxs("a",{href:t.url,target:"_blank",rel:"noreferrer",children:["@",t.handle]}),a.jsxs("span",{className:"astra-post-author",children:[" ",t.author]}),a.jsxs("span",{className:"astra-post-summary",children:[" — ",t.summary]})]},t.url))})]}),B=()=>{var l,c;const s=g(),e=y([...p.feeds.infinite,{task:n,method:i,...s.filters}],r=>v.list({...s.filters,task:n,method:i,page:r,page_size:12}));k(w("GPT-6 Astra for Robotics"));const t=u.useMemo(()=>{var r;return(((r=e.data)==null?void 0:r.pages)??[]).flatMap(d=>d.results.map(A))},[e.data]),m=((c=(l=e.data)==null?void 0:l.pages[0])==null?void 0:c.count)??0;return a.jsxs("div",{className:"page",children:[a.jsxs("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:[a.jsx(o,{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:_,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(h,{posts:P,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(h,{posts:R,label:"Seen on X"})]})]}),a.jsxs("p",{className:"astra-note",children:["Listing is automatic: any paper tagged with both the"," ",a.jsx(o,{to:`/tasks/${n}`,children:"Robotics"})," task and the"," ",a.jsx(o,{to:`/methods/${i}`,children:"GPT-6 Astra"})," method appears here. Missing a report or preprint?"," ",a.jsx(o,{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:["[",m.toLocaleString(),"]"]})]})]}),a.jsx(x,{feed:s,showDateFilter:!1}),e.error?a.jsx(b,{variant:"destructive",children:a.jsx(j,{children:"Failed to load the collection. Please try again."})}):a.jsx(f,{query:e,cards:t,empty:"No papers match this selection yet."})]})};export{B as default}; diff --git a/assets/AuthorAvatar-DjiI2pGP.js b/assets/AuthorAvatar-C8tz_syh.js similarity index 86% rename from assets/AuthorAvatar-DjiI2pGP.js rename to assets/AuthorAvatar-C8tz_syh.js index f1080284e358eca3256546df346d86e3c8ee0f88..e476eb47dbb6c96ef75e16ef628ff2a50ad3fd13 100644 --- a/assets/AuthorAvatar-DjiI2pGP.js +++ b/assets/AuthorAvatar-C8tz_syh.js @@ -1 +1 @@ -import{f as c,j as r}from"./index-CTkdBAwI.js";const p=a=>a!=null&&a.startsWith("https://")&&!a.startsWith("https://huggingface.co/avatars/")?a:null,h=({url:a,className:o,href:t,label:n})=>{const[i,l]=c.useState(!1),s=i?null:p(a);if(!s)return null;const e=r.jsx("img",{className:`author-avatar-base ${o}`,src:s,alt:"",loading:"lazy",onError:()=>l(!0)});return t?r.jsx("a",{href:t,target:"_blank",rel:"noopener noreferrer","aria-label":n,children:e}):e};export{h as A}; +import{f as c,j as r}from"./index-D2fBL-s6.js";const p=a=>a!=null&&a.startsWith("https://")&&!a.startsWith("https://huggingface.co/avatars/")?a:null,h=({url:a,className:o,href:t,label:n})=>{const[i,l]=c.useState(!1),s=i?null:p(a);if(!s)return null;const e=r.jsx("img",{className:`author-avatar-base ${o}`,src:s,alt:"",loading:"lazy",onError:()=>l(!0)});return t?r.jsx("a",{href:t,target:"_blank",rel:"noopener noreferrer","aria-label":n,children:e}):e};export{h as A}; diff --git a/assets/AuthorDetailView-CSBghhYh.js b/assets/AuthorDetailView-CDAXgj3C.js similarity index 76% rename from assets/AuthorDetailView-CSBghhYh.js rename to assets/AuthorDetailView-CDAXgj3C.js index d41ce2a6e436b185c42b308f9371c392efd65d60..5dbff802b80c00d6631e1347d7fc698232b240df 100644 --- a/assets/AuthorDetailView-CSBghhYh.js +++ b/assets/AuthorDetailView-CDAXgj3C.js @@ -1 +1 @@ -import{u as b,j as a,b as N,p as v,f as F,ao as y,L as A}from"./index-CTkdBAwI.js";import{A as P}from"./AuthorAvatar-DjiI2pGP.js";import{u as k,b as $,P as S}from"./PaperFeed-2BMpWfem.js";import{R as L}from"./ResearchFollowButton-gAamAHri.js";import{A as R,a as w}from"./alert-5nuL0v_r.js";import{S as z}from"./skeleton-p2_v-2W8.js";import{u as C}from"./usePapers-Cu-zovv8.js";import{p as m}from"./papers-POQWk4vk.js";import{i as H}from"./apiErrors-DFeecPSH.js";import{t as q}from"./transform-CZL79kIa.js";import f from"./NotFound-BE9xg6GA.js";import"./PaperCard--WllvTq0.js";import"./SotaBadges-CyyWKB0V.js";import"./colors-BkWRhvFI.js";import"./Icon-DSoTeS9V.js";import"./LatexTitle-BmCQe_rK.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-CZErm3i7.js";import"./useIntersectionObserver-BnA8TYxZ.js";import"./researchTopic-B8hMcjil.js";import"./useMutation-DXSljxHA.js";import"./plus-Dhoq_Vs9.js";import"./useInfiniteQuery-CLH4OKrI.js";import"./curation-BlGrJ3z2.js";const Q=({authorId:r})=>{var n,i,l,p,c,d,h,u;const o=k(),{searchParams:g}=o,e=N({queryKey:["author",r],queryFn:()=>m.getAuthor(r)}),s=C([...v.feeds.infinite,{author:r,...o.filters}],t=>m.list({...o.filters,author:r,page:t,page_size:12})),x=F.useMemo(()=>{var t;return(((t=s.data)==null?void 0:t.pages)??[]).flatMap(_=>_.results.map(q))},[s.data]),j=((i=(n=s.data)==null?void 0:n.pages[0])==null?void 0:i.count)??0;if(H(e.error))return a.jsx(f,{});if((l=e.data)!=null&&l.organization_slug){const t=g.toString();return a.jsx(y,{to:`/orgs/${e.data.organization_slug}${t?`?${t}`:""}`,replace:!0})}return a.jsxs("div",{className:"page",children:[a.jsxs("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:[a.jsx(A,{to:"/",children:"Home"}),a.jsx("span",{children:" / "}),a.jsx("span",{children:"Authors"}),a.jsx("span",{children:" / "}),a.jsx("span",{children:((p=e.data)==null?void 0:p.full_name)??r})]}),a.jsxs("header",{className:"author-hero",children:[a.jsx("div",{className:"organizations-eyebrow",children:"AUTHOR"}),a.jsxs("div",{className:"author-hero-title",children:[(c=e.data)!=null&&c.photo?a.jsxs("figure",{className:"author-photo",children:[a.jsx("img",{className:"author-avatar-base author-avatar",src:e.data.photo.url,alt:""}),a.jsxs("figcaption",{children:["Photo:"," ",a.jsx("a",{href:e.data.photo.source_url,target:"_blank",rel:"noopener noreferrer",children:e.data.photo.credit}),", ",e.data.photo.license_url?a.jsx("a",{href:e.data.photo.license_url,target:"_blank",rel:"noopener noreferrer",children:e.data.photo.license}):e.data.photo.license]})]}):((d=e.data)==null?void 0:d.hf_username)&&a.jsx(P,{className:"author-avatar",url:e.data.hf_avatar_url,href:`https://huggingface.co/${e.data.hf_username}`,label:`@${e.data.hf_username} on Hugging Face`}),a.jsx("h1",{className:"feed-title",children:((h=e.data)==null?void 0:h.full_name)??a.jsx(z,{className:"h-12 w-64 inline-block"})})]}),e.data&&a.jsxs("div",{className:"feed-subtitle",children:[e.data.paper_count.toLocaleString()," ",e.data.paper_count===1?"paper":"papers",e.data.hf_username&&a.jsxs(a.Fragment,{children:[" · ",a.jsxs("a",{href:`https://huggingface.co/${e.data.hf_username}`,target:"_blank",rel:"noopener noreferrer",children:["@",e.data.hf_username," on Hugging Face ↗"]})]}),e.data.google_scholar_id&&a.jsxs(a.Fragment,{children:[" · ",a.jsx("a",{href:`https://scholar.google.com/citations?user=${encodeURIComponent(e.data.google_scholar_id)}`,target:"_blank",rel:"noopener noreferrer",children:"Google Scholar ↗"})]})]}),e.data&&a.jsx(L,{kind:"author",entityId:e.data.id})]}),a.jsx($,{feed:o,style:{alignItems:"center",gap:16},children:a.jsxs("div",{className:"results-count",children:[j.toLocaleString()," papers"]})}),s.error?a.jsx(R,{variant:"destructive",children:a.jsxs(w,{children:["Failed to load papers."," ",a.jsx("button",{type:"button",onClick:()=>void s.refetch(),children:"Try again"})]})}):a.jsx(S,{query:s,cards:x,empty:((u=e.data)==null?void 0:u.paper_count)===0?"No public papers are available.":"No papers found for this selection."})]})},la=()=>{const{authorId:r}=b();return r?a.jsx(Q,{authorId:r},r):a.jsx(f,{})};export{la as default}; +import{u as b,j as a,b as N,p as v,f as F,ao as y,L as A}from"./index-D2fBL-s6.js";import{A as P}from"./AuthorAvatar-C8tz_syh.js";import{u as k,b as $,P as S}from"./PaperFeed-BERxHjrg.js";import{R as L}from"./ResearchFollowButton-Bwb5EiPm.js";import{A as R,a as w}from"./alert-PnePcfgX.js";import{S as z}from"./skeleton-BDwfco0_.js";import{u as C}from"./usePapers-CAjdcUuj.js";import{p as m}from"./papers-khuZaSFb.js";import{i as H}from"./apiErrors-DV2aaDjL.js";import{t as q}from"./transform-B_GaHMvk.js";import f from"./NotFound-L0ldWZg9.js";import"./PaperCard-DhorusY5.js";import"./SotaBadges-r6iGzLRW.js";import"./colors-BkWRhvFI.js";import"./Icon-Uhh78KjL.js";import"./LatexTitle-WIQJ1ke0.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-DS5Jzsg5.js";import"./useIntersectionObserver-C0Rq0EXm.js";import"./researchTopic-jOpECA0z.js";import"./useMutation-9dlTbuQj.js";import"./plus-BI8-JXK0.js";import"./useInfiniteQuery-CjJA-90e.js";import"./curation-BtfabyzA.js";const Q=({authorId:r})=>{var n,i,l,p,c,d,h,u;const o=k(),{searchParams:g}=o,e=N({queryKey:["author",r],queryFn:()=>m.getAuthor(r)}),s=C([...v.feeds.infinite,{author:r,...o.filters}],t=>m.list({...o.filters,author:r,page:t,page_size:12})),x=F.useMemo(()=>{var t;return(((t=s.data)==null?void 0:t.pages)??[]).flatMap(_=>_.results.map(q))},[s.data]),j=((i=(n=s.data)==null?void 0:n.pages[0])==null?void 0:i.count)??0;if(H(e.error))return a.jsx(f,{});if((l=e.data)!=null&&l.organization_slug){const t=g.toString();return a.jsx(y,{to:`/orgs/${e.data.organization_slug}${t?`?${t}`:""}`,replace:!0})}return a.jsxs("div",{className:"page",children:[a.jsxs("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:[a.jsx(A,{to:"/",children:"Home"}),a.jsx("span",{children:" / "}),a.jsx("span",{children:"Authors"}),a.jsx("span",{children:" / "}),a.jsx("span",{children:((p=e.data)==null?void 0:p.full_name)??r})]}),a.jsxs("header",{className:"author-hero",children:[a.jsx("div",{className:"organizations-eyebrow",children:"AUTHOR"}),a.jsxs("div",{className:"author-hero-title",children:[(c=e.data)!=null&&c.photo?a.jsxs("figure",{className:"author-photo",children:[a.jsx("img",{className:"author-avatar-base author-avatar",src:e.data.photo.url,alt:""}),a.jsxs("figcaption",{children:["Photo:"," ",a.jsx("a",{href:e.data.photo.source_url,target:"_blank",rel:"noopener noreferrer",children:e.data.photo.credit}),", ",e.data.photo.license_url?a.jsx("a",{href:e.data.photo.license_url,target:"_blank",rel:"noopener noreferrer",children:e.data.photo.license}):e.data.photo.license]})]}):((d=e.data)==null?void 0:d.hf_username)&&a.jsx(P,{className:"author-avatar",url:e.data.hf_avatar_url,href:`https://huggingface.co/${e.data.hf_username}`,label:`@${e.data.hf_username} on Hugging Face`}),a.jsx("h1",{className:"feed-title",children:((h=e.data)==null?void 0:h.full_name)??a.jsx(z,{className:"h-12 w-64 inline-block"})})]}),e.data&&a.jsxs("div",{className:"feed-subtitle",children:[e.data.paper_count.toLocaleString()," ",e.data.paper_count===1?"paper":"papers",e.data.hf_username&&a.jsxs(a.Fragment,{children:[" · ",a.jsxs("a",{href:`https://huggingface.co/${e.data.hf_username}`,target:"_blank",rel:"noopener noreferrer",children:["@",e.data.hf_username," on Hugging Face ↗"]})]}),e.data.google_scholar_id&&a.jsxs(a.Fragment,{children:[" · ",a.jsx("a",{href:`https://scholar.google.com/citations?user=${encodeURIComponent(e.data.google_scholar_id)}`,target:"_blank",rel:"noopener noreferrer",children:"Google Scholar ↗"})]})]}),e.data&&a.jsx(L,{kind:"author",entityId:e.data.id})]}),a.jsx($,{feed:o,style:{alignItems:"center",gap:16},children:a.jsxs("div",{className:"results-count",children:[j.toLocaleString()," papers"]})}),s.error?a.jsx(R,{variant:"destructive",children:a.jsxs(w,{children:["Failed to load papers."," ",a.jsx("button",{type:"button",onClick:()=>void s.refetch(),children:"Try again"})]})}):a.jsx(S,{query:s,cards:x,empty:((u=e.data)==null?void 0:u.paper_count)===0?"No public papers are available.":"No papers found for this selection."})]})},la=()=>{const{authorId:r}=b();return r?a.jsx(Q,{authorId:r},r):a.jsx(f,{})};export{la as default}; diff --git a/assets/AuthorizePaperEditView-CHGZ2u4_.js b/assets/AuthorizePaperEditView-DtkWcUHu.js similarity index 87% rename from assets/AuthorizePaperEditView-CHGZ2u4_.js rename to assets/AuthorizePaperEditView-DtkWcUHu.js index f873f7af3f5e7e6d6ba7dac26d0fa0d15931f993..d8cec735ab858bda493b4bebfe25d5b6223ed83b 100644 --- a/assets/AuthorizePaperEditView-CHGZ2u4_.js +++ b/assets/AuthorizePaperEditView-DtkWcUHu.js @@ -1 +1 @@ -import{u,a as d,b as l,j as e,L as p,H as c}from"./index-CTkdBAwI.js";import{u as h}from"./useMutation-DXSljxHA.js";import{B as g}from"./button-CJEAPbmU.js";import{p as n}from"./paperEdits-tR7kGJ9o.js";function f(){const{authorizationId:t=""}=u(),{user:s,isLoading:o}=d(),i=l({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(p,{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(g,{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(c,{returnTo:`/authorize-paper-edit/${t}`,label:"Sign in with Hugging Face"}),r.error&&e.jsx("p",{role:"alert",children:r.error.message})]})]})}export{f as default}; +import{u,a as d,b as l,j as e,L as p,H as c}from"./index-D2fBL-s6.js";import{u as h}from"./useMutation-9dlTbuQj.js";import{B as g}from"./button-D0XfbdrX.js";import{p as n}from"./paperEdits-C-9tVqXs.js";function f(){const{authorizationId:t=""}=u(),{user:s,isLoading:o}=d(),i=l({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(p,{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(g,{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(c,{returnTo:`/authorize-paper-edit/${t}`,label:"Sign in with Hugging Face"}),r.error&&e.jsx("p",{role:"alert",children:r.error.message})]})]})}export{f as default}; diff --git a/assets/AutonomousOperations-9dA7U5QM.js b/assets/AutonomousOperations-CPgyKQKJ.js similarity index 94% rename from assets/AutonomousOperations-9dA7U5QM.js rename to assets/AutonomousOperations-CPgyKQKJ.js index f4d48b45b64b077adc1c685b35589ac1c1bacacb..6469db2d160ef9f94767f2001ac583c58597719e 100644 --- a/assets/AutonomousOperations-9dA7U5QM.js +++ b/assets/AutonomousOperations-CPgyKQKJ.js @@ -1 +1 @@ -import{l as R,f as d,b as B,J as C,j as e,L as q}from"./index-CTkdBAwI.js";import{u as Q}from"./useMutation-DXSljxHA.js";import{C as n,e as i,S as H,b as l,c as t,t as E,f as m,o as x}from"./CronDashboard-BzTxMTrv.js";import{B as I}from"./badge-DIkpOdrw.js";import{B as h}from"./button-CJEAPbmU.js";import{I as u}from"./input-C24thzbI.js";import{A as P}from"./activity-BI3KqxVx.js";import{A as D}from"./arrow-left-CROPXr9Q.js";const j={submissions:"Submission review",curation:"Scheduled curation",cron_health:"CRON health",chat_reliability:"Chat reliability"},S={healthy:"healthy",degraded:"degraded",repairing:"running","rolled-back":"broken",manual:"degraded"},V=()=>{var A;const M=R(),[p,T]=d.useState(""),[f,_]=d.useState(""),[b,v]=d.useState({}),[g,N]=d.useState(""),c=B({queryKey:C.autonomousOperations,queryFn:()=>x.getAutonomousOperations(),refetchInterval:3e4,retry:!1}),r=Q({mutationFn:s=>s(),onSuccess:s=>{M.setQueryData(C.autonomousOperations,s),_(""),v({}),N("")}}),a=c.data,y=r.error instanceof Error?r.error.message:null;if(c.isLoading)return e.jsx("div",{className:"page","aria-busy":"true",children:"Loading autonomous operations…"});if(c.error||!a)return e.jsxs("div",{className:"page",children:[e.jsx("h1",{children:"Autonomous operations unavailable"}),e.jsx("p",{children:c.error instanceof Error?c.error.message:"No status was returned."})]});const O=()=>r.mutate(()=>x.setAutonomousManualMode(!a.manual_mode,a.revision,f)),k=(s,o)=>r.mutate(()=>x.setAutonomousOperator(s,o,a.revision,b[s]??"")),w=()=>{var o;const s=((o=a.baseline)==null?void 0:o.revision)??0;r.mutate(()=>x.qualifyAutonomousChatBaseline(p,s,g))};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 space-y-6",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(P,{className:"h-8 w-8"}),"Autonomous operations"]}),e.jsx("p",{className:"mt-2 cron-muted",children:"Content-free supervision, remote controls, and bounded audit history."})]}),e.jsx(h,{asChild:!0,variant:"outline",children:e.jsxs(q,{to:"/admin-dashboard",children:[e.jsx(D,{className:"h-4 w-4 mr-2"}),"Admin dashboard"]})})]}),a.manual_mode&&e.jsx(n,{className:"cron-status--degraded",role:"status",children:e.jsxs(i,{className:"pt-6 flex gap-3",children:[e.jsx(H,{className:"h-5 w-5"}),e.jsxs("div",{children:[e.jsx("strong",{children:"Manual mode is enabled."}),e.jsxs("p",{children:[a.monitoring_active?"Monitoring remains active":"Monitoring is not currently verified","; autonomous callbacks, retries, deployments, and data mutations fail closed."]})]})]})}),e.jsxs("div",{className:"grid md:grid-cols-4 gap-4",children:[e.jsxs(n,{className:E(S[a.display_state]),children:[e.jsx(l,{children:e.jsx(t,{className:"text-sm",children:"Overall state"})}),e.jsxs(i,{children:[e.jsx("div",{className:"text-2xl font-bold capitalize",children:a.display_state}),e.jsxs("p",{className:"text-sm",children:["Monitoring ",a.monitoring_active?"active":"inactive"]})]})]}),e.jsxs(n,{children:[e.jsx(l,{children:e.jsx(t,{className:"text-sm",children:"Codex cost"})}),e.jsxs(i,{children:[e.jsxs("div",{className:"text-2xl font-bold",children:["$",a.costs.total_usd]}),e.jsxs("p",{className:"text-sm",children:[a.costs.input_tokens+a.costs.output_tokens," tokens"]})]})]}),e.jsxs(n,{children:[e.jsx(l,{children:e.jsx(t,{className:"text-sm",children:"Repair lease"})}),e.jsxs(i,{children:[e.jsx("div",{className:"text-lg font-bold",children:a.active_lease?a.active_lease.owner_operator:"Available"}),e.jsx("p",{className:"text-sm",children:a.active_lease?`Expires ${m(a.active_lease.expires_at)}`:"No active source repair"})]})]}),e.jsxs(n,{children:[e.jsx(l,{children:e.jsx(t,{className:"text-sm",children:"Global control"})}),e.jsxs(i,{className:"space-y-2",children:[e.jsx(u,{"aria-label":"Manual mode confirmation",value:f,onChange:s=>_(s.target.value),placeholder:"Type SET_MANUAL_MODE"}),e.jsx(h,{disabled:r.isPending||f!=="SET_MANUAL_MODE",onClick:O,children:a.manual_mode?"Leave manual mode":"Enable manual mode"})]})]})]}),e.jsx("div",{className:"grid md:grid-cols-4 gap-4",children:a.operators.map(s=>e.jsxs(n,{className:E(S[s.status]),children:[e.jsx(l,{children:e.jsxs(t,{className:"flex justify-between gap-2",children:[e.jsx("span",{children:j[s.operator]}),e.jsx(I,{children:s.status})]})}),e.jsxs(i,{className:"space-y-3",children:[e.jsxs("p",{children:[s.enabled?"Mutation enabled":"Mutation disabled"," · monitoring ",s.monitoring_active?"active":"unverified"]}),e.jsxs("p",{className:"text-sm",children:["Next scheduled run: ",s.next_scheduled_run?m(s.next_scheduled_run):"not scheduled"]}),e.jsx(u,{"aria-label":`${j[s.operator]} confirmation`,value:b[s.operator]??"",onChange:o=>v(L=>({...L,[s.operator]:o.target.value})),placeholder:"Type SET_OPERATOR_STATE"}),e.jsx(h,{disabled:r.isPending||a.manual_mode&&!s.enabled||b[s.operator]!=="SET_OPERATOR_STATE",onClick:()=>k(s.operator,!s.enabled),children:s.enabled?"Disable":"Enable"})]})]},s.operator))}),e.jsxs(n,{children:[e.jsx(l,{children:e.jsx(t,{children:"Qualified scalable-chat baseline"})}),e.jsxs(i,{className:"space-y-3",children:[e.jsx("p",{className:"font-mono break-all",children:((A=a.baseline)==null?void 0:A.sha)??"No baseline qualified"}),a.baseline&&e.jsxs("p",{className:"text-sm",children:["Revision ",a.baseline.revision," · ",a.baseline.qualified_by," · ",m(a.baseline.qualified_at)]}),e.jsxs("div",{className:"grid md:grid-cols-[1fr_1fr_auto] gap-2",children:[e.jsx(u,{"aria-label":"Exact baseline SHA",value:p,onChange:s=>T(s.target.value),placeholder:"40-character lowercase commit SHA"}),e.jsx(u,{"aria-label":"Baseline confirmation",value:g,onChange:s=>N(s.target.value),placeholder:"Type QUALIFY_CHAT_BASELINE"}),e.jsx(h,{disabled:r.isPending||!/^[0-9a-f]{40}$/.test(p)||g!=="QUALIFY_CHAT_BASELINE",onClick:w,children:"Qualify exact SHA"})]})]})]}),e.jsxs(n,{children:[e.jsx(l,{children:e.jsx(t,{children:"Provider and fallback state"})}),e.jsx(i,{children:a.provider_states.length?e.jsx("ul",{className:"space-y-2",children:a.provider_states.map(s=>e.jsxs("li",{children:[e.jsx("strong",{children:s.environment}),": ",s.active_provider," · ",s.reason_code," · manifest ",s.manifest_revision]},s.environment))}):e.jsx("p",{children:"No provider state recorded."})})]}),e.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[e.jsxs(n,{children:[e.jsx(l,{children:e.jsx(t,{children:"Recent runs"})}),e.jsx(i,{children:a.recent_runs.length?e.jsx("ul",{className:"space-y-2",children:a.recent_runs.map(s=>e.jsxs("li",{children:[e.jsx("strong",{children:j[s.operator]})," · ",s.status," · ",s.exit_classification," · $",s.cost_usd," · ",m(s.created_at)]},s.run_id))}):e.jsx("p",{children:"No runs recorded."})})]}),e.jsxs(n,{children:[e.jsx(l,{children:e.jsx(t,{children:"Recent actions"})}),e.jsx(i,{children:a.recent_actions.length?e.jsx("ul",{className:"space-y-2",children:a.recent_actions.map(s=>e.jsxs("li",{children:[e.jsx("strong",{children:j[s.operator]})," · ",s.capability," · ",s.reason_code," · ",s.resource_kind,"/",s.resource_identifier]},s.action_id))}):e.jsx("p",{children:"No actions recorded."})})]})]}),e.jsxs(n,{children:[e.jsx(l,{children:e.jsx(t,{children:"Hard exclusions"})}),e.jsx(i,{children:e.jsx("ul",{className:"list-disc pl-5",children:a.exclusions.map(s=>e.jsx("li",{children:s},s))})})]}),y&&e.jsxs("p",{role:"alert",children:["Control update failed: ",y,". Refresh before retrying."]})]})})};export{V as default}; +import{l as R,f as d,b as B,J as C,j as e,L as q}from"./index-D2fBL-s6.js";import{u as Q}from"./useMutation-9dlTbuQj.js";import{C as n,e as i,S as H,b as l,c as t,t as E,f as m,o as x}from"./CronDashboard-C733Wslj.js";import{B as I}from"./badge-Pw584nS3.js";import{B as h}from"./button-D0XfbdrX.js";import{I as u}from"./input-DdobyT4w.js";import{A as P}from"./activity-DWWgzth6.js";import{A as D}from"./arrow-left-CzTG6LBL.js";const j={submissions:"Submission review",curation:"Scheduled curation",cron_health:"CRON health",chat_reliability:"Chat reliability"},S={healthy:"healthy",degraded:"degraded",repairing:"running","rolled-back":"broken",manual:"degraded"},V=()=>{var A;const M=R(),[p,T]=d.useState(""),[f,_]=d.useState(""),[b,v]=d.useState({}),[g,N]=d.useState(""),c=B({queryKey:C.autonomousOperations,queryFn:()=>x.getAutonomousOperations(),refetchInterval:3e4,retry:!1}),r=Q({mutationFn:s=>s(),onSuccess:s=>{M.setQueryData(C.autonomousOperations,s),_(""),v({}),N("")}}),a=c.data,y=r.error instanceof Error?r.error.message:null;if(c.isLoading)return e.jsx("div",{className:"page","aria-busy":"true",children:"Loading autonomous operations…"});if(c.error||!a)return e.jsxs("div",{className:"page",children:[e.jsx("h1",{children:"Autonomous operations unavailable"}),e.jsx("p",{children:c.error instanceof Error?c.error.message:"No status was returned."})]});const O=()=>r.mutate(()=>x.setAutonomousManualMode(!a.manual_mode,a.revision,f)),k=(s,o)=>r.mutate(()=>x.setAutonomousOperator(s,o,a.revision,b[s]??"")),w=()=>{var o;const s=((o=a.baseline)==null?void 0:o.revision)??0;r.mutate(()=>x.qualifyAutonomousChatBaseline(p,s,g))};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 space-y-6",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(P,{className:"h-8 w-8"}),"Autonomous operations"]}),e.jsx("p",{className:"mt-2 cron-muted",children:"Content-free supervision, remote controls, and bounded audit history."})]}),e.jsx(h,{asChild:!0,variant:"outline",children:e.jsxs(q,{to:"/admin-dashboard",children:[e.jsx(D,{className:"h-4 w-4 mr-2"}),"Admin dashboard"]})})]}),a.manual_mode&&e.jsx(n,{className:"cron-status--degraded",role:"status",children:e.jsxs(i,{className:"pt-6 flex gap-3",children:[e.jsx(H,{className:"h-5 w-5"}),e.jsxs("div",{children:[e.jsx("strong",{children:"Manual mode is enabled."}),e.jsxs("p",{children:[a.monitoring_active?"Monitoring remains active":"Monitoring is not currently verified","; autonomous callbacks, retries, deployments, and data mutations fail closed."]})]})]})}),e.jsxs("div",{className:"grid md:grid-cols-4 gap-4",children:[e.jsxs(n,{className:E(S[a.display_state]),children:[e.jsx(l,{children:e.jsx(t,{className:"text-sm",children:"Overall state"})}),e.jsxs(i,{children:[e.jsx("div",{className:"text-2xl font-bold capitalize",children:a.display_state}),e.jsxs("p",{className:"text-sm",children:["Monitoring ",a.monitoring_active?"active":"inactive"]})]})]}),e.jsxs(n,{children:[e.jsx(l,{children:e.jsx(t,{className:"text-sm",children:"Codex cost"})}),e.jsxs(i,{children:[e.jsxs("div",{className:"text-2xl font-bold",children:["$",a.costs.total_usd]}),e.jsxs("p",{className:"text-sm",children:[a.costs.input_tokens+a.costs.output_tokens," tokens"]})]})]}),e.jsxs(n,{children:[e.jsx(l,{children:e.jsx(t,{className:"text-sm",children:"Repair lease"})}),e.jsxs(i,{children:[e.jsx("div",{className:"text-lg font-bold",children:a.active_lease?a.active_lease.owner_operator:"Available"}),e.jsx("p",{className:"text-sm",children:a.active_lease?`Expires ${m(a.active_lease.expires_at)}`:"No active source repair"})]})]}),e.jsxs(n,{children:[e.jsx(l,{children:e.jsx(t,{className:"text-sm",children:"Global control"})}),e.jsxs(i,{className:"space-y-2",children:[e.jsx(u,{"aria-label":"Manual mode confirmation",value:f,onChange:s=>_(s.target.value),placeholder:"Type SET_MANUAL_MODE"}),e.jsx(h,{disabled:r.isPending||f!=="SET_MANUAL_MODE",onClick:O,children:a.manual_mode?"Leave manual mode":"Enable manual mode"})]})]})]}),e.jsx("div",{className:"grid md:grid-cols-4 gap-4",children:a.operators.map(s=>e.jsxs(n,{className:E(S[s.status]),children:[e.jsx(l,{children:e.jsxs(t,{className:"flex justify-between gap-2",children:[e.jsx("span",{children:j[s.operator]}),e.jsx(I,{children:s.status})]})}),e.jsxs(i,{className:"space-y-3",children:[e.jsxs("p",{children:[s.enabled?"Mutation enabled":"Mutation disabled"," · monitoring ",s.monitoring_active?"active":"unverified"]}),e.jsxs("p",{className:"text-sm",children:["Next scheduled run: ",s.next_scheduled_run?m(s.next_scheduled_run):"not scheduled"]}),e.jsx(u,{"aria-label":`${j[s.operator]} confirmation`,value:b[s.operator]??"",onChange:o=>v(L=>({...L,[s.operator]:o.target.value})),placeholder:"Type SET_OPERATOR_STATE"}),e.jsx(h,{disabled:r.isPending||a.manual_mode&&!s.enabled||b[s.operator]!=="SET_OPERATOR_STATE",onClick:()=>k(s.operator,!s.enabled),children:s.enabled?"Disable":"Enable"})]})]},s.operator))}),e.jsxs(n,{children:[e.jsx(l,{children:e.jsx(t,{children:"Qualified scalable-chat baseline"})}),e.jsxs(i,{className:"space-y-3",children:[e.jsx("p",{className:"font-mono break-all",children:((A=a.baseline)==null?void 0:A.sha)??"No baseline qualified"}),a.baseline&&e.jsxs("p",{className:"text-sm",children:["Revision ",a.baseline.revision," · ",a.baseline.qualified_by," · ",m(a.baseline.qualified_at)]}),e.jsxs("div",{className:"grid md:grid-cols-[1fr_1fr_auto] gap-2",children:[e.jsx(u,{"aria-label":"Exact baseline SHA",value:p,onChange:s=>T(s.target.value),placeholder:"40-character lowercase commit SHA"}),e.jsx(u,{"aria-label":"Baseline confirmation",value:g,onChange:s=>N(s.target.value),placeholder:"Type QUALIFY_CHAT_BASELINE"}),e.jsx(h,{disabled:r.isPending||!/^[0-9a-f]{40}$/.test(p)||g!=="QUALIFY_CHAT_BASELINE",onClick:w,children:"Qualify exact SHA"})]})]})]}),e.jsxs(n,{children:[e.jsx(l,{children:e.jsx(t,{children:"Provider and fallback state"})}),e.jsx(i,{children:a.provider_states.length?e.jsx("ul",{className:"space-y-2",children:a.provider_states.map(s=>e.jsxs("li",{children:[e.jsx("strong",{children:s.environment}),": ",s.active_provider," · ",s.reason_code," · manifest ",s.manifest_revision]},s.environment))}):e.jsx("p",{children:"No provider state recorded."})})]}),e.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[e.jsxs(n,{children:[e.jsx(l,{children:e.jsx(t,{children:"Recent runs"})}),e.jsx(i,{children:a.recent_runs.length?e.jsx("ul",{className:"space-y-2",children:a.recent_runs.map(s=>e.jsxs("li",{children:[e.jsx("strong",{children:j[s.operator]})," · ",s.status," · ",s.exit_classification," · $",s.cost_usd," · ",m(s.created_at)]},s.run_id))}):e.jsx("p",{children:"No runs recorded."})})]}),e.jsxs(n,{children:[e.jsx(l,{children:e.jsx(t,{children:"Recent actions"})}),e.jsx(i,{children:a.recent_actions.length?e.jsx("ul",{className:"space-y-2",children:a.recent_actions.map(s=>e.jsxs("li",{children:[e.jsx("strong",{children:j[s.operator]})," · ",s.capability," · ",s.reason_code," · ",s.resource_kind,"/",s.resource_identifier]},s.action_id))}):e.jsx("p",{children:"No actions recorded."})})]})]}),e.jsxs(n,{children:[e.jsx(l,{children:e.jsx(t,{children:"Hard exclusions"})}),e.jsx(i,{children:e.jsx("ul",{className:"list-disc pl-5",children:a.exclusions.map(s=>e.jsx("li",{children:s},s))})})]}),y&&e.jsxs("p",{role:"alert",children:["Control update failed: ",y,". Refresh before retrying."]})]})})};export{V as default}; diff --git a/assets/BenchmarkDetailView-BD72eXzJ.js b/assets/BenchmarkDetailView-CLQh8rRr.js similarity index 98% rename from assets/BenchmarkDetailView-BD72eXzJ.js rename to assets/BenchmarkDetailView-CLQh8rRr.js index e8810f2309e369a77b0c7927423f8512921ef387..fa4ef5c329645fa0d31f362ddb601e0ba0a76591 100644 --- a/assets/BenchmarkDetailView-BD72eXzJ.js +++ b/assets/BenchmarkDetailView-CLQh8rRr.js @@ -1,2 +1,2 @@ -import{f as L,j as a,M as le,L as ne,k as dt,x as ut,u as mt,e as ht,b as te,q as de,t as ft,T as oe}from"./index-CTkdBAwI.js";import{R as pt}from"./ResearchFollowButton-gAamAHri.js";import{c as re}from"./catalog-ZV4aeC2F.js";import{C as gt,E as xt,e as bt}from"./ExternalSourceEvalBadge-bt0V7K9M.js";import{u as yt}from"./preferences-BMkWyA3F.js";import{L as ce}from"./LatexTitle-BmCQe_rK.js";import{S as Ge}from"./switch-B-_Aen3O.js";import{I as wt}from"./Icon-DSoTeS9V.js";import{S as ue}from"./skeleton-p2_v-2W8.js";import{A as vt,a as jt}from"./alert-5nuL0v_r.js";import{B as _t}from"./BenchmarkTrendSparkline-CHEb1nF4.js";import{s as St}from"./safeExternalHref-CkBrsh84.js";import{s as kt}from"./slug-BpH-Nkvz.js";import{i as Ct}from"./apiErrors-DFeecPSH.js";import Et from"./NotFound-BE9xg6GA.js";import"./researchTopic-B8hMcjil.js";import"./useMutation-DXSljxHA.js";import"./plus-Dhoq_Vs9.js";import"./curation-BlGrJ3z2.js";import"./hover-card-murUA8RP.js";import"./account-Ck5qYpM8.js";import"./index-tW8cPsfP.js";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 Xe=[{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 Nt(e){const t=e===null?void 0:Number(e);return Xe.some(r=>r.maxParametersExclusive===t)?t:void 0}function Rt(e){return new Intl.NumberFormat("en",{notation:"compact",maximumSignificantDigits:3}).format(e)}function Pt(e){return[e.paper_id,e.task_id,e.dataset_id,e.model_name,e.harness??""].join("|")}function Tt(e){const t=new Map;for(const r of e){const s=Pt(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 Ae(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 Lt(e,t){const r=e.evaluated_on;return r&&r!==t&&r!==$t(e.updated_at)?r:e.paper_published_date||""}function It(e,t,r){if(e.length===0)return{points:[],sota:0,sotaModel:""};const s=Ft(e),n=e.map(u=>{var R;const h=ie((R=u.metrics)==null?void 0:R[t]);return{eval:u,value:h,date:Lt(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 At(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 Ye(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 Bt(e){var _,X,Y;const{evaluations:t,tasks:r,taskSlug:s,highlightEvalId:n,parameterBound:i,showMoreMetrics:l,fittingMetricCount:c=1}=e,d=Ye(r,t,s,n),f=r.find(o=>o.id===d)||r[0]||null,x=t.find(o=>o.id===n),u=At(t,d,e.hideClosed),h=Tt(u.visible),R=Ae(h,i),C=e.configuredMetrics.map(o=>o.metric_name),P=Array.from(new Set(h.flatMap(o=>[...o.best_metric?[o.best_metric]:[],...Object.keys(o.metrics||{})]))),S=C.length?C:P,g=new Map;for(const o of h){const m=o.best_metric;!m||ie(o.metrics[m])===null||C.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:Be(o,j)-Be(m,j)});let I=null,N=0;const G=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:Mt(o,n)}}),{points:z,sota:ee,sotaModel:O}=It(R,j,D),M=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:G,chartPoints:z,highlightedEval:((Y=G.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:Xe.map(o=>({...o,selected:i===o.maxParametersExclusive,disabled:i!==o.maxParametersExclusive&&Ae(h,o.maxParametersExclusive).length===0})),displayedMetric:U?j:M==null?void 0:M.metric,displayedSota:U?ee:M==null?void 0:M.value,displayedSotaModel:U?O:M==null?void 0:M.model_name,isSummaryLoading:!U&&!M,isInitialFilteredViewLoading:i!==void 0&&!U}}function Dt(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+pe(t,s),0),harness:pe(t,"--bm-harness-width"),metric:pe(t,"--bm-metric-width")}}const Vt=20;function De(e,t){return e?a.jsx(ce,{title:e}):t||"—"}function Wt({model:e,showHarness:t,setMetric:r,highlightRowRef:s,onFittingMetricCountChange:n}){const{rows:i,visibleMetrics:l,activeMetric:c,arrow:d}=e,[f,x]=L.useState(null);return L.useEffect(()=>{if(!f)return;const u=()=>{f.classList.toggle("has-horizontal-overflow",f.scrollWidth>f.clientWidth);const R=f.firstElementChild;if(!R)return;const C=f.clientWidth,P=Ht(R);f.classList.toggle("unpins-trailing-columns",CS.clientHeight?0:Vt;n(k=>Dt(C,P,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.jsxs("th",{className:"col-parameters",children:[a.jsx("span",{className:"bm-label-full",children:"Parameters"}),a.jsx("span",{className:"bm-label-short",children:"Params"})]}),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 C=u.paper_arxiv_id||u.paper_id,P=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(gt,{}),(u.external??u.is_external)&&a.jsx(xt,{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?"—":Rt(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:C?a.jsx(ne,{to:`/paper/${C}`,title:u.paper_title||P||void 0,children:De(u.paper_title,P)}):De(u.paper_title,P)}),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 He(e){const t=e.length===7?`${e}-01`:e,r=new Date(t).getTime();return Number.isFinite(r)?r:0}const ge=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function xe(e){const t=new Date(e);return{year:t.getFullYear(),month:t.getMonth()}}function Ot(e,t){if(e===t){const{year:d,month:f}=xe(e);return[{timestamp:new Date(d,f,1).getTime(),key:`${d}-${f}`,label:`${ge[f]} ${d}`}]}const r=xe(e),s=xe(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?`${ge[h]} ${r.year}`:ge[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 Ut=({points:e,metric:t})=>{const r=dt(),[s,n]=L.useState(null),i=880,l=320,c=60,d=30,f=40,x=50,u=e.map(o=>o.value),h=Math.min(...u),C=Math.max(...u)-h||1,P=i-c-d,S=l-f-x,g=e.map(o=>He(o.date)),k=Math.min(...g),B=Math.max(...g),j=B-k||1,D=o=>k===B?c+P/2:c+(o-k)/j*P,W=e.map((o,m)=>{const p=D(He(o.date)),y=(o.value-h)/C,T=f+S*(1-y);return{x:p,y:T,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 T=o.x-y/2,E=o.x+y/2,v="middle";return Ti-d&&(E=i-d,T=E-y,v="end"),{x:v==="start"?c:v==="end"?i-d:o.x,y:o.y-G,text:p,anchor:v,left:T,right:E}},ee=[],O=w.length>0?z(w[w.length-1]):null;let M=-1/0;for(let o=0;oO.left-N||(M=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=Ot(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}`,T=!!o.data.paperRouteId;return a.jsxs("g",{children:[m,a.jsx("circle",{cx:o.x,cy:o.y,r:"10",fill:"transparent",style:{cursor:T?"pointer":"default",outline:"none"},tabIndex:0,role:T?"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:E=>{T&&(E.key==="Enter"||E.key===" ")&&(E.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),T=h+C*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(T)})]},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)}`,E=Math.max(120,Math.min(340,y.length*6.6+24)),v=30;let H=o.x-E/2;Hi-d&&(H=i-d-E);const Q=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:Q,width:E,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:Q+19,fontSize:"12",fontFamily:"var(--sans)",fill:"var(--ink)",fontWeight:500,children:y})]})})()]})};function qt(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 zt=(()=>{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 Yt(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 Jt(e){return Promise.resolve().then(()=>new XMLSerializer().serializeToString(e)).then(encodeURIComponent).then(t=>`data:image/svg+xml;charset=utf-8,${t}`)}async function Zt(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),Jt(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 er(e){const t=e.getPropertyValue("content");return`${e.cssText} content: '${t.replace(/'|"/g,"")}';`}function tr(e,t){return Je(t).map(r=>{const s=e.getPropertyValue(r),n=e.getPropertyPriority(r);return`${r}: ${s}${n?" !important":""};`}).join(" ")}function rr(e,t,r,s){const n=`.${e}:${t}`,i=r.cssText?er(r):tr(r,s);return document.createTextNode(`${n}{${i}}`)}function Ve(e,t,r,s){const n=window.getComputedStyle(e,r),i=n.getPropertyValue("content");if(i===""||i==="none")return;const l=zt();try{t.className=`${t.className} ${l}`}catch{return}const c=document.createElement("style");c.appendChild(rr(l,r,n,s)),t.appendChild(c)}function ar(e,t,r){Ve(e,t,":before",r),Ve(e,t,":after",r)}const We="application/font-woff",Oe="image/jpeg",sr={woff:We,woff2:We,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:Oe,jpeg:Oe,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml",webp:"image/webp"};function nr(e){const t=/\.([^./]*?)$/g.exec(e);return t?t[1]:""}function ve(e){const t=nr(e).toLowerCase();return sr[t]||""}function ir(e){return e.split(/,/)[1]}function ye(e){return e.search(/^(data:)/)!==-1}function lr(e,t){return`data:${t};base64,${e}`}async function et(e,t,r){const s=await fetch(e,t);if(s.status===404)throw new Error(`Resource "${s.url}" not found`);const 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 be={};function or(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 je(e,t,r){const s=or(e,t,r.includeQueryParams);if(be[s]!=null)return be[s];r.cacheBust&&(e+=(/\?/.test(e)?"&":"?")+new Date().getTime());let n;try{const i=await et(e,r.fetchRequestInit,({res:l,result:c})=>(t||(t=l.headers.get("Content-Type")||""),ir(c)));n=lr(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 be[s]=n,n}async function cr(e){const t=e.toDataURL();return t==="data:,"?e.cloneNode(!1):he(t)}async function dr(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 he(c)}const r=e.poster,s=ve(r),n=await je(r,s,t);return he(n)}async function ur(e,t){var r;try{if(!((r=e==null?void 0:e.contentDocument)===null||r===void 0)&&r.body)return await fe(e.contentDocument.body,t,!0)}catch{}return e.cloneNode(!1)}async function mr(e,t){return A(e,HTMLCanvasElement)?cr(e):A(e,HTMLVideoElement)?dr(e,t):A(e,HTMLIFrameElement)?ur(e,t):e.cloneNode(tt(e))}const hr=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SLOT",tt=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SVG";async function fr(e,t,r){var s,n;if(tt(t))return t;let i=[];return hr(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(()=>fe(c,r)).then(d=>{d&&t.appendChild(d)}),Promise.resolve()),t}function pr(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):Je(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 gr(e,t){A(e,HTMLTextAreaElement)&&(t.innerHTML=e.value),A(e,HTMLInputElement)&&t.setAttribute("value",e.value)}function xr(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 br(e,t,r){return A(t,Element)&&(pr(e,t,r),ar(e,t,r),gr(e,t),xr(e,t)),t}async function yr(e,t){const r=e.querySelectorAll?e.querySelectorAll("use"):[];if(r.length===0)return e;const s={};for(let i=0;imr(s,t)).then(s=>fr(e,s,t)).then(s=>br(e,s,t)).then(s=>yr(s,t))}const rt=/url\((['"]?)([^'"]+?)\1\)/g,wr=/url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g,vr=/src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;function jr(e){const t=e.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1");return new RegExp(`(url\\(['"]?)(${t})(['"]?\\))`,"g")}function _r(e){const t=[];return e.replace(rt,(r,s,n)=>(t.push(n),r)),t.filter(r=>!ye(r))}async function Sr(e,t,r,s,n){try{const i=r?qt(t,r):t,l=ve(t);let c;return n||(c=await je(i,l,s)),e.replace(jr(t),`$1${c}$3`)}catch{}return e}function kr(e,{preferredFontFormat:t}){return t?e.replace(vr,r=>{for(;;){const[s,,n]=wr.exec(r)||[];if(!n)return"";if(n===t)return`src: ${s};`}}):e}function at(e){return e.search(rt)!==-1}async function st(e,t,r){if(!at(e))return e;const s=kr(e,r);return _r(s).reduce((i,l)=>i.then(c=>Sr(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 st(n,null,r);return t.style.setProperty(e,i,t.style.getPropertyPriority(e)),!0}return!1}async function Cr(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 Er(e,t){const r=A(e,HTMLImageElement);if(!(r&&!ye(e.src))&&!(A(e,SVGImageElement)&&!ye(e.href.baseVal)))return;const s=r?e.src:e.href.baseVal,n=await je(s,ve(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 Nr(e,t){const s=Z(e.childNodes).map(n=>nt(n,t));await Promise.all(s).then(()=>e)}async function nt(e,t){A(e,Element)&&(await Cr(e,t),await Er(e,t),await Nr(e,t))}function Rr(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 Ue={};async function qe(e){let t=Ue[e];if(t!=null)return t;const s=await(await fetch(e)).text();return t={url:e,cssText:s},Ue[e]=t,t}async function ze(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),et(c,t.fetchRequestInit,({result:d})=>(r=r.replace(l,`url(${d})`),[l,d]))});return Promise.all(i).then(()=>r)}function Ke(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 Pr(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=qe(d).then(x=>ze(x,t)).then(x=>Ke(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(qe(n.href).then(c=>ze(c,t)).then(c=>Ke(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 Tr(e){return e.filter(t=>t.type===CSSRule.FONT_FACE_RULE).filter(t=>at(t.style.getPropertyValue("src")))}async function Mr(e,t){if(e.ownerDocument==null)throw new Error("Provided element is not within a Document");const r=Z(e.ownerDocument.styleSheets),s=await Pr(r,t);return Tr(s)}function it(e){return e.trim().replace(/["']/g,"")}function $r(e){const t=new Set;function r(s){(s.style.fontFamily||getComputedStyle(s).fontFamily).split(",").forEach(i=>{t.add(it(i))}),Array.from(s.children).forEach(i=>{i instanceof HTMLElement&&r(i)})}return r(e),t}async function Fr(e,t){const r=await Mr(e,t),s=$r(e);return(await Promise.all(r.filter(i=>s.has(it(i.style.fontFamily))).map(i=>{const l=i.parentStyleSheet?i.parentStyleSheet.href:null;return st(i.cssText,l,t)}))).join(` +import{f as L,j as a,M as le,L as ne,k as dt,x as ut,u as mt,e as ht,b as te,q as de,t as ft,T as oe}from"./index-D2fBL-s6.js";import{R as pt}from"./ResearchFollowButton-Bwb5EiPm.js";import{c as re}from"./catalog-5AxvKr4D.js";import{C as gt,E as xt,e as bt}from"./ExternalSourceEvalBadge-C2AscbJz.js";import{u as yt}from"./preferences-BHmRHfHN.js";import{L as ce}from"./LatexTitle-WIQJ1ke0.js";import{S as Ge}from"./switch-B4eVY4fu.js";import{I as wt}from"./Icon-Uhh78KjL.js";import{S as ue}from"./skeleton-BDwfco0_.js";import{A as vt,a as jt}from"./alert-PnePcfgX.js";import{B as _t}from"./BenchmarkTrendSparkline-BV1XDSWE.js";import{s as St}from"./safeExternalHref-CkBrsh84.js";import{s as kt}from"./slug-BpH-Nkvz.js";import{i as Ct}from"./apiErrors-DV2aaDjL.js";import Et from"./NotFound-L0ldWZg9.js";import"./researchTopic-jOpECA0z.js";import"./useMutation-9dlTbuQj.js";import"./plus-BI8-JXK0.js";import"./curation-BtfabyzA.js";import"./hover-card-DWpZK4fW.js";import"./account-BHlQBDNT.js";import"./index-C_9KPu-E.js";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 Xe=[{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 Nt(e){const t=e===null?void 0:Number(e);return Xe.some(r=>r.maxParametersExclusive===t)?t:void 0}function Rt(e){return new Intl.NumberFormat("en",{notation:"compact",maximumSignificantDigits:3}).format(e)}function Pt(e){return[e.paper_id,e.task_id,e.dataset_id,e.model_name,e.harness??""].join("|")}function Tt(e){const t=new Map;for(const r of e){const s=Pt(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 Ae(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 Lt(e,t){const r=e.evaluated_on;return r&&r!==t&&r!==$t(e.updated_at)?r:e.paper_published_date||""}function It(e,t,r){if(e.length===0)return{points:[],sota:0,sotaModel:""};const s=Ft(e),n=e.map(u=>{var R;const h=ie((R=u.metrics)==null?void 0:R[t]);return{eval:u,value:h,date:Lt(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 At(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 Ye(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 Bt(e){var _,X,Y;const{evaluations:t,tasks:r,taskSlug:s,highlightEvalId:n,parameterBound:i,showMoreMetrics:l,fittingMetricCount:c=1}=e,d=Ye(r,t,s,n),f=r.find(o=>o.id===d)||r[0]||null,x=t.find(o=>o.id===n),u=At(t,d,e.hideClosed),h=Tt(u.visible),R=Ae(h,i),C=e.configuredMetrics.map(o=>o.metric_name),P=Array.from(new Set(h.flatMap(o=>[...o.best_metric?[o.best_metric]:[],...Object.keys(o.metrics||{})]))),S=C.length?C:P,g=new Map;for(const o of h){const m=o.best_metric;!m||ie(o.metrics[m])===null||C.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:Be(o,j)-Be(m,j)});let I=null,N=0;const G=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:Mt(o,n)}}),{points:z,sota:ee,sotaModel:O}=It(R,j,D),M=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:G,chartPoints:z,highlightedEval:((Y=G.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:Xe.map(o=>({...o,selected:i===o.maxParametersExclusive,disabled:i!==o.maxParametersExclusive&&Ae(h,o.maxParametersExclusive).length===0})),displayedMetric:U?j:M==null?void 0:M.metric,displayedSota:U?ee:M==null?void 0:M.value,displayedSotaModel:U?O:M==null?void 0:M.model_name,isSummaryLoading:!U&&!M,isInitialFilteredViewLoading:i!==void 0&&!U}}function Dt(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+pe(t,s),0),harness:pe(t,"--bm-harness-width"),metric:pe(t,"--bm-metric-width")}}const Vt=20;function De(e,t){return e?a.jsx(ce,{title:e}):t||"—"}function Wt({model:e,showHarness:t,setMetric:r,highlightRowRef:s,onFittingMetricCountChange:n}){const{rows:i,visibleMetrics:l,activeMetric:c,arrow:d}=e,[f,x]=L.useState(null);return L.useEffect(()=>{if(!f)return;const u=()=>{f.classList.toggle("has-horizontal-overflow",f.scrollWidth>f.clientWidth);const R=f.firstElementChild;if(!R)return;const C=f.clientWidth,P=Ht(R);f.classList.toggle("unpins-trailing-columns",CS.clientHeight?0:Vt;n(k=>Dt(C,P,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.jsxs("th",{className:"col-parameters",children:[a.jsx("span",{className:"bm-label-full",children:"Parameters"}),a.jsx("span",{className:"bm-label-short",children:"Params"})]}),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 C=u.paper_arxiv_id||u.paper_id,P=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(gt,{}),(u.external??u.is_external)&&a.jsx(xt,{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?"—":Rt(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:C?a.jsx(ne,{to:`/paper/${C}`,title:u.paper_title||P||void 0,children:De(u.paper_title,P)}):De(u.paper_title,P)}),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 He(e){const t=e.length===7?`${e}-01`:e,r=new Date(t).getTime();return Number.isFinite(r)?r:0}const ge=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function xe(e){const t=new Date(e);return{year:t.getFullYear(),month:t.getMonth()}}function Ot(e,t){if(e===t){const{year:d,month:f}=xe(e);return[{timestamp:new Date(d,f,1).getTime(),key:`${d}-${f}`,label:`${ge[f]} ${d}`}]}const r=xe(e),s=xe(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?`${ge[h]} ${r.year}`:ge[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 Ut=({points:e,metric:t})=>{const r=dt(),[s,n]=L.useState(null),i=880,l=320,c=60,d=30,f=40,x=50,u=e.map(o=>o.value),h=Math.min(...u),C=Math.max(...u)-h||1,P=i-c-d,S=l-f-x,g=e.map(o=>He(o.date)),k=Math.min(...g),B=Math.max(...g),j=B-k||1,D=o=>k===B?c+P/2:c+(o-k)/j*P,W=e.map((o,m)=>{const p=D(He(o.date)),y=(o.value-h)/C,T=f+S*(1-y);return{x:p,y:T,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 T=o.x-y/2,E=o.x+y/2,v="middle";return Ti-d&&(E=i-d,T=E-y,v="end"),{x:v==="start"?c:v==="end"?i-d:o.x,y:o.y-G,text:p,anchor:v,left:T,right:E}},ee=[],O=w.length>0?z(w[w.length-1]):null;let M=-1/0;for(let o=0;oO.left-N||(M=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=Ot(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}`,T=!!o.data.paperRouteId;return a.jsxs("g",{children:[m,a.jsx("circle",{cx:o.x,cy:o.y,r:"10",fill:"transparent",style:{cursor:T?"pointer":"default",outline:"none"},tabIndex:0,role:T?"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:E=>{T&&(E.key==="Enter"||E.key===" ")&&(E.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),T=h+C*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(T)})]},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)}`,E=Math.max(120,Math.min(340,y.length*6.6+24)),v=30;let H=o.x-E/2;Hi-d&&(H=i-d-E);const Q=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:Q,width:E,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:Q+19,fontSize:"12",fontFamily:"var(--sans)",fill:"var(--ink)",fontWeight:500,children:y})]})})()]})};function qt(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 zt=(()=>{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 Yt(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 Jt(e){return Promise.resolve().then(()=>new XMLSerializer().serializeToString(e)).then(encodeURIComponent).then(t=>`data:image/svg+xml;charset=utf-8,${t}`)}async function Zt(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),Jt(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 er(e){const t=e.getPropertyValue("content");return`${e.cssText} content: '${t.replace(/'|"/g,"")}';`}function tr(e,t){return Je(t).map(r=>{const s=e.getPropertyValue(r),n=e.getPropertyPriority(r);return`${r}: ${s}${n?" !important":""};`}).join(" ")}function rr(e,t,r,s){const n=`.${e}:${t}`,i=r.cssText?er(r):tr(r,s);return document.createTextNode(`${n}{${i}}`)}function Ve(e,t,r,s){const n=window.getComputedStyle(e,r),i=n.getPropertyValue("content");if(i===""||i==="none")return;const l=zt();try{t.className=`${t.className} ${l}`}catch{return}const c=document.createElement("style");c.appendChild(rr(l,r,n,s)),t.appendChild(c)}function ar(e,t,r){Ve(e,t,":before",r),Ve(e,t,":after",r)}const We="application/font-woff",Oe="image/jpeg",sr={woff:We,woff2:We,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:Oe,jpeg:Oe,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml",webp:"image/webp"};function nr(e){const t=/\.([^./]*?)$/g.exec(e);return t?t[1]:""}function ve(e){const t=nr(e).toLowerCase();return sr[t]||""}function ir(e){return e.split(/,/)[1]}function ye(e){return e.search(/^(data:)/)!==-1}function lr(e,t){return`data:${t};base64,${e}`}async function et(e,t,r){const s=await fetch(e,t);if(s.status===404)throw new Error(`Resource "${s.url}" not found`);const 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 be={};function or(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 je(e,t,r){const s=or(e,t,r.includeQueryParams);if(be[s]!=null)return be[s];r.cacheBust&&(e+=(/\?/.test(e)?"&":"?")+new Date().getTime());let n;try{const i=await et(e,r.fetchRequestInit,({res:l,result:c})=>(t||(t=l.headers.get("Content-Type")||""),ir(c)));n=lr(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 be[s]=n,n}async function cr(e){const t=e.toDataURL();return t==="data:,"?e.cloneNode(!1):he(t)}async function dr(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 he(c)}const r=e.poster,s=ve(r),n=await je(r,s,t);return he(n)}async function ur(e,t){var r;try{if(!((r=e==null?void 0:e.contentDocument)===null||r===void 0)&&r.body)return await fe(e.contentDocument.body,t,!0)}catch{}return e.cloneNode(!1)}async function mr(e,t){return A(e,HTMLCanvasElement)?cr(e):A(e,HTMLVideoElement)?dr(e,t):A(e,HTMLIFrameElement)?ur(e,t):e.cloneNode(tt(e))}const hr=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SLOT",tt=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SVG";async function fr(e,t,r){var s,n;if(tt(t))return t;let i=[];return hr(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(()=>fe(c,r)).then(d=>{d&&t.appendChild(d)}),Promise.resolve()),t}function pr(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):Je(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 gr(e,t){A(e,HTMLTextAreaElement)&&(t.innerHTML=e.value),A(e,HTMLInputElement)&&t.setAttribute("value",e.value)}function xr(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 br(e,t,r){return A(t,Element)&&(pr(e,t,r),ar(e,t,r),gr(e,t),xr(e,t)),t}async function yr(e,t){const r=e.querySelectorAll?e.querySelectorAll("use"):[];if(r.length===0)return e;const s={};for(let i=0;imr(s,t)).then(s=>fr(e,s,t)).then(s=>br(e,s,t)).then(s=>yr(s,t))}const rt=/url\((['"]?)([^'"]+?)\1\)/g,wr=/url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g,vr=/src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;function jr(e){const t=e.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1");return new RegExp(`(url\\(['"]?)(${t})(['"]?\\))`,"g")}function _r(e){const t=[];return e.replace(rt,(r,s,n)=>(t.push(n),r)),t.filter(r=>!ye(r))}async function Sr(e,t,r,s,n){try{const i=r?qt(t,r):t,l=ve(t);let c;return n||(c=await je(i,l,s)),e.replace(jr(t),`$1${c}$3`)}catch{}return e}function kr(e,{preferredFontFormat:t}){return t?e.replace(vr,r=>{for(;;){const[s,,n]=wr.exec(r)||[];if(!n)return"";if(n===t)return`src: ${s};`}}):e}function at(e){return e.search(rt)!==-1}async function st(e,t,r){if(!at(e))return e;const s=kr(e,r);return _r(s).reduce((i,l)=>i.then(c=>Sr(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 st(n,null,r);return t.style.setProperty(e,i,t.style.getPropertyPriority(e)),!0}return!1}async function Cr(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 Er(e,t){const r=A(e,HTMLImageElement);if(!(r&&!ye(e.src))&&!(A(e,SVGImageElement)&&!ye(e.href.baseVal)))return;const s=r?e.src:e.href.baseVal,n=await je(s,ve(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 Nr(e,t){const s=Z(e.childNodes).map(n=>nt(n,t));await Promise.all(s).then(()=>e)}async function nt(e,t){A(e,Element)&&(await Cr(e,t),await Er(e,t),await Nr(e,t))}function Rr(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 Ue={};async function qe(e){let t=Ue[e];if(t!=null)return t;const s=await(await fetch(e)).text();return t={url:e,cssText:s},Ue[e]=t,t}async function ze(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),et(c,t.fetchRequestInit,({result:d})=>(r=r.replace(l,`url(${d})`),[l,d]))});return Promise.all(i).then(()=>r)}function Ke(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 Pr(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=qe(d).then(x=>ze(x,t)).then(x=>Ke(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(qe(n.href).then(c=>ze(c,t)).then(c=>Ke(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 Tr(e){return e.filter(t=>t.type===CSSRule.FONT_FACE_RULE).filter(t=>at(t.style.getPropertyValue("src")))}async function Mr(e,t){if(e.ownerDocument==null)throw new Error("Provided element is not within a Document");const r=Z(e.ownerDocument.styleSheets),s=await Pr(r,t);return Tr(s)}function it(e){return e.trim().replace(/["']/g,"")}function $r(e){const t=new Set;function r(s){(s.style.fontFamily||getComputedStyle(s).fontFamily).split(",").forEach(i=>{t.add(it(i))}),Array.from(s.children).forEach(i=>{i instanceof HTMLElement&&r(i)})}return r(e),t}async function Fr(e,t){const r=await Mr(e,t),s=$r(e);return(await Promise.all(r.filter(i=>s.has(it(i.style.fontFamily))).map(i=>{const l=i.parentStyleSheet?i.parentStyleSheet.href:null;return st(i.cssText,l,t)}))).join(` `)}async function Lr(e,t){const r=t.fontEmbedCSS!=null?t.fontEmbedCSS:t.skipFonts?null:await Fr(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 Ir(e,t={}){const{width:r,height:s}=Ze(e,t),n=await fe(e,t,!0);return await Lr(n,t),await nt(n,t),Rr(n,t),await Zt(n,r,s)}async function Ar(e,t={}){const{width:r,height:s}=Ze(e,t),n=await Ir(e,t),i=await he(n),l=document.createElement("canvas"),c=l.getContext("2d"),d=t.pixelRatio||Gt(),f=t.canvasWidth||r,x=t.canvasHeight||s;return l.width=f*d,l.height=x*d,t.skipAutoScale||Xt(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 Br(e,t={}){const r=await Ar(e,t);return await Yt(r)}const we="#ffffff";function Dr(){return typeof window>"u"?we:window.getComputedStyle(document.documentElement).getPropertyValue("--bg-elevated").trim()||we}function Hr(e){if(typeof window>"u")return we;const t=window.getComputedStyle(e).backgroundColor;return!t||t==="rgba(0, 0, 0, 0)"||t==="transparent"?Dr():t}async function Vr(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 Br(e,{pixelRatio:2,cacheBust:!0,backgroundColor:Hr(e)});if(!t)throw new Error("Failed to render screenshot.");await window.navigator.clipboard.write([new window.ClipboardItem({"image/png":t})])}const lt=({targetRef:e,label:t})=>{const{toast:r}=ut(),[s,n]=L.useState("idle"),i=L.useRef(null);L.useEffect(()=>()=>{i.current!==null&&window.clearTimeout(i.current)},[]);const l=L.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 Vr(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(wt,{name:"copy",size:11}),c]})};function Wr({model:e,datasetName:t,hideClosed:r,setHideClosed:s,setMetric:n}){const i=L.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(Ge,{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(lt,{targetRef:i,label:"SOTA chart"})]})]}),a.jsx("div",{className:"bm-chart-wrap",children:a.jsx(Ut,{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 Or(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 Qe(e,t){return e?a.jsx(ce,{title:e}):t||"—"}const ma=()=>{var _e,Se,ke,Ce,Ee,Ne,Re,Pe,Te,Me,$e;const{datasetSlug:e}=mt(),[t,r]=ht(),s=t.get("task")||void 0,n=t.get("eval")||void 0,i=Nt(t.get("max_parameters_exclusive")),{preferences:l,setHideClosedSourceEvals:c}=yt(),d=L.useRef(null),f=L.useRef(!1),x=L.useRef(null),[u,h]=L.useState(null),R=`${e}:${s||""}`,C=u===R,[P,S]=L.useState(1),g=te({queryKey:[...de.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:oe}),k=te({queryKey:ft.byDataset((_e=g.data)==null?void 0:_e.id),queryFn:()=>bt.byDataset(g.data.id),enabled:!!((Se=g.data)!=null&&Se.id),staleTime:5*60*1e3}),B=te({queryKey:[...de.datasetTasks,(ke=g.data)==null?void 0:ke.id],queryFn:()=>re.datasetTasks(g.data.id),enabled:!!((Ce=g.data)!=null&&Ce.id),staleTime:oe}),j=te({queryKey:["metric-directions"],queryFn:()=>re.metricDirections(),staleTime:60*60*1e3}),D=Ye(B.data||[],k.data||[],s,n),W=te({queryKey:[...de.taskBenchmarkTrends,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&&!!((Ee=g.data)!=null&&Ee.id),staleTime:oe}),w=L.useMemo(()=>{var b;return(((b=W.data)==null?void 0:b.results)||[]).find($=>{var F;return $.id===((F=g.data)==null?void 0:F.id)})||null},[W.data,(Ne=g.data)==null?void 0:Ne.id]),q=te({queryKey:["leaderboard-metrics",(Re=g.data)==null?void 0:Re.id,D],queryFn:()=>re.leaderboardMetrics(g.data.id,D),enabled:!!((Pe=g.data)!=null&&Pe.id)&&!!D,staleTime:oe}),I=Bt({evaluations:k.data||[],tasks:B.data||[],configuredMetrics:q.data||[],directions:j.data,initialSummary:(Te=g.data)==null?void 0:Te.leaderboard_summary,taskSlug:s,highlightEvalId:n,metric:t.get("metric")||void 0,hideClosed:l.hide_closed_source_evals,parameterBound:i,showMoreMetrics:C,fittingMetricCount:P,ready:{evaluations:k.isSuccess,tasks:B.isSuccess,directions:j.isSuccess,metrics:q.isSuccess}}),{primaryTask:N,hiddenClosedEvals:G,hiddenClosedTopEval:z,isSummaryLoading:ee,displayedMetric:O,displayedSota:M,displayedSotaModel:U,isInitialFilteredViewLoading:K,highlightedEval:_,hasParameterMetadata:X,parameterCoverage:Y,orderedMetrics:o}=I;L.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:de.area(N==null?void 0:N.area_id),queryFn:()=>re.getArea(N.area_id),enabled:!!(N!=null&&N.area_id),staleTime:oe});if(g.isLoading)return a.jsxs("div",{className:"page",children:[a.jsx(ue,{className:"h-12 w-1/2 mb-6"}),a.jsx(ue,{className:"h-64 w-full"})]});if(Ct(g.error))return a.jsx(Et,{});if(g.error||!g.data)return a.jsx("div",{className:"page",children:a.jsx(vt,{variant:"destructive",children:a.jsx(jt,{children:"Benchmark not found."})})});const p=g.data,y=!!p.supports_harness,T=b=>{r($=>{const F=new URLSearchParams($);return b===void 0?F.delete("max_parameters_exclusive"):F.set("max_parameters_exclusive",String(b)),F})},E=b=>{r($=>{const F=new URLSearchParams($);return F.set("metric",b),F})},v=p.introducing_paper??void 0,H=(v==null?void 0:v.arxiv_id)||(v==null?void 0:v.id)||Or(p.paper_url),J=(v==null?void 0:v.title)||p.introducing_paper_title||null,Q=((Me=v==null?void 0:v.published)==null?void 0:Me.slice(0,4))||p.introduced_year||null,ot=!!H||!!p.paper_url||!!J,ct=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-${kt(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(_t,{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(pt,{kind:"benchmark",entityId:p.id}),a.jsxs("div",{className:"bm-subtitle",children:[ee?a.jsx(ue,{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(M)})," 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&&G.length>0&&a.jsxs("div",{className:"bm-hidden-closed-notice",children:[a.jsxs("span",{children:[G.length," closed-source ",G.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"})]}),ot&&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(ce,{title:J}):ct}),Q&&a.jsx("span",{className:"method-source-meta",children:Q})]}):p.paper_url?a.jsxs("a",{href:St(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(ce,{title:J}):p.paper_url}),Q&&a.jsx("span",{className:"method-source-meta",children:Q})]}):a.jsxs("div",{className:"method-source-link is-static",children:[a.jsx("span",{className:"method-source-title",children:J?a.jsx(ce,{title:J}):null}),Q&&a.jsx("span",{className:"method-source-meta",children:Q})]})]}),a.jsx(Wr,{model:I,datasetName:p.name,hideClosed:l.hide_closed_source_evals,setHideClosed:c,setMetric:E}),_&&(()=>{var Le,Ie;const b=_.paper_arxiv_id||_.paper_id,$=_.paper_title||(_.paper_arxiv_id?`arXiv:${_.paper_arxiv_id}`:null),F=_.best_metric&&((Le=_.metrics)==null?void 0:Le[_.best_metric])!==void 0?_.best_metric:I.activeMetric,Fe=(Ie=_.metrics)==null?void 0:Ie[F];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||$||"—",_.harness?` · ${_.harness}`:""]}),a.jsxs("span",{className:"bm-highlight-meta",children:[Fe!==void 0&&F?a.jsxs(a.Fragment,{children:[F,": ",le(Fe),$?" · ":""]}):null,b?a.jsx(ne,{to:`/paper/${b}`,children:Qe(_.paper_title,$)}):Qe(_.paper_title,$)]})]})]})})(),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=>E(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(Ge,{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(lt,{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:$,disabled:F}=b;return a.jsx("button",{type:"button",className:`bm-parameter-filter-option${$?" is-active":""}`,"aria-pressed":$,disabled:F,onClick:()=>T(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,$)=>a.jsx(ue,{className:"h-10 w-full mb-2"},$))}):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:()=>T(void 0),children:"Show all"})]}):a.jsx("div",{className:"no-results",children:"No evaluations submitted yet."}):a.jsxs(a.Fragment,{children:[o.length>P&&a.jsxs("div",{className:"bm-metric-columns-control",children:[a.jsx("button",{type:"button",className:"bm-metric-columns-toggle","aria-expanded":C,"aria-controls":"benchmark-leaderboard",onClick:()=>h(C?null:R),children:C?"Show fewer metrics":`Show more metrics (${o.length-P})`}),C&&a.jsx("span",{children:"Scroll metrics horizontally; model and paper details stay visible."})]}),a.jsx(Wt,{model:I,showHarness:y,setMetric:E,highlightRowRef:d,onFittingMetricCountChange:S})]})]})]})})};export{ma as default}; diff --git a/assets/BenchmarkTrendSparkline-CHEb1nF4.js b/assets/BenchmarkTrendSparkline-BV1XDSWE.js similarity index 97% rename from assets/BenchmarkTrendSparkline-CHEb1nF4.js rename to assets/BenchmarkTrendSparkline-BV1XDSWE.js index cb3065fa67f53415509b41ff7c8147519da1cc12..9832cff6d2e086ec2e85d35bcff98315accf224b 100644 --- a/assets/BenchmarkTrendSparkline-CHEb1nF4.js +++ b/assets/BenchmarkTrendSparkline-BV1XDSWE.js @@ -1 +1 @@ -import{f as C,j as t}from"./index-CTkdBAwI.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),f=Math.max(1,...h),M=g-o*2,T=p-m*2,v=h.length>1?M/(h.length-1):0,a=h.map((s,c)=>({x:o+v*c,y:m+T-s/f*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{f as C,j as t}from"./index-D2fBL-s6.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),f=Math.max(1,...h),M=g-o*2,T=p-m*2,v=h.length>1?M/(h.length-1):0,a=h.map((s,c)=>({x:o+v*c,y:m+T-s/f*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/CatalogEntityPreviewLink-BtlbiZfu.js b/assets/CatalogEntityPreviewLink-xL6TDpUk.js similarity index 97% rename from assets/CatalogEntityPreviewLink-BtlbiZfu.js rename to assets/CatalogEntityPreviewLink-xL6TDpUk.js index fdd5c94370811081d4cbde56b32e0b008acac477..4abd9c177fffbf23a17d65d127d1dc221961f52a 100644 --- a/assets/CatalogEntityPreviewLink-BtlbiZfu.js +++ b/assets/CatalogEntityPreviewLink-xL6TDpUk.js @@ -1,4 +1,4 @@ -import{c as m,a5 as h,V as d,b as g,j as s,L as f,a3 as k}from"./index-CTkdBAwI.js";import{H as w,a as y,b as v}from"./hover-card-murUA8RP.js";import{c as l}from"./catalog-ZV4aeC2F.js";/** +import{c as m,a5 as h,V as d,b as g,j as s,L as f,a3 as k}from"./index-D2fBL-s6.js";import{H as w,a as y,b as v}from"./hover-card-DWpZK4fW.js";import{c as l}from"./catalog-5AxvKr4D.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/ChatView-KfwjwrJL.js b/assets/ChatView-DAikess2.js similarity index 97% rename from assets/ChatView-KfwjwrJL.js rename to assets/ChatView-DAikess2.js index 33d04c8728cb4125336e33442ab4d6e2affcab96..d42ff94290291e6f2b0e8ce9e964cbf007d9f409 100644 --- a/assets/ChatView-KfwjwrJL.js +++ b/assets/ChatView-DAikess2.js @@ -1,4 +1,4 @@ -var Nt=Object.defineProperty;var Dt=(t,e,r)=>e in t?Nt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var ae=(t,e,r)=>Dt(t,typeof e!="symbol"?e+"":e,r);import{c as Lt,f as c,j as s,X as bt,x as wt,b as Te,L as vt,_ as Ft,$ as Bt,a0 as Ot,a1 as nt,V as qe,e as St,k as xt,s as _t,l as Et,h as Pt,a as Ct,u as qt,A as Ut}from"./index-CTkdBAwI.js";import{C as Ht,U as at,b as Kt,f as ke,A as Wt,a as zt,c as $t,g as Qt,h as Vt,i as Oe,j as Yt,k as it,t as Gt,l as Xt,E as Jt,m as Zt,n as es,o as ot}from"./chatLifecycle-MnB7vIxs.js";import{g as Fe,h as ts,j as ss,k as Rt,T as ct,e as kt,l as Le,m as Ke,r as rs,n as ns,o as he,D as We,s as as,t as is,v as os,w as cs,x as ls,y as us,z as ds,B as hs,C as ps,E as Xe,F as fs,G as lt,H as jt,I as ut,J as ze,f as ms,K as gs,L as ys,M as At,N as bs,O as ws,Q as vs,R as Ss,S as xs}from"./chatSessions-DFZee9F6.js";import{M as _s}from"./McpShowcase-0Is00fre.js";import{c as pe}from"./chat-Dr1lXe8V.js";import{S as Es}from"./share-2-p1ZCvleM.js";import{u as Ue}from"./useMutation-DXSljxHA.js";import{I as Cs}from"./Icon-DSoTeS9V.js";import{m as Rs}from"./mlIntern-DGSta2oO.js";import{u as ks,O as js}from"./openrouter-CIzc-yJH.js";/* empty css */import"./hover-card-murUA8RP.js";import"./CatalogEntityPreviewLink-BtlbiZfu.js";import"./catalog-ZV4aeC2F.js";import"./github-B1HnPn8H.js";import"./file-text-C_y5yA3N.js";import"./PaperPreviewLink-gDkLaZRD.js";import"./index-RLQgt3ff.js";import"./index-BTuG6PF7.js";import"./katex-DkKDou_j.js";import"./papers-POQWk4vk.js";import"./curation-BlGrJ3z2.js";import"./thumbs-up-CYylDqig.js";import"./copy-CSFOf_JK.js";import"./queryOptions-C9woPjwX.js";import"./arrow-left-CROPXr9Q.js";import"./external-link-DK_uOtfh.js";import"./plus-Dhoq_Vs9.js";import"./search-Di2HpIcQ.js";import"./chevron-up-C4mc56q2.js";import"./AuthorAvatar-DjiI2pGP.js";import"./AgentLogos-CDnvpl-X.js";/** +var Nt=Object.defineProperty;var Dt=(t,e,r)=>e in t?Nt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var ae=(t,e,r)=>Dt(t,typeof e!="symbol"?e+"":e,r);import{c as Lt,f as c,j as s,X as bt,x as wt,b as Te,L as vt,_ as Ft,$ as Bt,a0 as Ot,a1 as nt,V as qe,e as St,k as xt,s as _t,l as Et,h as Pt,a as Ct,u as qt,A as Ut}from"./index-D2fBL-s6.js";import{C as Ht,U as at,b as Kt,f as ke,A as Wt,a as zt,c as $t,g as Qt,h as Vt,i as Oe,j as Yt,k as it,t as Gt,l as Xt,E as Jt,m as Zt,n as es,o as ot}from"./chatLifecycle-nMvmiYGF.js";import{g as Fe,h as ts,j as ss,k as Rt,T as ct,e as kt,l as Le,m as Ke,r as rs,n as ns,o as he,D as We,s as as,t as is,v as os,w as cs,x as ls,y as us,z as ds,B as hs,C as ps,E as Xe,F as fs,G as lt,H as jt,I as ut,J as ze,f as ms,K as gs,L as ys,M as At,N as bs,O as ws,Q as vs,R as Ss,S as xs}from"./chatSessions-CoHSP58H.js";import{M as _s}from"./McpShowcase-R1ucnqw2.js";import{c as pe}from"./chat-BOZIonsX.js";import{S as Es}from"./share-2-SmaUf3DC.js";import{u as Ue}from"./useMutation-9dlTbuQj.js";import{I as Cs}from"./Icon-Uhh78KjL.js";import{m as Rs}from"./mlIntern-KBHZ6tOl.js";import{u as ks,O as js}from"./openrouter-BRMbmxz_.js";/* empty css */import"./hover-card-DWpZK4fW.js";import"./CatalogEntityPreviewLink-xL6TDpUk.js";import"./catalog-5AxvKr4D.js";import"./github-DcIeypA5.js";import"./file-text-CikzkPqz.js";import"./PaperPreviewLink-BZuRBR1p.js";import"./index-BPshewTi.js";import"./index-BtZPsygG.js";import"./katex-DkKDou_j.js";import"./papers-khuZaSFb.js";import"./curation-BtfabyzA.js";import"./thumbs-up-BnMguJ3s.js";import"./copy-CcyqVsMW.js";import"./queryOptions-C9woPjwX.js";import"./arrow-left-CzTG6LBL.js";import"./external-link-Ddavpnin.js";import"./plus-BI8-JXK0.js";import"./search-0R_Hc3S2.js";import"./chevron-up-B9KJ5aUJ.js";import"./AuthorAvatar-C8tz_syh.js";import"./AgentLogos-B5etEEwg.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/ConferenceDetailView-DFufisD9.js b/assets/ConferenceDetailView-BapnrC2V.js similarity index 82% rename from assets/ConferenceDetailView-DFufisD9.js rename to assets/ConferenceDetailView-BapnrC2V.js index 38f801918ae70da045c5477dfe2d1949220a4abd..1b0d698fa74d4f6a6f44972454b746600b0fcb7f 100644 --- a/assets/ConferenceDetailView-DFufisD9.js +++ b/assets/ConferenceDetailView-BapnrC2V.js @@ -1 +1 @@ -import{u as y,b as k,f as _,j as e,L as h,T as S}from"./index-CTkdBAwI.js";import{a as f,A as b,b as E}from"./AreaSection-DTNPiFl-.js";import{M as j}from"./MarkdownText-B88CU2f1.js";import{c as A}from"./catalog-ZV4aeC2F.js";import{i as C}from"./apiErrors-DFeecPSH.js";import{s as F}from"./areas-Dvi8w2dp.js";import{c as T,h as L}from"./colors-BkWRhvFI.js";import{C as $}from"./conferenceListings-BnmhBx-_.js";import{f as w}from"./deadlines-BG5SWwEG.js";import{d as D}from"./transform-CZL79kIa.js";import{S as P}from"./skeleton-p2_v-2W8.js";import{A as M,a as R}from"./alert-5nuL0v_r.js";import{s as B}from"./safeExternalHref-CkBrsh84.js";import I from"./NotFound-BE9xg6GA.js";/* empty css */import"./PaperPreviewLink-gDkLaZRD.js";import"./index-RLQgt3ff.js";import"./index-BTuG6PF7.js";import"./katex-DkKDou_j.js";import"./hover-card-murUA8RP.js";import"./papers-POQWk4vk.js";import"./curation-BlGrJ3z2.js";import"./useMutation-DXSljxHA.js";const ce=()=>{var g,x;const{confSlug:o}=y(),t=k({queryKey:["conference-areas-with-tasks",o],queryFn:()=>A.conferenceAreasWithTasks(o),enabled:!!o,staleTime:S}),m=_.useMemo(()=>{var a;return F(((a=t.data)==null?void 0:a.results)??[])},[t.data]),s=(g=t.data)==null?void 0:g.conference,d=((x=t.data)==null?void 0:x.total_paper_count)??0,N=$.filter(a=>{var r;return(((r=t.data)==null?void 0:r[a.countKey])??0)>0});if(C(t.error))return e.jsx(I,{});if(t.error)return e.jsx("div",{className:"page",children:e.jsx(M,{variant:"destructive",children:e.jsx(R,{children:"Failed to load conference. Please try again."})})});const p=s?w(s.start_date,s.end_date):null,u=s?[s.venue,s.location].filter(Boolean).join(", "):null,n=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:n??e.jsx(P,{className:"h-10 w-64 inline-block"})}),e.jsxs("div",{className:"feed-subtitle",style:{display:"flex",flexDirection:"column",gap:4},children:[p&&e.jsx("span",{children:p}),u&&e.jsx("span",{children:u}),(s==null?void 0:s.url)&&e.jsx("a",{href:B(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(j,{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:n?`${n} visual`:"Conference visual",onError:a=>{var r,c;(c=(r=a.currentTarget.parentElement)==null?void 0:r.parentElement)==null||c.style.setProperty("display","none")}})}),e.jsxs("figcaption",{children:["Figure · ",n??"Conference",s.image_credit&&e.jsxs(e.Fragment,{children:[e.jsx("br",{}),e.jsx(j,{className:"task-image-credit",text:s.image_credit})]})]})]})]}),!t.isLoading&&d>0&&e.jsx(f,{title:"Browse papers",description:"All accepted papers, plus oral, spotlight, outstanding, and best paper finalists.",meta:`${d.toLocaleString()} papers`,style:{marginTop:48},children:N.map(a=>{var r;return e.jsxs(h,{to:`/conferences/${o}/${a.slug}`,className:"tag-cell",children:[e.jsxs("div",{className:"name",children:[e.jsx("span",{className:"dot",style:{background:a.dotColor}}),a.label]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[(((r=t.data)==null?void 0:r[a.countKey])??0).toLocaleString()," papers"]})})]},a.slug)})}),t.isLoading?e.jsx(b,{tiles:6,tileClassName:"h-24"}):m.map(a=>{const r=a.tasks;if(r.length===0)return null;const c=r.reduce((i,l)=>i+(l.paper_count||0),0);return e.jsx(f,{title:a.name,description:a.description,meta:`${r.length} ${r.length===1?"task":"tasks"} · ${c.toLocaleString()} papers`,children:r.map(i=>{const l=i.slug||"",v=T(L(l));return e.jsxs(h,{to:`/conferences/${o}/${l}`,className:"tag-cell",children:[e.jsxs("div",{className:"name",children:[e.jsx("span",{className:"dot",style:{background:v.dot}}),D(i.name,l)]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[(i.paper_count??0).toLocaleString()," papers"]})})]},i.id)})},a.id)}),e.jsx(E,{areas:m})]})};export{ce as default}; +import{u as y,b as k,f as _,j as e,L as h,T as S}from"./index-D2fBL-s6.js";import{a as f,A as b,b as E}from"./AreaSection-COKqvfmt.js";import{M as j}from"./MarkdownText-ludE7yuw.js";import{c as A}from"./catalog-5AxvKr4D.js";import{i as C}from"./apiErrors-DV2aaDjL.js";import{s as F}from"./areas-Dvi8w2dp.js";import{c as T,h as L}from"./colors-BkWRhvFI.js";import{C as $}from"./conferenceListings-BnmhBx-_.js";import{f as w}from"./deadlines-BG5SWwEG.js";import{d as D}from"./transform-B_GaHMvk.js";import{S as P}from"./skeleton-BDwfco0_.js";import{A as M,a as R}from"./alert-PnePcfgX.js";import{s as B}from"./safeExternalHref-CkBrsh84.js";import I from"./NotFound-L0ldWZg9.js";/* empty css */import"./PaperPreviewLink-BZuRBR1p.js";import"./index-BPshewTi.js";import"./index-BtZPsygG.js";import"./katex-DkKDou_j.js";import"./hover-card-DWpZK4fW.js";import"./papers-khuZaSFb.js";import"./curation-BtfabyzA.js";import"./useMutation-9dlTbuQj.js";const ce=()=>{var g,x;const{confSlug:o}=y(),t=k({queryKey:["conference-areas-with-tasks",o],queryFn:()=>A.conferenceAreasWithTasks(o),enabled:!!o,staleTime:S}),m=_.useMemo(()=>{var a;return F(((a=t.data)==null?void 0:a.results)??[])},[t.data]),s=(g=t.data)==null?void 0:g.conference,d=((x=t.data)==null?void 0:x.total_paper_count)??0,N=$.filter(a=>{var r;return(((r=t.data)==null?void 0:r[a.countKey])??0)>0});if(C(t.error))return e.jsx(I,{});if(t.error)return e.jsx("div",{className:"page",children:e.jsx(M,{variant:"destructive",children:e.jsx(R,{children:"Failed to load conference. Please try again."})})});const p=s?w(s.start_date,s.end_date):null,u=s?[s.venue,s.location].filter(Boolean).join(", "):null,n=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:n??e.jsx(P,{className:"h-10 w-64 inline-block"})}),e.jsxs("div",{className:"feed-subtitle",style:{display:"flex",flexDirection:"column",gap:4},children:[p&&e.jsx("span",{children:p}),u&&e.jsx("span",{children:u}),(s==null?void 0:s.url)&&e.jsx("a",{href:B(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(j,{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:n?`${n} visual`:"Conference visual",onError:a=>{var r,c;(c=(r=a.currentTarget.parentElement)==null?void 0:r.parentElement)==null||c.style.setProperty("display","none")}})}),e.jsxs("figcaption",{children:["Figure · ",n??"Conference",s.image_credit&&e.jsxs(e.Fragment,{children:[e.jsx("br",{}),e.jsx(j,{className:"task-image-credit",text:s.image_credit})]})]})]})]}),!t.isLoading&&d>0&&e.jsx(f,{title:"Browse papers",description:"All accepted papers, plus oral, spotlight, outstanding, and best paper finalists.",meta:`${d.toLocaleString()} papers`,style:{marginTop:48},children:N.map(a=>{var r;return e.jsxs(h,{to:`/conferences/${o}/${a.slug}`,className:"tag-cell",children:[e.jsxs("div",{className:"name",children:[e.jsx("span",{className:"dot",style:{background:a.dotColor}}),a.label]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[(((r=t.data)==null?void 0:r[a.countKey])??0).toLocaleString()," papers"]})})]},a.slug)})}),t.isLoading?e.jsx(b,{tiles:6,tileClassName:"h-24"}):m.map(a=>{const r=a.tasks;if(r.length===0)return null;const c=r.reduce((i,l)=>i+(l.paper_count||0),0);return e.jsx(f,{title:a.name,description:a.description,meta:`${r.length} ${r.length===1?"task":"tasks"} · ${c.toLocaleString()} papers`,children:r.map(i=>{const l=i.slug||"",v=T(L(l));return e.jsxs(h,{to:`/conferences/${o}/${l}`,className:"tag-cell",children:[e.jsxs("div",{className:"name",children:[e.jsx("span",{className:"dot",style:{background:v.dot}}),D(i.name,l)]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[(i.paper_count??0).toLocaleString()," papers"]})})]},i.id)})},a.id)}),e.jsx(E,{areas:m})]})};export{ce as default}; diff --git a/assets/ConferenceTaskView-EUoWDwlK.js b/assets/ConferenceTaskView-DG4QYE8x.js similarity index 79% rename from assets/ConferenceTaskView-EUoWDwlK.js rename to assets/ConferenceTaskView-DG4QYE8x.js index 455f6107858060568fbdc55f41a2d198c468027e..22b655f0cbce2720e2a0eb4b6edb186c1d963a1b 100644 --- a/assets/ConferenceTaskView-EUoWDwlK.js +++ b/assets/ConferenceTaskView-DG4QYE8x.js @@ -1 +1 @@ -import{u as S,b as _,p as R,f as C,j as e,L as x,q as M,T as E}from"./index-CTkdBAwI.js";import{u as L,b as q,P as Q}from"./PaperFeed-2BMpWfem.js";import{M as g}from"./MarkdownText-B88CU2f1.js";import{c as F}from"./catalog-ZV4aeC2F.js";import{p as B}from"./papers-POQWk4vk.js";import{i as A}from"./apiErrors-DFeecPSH.js";import{C as O}from"./conferenceListings-BnmhBx-_.js";import{t as z,d as H}from"./transform-CZL79kIa.js";import{u as I}from"./usePapers-Cu-zovv8.js";import{A as K,a as $}from"./alert-5nuL0v_r.js";import V from"./NotFound-BE9xg6GA.js";import"./PaperCard--WllvTq0.js";import"./AuthorAvatar-DjiI2pGP.js";import"./SotaBadges-CyyWKB0V.js";import"./colors-BkWRhvFI.js";import"./Icon-DSoTeS9V.js";import"./LatexTitle-BmCQe_rK.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-CZErm3i7.js";import"./skeleton-p2_v-2W8.js";import"./useIntersectionObserver-BnA8TYxZ.js";/* empty css */import"./PaperPreviewLink-gDkLaZRD.js";import"./index-RLQgt3ff.js";import"./index-BTuG6PF7.js";import"./katex-DkKDou_j.js";import"./hover-card-murUA8RP.js";import"./useMutation-DXSljxHA.js";import"./curation-BlGrJ3z2.js";import"./useInfiniteQuery-CLH4OKrI.js";const D={"iclr-2026/outstanding":"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/).","icml-2026/outstanding":"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/).","cvpr-2026/best-paper-finalists":"CVPR 2026 recognized fifteen Best Paper Award finalists, including the winners. [Read the announcement](https://x.com/CVPR/status/2062912519522717978)."},Pe=()=>{var b,y,v,P,k,w;const{confSlug:t,taskSlug:n}=S(),p=L(),a=O.find(r=>r.slug===n),u=!!(a!=null&&a.award),i=_({queryKey:["conference",t],queryFn:()=>F.getConference(t),enabled:!!t,staleTime:E}),c=_({queryKey:M.task(n),queryFn:()=>F.getTask(n),enabled:!!n&&!a,staleTime:E}),l=I([...R.feeds.conference,t,n,p.filters],r=>B.forConference(t,{...p.filters,task:a?void 0:n,presentation:a==null?void 0:a.presentation,page:r,page_size:12}),{enabled:!!t}),f=C.useMemo(()=>{var r;return((r=l.data)==null?void 0:r.pages.flatMap(o=>o.results))??[]},[l.data]),h=C.useMemo(()=>f.map(z),[f]),d=(a==null?void 0:a.label)??H(((b=c.data)==null?void 0:b.name)||n||"",((y=c.data)==null?void 0:y.slug)||n),j=D[`${t}/${n}`],N=((P=(v=l.data)==null?void 0:v.pages[0])==null?void 0:P.count)??((k=i.data)==null?void 0:k.paper_count)??0,s=c.data;return A(i.error)||A(c.error)?e.jsx(V,{}):i.error||c.error||l.error?e.jsx("div",{className:"page",children:e.jsx(K,{variant:"destructive",children:e.jsx($,{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(x,{to:"/",children:"Home"}),e.jsx("span",{children:" / "}),e.jsx(x,{to:"/conferences",children:"Conferences"}),e.jsx("span",{children:" / "}),e.jsx(x,{to:`/conferences/${t}`,children:((w=i.data)==null?void 0:w.name)??t}),e.jsx("span",{children:" / "}),e.jsx("span",{children:d})]}),e.jsxs("div",{className:!a&&(s!=null&&s.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:a?"BROWSE PAPERS":"TASK"}),e.jsx("h1",{className:"domain-mega-title",children:d}),j&&e.jsx(g,{className:"task-explainer",text:j}),!a&&(s==null?void 0:s.description)&&e.jsx(g,{className:"task-explainer",text:s.description}),i.data&&e.jsxs("div",{className:"task-quickstats",style:{marginTop:12},children:[e.jsxs("span",{children:[e.jsx("span",{className:"num",children:N.toLocaleString()}),"PAPERS"]}),e.jsx("span",{children:i.data.name})]})]}),!a&&(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:`${d} schematic`,onError:r=>{var o,m;(m=(o=r.currentTarget.parentElement)==null?void 0:o.parentElement)==null||m.style.setProperty("display","none")}})}),e.jsxs("figcaption",{children:["Figure · ",d,s.image_credit&&e.jsxs(e.Fragment,{children:[e.jsx("br",{}),e.jsx(g,{className:"task-image-credit",text:s.image_credit})]})]})]})]}),e.jsxs("div",{className:"task-section-head",children:[e.jsx("div",{className:"task-section-eyebrow",children:u?"Award papers":"Conference papers · sort below"}),e.jsxs("div",{className:"task-section-title",children:["Papers ",e.jsxs("span",{className:"meta",children:["[",N.toLocaleString(),"]"]})]})]}),e.jsx(q,{feed:p,sorts:u?null:void 0,children:!u&&e.jsxs("div",{className:"results-count",children:[h.length," loaded in ",e.jsx("span",{children:d})]})}),e.jsx(Q,{query:l,cards:h,empty:"No papers found for this selection.",cardHeader:r=>{var T;const o=(T=f[r])==null?void 0:T.conference_award,m=o==="outstanding"?"Outstanding Paper":o==="honorable_mention"?"Honorable Mention":o==="best_paper_finalist"&&(a==null?void 0:a.presentation)!=="best_paper_finalist"?"Best Paper Finalist":null;return m&&e.jsx("div",{className:"conference-award-label",children:m})}})]})};export{Pe as default}; +import{u as S,b as _,p as R,f as C,j as e,L as x,q as M,T as E}from"./index-D2fBL-s6.js";import{u as L,b as q,P as Q}from"./PaperFeed-BERxHjrg.js";import{M as g}from"./MarkdownText-ludE7yuw.js";import{c as F}from"./catalog-5AxvKr4D.js";import{p as B}from"./papers-khuZaSFb.js";import{i as A}from"./apiErrors-DV2aaDjL.js";import{C as O}from"./conferenceListings-BnmhBx-_.js";import{t as z,d as H}from"./transform-B_GaHMvk.js";import{u as I}from"./usePapers-CAjdcUuj.js";import{A as K,a as $}from"./alert-PnePcfgX.js";import V from"./NotFound-L0ldWZg9.js";import"./PaperCard-DhorusY5.js";import"./AuthorAvatar-C8tz_syh.js";import"./SotaBadges-r6iGzLRW.js";import"./colors-BkWRhvFI.js";import"./Icon-Uhh78KjL.js";import"./LatexTitle-WIQJ1ke0.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-DS5Jzsg5.js";import"./skeleton-BDwfco0_.js";import"./useIntersectionObserver-C0Rq0EXm.js";/* empty css */import"./PaperPreviewLink-BZuRBR1p.js";import"./index-BPshewTi.js";import"./index-BtZPsygG.js";import"./katex-DkKDou_j.js";import"./hover-card-DWpZK4fW.js";import"./useMutation-9dlTbuQj.js";import"./curation-BtfabyzA.js";import"./useInfiniteQuery-CjJA-90e.js";const D={"iclr-2026/outstanding":"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/).","icml-2026/outstanding":"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/).","cvpr-2026/best-paper-finalists":"CVPR 2026 recognized fifteen Best Paper Award finalists, including the winners. [Read the announcement](https://x.com/CVPR/status/2062912519522717978)."},Pe=()=>{var b,y,v,P,k,w;const{confSlug:t,taskSlug:n}=S(),p=L(),a=O.find(r=>r.slug===n),u=!!(a!=null&&a.award),i=_({queryKey:["conference",t],queryFn:()=>F.getConference(t),enabled:!!t,staleTime:E}),c=_({queryKey:M.task(n),queryFn:()=>F.getTask(n),enabled:!!n&&!a,staleTime:E}),l=I([...R.feeds.conference,t,n,p.filters],r=>B.forConference(t,{...p.filters,task:a?void 0:n,presentation:a==null?void 0:a.presentation,page:r,page_size:12}),{enabled:!!t}),f=C.useMemo(()=>{var r;return((r=l.data)==null?void 0:r.pages.flatMap(o=>o.results))??[]},[l.data]),h=C.useMemo(()=>f.map(z),[f]),d=(a==null?void 0:a.label)??H(((b=c.data)==null?void 0:b.name)||n||"",((y=c.data)==null?void 0:y.slug)||n),j=D[`${t}/${n}`],N=((P=(v=l.data)==null?void 0:v.pages[0])==null?void 0:P.count)??((k=i.data)==null?void 0:k.paper_count)??0,s=c.data;return A(i.error)||A(c.error)?e.jsx(V,{}):i.error||c.error||l.error?e.jsx("div",{className:"page",children:e.jsx(K,{variant:"destructive",children:e.jsx($,{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(x,{to:"/",children:"Home"}),e.jsx("span",{children:" / "}),e.jsx(x,{to:"/conferences",children:"Conferences"}),e.jsx("span",{children:" / "}),e.jsx(x,{to:`/conferences/${t}`,children:((w=i.data)==null?void 0:w.name)??t}),e.jsx("span",{children:" / "}),e.jsx("span",{children:d})]}),e.jsxs("div",{className:!a&&(s!=null&&s.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:a?"BROWSE PAPERS":"TASK"}),e.jsx("h1",{className:"domain-mega-title",children:d}),j&&e.jsx(g,{className:"task-explainer",text:j}),!a&&(s==null?void 0:s.description)&&e.jsx(g,{className:"task-explainer",text:s.description}),i.data&&e.jsxs("div",{className:"task-quickstats",style:{marginTop:12},children:[e.jsxs("span",{children:[e.jsx("span",{className:"num",children:N.toLocaleString()}),"PAPERS"]}),e.jsx("span",{children:i.data.name})]})]}),!a&&(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:`${d} schematic`,onError:r=>{var o,m;(m=(o=r.currentTarget.parentElement)==null?void 0:o.parentElement)==null||m.style.setProperty("display","none")}})}),e.jsxs("figcaption",{children:["Figure · ",d,s.image_credit&&e.jsxs(e.Fragment,{children:[e.jsx("br",{}),e.jsx(g,{className:"task-image-credit",text:s.image_credit})]})]})]})]}),e.jsxs("div",{className:"task-section-head",children:[e.jsx("div",{className:"task-section-eyebrow",children:u?"Award papers":"Conference papers · sort below"}),e.jsxs("div",{className:"task-section-title",children:["Papers ",e.jsxs("span",{className:"meta",children:["[",N.toLocaleString(),"]"]})]})]}),e.jsx(q,{feed:p,sorts:u?null:void 0,children:!u&&e.jsxs("div",{className:"results-count",children:[h.length," loaded in ",e.jsx("span",{children:d})]})}),e.jsx(Q,{query:l,cards:h,empty:"No papers found for this selection.",cardHeader:r=>{var T;const o=(T=f[r])==null?void 0:T.conference_award,m=o==="outstanding"?"Outstanding Paper":o==="honorable_mention"?"Honorable Mention":o==="best_paper_finalist"&&(a==null?void 0:a.presentation)!=="best_paper_finalist"?"Best Paper Finalist":null;return m&&e.jsx("div",{className:"conference-award-label",children:m})}})]})};export{Pe as default}; diff --git a/assets/ConferencesIndexView-_1dXfLJg.js b/assets/ConferencesIndexView-DGftnYu4.js similarity index 76% rename from assets/ConferencesIndexView-_1dXfLJg.js rename to assets/ConferencesIndexView-DGftnYu4.js index 34cfb20ac61bdf4374f19528c7a589fb77bbf89f..33cf06ed859b0a2f86663aac50a916a71a9308f6 100644 --- a/assets/ConferencesIndexView-_1dXfLJg.js +++ b/assets/ConferencesIndexView-DGftnYu4.js @@ -1 +1 @@ -import{b as d,f as m,j as e,L as c,T as p}from"./index-CTkdBAwI.js";import{c as u}from"./catalog-ZV4aeC2F.js";import{f}from"./deadlines-BG5SWwEG.js";import{A as h,a as x}from"./alert-5nuL0v_r.js";import{A as g,a as j}from"./AreaSection-DTNPiFl-.js";import{T as N}from"./TaxonomySuggestionTile-CAEaqzDg.js";import"./skeleton-p2_v-2W8.js";import"./SignInToEditDialog-Dn64C3wp.js";import"./button-CJEAPbmU.js";import"./input-C24thzbI.js";import"./textarea-DH3b7wpe.js";import"./searchable-select-bWRlK1sd.js";import"./popover-CZErm3i7.js";import"./dialog-C7LLEadk.js";import"./search-Di2HpIcQ.js";import"./loader-circle-B71NdARb.js";import"./useMutation-DXSljxHA.js";import"./submissions-BSh9vIax.js";import"./plus-Dhoq_Vs9.js";const 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},_=(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)},Q=()=>{const r=d({queryKey:["conferences"],queryFn:()=>u.conferences(),staleTime:p}),a=m.useMemo(()=>{var i;if(!((i=r.data)!=null&&i.results))return null;const t={};return r.data.results.forEach(n=>{const s=v(n);(t[s]||(t[s]=[])).push(n)}),Object.values(t).forEach(n=>n.sort(_)),Object.keys(t).map(Number).sort((n,s)=>s-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(x,{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(c,{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(g,{sections:2,tiles:3,tileClassName:"h-32"}):a==null?void 0:a.map(({year:t,conferences:i})=>{const n=i.reduce((s,o)=>s+(o.paper_count??0),0);return e.jsxs(j,{title:t>0?String(t):"Unknown year",meta:`${i.length} ${i.length===1?"conference":"conferences"} · ${n.toLocaleString()} papers`,children:[i.map(s=>{const o=f(s.start_date,s.end_date),l=[s.venue,s.location].filter(Boolean).join(", ");return e.jsxs(c,{to:`/conferences/${s.slug}`,className:"tag-cell",children:[e.jsx("div",{className:"name",children:s.name}),e.jsxs("div",{className:"meta",style:{display:"flex",flexDirection:"column",gap:4},children:[o&&e.jsx("span",{children:o}),l&&e.jsx("span",{children:l}),e.jsxs("span",{children:[(s.paper_count??0).toLocaleString()," papers"]})]})]},s.id)}),e.jsx(N,{kind:"conference"})]},t)})]})};export{Q as default}; +import{b as d,f as m,j as e,L as c,T as p}from"./index-D2fBL-s6.js";import{c as u}from"./catalog-5AxvKr4D.js";import{f}from"./deadlines-BG5SWwEG.js";import{A as h,a as x}from"./alert-PnePcfgX.js";import{A as g,a as j}from"./AreaSection-COKqvfmt.js";import{T as N}from"./TaxonomySuggestionTile-UxnpnHcy.js";import"./skeleton-BDwfco0_.js";import"./SignInToEditDialog-BBAwjxYj.js";import"./button-D0XfbdrX.js";import"./input-DdobyT4w.js";import"./textarea-B8b7WxcV.js";import"./searchable-select-CsXzzP_V.js";import"./popover-DS5Jzsg5.js";import"./dialog-DgUROq2j.js";import"./search-0R_Hc3S2.js";import"./loader-circle-CoLo2trx.js";import"./useMutation-9dlTbuQj.js";import"./submissions-LRopJJKL.js";import"./plus-BI8-JXK0.js";const 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},_=(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)},Q=()=>{const r=d({queryKey:["conferences"],queryFn:()=>u.conferences(),staleTime:p}),a=m.useMemo(()=>{var i;if(!((i=r.data)!=null&&i.results))return null;const t={};return r.data.results.forEach(n=>{const s=v(n);(t[s]||(t[s]=[])).push(n)}),Object.values(t).forEach(n=>n.sort(_)),Object.keys(t).map(Number).sort((n,s)=>s-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(x,{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(c,{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(g,{sections:2,tiles:3,tileClassName:"h-32"}):a==null?void 0:a.map(({year:t,conferences:i})=>{const n=i.reduce((s,o)=>s+(o.paper_count??0),0);return e.jsxs(j,{title:t>0?String(t):"Unknown year",meta:`${i.length} ${i.length===1?"conference":"conferences"} · ${n.toLocaleString()} papers`,children:[i.map(s=>{const o=f(s.start_date,s.end_date),l=[s.venue,s.location].filter(Boolean).join(", ");return e.jsxs(c,{to:`/conferences/${s.slug}`,className:"tag-cell",children:[e.jsx("div",{className:"name",children:s.name}),e.jsxs("div",{className:"meta",style:{display:"flex",flexDirection:"column",gap:4},children:[o&&e.jsx("span",{children:o}),l&&e.jsx("span",{children:l}),e.jsxs("span",{children:[(s.paper_count??0).toLocaleString()," papers"]})]})]},s.id)}),e.jsx(N,{kind:"conference"})]},t)})]})};export{Q as default}; diff --git a/assets/CronDashboard-BzTxMTrv.js b/assets/CronDashboard-C733Wslj.js similarity index 97% rename from assets/CronDashboard-BzTxMTrv.js rename to assets/CronDashboard-C733Wslj.js index 37ee921b1be9a430ff63df1d127757f46a82580f..cb5491b784651bd2bdc7a14f8957052e5ab38eb0 100644 --- a/assets/CronDashboard-BzTxMTrv.js +++ b/assets/CronDashboard-C733Wslj.js @@ -1,4 +1,4 @@ -import{c,f as a,j as r,I as n,ac as u}from"./index-CTkdBAwI.js";/** +import{c,f as a,j as r,I as n,ac as u}from"./index-D2fBL-s6.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/CronDashboard-DbpR4-1O.js b/assets/CronDashboard-Wker39-h.js similarity index 98% rename from assets/CronDashboard-DbpR4-1O.js rename to assets/CronDashboard-Wker39-h.js index 71cb2b45b57b7180bb63965a31134ab4af3f4ffe..d76027c39ee6879fec92d8384dbe0c85ef5ffe47 100644 --- a/assets/CronDashboard-DbpR4-1O.js +++ b/assets/CronDashboard-Wker39-h.js @@ -1,4 +1,4 @@ -import{c as O,f as h,N as is,B as cs,j as e,z as ie,af as ls,R as ds,O as os,E as oe,P as ms,G as us,Q as Ae,I as L,b as G,J as $,l as xe,A as Re,L as pe,a as hs,s as xs}from"./index-CTkdBAwI.js";import{u as P}from"./useMutation-DXSljxHA.js";import{t as ge,f as v,a as S,S as Te,o as ue,C as g,b as N,c as b,d as F,e as j,g as C}from"./CronDashboard-BzTxMTrv.js";import{B as D}from"./badge-DIkpOdrw.js";import{B as y}from"./button-CJEAPbmU.js";import{C as ps,a as gs}from"./chevron-up-C4mc56q2.js";import{D as fe}from"./database--XDgAVkg.js";import{T as js}from"./trending-up-DegPKMd3.js";import{A as ne}from"./activity-BI3KqxVx.js";import{F as Ne}from"./file-text-C_y5yA3N.js";import{T as Ee,I as vs}from"./triangle-alert-CNTNZVPh.js";import{E as Y}from"./external-link-DK_uOtfh.js";import{C as Z,R as be}from"./refresh-cw-CCsVFDnD.js";import{L as R}from"./loader-circle-B71NdARb.js";import{C as je}from"./circle-check-C79dB7xO.js";import{c as M,A as _s}from"./codex-CxJ1q9dv.js";import{u as fs}from"./useInfiniteQuery-CLH4OKrI.js";import{p as Me}from"./paperEdits-tR7kGJ9o.js";import{c as me}from"./catalog-ZV4aeC2F.js";import{c as ye}from"./chat-Dr1lXe8V.js";/** +import{c as O,f as h,N as is,B as cs,j as e,z as ie,af as ls,R as ds,O as os,E as oe,P as ms,G as us,Q as Ae,I as L,b as G,J as $,l as xe,A as Re,L as pe,a as hs,s as xs}from"./index-D2fBL-s6.js";import{u as P}from"./useMutation-9dlTbuQj.js";import{t as ge,f as v,a as S,S as Te,o as ue,C as g,b as N,c as b,d as F,e as j,g as C}from"./CronDashboard-C733Wslj.js";import{B as D}from"./badge-Pw584nS3.js";import{B as y}from"./button-D0XfbdrX.js";import{C as ps,a as gs}from"./chevron-up-B9KJ5aUJ.js";import{D as fe}from"./database-Ci0ufNyG.js";import{T as js}from"./trending-up-DFLWFJuY.js";import{A as ne}from"./activity-DWWgzth6.js";import{F as Ne}from"./file-text-CikzkPqz.js";import{T as Ee,I as vs}from"./triangle-alert-VQM9i8wl.js";import{E as Y}from"./external-link-Ddavpnin.js";import{C as Z,R as be}from"./refresh-cw-fOkD1TSw.js";import{L as R}from"./loader-circle-CoLo2trx.js";import{C as je}from"./circle-check-1e3iPSaF.js";import{c as M,A as _s}from"./codex-BUTI-2RM.js";import{u as fs}from"./useInfiniteQuery-CjJA-90e.js";import{p as Me}from"./paperEdits-C-9tVqXs.js";import{c as me}from"./catalog-5AxvKr4D.js";import{c as ye}from"./chat-BOZIonsX.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/ExternalSourceEvalBadge-bt0V7K9M.js b/assets/ExternalSourceEvalBadge-C2AscbJz.js similarity index 94% rename from assets/ExternalSourceEvalBadge-bt0V7K9M.js rename to assets/ExternalSourceEvalBadge-C2AscbJz.js index baf5cf2f753f3548c424466de747d6d815d13641..2263d29206ab1928737202521086a39adb3f3a79 100644 --- a/assets/ExternalSourceEvalBadge-bt0V7K9M.js +++ b/assets/ExternalSourceEvalBadge-C2AscbJz.js @@ -1 +1 @@ -import{p as o}from"./curation-BlGrJ3z2.js";import{ac as g,j as a,L as l}from"./index-CTkdBAwI.js";import{H as u,a as c,b as d}from"./hover-card-murUA8RP.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{p as o}from"./curation-BtfabyzA.js";import{ac as g,j as a,L as l}from"./index-D2fBL-s6.js";import{H as u,a as c,b as d}from"./hover-card-DWpZK4fW.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-CdlMrbHK.js b/assets/FeedView-6xUWjpm4.js similarity index 94% rename from assets/FeedView-CdlMrbHK.js rename to assets/FeedView-6xUWjpm4.js index 785c1d975d46818cffb365cd9a2c41d8f04af859..05c5ee1f87992c04117c09e8592da99076709a83 100644 --- a/assets/FeedView-CdlMrbHK.js +++ b/assets/FeedView-6xUWjpm4.js @@ -1 +1 @@ -import{j as e,L as A,a as Qe,g as We,k as Te,l as qe,b as G,f as p,C as Ee,h as Ye,r as ge,T as V,d as Xe,e as Ze,p as Le,i as Ve,m as ve,n as $e,o as Je,q as es}from"./index-CTkdBAwI.js";import{S as ss}from"./sparkles-DsQKLoSg.js";import{D as ts,a as as,b as os}from"./dialog-C7LLEadk.js";import{c as fe}from"./catalog-ZV4aeC2F.js";import{d as Oe,e as He,f as ze,b as Ke,g as Be,h as Ne,i as Fe,t as Pe,j as is,k as ns,r as _e,a as rs,l as ls,m as cs,n as Ae,o as De,p as ds}from"./researchTopic-B8hMcjil.js";import{d as Se,t as us}from"./transform-CZL79kIa.js";import{P as ke}from"./plus-Dhoq_Vs9.js";import{A as ms}from"./arrow-right-BqOq_ArY.js";import{S as ps}from"./SortableList-YW_y9VAs.js";import{r as hs,a as gs,w as fs,P as bs}from"./PaperFeed-2BMpWfem.js";import{M as xs}from"./McpShowcase-0Is00fre.js";import{u as ws,a as js,P as ys,i as vs,A as Ns,b as Ss,S as U,c as ks,D as xe,q as Ts,d as Ps}from"./chatSessions-DFZee9F6.js";import{c as _s}from"./chat-Dr1lXe8V.js";import{u as Cs}from"./usePapers-Cu-zovv8.js";import{p as Es}from"./papers-POQWk4vk.js";import{S as we}from"./skeleton-p2_v-2W8.js";import{A as je,a as ye}from"./alert-5nuL0v_r.js";import"./useMutation-DXSljxHA.js";import"./PaperCard--WllvTq0.js";import"./AuthorAvatar-DjiI2pGP.js";import"./SotaBadges-CyyWKB0V.js";import"./colors-BkWRhvFI.js";import"./Icon-DSoTeS9V.js";import"./LatexTitle-BmCQe_rK.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-CZErm3i7.js";import"./useIntersectionObserver-BnA8TYxZ.js";import"./AgentLogos-CDnvpl-X.js";import"./useInfiniteQuery-CLH4OKrI.js";import"./curation-BlGrJ3z2.js";function Ls({onBuild:h}){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:"Describe topics in your own words, or follow the tasks, benchmarks, authors, and organizations you care about, and this page collects their latest papers and results in one place."}),h&&e.jsxs("button",{type:"button",className:"research-topic-save following-intro-topic",onClick:h,children:[e.jsx(ss,{"aria-hidden":"true"}),"Build your feed"]}),e.jsxs("p",{className:"following-intro-note",children:["Matching papers also arrive as a weekly email, which you can turn off in"," ",e.jsx(A,{to:"/settings",children:"Settings"}),"."]})]})}const Re=16;function Fs({open:h,topicId:o=null,afterSavePath:l,onOpenChange:n}){return e.jsx(ts,{open:h,onOpenChange:n,children:e.jsx(as,{className:"topic-dialog","aria-describedby":void 0,children:e.jsx(As,{topicId:o,afterSavePath:l,onDone:()=>n(!1)},o??"new")})})}function As({topicId:h,afterSavePath:o,onDone:l}){var te,z,Y,ae,me,pe,he,oe,ie,ne;const{user:n}=Qe(),t=We(),b=Te(),j=qe(),u=Oe(),N=He(),S=G({queryKey:["trending-tasks-follow"],queryFn:()=>fe.trendingTasks({limit:Re,level:0}),staleTime:V}),D=G({queryKey:["trending-methods-follow"],queryFn:()=>fe.trendingMethods({limit:Re}),staleTime:V}),E=G({queryKey:["research-follow-suggestions"],queryFn:_e.followSuggestions,staleTime:V}),L=(a=[])=>a.map(c=>({id:String(c.entity_id),name:c.name,image:c.image_url})),[q,K]=p.useState(null),[R,m]=p.useState([]),[k,T]=p.useState([]),g=ze(),P=Ke(),i=Be(),r=(te=u.data)==null?void 0:te.find(a=>a.id===h),x=((z=u.data)==null?void 0:z.filter(a=>a.id!==h))??[],F=k.filter(a=>x.some(c=>c.id===a)),_=(r==null?void 0:r.text)??"",M=q??_,C=M.trim().replace(/\s+/g," "),J=(r==null?void 0:r.status)==="failed"&&C===_,ee=!r&&(((Y=u.data)==null?void 0:Y.length)??0)-F.length>=Ne,B=C.length>=3&&(C!==_||J)&&!ee,[ce,se]=p.useState(!1),Q=p.useRef(!0);p.useEffect(()=>(Q.current=!0,()=>{Q.current=!1}),[]);const I=g.isPending||P.isPending||i.isPending||ce,W=(a,c)=>{var v;return((v=N.data)==null?void 0:v.some(y=>y.kind===a&&String(y.entity_id)===c))??!1},de=(a,c)=>{var v;return((v=R.find(y=>y.kind===a&&y.id===c))==null?void 0:v.follow)??W(a,c)},$=R.filter(a=>a.follow!==W(a.kind,a.id)),ue=!I&&(B||$.length>0||F.length>0),be=(a,c,v)=>m(y=>[...y.filter(X=>X.kind!==a||X.id!==c),{kind:a,id:c,name:v,follow:!de(a,c)}]),H=()=>{if(!ue)return;if(!n){B&&is(C),$.length&&ns($),window.location.href=Ye(o??`${t.pathname}${t.search}`);return}const a=F.length?P.mutateAsync(F):Promise.resolve(),c=[...$.length?[i.mutateAsync($)]:[],a,...B?[a.catch(()=>{}).then(()=>g.mutateAsync({id:r==null?void 0:r.id,text:C}))]:[]];Promise.allSettled(c).then(async v=>{if(v.every(y=>y.status==="fulfilled")){if(o){if(se(!0),await Promise.all([j.refetchQueries({queryKey:ge.follows(n.hf_subject)}),j.refetchQueries({queryKey:ge.topics(n.hf_subject)})]),!Q.current)return;l(),b(o);return}l()}})},O=(a,c,v,y)=>{const re=[...(N.data??[]).filter(f=>f.kind===c).map(f=>({id:String(f.entity_id),name:f.name,slug:f.url.split("/").pop(),image:f.image_url})),...v.filter(f=>!W(c,f.id)).map(f=>({...f,suggested:!0}))];return re.length>0&&e.jsxs("div",{className:"topic-dialog-group",children:[e.jsx("h3",{children:a}),e.jsxs(Ds,{children:[re.map(f=>{const le=de(c,f.id),Z=c==="task"?Se(f.name,f.slug??void 0):f.name;return e.jsxs("button",{type:"button",className:"topic-dialog-chip","aria-pressed":le,disabled:I,"data-suggested":"suggested"in f||void 0,onClick:()=>be(c,f.id,Z),children:[le?e.jsx(Ee,{"aria-hidden":"true"}):e.jsx(ke,{"aria-hidden":"true"}),(c==="author"||c==="organization")&&e.jsx(Rs,{kind:c,name:Z,src:f.image}),Z]},f.id)}),y&&e.jsxs(A,{to:y.to,className:"topic-dialog-browse",children:[y.label,e.jsx(ms,{"aria-hidden":"true"})]})]})]})};return e.jsxs("form",{className:"topic-dialog-form",onSubmit:a=>{a.preventDefault(),H()},children:[e.jsx(os,{className:"topic-dialog-title",children:(ae=u.data)!=null&&ae.length||(me=N.data)!=null&&me.length?"Edit your research feed":"Build your research feed"}),e.jsxs("div",{className:"topic-dialog-group",children:[e.jsx("h3",{children:e.jsx("label",{htmlFor:"topic-dialog-input",children:r?"Edit this topic":(pe=u.data)!=null&&pe.length?"Add a topic in your own words":"Describe a topic in your own words"})}),e.jsx("p",{className:"topic-dialog-hint",children:ee?`You follow ${Ne} topics, the most allowed. Remove one below to add another.`:"A model reads every new paper and adds the ones that match to your Following feed. New topics are public and show your Hugging Face username; make one private in Settings."}),e.jsx("textarea",{id:"topic-dialog-input",className:"research-topic-input",rows:4,maxLength:Fe,"aria-label":"Research topic",placeholder:"e.g. diffusion policies for robot manipulation, or speculative decoding for LLM inference",value:M,onChange:a=>K(a.target.value),onKeyDown:a=>{a.key==="Enter"&&!a.shiftKey&&!a.nativeEvent.isComposing&&(a.preventDefault(),H())}}),e.jsxs("span",{className:"research-topic-count",children:[M.length,"/",Fe]})]}),x.length>0&&e.jsxs("div",{className:"topic-dialog-group",children:[e.jsx("h3",{children:r?"Your other topics":"Your topics"}),e.jsx("div",{className:"topic-dialog-chips",children:x.map(a=>{const c=!k.includes(a.id);return e.jsxs("button",{type:"button",className:"topic-dialog-chip","aria-pressed":c,disabled:I,title:a.text,onClick:()=>T(v=>c?[...v,a.id]:v.filter(y=>y!==a.id)),children:[c?e.jsx(Ee,{"aria-hidden":"true"}):e.jsx(ke,{"aria-hidden":"true"}),Pe(a)]},a.id)})})]}),O("Trending tasks","task",((he=S.data)==null?void 0:he.results)??[],{to:"/tasks",label:"Browse tasks"}),O("Trending methods","method",((oe=D.data)==null?void 0:oe.results)??[],{to:"/methods",label:"Browse methods"}),O("Benchmarks","benchmark",[],{to:"/tasks",label:"Browse benchmarks"}),O("Popular authors","author",L((ie=E.data)==null?void 0:ie.authors)),O("Popular organizations","organization",L((ne=E.data)==null?void 0:ne.organizations),{to:"/organizations",label:"Browse organizations"}),(g.error||P.error||i.error)&&e.jsx("p",{className:"settings-token-error",role:"alert",children:"Could not save your feed. Please try again."}),e.jsxs("div",{className:"topic-dialog-actions",children:[r&&e.jsx("button",{type:"button",className:"research-follow-action topic-dialog-remove",disabled:I,onClick:()=>P.mutate([r.id],{onSuccess:l}),children:"Remove topic"}),e.jsx("button",{type:"button",className:"research-follow-action",disabled:I,onClick:l,children:"Cancel"}),e.jsx("button",{type:"submit",className:"research-topic-save",disabled:!ue,children:$.some(a=>a.follow===!1)||F.length?"Save":$.length?"Follow":J?"Retry":r?"Update topic":"Follow"})]})]})}function Ds({children:h}){const o=p.useRef(null);return p.useLayoutEffect(()=>{const l=o.current;if(!l)return;const n=()=>{const t=[...l.children],b=t.filter(u=>u.dataset.suggested);b.forEach(u=>{u.hidden=!1});const j=()=>new Set(t.filter(u=>!u.hidden).map(u=>u.offsetTop)).size;for(let u=b.length-1;u>=0&&j()>2;u--)b[u].hidden=!0};return n(),window.addEventListener("resize",n),()=>window.removeEventListener("resize",n)}),e.jsx("div",{ref:o,className:"topic-dialog-chips",children:h})}function Rs({kind:h,name:o,src:l}){const[n,t]=p.useState(!1);if(l&&!n)return e.jsx("img",{className:`topic-dialog-chip-image is-${h}`,src:l,alt:"",loading:"lazy",onError:()=>t(!0)});if(h!=="author")return null;const b=o.split(/\s+/).filter(Boolean).map(j=>j[0]).slice(0,2).join("").toUpperCase();return e.jsx("span",{className:"topic-dialog-chip-image is-author is-initials","aria-hidden":"true",children:b})}function Ms({onAddTopic:h}){var l,n;const o=G({queryKey:ge.featuredTopics,queryFn:_e.featuredTopics,staleTime:V});return o.isPending||!((l=o.data)!=null&&l.length)&&!h?null:e.jsxs("nav",{className:"topic-bubbles","aria-label":"Popular topics",children:[(n=o.data)==null?void 0:n.map(t=>e.jsxs(A,{className:"topic-bubble",to:rs(t),title:`${t.followers.toLocaleString()} ${t.followers===1?"follower":"followers"}`,children:[t.creator&&e.jsx("img",{src:t.creator.avatar_url,alt:"",width:20,height:20,loading:"lazy"}),e.jsx("span",{className:"topic-bubble-name",children:Pe(t)}),t.creator&&e.jsxs("span",{className:"topic-bubble-creator",children:["@",t.creator.username]})]},t.id)),h&&e.jsxs("button",{type:"button",className:"topic-bubble topic-bubble-add",onClick:h,children:[e.jsx(ke,{size:14,"aria-hidden":"true"}),e.jsx("span",{className:"topic-bubble-name",children:"Add topic"})]})]})}const Me=45,Is=1800,qs=25,$s=350,Os=h=>{const[o,l]=p.useState(U[0].slice(0,1)),[n,t]=p.useState(0);return p.useEffect(()=>{var D,E;if(!h)return;if((E=(D=window.matchMedia)==null?void 0:D.call(window,"(prefers-reduced-motion: reduce)"))!=null&&E.matches){l(U[0]),t(0);return}let b=0,j=1,u=!1,N;l(U[0].slice(0,j)),t(0);const S=()=>{const L=U[b];if(!u){if(j+=1,l(L.slice(0,j)),j===L.length){u=!0,N=window.setTimeout(S,Is);return}N=window.setTimeout(S,Me);return}if(j-=1,l(L.slice(0,j)),j===0){u=!1,b=(b+1)%U.length,t(b),N=window.setTimeout(S,$s);return}N=window.setTimeout(S,qs)};return N=window.setTimeout(S,Me),()=>window.clearTimeout(N)},[h]),{placeholder:o,prompt:U[n]}},Hs=()=>{var P;const h=Te(),o=$e(),[l,n]=p.useState({text:"",paperMentions:[]}),t=l.text,[b,j]=p.useState(0),[u,N]=p.useState(!1),[S,D]=p.useState(null),{placeholder:E,prompt:L}=Os(!t),q=p.useRef(null),K=G({queryKey:["chatAvailability"],queryFn:()=>_s.getAvailability(),retry:!1,enabled:ve()}),R=ve()&&((P=K.data)==null?void 0:P.paper_mentions_enabled)!==!1,m=ws({draft:l,onChange:n,enabled:R,textareaRef:q}),k=js(l,m.open),T=t?k.completion:L;p.useLayoutEffect(()=>{const i=q.current;if(!i)return;const r=()=>{if(i.style.height="auto",t){i.style.height=`${Math.min(ks(i),160)}px`;return}const x=i.placeholder,F=U.reduce((_,M)=>(i.placeholder=M,Math.max(_,i.scrollHeight)),0);i.placeholder=x,i.style.height=`${Math.min(F,160)}px`};return r(),window.addEventListener("resize",r),()=>window.removeEventListener("resize",r)},[t,T]);const g=async(i=l)=>{const r=i.text.trim();if(!(!r||u)){if(o){const x=new URLSearchParams({q:r,model:xe}),F=`${Je}?${x}`,_=window.open(F,"_blank");if(!_){D(F);return}_.opener=null,D(null),n({text:"",paperMentions:[]});return}N(!0),Ts(i,xe);try{const x=await Ps(xe);h(`/chat/${x.id}`)}catch{h("/chat")}}};return e.jsxs(e.Fragment,{children:[!o&&e.jsx("div",{className:"ask-home-new",children:"Hint: type @ to bring papers into context, or press Tab to use a suggestion"}),e.jsxs("div",{className:"ask-home",children:[e.jsxs("div",{className:"ask-home-row",children:[e.jsxs("div",{className:"ask-home-textarea-wrap",children:[e.jsx(ys,{text:l.text,mentions:l.paperMentions,scrollTop:b,variant:"home",completion:t?T:""}),e.jsx("textarea",{ref:q,rows:1,value:t,placeholder:E,"aria-label":"Ask the assistant",disabled:u,onChange:i=>{m.updateText(i.target.value,i.target.selectionStart),k.trackCaret(i.target)},onSelect:i=>{m.refresh(i.currentTarget.selectionStart),k.trackCaret(i.currentTarget)},onClick:i=>{m.refresh(i.currentTarget.selectionStart),k.trackCaret(i.currentTarget)},onScroll:i=>j(i.currentTarget.scrollTop),onBlur:i=>{var r,x;(x=(r=i.relatedTarget)==null?void 0:r.closest)!=null&&x.call(r,".chat-paper-picker")||window.setTimeout(m.close,0)},onKeyDown:i=>{if(!m.keyDown(i)){if(vs(i)&&T){i.preventDefault();const r=t+T;m.updateText(r,r.length),window.requestAnimationFrame(()=>{var x;return(x=q.current)==null?void 0:x.setSelectionRange(r.length,r.length)});return}i.key==="Enter"&&!i.shiftKey&&(i.preventDefault(),g())}},role:R?"combobox":void 0,"aria-expanded":R?m.open:void 0,"aria-controls":m.open?m.pickerId:void 0,"aria-activedescendant":m.open&&m.results.length?`${m.optionIdPrefix}-${m.activeIndex}`:void 0,"aria-autocomplete":R?"list":void 0,"aria-describedby":m.message?"ask-home-paper-mention-message":void 0})]}),e.jsx("button",{type:"button",className:`chat-send${t.trim()?" chat-send-on":""}`,onClick:()=>void g(),disabled:!t.trim()||u,"aria-label":"Ask the assistant",children:e.jsx(Ns,{})})]}),S&&e.jsx("div",{className:"chat-paper-mention-message",role:"alert",children:e.jsx("a",{href:S,target:"_blank",rel:"noreferrer",children:"Open this question on paperswithcode.co"})}),m.message&&e.jsx("div",{id:"ask-home-paper-mention-message",className:"chat-paper-mention-message",role:"alert",children:m.message}),e.jsx(Ss,{open:m.open,query:m.query,results:m.results,activeIndex:m.activeIndex,loading:m.loading,error:m.error,onSelect:m.select,id:m.pickerId,optionIdPrefix:m.optionIdPrefix})]})]})},Ue={task:"Tasks",method:"Methods",benchmark:"Benchmarks",author:"Authors",organization:"Orgs"},zs=Object.keys(Ue),Ks=30,Ie=40,Bs=async h=>{const o=await h;return{results:o.results.map(l=>({paper:l})),next_page:o.next_page}},Us=({mode:h})=>{var ie,ne,a,c,v,y,X,re,f,le,Z,Ce;const o=h==="following",l=Te(),n=Xe(),t=n==null?void 0:n.user,[b,j]=Ze(),u=hs(b,void 0,h==="trending"?"week":"month"),N=s=>{const d=new URLSearchParams(b);d.delete("order_by"),d.delete("only"),d.delete("topic");const w=d.toString();l(w?`${s}?${w}`:s)},S=s=>{const d=new URLSearchParams(b);d.delete("only"),s===null?d.delete("topic"):d.set("topic",String(s));const w=d.toString();return w?`/following?${w}`:"/following"},D=G({queryKey:es.topTasksSidebar,queryFn:()=>fe.topTasks(8),staleTime:V}),E=G({queryKey:["trending-tasks-sidebar"],queryFn:()=>fe.trendingTasks({limit:8,level:0,min_recent_papers:10}),staleTime:V}),L=o&&b.get("only")==="topic",q=o?Number(b.get("topic")??NaN):NaN,K=Number.isInteger(q)?q:void 0,R={start_date:u.startDate,end_date:u.endDate},m={...u,topicOnly:L,topicId:K},k=Cs(o?[...Le.feeds.following,t==null?void 0:t.hf_subject,m]:[...Le.feeds.trending,R],async s=>{if(o){const w=await _e.following(s,m),Ge=w.length===Ie?s+Ie:null;return{results:w,next_page:Ge}}const d={...R,page:s,page_size:Ks,include_resources:!0};return Bs(Es.list({...d,order_by:"trending",order_dir:"desc",latest_only:!0}))},{enabled:!o||!!t,initialPage:o?0:1}),T=He(o),g=Oe(o,1e4),P=Pe,i=Ke(),r=ls(),x=((ie=g.data)==null?void 0:ie.filter(cs))??[],F=x.length>0,_=(ne=g.data)==null?void 0:ne.find(s=>s.id===K),[M,C]=p.useState(void 0),J=(((a=g.data)==null?void 0:a.length)??0)s.id).join(","),ce=p.useRef([]);p.useEffect(()=>{const s=B?B.split(","):[];ce.current.some(d=>!s.includes(d))&&ee.invalidateQueries({queryKey:ge.feed(t==null?void 0:t.hf_subject)}),ce.current=s},[B,ee,t==null?void 0:t.hf_subject]);const se=o&&!!t&&((c=T.data)==null?void 0:c.length)===0&&g.isSuccess&&g.data.length===0,Q=o&&!(n!=null&&n.isLoading)&&!t||se,I=!!t||!Ve(),[W,de]=p.useState(!1),[$]=p.useState(()=>!!Ae()||De().length>0),[ue,be]=p.useState(!1);!W&&((v=g.data)!=null&&v.length||(y=T.data)!=null&&y.length)&&de(!0),Q&&!ue&&(be(!0),I&&!W&&!$&&C(null));const H=ze(),{mutate:O}=H,te=p.useRef(!1);p.useEffect(()=>{const s=Ae();!t||!g.isSuccess||!s||te.current||(te.current=!0,g.data.some(d=>d.text===s)?ds():O({text:s}))},[t,g.isSuccess,g.data,O]);const z=Be(),{mutate:Y}=z,ae=p.useRef(!1);p.useEffect(()=>{const s=De();!t||!s.length||ae.current||(ae.current=!0,Y(s))},[t,Y]);const me=p.useMemo(()=>zs.map(s=>{var d;return{kind:s,follows:o?((d=T.data)==null?void 0:d.filter(w=>w.kind===s))??[]:[]}}).filter(s=>s.follows.length>0),[o,T.data]),pe=o&&(!!(n!=null&&n.isLoading)||!!t&&!se),he=p.useMemo(()=>{var s;return((s=k.data)==null?void 0:s.pages.flatMap(d=>d.results.map(w=>({...us(w.paper),followReasons:w.reasons}))))??[]},[k.data]),oe=k.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 feed-sidebar",children:[pe?e.jsxs("div",{className:"sidebar-section sidebar-section-follows",children:[e.jsx("div",{className:"sidebar-label",children:"You follow"}),((n==null?void 0:n.isLoading)||T.isLoading)&&e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:Array.from({length:4}).map((s,d)=>e.jsx(we,{className:"h-5 w-full"},d))}),T.isError&&e.jsx("div",{style:{fontSize:12,color:"var(--ink-faint)"},children:"Couldn't load your follows."}),e.jsxs("div",{className:"sidebar-links",children:[!!((X=g.data)!=null&&X.length)&&e.jsxs("div",{className:"sidebar-follow-group sidebar-follow-topics",children:[e.jsx("span",{className:"sidebar-follow-kind",children:g.data.length===1?"Topic":"Topics"}),e.jsx(ps,{className:"sidebar-follow-topic-list",items:g.data,itemKey:s=>s.id,itemLabel:s=>P(s),disabled:r.isPending||i.isPending,onReorder:s=>r.mutate(s),renderItem:(s,d)=>{const w=s.id===K;return e.jsxs("div",{className:`sidebar-follow-topic ${w?"active":""}`,children:[d,e.jsx(A,{to:S(w?null:s.id),className:"sidebar-link sidebar-follow-link",title:w?"Show papers from everything you follow":`Show only papers about “${s.text}”`,"aria-current":w?"true":void 0,children:e.jsx("span",{className:"sidebar-follow-name",children:P(s)})}),e.jsx("button",{type:"button",className:"sidebar-follow-edit","aria-label":`Edit topic ${P(s)}`,"aria-expanded":M===s.id,onClick:()=>C(s.id),children:"edit"}),e.jsx("button",{type:"button",className:"sidebar-follow-edit sidebar-follow-remove","aria-label":`Remove topic ${P(s)}`,disabled:i.isPending,onClick:()=>{w&&l(S(null)),i.mutate([s.id])},children:"remove"})]})}}),(i.isError||r.isError)&&e.jsx("p",{className:"sidebar-follow-error",role:"alert",children:"Could not update your topics. Please try again."}),J&&e.jsx("button",{type:"button",className:"sidebar-follow-add","aria-expanded":M===null,onClick:()=>C(null),children:"+ Add topic"})]}),me.map(s=>e.jsxs("div",{className:"sidebar-follow-group",children:[e.jsx("span",{className:"sidebar-follow-kind",children:Ue[s.kind]}),s.follows.map(d=>e.jsx(A,{to:d.url,className:"sidebar-link sidebar-follow-link",children:e.jsx("span",{className:"sidebar-follow-name",children:d.name})},d.entity_id))]},s.kind))]}),e.jsx(A,{to:"/settings",className:"sidebar-follow-manage",children:"Manage in Settings"})]}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"sidebar-section sidebar-section-top-domains",children:[e.jsx("div",{className:"sidebar-label",children:"Top Domains"}),D.isLoading&&e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:Array.from({length:6}).map((s,d)=>e.jsx(we,{className:"h-5 w-full"},d))}),e.jsxs("div",{className:"sidebar-links",children:[(re=D.data)==null?void 0:re.map(s=>e.jsxs(A,{to:`/tasks/${s.slug}`,className:"sidebar-link",children:[Se(s.name,s.slug),s.paper_count!=null&&e.jsx("span",{className:"count",children:s.paper_count})]},s.id)),e.jsx(A,{to:"/tasks",className:"sidebar-link sidebar-link-more",children:"all domains →"})]})]}),e.jsxs("div",{className:"sidebar-section sidebar-section-trending-domains",children:[e.jsx("div",{className:"sidebar-label",children:"Trending Domains"}),E.isLoading&&e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:Array.from({length:6}).map((s,d)=>e.jsx(we,{className:"h-5 w-full"},d))}),((le=(f=E.data)==null?void 0:f.results)==null?void 0:le.length)===0&&!E.isLoading&&e.jsx("div",{style:{fontSize:12,color:"var(--ink-faint)"},children:"No domains gaining momentum right now."}),e.jsx("div",{className:"sidebar-links",children:(Ce=(Z=E.data)==null?void 0:Z.results)==null?void 0:Ce.map(s=>e.jsxs(A,{to:`/tasks/${s.slug}`,className:"sidebar-link",children:[Se(s.name,s.slug),e.jsxs("span",{className:"count",children:[s.share_lift.toFixed(1),"x"]})]},s.id))})]})]}),e.jsx(xs,{})]}),e.jsxs("div",{className:"feed-main",children:[(ve()||$e())&&e.jsx("div",{className:"feed-chat",children:e.jsx(Hs,{})}),e.jsxs("div",{className:"feed-content",children:[e.jsxs("div",{className:"sort-bar home-feed-sort-bar",children:[e.jsx("div",{className:"paper-feed-toolbar-controls",children:e.jsxs("div",{className:"sort-options",children:[e.jsx("button",{className:`sort-btn ${h==="trending"?"active":""}`,onClick:()=>N("/"),children:"trending"}),e.jsx("button",{className:`sort-btn ${o?"active":""}`,onClick:()=>N("/following"),children:"following"})]})}),e.jsx(gs,{startDate:u.startDate,endDate:u.endDate,onChange:s=>j(fs(b,s))})]}),o&&e.jsx(Ms,{onAddTopic:I&&J?()=>C(null):void 0}),oe&&e.jsx(je,{variant:"destructive",className:"mb-4",children:e.jsxs(ye,{children:["Failed to load papers. ",e.jsx("button",{type:"button",onClick:()=>void k.refetch(),children:"Try again"})]})}),H.isError&&H.variables&&e.jsx(je,{variant:"destructive",className:"mb-4",children:e.jsxs(ye,{children:["Could not follow “",H.variables.text,"”. ",e.jsx("button",{type:"button",onClick:()=>O(H.variables),children:"Try again"})]})}),z.isError&&z.variables&&e.jsx(je,{variant:"destructive",className:"mb-4",children:e.jsxs(ye,{children:["Could not follow ",z.variables.map(s=>s.name).join(", "),". ",e.jsx("button",{type:"button",onClick:()=>Y(z.variables),children:"Try again"})]})}),o&&!!t&&g.isSuccess&&!T.isPending&&!se&&(g.data.length===0?e.jsxs("div",{className:"following-topic-note",role:"status",children:["Describe a topic in your own words, and a model adds matching new papers to this feed."," ",e.jsx("button",{type:"button",className:"link-button",onClick:()=>C(null),children:"Follow a topic"})]}):F?e.jsxs("div",{className:"following-topic-note",role:"status",children:["Showing the closest papers about ",x.map(s=>`“${P(s)}”`).join(" and ")," now. A model is reading papers to refine these matches, which takes a few minutes."]}):null),I&&e.jsx(Fs,{open:M!==void 0,topicId:M??null,afterSavePath:o?void 0:"/following",onOpenChange:s=>{s||C(void 0)}}),(L||_)&&e.jsxs("div",{className:"following-topic-note following-topic-filter",role:"status",children:["Showing only papers about ",_?`“${P(_)}”`:"your topics","."," ",e.jsx(A,{to:S(null),children:"Show everything you follow"})]}),Q?e.jsx(Ls,{onBuild:I?()=>C(null):void 0}):e.jsx(bs,{query:k,isLoading:k.isLoading||o&&!!(n!=null&&n.isLoading),cards:he,skeleton:"card",rootMargin:"400px",empty:oe?null:_?e.jsxs(e.Fragment,{children:["No papers about this topic match these filters. Widen the date range or ",e.jsx("button",{type:"button",className:"link-button",onClick:()=>C(_.id),children:"edit the topic"}),"."]}):L?e.jsx(e.Fragment,{children:"No papers about your topics match these filters. Widen the date range or follow more topics."}):o?e.jsxs(e.Fragment,{children:["No papers from your topics or follows match these filters. Widen the date range, or follow more from ",e.jsx(A,{to:"/tasks",children:"tasks"}),", ",e.jsx(A,{to:"/methods",children:"methods"}),", benchmark, author, or organization pages."]}):"No papers in this window."})]})]})]})]})},vt=()=>e.jsx(Us,{mode:"trending"});export{Hs as AskAssistant,Us as HomeFeed,vt as default}; +import{j as e,L as A,a as Qe,g as We,k as Te,l as qe,b as G,f as p,C as Ee,h as Ye,r as ge,T as V,d as Xe,e as Ze,p as Le,i as Ve,m as ve,n as $e,o as Je,q as es}from"./index-D2fBL-s6.js";import{S as ss}from"./sparkles-4rJdywIs.js";import{D as ts,a as as,b as os}from"./dialog-DgUROq2j.js";import{c as fe}from"./catalog-5AxvKr4D.js";import{d as Oe,e as He,f as ze,b as Ke,g as Be,h as Ne,i as Fe,t as Pe,j as is,k as ns,r as _e,a as rs,l as ls,m as cs,n as Ae,o as De,p as ds}from"./researchTopic-jOpECA0z.js";import{d as Se,t as us}from"./transform-B_GaHMvk.js";import{P as ke}from"./plus-BI8-JXK0.js";import{A as ms}from"./arrow-right-COzkrAUH.js";import{S as ps}from"./SortableList-BzRDhhmi.js";import{r as hs,a as gs,w as fs,P as bs}from"./PaperFeed-BERxHjrg.js";import{M as xs}from"./McpShowcase-R1ucnqw2.js";import{u as ws,a as js,P as ys,i as vs,A as Ns,b as Ss,S as U,c as ks,D as xe,q as Ts,d as Ps}from"./chatSessions-CoHSP58H.js";import{c as _s}from"./chat-BOZIonsX.js";import{u as Cs}from"./usePapers-CAjdcUuj.js";import{p as Es}from"./papers-khuZaSFb.js";import{S as we}from"./skeleton-BDwfco0_.js";import{A as je,a as ye}from"./alert-PnePcfgX.js";import"./useMutation-9dlTbuQj.js";import"./PaperCard-DhorusY5.js";import"./AuthorAvatar-C8tz_syh.js";import"./SotaBadges-r6iGzLRW.js";import"./colors-BkWRhvFI.js";import"./Icon-Uhh78KjL.js";import"./LatexTitle-WIQJ1ke0.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-DS5Jzsg5.js";import"./useIntersectionObserver-C0Rq0EXm.js";import"./AgentLogos-B5etEEwg.js";import"./useInfiniteQuery-CjJA-90e.js";import"./curation-BtfabyzA.js";function Ls({onBuild:h}){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:"Describe topics in your own words, or follow the tasks, benchmarks, authors, and organizations you care about, and this page collects their latest papers and results in one place."}),h&&e.jsxs("button",{type:"button",className:"research-topic-save following-intro-topic",onClick:h,children:[e.jsx(ss,{"aria-hidden":"true"}),"Build your feed"]}),e.jsxs("p",{className:"following-intro-note",children:["Matching papers also arrive as a weekly email, which you can turn off in"," ",e.jsx(A,{to:"/settings",children:"Settings"}),"."]})]})}const Re=16;function Fs({open:h,topicId:o=null,afterSavePath:l,onOpenChange:n}){return e.jsx(ts,{open:h,onOpenChange:n,children:e.jsx(as,{className:"topic-dialog","aria-describedby":void 0,children:e.jsx(As,{topicId:o,afterSavePath:l,onDone:()=>n(!1)},o??"new")})})}function As({topicId:h,afterSavePath:o,onDone:l}){var te,z,Y,ae,me,pe,he,oe,ie,ne;const{user:n}=Qe(),t=We(),b=Te(),j=qe(),u=Oe(),N=He(),S=G({queryKey:["trending-tasks-follow"],queryFn:()=>fe.trendingTasks({limit:Re,level:0}),staleTime:V}),D=G({queryKey:["trending-methods-follow"],queryFn:()=>fe.trendingMethods({limit:Re}),staleTime:V}),E=G({queryKey:["research-follow-suggestions"],queryFn:_e.followSuggestions,staleTime:V}),L=(a=[])=>a.map(c=>({id:String(c.entity_id),name:c.name,image:c.image_url})),[q,K]=p.useState(null),[R,m]=p.useState([]),[k,T]=p.useState([]),g=ze(),P=Ke(),i=Be(),r=(te=u.data)==null?void 0:te.find(a=>a.id===h),x=((z=u.data)==null?void 0:z.filter(a=>a.id!==h))??[],F=k.filter(a=>x.some(c=>c.id===a)),_=(r==null?void 0:r.text)??"",M=q??_,C=M.trim().replace(/\s+/g," "),J=(r==null?void 0:r.status)==="failed"&&C===_,ee=!r&&(((Y=u.data)==null?void 0:Y.length)??0)-F.length>=Ne,B=C.length>=3&&(C!==_||J)&&!ee,[ce,se]=p.useState(!1),Q=p.useRef(!0);p.useEffect(()=>(Q.current=!0,()=>{Q.current=!1}),[]);const I=g.isPending||P.isPending||i.isPending||ce,W=(a,c)=>{var v;return((v=N.data)==null?void 0:v.some(y=>y.kind===a&&String(y.entity_id)===c))??!1},de=(a,c)=>{var v;return((v=R.find(y=>y.kind===a&&y.id===c))==null?void 0:v.follow)??W(a,c)},$=R.filter(a=>a.follow!==W(a.kind,a.id)),ue=!I&&(B||$.length>0||F.length>0),be=(a,c,v)=>m(y=>[...y.filter(X=>X.kind!==a||X.id!==c),{kind:a,id:c,name:v,follow:!de(a,c)}]),H=()=>{if(!ue)return;if(!n){B&&is(C),$.length&&ns($),window.location.href=Ye(o??`${t.pathname}${t.search}`);return}const a=F.length?P.mutateAsync(F):Promise.resolve(),c=[...$.length?[i.mutateAsync($)]:[],a,...B?[a.catch(()=>{}).then(()=>g.mutateAsync({id:r==null?void 0:r.id,text:C}))]:[]];Promise.allSettled(c).then(async v=>{if(v.every(y=>y.status==="fulfilled")){if(o){if(se(!0),await Promise.all([j.refetchQueries({queryKey:ge.follows(n.hf_subject)}),j.refetchQueries({queryKey:ge.topics(n.hf_subject)})]),!Q.current)return;l(),b(o);return}l()}})},O=(a,c,v,y)=>{const re=[...(N.data??[]).filter(f=>f.kind===c).map(f=>({id:String(f.entity_id),name:f.name,slug:f.url.split("/").pop(),image:f.image_url})),...v.filter(f=>!W(c,f.id)).map(f=>({...f,suggested:!0}))];return re.length>0&&e.jsxs("div",{className:"topic-dialog-group",children:[e.jsx("h3",{children:a}),e.jsxs(Ds,{children:[re.map(f=>{const le=de(c,f.id),Z=c==="task"?Se(f.name,f.slug??void 0):f.name;return e.jsxs("button",{type:"button",className:"topic-dialog-chip","aria-pressed":le,disabled:I,"data-suggested":"suggested"in f||void 0,onClick:()=>be(c,f.id,Z),children:[le?e.jsx(Ee,{"aria-hidden":"true"}):e.jsx(ke,{"aria-hidden":"true"}),(c==="author"||c==="organization")&&e.jsx(Rs,{kind:c,name:Z,src:f.image}),Z]},f.id)}),y&&e.jsxs(A,{to:y.to,className:"topic-dialog-browse",children:[y.label,e.jsx(ms,{"aria-hidden":"true"})]})]})]})};return e.jsxs("form",{className:"topic-dialog-form",onSubmit:a=>{a.preventDefault(),H()},children:[e.jsx(os,{className:"topic-dialog-title",children:(ae=u.data)!=null&&ae.length||(me=N.data)!=null&&me.length?"Edit your research feed":"Build your research feed"}),e.jsxs("div",{className:"topic-dialog-group",children:[e.jsx("h3",{children:e.jsx("label",{htmlFor:"topic-dialog-input",children:r?"Edit this topic":(pe=u.data)!=null&&pe.length?"Add a topic in your own words":"Describe a topic in your own words"})}),e.jsx("p",{className:"topic-dialog-hint",children:ee?`You follow ${Ne} topics, the most allowed. Remove one below to add another.`:"A model reads every new paper and adds the ones that match to your Following feed. New topics are public and show your Hugging Face username; make one private in Settings."}),e.jsx("textarea",{id:"topic-dialog-input",className:"research-topic-input",rows:4,maxLength:Fe,"aria-label":"Research topic",placeholder:"e.g. diffusion policies for robot manipulation, or speculative decoding for LLM inference",value:M,onChange:a=>K(a.target.value),onKeyDown:a=>{a.key==="Enter"&&!a.shiftKey&&!a.nativeEvent.isComposing&&(a.preventDefault(),H())}}),e.jsxs("span",{className:"research-topic-count",children:[M.length,"/",Fe]})]}),x.length>0&&e.jsxs("div",{className:"topic-dialog-group",children:[e.jsx("h3",{children:r?"Your other topics":"Your topics"}),e.jsx("div",{className:"topic-dialog-chips",children:x.map(a=>{const c=!k.includes(a.id);return e.jsxs("button",{type:"button",className:"topic-dialog-chip","aria-pressed":c,disabled:I,title:a.text,onClick:()=>T(v=>c?[...v,a.id]:v.filter(y=>y!==a.id)),children:[c?e.jsx(Ee,{"aria-hidden":"true"}):e.jsx(ke,{"aria-hidden":"true"}),Pe(a)]},a.id)})})]}),O("Trending tasks","task",((he=S.data)==null?void 0:he.results)??[],{to:"/tasks",label:"Browse tasks"}),O("Trending methods","method",((oe=D.data)==null?void 0:oe.results)??[],{to:"/methods",label:"Browse methods"}),O("Benchmarks","benchmark",[],{to:"/tasks",label:"Browse benchmarks"}),O("Popular authors","author",L((ie=E.data)==null?void 0:ie.authors)),O("Popular organizations","organization",L((ne=E.data)==null?void 0:ne.organizations),{to:"/organizations",label:"Browse organizations"}),(g.error||P.error||i.error)&&e.jsx("p",{className:"settings-token-error",role:"alert",children:"Could not save your feed. Please try again."}),e.jsxs("div",{className:"topic-dialog-actions",children:[r&&e.jsx("button",{type:"button",className:"research-follow-action topic-dialog-remove",disabled:I,onClick:()=>P.mutate([r.id],{onSuccess:l}),children:"Remove topic"}),e.jsx("button",{type:"button",className:"research-follow-action",disabled:I,onClick:l,children:"Cancel"}),e.jsx("button",{type:"submit",className:"research-topic-save",disabled:!ue,children:$.some(a=>a.follow===!1)||F.length?"Save":$.length?"Follow":J?"Retry":r?"Update topic":"Follow"})]})]})}function Ds({children:h}){const o=p.useRef(null);return p.useLayoutEffect(()=>{const l=o.current;if(!l)return;const n=()=>{const t=[...l.children],b=t.filter(u=>u.dataset.suggested);b.forEach(u=>{u.hidden=!1});const j=()=>new Set(t.filter(u=>!u.hidden).map(u=>u.offsetTop)).size;for(let u=b.length-1;u>=0&&j()>2;u--)b[u].hidden=!0};return n(),window.addEventListener("resize",n),()=>window.removeEventListener("resize",n)}),e.jsx("div",{ref:o,className:"topic-dialog-chips",children:h})}function Rs({kind:h,name:o,src:l}){const[n,t]=p.useState(!1);if(l&&!n)return e.jsx("img",{className:`topic-dialog-chip-image is-${h}`,src:l,alt:"",loading:"lazy",onError:()=>t(!0)});if(h!=="author")return null;const b=o.split(/\s+/).filter(Boolean).map(j=>j[0]).slice(0,2).join("").toUpperCase();return e.jsx("span",{className:"topic-dialog-chip-image is-author is-initials","aria-hidden":"true",children:b})}function Ms({onAddTopic:h}){var l,n;const o=G({queryKey:ge.featuredTopics,queryFn:_e.featuredTopics,staleTime:V});return o.isPending||!((l=o.data)!=null&&l.length)&&!h?null:e.jsxs("nav",{className:"topic-bubbles","aria-label":"Popular topics",children:[(n=o.data)==null?void 0:n.map(t=>e.jsxs(A,{className:"topic-bubble",to:rs(t),title:`${t.followers.toLocaleString()} ${t.followers===1?"follower":"followers"}`,children:[t.creator&&e.jsx("img",{src:t.creator.avatar_url,alt:"",width:20,height:20,loading:"lazy"}),e.jsx("span",{className:"topic-bubble-name",children:Pe(t)}),t.creator&&e.jsxs("span",{className:"topic-bubble-creator",children:["@",t.creator.username]})]},t.id)),h&&e.jsxs("button",{type:"button",className:"topic-bubble topic-bubble-add",onClick:h,children:[e.jsx(ke,{size:14,"aria-hidden":"true"}),e.jsx("span",{className:"topic-bubble-name",children:"Add topic"})]})]})}const Me=45,Is=1800,qs=25,$s=350,Os=h=>{const[o,l]=p.useState(U[0].slice(0,1)),[n,t]=p.useState(0);return p.useEffect(()=>{var D,E;if(!h)return;if((E=(D=window.matchMedia)==null?void 0:D.call(window,"(prefers-reduced-motion: reduce)"))!=null&&E.matches){l(U[0]),t(0);return}let b=0,j=1,u=!1,N;l(U[0].slice(0,j)),t(0);const S=()=>{const L=U[b];if(!u){if(j+=1,l(L.slice(0,j)),j===L.length){u=!0,N=window.setTimeout(S,Is);return}N=window.setTimeout(S,Me);return}if(j-=1,l(L.slice(0,j)),j===0){u=!1,b=(b+1)%U.length,t(b),N=window.setTimeout(S,$s);return}N=window.setTimeout(S,qs)};return N=window.setTimeout(S,Me),()=>window.clearTimeout(N)},[h]),{placeholder:o,prompt:U[n]}},Hs=()=>{var P;const h=Te(),o=$e(),[l,n]=p.useState({text:"",paperMentions:[]}),t=l.text,[b,j]=p.useState(0),[u,N]=p.useState(!1),[S,D]=p.useState(null),{placeholder:E,prompt:L}=Os(!t),q=p.useRef(null),K=G({queryKey:["chatAvailability"],queryFn:()=>_s.getAvailability(),retry:!1,enabled:ve()}),R=ve()&&((P=K.data)==null?void 0:P.paper_mentions_enabled)!==!1,m=ws({draft:l,onChange:n,enabled:R,textareaRef:q}),k=js(l,m.open),T=t?k.completion:L;p.useLayoutEffect(()=>{const i=q.current;if(!i)return;const r=()=>{if(i.style.height="auto",t){i.style.height=`${Math.min(ks(i),160)}px`;return}const x=i.placeholder,F=U.reduce((_,M)=>(i.placeholder=M,Math.max(_,i.scrollHeight)),0);i.placeholder=x,i.style.height=`${Math.min(F,160)}px`};return r(),window.addEventListener("resize",r),()=>window.removeEventListener("resize",r)},[t,T]);const g=async(i=l)=>{const r=i.text.trim();if(!(!r||u)){if(o){const x=new URLSearchParams({q:r,model:xe}),F=`${Je}?${x}`,_=window.open(F,"_blank");if(!_){D(F);return}_.opener=null,D(null),n({text:"",paperMentions:[]});return}N(!0),Ts(i,xe);try{const x=await Ps(xe);h(`/chat/${x.id}`)}catch{h("/chat")}}};return e.jsxs(e.Fragment,{children:[!o&&e.jsx("div",{className:"ask-home-new",children:"Hint: type @ to bring papers into context, or press Tab to use a suggestion"}),e.jsxs("div",{className:"ask-home",children:[e.jsxs("div",{className:"ask-home-row",children:[e.jsxs("div",{className:"ask-home-textarea-wrap",children:[e.jsx(ys,{text:l.text,mentions:l.paperMentions,scrollTop:b,variant:"home",completion:t?T:""}),e.jsx("textarea",{ref:q,rows:1,value:t,placeholder:E,"aria-label":"Ask the assistant",disabled:u,onChange:i=>{m.updateText(i.target.value,i.target.selectionStart),k.trackCaret(i.target)},onSelect:i=>{m.refresh(i.currentTarget.selectionStart),k.trackCaret(i.currentTarget)},onClick:i=>{m.refresh(i.currentTarget.selectionStart),k.trackCaret(i.currentTarget)},onScroll:i=>j(i.currentTarget.scrollTop),onBlur:i=>{var r,x;(x=(r=i.relatedTarget)==null?void 0:r.closest)!=null&&x.call(r,".chat-paper-picker")||window.setTimeout(m.close,0)},onKeyDown:i=>{if(!m.keyDown(i)){if(vs(i)&&T){i.preventDefault();const r=t+T;m.updateText(r,r.length),window.requestAnimationFrame(()=>{var x;return(x=q.current)==null?void 0:x.setSelectionRange(r.length,r.length)});return}i.key==="Enter"&&!i.shiftKey&&(i.preventDefault(),g())}},role:R?"combobox":void 0,"aria-expanded":R?m.open:void 0,"aria-controls":m.open?m.pickerId:void 0,"aria-activedescendant":m.open&&m.results.length?`${m.optionIdPrefix}-${m.activeIndex}`:void 0,"aria-autocomplete":R?"list":void 0,"aria-describedby":m.message?"ask-home-paper-mention-message":void 0})]}),e.jsx("button",{type:"button",className:`chat-send${t.trim()?" chat-send-on":""}`,onClick:()=>void g(),disabled:!t.trim()||u,"aria-label":"Ask the assistant",children:e.jsx(Ns,{})})]}),S&&e.jsx("div",{className:"chat-paper-mention-message",role:"alert",children:e.jsx("a",{href:S,target:"_blank",rel:"noreferrer",children:"Open this question on paperswithcode.co"})}),m.message&&e.jsx("div",{id:"ask-home-paper-mention-message",className:"chat-paper-mention-message",role:"alert",children:m.message}),e.jsx(Ss,{open:m.open,query:m.query,results:m.results,activeIndex:m.activeIndex,loading:m.loading,error:m.error,onSelect:m.select,id:m.pickerId,optionIdPrefix:m.optionIdPrefix})]})]})},Ue={task:"Tasks",method:"Methods",benchmark:"Benchmarks",author:"Authors",organization:"Orgs"},zs=Object.keys(Ue),Ks=30,Ie=40,Bs=async h=>{const o=await h;return{results:o.results.map(l=>({paper:l})),next_page:o.next_page}},Us=({mode:h})=>{var ie,ne,a,c,v,y,X,re,f,le,Z,Ce;const o=h==="following",l=Te(),n=Xe(),t=n==null?void 0:n.user,[b,j]=Ze(),u=hs(b,void 0,h==="trending"?"week":"month"),N=s=>{const d=new URLSearchParams(b);d.delete("order_by"),d.delete("only"),d.delete("topic");const w=d.toString();l(w?`${s}?${w}`:s)},S=s=>{const d=new URLSearchParams(b);d.delete("only"),s===null?d.delete("topic"):d.set("topic",String(s));const w=d.toString();return w?`/following?${w}`:"/following"},D=G({queryKey:es.topTasksSidebar,queryFn:()=>fe.topTasks(8),staleTime:V}),E=G({queryKey:["trending-tasks-sidebar"],queryFn:()=>fe.trendingTasks({limit:8,level:0,min_recent_papers:10}),staleTime:V}),L=o&&b.get("only")==="topic",q=o?Number(b.get("topic")??NaN):NaN,K=Number.isInteger(q)?q:void 0,R={start_date:u.startDate,end_date:u.endDate},m={...u,topicOnly:L,topicId:K},k=Cs(o?[...Le.feeds.following,t==null?void 0:t.hf_subject,m]:[...Le.feeds.trending,R],async s=>{if(o){const w=await _e.following(s,m),Ge=w.length===Ie?s+Ie:null;return{results:w,next_page:Ge}}const d={...R,page:s,page_size:Ks,include_resources:!0};return Bs(Es.list({...d,order_by:"trending",order_dir:"desc",latest_only:!0}))},{enabled:!o||!!t,initialPage:o?0:1}),T=He(o),g=Oe(o,1e4),P=Pe,i=Ke(),r=ls(),x=((ie=g.data)==null?void 0:ie.filter(cs))??[],F=x.length>0,_=(ne=g.data)==null?void 0:ne.find(s=>s.id===K),[M,C]=p.useState(void 0),J=(((a=g.data)==null?void 0:a.length)??0)s.id).join(","),ce=p.useRef([]);p.useEffect(()=>{const s=B?B.split(","):[];ce.current.some(d=>!s.includes(d))&&ee.invalidateQueries({queryKey:ge.feed(t==null?void 0:t.hf_subject)}),ce.current=s},[B,ee,t==null?void 0:t.hf_subject]);const se=o&&!!t&&((c=T.data)==null?void 0:c.length)===0&&g.isSuccess&&g.data.length===0,Q=o&&!(n!=null&&n.isLoading)&&!t||se,I=!!t||!Ve(),[W,de]=p.useState(!1),[$]=p.useState(()=>!!Ae()||De().length>0),[ue,be]=p.useState(!1);!W&&((v=g.data)!=null&&v.length||(y=T.data)!=null&&y.length)&&de(!0),Q&&!ue&&(be(!0),I&&!W&&!$&&C(null));const H=ze(),{mutate:O}=H,te=p.useRef(!1);p.useEffect(()=>{const s=Ae();!t||!g.isSuccess||!s||te.current||(te.current=!0,g.data.some(d=>d.text===s)?ds():O({text:s}))},[t,g.isSuccess,g.data,O]);const z=Be(),{mutate:Y}=z,ae=p.useRef(!1);p.useEffect(()=>{const s=De();!t||!s.length||ae.current||(ae.current=!0,Y(s))},[t,Y]);const me=p.useMemo(()=>zs.map(s=>{var d;return{kind:s,follows:o?((d=T.data)==null?void 0:d.filter(w=>w.kind===s))??[]:[]}}).filter(s=>s.follows.length>0),[o,T.data]),pe=o&&(!!(n!=null&&n.isLoading)||!!t&&!se),he=p.useMemo(()=>{var s;return((s=k.data)==null?void 0:s.pages.flatMap(d=>d.results.map(w=>({...us(w.paper),followReasons:w.reasons}))))??[]},[k.data]),oe=k.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 feed-sidebar",children:[pe?e.jsxs("div",{className:"sidebar-section sidebar-section-follows",children:[e.jsx("div",{className:"sidebar-label",children:"You follow"}),((n==null?void 0:n.isLoading)||T.isLoading)&&e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:Array.from({length:4}).map((s,d)=>e.jsx(we,{className:"h-5 w-full"},d))}),T.isError&&e.jsx("div",{style:{fontSize:12,color:"var(--ink-faint)"},children:"Couldn't load your follows."}),e.jsxs("div",{className:"sidebar-links",children:[!!((X=g.data)!=null&&X.length)&&e.jsxs("div",{className:"sidebar-follow-group sidebar-follow-topics",children:[e.jsx("span",{className:"sidebar-follow-kind",children:g.data.length===1?"Topic":"Topics"}),e.jsx(ps,{className:"sidebar-follow-topic-list",items:g.data,itemKey:s=>s.id,itemLabel:s=>P(s),disabled:r.isPending||i.isPending,onReorder:s=>r.mutate(s),renderItem:(s,d)=>{const w=s.id===K;return e.jsxs("div",{className:`sidebar-follow-topic ${w?"active":""}`,children:[d,e.jsx(A,{to:S(w?null:s.id),className:"sidebar-link sidebar-follow-link",title:w?"Show papers from everything you follow":`Show only papers about “${s.text}”`,"aria-current":w?"true":void 0,children:e.jsx("span",{className:"sidebar-follow-name",children:P(s)})}),e.jsx("button",{type:"button",className:"sidebar-follow-edit","aria-label":`Edit topic ${P(s)}`,"aria-expanded":M===s.id,onClick:()=>C(s.id),children:"edit"}),e.jsx("button",{type:"button",className:"sidebar-follow-edit sidebar-follow-remove","aria-label":`Remove topic ${P(s)}`,disabled:i.isPending,onClick:()=>{w&&l(S(null)),i.mutate([s.id])},children:"remove"})]})}}),(i.isError||r.isError)&&e.jsx("p",{className:"sidebar-follow-error",role:"alert",children:"Could not update your topics. Please try again."}),J&&e.jsx("button",{type:"button",className:"sidebar-follow-add","aria-expanded":M===null,onClick:()=>C(null),children:"+ Add topic"})]}),me.map(s=>e.jsxs("div",{className:"sidebar-follow-group",children:[e.jsx("span",{className:"sidebar-follow-kind",children:Ue[s.kind]}),s.follows.map(d=>e.jsx(A,{to:d.url,className:"sidebar-link sidebar-follow-link",children:e.jsx("span",{className:"sidebar-follow-name",children:d.name})},d.entity_id))]},s.kind))]}),e.jsx(A,{to:"/settings",className:"sidebar-follow-manage",children:"Manage in Settings"})]}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"sidebar-section sidebar-section-top-domains",children:[e.jsx("div",{className:"sidebar-label",children:"Top Domains"}),D.isLoading&&e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:Array.from({length:6}).map((s,d)=>e.jsx(we,{className:"h-5 w-full"},d))}),e.jsxs("div",{className:"sidebar-links",children:[(re=D.data)==null?void 0:re.map(s=>e.jsxs(A,{to:`/tasks/${s.slug}`,className:"sidebar-link",children:[Se(s.name,s.slug),s.paper_count!=null&&e.jsx("span",{className:"count",children:s.paper_count})]},s.id)),e.jsx(A,{to:"/tasks",className:"sidebar-link sidebar-link-more",children:"all domains →"})]})]}),e.jsxs("div",{className:"sidebar-section sidebar-section-trending-domains",children:[e.jsx("div",{className:"sidebar-label",children:"Trending Domains"}),E.isLoading&&e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:Array.from({length:6}).map((s,d)=>e.jsx(we,{className:"h-5 w-full"},d))}),((le=(f=E.data)==null?void 0:f.results)==null?void 0:le.length)===0&&!E.isLoading&&e.jsx("div",{style:{fontSize:12,color:"var(--ink-faint)"},children:"No domains gaining momentum right now."}),e.jsx("div",{className:"sidebar-links",children:(Ce=(Z=E.data)==null?void 0:Z.results)==null?void 0:Ce.map(s=>e.jsxs(A,{to:`/tasks/${s.slug}`,className:"sidebar-link",children:[Se(s.name,s.slug),e.jsxs("span",{className:"count",children:[s.share_lift.toFixed(1),"x"]})]},s.id))})]})]}),e.jsx(xs,{})]}),e.jsxs("div",{className:"feed-main",children:[(ve()||$e())&&e.jsx("div",{className:"feed-chat",children:e.jsx(Hs,{})}),e.jsxs("div",{className:"feed-content",children:[e.jsxs("div",{className:"sort-bar home-feed-sort-bar",children:[e.jsx("div",{className:"paper-feed-toolbar-controls",children:e.jsxs("div",{className:"sort-options",children:[e.jsx("button",{className:`sort-btn ${h==="trending"?"active":""}`,onClick:()=>N("/"),children:"trending"}),e.jsx("button",{className:`sort-btn ${o?"active":""}`,onClick:()=>N("/following"),children:"following"})]})}),e.jsx(gs,{startDate:u.startDate,endDate:u.endDate,onChange:s=>j(fs(b,s))})]}),o&&e.jsx(Ms,{onAddTopic:I&&J?()=>C(null):void 0}),oe&&e.jsx(je,{variant:"destructive",className:"mb-4",children:e.jsxs(ye,{children:["Failed to load papers. ",e.jsx("button",{type:"button",onClick:()=>void k.refetch(),children:"Try again"})]})}),H.isError&&H.variables&&e.jsx(je,{variant:"destructive",className:"mb-4",children:e.jsxs(ye,{children:["Could not follow “",H.variables.text,"”. ",e.jsx("button",{type:"button",onClick:()=>O(H.variables),children:"Try again"})]})}),z.isError&&z.variables&&e.jsx(je,{variant:"destructive",className:"mb-4",children:e.jsxs(ye,{children:["Could not follow ",z.variables.map(s=>s.name).join(", "),". ",e.jsx("button",{type:"button",onClick:()=>Y(z.variables),children:"Try again"})]})}),o&&!!t&&g.isSuccess&&!T.isPending&&!se&&(g.data.length===0?e.jsxs("div",{className:"following-topic-note",role:"status",children:["Describe a topic in your own words, and a model adds matching new papers to this feed."," ",e.jsx("button",{type:"button",className:"link-button",onClick:()=>C(null),children:"Follow a topic"})]}):F?e.jsxs("div",{className:"following-topic-note",role:"status",children:["Showing the closest papers about ",x.map(s=>`“${P(s)}”`).join(" and ")," now. A model is reading papers to refine these matches, which takes a few minutes."]}):null),I&&e.jsx(Fs,{open:M!==void 0,topicId:M??null,afterSavePath:o?void 0:"/following",onOpenChange:s=>{s||C(void 0)}}),(L||_)&&e.jsxs("div",{className:"following-topic-note following-topic-filter",role:"status",children:["Showing only papers about ",_?`“${P(_)}”`:"your topics","."," ",e.jsx(A,{to:S(null),children:"Show everything you follow"})]}),Q?e.jsx(Ls,{onBuild:I?()=>C(null):void 0}):e.jsx(bs,{query:k,isLoading:k.isLoading||o&&!!(n!=null&&n.isLoading),cards:he,skeleton:"card",rootMargin:"400px",empty:oe?null:_?e.jsxs(e.Fragment,{children:["No papers about this topic match these filters. Widen the date range or ",e.jsx("button",{type:"button",className:"link-button",onClick:()=>C(_.id),children:"edit the topic"}),"."]}):L?e.jsx(e.Fragment,{children:"No papers about your topics match these filters. Widen the date range or follow more topics."}):o?e.jsxs(e.Fragment,{children:["No papers from your topics or follows match these filters. Widen the date range, or follow more from ",e.jsx(A,{to:"/tasks",children:"tasks"}),", ",e.jsx(A,{to:"/methods",children:"methods"}),", benchmark, author, or organization pages."]}):"No papers in this window."})]})]})]})]})},vt=()=>e.jsx(Us,{mode:"trending"});export{Hs as AskAssistant,Us as HomeFeed,vt as default}; diff --git a/assets/FollowingView-BbQTuHgp.js b/assets/FollowingView-BbQTuHgp.js deleted file mode 100644 index 6b63ac1b51076c95ce98be8b8915b5ab61032be2..0000000000000000000000000000000000000000 --- a/assets/FollowingView-BbQTuHgp.js +++ /dev/null @@ -1 +0,0 @@ -import{j as o}from"./index-CTkdBAwI.js";import{HomeFeed as r}from"./FeedView-CdlMrbHK.js";import"./sparkles-DsQKLoSg.js";import"./dialog-C7LLEadk.js";import"./catalog-ZV4aeC2F.js";import"./researchTopic-B8hMcjil.js";import"./useMutation-DXSljxHA.js";import"./transform-CZL79kIa.js";import"./plus-Dhoq_Vs9.js";import"./arrow-right-BqOq_ArY.js";import"./SortableList-YW_y9VAs.js";import"./PaperFeed-2BMpWfem.js";import"./PaperCard--WllvTq0.js";import"./AuthorAvatar-DjiI2pGP.js";import"./SotaBadges-CyyWKB0V.js";import"./colors-BkWRhvFI.js";import"./Icon-DSoTeS9V.js";import"./LatexTitle-BmCQe_rK.js";import"./papers-POQWk4vk.js";import"./curation-BlGrJ3z2.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-CZErm3i7.js";import"./skeleton-p2_v-2W8.js";import"./useIntersectionObserver-BnA8TYxZ.js";import"./McpShowcase-0Is00fre.js";import"./AgentLogos-CDnvpl-X.js";import"./chatSessions-DFZee9F6.js";import"./chat-Dr1lXe8V.js";import"./usePapers-Cu-zovv8.js";import"./useInfiniteQuery-CLH4OKrI.js";import"./alert-5nuL0v_r.js";function C(){return o.jsx(r,{mode:"following"})}export{C as default}; diff --git a/assets/FollowingView-BemIb4-Z.js b/assets/FollowingView-BemIb4-Z.js new file mode 100644 index 0000000000000000000000000000000000000000..4f15beb6ae8d73dc09b591eafce1d8eecb5b6c2e --- /dev/null +++ b/assets/FollowingView-BemIb4-Z.js @@ -0,0 +1 @@ +import{j as o}from"./index-D2fBL-s6.js";import{HomeFeed as r}from"./FeedView-6xUWjpm4.js";import"./sparkles-4rJdywIs.js";import"./dialog-DgUROq2j.js";import"./catalog-5AxvKr4D.js";import"./researchTopic-jOpECA0z.js";import"./useMutation-9dlTbuQj.js";import"./transform-B_GaHMvk.js";import"./plus-BI8-JXK0.js";import"./arrow-right-COzkrAUH.js";import"./SortableList-BzRDhhmi.js";import"./PaperFeed-BERxHjrg.js";import"./PaperCard-DhorusY5.js";import"./AuthorAvatar-C8tz_syh.js";import"./SotaBadges-r6iGzLRW.js";import"./colors-BkWRhvFI.js";import"./Icon-Uhh78KjL.js";import"./LatexTitle-WIQJ1ke0.js";import"./papers-khuZaSFb.js";import"./curation-BtfabyzA.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-DS5Jzsg5.js";import"./skeleton-BDwfco0_.js";import"./useIntersectionObserver-C0Rq0EXm.js";import"./McpShowcase-R1ucnqw2.js";import"./AgentLogos-B5etEEwg.js";import"./chatSessions-CoHSP58H.js";import"./chat-BOZIonsX.js";import"./usePapers-CAjdcUuj.js";import"./useInfiniteQuery-CjJA-90e.js";import"./alert-PnePcfgX.js";function C(){return o.jsx(r,{mode:"following"})}export{C as default}; diff --git a/assets/FrameworksIndexView-BSrsVJnt.js b/assets/FrameworksIndexView-CogZFpfQ.js similarity index 95% rename from assets/FrameworksIndexView-BSrsVJnt.js rename to assets/FrameworksIndexView-CogZFpfQ.js index 7510ef2e98fff0c4a5503f0ea3f687dd24d3588a..9ff1d6587a7ad51bbcaa2a9cd61f4ff77ad3714e 100644 --- a/assets/FrameworksIndexView-BSrsVJnt.js +++ b/assets/FrameworksIndexView-CogZFpfQ.js @@ -1 +1 @@ -import{k as d,j as e,L as c,b as m,V as h}from"./index-CTkdBAwI.js";import{I as p}from"./Icon-DSoTeS9V.js";import{c as u}from"./catalog-ZV4aeC2F.js";import{c as g,h as x}from"./colors-BkWRhvFI.js";import{P as f}from"./frameworks-DDA0P4Tf.js";const j={fontFamily:"var(--mono)",fontSize:13,fontWeight:600,letterSpacing:"0.04em",textTransform:"uppercase",color:"var(--ink)",marginBottom:6},k=({platform:s})=>{const n=g(x(s));return e.jsx("span",{className:"framework-platform-chip",style:{background:n.bg,color:n.text},children:f[s]})},_=({framework:s})=>{const n=d(),t=`/papers?framework=${encodeURIComponent(s.slug)}`;return e.jsxs("article",{id:`framework-${s.slug}`,className:"framework-card framework-card-clickable",role:"link",tabIndex:0,"aria-label":`View papers implemented by ${s.name}`,onClick:a=>{a.target.closest("a, button")||n(t)},onKeyDown:a=>{a.target===a.currentTarget&&(a.key==="Enter"||a.key===" ")&&(a.preventDefault(),n(t))},children:[e.jsxs("div",{className:"framework-card-head",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"framework-card-name",children:s.name}),s.organization_name&&e.jsx("div",{className:"framework-card-org",children:s.organization_name})]}),s.platforms&&s.platforms.length>0&&e.jsx("div",{className:"framework-platform-row",children:s.platforms.map(a=>e.jsx(k,{platform:a},a))})]}),e.jsx("p",{className:"framework-card-desc",children:s.description}),s.when_to_use&&e.jsxs("div",{className:"framework-card-when",children:[e.jsx("span",{className:"framework-card-when-label",children:"When to use"}),s.when_to_use]}),(s.github_url||s.docs_url||s.introducing_paper_arxiv_id)&&e.jsxs("div",{className:"framework-card-links",children:[s.introducing_paper_arxiv_id&&e.jsx(c,{to:`/paper/${s.introducing_paper_arxiv_id}`,className:"framework-link",children:"Introducing paper"}),s.github_url&&s.paper_count>0&&e.jsxs(c,{to:t,className:"framework-link",children:["Implements ",s.paper_count," ",s.paper_count===1?"paper":"papers"]}),s.github_url&&s.paper_count===0&&e.jsx("span",{className:"framework-link framework-link-disabled","aria-disabled":"true",children:"Implements 0 papers"}),s.github_url&&e.jsxs("a",{href:s.github_url,target:"_blank",rel:"noopener noreferrer",className:"framework-link",children:[e.jsx(p,{name:"github",size:13}),"GitHub"]}),s.docs_url&&s.docs_url!==s.github_url&&e.jsx("a",{href:s.docs_url,target:"_blank",rel:"noopener noreferrer",className:"framework-link",children:"Docs"})]})]})},I=()=>{var a;const s=m({queryKey:["framework-catalog"],queryFn:()=>u.frameworkCatalog()}),n=((a=s.data)==null?void 0:a.domains)??[],t=n.reduce((i,r)=>i+r.categories.reduce((l,o)=>l+o.frameworks.length,0),0);return h.useEffect(()=>{var r;const i=window.location.hash.slice(1);i&&((r=document.getElementById(i))==null||r.scrollIntoView())},[s.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."})]})}),s.isLoading&&e.jsx("div",{className:"empty",children:"Loading frameworks…"}),s.isError&&e.jsx("div",{className:"empty",children:"Could not load frameworks."}),n.map(i=>e.jsxs("section",{style:{marginBottom:56},children:[e.jsxs("div",{className:"area-section-head",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"area-section-title",children:i.name}),e.jsx("div",{className:"area-section-description",children:i.description})]}),e.jsxs("div",{className:"area-section-meta",children:[i.categories.length," ",i.categories.length===1?"category":"categories"," ·"," ",i.categories.reduce((r,l)=>r+l.frameworks.length,0)," frameworks"]})]}),i.categories.map(r=>e.jsxs("div",{className:"framework-category",children:[e.jsxs("div",{className:"framework-category-head",children:[e.jsxs("div",{children:[e.jsx("h3",{style:j,children:r.name}),r.description&&e.jsx("p",{className:"framework-category-blurb",children:r.description}),r.guide_url&&e.jsxs("a",{href:r.guide_url,target:"_blank",rel:"noopener noreferrer",className:"framework-guide-link",children:[r.guide_label??"Read guide"," →"]})]}),e.jsxs("div",{className:"framework-category-meta",children:[r.frameworks.length," ",r.frameworks.length===1?"framework":"frameworks"]})]}),e.jsx("div",{className:"framework-grid",children:r.frameworks.map(l=>e.jsx(_,{framework:l},l.slug))})]},r.slug))]},i.slug)),e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",marginTop:8},children:[t," frameworks across ",n.length," ",n.length===1?"domain":"domains",". More areas coming soon."]})]})};export{_ as FrameworkCard,I as default}; +import{k as d,j as e,L as c,b as m,V as h}from"./index-D2fBL-s6.js";import{I as p}from"./Icon-Uhh78KjL.js";import{c as u}from"./catalog-5AxvKr4D.js";import{c as g,h as x}from"./colors-BkWRhvFI.js";import{P as f}from"./frameworks-DDA0P4Tf.js";const j={fontFamily:"var(--mono)",fontSize:13,fontWeight:600,letterSpacing:"0.04em",textTransform:"uppercase",color:"var(--ink)",marginBottom:6},k=({platform:s})=>{const n=g(x(s));return e.jsx("span",{className:"framework-platform-chip",style:{background:n.bg,color:n.text},children:f[s]})},_=({framework:s})=>{const n=d(),t=`/papers?framework=${encodeURIComponent(s.slug)}`;return e.jsxs("article",{id:`framework-${s.slug}`,className:"framework-card framework-card-clickable",role:"link",tabIndex:0,"aria-label":`View papers implemented by ${s.name}`,onClick:a=>{a.target.closest("a, button")||n(t)},onKeyDown:a=>{a.target===a.currentTarget&&(a.key==="Enter"||a.key===" ")&&(a.preventDefault(),n(t))},children:[e.jsxs("div",{className:"framework-card-head",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"framework-card-name",children:s.name}),s.organization_name&&e.jsx("div",{className:"framework-card-org",children:s.organization_name})]}),s.platforms&&s.platforms.length>0&&e.jsx("div",{className:"framework-platform-row",children:s.platforms.map(a=>e.jsx(k,{platform:a},a))})]}),e.jsx("p",{className:"framework-card-desc",children:s.description}),s.when_to_use&&e.jsxs("div",{className:"framework-card-when",children:[e.jsx("span",{className:"framework-card-when-label",children:"When to use"}),s.when_to_use]}),(s.github_url||s.docs_url||s.introducing_paper_arxiv_id)&&e.jsxs("div",{className:"framework-card-links",children:[s.introducing_paper_arxiv_id&&e.jsx(c,{to:`/paper/${s.introducing_paper_arxiv_id}`,className:"framework-link",children:"Introducing paper"}),s.github_url&&s.paper_count>0&&e.jsxs(c,{to:t,className:"framework-link",children:["Implements ",s.paper_count," ",s.paper_count===1?"paper":"papers"]}),s.github_url&&s.paper_count===0&&e.jsx("span",{className:"framework-link framework-link-disabled","aria-disabled":"true",children:"Implements 0 papers"}),s.github_url&&e.jsxs("a",{href:s.github_url,target:"_blank",rel:"noopener noreferrer",className:"framework-link",children:[e.jsx(p,{name:"github",size:13}),"GitHub"]}),s.docs_url&&s.docs_url!==s.github_url&&e.jsx("a",{href:s.docs_url,target:"_blank",rel:"noopener noreferrer",className:"framework-link",children:"Docs"})]})]})},I=()=>{var a;const s=m({queryKey:["framework-catalog"],queryFn:()=>u.frameworkCatalog()}),n=((a=s.data)==null?void 0:a.domains)??[],t=n.reduce((i,r)=>i+r.categories.reduce((l,o)=>l+o.frameworks.length,0),0);return h.useEffect(()=>{var r;const i=window.location.hash.slice(1);i&&((r=document.getElementById(i))==null||r.scrollIntoView())},[s.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."})]})}),s.isLoading&&e.jsx("div",{className:"empty",children:"Loading frameworks…"}),s.isError&&e.jsx("div",{className:"empty",children:"Could not load frameworks."}),n.map(i=>e.jsxs("section",{style:{marginBottom:56},children:[e.jsxs("div",{className:"area-section-head",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"area-section-title",children:i.name}),e.jsx("div",{className:"area-section-description",children:i.description})]}),e.jsxs("div",{className:"area-section-meta",children:[i.categories.length," ",i.categories.length===1?"category":"categories"," ·"," ",i.categories.reduce((r,l)=>r+l.frameworks.length,0)," frameworks"]})]}),i.categories.map(r=>e.jsxs("div",{className:"framework-category",children:[e.jsxs("div",{className:"framework-category-head",children:[e.jsxs("div",{children:[e.jsx("h3",{style:j,children:r.name}),r.description&&e.jsx("p",{className:"framework-category-blurb",children:r.description}),r.guide_url&&e.jsxs("a",{href:r.guide_url,target:"_blank",rel:"noopener noreferrer",className:"framework-guide-link",children:[r.guide_label??"Read guide"," →"]})]}),e.jsxs("div",{className:"framework-category-meta",children:[r.frameworks.length," ",r.frameworks.length===1?"framework":"frameworks"]})]}),e.jsx("div",{className:"framework-grid",children:r.frameworks.map(l=>e.jsx(_,{framework:l},l.slug))})]},r.slug))]},i.slug)),e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",marginTop:8},children:[t," frameworks across ",n.length," ",n.length===1?"domain":"domains",". More areas coming soon."]})]})};export{_ as FrameworkCard,I as default}; diff --git a/assets/Icon-DSoTeS9V.js b/assets/Icon-Uhh78KjL.js similarity index 98% rename from assets/Icon-DSoTeS9V.js rename to assets/Icon-Uhh78KjL.js index 50d87cdc6068761ee1f1e7691875f6125586a202..01329f58248b0104932564e485ccb78449087a32 100644 --- a/assets/Icon-DSoTeS9V.js +++ b/assets/Icon-Uhh78KjL.js @@ -1 +1 @@ -import{j as o}from"./index-CTkdBAwI.js";const s=({name:t,size:r=14})=>{const e={search:o.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:o.jsx("path",{d:"M8 3l5 6H3l5-6z",fill:"currentColor"}),arrowLeft:o.jsx("path",{d:"M9 3l-4 5 4 5",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"}),arrowRight:o.jsx("path",{d:"M7 3l4 5-4 5",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"}),external:o.jsx("path",{d:"M5 3h-2v8h8v-2M9 3h3v3M7 9l5-5",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"}),github:o.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:o.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:o.jsx("path",{d:"M4 2h8v12l-4-3-4 3V2z",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinejoin:"round"}),chart:o.jsx("path",{d:"M2 13h12M3 11l3-4 3 2 4-5",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"}),chat:o.jsx("path",{d:"M3 3h10v7H7l-3 3v-3H3V3z",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinejoin:"round"}),pdf:o.jsx("path",{d:"M5 2h5l3 3v9H5V2z",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinejoin:"round"}),copy:o.jsx("path",{d:"M5 5h7v8H5V5zM3 3h7v2M3 3v8h2",stroke:"currentColor",strokeWidth:"1.2",fill:"none",strokeLinejoin:"round"}),sparkle:o.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:o.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:o.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:o.jsx("path",{d:"M2 4h12M2 8h12M2 12h12",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"}),close:o.jsx("path",{d:"M3 3l10 10M13 3L3 13",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"}),pencil:o.jsx("path",{d:"M10.5 2.5l3 3L6 13H3v-3l7.5-7.5zM9 4l3 3",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"}),robot:o.jsx("path",{d:"M6 12.5a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 0 1h-3a.5.5 0 0 1-.5-.5M3 8.062C3 6.76 4.235 5.765 5.53 5.886a26.6 26.6 0 0 0 4.94 0C11.765 5.765 13 6.76 13 8.062v1.157a.93.93 0 0 1-.765.935c-.845.147-2.34.346-4.235.346s-3.39-.2-4.235-.346A.93.93 0 0 1 3 9.219zm4.542-.827a.25.25 0 0 0-.217.068l-.92.9a25 25 0 0 1-1.871-.183a.25.25 0 0 0-.068.495c.55.076 1.232.149 2.02.193a.25.25 0 0 0 .189-.071l.754-.736l.847 1.71a.25.25 0 0 0 .404.062l.932-.97a25 25 0 0 0 1.922-.188a.25.25 0 0 0-.068-.495c-.538.074-1.207.145-1.98.189a.25.25 0 0 0-.166.076l-.754.785l-.842-1.7a.25.25 0 0 0-.182-.135M8.5 1.866a1 1 0 1 0-1 0V3h-2A4.5 4.5 0 0 0 1 7.5V8a1 1 0 0 0-1 1v2a1 1 0 0 0 1 1v1a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-1a1 1 0 0 0 1-1V9a1 1 0 0 0-1-1v-.5A4.5 4.5 0 0 0 10.5 3h-2zM14 7.5V13a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V7.5A3.5 3.5 0 0 1 5.5 4h5A3.5 3.5 0 0 1 14 7.5",fill:"currentColor"})};return o.jsx("svg",{className:r===11?"icon-sm":"icon",viewBox:"0 0 16 16",width:r,height:r,children:e[t]})};export{s as I}; +import{j as o}from"./index-D2fBL-s6.js";const s=({name:t,size:r=14})=>{const e={search:o.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:o.jsx("path",{d:"M8 3l5 6H3l5-6z",fill:"currentColor"}),arrowLeft:o.jsx("path",{d:"M9 3l-4 5 4 5",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"}),arrowRight:o.jsx("path",{d:"M7 3l4 5-4 5",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"}),external:o.jsx("path",{d:"M5 3h-2v8h8v-2M9 3h3v3M7 9l5-5",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"}),github:o.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:o.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:o.jsx("path",{d:"M4 2h8v12l-4-3-4 3V2z",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinejoin:"round"}),chart:o.jsx("path",{d:"M2 13h12M3 11l3-4 3 2 4-5",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"}),chat:o.jsx("path",{d:"M3 3h10v7H7l-3 3v-3H3V3z",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinejoin:"round"}),pdf:o.jsx("path",{d:"M5 2h5l3 3v9H5V2z",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinejoin:"round"}),copy:o.jsx("path",{d:"M5 5h7v8H5V5zM3 3h7v2M3 3v8h2",stroke:"currentColor",strokeWidth:"1.2",fill:"none",strokeLinejoin:"round"}),sparkle:o.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:o.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:o.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:o.jsx("path",{d:"M2 4h12M2 8h12M2 12h12",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"}),close:o.jsx("path",{d:"M3 3l10 10M13 3L3 13",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"}),pencil:o.jsx("path",{d:"M10.5 2.5l3 3L6 13H3v-3l7.5-7.5zM9 4l3 3",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"}),robot:o.jsx("path",{d:"M6 12.5a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 0 1h-3a.5.5 0 0 1-.5-.5M3 8.062C3 6.76 4.235 5.765 5.53 5.886a26.6 26.6 0 0 0 4.94 0C11.765 5.765 13 6.76 13 8.062v1.157a.93.93 0 0 1-.765.935c-.845.147-2.34.346-4.235.346s-3.39-.2-4.235-.346A.93.93 0 0 1 3 9.219zm4.542-.827a.25.25 0 0 0-.217.068l-.92.9a25 25 0 0 1-1.871-.183a.25.25 0 0 0-.068.495c.55.076 1.232.149 2.02.193a.25.25 0 0 0 .189-.071l.754-.736l.847 1.71a.25.25 0 0 0 .404.062l.932-.97a25 25 0 0 0 1.922-.188a.25.25 0 0 0-.068-.495c-.538.074-1.207.145-1.98.189a.25.25 0 0 0-.166.076l-.754.785l-.842-1.7a.25.25 0 0 0-.182-.135M8.5 1.866a1 1 0 1 0-1 0V3h-2A4.5 4.5 0 0 0 1 7.5V8a1 1 0 0 0-1 1v2a1 1 0 0 0 1 1v1a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-1a1 1 0 0 0 1-1V9a1 1 0 0 0-1-1v-.5A4.5 4.5 0 0 0 10.5 3h-2zM14 7.5V13a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V7.5A3.5 3.5 0 0 1 5.5 4h5A3.5 3.5 0 0 1 14 7.5",fill:"currentColor"})};return o.jsx("svg",{className:r===11?"icon-sm":"icon",viewBox:"0 0 16 16",width:r,height:r,children:e[t]})};export{s as I}; diff --git a/assets/LatexTitle-BmCQe_rK.js b/assets/LatexTitle-WIQJ1ke0.js similarity index 98% rename from assets/LatexTitle-BmCQe_rK.js rename to assets/LatexTitle-WIQJ1ke0.js index f0b589ff984e86057097bfea1955b35f06c89d29..9a016fcc675c13fee351adf06bc011ebd949b52f 100644 --- a/assets/LatexTitle-BmCQe_rK.js +++ b/assets/LatexTitle-WIQJ1ke0.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,f as A,a7 as L}from"./index-CTkdBAwI.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,f as A,a7 as L}from"./index-D2fBL-s6.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-B88CU2f1.js b/assets/MarkdownText-ludE7yuw.js similarity index 86% rename from assets/MarkdownText-B88CU2f1.js rename to assets/MarkdownText-ludE7yuw.js index 8a651ba759251e6d30decd2ae23fff15e261192b..04a1f856fb9be1267bdb00720bd46676e59a5f24 100644 --- a/assets/MarkdownText-B88CU2f1.js +++ b/assets/MarkdownText-ludE7yuw.js @@ -1 +1 @@ -import{w as c,j as o,L as u}from"./index-CTkdBAwI.js";/* empty css */import{r as p,a as m,P as d}from"./PaperPreviewLink-gDkLaZRD.js";import{M as h}from"./index-RLQgt3ff.js";import{r as f}from"./index-BTuG6PF7.js";function w(e){return(e??"").split(",").map(a=>a.trim().toLowerCase()).filter(Boolean)}const x=new Set(["paperswithcode.co","www.paperswithcode.co","localhost","127.0.0.1",...w(void 0)]),P=["/methods","/paper","/papers","/tasks","/benchmark","/conferences"];function k(e,a=window.location.origin){if(!e)return null;let t;if(e.startsWith("/"))t=e;else try{const n=new URL(e,a);if(!x.has(n.hostname))return null;t=`${n.pathname}${n.search}${n.hash}`}catch{return null}const r=t.split(/[?#]/,1)[0];return P.some(n=>r===n||r.startsWith(`${n}/`))?t:null}function I(e){const t=e.split(/[?#]/,1)[0].match(/^\/papers?\/([^/]+)$/);if(!t||t[1].includes("%"))return null;const r=t[1],n=/^\d{4}[.-]\d{4,5}(?:v\d+)?$/.test(r),s=/^[1-9]\d*$/.test(r);return!n&&!s?null:c(r)}const M=({text:e,className:a=""})=>o.jsx("div",{className:a,children:o.jsx(h,{remarkPlugins:[f,m],rehypePlugins:[p],components:{a:({href:t,children:r,node:n,...s})=>{const i=k(t);if(i){const l=I(i);return l?o.jsx(d,{routeId:l,to:i,...s,children:r}):o.jsx(u,{to:i,...s,children:r})}return o.jsx("a",{href:t,target:"_blank",rel:"noopener noreferrer",...s,children:r})}},children:e})});export{M,k as r}; +import{w as c,j as o,L as u}from"./index-D2fBL-s6.js";/* empty css */import{r as p,a as m,P as d}from"./PaperPreviewLink-BZuRBR1p.js";import{M as h}from"./index-BPshewTi.js";import{r as f}from"./index-BtZPsygG.js";function w(e){return(e??"").split(",").map(a=>a.trim().toLowerCase()).filter(Boolean)}const x=new Set(["paperswithcode.co","www.paperswithcode.co","localhost","127.0.0.1",...w(void 0)]),P=["/methods","/paper","/papers","/tasks","/benchmark","/conferences"];function k(e,a=window.location.origin){if(!e)return null;let t;if(e.startsWith("/"))t=e;else try{const n=new URL(e,a);if(!x.has(n.hostname))return null;t=`${n.pathname}${n.search}${n.hash}`}catch{return null}const r=t.split(/[?#]/,1)[0];return P.some(n=>r===n||r.startsWith(`${n}/`))?t:null}function I(e){const t=e.split(/[?#]/,1)[0].match(/^\/papers?\/([^/]+)$/);if(!t||t[1].includes("%"))return null;const r=t[1],n=/^\d{4}[.-]\d{4,5}(?:v\d+)?$/.test(r),s=/^[1-9]\d*$/.test(r);return!n&&!s?null:c(r)}const M=({text:e,className:a=""})=>o.jsx("div",{className:a,children:o.jsx(h,{remarkPlugins:[f,m],rehypePlugins:[p],components:{a:({href:t,children:r,node:n,...s})=>{const i=k(t);if(i){const l=I(i);return l?o.jsx(d,{routeId:l,to:i,...s,children:r}):o.jsx(u,{to:i,...s,children:r})}return o.jsx("a",{href:t,target:"_blank",rel:"noopener noreferrer",...s,children:r})}},children:e})});export{M,k as r}; diff --git a/assets/McpShowcase-0Is00fre.js b/assets/McpShowcase-R1ucnqw2.js similarity index 84% rename from assets/McpShowcase-0Is00fre.js rename to assets/McpShowcase-R1ucnqw2.js index db6179f34677ee64c3fcdb256903c6a9c39b19a1..3092f713525199b6fb58ce821c8e9ba6d482bbd7 100644 --- a/assets/McpShowcase-0Is00fre.js +++ b/assets/McpShowcase-R1ucnqw2.js @@ -1 +1 @@ -import{j as e,L as t}from"./index-CTkdBAwI.js";import{A as a}from"./AgentLogos-CDnvpl-X.js";function n({className:s="",canNavigate:r}){return e.jsxs("div",{className:`sidebar-section sidebar-section-tools ${s}`.trim(),children:[e.jsx("div",{className:"sidebar-label",children:"Use PwC with your agent"}),e.jsxs(t,{to:"/mcp",className:"action-btn sidebar-tools-mcp",title:"Connect Claude, Codex, Cursor, or OpenCode to the PwC MCP server",onClick:o=>{r&&!r()&&o.preventDefault()},children:["MCP server",e.jsx(a,{})]}),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"]}),"."]})]})}export{n as M}; +import{j as e,L as t}from"./index-D2fBL-s6.js";import{A as a}from"./AgentLogos-B5etEEwg.js";function n({className:s="",canNavigate:r}){return e.jsxs("div",{className:`sidebar-section sidebar-section-tools ${s}`.trim(),children:[e.jsx("div",{className:"sidebar-label",children:"Use PwC with your agent"}),e.jsxs(t,{to:"/mcp",className:"action-btn sidebar-tools-mcp",title:"Connect Claude, Codex, Cursor, or OpenCode to the PwC MCP server",onClick:o=>{r&&!r()&&o.preventDefault()},children:["MCP server",e.jsx(a,{})]}),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"]}),"."]})]})}export{n as M}; diff --git a/assets/McpView-BMeJDdU1.js b/assets/McpView-DPmcihrm.js similarity index 97% rename from assets/McpView-BMeJDdU1.js rename to assets/McpView-DPmcihrm.js index a121d32ed87f7a04e605086dd2ac84c295ba8574..5209ea3ca0e7ea7f6d29b449ecedaa288435a943 100644 --- a/assets/McpView-BMeJDdU1.js +++ b/assets/McpView-DPmcihrm.js @@ -1,4 +1,4 @@ -import{c as b,b as x,V as m,j as e,C as j}from"./index-CTkdBAwI.js";import{u as g,f as y}from"./useDocumentTitle-WlHj7EYH.js";import{q as f}from"./queryOptions-C9woPjwX.js";import{G as v}from"./github-B1HnPn8H.js";import{E as o}from"./external-link-DK_uOtfh.js";import{C as w}from"./copy-CSFOf_JK.js";/** +import{c as b,b as x,V as m,j as e,C as j}from"./index-D2fBL-s6.js";import{u as g,f as y}from"./useDocumentTitle-ibepJVy2.js";import{q as f}from"./queryOptions-C9woPjwX.js";import{G as v}from"./github-DcIeypA5.js";import{E as o}from"./external-link-Ddavpnin.js";import{C as w}from"./copy-CcyqVsMW.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/MethodDetailView-BP_5bAuS.js b/assets/MethodDetailView-BP_5bAuS.js new file mode 100644 index 0000000000000000000000000000000000000000..2132ef8c52d8285fd9d29444df10f4346dec9b50 --- /dev/null +++ b/assets/MethodDetailView-BP_5bAuS.js @@ -0,0 +1 @@ +import{j as e,f as D,u as P,b as k,p as V,L as _,q as A,T as v}from"./index-D2fBL-s6.js";import{R as q}from"./ResearchFollowButton-Bwb5EiPm.js";import{M as H}from"./SotaBadges-r6iGzLRW.js";import{u as Q,b as R,P as K}from"./PaperFeed-BERxHjrg.js";import{r as G,M as L}from"./MarkdownText-ludE7yuw.js";import{c as b}from"./catalog-5AxvKr4D.js";import{p as U}from"./papers-khuZaSFb.js";import{i as O}from"./apiErrors-DV2aaDjL.js";import{s as W}from"./slug-BpH-Nkvz.js";import{t as Z}from"./transform-B_GaHMvk.js";import{u as X}from"./usePapers-CAjdcUuj.js";import{S as N}from"./skeleton-BDwfco0_.js";import{A as Y,a as J}from"./alert-PnePcfgX.js";import{s as ee}from"./safeExternalHref-CkBrsh84.js";import te from"./NotFound-L0ldWZg9.js";import"./researchTopic-jOpECA0z.js";import"./useMutation-9dlTbuQj.js";import"./plus-BI8-JXK0.js";import"./colors-BkWRhvFI.js";import"./PaperCard-DhorusY5.js";import"./AuthorAvatar-C8tz_syh.js";import"./Icon-Uhh78KjL.js";import"./LatexTitle-WIQJ1ke0.js";import"./popover-DS5Jzsg5.js";import"./useIntersectionObserver-C0Rq0EXm.js";/* empty css */import"./PaperPreviewLink-BZuRBR1p.js";import"./index-BPshewTi.js";import"./index-BtZPsygG.js";import"./katex-DkKDou_j.js";import"./hover-card-DWpZK4fW.js";import"./curation-BtfabyzA.js";import"./useInfiniteQuery-CjJA-90e.js";const t={pink:"#F8D7D9",pinkS:"#D9B0B3",yellow:"#FBEFC2",yellowS:"#C9B97D",orange:"#F8D7B3",orangeS:"#C99466",blue:"#CDE2EE",blueS:"#7FA4BA",purple:"#D4D2EA",purpleS:"#8E8AC0",green:"#CCE2C5",greenS:"#7DA475",ink:"#1A1814",faint:"#8E8678"},n=({x:s,y:r,w:i,h:c,fill:o,stroke:x,label:h,fontSize:d=10})=>e.jsxs("g",{children:[e.jsx("rect",{x:s,y:r,width:i,height:c,rx:"3",ry:"3",fill:o,stroke:x,strokeWidth:"1"}),e.jsx("text",{x:s+i/2,y:r+c/2,fontSize:d,fontFamily:"var(--sans)",fill:t.ink,textAnchor:"middle",dominantBaseline:"middle",children:h})]}),se=()=>e.jsxs("svg",{viewBox:"0 0 360 420",width:"100%",height:"100%",style:{display:"block"},children:[e.jsx("text",{x:"180",y:"20",fontSize:"11",fontFamily:"var(--serif)",fontStyle:"italic",fill:t.faint,textAnchor:"middle",children:"Scaled Dot-Product Attention"}),e.jsx(n,{x:140,y:40,w:80,h:26,fill:t.yellow,stroke:t.yellowS,label:"MatMul",fontSize:11}),e.jsx("path",{d:"M180 66 L180 80",stroke:t.ink}),e.jsx(n,{x:140,y:80,w:80,h:26,fill:t.green,stroke:t.greenS,label:"SoftMax",fontSize:11}),e.jsx("path",{d:"M180 106 L180 120",stroke:t.ink}),e.jsx(n,{x:140,y:120,w:80,h:26,fill:t.purple,stroke:t.purpleS,label:"Mask (opt.)",fontSize:11}),e.jsx("path",{d:"M180 146 L180 160",stroke:t.ink}),e.jsx(n,{x:140,y:160,w:80,h:26,fill:t.blue,stroke:t.blueS,label:"Scale ÷√dₖ",fontSize:11}),e.jsx("path",{d:"M180 186 L180 200",stroke:t.ink}),e.jsx(n,{x:140,y:200,w:80,h:26,fill:t.yellow,stroke:t.yellowS,label:"MatMul",fontSize:11}),e.jsx("path",{d:"M156 226 L120 270",stroke:t.ink}),e.jsx("path",{d:"M180 226 L180 270",stroke:t.ink}),e.jsx("path",{d:"M204 226 L240 270",stroke:t.ink}),e.jsx(n,{x:100,y:270,w:40,h:24,fill:t.pink,stroke:t.pinkS,label:"Q",fontSize:13}),e.jsx(n,{x:160,y:270,w:40,h:24,fill:t.pink,stroke:t.pinkS,label:"K",fontSize:13}),e.jsx(n,{x:220,y:270,w:40,h:24,fill:t.pink,stroke:t.pinkS,label:"V",fontSize:13}),e.jsxs("text",{x:"180",y:"330",fontSize:"14",fontFamily:"var(--serif)",fontStyle:"italic",fill:t.ink,textAnchor:"middle",children:["softmax(QK",e.jsx("tspan",{fontSize:"9",baselineShift:"super",children:"⊤"})," / √d) V"]})]}),ae=()=>e.jsxs("svg",{viewBox:"0 0 360 420",width:"100%",height:"100%",style:{display:"block"},children:[e.jsx("text",{x:"180",y:"20",fontSize:"11",fontFamily:"var(--serif)",fontStyle:"italic",fill:t.faint,textAnchor:"middle",children:"Contrastive learning"}),e.jsx(n,{x:120,y:40,w:120,h:26,fill:t.blue,stroke:t.blueS,label:"Input x",fontSize:11}),e.jsx("path",{d:"M180 66 V76 M90 76 H270 M90 76 V88 M270 76 V88",stroke:t.ink}),e.jsx(n,{x:35,y:88,w:110,h:26,fill:t.yellow,stroke:t.yellowS,label:"Augment t₁",fontSize:11}),e.jsx(n,{x:215,y:88,w:110,h:26,fill:t.yellow,stroke:t.yellowS,label:"Augment t₂",fontSize:11}),e.jsx("path",{d:"M90 114 V138 M270 114 V138",stroke:t.ink}),e.jsx(n,{x:35,y:138,w:110,h:26,fill:t.orange,stroke:t.orangeS,label:"Encoder f",fontSize:11}),e.jsx(n,{x:215,y:138,w:110,h:26,fill:t.orange,stroke:t.orangeS,label:"Encoder f",fontSize:11}),e.jsx("text",{x:"180",y:"155",fontSize:"9",fontFamily:"var(--serif)",fontStyle:"italic",fill:t.faint,textAnchor:"middle",children:"shared weights"}),e.jsx("path",{d:"M90 164 V188 M270 164 V188",stroke:t.ink}),e.jsx(n,{x:35,y:188,w:110,h:26,fill:t.purple,stroke:t.purpleS,label:"Projection g",fontSize:11}),e.jsx(n,{x:215,y:188,w:110,h:26,fill:t.purple,stroke:t.purpleS,label:"Projection g",fontSize:11}),e.jsx("path",{d:"M90 214 V238 M270 214 V238",stroke:t.ink}),e.jsx(n,{x:35,y:238,w:110,h:26,fill:t.pink,stroke:t.pinkS,label:"z₁",fontSize:13}),e.jsx(n,{x:215,y:238,w:110,h:26,fill:t.pink,stroke:t.pinkS,label:"z₂",fontSize:13}),e.jsx("path",{d:"M145 251 H215",stroke:t.greenS,strokeWidth:"1.5",strokeDasharray:"4 3"}),e.jsx("text",{x:"180",y:"244",fontSize:"9",fontFamily:"var(--sans)",fill:t.greenS,textAnchor:"middle",children:"attract"}),e.jsx("text",{x:"180",y:"318",fontSize:"12",fontFamily:"var(--serif)",fontStyle:"italic",fill:t.ink,textAnchor:"middle",children:"Positive pair: pull together"}),e.jsx("text",{x:"180",y:"336",fontSize:"12",fontFamily:"var(--serif)",fontStyle:"italic",fill:t.ink,textAnchor:"middle",children:"Other samples: push apart"}),e.jsx("text",{x:"180",y:"370",fontSize:"11",fontFamily:"var(--serif)",fill:t.faint,textAnchor:"middle",children:"InfoNCE: maximize sim(z₁, z₂) / τ"})]}),re=[["my-skill/",""],["├── SKILL.md","# Required: metadata + instructions"],["├── scripts/","# Optional: executable code"],["├── references/","# Optional: documentation"],["├── assets/","# Optional: templates, resources"],["└── ...","# Any additional files or directories"]],ie=()=>e.jsxs("svg",{viewBox:"0 0 360 420",width:"100%",height:"100%",style:{display:"block"},children:[e.jsx("text",{x:"180",y:"20",fontSize:"11",fontFamily:"var(--serif)",fontStyle:"italic",fill:t.faint,textAnchor:"middle",children:"Skill package layout"}),e.jsx("rect",{x:"28",y:"48",width:"304",height:"318",rx:"8",fill:"#FFFDF8",stroke:t.faint,strokeWidth:"1"}),re.map(([s,r],i)=>{const c=92+i*44;return e.jsxs("g",{children:[e.jsx("text",{x:"44",y:c,fontSize:"11",fontFamily:"var(--mono)",fill:t.ink,dominantBaseline:"middle",children:s}),r?e.jsx("text",{x:"138",y:c,fontSize:"8.5",fontFamily:"var(--mono)",fill:t.faint,dominantBaseline:"middle",children:r}):null]},s)})]}),le={attention:se,"contrastive-learning":ae,"agent-skills":ie},ne=({method:s})=>e.jsxs("svg",{viewBox:"0 0 360 420",width:"100%",height:"100%",children:[e.jsx("text",{x:"180",y:"20",fontSize:"11",fontFamily:"var(--serif)",fontStyle:"italic",fill:t.faint,textAnchor:"middle",children:s.name||"method"}),e.jsx(n,{x:80,y:70,w:200,h:50,fill:t.blue,stroke:t.blueS,label:"Input",fontSize:12}),e.jsx("path",{d:"M180 120 L180 150",stroke:t.ink}),e.jsx(n,{x:80,y:150,w:200,h:70,fill:t.orange,stroke:t.orangeS,label:s.name||"transform",fontSize:13}),e.jsx("path",{d:"M180 220 L180 250",stroke:t.ink}),e.jsx(n,{x:80,y:250,w:200,h:50,fill:t.purple,stroke:t.purpleS,label:"Output",fontSize:12})]}),oe=({method:s})=>{const r=(s.slug||"").toLowerCase(),i=le[r];if(i)return e.jsx("div",{className:"method-figure-svg method-figure-svg--schematic",children:e.jsx(i,{})});if(s.image_url){const c=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${c}`,children:e.jsx("img",{className:"method-figure-img",src:s.image_url,alt:`${s.name} figure`})})}return e.jsx("div",{className:"method-figure-svg method-figure-svg--schematic",children:e.jsx(ne,{method:s})})},w=720,M=138,p={top:8,right:10,bottom:25,left:36},T=56,de=new Intl.DateTimeFormat("en",{month:"short",year:"2-digit",timeZone:"UTC"}),ce=new Intl.DateTimeFormat("en",{year:"numeric",timeZone:"UTC"}),F=s=>de.format(new Date(`${s}T00:00:00Z`)),me=(s,r)=>{if(s===0)return new Set;const i=s>48?12:s>36?6:s>18?3:2,c=Math.max(1,Math.ceil(T/r)),o=Math.max(i,c),x=s-1,h=new Set([0,x]);for(let d=o;d=T&&h.add(d);return h},E=s=>{if(s.coverage_status===void 0||["complete","not_applicable"].includes(s.coverage_status))return null;const r=s.processed_paper_count!==void 0&&s.eligible_paper_count!==void 0?`; ${s.processed_paper_count.toLocaleString()} of ${s.eligible_paper_count.toLocaleString()} eligible papers processed`:"";return`Historical tagging ${s.coverage_status==="failed"?"needs retry":"in progress"}${r}`},he=({history:s,methodName:r})=>{const[i,c]=D.useState(null),o=Math.max(1,...s.map(l=>l.paper_count)),x=w-p.left-p.right,h=M-p.top-p.bottom,d=s.length?x/s.length:x,a=Math.max(2,d*.68),g=me(s.length,d),j=Array.from(new Set([0,Math.ceil(o/2),o])),f=i==null?null:s[i],y=f?E(f):null;return e.jsxs("div",{className:"method-usage-chart-wrap",children:[e.jsxs("svg",{className:"method-usage-chart",viewBox:`0 0 ${w} ${M}`,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"]}),j.map(l=>{const m=p.top+h-l/o*h;return e.jsxs("g",{children:[e.jsx("line",{className:"method-usage-gridline",x1:p.left,x2:w-p.right,y1:m,y2:m}),e.jsx("text",{className:"method-usage-y-label",x:p.left-8,y:m+3,textAnchor:"end",children:l})]},l)}),s.map((l,m)=>{const u=l.paper_count/o*h,S=l.paper_count>0?Math.max(1,u):0,I=p.left+d*m+(d-a)/2,C=p.top+h-S,$=i===m,B=m===s.length-1,z=E(l);return e.jsxs("g",{className:`method-usage-bar${$?" is-active":""}${B?" is-current":""}`,tabIndex:0,role:"img","aria-label":`${F(l.start_date)}: ${l.paper_count} ${l.paper_count===1?"paper":"papers"}${z?`. ${z}`:""}`,onMouseEnter:()=>c(m),onMouseLeave:()=>c(null),onFocus:()=>c(m),onBlur:()=>c(null),children:[e.jsx("rect",{className:"method-usage-bar-hit",x:p.left+d*m,y:p.top,width:d,height:h}),e.jsx("rect",{className:"method-usage-bar-mark",x:I,y:C,width:a,height:S,rx:"1.5"})]},l.start_date)}),s.map((l,m)=>g.has(m)?e.jsx("text",{className:"method-usage-x-label",x:p.left+d*(m+.5),y:M-11,textAnchor:"middle",children:s.length>48?ce.format(new Date(`${l.start_date}T00:00:00Z`)):F(l.start_date)},l.start_date):null)]}),f&&e.jsxs("div",{className:"method-usage-tooltip",role:"status",children:[e.jsx("strong",{children:F(f.start_date)}),e.jsxs("span",{children:[f.paper_count," ",f.paper_count===1?"paper":"papers",i===s.length-1?" · month to date":""]}),e.jsxs("span",{children:[(f.catalog_share??0).toFixed(2),"% of"," ",(f.catalog_paper_count??0).toLocaleString()," catalog papers"]}),y&&e.jsx("span",{children:y})]})]})},Ge=()=>{var y,l,m;const{methodSlug:s}=P(),r=Q({defaultToLastMonth:!0}),i=k({queryKey:A.method(s),queryFn:()=>b.getMethod(s),enabled:!!s,staleTime:v}),c=k({queryKey:A.areas,queryFn:()=>b.listAreas({page_size:50,ordering:"name"}),enabled:!!((y=i.data)!=null&&y.area_id),staleTime:v}),o=k({queryKey:["method-trend",s],queryFn:()=>b.methodTrend(s),enabled:!!s,staleTime:v}),x=X([...V.feeds.method,s,r.filters],u=>U.forMethod(s,{...r.filters,page:u,page_size:20,repository_limit:1}),{enabled:!!s}),h=k({queryKey:["related-methods",s],queryFn:()=>b.relatedMethods(s),enabled:!!s,staleTime:v}),d=D.useMemo(()=>{var u;return((u=x.data)==null?void 0:u.pages.flatMap(S=>S.results.map(Z)))??[]},[x.data]);if(i.isLoading)return e.jsxs("div",{className:"page",children:[e.jsx(N,{className:"h-12 w-1/2 mb-4"}),e.jsx(N,{className:"h-64 w-full"})]});if(O(i.error))return e.jsx(te,{});if(i.error||!i.data)return e.jsx("div",{className:"page",children:e.jsx(Y,{variant:"destructive",children:e.jsx(J,{children:"Method not found."})})});const a=i.data,g=(l=c.data)==null?void 0:l.results.find(u=>u.id===a.area_id),j=G(a.source_url),f=j?null:ee(a.source_url);return e.jsxs("div",{className:"page",children:[e.jsxs("div",{className:"breadcrumb",children:[e.jsx(_,{to:"/methods",children:"Methods"}),g&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"sep",children:"/"}),e.jsx(_,{to:`/methods#area-${W(g.name)}`,children:g.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(q,{kind:"method",entityId:a.id}),a.full_name&&!a.name.includes(a.full_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(L,{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"}),j?e.jsxs(_,{className:"method-source-link",to:j,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})]}):f?e.jsxs("a",{className:"method-source-link",href:f,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()})]}),o.data&&e.jsxs("div",{className:"stat",children:[e.jsx("span",{className:"label",children:"Recent mentions"}),e.jsxs("span",{className:"value",children:[(o.data.recent_paper_count*30/o.data.recent_days).toFixed(1),e.jsx("small",{children:"/mo"})]}),!o.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})]})]}),o.isLoading?e.jsx(N,{className:"h-36 w-full method-trend-skeleton"}):o.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:o.data.recent_paper_count}),e.jsxs("span",{children:["papers / ",o.data.recent_days,"d"]})]})]}),e.jsx(he,{history:o.data.history,methodName:a.name})]}):null]}),e.jsxs("figure",{className:"method-figure-card",children:[e.jsx(oe,{method:a}),a.image_credit&&e.jsx("figcaption",{children:e.jsx(L,{className:"method-image-credit",text:a.image_credit})})]})]}),(((m=h.data)==null?void 0:m.results.length)??0)>0&&e.jsxs("div",{className:"filter-row",children:[e.jsx("span",{className:"label",children:"Related methods"}),h.data.results.map(u=>e.jsx(H,{method:{slug:u.slug,name:u.name}},u.id))]}),e.jsx(R,{feed:r,children:e.jsxs("div",{className:"results-count",children:[d.length," papers mentioning ",a.name]})}),e.jsx(K,{query:x,cards:d,empty:r.dateRange.startDate||r.dateRange.endDate?"No papers tagged with this method in this date range.":"No papers tagged with this method yet."})]})};export{Ge as default}; diff --git a/assets/MethodDetailView-BwtY3qhO.js b/assets/MethodDetailView-BwtY3qhO.js deleted file mode 100644 index 3f64963ec40d7efb25fe34e60a0ae895e7d07871..0000000000000000000000000000000000000000 --- a/assets/MethodDetailView-BwtY3qhO.js +++ /dev/null @@ -1 +0,0 @@ -import{j as e,f as I,u as P,b as k,p as V,L as _,q as A,T as v}from"./index-CTkdBAwI.js";import{R as q}from"./ResearchFollowButton-gAamAHri.js";import{M as H}from"./SotaBadges-CyyWKB0V.js";import{u as Q,b as K,P as R}from"./PaperFeed-2BMpWfem.js";import{r as G,M as L}from"./MarkdownText-B88CU2f1.js";import{c as b}from"./catalog-ZV4aeC2F.js";import{p as U}from"./papers-POQWk4vk.js";import{i as O}from"./apiErrors-DFeecPSH.js";import{s as W}from"./slug-BpH-Nkvz.js";import{t as Z}from"./transform-CZL79kIa.js";import{u as X}from"./usePapers-Cu-zovv8.js";import{S as N}from"./skeleton-p2_v-2W8.js";import{A as Y,a as J}from"./alert-5nuL0v_r.js";import{s as ee}from"./safeExternalHref-CkBrsh84.js";import te from"./NotFound-BE9xg6GA.js";import"./researchTopic-B8hMcjil.js";import"./useMutation-DXSljxHA.js";import"./plus-Dhoq_Vs9.js";import"./colors-BkWRhvFI.js";import"./PaperCard--WllvTq0.js";import"./AuthorAvatar-DjiI2pGP.js";import"./Icon-DSoTeS9V.js";import"./LatexTitle-BmCQe_rK.js";import"./popover-CZErm3i7.js";import"./useIntersectionObserver-BnA8TYxZ.js";/* empty css */import"./PaperPreviewLink-gDkLaZRD.js";import"./index-RLQgt3ff.js";import"./index-BTuG6PF7.js";import"./katex-DkKDou_j.js";import"./hover-card-murUA8RP.js";import"./curation-BlGrJ3z2.js";import"./useInfiniteQuery-CLH4OKrI.js";const t={pink:"#F8D7D9",pinkS:"#D9B0B3",yellow:"#FBEFC2",yellowS:"#C9B97D",orange:"#F8D7B3",orangeS:"#C99466",blue:"#CDE2EE",blueS:"#7FA4BA",purple:"#D4D2EA",purpleS:"#8E8AC0",green:"#CCE2C5",greenS:"#7DA475",ink:"#1A1814",faint:"#8E8678"},n=({x:s,y:r,w:l,h:d,fill:o,stroke:p,label:h,fontSize:c=10})=>e.jsxs("g",{children:[e.jsx("rect",{x:s,y:r,width:l,height:d,rx:"3",ry:"3",fill:o,stroke:p,strokeWidth:"1"}),e.jsx("text",{x:s+l/2,y:r+d/2,fontSize:c,fontFamily:"var(--sans)",fill:t.ink,textAnchor:"middle",dominantBaseline:"middle",children:h})]}),se=()=>e.jsxs("svg",{viewBox:"0 0 360 420",width:"100%",height:"100%",style:{display:"block"},children:[e.jsx("text",{x:"180",y:"20",fontSize:"11",fontFamily:"var(--serif)",fontStyle:"italic",fill:t.faint,textAnchor:"middle",children:"Scaled Dot-Product Attention"}),e.jsx(n,{x:140,y:40,w:80,h:26,fill:t.yellow,stroke:t.yellowS,label:"MatMul",fontSize:11}),e.jsx("path",{d:"M180 66 L180 80",stroke:t.ink}),e.jsx(n,{x:140,y:80,w:80,h:26,fill:t.green,stroke:t.greenS,label:"SoftMax",fontSize:11}),e.jsx("path",{d:"M180 106 L180 120",stroke:t.ink}),e.jsx(n,{x:140,y:120,w:80,h:26,fill:t.purple,stroke:t.purpleS,label:"Mask (opt.)",fontSize:11}),e.jsx("path",{d:"M180 146 L180 160",stroke:t.ink}),e.jsx(n,{x:140,y:160,w:80,h:26,fill:t.blue,stroke:t.blueS,label:"Scale ÷√dₖ",fontSize:11}),e.jsx("path",{d:"M180 186 L180 200",stroke:t.ink}),e.jsx(n,{x:140,y:200,w:80,h:26,fill:t.yellow,stroke:t.yellowS,label:"MatMul",fontSize:11}),e.jsx("path",{d:"M156 226 L120 270",stroke:t.ink}),e.jsx("path",{d:"M180 226 L180 270",stroke:t.ink}),e.jsx("path",{d:"M204 226 L240 270",stroke:t.ink}),e.jsx(n,{x:100,y:270,w:40,h:24,fill:t.pink,stroke:t.pinkS,label:"Q",fontSize:13}),e.jsx(n,{x:160,y:270,w:40,h:24,fill:t.pink,stroke:t.pinkS,label:"K",fontSize:13}),e.jsx(n,{x:220,y:270,w:40,h:24,fill:t.pink,stroke:t.pinkS,label:"V",fontSize:13}),e.jsxs("text",{x:"180",y:"330",fontSize:"14",fontFamily:"var(--serif)",fontStyle:"italic",fill:t.ink,textAnchor:"middle",children:["softmax(QK",e.jsx("tspan",{fontSize:"9",baselineShift:"super",children:"⊤"})," / √d) V"]})]}),ae=()=>e.jsxs("svg",{viewBox:"0 0 360 420",width:"100%",height:"100%",style:{display:"block"},children:[e.jsx("text",{x:"180",y:"20",fontSize:"11",fontFamily:"var(--serif)",fontStyle:"italic",fill:t.faint,textAnchor:"middle",children:"Contrastive learning"}),e.jsx(n,{x:120,y:40,w:120,h:26,fill:t.blue,stroke:t.blueS,label:"Input x",fontSize:11}),e.jsx("path",{d:"M180 66 V76 M90 76 H270 M90 76 V88 M270 76 V88",stroke:t.ink}),e.jsx(n,{x:35,y:88,w:110,h:26,fill:t.yellow,stroke:t.yellowS,label:"Augment t₁",fontSize:11}),e.jsx(n,{x:215,y:88,w:110,h:26,fill:t.yellow,stroke:t.yellowS,label:"Augment t₂",fontSize:11}),e.jsx("path",{d:"M90 114 V138 M270 114 V138",stroke:t.ink}),e.jsx(n,{x:35,y:138,w:110,h:26,fill:t.orange,stroke:t.orangeS,label:"Encoder f",fontSize:11}),e.jsx(n,{x:215,y:138,w:110,h:26,fill:t.orange,stroke:t.orangeS,label:"Encoder f",fontSize:11}),e.jsx("text",{x:"180",y:"155",fontSize:"9",fontFamily:"var(--serif)",fontStyle:"italic",fill:t.faint,textAnchor:"middle",children:"shared weights"}),e.jsx("path",{d:"M90 164 V188 M270 164 V188",stroke:t.ink}),e.jsx(n,{x:35,y:188,w:110,h:26,fill:t.purple,stroke:t.purpleS,label:"Projection g",fontSize:11}),e.jsx(n,{x:215,y:188,w:110,h:26,fill:t.purple,stroke:t.purpleS,label:"Projection g",fontSize:11}),e.jsx("path",{d:"M90 214 V238 M270 214 V238",stroke:t.ink}),e.jsx(n,{x:35,y:238,w:110,h:26,fill:t.pink,stroke:t.pinkS,label:"z₁",fontSize:13}),e.jsx(n,{x:215,y:238,w:110,h:26,fill:t.pink,stroke:t.pinkS,label:"z₂",fontSize:13}),e.jsx("path",{d:"M145 251 H215",stroke:t.greenS,strokeWidth:"1.5",strokeDasharray:"4 3"}),e.jsx("text",{x:"180",y:"244",fontSize:"9",fontFamily:"var(--sans)",fill:t.greenS,textAnchor:"middle",children:"attract"}),e.jsx("text",{x:"180",y:"318",fontSize:"12",fontFamily:"var(--serif)",fontStyle:"italic",fill:t.ink,textAnchor:"middle",children:"Positive pair: pull together"}),e.jsx("text",{x:"180",y:"336",fontSize:"12",fontFamily:"var(--serif)",fontStyle:"italic",fill:t.ink,textAnchor:"middle",children:"Other samples: push apart"}),e.jsx("text",{x:"180",y:"370",fontSize:"11",fontFamily:"var(--serif)",fill:t.faint,textAnchor:"middle",children:"InfoNCE: maximize sim(z₁, z₂) / τ"})]}),re=[["my-skill/",""],["├── SKILL.md","# Required: metadata + instructions"],["├── scripts/","# Optional: executable code"],["├── references/","# Optional: documentation"],["├── assets/","# Optional: templates, resources"],["└── ...","# Any additional files or directories"]],le=()=>e.jsxs("svg",{viewBox:"0 0 360 420",width:"100%",height:"100%",style:{display:"block"},children:[e.jsx("text",{x:"180",y:"20",fontSize:"11",fontFamily:"var(--serif)",fontStyle:"italic",fill:t.faint,textAnchor:"middle",children:"Skill package layout"}),e.jsx("rect",{x:"28",y:"48",width:"304",height:"318",rx:"8",fill:"#FFFDF8",stroke:t.faint,strokeWidth:"1"}),re.map(([s,r],l)=>{const d=92+l*44;return e.jsxs("g",{children:[e.jsx("text",{x:"44",y:d,fontSize:"11",fontFamily:"var(--mono)",fill:t.ink,dominantBaseline:"middle",children:s}),r?e.jsx("text",{x:"138",y:d,fontSize:"8.5",fontFamily:"var(--mono)",fill:t.faint,dominantBaseline:"middle",children:r}):null]},s)})]}),ie={attention:se,"contrastive-learning":ae,"agent-skills":le},ne=({method:s})=>e.jsxs("svg",{viewBox:"0 0 360 420",width:"100%",height:"100%",children:[e.jsx("text",{x:"180",y:"20",fontSize:"11",fontFamily:"var(--serif)",fontStyle:"italic",fill:t.faint,textAnchor:"middle",children:s.name||"method"}),e.jsx(n,{x:80,y:70,w:200,h:50,fill:t.blue,stroke:t.blueS,label:"Input",fontSize:12}),e.jsx("path",{d:"M180 120 L180 150",stroke:t.ink}),e.jsx(n,{x:80,y:150,w:200,h:70,fill:t.orange,stroke:t.orangeS,label:s.name||"transform",fontSize:13}),e.jsx("path",{d:"M180 220 L180 250",stroke:t.ink}),e.jsx(n,{x:80,y:250,w:200,h:50,fill:t.purple,stroke:t.purpleS,label:"Output",fontSize:12})]}),oe=({method:s})=>{const r=(s.slug||"").toLowerCase(),l=ie[r];if(l)return e.jsx("div",{className:"method-figure-svg method-figure-svg--schematic",children:e.jsx(l,{})});if(s.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:s.image_url,alt:`${s.name} figure`})})}return e.jsx("div",{className:"method-figure-svg method-figure-svg--schematic",children:e.jsx(ne,{method:s})})},w=720,M=138,x={top:8,right:10,bottom:25,left:36},E=56,ce=new Intl.DateTimeFormat("en",{month:"short",year:"2-digit",timeZone:"UTC"}),de=new Intl.DateTimeFormat("en",{year:"numeric",timeZone:"UTC"}),F=s=>ce.format(new Date(`${s}T00:00:00Z`)),me=(s,r)=>{if(s===0)return new Set;const l=s>48?12:s>36?6:s>18?3:2,d=Math.max(1,Math.ceil(E/r)),o=Math.max(l,d),p=s-1,h=new Set([0,p]);for(let c=o;c=E&&h.add(c);return h},T=s=>{if(s.coverage_status===void 0||["complete","not_applicable"].includes(s.coverage_status))return null;const r=s.processed_paper_count!==void 0&&s.eligible_paper_count!==void 0?`; ${s.processed_paper_count.toLocaleString()} of ${s.eligible_paper_count.toLocaleString()} eligible papers processed`:"";return`Historical tagging ${s.coverage_status==="failed"?"needs retry":"in progress"}${r}`},he=({history:s,methodName:r})=>{const[l,d]=I.useState(null),o=Math.max(1,...s.map(i=>i.paper_count)),p=w-x.left-x.right,h=M-x.top-x.bottom,c=s.length?p/s.length:p,a=Math.max(2,c*.68),g=me(s.length,c),j=Array.from(new Set([0,Math.ceil(o/2),o])),f=l==null?null:s[l],y=f?T(f):null;return e.jsxs("div",{className:"method-usage-chart-wrap",children:[e.jsxs("svg",{className:"method-usage-chart",viewBox:`0 0 ${w} ${M}`,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"]}),j.map(i=>{const m=x.top+h-i/o*h;return e.jsxs("g",{children:[e.jsx("line",{className:"method-usage-gridline",x1:x.left,x2:w-x.right,y1:m,y2:m}),e.jsx("text",{className:"method-usage-y-label",x:x.left-8,y:m+3,textAnchor:"end",children:i})]},i)}),s.map((i,m)=>{const u=i.paper_count/o*h,S=i.paper_count>0?Math.max(1,u):0,C=x.left+c*m+(c-a)/2,D=x.top+h-S,$=l===m,B=m===s.length-1,z=T(i);return e.jsxs("g",{className:`method-usage-bar${$?" is-active":""}${B?" is-current":""}`,tabIndex:0,role:"img","aria-label":`${F(i.start_date)}: ${i.paper_count} ${i.paper_count===1?"paper":"papers"}${z?`. ${z}`:""}`,onMouseEnter:()=>d(m),onMouseLeave:()=>d(null),onFocus:()=>d(m),onBlur:()=>d(null),children:[e.jsx("rect",{className:"method-usage-bar-hit",x:x.left+c*m,y:x.top,width:c,height:h}),e.jsx("rect",{className:"method-usage-bar-mark",x:C,y:D,width:a,height:S,rx:"1.5"})]},i.start_date)}),s.map((i,m)=>g.has(m)?e.jsx("text",{className:"method-usage-x-label",x:x.left+c*(m+.5),y:M-11,textAnchor:"middle",children:s.length>48?de.format(new Date(`${i.start_date}T00:00:00Z`)):F(i.start_date)},i.start_date):null)]}),f&&e.jsxs("div",{className:"method-usage-tooltip",role:"status",children:[e.jsx("strong",{children:F(f.start_date)}),e.jsxs("span",{children:[f.paper_count," ",f.paper_count===1?"paper":"papers",l===s.length-1?" · month to date":""]}),e.jsxs("span",{children:[(f.catalog_share??0).toFixed(2),"% of"," ",(f.catalog_paper_count??0).toLocaleString()," catalog papers"]}),y&&e.jsx("span",{children:y})]})]})},Ge=()=>{var y,i,m;const{methodSlug:s}=P(),r=Q(),l=k({queryKey:A.method(s),queryFn:()=>b.getMethod(s),enabled:!!s,staleTime:v}),d=k({queryKey:A.areas,queryFn:()=>b.listAreas({page_size:50,ordering:"name"}),enabled:!!((y=l.data)!=null&&y.area_id),staleTime:v}),o=k({queryKey:["method-trend",s],queryFn:()=>b.methodTrend(s),enabled:!!s,staleTime:v}),p=X([...V.feeds.method,s,r.filters],u=>U.forMethod(s,{...r.filters,page:u,page_size:20,repository_limit:1}),{enabled:!!s}),h=k({queryKey:["related-methods",s],queryFn:()=>b.relatedMethods(s),enabled:!!s,staleTime:v}),c=I.useMemo(()=>{var u;return((u=p.data)==null?void 0:u.pages.flatMap(S=>S.results.map(Z)))??[]},[p.data]);if(l.isLoading)return e.jsxs("div",{className:"page",children:[e.jsx(N,{className:"h-12 w-1/2 mb-4"}),e.jsx(N,{className:"h-64 w-full"})]});if(O(l.error))return e.jsx(te,{});if(l.error||!l.data)return e.jsx("div",{className:"page",children:e.jsx(Y,{variant:"destructive",children:e.jsx(J,{children:"Method not found."})})});const a=l.data,g=(i=d.data)==null?void 0:i.results.find(u=>u.id===a.area_id),j=G(a.source_url),f=j?null:ee(a.source_url);return e.jsxs("div",{className:"page",children:[e.jsxs("div",{className:"breadcrumb",children:[e.jsx(_,{to:"/methods",children:"Methods"}),g&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"sep",children:"/"}),e.jsx(_,{to:`/methods#area-${W(g.name)}`,children:g.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(q,{kind:"method",entityId:a.id}),a.full_name&&!a.name.includes(a.full_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(L,{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"}),j?e.jsxs(_,{className:"method-source-link",to:j,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})]}):f?e.jsxs("a",{className:"method-source-link",href:f,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()})]}),o.data&&e.jsxs("div",{className:"stat",children:[e.jsx("span",{className:"label",children:"Recent mentions"}),e.jsxs("span",{className:"value",children:[(o.data.recent_paper_count*30/o.data.recent_days).toFixed(1),e.jsx("small",{children:"/mo"})]}),!o.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})]})]}),o.isLoading?e.jsx(N,{className:"h-36 w-full method-trend-skeleton"}):o.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:o.data.recent_paper_count}),e.jsxs("span",{children:["papers / ",o.data.recent_days,"d"]})]})]}),e.jsx(he,{history:o.data.history,methodName:a.name})]}):null]}),e.jsxs("figure",{className:"method-figure-card",children:[e.jsx(oe,{method:a}),a.image_credit&&e.jsx("figcaption",{children:e.jsx(L,{className:"method-image-credit",text:a.image_credit})})]})]}),(((m=h.data)==null?void 0:m.results.length)??0)>0&&e.jsxs("div",{className:"filter-row",children:[e.jsx("span",{className:"label",children:"Related methods"}),h.data.results.map(u=>e.jsx(H,{method:{slug:u.slug,name:u.name}},u.id))]}),e.jsx(K,{feed:r,children:e.jsxs("div",{className:"results-count",children:[c.length," papers mentioning ",a.name]})}),e.jsx(R,{query:p,cards:c,empty:"No papers tagged with this method yet."})]})};export{Ge as default}; diff --git a/assets/MethodsIndexView-BkN9Ggvq.js b/assets/MethodsIndexView-DI2_sTpn.js similarity index 82% rename from assets/MethodsIndexView-BkN9Ggvq.js rename to assets/MethodsIndexView-DI2_sTpn.js index 17adabc54b2bc96a3bb0f2f6ad500c9d810a5138..f4be863cad8c996394dcdaba9ace6c0ab811e66c 100644 --- a/assets/MethodsIndexView-BkN9Ggvq.js +++ b/assets/MethodsIndexView-DI2_sTpn.js @@ -1,4 +1,4 @@ -import{c as f,b as c,f as l,j as s,L as _,q as N,T as m}from"./index-CTkdBAwI.js";import{c as p}from"./catalog-ZV4aeC2F.js";import{s as T}from"./areas-Dvi8w2dp.js";import{s as v}from"./slug-BpH-Nkvz.js";import{A as L,a as M}from"./alert-5nuL0v_r.js";import{A as q,a as A}from"./AreaSection-DTNPiFl-.js";import{T as F}from"./TaxonomySuggestionTile-CAEaqzDg.js";import{u as S,T as I}from"./useHashScrollOnReady-Ct6aPTRx.js";import"./skeleton-p2_v-2W8.js";import"./SignInToEditDialog-Dn64C3wp.js";import"./button-CJEAPbmU.js";import"./input-C24thzbI.js";import"./textarea-DH3b7wpe.js";import"./searchable-select-bWRlK1sd.js";import"./popover-CZErm3i7.js";import"./dialog-C7LLEadk.js";import"./search-Di2HpIcQ.js";import"./loader-circle-B71NdARb.js";import"./useMutation-DXSljxHA.js";import"./submissions-BSh9vIax.js";import"./plus-Dhoq_Vs9.js";import"./trending-up-DegPKMd3.js";/** +import{c as f,b as c,f as l,j as s,L as _,q as N,T as m}from"./index-D2fBL-s6.js";import{c as p}from"./catalog-5AxvKr4D.js";import{s as T}from"./areas-Dvi8w2dp.js";import{s as v}from"./slug-BpH-Nkvz.js";import{A as L,a as M}from"./alert-PnePcfgX.js";import{A as q,a as A}from"./AreaSection-COKqvfmt.js";import{T as F}from"./TaxonomySuggestionTile-UxnpnHcy.js";import{u as S,T as I}from"./useHashScrollOnReady-C36cVkc9.js";import"./skeleton-BDwfco0_.js";import"./SignInToEditDialog-BBAwjxYj.js";import"./button-D0XfbdrX.js";import"./input-DdobyT4w.js";import"./textarea-B8b7WxcV.js";import"./searchable-select-CsXzzP_V.js";import"./popover-DS5Jzsg5.js";import"./dialog-DgUROq2j.js";import"./search-0R_Hc3S2.js";import"./loader-circle-CoLo2trx.js";import"./useMutation-9dlTbuQj.js";import"./submissions-LRopJJKL.js";import"./plus-BI8-JXK0.js";import"./trending-up-DFLWFJuY.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/NotFound-BE9xg6GA.js b/assets/NotFound-L0ldWZg9.js similarity index 89% rename from assets/NotFound-BE9xg6GA.js rename to assets/NotFound-L0ldWZg9.js index 15cd94a588ebe946ec2df75b0a38900e96d07802..53c134d96a0f0cab458cb0171030ffd482195622 100644 --- a/assets/NotFound-BE9xg6GA.js +++ b/assets/NotFound-L0ldWZg9.js @@ -1 +1 @@ -import{g as o,f as s,j as t,L as a}from"./index-CTkdBAwI.js";const r=()=>{const e=o();return s.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(a,{to:"/",className:"action-btn",children:"Return home"})]})};export{r as default}; +import{g as o,f as s,j as t,L as a}from"./index-D2fBL-s6.js";const r=()=>{const e=o();return s.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(a,{to:"/",className:"action-btn",children:"Return home"})]})};export{r as default}; diff --git a/assets/OrganizationContributionGraph-BlYz7Ff1.js b/assets/OrganizationContributionGraph-BFOi-mI4.js similarity index 94% rename from assets/OrganizationContributionGraph-BlYz7Ff1.js rename to assets/OrganizationContributionGraph-BFOi-mI4.js index 1b5a355bd5c2aba821d7d5c38112ea3067b2f6ac..60f6f80776b99242138a467f64c152ccc66f2f46 100644 --- a/assets/OrganizationContributionGraph-BlYz7Ff1.js +++ b/assets/OrganizationContributionGraph-BFOi-mI4.js @@ -1 +1 @@ -import{f as b,j as o,b as $,T as z}from"./index-CTkdBAwI.js";import{S as w}from"./skeleton-p2_v-2W8.js";import{c as y}from"./catalog-ZV4aeC2F.js";const x=24*60*60*1e3,f=12,N=3,v=new Map([[1,"Mon"],[3,"Wed"],[5,"Fri"]]),T=n=>new Date(`${n}T00:00:00Z`),_=n=>n.toISOString().slice(0,10),M=(n,a)=>{if(n===0)return 0;const i=a.findIndex(s=>n<=s);return i===-1?4:i+1},S=n=>{const a=T(n.start_date),i=T(n.end_date),s=new Date(a.getTime()-a.getUTCDay()*x),h=new Date(i.getTime()+(6-i.getUTCDay())*x),p=new Map(n.results.map(e=>[e.date,e.paper_count])),u=n.results.map(e=>e.paper_count).sort((e,g)=>e-g),c=[.25,.5,.75].map(e=>u[Math.min(u.length-1,Math.floor(u.length*e))]??1),l=[];for(let e=s.getTime();e<=h.getTime();e+=x){const g=new Date(e),d=_(g),m=e>=a.getTime()&&e<=i.getTime(),C=m?p.get(d)??0:0;l.push({key:d,date:g,count:C,inRange:m,level:M(C,c)})}const t=l.length/7,r=[];let j=-1;for(let e=0;em.inRange&&(e===0||m.date.getUTCDate()<=7));d&&d.date.getUTCMonth()!==j&&(j=d.date.getUTCMonth(),r.length>0&&e-r[r.length-1].column<3&&r.pop(),r.push({label:d.date.toLocaleString("en",{month:"short",timeZone:"UTC"}),column:e}))}return{days:l,months:r,weekCount:t}},D=({data:n,organizationName:a,title:i="Paper contributions",noun:s="paper"})=>{const h=b.useRef(null),{days:p,months:u,weekCount:c}=b.useMemo(()=>S(n),[n]),l=c*f+(c-1)*N;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":`${a} 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,r)=>o.jsx("span",{children:v.get(r)??""},r))}),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"})]})]})},U=({organizationSlug:n,organizationName:a})=>{const i=$({queryKey:["organization-contributions",n],queryFn:()=>y.organizationContributions(n),staleTime:z});return i.isLoading?o.jsx(w,{className:"organization-contributions-skeleton"}):i.data?o.jsx(D,{data:i.data,organizationName:a}):null};export{D as C,U as O}; +import{f as b,j as o,b as $,T as z}from"./index-D2fBL-s6.js";import{S as w}from"./skeleton-BDwfco0_.js";import{c as y}from"./catalog-5AxvKr4D.js";const x=24*60*60*1e3,f=12,N=3,v=new Map([[1,"Mon"],[3,"Wed"],[5,"Fri"]]),T=n=>new Date(`${n}T00:00:00Z`),_=n=>n.toISOString().slice(0,10),M=(n,a)=>{if(n===0)return 0;const i=a.findIndex(s=>n<=s);return i===-1?4:i+1},S=n=>{const a=T(n.start_date),i=T(n.end_date),s=new Date(a.getTime()-a.getUTCDay()*x),h=new Date(i.getTime()+(6-i.getUTCDay())*x),p=new Map(n.results.map(e=>[e.date,e.paper_count])),u=n.results.map(e=>e.paper_count).sort((e,g)=>e-g),c=[.25,.5,.75].map(e=>u[Math.min(u.length-1,Math.floor(u.length*e))]??1),l=[];for(let e=s.getTime();e<=h.getTime();e+=x){const g=new Date(e),d=_(g),m=e>=a.getTime()&&e<=i.getTime(),C=m?p.get(d)??0:0;l.push({key:d,date:g,count:C,inRange:m,level:M(C,c)})}const t=l.length/7,r=[];let j=-1;for(let e=0;em.inRange&&(e===0||m.date.getUTCDate()<=7));d&&d.date.getUTCMonth()!==j&&(j=d.date.getUTCMonth(),r.length>0&&e-r[r.length-1].column<3&&r.pop(),r.push({label:d.date.toLocaleString("en",{month:"short",timeZone:"UTC"}),column:e}))}return{days:l,months:r,weekCount:t}},D=({data:n,organizationName:a,title:i="Paper contributions",noun:s="paper"})=>{const h=b.useRef(null),{days:p,months:u,weekCount:c}=b.useMemo(()=>S(n),[n]),l=c*f+(c-1)*N;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":`${a} 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,r)=>o.jsx("span",{children:v.get(r)??""},r))}),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"})]})]})},U=({organizationSlug:n,organizationName:a})=>{const i=$({queryKey:["organization-contributions",n],queryFn:()=>y.organizationContributions(n),staleTime:z});return i.isLoading?o.jsx(w,{className:"organization-contributions-skeleton"}):i.data?o.jsx(D,{data:i.data,organizationName:a}):null};export{D as C,U as O}; diff --git a/assets/OrganizationDetailView-BFZVxf5K.js b/assets/OrganizationDetailView-BFZVxf5K.js new file mode 100644 index 0000000000000000000000000000000000000000..3231ad550c940f3c87cb9bb89325e8b004a28e91 --- /dev/null +++ b/assets/OrganizationDetailView-BFZVxf5K.js @@ -0,0 +1 @@ +import{k as q,f as d,b as N,p as C,j as r,L as y,q as Q,T as F,u as z}from"./index-D2fBL-s6.js";import{R as E}from"./ResearchFollowButton-Bwb5EiPm.js";import{M as I}from"./MarkdownText-ludE7yuw.js";import{O as K}from"./OrganizationContributionGraph-BFOi-mI4.js";import{u as R,b as G,P as H}from"./PaperFeed-BERxHjrg.js";import{A as W,a as B}from"./alert-PnePcfgX.js";import{S as D}from"./searchable-select-CsXzzP_V.js";import{S}from"./skeleton-BDwfco0_.js";import{u as U}from"./usePapers-CAjdcUuj.js";import{c as v}from"./catalog-5AxvKr4D.js";import{p as V}from"./papers-khuZaSFb.js";import{i as Z}from"./apiErrors-DV2aaDjL.js";import{d as L,t as J}from"./transform-B_GaHMvk.js";import{o as X,i as Y}from"./organizationNames-BVKzYEBp.js";import k from"./NotFound-L0ldWZg9.js";import"./researchTopic-jOpECA0z.js";import"./useMutation-9dlTbuQj.js";import"./plus-BI8-JXK0.js";/* empty css */import"./PaperPreviewLink-BZuRBR1p.js";import"./index-BPshewTi.js";import"./index-BtZPsygG.js";import"./katex-DkKDou_j.js";import"./hover-card-DWpZK4fW.js";import"./PaperCard-DhorusY5.js";import"./AuthorAvatar-C8tz_syh.js";import"./SotaBadges-r6iGzLRW.js";import"./colors-BkWRhvFI.js";import"./Icon-Uhh78KjL.js";import"./LatexTitle-WIQJ1ke0.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-DS5Jzsg5.js";import"./useIntersectionObserver-C0Rq0EXm.js";import"./button-D0XfbdrX.js";import"./dialog-DgUROq2j.js";import"./search-0R_Hc3S2.js";import"./loader-circle-CoLo2trx.js";import"./useInfiniteQuery-CjJA-90e.js";import"./curation-BtfabyzA.js";const ee=({organizationSlug:a,taskSlug:n})=>{var f,x,j,_,b;const T=q(),c=R({defaultToLastMonth:!0}),{searchParams:$}=c,[w,h]=d.useState(!1),u=N({queryKey:Q.organization(a),queryFn:()=>v.getOrganization(a),staleTime:F}),l=N({queryKey:["organization-areas-with-tasks",a],queryFn:()=>v.organizationAreasWithTasks(a),staleTime:F}),p=U([...C.feeds.organization,a,n,c.filters],t=>V.forOrganization(a,{...c.filters,task:n,page:t,page_size:12}),{enabled:!!a});d.useEffect(()=>{h(!1)},[a,n]);const g=d.useMemo(()=>{var t;return(((t=l.data)==null?void 0:t.results)??[]).flatMap(o=>o.tasks.filter(s=>!!s.slug).map(s=>({...s,slug:s.slug,label:L(s.name,s.slug)})))},[l.data]),i=g.find(t=>t.slug===n),O=d.useMemo(()=>{var t;return(((t=p.data)==null?void 0:t.pages)??[]).flatMap(o=>o.results.map(J))},[p.data]),e=u.data??((f=l.data)==null?void 0:f.organization),m=e?X(e):null,P=((j=(x=p.data)==null?void 0:x.pages[0])==null?void 0:j.count)??0;if([u.error,l.error,p.error].some(Z))return r.jsx(k,{});if(l.error||p.error)return r.jsx("div",{className:"page",children:r.jsx(W,{variant:"destructive",children:r.jsx(B,{children:"Failed to load organization papers. Please try again."})})});const A=t=>{const o=t.trim().toLocaleLowerCase();return g.filter(s=>`${s.label} ${s.slug}`.toLocaleLowerCase().includes(o)).map(s=>({value:s.slug,label:s.label,description:`${s.paper_count.toLocaleString()} ${s.paper_count===1?"paper":"papers"}`}))},M=t=>{const o=t==="__all__"?`/orgs/${a}`:`/orgs/${a}/${t}`,s=$.toString();T({pathname:o,search:s?`?${s}`:""})};return r.jsxs("div",{className:"page",children:[r.jsxs("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:[r.jsx(y,{to:"/",children:"Home"}),r.jsx("span",{children:" / "}),r.jsx(y,{to:"/organizations",children:"Organizations"}),r.jsx("span",{children:" / "}),r.jsx("span",{children:(e==null?void 0:e.name)??a}),i&&r.jsxs(r.Fragment,{children:[r.jsx("span",{children:" / "}),r.jsx("span",{children:L(i.name,i.slug)})]})]}),r.jsxs("header",{className:"organization-hero",children:[r.jsxs("div",{className:"organization-hero-profile",children:[r.jsx("div",{className:"organizations-eyebrow",children:"ORGANIZATION"}),r.jsxs("h1",{className:`feed-title organization-hero-title${e&&!m&&Y(e.name)?" organization-hero-title--long":""}`,children:[e!=null&&e.logo_url&&!w?r.jsx("img",{src:e.logo_url,alt:"",width:58,height:58,onError:()=>h(!0)}):e?r.jsx("span",{className:"organization-hero-monogram","aria-hidden":"true",children:(m??e.name).slice(0,1).toUpperCase()}):null,e?r.jsxs("span",{className:"organization-hero-name",children:[m??e.name,m&&r.jsx("span",{className:"organization-hero-full-name",children:e.name})]}):r.jsx(S,{className:"h-12 w-64"})]}),e&&r.jsx(E,{kind:"organization",entityId:e.id}),e&&r.jsxs("div",{className:"feed-subtitle",children:[((_=e.paper_count)==null?void 0:_.toLocaleString())??0," papers",(e.organization_trending_score??0)>0&&e.trending_rank&&r.jsxs(r.Fragment,{children:[" · #",e.trending_rank," trending this month"]})]}),(e==null?void 0:e.description)&&r.jsx(I,{className:"method-description",text:e.description}),e&&r.jsxs("div",{className:"organization-hero-links",children:[e.website_url&&r.jsx("a",{href:e.website_url,target:"_blank",rel:"noreferrer",children:"Website ↗"}),e.hf_url&&r.jsx("a",{href:e.hf_url,target:"_blank",rel:"noreferrer",children:"Hugging Face ↗"}),e.github_url&&r.jsx("a",{href:e.github_url,target:"_blank",rel:"noreferrer",children:"GitHub ↗"})]})]}),r.jsx(K,{organizationSlug:a,organizationName:(e==null?void 0:e.name)??a})]}),r.jsx(G,{feed:c,style:{alignItems:"center",gap:16},leading:r.jsx("div",{style:{minWidth:260},children:r.jsx(D,{value:n??"__all__",onChange:M,placeholder:"All tasks",searchPlaceholder:"Search organization tasks...",emptyMessage:"No matching tasks.",ariaLabel:"Filter papers by task",selectedOption:i?{value:i.slug,label:i.label,description:`${i.paper_count.toLocaleString()} ${i.paper_count===1?"paper":"papers"}`}:{value:"__all__",label:"All tasks",description:`${((b=e==null?void 0:e.paper_count)==null?void 0:b.toLocaleString())??0} papers`},queryKey:["organization-task-options",a],queryFn:async t=>{var o;return[{value:"__all__",label:"All tasks",description:`${((o=e==null?void 0:e.paper_count)==null?void 0:o.toLocaleString())??0} papers`},...A(t)]},enabled:!l.isLoading,className:"h-[38px]"})}),children:r.jsxs("div",{className:"results-count",children:[P.toLocaleString()," papers"]})}),r.jsx(H,{query:p,cards:O,showInstitution:!1,empty:(e==null?void 0:e.paper_count)===0?"No papers indexed yet":"No papers found for this selection."})]})},Ke=()=>{const{orgSlug:a,taskSlug:n}=z();return a?r.jsx(ee,{organizationSlug:a,taskSlug:n}):r.jsx(k,{})};export{Ke as default}; diff --git a/assets/OrganizationDetailView-DhfYOewC.js b/assets/OrganizationDetailView-DhfYOewC.js deleted file mode 100644 index f4e8a40570378d45da4a1880c926854f459c3c0c..0000000000000000000000000000000000000000 --- a/assets/OrganizationDetailView-DhfYOewC.js +++ /dev/null @@ -1 +0,0 @@ -import{k as M,f as d,b as N,p as C,j as r,L as y,q as Q,T as F,u as z}from"./index-CTkdBAwI.js";import{R as E}from"./ResearchFollowButton-gAamAHri.js";import{M as I}from"./MarkdownText-B88CU2f1.js";import{O as K}from"./OrganizationContributionGraph-BlYz7Ff1.js";import{u as R,b as G,P as H}from"./PaperFeed-2BMpWfem.js";import{A as W,a as B}from"./alert-5nuL0v_r.js";import{S as D}from"./searchable-select-bWRlK1sd.js";import{S}from"./skeleton-p2_v-2W8.js";import{u as U}from"./usePapers-Cu-zovv8.js";import{c as v}from"./catalog-ZV4aeC2F.js";import{p as V}from"./papers-POQWk4vk.js";import{i as Z}from"./apiErrors-DFeecPSH.js";import{d as k,t as J}from"./transform-CZL79kIa.js";import{o as X,i as Y}from"./organizationNames-BVKzYEBp.js";import L from"./NotFound-BE9xg6GA.js";import"./researchTopic-B8hMcjil.js";import"./useMutation-DXSljxHA.js";import"./plus-Dhoq_Vs9.js";/* empty css */import"./PaperPreviewLink-gDkLaZRD.js";import"./index-RLQgt3ff.js";import"./index-BTuG6PF7.js";import"./katex-DkKDou_j.js";import"./hover-card-murUA8RP.js";import"./PaperCard--WllvTq0.js";import"./AuthorAvatar-DjiI2pGP.js";import"./SotaBadges-CyyWKB0V.js";import"./colors-BkWRhvFI.js";import"./Icon-DSoTeS9V.js";import"./LatexTitle-BmCQe_rK.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-CZErm3i7.js";import"./useIntersectionObserver-BnA8TYxZ.js";import"./button-CJEAPbmU.js";import"./dialog-C7LLEadk.js";import"./search-Di2HpIcQ.js";import"./loader-circle-B71NdARb.js";import"./useInfiniteQuery-CLH4OKrI.js";import"./curation-BlGrJ3z2.js";const ee=({organizationSlug:a,taskSlug:n})=>{var f,x,j,_,b;const $=M(),c=R(),{searchParams:w}=c,[O,h]=d.useState(!1),u=N({queryKey:Q.organization(a),queryFn:()=>v.getOrganization(a),staleTime:F}),l=N({queryKey:["organization-areas-with-tasks",a],queryFn:()=>v.organizationAreasWithTasks(a),staleTime:F}),p=U([...C.feeds.organization,a,n,c.filters],t=>V.forOrganization(a,{...c.filters,task:n,page:t,page_size:12}),{enabled:!!a});d.useEffect(()=>{h(!1)},[a,n]);const g=d.useMemo(()=>{var t;return(((t=l.data)==null?void 0:t.results)??[]).flatMap(o=>o.tasks.filter(s=>!!s.slug).map(s=>({...s,slug:s.slug,label:k(s.name,s.slug)})))},[l.data]),i=g.find(t=>t.slug===n),P=d.useMemo(()=>{var t;return(((t=p.data)==null?void 0:t.pages)??[]).flatMap(o=>o.results.map(J))},[p.data]),e=u.data??((f=l.data)==null?void 0:f.organization),m=e?X(e):null,T=((j=(x=p.data)==null?void 0:x.pages[0])==null?void 0:j.count)??0;if([u.error,l.error,p.error].some(Z))return r.jsx(L,{});if(l.error||p.error)return r.jsx("div",{className:"page",children:r.jsx(W,{variant:"destructive",children:r.jsx(B,{children:"Failed to load organization papers. Please try again."})})});const A=t=>{const o=t.trim().toLocaleLowerCase();return g.filter(s=>`${s.label} ${s.slug}`.toLocaleLowerCase().includes(o)).map(s=>({value:s.slug,label:s.label,description:`${s.paper_count.toLocaleString()} ${s.paper_count===1?"paper":"papers"}`}))},q=t=>{const o=t==="__all__"?`/orgs/${a}`:`/orgs/${a}/${t}`,s=w.toString();$({pathname:o,search:s?`?${s}`:""})};return r.jsxs("div",{className:"page",children:[r.jsxs("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:[r.jsx(y,{to:"/",children:"Home"}),r.jsx("span",{children:" / "}),r.jsx(y,{to:"/organizations",children:"Organizations"}),r.jsx("span",{children:" / "}),r.jsx("span",{children:(e==null?void 0:e.name)??a}),i&&r.jsxs(r.Fragment,{children:[r.jsx("span",{children:" / "}),r.jsx("span",{children:k(i.name,i.slug)})]})]}),r.jsxs("header",{className:"organization-hero",children:[r.jsxs("div",{className:"organization-hero-profile",children:[r.jsx("div",{className:"organizations-eyebrow",children:"ORGANIZATION"}),r.jsxs("h1",{className:`feed-title organization-hero-title${e&&!m&&Y(e.name)?" organization-hero-title--long":""}`,children:[e!=null&&e.logo_url&&!O?r.jsx("img",{src:e.logo_url,alt:"",width:58,height:58,onError:()=>h(!0)}):e?r.jsx("span",{className:"organization-hero-monogram","aria-hidden":"true",children:(m??e.name).slice(0,1).toUpperCase()}):null,e?r.jsxs("span",{className:"organization-hero-name",children:[m??e.name,m&&r.jsx("span",{className:"organization-hero-full-name",children:e.name})]}):r.jsx(S,{className:"h-12 w-64"})]}),e&&r.jsx(E,{kind:"organization",entityId:e.id}),e&&r.jsxs("div",{className:"feed-subtitle",children:[((_=e.paper_count)==null?void 0:_.toLocaleString())??0," papers",(e.organization_trending_score??0)>0&&e.trending_rank&&r.jsxs(r.Fragment,{children:[" · #",e.trending_rank," trending this month"]})]}),(e==null?void 0:e.description)&&r.jsx(I,{className:"method-description",text:e.description}),e&&r.jsxs("div",{className:"organization-hero-links",children:[e.website_url&&r.jsx("a",{href:e.website_url,target:"_blank",rel:"noreferrer",children:"Website ↗"}),e.hf_url&&r.jsx("a",{href:e.hf_url,target:"_blank",rel:"noreferrer",children:"Hugging Face ↗"}),e.github_url&&r.jsx("a",{href:e.github_url,target:"_blank",rel:"noreferrer",children:"GitHub ↗"})]})]}),r.jsx(K,{organizationSlug:a,organizationName:(e==null?void 0:e.name)??a})]}),r.jsx(G,{feed:c,style:{alignItems:"center",gap:16},leading:r.jsx("div",{style:{minWidth:260},children:r.jsx(D,{value:n??"__all__",onChange:q,placeholder:"All tasks",searchPlaceholder:"Search organization tasks...",emptyMessage:"No matching tasks.",ariaLabel:"Filter papers by task",selectedOption:i?{value:i.slug,label:i.label,description:`${i.paper_count.toLocaleString()} ${i.paper_count===1?"paper":"papers"}`}:{value:"__all__",label:"All tasks",description:`${((b=e==null?void 0:e.paper_count)==null?void 0:b.toLocaleString())??0} papers`},queryKey:["organization-task-options",a],queryFn:async t=>{var o;return[{value:"__all__",label:"All tasks",description:`${((o=e==null?void 0:e.paper_count)==null?void 0:o.toLocaleString())??0} papers`},...A(t)]},enabled:!l.isLoading,className:"h-[38px]"})}),children:r.jsxs("div",{className:"results-count",children:[T.toLocaleString()," papers"]})}),r.jsx(H,{query:p,cards:P,showInstitution:!1,empty:(e==null?void 0:e.paper_count)===0?"No papers indexed yet":"No papers found for this selection."})]})},Ke=()=>{const{orgSlug:a,taskSlug:n}=z();return a?r.jsx(ee,{organizationSlug:a,taskSlug:n}):r.jsx(L,{})};export{Ke as default}; diff --git a/assets/OrganizationsIndexView-BA4FIwH0.js b/assets/OrganizationsIndexView-f5uEFGH-.js similarity index 97% rename from assets/OrganizationsIndexView-BA4FIwH0.js rename to assets/OrganizationsIndexView-f5uEFGH-.js index 04cd0f37ee2c82d67af66809cd671d98d1f65263..b5194699edcab4c2da24a950f364ece78b00df2d 100644 --- a/assets/OrganizationsIndexView-BA4FIwH0.js +++ b/assets/OrganizationsIndexView-f5uEFGH-.js @@ -1 +1 @@ -import{e as m,b as x,f as h,j as e,L as u,q as j,T as y}from"./index-CTkdBAwI.js";import{A as N,a as f}from"./alert-5nuL0v_r.js";import{c as _}from"./catalog-ZV4aeC2F.js";const v=n=>n==="papers"||n==="name"?n:"trending",z=({organization:n})=>{const[d,i]=h.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:()=>i(!0)})})},L=()=>{const[n,d]=m(),i=v(n.get("sort")),c=n.get("q")??"",o=x({queryKey:[...j.organizations,"featured"],queryFn:()=>_.organizationIndex(),staleTime:y}),p=s=>{const a=new URLSearchParams(n),t=s.sort??i,r=s.query??c;t==="trending"?a.delete("sort"):a.set("sort",t),r.trim()?a.set("q",r):a.delete("q"),d(a)},g=h.useMemo(()=>{var t;const s=c.trim().toLocaleLowerCase(),a=(((t=o.data)==null?void 0:t.results)??[]).filter(r=>[r.name,r.slug,r.hf_slug??""].join(" ").toLocaleLowerCase().includes(s));return i==="papers"?[...a].sort((r,l)=>(l.paper_count??0)-(r.paper_count??0)||r.name.localeCompare(l.name)||r.slug.localeCompare(l.slug)):i==="name"?[...a].sort((r,l)=>r.name.localeCompare(l.name)||r.slug.localeCompare(l.slug)):a},[o.data,c,i]);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.jsx("h2",{id:"organizations-heading",children:o.data?`${o.data.count.toLocaleString()} organizations`:"Organizations"}),e.jsx("span",{children:i==="trending"?"Ranked by 30-day momentum":i==="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:i===s?"active":"","aria-pressed":i===s,onClick:()=>p({sort:s}),children:a},s))})]}),o.isLoading?e.jsx("div",{className:"organizations-grid","aria-busy":"true","aria-label":"Loading organizations",children:Array.from({length:12}).map((s,a)=>e.jsxs("div",{className:"organization-card organization-card-skeleton",children:[e.jsxs("div",{className:"organization-card-header",children:[e.jsx("span",{className:"organization-logo"}),e.jsxs("div",{children:[e.jsx("span",{className:"organization-skeleton-line"}),e.jsx("span",{className:"organization-skeleton-line short"})]})]}),e.jsx("div",{className:"organization-card-metrics",children:e.jsx("span",{className:"organization-skeleton-line short"})}),e.jsxs("div",{className:"organization-highlight",children:[e.jsx("span",{className:"organization-skeleton-line"}),e.jsx("span",{className:"organization-skeleton-line"})]})]},a))}):o.error?e.jsx(N,{variant:"destructive",children:e.jsxs(f,{children:["Failed to load organizations."," ",e.jsx("button",{type:"button",onClick:()=>o.refetch(),children:"Try again"})]})}):g.length===0?e.jsxs("div",{className:"organizations-empty",children:["No organizations match “",c,"”."]}):e.jsx("div",{className:"organizations-grid",children:g.map(s=>{var r;const a=s.paper_count??0,t=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(u,{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(z,{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"}),i==="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:[t?`Publishing ${t}`:"Research archive ready",e.jsx("span",{"aria-hidden":"true",children:"↗"})]})]},s.id)})})]})]})};export{L as default}; +import{e as m,b as x,f as h,j as e,L as u,q as j,T as y}from"./index-D2fBL-s6.js";import{A as N,a as f}from"./alert-PnePcfgX.js";import{c as _}from"./catalog-5AxvKr4D.js";const v=n=>n==="papers"||n==="name"?n:"trending",z=({organization:n})=>{const[d,i]=h.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:()=>i(!0)})})},L=()=>{const[n,d]=m(),i=v(n.get("sort")),c=n.get("q")??"",o=x({queryKey:[...j.organizations,"featured"],queryFn:()=>_.organizationIndex(),staleTime:y}),p=s=>{const a=new URLSearchParams(n),t=s.sort??i,r=s.query??c;t==="trending"?a.delete("sort"):a.set("sort",t),r.trim()?a.set("q",r):a.delete("q"),d(a)},g=h.useMemo(()=>{var t;const s=c.trim().toLocaleLowerCase(),a=(((t=o.data)==null?void 0:t.results)??[]).filter(r=>[r.name,r.slug,r.hf_slug??""].join(" ").toLocaleLowerCase().includes(s));return i==="papers"?[...a].sort((r,l)=>(l.paper_count??0)-(r.paper_count??0)||r.name.localeCompare(l.name)||r.slug.localeCompare(l.slug)):i==="name"?[...a].sort((r,l)=>r.name.localeCompare(l.name)||r.slug.localeCompare(l.slug)):a},[o.data,c,i]);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.jsx("h2",{id:"organizations-heading",children:o.data?`${o.data.count.toLocaleString()} organizations`:"Organizations"}),e.jsx("span",{children:i==="trending"?"Ranked by 30-day momentum":i==="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:i===s?"active":"","aria-pressed":i===s,onClick:()=>p({sort:s}),children:a},s))})]}),o.isLoading?e.jsx("div",{className:"organizations-grid","aria-busy":"true","aria-label":"Loading organizations",children:Array.from({length:12}).map((s,a)=>e.jsxs("div",{className:"organization-card organization-card-skeleton",children:[e.jsxs("div",{className:"organization-card-header",children:[e.jsx("span",{className:"organization-logo"}),e.jsxs("div",{children:[e.jsx("span",{className:"organization-skeleton-line"}),e.jsx("span",{className:"organization-skeleton-line short"})]})]}),e.jsx("div",{className:"organization-card-metrics",children:e.jsx("span",{className:"organization-skeleton-line short"})}),e.jsxs("div",{className:"organization-highlight",children:[e.jsx("span",{className:"organization-skeleton-line"}),e.jsx("span",{className:"organization-skeleton-line"})]})]},a))}):o.error?e.jsx(N,{variant:"destructive",children:e.jsxs(f,{children:["Failed to load organizations."," ",e.jsx("button",{type:"button",onClick:()=>o.refetch(),children:"Try again"})]})}):g.length===0?e.jsxs("div",{className:"organizations-empty",children:["No organizations match “",c,"”."]}):e.jsx("div",{className:"organizations-grid",children:g.map(s=>{var r;const a=s.paper_count??0,t=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(u,{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(z,{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"}),i==="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:[t?`Publishing ${t}`:"Research archive ready",e.jsx("span",{"aria-hidden":"true",children:"↗"})]})]},s.id)})})]})]})};export{L as default}; diff --git a/assets/PaperCard--WllvTq0.js b/assets/PaperCard-DhorusY5.js similarity index 96% rename from assets/PaperCard--WllvTq0.js rename to assets/PaperCard-DhorusY5.js index b2c55bd056c66c64f179a8b36d1f10ae843cf6b7..5ce32821575412af45667520fbfa262cf0e7a36f 100644 --- a/assets/PaperCard--WllvTq0.js +++ b/assets/PaperCard-DhorusY5.js @@ -1 +1 @@ -import{l as v,V as g,T as M,p as y,j as a,L as d}from"./index-CTkdBAwI.js";import{A as L}from"./AuthorAvatar-DjiI2pGP.js";import{P as Z,S as A,T as k,M as E}from"./SotaBadges-CyyWKB0V.js";import{I as P}from"./Icon-DSoTeS9V.js";import{L as U,a as w}from"./LatexTitle-BmCQe_rK.js";import{p as C}from"./papers-POQWk4vk.js";import{s as h}from"./safeExternalHref-CkBrsh84.js";const $=({size:s=16})=>a.jsxs("svg",{className:"hf-logo",width:s,height:s,viewBox:"0 0 95 88",fill:"none","aria-hidden":"true",focusable:"false",children:[a.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"}),a.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"}),a.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"}),a.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"}),a.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"}),a.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"}),a.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"}),a.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"}),a.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"})]});function T(s){const t=[...new Set(s.map(r=>r.replace(/ \(subtask\)$/,"")))],l=t.length>3?[...t.slice(0,2),`${t.length-2} more`]:t;return l.length>1?`${l.slice(0,-1).join(", ")} and ${l[l.length-1]}`:l[0]}const z="language-modeling";function p(s){return s?s.toLowerCase().replace(/\(.*?\)/g," ").replace(/[^a-z]+/g," ").replace(/\bllm\b/g," ").replace(/\s+/g," ").trim().replace(/s$/,""):""}function B(s){return p(s.slug)==="large language model"||p(s.name)==="large language model"}function D(s){return s.tags.includes(z)?s.methods.filter(t=>!B(t)):s.methods}const S=({name:s,slug:t,logoUrl:l})=>{const[r,i]=g.useState(!1);return!l||r?null:a.jsx(d,{to:`/orgs/${t}`,className:"paper-organization-logo","aria-label":`View ${s} organization`,title:s,children:a.jsx("img",{src:l,alt:"",onError:()=>i(!0)})})},q=({paper:s,priority:t=!1,showInstitution:l=!0,highlightQuery:r,followReasons:i})=>{const m=v(),u=`/paper/${s.id}`,n=g.useCallback(()=>{m.prefetchQuery({queryKey:y.detail(s.id),queryFn:()=>C.get(s.id,!0),staleTime:M})},[s.id,m]),F=s.authors.slice(0,3).map((e,o)=>{var b,N;const f=(b=s.authorIds)==null?void 0:b[o],j=(N=s.authorHfProfiles)==null?void 0:N[o];return a.jsxs(g.Fragment,{children:[o>0&&", ",j&&a.jsx(L,{className:"paper-card-author-avatar",url:j.avatarUrl}),f?a.jsx(d,{to:`/authors/${f}`,children:e}):e]},o)}),c=s.authors.length,x=D(s);return a.jsxs("article",{className:"paper-card",children:[a.jsx(d,{to:u,className:"paper-thumb-wrap",onFocus:n,onMouseEnter:n,children:a.jsx(Z,{paperId:s.id,title:s.title,thumbnailUrl:s.thumbnailUrl,priority:t})}),a.jsxs("div",{className:"paper-body",children:[a.jsxs("div",{className:"paper-body-main",children:[i&&i.length>0&&a.jsxs("div",{className:"paper-follow-reason",children:["Because you follow ",T(i)]}),a.jsxs("h3",{className:"paper-title",children:[a.jsx(d,{to:u,onFocus:n,onMouseEnter:n,children:a.jsx(U,{title:s.title,highlight:r})}),l&&s.organizations.length>0&&a.jsx("span",{className:"paper-organization-logos",children:s.organizations.map(e=>a.jsx(S,{...e},e.slug))})]}),a.jsxs("div",{className:"paper-authors",children:[F,c>3&&a.jsxs("span",{children:[", ","+",c-3," authors"]}),s.date&&a.jsxs(a.Fragment,{children:[c>0?" · ":"",a.jsx("span",{children:s.date})]}),s.citations>0&&a.jsxs(a.Fragment,{children:[c>0||s.date?" · ":"",a.jsxs("span",{children:[s.citations.toLocaleString()," citations"]})]})]}),s.abstract&&a.jsx("p",{className:"paper-abstract",children:a.jsx(w,{text:s.abstract,highlight:r})}),s.sotaRanks.length>0&&a.jsx(A,{ranks:s.sotaRanks,paperHref:u}),(s.tags.length>0||x.length>0)&&a.jsxs("div",{className:"paper-tags paper-tags--clamped",children:[s.tags.map(e=>a.jsx(k,{slug:e},e)),x.map(e=>a.jsx(E,{method:e},e.id||e.slug||e.name))]})]}),(s.githubUrl||s.hfUrl)&&a.jsxs("div",{className:"paper-resources",children:[h(s.githubUrl)&&a.jsxs("a",{className:"paper-resource is-link",href:h(s.githubUrl)??void 0,target:"_blank",rel:"noopener noreferrer","aria-label":"Open GitHub repository",onClick:e=>e.stopPropagation(),children:[a.jsx(P,{name:"github",size:20}),s.velocity24h!=null&&s.velocity24h>0&&a.jsxs("span",{className:"resource-stat",children:[a.jsxs("span",{className:"resource-value",children:[a.jsx("span",{className:"gh-rate-arrow",children:"↑"}),s.velocity24h.toFixed(1)]}),a.jsx("span",{className:"resource-label",children:"stars / hr"})]})]}),h(s.hfUrl)&&s.hfKind&&a.jsxs("a",{className:"paper-resource is-link",href:h(s.hfUrl)??void 0,target:"_blank",rel:"noopener noreferrer","aria-label":`Open Hugging Face ${s.hfKind}`,onClick:e=>e.stopPropagation(),children:[a.jsx($,{size:20}),a.jsxs("span",{className:"resource-stat",children:[a.jsx("span",{className:"resource-value",children:s.hfCount}),a.jsx("span",{className:"resource-label",children:s.hfKind})]})]})]})]})]})};export{q as P}; +import{l as v,V as g,T as M,p as y,j as a,L as d}from"./index-D2fBL-s6.js";import{A as L}from"./AuthorAvatar-C8tz_syh.js";import{P as Z,S as A,T as k,M as E}from"./SotaBadges-r6iGzLRW.js";import{I as P}from"./Icon-Uhh78KjL.js";import{L as U,a as w}from"./LatexTitle-WIQJ1ke0.js";import{p as C}from"./papers-khuZaSFb.js";import{s as h}from"./safeExternalHref-CkBrsh84.js";const $=({size:s=16})=>a.jsxs("svg",{className:"hf-logo",width:s,height:s,viewBox:"0 0 95 88",fill:"none","aria-hidden":"true",focusable:"false",children:[a.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"}),a.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"}),a.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"}),a.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"}),a.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"}),a.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"}),a.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"}),a.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"}),a.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"})]});function T(s){const t=[...new Set(s.map(r=>r.replace(/ \(subtask\)$/,"")))],l=t.length>3?[...t.slice(0,2),`${t.length-2} more`]:t;return l.length>1?`${l.slice(0,-1).join(", ")} and ${l[l.length-1]}`:l[0]}const z="language-modeling";function p(s){return s?s.toLowerCase().replace(/\(.*?\)/g," ").replace(/[^a-z]+/g," ").replace(/\bllm\b/g," ").replace(/\s+/g," ").trim().replace(/s$/,""):""}function B(s){return p(s.slug)==="large language model"||p(s.name)==="large language model"}function D(s){return s.tags.includes(z)?s.methods.filter(t=>!B(t)):s.methods}const S=({name:s,slug:t,logoUrl:l})=>{const[r,i]=g.useState(!1);return!l||r?null:a.jsx(d,{to:`/orgs/${t}`,className:"paper-organization-logo","aria-label":`View ${s} organization`,title:s,children:a.jsx("img",{src:l,alt:"",onError:()=>i(!0)})})},q=({paper:s,priority:t=!1,showInstitution:l=!0,highlightQuery:r,followReasons:i})=>{const m=v(),u=`/paper/${s.id}`,n=g.useCallback(()=>{m.prefetchQuery({queryKey:y.detail(s.id),queryFn:()=>C.get(s.id,!0),staleTime:M})},[s.id,m]),F=s.authors.slice(0,3).map((e,o)=>{var b,N;const f=(b=s.authorIds)==null?void 0:b[o],j=(N=s.authorHfProfiles)==null?void 0:N[o];return a.jsxs(g.Fragment,{children:[o>0&&", ",j&&a.jsx(L,{className:"paper-card-author-avatar",url:j.avatarUrl}),f?a.jsx(d,{to:`/authors/${f}`,children:e}):e]},o)}),c=s.authors.length,x=D(s);return a.jsxs("article",{className:"paper-card",children:[a.jsx(d,{to:u,className:"paper-thumb-wrap",onFocus:n,onMouseEnter:n,children:a.jsx(Z,{paperId:s.id,title:s.title,thumbnailUrl:s.thumbnailUrl,priority:t})}),a.jsxs("div",{className:"paper-body",children:[a.jsxs("div",{className:"paper-body-main",children:[i&&i.length>0&&a.jsxs("div",{className:"paper-follow-reason",children:["Because you follow ",T(i)]}),a.jsxs("h3",{className:"paper-title",children:[a.jsx(d,{to:u,onFocus:n,onMouseEnter:n,children:a.jsx(U,{title:s.title,highlight:r})}),l&&s.organizations.length>0&&a.jsx("span",{className:"paper-organization-logos",children:s.organizations.map(e=>a.jsx(S,{...e},e.slug))})]}),a.jsxs("div",{className:"paper-authors",children:[F,c>3&&a.jsxs("span",{children:[", ","+",c-3," authors"]}),s.date&&a.jsxs(a.Fragment,{children:[c>0?" · ":"",a.jsx("span",{children:s.date})]}),s.citations>0&&a.jsxs(a.Fragment,{children:[c>0||s.date?" · ":"",a.jsxs("span",{children:[s.citations.toLocaleString()," citations"]})]})]}),s.abstract&&a.jsx("p",{className:"paper-abstract",children:a.jsx(w,{text:s.abstract,highlight:r})}),s.sotaRanks.length>0&&a.jsx(A,{ranks:s.sotaRanks,paperHref:u}),(s.tags.length>0||x.length>0)&&a.jsxs("div",{className:"paper-tags paper-tags--clamped",children:[s.tags.map(e=>a.jsx(k,{slug:e},e)),x.map(e=>a.jsx(E,{method:e},e.id||e.slug||e.name))]})]}),(s.githubUrl||s.hfUrl)&&a.jsxs("div",{className:"paper-resources",children:[h(s.githubUrl)&&a.jsxs("a",{className:"paper-resource is-link",href:h(s.githubUrl)??void 0,target:"_blank",rel:"noopener noreferrer","aria-label":"Open GitHub repository",onClick:e=>e.stopPropagation(),children:[a.jsx(P,{name:"github",size:20}),s.velocity24h!=null&&s.velocity24h>0&&a.jsxs("span",{className:"resource-stat",children:[a.jsxs("span",{className:"resource-value",children:[a.jsx("span",{className:"gh-rate-arrow",children:"↑"}),s.velocity24h.toFixed(1)]}),a.jsx("span",{className:"resource-label",children:"stars / hr"})]})]}),h(s.hfUrl)&&s.hfKind&&a.jsxs("a",{className:"paper-resource is-link",href:h(s.hfUrl)??void 0,target:"_blank",rel:"noopener noreferrer","aria-label":`Open Hugging Face ${s.hfKind}`,onClick:e=>e.stopPropagation(),children:[a.jsx($,{size:20}),a.jsxs("span",{className:"resource-stat",children:[a.jsx("span",{className:"resource-value",children:s.hfCount}),a.jsx("span",{className:"resource-label",children:s.hfKind})]})]})]})]})]})};export{q as P}; diff --git a/assets/PaperDetailView-D2ZjcN2x.js b/assets/PaperDetailView-BRUxkorx.js similarity index 98% rename from assets/PaperDetailView-D2ZjcN2x.js rename to assets/PaperDetailView-BRUxkorx.js index 840d93d4e9538e502a3b5bf649881854fe1d9590..868af6e4276581c720f1cbcbfa5b98a7f797894f 100644 --- a/assets/PaperDetailView-D2ZjcN2x.js +++ b/assets/PaperDetailView-BRUxkorx.js @@ -1,4 +1,4 @@ -import{c as ft,b as Q,t as ea,T as it,v as re,w as ta,k as rs,x as J,f as b,p as me,j as e,C as gt,l as Z,y as xt,X as ns,q as Lt,P as is,z as ee,B as os,D as pe,E as he,F as ls,G as bt,I as Ce,J as Tt,K as sa,L as K,M as aa,N as ra,R as na,O as ia,Q as cs,S as oa,h as la,U as ca,A as Se,m as da,a as Pe,V as Ee,W as se,i as ds,u as ua,Y as Dt,Z as ma,s as Ft,_ as ha,$ as pa,a0 as fa,a1 as ga,a2 as xa,a3 as ba}from"./index-CTkdBAwI.js";import{u as ae}from"./useMutation-DXSljxHA.js";import{I as F}from"./Icon-DSoTeS9V.js";import{T as ja,M as va,S as ya,P as _a}from"./SotaBadges-CyyWKB0V.js";import{L as Ne,a as ot}from"./LatexTitle-BmCQe_rK.js";import{e as $e,C as ka,E as Na}from"./ExternalSourceEvalBadge-bt0V7K9M.js";import{p as U}from"./papers-POQWk4vk.js";import{s as wa,a as Ca}from"./transform-CZL79kIa.js";import{r as us,p as Sa}from"./paperReader-td2aJigh.js";import{a as Ea}from"./usePapers-Cu-zovv8.js";import{u as Pa,f as $a}from"./useDocumentTitle-WlHj7EYH.js";import{u as Ia}from"./preferences-BMkWyA3F.js";import{s as Y}from"./safeExternalHref-CkBrsh84.js";import{F as Ut,i as Ra,P as Aa}from"./curation-BlGrJ3z2.js";import{m as La}from"./mlIntern-DGSta2oO.js";import{S as ue}from"./skeleton-p2_v-2W8.js";import{A as Ta,a as Da}from"./alert-5nuL0v_r.js";import{B as A}from"./button-CJEAPbmU.js";import{D as Ie,a as Re,c as Ae,b as Le,d as Te,e as jt}from"./dialog-C7LLEadk.js";import{A as Fa,a as Ua}from"./AgentLogos-CDnvpl-X.js";import{C as Ba}from"./copy-CSFOf_JK.js";import{u as ye,r as za,e as Ma}from"./evaluationQueryInvalidation-Dxt6kOu3.js";import{I as z}from"./input-C24thzbI.js";import{S as Bt}from"./searchable-select-bWRlK1sd.js";import{L as vt}from"./loader-circle-B71NdARb.js";import{T as fe,n as He,g as zt,C as Ha}from"./CatalogEntityPreviewLink-BtlbiZfu.js";import{S as ms,L as O,a as Oa}from"./SignInToEditDialog-Dn64C3wp.js";import{c as G}from"./catalog-ZV4aeC2F.js";import{s as hs,p as ps}from"./submissions-BSh9vIax.js";import{i as fs,a as gs,r as qa}from"./queryInvalidation-B6btj6xZ.js";import{D as Ka}from"./database--XDgAVkg.js";import{P as ge}from"./plus-Dhoq_Vs9.js";import{S as lt}from"./search-Di2HpIcQ.js";import{B as xs}from"./badge-DIkpOdrw.js";import{G as Mt}from"./globe-BBGLIdNn.js";import{G as Ht}from"./github-B1HnPn8H.js";import{u as bs}from"./index-tW8cPsfP.js";import{c as Oe,A as Ga}from"./codex-CxJ1q9dv.js";import{M as Qa}from"./index-RLQgt3ff.js";import{r as Xa}from"./index-BTuG6PF7.js";import{u as Va}from"./useIntersectionObserver-BnA8TYxZ.js";import{a as ct}from"./account-Ck5qYpM8.js";import{S as Ot,s as Wa}from"./savedPapersAuth-DIA9S41B.js";import{o as Ya}from"./organizationNames-BVKzYEBp.js";import{A as Ja}from"./AuthorAvatar-DjiI2pGP.js";import"./colors-BkWRhvFI.js";import"./hover-card-murUA8RP.js";import"./useInfiniteQuery-CLH4OKrI.js";import"./popover-CZErm3i7.js";import"./textarea-DH3b7wpe.js";/** +import{c as ft,b as Q,t as ea,T as it,v as re,w as ta,k as rs,x as J,f as b,p as me,j as e,C as gt,l as Z,y as xt,X as ns,q as Lt,P as is,z as ee,B as os,D as pe,E as he,F as ls,G as bt,I as Ce,J as Tt,K as sa,L as K,M as aa,N as ra,R as na,O as ia,Q as cs,S as oa,h as la,U as ca,A as Se,m as da,a as Pe,V as Ee,W as se,i as ds,u as ua,Y as Dt,Z as ma,s as Ft,_ as ha,$ as pa,a0 as fa,a1 as ga,a2 as xa,a3 as ba}from"./index-D2fBL-s6.js";import{u as ae}from"./useMutation-9dlTbuQj.js";import{I as F}from"./Icon-Uhh78KjL.js";import{T as ja,M as va,S as ya,P as _a}from"./SotaBadges-r6iGzLRW.js";import{L as Ne,a as ot}from"./LatexTitle-WIQJ1ke0.js";import{e as $e,C as ka,E as Na}from"./ExternalSourceEvalBadge-C2AscbJz.js";import{p as U}from"./papers-khuZaSFb.js";import{s as wa,a as Ca}from"./transform-B_GaHMvk.js";import{r as us,p as Sa}from"./paperReader-td2aJigh.js";import{a as Ea}from"./usePapers-CAjdcUuj.js";import{u as Pa,f as $a}from"./useDocumentTitle-ibepJVy2.js";import{u as Ia}from"./preferences-BHmRHfHN.js";import{s as Y}from"./safeExternalHref-CkBrsh84.js";import{F as Ut,i as Ra,P as Aa}from"./curation-BtfabyzA.js";import{m as La}from"./mlIntern-KBHZ6tOl.js";import{S as ue}from"./skeleton-BDwfco0_.js";import{A as Ta,a as Da}from"./alert-PnePcfgX.js";import{B as A}from"./button-D0XfbdrX.js";import{D as Ie,a as Re,c as Ae,b as Le,d as Te,e as jt}from"./dialog-DgUROq2j.js";import{A as Fa,a as Ua}from"./AgentLogos-B5etEEwg.js";import{C as Ba}from"./copy-CcyqVsMW.js";import{u as ye,r as za,e as Ma}from"./evaluationQueryInvalidation-Cs0hE-wT.js";import{I as z}from"./input-DdobyT4w.js";import{S as Bt}from"./searchable-select-CsXzzP_V.js";import{L as vt}from"./loader-circle-CoLo2trx.js";import{T as fe,n as He,g as zt,C as Ha}from"./CatalogEntityPreviewLink-xL6TDpUk.js";import{S as ms,L as O,a as Oa}from"./SignInToEditDialog-BBAwjxYj.js";import{c as G}from"./catalog-5AxvKr4D.js";import{s as hs,p as ps}from"./submissions-LRopJJKL.js";import{i as fs,a as gs,r as qa}from"./queryInvalidation-BVOtRFkG.js";import{D as Ka}from"./database-Ci0ufNyG.js";import{P as ge}from"./plus-BI8-JXK0.js";import{S as lt}from"./search-0R_Hc3S2.js";import{B as xs}from"./badge-Pw584nS3.js";import{G as Mt}from"./globe-BPKDvPgp.js";import{G as Ht}from"./github-DcIeypA5.js";import{u as bs}from"./index-C_9KPu-E.js";import{c as Oe,A as Ga}from"./codex-BUTI-2RM.js";import{M as Qa}from"./index-BPshewTi.js";import{r as Xa}from"./index-BtZPsygG.js";import{u as Va}from"./useIntersectionObserver-C0Rq0EXm.js";import{a as ct}from"./account-BHlQBDNT.js";import{S as Ot,s as Wa}from"./savedPapersAuth-0s9GFyfF.js";import{o as Ya}from"./organizationNames-BVKzYEBp.js";import{A as Ja}from"./AuthorAvatar-C8tz_syh.js";import"./colors-BkWRhvFI.js";import"./hover-card-DWpZK4fW.js";import"./useInfiniteQuery-CjJA-90e.js";import"./popover-DS5Jzsg5.js";import"./textarea-B8b7WxcV.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/PaperFeed-2BMpWfem.js b/assets/PaperFeed-BERxHjrg.js similarity index 53% rename from assets/PaperFeed-2BMpWfem.js rename to assets/PaperFeed-BERxHjrg.js index d98277cd744d3e1ec19c94c184f071e2b81f3c1a..b3710f55864bac7101f357454cceb4647cbc5218 100644 --- a/assets/PaperFeed-2BMpWfem.js +++ b/assets/PaperFeed-BERxHjrg.js @@ -1 +1 @@ -import{f as u,j as t,e as J,V as K}from"./index-CTkdBAwI.js";import{P as X}from"./PaperCard--WllvTq0.js";import{P as ee,a as te,b as ae}from"./popover-CZErm3i7.js";import{I as se}from"./Icon-DSoTeS9V.js";import{S as j}from"./skeleton-p2_v-2W8.js";import{u as ne}from"./useIntersectionObserver-BnA8TYxZ.js";const Y=(e,a)=>{const s=new Date(a),n=new Date(s);return n.setUTCDate(s.getUTCDate()-(e==="week"?6:29)),{startDate:n.toISOString().slice(0,10),endDate:s.toISOString().slice(0,10)}},V=e=>({startDate:e.get("start_date")||void 0,endDate:e.get("end_date")||void 0}),Ne=(e,a=new Date,s="week")=>{const n=V(e);if(n.startDate||n.endDate||e.get("time")==="all_time")return n;const o=new Date(Date.UTC(a.getUTCFullYear(),a.getUTCMonth(),a.getUTCDate()));return Y(s,o)},Z=(e,a)=>{const s=new URLSearchParams(e);return a.startDate?s.set("start_date",a.startDate):s.delete("start_date"),a.endDate?s.set("end_date",a.endDate):s.delete("end_date"),s.delete("time"),s},Se=(e,a)=>{const s=Z(e,a);return!a.startDate&&!a.endDate&&s.set("time","all_time"),s},re=new Intl.DateTimeFormat("en",{month:"long",year:"numeric",timeZone:"UTC"}),H=new Intl.DateTimeFormat("en",{month:"short",timeZone:"UTC"}),O="(max-width: 640px)",oe=()=>{const[e,a]=u.useState(()=>typeof window<"u"&&window.matchMedia(O).matches);return u.useEffect(()=>{const s=window.matchMedia(O),n=o=>a(o.matches);return a(s.matches),s.addEventListener("change",n),()=>s.removeEventListener("change",n)},[]),e},W=e=>e.toISOString().slice(0,10),b=e=>new Date(`${e}T00:00:00Z`),ie=()=>{const e=new Date;return new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()))},F=(e,a)=>new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth()+a,1)),v=e=>new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),1)),ce=(e,a)=>new Date(Date.UTC(a,e.getUTCMonth(),1)),w=(e,a)=>e.startDate===a.startDate&&e.endDate===a.endDate,le=(e,a)=>{const s=b(e),n=b(a),o=H.format(s),i=H.format(n),d=s.getUTCDate(),l=n.getUTCDate(),r=s.getUTCFullYear(),p=n.getUTCFullYear();return e===a?`${o} ${d}, ${r}`:r===p&&s.getUTCMonth()===n.getUTCMonth()?`${o} ${d}–${l}, ${r}`:r===p?`${o} ${d}–${i} ${l}, ${r}`:`${o} ${d}, ${r}–${i} ${l}, ${p}`},de=e=>{const a=e.getUTCFullYear(),s=e.getUTCMonth(),n=new Date(Date.UTC(a,s,1)),o=(n.getUTCDay()+6)%7,i=new Date(n);return i.setUTCDate(n.getUTCDate()-o),Array.from({length:42},(d,l)=>{const r=new Date(i);return r.setUTCDate(i.getUTCDate()+l),{iso:W(r),day:r.getUTCDate(),outsideMonth:r.getUTCMonth()!==s}})},L=({month:e,today:a,startDate:s,endDate:n,onSelect:o,yearLabel:i,yearValue:d,onYearChange:l,secondary:r=!1})=>{const p=u.useMemo(()=>de(e),[e]);return t.jsxs("section",{className:`paper-date-calendar${r?" paper-date-calendar-secondary":""}`,children:[t.jsxs("label",{className:"paper-date-year",children:[t.jsx("span",{children:i}),t.jsx("input",{type:"number",inputMode:"numeric",min:"1900",max:a.slice(0,4),step:"1",value:d,onChange:c=>l(c.target.value)})]}),t.jsx("h3",{children:re.format(e)}),t.jsx("div",{className:"paper-date-weekdays","aria-hidden":"true",children:["Mon","Tue","Wed","Thu","Fri","Sat","Sun"].map(c=>t.jsx("span",{children:c},c))}),t.jsx("div",{className:"paper-date-days",children:p.map(c=>{const g=c.iso===s||c.iso===n,m=!!(s&&n&&c.iso>s&&c.isoa;return t.jsx("button",{type:"button","aria-label":c.iso,"aria-selected":g,disabled:f,className:["paper-date-day",c.outsideMonth?"outside":"",g?"selected":"",m?"in-range":"",c.iso===a?"today":""].filter(Boolean).join(" "),onClick:()=>o(c.iso),children:c.day},c.iso)})})]})},I=({calendar:e,onPrevious:a,onNext:s,secondary:n=!1})=>t.jsxs("div",{className:`paper-date-navigation-group${n?" paper-date-navigation-group-secondary":""}`,children:[t.jsx("button",{type:"button","aria-label":`Previous ${e} month`,onClick:a,children:"←"}),t.jsx("button",{type:"button","aria-label":`Next ${e} month`,onClick:s,children:"→"})]}),he=({startDate:e,endDate:a,onChange:s,currentDate:n})=>{const o=oe(),i=n?b(n):ie(),[d,l]=u.useState(!1),[r,p]=u.useState(),[c,g]=u.useState(),[m,f]=u.useState(()=>v(i)),[_,T]=u.useState(()=>F(v(i),1)),[z,D]=u.useState(()=>String(i.getUTCFullYear())),[G,y]=u.useState(()=>String(i.getUTCFullYear())),N={startDate:e,endDate:a},M=Y("week",i),P=Y("month",i),k=W(i),R=!!(e&&a&&!w(N,M)&&!w(N,P)),Q=()=>{p(e),g(a);const h=v(e?b(e):i),x=v(a?b(a):F(h,1));f(h),T(x),D(String(h.getUTCFullYear())),y(String(x.getUTCFullYear())),l(!0)},E=(h,x,$)=>{if(x(h),!/^\d{4}$/.test(h))return;const C=Number(h);C>=1900&&C<=i.getUTCFullYear()&&$(U=>ce(U,C))},S=(h,x,$,C)=>{const U=F(h,x);$(U),C(String(U.getUTCFullYear()))},A=h=>{!r||c?(p(h),g(void 0)):h{s({}),l(!1)};return t.jsxs("div",{className:`paper-date-filter${o?" paper-date-filter-single-calendar":""}`,role:"group","aria-label":"Publication date",children:[t.jsx("button",{type:"button",className:`sort-btn sort-btn-time${w(N,M)?" active":""}`,onClick:()=>s(M),children:"Last Week"}),t.jsx("button",{type:"button",className:`sort-btn sort-btn-time${w(N,P)?" active":""}`,onClick:()=>s(P),children:"Last Month"}),t.jsx("button",{type:"button",className:`sort-btn sort-btn-time${!e&&!a?" active":""}`,onClick:()=>s({}),children:"All Time"}),t.jsxs(ee,{open:d,onOpenChange:h=>{h?Q():l(!1)},children:[t.jsx(te,{asChild:!0,children:t.jsx("button",{type:"button",className:`sort-btn sort-btn-time${R?" active":""}`,"aria-label":R?"Change date range":"Select a range",children:R&&e&&a?le(e,a):"Select a range"})}),t.jsxs(ae,{align:"end",className:`paper-date-popover${o?" paper-date-popover-single-calendar":""}`,role:"dialog","aria-label":"Select a date range",children:[t.jsxs("div",{className:"paper-date-popover-header",children:[t.jsx("h2",{children:"Select a date range"}),t.jsx("p",{children:"Choose an inclusive start and end publication date."})]}),t.jsxs("div",{className:"paper-date-navigation",children:[t.jsx(I,{calendar:"start",onPrevious:()=>S(m,-1,f,D),onNext:()=>S(m,1,f,D)}),!o&&t.jsx(I,{calendar:"end",onPrevious:()=>S(_,-1,T,y),onNext:()=>S(_,1,T,y),secondary:!0})]}),t.jsxs("div",{className:"paper-date-calendars",children:[t.jsx(L,{month:m,today:k,startDate:r,endDate:c,onSelect:A,yearLabel:o?"Year":"Start year",yearValue:z,onYearChange:h=>E(h,D,f)}),!o&&t.jsx(L,{month:_,today:k,startDate:r,endDate:c,onSelect:A,yearLabel:"End year",yearValue:G,onYearChange:h=>E(h,y,T),secondary:!0})]}),t.jsxs("div",{className:"paper-date-actions",children:[t.jsx("button",{type:"button",className:"paper-date-clear",onClick:q,children:"Clear range"}),t.jsxs("div",{children:[t.jsx("button",{type:"button",onClick:()=>l(!1),children:"Cancel"}),t.jsx("button",{type:"button",className:"paper-date-apply",disabled:!r||!c,onClick:()=>{r&&c&&s({startDate:r,endDate:c}),l(!1)},children:"Apply"})]})]})]})]})]})},pe=()=>t.jsxs("span",{className:"hf-resource-logo",children:[t.jsx("img",{className:"hf-resource-logo-black",src:"/hf-logo-monochrome-black.svg?v=20260729",alt:""}),t.jsx("img",{className:"hf-resource-logo-white",src:"/hf-logo-monochrome-white.svg?v=20260729",alt:""})]}),B=({checked:e,icon:a,label:s,onChange:n})=>t.jsxs("button",{type:"button",className:`paper-feed-filter ${e?"active":""}`,"aria-pressed":e,onClick:()=>n(!e),children:[t.jsxs("span",{className:"paper-feed-filter-content",children:[t.jsx("span",{className:"paper-feed-filter-icon","aria-hidden":"true",children:a}),s]}),e&&t.jsx("span",{className:"paper-feed-filter-check","aria-hidden":"true",children:"✓"})]}),ge=({hasCode:e,hasHfArtifacts:a,onHasCodeChange:s,onHasHfArtifactsChange:n,showDivider:o=!0,showHasCode:i=!0})=>t.jsxs("div",{className:"paper-feed-resource-controls",role:"group","aria-label":"Resource filters",children:[o&&t.jsx("span",{className:"paper-feed-resource-divider","aria-hidden":"true"}),t.jsxs("div",{className:"paper-feed-filter-options",children:[i&&t.jsx(B,{checked:e,icon:t.jsx(se,{name:"github",size:14}),label:"Has code",onChange:s}),t.jsx(B,{checked:a,icon:t.jsx(pe,{}),label:"Has artifacts",onChange:n})]})]});function ue(e,a="200px"){const{targetRef:s,isIntersecting:n}=ne({rootMargin:a}),{data:o,hasNextPage:i,isFetchingNextPage:d,fetchNextPage:l}=e;return u.useEffect(()=>{n&&i&&!d&&l()},[n,i,d,l,o]),s}const me=[["trending","trending"],["date_published","newest"],["citation_count","most cited"]];function Ue(){const[e,a]=J(),s=e.get("order_by"),n=s==="date_published"||s==="citation_count"?s:"trending",o=e.get("has_code")==="true",i=e.get("has_hf_artifacts")==="true",d=V(e),l=(r,p)=>{const c=new URLSearchParams(e);p?c.set(r,p):c.delete(r),a(c)};return{searchParams:e,setSearchParams:a,orderBy:n,hasCode:o,hasHfArtifacts:i,dateRange:d,setOrderBy:r=>l("order_by",r==="trending"?null:r),setHasCode:r=>l("has_code",r?"true":null),setHasHfArtifacts:r=>l("has_hf_artifacts",r?"true":null),setDateRange:r=>a(Z(e,r)),filters:{order_by:n,order_dir:"desc",latest_only:!0,include_resources:!0,has_code:o,has_hf_artifacts:i,start_date:d.startDate,end_date:d.endDate}}}const ve=({feed:e,sorts:a=me,activeSort:s=e.orderBy,showDateFilter:n=!0,showHasCode:o,style:i,leading:d,children:l})=>t.jsxs("div",{className:"sort-bar",style:i,children:[d,t.jsxs("div",{className:"paper-feed-toolbar-controls",children:[a&&t.jsx("div",{className:"sort-options",children:a.map(([r,p])=>t.jsx("button",{type:"button",className:`sort-btn ${s===r?"active":""}`,onClick:()=>e.setOrderBy(r),children:p},r))}),t.jsx(ge,{hasCode:e.hasCode,hasHfArtifacts:e.hasHfArtifacts,onHasCodeChange:e.setHasCode,onHasHfArtifactsChange:e.setHasHfArtifacts,showDivider:!!a,showHasCode:o})]}),n&&t.jsx(he,{startDate:e.dateRange.startDate,endDate:e.dateRange.endDate,onChange:e.setDateRange}),l]}),fe=()=>t.jsx(j,{className:"h-40 w-full"}),xe=()=>t.jsxs("div",{className:"paper-card",children:[t.jsx("div",{className:"paper-thumb-wrap",children:t.jsx(j,{className:"paper-thumb-skeleton"})}),t.jsxs("div",{className:"paper-body",style:{flex:1,gap:12},children:[t.jsx(j,{className:"h-6 w-3/4"}),t.jsx(j,{className:"h-4 w-1/2"}),t.jsx(j,{className:"h-12 w-full"})]})]}),we=({query:e,isLoading:a=e.isLoading,cards:s,empty:n,skeleton:o="block",showInstitution:i,highlightQuery:d,cardHeader:l,rootMargin:r,children:p})=>{const c=ue(e,r);if(a){const g=o==="card"?xe:fe;return t.jsx("div",{className:"paper-list",children:Array.from({length:o==="card"?6:4}).map((m,f)=>t.jsx(g,{},f))})}return s.length===0?n===null?null:t.jsx("div",{className:"no-results",children:n}):t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"paper-list",children:s.map((g,m)=>t.jsxs(K.Fragment,{children:[l==null?void 0:l(m),t.jsx(X,{paper:g,priority:m<3,showInstitution:i,highlightQuery:d,followReasons:g.followReasons})]},g.id))}),t.jsx("div",{ref:c,style:{height:1}}),e.isFetchingNextPage&&t.jsx("div",{style:{padding:"20px 0",textAlign:"center",color:"var(--ink-faint)"},children:"Loading more…"}),p]})};export{we as P,he as a,ve as b,me as c,Ne as r,Ue as u,Se as w}; +import{f as u,j as t,e as J,V as K}from"./index-D2fBL-s6.js";import{P as X}from"./PaperCard-DhorusY5.js";import{P as ee,a as te,b as ae}from"./popover-DS5Jzsg5.js";import{I as se}from"./Icon-Uhh78KjL.js";import{S as j}from"./skeleton-BDwfco0_.js";import{u as ne}from"./useIntersectionObserver-C0Rq0EXm.js";const Y=(e,a)=>{const s=new Date(a),n=new Date(s);return n.setUTCDate(s.getUTCDate()-(e==="week"?6:29)),{startDate:n.toISOString().slice(0,10),endDate:s.toISOString().slice(0,10)}},V=e=>({startDate:e.get("start_date")||void 0,endDate:e.get("end_date")||void 0}),re=(e,a=new Date,s="week")=>{const n=V(e);if(n.startDate||n.endDate||e.get("time")==="all_time")return n;const o=new Date(Date.UTC(a.getUTCFullYear(),a.getUTCMonth(),a.getUTCDate()));return Y(s,o)},Z=(e,a)=>{const s=new URLSearchParams(e);return a.startDate?s.set("start_date",a.startDate):s.delete("start_date"),a.endDate?s.set("end_date",a.endDate):s.delete("end_date"),s.delete("time"),s},oe=(e,a)=>{const s=Z(e,a);return!a.startDate&&!a.endDate&&s.set("time","all_time"),s},ie=new Intl.DateTimeFormat("en",{month:"long",year:"numeric",timeZone:"UTC"}),H=new Intl.DateTimeFormat("en",{month:"short",timeZone:"UTC"}),O="(max-width: 640px)",ce=()=>{const[e,a]=u.useState(()=>typeof window<"u"&&window.matchMedia(O).matches);return u.useEffect(()=>{const s=window.matchMedia(O),n=o=>a(o.matches);return a(s.matches),s.addEventListener("change",n),()=>s.removeEventListener("change",n)},[]),e},W=e=>e.toISOString().slice(0,10),b=e=>new Date(`${e}T00:00:00Z`),le=()=>{const e=new Date;return new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()))},F=(e,a)=>new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth()+a,1)),U=e=>new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),1)),de=(e,a)=>new Date(Date.UTC(a,e.getUTCMonth(),1)),w=(e,a)=>e.startDate===a.startDate&&e.endDate===a.endDate,he=(e,a)=>{const s=b(e),n=b(a),o=H.format(s),i=H.format(n),p=s.getUTCDate(),l=n.getUTCDate(),r=s.getUTCFullYear(),d=n.getUTCFullYear();return e===a?`${o} ${p}, ${r}`:r===d&&s.getUTCMonth()===n.getUTCMonth()?`${o} ${p}–${l}, ${r}`:r===d?`${o} ${p}–${i} ${l}, ${r}`:`${o} ${p}, ${r}–${i} ${l}, ${d}`},pe=e=>{const a=e.getUTCFullYear(),s=e.getUTCMonth(),n=new Date(Date.UTC(a,s,1)),o=(n.getUTCDay()+6)%7,i=new Date(n);return i.setUTCDate(n.getUTCDate()-o),Array.from({length:42},(p,l)=>{const r=new Date(i);return r.setUTCDate(i.getUTCDate()+l),{iso:W(r),day:r.getUTCDate(),outsideMonth:r.getUTCMonth()!==s}})},L=({month:e,today:a,startDate:s,endDate:n,onSelect:o,yearLabel:i,yearValue:p,onYearChange:l,secondary:r=!1})=>{const d=u.useMemo(()=>pe(e),[e]);return t.jsxs("section",{className:`paper-date-calendar${r?" paper-date-calendar-secondary":""}`,children:[t.jsxs("label",{className:"paper-date-year",children:[t.jsx("span",{children:i}),t.jsx("input",{type:"number",inputMode:"numeric",min:"1900",max:a.slice(0,4),step:"1",value:p,onChange:c=>l(c.target.value)})]}),t.jsx("h3",{children:ie.format(e)}),t.jsx("div",{className:"paper-date-weekdays","aria-hidden":"true",children:["Mon","Tue","Wed","Thu","Fri","Sat","Sun"].map(c=>t.jsx("span",{children:c},c))}),t.jsx("div",{className:"paper-date-days",children:d.map(c=>{const g=c.iso===s||c.iso===n,m=!!(s&&n&&c.iso>s&&c.isoa;return t.jsx("button",{type:"button","aria-label":c.iso,"aria-selected":g,disabled:f,className:["paper-date-day",c.outsideMonth?"outside":"",g?"selected":"",m?"in-range":"",c.iso===a?"today":""].filter(Boolean).join(" "),onClick:()=>o(c.iso),children:c.day},c.iso)})})]})},I=({calendar:e,onPrevious:a,onNext:s,secondary:n=!1})=>t.jsxs("div",{className:`paper-date-navigation-group${n?" paper-date-navigation-group-secondary":""}`,children:[t.jsx("button",{type:"button","aria-label":`Previous ${e} month`,onClick:a,children:"←"}),t.jsx("button",{type:"button","aria-label":`Next ${e} month`,onClick:s,children:"→"})]}),ge=({startDate:e,endDate:a,onChange:s,currentDate:n})=>{const o=ce(),i=n?b(n):le(),[p,l]=u.useState(!1),[r,d]=u.useState(),[c,g]=u.useState(),[m,f]=u.useState(()=>U(i)),[_,T]=u.useState(()=>F(U(i),1)),[z,D]=u.useState(()=>String(i.getUTCFullYear())),[G,y]=u.useState(()=>String(i.getUTCFullYear())),N={startDate:e,endDate:a},M=Y("week",i),P=Y("month",i),k=W(i),R=!!(e&&a&&!w(N,M)&&!w(N,P)),Q=()=>{d(e),g(a);const h=U(e?b(e):i),x=U(a?b(a):F(h,1));f(h),T(x),D(String(h.getUTCFullYear())),y(String(x.getUTCFullYear())),l(!0)},E=(h,x,$)=>{if(x(h),!/^\d{4}$/.test(h))return;const C=Number(h);C>=1900&&C<=i.getUTCFullYear()&&$(v=>de(v,C))},S=(h,x,$,C)=>{const v=F(h,x);$(v),C(String(v.getUTCFullYear()))},A=h=>{!r||c?(d(h),g(void 0)):h{s({}),l(!1)};return t.jsxs("div",{className:`paper-date-filter${o?" paper-date-filter-single-calendar":""}`,role:"group","aria-label":"Publication date",children:[t.jsx("button",{type:"button",className:`sort-btn sort-btn-time${w(N,M)?" active":""}`,onClick:()=>s(M),children:"Last Week"}),t.jsx("button",{type:"button",className:`sort-btn sort-btn-time${w(N,P)?" active":""}`,onClick:()=>s(P),children:"Last Month"}),t.jsx("button",{type:"button",className:`sort-btn sort-btn-time${!e&&!a?" active":""}`,onClick:()=>s({}),children:"All Time"}),t.jsxs(ee,{open:p,onOpenChange:h=>{h?Q():l(!1)},children:[t.jsx(te,{asChild:!0,children:t.jsx("button",{type:"button",className:`sort-btn sort-btn-time${R?" active":""}`,"aria-label":R?"Change date range":"Select a range",children:R&&e&&a?he(e,a):"Select a range"})}),t.jsxs(ae,{align:"end",className:`paper-date-popover${o?" paper-date-popover-single-calendar":""}`,role:"dialog","aria-label":"Select a date range",children:[t.jsxs("div",{className:"paper-date-popover-header",children:[t.jsx("h2",{children:"Select a date range"}),t.jsx("p",{children:"Choose an inclusive start and end publication date."})]}),t.jsxs("div",{className:"paper-date-navigation",children:[t.jsx(I,{calendar:"start",onPrevious:()=>S(m,-1,f,D),onNext:()=>S(m,1,f,D)}),!o&&t.jsx(I,{calendar:"end",onPrevious:()=>S(_,-1,T,y),onNext:()=>S(_,1,T,y),secondary:!0})]}),t.jsxs("div",{className:"paper-date-calendars",children:[t.jsx(L,{month:m,today:k,startDate:r,endDate:c,onSelect:A,yearLabel:o?"Year":"Start year",yearValue:z,onYearChange:h=>E(h,D,f)}),!o&&t.jsx(L,{month:_,today:k,startDate:r,endDate:c,onSelect:A,yearLabel:"End year",yearValue:G,onYearChange:h=>E(h,y,T),secondary:!0})]}),t.jsxs("div",{className:"paper-date-actions",children:[t.jsx("button",{type:"button",className:"paper-date-clear",onClick:q,children:"Clear range"}),t.jsxs("div",{children:[t.jsx("button",{type:"button",onClick:()=>l(!1),children:"Cancel"}),t.jsx("button",{type:"button",className:"paper-date-apply",disabled:!r||!c,onClick:()=>{r&&c&&s({startDate:r,endDate:c}),l(!1)},children:"Apply"})]})]})]})]})]})},ue=()=>t.jsxs("span",{className:"hf-resource-logo",children:[t.jsx("img",{className:"hf-resource-logo-black",src:"/hf-logo-monochrome-black.svg?v=20260729",alt:""}),t.jsx("img",{className:"hf-resource-logo-white",src:"/hf-logo-monochrome-white.svg?v=20260729",alt:""})]}),B=({checked:e,icon:a,label:s,onChange:n})=>t.jsxs("button",{type:"button",className:`paper-feed-filter ${e?"active":""}`,"aria-pressed":e,onClick:()=>n(!e),children:[t.jsxs("span",{className:"paper-feed-filter-content",children:[t.jsx("span",{className:"paper-feed-filter-icon","aria-hidden":"true",children:a}),s]}),e&&t.jsx("span",{className:"paper-feed-filter-check","aria-hidden":"true",children:"✓"})]}),me=({hasCode:e,hasHfArtifacts:a,onHasCodeChange:s,onHasHfArtifactsChange:n,showDivider:o=!0,showHasCode:i=!0})=>t.jsxs("div",{className:"paper-feed-resource-controls",role:"group","aria-label":"Resource filters",children:[o&&t.jsx("span",{className:"paper-feed-resource-divider","aria-hidden":"true"}),t.jsxs("div",{className:"paper-feed-filter-options",children:[i&&t.jsx(B,{checked:e,icon:t.jsx(se,{name:"github",size:14}),label:"Has code",onChange:s}),t.jsx(B,{checked:a,icon:t.jsx(ue,{}),label:"Has artifacts",onChange:n})]})]});function fe(e,a="200px"){const{targetRef:s,isIntersecting:n}=ne({rootMargin:a}),{data:o,hasNextPage:i,isFetchingNextPage:p,fetchNextPage:l}=e;return u.useEffect(()=>{n&&i&&!p&&l()},[n,i,p,l,o]),s}const xe=[["trending","trending"],["date_published","newest"],["citation_count","most cited"]];function ve({defaultToLastMonth:e=!1}={}){const[a,s]=J(),n=a.get("order_by"),o=n==="date_published"||n==="citation_count"?n:"trending",i=a.get("has_code")==="true",p=a.get("has_hf_artifacts")==="true",l=e?re(a,void 0,"month"):V(a),r=(d,c)=>{const g=new URLSearchParams(a);c?g.set(d,c):g.delete(d),s(g)};return{searchParams:a,setSearchParams:s,orderBy:o,hasCode:i,hasHfArtifacts:p,dateRange:l,setOrderBy:d=>r("order_by",d==="trending"?null:d),setHasCode:d=>r("has_code",d?"true":null),setHasHfArtifacts:d=>r("has_hf_artifacts",d?"true":null),setDateRange:d=>s((e?oe:Z)(a,d)),filters:{order_by:o,order_dir:"desc",latest_only:!0,include_resources:!0,has_code:i,has_hf_artifacts:p,start_date:l.startDate,end_date:l.endDate}}}const Ue=({feed:e,sorts:a=xe,activeSort:s=e.orderBy,showDateFilter:n=!0,showHasCode:o,style:i,leading:p,children:l})=>t.jsxs("div",{className:"sort-bar",style:i,children:[p,t.jsxs("div",{className:"paper-feed-toolbar-controls",children:[a&&t.jsx("div",{className:"sort-options",children:a.map(([r,d])=>t.jsx("button",{type:"button",className:`sort-btn ${s===r?"active":""}`,onClick:()=>e.setOrderBy(r),children:d},r))}),t.jsx(me,{hasCode:e.hasCode,hasHfArtifacts:e.hasHfArtifacts,onHasCodeChange:e.setHasCode,onHasHfArtifactsChange:e.setHasHfArtifacts,showDivider:!!a,showHasCode:o})]}),n&&t.jsx(ge,{startDate:e.dateRange.startDate,endDate:e.dateRange.endDate,onChange:e.setDateRange}),l]}),Ce=()=>t.jsx(j,{className:"h-40 w-full"}),je=()=>t.jsxs("div",{className:"paper-card",children:[t.jsx("div",{className:"paper-thumb-wrap",children:t.jsx(j,{className:"paper-thumb-skeleton"})}),t.jsxs("div",{className:"paper-body",style:{flex:1,gap:12},children:[t.jsx(j,{className:"h-6 w-3/4"}),t.jsx(j,{className:"h-4 w-1/2"}),t.jsx(j,{className:"h-12 w-full"})]})]}),we=({query:e,isLoading:a=e.isLoading,cards:s,empty:n,skeleton:o="block",showInstitution:i,highlightQuery:p,cardHeader:l,rootMargin:r,children:d})=>{const c=fe(e,r);if(a){const g=o==="card"?je:Ce;return t.jsx("div",{className:"paper-list",children:Array.from({length:o==="card"?6:4}).map((m,f)=>t.jsx(g,{},f))})}return s.length===0?n===null?null:t.jsx("div",{className:"no-results",children:n}):t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"paper-list",children:s.map((g,m)=>t.jsxs(K.Fragment,{children:[l==null?void 0:l(m),t.jsx(X,{paper:g,priority:m<3,showInstitution:i,highlightQuery:p,followReasons:g.followReasons})]},g.id))}),t.jsx("div",{ref:c,style:{height:1}}),e.isFetchingNextPage&&t.jsx("div",{style:{padding:"20px 0",textAlign:"center",color:"var(--ink-faint)"},children:"Loading more…"}),d]})};export{we as P,ge as a,Ue as b,xe as c,re as r,ve as u,oe as w}; diff --git a/assets/PaperPreviewLink-gDkLaZRD.js b/assets/PaperPreviewLink-BZuRBR1p.js similarity index 98% rename from assets/PaperPreviewLink-gDkLaZRD.js rename to assets/PaperPreviewLink-BZuRBR1p.js index 912447f8c61c871d2376028533c8789dc3e4a539..47618dd10c736c80ab8d62c23c2311ec09be45d7 100644 --- a/assets/PaperPreviewLink-gDkLaZRD.js +++ b/assets/PaperPreviewLink-BZuRBR1p.js @@ -1,4 +1,4 @@ -import{o as F,f as j,m as b,a as le,p as O,b as z,n as D,h as ce,s as ue,c as he,v as pe,S as me}from"./index-RLQgt3ff.js";import{l as fe}from"./index-BTuG6PF7.js";import R from"./katex-DkKDou_j.js";import{j as p,V as A,a3 as de,p as xe,w as C,d as ge,l as ye,L as T,b as we,A as be}from"./index-CTkdBAwI.js";import{H as Ne,a as ve,b as ke}from"./hover-card-murUA8RP.js";import{p as I}from"./papers-POQWk4vk.js";import{u as Fe}from"./useMutation-DXSljxHA.js";function je(){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];F(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,""),m=this.stack[this.stack.length-1];F(m.type==="math"),this.exit(a),m.value=c;const f=m.data.hChildren[0];F(f.type==="element"),F(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(),m=this.stack[this.stack.length-1];F(m.type==="inlineMath"),this.exit(a),m.value=c,m.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 Ce(e){let t=(e||{}).singleDollarTextMath;return t==null&&(t=!0),n.peek=i,{unsafe:[{character:"\r",inConstruct:"mathFlowMeta"},{character:` +import{o as F,f as j,m as b,a as le,p as O,b as z,n as D,h as ce,s as ue,c as he,v as pe,S as me}from"./index-BPshewTi.js";import{l as fe}from"./index-BtZPsygG.js";import R from"./katex-DkKDou_j.js";import{j as p,V as A,a3 as de,p as xe,w as C,d as ge,l as ye,L as T,b as we,A as be}from"./index-D2fBL-s6.js";import{H as Ne,a as ve,b as ke}from"./hover-card-DWpZK4fW.js";import{p as I}from"./papers-khuZaSFb.js";import{u as Fe}from"./useMutation-9dlTbuQj.js";function je(){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];F(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,""),m=this.stack[this.stack.length-1];F(m.type==="math"),this.exit(a),m.value=c;const f=m.data.hChildren[0];F(f.type==="element"),F(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(),m=this.stack[this.stack.length-1];F(m.type==="inlineMath"),this.exit(a),m.value=c,m.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 Ce(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||"",m=l.createTracker(a),f="$".repeat(Math.max(fe(c,"$")+1,2)),g=l.enter("mathFlow");let d=m.move(f);if(s.meta){const x=l.enter("mathFlowMeta");d+=m.move(l.safe(s.meta,{after:` `,before:d,encode:["$"],...m.current()})),x()}return d+=m.move(` `),c&&(d+=m.move(c+` diff --git a/assets/PaperReaderView-BR93ZsWh.js b/assets/PaperReaderView-Bdokcr9P.js similarity index 91% rename from assets/PaperReaderView-BR93ZsWh.js rename to assets/PaperReaderView-Bdokcr9P.js index 9ff546881cde8aa5958fe3725aba72cff4ed4e83..afec6ca5ebccd51809ccd300485f75bb6c89bc9c 100644 --- a/assets/PaperReaderView-BR93ZsWh.js +++ b/assets/PaperReaderView-Bdokcr9P.js @@ -1 +1 @@ -import{f as s,b as F,j as r,A as ee,u as Fe,w as qe,k as He,a3 as Se,Z as Ke,L as G}from"./index-CTkdBAwI.js";import{u as Oe,R as De,A as Ue,c as Ve,d as Qe,a as Xe,P as Ze,e as Ye}from"./chatLifecycle-MnB7vIxs.js";import{M as Ge}from"./MarkdownText-B88CU2f1.js";import{g as Je,a as et,b as tt}from"./papers-POQWk4vk.js";import{f as at,w as rt,s as st,e as nt,a as J,b as je,c as _e}from"./paperReader-td2aJigh.js";import{a as it}from"./usePapers-Cu-zovv8.js";import{c as ot}from"./chat-Dr1lXe8V.js";import{s as te}from"./safeExternalHref-CkBrsh84.js";import{ChatExperience as ct}from"./ChatView-KfwjwrJL.js";import"./chatSessions-DFZee9F6.js";/* empty css */import"./hover-card-murUA8RP.js";import"./CatalogEntityPreviewLink-BtlbiZfu.js";import"./catalog-ZV4aeC2F.js";import"./github-B1HnPn8H.js";import"./file-text-C_y5yA3N.js";import"./PaperPreviewLink-gDkLaZRD.js";import"./index-RLQgt3ff.js";import"./index-BTuG6PF7.js";import"./katex-DkKDou_j.js";import"./useMutation-DXSljxHA.js";import"./thumbs-up-CYylDqig.js";import"./copy-CSFOf_JK.js";import"./queryOptions-C9woPjwX.js";import"./arrow-left-CROPXr9Q.js";import"./external-link-DK_uOtfh.js";import"./plus-Dhoq_Vs9.js";import"./search-Di2HpIcQ.js";import"./chevron-up-C4mc56q2.js";import"./AuthorAvatar-DjiI2pGP.js";import"./curation-BlGrJ3z2.js";import"./useInfiniteQuery-CLH4OKrI.js";import"./McpShowcase-0Is00fre.js";import"./AgentLogos-CDnvpl-X.js";import"./share-2-p1ZCvleM.js";import"./Icon-DSoTeS9V.js";import"./mlIntern-DGSta2oO.js";import"./openrouter-CIzc-yJH.js";function lt(a){return a instanceof ee&&a.status===422?"This page could not be turned into a readable paper.":a instanceof ee&&a.status===503?"Paper content is still being prepared. Please try again later.":"The paper could not be loaded."}function dt({paperId:a,paperKey:i,paperTitle:c,paperHref:b,sourceUrl:t,resources:o,paperVersion:g="",selectionEnabled:v=!1,onReady:P,onPaperSelection:q,onPaperSelectionError:l}){var E;const A=s.useRef(null),x=at(t),C=F({queryKey:["paperWebPage",a],queryFn:()=>Je(a),enabled:!x,staleTime:5*6e4,retry:!1}),w=!x&&C.isPending,S=x||((E=C.data)==null?void 0:E.frameable)===!0,[u,T]=s.useState("original"),p=S&&u==="original",m=F({queryKey:["paperWebMarkdown",a],queryFn:()=>et(a),staleTime:5*6e4,retry:(K,$)=>K<2&&!($ instanceof ee&&$.status<500),retryDelay:3e3}),y=m.isSuccess;s.useEffect(()=>{y&&(P==null||P())},[P,y]),Oe({enabled:v&&!!g&&y&&!p,pagesRoot:A,routeId:i,paperVersion:g,numPages:1,onSelect:q,onError:l});const R=m.data?rt(m.data):"",H=!!(o!=null&&o.projectPage&&st(o.projectPage.href,t));return r.jsxs("div",{className:"pdf-viewer",children:[r.jsx(De,{paperTitle:c,paperHref:b,resources:o,label:"Paper controls",children:r.jsxs("div",{className:"pdf-toolbar-controls",children:[S&&r.jsxs("div",{className:"reader-web-view-toggle",role:"group","aria-label":"Paper view",children:[r.jsx("button",{type:"button","aria-pressed":p,onClick:()=>T("original"),children:"Original"}),r.jsx("button",{type:"button","aria-pressed":!p,title:"Readable text; select a passage to ask the chat about it",onClick:()=>T("text"),children:"Text"})]}),!H&&r.jsx("a",{href:t,target:"_blank",rel:"noopener noreferrer",children:"Open original"})]})}),r.jsx("div",{className:"pdf-scroll-frame",children:w?r.jsx("div",{className:"pdf-loading",role:"status",children:"Loading the paper…"}):p?r.jsx("iframe",{className:"reader-web-frame",src:t,title:`Original page: ${c}`,sandbox:"allow-scripts allow-same-origin allow-popups allow-popups-to-escape-sandbox",referrerPolicy:"strict-origin-when-cross-origin"}):r.jsx("div",{className:"pdf-scroll",role:"region","aria-label":"Paper web page",children:m.isPending?r.jsx("div",{className:"pdf-loading",role:"status",children:"Preparing a readable version of this page…"}):m.isError?r.jsxs("div",{className:"pdf-error",role:"alert",children:[r.jsx("p",{children:lt(m.error)}),r.jsxs("div",{children:[r.jsx("button",{type:"button",onClick:()=>void m.refetch(),children:"Retry"})," ",r.jsx("a",{href:t,target:"_blank",rel:"noopener noreferrer",children:"Open original"})]})]}):r.jsxs("article",{ref:A,className:"reader-web-document","data-page":"1",children:[!R.startsWith("# ")&&r.jsx("h1",{children:c}),r.jsx(Ge,{text:R})]})})})]})}const Ce=66,ut=240,ae="pwc:reader:split-ratio";function pt(a){const i=Number(sessionStorage.getItem(_e(a)));return Number.isInteger(i)&&i>0?i:1}function ft(){const a=Number(localStorage.getItem(ae));return Number.isFinite(a)&&a>=45&&a<=75?a:Ce}function mt(a){const i=te(a);if(!i)return null;const c=new URL(i);return(c.hostname==="arxiv.org"||c.hostname==="www.arxiv.org")&&c.pathname.startsWith("/pdf/")&&c.pathname.endsWith(".pdf")&&(c.pathname=c.pathname.slice(0,-4)),c.href}const ht=/^\/pdf\/(\d{4}\.\d{4,5}(?:v\d{1,3})?|[a-z]+(?:-[a-z]+)*(?:\.[A-Z]{2})?\/\d{7}(?:v\d{1,3})?)$/;function gt(a){const i=new URL(a),c=i.pathname.match(ht);return(i.hostname==="arxiv.org"||i.hostname==="www.arxiv.org")&&c&&!i.search?Se(`/paper-assets/arxiv-pdf/${c[1]}`)??a:a}function bt(a){return new URL(a).hostname.replace(/^www\./,"")}function vt(a){if(!a)return{};const i={};for(const t of a.repositories??[]){if(!t.is_official)continue;const o=te(t.url);if(!o)continue;const g=new URL(o),v=g.pathname.split("/").filter(Boolean);if((g.hostname==="github.com"||g.hostname==="www.github.com")&&v.length>=2){i.repository={href:o,stars:t.num_stars||0};break}}const c=[...a.project_pages??[]].sort((t,o)=>Number(o.is_official)-Number(t.is_official));for(const t of c){const o=te(t.url);if(o){i.projectPage={href:o,label:bt(o)};break}}const b=a.hf_artifact_summary?a.hf_artifact_summary.model_count+a.hf_artifact_summary.dataset_count+a.hf_artifact_summary.space_count:new Set([...a.hf_models??[],...a.hf_datasets??[],...a.hf_spaces??[]]).size;return b>0&&a.arxiv_id&&(i.huggingFace={href:`https://huggingface.co/papers/${a.arxiv_id.replace(/v\d+$/i,"")}`,count:b}),i}function xt({routeId:a}){var xe,Pe,we,ye,Re;const i=He(),c=it(a,!!a),b=F({queryKey:["chatAvailability"],queryFn:()=>ot.getAvailability(),refetchInterval:3e4,retry:!1}),t=c.data,o=t?nt(t):null,g=o?null:(t==null?void 0:t.source)==="external"?Se(`/paper-assets/external/${t.id}/paper.pdf`):mt(t==null?void 0:t.url_pdf),v=g&&(t==null?void 0:t.source)!=="external"?gt(g):g,P=vt(t),q=s.useMemo(()=>{var e;return(e=t==null?void 0:t.author_links)==null?void 0:e.flatMap(n=>n.id?[{id:n.id,name:n.name,avatarUrl:n.hf_avatar_url}]:[])},[t==null?void 0:t.author_links]),l=((xe=t==null?void 0:t.arxiv_id)==null?void 0:xe.replace(/v\d+$/i,""))||a,A=s.useCallback(()=>i(`/paper/${l}`),[l,i]),[x,C]=s.useState(()=>sessionStorage.getItem(J(a))||void 0),[w,S]=s.useState(ft),[u,T]=s.useState(()=>sessionStorage.getItem(je(a))==="1"),[p,m]=s.useState("paper"),[y,R]=s.useState(),[H,E]=s.useState(),[K,$]=s.useState(!1),ke=s.useCallback(()=>$(!0),[]),[Ne,_]=s.useState(""),[re]=s.useState(()=>pt(a)),[k,Ae]=s.useState(0),[se,ne]=s.useState(!1),[Te,ie]=s.useState(!1),I=s.useRef(null),O=s.useRef(null),W=s.useRef(null),oe=s.useRef(null),ce=s.useRef(null),D=s.useRef(!1),M=s.useRef(!1),U=s.useRef(0),j=s.useRef(0),V=s.useRef(0),N=s.useRef(w),le=s.useRef(re),Q=s.useRef(t==null?void 0:t.version),de=Ve().reset,ue=s.useRef(x),f=k>=840;s.useEffect(()=>{ue.current!==x&&(ue.current=x,de())},[x,de]),s.useEffect(()=>{t!=null&&t.version&&Q.current&&t.version!==Q.current&&(R(void 0),_("")),Q.current=t==null?void 0:t.version},[t==null?void 0:t.version]),s.useEffect(()=>()=>{window.clearTimeout(U.current),cancelAnimationFrame(j.current)},[]),s.useLayoutEffect(()=>{const e=I.current;if(!e)return;const n=()=>Ae(e.clientWidth);n();const d=new ResizeObserver(n);return d.observe(e),()=>d.disconnect()},[t]),s.useEffect(()=>{if(!t)return;document.title=`${t.title} — Papers With Code reader`;let e=document.querySelector('meta[name="robots"]');const n=!e;e||(e=document.createElement("meta"),e.name="robots",document.head.appendChild(e));const d=e.content;e.content="noindex, nofollow";let h=document.querySelector('link[rel="canonical"]');const Le=!h;h||(h=document.createElement("link"),h.rel="canonical",document.head.appendChild(h));const Be=h.href;return h.href=`${window.location.origin}/paper/${l}`,()=>{document.title="Papers With Code",n?e==null||e.remove():e&&(e.content=d),Le?h==null||h.remove():h&&(h.href=Be)}},[l,t]);const z=s.useCallback(e=>{if(!k)return Math.max(45,Math.min(75,e));const n=480/k*100,d=100-360/k*100;return Math.max(n,Math.min(d,e))},[k]);s.useEffect(()=>S(e=>{const n=z(e);return N.current=n,n}),[z]);const L=e=>{const n=z(e);N.current=n,S(n),localStorage.setItem(ae,String(n))},pe=e=>{var d;const n=z(e);N.current=n,O.current&&(O.current.style.width=`${n}%`),W.current&&(W.current.style.width=`${100-n}%`),(d=oe.current)==null||d.setAttribute("aria-valuenow",String(Math.round(n)))},fe=e=>{V.current=e,!j.current&&(j.current=requestAnimationFrame(()=>{var d;j.current=0;const n=(d=I.current)==null?void 0:d.getBoundingClientRect();n!=null&&n.width&&pe((V.current-n.left)/n.width*100)}))},Ee=e=>{M.current=!0,ne(!0),e.currentTarget.setPointerCapture(e.pointerId),fe(e.clientX)},X=()=>{var e;if(M.current){if(j.current){cancelAnimationFrame(j.current),j.current=0;const n=(e=I.current)==null?void 0:e.getBoundingClientRect();n!=null&&n.width&&pe((V.current-n.left)/n.width*100)}M.current=!1,S(N.current),localStorage.setItem(ae,String(N.current)),ne(!1)}},me=e=>{window.clearTimeout(U.current),ie(!0),T(e),sessionStorage.setItem(je(a),e?"1":"0"),U.current=window.setTimeout(()=>ie(!1),ut+40)},he=e=>{D.current=!0,me(e)};s.useEffect(()=>{var e;D.current&&(D.current=!1,(e=u?ce.current:W.current)==null||e.focus())},[u]);const $e=e=>{C(e),sessionStorage.setItem(J(a),e)},Ie=()=>{C(void 0),sessionStorage.removeItem(J(a)),R(void 0),_("")},ge=((Pe=b.data)==null?void 0:Pe.paper_reader_selection_enabled)===!0,be=e=>{R(e),_(`Selection from page ${e.page} added to chat`),f&&u&&me(!1)},We=s.useCallback(e=>{R(e),e||_("")},[]),Z=((we=b.data)==null?void 0:we.paper_reader_citations_enabled)===!0&&!!v,B=F({queryKey:["paper-layout",l],queryFn:()=>tt(l),enabled:Z&&!!l,staleTime:5*6e4}).data,Me=s.useMemo(()=>Z?{layout:B,open:e=>{const n=B?Qe(B,e):[];n.length&&(E(d=>({boxes:n,nonce:((d==null?void 0:d.nonce)??0)+1})),m("paper"))}}:null,[Z,B]),ve=Ke()&&((ye=b.data)==null?void 0:ye.paper_reader_chat_enabled)!==!1,Y=!!(t&&ve&&!(o&&!K)),ze=t&&ve&&!Y?r.jsx("div",{className:"reader-chat-unavailable",role:"status",children:"Chat opens once the paper is ready."}):t&&Y?r.jsx(ct,{mode:"paper",routeSessionId:x,primaryPaper:{id:t.id,routeId:l,title:t.title,arxivId:t.arxiv_id},currentPage:()=>le.current,paperSelection:y,onPaperSelectionChange:We,onSessionId:$e,onReaderSubmit:()=>m("assistant"),onReaderNewChat:Ie,onReaderClose:f?()=>he(!0):void 0}):r.jsx("div",{className:"reader-chat-unavailable",children:"Chat is not enabled for this preview."});return c.isLoading?r.jsx("div",{className:"reader-status",role:"status",children:"Loading paper…"}):c.error||!t?r.jsxs("div",{className:"reader-status",role:"alert",children:[r.jsx("p",{children:"Paper not found."}),r.jsx(G,{to:"/papers",children:"Browse papers"})]}):((Re=b.data)==null?void 0:Re.native_pdf_reader_enabled)===!1?r.jsxs("div",{className:"reader-status",role:"alert",children:[r.jsx("p",{children:"The native reader is currently unavailable."}),r.jsx(G,{to:`/paper/${l}`,children:"Back to paper"})]}):!v&&!o?r.jsxs("div",{className:"reader-status",role:"alert",children:[r.jsx("p",{children:"Native reading is unavailable for this resource."}),r.jsx(G,{to:`/paper/${l}`,children:"Back to paper"})]}):r.jsxs("div",{className:"paper-reader-shell",children:[!f&&r.jsxs("div",{className:"reader-tabs",role:"tablist","aria-label":"Reader panels",children:[r.jsx("button",{type:"button",role:"tab","aria-selected":p==="paper",onClick:()=>m("paper"),children:"Paper"}),r.jsxs("button",{type:"button",role:"tab","aria-selected":p==="assistant","aria-label":y&&p!=="assistant"?"Chat, selection attached":"Chat",onClick:()=>m("assistant"),children:["Chat",y&&p!=="assistant"&&r.jsx("span",{className:"reader-tab-pending","aria-hidden":"true"})]})]}),r.jsx(Xe,{variant:"reader",children:r.jsxs("div",{ref:I,className:`reader-workspace${f?" is-desktop":" is-tabs"}${u?" is-assistant-collapsed":""}${se?" is-resizing":""}`,"data-testid":"paper-chat-workspace",children:[r.jsx("section",{ref:O,className:`reader-paper-pane${!f&&p!=="paper"?" is-hidden":""}`,style:f?{width:u?"100%":`${w}%`}:void 0,role:"tabpanel","aria-label":"Paper","aria-hidden":!f&&p!=="paper",children:o?r.jsx(dt,{paperId:t.id,paperKey:l,paperTitle:t.title,paperHref:`/paper/${l}`,sourceUrl:o,resources:P,paperVersion:t.version,selectionEnabled:ge,onReady:ke,onPaperSelection:be,onPaperSelectionError:_}):v&&r.jsx(Ze,{url:v,downloadUrl:g??v,paperKey:l,paperTitle:t.title,paperHref:`/paper/${l}`,onClose:A,resources:P,initialPage:re,resizeActive:se||Te,selectionEnabled:ge,paperVersion:t.version,authors:q,loadErrorMessage:t.source==="external"?"Paper content is still being prepared. Please try again later.":void 0,onPaperSelection:be,onPaperSelectionError:_,highlight:H,onPageChange:e=>{le.current=e,sessionStorage.setItem(_e(a),String(e))}})}),f&&!u&&r.jsx("div",{ref:oe,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:Ee,onPointerMove:e=>{M.current&&fe(e.clientX)},onPointerUp:X,onPointerCancel:X,onLostPointerCapture:X,onDoubleClick:()=>L(Ce),onKeyDown:e=>{(e.key==="ArrowLeft"||e.key==="ArrowRight")&&(e.preventDefault(),L(w+(e.key==="ArrowRight"?2:-2))),e.key==="Home"&&L(45),e.key==="End"&&L(75)}}),r.jsx("aside",{ref:W,id:"reader-chat-panel",className:`reader-assistant-pane${!f&&p!=="assistant"?" is-hidden":""}${f&&u?" is-collapsed":""}`,style:f?{width:u?0:`${100-w}%`}:void 0,role:"tabpanel","aria-label":"Chat","aria-hidden":!f&&p!=="assistant"||u,tabIndex:-1,children:r.jsx(Ye.Provider,{value:Me,children:ze})}),r.jsx("div",{className:"sr-only","aria-live":"polite",children:Ne}),f&&(u||!Y)&&r.jsx("button",{ref:ce,type:"button",className:"reader-collapse-assistant","aria-controls":"reader-chat-panel","aria-expanded":!u,onClick:()=>he(!u),children:u?"Open chat":"Hide chat"})]})})]})}function ia(){const{paperId:a=""}=Fe(),i=qe(a).replace(/v\d+$/i,"");return r.jsx(Ue,{workspaceKey:`reader:${a}`,children:r.jsx(xt,{routeId:i},i)})}export{ia as default,vt as readerToolbarResources}; +import{f as s,b as F,j as r,A as ee,u as Fe,w as qe,k as He,a3 as Se,Z as Ke,L as G}from"./index-D2fBL-s6.js";import{u as Oe,R as De,A as Ue,c as Ve,d as Qe,a as Xe,P as Ze,e as Ye}from"./chatLifecycle-nMvmiYGF.js";import{M as Ge}from"./MarkdownText-ludE7yuw.js";import{g as Je,a as et,b as tt}from"./papers-khuZaSFb.js";import{f as at,w as rt,s as st,e as nt,a as J,b as je,c as _e}from"./paperReader-td2aJigh.js";import{a as it}from"./usePapers-CAjdcUuj.js";import{c as ot}from"./chat-BOZIonsX.js";import{s as te}from"./safeExternalHref-CkBrsh84.js";import{ChatExperience as ct}from"./ChatView-DAikess2.js";import"./chatSessions-CoHSP58H.js";/* empty css */import"./hover-card-DWpZK4fW.js";import"./CatalogEntityPreviewLink-xL6TDpUk.js";import"./catalog-5AxvKr4D.js";import"./github-DcIeypA5.js";import"./file-text-CikzkPqz.js";import"./PaperPreviewLink-BZuRBR1p.js";import"./index-BPshewTi.js";import"./index-BtZPsygG.js";import"./katex-DkKDou_j.js";import"./useMutation-9dlTbuQj.js";import"./thumbs-up-BnMguJ3s.js";import"./copy-CcyqVsMW.js";import"./queryOptions-C9woPjwX.js";import"./arrow-left-CzTG6LBL.js";import"./external-link-Ddavpnin.js";import"./plus-BI8-JXK0.js";import"./search-0R_Hc3S2.js";import"./chevron-up-B9KJ5aUJ.js";import"./AuthorAvatar-C8tz_syh.js";import"./curation-BtfabyzA.js";import"./useInfiniteQuery-CjJA-90e.js";import"./McpShowcase-R1ucnqw2.js";import"./AgentLogos-B5etEEwg.js";import"./share-2-SmaUf3DC.js";import"./Icon-Uhh78KjL.js";import"./mlIntern-KBHZ6tOl.js";import"./openrouter-BRMbmxz_.js";function lt(a){return a instanceof ee&&a.status===422?"This page could not be turned into a readable paper.":a instanceof ee&&a.status===503?"Paper content is still being prepared. Please try again later.":"The paper could not be loaded."}function dt({paperId:a,paperKey:i,paperTitle:c,paperHref:b,sourceUrl:t,resources:o,paperVersion:g="",selectionEnabled:v=!1,onReady:P,onPaperSelection:q,onPaperSelectionError:l}){var E;const A=s.useRef(null),x=at(t),C=F({queryKey:["paperWebPage",a],queryFn:()=>Je(a),enabled:!x,staleTime:5*6e4,retry:!1}),w=!x&&C.isPending,S=x||((E=C.data)==null?void 0:E.frameable)===!0,[u,T]=s.useState("original"),p=S&&u==="original",m=F({queryKey:["paperWebMarkdown",a],queryFn:()=>et(a),staleTime:5*6e4,retry:(K,$)=>K<2&&!($ instanceof ee&&$.status<500),retryDelay:3e3}),y=m.isSuccess;s.useEffect(()=>{y&&(P==null||P())},[P,y]),Oe({enabled:v&&!!g&&y&&!p,pagesRoot:A,routeId:i,paperVersion:g,numPages:1,onSelect:q,onError:l});const R=m.data?rt(m.data):"",H=!!(o!=null&&o.projectPage&&st(o.projectPage.href,t));return r.jsxs("div",{className:"pdf-viewer",children:[r.jsx(De,{paperTitle:c,paperHref:b,resources:o,label:"Paper controls",children:r.jsxs("div",{className:"pdf-toolbar-controls",children:[S&&r.jsxs("div",{className:"reader-web-view-toggle",role:"group","aria-label":"Paper view",children:[r.jsx("button",{type:"button","aria-pressed":p,onClick:()=>T("original"),children:"Original"}),r.jsx("button",{type:"button","aria-pressed":!p,title:"Readable text; select a passage to ask the chat about it",onClick:()=>T("text"),children:"Text"})]}),!H&&r.jsx("a",{href:t,target:"_blank",rel:"noopener noreferrer",children:"Open original"})]})}),r.jsx("div",{className:"pdf-scroll-frame",children:w?r.jsx("div",{className:"pdf-loading",role:"status",children:"Loading the paper…"}):p?r.jsx("iframe",{className:"reader-web-frame",src:t,title:`Original page: ${c}`,sandbox:"allow-scripts allow-same-origin allow-popups allow-popups-to-escape-sandbox",referrerPolicy:"strict-origin-when-cross-origin"}):r.jsx("div",{className:"pdf-scroll",role:"region","aria-label":"Paper web page",children:m.isPending?r.jsx("div",{className:"pdf-loading",role:"status",children:"Preparing a readable version of this page…"}):m.isError?r.jsxs("div",{className:"pdf-error",role:"alert",children:[r.jsx("p",{children:lt(m.error)}),r.jsxs("div",{children:[r.jsx("button",{type:"button",onClick:()=>void m.refetch(),children:"Retry"})," ",r.jsx("a",{href:t,target:"_blank",rel:"noopener noreferrer",children:"Open original"})]})]}):r.jsxs("article",{ref:A,className:"reader-web-document","data-page":"1",children:[!R.startsWith("# ")&&r.jsx("h1",{children:c}),r.jsx(Ge,{text:R})]})})})]})}const Ce=66,ut=240,ae="pwc:reader:split-ratio";function pt(a){const i=Number(sessionStorage.getItem(_e(a)));return Number.isInteger(i)&&i>0?i:1}function ft(){const a=Number(localStorage.getItem(ae));return Number.isFinite(a)&&a>=45&&a<=75?a:Ce}function mt(a){const i=te(a);if(!i)return null;const c=new URL(i);return(c.hostname==="arxiv.org"||c.hostname==="www.arxiv.org")&&c.pathname.startsWith("/pdf/")&&c.pathname.endsWith(".pdf")&&(c.pathname=c.pathname.slice(0,-4)),c.href}const ht=/^\/pdf\/(\d{4}\.\d{4,5}(?:v\d{1,3})?|[a-z]+(?:-[a-z]+)*(?:\.[A-Z]{2})?\/\d{7}(?:v\d{1,3})?)$/;function gt(a){const i=new URL(a),c=i.pathname.match(ht);return(i.hostname==="arxiv.org"||i.hostname==="www.arxiv.org")&&c&&!i.search?Se(`/paper-assets/arxiv-pdf/${c[1]}`)??a:a}function bt(a){return new URL(a).hostname.replace(/^www\./,"")}function vt(a){if(!a)return{};const i={};for(const t of a.repositories??[]){if(!t.is_official)continue;const o=te(t.url);if(!o)continue;const g=new URL(o),v=g.pathname.split("/").filter(Boolean);if((g.hostname==="github.com"||g.hostname==="www.github.com")&&v.length>=2){i.repository={href:o,stars:t.num_stars||0};break}}const c=[...a.project_pages??[]].sort((t,o)=>Number(o.is_official)-Number(t.is_official));for(const t of c){const o=te(t.url);if(o){i.projectPage={href:o,label:bt(o)};break}}const b=a.hf_artifact_summary?a.hf_artifact_summary.model_count+a.hf_artifact_summary.dataset_count+a.hf_artifact_summary.space_count:new Set([...a.hf_models??[],...a.hf_datasets??[],...a.hf_spaces??[]]).size;return b>0&&a.arxiv_id&&(i.huggingFace={href:`https://huggingface.co/papers/${a.arxiv_id.replace(/v\d+$/i,"")}`,count:b}),i}function xt({routeId:a}){var xe,Pe,we,ye,Re;const i=He(),c=it(a,!!a),b=F({queryKey:["chatAvailability"],queryFn:()=>ot.getAvailability(),refetchInterval:3e4,retry:!1}),t=c.data,o=t?nt(t):null,g=o?null:(t==null?void 0:t.source)==="external"?Se(`/paper-assets/external/${t.id}/paper.pdf`):mt(t==null?void 0:t.url_pdf),v=g&&(t==null?void 0:t.source)!=="external"?gt(g):g,P=vt(t),q=s.useMemo(()=>{var e;return(e=t==null?void 0:t.author_links)==null?void 0:e.flatMap(n=>n.id?[{id:n.id,name:n.name,avatarUrl:n.hf_avatar_url}]:[])},[t==null?void 0:t.author_links]),l=((xe=t==null?void 0:t.arxiv_id)==null?void 0:xe.replace(/v\d+$/i,""))||a,A=s.useCallback(()=>i(`/paper/${l}`),[l,i]),[x,C]=s.useState(()=>sessionStorage.getItem(J(a))||void 0),[w,S]=s.useState(ft),[u,T]=s.useState(()=>sessionStorage.getItem(je(a))==="1"),[p,m]=s.useState("paper"),[y,R]=s.useState(),[H,E]=s.useState(),[K,$]=s.useState(!1),ke=s.useCallback(()=>$(!0),[]),[Ne,_]=s.useState(""),[re]=s.useState(()=>pt(a)),[k,Ae]=s.useState(0),[se,ne]=s.useState(!1),[Te,ie]=s.useState(!1),I=s.useRef(null),O=s.useRef(null),W=s.useRef(null),oe=s.useRef(null),ce=s.useRef(null),D=s.useRef(!1),M=s.useRef(!1),U=s.useRef(0),j=s.useRef(0),V=s.useRef(0),N=s.useRef(w),le=s.useRef(re),Q=s.useRef(t==null?void 0:t.version),de=Ve().reset,ue=s.useRef(x),f=k>=840;s.useEffect(()=>{ue.current!==x&&(ue.current=x,de())},[x,de]),s.useEffect(()=>{t!=null&&t.version&&Q.current&&t.version!==Q.current&&(R(void 0),_("")),Q.current=t==null?void 0:t.version},[t==null?void 0:t.version]),s.useEffect(()=>()=>{window.clearTimeout(U.current),cancelAnimationFrame(j.current)},[]),s.useLayoutEffect(()=>{const e=I.current;if(!e)return;const n=()=>Ae(e.clientWidth);n();const d=new ResizeObserver(n);return d.observe(e),()=>d.disconnect()},[t]),s.useEffect(()=>{if(!t)return;document.title=`${t.title} — Papers With Code reader`;let e=document.querySelector('meta[name="robots"]');const n=!e;e||(e=document.createElement("meta"),e.name="robots",document.head.appendChild(e));const d=e.content;e.content="noindex, nofollow";let h=document.querySelector('link[rel="canonical"]');const Le=!h;h||(h=document.createElement("link"),h.rel="canonical",document.head.appendChild(h));const Be=h.href;return h.href=`${window.location.origin}/paper/${l}`,()=>{document.title="Papers With Code",n?e==null||e.remove():e&&(e.content=d),Le?h==null||h.remove():h&&(h.href=Be)}},[l,t]);const z=s.useCallback(e=>{if(!k)return Math.max(45,Math.min(75,e));const n=480/k*100,d=100-360/k*100;return Math.max(n,Math.min(d,e))},[k]);s.useEffect(()=>S(e=>{const n=z(e);return N.current=n,n}),[z]);const L=e=>{const n=z(e);N.current=n,S(n),localStorage.setItem(ae,String(n))},pe=e=>{var d;const n=z(e);N.current=n,O.current&&(O.current.style.width=`${n}%`),W.current&&(W.current.style.width=`${100-n}%`),(d=oe.current)==null||d.setAttribute("aria-valuenow",String(Math.round(n)))},fe=e=>{V.current=e,!j.current&&(j.current=requestAnimationFrame(()=>{var d;j.current=0;const n=(d=I.current)==null?void 0:d.getBoundingClientRect();n!=null&&n.width&&pe((V.current-n.left)/n.width*100)}))},Ee=e=>{M.current=!0,ne(!0),e.currentTarget.setPointerCapture(e.pointerId),fe(e.clientX)},X=()=>{var e;if(M.current){if(j.current){cancelAnimationFrame(j.current),j.current=0;const n=(e=I.current)==null?void 0:e.getBoundingClientRect();n!=null&&n.width&&pe((V.current-n.left)/n.width*100)}M.current=!1,S(N.current),localStorage.setItem(ae,String(N.current)),ne(!1)}},me=e=>{window.clearTimeout(U.current),ie(!0),T(e),sessionStorage.setItem(je(a),e?"1":"0"),U.current=window.setTimeout(()=>ie(!1),ut+40)},he=e=>{D.current=!0,me(e)};s.useEffect(()=>{var e;D.current&&(D.current=!1,(e=u?ce.current:W.current)==null||e.focus())},[u]);const $e=e=>{C(e),sessionStorage.setItem(J(a),e)},Ie=()=>{C(void 0),sessionStorage.removeItem(J(a)),R(void 0),_("")},ge=((Pe=b.data)==null?void 0:Pe.paper_reader_selection_enabled)===!0,be=e=>{R(e),_(`Selection from page ${e.page} added to chat`),f&&u&&me(!1)},We=s.useCallback(e=>{R(e),e||_("")},[]),Z=((we=b.data)==null?void 0:we.paper_reader_citations_enabled)===!0&&!!v,B=F({queryKey:["paper-layout",l],queryFn:()=>tt(l),enabled:Z&&!!l,staleTime:5*6e4}).data,Me=s.useMemo(()=>Z?{layout:B,open:e=>{const n=B?Qe(B,e):[];n.length&&(E(d=>({boxes:n,nonce:((d==null?void 0:d.nonce)??0)+1})),m("paper"))}}:null,[Z,B]),ve=Ke()&&((ye=b.data)==null?void 0:ye.paper_reader_chat_enabled)!==!1,Y=!!(t&&ve&&!(o&&!K)),ze=t&&ve&&!Y?r.jsx("div",{className:"reader-chat-unavailable",role:"status",children:"Chat opens once the paper is ready."}):t&&Y?r.jsx(ct,{mode:"paper",routeSessionId:x,primaryPaper:{id:t.id,routeId:l,title:t.title,arxivId:t.arxiv_id},currentPage:()=>le.current,paperSelection:y,onPaperSelectionChange:We,onSessionId:$e,onReaderSubmit:()=>m("assistant"),onReaderNewChat:Ie,onReaderClose:f?()=>he(!0):void 0}):r.jsx("div",{className:"reader-chat-unavailable",children:"Chat is not enabled for this preview."});return c.isLoading?r.jsx("div",{className:"reader-status",role:"status",children:"Loading paper…"}):c.error||!t?r.jsxs("div",{className:"reader-status",role:"alert",children:[r.jsx("p",{children:"Paper not found."}),r.jsx(G,{to:"/papers",children:"Browse papers"})]}):((Re=b.data)==null?void 0:Re.native_pdf_reader_enabled)===!1?r.jsxs("div",{className:"reader-status",role:"alert",children:[r.jsx("p",{children:"The native reader is currently unavailable."}),r.jsx(G,{to:`/paper/${l}`,children:"Back to paper"})]}):!v&&!o?r.jsxs("div",{className:"reader-status",role:"alert",children:[r.jsx("p",{children:"Native reading is unavailable for this resource."}),r.jsx(G,{to:`/paper/${l}`,children:"Back to paper"})]}):r.jsxs("div",{className:"paper-reader-shell",children:[!f&&r.jsxs("div",{className:"reader-tabs",role:"tablist","aria-label":"Reader panels",children:[r.jsx("button",{type:"button",role:"tab","aria-selected":p==="paper",onClick:()=>m("paper"),children:"Paper"}),r.jsxs("button",{type:"button",role:"tab","aria-selected":p==="assistant","aria-label":y&&p!=="assistant"?"Chat, selection attached":"Chat",onClick:()=>m("assistant"),children:["Chat",y&&p!=="assistant"&&r.jsx("span",{className:"reader-tab-pending","aria-hidden":"true"})]})]}),r.jsx(Xe,{variant:"reader",children:r.jsxs("div",{ref:I,className:`reader-workspace${f?" is-desktop":" is-tabs"}${u?" is-assistant-collapsed":""}${se?" is-resizing":""}`,"data-testid":"paper-chat-workspace",children:[r.jsx("section",{ref:O,className:`reader-paper-pane${!f&&p!=="paper"?" is-hidden":""}`,style:f?{width:u?"100%":`${w}%`}:void 0,role:"tabpanel","aria-label":"Paper","aria-hidden":!f&&p!=="paper",children:o?r.jsx(dt,{paperId:t.id,paperKey:l,paperTitle:t.title,paperHref:`/paper/${l}`,sourceUrl:o,resources:P,paperVersion:t.version,selectionEnabled:ge,onReady:ke,onPaperSelection:be,onPaperSelectionError:_}):v&&r.jsx(Ze,{url:v,downloadUrl:g??v,paperKey:l,paperTitle:t.title,paperHref:`/paper/${l}`,onClose:A,resources:P,initialPage:re,resizeActive:se||Te,selectionEnabled:ge,paperVersion:t.version,authors:q,loadErrorMessage:t.source==="external"?"Paper content is still being prepared. Please try again later.":void 0,onPaperSelection:be,onPaperSelectionError:_,highlight:H,onPageChange:e=>{le.current=e,sessionStorage.setItem(_e(a),String(e))}})}),f&&!u&&r.jsx("div",{ref:oe,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:Ee,onPointerMove:e=>{M.current&&fe(e.clientX)},onPointerUp:X,onPointerCancel:X,onLostPointerCapture:X,onDoubleClick:()=>L(Ce),onKeyDown:e=>{(e.key==="ArrowLeft"||e.key==="ArrowRight")&&(e.preventDefault(),L(w+(e.key==="ArrowRight"?2:-2))),e.key==="Home"&&L(45),e.key==="End"&&L(75)}}),r.jsx("aside",{ref:W,id:"reader-chat-panel",className:`reader-assistant-pane${!f&&p!=="assistant"?" is-hidden":""}${f&&u?" is-collapsed":""}`,style:f?{width:u?0:`${100-w}%`}:void 0,role:"tabpanel","aria-label":"Chat","aria-hidden":!f&&p!=="assistant"||u,tabIndex:-1,children:r.jsx(Ye.Provider,{value:Me,children:ze})}),r.jsx("div",{className:"sr-only","aria-live":"polite",children:Ne}),f&&(u||!Y)&&r.jsx("button",{ref:ce,type:"button",className:"reader-collapse-assistant","aria-controls":"reader-chat-panel","aria-expanded":!u,onClick:()=>he(!u),children:u?"Open chat":"Hide chat"})]})})]})}function ia(){const{paperId:a=""}=Fe(),i=qe(a).replace(/v\d+$/i,"");return r.jsx(Ue,{workspaceKey:`reader:${a}`,children:r.jsx(xt,{routeId:i},i)})}export{ia as default,vt as readerToolbarResources}; diff --git a/assets/PapersListView-AD96mzNE.js b/assets/PapersListView-AD96mzNE.js deleted file mode 100644 index af3a614ed3e3139aa2143c09cf7cf12c04e39933..0000000000000000000000000000000000000000 --- a/assets/PapersListView-AD96mzNE.js +++ /dev/null @@ -1 +0,0 @@ -import{f,p as M,b as K,j as e,L as x,m as V,q as X,T as J}from"./index-CTkdBAwI.js";import{T as W}from"./SotaBadges-CyyWKB0V.js";import{I as H}from"./Icon-DSoTeS9V.js";import{u as Y,a as Z,b as ee,c as se,P as re}from"./PaperFeed-2BMpWfem.js";import{c as ae}from"./catalog-ZV4aeC2F.js";import{p as O}from"./papers-POQWk4vk.js";import{t as te,d as ne}from"./transform-CZL79kIa.js";import{u as Q}from"./usePapers-Cu-zovv8.js";import{u as ie}from"./useDebounce-DwTufs8H.js";import{S as oe}from"./skeleton-p2_v-2W8.js";import{A as le,a as ce}from"./alert-5nuL0v_r.js";import{i as de}from"./apiErrors-DFeecPSH.js";import{f as me}from"./frameworks-DDA0P4Tf.js";import"./colors-BkWRhvFI.js";import"./PaperCard--WllvTq0.js";import"./AuthorAvatar-DjiI2pGP.js";import"./LatexTitle-BmCQe_rK.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-CZErm3i7.js";import"./useIntersectionObserver-BnA8TYxZ.js";import"./curation-BlGrJ3z2.js";import"./useInfiniteQuery-CLH4OKrI.js";const g=360;function pe(r,t){const c=r.toLocaleLowerCase();return t.trim().split(/\s+/).filter(Boolean).reduce((i,l)=>{const o=c.indexOf(l.toLocaleLowerCase());return o>=0&&(i<0||o=0?l+1:t}function he(r,t){if(r.length<=g)return r;const c=pe(r,t);if(c<0||c0?"…":""}${r.slice(i,l).trim()}${l{var L,R,T,D,$,A,I,q,B;const r=Y(),{searchParams:t,setSearchParams:c}=r,i=t.get("framework")||void 0,l=t.get("repository")||void 0,o=!!(i||l),d=t.get("search")||"",[b,F]=f.useState(d),h=ie(b,300),n=!o&&d.trim().length>0;f.useEffect(()=>F(d),[d]),f.useEffect(()=>{if(h===d)return;const a=new URLSearchParams(t);h?a.set("search",h):a.delete("search"),c(a,{replace:!0})},[h]),f.useEffect(()=>{const a=t.get("order_by"),m=new URLSearchParams(t);n&&!["relevance","date_published","citation_count"].includes(a||"")?(m.set("order_by","relevance"),c(m,{replace:!0})):!n&&a==="relevance"&&(m.delete("order_by"),c(m,{replace:!0}))},[n,t,c]);const j=n&&r.orderBy==="trending"?"relevance":r.orderBy,S=!o&&r.hasCode,P={...r.filters,has_code:S,search:o&&h||void 0,conference:t.get("conference")||void 0,latest_only:t.get("latest_only")!=="false",framework:i,repository:l},k=Q([...M.feeds.infinite,P],a=>O.list({...P,page:a,page_size:20}),{enabled:!n}),_={q:h.trim(),order_by:j==="trending"?"relevance":j,start_date:r.dateRange.startDate,end_date:r.dateRange.endDate,has_code:S,has_hf_artifacts:r.hasHfArtifacts},E=Q([...M.feeds.search,_],a=>O.searchFeed({..._,page:a,page_size:20,mode:"hybrid"}),{enabled:n&&_.q.length>0}),p=n?E:k,C=K({queryKey:X.topTasksSidebar,queryFn:()=>ae.topTasks(8),enabled:!o&&!n,staleTime:J}),v=f.useMemo(()=>{var m;return(((m=p.data)==null?void 0:m.pages.flatMap(N=>N.results))||[]).map(N=>{const w=te(N);return n?{...w,abstract:he(w.abstract,d)}:w})},[p.data,n,d]),u=((T=(R=(L=k.data)==null?void 0:L.pages)==null?void 0:R[0])==null?void 0:T.count)??0,s=(A=($=(D=k.data)==null?void 0:D.pages)==null?void 0:$[0])==null?void 0:A.scope,y=(q=(I=E.data)==null?void 0:I.pages)==null?void 0:q.at(-1),G=i&&de(p.error),U=(s==null?void 0:s.kind)==="framework"?s.framework_name:s==null?void 0:s.repository;return e.jsxs("div",{className:"page",children:[(s==null?void 0:s.kind)==="framework"&&e.jsxs("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:[e.jsx(x,{to:"/",children:"Papers"}),e.jsx("span",{className:"sep",children:"/"}),e.jsx(x,{to:"/frameworks",children:"Frameworks"}),e.jsx("span",{className:"sep",children:"/"}),e.jsx("span",{style:{color:"var(--ink)"},children:s.framework_name})]}),e.jsxs("div",{className:"feed-header",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"feed-title",children:o?e.jsxs(e.Fragment,{children:["Papers implemented by ",e.jsx("em",{children:U||i||l})]}):n?e.jsxs(e.Fragment,{children:["Search results for ",e.jsxs("em",{children:["“",d,"”"]})]}):e.jsxs(e.Fragment,{children:["All ",e.jsx("em",{children:"Papers"})]})}),e.jsx("div",{className:"feed-subtitle",children:o?(s==null?void 0:s.kind)==="framework"?u>0&&`${u.toLocaleString()} papers.`:s!=null&&s.repository?e.jsxs(e.Fragment,{children:["GitHub repository ",e.jsx("strong",{children:s.repository}),". ",u>0&&`${u.toLocaleString()} papers.`]}):"Repository-scoped paper feed.":n?`${v.length} loaded from the most relevant results.`:e.jsxs(e.Fragment,{children:["Search the full corpus. ",u>0&&`${u.toLocaleString()} papers indexed.`]})}),o&&s&&e.jsxs("div",{className:"paper-feed-scope-links",children:[e.jsxs("div",{className:"paper-feed-primary-links",children:[s.github_url&&e.jsxs("a",{href:s.github_url,target:"_blank",rel:"noopener noreferrer",className:s.kind==="framework"?"task-framework-link":"framework-link",children:[e.jsx(H,{name:"github",size:13}),s.kind==="framework"?e.jsxs(e.Fragment,{children:[e.jsx("span",{children:s.repository||"GitHub"}),s.num_stars!=null&&e.jsxs("span",{className:"task-framework-link-stars",children:["★ ",me(s.num_stars)]})]}):"GitHub"]}),s.kind==="framework"&&s.introducing_paper_arxiv_id&&e.jsx(x,{to:`/paper/${s.introducing_paper_arxiv_id}`,className:"framework-link",children:"Introducing paper"})]}),s.kind==="framework"&&s.recommended_tasks&&s.recommended_tasks.length>0&&e.jsx("div",{className:"paper-feed-task-tags",children:s.recommended_tasks.map(a=>a.slug?e.jsx(W,{slug:a.slug,label:a.name},a.id):null)})]})]}),e.jsx(Z,{startDate:r.dateRange.startDate,endDate:r.dateRange.endDate,onChange:r.setDateRange})]}),e.jsx("div",{className:"papers-search-row",children:e.jsxs("div",{className:"papers-search-input-wrap",children:[e.jsx(H,{name:"search",size:14}),e.jsx("input",{className:"papers-search-input",placeholder:"Search title or abstract…",value:b,onChange:a=>F(a.target.value)})]})}),e.jsxs("div",{className:o||n?"papers-feed-layout-scoped":"layout-with-sidebar",children:[!o&&!n&&e.jsx("aside",{className:"sidebar",children:e.jsxs("div",{className:"sidebar-section",children:[e.jsx("div",{className:"sidebar-label",children:"Top Domains"}),C.isLoading&&e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:Array.from({length:6}).map((a,m)=>e.jsx(oe,{className:"h-5 w-full"},m))}),e.jsx("div",{className:"sidebar-links",children:(B=C.data)==null?void 0:B.map(a=>e.jsxs(x,{to:`/tasks/${a.slug}`,className:"sidebar-link",children:[ne(a.name,a.slug),a.paper_count!=null&&e.jsx("span",{className:"count",children:a.paper_count})]},a.id))})]})}),e.jsxs("div",{children:[e.jsx(ee,{feed:r,sorts:n?ue:se,activeSort:j,showDateFilter:!1,showHasCode:!o,children:e.jsxs("div",{className:"results-count",children:[v.length," loaded"]})}),G?e.jsx("div",{className:"no-results",children:"Framework not found."}):e.jsxs(e.Fragment,{children:[p.error&&e.jsx(le,{variant:"destructive",className:"mb-4",children:e.jsx(ce,{children:"Failed to load papers. Please try again."})}),e.jsx(re,{query:p,cards:v,skeleton:"card",highlightQuery:n?d:void 0,empty:e.jsxs(e.Fragment,{children:[e.jsx("p",{children:"No matching papers."}),n&&V()&&e.jsx(x,{to:`/chat?q=${encodeURIComponent(d.trim())}`,children:"Ask the assistant instead"})]}),children:!p.hasNextPage&&!p.isFetchingNextPage&&n&&e.jsx("div",{className:"search-results-end",children:y!=null&&y.cap_reached?"End of the top 100 results":"End of results"})})]})]})]})]})};export{Ie as default}; diff --git a/assets/PapersListView-tKeAfHNj.js b/assets/PapersListView-tKeAfHNj.js new file mode 100644 index 0000000000000000000000000000000000000000..215c5b54ac01065cbaaa3c679f70f1347434837d --- /dev/null +++ b/assets/PapersListView-tKeAfHNj.js @@ -0,0 +1 @@ +import{e as K,f as u,p as M,b as V,j as e,L as f,m as X,q as J,T as W}from"./index-D2fBL-s6.js";import{T as Y}from"./SotaBadges-r6iGzLRW.js";import{I as H}from"./Icon-Uhh78KjL.js";import{u as Z,a as ee,b as se,c as re,P as ae}from"./PaperFeed-BERxHjrg.js";import{c as te}from"./catalog-5AxvKr4D.js";import{p as O}from"./papers-khuZaSFb.js";import{t as ne,d as ie}from"./transform-B_GaHMvk.js";import{u as Q}from"./usePapers-CAjdcUuj.js";import{u as oe}from"./useDebounce-BLmmIPYP.js";import{S as le}from"./skeleton-BDwfco0_.js";import{A as de,a as ce}from"./alert-PnePcfgX.js";import{i as me}from"./apiErrors-DV2aaDjL.js";import{f as pe}from"./frameworks-DDA0P4Tf.js";import"./colors-BkWRhvFI.js";import"./PaperCard-DhorusY5.js";import"./AuthorAvatar-C8tz_syh.js";import"./LatexTitle-WIQJ1ke0.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-DS5Jzsg5.js";import"./useIntersectionObserver-C0Rq0EXm.js";import"./curation-BtfabyzA.js";import"./useInfiniteQuery-CjJA-90e.js";const x=360;function he(a,o){const d=a.toLocaleLowerCase();return o.trim().split(/\s+/).filter(Boolean).reduce((n,i)=>{const t=d.indexOf(i.toLocaleLowerCase());return t>=0&&(n<0||t=0?i+1:o}function ue(a,o){if(a.length<=x)return a;const d=he(a,o);if(d<0||d0?"…":""}${a.slice(n,i).trim()}${i{var L,T,C,D,$,A,I,q,B;const[a]=K(),o=a.get("framework")||void 0,d=a.get("repository")||void 0,n=!!(o||d),i=a.get("search")||"",t=!n&&i.trim().length>0,l=Z({defaultToLastMonth:!t}),{setSearchParams:g}=l,[b,F]=u.useState(i),p=oe(b,300);u.useEffect(()=>F(i),[i]),u.useEffect(()=>{if(p===i)return;const r=new URLSearchParams(a);p?r.set("search",p):r.delete("search"),g(r,{replace:!0})},[p]),u.useEffect(()=>{const r=a.get("order_by"),c=new URLSearchParams(a);t&&!["relevance","date_published","citation_count"].includes(r||"")?(c.set("order_by","relevance"),g(c,{replace:!0})):!t&&r==="relevance"&&(c.delete("order_by"),g(c,{replace:!0}))},[t,a,g]);const j=t&&l.orderBy==="trending"?"relevance":l.orderBy,S=!n&&l.hasCode,P={...l.filters,has_code:S,search:n&&p||void 0,conference:a.get("conference")||void 0,latest_only:a.get("latest_only")!=="false",framework:o,repository:d},k=Q([...M.feeds.infinite,P],r=>O.list({...P,page:r,page_size:20}),{enabled:!t}),_={q:p.trim(),order_by:j==="trending"?"relevance":j,start_date:l.dateRange.startDate,end_date:l.dateRange.endDate,has_code:S,has_hf_artifacts:l.hasHfArtifacts},E=Q([...M.feeds.search,_],r=>O.searchFeed({..._,page:r,page_size:20,mode:"hybrid"}),{enabled:t&&_.q.length>0}),m=t?E:k,R=V({queryKey:J.topTasksSidebar,queryFn:()=>te.topTasks(8),enabled:!n&&!t,staleTime:W}),v=u.useMemo(()=>{var c;return(((c=m.data)==null?void 0:c.pages.flatMap(N=>N.results))||[]).map(N=>{const w=ne(N);return t?{...w,abstract:ue(w.abstract,i)}:w})},[m.data,t,i]),h=((C=(T=(L=k.data)==null?void 0:L.pages)==null?void 0:T[0])==null?void 0:C.count)??0,s=(A=($=(D=k.data)==null?void 0:D.pages)==null?void 0:$[0])==null?void 0:A.scope,y=(q=(I=E.data)==null?void 0:I.pages)==null?void 0:q.at(-1),G=o&&me(m.error),U=(s==null?void 0:s.kind)==="framework"?s.framework_name:s==null?void 0:s.repository;return e.jsxs("div",{className:"page",children:[(s==null?void 0:s.kind)==="framework"&&e.jsxs("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:[e.jsx(f,{to:"/",children:"Papers"}),e.jsx("span",{className:"sep",children:"/"}),e.jsx(f,{to:"/frameworks",children:"Frameworks"}),e.jsx("span",{className:"sep",children:"/"}),e.jsx("span",{style:{color:"var(--ink)"},children:s.framework_name})]}),e.jsxs("div",{className:"feed-header",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"feed-title",children:n?e.jsxs(e.Fragment,{children:["Papers implemented by ",e.jsx("em",{children:U||o||d})]}):t?e.jsxs(e.Fragment,{children:["Search results for ",e.jsxs("em",{children:["“",i,"”"]})]}):e.jsxs(e.Fragment,{children:["All ",e.jsx("em",{children:"Papers"})]})}),e.jsx("div",{className:"feed-subtitle",children:n?(s==null?void 0:s.kind)==="framework"?h>0&&`${h.toLocaleString()} papers.`:s!=null&&s.repository?e.jsxs(e.Fragment,{children:["GitHub repository ",e.jsx("strong",{children:s.repository}),". ",h>0&&`${h.toLocaleString()} papers.`]}):"Repository-scoped paper feed.":t?`${v.length} loaded from the most relevant results.`:e.jsxs(e.Fragment,{children:["Search the full corpus. ",h>0&&`${h.toLocaleString()} ${l.dateRange.startDate||l.dateRange.endDate?"papers in this date range":"papers indexed"}.`]})}),n&&s&&e.jsxs("div",{className:"paper-feed-scope-links",children:[e.jsxs("div",{className:"paper-feed-primary-links",children:[s.github_url&&e.jsxs("a",{href:s.github_url,target:"_blank",rel:"noopener noreferrer",className:s.kind==="framework"?"task-framework-link":"framework-link",children:[e.jsx(H,{name:"github",size:13}),s.kind==="framework"?e.jsxs(e.Fragment,{children:[e.jsx("span",{children:s.repository||"GitHub"}),s.num_stars!=null&&e.jsxs("span",{className:"task-framework-link-stars",children:["★ ",pe(s.num_stars)]})]}):"GitHub"]}),s.kind==="framework"&&s.introducing_paper_arxiv_id&&e.jsx(f,{to:`/paper/${s.introducing_paper_arxiv_id}`,className:"framework-link",children:"Introducing paper"})]}),s.kind==="framework"&&s.recommended_tasks&&s.recommended_tasks.length>0&&e.jsx("div",{className:"paper-feed-task-tags",children:s.recommended_tasks.map(r=>r.slug?e.jsx(Y,{slug:r.slug,label:r.name},r.id):null)})]})]}),e.jsx(ee,{startDate:l.dateRange.startDate,endDate:l.dateRange.endDate,onChange:l.setDateRange})]}),e.jsx("div",{className:"papers-search-row",children:e.jsxs("div",{className:"papers-search-input-wrap",children:[e.jsx(H,{name:"search",size:14}),e.jsx("input",{className:"papers-search-input",placeholder:"Search title or abstract…",value:b,onChange:r=>F(r.target.value)})]})}),e.jsxs("div",{className:n||t?"papers-feed-layout-scoped":"layout-with-sidebar",children:[!n&&!t&&e.jsx("aside",{className:"sidebar",children:e.jsxs("div",{className:"sidebar-section",children:[e.jsx("div",{className:"sidebar-label",children:"Top Domains"}),R.isLoading&&e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:Array.from({length:6}).map((r,c)=>e.jsx(le,{className:"h-5 w-full"},c))}),e.jsx("div",{className:"sidebar-links",children:(B=R.data)==null?void 0:B.map(r=>e.jsxs(f,{to:`/tasks/${r.slug}`,className:"sidebar-link",children:[ie(r.name,r.slug),r.paper_count!=null&&e.jsx("span",{className:"count",children:r.paper_count})]},r.id))})]})}),e.jsxs("div",{children:[e.jsx(se,{feed:l,sorts:t?fe:re,activeSort:j,showDateFilter:!1,showHasCode:!n,children:e.jsxs("div",{className:"results-count",children:[v.length," loaded"]})}),G?e.jsx("div",{className:"no-results",children:"Framework not found."}):e.jsxs(e.Fragment,{children:[m.error&&e.jsx(de,{variant:"destructive",className:"mb-4",children:e.jsx(ce,{children:"Failed to load papers. Please try again."})}),e.jsx(ae,{query:m,cards:v,skeleton:"card",highlightQuery:t?i:void 0,empty:e.jsxs(e.Fragment,{children:[e.jsx("p",{children:"No matching papers."}),t&&X()&&e.jsx(f,{to:`/chat?q=${encodeURIComponent(i.trim())}`,children:"Ask the assistant instead"})]}),children:!m.hasNextPage&&!m.isFetchingNextPage&&t&&e.jsx("div",{className:"search-results-end",children:y!=null&&y.cap_reached?"End of the top 100 results":"End of results"})})]})]})]})]})};export{qe as default}; diff --git a/assets/PrivacyView-GmtVPJE1.js b/assets/PrivacyView-D9qn84RB.js similarity index 98% rename from assets/PrivacyView-GmtVPJE1.js rename to assets/PrivacyView-D9qn84RB.js index 016cac8b4350b21a5391acf61725ac75605843b8..71b7dcff868c4efdf7b9daaff98c093dd69607aa 100644 --- a/assets/PrivacyView-GmtVPJE1.js +++ b/assets/PrivacyView-D9qn84RB.js @@ -1 +1 @@ -import{j as e}from"./index-CTkdBAwI.js";import{u as s,f as i}from"./useDocumentTitle-WlHj7EYH.js";const t=()=>(s(i("Privacy Policy")),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{t as default}; +import{j as e}from"./index-D2fBL-s6.js";import{u as s,f as i}from"./useDocumentTitle-ibepJVy2.js";const t=()=>(s(i("Privacy Policy")),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{t as default}; diff --git a/assets/RateLimitsView-CgmyXrGR.js b/assets/RateLimitsView-BdVhhRn6.js similarity index 87% rename from assets/RateLimitsView-CgmyXrGR.js rename to assets/RateLimitsView-BdVhhRn6.js index 61fb47e8a2d60d39653bf4515a19d553ec91a5b4..a0d2c49a0f62f5588ff2bca02f52d4a5ecc96e86 100644 --- a/assets/RateLimitsView-CgmyXrGR.js +++ b/assets/RateLimitsView-BdVhhRn6.js @@ -1 +1 @@ -import{b as t,j as e}from"./index-CTkdBAwI.js";import{a as s}from"./account-Ck5qYpM8.js";const n=()=>{const i=t({queryKey:["submission-rate-limit-policy"],queryFn:()=>s.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{b as t,j as e}from"./index-D2fBL-s6.js";import{a as s}from"./account-BHlQBDNT.js";const n=()=>{const i=t({queryKey:["submission-rate-limit-policy"],queryFn:()=>s.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-gAamAHri.js b/assets/ResearchFollowButton-Bwb5EiPm.js similarity index 93% rename from assets/ResearchFollowButton-gAamAHri.js rename to assets/ResearchFollowButton-Bwb5EiPm.js index 71dfe542e34d5db2519bd831552a0a99bee7460c..7d11f81411d2f5a2aa58860772f0328a3487ded0 100644 --- a/assets/ResearchFollowButton-gAamAHri.js +++ b/assets/ResearchFollowButton-Bwb5EiPm.js @@ -1 +1 @@ -import{d as x,g as j,f as b,i as F,j as e,h as N,C as S,L as i}from"./index-CTkdBAwI.js";import{e as y,q as C}from"./researchTopic-B8hMcjil.js";import{P as w}from"./plus-Dhoq_Vs9.js";const f={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 k({kind:o,entityId:n}){var u;const l=x(),c=l==null?void 0:l.user,h=j(),[m,p]=b.useState(null),d=`${o}:${n}`,a=y(),s=((u=a.data)==null?void 0:u.some(r=>r.kind===o&&String(r.entity_id)===String(n)))??!1,t=C({onChanged:({follow:r})=>p(r?d:null),awaitRefresh:!0});if(!l||!c&&F())return null;if(!c)return e.jsxs("div",{className:"research-follow",children:[e.jsxs("a",{className:"research-follow-btn",href:N(h.pathname+h.search),children:[e.jsx(w,{"aria-hidden":"true"}),"Follow"]}),e.jsxs("span",{className:"research-follow-hint",children:["Sign in to ",f[o].toLowerCase(),"."]})]});const g=t.error||a.error;return e.jsxs("div",{className:"research-follow",children:[e.jsx("button",{type:"button",className:s?"research-follow-btn is-following":"research-follow-btn",disabled:a.isLoading||!!a.error||t.isPending,"aria-pressed":s,"aria-label":s?"Unfollow":"Follow",onClick:()=>t.mutate({kind:o,entityId:n,follow:!s}),children:s?e.jsxs(e.Fragment,{children:[e.jsx(S,{"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(w,{"aria-hidden":"true"}),"Follow"]})}),g?e.jsx("span",{className:"research-follow-hint is-error",role:"alert",children:"Could not update follows. Please try again."}):s?m===d&&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:[f[o]," in ",e.jsx(i,{to:"/following",children:"your Following feed"}),"."]})]})}export{k as R}; +import{d as x,g as j,f as b,i as F,j as e,h as N,C as S,L as i}from"./index-D2fBL-s6.js";import{e as y,q as C}from"./researchTopic-jOpECA0z.js";import{P as w}from"./plus-BI8-JXK0.js";const f={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 k({kind:o,entityId:n}){var u;const l=x(),c=l==null?void 0:l.user,h=j(),[m,p]=b.useState(null),d=`${o}:${n}`,a=y(),s=((u=a.data)==null?void 0:u.some(r=>r.kind===o&&String(r.entity_id)===String(n)))??!1,t=C({onChanged:({follow:r})=>p(r?d:null),awaitRefresh:!0});if(!l||!c&&F())return null;if(!c)return e.jsxs("div",{className:"research-follow",children:[e.jsxs("a",{className:"research-follow-btn",href:N(h.pathname+h.search),children:[e.jsx(w,{"aria-hidden":"true"}),"Follow"]}),e.jsxs("span",{className:"research-follow-hint",children:["Sign in to ",f[o].toLowerCase(),"."]})]});const g=t.error||a.error;return e.jsxs("div",{className:"research-follow",children:[e.jsx("button",{type:"button",className:s?"research-follow-btn is-following":"research-follow-btn",disabled:a.isLoading||!!a.error||t.isPending,"aria-pressed":s,"aria-label":s?"Unfollow":"Follow",onClick:()=>t.mutate({kind:o,entityId:n,follow:!s}),children:s?e.jsxs(e.Fragment,{children:[e.jsx(S,{"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(w,{"aria-hidden":"true"}),"Follow"]})}),g?e.jsx("span",{className:"research-follow-hint is-error",role:"alert",children:"Could not update follows. Please try again."}):s?m===d&&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:[f[o]," in ",e.jsx(i,{to:"/following",children:"your Following feed"}),"."]})]})}export{k as R}; diff --git a/assets/SavedPapersView-K9SaqBUw.js b/assets/SavedPapersView-CWCS7z3x.js similarity index 89% rename from assets/SavedPapersView-K9SaqBUw.js rename to assets/SavedPapersView-CWCS7z3x.js index 57c882ef7539949435af96fd218949113b69e770..dbec809e17ca7eb3f485cbea55d6ba008d600b7a 100644 --- a/assets/SavedPapersView-K9SaqBUw.js +++ b/assets/SavedPapersView-CWCS7z3x.js @@ -1 +1 @@ -import{a as g,b as v,A as x,j as e,H as j,L as b,p as N}from"./index-CTkdBAwI.js";import{P as f}from"./PaperCard--WllvTq0.js";import{T as k}from"./SotaBadges-CyyWKB0V.js";import{S as r}from"./skeleton-p2_v-2W8.js";import{A as y,a as w}from"./alert-5nuL0v_r.js";import{a as A}from"./account-Ck5qYpM8.js";import{t as B}from"./transform-CZL79kIa.js";import{s as F}from"./savedPapersAuth-DIA9S41B.js";import"./AuthorAvatar-DjiI2pGP.js";import"./Icon-DSoTeS9V.js";import"./LatexTitle-BmCQe_rK.js";import"./papers-POQWk4vk.js";import"./curation-BlGrJ3z2.js";import"./safeExternalHref-CkBrsh84.js";import"./colors-BkWRhvFI.js";const U=()=>{var d,l;const{user:i,isLoading:m}=g(),a=v({queryKey:[...N.feeds.saved],queryFn:()=>A.getBookmarks(),enabled:!!i,staleTime:30*1e3}),c=a.error instanceof x&&a.error.code==="saved_papers_bucket_authorization_required",o=!!a.data&&!a.data.bucket_connected,n=()=>{window.location.assign(F())};if(m)return 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"})]});if(!i)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:["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(j,{returnTo:"/saved"})})]});let h=0;return e.jsxs("div",{className:"page",children:[e.jsx("div",{className:"feed-header",children:e.jsxs("div",{children:[e.jsxs("h1",{className:"feed-title",children:["Saved ",e.jsx("em",{children:"Papers"})]}),e.jsxs("div",{className:"feed-subtitle",children:[(d=a.data)!=null&&d.count?`${a.data.count.toLocaleString()} saved · grouped by domain`:"Your bookmarked papers, grouped by domain.",(l=a.data)!=null&&l.bucket_connected?e.jsxs(e.Fragment,{children:[" · ",e.jsx("a",{href:`https://huggingface.co/buckets/${i.username}/pwc-saved-papers`,target:"_blank",rel:"noopener noreferrer",children:"Open your Hugging Face Bucket"})]}):null]})]})}),c?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:n,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,o&&a.data.bucket_migrated?e.jsxs("div",{className:"saved-bucket-migration",children:[e.jsx("p",{children:"Your saved papers are already in your private Hugging Face Bucket. Reconnect it in this browser to read from it and save new papers there."}),e.jsx("button",{type:"button",className:"hf-signin-btn",onClick:n,children:"Reconnect Hugging Face Bucket"})]}):o?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:n,children:a.data.count?"Approve and migrate saved papers":"Use a Hugging Face Bucket"})]}):null,c||a.error?null:a.isLoading?e.jsx("div",{className:"paper-list",children:Array.from({length:4}).map((t,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(b,{to:"/papers",className:"sidebar-link",style:{display:"inline"},children:"Browse papers →"})]}):a.data.areas.map(t=>e.jsxs("section",{className:"saved-area-section",children:[e.jsx("h2",{className:"saved-area-heading",children:t.name}),t.tasks.map(s=>{const p=s.papers.length;return e.jsxs("div",{className:"saved-task-block",children:[e.jsxs("div",{className:"saved-task-row",children:[s.slug?e.jsx(k,{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:[p," ",p===1?"paper":"papers"]})]}),e.jsx("div",{className:"paper-list",children:s.papers.map(u=>e.jsx(f,{paper:B(u),priority:h++<3},u.id))})]},`task-${t.id??"other"}-${s.id??"untagged"}`)})]},`area-${t.id??"other"}`))]})};export{U as default}; +import{a as g,b as v,A as x,j as e,H as j,L as b,p as N}from"./index-D2fBL-s6.js";import{P as f}from"./PaperCard-DhorusY5.js";import{T as k}from"./SotaBadges-r6iGzLRW.js";import{S as r}from"./skeleton-BDwfco0_.js";import{A as y,a as w}from"./alert-PnePcfgX.js";import{a as A}from"./account-BHlQBDNT.js";import{t as B}from"./transform-B_GaHMvk.js";import{s as F}from"./savedPapersAuth-0s9GFyfF.js";import"./AuthorAvatar-C8tz_syh.js";import"./Icon-Uhh78KjL.js";import"./LatexTitle-WIQJ1ke0.js";import"./papers-khuZaSFb.js";import"./curation-BtfabyzA.js";import"./safeExternalHref-CkBrsh84.js";import"./colors-BkWRhvFI.js";const U=()=>{var d,l;const{user:i,isLoading:m}=g(),a=v({queryKey:[...N.feeds.saved],queryFn:()=>A.getBookmarks(),enabled:!!i,staleTime:30*1e3}),c=a.error instanceof x&&a.error.code==="saved_papers_bucket_authorization_required",o=!!a.data&&!a.data.bucket_connected,n=()=>{window.location.assign(F())};if(m)return 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"})]});if(!i)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:["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(j,{returnTo:"/saved"})})]});let h=0;return e.jsxs("div",{className:"page",children:[e.jsx("div",{className:"feed-header",children:e.jsxs("div",{children:[e.jsxs("h1",{className:"feed-title",children:["Saved ",e.jsx("em",{children:"Papers"})]}),e.jsxs("div",{className:"feed-subtitle",children:[(d=a.data)!=null&&d.count?`${a.data.count.toLocaleString()} saved · grouped by domain`:"Your bookmarked papers, grouped by domain.",(l=a.data)!=null&&l.bucket_connected?e.jsxs(e.Fragment,{children:[" · ",e.jsx("a",{href:`https://huggingface.co/buckets/${i.username}/pwc-saved-papers`,target:"_blank",rel:"noopener noreferrer",children:"Open your Hugging Face Bucket"})]}):null]})]})}),c?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:n,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,o&&a.data.bucket_migrated?e.jsxs("div",{className:"saved-bucket-migration",children:[e.jsx("p",{children:"Your saved papers are already in your private Hugging Face Bucket. Reconnect it in this browser to read from it and save new papers there."}),e.jsx("button",{type:"button",className:"hf-signin-btn",onClick:n,children:"Reconnect Hugging Face Bucket"})]}):o?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:n,children:a.data.count?"Approve and migrate saved papers":"Use a Hugging Face Bucket"})]}):null,c||a.error?null:a.isLoading?e.jsx("div",{className:"paper-list",children:Array.from({length:4}).map((t,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(b,{to:"/papers",className:"sidebar-link",style:{display:"inline"},children:"Browse papers →"})]}):a.data.areas.map(t=>e.jsxs("section",{className:"saved-area-section",children:[e.jsx("h2",{className:"saved-area-heading",children:t.name}),t.tasks.map(s=>{const p=s.papers.length;return e.jsxs("div",{className:"saved-task-block",children:[e.jsxs("div",{className:"saved-task-row",children:[s.slug?e.jsx(k,{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:[p," ",p===1?"paper":"papers"]})]}),e.jsx("div",{className:"paper-list",children:s.papers.map(u=>e.jsx(f,{paper:B(u),priority:h++<3},u.id))})]},`task-${t.id??"other"}-${s.id??"untagged"}`)})]},`area-${t.id??"other"}`))]})};export{U as default}; diff --git a/assets/SearchOverlay-COqBAgLs.js b/assets/SearchOverlay-BWsLpwx1.js similarity index 95% rename from assets/SearchOverlay-COqBAgLs.js rename to assets/SearchOverlay-BWsLpwx1.js index 153d05483bd825cfea16431c6adf779a2f37d96d..bfaaa9cca3caf7ecab89ac4015836ee4f4d7f56b 100644 --- a/assets/SearchOverlay-COqBAgLs.js +++ b/assets/SearchOverlay-BWsLpwx1.js @@ -1 +1 @@ -import{f as K,k as O,V as M,m as B,b as i,j as e,p as H}from"./index-CTkdBAwI.js";import{L as U}from"./LatexTitle-BmCQe_rK.js";import{c as x}from"./catalog-ZV4aeC2F.js";import{p as R}from"./papers-POQWk4vk.js";import{u as Y}from"./useDebounce-DwTufs8H.js";import{c as G,h as V}from"./colors-BkWRhvFI.js";import{d as X}from"./transform-CZL79kIa.js";import"./curation-BlGrJ3z2.js";const Z=10,S=6,W=350,f=3,ls=({open:t,onClose:h})=>{var A,C,w,P,Q,z;const v=K.useRef(null),$=O(),[c,D]=M.useState(""),a=Y(c,W),j=c.trim(),r=a.trim().length>=f,y=B();K.useEffect(()=>{var l;if(!t)return;(l=v.current)==null||l.focus();const s=N=>{N.key==="Escape"&&(N.preventDefault(),N.stopPropagation(),h())};return window.addEventListener("keydown",s,!0),()=>window.removeEventListener("keydown",s,!0)},[t,h]);const k=i({queryKey:[...H.feeds.searchOverlay,a],queryFn:()=>R.search(a,1,Z),enabled:t&&r,staleTime:6e4,retry:!1}),_=i({queryKey:["search-tasks",a],queryFn:()=>x.listTasks({q:a,page_size:6}),enabled:t&&r,staleTime:6e4,retry:!1}),b=i({queryKey:["search-methods",a],queryFn:()=>x.listMethods({q:a,page_size:6}),enabled:t&&r,staleTime:6e4,retry:!1}),E=i({queryKey:["search-benchmarks",a],queryFn:()=>x.listDatasets({q:a,page_size:6}),enabled:t&&r,staleTime:6e4,retry:!1}),F=i({queryKey:["search-authors",a],queryFn:()=>R.searchAuthors(a,S),enabled:t&&r,staleTime:6e4,retry:!1}),q=i({queryKey:["search-organizations",a],queryFn:()=>x.searchOrganizations(a,S),enabled:t&&r,staleTime:6e4,retry:!1});if(!t)return null;const o=((A=_.data)==null?void 0:A.results)||[],d=((C=b.data)==null?void 0:C.results)||[],m=((w=E.data)==null?void 0:w.results)||[],u=((P=F.data)==null?void 0:P.results)||[],p=((Q=q.data)==null?void 0:Q.results)||[],g=((z=k.data)==null?void 0:z.results)||[],I=k.isFetching||_.isFetching||b.isFetching||E.isFetching||F.isFetching||q.isFetching,L=o.length||g.length||d.length||m.length||u.length||p.length,n=s=>{h(),$(s)},T=()=>{const s=c.trim();s&&n(`/chat?q=${encodeURIComponent(s)}`)};return e.jsx("div",{className:"search-overlay",onClick:h,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, benchmarks, authors, or organizations…",value:c,onChange:s=>D(s.target.value),onKeyDown:s=>{y&&s.key==="Enter"&&(s.preventDefault(),T())}}),e.jsxs("div",{className:"search-results",children:[y&&c.trim()&&e.jsxs("button",{type:"button",className:"search-ask-row",onClick:T,children:[e.jsx("span",{className:"search-ask-chip",children:"assistant"}),e.jsxs("span",{className:"search-ask-text",children:["Ask: “",c.trim(),"”"]}),e.jsx("kbd",{children:"↵"})]}),!a&&e.jsxs("div",{className:"search-empty",children:["Try “diffusion”, “object detection”, or an arXiv id.",y&&e.jsx("span",{className:"search-empty-sub",children:"Press Enter to ask the assistant"})]}),a&&!r&&e.jsxs("div",{className:"search-empty",children:["Keep typing: results appear from ",f," characters."]}),r&&!I&&!L&&e.jsxs("div",{className:"search-empty",children:['No matches for "',c,'"']}),o.length>0&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"search-section-label",children:["Tasks · ",o.length]}),o.map(s=>{const l=G(V(s.slug||""));return e.jsxs("div",{className:"search-result-tag",onClick:()=>n(`/tasks/${s.slug}`),children:[e.jsx("span",{className:"dot",style:{width:6,height:6,borderRadius:"50%",background:l.dot}}),e.jsx("span",{className:"name",children:X(s.name,s.slug)}),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:["Methods · ",d.length]}),d.map(s=>e.jsxs("div",{className:"search-result-tag",onClick:()=>n(`/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))]}),m.length>0&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"search-section-label",children:["Benchmarks · ",m.length]}),m.map(s=>e.jsxs("div",{className:"search-result-tag",onClick:()=>n(`/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))]}),u.length>0&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"search-section-label",children:["Authors · ",u.length]}),u.map(s=>e.jsxs("div",{className:"search-result-tag",onClick:()=>n(`/authors/${s.id}`),children:[e.jsx("span",{className:"name",children:s.full_name}),s.hf_username&&e.jsxs("span",{className:"handle",children:["@",s.hf_username]}),s.paper_count>0&&e.jsxs("span",{className:"count",children:[s.paper_count," papers"]})]},s.id))]}),p.length>0&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"search-section-label",children:["Organizations · ",p.length]}),p.map(s=>e.jsxs("div",{className:"search-result-tag",onClick:()=>n(`/orgs/${s.slug}`),children:[s.logo_url&&e.jsx("img",{className:"logo",src:s.logo_url,alt:"",loading:"lazy"}),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," papers"]})]},s.id))]}),g.length>0&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"search-section-label",children:["Papers · ",g.length]}),g.map(s=>{var l;return e.jsxs("div",{className:"search-result",onClick:()=>n(`/paper/${s.arxiv_id||s.id}`),children:[e.jsx("div",{className:"search-result-title",children:e.jsx(U,{title:s.title})}),e.jsxs("div",{className:"search-result-meta",children:[e.jsx("span",{children:s.arxiv_id?`arXiv:${s.arxiv_id}`:"External resource"}),((l=s.authors)==null?void 0:l[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)})]}),j.length>=f&&e.jsxs("button",{type:"button",className:"search-view-all-row",onClick:()=>n(`/papers?search=${encodeURIComponent(j)}`),children:["View all paper results for “",j,"”"]})]})]})})};export{ls as default}; +import{f as K,k as O,V as M,m as B,b as i,j as e,p as H}from"./index-D2fBL-s6.js";import{L as U}from"./LatexTitle-WIQJ1ke0.js";import{c as x}from"./catalog-5AxvKr4D.js";import{p as R}from"./papers-khuZaSFb.js";import{u as Y}from"./useDebounce-BLmmIPYP.js";import{c as G,h as V}from"./colors-BkWRhvFI.js";import{d as X}from"./transform-B_GaHMvk.js";import"./curation-BtfabyzA.js";const Z=10,S=6,W=350,f=3,ls=({open:t,onClose:h})=>{var A,C,w,P,Q,z;const v=K.useRef(null),$=O(),[c,D]=M.useState(""),a=Y(c,W),j=c.trim(),r=a.trim().length>=f,y=B();K.useEffect(()=>{var l;if(!t)return;(l=v.current)==null||l.focus();const s=N=>{N.key==="Escape"&&(N.preventDefault(),N.stopPropagation(),h())};return window.addEventListener("keydown",s,!0),()=>window.removeEventListener("keydown",s,!0)},[t,h]);const k=i({queryKey:[...H.feeds.searchOverlay,a],queryFn:()=>R.search(a,1,Z),enabled:t&&r,staleTime:6e4,retry:!1}),_=i({queryKey:["search-tasks",a],queryFn:()=>x.listTasks({q:a,page_size:6}),enabled:t&&r,staleTime:6e4,retry:!1}),b=i({queryKey:["search-methods",a],queryFn:()=>x.listMethods({q:a,page_size:6}),enabled:t&&r,staleTime:6e4,retry:!1}),E=i({queryKey:["search-benchmarks",a],queryFn:()=>x.listDatasets({q:a,page_size:6}),enabled:t&&r,staleTime:6e4,retry:!1}),F=i({queryKey:["search-authors",a],queryFn:()=>R.searchAuthors(a,S),enabled:t&&r,staleTime:6e4,retry:!1}),q=i({queryKey:["search-organizations",a],queryFn:()=>x.searchOrganizations(a,S),enabled:t&&r,staleTime:6e4,retry:!1});if(!t)return null;const o=((A=_.data)==null?void 0:A.results)||[],d=((C=b.data)==null?void 0:C.results)||[],m=((w=E.data)==null?void 0:w.results)||[],u=((P=F.data)==null?void 0:P.results)||[],p=((Q=q.data)==null?void 0:Q.results)||[],g=((z=k.data)==null?void 0:z.results)||[],I=k.isFetching||_.isFetching||b.isFetching||E.isFetching||F.isFetching||q.isFetching,L=o.length||g.length||d.length||m.length||u.length||p.length,n=s=>{h(),$(s)},T=()=>{const s=c.trim();s&&n(`/chat?q=${encodeURIComponent(s)}`)};return e.jsx("div",{className:"search-overlay",onClick:h,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, benchmarks, authors, or organizations…",value:c,onChange:s=>D(s.target.value),onKeyDown:s=>{y&&s.key==="Enter"&&(s.preventDefault(),T())}}),e.jsxs("div",{className:"search-results",children:[y&&c.trim()&&e.jsxs("button",{type:"button",className:"search-ask-row",onClick:T,children:[e.jsx("span",{className:"search-ask-chip",children:"assistant"}),e.jsxs("span",{className:"search-ask-text",children:["Ask: “",c.trim(),"”"]}),e.jsx("kbd",{children:"↵"})]}),!a&&e.jsxs("div",{className:"search-empty",children:["Try “diffusion”, “object detection”, or an arXiv id.",y&&e.jsx("span",{className:"search-empty-sub",children:"Press Enter to ask the assistant"})]}),a&&!r&&e.jsxs("div",{className:"search-empty",children:["Keep typing: results appear from ",f," characters."]}),r&&!I&&!L&&e.jsxs("div",{className:"search-empty",children:['No matches for "',c,'"']}),o.length>0&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"search-section-label",children:["Tasks · ",o.length]}),o.map(s=>{const l=G(V(s.slug||""));return e.jsxs("div",{className:"search-result-tag",onClick:()=>n(`/tasks/${s.slug}`),children:[e.jsx("span",{className:"dot",style:{width:6,height:6,borderRadius:"50%",background:l.dot}}),e.jsx("span",{className:"name",children:X(s.name,s.slug)}),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:["Methods · ",d.length]}),d.map(s=>e.jsxs("div",{className:"search-result-tag",onClick:()=>n(`/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))]}),m.length>0&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"search-section-label",children:["Benchmarks · ",m.length]}),m.map(s=>e.jsxs("div",{className:"search-result-tag",onClick:()=>n(`/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))]}),u.length>0&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"search-section-label",children:["Authors · ",u.length]}),u.map(s=>e.jsxs("div",{className:"search-result-tag",onClick:()=>n(`/authors/${s.id}`),children:[e.jsx("span",{className:"name",children:s.full_name}),s.hf_username&&e.jsxs("span",{className:"handle",children:["@",s.hf_username]}),s.paper_count>0&&e.jsxs("span",{className:"count",children:[s.paper_count," papers"]})]},s.id))]}),p.length>0&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"search-section-label",children:["Organizations · ",p.length]}),p.map(s=>e.jsxs("div",{className:"search-result-tag",onClick:()=>n(`/orgs/${s.slug}`),children:[s.logo_url&&e.jsx("img",{className:"logo",src:s.logo_url,alt:"",loading:"lazy"}),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," papers"]})]},s.id))]}),g.length>0&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"search-section-label",children:["Papers · ",g.length]}),g.map(s=>{var l;return e.jsxs("div",{className:"search-result",onClick:()=>n(`/paper/${s.arxiv_id||s.id}`),children:[e.jsx("div",{className:"search-result-title",children:e.jsx(U,{title:s.title})}),e.jsxs("div",{className:"search-result-meta",children:[e.jsx("span",{children:s.arxiv_id?`arXiv:${s.arxiv_id}`:"External resource"}),((l=s.authors)==null?void 0:l[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)})]}),j.length>=f&&e.jsxs("button",{type:"button",className:"search-view-all-row",onClick:()=>n(`/papers?search=${encodeURIComponent(j)}`),children:["View all paper results for “",j,"”"]})]})]})})};export{ls as default}; diff --git a/assets/SettingsView-BXlN-W-y.js b/assets/SettingsView-BrTjKeDA.js similarity index 97% rename from assets/SettingsView-BXlN-W-y.js rename to assets/SettingsView-BrTjKeDA.js index 8a49ad293abe97803d45a12099a68eaef6772229..3391d7e5e11c366cf7202e0d8e1c8b047cd1105a 100644 --- a/assets/SettingsView-BXlN-W-y.js +++ b/assets/SettingsView-BrTjKeDA.js @@ -1,4 +1,4 @@ -import{c as v,a as T,g as he,f as O,j as e,L as F,l as z,r as te,b as B,H as k,h as ue,aw as ge,m as me,V as L,A as ie}from"./index-CTkdBAwI.js";import{u as N}from"./useMutation-DXSljxHA.js";import{d as pe,l as xe,h as ee,t as ye,f as fe,b as je,i as se,v as be,w as ve,a as we,e as ke,r as U,q as Ne}from"./researchTopic-B8hMcjil.js";import{S as C}from"./switch-B-_Aen3O.js";import{S as Ce}from"./SortableList-YW_y9VAs.js";import{S as Fe}from"./sparkles-DsQKLoSg.js";import{A as Re}from"./arrow-right-BqOq_ArY.js";import{T as Se}from"./trophy-d-G-L_yg.js";import{c as w}from"./chat-Dr1lXe8V.js";import{u as _e,f as Ee}from"./useDocumentTitle-WlHj7EYH.js";import{a as Pe,u as Me,r as Le,O as Y}from"./openrouter-CIzc-yJH.js";import{u as Oe}from"./preferences-BMkWyA3F.js";import{E as ae}from"./external-link-DK_uOtfh.js";import{M as Te}from"./moon-DKhdjlp0.js";import"./index-tW8cPsfP.js";import"./account-Ck5qYpM8.js";/** +import{c as v,a as T,g as he,f as O,j as e,L as F,l as z,r as te,b as B,H as k,h as ue,aw as ge,m as me,V as L,A as ie}from"./index-D2fBL-s6.js";import{u as N}from"./useMutation-9dlTbuQj.js";import{d as pe,l as xe,h as ee,t as ye,f as fe,b as je,i as se,v as be,w as ve,a as we,e as ke,r as U,q as Ne}from"./researchTopic-jOpECA0z.js";import{S as C}from"./switch-B4eVY4fu.js";import{S as Ce}from"./SortableList-BzRDhhmi.js";import{S as Fe}from"./sparkles-4rJdywIs.js";import{A as Re}from"./arrow-right-COzkrAUH.js";import{T as Se}from"./trophy-DbAb1jY1.js";import{c as w}from"./chat-BOZIonsX.js";import{u as _e,f as Ee}from"./useDocumentTitle-ibepJVy2.js";import{a as Pe,u as Me,r as Le,O as Y}from"./openrouter-BRMbmxz_.js";import{u as Oe}from"./preferences-BHmRHfHN.js";import{E as ae}from"./external-link-Ddavpnin.js";import{M as Te}from"./moon-vNTgqlOp.js";import"./index-C_9KPu-E.js";import"./account-BHlQBDNT.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/SharedChatView-D26jD_Yu.js b/assets/SharedChatView-4eHoic3i.js similarity index 78% rename from assets/SharedChatView-D26jD_Yu.js rename to assets/SharedChatView-4eHoic3i.js index 593d237a20d86c74f174f22e28837ab930aa7507..2079851c20a001eee77493589256d93a456ad80d 100644 --- a/assets/SharedChatView-D26jD_Yu.js +++ b/assets/SharedChatView-4eHoic3i.js @@ -1 +1 @@ -import{u as x,k as g,f as o,b as v,j as e,A as f,s as j}from"./index-CTkdBAwI.js";import{A as b,a as y,C as S,U as w,b as N,t as k}from"./chatLifecycle-MnB7vIxs.js";import{e as C,p as q,f as A,q as P}from"./chatSessions-DFZee9F6.js";import{c as _}from"./chat-Dr1lXe8V.js";/* empty css */import"./hover-card-murUA8RP.js";import"./CatalogEntityPreviewLink-BtlbiZfu.js";import"./catalog-ZV4aeC2F.js";import"./github-B1HnPn8H.js";import"./file-text-C_y5yA3N.js";import"./PaperPreviewLink-gDkLaZRD.js";import"./index-RLQgt3ff.js";import"./index-BTuG6PF7.js";import"./katex-DkKDou_j.js";import"./papers-POQWk4vk.js";import"./curation-BlGrJ3z2.js";import"./useMutation-DXSljxHA.js";import"./thumbs-up-CYylDqig.js";import"./copy-CSFOf_JK.js";import"./queryOptions-C9woPjwX.js";import"./arrow-left-CROPXr9Q.js";import"./external-link-DK_uOtfh.js";import"./plus-Dhoq_Vs9.js";import"./search-Di2HpIcQ.js";import"./chevron-up-C4mc56q2.js";import"./AuthorAvatar-DjiI2pGP.js";const m=s=>s instanceof f&&s.status===404,E=({detail:s})=>{const[n,i]=o.useState(()=>q(s)),h=o.useMemo(()=>A(n),[n]),l=(t,p)=>{i(u=>k(u,t,p))};return e.jsx("div",{className:"shared-chat-transcript",children:n.map(t=>t.role==="user"?e.jsx(w,{id:t.id,text:t.text??"",paperMentions:t.paperMentions??[],paperSelection:t.paperSelection},t.id):e.jsx(N,{msg:t,papers:h,onToggleBlock:l},t.id))})},se=()=>{const{shareId:s=""}=x(),n=g(),i=j(),[h,l]=o.useState(60),t=v({queryKey:["shared-chat",s],queryFn:()=>_.getSharedChat(s),retry:(r,a)=>!m(a)&&r<1});o.useEffect(()=>{const r=document.title,a=document.head.querySelector('meta[name="robots"]'),c=a==null?void 0:a.content,d=a??document.createElement("meta");return d.name="robots",d.content="noindex,nofollow",a||document.head.appendChild(d),document.title="Shared conversation",()=>{document.title=r,a?a.content=c??"":d.remove()}},[]),o.useLayoutEffect(()=>{const r=document.querySelector(".app-header");if(!r)return;const a=()=>l(r.offsetHeight);a();const c=new ResizeObserver(a);return c.observe(r),()=>c.disconnect()},[]);const p=r=>{P(r,void 0,{autoSend:!1}),n("/chat")},u=m(t.error);return t.isLoading?e.jsxs("div",{className:"shared-chat-state",role:"status",children:[e.jsx(C,{})," Loading shared conversation…"]}):u?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(b,{workspaceKey:`share:${s}:${t.data.updated_at}`,autoOpenOnMount:!0,children:e.jsxs("div",{className:"shared-chat-page",style:{height:`calc(100dvh - ${h}px)`},children:[e.jsxs("div",{className:"shared-chat-heading",children:[e.jsx("h1",{children:"Shared conversation"}),i&&e.jsx("span",{className:"chat-staging-badge",children:"Staging"})]}),e.jsx(y,{variant:"shared",children:e.jsxs("div",{className:"shared-chat-content","data-testid":"shared-conversation-pane",children:[e.jsx(E,{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."}),i&&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(S,{onSend:r=>p(r.text),placeholder:"Ask a new research question…"})]})]})})]})})};export{se as default}; +import{u as x,k as g,f as o,b as v,j as e,A as f,s as j}from"./index-D2fBL-s6.js";import{A as b,a as y,C as S,U as w,b as N,t as k}from"./chatLifecycle-nMvmiYGF.js";import{e as C,p as q,f as A,q as P}from"./chatSessions-CoHSP58H.js";import{c as _}from"./chat-BOZIonsX.js";/* empty css */import"./hover-card-DWpZK4fW.js";import"./CatalogEntityPreviewLink-xL6TDpUk.js";import"./catalog-5AxvKr4D.js";import"./github-DcIeypA5.js";import"./file-text-CikzkPqz.js";import"./PaperPreviewLink-BZuRBR1p.js";import"./index-BPshewTi.js";import"./index-BtZPsygG.js";import"./katex-DkKDou_j.js";import"./papers-khuZaSFb.js";import"./curation-BtfabyzA.js";import"./useMutation-9dlTbuQj.js";import"./thumbs-up-BnMguJ3s.js";import"./copy-CcyqVsMW.js";import"./queryOptions-C9woPjwX.js";import"./arrow-left-CzTG6LBL.js";import"./external-link-Ddavpnin.js";import"./plus-BI8-JXK0.js";import"./search-0R_Hc3S2.js";import"./chevron-up-B9KJ5aUJ.js";import"./AuthorAvatar-C8tz_syh.js";const m=s=>s instanceof f&&s.status===404,E=({detail:s})=>{const[n,i]=o.useState(()=>q(s)),h=o.useMemo(()=>A(n),[n]),l=(t,p)=>{i(u=>k(u,t,p))};return e.jsx("div",{className:"shared-chat-transcript",children:n.map(t=>t.role==="user"?e.jsx(w,{id:t.id,text:t.text??"",paperMentions:t.paperMentions??[],paperSelection:t.paperSelection},t.id):e.jsx(N,{msg:t,papers:h,onToggleBlock:l},t.id))})},se=()=>{const{shareId:s=""}=x(),n=g(),i=j(),[h,l]=o.useState(60),t=v({queryKey:["shared-chat",s],queryFn:()=>_.getSharedChat(s),retry:(r,a)=>!m(a)&&r<1});o.useEffect(()=>{const r=document.title,a=document.head.querySelector('meta[name="robots"]'),c=a==null?void 0:a.content,d=a??document.createElement("meta");return d.name="robots",d.content="noindex,nofollow",a||document.head.appendChild(d),document.title="Shared conversation",()=>{document.title=r,a?a.content=c??"":d.remove()}},[]),o.useLayoutEffect(()=>{const r=document.querySelector(".app-header");if(!r)return;const a=()=>l(r.offsetHeight);a();const c=new ResizeObserver(a);return c.observe(r),()=>c.disconnect()},[]);const p=r=>{P(r,void 0,{autoSend:!1}),n("/chat")},u=m(t.error);return t.isLoading?e.jsxs("div",{className:"shared-chat-state",role:"status",children:[e.jsx(C,{})," Loading shared conversation…"]}):u?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(b,{workspaceKey:`share:${s}:${t.data.updated_at}`,autoOpenOnMount:!0,children:e.jsxs("div",{className:"shared-chat-page",style:{height:`calc(100dvh - ${h}px)`},children:[e.jsxs("div",{className:"shared-chat-heading",children:[e.jsx("h1",{children:"Shared conversation"}),i&&e.jsx("span",{className:"chat-staging-badge",children:"Staging"})]}),e.jsx(y,{variant:"shared",children:e.jsxs("div",{className:"shared-chat-content","data-testid":"shared-conversation-pane",children:[e.jsx(E,{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."}),i&&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(S,{onSend:r=>p(r.text),placeholder:"Ask a new research question…"})]})]})})]})})};export{se as default}; diff --git a/assets/SignInToEditDialog-Dn64C3wp.js b/assets/SignInToEditDialog-BBAwjxYj.js similarity index 95% rename from assets/SignInToEditDialog-Dn64C3wp.js rename to assets/SignInToEditDialog-BBAwjxYj.js index 7709cbb1861d79cd4e91648d07592241d0e52a9e..7917b4061e07dc21ad6a834eb7b01c0ba0bca1c0 100644 --- a/assets/SignInToEditDialog-Dn64C3wp.js +++ b/assets/SignInToEditDialog-BBAwjxYj.js @@ -1,4 +1,4 @@ -import{c as be,f as a,j as e,ad as je,I as fe,ae as ye,x as Ne,y as we,X as Se,C as _e,H as ke}from"./index-CTkdBAwI.js";import{B as P}from"./button-CJEAPbmU.js";import{I as u}from"./input-C24thzbI.js";import{T as Ce}from"./textarea-DH3b7wpe.js";import{S as se}from"./searchable-select-bWRlK1sd.js";import{D as ie,a as oe,c as le,b as ce,d as de,e as De}from"./dialog-C7LLEadk.js";import{u as Ie}from"./useMutation-DXSljxHA.js";import{s as b,p as j}from"./submissions-BSh9vIax.js";import{c as te}from"./catalog-ZV4aeC2F.js";import{L as Ee}from"./loader-circle-B71NdARb.js";/** +import{c as be,f as a,j as e,ad as je,I as fe,ae as ye,x as Ne,y as we,X as Se,C as _e,H as ke}from"./index-D2fBL-s6.js";import{B as P}from"./button-D0XfbdrX.js";import{I as u}from"./input-DdobyT4w.js";import{T as Ce}from"./textarea-B8b7WxcV.js";import{S as se}from"./searchable-select-CsXzzP_V.js";import{D as ie,a as oe,c as le,b as ce,d as de,e as De}from"./dialog-DgUROq2j.js";import{u as Ie}from"./useMutation-9dlTbuQj.js";import{s as b,p as j}from"./submissions-LRopJJKL.js";import{c as te}from"./catalog-5AxvKr4D.js";import{L as Ee}from"./loader-circle-CoLo2trx.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/SortableList-YW_y9VAs.js b/assets/SortableList-BzRDhhmi.js similarity index 98% rename from assets/SortableList-YW_y9VAs.js rename to assets/SortableList-BzRDhhmi.js index 4c84299747db6587c69e29f3db229cf87f003856..3f4a007c2edd9a36856fe08dfbd54b493f51d670 100644 --- a/assets/SortableList-YW_y9VAs.js +++ b/assets/SortableList-BzRDhhmi.js @@ -1,4 +1,4 @@ -import{c as P,f as d,j as w}from"./index-CTkdBAwI.js";/** +import{c as P,f as d,j as w}from"./index-D2fBL-s6.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/SotaBadges-CyyWKB0V.js b/assets/SotaBadges-r6iGzLRW.js similarity index 97% rename from assets/SotaBadges-CyyWKB0V.js rename to assets/SotaBadges-r6iGzLRW.js index 702da3bbce77d5b3752ff82f982b3a3116f596b2..c885323d77aaf451760a2626b263b71e7c55432d 100644 --- a/assets/SotaBadges-CyyWKB0V.js +++ b/assets/SotaBadges-r6iGzLRW.js @@ -1 +1 @@ -import{k as M,j as e,V as x,L as C}from"./index-CTkdBAwI.js";import{h as F,c as E}from"./colors-BkWRhvFI.js";import{d as A,h as P}from"./transform-CZL79kIa.js";const D=({slug:t,label:s,onClick:r})=>{const a=M(),j=F(t),o=E(j),p=c=>{if(c.stopPropagation(),r){r(t);return}a(`/tasks/${t}`)};return e.jsxs("span",{className:"tag-chip",style:{background:o.bg,color:o.text},onClick:p,children:[e.jsx("span",{className:"dot",style:{background:o.dot}}),A(s||P(t),t)]})},I=({method:t,onClick:s})=>{const r=M(),a=t.slug||t.id||"";if(!a)return null;const j=o=>{if(o.stopPropagation(),s){s(a);return}r(`/methods/${a}`)};return e.jsx("span",{className:"method-chip",onClick:j,children:t.name})},W=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)},O=({paperId:t})=>{const s=W(t),r=160,a=220,j=[.85+s()*.1,.55+s()*.25],o=.45+s()*.3,p=[],c=9+Math.floor(s()*3);for(let y=0;y.3,l=Math.floor(s()*3),m=[],$=6+Math.floor(s()*3);for(let y=0;y<$;y++)m.push(.5+s()*.45);const d="#9A9588",u="#3A352D",i=5,h=(r-i*2-2)/2,b=i,f=i+h+2;let v=i+2;const R=v;v+=6;const T=v+1;v+=5;const L=v;v+=3;const g=v+1;return e.jsx("div",{style:{width:r,height:a,background:"#FDFCF9",border:"1px solid var(--hairline-strong)",borderRadius:2,boxShadow:"0 1px 0 rgba(0,0,0,0.04), 0 4px 8px -4px rgba(0,0,0,0.08)",flexShrink:0,overflow:"hidden",position:"relative"},children:e.jsxs("svg",{width:r,height:a,viewBox:`0 0 ${r} ${a}`,style:{display:"block"},children:[j.map((y,k)=>e.jsx("rect",{x:i+(r-i*2)*(1-y)/2,y:R+k*2.4,width:(r-i*2)*y,height:1.4,fill:u,rx:.3},`t${k}`)),e.jsx("rect",{x:i+(r-i*2)*(1-o)/2,y:T,width:(r-i*2)*o,height:.9,fill:d,opacity:.7,rx:.2}),e.jsx("rect",{x:i,y:L,width:6,height:1,fill:u,opacity:.6}),p.map((y,k)=>{const w=g+k*2.1;return w>a-i-1?null:e.jsx("rect",{x:b,y:w,width:h*y,height:.8,fill:d,opacity:.55,rx:.2},`l${k}`)}),n&&e.jsxs("g",{children:[e.jsx("rect",{x:f,y:g,width:h,height:14,fill:"#F0EBE0",stroke:d,strokeWidth:.3,opacity:.9}),l===0&&e.jsx("g",{stroke:u,strokeWidth:.4,fill:"none",opacity:.6,children:e.jsx("polyline",{points:`${f+2},${g+11} ${f+6},${g+8} ${f+10},${g+9} ${f+14},${g+5} ${f+18},${g+6} ${f+22},${g+3}`})}),l===1&&e.jsxs("g",{opacity:.55,children:[e.jsx("circle",{cx:f+h/2,cy:g+7,r:3.5,fill:u}),e.jsx("rect",{x:f+2,y:g+11,width:h-4,height:1.5,fill:d})]}),l===2&&e.jsxs("g",{opacity:.55,children:[e.jsx("rect",{x:f+3,y:g+5,width:h-6,height:1,fill:u}),e.jsx("rect",{x:f+6,y:g+8,width:h-12,height:.8,fill:u})]})]}),m.map((y,k)=>{const w=g+(n?16:0)+k*2.1;return w>a-i-1?null:e.jsx("rect",{x:f,y:w,width:h*y,height:.8,fill:d,opacity:.55,rx:.2},`r${k}`)})]})})},Y=({paperId:t,title:s,thumbnailUrl:r,priority:a=!1})=>{const[j,o]=x.useState(!1),[p,c]=x.useState(0),[n,l]=x.useState(a),m=x.useRef(null);x.useEffect(()=>{o(!1),c(0)},[r]);const $=x.useMemo(()=>{if(!r)return null;if(p===0)return r;const d=r.includes("?")?"&":"?";return`${r}${d}retry=${p}`},[r,p]);return x.useEffect(()=>{if(a||n)return;const d=m.current;if(!d)return;const u=new IntersectionObserver(([i])=>{i.isIntersecting&&(l(!0),u.disconnect())},{rootMargin:"250px"});return u.observe(d),()=>u.disconnect()},[a,n]),r&&!j?e.jsx("div",{ref:m,style:{width:160,height:220,background:"#FDFCF9",border:"1px solid var(--hairline-strong)",borderRadius:2,boxShadow:"0 1px 0 rgba(0,0,0,0.04), 0 4px 8px -4px rgba(0,0,0,0.08)",flexShrink:0,overflow:"hidden",position:"relative"},children:(a||n)&&$&&e.jsx("img",{src:$,alt:`Thumbnail for ${s}`,loading:a?"eager":"lazy",decoding:"async",fetchPriority:a?"high":"auto",style:{width:"100%",height:"100%",objectFit:"contain",display:"block"},onError:()=>{if(p<1){c(d=>d+1);return}o(!0)}},$)}):e.jsx(O,{paperId:t})},S={1:"SOTA 🏆",2:"#2",3:"#3"},N=({units:t,paperHref:s})=>{const r=x.useRef(null),a=x.useRef(null),[j,o]=x.useState(t.length);if(x.useLayoutEffect(()=>{const n=r.current,l=a.current;if(!n||!l||t.length===0)return;const m=u=>(l.textContent=u,l.scrollWidth),$=()=>{const u=n.clientWidth;if(u<=0)return;let i=0,h=0;for(const b of t){const f=m(b.measureText);if(i+f<=u)i+=f,h+=1;else break}if(h0&&i+m(` · +${t.length-h} more`)>u;)h-=1,i-=m(t[h].measureText);h===0&&(h=1)}o(h)};$();const d=new ResizeObserver($);return d.observe(n),()=>d.disconnect()},[t]),t.length===0)return null;const p=t.slice(0,Math.max(1,Math.min(j,t.length))),c=t.length-p.length;return e.jsxs("div",{className:"paper-sota",ref:r,children:[e.jsx("span",{ref:a,className:"paper-sota-measure","aria-hidden":"true"}),p.map((n,l)=>e.jsxs(x.Fragment,{children:[n.isGroupStart?e.jsxs(e.Fragment,{children:[l>0&&e.jsx("span",{className:"paper-sota-sep",children:" · "}),e.jsx("span",{className:`paper-sota-label${n.rank===1?" paper-sota-label--sota":""}`,children:S[n.rank]}),e.jsx("span",{className:"paper-sota-on",children:" on "})]}):e.jsx("span",{className:"paper-sota-sep",children:", "}),n.href?e.jsx(C,{to:n.href,className:"paper-sota-name",onClick:m=>m.stopPropagation(),children:n.name}):e.jsx("span",{className:"paper-sota-name",children:n.name})]},`${n.href||n.name}-${l}`)),c>0&&e.jsxs(C,{to:`${s}#results`,className:"paper-sota-more",onClick:n=>n.stopPropagation(),children:[" · +",c," more"]})]})},V=({ranks:t,paperHref:s,wrap:r=!1})=>{const a=x.useMemo(()=>{const o=[];let p=!0;for(const c of[1,2,3]){const n=t.filter(l=>l.rank===c);n.forEach((l,m)=>{const $=m===0,d=$?`${p?"":" · "}${S[c]} on `:", ";o.push({name:l.name,href:l.href,rank:c,isGroupStart:$,measureText:d+l.name})}),n.length>0&&(p=!1)}return o},[t]),j=x.useMemo(()=>[1,2,3].map(o=>t.filter(c=>c.rank===o).map((c,n)=>({name:c.name,href:c.href,rank:o,isGroupStart:n===0,measureText:(n===0?`${S[o]} on `:", ")+c.name}))).filter(o=>o.length>0),[t]);return r?j.length===0?null:e.jsx("div",{className:"paper-sota-stack",children:j.map(o=>e.jsx(N,{units:o,paperHref:s},o[0].rank))}):a.length===0?null:e.jsx(N,{units:a,paperHref:s})};export{I as M,Y as P,V as S,D as T}; +import{k as M,j as e,V as x,L as C}from"./index-D2fBL-s6.js";import{h as F,c as E}from"./colors-BkWRhvFI.js";import{d as A,h as P}from"./transform-B_GaHMvk.js";const D=({slug:t,label:s,onClick:r})=>{const a=M(),j=F(t),o=E(j),p=c=>{if(c.stopPropagation(),r){r(t);return}a(`/tasks/${t}`)};return e.jsxs("span",{className:"tag-chip",style:{background:o.bg,color:o.text},onClick:p,children:[e.jsx("span",{className:"dot",style:{background:o.dot}}),A(s||P(t),t)]})},I=({method:t,onClick:s})=>{const r=M(),a=t.slug||t.id||"";if(!a)return null;const j=o=>{if(o.stopPropagation(),s){s(a);return}r(`/methods/${a}`)};return e.jsx("span",{className:"method-chip",onClick:j,children:t.name})},W=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)},O=({paperId:t})=>{const s=W(t),r=160,a=220,j=[.85+s()*.1,.55+s()*.25],o=.45+s()*.3,p=[],c=9+Math.floor(s()*3);for(let y=0;y.3,l=Math.floor(s()*3),m=[],$=6+Math.floor(s()*3);for(let y=0;y<$;y++)m.push(.5+s()*.45);const d="#9A9588",u="#3A352D",i=5,h=(r-i*2-2)/2,b=i,f=i+h+2;let v=i+2;const R=v;v+=6;const T=v+1;v+=5;const L=v;v+=3;const g=v+1;return e.jsx("div",{style:{width:r,height:a,background:"#FDFCF9",border:"1px solid var(--hairline-strong)",borderRadius:2,boxShadow:"0 1px 0 rgba(0,0,0,0.04), 0 4px 8px -4px rgba(0,0,0,0.08)",flexShrink:0,overflow:"hidden",position:"relative"},children:e.jsxs("svg",{width:r,height:a,viewBox:`0 0 ${r} ${a}`,style:{display:"block"},children:[j.map((y,k)=>e.jsx("rect",{x:i+(r-i*2)*(1-y)/2,y:R+k*2.4,width:(r-i*2)*y,height:1.4,fill:u,rx:.3},`t${k}`)),e.jsx("rect",{x:i+(r-i*2)*(1-o)/2,y:T,width:(r-i*2)*o,height:.9,fill:d,opacity:.7,rx:.2}),e.jsx("rect",{x:i,y:L,width:6,height:1,fill:u,opacity:.6}),p.map((y,k)=>{const w=g+k*2.1;return w>a-i-1?null:e.jsx("rect",{x:b,y:w,width:h*y,height:.8,fill:d,opacity:.55,rx:.2},`l${k}`)}),n&&e.jsxs("g",{children:[e.jsx("rect",{x:f,y:g,width:h,height:14,fill:"#F0EBE0",stroke:d,strokeWidth:.3,opacity:.9}),l===0&&e.jsx("g",{stroke:u,strokeWidth:.4,fill:"none",opacity:.6,children:e.jsx("polyline",{points:`${f+2},${g+11} ${f+6},${g+8} ${f+10},${g+9} ${f+14},${g+5} ${f+18},${g+6} ${f+22},${g+3}`})}),l===1&&e.jsxs("g",{opacity:.55,children:[e.jsx("circle",{cx:f+h/2,cy:g+7,r:3.5,fill:u}),e.jsx("rect",{x:f+2,y:g+11,width:h-4,height:1.5,fill:d})]}),l===2&&e.jsxs("g",{opacity:.55,children:[e.jsx("rect",{x:f+3,y:g+5,width:h-6,height:1,fill:u}),e.jsx("rect",{x:f+6,y:g+8,width:h-12,height:.8,fill:u})]})]}),m.map((y,k)=>{const w=g+(n?16:0)+k*2.1;return w>a-i-1?null:e.jsx("rect",{x:f,y:w,width:h*y,height:.8,fill:d,opacity:.55,rx:.2},`r${k}`)})]})})},Y=({paperId:t,title:s,thumbnailUrl:r,priority:a=!1})=>{const[j,o]=x.useState(!1),[p,c]=x.useState(0),[n,l]=x.useState(a),m=x.useRef(null);x.useEffect(()=>{o(!1),c(0)},[r]);const $=x.useMemo(()=>{if(!r)return null;if(p===0)return r;const d=r.includes("?")?"&":"?";return`${r}${d}retry=${p}`},[r,p]);return x.useEffect(()=>{if(a||n)return;const d=m.current;if(!d)return;const u=new IntersectionObserver(([i])=>{i.isIntersecting&&(l(!0),u.disconnect())},{rootMargin:"250px"});return u.observe(d),()=>u.disconnect()},[a,n]),r&&!j?e.jsx("div",{ref:m,style:{width:160,height:220,background:"#FDFCF9",border:"1px solid var(--hairline-strong)",borderRadius:2,boxShadow:"0 1px 0 rgba(0,0,0,0.04), 0 4px 8px -4px rgba(0,0,0,0.08)",flexShrink:0,overflow:"hidden",position:"relative"},children:(a||n)&&$&&e.jsx("img",{src:$,alt:`Thumbnail for ${s}`,loading:a?"eager":"lazy",decoding:"async",fetchPriority:a?"high":"auto",style:{width:"100%",height:"100%",objectFit:"contain",display:"block"},onError:()=>{if(p<1){c(d=>d+1);return}o(!0)}},$)}):e.jsx(O,{paperId:t})},S={1:"SOTA 🏆",2:"#2",3:"#3"},N=({units:t,paperHref:s})=>{const r=x.useRef(null),a=x.useRef(null),[j,o]=x.useState(t.length);if(x.useLayoutEffect(()=>{const n=r.current,l=a.current;if(!n||!l||t.length===0)return;const m=u=>(l.textContent=u,l.scrollWidth),$=()=>{const u=n.clientWidth;if(u<=0)return;let i=0,h=0;for(const b of t){const f=m(b.measureText);if(i+f<=u)i+=f,h+=1;else break}if(h0&&i+m(` · +${t.length-h} more`)>u;)h-=1,i-=m(t[h].measureText);h===0&&(h=1)}o(h)};$();const d=new ResizeObserver($);return d.observe(n),()=>d.disconnect()},[t]),t.length===0)return null;const p=t.slice(0,Math.max(1,Math.min(j,t.length))),c=t.length-p.length;return e.jsxs("div",{className:"paper-sota",ref:r,children:[e.jsx("span",{ref:a,className:"paper-sota-measure","aria-hidden":"true"}),p.map((n,l)=>e.jsxs(x.Fragment,{children:[n.isGroupStart?e.jsxs(e.Fragment,{children:[l>0&&e.jsx("span",{className:"paper-sota-sep",children:" · "}),e.jsx("span",{className:`paper-sota-label${n.rank===1?" paper-sota-label--sota":""}`,children:S[n.rank]}),e.jsx("span",{className:"paper-sota-on",children:" on "})]}):e.jsx("span",{className:"paper-sota-sep",children:", "}),n.href?e.jsx(C,{to:n.href,className:"paper-sota-name",onClick:m=>m.stopPropagation(),children:n.name}):e.jsx("span",{className:"paper-sota-name",children:n.name})]},`${n.href||n.name}-${l}`)),c>0&&e.jsxs(C,{to:`${s}#results`,className:"paper-sota-more",onClick:n=>n.stopPropagation(),children:[" · +",c," more"]})]})},V=({ranks:t,paperHref:s,wrap:r=!1})=>{const a=x.useMemo(()=>{const o=[];let p=!0;for(const c of[1,2,3]){const n=t.filter(l=>l.rank===c);n.forEach((l,m)=>{const $=m===0,d=$?`${p?"":" · "}${S[c]} on `:", ";o.push({name:l.name,href:l.href,rank:c,isGroupStart:$,measureText:d+l.name})}),n.length>0&&(p=!1)}return o},[t]),j=x.useMemo(()=>[1,2,3].map(o=>t.filter(c=>c.rank===o).map((c,n)=>({name:c.name,href:c.href,rank:o,isGroupStart:n===0,measureText:(n===0?`${S[o]} on `:", ")+c.name}))).filter(o=>o.length>0),[t]);return r?j.length===0?null:e.jsx("div",{className:"paper-sota-stack",children:j.map(o=>e.jsx(N,{units:o,paperHref:s},o[0].rank))}):a.length===0?null:e.jsx(N,{units:a,paperHref:s})};export{I as M,Y as P,V as S,D as T}; diff --git a/assets/StagingAccessRequestView-Dvx_jX4o.js b/assets/StagingAccessRequestView-KKG5yc76.js similarity index 95% rename from assets/StagingAccessRequestView-Dvx_jX4o.js rename to assets/StagingAccessRequestView-KKG5yc76.js index 85e5f63130115e3f8621c6b11bcec013df8e6683..a1a60a69c8f0f0655634b5e97624ba7be365a172 100644 --- a/assets/StagingAccessRequestView-Dvx_jX4o.js +++ b/assets/StagingAccessRequestView-KKG5yc76.js @@ -1 +1 @@ -import{a as m,V as a,j as e,H as g,b3 as p}from"./index-CTkdBAwI.js";import{C as j}from"./circle-check-C79dB7xO.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,V as a,j as e,H as g,b3 as p}from"./index-D2fBL-s6.js";import{C as j}from"./circle-check-1e3iPSaF.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-B3AlWGiS.js b/assets/SubmissionsDashboard-BlDtgY38.js similarity index 97% rename from assets/SubmissionsDashboard-B3AlWGiS.js rename to assets/SubmissionsDashboard-BlDtgY38.js index 43d7e7e071f1dba32cf8245f548550ec04e3c7b4..27d44d2d24f974b7d4896cf5970e58b8b46b5c93 100644 --- a/assets/SubmissionsDashboard-B3AlWGiS.js +++ b/assets/SubmissionsDashboard-BlDtgY38.js @@ -1,4 +1,4 @@ -import{c as ae,V as v,j as e,I as y,b as ne,q as H,a3 as re,x as oe,p as le,y as E,l as de,a$ as T,b0 as ce,b1 as ue,b2 as pe}from"./index-CTkdBAwI.js";import{u as W,r as me,e as he}from"./evaluationQueryInvalidation-Dxt6kOu3.js";import{i as X,a as K}from"./queryInvalidation-B6btj6xZ.js";import{u as D}from"./useMutation-DXSljxHA.js";import{u as fe}from"./useInfiniteQuery-CLH4OKrI.js";import{c as C}from"./catalog-ZV4aeC2F.js";import{s as xe}from"./safeExternalHref-CkBrsh84.js";import{E as O,s as I}from"./submissions-BSh9vIax.js";import{p as je}from"./papers-POQWk4vk.js";import{R as ge,C as ve}from"./refresh-cw-CCsVFDnD.js";import{L as $}from"./loader-circle-B71NdARb.js";import{C as be}from"./circle-check-C79dB7xO.js";import"./curation-BlGrJ3z2.js";/** +import{c as ae,V as v,j as e,I as y,b as ne,q as H,a3 as re,x as oe,p as le,y as E,l as de,a$ as T,b0 as ce,b1 as ue,b2 as pe}from"./index-D2fBL-s6.js";import{u as W,r as me,e as he}from"./evaluationQueryInvalidation-Cs0hE-wT.js";import{i as X,a as K}from"./queryInvalidation-BVOtRFkG.js";import{u as D}from"./useMutation-9dlTbuQj.js";import{u as fe}from"./useInfiniteQuery-CjJA-90e.js";import{c as C}from"./catalog-5AxvKr4D.js";import{s as xe}from"./safeExternalHref-CkBrsh84.js";import{E as O,s as I}from"./submissions-LRopJJKL.js";import{p as je}from"./papers-khuZaSFb.js";import{R as ge,C as ve}from"./refresh-cw-fOkD1TSw.js";import{L as $}from"./loader-circle-CoLo2trx.js";import{C as be}from"./circle-check-1e3iPSaF.js";import"./curation-BtfabyzA.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/SubmitView-T2KNEFF1.js b/assets/SubmitView-DGwEiuGz.js similarity index 93% rename from assets/SubmitView-T2KNEFF1.js rename to assets/SubmitView-DGwEiuGz.js index c28c7991cf8353861a41970fec2c414796a6be33..659773c7c70b3d5badd021d3e93732ef486a3fe6 100644 --- a/assets/SubmitView-T2KNEFF1.js +++ b/assets/SubmitView-DGwEiuGz.js @@ -1 +1 @@ -import{k as D,l as E,x as C,a as F,e as N,V as o,y as X,j as e,h as z}from"./index-CTkdBAwI.js";import{u as U}from"./useMutation-DXSljxHA.js";import{A as O,a as V}from"./alert-5nuL0v_r.js";import{B as P}from"./button-CJEAPbmU.js";import{I as h}from"./input-C24thzbI.js";import{T as q}from"./textarea-DH3b7wpe.js";import{p as B}from"./papers-POQWk4vk.js";import{a as H}from"./queryInvalidation-B6btj6xZ.js";import"./curation-BlGrJ3z2.js";const S="pwc:paper-submit-draft",k={color:"var(--accent-text)",fontWeight:600,textDecoration:"underline",textUnderlineOffset:2},M=/^\d{4}\.\d{4,5}(v\d+)?$/i,J=/^[a-z-]+(\.[A-Z]{2})?\/\d{7}$/,W=/^https?:\/\/(?:www\.)?arxiv\.org\//i;function R(l){const i=l.trim();return i?M.test(i)||J.test(i)||W.test(i)?"arxiv":/^https?:\/\//i.test(i)?"external":"arxiv":"empty"}function $(l,i){const r=l.trim();if(R(r)==="arxiv")return/^https?:\/\//i.test(r)?{source_url:r}:{arxiv_id:r};const s={source_url:r},p=i.title.trim();p&&(s.title=p);const d=i.abstract.trim();d&&(s.abstract=d);const n=i.authors.split(/[,\n]/).map(c=>c.trim()).filter(Boolean);return n.length>0&&(s.authors=n),i.datePublished&&(s.date_published=i.datePublished),s}const re=()=>{const l=D(),i=E(),{toast:r}=C(),{user:g,isLoading:s}=F(),[p]=N(),d=p.get("arxiv_id")??"",[n,c]=o.useState(d),[f,j]=o.useState(""),[x,w]=o.useState(""),[b,I]=o.useState(""),[v,_]=o.useState(""),[A,y]=o.useState(null);o.useEffect(()=>{if(d)return;const t=sessionStorage.getItem(S);if(t){sessionStorage.removeItem(S);try{const a=JSON.parse(t);c(a.input??""),j(a.title??""),w(a.abstract??""),I(a.authors??""),_(a.datePublished??"")}catch{}}},[d]);const m=R(n),L=m==="external",u=U({mutationFn:t=>B.submit(t),onSuccess:t=>{if(t.pending_review){r({title:"Submission queued for review",description:"No source page was fetched and no catalog row was changed."}),u.reset();return}H(i);const a=t.refreshed&&t.created&&t.latest_version;r({title:a?`Paper updated to ${t.latest_version}`:t.created?"Paper submitted":"Paper already indexed",description:a?"Opening the updated paper page…":t.created?"Opening the paper page…":"Opening the existing paper page…"}),t.route_identifier&&l(`/paper/${t.route_identifier}`)},onError:t=>{y(X(t,"Submission failed"))}}),T=t=>{if(t.preventDefault(),y(null),m==="empty"){y("Enter an arXiv ID or a paper URL to submit.");return}if(!g){sessionStorage.setItem(S,JSON.stringify({input:n,title:f,abstract:x,authors:b,datePublished:v})),window.location.assign(z(window.location.href));return}const a=$(n,{title:f,abstract:x,authors:b,datePublished:v});u.mutate(a)};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:["If your paper is on arXiv, submit it on"," ",e.jsx("a",{href:"https://huggingface.co/papers/submit",target:"_blank",rel:"noopener noreferrer",style:k,children:"Hugging Face"}),", which will automatically index it on Papers with Code."]}),e.jsxs("p",{style:{fontFamily:"var(--serif)",color:"var(--ink-soft)",marginTop:12,lineHeight:1.55},children:["If your paper is not on arXiv, submit it here. Non-arXiv papers (blog posts, technical reports, model release pages) enter the submission queue and appear only after review."," ",e.jsx("a",{href:"/rate-limits",style:k,children:"Read the submission and rate-limit policy."})]}),e.jsxs("form",{onSubmit:T,style:{marginTop:28,display:"grid",gap:20},children:[e.jsxs("div",{style:{display:"grid",gap:8},children:[e.jsx("label",{htmlFor:"submit-input",style:{fontWeight:600,fontSize:14},children:"arXiv ID or paper URL"}),e.jsx(h,{id:"submit-input",value:n,onChange:t=>c(t.target.value),placeholder:"2501.12345 · https://arxiv.org/abs/2501.12345 · https://blog.example.com/release",autoFocus:!0,required:!0}),e.jsx("div",{style:{fontSize:12,color:"var(--ink-soft)",minHeight:18},children:m==="arxiv"?"Detected: arXiv paper — metadata will be fetched automatically.":m==="external"?"Detected: external URL — we'll extract metadata and you can override below.":"Paste an arXiv ID like 2501.12345 or any paper/blog URL."})]}),L&&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(h,{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(q,{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(h,{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(h,{id:"submit-date",type:"date",value:v,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(O,{variant:"destructive",children:e.jsx(V,{children:A})}),e.jsxs("div",{style:{display:"flex",gap:12,alignItems:"center"},children:[e.jsx(P,{type:"submit",disabled:u.isPending||s,children:s?"Checking sign-in…":u.isPending?"Submitting…":g?"Submit paper":"Sign in to submit"}),e.jsx(P,{type:"button",variant:"outline",onClick:()=>l(-1),disabled:u.isPending,children:"Cancel"})]})]})]})};export{re as default}; +import{k as D,l as E,x as C,a as F,e as N,V as o,y as X,j as e,h as z}from"./index-D2fBL-s6.js";import{u as U}from"./useMutation-9dlTbuQj.js";import{A as O,a as V}from"./alert-PnePcfgX.js";import{B as P}from"./button-D0XfbdrX.js";import{I as h}from"./input-DdobyT4w.js";import{T as q}from"./textarea-B8b7WxcV.js";import{p as B}from"./papers-khuZaSFb.js";import{a as H}from"./queryInvalidation-BVOtRFkG.js";import"./curation-BtfabyzA.js";const S="pwc:paper-submit-draft",k={color:"var(--accent-text)",fontWeight:600,textDecoration:"underline",textUnderlineOffset:2},M=/^\d{4}\.\d{4,5}(v\d+)?$/i,J=/^[a-z-]+(\.[A-Z]{2})?\/\d{7}$/,W=/^https?:\/\/(?:www\.)?arxiv\.org\//i;function R(l){const i=l.trim();return i?M.test(i)||J.test(i)||W.test(i)?"arxiv":/^https?:\/\//i.test(i)?"external":"arxiv":"empty"}function $(l,i){const r=l.trim();if(R(r)==="arxiv")return/^https?:\/\//i.test(r)?{source_url:r}:{arxiv_id:r};const s={source_url:r},p=i.title.trim();p&&(s.title=p);const d=i.abstract.trim();d&&(s.abstract=d);const n=i.authors.split(/[,\n]/).map(c=>c.trim()).filter(Boolean);return n.length>0&&(s.authors=n),i.datePublished&&(s.date_published=i.datePublished),s}const re=()=>{const l=D(),i=E(),{toast:r}=C(),{user:g,isLoading:s}=F(),[p]=N(),d=p.get("arxiv_id")??"",[n,c]=o.useState(d),[f,j]=o.useState(""),[x,w]=o.useState(""),[b,I]=o.useState(""),[v,_]=o.useState(""),[A,y]=o.useState(null);o.useEffect(()=>{if(d)return;const t=sessionStorage.getItem(S);if(t){sessionStorage.removeItem(S);try{const a=JSON.parse(t);c(a.input??""),j(a.title??""),w(a.abstract??""),I(a.authors??""),_(a.datePublished??"")}catch{}}},[d]);const m=R(n),L=m==="external",u=U({mutationFn:t=>B.submit(t),onSuccess:t=>{if(t.pending_review){r({title:"Submission queued for review",description:"No source page was fetched and no catalog row was changed."}),u.reset();return}H(i);const a=t.refreshed&&t.created&&t.latest_version;r({title:a?`Paper updated to ${t.latest_version}`:t.created?"Paper submitted":"Paper already indexed",description:a?"Opening the updated paper page…":t.created?"Opening the paper page…":"Opening the existing paper page…"}),t.route_identifier&&l(`/paper/${t.route_identifier}`)},onError:t=>{y(X(t,"Submission failed"))}}),T=t=>{if(t.preventDefault(),y(null),m==="empty"){y("Enter an arXiv ID or a paper URL to submit.");return}if(!g){sessionStorage.setItem(S,JSON.stringify({input:n,title:f,abstract:x,authors:b,datePublished:v})),window.location.assign(z(window.location.href));return}const a=$(n,{title:f,abstract:x,authors:b,datePublished:v});u.mutate(a)};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:["If your paper is on arXiv, submit it on"," ",e.jsx("a",{href:"https://huggingface.co/papers/submit",target:"_blank",rel:"noopener noreferrer",style:k,children:"Hugging Face"}),", which will automatically index it on Papers with Code."]}),e.jsxs("p",{style:{fontFamily:"var(--serif)",color:"var(--ink-soft)",marginTop:12,lineHeight:1.55},children:["If your paper is not on arXiv, submit it here. Non-arXiv papers (blog posts, technical reports, model release pages) enter the submission queue and appear only after review."," ",e.jsx("a",{href:"/rate-limits",style:k,children:"Read the submission and rate-limit policy."})]}),e.jsxs("form",{onSubmit:T,style:{marginTop:28,display:"grid",gap:20},children:[e.jsxs("div",{style:{display:"grid",gap:8},children:[e.jsx("label",{htmlFor:"submit-input",style:{fontWeight:600,fontSize:14},children:"arXiv ID or paper URL"}),e.jsx(h,{id:"submit-input",value:n,onChange:t=>c(t.target.value),placeholder:"2501.12345 · https://arxiv.org/abs/2501.12345 · https://blog.example.com/release",autoFocus:!0,required:!0}),e.jsx("div",{style:{fontSize:12,color:"var(--ink-soft)",minHeight:18},children:m==="arxiv"?"Detected: arXiv paper — metadata will be fetched automatically.":m==="external"?"Detected: external URL — we'll extract metadata and you can override below.":"Paste an arXiv ID like 2501.12345 or any paper/blog URL."})]}),L&&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(h,{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(q,{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(h,{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(h,{id:"submit-date",type:"date",value:v,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(O,{variant:"destructive",children:e.jsx(V,{children:A})}),e.jsxs("div",{style:{display:"flex",gap:12,alignItems:"center"},children:[e.jsx(P,{type:"submit",disabled:u.isPending||s,children:s?"Checking sign-in…":u.isPending?"Submitting…":g?"Submit paper":"Sign in to submit"}),e.jsx(P,{type:"button",variant:"outline",onClick:()=>l(-1),disabled:u.isPending,children:"Cancel"})]})]})]})};export{re as default}; diff --git a/assets/TagBrowseView-jFvG0K-M.js b/assets/TagBrowseView-jFvG0K-M.js deleted file mode 100644 index fa0ab62c6ba6fd9c3d13670364ec00704a3417ea..0000000000000000000000000000000000000000 --- a/assets/TagBrowseView-jFvG0K-M.js +++ /dev/null @@ -1 +0,0 @@ -import{j as e,L as g,V as oe,u as de,k as me,f as j,b as G,p as he,a3 as pe,q as K,T as O}from"./index-CTkdBAwI.js";import{R as ue}from"./ResearchFollowButton-gAamAHri.js";import{M as ge}from"./SotaBadges-CyyWKB0V.js";import{u as be,b as xe,P as je}from"./PaperFeed-2BMpWfem.js";import{A as L}from"./arrow-right-BqOq_ArY.js";import{B as ke}from"./BenchmarkTrendSparkline-CHEb1nF4.js";import{M as W}from"./MarkdownText-B88CU2f1.js";import{c as J}from"./catalog-ZV4aeC2F.js";import{p as _e}from"./papers-POQWk4vk.js";import{i as fe}from"./apiErrors-DFeecPSH.js";import{f as Ne}from"./frameworks-DDA0P4Tf.js";import{u as we}from"./preferences-BMkWyA3F.js";import{s as ve}from"./slug-BpH-Nkvz.js";import{d as N,t as ye}from"./transform-CZL79kIa.js";import{u as Se}from"./usePapers-Cu-zovv8.js";import{S as P}from"./skeleton-p2_v-2W8.js";import{A as Te,a as Ee}from"./alert-5nuL0v_r.js";import Be from"./NotFound-BE9xg6GA.js";import{T as $e}from"./trophy-d-G-L_yg.js";import{G as Me}from"./github-B1HnPn8H.js";import"./researchTopic-B8hMcjil.js";import"./useMutation-DXSljxHA.js";import"./plus-Dhoq_Vs9.js";import"./colors-BkWRhvFI.js";import"./PaperCard--WllvTq0.js";import"./AuthorAvatar-DjiI2pGP.js";import"./Icon-DSoTeS9V.js";import"./LatexTitle-BmCQe_rK.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-CZErm3i7.js";import"./useIntersectionObserver-BnA8TYxZ.js";/* empty css */import"./PaperPreviewLink-gDkLaZRD.js";import"./index-RLQgt3ff.js";import"./index-BTuG6PF7.js";import"./katex-DkKDou_j.js";import"./hover-card-murUA8RP.js";import"./curation-BlGrJ3z2.js";import"./account-Ck5qYpM8.js";import"./useInfiniteQuery-CLH4OKrI.js";const Ce=()=>e.jsxs(g,{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(L,{size:14,"aria-hidden":"true"})]})]}),X=n=>{const c=n.match(/\(([^()]*)\)\s*$/);return c?c[1].split(",").map(d=>d.trim()).filter(Boolean):[]};function Fe(n,c){const d=X(n);if(c===void 0)return"standard";const i=new Set(X(c).map(l=>l.toLowerCase())),m=d.filter(l=>!i.has(l.toLowerCase()));return m.length?m.join(", "):n}function Ae(n,c){const d=new Map(n.map(l=>[l.id,l])),i=l=>{const x=new Set([l.id]);let k=l;for(;;){const w=c(k),_=w?d.get(w):void 0;if(!_)return k.id;if(x.has(_.id))return l.id;x.add(_.id),k=_}},m=new Map;return n.forEach(l=>{const x=i(l);m.set(x,[...m.get(x)||[],l])}),[...m].map(([l,x])=>({key:l,members:[d.get(l),...x.filter(k=>k.id!==l)]}))}const R=3,Pe=[{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"}],Re=({frameworks:n})=>n.length===0?null:e.jsxs("div",{className:"task-framework-links",children:[e.jsx("span",{className:"task-framework-links-label",children:"Recommended frameworks"}),n.map(c=>e.jsxs(g,{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:["★ ",Ne(c.num_stars)]})]},c.framework_id))]}),Le=({task:n,area:c,parents:d})=>e.jsxs("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:[e.jsx(g,{to:"/tasks",children:"Tasks"}),c&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"sep",children:"/"}),e.jsx(g,{to:`/tasks#area-${ve(c.name)}`,children:c.name})]}),[...d].reverse().map(i=>e.jsxs(oe.Fragment,{children:[e.jsx("span",{className:"sep",children:"/"}),e.jsx(g,{to:`/tasks/${i.slug||i.id}`,children:N(i.name,i.slug)})]},i.id)),e.jsx("span",{className:"sep",children:"/"}),e.jsx("span",{style:{color:"var(--accent-text)"},children:N(n.name,n.slug)})]}),Ie=({task:n,relatedTasks:c})=>{const d=new Map([n,...c].map(i=>[i.slug,i]));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:Pe.map(i=>{const m=d.get(i.slug),l=e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"medical-ai-hub-card-eyebrow",children:i.eyebrow}),e.jsx("strong",{children:i.title}),e.jsx("span",{className:"medical-ai-hub-card-description",children:i.description}),e.jsxs("span",{className:"medical-ai-hub-card-meta",children:[(m==null?void 0:m.paper_count)!=null?`${m.paper_count.toLocaleString()} papers`:"Explore task",e.jsx(L,{size:14,"aria-hidden":"true"})]})]});return i.slug==="healthcare"?e.jsx("a",{href:i.href,className:"medical-ai-hub-card",children:l},i.slug):e.jsx(g,{to:i.href,className:"medical-ai-hub-card",children:l},i.slug)})})]})},qe=n=>[...n].sort((c,d)=>{const i=c.slug==="classic-language-modeling",m=d.slug==="classic-language-modeling";return i!==m?i?1:-1:0}),Ss=()=>{var V,z,U;const{taskSlug:n}=de(),c=me(),d=be(),{searchParams:i}=d,[m,l]=j.useState(!1),[x,k]=j.useState({}),[w,_]=j.useState(()=>new Set),{preferences:Y}=we(),E=(s,a)=>{const t=s||"";return a?`/benchmark/${t}?task=${encodeURIComponent(a)}`:`/benchmark/${t}`},v=Y.hide_closed_source_evals?!0:void 0,h=G({queryKey:[...K.taskPage,n,v],queryFn:()=>J.taskPage(n,{is_open:v}),enabled:!!n,staleTime:O});j.useEffect(()=>{var t;const s=(t=h.data)==null?void 0:t.task.slug;if(!n||!s||s===n)return;const a=i.toString();c(`/tasks/${s}${a?`?${a}`:""}`,{replace:!0})},[c,(V=h.data)==null?void 0:V.task.slug,i,n]);const I=G({queryKey:[...K.taskBenchmarkTrends,n,v],queryFn:()=>J.trendingBenchmarks(n,{limit:100,min_recent_papers:0,is_open:v}),enabled:!!n,staleTime:O}),y=j.useMemo(()=>{var s;return qe(((s=h.data)==null?void 0:s.children)||[])},[h.data]),B=j.useMemo(()=>{var a;const s=new Map;return(((a=h.data)==null?void 0:a.subtask_benchmarks)||[]).forEach(t=>{s.set(t.subtask_id,t.benchmarks||[])}),s},[h.data]),f=Se([...he.feeds.task,n,d.filters],s=>_e.forTask(n,{...d.filters,page:s,page_size:20,repository_limit:1}),{enabled:!!n}),Z=j.useMemo(()=>{var s;return((s=f.data)==null?void 0:s.pages.flatMap(a=>a.results.map(ye)))??[]},[f.data]),$=j.useMemo(()=>{var a;const s={};return(a=f.data)==null||a.pages.forEach(t=>t.results.forEach(b=>(b.methods||[]).forEach(u=>{const r=u.slug||u.id;s[r]||(s[r]={id:u.id,name:u.name,slug:u.slug||"",count:0}),s[r].count++}))),Object.values(s).sort((t,b)=>b.count-t.count).slice(0,8)},[f.data]);if(h.isLoading)return e.jsxs("div",{className:"page",children:[e.jsx(P,{className:"h-12 w-1/2 mb-4"}),e.jsx(P,{className:"h-6 w-1/3 mb-8"}),e.jsx(P,{className:"h-64 w-full"})]});if(fe(h.error))return e.jsx(Be,{});if(h.error||!h.data)return e.jsx("div",{className:"page",children:e.jsx(Te,{variant:"destructive",children:e.jsx(Ee,{children:"Task not found."})})});const o=h.data.task,ee=h.data.parents||[],M=N(o.name,o.slug),C=(h.data.sisters||[]).filter(s=>s.id!==o.id),se=h.data.recommended_frameworks||[],S=h.data.benchmarks||[],q=new Map(S.map(s=>[s.id,s])),ae=new Set(S.map(s=>s.id)),H=(((z=I.data)==null?void 0:z.results)||[]).filter(s=>ae.has(s.id)).map(s=>{const a=q.get(s.id);return{...s,best_model_name:(a==null?void 0:a.best_model_name)??s.best_model_name,best_paper_route:a==null?void 0:a.best_paper_route,best_paper_title:a==null?void 0:a.best_paper_title,best_code_url:a==null?void 0:a.best_code_url}}),F=H.length?H:S.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:[]})),T=Ae(F,s=>{var a;return(a=q.get(s.id))==null?void 0:a.parent_dataset_id}),re=m?T:T.slice(0,5),ne=T.slice(5).reduce((s,a)=>s+a.members.length,0),Q=((U=I.data)==null?void 0:U.recent_days)||90,te=y.some(s=>(B.get(s.id)||[]).length>0),ie=y.length>0,D=F.length>0,ce=(()=>{const s=new Set;return S.forEach(a=>s.add(a.id)),B.forEach(a=>a.forEach(t=>s.add(t.id))),s.size})(),le=s=>{_(a=>{const t=new Set(a);return t.has(s)?t.delete(s):t.add(s),t})};return e.jsxs("div",{className:"page",children:[e.jsx(Le,{task:o,area:h.data.area,parents:ee}),e.jsxs("div",{className:o.image_url?`task-hero-grid${o.slug==="auto-research"?" task-hero-grid--wide":""}`: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:M}),e.jsx(ue,{kind:"task",entityId:o.id}),o.description&&e.jsx(W,{className:"task-explainer",text:o.description}),e.jsxs("div",{className:"task-quickstats",children:[e.jsxs("span",{children:[e.jsx("span",{className:"num",children:(o.paper_count??0).toLocaleString()}),"PAPERS"]}),e.jsxs("span",{children:[e.jsx("span",{className:"num",children:ce}),"BENCHMARKS"]}),e.jsxs("span",{children:[e.jsxs("span",{className:"num",children:[$.length,"+"]}),"METHODS USED"]})]}),e.jsx(Re,{frameworks:se})]}),o.image_url&&e.jsxs("figure",{className:`task-figure-card${o.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:pe(o.image_url)??void 0,alt:`${M} schematic`,onError:s=>{var a,t;(t=(a=s.currentTarget.parentElement)==null?void 0:a.parentElement)==null||t.style.setProperty("display","none")}})}),e.jsxs("figcaption",{children:["Figure · ",M,o.image_credit&&e.jsxs(e.Fragment,{children:[e.jsx("br",{}),e.jsx(W,{className:"task-image-credit",text:o.image_credit})]})]})]})]}),o.slug==="healthcare"&&e.jsx(Ie,{task:o,relatedTasks:C}),o.slug==="robotics"&&e.jsx(Ce,{}),e.jsxs("div",{className:"task-page-grid",style:{marginTop:28},children:[e.jsxs("div",{children:[D&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"task-section-head",id:"benchmarks",children:[e.jsxs("div",{className:"task-section-eyebrow",children:[Q,"-day reporting activity · select a benchmark"]}),e.jsxs("div",{className:"task-section-title",children:["Benchmarks ",e.jsxs("span",{className:"meta",children:["[",F.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"})]}),re.map(({key:s,members:a})=>{const t=a[0],b=p=>p===t?"standard":Fe(p.name,t.name),u=[t,...a.slice(1).sort((p,A)=>b(p).localeCompare(b(A),void 0,{sensitivity:"base"}))],r=u.find(p=>p.id===x[s])??t;return e.jsxs("div",{className:"benchmark-trend-row",role:"row",children:[e.jsxs("div",{className:"benchmark-trend-cell",role:"cell",children:[e.jsx(ke,{history:r.history,benchmarkName:r.name}),e.jsxs("div",{className:"benchmark-trend-meta",children:[e.jsxs("span",{children:[e.jsx("strong",{children:r.recent_paper_count})," ",r.recent_paper_count===1?"paper":"papers"," /"," ",Q,"d"]}),r.rate_change==null?r.recent_paper_count>0&&e.jsx("span",{className:"benchmark-trend-change is-new",children:"new"}):e.jsxs("span",{className:`benchmark-trend-change ${r.rate_change>=1?"is-up":"is-down"}`,children:[r.rate_change>=1?"↑":"↓"," ",r.rate_change.toFixed(1),"×"]})]})]}),e.jsxs("div",{className:"benchmark-trend-benchmark",role:"cell",children:[e.jsx(g,{className:"bench-row-name",to:E(r.slug||r.id,n),children:r.name}),u.length>1&&e.jsx("div",{className:"bench-row-variants",role:"group","aria-label":`Evaluation protocols for ${t.name}`,children:u.map(p=>e.jsx("button",{type:"button",className:"bench-row-variant","aria-pressed":p.id===r.id,title:p.name,onClick:()=>k(A=>({...A,[s]:p.id})),children:b(p)},p.id))}),e.jsx("div",{className:"bench-row-sub",children:e.jsxs("span",{children:[e.jsx("strong",{children:r.all_time_paper_count})," reporting papers"]})})]}),e.jsx("div",{className:"bench-row-best",role:"cell",children:r.best_model_name?e.jsxs(e.Fragment,{children:[e.jsx($e,{size:13,className:"bench-row-best-icon"}),e.jsx("span",{className:"bench-row-best-name",children:r.best_model_name})]}):e.jsx("span",{className:"bench-row-best-empty",children:"—"})}),e.jsx("div",{className:"bench-row-paper",role:"cell",children:r.best_paper_route&&r.best_paper_title?e.jsx(g,{to:`/paper/${encodeURIComponent(r.best_paper_route)}`,children:r.best_paper_title}):e.jsx("span",{className:"bench-row-best-empty",children:"—"})}),e.jsx("div",{className:"bench-row-code",role:"cell",children:r.best_code_url?e.jsx("a",{href:r.best_code_url,target:"_blank",rel:"noopener noreferrer","aria-label":`Code for ${r.best_paper_title||r.best_model_name}`,children:e.jsx(Me,{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(g,{to:E(r.slug||r.id,n),"aria-label":`Compare ${r.best_model_name||"the best model"} with all results on ${r.name}`,children:[e.jsx("span",{children:"See all"}),e.jsx(L,{size:11,strokeWidth:2,"aria-hidden":"true"})]})})]},s)})]}),T.length>5&&e.jsx("button",{type:"button",className:"bench-show-more",onClick:()=>l(s=>!s),children:m?"− show top 5":`+ show ${ne} more benchmarks`})]}),ie&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"task-section-head",style:D?{marginTop:36}:void 0,children:[e.jsx("div",{className:"task-section-eyebrow",children:te?"Benchmarks by capability":"Task hierarchy"}),e.jsxs("div",{className:"task-section-title",children:["Subtasks ",e.jsxs("span",{className:"meta",children:["[",y.length,"]"]})]})]}),e.jsx("div",{className:"subtask-grid",children:y.map(s=>{const a=B.get(s.id)||[],t=w.has(s.id),b=t?a:a.slice(0,R),u=a.length-R;return e.jsxs("div",{className:"subtask-section",children:[e.jsxs("div",{className:"subtask-head",children:[e.jsx(g,{to:`/tasks/${s.slug||s.id}`,className:"subtask-head-name",children:N(s.name,s.slug)}),e.jsx("span",{className:"subtask-head-meta",children:a.length>0?`[${a.length} benchmark${a.length===1?"":"s"}]`:`[${(s.paper_count??0).toLocaleString()} papers]`})]}),b.length>0?b.map((r,p)=>e.jsxs("div",{className:"bench-row",onClick:()=>c(E(r.slug||r.id,s.slug||s.id)),children:[e.jsx("div",{className:"bench-row-num",children:String(p+1).padStart(2,"0")}),e.jsxs("div",{className:"bench-row-main",children:[e.jsx("div",{className:"bench-row-name",children:r.name}),e.jsx("div",{className:"bench-row-sub",children:r.paper_count!=null&&e.jsxs("span",{children:[e.jsx("strong",{children:r.paper_count})," ENTRIES"]})})]}),e.jsx("div",{className:"bench-row-arrow",children:"→"})]},r.id)):e.jsxs(g,{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})]}),u>0&&e.jsx("button",{type:"button",className:"bench-show-more",onClick:()=>le(s.id),children:t?`− show top ${R}`:`+ show ${u} more benchmark${u===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:["[",(o.paper_count??0).toLocaleString(),"]"]})]})]}),e.jsx(xe,{feed:d}),e.jsx(je,{query:f,cards:Z,empty:"No papers in this task yet."})]}),e.jsxs("aside",{className:"task-side",children:[C.length>0&&o.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"}),C.slice(0,8).map(s=>e.jsxs(g,{to:`/tasks/${s.slug||s.id}`,className:"side-link-row",children:[e.jsx("span",{children:N(s.name,s.slug)}),s.paper_count!=null&&e.jsx("span",{className:"count",children:s.paper_count.toLocaleString()})]},s.id))]}),$.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"}),$.map(s=>e.jsxs("div",{className:"side-method-row",children:[e.jsx(ge,{method:{slug:s.slug,name:s.name}}),e.jsxs("span",{className:"num",children:["·",s.count]})]},s.id))]})]})]})]})};export{Ie as HealthcareMedicalAiHub,Re as RecommendedFrameworkLinks,Le as TaskBreadcrumb,Ss as default}; diff --git a/assets/TagBrowseView-zzh9zkuk.js b/assets/TagBrowseView-zzh9zkuk.js new file mode 100644 index 0000000000000000000000000000000000000000..25e912a0ee5ba50aefe33c292440b0f79cf197c1 --- /dev/null +++ b/assets/TagBrowseView-zzh9zkuk.js @@ -0,0 +1 @@ +import{j as e,L as g,V as oe,u as de,k as me,f as j,b as G,p as he,a3 as pe,q as K,T as O}from"./index-D2fBL-s6.js";import{R as ue}from"./ResearchFollowButton-Bwb5EiPm.js";import{M as ge}from"./SotaBadges-r6iGzLRW.js";import{u as be,b as xe,P as je}from"./PaperFeed-BERxHjrg.js";import{A as L}from"./arrow-right-COzkrAUH.js";import{B as ke}from"./BenchmarkTrendSparkline-BV1XDSWE.js";import{M as W}from"./MarkdownText-ludE7yuw.js";import{c as J}from"./catalog-5AxvKr4D.js";import{p as _e}from"./papers-khuZaSFb.js";import{i as fe}from"./apiErrors-DV2aaDjL.js";import{f as Ne}from"./frameworks-DDA0P4Tf.js";import{u as we}from"./preferences-BHmRHfHN.js";import{s as ve}from"./slug-BpH-Nkvz.js";import{d as N,t as ye}from"./transform-B_GaHMvk.js";import{u as Se}from"./usePapers-CAjdcUuj.js";import{S as P}from"./skeleton-BDwfco0_.js";import{A as Te,a as Ee}from"./alert-PnePcfgX.js";import Be from"./NotFound-L0ldWZg9.js";import{T as $e}from"./trophy-DbAb1jY1.js";import{G as Me}from"./github-DcIeypA5.js";import"./researchTopic-jOpECA0z.js";import"./useMutation-9dlTbuQj.js";import"./plus-BI8-JXK0.js";import"./colors-BkWRhvFI.js";import"./PaperCard-DhorusY5.js";import"./AuthorAvatar-C8tz_syh.js";import"./Icon-Uhh78KjL.js";import"./LatexTitle-WIQJ1ke0.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-DS5Jzsg5.js";import"./useIntersectionObserver-C0Rq0EXm.js";/* empty css */import"./PaperPreviewLink-BZuRBR1p.js";import"./index-BPshewTi.js";import"./index-BtZPsygG.js";import"./katex-DkKDou_j.js";import"./hover-card-DWpZK4fW.js";import"./curation-BtfabyzA.js";import"./account-BHlQBDNT.js";import"./useInfiniteQuery-CjJA-90e.js";const Ce=()=>e.jsxs(g,{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(L,{size:14,"aria-hidden":"true"})]})]}),X=n=>{const c=n.match(/\(([^()]*)\)\s*$/);return c?c[1].split(",").map(d=>d.trim()).filter(Boolean):[]};function Fe(n,c){const d=X(n);if(c===void 0)return"standard";const i=new Set(X(c).map(l=>l.toLowerCase())),m=d.filter(l=>!i.has(l.toLowerCase()));return m.length?m.join(", "):n}function Ae(n,c){const d=new Map(n.map(l=>[l.id,l])),i=l=>{const x=new Set([l.id]);let k=l;for(;;){const w=c(k),_=w?d.get(w):void 0;if(!_)return k.id;if(x.has(_.id))return l.id;x.add(_.id),k=_}},m=new Map;return n.forEach(l=>{const x=i(l);m.set(x,[...m.get(x)||[],l])}),[...m].map(([l,x])=>({key:l,members:[d.get(l),...x.filter(k=>k.id!==l)]}))}const R=3,Pe=[{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"}],Re=({frameworks:n})=>n.length===0?null:e.jsxs("div",{className:"task-framework-links",children:[e.jsx("span",{className:"task-framework-links-label",children:"Recommended frameworks"}),n.map(c=>e.jsxs(g,{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:["★ ",Ne(c.num_stars)]})]},c.framework_id))]}),Le=({task:n,area:c,parents:d})=>e.jsxs("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:[e.jsx(g,{to:"/tasks",children:"Tasks"}),c&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"sep",children:"/"}),e.jsx(g,{to:`/tasks#area-${ve(c.name)}`,children:c.name})]}),[...d].reverse().map(i=>e.jsxs(oe.Fragment,{children:[e.jsx("span",{className:"sep",children:"/"}),e.jsx(g,{to:`/tasks/${i.slug||i.id}`,children:N(i.name,i.slug)})]},i.id)),e.jsx("span",{className:"sep",children:"/"}),e.jsx("span",{style:{color:"var(--accent-text)"},children:N(n.name,n.slug)})]}),Ie=({task:n,relatedTasks:c})=>{const d=new Map([n,...c].map(i=>[i.slug,i]));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:Pe.map(i=>{const m=d.get(i.slug),l=e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"medical-ai-hub-card-eyebrow",children:i.eyebrow}),e.jsx("strong",{children:i.title}),e.jsx("span",{className:"medical-ai-hub-card-description",children:i.description}),e.jsxs("span",{className:"medical-ai-hub-card-meta",children:[(m==null?void 0:m.paper_count)!=null?`${m.paper_count.toLocaleString()} papers`:"Explore task",e.jsx(L,{size:14,"aria-hidden":"true"})]})]});return i.slug==="healthcare"?e.jsx("a",{href:i.href,className:"medical-ai-hub-card",children:l},i.slug):e.jsx(g,{to:i.href,className:"medical-ai-hub-card",children:l},i.slug)})})]})},qe=n=>[...n].sort((c,d)=>{const i=c.slug==="classic-language-modeling",m=d.slug==="classic-language-modeling";return i!==m?i?1:-1:0}),Ss=()=>{var V,z,U;const{taskSlug:n}=de(),c=me(),d=be({defaultToLastMonth:!0}),{searchParams:i}=d,[m,l]=j.useState(!1),[x,k]=j.useState({}),[w,_]=j.useState(()=>new Set),{preferences:Y}=we(),E=(s,a)=>{const t=s||"";return a?`/benchmark/${t}?task=${encodeURIComponent(a)}`:`/benchmark/${t}`},v=Y.hide_closed_source_evals?!0:void 0,h=G({queryKey:[...K.taskPage,n,v],queryFn:()=>J.taskPage(n,{is_open:v}),enabled:!!n,staleTime:O});j.useEffect(()=>{var t;const s=(t=h.data)==null?void 0:t.task.slug;if(!n||!s||s===n)return;const a=i.toString();c(`/tasks/${s}${a?`?${a}`:""}`,{replace:!0})},[c,(V=h.data)==null?void 0:V.task.slug,i,n]);const I=G({queryKey:[...K.taskBenchmarkTrends,n,v],queryFn:()=>J.trendingBenchmarks(n,{limit:100,min_recent_papers:0,is_open:v}),enabled:!!n,staleTime:O}),y=j.useMemo(()=>{var s;return qe(((s=h.data)==null?void 0:s.children)||[])},[h.data]),B=j.useMemo(()=>{var a;const s=new Map;return(((a=h.data)==null?void 0:a.subtask_benchmarks)||[]).forEach(t=>{s.set(t.subtask_id,t.benchmarks||[])}),s},[h.data]),f=Se([...he.feeds.task,n,d.filters],s=>_e.forTask(n,{...d.filters,page:s,page_size:20,repository_limit:1}),{enabled:!!n}),Z=j.useMemo(()=>{var s;return((s=f.data)==null?void 0:s.pages.flatMap(a=>a.results.map(ye)))??[]},[f.data]),$=j.useMemo(()=>{var a;const s={};return(a=f.data)==null||a.pages.forEach(t=>t.results.forEach(b=>(b.methods||[]).forEach(u=>{const r=u.slug||u.id;s[r]||(s[r]={id:u.id,name:u.name,slug:u.slug||"",count:0}),s[r].count++}))),Object.values(s).sort((t,b)=>b.count-t.count).slice(0,8)},[f.data]);if(h.isLoading)return e.jsxs("div",{className:"page",children:[e.jsx(P,{className:"h-12 w-1/2 mb-4"}),e.jsx(P,{className:"h-6 w-1/3 mb-8"}),e.jsx(P,{className:"h-64 w-full"})]});if(fe(h.error))return e.jsx(Be,{});if(h.error||!h.data)return e.jsx("div",{className:"page",children:e.jsx(Te,{variant:"destructive",children:e.jsx(Ee,{children:"Task not found."})})});const o=h.data.task,ee=h.data.parents||[],M=N(o.name,o.slug),C=(h.data.sisters||[]).filter(s=>s.id!==o.id),se=h.data.recommended_frameworks||[],S=h.data.benchmarks||[],q=new Map(S.map(s=>[s.id,s])),ae=new Set(S.map(s=>s.id)),D=(((z=I.data)==null?void 0:z.results)||[]).filter(s=>ae.has(s.id)).map(s=>{const a=q.get(s.id);return{...s,best_model_name:(a==null?void 0:a.best_model_name)??s.best_model_name,best_paper_route:a==null?void 0:a.best_paper_route,best_paper_title:a==null?void 0:a.best_paper_title,best_code_url:a==null?void 0:a.best_code_url}}),F=D.length?D:S.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:[]})),T=Ae(F,s=>{var a;return(a=q.get(s.id))==null?void 0:a.parent_dataset_id}),re=m?T:T.slice(0,5),ne=T.slice(5).reduce((s,a)=>s+a.members.length,0),H=((U=I.data)==null?void 0:U.recent_days)||90,te=y.some(s=>(B.get(s.id)||[]).length>0),ie=y.length>0,Q=F.length>0,ce=(()=>{const s=new Set;return S.forEach(a=>s.add(a.id)),B.forEach(a=>a.forEach(t=>s.add(t.id))),s.size})(),le=s=>{_(a=>{const t=new Set(a);return t.has(s)?t.delete(s):t.add(s),t})};return e.jsxs("div",{className:"page",children:[e.jsx(Le,{task:o,area:h.data.area,parents:ee}),e.jsxs("div",{className:o.image_url?`task-hero-grid${o.slug==="auto-research"?" task-hero-grid--wide":""}`: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:M}),e.jsx(ue,{kind:"task",entityId:o.id}),o.description&&e.jsx(W,{className:"task-explainer",text:o.description}),e.jsxs("div",{className:"task-quickstats",children:[e.jsxs("span",{children:[e.jsx("span",{className:"num",children:(o.paper_count??0).toLocaleString()}),"PAPERS"]}),e.jsxs("span",{children:[e.jsx("span",{className:"num",children:ce}),"BENCHMARKS"]}),e.jsxs("span",{children:[e.jsxs("span",{className:"num",children:[$.length,"+"]}),"METHODS USED"]})]}),e.jsx(Re,{frameworks:se})]}),o.image_url&&e.jsxs("figure",{className:`task-figure-card${o.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:pe(o.image_url)??void 0,alt:`${M} schematic`,onError:s=>{var a,t;(t=(a=s.currentTarget.parentElement)==null?void 0:a.parentElement)==null||t.style.setProperty("display","none")}})}),e.jsxs("figcaption",{children:["Figure · ",M,o.image_credit&&e.jsxs(e.Fragment,{children:[e.jsx("br",{}),e.jsx(W,{className:"task-image-credit",text:o.image_credit})]})]})]})]}),o.slug==="healthcare"&&e.jsx(Ie,{task:o,relatedTasks:C}),o.slug==="robotics"&&e.jsx(Ce,{}),e.jsxs("div",{className:"task-page-grid",style:{marginTop:28},children:[e.jsxs("div",{children:[Q&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"task-section-head",id:"benchmarks",children:[e.jsxs("div",{className:"task-section-eyebrow",children:[H,"-day reporting activity · select a benchmark"]}),e.jsxs("div",{className:"task-section-title",children:["Benchmarks ",e.jsxs("span",{className:"meta",children:["[",F.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"})]}),re.map(({key:s,members:a})=>{const t=a[0],b=p=>p===t?"standard":Fe(p.name,t.name),u=[t,...a.slice(1).sort((p,A)=>b(p).localeCompare(b(A),void 0,{sensitivity:"base"}))],r=u.find(p=>p.id===x[s])??t;return e.jsxs("div",{className:"benchmark-trend-row",role:"row",children:[e.jsxs("div",{className:"benchmark-trend-cell",role:"cell",children:[e.jsx(ke,{history:r.history,benchmarkName:r.name}),e.jsxs("div",{className:"benchmark-trend-meta",children:[e.jsxs("span",{children:[e.jsx("strong",{children:r.recent_paper_count})," ",r.recent_paper_count===1?"paper":"papers"," /"," ",H,"d"]}),r.rate_change==null?r.recent_paper_count>0&&e.jsx("span",{className:"benchmark-trend-change is-new",children:"new"}):e.jsxs("span",{className:`benchmark-trend-change ${r.rate_change>=1?"is-up":"is-down"}`,children:[r.rate_change>=1?"↑":"↓"," ",r.rate_change.toFixed(1),"×"]})]})]}),e.jsxs("div",{className:"benchmark-trend-benchmark",role:"cell",children:[e.jsx(g,{className:"bench-row-name",to:E(r.slug||r.id,n),children:r.name}),u.length>1&&e.jsx("div",{className:"bench-row-variants",role:"group","aria-label":`Evaluation protocols for ${t.name}`,children:u.map(p=>e.jsx("button",{type:"button",className:"bench-row-variant","aria-pressed":p.id===r.id,title:p.name,onClick:()=>k(A=>({...A,[s]:p.id})),children:b(p)},p.id))}),e.jsx("div",{className:"bench-row-sub",children:e.jsxs("span",{children:[e.jsx("strong",{children:r.all_time_paper_count})," reporting papers"]})})]}),e.jsx("div",{className:"bench-row-best",role:"cell",children:r.best_model_name?e.jsxs(e.Fragment,{children:[e.jsx($e,{size:13,className:"bench-row-best-icon"}),e.jsx("span",{className:"bench-row-best-name",children:r.best_model_name})]}):e.jsx("span",{className:"bench-row-best-empty",children:"—"})}),e.jsx("div",{className:"bench-row-paper",role:"cell",children:r.best_paper_route&&r.best_paper_title?e.jsx(g,{to:`/paper/${encodeURIComponent(r.best_paper_route)}`,children:r.best_paper_title}):e.jsx("span",{className:"bench-row-best-empty",children:"—"})}),e.jsx("div",{className:"bench-row-code",role:"cell",children:r.best_code_url?e.jsx("a",{href:r.best_code_url,target:"_blank",rel:"noopener noreferrer","aria-label":`Code for ${r.best_paper_title||r.best_model_name}`,children:e.jsx(Me,{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(g,{to:E(r.slug||r.id,n),"aria-label":`Compare ${r.best_model_name||"the best model"} with all results on ${r.name}`,children:[e.jsx("span",{children:"See all"}),e.jsx(L,{size:11,strokeWidth:2,"aria-hidden":"true"})]})})]},s)})]}),T.length>5&&e.jsx("button",{type:"button",className:"bench-show-more",onClick:()=>l(s=>!s),children:m?"− show top 5":`+ show ${ne} more benchmarks`})]}),ie&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"task-section-head",style:Q?{marginTop:36}:void 0,children:[e.jsx("div",{className:"task-section-eyebrow",children:te?"Benchmarks by capability":"Task hierarchy"}),e.jsxs("div",{className:"task-section-title",children:["Subtasks ",e.jsxs("span",{className:"meta",children:["[",y.length,"]"]})]})]}),e.jsx("div",{className:"subtask-grid",children:y.map(s=>{const a=B.get(s.id)||[],t=w.has(s.id),b=t?a:a.slice(0,R),u=a.length-R;return e.jsxs("div",{className:"subtask-section",children:[e.jsxs("div",{className:"subtask-head",children:[e.jsx(g,{to:`/tasks/${s.slug||s.id}`,className:"subtask-head-name",children:N(s.name,s.slug)}),e.jsx("span",{className:"subtask-head-meta",children:a.length>0?`[${a.length} benchmark${a.length===1?"":"s"}]`:`[${(s.paper_count??0).toLocaleString()} papers]`})]}),b.length>0?b.map((r,p)=>e.jsxs("div",{className:"bench-row",onClick:()=>c(E(r.slug||r.id,s.slug||s.id)),children:[e.jsx("div",{className:"bench-row-num",children:String(p+1).padStart(2,"0")}),e.jsxs("div",{className:"bench-row-main",children:[e.jsx("div",{className:"bench-row-name",children:r.name}),e.jsx("div",{className:"bench-row-sub",children:r.paper_count!=null&&e.jsxs("span",{children:[e.jsx("strong",{children:r.paper_count})," ENTRIES"]})})]}),e.jsx("div",{className:"bench-row-arrow",children:"→"})]},r.id)):e.jsxs(g,{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})]}),u>0&&e.jsx("button",{type:"button",className:"bench-show-more",onClick:()=>le(s.id),children:t?`− show top ${R}`:`+ show ${u} more benchmark${u===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:["[",(o.paper_count??0).toLocaleString(),"]"]})]})]}),e.jsx(xe,{feed:d}),e.jsx(je,{query:f,cards:Z,empty:d.dateRange.startDate||d.dateRange.endDate?"No papers in this task in this date range.":"No papers in this task yet."})]}),e.jsxs("aside",{className:"task-side",children:[C.length>0&&o.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"}),C.slice(0,8).map(s=>e.jsxs(g,{to:`/tasks/${s.slug||s.id}`,className:"side-link-row",children:[e.jsx("span",{children:N(s.name,s.slug)}),s.paper_count!=null&&e.jsx("span",{className:"count",children:s.paper_count.toLocaleString()})]},s.id))]}),$.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"}),$.map(s=>e.jsxs("div",{className:"side-method-row",children:[e.jsx(ge,{method:{slug:s.slug,name:s.name}}),e.jsxs("span",{className:"num",children:["·",s.count]})]},s.id))]})]})]})]})};export{Ie as HealthcareMedicalAiHub,Re as RecommendedFrameworkLinks,Le as TaskBreadcrumb,Ss as default}; diff --git a/assets/TagsIndexView-DNXtuGMj.js b/assets/TagsIndexView-B8PyY2yF.js similarity index 97% rename from assets/TagsIndexView-DNXtuGMj.js rename to assets/TagsIndexView-B8PyY2yF.js index ce2b1f78196530e68e84d41deb6d41a88e935e72..b751e38730319578976748acbcb91d97f9bc013c 100644 --- a/assets/TagsIndexView-DNXtuGMj.js +++ b/assets/TagsIndexView-B8PyY2yF.js @@ -1,4 +1,4 @@ -import{c as e,b as s,f as g,j as a,L as z,q as j,T as p}from"./index-CTkdBAwI.js";import{c as k}from"./catalog-ZV4aeC2F.js";import{c as v,h as u}from"./colors-BkWRhvFI.js";import{d as f}from"./transform-CZL79kIa.js";import{s as S}from"./slug-BpH-Nkvz.js";import{S as L}from"./search-Di2HpIcQ.js";import{I as C,T as V}from"./triangle-alert-CNTNZVPh.js";import{S as A}from"./share-2-p1ZCvleM.js";import{T as H}from"./trending-up-DegPKMd3.js";import{M as T}from"./moon-DKhdjlp0.js";import{T as F}from"./thumbs-up-CYylDqig.js";import{D as Z}from"./database--XDgAVkg.js";import{L as B}from"./link-2-D6rU19oC.js";import{T as P}from"./trophy-d-G-L_yg.js";import{F as N}from"./file-text-C_y5yA3N.js";import{A as D}from"./activity-BI3KqxVx.js";import{G as E}from"./globe-BBGLIdNn.js";import{S as _}from"./sparkles-DsQKLoSg.js";import{A as G,a as I}from"./alert-5nuL0v_r.js";import{A as U,a as W,b as Q}from"./AreaSection-DTNPiFl-.js";import{T as R}from"./TaxonomySuggestionTile-CAEaqzDg.js";import{u as $,T as K}from"./useHashScrollOnReady-Ct6aPTRx.js";import{s as O}from"./areas-Dvi8w2dp.js";import"./skeleton-p2_v-2W8.js";import"./SignInToEditDialog-Dn64C3wp.js";import"./button-CJEAPbmU.js";import"./input-C24thzbI.js";import"./textarea-DH3b7wpe.js";import"./searchable-select-bWRlK1sd.js";import"./popover-CZErm3i7.js";import"./dialog-C7LLEadk.js";import"./loader-circle-B71NdARb.js";import"./useMutation-DXSljxHA.js";import"./submissions-BSh9vIax.js";import"./plus-Dhoq_Vs9.js";/** +import{c as e,b as s,f as g,j as a,L as z,q as j,T as p}from"./index-D2fBL-s6.js";import{c as k}from"./catalog-5AxvKr4D.js";import{c as v,h as u}from"./colors-BkWRhvFI.js";import{d as f}from"./transform-B_GaHMvk.js";import{s as S}from"./slug-BpH-Nkvz.js";import{S as L}from"./search-0R_Hc3S2.js";import{I as C,T as V}from"./triangle-alert-VQM9i8wl.js";import{S as A}from"./share-2-SmaUf3DC.js";import{T as H}from"./trending-up-DFLWFJuY.js";import{M as T}from"./moon-vNTgqlOp.js";import{T as F}from"./thumbs-up-BnMguJ3s.js";import{D as Z}from"./database-Ci0ufNyG.js";import{L as B}from"./link-2-DK2lGD4M.js";import{T as P}from"./trophy-DbAb1jY1.js";import{F as N}from"./file-text-CikzkPqz.js";import{A as D}from"./activity-DWWgzth6.js";import{G as E}from"./globe-BPKDvPgp.js";import{S as _}from"./sparkles-4rJdywIs.js";import{A as G,a as I}from"./alert-PnePcfgX.js";import{A as U,a as W,b as Q}from"./AreaSection-COKqvfmt.js";import{T as R}from"./TaxonomySuggestionTile-UxnpnHcy.js";import{u as $,T as K}from"./useHashScrollOnReady-C36cVkc9.js";import{s as O}from"./areas-Dvi8w2dp.js";import"./skeleton-BDwfco0_.js";import"./SignInToEditDialog-BBAwjxYj.js";import"./button-D0XfbdrX.js";import"./input-DdobyT4w.js";import"./textarea-B8b7WxcV.js";import"./searchable-select-CsXzzP_V.js";import"./popover-DS5Jzsg5.js";import"./dialog-DgUROq2j.js";import"./loader-circle-CoLo2trx.js";import"./useMutation-9dlTbuQj.js";import"./submissions-LRopJJKL.js";import"./plus-BI8-JXK0.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/TaxonomySuggestionTile-CAEaqzDg.js b/assets/TaxonomySuggestionTile-UxnpnHcy.js similarity index 76% rename from assets/TaxonomySuggestionTile-CAEaqzDg.js rename to assets/TaxonomySuggestionTile-UxnpnHcy.js index b5bfbd40ce43d6fc51dd1061ef8b441dffc5c6f8..5bc3c8d292713f4cf4e649042af9c3b7414c3dcb 100644 --- a/assets/TaxonomySuggestionTile-CAEaqzDg.js +++ b/assets/TaxonomySuggestionTile-UxnpnHcy.js @@ -1 +1 @@ -import{a as u,f as t,j as e}from"./index-CTkdBAwI.js";import{S as c,a as m}from"./SignInToEditDialog-Dn64C3wp.js";import{P as p}from"./plus-Dhoq_Vs9.js";function f({kind:s}){const{user:a}=u(),[i,n]=t.useState(!1),[l,o]=t.useState(!1),r=`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"}),r]}),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:l,onOpenChange:o,sectionLabel:`${s}s`,returnTo:typeof window<"u"?window.location.pathname:`/${s}s`,taxonomySuggestion:!0})]})}export{f as T}; +import{a as u,f as t,j as e}from"./index-D2fBL-s6.js";import{S as c,a as m}from"./SignInToEditDialog-BBAwjxYj.js";import{P as p}from"./plus-BI8-JXK0.js";function f({kind:s}){const{user:a}=u(),[i,n]=t.useState(!1),[l,o]=t.useState(!1),r=`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"}),r]}),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:l,onOpenChange:o,sectionLabel:`${s}s`,returnTo:typeof window<"u"?window.location.pathname:`/${s}s`,taxonomySuggestion:!0})]})}export{f as T}; diff --git a/assets/TopicView-BhC-HSwh.js b/assets/TopicView-Dcpv-HZh.js similarity index 88% rename from assets/TopicView-BhC-HSwh.js rename to assets/TopicView-Dcpv-HZh.js index 24fdd7beb5a34db83761c638acda28def4f62bdb..d00be156653215e77674c3b13e588e5a56099e4a 100644 --- a/assets/TopicView-BhC-HSwh.js +++ b/assets/TopicView-Dcpv-HZh.js @@ -1,4 +1,4 @@ -import{c as S,u as _,d as y,e as D,b as R,r as j,f as u,j as e,L as $,i as A,h as E,C as I,A as P}from"./index-CTkdBAwI.js";import{r as q,P as g,a as M,w as z}from"./PaperFeed-2BMpWfem.js";import{S as f}from"./skeleton-p2_v-2W8.js";import{u as B}from"./usePapers-Cu-zovv8.js";import{r as b,T as N,t as k,a as F,u as H,b as O,c as Q,s as U}from"./researchTopic-B8hMcjil.js";import{t as G}from"./transform-CZL79kIa.js";import{P as v}from"./plus-Dhoq_Vs9.js";import{L as K}from"./link-2-D6rU19oC.js";import"./PaperCard--WllvTq0.js";import"./AuthorAvatar-DjiI2pGP.js";import"./SotaBadges-CyyWKB0V.js";import"./colors-BkWRhvFI.js";import"./Icon-DSoTeS9V.js";import"./LatexTitle-BmCQe_rK.js";import"./papers-POQWk4vk.js";import"./curation-BlGrJ3z2.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-CZErm3i7.js";import"./useIntersectionObserver-BnA8TYxZ.js";import"./useInfiniteQuery-CLH4OKrI.js";import"./useMutation-DXSljxHA.js";/** +import{c as S,u as _,d as y,e as D,b as R,r as j,f as u,j as e,L as $,i as A,h as E,C as I,A as P}from"./index-D2fBL-s6.js";import{r as q,P as g,a as M,w as z}from"./PaperFeed-BERxHjrg.js";import{S as f}from"./skeleton-BDwfco0_.js";import{u as B}from"./usePapers-CAjdcUuj.js";import{r as b,T as N,t as k,a as F,u as H,b as O,c as Q,s as U}from"./researchTopic-jOpECA0z.js";import{t as G}from"./transform-B_GaHMvk.js";import{P as v}from"./plus-BI8-JXK0.js";import{L as K}from"./link-2-DK2lGD4M.js";import"./PaperCard-DhorusY5.js";import"./AuthorAvatar-C8tz_syh.js";import"./SotaBadges-r6iGzLRW.js";import"./colors-BkWRhvFI.js";import"./Icon-Uhh78KjL.js";import"./LatexTitle-WIQJ1ke0.js";import"./papers-khuZaSFb.js";import"./curation-BtfabyzA.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-DS5Jzsg5.js";import"./useIntersectionObserver-C0Rq0EXm.js";import"./useInfiniteQuery-CjJA-90e.js";import"./useMutation-9dlTbuQj.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/TrendsView-BL5J5lZh.js b/assets/TrendsView-BuSUElxo.js similarity index 97% rename from assets/TrendsView-BL5J5lZh.js rename to assets/TrendsView-BuSUElxo.js index 985d885d4cfc2f9ac5511c3593fbb2d29ed03767..ae74e44ffeb2398879bdf2d24ba751077e1510b9 100644 --- a/assets/TrendsView-BL5J5lZh.js +++ b/assets/TrendsView-BuSUElxo.js @@ -1 +1 @@ -import{V as I,j as e,ac as X,b as G}from"./index-CTkdBAwI.js";import{A as J,a as V}from"./alert-5nuL0v_r.js";import{S as P}from"./skeleton-p2_v-2W8.js";const 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)}`},g=980,j=400,x=62,B=26,f=30,E=58,u=g-x-B,A=j-f-E,v=f+A,Q=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]=I.useState(null),i=r.length,b=l[l.length-1],d=n=>x+u*(i===1?0:n/(i-1)),p=n=>f+A*(1-n/b);if(i===0)return null;const R=r.map((n,h)=>[d(h),p(n.percent)]),F=Q(R),_=`${F} L ${d(i-1)} ${v} L ${x} ${v} Z`,w=i<=12?1:Math.ceil(i/8),O=n=>{const h=n.currentTarget.getBoundingClientRect(),S=(n.clientX-h.left)/h.width*g,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 ${g} ${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:g-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:F,fill:"none",stroke:s,strokeWidth:2,strokeLinejoin:"round",strokeLinecap:"round"}),r.map((n,h)=>{const S=h===i-1,k=h%w===0&&i-1-h>=w/2;return!S&&!k?null:e.jsx("text",{x:d(h),y:v+24,textAnchor:"middle",style: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 ${f+A/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:f,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)/g*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))})]})]})]})};class Y{constructor(r){this.request=r}trends(){return this.request("/stats/trends")}}const K=new Y(X),$={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},te=()=>{const t=G({queryKey:["research-trends"],queryFn:()=>K.trends(),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(V,{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{te as default}; +import{V as I,j as e,ac as X,b as G}from"./index-D2fBL-s6.js";import{A as J,a as V}from"./alert-PnePcfgX.js";import{S as P}from"./skeleton-BDwfco0_.js";const 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)}`},g=980,j=400,x=62,B=26,f=30,E=58,u=g-x-B,A=j-f-E,v=f+A,Q=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]=I.useState(null),i=r.length,b=l[l.length-1],d=n=>x+u*(i===1?0:n/(i-1)),p=n=>f+A*(1-n/b);if(i===0)return null;const R=r.map((n,h)=>[d(h),p(n.percent)]),F=Q(R),_=`${F} L ${d(i-1)} ${v} L ${x} ${v} Z`,w=i<=12?1:Math.ceil(i/8),O=n=>{const h=n.currentTarget.getBoundingClientRect(),S=(n.clientX-h.left)/h.width*g,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 ${g} ${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:g-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:F,fill:"none",stroke:s,strokeWidth:2,strokeLinejoin:"round",strokeLinecap:"round"}),r.map((n,h)=>{const S=h===i-1,k=h%w===0&&i-1-h>=w/2;return!S&&!k?null:e.jsx("text",{x:d(h),y:v+24,textAnchor:"middle",style: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 ${f+A/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:f,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)/g*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))})]})]})]})};class Y{constructor(r){this.request=r}trends(){return this.request("/stats/trends")}}const K=new Y(X),$={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},te=()=>{const t=G({queryKey:["research-trends"],queryFn:()=>K.trends(),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(V,{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{te as default}; diff --git a/assets/UserProfileView-upsKaDwz.js b/assets/UserProfileView-y4tNT8rK.js similarity index 89% rename from assets/UserProfileView-upsKaDwz.js rename to assets/UserProfileView-y4tNT8rK.js index 1c1ee633f65a40ef5b2d61ebf3075c9bff625007..2ae80e976cea70b0d2dbf3c52758779e1d826b17 100644 --- a/assets/UserProfileView-upsKaDwz.js +++ b/assets/UserProfileView-y4tNT8rK.js @@ -1 +1 @@ -import{az as n,u as i,b as o,j as e,ao as d}from"./index-CTkdBAwI.js";import{C as l}from"./OrganizationContributionGraph-BlYz7Ff1.js";import"./skeleton-p2_v-2W8.js";import"./catalog-ZV4aeC2F.js";const c={async get(s){const a=await n(`/profiles/${encodeURIComponent(s)}`),r=await a.json();if(!a.redirected)return r;const t=decodeURIComponent(new URL(a.url).pathname.split("/").pop()||r.username);return{...r,username:t,redirected_from_alias:!0}}},x=()=>{const{username:s=""}=i(),a=o({queryKey:["user-profile",s.toLowerCase()],queryFn:()=>c.get(s)});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(l,{data:a.data.calendar,organizationName:`@${a.data.username}`,title:"Canonical contributions",noun:"contribution"}),a.data.is_owner&&e.jsxs("section",{className:"mt-10",children:[e.jsx("h2",{children:"Your submissions"}),e.jsxs("p",{className:"text-sm text-muted-foreground",children:["Limits and duplicate behavior are documented on ",e.jsx("a",{href:"/rate-limits",children:"the policy page"}),"."]}),e.jsx("div",{className:"mt-4 space-y-3",children:a.data.submissions.map(r=>e.jsxs("article",{className:"rounded-md border p-4",children:[e.jsx("strong",{children:r.edit_type})," · ",r.status,e.jsxs("details",{className:"mt-2 text-xs",children:[e.jsx("summary",{children:"Original and applied payload"}),e.jsx("pre",{children:JSON.stringify({proposed:r.proposed_payload,applied:r.applied_payload},null,2)})]}),r.review_reason&&e.jsx("p",{children:r.review_reason})]},r.id))})]})]}):e.jsx("div",{className:"page",children:e.jsx("h1",{children:"Profile not found"})})};export{x as default}; +import{az as n,u as i,b as o,j as e,ao as d}from"./index-D2fBL-s6.js";import{C as l}from"./OrganizationContributionGraph-BFOi-mI4.js";import"./skeleton-BDwfco0_.js";import"./catalog-5AxvKr4D.js";const c={async get(s){const a=await n(`/profiles/${encodeURIComponent(s)}`),r=await a.json();if(!a.redirected)return r;const t=decodeURIComponent(new URL(a.url).pathname.split("/").pop()||r.username);return{...r,username:t,redirected_from_alias:!0}}},x=()=>{const{username:s=""}=i(),a=o({queryKey:["user-profile",s.toLowerCase()],queryFn:()=>c.get(s)});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(l,{data:a.data.calendar,organizationName:`@${a.data.username}`,title:"Canonical contributions",noun:"contribution"}),a.data.is_owner&&e.jsxs("section",{className:"mt-10",children:[e.jsx("h2",{children:"Your submissions"}),e.jsxs("p",{className:"text-sm text-muted-foreground",children:["Limits and duplicate behavior are documented on ",e.jsx("a",{href:"/rate-limits",children:"the policy page"}),"."]}),e.jsx("div",{className:"mt-4 space-y-3",children:a.data.submissions.map(r=>e.jsxs("article",{className:"rounded-md border p-4",children:[e.jsx("strong",{children:r.edit_type})," · ",r.status,e.jsxs("details",{className:"mt-2 text-xs",children:[e.jsx("summary",{children:"Original and applied payload"}),e.jsx("pre",{children:JSON.stringify({proposed:r.proposed_payload,applied:r.applied_payload},null,2)})]}),r.review_reason&&e.jsx("p",{children:r.review_reason})]},r.id))})]})]}):e.jsx("div",{className:"page",children:e.jsx("h1",{children:"Profile not found"})})};export{x as default}; diff --git a/assets/account-Ck5qYpM8.js b/assets/account-BHlQBDNT.js similarity index 89% rename from assets/account-Ck5qYpM8.js rename to assets/account-BHlQBDNT.js index 71293f87ea9d56eaf479945d2140f818311fbe55..5a539052bbc35bf17f169643ac6fcfd0e85e3d1b 100644 --- a/assets/account-Ck5qYpM8.js +++ b/assets/account-BHlQBDNT.js @@ -1 +1 @@ -import{ac as r}from"./index-CTkdBAwI.js";class t{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 m=new t(r);export{m as a}; +import{ac as r}from"./index-D2fBL-s6.js";class t{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 m=new t(r);export{m as a}; diff --git a/assets/activity-BI3KqxVx.js b/assets/activity-DWWgzth6.js similarity index 89% rename from assets/activity-BI3KqxVx.js rename to assets/activity-DWWgzth6.js index cfb76b9e2ccb3afec2add35acd1c382a5b2eeda8..4f269976fbdf207e7ee268b4d4fab805e1b7c999 100644 --- a/assets/activity-BI3KqxVx.js +++ b/assets/activity-DWWgzth6.js @@ -1,4 +1,4 @@ -import{c as t}from"./index-CTkdBAwI.js";/** +import{c as t}from"./index-D2fBL-s6.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/alert-5nuL0v_r.js b/assets/alert-PnePcfgX.js similarity index 92% rename from assets/alert-5nuL0v_r.js rename to assets/alert-PnePcfgX.js index bf9d808d056639c2c920c860f0f5bc6951de7129..fed4fce6cdd766343e6de06f8f19a3fb6a2bf2c2 100644 --- a/assets/alert-5nuL0v_r.js +++ b/assets/alert-PnePcfgX.js @@ -1 +1 @@ -import{f as r,j as s,I as l,ae as i}from"./index-CTkdBAwI.js";const o=i("relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),n=r.forwardRef(({className:e,variant:t,...a},d)=>s.jsx("div",{ref:d,role:"alert",className:l(o({variant:t}),e),...a}));n.displayName="Alert";const v=r.forwardRef(({className:e,...t},a)=>s.jsx("h5",{ref:a,className:l("mb-1 font-medium leading-none tracking-tight",e),...t}));v.displayName="AlertTitle";const c=r.forwardRef(({className:e,...t},a)=>s.jsx("div",{ref:a,className:l("text-sm [&_p]:leading-relaxed",e),...t}));c.displayName="AlertDescription";export{n as A,c as a}; +import{f as r,j as s,I as l,ae as i}from"./index-D2fBL-s6.js";const o=i("relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),n=r.forwardRef(({className:e,variant:t,...a},d)=>s.jsx("div",{ref:d,role:"alert",className:l(o({variant:t}),e),...a}));n.displayName="Alert";const v=r.forwardRef(({className:e,...t},a)=>s.jsx("h5",{ref:a,className:l("mb-1 font-medium leading-none tracking-tight",e),...t}));v.displayName="AlertTitle";const c=r.forwardRef(({className:e,...t},a)=>s.jsx("div",{ref:a,className:l("text-sm [&_p]:leading-relaxed",e),...t}));c.displayName="AlertDescription";export{n as A,c as a}; diff --git a/assets/apiErrors-DFeecPSH.js b/assets/apiErrors-DFeecPSH.js deleted file mode 100644 index 8372581c3412e8255fb2ab96c72d81c3de7b07bf..0000000000000000000000000000000000000000 --- a/assets/apiErrors-DFeecPSH.js +++ /dev/null @@ -1 +0,0 @@ -import{A as s}from"./index-CTkdBAwI.js";const i=o=>o instanceof s&&o.status===404;export{i}; diff --git a/assets/apiErrors-DV2aaDjL.js b/assets/apiErrors-DV2aaDjL.js new file mode 100644 index 0000000000000000000000000000000000000000..49bbf124e02a99d5e694a1e853e7caefddac4c2e --- /dev/null +++ b/assets/apiErrors-DV2aaDjL.js @@ -0,0 +1 @@ +import{A as s}from"./index-D2fBL-s6.js";const i=o=>o instanceof s&&o.status===404;export{i}; diff --git a/assets/arrow-left-CROPXr9Q.js b/assets/arrow-left-CzTG6LBL.js similarity index 86% rename from assets/arrow-left-CROPXr9Q.js rename to assets/arrow-left-CzTG6LBL.js index 35f3ac6a86dac6403c42320b7888c6e592c63af2..125e05879f9e08548ee3c626e6610a0baf9933f3 100644 --- a/assets/arrow-left-CROPXr9Q.js +++ b/assets/arrow-left-CzTG6LBL.js @@ -1,4 +1,4 @@ -import{c as e}from"./index-CTkdBAwI.js";/** +import{c as e}from"./index-D2fBL-s6.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/arrow-right-BqOq_ArY.js b/assets/arrow-right-COzkrAUH.js similarity index 86% rename from assets/arrow-right-BqOq_ArY.js rename to assets/arrow-right-COzkrAUH.js index 7cceb6ea27b434f00eb8d9a688d02cc38ab6e20e..083f2f93be4377dfa98dcbcea883ffbad964b18d 100644 --- a/assets/arrow-right-BqOq_ArY.js +++ b/assets/arrow-right-COzkrAUH.js @@ -1,4 +1,4 @@ -import{c as r}from"./index-CTkdBAwI.js";/** +import{c as r}from"./index-D2fBL-s6.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/badge-DIkpOdrw.js b/assets/badge-Pw584nS3.js similarity index 90% rename from assets/badge-DIkpOdrw.js rename to assets/badge-Pw584nS3.js index 378fc33f46733093dd0ad27e77685db29f648f5f..e6171bda55b67c8c2da89ce147293526aa83da2e 100644 --- a/assets/badge-DIkpOdrw.js +++ b/assets/badge-Pw584nS3.js @@ -1 +1 @@ -import{j as n,I as o,ae as a}from"./index-CTkdBAwI.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,I as o,ae as a}from"./index-D2fBL-s6.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-CJEAPbmU.js b/assets/button-D0XfbdrX.js similarity index 89% rename from assets/button-CJEAPbmU.js rename to assets/button-D0XfbdrX.js index 91496b8384a673ef4876ba03b9e5684824f720c6..7651b6f492fd362294c6b8c061609e3799924037 100644 --- a/assets/button-CJEAPbmU.js +++ b/assets/button-D0XfbdrX.js @@ -1 +1 @@ -import{f as a,j as d,aA as u,I as c,ae as f}from"./index-CTkdBAwI.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{f as a,j as d,aA as u,I as c,ae as f}from"./index-D2fBL-s6.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-ZV4aeC2F.js b/assets/catalog-5AxvKr4D.js similarity index 97% rename from assets/catalog-ZV4aeC2F.js rename to assets/catalog-5AxvKr4D.js index 45fc02c6dd58e3854bc98e7dd0007d540f4f04bc..df3d72e66e6fab5c6da9af79fcb691e4de5a274f 100644 --- a/assets/catalog-ZV4aeC2F.js +++ b/assets/catalog-5AxvKr4D.js @@ -1 +1 @@ -import{ac as o}from"./index-CTkdBAwI.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":""}`)}searchOrganizations(e,t){return this.request(s("/organizations/",{q:e,limit:t}))}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{ac as o}from"./index-D2fBL-s6.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":""}`)}searchOrganizations(e,t){return this.request(s("/organizations/",{q:e,limit:t}))}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-Dr1lXe8V.js b/assets/chat-BOZIonsX.js similarity index 98% rename from assets/chat-Dr1lXe8V.js rename to assets/chat-BOZIonsX.js index aea24156dc810c856458074941a63466faaab25c..6c0181737e514caf0f9d352ceedc050c55e42aea 100644 --- a/assets/chat-Dr1lXe8V.js +++ b/assets/chat-BOZIonsX.js @@ -1 +1 @@ -import{a5 as i,ac as p,ay as h,az as m}from"./index-CTkdBAwI.js";const c=encodeURIComponent,n=s=>`/chat/artifacts/${c(s)}`,a=(s,e)=>`${n(s)}/versions/${c(e)}`,u=s=>s.split("/").map(encodeURIComponent).join("/"),S={preview:(s,e)=>i(`/api/v1${a(s,e)}/preview`),file:(s,e,t,r)=>i(`/api/v1${a(s,e)}/${t}/${u(r)}`),pdfExport:s=>i(`/api/v1${n(s)}/export/pdf`),sourceZip:(s,e)=>i(`/api/v1${a(s,e)}/export/source.zip`),sharedRoot:(s,e)=>i(`/api/v1/chat/shares/${c(s)}/artifacts/${c(e)}`)};class l{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"})}getAutocompleteVocabulary(){return this.request("/chat/autocomplete-vocabulary")}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 h(`/chat/latency/${encodeURIComponent(e)}`,{method:"POST",keepalive:!0,body:JSON.stringify(t)})}reportFeedback(e,t,r){return this.request(`/chat/messages/${encodeURIComponent(e)}/feedback`,{method:"POST",body:JSON.stringify({value:t,...r?{comment:r}:{}})})}getPosterVersions(e){return this.request(n(e),{cache:"no-store"}).then(t=>t.versions)}getPosterManifest(e,t){return this.request(`${a(e,t)}/manifest`,{cache:"no-store"})}getLatexPaper(e){return this.request(n(e),{cache:"no-store"})}getLatexPaperHistory(e,t){const r=new URLSearchParams({limit:"20"});return t&&r.set("cursor",t),this.request(`${n(e)}/versions?${r}`,{cache:"no-store"})}getLatexPaperManifest(e,t){return this.request(`${a(e,t)}/manifest`,{cache:"no-store"})}getArtifactSource(e,t,r){return m(`${a(e,t)}/source/${u(r)}`,{cache:"no-store"}).then(o=>o.text())}saveLatexPaper(e,t,r){return this.request(`${n(e)}/save-compile`,{method:"POST",body:JSON.stringify({expected_parent_version_id:t,files:Object.entries(r).map(([o,d])=>({path:o,content:d}))})})}restoreLatexPaperVersion(e,t,r){return this.request(`${n(e)}/versions/restore`,{method:"POST",body:JSON.stringify({source_version_id:t,expected_parent_version_id:r})})}uploadLatexPaperFigure(e,t,r){const o=new FormData;return o.set("expected_parent_version_id",t),o.set("path",`figures/${r.name}`),o.set("figure",r),this.request(`${n(e)}/figures`,{method:"POST",body:o})}refreshLatexPaperCompile(e){return this.request(`${n(e)}/refresh-compile`,{method:"POST"})}stream(e,t){return h("/chat/stream",{method:"POST",headers:{Accept:"text/event-stream"},body:JSON.stringify(e),signal:t})}resumeStream(e,t,r){return h(`/chat/sessions/${encodeURIComponent(e)}/stream`,{method:"GET",headers:{Accept:"text/event-stream",...r&&r>0?{"Last-Event-ID":String(r)}:{}},signal:t})}}const f=new l(p);export{S as a,f as c}; +import{a5 as i,ac as p,ay as h,az as m}from"./index-D2fBL-s6.js";const c=encodeURIComponent,n=s=>`/chat/artifacts/${c(s)}`,a=(s,e)=>`${n(s)}/versions/${c(e)}`,u=s=>s.split("/").map(encodeURIComponent).join("/"),S={preview:(s,e)=>i(`/api/v1${a(s,e)}/preview`),file:(s,e,t,r)=>i(`/api/v1${a(s,e)}/${t}/${u(r)}`),pdfExport:s=>i(`/api/v1${n(s)}/export/pdf`),sourceZip:(s,e)=>i(`/api/v1${a(s,e)}/export/source.zip`),sharedRoot:(s,e)=>i(`/api/v1/chat/shares/${c(s)}/artifacts/${c(e)}`)};class l{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"})}getAutocompleteVocabulary(){return this.request("/chat/autocomplete-vocabulary")}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 h(`/chat/latency/${encodeURIComponent(e)}`,{method:"POST",keepalive:!0,body:JSON.stringify(t)})}reportFeedback(e,t,r){return this.request(`/chat/messages/${encodeURIComponent(e)}/feedback`,{method:"POST",body:JSON.stringify({value:t,...r?{comment:r}:{}})})}getPosterVersions(e){return this.request(n(e),{cache:"no-store"}).then(t=>t.versions)}getPosterManifest(e,t){return this.request(`${a(e,t)}/manifest`,{cache:"no-store"})}getLatexPaper(e){return this.request(n(e),{cache:"no-store"})}getLatexPaperHistory(e,t){const r=new URLSearchParams({limit:"20"});return t&&r.set("cursor",t),this.request(`${n(e)}/versions?${r}`,{cache:"no-store"})}getLatexPaperManifest(e,t){return this.request(`${a(e,t)}/manifest`,{cache:"no-store"})}getArtifactSource(e,t,r){return m(`${a(e,t)}/source/${u(r)}`,{cache:"no-store"}).then(o=>o.text())}saveLatexPaper(e,t,r){return this.request(`${n(e)}/save-compile`,{method:"POST",body:JSON.stringify({expected_parent_version_id:t,files:Object.entries(r).map(([o,d])=>({path:o,content:d}))})})}restoreLatexPaperVersion(e,t,r){return this.request(`${n(e)}/versions/restore`,{method:"POST",body:JSON.stringify({source_version_id:t,expected_parent_version_id:r})})}uploadLatexPaperFigure(e,t,r){const o=new FormData;return o.set("expected_parent_version_id",t),o.set("path",`figures/${r.name}`),o.set("figure",r),this.request(`${n(e)}/figures`,{method:"POST",body:o})}refreshLatexPaperCompile(e){return this.request(`${n(e)}/refresh-compile`,{method:"POST"})}stream(e,t){return h("/chat/stream",{method:"POST",headers:{Accept:"text/event-stream"},body:JSON.stringify(e),signal:t})}resumeStream(e,t,r){return h(`/chat/sessions/${encodeURIComponent(e)}/stream`,{method:"GET",headers:{Accept:"text/event-stream",...r&&r>0?{"Last-Event-ID":String(r)}:{}},signal:t})}}const f=new l(p);export{S as a,f as c}; diff --git a/assets/chatLifecycle-MnB7vIxs.js b/assets/chatLifecycle-nMvmiYGF.js similarity index 99% rename from assets/chatLifecycle-MnB7vIxs.js rename to assets/chatLifecycle-nMvmiYGF.js index 64414eff21e6bcb9c8e6f156f2484910572d6049..b06ede621445642b62bc26f8e4efd11726b14182 100644 --- a/assets/chatLifecycle-MnB7vIxs.js +++ b/assets/chatLifecycle-nMvmiYGF.js @@ -1,4 +1,4 @@ -var wL=Object.defineProperty;var ck=n=>{throw TypeError(n)};var _L=(n,e,t)=>e in n?wL(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var ae=(n,e,t)=>_L(n,typeof e!="symbol"?e+"":e,t),J0=(n,e,t)=>e.has(n)||ck("Cannot "+t);var f=(n,e,t)=>(J0(n,e,"read from private field"),t?t.call(n):e.get(n)),M=(n,e,t)=>e.has(n)?ck("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(n):e.set(n,t),$=(n,e,t,s)=>(J0(n,e,"write to private field"),s?s.call(n,t):e.set(n,t),t),P=(n,e,t)=>(J0(n,e,"access private method"),t);var os=(n,e,t,s)=>({set _(i){$(n,e,i,t)},get _(){return f(n,e,s)}});import{c as To,f as V,j as S,V as ee,b as yo,a4 as G_,a5 as SL,L as Md,a6 as xL,X as n0,a7 as um,a8 as s0,a9 as kL,l as FC,aa as Id,A as AL,C as EL}from"./index-CTkdBAwI.js";import{u as zC,a as CL,c as $L,P as HC,i as TL,b as BC,e as K_,A as PL,o as RL,U as ML,V as IL,W as OL,X as NL,Y as LL,Z as DL,_ as qC,$ as jL}from"./chatSessions-DFZee9F6.js";/* empty css */import{H as Ip,a as Op,b as Np}from"./hover-card-murUA8RP.js";import{f as FL,i as VC,p as zL,C as HL,a as BL,T as qL}from"./CatalogEntityPreviewLink-BtlbiZfu.js";import{G as i0}from"./github-B1HnPn8H.js";import{F as UC}from"./file-text-C_y5yA3N.js";import{r as VL,a as UL,P as r0,c as WL}from"./PaperPreviewLink-gDkLaZRD.js";import{M as GL,d as KL}from"./index-RLQgt3ff.js";import{r as ZL}from"./index-BTuG6PF7.js";import{u as ad}from"./useMutation-DXSljxHA.js";import{c as ts,a as zo}from"./chat-Dr1lXe8V.js";import{T as XL}from"./thumbs-up-CYylDqig.js";import{C as YL}from"./copy-CSFOf_JK.js";import{q as o0}from"./queryOptions-C9woPjwX.js";import{A as JL}from"./arrow-left-CROPXr9Q.js";import{E as WC}from"./external-link-DK_uOtfh.js";import{P as QL}from"./plus-Dhoq_Vs9.js";import{S as eD}from"./search-Di2HpIcQ.js";import{C as GC,a as KC}from"./chevron-up-C4mc56q2.js";import{A as tD}from"./AuthorAvatar-DjiI2pGP.js";import{p as nD}from"./papers-POQWk4vk.js";/** +var wL=Object.defineProperty;var ck=n=>{throw TypeError(n)};var _L=(n,e,t)=>e in n?wL(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var ae=(n,e,t)=>_L(n,typeof e!="symbol"?e+"":e,t),J0=(n,e,t)=>e.has(n)||ck("Cannot "+t);var f=(n,e,t)=>(J0(n,e,"read from private field"),t?t.call(n):e.get(n)),M=(n,e,t)=>e.has(n)?ck("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(n):e.set(n,t),$=(n,e,t,s)=>(J0(n,e,"write to private field"),s?s.call(n,t):e.set(n,t),t),P=(n,e,t)=>(J0(n,e,"access private method"),t);var os=(n,e,t,s)=>({set _(i){$(n,e,i,t)},get _(){return f(n,e,s)}});import{c as To,f as V,j as S,V as ee,b as yo,a4 as G_,a5 as SL,L as Md,a6 as xL,X as n0,a7 as um,a8 as s0,a9 as kL,l as FC,aa as Id,A as AL,C as EL}from"./index-D2fBL-s6.js";import{u as zC,a as CL,c as $L,P as HC,i as TL,b as BC,e as K_,A as PL,o as RL,U as ML,V as IL,W as OL,X as NL,Y as LL,Z as DL,_ as qC,$ as jL}from"./chatSessions-CoHSP58H.js";/* empty css */import{H as Ip,a as Op,b as Np}from"./hover-card-DWpZK4fW.js";import{f as FL,i as VC,p as zL,C as HL,a as BL,T as qL}from"./CatalogEntityPreviewLink-xL6TDpUk.js";import{G as i0}from"./github-DcIeypA5.js";import{F as UC}from"./file-text-CikzkPqz.js";import{r as VL,a as UL,P as r0,c as WL}from"./PaperPreviewLink-BZuRBR1p.js";import{M as GL,d as KL}from"./index-BPshewTi.js";import{r as ZL}from"./index-BtZPsygG.js";import{u as ad}from"./useMutation-9dlTbuQj.js";import{c as ts,a as zo}from"./chat-BOZIonsX.js";import{T as XL}from"./thumbs-up-BnMguJ3s.js";import{C as YL}from"./copy-CcyqVsMW.js";import{q as o0}from"./queryOptions-C9woPjwX.js";import{A as JL}from"./arrow-left-CzTG6LBL.js";import{E as WC}from"./external-link-Ddavpnin.js";import{P as QL}from"./plus-BI8-JXK0.js";import{S as eD}from"./search-0R_Hc3S2.js";import{C as GC,a as KC}from"./chevron-up-B9KJ5aUJ.js";import{A as tD}from"./AuthorAvatar-C8tz_syh.js";import{p as nD}from"./papers-khuZaSFb.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/chatSessions-DFZee9F6.js b/assets/chatSessions-CoHSP58H.js similarity index 99% rename from assets/chatSessions-DFZee9F6.js rename to assets/chatSessions-CoHSP58H.js index c97eb293e2e950acdccb08aa99fa7173977720ff..f20eb7f301ff80791e305b3f256f26688101c3af 100644 --- a/assets/chatSessions-DFZee9F6.js +++ b/assets/chatSessions-CoHSP58H.js @@ -1,4 +1,4 @@ -import{j as p,V as f,b as oe,A as Ce,ab as xe}from"./index-CTkdBAwI.js";import{c as k}from"./chat-Dr1lXe8V.js";import{p as Re}from"./papers-POQWk4vk.js";const et=({light:e})=>p.jsx("span",{className:`chat-spinner${e?" chat-spinner-light":""}`}),tt=({open:e})=>p.jsx("svg",{className:`chat-chev${e?" chat-chev-open":""}`,width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:p.jsx("path",{d:"m6 9 6 6 6-6"})}),rt=()=>p.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[p.jsx("circle",{cx:"12",cy:"12",r:"9"}),p.jsx("path",{d:"m9 12 2 2 4-4"})]}),nt=({size:e=14})=>p.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[p.jsx("circle",{cx:"11",cy:"11",r:"7"}),p.jsx("path",{d:"m21 21-4.3-4.3"})]}),ot=()=>p.jsx("svg",{width:"17",height:"17",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",children:p.jsx("path",{d:"M12 19V5M5 12l7-7 7 7"})}),at=()=>p.jsx("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:p.jsx("path",{d:"M12 5v14M5 12h14"})}),st=()=>p.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",children:[p.jsx("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"}),p.jsx("path",{d:"M9 4v16"})]}),it=()=>p.jsx("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:p.jsx("path",{d:"M3 6h18M8 6V4a1 1 0 0 1 1-1h6a1 1 0 0 1 1 1v2M6 6l1 14a2 2 0 0 0 2 2h6a2 2 0 0 0 2-2l1-14"})}),ct=({text:e,mentions:t,scrollTop:r=0,variant:n="composer",completion:o=""})=>{const s=[];let i=0;for(const a of[...t].sort((u,d)=>u.start-d.start)){const u=e.slice(a.start,a.end),d=u===a.title||u===`@${a.title}`;a.starte.length||!d||(s.push(e.slice(i,a.start)),s.push(p.jsx("span",{className:`chat-paper-inline-highlight${a.unavailable?" is-unavailable":""}`,"data-paper-route-id":a.route_id,children:u},a.key)),i=a.end)}return s.push(e.slice(i)),o&&s.push(p.jsx("span",{className:"chat-prompt-completion",children:o},"completion")),e.endsWith(` +import{j as p,V as f,b as oe,A as Ce,ab as xe}from"./index-D2fBL-s6.js";import{c as k}from"./chat-BOZIonsX.js";import{p as Re}from"./papers-khuZaSFb.js";const et=({light:e})=>p.jsx("span",{className:`chat-spinner${e?" chat-spinner-light":""}`}),tt=({open:e})=>p.jsx("svg",{className:`chat-chev${e?" chat-chev-open":""}`,width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:p.jsx("path",{d:"m6 9 6 6 6-6"})}),rt=()=>p.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[p.jsx("circle",{cx:"12",cy:"12",r:"9"}),p.jsx("path",{d:"m9 12 2 2 4-4"})]}),nt=({size:e=14})=>p.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[p.jsx("circle",{cx:"11",cy:"11",r:"7"}),p.jsx("path",{d:"m21 21-4.3-4.3"})]}),ot=()=>p.jsx("svg",{width:"17",height:"17",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",children:p.jsx("path",{d:"M12 19V5M5 12l7-7 7 7"})}),at=()=>p.jsx("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:p.jsx("path",{d:"M12 5v14M5 12h14"})}),st=()=>p.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",children:[p.jsx("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"}),p.jsx("path",{d:"M9 4v16"})]}),it=()=>p.jsx("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:p.jsx("path",{d:"M3 6h18M8 6V4a1 1 0 0 1 1-1h6a1 1 0 0 1 1 1v2M6 6l1 14a2 2 0 0 0 2 2h6a2 2 0 0 0 2-2l1-14"})}),ct=({text:e,mentions:t,scrollTop:r=0,variant:n="composer",completion:o=""})=>{const s=[];let i=0;for(const a of[...t].sort((u,d)=>u.start-d.start)){const u=e.slice(a.start,a.end),d=u===a.title||u===`@${a.title}`;a.starte.length||!d||(s.push(e.slice(i,a.start)),s.push(p.jsx("span",{className:`chat-paper-inline-highlight${a.unavailable?" is-unavailable":""}`,"data-paper-route-id":a.route_id,children:u},a.key)),i=a.end)}return s.push(e.slice(i)),o&&s.push(p.jsx("span",{className:"chat-prompt-completion",children:o},"completion")),e.endsWith(` `)&&s.push("​"),p.jsx("div",{"aria-hidden":"true",className:`chat-paper-highlight-layer chat-paper-highlight-layer-${n}`,children:p.jsx("div",{style:{transform:`translateY(-${r}px)`},children:s})})},lt=({open:e,query:t,results:r,activeIndex:n,loading:o,error:s,onSelect:i,id:a="chat-paper-picker",optionIdPrefix:u="chat-paper-option"})=>{if(!e)return null;const d=t.trim()?o?"Searching papers…":s?"Paper search is unavailable":r.length?`${r.length} paper${r.length===1?"":"s"} found`:"No papers found":"Type to search papers";return p.jsxs("div",{className:"chat-paper-picker",id:a,role:"listbox","aria-label":"Paper results",children:[p.jsx("div",{className:"chat-paper-picker-status",role:"status","aria-live":"polite",children:d}),r.map((h,l)=>{const O=h.arxiv_id||h.id,L=h.arxiv_id||(()=>{try{return h.source_url?new URL(h.source_url).hostname:"External resource"}catch{return"External resource"}})();return p.jsxs("button",{type:"button",id:`${u}-${l}`,role:"option","aria-selected":l===n,className:`chat-paper-option${l===n?" is-active":""}`,onMouseDown:Y=>{Y.preventDefault(),i(h)},children:[p.jsx("span",{className:"chat-paper-option-title",children:h.title}),p.jsx("span",{className:"chat-paper-option-meta",children:L})]},O)})]})},ke=["What are decision models?","Find relevant papers on RLVR","What's the state-of-the-art for real-time object detection?"],ut=["Summarize the main contributions","Explain in simple terms","Identify the main limitations"],Ae=[...ke,"What are the latest papers on ","Which benchmarks are used for ","Which methods work best for ","How does ","Explain how ","Compare ","Summarize the key contributions of "],De=3,Ie=4,Le=new Set(["about","all","and","are","best","can","compare","does","explain","find","for","from","give","how","into","latest","list","method","methods","model","models","new","paper","papers","recent","show","state","summarize","task","tasks","the","this","use","what","when","where","which","who","why","with","work"]),Me=new RegExp(`(?:^|(?<=[\\s("'“‘]))(?=\\S)`,"g"),Pe=e=>{const t=e.toLowerCase(),r=Ae.find(n=>n.length>e.length&&n.toLowerCase().startsWith(t));return r?r.slice(e.length):""},Ne=(e,t)=>{const r=[...e.matchAll(Me)].map(n=>n.index??0);for(const n of r.slice(-4)){const o=e.slice(n),s=o.toLowerCase(),i=/\s/.test(o);if(o.length<(i?De:Ie)||!i&&Le.has(s))continue;const a=t.find(u=>u.length>o.length&&u.toLowerCase().startsWith(s));if(a)return a.slice(o.length)}return""},Ye=(e,t)=>!e.trim()||/\s$/.test(e)?"":Pe(e)||Ne(e,t);function dt(e,t=!1){var h;const r=e.text,[n,o]=f.useState(null),s=oe({queryKey:["chatAutocompleteVocabulary"],queryFn:()=>k.getAutocompleteVocabulary(),enabled:r.length>0,staleTime:1/0,gcTime:1/0,retry:!1}),i=(n==null?void 0:n.text)===r?n.atEnd:!0,a=e.paperMentions.some(l=>l.end===r.length);return{completion:!t&&i&&!a?Ye(r,((h=s.data)==null?void 0:h.names)??[]):"",trackCaret:l=>o({text:l.value,atEnd:l.selectionStart===l.selectionEnd&&l.selectionEnd===l.value.length})}}const pt=e=>e.key==="Tab"&&!e.shiftKey&&!e.altKey&&!e.ctrlKey&&!e.metaKey&&!e.nativeEvent.isComposing,ht=e=>{var r;const t=(r=e.parentElement)==null?void 0:r.querySelector(".chat-paper-highlight-layer");return Math.max(e.scrollHeight,(t==null?void 0:t.scrollHeight)??0)},ae=8e3,se=16384,ie=1e4,C={crossPage:"Select text within one PDF page.",outside:"Select text from the paper, not the surrounding interface.",tooLarge:"Select a shorter passage (maximum 8,000 characters)."};function ce(e){return new TextEncoder().encode(e).length}function le(e){return e.replace(/\r\n/g,` `).replace(/\r/g,` `).replace(/\u00a0/g," ").replace(/[^\S\n]+/g," ").trim()}function ft(e){return`${e.routeId}\0${e.paperVersion}\0${e.page}\0${e.text}`}function mt(e){return{route_id:e.routeId,paper_version:e.paperVersion,page:e.page,text:e.text}}function N(e="",t){return t?{text:e,paperMentions:[],paperSelection:t}:{text:e,paperMentions:[]}}function K(e,t,r){return e.paperSelection?{text:t,paperMentions:r,paperSelection:e.paperSelection}:{text:t,paperMentions:r}}function Fe(e){if(!e||typeof e!="object")return;const t=e;if(typeof t.routeId!="string"||!t.routeId.trim()||typeof t.paperVersion!="string"||!t.paperVersion.trim())return;const r=t.page;if(typeof r!="number"||!Number.isInteger(r)||r<1||r>ie||typeof t.text!="string")return;const n=le(t.text);if(n&&!(n.length>ae)&&!(ce(n)>se))return{routeId:t.routeId.trim(),paperVersion:t.paperVersion.trim(),page:r,text:n}}function je(e,t){if(typeof e=="string")return N(e);if(!e||typeof e!="object")return t===void 0?null:N(t);const r=e;if(typeof r.text!="string"||!Array.isArray(r.paperMentions))return t===void 0?null:N(t);const n=Fe(r.paperSelection);return n?{text:r.text,paperMentions:r.paperMentions,paperSelection:n}:{text:r.text,paperMentions:r.paperMentions}}function ue(e){return e?e instanceof Element?e:e.parentElement:null}function G(e,t){const r=ue(e);if(!r||!t.contains(r)||!r.closest(".textLayer, .reader-web-document"))return null;const n=r.closest(".pdf-page[data-page], .reader-web-document[data-page]");if(!n||!t.contains(n))return null;const o=Number(n.dataset.page);return!Number.isInteger(o)||o<1||o>ie?null:o}function gt(e){const{selection:t,pagesRoot:r,routeId:n,paperVersion:o,numPages:s}=e;if(!r||!t||t.rangeCount!==1)return t&&t.rangeCount>1?{ok:!1,error:C.crossPage}:{ok:!1,error:null};const i=t.getRangeAt(0);if(i.collapsed)return{ok:!1,error:null};const a=G(i.startContainer,r),u=G(i.endContainer,r),d=ue(i.commonAncestorContainer);if(!d||!r.contains(d))return{ok:!1,error:C.outside};if(a===null||u===null)return{ok:!1,error:C.outside};if(a!==u)return{ok:!1,error:C.crossPage};if(s&&(a<1||a>s))return{ok:!1,error:C.crossPage};const h=t.toString(),l=le(h);return l?l.length>ae||ce(l)>se?{ok:!1,error:C.tooLarge}:{ok:!0,selection:{routeId:n,paperVersion:o,page:a,text:l}}:{ok:!1,error:C.crossPage}}const qe=10,We=3;function z(e,t){const n=e.slice(0,t).lastIndexOf("@");if(n<0)return null;const o=n>0?e[n-1]:"";if(o&&/[\p{L}\p{M}\p{N}_@]/u.test(o))return null;const s=e.slice(n+1,t);return/[\n\r@]/.test(s)?null:{start:n,end:t,query:s}}function X(e,t,r){let n=0;for(;na.end<=n?[a]:a.start>=s?[{...a,start:a.start+i,end:a.end+i}]:[])}function yt({draft:e,onChange:t,enabled:r,textareaRef:n}){var V;const o=`chat-paper-picker-${f.useId().replace(/:/g,"")}`,s=`${o}-option`,[i,a]=f.useState(null),[u,d]=f.useState(""),[h,l]=f.useState(0),[O,L]=f.useState(""),Y=f.useRef(new Set);f.useEffect(()=>{r||a(null)},[r]),f.useEffect(()=>{const c=window.setTimeout(()=>d((i==null?void 0:i.query.trim())??""),150);return()=>window.clearTimeout(c)},[i==null?void 0:i.query]);const D=oe({queryKey:["chat-paper-mention-search",u.toLowerCase()],queryFn:({signal:c})=>Re.search(u,1,10,"hybrid",c),enabled:r&&!!i&&u.length>=1,staleTime:3e4,refetchOnWindowFocus:!1,retry:!1}),y=f.useMemo(()=>{var c;return((c=D.data)==null?void 0:c.results)??[]},[(V=D.data)==null?void 0:V.results]);f.useEffect(()=>l(0),[u]),f.useEffect(()=>{var c;(c=document.getElementById(`${s}-${h}`))==null||c.scrollIntoView({block:"nearest"})},[h,s]);const be=f.useCallback(c=>{var v;if(!r){a(null);return}const m=c??((v=n.current)==null?void 0:v.selectionStart)??e.text.length;if(e.paperMentions.some(T=>m>T.start&&m<=T.end)){a(null);return}a(z(e.text,m))},[e.paperMentions,e.text,r,n]),Oe=f.useCallback((c,m)=>{var M;const v=X(e.text,c,e.paperMentions),T=K(e,c,v);t(T);const E=m??((M=n.current)==null?void 0:M.selectionStart)??c.length;r&&!v.some(P=>E>P.start&&E<=P.end)?a(z(c,E)):a(null)},[e,r,t,n]),W=f.useCallback(c=>{if(!i)return!1;const m=c.arxiv_id||c.id,v=new Set(e.paperMentions.map(I=>I.route_id));if(e.paperMentions.length>=qe)return L("A message can contain at most 10 paper mentions."),!1;if(!v.has(m)&&v.size>=We)return L("A message can attach at most 3 distinct papers."),!1;const T=c.title,E=e.text.slice(i.end),M=E.length===0,P=e.text.slice(0,i.start)+T+(M?" ":"")+E,Ee=X(e.text,P,e.paperMentions),$={key:crypto.randomUUID(),route_id:m,title:c.title,source:c.source==="external"?"external":"arxiv",start:i.start,end:i.start+T.length};return t(K(e,P,[...Ee,$].sort((I,F)=>I.start-F.start))),a(null),L(""),window.requestAnimationFrame(()=>{var F,B;const I=$.end+(M||E.startsWith(" ")?1:0);(F=n.current)==null||F.focus(),(B=n.current)==null||B.setSelectionRange(I,I)}),Y.current.has(m)||(Y.current.add(m),k.prewarmPaperContext(m).catch(()=>{})),!0},[i,e,t,n]),Te=f.useCallback(c=>!i||c.nativeEvent.isComposing?!1:c.key==="Tab"?(a(null),!1):c.key==="Escape"?(c.preventDefault(),a(null),!0):c.key==="ArrowDown"||c.key==="ArrowUp"?(c.preventDefault(),y.length&&l(m=>c.key==="ArrowDown"?(m+1)%y.length:(m-1+y.length)%y.length),!0):c.key==="Home"&&y.length?(c.preventDefault(),l(0),!0):c.key==="End"&&y.length?(c.preventDefault(),l(y.length-1),!0):c.key==="Enter"&&!c.shiftKey?(c.preventDefault(),y[h]?W(y[h]):D.isFetching||a(null),!0):!1,[i,h,y,D.isFetching,W]);return{open:!!i,query:(i==null?void 0:i.query)??"",results:y,activeIndex:h,loading:D.isFetching,error:D.isError,message:O,pickerId:o,optionIdPrefix:s,updateText:Oe,refresh:be,select:W,keyDown:Te,close:()=>a(null)}}const g=(e,t)=>new Promise(r=>{const n=setTimeout(o,e);function o(){t==null||t.removeEventListener("abort",o),clearTimeout(n),r()}t==null||t.addEventListener("abort",o)}),S=e=>({arxiv_id:null,source:"arxiv",source_url:null,thumbnail_url:null,authors:[],published:null,conference:null,citation_count:null,tasks:[],methods:[],repositories:[],project_pages:[],...e}),w={name:"Object Detection",slug:"object-detection"},x={name:"Real-Time Object Detection",slug:"real-time-object-detection"},He={"2502.12524":{route_id:"2502.12524",title:"YOLOv12: Attention-Centric Real-Time Object Detectors",content:"Enhancing the network architecture of the YOLO framework has been crucial for a long time. This work introduces an attention-centric YOLO framework, namely YOLOv12, built around area attention and residual efficient layer aggregation networks (R-ELAN). YOLOv12-N reaches 40.6 mAP at 1.64 ms on a T4 GPU, closing the gap to attention-based detectors without the usual latency penalty and surpassing YOLOv10/YOLOv11 by +1.2–1.6 mAP at matched latency.",content_truncated:!1,metadata:S({arxiv_id:"2502.12524",authors:[{name:"Y. Tian"},{name:"Q. Ye"},{name:"D. Doermann"}],published:"2025-02-18",citation_count:412,tasks:[w,x],methods:[{name:"Area Attention",slug:"area-attention"}],repositories:[{url:"https://github.com/sunsmarterjie/yolov12",stars:18700}]})},"2407.17140":{route_id:"2407.17140",title:"RT-DETRv2: Improved Baseline with Bag-of-Freebies for Real-Time Detection",content:"RT-DETRv2 improves the real-time DETR baseline with selective multi-scale feature extraction, a discrete sampling operator to ease deployment, and training-only 'bag-of-freebies' that add no inference cost. RT-DETRv2-R18/R50/R101 reach 47.9 / 53.4 / 54.3 mAP on COCO at 217 / 108 / 74 FPS on T4 TensorRT FP16, remaining NMS-free end to end.",content_truncated:!1,metadata:S({arxiv_id:"2407.17140",authors:[{name:"W. Lv"},{name:"Y. Zhao"},{name:"J. Chang"}],published:"2024-07-24",citation_count:268,tasks:[w,x],methods:[{name:"DETR",slug:"detr"}],repositories:[{url:"https://github.com/lyuwenyu/RT-DETR",stars:9400}]})},"2410.13842":{route_id:"2410.13842",title:"D-FINE: Redefining Regression as Fine-grained Distribution Refinement",content:"D-FINE reformulates bounding-box regression in DETR-style detectors as iterative refinement of probability distributions (FDR) and adds a localization self-distillation scheme (GO-LSD). D-FINE-L reaches 54.0 mAP at ~9 ms and D-FINE-X 55.8 mAP on COCO while staying real-time on modern GPUs, dominating RT-DETRv2 and YOLOv10 on the accuracy–latency Pareto front.",content_truncated:!1,metadata:S({arxiv_id:"2410.13842",authors:[{name:"Y. Peng"},{name:"H. Li"},{name:"P. Wu"}],published:"2024-10-17",conference:"ICLR 2025",citation_count:187,tasks:[w,x],methods:[{name:"Knowledge Distillation",slug:"knowledge-distillation"}],repositories:[{url:"https://github.com/Peterande/D-FINE",stars:12100}]})},"2406.03459":{route_id:"2406.03459",title:"LW-DETR: A Transformer Replacement to YOLO for Real-Time Detection",content:"LW-DETR pairs a plain ViT encoder with a lightweight DETR decoder and shows the combination outperforms YOLOv8 and YOLO-NAS at comparable latency, arguing transformer detectors are viable even at the fast end of the accuracy–latency curve. Uses multi-level feature aggregation, window-attention interleaving, and IoU-aware classification.",content_truncated:!1,metadata:S({arxiv_id:"2406.03459",authors:[{name:"Q. Chen"},{name:"X. Su"},{name:"X. Zhang"}],published:"2024-06-05",citation_count:94,tasks:[w,x],methods:[{name:"Vision Transformer",slug:"vision-transformer"}],repositories:[{url:"https://github.com/Atten4Vis/LW-DETR",stars:5200}]})},"2304.08069":{route_id:"2304.08069",title:"DETRs Beat YOLOs on Real-time Object Detection",content:"RT-DETR is the first real-time end-to-end object detector, built on an efficient hybrid encoder that decouples intra-scale interaction and cross-scale fusion, plus IoU-aware query selection. RT-DETR-R50 achieves 53.1 mAP at 108 FPS on COCO, beating comparably sized YOLO detectors in both speed and accuracy while eliminating NMS entirely; its Figure 1 accuracy–latency plot became the reference for later real-time detectors.",content_truncated:!1,metadata:S({arxiv_id:"2304.08069",authors:[{name:"Y. Zhao"},{name:"W. Lv"},{name:"S. Xu"}],published:"2023-04-17",conference:"CVPR 2024",citation_count:2310,tasks:[w,x],methods:[{name:"DETR",slug:"detr"}],repositories:[{url:"https://github.com/lyuwenyu/RT-DETR",stars:9400}]})},"2405.14458":{route_id:"2405.14458",title:"YOLOv10: Real-Time End-to-End Object Detection",content:"YOLOv10 removes NMS from the YOLO pipeline via consistent dual assignments during training and applies a holistic efficiency–accuracy driven design across the architecture. YOLOv10-S is 1.8x faster than RT-DETR-R18 at similar COCO accuracy; the family spans 46.3–54.4 mAP with substantially lower end-to-end latency than prior YOLOs because post-processing disappears.",content_truncated:!1,metadata:S({arxiv_id:"2405.14458",authors:[{name:"A. Wang"},{name:"H. Chen"},{name:"L. Liu"}],published:"2024-05-23",conference:"NeurIPS 2024",citation_count:1650,tasks:[w,x],methods:[{name:"NMS-free Training",slug:"nms-free-training"}],repositories:[{url:"https://github.com/THU-MIG/yolov10",stars:44200}]})},"2401.17270":{route_id:"2401.17270",title:"YOLO-World: Real-Time Open-Vocabulary Object Detection",content:"YOLO-World extends the YOLO paradigm to open-vocabulary detection through vision-language modeling with a re-parameterizable vision-language path aggregation network (RepVL-PAN) and region-text contrastive pretraining. It detects categories never seen at training time while running at 35+ FPS, and its prompt-then-detect deployment re-parameterizes text embeddings for zero runtime text-encoder cost.",content_truncated:!1,metadata:S({arxiv_id:"2401.17270",authors:[{name:"T. Cheng"},{name:"L. Song"},{name:"Y. Ge"}],published:"2024-01-30",conference:"CVPR 2024",citation_count:890,tasks:[{name:"Open-Vocabulary Object Detection",slug:"open-vocabulary-object-detection"},w],methods:[{name:"Contrastive Learning",slug:"contrastive-learning"}],repositories:[{url:"https://github.com/AILab-CVC/YOLO-World",stars:16800}]})},158342:{route_id:"158342",title:"Ultralytics YOLO: real-time detection framework and model zoo",content:"Official Ultralytics framework release covering YOLO11 and YOLOv12 deployment: pretrained COCO checkpoints from nano to x-large, TensorRT/ONNX/CoreML export paths, and reproducible latency benchmarks on T4, Jetson Orin, and CPU targets. Widely used as the practical baseline for real-time detection deployments.",content_truncated:!1,metadata:S({source:"external",source_url:"https://docs.ultralytics.com/models/",authors:[{name:"Ultralytics"}],published:"2025-01-02",tasks:[w,x],repositories:[{url:"https://github.com/ultralytics/ultralytics",stars:46e3}],project_pages:[{url:"https://docs.ultralytics.com"}]})}},de=e=>e.map(t=>He[t]),J=de(["2502.12524","2407.17140","2410.13842","2406.03459","2304.08069","2405.14458","2401.17270","158342"]),Q=de(["2410.13842","2502.12524","2407.17140","2405.14458","2304.08069"]),Z="The user wants the current state-of-the-art for real-time object detection. That's a moving target split across two lineages — the YOLO family (fast CNN one-stage detectors) and the DETR family (transformer, end-to-end, NMS-free). I should ground the answer in recent papers benchmarked on COCO with reported latency or FPS, not just accuracy. Let me start with a broad hybrid search, see which papers surface, then run a second, narrower query to pin down the head-to-head COCO mAP vs latency trade-offs before I write anything.",ee="Good — both lineages are well represented. YOLOv12, YOLOv10 and RT-DETRv2 / D-FINE keep coming up. To actually rank them I need the accuracy-vs-latency numbers side by side on the same COCO val2017 protocol, so let me narrow the query to the benchmark comparison specifically.",te=`There isn't a single winner — real-time object detection in 2026 is a two-horse race between the [YOLO family](paper:2502.12524) (fast one-stage CNNs) and the end-to-end [DETR family](paper:2304.08069) (NMS-free transformers). Which one is “SOTA” depends entirely on where you sit on the accuracy-vs-latency curve. diff --git a/assets/chevron-up-C4mc56q2.js b/assets/chevron-up-B9KJ5aUJ.js similarity index 91% rename from assets/chevron-up-C4mc56q2.js rename to assets/chevron-up-B9KJ5aUJ.js index 29df754c3667c84eab4f10ecb78c2f3d9c079100..da23f80dd48ef86632f1a6cadd23893f214237d2 100644 --- a/assets/chevron-up-C4mc56q2.js +++ b/assets/chevron-up-B9KJ5aUJ.js @@ -1,4 +1,4 @@ -import{c as o}from"./index-CTkdBAwI.js";/** +import{c as o}from"./index-D2fBL-s6.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/circle-check-C79dB7xO.js b/assets/circle-check-1e3iPSaF.js similarity index 88% rename from assets/circle-check-C79dB7xO.js rename to assets/circle-check-1e3iPSaF.js index 8f046ab2ac12a1f3c78ee6a30765b8b4d7f2b479..0a9305448fe02e8690eb250a03bd9b3a6fe66074 100644 --- a/assets/circle-check-C79dB7xO.js +++ b/assets/circle-check-1e3iPSaF.js @@ -1,4 +1,4 @@ -import{c}from"./index-CTkdBAwI.js";/** +import{c}from"./index-D2fBL-s6.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/codex-CxJ1q9dv.js b/assets/codex-BUTI-2RM.js similarity index 95% rename from assets/codex-CxJ1q9dv.js rename to assets/codex-BUTI-2RM.js index 886ad295840ff3814fb480e640ec4332f416ae7d..aa4688faadeed014c477afb2a0d3f8d39c3a9866 100644 --- a/assets/codex-CxJ1q9dv.js +++ b/assets/codex-BUTI-2RM.js @@ -1 +1 @@ -import{ac as i,a5 as c}from"./index-CTkdBAwI.js";const u="No paper text was available yet. This job starts again automatically within an hour of the paper's Markdown being extracted.",r="/admin/codex-curation/jobs";class n{constructor(e){this.request=e}startPaperJob(e,t){return this.request(`/admin/codex-${e}/jobs`,{method:"POST",body:JSON.stringify({paper_id:t})})}getPaperJob(e,t){return this.request(`/admin/codex-${e}/jobs/${t}`)}cancelPaperJob(e,t){return this.request(`/admin/codex-${e}/jobs/${t}`,{method:"DELETE"})}listJobs(e=100,t={}){const a=new URLSearchParams({limit:String(e)});return Object.entries(t).forEach(([o,s])=>{s&&a.set(o,s)}),this.request(`${r}?${a}`,{cache:"no-store"})}retryJob(e){return this.request(`${r}/${e}/retry`,{method:"POST"})}cancelJob(e){return this.request(`${r}/${e}`,{method:"DELETE"})}async retryTrace(e){await this.request(`${r}/${e}/retry-trace`,{method:"POST"})}async setScheduler(e){await this.request(`${r}/scheduler/${e}`,{method:"POST"})}async promoteBenchmarkCandidate(e,t){await this.request(`${r}/benchmark-candidates/${e}/promote`,{method:"POST",body:JSON.stringify(t)})}async rollbackBenchmarkCandidate(e){await this.request(`${r}/benchmark-candidates/${e}/rollback`,{method:"POST"})}traceUrl(e){return c(`/api/v1${r}/${e}/trace`)}}const m=new n(i);export{u as A,m as c}; +import{ac as i,a5 as c}from"./index-D2fBL-s6.js";const u="No paper text was available yet. This job starts again automatically within an hour of the paper's Markdown being extracted.",r="/admin/codex-curation/jobs";class n{constructor(e){this.request=e}startPaperJob(e,t){return this.request(`/admin/codex-${e}/jobs`,{method:"POST",body:JSON.stringify({paper_id:t})})}getPaperJob(e,t){return this.request(`/admin/codex-${e}/jobs/${t}`)}cancelPaperJob(e,t){return this.request(`/admin/codex-${e}/jobs/${t}`,{method:"DELETE"})}listJobs(e=100,t={}){const a=new URLSearchParams({limit:String(e)});return Object.entries(t).forEach(([o,s])=>{s&&a.set(o,s)}),this.request(`${r}?${a}`,{cache:"no-store"})}retryJob(e){return this.request(`${r}/${e}/retry`,{method:"POST"})}cancelJob(e){return this.request(`${r}/${e}`,{method:"DELETE"})}async retryTrace(e){await this.request(`${r}/${e}/retry-trace`,{method:"POST"})}async setScheduler(e){await this.request(`${r}/scheduler/${e}`,{method:"POST"})}async promoteBenchmarkCandidate(e,t){await this.request(`${r}/benchmark-candidates/${e}/promote`,{method:"POST",body:JSON.stringify(t)})}async rollbackBenchmarkCandidate(e){await this.request(`${r}/benchmark-candidates/${e}/rollback`,{method:"POST"})}traceUrl(e){return c(`/api/v1${r}/${e}/trace`)}}const m=new n(i);export{u as A,m as c}; diff --git a/assets/copy-CSFOf_JK.js b/assets/copy-CcyqVsMW.js similarity index 90% rename from assets/copy-CSFOf_JK.js rename to assets/copy-CcyqVsMW.js index cb6ee135cccf219d74d6baefee56db47c8002c60..dd06a612569b0435687f414d2864ea37bf2801e4 100644 --- a/assets/copy-CSFOf_JK.js +++ b/assets/copy-CcyqVsMW.js @@ -1,4 +1,4 @@ -import{c}from"./index-CTkdBAwI.js";/** +import{c}from"./index-D2fBL-s6.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/curation-BlGrJ3z2.js b/assets/curation-BtfabyzA.js similarity index 98% rename from assets/curation-BlGrJ3z2.js rename to assets/curation-BtfabyzA.js index 9e87f88fea7f3f2dd6068cb0020faeb0a8b75857..563ea70bc639b42a33ffcfdee7c96de8a72aa0d2 100644 --- a/assets/curation-BlGrJ3z2.js +++ b/assets/curation-BtfabyzA.js @@ -1 +1 @@ -var f=Object.defineProperty;var w=(i,e,t)=>e in i?f(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t;var d=(i,e,t)=>w(i,typeof e!="symbol"?e+"":e,t);import{A as l,aR as g,ac as v}from"./index-CTkdBAwI.js";const y={tasks:"tasks",methods:"methods",organizations:"organizations",repositories:"GitHub repositories",project_pages:"project pages",hf_artifacts:"Hugging Face artifacts",source_url:"source URL",x_threads:"X threads",evaluations:"evaluation results"};function _(i){return Object.prototype.hasOwnProperty.call(y,i)}const p="pwc:fresh-auth-edit",c="pwc:fresh-auth-mutation";function E(i){if(typeof window>"u")return;sessionStorage.setItem(p,i);const e=g("/api/v1/auth/hf/login");window.location.assign(`${e}?return_to=${encodeURIComponent(window.location.href)}`)}class S{constructor(e,t=E){d(this,"paperLoads",new Map);d(this,"evaluationLoads",new Map);this.request=e,this.recoverFreshAuth=t}primePaper(e,t=!1){t&&this.paperLoads.delete(e);let s=this.paperLoads.get(e);return s||(s=this.request(`/papers/${e}/curation-state`).catch(o=>{throw this.paperLoads.delete(e),o}),this.paperLoads.set(e,s)),s}primeEvaluations(e,t=!1){t&&this.evaluationLoads.delete(e);let s=this.evaluationLoads.get(e);return s||(s=this.request(`/evaluations/curation-state?paper_id=${e}`).catch(o=>{throw this.evaluationLoads.delete(e),o}),this.evaluationLoads.set(e,s)),s}async mutatePaper(e,t,s,o,a){const r=this.paperLoads.get(e);if(!r)throw new Error("The catalog version was not loaded when this editor opened. Close and reopen the editor.");const h=(await r).sections[t];if(!h)throw new Error(`Missing curation version for ${t}`);return this.mutate(t,o,s,h,a,`paper:${e}:${t}`)}async mutateEvaluations(e,t,s,o){const a=this.evaluationLoads.get(String(e));if(!a)throw new Error("The evaluation version was not loaded when this editor opened. Close and reopen the editor.");const r=(await a).version;return this.mutate("evaluations",s,t,r,o,`paper:${e}:evaluations`)}async mutate(e,t,s,o,a,r){const h=new Headers(a.headers);Object.entries(this.idempotencyHeaders(r,s,o)).forEach(([n,m])=>h.set(n,m));const u={...a,headers:h};try{const n=await this.request(t,u);return this.clearAttempt(u),n}catch(n){throw n instanceof l&&n.status===401&&n.code==="fresh_auth_required"?(this.saveFreshAuthMutation(e,t,s,u),this.recoverFreshAuth(e)):n instanceof l&&n.status===409&&(this.clearAttempt(u),typeof window<"u"&&window.dispatchEvent(new CustomEvent("pwc:catalog-conflict",{detail:{endpoint:t}}))),n}}freshAuthMutationDraft(){const e=sessionStorage.getItem(c);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(c),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(c),sessionStorage.removeItem(p),t}saveFreshAuthMutation(e,t,s,o){const a=Object.fromEntries(new Headers(o.headers).entries()),r=typeof o.body=="string"?o.body:void 0;sessionStorage.setItem(c,JSON.stringify({section:e,endpoint:t,payload:s,options:{method:(o.method??"POST").toUpperCase(),body:r,headers:a}}))}idempotencyHeaders(e,t,s){const o=`pwc:mutation:${e}:${JSON.stringify(t)}`,a=sessionStorage.getItem(o);if(a){const h=JSON.parse(a);return{"Idempotency-Key":h.key,"If-Match":h.version}}const r=crypto.randomUUID();return sessionStorage.setItem(o,JSON.stringify({key:r,version:s})),sessionStorage.setItem(`pwc:mutation-key:${r}`,o),{"Idempotency-Key":r,"If-Match":s}}clearAttempt(e){const t=new Headers(e.headers).get("Idempotency-Key");if(!t)return;const s=sessionStorage.getItem(`pwc:mutation-key:${t}`);s&&sessionStorage.removeItem(s),sessionStorage.removeItem(`pwc:mutation-key:${t}`),this.paperLoads.clear(),this.evaluationLoads.clear()}}const T=new S(v);export{p as F,y as P,_ as i,T as p}; +var f=Object.defineProperty;var w=(i,e,t)=>e in i?f(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t;var d=(i,e,t)=>w(i,typeof e!="symbol"?e+"":e,t);import{A as l,aR as g,ac as v}from"./index-D2fBL-s6.js";const y={tasks:"tasks",methods:"methods",organizations:"organizations",repositories:"GitHub repositories",project_pages:"project pages",hf_artifacts:"Hugging Face artifacts",source_url:"source URL",x_threads:"X threads",evaluations:"evaluation results"};function _(i){return Object.prototype.hasOwnProperty.call(y,i)}const p="pwc:fresh-auth-edit",c="pwc:fresh-auth-mutation";function E(i){if(typeof window>"u")return;sessionStorage.setItem(p,i);const e=g("/api/v1/auth/hf/login");window.location.assign(`${e}?return_to=${encodeURIComponent(window.location.href)}`)}class S{constructor(e,t=E){d(this,"paperLoads",new Map);d(this,"evaluationLoads",new Map);this.request=e,this.recoverFreshAuth=t}primePaper(e,t=!1){t&&this.paperLoads.delete(e);let s=this.paperLoads.get(e);return s||(s=this.request(`/papers/${e}/curation-state`).catch(o=>{throw this.paperLoads.delete(e),o}),this.paperLoads.set(e,s)),s}primeEvaluations(e,t=!1){t&&this.evaluationLoads.delete(e);let s=this.evaluationLoads.get(e);return s||(s=this.request(`/evaluations/curation-state?paper_id=${e}`).catch(o=>{throw this.evaluationLoads.delete(e),o}),this.evaluationLoads.set(e,s)),s}async mutatePaper(e,t,s,o,a){const r=this.paperLoads.get(e);if(!r)throw new Error("The catalog version was not loaded when this editor opened. Close and reopen the editor.");const h=(await r).sections[t];if(!h)throw new Error(`Missing curation version for ${t}`);return this.mutate(t,o,s,h,a,`paper:${e}:${t}`)}async mutateEvaluations(e,t,s,o){const a=this.evaluationLoads.get(String(e));if(!a)throw new Error("The evaluation version was not loaded when this editor opened. Close and reopen the editor.");const r=(await a).version;return this.mutate("evaluations",s,t,r,o,`paper:${e}:evaluations`)}async mutate(e,t,s,o,a,r){const h=new Headers(a.headers);Object.entries(this.idempotencyHeaders(r,s,o)).forEach(([n,m])=>h.set(n,m));const u={...a,headers:h};try{const n=await this.request(t,u);return this.clearAttempt(u),n}catch(n){throw n instanceof l&&n.status===401&&n.code==="fresh_auth_required"?(this.saveFreshAuthMutation(e,t,s,u),this.recoverFreshAuth(e)):n instanceof l&&n.status===409&&(this.clearAttempt(u),typeof window<"u"&&window.dispatchEvent(new CustomEvent("pwc:catalog-conflict",{detail:{endpoint:t}}))),n}}freshAuthMutationDraft(){const e=sessionStorage.getItem(c);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(c),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(c),sessionStorage.removeItem(p),t}saveFreshAuthMutation(e,t,s,o){const a=Object.fromEntries(new Headers(o.headers).entries()),r=typeof o.body=="string"?o.body:void 0;sessionStorage.setItem(c,JSON.stringify({section:e,endpoint:t,payload:s,options:{method:(o.method??"POST").toUpperCase(),body:r,headers:a}}))}idempotencyHeaders(e,t,s){const o=`pwc:mutation:${e}:${JSON.stringify(t)}`,a=sessionStorage.getItem(o);if(a){const h=JSON.parse(a);return{"Idempotency-Key":h.key,"If-Match":h.version}}const r=crypto.randomUUID();return sessionStorage.setItem(o,JSON.stringify({key:r,version:s})),sessionStorage.setItem(`pwc:mutation-key:${r}`,o),{"Idempotency-Key":r,"If-Match":s}}clearAttempt(e){const t=new Headers(e.headers).get("Idempotency-Key");if(!t)return;const s=sessionStorage.getItem(`pwc:mutation-key:${t}`);s&&sessionStorage.removeItem(s),sessionStorage.removeItem(`pwc:mutation-key:${t}`),this.paperLoads.clear(),this.evaluationLoads.clear()}}const T=new S(v);export{p as F,y as P,_ as i,T as p}; diff --git a/assets/database--XDgAVkg.js b/assets/database-Ci0ufNyG.js similarity index 89% rename from assets/database--XDgAVkg.js rename to assets/database-Ci0ufNyG.js index 1287b6da37f4e38092a19d5470b6024cb9863b41..3363dd6784acc07642de97a335913963765eeacd 100644 --- a/assets/database--XDgAVkg.js +++ b/assets/database-Ci0ufNyG.js @@ -1,4 +1,4 @@ -import{c as e}from"./index-CTkdBAwI.js";/** +import{c as e}from"./index-D2fBL-s6.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/dialog-C7LLEadk.js b/assets/dialog-DgUROq2j.js similarity index 96% rename from assets/dialog-C7LLEadk.js rename to assets/dialog-DgUROq2j.js index 809c0f0602be4dc2a82b5909fae57208e4535c55..d0083a1e3d9f6ccca6d668e0bc4cc1f718b25822 100644 --- a/assets/dialog-C7LLEadk.js +++ b/assets/dialog-DgUROq2j.js @@ -1 +1 @@ -import{ag as f,f as l,j as t,ah as p,aj as d,al as g,X as x,I as o,ai as n,am as i,an as r}from"./index-CTkdBAwI.js";const w=f,u=p,c=l.forwardRef(({className:a,...e},s)=>t.jsx(n,{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=n.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(i,{ref:s,className:o("text-lg font-semibold leading-none tracking-tight",a),...e}));D.displayName=i.displayName;const b=l.forwardRef(({className:a,...e},s)=>t.jsx(r,{ref:s,className:o("text-sm text-muted-foreground",a),...e}));b.displayName=r.displayName;export{w as D,y as a,D as b,N as c,b as d,j as e}; +import{ag as f,f as l,j as t,ah as p,aj as d,al as g,X as x,I as o,ai as n,am as i,an as r}from"./index-D2fBL-s6.js";const w=f,u=p,c=l.forwardRef(({className:a,...e},s)=>t.jsx(n,{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=n.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(i,{ref:s,className:o("text-lg font-semibold leading-none tracking-tight",a),...e}));D.displayName=i.displayName;const b=l.forwardRef(({className:a,...e},s)=>t.jsx(r,{ref:s,className:o("text-sm text-muted-foreground",a),...e}));b.displayName=r.displayName;export{w as D,y as a,D as b,N as c,b as d,j as e}; diff --git a/assets/evaluationQueryInvalidation-Dxt6kOu3.js b/assets/evaluationQueryInvalidation-Cs0hE-wT.js similarity index 97% rename from assets/evaluationQueryInvalidation-Dxt6kOu3.js rename to assets/evaluationQueryInvalidation-Cs0hE-wT.js index 3a60d761fdb292f01e00a81efcf8c0e3b3d75f11..d7f6aa21ea240de2da081587ab1a626aba491e65 100644 --- a/assets/evaluationQueryInvalidation-Dxt6kOu3.js +++ b/assets/evaluationQueryInvalidation-Cs0hE-wT.js @@ -1 +1 @@ -var z=a=>{throw TypeError(a)};var I=(a,e,t)=>e.has(a)||z("Cannot "+t);var u=(a,e,t)=>(I(a,e,"read from private field"),t?t.call(a):e.get(a)),v=(a,e,t)=>e.has(a)?z("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(a):e.set(a,t),l=(a,e,t,s)=>(I(a,e,"write to private field"),s?s.call(a,t):e.set(a,t),t),g=(a,e,t)=>(I(a,e,"access private method"),t);import{aB as Y,aF as H,aC as Z,aS as J,aN as N,l as W,aT as ee,aU as se,f as C,aV as te,aW as re,aX as ae,aG as ie,aY as F,aZ as ne,a_ as oe,t as A,q as B}from"./index-CTkdBAwI.js";import{i as ue,a as ce}from"./queryInvalidation-B6btj6xZ.js";function j(a,e){const t=new Set(e);return a.filter(s=>!t.has(s))}function de(a,e,t){const s=a.slice(0);return s[e]=t,s}var _,f,w,E,y,k,x,K,M,P,d,L,D,V,T,$,U,G,he=(G=class extends Y{constructor(e,t,s){super();v(this,d);v(this,_);v(this,f);v(this,w);v(this,E);v(this,y);v(this,k);v(this,x);v(this,K);v(this,M);v(this,P,[]);l(this,_,e),l(this,E,s),l(this,w,[]),l(this,y,[]),l(this,f,[]),this.setQueries(t)}onSubscribe(){this.listeners.size===1&&u(this,y).forEach(e=>{e.subscribe(t=>{g(this,d,$).call(this,e,t)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,u(this,y).forEach(e=>{e.destroy()})}setQueries(e,t){l(this,w,e),l(this,E,t),H.batch(()=>{const s=u(this,y),n=g(this,d,T).call(this,u(this,w));n.forEach(i=>i.observer.setOptions(i.defaultedQueryOptions));const r=n.map(i=>i.observer),o=r.map(i=>i.getCurrentResult()),h=s.length!==r.length,m=r.some((i,b)=>i!==s[b]),S=h||m,c=S?!0:o.some((i,b)=>{const R=u(this,f)[b];return!R||!Z(i,R)});!S&&!c||(S&&(l(this,P,n),l(this,y,r)),l(this,f,o),this.hasListeners()&&(S&&(j(s,r).forEach(i=>{i.destroy()}),j(r,s).forEach(i=>{i.subscribe(b=>{g(this,d,$).call(this,i,b)})})),g(this,d,U).call(this)))})}getCurrentResult(){return u(this,f)}getQueries(){return u(this,y).map(e=>e.getCurrentQuery())}getObservers(){return u(this,y)}getOptimisticResult(e,t){const s=g(this,d,T).call(this,e),n=s.map(o=>o.observer.getOptimisticResult(o.defaultedQueryOptions)),r=s.map(o=>o.defaultedQueryOptions.queryHash);return[n,o=>g(this,d,D).call(this,o??n,t,r),()=>g(this,d,L).call(this,n,s)]}},_=new WeakMap,f=new WeakMap,w=new WeakMap,E=new WeakMap,y=new WeakMap,k=new WeakMap,x=new WeakMap,K=new WeakMap,M=new WeakMap,P=new WeakMap,d=new WeakSet,L=function(e,t){return t.map((s,n)=>{const r=e[n];return s.defaultedQueryOptions.notifyOnChangeProps?r:s.observer.trackResult(r,o=>{t.forEach(h=>{h.observer.trackProp(o)})})})},D=function(e,t,s){if(t){const n=u(this,M),r=s!==void 0&&n!==void 0&&(n.length!==s.length||s.some((o,h)=>o!==n[h]));return(!u(this,k)||u(this,f)!==u(this,K)||r||t!==u(this,x))&&(l(this,x,t),l(this,K,u(this,f)),s!==void 0&&l(this,M,s),l(this,k,J(u(this,k),t(e)))),u(this,k)}return e},V=function(){var e;return((e=u(this,E))==null?void 0:e.combine)!==void 0&&u(this,y).some((t,s)=>{var n;return t.options.suspense&&((n=u(this,f)[s])==null?void 0:n.data)===void 0})},T=function(e){const t=new Map;u(this,y).forEach(n=>{const r=n.options.queryHash;if(!r)return;const o=t.get(r);o?o.push(n):t.set(r,[n])});const s=[];return e.forEach(n=>{var m;const r=u(this,_).defaultQueryOptions(n),h=((m=t.get(r.queryHash))==null?void 0:m.shift())??new N(u(this,_),r);s.push({defaultedQueryOptions:r,observer:h})}),s},$=function(e,t){const s=u(this,y).indexOf(e);s!==-1&&(l(this,f,de(u(this,f),s,t)),g(this,d,U).call(this))},U=function(){var e;if(this.hasListeners()){const t=g(this,d,L).call(this,u(this,f),u(this,P)),s=g(this,d,V).call(this),n=u(this,k),r=s?n:g(this,d,D).call(this,t,(e=u(this,E))==null?void 0:e.combine);(s||n!==r)&&H.batch(()=>{this.listeners.forEach(o=>{o(u(this,f))})})}},G);function ye({queries:a,...e},t){const s=W(),n=ee(),r=se(),o=C.useMemo(()=>a.map(p=>{const Q=s.defaultQueryOptions(p);return Q._optimisticResults=n?"isRestoring":"optimistic",Q}),[a,s,n]);o.forEach(p=>{te(p);const Q=s.getQueryCache().get(p.queryHash);re(p,r,Q)}),ae(r);const[h]=C.useState(()=>new he(s,o,e)),[m,S,c]=h.getOptimisticResult(o,e.combine),i=!n&&e.subscribed!==!1;C.useSyncExternalStore(C.useCallback(p=>i?h.subscribe(H.batchCalls(p)):ie,[h,i]),()=>h.getCurrentResult(),()=>h.getCurrentResult()),C.useEffect(()=>{h.setQueries(o,e)},[o,e,h]);const R=m.some((p,Q)=>F(o[Q],p))?m.flatMap((p,Q)=>{const O=o[Q];if(O&&F(O,p)){const X=new N(s,O);return ne(O,X,r)}return[]}):[];if(R.length>0)throw Promise.all(R);const q=m.find((p,Q)=>{const O=o[Q];return O&&oe({result:p,errorResetBoundary:r,throwOnError:O.throwOnError,query:s.getQueryCache().get(O.queryHash),suspense:O.suspense})});if(q!=null&&q.error)throw q.error;return S(c())}function be(a,e,t,s){const n=new Set(t.flatMap(r=>r.op==="create"?[]:[String(r.evaluation_id)]));return{paperId:a,arxivId:s,contexts:[...e.filter(r=>r.id!==void 0&&n.has(String(r.id))),...t.flatMap(r=>r.op==="delete"?[]:[r.data])]}}function ve(a,e){const t=new Set(e.contexts.flatMap(c=>c.dataset_id==null?[]:[String(c.dataset_id)])),s=new Set(e.contexts.flatMap(c=>c.task_id==null?[]:[String(c.task_id)])),n=new Set([e.paperId]),r=new Set;e.arxivId&&r.add(e.arxivId);const o=new Set(e.contexts.map(c=>`${c.task_id}:${c.dataset_id}`)),h=a.getQueryCache(),m=[...h.findAll({queryKey:A.byDatasetAll}),...h.findAll({queryKey:A.byPaperAll})];for(const c of m)for(const i of c.state.data??[])o.has(`${i.task_id}:${i.dataset_id}`)&&(n.add(String(i.paper_id)),i.paper_arxiv_id&&r.add(i.paper_arxiv_id));ue(a,[...n,...r]),ce(a),a.invalidateQueries({queryKey:A.byPaperAll,predicate:c=>n.has(String(c.queryKey[2]))});const S=c=>t.has(String(c.queryKey[1]));a.invalidateQueries({queryKey:A.byDatasetAll,predicate:S}),a.invalidateQueries({queryKey:B.datasetTasks,predicate:S}),a.invalidateQueries({queryKey:B.datasets,predicate:c=>{const i=c.state.data;return S(c)||!!(i&&t.has(String(i.id)))}}),a.invalidateQueries({queryKey:B.taskPage,predicate:c=>{const i=c.state.data;return s.has(String(c.queryKey[1]))||!!(i&&(s.has(String(i.task.id))||i.subtask_benchmarks.some(b=>s.has(String(b.subtask_id)))||i.benchmarks.some(b=>t.has(String(b.id)))||i.subtask_benchmarks.some(b=>b.benchmarks.some(R=>t.has(String(R.id))))))}}),a.invalidateQueries({queryKey:B.taskBenchmarkTrends,predicate:c=>{const i=c.state.data;return s.has(String(c.queryKey[1]))||!!(i&&s.has(String(i.task_id)))}})}export{be as e,ve as r,ye as u}; +var z=a=>{throw TypeError(a)};var I=(a,e,t)=>e.has(a)||z("Cannot "+t);var u=(a,e,t)=>(I(a,e,"read from private field"),t?t.call(a):e.get(a)),v=(a,e,t)=>e.has(a)?z("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(a):e.set(a,t),l=(a,e,t,s)=>(I(a,e,"write to private field"),s?s.call(a,t):e.set(a,t),t),g=(a,e,t)=>(I(a,e,"access private method"),t);import{aB as Y,aF as H,aC as Z,aS as J,aN as N,l as W,aT as ee,aU as se,f as C,aV as te,aW as re,aX as ae,aG as ie,aY as F,aZ as ne,a_ as oe,t as A,q as B}from"./index-D2fBL-s6.js";import{i as ue,a as ce}from"./queryInvalidation-BVOtRFkG.js";function j(a,e){const t=new Set(e);return a.filter(s=>!t.has(s))}function de(a,e,t){const s=a.slice(0);return s[e]=t,s}var _,f,w,E,y,k,x,K,M,P,d,L,D,V,T,$,U,G,he=(G=class extends Y{constructor(e,t,s){super();v(this,d);v(this,_);v(this,f);v(this,w);v(this,E);v(this,y);v(this,k);v(this,x);v(this,K);v(this,M);v(this,P,[]);l(this,_,e),l(this,E,s),l(this,w,[]),l(this,y,[]),l(this,f,[]),this.setQueries(t)}onSubscribe(){this.listeners.size===1&&u(this,y).forEach(e=>{e.subscribe(t=>{g(this,d,$).call(this,e,t)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,u(this,y).forEach(e=>{e.destroy()})}setQueries(e,t){l(this,w,e),l(this,E,t),H.batch(()=>{const s=u(this,y),n=g(this,d,T).call(this,u(this,w));n.forEach(i=>i.observer.setOptions(i.defaultedQueryOptions));const r=n.map(i=>i.observer),o=r.map(i=>i.getCurrentResult()),h=s.length!==r.length,m=r.some((i,b)=>i!==s[b]),S=h||m,c=S?!0:o.some((i,b)=>{const R=u(this,f)[b];return!R||!Z(i,R)});!S&&!c||(S&&(l(this,P,n),l(this,y,r)),l(this,f,o),this.hasListeners()&&(S&&(j(s,r).forEach(i=>{i.destroy()}),j(r,s).forEach(i=>{i.subscribe(b=>{g(this,d,$).call(this,i,b)})})),g(this,d,U).call(this)))})}getCurrentResult(){return u(this,f)}getQueries(){return u(this,y).map(e=>e.getCurrentQuery())}getObservers(){return u(this,y)}getOptimisticResult(e,t){const s=g(this,d,T).call(this,e),n=s.map(o=>o.observer.getOptimisticResult(o.defaultedQueryOptions)),r=s.map(o=>o.defaultedQueryOptions.queryHash);return[n,o=>g(this,d,D).call(this,o??n,t,r),()=>g(this,d,L).call(this,n,s)]}},_=new WeakMap,f=new WeakMap,w=new WeakMap,E=new WeakMap,y=new WeakMap,k=new WeakMap,x=new WeakMap,K=new WeakMap,M=new WeakMap,P=new WeakMap,d=new WeakSet,L=function(e,t){return t.map((s,n)=>{const r=e[n];return s.defaultedQueryOptions.notifyOnChangeProps?r:s.observer.trackResult(r,o=>{t.forEach(h=>{h.observer.trackProp(o)})})})},D=function(e,t,s){if(t){const n=u(this,M),r=s!==void 0&&n!==void 0&&(n.length!==s.length||s.some((o,h)=>o!==n[h]));return(!u(this,k)||u(this,f)!==u(this,K)||r||t!==u(this,x))&&(l(this,x,t),l(this,K,u(this,f)),s!==void 0&&l(this,M,s),l(this,k,J(u(this,k),t(e)))),u(this,k)}return e},V=function(){var e;return((e=u(this,E))==null?void 0:e.combine)!==void 0&&u(this,y).some((t,s)=>{var n;return t.options.suspense&&((n=u(this,f)[s])==null?void 0:n.data)===void 0})},T=function(e){const t=new Map;u(this,y).forEach(n=>{const r=n.options.queryHash;if(!r)return;const o=t.get(r);o?o.push(n):t.set(r,[n])});const s=[];return e.forEach(n=>{var m;const r=u(this,_).defaultQueryOptions(n),h=((m=t.get(r.queryHash))==null?void 0:m.shift())??new N(u(this,_),r);s.push({defaultedQueryOptions:r,observer:h})}),s},$=function(e,t){const s=u(this,y).indexOf(e);s!==-1&&(l(this,f,de(u(this,f),s,t)),g(this,d,U).call(this))},U=function(){var e;if(this.hasListeners()){const t=g(this,d,L).call(this,u(this,f),u(this,P)),s=g(this,d,V).call(this),n=u(this,k),r=s?n:g(this,d,D).call(this,t,(e=u(this,E))==null?void 0:e.combine);(s||n!==r)&&H.batch(()=>{this.listeners.forEach(o=>{o(u(this,f))})})}},G);function ye({queries:a,...e},t){const s=W(),n=ee(),r=se(),o=C.useMemo(()=>a.map(p=>{const Q=s.defaultQueryOptions(p);return Q._optimisticResults=n?"isRestoring":"optimistic",Q}),[a,s,n]);o.forEach(p=>{te(p);const Q=s.getQueryCache().get(p.queryHash);re(p,r,Q)}),ae(r);const[h]=C.useState(()=>new he(s,o,e)),[m,S,c]=h.getOptimisticResult(o,e.combine),i=!n&&e.subscribed!==!1;C.useSyncExternalStore(C.useCallback(p=>i?h.subscribe(H.batchCalls(p)):ie,[h,i]),()=>h.getCurrentResult(),()=>h.getCurrentResult()),C.useEffect(()=>{h.setQueries(o,e)},[o,e,h]);const R=m.some((p,Q)=>F(o[Q],p))?m.flatMap((p,Q)=>{const O=o[Q];if(O&&F(O,p)){const X=new N(s,O);return ne(O,X,r)}return[]}):[];if(R.length>0)throw Promise.all(R);const q=m.find((p,Q)=>{const O=o[Q];return O&&oe({result:p,errorResetBoundary:r,throwOnError:O.throwOnError,query:s.getQueryCache().get(O.queryHash),suspense:O.suspense})});if(q!=null&&q.error)throw q.error;return S(c())}function be(a,e,t,s){const n=new Set(t.flatMap(r=>r.op==="create"?[]:[String(r.evaluation_id)]));return{paperId:a,arxivId:s,contexts:[...e.filter(r=>r.id!==void 0&&n.has(String(r.id))),...t.flatMap(r=>r.op==="delete"?[]:[r.data])]}}function ve(a,e){const t=new Set(e.contexts.flatMap(c=>c.dataset_id==null?[]:[String(c.dataset_id)])),s=new Set(e.contexts.flatMap(c=>c.task_id==null?[]:[String(c.task_id)])),n=new Set([e.paperId]),r=new Set;e.arxivId&&r.add(e.arxivId);const o=new Set(e.contexts.map(c=>`${c.task_id}:${c.dataset_id}`)),h=a.getQueryCache(),m=[...h.findAll({queryKey:A.byDatasetAll}),...h.findAll({queryKey:A.byPaperAll})];for(const c of m)for(const i of c.state.data??[])o.has(`${i.task_id}:${i.dataset_id}`)&&(n.add(String(i.paper_id)),i.paper_arxiv_id&&r.add(i.paper_arxiv_id));ue(a,[...n,...r]),ce(a),a.invalidateQueries({queryKey:A.byPaperAll,predicate:c=>n.has(String(c.queryKey[2]))});const S=c=>t.has(String(c.queryKey[1]));a.invalidateQueries({queryKey:A.byDatasetAll,predicate:S}),a.invalidateQueries({queryKey:B.datasetTasks,predicate:S}),a.invalidateQueries({queryKey:B.datasets,predicate:c=>{const i=c.state.data;return S(c)||!!(i&&t.has(String(i.id)))}}),a.invalidateQueries({queryKey:B.taskPage,predicate:c=>{const i=c.state.data;return s.has(String(c.queryKey[1]))||!!(i&&(s.has(String(i.task.id))||i.subtask_benchmarks.some(b=>s.has(String(b.subtask_id)))||i.benchmarks.some(b=>t.has(String(b.id)))||i.subtask_benchmarks.some(b=>b.benchmarks.some(R=>t.has(String(R.id))))))}}),a.invalidateQueries({queryKey:B.taskBenchmarkTrends,predicate:c=>{const i=c.state.data;return s.has(String(c.queryKey[1]))||!!(i&&s.has(String(i.task_id)))}})}export{be as e,ve as r,ye as u}; diff --git a/assets/external-link-DK_uOtfh.js b/assets/external-link-Ddavpnin.js similarity index 89% rename from assets/external-link-DK_uOtfh.js rename to assets/external-link-Ddavpnin.js index a43fe55e8b1e03f974a62aea63b247c20266496f..5306473af06043711e91a1422d95d12b06583749 100644 --- a/assets/external-link-DK_uOtfh.js +++ b/assets/external-link-Ddavpnin.js @@ -1,4 +1,4 @@ -import{c as a}from"./index-CTkdBAwI.js";/** +import{c as a}from"./index-D2fBL-s6.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/file-text-C_y5yA3N.js b/assets/file-text-CikzkPqz.js similarity index 91% rename from assets/file-text-C_y5yA3N.js rename to assets/file-text-CikzkPqz.js index d16aa13581b16600cccd238d14e583cae4c18c40..de408fb88379db3494def3cdf4bb5b6378f93785 100644 --- a/assets/file-text-C_y5yA3N.js +++ b/assets/file-text-CikzkPqz.js @@ -1,4 +1,4 @@ -import{c as e}from"./index-CTkdBAwI.js";/** +import{c as e}from"./index-D2fBL-s6.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/github-B1HnPn8H.js b/assets/github-DcIeypA5.js similarity index 93% rename from assets/github-B1HnPn8H.js rename to assets/github-DcIeypA5.js index 769b3e1f923655e9aa18468389e98668e3842318..efbaa8df9020965e09541bf299328e127fefb258 100644 --- a/assets/github-B1HnPn8H.js +++ b/assets/github-DcIeypA5.js @@ -1,4 +1,4 @@ -import{c}from"./index-CTkdBAwI.js";/** +import{c}from"./index-D2fBL-s6.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/globe-BBGLIdNn.js b/assets/globe-BPKDvPgp.js similarity index 89% rename from assets/globe-BBGLIdNn.js rename to assets/globe-BPKDvPgp.js index ad6664c148d56f66bb24ee4c97b8b2642cb85e17..9ba7bdc09424328f899160c6b35e52080a9bdb58 100644 --- a/assets/globe-BBGLIdNn.js +++ b/assets/globe-BPKDvPgp.js @@ -1,4 +1,4 @@ -import{c as e}from"./index-CTkdBAwI.js";/** +import{c as e}from"./index-D2fBL-s6.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/hover-card-murUA8RP.js b/assets/hover-card-DWpZK4fW.js similarity index 98% rename from assets/hover-card-murUA8RP.js rename to assets/hover-card-DWpZK4fW.js index 60f69c437e06828d87db628713c2095752975175..047fe922e45c222f5f6818bcad45c89e5bee5e5d 100644 --- a/assets/hover-card-murUA8RP.js +++ b/assets/hover-card-DWpZK4fW.js @@ -1 +1 @@ -import{f as n,B as k,j as c,ap as F,aq as I,z as U,E as l,ar as T,P as O,as as $,G as z,D as B,at as W,au as G,av as K,I as q}from"./index-CTkdBAwI.js";var E,g="HoverCard",[y]=z(g,[T]),w=T(),[V,S]=y(g),N=e=>{const{__scopeHoverCard:o,children:r,open:s,defaultOpen:a,onOpenChange:i,openDelay:f=700,closeDelay:v=300}=e,d=w(o),C=n.useRef(0),u=n.useRef(0),h=n.useRef(!1),p=n.useRef(!1),[m,t]=k({prop:s,defaultProp:a??!1,onChange:i,caller:g}),x=n.useCallback(()=>{clearTimeout(u.current),C.current=window.setTimeout(()=>t(!0),f)},[f,t]),P=n.useCallback(()=>{clearTimeout(C.current),!h.current&&!p.current&&(u.current=window.setTimeout(()=>t(!1),v))},[v,t]),M=n.useCallback(()=>t(!1),[t]);return n.useEffect(()=>()=>{clearTimeout(C.current),clearTimeout(u.current)},[]),c.jsx(V,{scope:o,open:m,onOpenChange:t,onOpen:x,onClose:P,onDismiss:M,hasSelectionRef:h,isPointerDownOnContentRef:p,children:c.jsx(F,{...d,children:r})})};N.displayName=g;var _="HoverCardTrigger",D=n.forwardRef((e,o)=>{const{__scopeHoverCard:r,...s}=e,a=S(_,r),i=w(r);return c.jsx(I,{asChild:!0,...i,children:c.jsx(U.a,{"data-state":a.open?"open":"closed",...s,ref:o,onPointerEnter:l(e.onPointerEnter,b(a.onOpen)),onPointerLeave:l(e.onPointerLeave,b(a.onClose)),onFocus:l(e.onFocus,a.onOpen),onBlur:l(e.onBlur,a.onClose),onTouchStart:l(e.onTouchStart,f=>f.preventDefault())})})});D.displayName=_;var H="HoverCardPortal",[J,Q]=y(H,{forceMount:void 0}),j=e=>{const{__scopeHoverCard:o,forceMount:r,children:s,container:a}=e,i=S(H,o);return c.jsx(J,{scope:o,forceMount:r,children:c.jsx(O,{present:r||i.open,children:c.jsx($,{asChild:!0,container:a,children:s})})})};j.displayName=H;var R="HoverCardContent",A=n.forwardRef((e,o)=>{const r=Q(R,e.__scopeHoverCard),{forceMount:s=r.forceMount,...a}=e,i=S(R,e.__scopeHoverCard);return c.jsx(O,{present:s||i.open,children:c.jsx(X,{"data-state":i.open?"open":"closed",...a,onPointerEnter:l(e.onPointerEnter,b(i.onOpen)),onPointerLeave:l(e.onPointerLeave,b(i.onClose)),ref:o})})});A.displayName=R;var X=n.forwardRef((e,o)=>{const{__scopeHoverCard:r,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:i,onInteractOutside:f,...v}=e,d=S(R,r),C=w(r),u=n.useRef(null),h=B(o,u),[p,m]=n.useState(!1);return n.useEffect(()=>{if(p){const t=document.body;return E=t.style.userSelect||t.style.webkitUserSelect,t.style.userSelect="none",t.style.webkitUserSelect="none",()=>{t.style.userSelect=E,t.style.webkitUserSelect=E}}},[p]),n.useEffect(()=>{if(u.current){const t=()=>{m(!1),d.isPointerDownOnContentRef.current=!1,setTimeout(()=>{var P;((P=document.getSelection())==null?void 0:P.toString())!==""&&(d.hasSelectionRef.current=!0)})};return document.addEventListener("pointerup",t),()=>{document.removeEventListener("pointerup",t),d.hasSelectionRef.current=!1,d.isPointerDownOnContentRef.current=!1}}},[d.isPointerDownOnContentRef,d.hasSelectionRef]),n.useEffect(()=>{u.current&&ee(u.current).forEach(x=>x.setAttribute("tabindex","-1"))}),c.jsx(W,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:f,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:l(i,t=>{t.preventDefault()}),onDismiss:d.onDismiss,children:c.jsx(G,{...C,...v,onPointerDown:l(v.onPointerDown,t=>{t.currentTarget.contains(t.target)&&m(!0),d.hasSelectionRef.current=!1,d.isPointerDownOnContentRef.current=!0}),ref:h,style:{...v.style,userSelect:p?"text":void 0,WebkitUserSelect:p?"text":void 0,"--radix-hover-card-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-hover-card-content-available-width":"var(--radix-popper-available-width)","--radix-hover-card-content-available-height":"var(--radix-popper-available-height)","--radix-hover-card-trigger-width":"var(--radix-popper-anchor-width)","--radix-hover-card-trigger-height":"var(--radix-popper-anchor-height)"}})})}),Y="HoverCardArrow",Z=n.forwardRef((e,o)=>{const{__scopeHoverCard:r,...s}=e,a=w(r);return c.jsx(K,{...a,...s,ref:o})});Z.displayName=Y;function b(e){return o=>o.pointerType==="touch"?void 0:e()}function ee(e){const o=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:s=>s.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});for(;r.nextNode();)o.push(r.currentNode);return o}var te=N,oe=D,re=j,L=A;const se=te,ce=oe,ne=n.forwardRef(({className:e,align:o="center",sideOffset:r=4,...s},a)=>c.jsx(re,{children:c.jsx(L,{ref:a,align:o,sideOffset:r,className:q("z-50 w-64 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...s})}));ne.displayName=L.displayName;export{se as H,ce as a,ne as b}; +import{f as n,B as k,j as c,ap as F,aq as I,z as U,E as l,ar as T,P as O,as as $,G as z,D as B,at as W,au as G,av as K,I as q}from"./index-D2fBL-s6.js";var E,g="HoverCard",[y]=z(g,[T]),w=T(),[V,S]=y(g),N=e=>{const{__scopeHoverCard:o,children:r,open:s,defaultOpen:a,onOpenChange:i,openDelay:f=700,closeDelay:v=300}=e,d=w(o),C=n.useRef(0),u=n.useRef(0),h=n.useRef(!1),p=n.useRef(!1),[m,t]=k({prop:s,defaultProp:a??!1,onChange:i,caller:g}),x=n.useCallback(()=>{clearTimeout(u.current),C.current=window.setTimeout(()=>t(!0),f)},[f,t]),P=n.useCallback(()=>{clearTimeout(C.current),!h.current&&!p.current&&(u.current=window.setTimeout(()=>t(!1),v))},[v,t]),M=n.useCallback(()=>t(!1),[t]);return n.useEffect(()=>()=>{clearTimeout(C.current),clearTimeout(u.current)},[]),c.jsx(V,{scope:o,open:m,onOpenChange:t,onOpen:x,onClose:P,onDismiss:M,hasSelectionRef:h,isPointerDownOnContentRef:p,children:c.jsx(F,{...d,children:r})})};N.displayName=g;var _="HoverCardTrigger",D=n.forwardRef((e,o)=>{const{__scopeHoverCard:r,...s}=e,a=S(_,r),i=w(r);return c.jsx(I,{asChild:!0,...i,children:c.jsx(U.a,{"data-state":a.open?"open":"closed",...s,ref:o,onPointerEnter:l(e.onPointerEnter,b(a.onOpen)),onPointerLeave:l(e.onPointerLeave,b(a.onClose)),onFocus:l(e.onFocus,a.onOpen),onBlur:l(e.onBlur,a.onClose),onTouchStart:l(e.onTouchStart,f=>f.preventDefault())})})});D.displayName=_;var H="HoverCardPortal",[J,Q]=y(H,{forceMount:void 0}),j=e=>{const{__scopeHoverCard:o,forceMount:r,children:s,container:a}=e,i=S(H,o);return c.jsx(J,{scope:o,forceMount:r,children:c.jsx(O,{present:r||i.open,children:c.jsx($,{asChild:!0,container:a,children:s})})})};j.displayName=H;var R="HoverCardContent",A=n.forwardRef((e,o)=>{const r=Q(R,e.__scopeHoverCard),{forceMount:s=r.forceMount,...a}=e,i=S(R,e.__scopeHoverCard);return c.jsx(O,{present:s||i.open,children:c.jsx(X,{"data-state":i.open?"open":"closed",...a,onPointerEnter:l(e.onPointerEnter,b(i.onOpen)),onPointerLeave:l(e.onPointerLeave,b(i.onClose)),ref:o})})});A.displayName=R;var X=n.forwardRef((e,o)=>{const{__scopeHoverCard:r,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:i,onInteractOutside:f,...v}=e,d=S(R,r),C=w(r),u=n.useRef(null),h=B(o,u),[p,m]=n.useState(!1);return n.useEffect(()=>{if(p){const t=document.body;return E=t.style.userSelect||t.style.webkitUserSelect,t.style.userSelect="none",t.style.webkitUserSelect="none",()=>{t.style.userSelect=E,t.style.webkitUserSelect=E}}},[p]),n.useEffect(()=>{if(u.current){const t=()=>{m(!1),d.isPointerDownOnContentRef.current=!1,setTimeout(()=>{var P;((P=document.getSelection())==null?void 0:P.toString())!==""&&(d.hasSelectionRef.current=!0)})};return document.addEventListener("pointerup",t),()=>{document.removeEventListener("pointerup",t),d.hasSelectionRef.current=!1,d.isPointerDownOnContentRef.current=!1}}},[d.isPointerDownOnContentRef,d.hasSelectionRef]),n.useEffect(()=>{u.current&&ee(u.current).forEach(x=>x.setAttribute("tabindex","-1"))}),c.jsx(W,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:f,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:l(i,t=>{t.preventDefault()}),onDismiss:d.onDismiss,children:c.jsx(G,{...C,...v,onPointerDown:l(v.onPointerDown,t=>{t.currentTarget.contains(t.target)&&m(!0),d.hasSelectionRef.current=!1,d.isPointerDownOnContentRef.current=!0}),ref:h,style:{...v.style,userSelect:p?"text":void 0,WebkitUserSelect:p?"text":void 0,"--radix-hover-card-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-hover-card-content-available-width":"var(--radix-popper-available-width)","--radix-hover-card-content-available-height":"var(--radix-popper-available-height)","--radix-hover-card-trigger-width":"var(--radix-popper-anchor-width)","--radix-hover-card-trigger-height":"var(--radix-popper-anchor-height)"}})})}),Y="HoverCardArrow",Z=n.forwardRef((e,o)=>{const{__scopeHoverCard:r,...s}=e,a=w(r);return c.jsx(K,{...a,...s,ref:o})});Z.displayName=Y;function b(e){return o=>o.pointerType==="touch"?void 0:e()}function ee(e){const o=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:s=>s.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});for(;r.nextNode();)o.push(r.currentNode);return o}var te=N,oe=D,re=j,L=A;const se=te,ce=oe,ne=n.forwardRef(({className:e,align:o="center",sideOffset:r=4,...s},a)=>c.jsx(re,{children:c.jsx(L,{ref:a,align:o,sideOffset:r,className:q("z-50 w-64 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...s})}));ne.displayName=L.displayName;export{se as H,ce as a,ne as b}; diff --git a/assets/index-RLQgt3ff.js b/assets/index-BPshewTi.js similarity index 99% rename from assets/index-RLQgt3ff.js rename to assets/index-BPshewTi.js index 2c95520356f7f8bed4acb45403e676f72a60967c..239ba31c0b1bc3c852d35241354e79f693f6caac 100644 --- a/assets/index-RLQgt3ff.js +++ b/assets/index-BPshewTi.js @@ -1,4 +1,4 @@ -import{ax as We,a4 as Ot,j as Ze}from"./index-CTkdBAwI.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{ax as We,a4 as Ot,j as Ze}from"./index-D2fBL-s6.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;++F0?{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-BPshewTi.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(e.current.value!==r&&(e.current.previous=e.current.value,e.current.value=r),e.current.previous),[r])}export{o as u}; +import{f as u}from"./index-D2fBL-s6.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-CTkdBAwI.js b/assets/index-D2fBL-s6.js similarity index 98% rename from assets/index-CTkdBAwI.js rename to assets/index-D2fBL-s6.js index 806b84e0736dff014bff3b4e0486da48b2cf10b1..c61dd6fe7ba5eddf46cf24c073351ebae20973e3 100644 --- a/assets/index-CTkdBAwI.js +++ b/assets/index-D2fBL-s6.js @@ -1,4 +1,4 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/AuthorizePaperEditView-CHGZ2u4_.js","assets/useMutation-DXSljxHA.js","assets/button-CJEAPbmU.js","assets/paperEdits-tR7kGJ9o.js","assets/FollowingView-BbQTuHgp.js","assets/FeedView-CdlMrbHK.js","assets/sparkles-DsQKLoSg.js","assets/dialog-C7LLEadk.js","assets/catalog-ZV4aeC2F.js","assets/researchTopic-B8hMcjil.js","assets/transform-CZL79kIa.js","assets/plus-Dhoq_Vs9.js","assets/arrow-right-BqOq_ArY.js","assets/SortableList-YW_y9VAs.js","assets/PaperFeed-2BMpWfem.js","assets/PaperCard--WllvTq0.js","assets/AuthorAvatar-DjiI2pGP.js","assets/AuthorAvatar-o5W6pl_W.css","assets/SotaBadges-CyyWKB0V.js","assets/colors-BkWRhvFI.js","assets/Icon-DSoTeS9V.js","assets/LatexTitle-BmCQe_rK.js","assets/papers-POQWk4vk.js","assets/curation-BlGrJ3z2.js","assets/safeExternalHref-CkBrsh84.js","assets/popover-CZErm3i7.js","assets/skeleton-p2_v-2W8.js","assets/useIntersectionObserver-BnA8TYxZ.js","assets/McpShowcase-0Is00fre.js","assets/AgentLogos-CDnvpl-X.js","assets/chatSessions-DFZee9F6.js","assets/chat-Dr1lXe8V.js","assets/usePapers-Cu-zovv8.js","assets/useInfiniteQuery-CLH4OKrI.js","assets/alert-5nuL0v_r.js","assets/TopicView-BhC-HSwh.js","assets/link-2-D6rU19oC.js","assets/ChatView-KfwjwrJL.js","assets/chatLifecycle-MnB7vIxs.js","assets/hover-card-murUA8RP.js","assets/CatalogEntityPreviewLink-BtlbiZfu.js","assets/github-B1HnPn8H.js","assets/file-text-C_y5yA3N.js","assets/PaperPreviewLink-gDkLaZRD.js","assets/index-RLQgt3ff.js","assets/index-BTuG6PF7.js","assets/katex-DkKDou_j.js","assets/thumbs-up-CYylDqig.js","assets/copy-CSFOf_JK.js","assets/queryOptions-C9woPjwX.js","assets/arrow-left-CROPXr9Q.js","assets/external-link-DK_uOtfh.js","assets/search-Di2HpIcQ.js","assets/chevron-up-C4mc56q2.js","assets/chatLifecycle-Lr_OJaUk.css","assets/katex-wklAmtGL.css","assets/share-2-p1ZCvleM.js","assets/mlIntern-DGSta2oO.js","assets/openrouter-CIzc-yJH.js","assets/SharedChatView-D26jD_Yu.js","assets/PapersListView-AD96mzNE.js","assets/useDebounce-DwTufs8H.js","assets/apiErrors-DFeecPSH.js","assets/frameworks-DDA0P4Tf.js","assets/PaperDetailView-D2ZjcN2x.js","assets/ExternalSourceEvalBadge-bt0V7K9M.js","assets/ExternalSourceEvalBadge-CWUQ52cV.css","assets/paperReader-td2aJigh.js","assets/useDocumentTitle-WlHj7EYH.js","assets/preferences-BMkWyA3F.js","assets/account-Ck5qYpM8.js","assets/evaluationQueryInvalidation-Dxt6kOu3.js","assets/queryInvalidation-B6btj6xZ.js","assets/input-C24thzbI.js","assets/searchable-select-bWRlK1sd.js","assets/loader-circle-B71NdARb.js","assets/SignInToEditDialog-Dn64C3wp.js","assets/textarea-DH3b7wpe.js","assets/submissions-BSh9vIax.js","assets/database--XDgAVkg.js","assets/badge-DIkpOdrw.js","assets/globe-BBGLIdNn.js","assets/index-tW8cPsfP.js","assets/codex-CxJ1q9dv.js","assets/savedPapersAuth-DIA9S41B.js","assets/organizationNames-BVKzYEBp.js","assets/PaperDetailView-CnKK6W4F.css","assets/PaperReaderView-BR93ZsWh.js","assets/MarkdownText-B88CU2f1.js","assets/TagsIndexView-DNXtuGMj.js","assets/slug-BpH-Nkvz.js","assets/triangle-alert-CNTNZVPh.js","assets/trending-up-DegPKMd3.js","assets/moon-DKhdjlp0.js","assets/trophy-d-G-L_yg.js","assets/activity-BI3KqxVx.js","assets/AreaSection-DTNPiFl-.js","assets/TaxonomySuggestionTile-CAEaqzDg.js","assets/useHashScrollOnReady-Ct6aPTRx.js","assets/areas-Dvi8w2dp.js","assets/TagBrowseView-jFvG0K-M.js","assets/ResearchFollowButton-gAamAHri.js","assets/BenchmarkTrendSparkline-CHEb1nF4.js","assets/NotFound-BE9xg6GA.js","assets/MethodsIndexView-BkN9Ggvq.js","assets/FrameworksIndexView-BSrsVJnt.js","assets/TrendsView-BL5J5lZh.js","assets/ConferencesIndexView-_1dXfLJg.js","assets/deadlines-BG5SWwEG.js","assets/AiDeadlinesView-C3PsBfDN.js","assets/switch-B-_Aen3O.js","assets/ConferenceDetailView-DFufisD9.js","assets/conferenceListings-BnmhBx-_.js","assets/ConferenceTaskView-EUoWDwlK.js","assets/OrganizationsIndexView-BA4FIwH0.js","assets/OrganizationsIndexView-CJnrfIkP.css","assets/OrganizationDetailView-DhfYOewC.js","assets/OrganizationContributionGraph-BlYz7Ff1.js","assets/AuthorDetailView-CSBghhYh.js","assets/MethodDetailView-BwtY3qhO.js","assets/BenchmarkDetailView-BD72eXzJ.js","assets/BenchmarkDetailView-CXxK75GR.css","assets/SavedPapersView-K9SaqBUw.js","assets/SettingsView-BXlN-W-y.js","assets/PrivacyView-GmtVPJE1.js","assets/ApiDocsView-Bz-VouOg.js","assets/ApiDocsView-DPuMdYvY.css","assets/McpView-BMeJDdU1.js","assets/McpView-EGeqkP46.css","assets/SubmitView-T2KNEFF1.js","assets/CronDashboard-DbpR4-1O.js","assets/CronDashboard-BzTxMTrv.js","assets/CronDashboard-DwChfW9h.css","assets/refresh-cw-CCsVFDnD.js","assets/circle-check-C79dB7xO.js","assets/AutonomousOperations-9dA7U5QM.js","assets/SubmissionsDashboard-B3AlWGiS.js","assets/SubmissionsDashboard-BTmvDoLW.css","assets/UserProfileView-upsKaDwz.js","assets/RateLimitsView-CgmyXrGR.js","assets/AstraForRoboticsView-Dy0LNyoX.js","assets/AstraForRoboticsView-C_lTF_XB.css","assets/SearchOverlay-COqBAgLs.js","assets/StagingAccessRequestView-Dvx_jX4o.js"])))=>i.map(i=>d[i]); +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/AuthorizePaperEditView-DtkWcUHu.js","assets/useMutation-9dlTbuQj.js","assets/button-D0XfbdrX.js","assets/paperEdits-C-9tVqXs.js","assets/FollowingView-BemIb4-Z.js","assets/FeedView-6xUWjpm4.js","assets/sparkles-4rJdywIs.js","assets/dialog-DgUROq2j.js","assets/catalog-5AxvKr4D.js","assets/researchTopic-jOpECA0z.js","assets/transform-B_GaHMvk.js","assets/plus-BI8-JXK0.js","assets/arrow-right-COzkrAUH.js","assets/SortableList-BzRDhhmi.js","assets/PaperFeed-BERxHjrg.js","assets/PaperCard-DhorusY5.js","assets/AuthorAvatar-C8tz_syh.js","assets/AuthorAvatar-o5W6pl_W.css","assets/SotaBadges-r6iGzLRW.js","assets/colors-BkWRhvFI.js","assets/Icon-Uhh78KjL.js","assets/LatexTitle-WIQJ1ke0.js","assets/papers-khuZaSFb.js","assets/curation-BtfabyzA.js","assets/safeExternalHref-CkBrsh84.js","assets/popover-DS5Jzsg5.js","assets/skeleton-BDwfco0_.js","assets/useIntersectionObserver-C0Rq0EXm.js","assets/McpShowcase-R1ucnqw2.js","assets/AgentLogos-B5etEEwg.js","assets/chatSessions-CoHSP58H.js","assets/chat-BOZIonsX.js","assets/usePapers-CAjdcUuj.js","assets/useInfiniteQuery-CjJA-90e.js","assets/alert-PnePcfgX.js","assets/TopicView-Dcpv-HZh.js","assets/link-2-DK2lGD4M.js","assets/ChatView-DAikess2.js","assets/chatLifecycle-nMvmiYGF.js","assets/hover-card-DWpZK4fW.js","assets/CatalogEntityPreviewLink-xL6TDpUk.js","assets/github-DcIeypA5.js","assets/file-text-CikzkPqz.js","assets/PaperPreviewLink-BZuRBR1p.js","assets/index-BPshewTi.js","assets/index-BtZPsygG.js","assets/katex-DkKDou_j.js","assets/thumbs-up-BnMguJ3s.js","assets/copy-CcyqVsMW.js","assets/queryOptions-C9woPjwX.js","assets/arrow-left-CzTG6LBL.js","assets/external-link-Ddavpnin.js","assets/search-0R_Hc3S2.js","assets/chevron-up-B9KJ5aUJ.js","assets/chatLifecycle-Lr_OJaUk.css","assets/katex-wklAmtGL.css","assets/share-2-SmaUf3DC.js","assets/mlIntern-KBHZ6tOl.js","assets/openrouter-BRMbmxz_.js","assets/SharedChatView-4eHoic3i.js","assets/PapersListView-tKeAfHNj.js","assets/useDebounce-BLmmIPYP.js","assets/apiErrors-DV2aaDjL.js","assets/frameworks-DDA0P4Tf.js","assets/PaperDetailView-BRUxkorx.js","assets/ExternalSourceEvalBadge-C2AscbJz.js","assets/ExternalSourceEvalBadge-CWUQ52cV.css","assets/paperReader-td2aJigh.js","assets/useDocumentTitle-ibepJVy2.js","assets/preferences-BHmRHfHN.js","assets/account-BHlQBDNT.js","assets/evaluationQueryInvalidation-Cs0hE-wT.js","assets/queryInvalidation-BVOtRFkG.js","assets/input-DdobyT4w.js","assets/searchable-select-CsXzzP_V.js","assets/loader-circle-CoLo2trx.js","assets/SignInToEditDialog-BBAwjxYj.js","assets/textarea-B8b7WxcV.js","assets/submissions-LRopJJKL.js","assets/database-Ci0ufNyG.js","assets/badge-Pw584nS3.js","assets/globe-BPKDvPgp.js","assets/index-C_9KPu-E.js","assets/codex-BUTI-2RM.js","assets/savedPapersAuth-0s9GFyfF.js","assets/organizationNames-BVKzYEBp.js","assets/PaperDetailView-CnKK6W4F.css","assets/PaperReaderView-Bdokcr9P.js","assets/MarkdownText-ludE7yuw.js","assets/TagsIndexView-B8PyY2yF.js","assets/slug-BpH-Nkvz.js","assets/triangle-alert-VQM9i8wl.js","assets/trending-up-DFLWFJuY.js","assets/moon-vNTgqlOp.js","assets/trophy-DbAb1jY1.js","assets/activity-DWWgzth6.js","assets/AreaSection-COKqvfmt.js","assets/TaxonomySuggestionTile-UxnpnHcy.js","assets/useHashScrollOnReady-C36cVkc9.js","assets/areas-Dvi8w2dp.js","assets/TagBrowseView-zzh9zkuk.js","assets/ResearchFollowButton-Bwb5EiPm.js","assets/BenchmarkTrendSparkline-BV1XDSWE.js","assets/NotFound-L0ldWZg9.js","assets/MethodsIndexView-DI2_sTpn.js","assets/FrameworksIndexView-CogZFpfQ.js","assets/TrendsView-BuSUElxo.js","assets/ConferencesIndexView-DGftnYu4.js","assets/deadlines-BG5SWwEG.js","assets/AiDeadlinesView-BG77EAes.js","assets/switch-B4eVY4fu.js","assets/ConferenceDetailView-BapnrC2V.js","assets/conferenceListings-BnmhBx-_.js","assets/ConferenceTaskView-DG4QYE8x.js","assets/OrganizationsIndexView-f5uEFGH-.js","assets/OrganizationsIndexView-CJnrfIkP.css","assets/OrganizationDetailView-BFZVxf5K.js","assets/OrganizationContributionGraph-BFOi-mI4.js","assets/AuthorDetailView-CDAXgj3C.js","assets/MethodDetailView-BP_5bAuS.js","assets/BenchmarkDetailView-CLQh8rRr.js","assets/BenchmarkDetailView-CXxK75GR.css","assets/SavedPapersView-CWCS7z3x.js","assets/SettingsView-BrTjKeDA.js","assets/PrivacyView-D9qn84RB.js","assets/ApiDocsView-C6VvPmjf.js","assets/ApiDocsView-DPuMdYvY.css","assets/McpView-DPmcihrm.js","assets/McpView-EGeqkP46.css","assets/SubmitView-DGwEiuGz.js","assets/CronDashboard-Wker39-h.js","assets/CronDashboard-C733Wslj.js","assets/CronDashboard-DwChfW9h.css","assets/refresh-cw-fOkD1TSw.js","assets/circle-check-1e3iPSaF.js","assets/AutonomousOperations-CPgyKQKJ.js","assets/SubmissionsDashboard-BlDtgY38.js","assets/SubmissionsDashboard-BTmvDoLW.css","assets/UserProfileView-y4tNT8rK.js","assets/RateLimitsView-BdVhhRn6.js","assets/AstraForRoboticsView-4cqZq7Uv.js","assets/AstraForRoboticsView-C_lTF_XB.css","assets/SearchOverlay-BWsLpwx1.js","assets/StagingAccessRequestView-KKG5yc76.js"])))=>i.map(i=>d[i]); var zk=Object.defineProperty;var ym=e=>{throw TypeError(e)};var Uk=(e,t,n)=>t in e?zk(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var kr=(e,t,n)=>Uk(e,typeof t!="symbol"?t+"":t,n),Nd=(e,t,n)=>t.has(e)||ym("Cannot "+n);var k=(e,t,n)=>(Nd(e,t,"read from private field"),n?n.call(e):t.get(e)),X=(e,t,n)=>t.has(e)?ym("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),H=(e,t,n,r)=>(Nd(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),ue=(e,t,n)=>(Nd(e,t,"access private method"),n);var Tl=(e,t,n,r)=>({set _(i){H(e,t,i,n)},get _(){return k(e,t,r)}});function Vk(e,t){for(var n=0;nr[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}})();var rz=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ow(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var aw={exports:{}},Gc={},lw={exports:{}},le={};/** * @license React * react.production.min.js @@ -159,4 +159,4 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const c2=Id("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),d2=t2,f2=n2,h2=g.forwardRef(({className:e,inset:t,children:n,...r},i)=>w.jsxs(ak,{ref:i,className:ct("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",t&&"pl-8",e),...r,children:[n,w.jsx(l2,{className:"ml-auto h-4 w-4"})]}));h2.displayName=ak.displayName;const p2=g.forwardRef(({className:e,...t},n)=>w.jsx(lk,{ref:n,className:ct("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",e),...t}));p2.displayName=lk.displayName;const ck=g.forwardRef(({className:e,sideOffset:t=4,...n},r)=>w.jsx(r2,{children:w.jsx(ek,{ref:r,sideOffset:t,className:ct("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",e),...n})}));ck.displayName=ek.displayName;const er=g.forwardRef(({className:e,inset:t,...n},r)=>w.jsx(nk,{ref:r,className:ct("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",t&&"pl-8",e),...n}));er.displayName=nk.displayName;const v2=g.forwardRef(({className:e,children:t,checked:n,...r},i)=>w.jsxs(rk,{ref:i,className:ct("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",e),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(sk,{children:w.jsx(a2,{className:"h-4 w-4"})})}),t]}));v2.displayName=rk.displayName;const g2=g.forwardRef(({className:e,children:t,...n},r)=>w.jsxs(ik,{ref:r,className:ct("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",e),...n,children:[w.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:w.jsx(sk,{children:w.jsx(u2,{className:"h-2 w-2 fill-current"})})}),t]}));g2.displayName=ik.displayName;const dk=g.forwardRef(({className:e,inset:t,...n},r)=>w.jsx(tk,{ref:r,className:ct("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n}));dk.displayName=tk.displayName;const uv=g.forwardRef(({className:e,...t},n)=>w.jsx(ok,{ref:n,className:ct("-mx-1 my-1 h-px bg-muted",e),...t}));uv.displayName=ok.displayName;function m2(e){const n=(e.name||e.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 y2=({user:e,onLogout:t})=>w.jsxs(d2,{children:[w.jsx(f2,{asChild:!0,children:w.jsx("button",{type:"button",className:"user-avatar-btn","aria-label":`Account menu for ${e.username}`,children:w.jsxs(j1,{className:"h-8 w-8",children:[e.avatar_url&&w.jsx(D1,{src:e.avatar_url,alt:e.username}),w.jsx(z1,{className:"text-xs",children:m2(e)})]})})}),w.jsxs(ck,{align:"end",className:"w-56",children:[w.jsxs(dk,{className:"flex flex-col gap-0.5 py-2",children:[w.jsx("span",{className:"text-sm font-medium leading-tight",children:e.name||e.username}),w.jsxs("span",{className:"text-xs font-normal text-muted-foreground",children:["@",e.username]}),e.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"}),e.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(uv,{}),w.jsx(er,{asChild:!0,children:w.jsx("a",{href:`https://huggingface.co/${encodeURIComponent(e.username)}`,target:"_blank",rel:"noopener noreferrer",children:"Hugging Face profile"})}),w.jsx(er,{asChild:!0,children:w.jsx(bn,{to:"/frameworks",children:"Frameworks"})}),w.jsx(er,{asChild:!0,children:w.jsx(bn,{to:"/trends",children:"Trends"})}),e.is_admin&&w.jsxs(w.Fragment,{children:[w.jsx(er,{asChild:!0,children:w.jsx(bn,{to:"/admin-dashboard",children:"Admin dashboard"})}),w.jsx(er,{asChild:!0,children:w.jsx(bn,{to:"/submissions",children:"Review submissions"})})]}),w.jsx(er,{asChild:!0,children:w.jsx(bn,{to:`/${encodeURIComponent(e.username)}`,children:"My contributions"})}),w.jsx(er,{asChild:!0,children:w.jsx(bn,{to:"/settings",children:"Settings"})}),w.jsx(uv,{}),w.jsx(er,{onSelect:n=>{n.preventDefault(),t()},children:"Log out"})]})]}),_2=!1;class Od extends Error{constructor(n,r){var i;super(`API request failed: ${n.status} ${n.statusText}`);kr(this,"status");kr(this,"statusText");kr(this,"response");kr(this,"detail");kr(this,"code");kr(this,"displayMessage");this.name="ApiError",this.status=n.status,this.statusText=n.statusText,this.response=r;try{if(this.detail=(i=JSON.parse(r))==null?void 0:i.detail,typeof this.detail=="string"&&(this.message=this.detail),Array.isArray(this.detail)){const s=this.detail[0];typeof s=="object"&&s!==null&&"msg"in s&&typeof s.msg=="string"&&(this.message=s.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 s="help"in this.detail&&typeof this.detail.help=="string"?` See ${this.detail.help} for help.`:"";this.message=`${this.detail.message}${s}`}}catch{this.detail=void 0,this.displayMessage=r||this.message;return}this.displayMessage=this.message}}function wz(e,t){return e instanceof Od?e.displayMessage||t:typeof e=="object"&&e!==null&&"message"in e&&typeof e.message=="string"&&e.message||t}class w2{constructor(t){this.baseUrl=t}async fetch(t,n){const r=`${this.baseUrl}${t}`;try{const{headers:i,...s}=n??{},a=(s.method??"GET").toUpperCase()==="GET"?"default":"no-store",l=new Headers(i);return typeof s.body=="string"&&!l.has("Content-Type")&&l.set("Content-Type","application/json"),await fetch(r,{...s,cache:s.cache??a,credentials:s.credentials??"include",headers:l})}catch(i){throw console.error(`[API] Request to ${r} failed:`,i),i}}async fetchOk(t,n){const r=await this.fetch(t,n);if(!r.ok){const i=new Od(r,await r.text());throw console.error("[API] Error response:",i.response),i}return r}async request(t,n){const r=await this.fetchOk(t,n);return r.status===204?void 0:await r.json()}}function x2(e){e instanceof Od&&e.status===401&&e.code!=="fresh_auth_required"&&e.code!=="saved_papers_bucket_authorization_required"&&typeof window<"u"&&window.dispatchEvent(new CustomEvent("pwc:auth-stale"))}async function fk(e){try{return await e()}catch(t){throw x2(t),t}}const cm=new w2(`${Bg()}/api/v1`),b2=(e,t)=>cm.fetch(e,t),xz=(e,t)=>fk(()=>cm.fetchOk(e,t)),cv=(e,t)=>fk(()=>cm.request(e,t));async function bz(e,t){try{return await cv(e,t)}catch(n){if(n instanceof Od&&n.status===404)return null;throw n}}const z0={async getCurrentUser(){if($o())return null;const e=await b2("/auth/me",{cache:"no-store"});return e.status===401||!e.ok?null:e.json()},async logout(){await cv("/auth/logout",{method:"POST"})},async requestStagingAccess(){await cv("/staging-access-request",{method:"POST"})}},E2={detail:e=>["paper",e],arxiv:e=>["paper-arxiv",e],preview:e=>["paper-preview",e],summary:e=>["paper-summary",e],feeds:{list:["papers"],infinite:["papers-infinite"],following:["research-feed"],search:["paper-search-feed"],task:["task-papers-infinite"],conference:["conference-papers-infinite"],organization:["organization-papers-infinite"],method:["method-papers-infinite"],saved:["my-bookmarks"],related:["related-papers"],versions:["paper-versions"],searchOverlay:["search-papers"],mentions:["chat-paper-mention-search"],trending:["trending-papers"]}},Ez=10*60*1e3,hu={me:["auth","me"]},Sz={preferences:["account","preferences"],bookmarkIds:["my-bookmark-ids"]},Cz={areas:["areas-all"],area:e=>["area",e],topTasksSidebar:["top-tasks-sidebar"],task:e=>["task",e],method:e=>["method",e],organization:e=>["organization",e],dataset:e=>["dataset",e],datasets:["dataset"],datasetTasks:["dataset-tasks"],taskPage:["task-page"],taskBenchmarkTrends:["task-benchmark-trends"],organizations:["organizations"]},kz={all:["evaluations"],byPaper:e=>["evaluations","paper",e],byPaperAll:["evaluations","paper"],byDatasetAll:["dataset-evals"],byDataset:e=>["dataset-evals",e]},Pz={pendingEdits:["pendingPaperEdits"]},Rz={all:["admin"],cronStatus:["admin","cronStatus"],chatSandboxSpend:e=>["admin","chatSandboxSpend",e],chatWebSearchBudget:["admin","chatWebSearchBudget"],autonomousOperations:["admin","autonomousOperations"],paperMarkdownJobs:["admin","paperMarkdownJobs"],codexPaperJobs:["admin","codexPaperJobs"],codexPaperJob:(e,t)=>["admin","codexPaperJob",e,t],catalogAudit:["catalog-audit"]},Tz={follows:e=>["research-follows",e],topics:e=>["research-topics",e],publicTopics:["research-public-topic"],publicTopic:(e,t)=>["research-public-topic",e,t],topicPapers:(e,t,n,r)=>[`research-topic-papers-${e}`,t,n.startDate??null,n.endDate??null,r],featuredTopics:["research-featured-topics"],email:e=>["research-email",e],feed:e=>[...E2.feeds.following,e]},dm=q.createContext(null),U0="pwc:auth-stale",S2=({children:e})=>{const t=DS(),n=uN({queryKey:hu.me,queryFn:()=>z0.getCurrentUser(),staleTime:1/0}),r=n.data??null,i=q.useRef(null),{refetch:s}=n,o=q.useCallback(async()=>{await s()},[s]),a=q.useCallback(async()=>{const u=qg("/api/v1/auth/logout");if(new URL(u,window.location.origin).origin!==window.location.origin){const c=document.createElement("form");c.method="POST",c.action=`${u}?return_to=${encodeURIComponent(window.location.href)}`,document.body.appendChild(c),c.submit();return}await z0.logout(),t.setQueryData(hu.me,null)},[t]);q.useEffect(()=>{},[r]),q.useEffect(()=>{i.current&&!r&&t.resetQueries({predicate:u=>u.queryKey[0]!==hu.me[0]}),i.current=r},[t,r]),q.useEffect(()=>{const u=()=>t.setQueryData(hu.me,null);return window.addEventListener(U0,u),()=>window.removeEventListener(U0,u)},[t]);const l=q.useMemo(()=>({user:r,isLoading:n.isPending,refresh:o,logout:a}),[r,n.isPending,o,a]);return w.jsx(dm.Provider,{value:l,children:e})};function hk(){const e=q.useContext(dm);if(!e)throw new Error("useAuth must be used inside an ");return e}function Iz(){return q.useContext(dm)}const Mr=({name:e,size:t=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"}),github:w.jsx("path",{fill:"currentColor",d:"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z"})};return w.jsx("svg",{className:t===11?"icon-sm":"icon",viewBox:"0 0 16 16",width:t,height:t,children:n[e]})},V0="https://github.com/huggingface/paperswithcode-feedback/issues",B0="https://github.com/huggingface/paperswithcode",C2="https://paperswithcode.co/following",q0="pwc:announcement:following-feed:v1:dismissed",th=[{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}],k2=()=>{if(typeof navigator>"u")return!1;const e=navigator.userAgentData,t=(e==null?void 0:e.platform)||navigator.platform||navigator.userAgent||"";return/Mac|iPhone|iPad|iPod/i.test(t)},P2=()=>{const[e,t]=q.useState(!1);return q.useEffect(()=>{t(k2())},[]),w.jsx("kbd",{children:e?"⌘K":"Ctrl K"})},R2=({onOpenSearch:e})=>{const[t,n]=q.useState(!1),[r,i]=q.useState(()=>localStorage.getItem(q0)!=="1"),s=q.useRef(null),o=q.useRef(null),a=()=>n(!1),{user:l,logout:u}=hk(),c=hn(),d=c.pathname.startsWith("/pdf/"),f=`${c.pathname}${c.search}`||"/",m=$o(),_=al()?{to:"/chat",label:"Chat",end:!1,badge:"New"}:tF()?{to:"/chat",label:"Chat",end:!1,badge:"New",href:eF}:null,p=_?[th[0],_,...th.slice(1)]:th;return q.useLayoutEffect(()=>{var S;const y=s.current,h=o.current;if(!y||!h)return;let v=!1;const x=()=>{if(v)return;const P=y.querySelector(".nav-item.active"),C=(P==null?void 0:P.offsetWidth)??0;h.style.width=`${C}px`,h.style.transform=`translateX(${(P==null?void 0:P.offsetLeft)??0}px)`,h.style.opacity=C>0?"1":"0"};x();const b=window.requestAnimationFrame(()=>{h.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),()=>{v=!0,window.cancelAnimationFrame(b),E==null||E.disconnect(),window.removeEventListener("resize",x)}},[c.pathname,p.length]),w.jsxs(q$,{open:t,onOpenChange:n,children:[w.jsxs("header",{className:"app-header",children:[w.jsxs("div",{className:"app-header-inner",children:[w.jsxs(ys,{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:s,children:[p.map(({to:y,label:h,end:v,badge:x,href:b})=>{const E=w.jsxs(w.Fragment,{children:[w.jsx("span",{children:h}),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(ys,{to:y,end:v,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:V0,target:"_blank",rel:"noreferrer",children:"Submit feedback"}),w.jsx("a",{className:"icon-btn header-github-btn",href:B0,target:"_blank",rel:"noreferrer","aria-label":"GitHub repository",title:"GitHub repository",children:w.jsx(Mr,{name:"github",size:14})}),w.jsxs("button",{className:"search-trigger","aria-label":"Search papers, authors, domains",onClick:e,children:[w.jsx(Mr,{name:"search",size:13}),w.jsx("span",{children:"Search papers, authors, domains…"}),w.jsx(P2,{})]}),w.jsx("button",{className:"icon-btn mobile-search-btn","aria-label":"Search",onClick:e,children:w.jsx(Mr,{name:"search",size:14})}),!m&&w.jsx(ys,{to:"/saved",className:"icon-btn header-bookmark-btn","aria-label":"Saved papers",title:"Saved papers",children:w.jsx(Mr,{name:"bookmark",size:13})}),m?null:l?w.jsx(y2,{user:l,onLogout:u}):w.jsx(m1,{returnTo:f}),w.jsx(W$,{asChild:!0,children:w.jsx("button",{className:"icon-btn mobile-menu-btn","aria-label":"Open menu",children:w.jsx(Mr,{name:"menu",size:14})})})]}),!d&&r&&w.jsxs("div",{className:"site-announcement",role:"status",children:[w.jsx("span",{children:"New: "}),m?w.jsx("a",{href:C2,target:"_blank",rel:"noreferrer",children:"following feed"}):w.jsx(bn,{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(q0,"1"),i(!1)},children:w.jsx(Mr,{name:"close",size:11})})]})]}),w.jsx(H$,{children:w.jsx(G$,{className:"mobile-nav-drawer",children:w.jsxs(K$,{className:"mobile-nav-panel","aria-describedby":void 0,children:[w.jsx(Q$,{className:"sr-only",children:"Navigation menu"}),w.jsx(Y$,{className:"icon-btn mobile-nav-close","aria-label":"Close menu",children:w.jsx(Mr,{name:"close",size:14})}),w.jsxs("button",{type:"button",className:"mobile-nav-link mobile-nav-search",onClick:()=>{a(),e()},children:[w.jsx(Mr,{name:"search",size:14}),w.jsx("span",{children:"Search papers, authors, domains…"})]}),p.map(({to:y,label:h,end:v,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:h}),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(ys,{to:y,end:v,className:E,onClick:a,children:S},y)}),w.jsx("a",{className:"mobile-nav-link",href:V0,target:"_blank",rel:"noreferrer",onClick:a,children:"Submit feedback"}),w.jsx("a",{className:"mobile-nav-link",href:B0,target:"_blank",rel:"noreferrer",onClick:a,children:"GitHub"}),!m&&w.jsx(ys,{to:"/saved",className:"mobile-nav-link",onClick:a,children:"Saved papers"}),!m&&(l==null?void 0:l.is_admin)&&w.jsx(ys,{to:"/admin-dashboard",className:"mobile-nav-link",onClick:a,children:"Admin dashboard"})]})})})]})},T2=()=>{const{pathname:e}=hn();return e==="/chat"||e.startsWith("/chat/")||e.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(bn,{to:"/docs/api",children:"API"}),w.jsx(bn,{to:"/mcp",children:"MCP"}),w.jsx(bn,{to:"/privacy",children:"Privacy"}),w.jsx("a",{href:"https://github.com/huggingface/paperswithcode-feedback/issues",target:"_blank",rel:"noreferrer",children:"Feedback"})]})})},I2=1,O2=1e6;let nh=0;function M2(){return nh=(nh+1)%Number.MAX_SAFE_INTEGER,nh.toString()}const rh=new Map,W0=e=>{if(rh.has(e))return;const t=setTimeout(()=>{rh.delete(e),Ia({type:"REMOVE_TOAST",toastId:e})},O2);rh.set(e,t)},A2=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,I2)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(n=>n.id===t.toast.id?{...n,...t.toast}:n)};case"DISMISS_TOAST":{const{toastId:n}=t;return n?W0(n):e.toasts.forEach(r=>{W0(r.id)}),{...e,toasts:e.toasts.map(r=>r.id===n||n===void 0?{...r,open:!1}:r)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(n=>n.id!==t.toastId)}}},Lu=[];let ju={toasts:[]};function Ia(e){ju=A2(ju,e),Lu.forEach(t=>{t(ju)})}function N2({...e}){const t=M2(),n=i=>Ia({type:"UPDATE_TOAST",toast:{...i,id:t}}),r=()=>Ia({type:"DISMISS_TOAST",toastId:t});return Ia({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:i=>{i||r()}}}),{id:t,dismiss:r,update:n}}function $2(){const[e,t]=g.useState(ju);return g.useEffect(()=>(Lu.push(t),()=>{const n=Lu.indexOf(t);n>-1&&Lu.splice(n,1)}),[e]),{...e,toast:N2,dismiss:n=>Ia({type:"DISMISS_TOAST",toastId:n})}}var F2=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"}),L2="VisuallyHidden",fm=g.forwardRef((e,t)=>w.jsx(ke.span,{...e,ref:t,style:{...F2,...e.style}}));fm.displayName=L2;var hm="ToastProvider",[pm,j2,D2]=Kg("Toast"),[pk]=os("Toast",[D2]),[z2,Md]=pk(hm),vk=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:i="right",swipeThreshold:s=50,children:o}=e,[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 \`${hm}\`. Expected non-empty \`string\`.`),w.jsx(pm.Provider,{scope:t,children:w.jsx(z2,{scope:t,label:n,duration:r,swipeDirection:i,swipeThreshold:s,toastCount:u,viewport:a,onViewportChange:l,onToastAdd:g.useCallback(()=>c(m=>m+1),[]),onToastRemove:g.useCallback(()=>c(m=>m-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:f,children:o})})};vk.displayName=hm;var gk="ToastViewport",U2=["F8"],dv="toast.viewportPause",fv="toast.viewportResume",mk=g.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=U2,label:i="Notifications ({hotkey})",...s}=e,o=Md(gk,n),a=j2(n),l=g.useRef(null),u=g.useRef(null),c=g.useRef(null),d=g.useRef(null),f=et(t,d,o.onViewportChange),m=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),_=o.toastCount>0;g.useEffect(()=>{const y=h=>{var x;r.length!==0&&r.every(b=>h[b]||h.code===b)&&((x=d.current)==null||x.focus())};return document.addEventListener("keydown",y),()=>document.removeEventListener("keydown",y)},[r]),g.useEffect(()=>{const y=l.current,h=d.current;if(_&&y&&h){const v=()=>{if(!o.isClosePausedRef.current){const S=new CustomEvent(dv);h.dispatchEvent(S),o.isClosePausedRef.current=!0}},x=()=>{if(o.isClosePausedRef.current){const S=new CustomEvent(fv);h.dispatchEvent(S),o.isClosePausedRef.current=!1}},b=S=>{!y.contains(S.relatedTarget)&&x()},E=()=>{y.contains(document.activeElement)||x()};return y.addEventListener("focusin",v),y.addEventListener("focusout",b),y.addEventListener("pointermove",v),y.addEventListener("pointerleave",E),window.addEventListener("blur",v),window.addEventListener("focus",x),()=>{y.removeEventListener("focusin",v),y.removeEventListener("focusout",b),y.removeEventListener("pointermove",v),y.removeEventListener("pointerleave",E),window.removeEventListener("blur",v),window.removeEventListener("focus",x)}}},[_,o.isClosePausedRef]);const p=g.useCallback(({tabbingDirection:y})=>{const v=a().map(x=>{const b=x.ref.current,E=[b,...e3(b)];return y==="forwards"?E:E.reverse()});return(y==="forwards"?v.reverse():v).flat()},[a]);return g.useEffect(()=>{const y=d.current;if(y){const h=v=>{var E,S,P;const x=v.altKey||v.ctrlKey||v.metaKey;if(v.key==="Tab"&&!x){const C=document.activeElement,T=v.shiftKey;if(v.target===y&&T){(E=u.current)==null||E.focus();return}const M=p({tabbingDirection:T?"backwards":"forwards"}),z=M.findIndex(F=>F===C);ih(M.slice(z+1))?v.preventDefault():T?(S=u.current)==null||S.focus():(P=c.current)==null||P.focus()}};return y.addEventListener("keydown",h),()=>y.removeEventListener("keydown",h)}},[a,p]),w.jsxs(MN,{ref:l,role:"region","aria-label":i.replace("{hotkey}",m),tabIndex:-1,style:{pointerEvents:_?void 0:"none"},children:[_&&w.jsx(hv,{ref:u,onFocusFromOutsideViewport:()=>{const y=p({tabbingDirection:"forwards"});ih(y)}}),w.jsx(pm.Slot,{scope:n,children:w.jsx(ke.ol,{tabIndex:-1,...s,ref:f})}),_&&w.jsx(hv,{ref:c,onFocusFromOutsideViewport:()=>{const y=p({tabbingDirection:"backwards"});ih(y)}})]})});mk.displayName=gk;var yk="ToastFocusProxy",hv=g.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...i}=e,s=Md(yk,n);return w.jsx(fm,{tabIndex:0,...i,ref:t,style:{position:"fixed"},onFocus:o=>{var u;const a=o.relatedTarget;!((u=s.viewport)!=null&&u.contains(a))&&r()}})});hv.displayName=yk;var Rl="Toast",V2="toast.swipeStart",B2="toast.swipeMove",q2="toast.swipeCancel",W2="toast.swipeEnd",_k=g.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:i,onOpenChange:s,...o}=e,[a,l]=yd({prop:r,defaultProp:i??!0,onChange:s,caller:Rl});return w.jsx(br,{present:n||a,children:w.jsx(K2,{open:a,...o,ref:t,onClose:()=>l(!1),onPause:Ut(e.onPause),onResume:Ut(e.onResume),onSwipeStart:ee(e.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:ee(e.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:ee(e.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:ee(e.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)})})})});_k.displayName=Rl;var[H2,G2]=pk(Rl,{onClose(){}}),K2=g.forwardRef((e,t)=>{const{__scopeToast:n,type:r="foreground",duration:i,open:s,onClose:o,onEscapeKeyDown:a,onPause:l,onResume:u,onSwipeStart:c,onSwipeMove:d,onSwipeCancel:f,onSwipeEnd:m,..._}=e,p=Md(Rl,n),[y,h]=g.useState(null),v=et(t,F=>h(F)),x=g.useRef(null),b=g.useRef(null),E=i||p.duration,S=g.useRef(0),P=g.useRef(E),C=g.useRef(0),{onToastAdd:T,onToastRemove:R}=p,N=Ut(()=>{var W;(y==null?void 0:y.contains(document.activeElement))&&((W=p.viewport)==null||W.focus()),o()}),M=g.useCallback(F=>{!F||F===1/0||(window.clearTimeout(C.current),S.current=new Date().getTime(),C.current=window.setTimeout(N,F))},[N]);g.useEffect(()=>{const F=p.viewport;if(F){const W=()=>{M(P.current),u==null||u()},B=()=>{const Q=new Date().getTime()-S.current;P.current=P.current-Q,window.clearTimeout(C.current),l==null||l()};return F.addEventListener(dv,B),F.addEventListener(fv,W),()=>{F.removeEventListener(dv,B),F.removeEventListener(fv,W)}}},[p.viewport,E,l,u,M]),g.useEffect(()=>{s&&!p.isClosePausedRef.current&&M(E)},[s,E,p.isClosePausedRef,M]),g.useEffect(()=>(T(),()=>R()),[T,R]);const z=g.useMemo(()=>y?kk(y):null,[y]);return p.viewport?w.jsxs(w.Fragment,{children:[z&&w.jsx(Q2,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite",children:z}),w.jsx(H2,{scope:n,onClose:N,children:xl.createPortal(w.jsx(pm.ItemSlot,{scope:n,children:w.jsx(ON,{asChild:!0,onEscapeKeyDown:ee(a,()=>{p.isFocusedToastEscapeKeyDownRef.current||N(),p.isFocusedToastEscapeKeyDownRef.current=!1}),children:w.jsx(ke.li,{tabIndex:0,"data-state":s?"open":"closed","data-swipe-direction":p.swipeDirection,..._,ref:v,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:ee(e.onKeyDown,F=>{F.key==="Escape"&&(a==null||a(F.nativeEvent),F.nativeEvent.defaultPrevented||(p.isFocusedToastEscapeKeyDownRef.current=!0,N()))}),onPointerDown:ee(e.onPointerDown,F=>{F.button===0&&(x.current={x:F.clientX,y:F.clientY})}),onPointerMove:ee(e.onPointerMove,F=>{if(!x.current)return;const W=F.clientX-x.current.x,B=F.clientY-x.current.y,Q=!!b.current,O=["left","right"].includes(p.swipeDirection),A=["left","up"].includes(p.swipeDirection)?Math.min:Math.max,V=O?A(0,W):0,K=O?0:A(0,B),te=F.pointerType==="touch"?10:2,oe={x:V,y:K},de={originalEvent:F,delta:oe};Q?(b.current=oe,pu(B2,d,de,{discrete:!1})):H0(oe,p.swipeDirection,te)?(b.current=oe,pu(V2,c,de,{discrete:!1}),F.target.setPointerCapture(F.pointerId)):(Math.abs(W)>te||Math.abs(B)>te)&&(x.current=null)}),onPointerUp:ee(e.onPointerUp,F=>{const W=b.current,B=F.target;if(B.hasPointerCapture(F.pointerId)&&B.releasePointerCapture(F.pointerId),b.current=null,x.current=null,W){const Q=F.currentTarget,O={originalEvent:F,delta:W};H0(W,p.swipeDirection,p.swipeThreshold)?pu(W2,m,O,{discrete:!0}):pu(q2,f,O,{discrete:!0}),Q.addEventListener("click",A=>A.preventDefault(),{once:!0})}})})})}),p.viewport)})]}):null}),Q2=e=>{const{__scopeToast:t,children:n,...r}=e,i=Md(Rl,t),[s,o]=g.useState(!1),[a,l]=g.useState(!1);return J2(()=>o(!0)),g.useEffect(()=>{const u=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(u)},[]),a?null:w.jsx(wd,{asChild:!0,children:w.jsx(fm,{...r,children:s&&w.jsxs(w.Fragment,{children:[i.label," ",n]})})})},Y2="ToastTitle",wk=g.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return w.jsx(ke.div,{...r,ref:t})});wk.displayName=Y2;var X2="ToastDescription",xk=g.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return w.jsx(ke.div,{...r,ref:t})});xk.displayName=X2;var bk="ToastAction",Ek=g.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?w.jsx(Ck,{altText:n,asChild:!0,children:w.jsx(vm,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${bk}\`. Expected non-empty \`string\`.`),null)});Ek.displayName=bk;var Sk="ToastClose",vm=g.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,i=G2(Sk,n);return w.jsx(Ck,{asChild:!0,children:w.jsx(ke.button,{type:"button",...r,ref:t,onClick:ee(e.onClick,i.onClose)})})});vm.displayName=Sk;var Ck=g.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...i}=e;return w.jsx(ke.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...i,ref:t})});function kk(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),Z2(r)){const i=r.ariaHidden||r.hidden||r.style.display==="none",s=r.dataset.radixToastAnnounceExclude==="";if(!i)if(s){const o=r.dataset.radixToastAnnounceAlt;o&&t.push(o)}else t.push(...kk(r))}}),t}function pu(e,t,n,{discrete:r}){const i=n.originalEvent.currentTarget,s=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?Lg(i,s):i.dispatchEvent(s)}var H0=(e,t,n=0)=>{const r=Math.abs(e.x),i=Math.abs(e.y),s=r>i;return t==="left"||t==="right"?s&&r>n:!s&&i>n};function J2(e=()=>{}){const t=Ut(e);fn(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function Z2(e){return e.nodeType===e.ELEMENT_NODE}function e3(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function ih(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var t3=vk,Pk=mk,Rk=_k,Tk=wk,Ik=xk,Ok=Ek,Mk=vm;const G0=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,K0=M1,n3=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return K0(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:i,defaultVariants:s}=t,o=Object.keys(i).map(u=>{const c=n==null?void 0:n[u],d=s==null?void 0:s[u];if(c===null)return null;const f=G0(c)||G0(d);return i[u][f]}),a=n&&Object.entries(n).reduce((u,c)=>{let[d,f]=c;return f===void 0||(u[d]=f),u},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,c)=>{let{class:d,className:f,...m}=c;return Object.entries(m).every(_=>{let[p,y]=_;return Array.isArray(y)?y.includes({...s,...a}[p]):{...s,...a}[p]===y})?[...u,d,f]:u},[]);return K0(e,o,l,n==null?void 0:n.class,n==null?void 0:n.className)},r3=t3,Ak=g.forwardRef(({className:e,...t},n)=>w.jsx(Pk,{ref:n,className:ct("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]",e),...t}));Ak.displayName=Pk.displayName;const i3=n3("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"}}),Nk=g.forwardRef(({className:e,variant:t,...n},r)=>w.jsx(Rk,{ref:r,className:ct(i3({variant:t}),e),...n}));Nk.displayName=Rk.displayName;const s3=g.forwardRef(({className:e,...t},n)=>w.jsx(Ok,{ref:n,className:ct("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",e),...t}));s3.displayName=Ok.displayName;const $k=g.forwardRef(({className:e,...t},n)=>w.jsx(Mk,{ref:n,className:ct("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",e),"aria-label":"Dismiss notification","toast-close":"",...t,children:w.jsx(c2,{className:"h-4 w-4"})}));$k.displayName=Mk.displayName;const Fk=g.forwardRef(({className:e,...t},n)=>w.jsx(Tk,{ref:n,className:ct("text-sm font-semibold",e),...t}));Fk.displayName=Tk.displayName;const Lk=g.forwardRef(({className:e,...t},n)=>w.jsx(Ik,{ref:n,className:ct("text-sm opacity-90",e),...t}));Lk.displayName=Ik.displayName;function o3(){const{toasts:e}=$2();return w.jsxs(r3,{children:[e.map(function({id:t,title:n,description:r,action:i,...s}){return w.jsxs(Nk,{...s,children:[w.jsxs("div",{className:"grid gap-1",children:[n&&w.jsx(Fk,{children:n}),r&&w.jsx(Lk,{children:r})]}),i,w.jsx($k,{})]},t)}),w.jsx(Ak,{})]})}function a3(){const{pathname:e,hash:t}=hn();g.useLayoutEffect(()=>{t||window.scrollTo({top:0,left:0,behavior:"instant"})},[e,t])}const jk=rF(),l3=jk?wA:_A;if(!jk&&typeof window<"u"){const e=window.location.hash;e.startsWith("#/")&&!e.startsWith("#//")&&window.history.replaceState(null,"",e.slice(1))}const u3=q.lazy(()=>ae(()=>import("./AuthorizePaperEditView-CHGZ2u4_.js"),__vite__mapDeps([0,1,2,3]))),c3=q.lazy(()=>ae(()=>import("./FollowingView-BbQTuHgp.js"),__vite__mapDeps([4,5,6,7,8,9,1,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34]))),d3=q.lazy(()=>ae(()=>import("./TopicView-BhC-HSwh.js"),__vite__mapDeps([35,14,15,16,17,18,19,10,20,21,22,23,24,25,26,27,32,33,9,1,11,36]))),f3=q.lazy(()=>ae(()=>import("./FeedView-CdlMrbHK.js"),__vite__mapDeps([5,6,7,8,9,1,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34]))),h3=q.lazy(()=>ae(()=>import("./ChatView-KfwjwrJL.js"),__vite__mapDeps([37,38,30,31,22,23,39,40,8,41,42,43,44,45,46,1,47,48,49,50,51,11,52,53,16,17,54,55,28,29,56,20,57,58]))),p3=q.lazy(()=>ae(()=>import("./SharedChatView-D26jD_Yu.js"),__vite__mapDeps([59,38,30,31,22,23,39,40,8,41,42,43,44,45,46,1,47,48,49,50,51,11,52,53,16,17,54,55]))),v3=q.lazy(()=>ae(()=>import("./PapersListView-AD96mzNE.js"),__vite__mapDeps([60,18,19,10,20,14,15,16,17,21,22,23,24,25,26,27,8,32,33,61,34,62,63]))),g3=q.lazy(()=>ae(()=>import("./PaperDetailView-D2ZjcN2x.js"),__vite__mapDeps([64,1,20,18,19,10,21,65,23,39,24,66,22,67,32,33,68,69,70,57,26,34,2,7,29,48,71,72,73,74,25,52,75,40,8,76,77,78,79,11,80,81,41,82,83,44,45,27,84,85,16,17,86]))),m3=q.lazy(()=>ae(()=>import("./PaperReaderView-BR93ZsWh.js"),__vite__mapDeps([87,38,30,31,22,23,39,40,8,41,42,43,44,45,46,1,47,48,49,50,51,11,52,53,16,17,54,55,88,67,24,32,33,37,28,29,56,20,57,58]))),y3=q.lazy(()=>ae(()=>import("./TagsIndexView-DNXtuGMj.js"),__vite__mapDeps([89,8,19,10,90,52,91,56,92,93,47,79,36,94,42,95,81,6,34,96,26,97,76,2,73,77,74,25,7,75,1,78,11,98,99]))),_3=q.lazy(()=>ae(()=>import("./TagBrowseView-jFvG0K-M.js"),__vite__mapDeps([100,101,9,1,11,18,19,10,14,15,16,17,20,21,22,23,24,25,26,27,12,102,88,43,44,45,46,39,55,8,62,63,69,70,90,32,33,34,103,94,41]))),w3=q.lazy(()=>ae(()=>import("./MethodsIndexView-BkN9Ggvq.js"),__vite__mapDeps([104,8,99,90,34,96,26,97,76,2,73,77,74,25,7,52,75,1,78,11,98,92]))),x3=q.lazy(()=>ae(()=>import("./FrameworksIndexView-BSrsVJnt.js"),__vite__mapDeps([105,20,8,19,63]))),b3=q.lazy(()=>ae(()=>import("./TrendsView-BL5J5lZh.js"),__vite__mapDeps([106,34,26]))),E3=q.lazy(()=>ae(()=>import("./ConferencesIndexView-_1dXfLJg.js"),__vite__mapDeps([107,8,108,34,96,26,97,76,2,73,77,74,25,7,52,75,1,78,11]))),S3=q.lazy(()=>ae(()=>import("./AiDeadlinesView-C3PsBfDN.js"),__vite__mapDeps([109,8,110,82,26,34,24,7,108]))),C3=q.lazy(()=>ae(()=>import("./ConferenceDetailView-DFufisD9.js"),__vite__mapDeps([111,96,26,88,43,44,45,46,39,22,23,1,55,8,62,99,19,112,108,10,34,24,103]))),k3=q.lazy(()=>ae(()=>import("./ConferenceTaskView-EUoWDwlK.js"),__vite__mapDeps([113,14,15,16,17,18,19,10,20,21,22,23,24,25,26,27,88,43,44,45,46,39,1,55,8,62,112,32,33,34,103]))),P3=q.lazy(()=>ae(()=>import("./OrganizationsIndexView-BA4FIwH0.js"),__vite__mapDeps([114,34,8,115]))),R3=q.lazy(()=>ae(()=>import("./OrganizationDetailView-DhfYOewC.js"),__vite__mapDeps([116,101,9,1,11,88,43,44,45,46,39,22,23,55,117,26,8,14,15,16,17,18,19,10,20,21,24,25,27,34,74,2,7,52,75,32,33,62,85,103]))),T3=q.lazy(()=>ae(()=>import("./OrganizationDetailView-DhfYOewC.js"),__vite__mapDeps([116,101,9,1,11,88,43,44,45,46,39,22,23,55,117,26,8,14,15,16,17,18,19,10,20,21,24,25,27,34,74,2,7,52,75,32,33,62,85,103]))),I3=q.lazy(()=>ae(()=>import("./AuthorDetailView-CSBghhYh.js"),__vite__mapDeps([118,16,17,14,15,18,19,10,20,21,22,23,24,25,26,27,101,9,1,11,34,32,33,62,103]))),O3=q.lazy(()=>ae(()=>import("./MethodDetailView-BwtY3qhO.js"),__vite__mapDeps([119,101,9,1,11,18,19,10,14,15,16,17,20,21,22,23,24,25,26,27,88,43,44,45,46,39,55,8,62,90,32,33,34,103]))),M3=q.lazy(()=>ae(()=>import("./BenchmarkDetailView-BD72eXzJ.js"),__vite__mapDeps([120,101,9,1,11,8,65,23,39,24,66,69,70,21,110,82,20,26,34,102,90,62,103,121]))),A3=q.lazy(()=>ae(()=>import("./SavedPapersView-K9SaqBUw.js"),__vite__mapDeps([122,15,16,17,18,19,10,20,21,22,23,24,26,34,70,84]))),N3=q.lazy(()=>ae(()=>import("./SettingsView-BXlN-W-y.js"),__vite__mapDeps([123,1,9,110,82,13,6,12,94,31,68,58,69,70,51,93]))),$3=q.lazy(()=>ae(()=>import("./PrivacyView-GmtVPJE1.js"),__vite__mapDeps([124,68]))),F3=q.lazy(()=>ae(()=>import("./ApiDocsView-Bz-VouOg.js"),__vite__mapDeps([125,68,44,126]))),L3=q.lazy(()=>ae(()=>import("./McpView-BMeJDdU1.js"),__vite__mapDeps([127,68,49,41,51,48,128]))),j3=q.lazy(()=>ae(()=>import("./SubmitView-T2KNEFF1.js"),__vite__mapDeps([129,1,34,2,73,77,22,23,72]))),D3=q.lazy(()=>ae(()=>import("./CronDashboard-DbpR4-1O.js"),__vite__mapDeps([130,1,131,132,80,2,53,79,92,95,42,91,51,133,75,134,83,33,3,8,31]))),z3=q.lazy(()=>ae(()=>import("./AutonomousOperations-9dA7U5QM.js"),__vite__mapDeps([135,1,131,132,80,2,73,95,50]))),U3=q.lazy(()=>ae(()=>import("./SubmissionsDashboard-B3AlWGiS.js"),__vite__mapDeps([136,71,72,1,33,8,24,78,22,23,133,75,134,137]))),V3=q.lazy(()=>ae(()=>import("./UserProfileView-upsKaDwz.js"),__vite__mapDeps([138,117,26,8]))),B3=q.lazy(()=>ae(()=>import("./RateLimitsView-CgmyXrGR.js"),__vite__mapDeps([139,70]))),q3=q.lazy(()=>ae(()=>import("./AstraForRoboticsView-Dy0LNyoX.js"),__vite__mapDeps([140,14,15,16,17,18,19,10,20,21,22,23,24,25,26,27,34,32,33,68,141]))),sh=q.lazy(()=>ae(()=>import("./NotFound-BE9xg6GA.js"),[])),W3=q.lazy(()=>ae(()=>import("./SearchOverlay-COqBAgLs.js"),__vite__mapDeps([142,21,8,22,23,61,19,10]))),H3=q.lazy(()=>ae(()=>import("./StagingAccessRequestView-Dvx_jX4o.js"),__vite__mapDeps([143,134]))),Dk=()=>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}})]})]}),G3=new YA({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:1}}}),K3=()=>{const{arxivId:e}=wS();return w.jsx(Ki,{to:e?`/paper/${e}`:"/papers",replace:!0})},Q3=()=>{const{taskSlug:e}=wS();return w.jsx(Ki,{to:e?`/tasks/${e}`:"/tasks",replace:!0})},Y3=({element:e})=>$o()?w.jsx(Ki,{to:"/",replace:!0}):w.jsx(w.Fragment,{children:e}),pv=({element:e})=>{const{user:t,isLoading:n}=hk(),r=hn();return $o()?w.jsx(Ki,{to:"/",replace:!0}):n?w.jsx("div",{className:"page",children:w.jsx("div",{className:"submission-loading",children:w.jsx("span",{children:"Checking admin session..."})})}):t?t.is_admin?w.jsx(w.Fragment,{children:e}):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 @",t.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(m1,{returnTo:`${r.pathname}${r.search}`})]})})},X3=()=>{const e=Z$(),t=typeof window<"u"&&new URL(e,window.location.origin).origin!==window.location.origin;return q.useEffect(()=>{t&&window.location.replace(e)},[e,t]),t?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:e,children:"Continue"})]})}):w.jsx(pv,{element:w.jsx(D3,{})})},Q0=({reader:e=!1})=>{const[t,n]=q.useState(!1),{pathname:r}=hn();q.useEffect(()=>{const a=l=>{(l.metaKey||l.ctrlKey)&&l.key==="k"&&(l.preventDefault(),n(!0))};return window.addEventListener("keydown",a),()=>window.removeEventListener("keydown",a)},[]);const i=w.jsx(R2,{onOpenSearch:()=>n(!0)}),s=w.jsx(dS,{resetKey:r,children:w.jsx(q.Suspense,{fallback:w.jsx(Dk,{}),children:w.jsx(uA,{})})}),o=t&&w.jsx(q.Suspense,{fallback:null,children:w.jsx(W3,{open:t,onClose:()=>n(!1)})});return e?w.jsxs("div",{className:"reader-route-shell",children:[i,w.jsx("div",{className:"reader-route-content",children:s}),o]}):w.jsxs(w.Fragment,{children:[i,w.jsx("main",{children:s}),w.jsx(T2,{}),o]})},J3=()=>(a3(),q.useLayoutEffect(()=>{var e;(e=document.getElementById("initial-discovery-footer"))==null||e.remove()},[]),w.jsxs(cA,{children:[w.jsx(re,{path:"/request-access",element:w.jsx(q.Suspense,{fallback:w.jsx(Dk,{}),children:w.jsx(H3,{})})}),w.jsx(re,{element:w.jsx(Q0,{reader:!0}),children:w.jsx(re,{path:"/pdf/:paperId",element:nF()?w.jsx(m3,{}):w.jsx(sh,{})})}),w.jsxs(re,{element:w.jsx(Q0,{}),children:[w.jsx(re,{path:"/",element:w.jsx(f3,{})}),w.jsx(re,{path:"/following",element:w.jsx(c3,{})}),w.jsx(re,{path:"/topics/:topicParam",element:w.jsx(d3,{})}),w.jsx(re,{path:"/x-trending",element:w.jsx(Ki,{to:"/",replace:!0})}),w.jsx(re,{path:"/chat/:sessionId?",element:al()?w.jsx(h3,{}):w.jsx(Ki,{to:"/",replace:!0})}),w.jsx(re,{path:"/share/:shareId",element:al()?w.jsx(p3,{}):w.jsx(sh,{})}),w.jsx(re,{path:"/papers",element:w.jsx(v3,{})}),w.jsx(re,{path:"/papers/:arxivId",element:w.jsx(K3,{})}),w.jsx(re,{path:"/paper/:arxivId",element:w.jsx(g3,{})}),w.jsx(re,{path:"/tasks",element:w.jsx(y3,{})}),w.jsx(re,{path:"/tasks/:taskSlug",element:w.jsx(_3,{})}),w.jsx(re,{path:"/task/:taskSlug",element:w.jsx(Q3,{})}),w.jsx(re,{path:"/methods",element:w.jsx(w3,{})}),w.jsx(re,{path:"/methods/:methodSlug",element:w.jsx(O3,{})}),w.jsx(re,{path:"/frameworks",element:w.jsx(x3,{})}),w.jsx(re,{path:"/trends",element:w.jsx(b3,{})}),w.jsx(re,{path:"/conferences",element:w.jsx(E3,{})}),w.jsx(re,{path:"/ai-deadlines",element:w.jsx(S3,{})}),w.jsx(re,{path:"/conferences/:confSlug",element:w.jsx(C3,{})}),w.jsx(re,{path:"/conferences/:confSlug/:taskSlug",element:w.jsx(k3,{})}),w.jsx(re,{path:"/organizations",element:w.jsx(P3,{})}),w.jsx(re,{path:"/orgs/:orgSlug",element:w.jsx(R3,{})}),w.jsx(re,{path:"/orgs/:orgSlug/:taskSlug",element:w.jsx(T3,{})}),w.jsx(re,{path:"/authors/:authorId",element:w.jsx(I3,{})}),w.jsx(re,{path:"/benchmark/:datasetSlug",element:w.jsx(M3,{})}),w.jsx(re,{path:"/authorize-paper-edit/:authorizationId",element:w.jsx(u3,{})}),w.jsx(re,{path:"/submit",element:w.jsx(j3,{})}),w.jsx(re,{path:"/saved",element:w.jsx(Y3,{element:w.jsx(A3,{})})}),w.jsx(re,{path:"/settings",element:w.jsx(N3,{})}),w.jsx(re,{path:"/privacy",element:w.jsx($3,{})}),w.jsx(re,{path:"/docs/api",element:w.jsx(F3,{})}),w.jsx(re,{path:"/mcp",element:w.jsx(L3,{})}),w.jsx(re,{path:"/admin-dashboard",element:w.jsx(X3,{})}),w.jsx(re,{path:"/autonomous-operations",element:w.jsx(pv,{element:w.jsx(z3,{})})}),w.jsx(re,{path:"/cron-dashboard",element:w.jsx(Ki,{to:"/admin-dashboard",replace:!0})}),w.jsx(re,{path:"/submissions",element:w.jsx(pv,{element:w.jsx(U3,{})})}),w.jsx(re,{path:"/rate-limits",element:w.jsx(B3,{})}),w.jsx(re,{path:"/astra-for-robotics",element:w.jsx(q3,{})}),w.jsx(re,{path:"/:username",element:w.jsx(V3,{})}),w.jsx(re,{path:"*",element:w.jsx(sh,{})})]})]})),Z3=()=>w.jsx(XA,{client:G3,children:w.jsxs(S2,{children:[w.jsx(l3,{children:w.jsx(J3,{})}),w.jsx(o3,{}),!1]})});mM();const ez=w.jsx(mT,{attribute:"class",defaultTheme:"system",enableSystem:!0,disableTransitionOnChange:!0,storageKey:"pwc-theme",children:w.jsx(dS,{children:w.jsx(Z3,{})})}),tz=_b(document.getElementById("root"));tz.render(w.jsx(q.StrictMode,{children:ez}));export{f2 as $,Od as A,yd as B,a2 as C,et as D,ee as E,wj as F,os as G,m1 as H,ct as I,Rz as J,fz as K,bn as L,yz as M,U1 as N,Vj as O,br as P,dC as Q,Uj as R,u2 as S,Ez as T,s3 as U,q as V,Sz as W,c2 as X,nF as Y,dz as Z,d2 as _,hk as a,Pz as a$,ck as a0,er as a1,hz as a2,cz as a3,ow as a4,X$ as a5,l2 as a6,ae as a7,M1 as a8,xl as a9,vz as aA,El as aB,Up as aC,il as aD,GA as aE,at as aF,At as aG,IS as aH,bz as aI,e1 as aJ,Dg as aK,WS as aL,jg as aM,BA as aN,az as aO,oz as aP,lN as aQ,qg as aR,RS as aS,JA as aT,tN as aU,sN as aV,nN as aW,rN as aX,aN as aY,l0 as aZ,iN as a_,$g as aa,x2 as ab,cv as ac,_1 as ad,n3 as ae,Ys as af,q$ as ag,H$ as ah,G$ as ai,K$ as aj,vi as ak,Y$ as al,Q$ as am,uz as an,Ki as ao,Pj as ap,Rj as aq,tC as ar,wd as as,_d as at,Tj as au,Ij as av,iz as aw,rz as ax,b2 as ay,xz as az,uN as b,j1 as b0,D1 as b1,z1 as b2,z0 as b3,Id as c,Iz as d,sz as e,g as f,hn as g,J$ as h,$o as i,w as j,Mg as k,DS as l,al as m,tF as n,eF as o,E2 as p,Cz as q,Tz as r,pz as s,kz as t,wS as u,gz as v,mz as w,$2 as x,wz as y,ke as z}; + */const c2=Id("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),d2=t2,f2=n2,h2=g.forwardRef(({className:e,inset:t,children:n,...r},i)=>w.jsxs(ak,{ref:i,className:ct("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",t&&"pl-8",e),...r,children:[n,w.jsx(l2,{className:"ml-auto h-4 w-4"})]}));h2.displayName=ak.displayName;const p2=g.forwardRef(({className:e,...t},n)=>w.jsx(lk,{ref:n,className:ct("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",e),...t}));p2.displayName=lk.displayName;const ck=g.forwardRef(({className:e,sideOffset:t=4,...n},r)=>w.jsx(r2,{children:w.jsx(ek,{ref:r,sideOffset:t,className:ct("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",e),...n})}));ck.displayName=ek.displayName;const er=g.forwardRef(({className:e,inset:t,...n},r)=>w.jsx(nk,{ref:r,className:ct("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",t&&"pl-8",e),...n}));er.displayName=nk.displayName;const v2=g.forwardRef(({className:e,children:t,checked:n,...r},i)=>w.jsxs(rk,{ref:i,className:ct("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",e),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(sk,{children:w.jsx(a2,{className:"h-4 w-4"})})}),t]}));v2.displayName=rk.displayName;const g2=g.forwardRef(({className:e,children:t,...n},r)=>w.jsxs(ik,{ref:r,className:ct("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",e),...n,children:[w.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:w.jsx(sk,{children:w.jsx(u2,{className:"h-2 w-2 fill-current"})})}),t]}));g2.displayName=ik.displayName;const dk=g.forwardRef(({className:e,inset:t,...n},r)=>w.jsx(tk,{ref:r,className:ct("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n}));dk.displayName=tk.displayName;const uv=g.forwardRef(({className:e,...t},n)=>w.jsx(ok,{ref:n,className:ct("-mx-1 my-1 h-px bg-muted",e),...t}));uv.displayName=ok.displayName;function m2(e){const n=(e.name||e.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 y2=({user:e,onLogout:t})=>w.jsxs(d2,{children:[w.jsx(f2,{asChild:!0,children:w.jsx("button",{type:"button",className:"user-avatar-btn","aria-label":`Account menu for ${e.username}`,children:w.jsxs(j1,{className:"h-8 w-8",children:[e.avatar_url&&w.jsx(D1,{src:e.avatar_url,alt:e.username}),w.jsx(z1,{className:"text-xs",children:m2(e)})]})})}),w.jsxs(ck,{align:"end",className:"w-56",children:[w.jsxs(dk,{className:"flex flex-col gap-0.5 py-2",children:[w.jsx("span",{className:"text-sm font-medium leading-tight",children:e.name||e.username}),w.jsxs("span",{className:"text-xs font-normal text-muted-foreground",children:["@",e.username]}),e.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"}),e.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(uv,{}),w.jsx(er,{asChild:!0,children:w.jsx("a",{href:`https://huggingface.co/${encodeURIComponent(e.username)}`,target:"_blank",rel:"noopener noreferrer",children:"Hugging Face profile"})}),w.jsx(er,{asChild:!0,children:w.jsx(bn,{to:"/frameworks",children:"Frameworks"})}),w.jsx(er,{asChild:!0,children:w.jsx(bn,{to:"/trends",children:"Trends"})}),e.is_admin&&w.jsxs(w.Fragment,{children:[w.jsx(er,{asChild:!0,children:w.jsx(bn,{to:"/admin-dashboard",children:"Admin dashboard"})}),w.jsx(er,{asChild:!0,children:w.jsx(bn,{to:"/submissions",children:"Review submissions"})})]}),w.jsx(er,{asChild:!0,children:w.jsx(bn,{to:`/${encodeURIComponent(e.username)}`,children:"My contributions"})}),w.jsx(er,{asChild:!0,children:w.jsx(bn,{to:"/settings",children:"Settings"})}),w.jsx(uv,{}),w.jsx(er,{onSelect:n=>{n.preventDefault(),t()},children:"Log out"})]})]}),_2=!1;class Od extends Error{constructor(n,r){var i;super(`API request failed: ${n.status} ${n.statusText}`);kr(this,"status");kr(this,"statusText");kr(this,"response");kr(this,"detail");kr(this,"code");kr(this,"displayMessage");this.name="ApiError",this.status=n.status,this.statusText=n.statusText,this.response=r;try{if(this.detail=(i=JSON.parse(r))==null?void 0:i.detail,typeof this.detail=="string"&&(this.message=this.detail),Array.isArray(this.detail)){const s=this.detail[0];typeof s=="object"&&s!==null&&"msg"in s&&typeof s.msg=="string"&&(this.message=s.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 s="help"in this.detail&&typeof this.detail.help=="string"?` See ${this.detail.help} for help.`:"";this.message=`${this.detail.message}${s}`}}catch{this.detail=void 0,this.displayMessage=r||this.message;return}this.displayMessage=this.message}}function wz(e,t){return e instanceof Od?e.displayMessage||t:typeof e=="object"&&e!==null&&"message"in e&&typeof e.message=="string"&&e.message||t}class w2{constructor(t){this.baseUrl=t}async fetch(t,n){const r=`${this.baseUrl}${t}`;try{const{headers:i,...s}=n??{},a=(s.method??"GET").toUpperCase()==="GET"?"default":"no-store",l=new Headers(i);return typeof s.body=="string"&&!l.has("Content-Type")&&l.set("Content-Type","application/json"),await fetch(r,{...s,cache:s.cache??a,credentials:s.credentials??"include",headers:l})}catch(i){throw console.error(`[API] Request to ${r} failed:`,i),i}}async fetchOk(t,n){const r=await this.fetch(t,n);if(!r.ok){const i=new Od(r,await r.text());throw console.error("[API] Error response:",i.response),i}return r}async request(t,n){const r=await this.fetchOk(t,n);return r.status===204?void 0:await r.json()}}function x2(e){e instanceof Od&&e.status===401&&e.code!=="fresh_auth_required"&&e.code!=="saved_papers_bucket_authorization_required"&&typeof window<"u"&&window.dispatchEvent(new CustomEvent("pwc:auth-stale"))}async function fk(e){try{return await e()}catch(t){throw x2(t),t}}const cm=new w2(`${Bg()}/api/v1`),b2=(e,t)=>cm.fetch(e,t),xz=(e,t)=>fk(()=>cm.fetchOk(e,t)),cv=(e,t)=>fk(()=>cm.request(e,t));async function bz(e,t){try{return await cv(e,t)}catch(n){if(n instanceof Od&&n.status===404)return null;throw n}}const z0={async getCurrentUser(){if($o())return null;const e=await b2("/auth/me",{cache:"no-store"});return e.status===401||!e.ok?null:e.json()},async logout(){await cv("/auth/logout",{method:"POST"})},async requestStagingAccess(){await cv("/staging-access-request",{method:"POST"})}},E2={detail:e=>["paper",e],arxiv:e=>["paper-arxiv",e],preview:e=>["paper-preview",e],summary:e=>["paper-summary",e],feeds:{list:["papers"],infinite:["papers-infinite"],following:["research-feed"],search:["paper-search-feed"],task:["task-papers-infinite"],conference:["conference-papers-infinite"],organization:["organization-papers-infinite"],method:["method-papers-infinite"],saved:["my-bookmarks"],related:["related-papers"],versions:["paper-versions"],searchOverlay:["search-papers"],mentions:["chat-paper-mention-search"],trending:["trending-papers"]}},Ez=10*60*1e3,hu={me:["auth","me"]},Sz={preferences:["account","preferences"],bookmarkIds:["my-bookmark-ids"]},Cz={areas:["areas-all"],area:e=>["area",e],topTasksSidebar:["top-tasks-sidebar"],task:e=>["task",e],method:e=>["method",e],organization:e=>["organization",e],dataset:e=>["dataset",e],datasets:["dataset"],datasetTasks:["dataset-tasks"],taskPage:["task-page"],taskBenchmarkTrends:["task-benchmark-trends"],organizations:["organizations"]},kz={all:["evaluations"],byPaper:e=>["evaluations","paper",e],byPaperAll:["evaluations","paper"],byDatasetAll:["dataset-evals"],byDataset:e=>["dataset-evals",e]},Pz={pendingEdits:["pendingPaperEdits"]},Rz={all:["admin"],cronStatus:["admin","cronStatus"],chatSandboxSpend:e=>["admin","chatSandboxSpend",e],chatWebSearchBudget:["admin","chatWebSearchBudget"],autonomousOperations:["admin","autonomousOperations"],paperMarkdownJobs:["admin","paperMarkdownJobs"],codexPaperJobs:["admin","codexPaperJobs"],codexPaperJob:(e,t)=>["admin","codexPaperJob",e,t],catalogAudit:["catalog-audit"]},Tz={follows:e=>["research-follows",e],topics:e=>["research-topics",e],publicTopics:["research-public-topic"],publicTopic:(e,t)=>["research-public-topic",e,t],topicPapers:(e,t,n,r)=>[`research-topic-papers-${e}`,t,n.startDate??null,n.endDate??null,r],featuredTopics:["research-featured-topics"],email:e=>["research-email",e],feed:e=>[...E2.feeds.following,e]},dm=q.createContext(null),U0="pwc:auth-stale",S2=({children:e})=>{const t=DS(),n=uN({queryKey:hu.me,queryFn:()=>z0.getCurrentUser(),staleTime:1/0}),r=n.data??null,i=q.useRef(null),{refetch:s}=n,o=q.useCallback(async()=>{await s()},[s]),a=q.useCallback(async()=>{const u=qg("/api/v1/auth/logout");if(new URL(u,window.location.origin).origin!==window.location.origin){const c=document.createElement("form");c.method="POST",c.action=`${u}?return_to=${encodeURIComponent(window.location.href)}`,document.body.appendChild(c),c.submit();return}await z0.logout(),t.setQueryData(hu.me,null)},[t]);q.useEffect(()=>{},[r]),q.useEffect(()=>{i.current&&!r&&t.resetQueries({predicate:u=>u.queryKey[0]!==hu.me[0]}),i.current=r},[t,r]),q.useEffect(()=>{const u=()=>t.setQueryData(hu.me,null);return window.addEventListener(U0,u),()=>window.removeEventListener(U0,u)},[t]);const l=q.useMemo(()=>({user:r,isLoading:n.isPending,refresh:o,logout:a}),[r,n.isPending,o,a]);return w.jsx(dm.Provider,{value:l,children:e})};function hk(){const e=q.useContext(dm);if(!e)throw new Error("useAuth must be used inside an ");return e}function Iz(){return q.useContext(dm)}const Mr=({name:e,size:t=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"}),github:w.jsx("path",{fill:"currentColor",d:"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z"})};return w.jsx("svg",{className:t===11?"icon-sm":"icon",viewBox:"0 0 16 16",width:t,height:t,children:n[e]})},V0="https://github.com/huggingface/paperswithcode-feedback/issues",B0="https://github.com/huggingface/paperswithcode",C2="https://paperswithcode.co/following",q0="pwc:announcement:following-feed:v1:dismissed",th=[{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}],k2=()=>{if(typeof navigator>"u")return!1;const e=navigator.userAgentData,t=(e==null?void 0:e.platform)||navigator.platform||navigator.userAgent||"";return/Mac|iPhone|iPad|iPod/i.test(t)},P2=()=>{const[e,t]=q.useState(!1);return q.useEffect(()=>{t(k2())},[]),w.jsx("kbd",{children:e?"⌘K":"Ctrl K"})},R2=({onOpenSearch:e})=>{const[t,n]=q.useState(!1),[r,i]=q.useState(()=>localStorage.getItem(q0)!=="1"),s=q.useRef(null),o=q.useRef(null),a=()=>n(!1),{user:l,logout:u}=hk(),c=hn(),d=c.pathname.startsWith("/pdf/"),f=`${c.pathname}${c.search}`||"/",m=$o(),_=al()?{to:"/chat",label:"Chat",end:!1,badge:"New"}:tF()?{to:"/chat",label:"Chat",end:!1,badge:"New",href:eF}:null,p=_?[th[0],_,...th.slice(1)]:th;return q.useLayoutEffect(()=>{var S;const y=s.current,h=o.current;if(!y||!h)return;let v=!1;const x=()=>{if(v)return;const P=y.querySelector(".nav-item.active"),C=(P==null?void 0:P.offsetWidth)??0;h.style.width=`${C}px`,h.style.transform=`translateX(${(P==null?void 0:P.offsetLeft)??0}px)`,h.style.opacity=C>0?"1":"0"};x();const b=window.requestAnimationFrame(()=>{h.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),()=>{v=!0,window.cancelAnimationFrame(b),E==null||E.disconnect(),window.removeEventListener("resize",x)}},[c.pathname,p.length]),w.jsxs(q$,{open:t,onOpenChange:n,children:[w.jsxs("header",{className:"app-header",children:[w.jsxs("div",{className:"app-header-inner",children:[w.jsxs(ys,{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:s,children:[p.map(({to:y,label:h,end:v,badge:x,href:b})=>{const E=w.jsxs(w.Fragment,{children:[w.jsx("span",{children:h}),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(ys,{to:y,end:v,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:V0,target:"_blank",rel:"noreferrer",children:"Submit feedback"}),w.jsx("a",{className:"icon-btn header-github-btn",href:B0,target:"_blank",rel:"noreferrer","aria-label":"GitHub repository",title:"GitHub repository",children:w.jsx(Mr,{name:"github",size:14})}),w.jsxs("button",{className:"search-trigger","aria-label":"Search papers, authors, domains",onClick:e,children:[w.jsx(Mr,{name:"search",size:13}),w.jsx("span",{children:"Search papers, authors, domains…"}),w.jsx(P2,{})]}),w.jsx("button",{className:"icon-btn mobile-search-btn","aria-label":"Search",onClick:e,children:w.jsx(Mr,{name:"search",size:14})}),!m&&w.jsx(ys,{to:"/saved",className:"icon-btn header-bookmark-btn","aria-label":"Saved papers",title:"Saved papers",children:w.jsx(Mr,{name:"bookmark",size:13})}),m?null:l?w.jsx(y2,{user:l,onLogout:u}):w.jsx(m1,{returnTo:f}),w.jsx(W$,{asChild:!0,children:w.jsx("button",{className:"icon-btn mobile-menu-btn","aria-label":"Open menu",children:w.jsx(Mr,{name:"menu",size:14})})})]}),!d&&r&&w.jsxs("div",{className:"site-announcement",role:"status",children:[w.jsx("span",{children:"New: "}),m?w.jsx("a",{href:C2,target:"_blank",rel:"noreferrer",children:"following feed"}):w.jsx(bn,{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(q0,"1"),i(!1)},children:w.jsx(Mr,{name:"close",size:11})})]})]}),w.jsx(H$,{children:w.jsx(G$,{className:"mobile-nav-drawer",children:w.jsxs(K$,{className:"mobile-nav-panel","aria-describedby":void 0,children:[w.jsx(Q$,{className:"sr-only",children:"Navigation menu"}),w.jsx(Y$,{className:"icon-btn mobile-nav-close","aria-label":"Close menu",children:w.jsx(Mr,{name:"close",size:14})}),w.jsxs("button",{type:"button",className:"mobile-nav-link mobile-nav-search",onClick:()=>{a(),e()},children:[w.jsx(Mr,{name:"search",size:14}),w.jsx("span",{children:"Search papers, authors, domains…"})]}),p.map(({to:y,label:h,end:v,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:h}),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(ys,{to:y,end:v,className:E,onClick:a,children:S},y)}),w.jsx("a",{className:"mobile-nav-link",href:V0,target:"_blank",rel:"noreferrer",onClick:a,children:"Submit feedback"}),w.jsx("a",{className:"mobile-nav-link",href:B0,target:"_blank",rel:"noreferrer",onClick:a,children:"GitHub"}),!m&&w.jsx(ys,{to:"/saved",className:"mobile-nav-link",onClick:a,children:"Saved papers"}),!m&&(l==null?void 0:l.is_admin)&&w.jsx(ys,{to:"/admin-dashboard",className:"mobile-nav-link",onClick:a,children:"Admin dashboard"})]})})})]})},T2=()=>{const{pathname:e}=hn();return e==="/chat"||e.startsWith("/chat/")||e.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(bn,{to:"/docs/api",children:"API"}),w.jsx(bn,{to:"/mcp",children:"MCP"}),w.jsx(bn,{to:"/privacy",children:"Privacy"}),w.jsx("a",{href:"https://github.com/huggingface/paperswithcode-feedback/issues",target:"_blank",rel:"noreferrer",children:"Feedback"})]})})},I2=1,O2=1e6;let nh=0;function M2(){return nh=(nh+1)%Number.MAX_SAFE_INTEGER,nh.toString()}const rh=new Map,W0=e=>{if(rh.has(e))return;const t=setTimeout(()=>{rh.delete(e),Ia({type:"REMOVE_TOAST",toastId:e})},O2);rh.set(e,t)},A2=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,I2)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(n=>n.id===t.toast.id?{...n,...t.toast}:n)};case"DISMISS_TOAST":{const{toastId:n}=t;return n?W0(n):e.toasts.forEach(r=>{W0(r.id)}),{...e,toasts:e.toasts.map(r=>r.id===n||n===void 0?{...r,open:!1}:r)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(n=>n.id!==t.toastId)}}},Lu=[];let ju={toasts:[]};function Ia(e){ju=A2(ju,e),Lu.forEach(t=>{t(ju)})}function N2({...e}){const t=M2(),n=i=>Ia({type:"UPDATE_TOAST",toast:{...i,id:t}}),r=()=>Ia({type:"DISMISS_TOAST",toastId:t});return Ia({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:i=>{i||r()}}}),{id:t,dismiss:r,update:n}}function $2(){const[e,t]=g.useState(ju);return g.useEffect(()=>(Lu.push(t),()=>{const n=Lu.indexOf(t);n>-1&&Lu.splice(n,1)}),[e]),{...e,toast:N2,dismiss:n=>Ia({type:"DISMISS_TOAST",toastId:n})}}var F2=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"}),L2="VisuallyHidden",fm=g.forwardRef((e,t)=>w.jsx(ke.span,{...e,ref:t,style:{...F2,...e.style}}));fm.displayName=L2;var hm="ToastProvider",[pm,j2,D2]=Kg("Toast"),[pk]=os("Toast",[D2]),[z2,Md]=pk(hm),vk=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:i="right",swipeThreshold:s=50,children:o}=e,[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 \`${hm}\`. Expected non-empty \`string\`.`),w.jsx(pm.Provider,{scope:t,children:w.jsx(z2,{scope:t,label:n,duration:r,swipeDirection:i,swipeThreshold:s,toastCount:u,viewport:a,onViewportChange:l,onToastAdd:g.useCallback(()=>c(m=>m+1),[]),onToastRemove:g.useCallback(()=>c(m=>m-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:f,children:o})})};vk.displayName=hm;var gk="ToastViewport",U2=["F8"],dv="toast.viewportPause",fv="toast.viewportResume",mk=g.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=U2,label:i="Notifications ({hotkey})",...s}=e,o=Md(gk,n),a=j2(n),l=g.useRef(null),u=g.useRef(null),c=g.useRef(null),d=g.useRef(null),f=et(t,d,o.onViewportChange),m=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),_=o.toastCount>0;g.useEffect(()=>{const y=h=>{var x;r.length!==0&&r.every(b=>h[b]||h.code===b)&&((x=d.current)==null||x.focus())};return document.addEventListener("keydown",y),()=>document.removeEventListener("keydown",y)},[r]),g.useEffect(()=>{const y=l.current,h=d.current;if(_&&y&&h){const v=()=>{if(!o.isClosePausedRef.current){const S=new CustomEvent(dv);h.dispatchEvent(S),o.isClosePausedRef.current=!0}},x=()=>{if(o.isClosePausedRef.current){const S=new CustomEvent(fv);h.dispatchEvent(S),o.isClosePausedRef.current=!1}},b=S=>{!y.contains(S.relatedTarget)&&x()},E=()=>{y.contains(document.activeElement)||x()};return y.addEventListener("focusin",v),y.addEventListener("focusout",b),y.addEventListener("pointermove",v),y.addEventListener("pointerleave",E),window.addEventListener("blur",v),window.addEventListener("focus",x),()=>{y.removeEventListener("focusin",v),y.removeEventListener("focusout",b),y.removeEventListener("pointermove",v),y.removeEventListener("pointerleave",E),window.removeEventListener("blur",v),window.removeEventListener("focus",x)}}},[_,o.isClosePausedRef]);const p=g.useCallback(({tabbingDirection:y})=>{const v=a().map(x=>{const b=x.ref.current,E=[b,...e3(b)];return y==="forwards"?E:E.reverse()});return(y==="forwards"?v.reverse():v).flat()},[a]);return g.useEffect(()=>{const y=d.current;if(y){const h=v=>{var E,S,P;const x=v.altKey||v.ctrlKey||v.metaKey;if(v.key==="Tab"&&!x){const C=document.activeElement,T=v.shiftKey;if(v.target===y&&T){(E=u.current)==null||E.focus();return}const M=p({tabbingDirection:T?"backwards":"forwards"}),z=M.findIndex(F=>F===C);ih(M.slice(z+1))?v.preventDefault():T?(S=u.current)==null||S.focus():(P=c.current)==null||P.focus()}};return y.addEventListener("keydown",h),()=>y.removeEventListener("keydown",h)}},[a,p]),w.jsxs(MN,{ref:l,role:"region","aria-label":i.replace("{hotkey}",m),tabIndex:-1,style:{pointerEvents:_?void 0:"none"},children:[_&&w.jsx(hv,{ref:u,onFocusFromOutsideViewport:()=>{const y=p({tabbingDirection:"forwards"});ih(y)}}),w.jsx(pm.Slot,{scope:n,children:w.jsx(ke.ol,{tabIndex:-1,...s,ref:f})}),_&&w.jsx(hv,{ref:c,onFocusFromOutsideViewport:()=>{const y=p({tabbingDirection:"backwards"});ih(y)}})]})});mk.displayName=gk;var yk="ToastFocusProxy",hv=g.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...i}=e,s=Md(yk,n);return w.jsx(fm,{tabIndex:0,...i,ref:t,style:{position:"fixed"},onFocus:o=>{var u;const a=o.relatedTarget;!((u=s.viewport)!=null&&u.contains(a))&&r()}})});hv.displayName=yk;var Rl="Toast",V2="toast.swipeStart",B2="toast.swipeMove",q2="toast.swipeCancel",W2="toast.swipeEnd",_k=g.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:i,onOpenChange:s,...o}=e,[a,l]=yd({prop:r,defaultProp:i??!0,onChange:s,caller:Rl});return w.jsx(br,{present:n||a,children:w.jsx(K2,{open:a,...o,ref:t,onClose:()=>l(!1),onPause:Ut(e.onPause),onResume:Ut(e.onResume),onSwipeStart:ee(e.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:ee(e.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:ee(e.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:ee(e.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)})})})});_k.displayName=Rl;var[H2,G2]=pk(Rl,{onClose(){}}),K2=g.forwardRef((e,t)=>{const{__scopeToast:n,type:r="foreground",duration:i,open:s,onClose:o,onEscapeKeyDown:a,onPause:l,onResume:u,onSwipeStart:c,onSwipeMove:d,onSwipeCancel:f,onSwipeEnd:m,..._}=e,p=Md(Rl,n),[y,h]=g.useState(null),v=et(t,F=>h(F)),x=g.useRef(null),b=g.useRef(null),E=i||p.duration,S=g.useRef(0),P=g.useRef(E),C=g.useRef(0),{onToastAdd:T,onToastRemove:R}=p,N=Ut(()=>{var W;(y==null?void 0:y.contains(document.activeElement))&&((W=p.viewport)==null||W.focus()),o()}),M=g.useCallback(F=>{!F||F===1/0||(window.clearTimeout(C.current),S.current=new Date().getTime(),C.current=window.setTimeout(N,F))},[N]);g.useEffect(()=>{const F=p.viewport;if(F){const W=()=>{M(P.current),u==null||u()},B=()=>{const Q=new Date().getTime()-S.current;P.current=P.current-Q,window.clearTimeout(C.current),l==null||l()};return F.addEventListener(dv,B),F.addEventListener(fv,W),()=>{F.removeEventListener(dv,B),F.removeEventListener(fv,W)}}},[p.viewport,E,l,u,M]),g.useEffect(()=>{s&&!p.isClosePausedRef.current&&M(E)},[s,E,p.isClosePausedRef,M]),g.useEffect(()=>(T(),()=>R()),[T,R]);const z=g.useMemo(()=>y?kk(y):null,[y]);return p.viewport?w.jsxs(w.Fragment,{children:[z&&w.jsx(Q2,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite",children:z}),w.jsx(H2,{scope:n,onClose:N,children:xl.createPortal(w.jsx(pm.ItemSlot,{scope:n,children:w.jsx(ON,{asChild:!0,onEscapeKeyDown:ee(a,()=>{p.isFocusedToastEscapeKeyDownRef.current||N(),p.isFocusedToastEscapeKeyDownRef.current=!1}),children:w.jsx(ke.li,{tabIndex:0,"data-state":s?"open":"closed","data-swipe-direction":p.swipeDirection,..._,ref:v,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:ee(e.onKeyDown,F=>{F.key==="Escape"&&(a==null||a(F.nativeEvent),F.nativeEvent.defaultPrevented||(p.isFocusedToastEscapeKeyDownRef.current=!0,N()))}),onPointerDown:ee(e.onPointerDown,F=>{F.button===0&&(x.current={x:F.clientX,y:F.clientY})}),onPointerMove:ee(e.onPointerMove,F=>{if(!x.current)return;const W=F.clientX-x.current.x,B=F.clientY-x.current.y,Q=!!b.current,O=["left","right"].includes(p.swipeDirection),A=["left","up"].includes(p.swipeDirection)?Math.min:Math.max,V=O?A(0,W):0,K=O?0:A(0,B),te=F.pointerType==="touch"?10:2,oe={x:V,y:K},de={originalEvent:F,delta:oe};Q?(b.current=oe,pu(B2,d,de,{discrete:!1})):H0(oe,p.swipeDirection,te)?(b.current=oe,pu(V2,c,de,{discrete:!1}),F.target.setPointerCapture(F.pointerId)):(Math.abs(W)>te||Math.abs(B)>te)&&(x.current=null)}),onPointerUp:ee(e.onPointerUp,F=>{const W=b.current,B=F.target;if(B.hasPointerCapture(F.pointerId)&&B.releasePointerCapture(F.pointerId),b.current=null,x.current=null,W){const Q=F.currentTarget,O={originalEvent:F,delta:W};H0(W,p.swipeDirection,p.swipeThreshold)?pu(W2,m,O,{discrete:!0}):pu(q2,f,O,{discrete:!0}),Q.addEventListener("click",A=>A.preventDefault(),{once:!0})}})})})}),p.viewport)})]}):null}),Q2=e=>{const{__scopeToast:t,children:n,...r}=e,i=Md(Rl,t),[s,o]=g.useState(!1),[a,l]=g.useState(!1);return J2(()=>o(!0)),g.useEffect(()=>{const u=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(u)},[]),a?null:w.jsx(wd,{asChild:!0,children:w.jsx(fm,{...r,children:s&&w.jsxs(w.Fragment,{children:[i.label," ",n]})})})},Y2="ToastTitle",wk=g.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return w.jsx(ke.div,{...r,ref:t})});wk.displayName=Y2;var X2="ToastDescription",xk=g.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return w.jsx(ke.div,{...r,ref:t})});xk.displayName=X2;var bk="ToastAction",Ek=g.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?w.jsx(Ck,{altText:n,asChild:!0,children:w.jsx(vm,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${bk}\`. Expected non-empty \`string\`.`),null)});Ek.displayName=bk;var Sk="ToastClose",vm=g.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,i=G2(Sk,n);return w.jsx(Ck,{asChild:!0,children:w.jsx(ke.button,{type:"button",...r,ref:t,onClick:ee(e.onClick,i.onClose)})})});vm.displayName=Sk;var Ck=g.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...i}=e;return w.jsx(ke.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...i,ref:t})});function kk(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),Z2(r)){const i=r.ariaHidden||r.hidden||r.style.display==="none",s=r.dataset.radixToastAnnounceExclude==="";if(!i)if(s){const o=r.dataset.radixToastAnnounceAlt;o&&t.push(o)}else t.push(...kk(r))}}),t}function pu(e,t,n,{discrete:r}){const i=n.originalEvent.currentTarget,s=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?Lg(i,s):i.dispatchEvent(s)}var H0=(e,t,n=0)=>{const r=Math.abs(e.x),i=Math.abs(e.y),s=r>i;return t==="left"||t==="right"?s&&r>n:!s&&i>n};function J2(e=()=>{}){const t=Ut(e);fn(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function Z2(e){return e.nodeType===e.ELEMENT_NODE}function e3(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function ih(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var t3=vk,Pk=mk,Rk=_k,Tk=wk,Ik=xk,Ok=Ek,Mk=vm;const G0=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,K0=M1,n3=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return K0(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:i,defaultVariants:s}=t,o=Object.keys(i).map(u=>{const c=n==null?void 0:n[u],d=s==null?void 0:s[u];if(c===null)return null;const f=G0(c)||G0(d);return i[u][f]}),a=n&&Object.entries(n).reduce((u,c)=>{let[d,f]=c;return f===void 0||(u[d]=f),u},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,c)=>{let{class:d,className:f,...m}=c;return Object.entries(m).every(_=>{let[p,y]=_;return Array.isArray(y)?y.includes({...s,...a}[p]):{...s,...a}[p]===y})?[...u,d,f]:u},[]);return K0(e,o,l,n==null?void 0:n.class,n==null?void 0:n.className)},r3=t3,Ak=g.forwardRef(({className:e,...t},n)=>w.jsx(Pk,{ref:n,className:ct("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]",e),...t}));Ak.displayName=Pk.displayName;const i3=n3("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"}}),Nk=g.forwardRef(({className:e,variant:t,...n},r)=>w.jsx(Rk,{ref:r,className:ct(i3({variant:t}),e),...n}));Nk.displayName=Rk.displayName;const s3=g.forwardRef(({className:e,...t},n)=>w.jsx(Ok,{ref:n,className:ct("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",e),...t}));s3.displayName=Ok.displayName;const $k=g.forwardRef(({className:e,...t},n)=>w.jsx(Mk,{ref:n,className:ct("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",e),"aria-label":"Dismiss notification","toast-close":"",...t,children:w.jsx(c2,{className:"h-4 w-4"})}));$k.displayName=Mk.displayName;const Fk=g.forwardRef(({className:e,...t},n)=>w.jsx(Tk,{ref:n,className:ct("text-sm font-semibold",e),...t}));Fk.displayName=Tk.displayName;const Lk=g.forwardRef(({className:e,...t},n)=>w.jsx(Ik,{ref:n,className:ct("text-sm opacity-90",e),...t}));Lk.displayName=Ik.displayName;function o3(){const{toasts:e}=$2();return w.jsxs(r3,{children:[e.map(function({id:t,title:n,description:r,action:i,...s}){return w.jsxs(Nk,{...s,children:[w.jsxs("div",{className:"grid gap-1",children:[n&&w.jsx(Fk,{children:n}),r&&w.jsx(Lk,{children:r})]}),i,w.jsx($k,{})]},t)}),w.jsx(Ak,{})]})}function a3(){const{pathname:e,hash:t}=hn();g.useLayoutEffect(()=>{t||window.scrollTo({top:0,left:0,behavior:"instant"})},[e,t])}const jk=rF(),l3=jk?wA:_A;if(!jk&&typeof window<"u"){const e=window.location.hash;e.startsWith("#/")&&!e.startsWith("#//")&&window.history.replaceState(null,"",e.slice(1))}const u3=q.lazy(()=>ae(()=>import("./AuthorizePaperEditView-DtkWcUHu.js"),__vite__mapDeps([0,1,2,3]))),c3=q.lazy(()=>ae(()=>import("./FollowingView-BemIb4-Z.js"),__vite__mapDeps([4,5,6,7,8,9,1,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34]))),d3=q.lazy(()=>ae(()=>import("./TopicView-Dcpv-HZh.js"),__vite__mapDeps([35,14,15,16,17,18,19,10,20,21,22,23,24,25,26,27,32,33,9,1,11,36]))),f3=q.lazy(()=>ae(()=>import("./FeedView-6xUWjpm4.js"),__vite__mapDeps([5,6,7,8,9,1,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34]))),h3=q.lazy(()=>ae(()=>import("./ChatView-DAikess2.js"),__vite__mapDeps([37,38,30,31,22,23,39,40,8,41,42,43,44,45,46,1,47,48,49,50,51,11,52,53,16,17,54,55,28,29,56,20,57,58]))),p3=q.lazy(()=>ae(()=>import("./SharedChatView-4eHoic3i.js"),__vite__mapDeps([59,38,30,31,22,23,39,40,8,41,42,43,44,45,46,1,47,48,49,50,51,11,52,53,16,17,54,55]))),v3=q.lazy(()=>ae(()=>import("./PapersListView-tKeAfHNj.js"),__vite__mapDeps([60,18,19,10,20,14,15,16,17,21,22,23,24,25,26,27,8,32,33,61,34,62,63]))),g3=q.lazy(()=>ae(()=>import("./PaperDetailView-BRUxkorx.js"),__vite__mapDeps([64,1,20,18,19,10,21,65,23,39,24,66,22,67,32,33,68,69,70,57,26,34,2,7,29,48,71,72,73,74,25,52,75,40,8,76,77,78,79,11,80,81,41,82,83,44,45,27,84,85,16,17,86]))),m3=q.lazy(()=>ae(()=>import("./PaperReaderView-Bdokcr9P.js"),__vite__mapDeps([87,38,30,31,22,23,39,40,8,41,42,43,44,45,46,1,47,48,49,50,51,11,52,53,16,17,54,55,88,67,24,32,33,37,28,29,56,20,57,58]))),y3=q.lazy(()=>ae(()=>import("./TagsIndexView-B8PyY2yF.js"),__vite__mapDeps([89,8,19,10,90,52,91,56,92,93,47,79,36,94,42,95,81,6,34,96,26,97,76,2,73,77,74,25,7,75,1,78,11,98,99]))),_3=q.lazy(()=>ae(()=>import("./TagBrowseView-zzh9zkuk.js"),__vite__mapDeps([100,101,9,1,11,18,19,10,14,15,16,17,20,21,22,23,24,25,26,27,12,102,88,43,44,45,46,39,55,8,62,63,69,70,90,32,33,34,103,94,41]))),w3=q.lazy(()=>ae(()=>import("./MethodsIndexView-DI2_sTpn.js"),__vite__mapDeps([104,8,99,90,34,96,26,97,76,2,73,77,74,25,7,52,75,1,78,11,98,92]))),x3=q.lazy(()=>ae(()=>import("./FrameworksIndexView-CogZFpfQ.js"),__vite__mapDeps([105,20,8,19,63]))),b3=q.lazy(()=>ae(()=>import("./TrendsView-BuSUElxo.js"),__vite__mapDeps([106,34,26]))),E3=q.lazy(()=>ae(()=>import("./ConferencesIndexView-DGftnYu4.js"),__vite__mapDeps([107,8,108,34,96,26,97,76,2,73,77,74,25,7,52,75,1,78,11]))),S3=q.lazy(()=>ae(()=>import("./AiDeadlinesView-BG77EAes.js"),__vite__mapDeps([109,8,110,82,26,34,24,7,108]))),C3=q.lazy(()=>ae(()=>import("./ConferenceDetailView-BapnrC2V.js"),__vite__mapDeps([111,96,26,88,43,44,45,46,39,22,23,1,55,8,62,99,19,112,108,10,34,24,103]))),k3=q.lazy(()=>ae(()=>import("./ConferenceTaskView-DG4QYE8x.js"),__vite__mapDeps([113,14,15,16,17,18,19,10,20,21,22,23,24,25,26,27,88,43,44,45,46,39,1,55,8,62,112,32,33,34,103]))),P3=q.lazy(()=>ae(()=>import("./OrganizationsIndexView-f5uEFGH-.js"),__vite__mapDeps([114,34,8,115]))),R3=q.lazy(()=>ae(()=>import("./OrganizationDetailView-BFZVxf5K.js"),__vite__mapDeps([116,101,9,1,11,88,43,44,45,46,39,22,23,55,117,26,8,14,15,16,17,18,19,10,20,21,24,25,27,34,74,2,7,52,75,32,33,62,85,103]))),T3=q.lazy(()=>ae(()=>import("./OrganizationDetailView-BFZVxf5K.js"),__vite__mapDeps([116,101,9,1,11,88,43,44,45,46,39,22,23,55,117,26,8,14,15,16,17,18,19,10,20,21,24,25,27,34,74,2,7,52,75,32,33,62,85,103]))),I3=q.lazy(()=>ae(()=>import("./AuthorDetailView-CDAXgj3C.js"),__vite__mapDeps([118,16,17,14,15,18,19,10,20,21,22,23,24,25,26,27,101,9,1,11,34,32,33,62,103]))),O3=q.lazy(()=>ae(()=>import("./MethodDetailView-BP_5bAuS.js"),__vite__mapDeps([119,101,9,1,11,18,19,10,14,15,16,17,20,21,22,23,24,25,26,27,88,43,44,45,46,39,55,8,62,90,32,33,34,103]))),M3=q.lazy(()=>ae(()=>import("./BenchmarkDetailView-CLQh8rRr.js"),__vite__mapDeps([120,101,9,1,11,8,65,23,39,24,66,69,70,21,110,82,20,26,34,102,90,62,103,121]))),A3=q.lazy(()=>ae(()=>import("./SavedPapersView-CWCS7z3x.js"),__vite__mapDeps([122,15,16,17,18,19,10,20,21,22,23,24,26,34,70,84]))),N3=q.lazy(()=>ae(()=>import("./SettingsView-BrTjKeDA.js"),__vite__mapDeps([123,1,9,110,82,13,6,12,94,31,68,58,69,70,51,93]))),$3=q.lazy(()=>ae(()=>import("./PrivacyView-D9qn84RB.js"),__vite__mapDeps([124,68]))),F3=q.lazy(()=>ae(()=>import("./ApiDocsView-C6VvPmjf.js"),__vite__mapDeps([125,68,44,126]))),L3=q.lazy(()=>ae(()=>import("./McpView-DPmcihrm.js"),__vite__mapDeps([127,68,49,41,51,48,128]))),j3=q.lazy(()=>ae(()=>import("./SubmitView-DGwEiuGz.js"),__vite__mapDeps([129,1,34,2,73,77,22,23,72]))),D3=q.lazy(()=>ae(()=>import("./CronDashboard-Wker39-h.js"),__vite__mapDeps([130,1,131,132,80,2,53,79,92,95,42,91,51,133,75,134,83,33,3,8,31]))),z3=q.lazy(()=>ae(()=>import("./AutonomousOperations-CPgyKQKJ.js"),__vite__mapDeps([135,1,131,132,80,2,73,95,50]))),U3=q.lazy(()=>ae(()=>import("./SubmissionsDashboard-BlDtgY38.js"),__vite__mapDeps([136,71,72,1,33,8,24,78,22,23,133,75,134,137]))),V3=q.lazy(()=>ae(()=>import("./UserProfileView-y4tNT8rK.js"),__vite__mapDeps([138,117,26,8]))),B3=q.lazy(()=>ae(()=>import("./RateLimitsView-BdVhhRn6.js"),__vite__mapDeps([139,70]))),q3=q.lazy(()=>ae(()=>import("./AstraForRoboticsView-4cqZq7Uv.js"),__vite__mapDeps([140,14,15,16,17,18,19,10,20,21,22,23,24,25,26,27,34,32,33,68,141]))),sh=q.lazy(()=>ae(()=>import("./NotFound-L0ldWZg9.js"),[])),W3=q.lazy(()=>ae(()=>import("./SearchOverlay-BWsLpwx1.js"),__vite__mapDeps([142,21,8,22,23,61,19,10]))),H3=q.lazy(()=>ae(()=>import("./StagingAccessRequestView-KKG5yc76.js"),__vite__mapDeps([143,134]))),Dk=()=>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}})]})]}),G3=new YA({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:1}}}),K3=()=>{const{arxivId:e}=wS();return w.jsx(Ki,{to:e?`/paper/${e}`:"/papers",replace:!0})},Q3=()=>{const{taskSlug:e}=wS();return w.jsx(Ki,{to:e?`/tasks/${e}`:"/tasks",replace:!0})},Y3=({element:e})=>$o()?w.jsx(Ki,{to:"/",replace:!0}):w.jsx(w.Fragment,{children:e}),pv=({element:e})=>{const{user:t,isLoading:n}=hk(),r=hn();return $o()?w.jsx(Ki,{to:"/",replace:!0}):n?w.jsx("div",{className:"page",children:w.jsx("div",{className:"submission-loading",children:w.jsx("span",{children:"Checking admin session..."})})}):t?t.is_admin?w.jsx(w.Fragment,{children:e}):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 @",t.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(m1,{returnTo:`${r.pathname}${r.search}`})]})})},X3=()=>{const e=Z$(),t=typeof window<"u"&&new URL(e,window.location.origin).origin!==window.location.origin;return q.useEffect(()=>{t&&window.location.replace(e)},[e,t]),t?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:e,children:"Continue"})]})}):w.jsx(pv,{element:w.jsx(D3,{})})},Q0=({reader:e=!1})=>{const[t,n]=q.useState(!1),{pathname:r}=hn();q.useEffect(()=>{const a=l=>{(l.metaKey||l.ctrlKey)&&l.key==="k"&&(l.preventDefault(),n(!0))};return window.addEventListener("keydown",a),()=>window.removeEventListener("keydown",a)},[]);const i=w.jsx(R2,{onOpenSearch:()=>n(!0)}),s=w.jsx(dS,{resetKey:r,children:w.jsx(q.Suspense,{fallback:w.jsx(Dk,{}),children:w.jsx(uA,{})})}),o=t&&w.jsx(q.Suspense,{fallback:null,children:w.jsx(W3,{open:t,onClose:()=>n(!1)})});return e?w.jsxs("div",{className:"reader-route-shell",children:[i,w.jsx("div",{className:"reader-route-content",children:s}),o]}):w.jsxs(w.Fragment,{children:[i,w.jsx("main",{children:s}),w.jsx(T2,{}),o]})},J3=()=>(a3(),q.useLayoutEffect(()=>{var e;(e=document.getElementById("initial-discovery-footer"))==null||e.remove()},[]),w.jsxs(cA,{children:[w.jsx(re,{path:"/request-access",element:w.jsx(q.Suspense,{fallback:w.jsx(Dk,{}),children:w.jsx(H3,{})})}),w.jsx(re,{element:w.jsx(Q0,{reader:!0}),children:w.jsx(re,{path:"/pdf/:paperId",element:nF()?w.jsx(m3,{}):w.jsx(sh,{})})}),w.jsxs(re,{element:w.jsx(Q0,{}),children:[w.jsx(re,{path:"/",element:w.jsx(f3,{})}),w.jsx(re,{path:"/following",element:w.jsx(c3,{})}),w.jsx(re,{path:"/topics/:topicParam",element:w.jsx(d3,{})}),w.jsx(re,{path:"/x-trending",element:w.jsx(Ki,{to:"/",replace:!0})}),w.jsx(re,{path:"/chat/:sessionId?",element:al()?w.jsx(h3,{}):w.jsx(Ki,{to:"/",replace:!0})}),w.jsx(re,{path:"/share/:shareId",element:al()?w.jsx(p3,{}):w.jsx(sh,{})}),w.jsx(re,{path:"/papers",element:w.jsx(v3,{})}),w.jsx(re,{path:"/papers/:arxivId",element:w.jsx(K3,{})}),w.jsx(re,{path:"/paper/:arxivId",element:w.jsx(g3,{})}),w.jsx(re,{path:"/tasks",element:w.jsx(y3,{})}),w.jsx(re,{path:"/tasks/:taskSlug",element:w.jsx(_3,{})}),w.jsx(re,{path:"/task/:taskSlug",element:w.jsx(Q3,{})}),w.jsx(re,{path:"/methods",element:w.jsx(w3,{})}),w.jsx(re,{path:"/methods/:methodSlug",element:w.jsx(O3,{})}),w.jsx(re,{path:"/frameworks",element:w.jsx(x3,{})}),w.jsx(re,{path:"/trends",element:w.jsx(b3,{})}),w.jsx(re,{path:"/conferences",element:w.jsx(E3,{})}),w.jsx(re,{path:"/ai-deadlines",element:w.jsx(S3,{})}),w.jsx(re,{path:"/conferences/:confSlug",element:w.jsx(C3,{})}),w.jsx(re,{path:"/conferences/:confSlug/:taskSlug",element:w.jsx(k3,{})}),w.jsx(re,{path:"/organizations",element:w.jsx(P3,{})}),w.jsx(re,{path:"/orgs/:orgSlug",element:w.jsx(R3,{})}),w.jsx(re,{path:"/orgs/:orgSlug/:taskSlug",element:w.jsx(T3,{})}),w.jsx(re,{path:"/authors/:authorId",element:w.jsx(I3,{})}),w.jsx(re,{path:"/benchmark/:datasetSlug",element:w.jsx(M3,{})}),w.jsx(re,{path:"/authorize-paper-edit/:authorizationId",element:w.jsx(u3,{})}),w.jsx(re,{path:"/submit",element:w.jsx(j3,{})}),w.jsx(re,{path:"/saved",element:w.jsx(Y3,{element:w.jsx(A3,{})})}),w.jsx(re,{path:"/settings",element:w.jsx(N3,{})}),w.jsx(re,{path:"/privacy",element:w.jsx($3,{})}),w.jsx(re,{path:"/docs/api",element:w.jsx(F3,{})}),w.jsx(re,{path:"/mcp",element:w.jsx(L3,{})}),w.jsx(re,{path:"/admin-dashboard",element:w.jsx(X3,{})}),w.jsx(re,{path:"/autonomous-operations",element:w.jsx(pv,{element:w.jsx(z3,{})})}),w.jsx(re,{path:"/cron-dashboard",element:w.jsx(Ki,{to:"/admin-dashboard",replace:!0})}),w.jsx(re,{path:"/submissions",element:w.jsx(pv,{element:w.jsx(U3,{})})}),w.jsx(re,{path:"/rate-limits",element:w.jsx(B3,{})}),w.jsx(re,{path:"/astra-for-robotics",element:w.jsx(q3,{})}),w.jsx(re,{path:"/:username",element:w.jsx(V3,{})}),w.jsx(re,{path:"*",element:w.jsx(sh,{})})]})]})),Z3=()=>w.jsx(XA,{client:G3,children:w.jsxs(S2,{children:[w.jsx(l3,{children:w.jsx(J3,{})}),w.jsx(o3,{}),!1]})});mM();const ez=w.jsx(mT,{attribute:"class",defaultTheme:"system",enableSystem:!0,disableTransitionOnChange:!0,storageKey:"pwc-theme",children:w.jsx(dS,{children:w.jsx(Z3,{})})}),tz=_b(document.getElementById("root"));tz.render(w.jsx(q.StrictMode,{children:ez}));export{f2 as $,Od as A,yd as B,a2 as C,et as D,ee as E,wj as F,os as G,m1 as H,ct as I,Rz as J,fz as K,bn as L,yz as M,U1 as N,Vj as O,br as P,dC as Q,Uj as R,u2 as S,Ez as T,s3 as U,q as V,Sz as W,c2 as X,nF as Y,dz as Z,d2 as _,hk as a,Pz as a$,ck as a0,er as a1,hz as a2,cz as a3,ow as a4,X$ as a5,l2 as a6,ae as a7,M1 as a8,xl as a9,vz as aA,El as aB,Up as aC,il as aD,GA as aE,at as aF,At as aG,IS as aH,bz as aI,e1 as aJ,Dg as aK,WS as aL,jg as aM,BA as aN,az as aO,oz as aP,lN as aQ,qg as aR,RS as aS,JA as aT,tN as aU,sN as aV,nN as aW,rN as aX,aN as aY,l0 as aZ,iN as a_,$g as aa,x2 as ab,cv as ac,_1 as ad,n3 as ae,Ys as af,q$ as ag,H$ as ah,G$ as ai,K$ as aj,vi as ak,Y$ as al,Q$ as am,uz as an,Ki as ao,Pj as ap,Rj as aq,tC as ar,wd as as,_d as at,Tj as au,Ij as av,iz as aw,rz as ax,b2 as ay,xz as az,uN as b,j1 as b0,D1 as b1,z1 as b2,z0 as b3,Id as c,Iz as d,sz as e,g as f,hn as g,J$ as h,$o as i,w as j,Mg as k,DS as l,al as m,tF as n,eF as o,E2 as p,Cz as q,Tz as r,pz as s,kz as t,wS as u,gz as v,mz as w,$2 as x,wz as y,ke as z}; diff --git a/assets/input-C24thzbI.js b/assets/input-DdobyT4w.js similarity index 88% rename from assets/input-C24thzbI.js rename to assets/input-DdobyT4w.js index da1417ccd76789cc1206e3fd6388e4f9f0bd2caa..2bb25646413aab6d2283e8d03bc66c79dac3d883 100644 --- a/assets/input-C24thzbI.js +++ b/assets/input-DdobyT4w.js @@ -1 +1 @@ -import{f as s,j as i,I as n}from"./index-CTkdBAwI.js";const f=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}));f.displayName="Input";export{f as I}; +import{f as s,j as i,I as n}from"./index-D2fBL-s6.js";const f=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}));f.displayName="Input";export{f as I}; diff --git a/assets/link-2-D6rU19oC.js b/assets/link-2-DK2lGD4M.js similarity index 89% rename from assets/link-2-D6rU19oC.js rename to assets/link-2-DK2lGD4M.js index 057cb37f0d4f531e07dec3c8e97442b8e1f1bde0..1c23e3032ef6d066997718b5c8cb8b07ac99b5c6 100644 --- a/assets/link-2-D6rU19oC.js +++ b/assets/link-2-DK2lGD4M.js @@ -1,4 +1,4 @@ -import{c as e}from"./index-CTkdBAwI.js";/** +import{c as e}from"./index-D2fBL-s6.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/loader-circle-B71NdARb.js b/assets/loader-circle-CoLo2trx.js similarity index 85% rename from assets/loader-circle-B71NdARb.js rename to assets/loader-circle-CoLo2trx.js index 47255845157a2ba75d90ebbb577f953534ba7d56..493b21bf9d095a8c3349112b67a30c81b09b5187 100644 --- a/assets/loader-circle-B71NdARb.js +++ b/assets/loader-circle-CoLo2trx.js @@ -1,4 +1,4 @@ -import{c as e}from"./index-CTkdBAwI.js";/** +import{c as e}from"./index-D2fBL-s6.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/mlIntern-DGSta2oO.js b/assets/mlIntern-KBHZ6tOl.js similarity index 90% rename from assets/mlIntern-DGSta2oO.js rename to assets/mlIntern-KBHZ6tOl.js index 5b74e061c0e8653820de60078fcae13487a211a2..49801586a9664ba6901b1bfce43586b857d61148 100644 --- a/assets/mlIntern-DGSta2oO.js +++ b/assets/mlIntern-KBHZ6tOl.js @@ -1 +1 @@ -import{v as a}from"./index-CTkdBAwI.js";function n(t,e){const r=e?` (arXiv:${a(e)})`:"";return[`Reproduce the central claims of the research paper "${t}"${r}.`,"If it is not feasible to fully reproduce the experiments from the paper, then run smaller-scale experiments that can still validate or falsify the claims.","Publish any trained models, processed datasets, and demos as Hub repos, and upload everything else to a Hugging Face Bucket, with the final report as README.md at the bucket's root linking to them."].join(" ")}function s(t,e){return`https://huggingface.co/chat/?${new URLSearchParams({mode:"ml-intern",prompt:n(t,e)}).toString()}`}export{s as m}; +import{v as a}from"./index-D2fBL-s6.js";function n(t,e){const r=e?` (arXiv:${a(e)})`:"";return[`Reproduce the central claims of the research paper "${t}"${r}.`,"If it is not feasible to fully reproduce the experiments from the paper, then run smaller-scale experiments that can still validate or falsify the claims.","Publish any trained models, processed datasets, and demos as Hub repos, and upload everything else to a Hugging Face Bucket, with the final report as README.md at the bucket's root linking to them."].join(" ")}function s(t,e){return`https://huggingface.co/chat/?${new URLSearchParams({mode:"ml-intern",prompt:n(t,e)}).toString()}`}export{s as m}; diff --git a/assets/moon-DKhdjlp0.js b/assets/moon-vNTgqlOp.js similarity index 85% rename from assets/moon-DKhdjlp0.js rename to assets/moon-vNTgqlOp.js index be840662d738451c2de0d5d2cfe7e9a942cdb93d..0920028296de52861706c507e1c9057efe0fbc15 100644 --- a/assets/moon-DKhdjlp0.js +++ b/assets/moon-vNTgqlOp.js @@ -1,4 +1,4 @@ -import{c as o}from"./index-CTkdBAwI.js";/** +import{c as o}from"./index-D2fBL-s6.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/openrouter-CIzc-yJH.js b/assets/openrouter-BRMbmxz_.js similarity index 82% rename from assets/openrouter-CIzc-yJH.js rename to assets/openrouter-BRMbmxz_.js index 137f6f898c047e6a8e66236d03bd15775f18ae32..c3ca66c6af6da2d21d7a7f6ca9463e2c27466d72 100644 --- a/assets/openrouter-CIzc-yJH.js +++ b/assets/openrouter-BRMbmxz_.js @@ -1 +1 @@ -import{b as r}from"./index-CTkdBAwI.js";import{c as n}from"./chat-Dr1lXe8V.js";const o=["chat","openrouter","usage"],u=["chat","openrouter","credential"];function s(e=!0){return r({queryKey:o,queryFn:()=>n.getUsage(),enabled:e,staleTime:3e4,refetchOnWindowFocus:!0})}function c(e=!0){return r({queryKey:u,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{u as O,s as a,m as r,c as u}; +import{b as r}from"./index-D2fBL-s6.js";import{c as n}from"./chat-BOZIonsX.js";const o=["chat","openrouter","usage"],u=["chat","openrouter","credential"];function s(e=!0){return r({queryKey:o,queryFn:()=>n.getUsage(),enabled:e,staleTime:3e4,refetchOnWindowFocus:!0})}function c(e=!0){return r({queryKey:u,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{u as O,s as a,m as r,c as u}; diff --git a/assets/paperEdits-tR7kGJ9o.js b/assets/paperEdits-C-9tVqXs.js similarity index 84% rename from assets/paperEdits-tR7kGJ9o.js rename to assets/paperEdits-C-9tVqXs.js index 260116ebc67121ce45bbbc95f4951b5cb27d6bd0..0dfbe05a42463dedc43578f1b17ac3badb977521 100644 --- a/assets/paperEdits-tR7kGJ9o.js +++ b/assets/paperEdits-C-9tVqXs.js @@ -1 +1 @@ -import{ac as p}from"./index-CTkdBAwI.js";const a={authorization:e=>p(`/paper-edit-authorizations/${encodeURIComponent(e)}`),approve:e=>p(`/paper-edit-authorizations/${encodeURIComponent(e)}/approve`,{method:"POST"}),digest:(e,t)=>p(`/admin/paper-edit-digest?day=${e}&page=${t}`),suspend:(e,t)=>p("/admin/paper-edit-suspension",{method:"POST",body:JSON.stringify({hf_subject:e,suspended:t})})};export{a as p}; +import{ac as p}from"./index-D2fBL-s6.js";const a={authorization:e=>p(`/paper-edit-authorizations/${encodeURIComponent(e)}`),approve:e=>p(`/paper-edit-authorizations/${encodeURIComponent(e)}/approve`,{method:"POST"}),digest:(e,t)=>p(`/admin/paper-edit-digest?day=${e}&page=${t}`),suspend:(e,t)=>p("/admin/paper-edit-suspension",{method:"POST",body:JSON.stringify({hf_subject:e,suspended:t})})};export{a as p}; diff --git a/assets/papers-POQWk4vk.js b/assets/papers-khuZaSFb.js similarity index 96% rename from assets/papers-POQWk4vk.js rename to assets/papers-khuZaSFb.js index 1375e91f2013f0d6bae525bd059d13058c00fd32..3ca670b3e47e098b1f1d858f62f4273f854dceb3 100644 --- a/assets/papers-POQWk4vk.js +++ b/assets/papers-khuZaSFb.js @@ -1 +1 @@ -import{p as a}from"./curation-BlGrJ3z2.js";import{ac as c,az as h,aI as m}from"./index-CTkdBAwI.js";function i(o){const e=new URLSearchParams;for(const[r,s]of Object.entries(o??{}))s!==void 0&&s!==""&&e.set(r,String(s));const t=e.toString();return t?`?${t}`:""}class d{constructor(e){this.request=e}list(e){const t=new URLSearchParams;for(const[s,n]of Object.entries(e??{}))n!==void 0&&n!==""&&t.set(s,String(n));const r=t.toString();return this.request(`/papers/${r?`?${r}`:""}`,{cache:"no-cache"})}search(e,t=1,r=10,s,n,u){const p=new URLSearchParams({q:e,page:t.toString(),page_size:r.toString()});return s&&p.set("mode",s),u!=null&&u.start_date&&p.set("start_date",u.start_date),u!=null&&u.end_date&&p.set("end_date",u.end_date),this.request(`/papers/search?${p.toString()}`,{signal:n})}searchFeed(e){return this.request(`/papers/search/feed${i(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,n]of Object.entries(e??{}))n!==void 0&&t.set(s,String(n));const r=t.toString();return this.request(`/papers/trending${r?`?${r}`:""}`,{cache:"no-store"})}forTask(e,t){return this.request(`/tasks/${e}/papers${i(t)}`)}forMethod(e,t){return this.request(`/methods/${encodeURIComponent(e)}/papers${i(t)}`)}forConference(e,t){return this.request(`/conferences/${e}/papers${i(t)}`)}forOrganization(e,t){return this.request(`/organizations/${e}/papers${i(t)}`)}getAuthor(e){return this.request(`/authors/${e}`)}searchAuthors(e,t){return this.request(`/authors/${i({search:e,page_size:t})}`)}primeCurationState(e,t=!1){return a.primePaper(e,t)}freshAuthMutationDraft(){return a.freshAuthMutationDraft()}resumeFreshAuthMutation(){return a.resumeFreshAuthMutation()}updateTasks(e,t){const r=new URLSearchParams(t.map(s=>["task_ids",String(s)])).toString();return a.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 a.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 a.mutatePaper(e,"organizations",t,`/papers/${e}/organizations?${r}`,{method:"PUT"})}updateRepositories(e,t){return a.mutatePaper(e,"repositories",t,`/papers/${e}/repositories`,{method:"PUT",body:JSON.stringify({repositories:t})})}updateProjectPages(e,t){return a.mutatePaper(e,"project_pages",t,`/papers/${e}/project-pages`,{method:"PUT",body:JSON.stringify({project_pages:t})})}updateXThreads(e,t){return a.mutatePaper(e,"x_threads",t,`/papers/${e}/x-threads`,{method:"PUT",body:JSON.stringify({x_threads:t})})}updateSourceUrl(e,t){return a.mutatePaper(e,"source_url",t,`/papers/${e}/source-url`,{method:"PUT",body:JSON.stringify({source_url:t})})}updateHfArtifacts(e,t){return a.mutatePaper(e,"hf_artifacts",t,`/papers/${e}/hf-artifacts`,{method:"PUT",body:JSON.stringify(t)})}}const g=new d(c);async function P(o){return(await h(`/papers/${encodeURIComponent(o)}/web-markdown`)).text()}function S(o){return c(`/papers/${encodeURIComponent(o)}/web-page`)}function y(o){return m(`/papers/${encodeURIComponent(o)}/layout`)}export{P as a,y as b,S as g,g as p}; +import{p as a}from"./curation-BtfabyzA.js";import{ac as c,az as h,aI as m}from"./index-D2fBL-s6.js";function i(o){const e=new URLSearchParams;for(const[r,s]of Object.entries(o??{}))s!==void 0&&s!==""&&e.set(r,String(s));const t=e.toString();return t?`?${t}`:""}class d{constructor(e){this.request=e}list(e){const t=new URLSearchParams;for(const[s,n]of Object.entries(e??{}))n!==void 0&&n!==""&&t.set(s,String(n));const r=t.toString();return this.request(`/papers/${r?`?${r}`:""}`,{cache:"no-cache"})}search(e,t=1,r=10,s,n,u){const p=new URLSearchParams({q:e,page:t.toString(),page_size:r.toString()});return s&&p.set("mode",s),u!=null&&u.start_date&&p.set("start_date",u.start_date),u!=null&&u.end_date&&p.set("end_date",u.end_date),this.request(`/papers/search?${p.toString()}`,{signal:n})}searchFeed(e){return this.request(`/papers/search/feed${i(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,n]of Object.entries(e??{}))n!==void 0&&t.set(s,String(n));const r=t.toString();return this.request(`/papers/trending${r?`?${r}`:""}`,{cache:"no-store"})}forTask(e,t){return this.request(`/tasks/${e}/papers${i(t)}`)}forMethod(e,t){return this.request(`/methods/${encodeURIComponent(e)}/papers${i(t)}`)}forConference(e,t){return this.request(`/conferences/${e}/papers${i(t)}`)}forOrganization(e,t){return this.request(`/organizations/${e}/papers${i(t)}`)}getAuthor(e){return this.request(`/authors/${e}`)}searchAuthors(e,t){return this.request(`/authors/${i({search:e,page_size:t})}`)}primeCurationState(e,t=!1){return a.primePaper(e,t)}freshAuthMutationDraft(){return a.freshAuthMutationDraft()}resumeFreshAuthMutation(){return a.resumeFreshAuthMutation()}updateTasks(e,t){const r=new URLSearchParams(t.map(s=>["task_ids",String(s)])).toString();return a.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 a.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 a.mutatePaper(e,"organizations",t,`/papers/${e}/organizations?${r}`,{method:"PUT"})}updateRepositories(e,t){return a.mutatePaper(e,"repositories",t,`/papers/${e}/repositories`,{method:"PUT",body:JSON.stringify({repositories:t})})}updateProjectPages(e,t){return a.mutatePaper(e,"project_pages",t,`/papers/${e}/project-pages`,{method:"PUT",body:JSON.stringify({project_pages:t})})}updateXThreads(e,t){return a.mutatePaper(e,"x_threads",t,`/papers/${e}/x-threads`,{method:"PUT",body:JSON.stringify({x_threads:t})})}updateSourceUrl(e,t){return a.mutatePaper(e,"source_url",t,`/papers/${e}/source-url`,{method:"PUT",body:JSON.stringify({source_url:t})})}updateHfArtifacts(e,t){return a.mutatePaper(e,"hf_artifacts",t,`/papers/${e}/hf-artifacts`,{method:"PUT",body:JSON.stringify(t)})}}const g=new d(c);async function P(o){return(await h(`/papers/${encodeURIComponent(o)}/web-markdown`)).text()}function S(o){return c(`/papers/${encodeURIComponent(o)}/web-page`)}function y(o){return m(`/papers/${encodeURIComponent(o)}/layout`)}export{P as a,y as b,S as g,g as p}; diff --git a/assets/plus-Dhoq_Vs9.js b/assets/plus-BI8-JXK0.js similarity index 86% rename from assets/plus-Dhoq_Vs9.js rename to assets/plus-BI8-JXK0.js index 477fb5035f3f893b22ffc1abb6e3a9824737898e..3d877fefec97596fb6284a84c64b44d45b7c1ba1 100644 --- a/assets/plus-Dhoq_Vs9.js +++ b/assets/plus-BI8-JXK0.js @@ -1,4 +1,4 @@ -import{c as e}from"./index-CTkdBAwI.js";/** +import{c as e}from"./index-D2fBL-s6.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/popover-CZErm3i7.js b/assets/popover-DS5Jzsg5.js similarity index 98% rename from assets/popover-CZErm3i7.js rename to assets/popover-DS5Jzsg5.js index 83b8120f9bb65bfb7bb7e330d09b05dbeddccec1..283a772d0f499354e869270019296313c3077bf3 100644 --- a/assets/popover-CZErm3i7.js +++ b/assets/popover-DS5Jzsg5.js @@ -1 +1 @@ -import{f as s,j as l,ak as L,B as V,ap as $,af as W,D as A,z as O,E as h,aq as E,ar as y,P as _,as as H,G as z,aJ as G,aK as B,aL as K,aM as Z,at as q,au as J,av as U,I as Q}from"./index-CTkdBAwI.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?L(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]=V({prop:n,defaultProp:o??!1,onChange:a,caller:C});return l.jsx($,{...i,children:l.jsx(ne,{scope:t,contentId:W(),triggerRef:p,open:f,onOpenChange:v,onOpenToggle:s.useCallback(()=>v(x=>!x),[v]),hasCustomAnchor:u,onCustomAnchorAdd:s.useCallback(()=>P(!0),[]),onCustomAnchorRemove:s.useCallback(()=>P(!1),[]),modal:c,children:r})})};j.displayName=C;var w="PopoverAnchor",ae=s.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=d(w,r),a=m(r),{onCustomAnchorAdd:c,onCustomAnchorRemove:i}=o;return s.useEffect(()=>(c(),()=>i()),[c,i]),l.jsx(E,{...a,...n,ref:t})});ae.displayName=w;var S="PopoverTrigger",N=s.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=d(S,r),a=m(r),c=A(t,o.triggerRef),i=l.jsx(O.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":M(o.open),...n,ref:c,onClick:h(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?i:l.jsx(E,{asChild:!0,...a,children:i})});N.displayName=S;var R="PopoverPortal",[se,ce]=b(R,{forceMount:void 0}),F=e=>{const{__scopePopover:t,forceMount:r,children:n,container:o}=e,a=d(R,t);return l.jsx(se,{scope:t,forceMount:r,children:l.jsx(_,{present:r||a.open,children:l.jsx(H,{asChild:!0,container:o,children:n})})})};F.displayName=R;var g="PopoverContent",D=s.forwardRef((e,t)=>{const r=ce(g,e.__scopePopover),{forceMount:n=r.forceMount,...o}=e,a=d(g,e.__scopePopover);return l.jsx(_,{present:n||a.open,children:a.modal?l.jsx(le,{...o,ref:t}):l.jsx(pe,{...o,ref:t})})});D.displayName=g;var ie=X("PopoverContent.RemoveScroll"),le=s.forwardRef((e,t)=>{const r=d(g,e.__scopePopover),n=s.useRef(null),o=A(t,n),a=s.useRef(!1);return s.useEffect(()=>{const c=n.current;if(c)return G(c)},[]),l.jsx(B,{as:ie,allowPinchZoom:!0,children:l.jsx(I,{...e,ref:o,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:h(e.onCloseAutoFocus,c=>{var i;c.preventDefault(),a.current||(i=r.triggerRef.current)==null||i.focus()}),onPointerDownOutside:h(e.onPointerDownOutside,c=>{const i=c.detail.originalEvent,p=i.button===0&&i.ctrlKey===!0,u=i.button===2||p;a.current=u},{checkForDefaultPrevented:!1}),onFocusOutside:h(e.onFocusOutside,c=>c.preventDefault(),{checkForDefaultPrevented:!1})})})}),pe=s.forwardRef((e,t)=>{const r=d(g,e.__scopePopover),n=s.useRef(!1),o=s.useRef(!1);return l.jsx(I,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var c,i;(c=e.onCloseAutoFocus)==null||c.call(e,a),a.defaultPrevented||(n.current||(i=r.triggerRef.current)==null||i.focus(),a.preventDefault()),n.current=!1,o.current=!1},onInteractOutside:a=>{var p,u;(p=e.onInteractOutside)==null||p.call(e,a),a.defaultPrevented||(n.current=!0,a.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const c=a.target;((u=r.triggerRef.current)==null?void 0:u.contains(c))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&o.current&&a.preventDefault()}})}),I=s.forwardRef((e,t)=>{const{__scopePopover:r,trapFocus:n,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:c,onEscapeKeyDown:i,onPointerDownOutside:p,onFocusOutside:u,onInteractOutside:P,...f}=e,v=d(g,r),x=m(r);return K(),l.jsx(Z,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:o,onUnmountAutoFocus:a,children:l.jsx(q,{asChild:!0,disableOutsidePointerEvents:c,onInteractOutside:P,onEscapeKeyDown:i,onPointerDownOutside:p,onFocusOutside:u,onDismiss:()=>v.onOpenChange(!1),children:l.jsx(J,{"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(U,{...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{f as s,j as l,ak as L,B as V,ap as $,af as W,D as A,z as O,E as h,aq as E,ar as y,P as _,as as H,G as z,aJ as G,aK as B,aL as K,aM as Z,at as q,au as J,av as U,I as Q}from"./index-D2fBL-s6.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?L(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]=V({prop:n,defaultProp:o??!1,onChange:a,caller:C});return l.jsx($,{...i,children:l.jsx(ne,{scope:t,contentId:W(),triggerRef:p,open:f,onOpenChange:v,onOpenToggle:s.useCallback(()=>v(x=>!x),[v]),hasCustomAnchor:u,onCustomAnchorAdd:s.useCallback(()=>P(!0),[]),onCustomAnchorRemove:s.useCallback(()=>P(!1),[]),modal:c,children:r})})};j.displayName=C;var w="PopoverAnchor",ae=s.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=d(w,r),a=m(r),{onCustomAnchorAdd:c,onCustomAnchorRemove:i}=o;return s.useEffect(()=>(c(),()=>i()),[c,i]),l.jsx(E,{...a,...n,ref:t})});ae.displayName=w;var S="PopoverTrigger",N=s.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=d(S,r),a=m(r),c=A(t,o.triggerRef),i=l.jsx(O.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":M(o.open),...n,ref:c,onClick:h(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?i:l.jsx(E,{asChild:!0,...a,children:i})});N.displayName=S;var R="PopoverPortal",[se,ce]=b(R,{forceMount:void 0}),F=e=>{const{__scopePopover:t,forceMount:r,children:n,container:o}=e,a=d(R,t);return l.jsx(se,{scope:t,forceMount:r,children:l.jsx(_,{present:r||a.open,children:l.jsx(H,{asChild:!0,container:o,children:n})})})};F.displayName=R;var g="PopoverContent",D=s.forwardRef((e,t)=>{const r=ce(g,e.__scopePopover),{forceMount:n=r.forceMount,...o}=e,a=d(g,e.__scopePopover);return l.jsx(_,{present:n||a.open,children:a.modal?l.jsx(le,{...o,ref:t}):l.jsx(pe,{...o,ref:t})})});D.displayName=g;var ie=X("PopoverContent.RemoveScroll"),le=s.forwardRef((e,t)=>{const r=d(g,e.__scopePopover),n=s.useRef(null),o=A(t,n),a=s.useRef(!1);return s.useEffect(()=>{const c=n.current;if(c)return G(c)},[]),l.jsx(B,{as:ie,allowPinchZoom:!0,children:l.jsx(I,{...e,ref:o,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:h(e.onCloseAutoFocus,c=>{var i;c.preventDefault(),a.current||(i=r.triggerRef.current)==null||i.focus()}),onPointerDownOutside:h(e.onPointerDownOutside,c=>{const i=c.detail.originalEvent,p=i.button===0&&i.ctrlKey===!0,u=i.button===2||p;a.current=u},{checkForDefaultPrevented:!1}),onFocusOutside:h(e.onFocusOutside,c=>c.preventDefault(),{checkForDefaultPrevented:!1})})})}),pe=s.forwardRef((e,t)=>{const r=d(g,e.__scopePopover),n=s.useRef(!1),o=s.useRef(!1);return l.jsx(I,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var c,i;(c=e.onCloseAutoFocus)==null||c.call(e,a),a.defaultPrevented||(n.current||(i=r.triggerRef.current)==null||i.focus(),a.preventDefault()),n.current=!1,o.current=!1},onInteractOutside:a=>{var p,u;(p=e.onInteractOutside)==null||p.call(e,a),a.defaultPrevented||(n.current=!0,a.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const c=a.target;((u=r.triggerRef.current)==null?void 0:u.contains(c))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&o.current&&a.preventDefault()}})}),I=s.forwardRef((e,t)=>{const{__scopePopover:r,trapFocus:n,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:c,onEscapeKeyDown:i,onPointerDownOutside:p,onFocusOutside:u,onInteractOutside:P,...f}=e,v=d(g,r),x=m(r);return K(),l.jsx(Z,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:o,onUnmountAutoFocus:a,children:l.jsx(q,{asChild:!0,disableOutsidePointerEvents:c,onInteractOutside:P,onEscapeKeyDown:i,onPointerDownOutside:p,onFocusOutside:u,onDismiss:()=>v.onOpenChange(!1),children:l.jsx(J,{"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(U,{...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/preferences-BMkWyA3F.js b/assets/preferences-BHmRHfHN.js similarity index 74% rename from assets/preferences-BMkWyA3F.js rename to assets/preferences-BHmRHfHN.js index 228c6ace17174dbb818ab87c1cb23ef3d57b1895..e243d6cc39e00ed68fccbf838a25ff3789405d5b 100644 --- a/assets/preferences-BMkWyA3F.js +++ b/assets/preferences-BHmRHfHN.js @@ -1 +1 @@ -import{a as y,l as d,b as f,W as p}from"./index-CTkdBAwI.js";import{u as m}from"./useMutation-DXSljxHA.js";import{a as c}from"./account-Ck5qYpM8.js";const i={hide_closed_source_evals:!1};function v(){const{user:t}=y(),r=d(),s=p.preferences,a=f({queryKey:s,queryFn:()=>c.getPreferences(),enabled:!!t,staleTime:1/0}),o=a.data??i,l=m({mutationFn:e=>t?c.updatePreferences(e):Promise.resolve(e),onMutate:async e=>{await r.cancelQueries({queryKey:s});const u=r.getQueryData(s)??i;return r.setQueryData(s,e),{previous:u}},onError:(e,u,n)=>{n&&r.setQueryData(s,n.previous)},onSuccess:e=>r.setQueryData(s,e)});return{preferences:o,canPersist:!!t,isLoading:a.isLoading,setHideClosedSourceEvals:e=>l.mutate({...o,hide_closed_source_evals:e})}}export{v as u}; +import{a as y,l as d,b as f,W as p}from"./index-D2fBL-s6.js";import{u as m}from"./useMutation-9dlTbuQj.js";import{a as c}from"./account-BHlQBDNT.js";const i={hide_closed_source_evals:!1};function v(){const{user:t}=y(),r=d(),s=p.preferences,a=f({queryKey:s,queryFn:()=>c.getPreferences(),enabled:!!t,staleTime:1/0}),o=a.data??i,l=m({mutationFn:e=>t?c.updatePreferences(e):Promise.resolve(e),onMutate:async e=>{await r.cancelQueries({queryKey:s});const u=r.getQueryData(s)??i;return r.setQueryData(s,e),{previous:u}},onError:(e,u,n)=>{n&&r.setQueryData(s,n.previous)},onSuccess:e=>r.setQueryData(s,e)});return{preferences:o,canPersist:!!t,isLoading:a.isLoading,setHideClosedSourceEvals:e=>l.mutate({...o,hide_closed_source_evals:e})}}export{v as u}; diff --git a/assets/queryInvalidation-B6btj6xZ.js b/assets/queryInvalidation-BVOtRFkG.js similarity index 93% rename from assets/queryInvalidation-B6btj6xZ.js rename to assets/queryInvalidation-BVOtRFkG.js index bd049b44d13ccabb825724e8bbb97f77edec1575..cf5d1230ad47ddec6e66cc645d9068ca6782ae0d 100644 --- a/assets/queryInvalidation-B6btj6xZ.js +++ b/assets/queryInvalidation-BVOtRFkG.js @@ -1 +1 @@ -import{p as n,t as u}from"./index-CTkdBAwI.js";function f(e,t,a){if(!e)return e;const i=r=>r.paper_id!==t||r.paper_title===a?r:{...r,paper_title:a};if(Array.isArray(e)){const r=e.map(i);return r.some((s,o)=>s!==e[o])?r:e}if(Array.isArray(e.results)){const r=e.results.map(i);return r.some((s,o)=>s!==e.results[o])?{...e,results:r}:e}return e}function p(e,t){const a=new Set(t.filter(i=>!!i));for(const i of a)for(const r of[n.detail(i),n.arxiv(i),n.preview(i),n.summary(i)])e.invalidateQueries({queryKey:r,exact:!0})}function y(e){for(const t of Object.values(n.feeds))e.invalidateQueries({queryKey:t,refetchType:"none"})}function h(e,t,a){new Set([...a,t.id,t.arxiv_id].filter(s=>!!s)).forEach(s=>{e.setQueryData(n.detail(s),t),e.setQueryData(n.arxiv(s),t),e.setQueriesData({queryKey:n.preview(s),exact:!0},t),e.setQueriesData({queryKey:n.summary(s),exact:!0},t)}),y(e);const r=String(t.id),c=s=>f(s,r,t.title);for(const s of[u.all,u.byDatasetAll])e.setQueriesData({queryKey:s},c),e.invalidateQueries({queryKey:s,refetchType:"none"})}export{y as a,p as i,h as r}; +import{p as n,t as u}from"./index-D2fBL-s6.js";function f(e,t,a){if(!e)return e;const i=r=>r.paper_id!==t||r.paper_title===a?r:{...r,paper_title:a};if(Array.isArray(e)){const r=e.map(i);return r.some((s,o)=>s!==e[o])?r:e}if(Array.isArray(e.results)){const r=e.results.map(i);return r.some((s,o)=>s!==e.results[o])?{...e,results:r}:e}return e}function p(e,t){const a=new Set(t.filter(i=>!!i));for(const i of a)for(const r of[n.detail(i),n.arxiv(i),n.preview(i),n.summary(i)])e.invalidateQueries({queryKey:r,exact:!0})}function y(e){for(const t of Object.values(n.feeds))e.invalidateQueries({queryKey:t,refetchType:"none"})}function h(e,t,a){new Set([...a,t.id,t.arxiv_id].filter(s=>!!s)).forEach(s=>{e.setQueryData(n.detail(s),t),e.setQueryData(n.arxiv(s),t),e.setQueriesData({queryKey:n.preview(s),exact:!0},t),e.setQueriesData({queryKey:n.summary(s),exact:!0},t)}),y(e);const r=String(t.id),c=s=>f(s,r,t.title);for(const s of[u.all,u.byDatasetAll])e.setQueriesData({queryKey:s},c),e.invalidateQueries({queryKey:s,refetchType:"none"})}export{y as a,p as i,h as r}; diff --git a/assets/refresh-cw-CCsVFDnD.js b/assets/refresh-cw-fOkD1TSw.js similarity index 94% rename from assets/refresh-cw-CCsVFDnD.js rename to assets/refresh-cw-fOkD1TSw.js index 3fb6451f61f423a4ad3bd3d61d21e71dbe4d50f5..218a24bd7028929db700fbdd3dc2905b270bd8b5 100644 --- a/assets/refresh-cw-CCsVFDnD.js +++ b/assets/refresh-cw-fOkD1TSw.js @@ -1,4 +1,4 @@ -import{c as e}from"./index-CTkdBAwI.js";/** +import{c as e}from"./index-D2fBL-s6.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/researchTopic-B8hMcjil.js b/assets/researchTopic-jOpECA0z.js similarity index 97% rename from assets/researchTopic-B8hMcjil.js rename to assets/researchTopic-jOpECA0z.js index 19073dc0cba6776a4226134f75968e8bf9f3eed5..09b79a2715a9f7f03bd2a3465c8ec3ec7a5fd580 100644 --- a/assets/researchTopic-B8hMcjil.js +++ b/assets/researchTopic-jOpECA0z.js @@ -1 +1 @@ -import{ac as n,d as u,b as h,r as l,l as p}from"./index-CTkdBAwI.js";import{u as f}from"./useMutation-DXSljxHA.js";const S=20,E=300,D=10,c={follows:()=>n("/me/follows"),followSuggestions:()=>n("/research/follow-suggestions"),setFollow:(e,t,s)=>n(`/me/follows/${e}/${t}`,{method:s?"PUT":"DELETE"}),following:(e=0,t={})=>{const s=new URLSearchParams({offset:String(e),limit:"40"});return t.startDate&&s.set("start_date",t.startDate),t.endDate&&s.set("end_date",t.endDate),!t.startDate&&!t.endDate&&s.set("all_time","true"),t.topicOnly&&s.set("topic_only","true"),t.topicId!==void 0&&s.set("topic_id",String(t.topicId)),n(`/me/following?${s}`)},topics:()=>n("/me/topics"),addTopic:e=>n("/me/topics",{method:"POST",body:JSON.stringify({text:e})}),updateTopic:(e,t)=>n(`/me/topics/${e}`,{method:"PUT",body:JSON.stringify({text:t})}),removeTopic:e=>n(`/me/topics/${e}`,{method:"DELETE"}),reorderTopics:e=>n("/me/topics/order",{method:"PUT",body:JSON.stringify({topic_ids:e})}),followTopic:e=>n(`/me/topics/${e}/follow`,{method:"POST"}),setTopicPublic:(e,t)=>n(`/me/topics/${e}`,{method:"PATCH",body:JSON.stringify({is_public:t})}),setShowAsFollower:e=>n("/me/topic-follower-visibility",{method:"PUT",body:JSON.stringify({show_as_follower:e})}),publicTopic:e=>n(`/research/topics/${e}`),topicPapers:(e,t,s=0,o={})=>{const i=new URLSearchParams({order:t,offset:String(s),limit:String(S)});return o.startDate&&i.set("start_date",o.startDate),o.endDate&&i.set("end_date",o.endDate),n(`/research/topics/${e}/papers?${i}`)},featuredTopics:()=>n("/research/topics/featured"),email:()=>n("/me/research-email"),setEmail:e=>n("/me/research-email",{method:"PUT",body:JSON.stringify({enabled:e})})};function m(e,t,{follows:s}){return Promise.all([s&&e.invalidateQueries({queryKey:l.follows(t)}),e.invalidateQueries({queryKey:l.feed(t)}),e.invalidateQueries({queryKey:l.email(t)})])}function N(e=!0){var s;const t=(s=u())==null?void 0:s.user;return h({queryKey:l.follows(t==null?void 0:t.hf_subject),queryFn:c.follows,enabled:e&&!!t})}function q({onChanged:e,awaitRefresh:t=!1}={}){var i;const s=(i=u())==null?void 0:i.user,o=p();return f({mutationFn:({kind:r,entityId:a,follow:d})=>c.setFollow(r,a,d),onSuccess:async(r,a)=>{e==null||e(a);const d=m(o,s==null?void 0:s.hf_subject,{follows:!0});t&&await d}})}function P(e){const t=e.label??e.text;return t.charAt(0).toUpperCase()+t.slice(1)}function K(e){const t=P(e).toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"").slice(0,60);return t?`/topics/${e.id}-${t}`:`/topics/${e.id}`}function $(e){return e.split(/[,;\n]|\s-\s|^\s*-\s/m).filter(t=>t.trim().length>=3).length>=4}function L(){var s;const e=(s=u())==null?void 0:s.user,t=p();return f({mutationFn:o=>c.followTopic(o),onSuccess:async()=>{_(),await y(t,e==null?void 0:e.hf_subject)}})}function Q(){var o;const e=(o=u())==null?void 0:o.user,t=p(),s=l.topics(e==null?void 0:e.hf_subject);return f({mutationFn:i=>c.reorderTopics(i.map(r=>r.id)),onMutate:async i=>{await t.cancelQueries({queryKey:s}),t.setQueryData(s,i)},onSuccess:i=>t.setQueryData(s,i),onError:()=>void t.invalidateQueries({queryKey:s})})}function j(){var s;const e=(s=u())==null?void 0:s.user,t=p();return f({mutationFn:({id:o,isPublic:i})=>c.setTopicPublic(o,i),onSuccess:()=>t.invalidateQueries({queryKey:l.topics(e==null?void 0:e.hf_subject)})})}const w="pwc:pending-topic-follow";function R(e){sessionStorage.setItem(w,String(e))}function A(){const e=Number(sessionStorage.getItem(w));return Number.isInteger(e)&&e>0?e:null}function _(){sessionStorage.removeItem(w)}const b=e=>e.status==="pending"||e.status==="running";function J(e=!0,t=5e3){var o;const s=(o=u())==null?void 0:o.user;return h({queryKey:l.topics(s==null?void 0:s.hf_subject),queryFn:c.topics,enabled:e&&!!s,refetchInterval:i=>{var r;return(r=i.state.data)!=null&&r.some(b)?t:!1}})}function y(e,t){return m(e,t,{follows:!1}),e.invalidateQueries({queryKey:l.publicTopics}),e.invalidateQueries({queryKey:l.topics(t)})}function U(e){var o;const t=(o=u())==null?void 0:o.user,s=p();return f({mutationFn:({id:i,text:r})=>i===void 0?c.addTopic(r):c.updateTopic(i,r),onSuccess:async()=>{F(),await y(s,t==null?void 0:t.hf_subject),e==null||e()}})}function C(){var s;const e=(s=u())==null?void 0:s.user,t=p();return f({mutationFn:async o=>{const r=(await Promise.allSettled(o.map(a=>c.removeTopic(a)))).find(a=>a.status==="rejected");if(r)throw r.reason},onSettled:()=>void y(t,e==null?void 0:e.hf_subject)})}const T="pwc:following-pending-topic";function G(e){sessionStorage.setItem(T,e)}function M(){return sessionStorage.getItem(T)}function F(){sessionStorage.removeItem(T)}function k(){var s;const e=(s=u())==null?void 0:s.user,t=p();return f({mutationFn:async o=>{const r=(await Promise.allSettled(o.map(a=>c.setFollow(a.kind,a.id,a.follow??!0)))).find(a=>a.status==="rejected");if(r)throw r.reason},onSuccess:()=>I(),onSettled:()=>void m(t,e==null?void 0:e.hf_subject,{follows:!0})})}const g="pwc:following-pending-follows";function Y(e){sessionStorage.setItem(g,JSON.stringify(e))}function H(){return JSON.parse(sessionStorage.getItem(g)??"[]")}function I(){sessionStorage.removeItem(g)}export{S as T,K as a,C as b,A as c,J as d,N as e,U as f,k as g,D as h,E as i,G as j,Y as k,Q as l,b as m,M as n,H as o,F as p,q,c as r,R as s,P as t,L as u,$ as v,j as w}; +import{ac as n,d as u,b as h,r as l,l as p}from"./index-D2fBL-s6.js";import{u as f}from"./useMutation-9dlTbuQj.js";const S=20,E=300,D=10,c={follows:()=>n("/me/follows"),followSuggestions:()=>n("/research/follow-suggestions"),setFollow:(e,t,s)=>n(`/me/follows/${e}/${t}`,{method:s?"PUT":"DELETE"}),following:(e=0,t={})=>{const s=new URLSearchParams({offset:String(e),limit:"40"});return t.startDate&&s.set("start_date",t.startDate),t.endDate&&s.set("end_date",t.endDate),!t.startDate&&!t.endDate&&s.set("all_time","true"),t.topicOnly&&s.set("topic_only","true"),t.topicId!==void 0&&s.set("topic_id",String(t.topicId)),n(`/me/following?${s}`)},topics:()=>n("/me/topics"),addTopic:e=>n("/me/topics",{method:"POST",body:JSON.stringify({text:e})}),updateTopic:(e,t)=>n(`/me/topics/${e}`,{method:"PUT",body:JSON.stringify({text:t})}),removeTopic:e=>n(`/me/topics/${e}`,{method:"DELETE"}),reorderTopics:e=>n("/me/topics/order",{method:"PUT",body:JSON.stringify({topic_ids:e})}),followTopic:e=>n(`/me/topics/${e}/follow`,{method:"POST"}),setTopicPublic:(e,t)=>n(`/me/topics/${e}`,{method:"PATCH",body:JSON.stringify({is_public:t})}),setShowAsFollower:e=>n("/me/topic-follower-visibility",{method:"PUT",body:JSON.stringify({show_as_follower:e})}),publicTopic:e=>n(`/research/topics/${e}`),topicPapers:(e,t,s=0,o={})=>{const i=new URLSearchParams({order:t,offset:String(s),limit:String(S)});return o.startDate&&i.set("start_date",o.startDate),o.endDate&&i.set("end_date",o.endDate),n(`/research/topics/${e}/papers?${i}`)},featuredTopics:()=>n("/research/topics/featured"),email:()=>n("/me/research-email"),setEmail:e=>n("/me/research-email",{method:"PUT",body:JSON.stringify({enabled:e})})};function m(e,t,{follows:s}){return Promise.all([s&&e.invalidateQueries({queryKey:l.follows(t)}),e.invalidateQueries({queryKey:l.feed(t)}),e.invalidateQueries({queryKey:l.email(t)})])}function N(e=!0){var s;const t=(s=u())==null?void 0:s.user;return h({queryKey:l.follows(t==null?void 0:t.hf_subject),queryFn:c.follows,enabled:e&&!!t})}function q({onChanged:e,awaitRefresh:t=!1}={}){var i;const s=(i=u())==null?void 0:i.user,o=p();return f({mutationFn:({kind:r,entityId:a,follow:d})=>c.setFollow(r,a,d),onSuccess:async(r,a)=>{e==null||e(a);const d=m(o,s==null?void 0:s.hf_subject,{follows:!0});t&&await d}})}function P(e){const t=e.label??e.text;return t.charAt(0).toUpperCase()+t.slice(1)}function K(e){const t=P(e).toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"").slice(0,60);return t?`/topics/${e.id}-${t}`:`/topics/${e.id}`}function $(e){return e.split(/[,;\n]|\s-\s|^\s*-\s/m).filter(t=>t.trim().length>=3).length>=4}function L(){var s;const e=(s=u())==null?void 0:s.user,t=p();return f({mutationFn:o=>c.followTopic(o),onSuccess:async()=>{_(),await y(t,e==null?void 0:e.hf_subject)}})}function Q(){var o;const e=(o=u())==null?void 0:o.user,t=p(),s=l.topics(e==null?void 0:e.hf_subject);return f({mutationFn:i=>c.reorderTopics(i.map(r=>r.id)),onMutate:async i=>{await t.cancelQueries({queryKey:s}),t.setQueryData(s,i)},onSuccess:i=>t.setQueryData(s,i),onError:()=>void t.invalidateQueries({queryKey:s})})}function j(){var s;const e=(s=u())==null?void 0:s.user,t=p();return f({mutationFn:({id:o,isPublic:i})=>c.setTopicPublic(o,i),onSuccess:()=>t.invalidateQueries({queryKey:l.topics(e==null?void 0:e.hf_subject)})})}const w="pwc:pending-topic-follow";function R(e){sessionStorage.setItem(w,String(e))}function A(){const e=Number(sessionStorage.getItem(w));return Number.isInteger(e)&&e>0?e:null}function _(){sessionStorage.removeItem(w)}const b=e=>e.status==="pending"||e.status==="running";function J(e=!0,t=5e3){var o;const s=(o=u())==null?void 0:o.user;return h({queryKey:l.topics(s==null?void 0:s.hf_subject),queryFn:c.topics,enabled:e&&!!s,refetchInterval:i=>{var r;return(r=i.state.data)!=null&&r.some(b)?t:!1}})}function y(e,t){return m(e,t,{follows:!1}),e.invalidateQueries({queryKey:l.publicTopics}),e.invalidateQueries({queryKey:l.topics(t)})}function U(e){var o;const t=(o=u())==null?void 0:o.user,s=p();return f({mutationFn:({id:i,text:r})=>i===void 0?c.addTopic(r):c.updateTopic(i,r),onSuccess:async()=>{F(),await y(s,t==null?void 0:t.hf_subject),e==null||e()}})}function C(){var s;const e=(s=u())==null?void 0:s.user,t=p();return f({mutationFn:async o=>{const r=(await Promise.allSettled(o.map(a=>c.removeTopic(a)))).find(a=>a.status==="rejected");if(r)throw r.reason},onSettled:()=>void y(t,e==null?void 0:e.hf_subject)})}const T="pwc:following-pending-topic";function G(e){sessionStorage.setItem(T,e)}function M(){return sessionStorage.getItem(T)}function F(){sessionStorage.removeItem(T)}function k(){var s;const e=(s=u())==null?void 0:s.user,t=p();return f({mutationFn:async o=>{const r=(await Promise.allSettled(o.map(a=>c.setFollow(a.kind,a.id,a.follow??!0)))).find(a=>a.status==="rejected");if(r)throw r.reason},onSuccess:()=>I(),onSettled:()=>void m(t,e==null?void 0:e.hf_subject,{follows:!0})})}const g="pwc:following-pending-follows";function Y(e){sessionStorage.setItem(g,JSON.stringify(e))}function H(){return JSON.parse(sessionStorage.getItem(g)??"[]")}function I(){sessionStorage.removeItem(g)}export{S as T,K as a,C as b,A as c,J as d,N as e,U as f,k as g,D as h,E as i,G as j,Y as k,Q as l,b as m,M as n,H as o,F as p,q,c as r,R as s,P as t,L as u,$ as v,j as w}; diff --git a/assets/savedPapersAuth-DIA9S41B.js b/assets/savedPapersAuth-0s9GFyfF.js similarity index 75% rename from assets/savedPapersAuth-DIA9S41B.js rename to assets/savedPapersAuth-0s9GFyfF.js index feb4781fbc085738b0e99f96ee42a9423aba0d20..67af7a2c74a2d29c2b87ab0a672c7bc136928cf0 100644 --- a/assets/savedPapersAuth-DIA9S41B.js +++ b/assets/savedPapersAuth-0s9GFyfF.js @@ -1 +1 @@ -import{h as a}from"./index-CTkdBAwI.js";const t="saved_papers_authorized";function o(r=!1){const e=new URL(window.location.href);return r&&e.searchParams.set(t,"1"),a(`${e.pathname}${e.search}${e.hash}`,{authorizeBucket:!0,bucketCreate:!0})}export{t as S,o as s}; +import{h as a}from"./index-D2fBL-s6.js";const t="saved_papers_authorized";function o(r=!1){const e=new URL(window.location.href);return r&&e.searchParams.set(t,"1"),a(`${e.pathname}${e.search}${e.hash}`,{authorizeBucket:!0,bucketCreate:!0})}export{t as S,o as s}; diff --git a/assets/search-Di2HpIcQ.js b/assets/search-0R_Hc3S2.js similarity index 88% rename from assets/search-Di2HpIcQ.js rename to assets/search-0R_Hc3S2.js index 47e1f9eb91e3e1339d9b4a07afb181dcbbee75dc..be947efb79f7502ba972e7fd4ee41a5b649de6be 100644 --- a/assets/search-Di2HpIcQ.js +++ b/assets/search-0R_Hc3S2.js @@ -1,4 +1,4 @@ -import{c}from"./index-CTkdBAwI.js";/** +import{c}from"./index-D2fBL-s6.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/searchable-select-bWRlK1sd.js b/assets/searchable-select-CsXzzP_V.js similarity index 98% rename from assets/searchable-select-bWRlK1sd.js rename to assets/searchable-select-CsXzzP_V.js index b18208223a86e2c95d62ff98b87df1a56cc99e50..b8d1e7575ba4d7791d5317eaff61816d2ced9ca1 100644 --- a/assets/searchable-select-bWRlK1sd.js +++ b/assets/searchable-select-CsXzzP_V.js @@ -1,4 +1,4 @@ -import{c as Ae,f as a,af as z,z as L,ag as Me,ah as De,ai as $e,aj as Le,ak as H,j as p,I as D,b as Pe,C as Fe}from"./index-CTkdBAwI.js";import{B as Ke}from"./button-CJEAPbmU.js";import{P as qe,a as Ve,b as Be}from"./popover-CZErm3i7.js";import"./dialog-C7LLEadk.js";import{S as Ue}from"./search-Di2HpIcQ.js";import{L as ze}from"./loader-circle-B71NdARb.js";/** +import{c as Ae,f as a,af as z,z as L,ag as Me,ah as De,ai as $e,aj as Le,ak as H,j as p,I as D,b as Pe,C as Fe}from"./index-D2fBL-s6.js";import{B as Ke}from"./button-D0XfbdrX.js";import{P as qe,a as Ve,b as Be}from"./popover-DS5Jzsg5.js";import"./dialog-DgUROq2j.js";import{S as Ue}from"./search-0R_Hc3S2.js";import{L as ze}from"./loader-circle-CoLo2trx.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/share-2-p1ZCvleM.js b/assets/share-2-SmaUf3DC.js similarity index 92% rename from assets/share-2-p1ZCvleM.js rename to assets/share-2-SmaUf3DC.js index ca05dde293b7afe858c655d4666bbdd681586ceb..e43c919aab42f3013736e931f3fab93b0cff19eb 100644 --- a/assets/share-2-p1ZCvleM.js +++ b/assets/share-2-SmaUf3DC.js @@ -1,4 +1,4 @@ -import{c}from"./index-CTkdBAwI.js";/** +import{c}from"./index-D2fBL-s6.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/skeleton-p2_v-2W8.js b/assets/skeleton-BDwfco0_.js similarity index 62% rename from assets/skeleton-p2_v-2W8.js rename to assets/skeleton-BDwfco0_.js index e1cf3e3d58fb369e93556fb1ddad6042bea1c026..ad4da54a033f120085a84da8a3e977d5632c72d6 100644 --- a/assets/skeleton-p2_v-2W8.js +++ b/assets/skeleton-BDwfco0_.js @@ -1 +1 @@ -import{j as t,I as n}from"./index-CTkdBAwI.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,I as n}from"./index-D2fBL-s6.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/sparkles-DsQKLoSg.js b/assets/sparkles-4rJdywIs.js similarity index 93% rename from assets/sparkles-DsQKLoSg.js rename to assets/sparkles-4rJdywIs.js index 1aa64fa15d5d4e9ef581e4a1043a11776fdf5193..7b7f1dfa9156120f906c0ae2b39a320558d91e6b 100644 --- a/assets/sparkles-DsQKLoSg.js +++ b/assets/sparkles-4rJdywIs.js @@ -1,4 +1,4 @@ -import{c as a}from"./index-CTkdBAwI.js";/** +import{c as a}from"./index-D2fBL-s6.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/submissions-BSh9vIax.js b/assets/submissions-LRopJJKL.js similarity index 99% rename from assets/submissions-BSh9vIax.js rename to assets/submissions-LRopJJKL.js index ebfabfa414c7960338ac3cbd259bc69d4bb4b6ee..2979d1faf9d0851dba3b916b03fae0e61e126674 100644 --- a/assets/submissions-BSh9vIax.js +++ b/assets/submissions-LRopJJKL.js @@ -1 +1 @@ -import{ac as Fe}from"./index-CTkdBAwI.js";var v;(function(s){s.assertEqual=a=>{};function e(a){}s.assertIs=e;function t(a){throw new Error}s.assertNever=t,s.arrayToEnum=a=>{const n={};for(const i of a)n[i]=i;return n},s.getValidEnumValues=a=>{const n=s.objectKeys(a).filter(o=>typeof a[a[o]]!="number"),i={};for(const o of n)i[o]=a[o];return s.objectValues(i)},s.objectValues=a=>s.objectKeys(a).map(function(n){return a[n]}),s.objectKeys=typeof Object.keys=="function"?a=>Object.keys(a):a=>{const n=[];for(const i in a)Object.prototype.hasOwnProperty.call(a,i)&&n.push(i);return n},s.find=(a,n)=>{for(const i of a)if(n(i))return i},s.isInteger=typeof Number.isInteger=="function"?a=>Number.isInteger(a):a=>typeof a=="number"&&Number.isFinite(a)&&Math.floor(a)===a;function r(a,n=" | "){return a.map(i=>typeof i=="string"?`'${i}'`:i).join(n)}s.joinValues=r,s.jsonStringifyReplacer=(a,n)=>typeof n=="bigint"?n.toString():n})(v||(v={}));var Se;(function(s){s.mergeShapes=(e,t)=>({...e,...t})})(Se||(Se={}));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(n){return n.message},r={_errors:[]},a=n=>{for(const i of n.issues)if(i.code==="invalid_union")i.unionErrors.map(a);else if(i.code==="invalid_return_type")a(i.returnTypeError);else if(i.code==="invalid_arguments")a(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 a of this.issues)if(a.path.length>0){const n=a.path[0];t[n]=t[n]||[],t[n].push(e(a))}else r.push(e(a));return{formErrors:r,fieldErrors:t}}get formErrors(){return this.flatten()}}I.create=s=>new I(s);const le=(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 We=le;function Je(){return We}const Ye=s=>{const{data:e,path:t,errorMaps:r,issueData:a}=s,n=[...t,...a.path||[]],i={...a,path:n};if(a.message!==void 0)return{...a,path:n,message:a.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{...a,path:n,message:o}};function c(s,e){const t=Je(),r=Ye({issueData:e,data:s.data,path:s.path,errorMaps:[s.common.contextualErrorMap,s.schemaErrorMap,t,t===le?void 0:le].filter(a=>!!a)});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 a of t){if(a.status==="aborted")return m;a.status==="dirty"&&e.dirty(),r.push(a.value)}return{status:e.value,value:r}}static async mergeObjectAsync(e,t){const r=[];for(const a of t){const n=await a.key,i=await a.value;r.push({key:n,value:i})}return C.mergeObjectSync(e,r)}static mergeObjectSync(e,t){const r={};for(const a of t){const{key:n,value:i}=a;if(n.status==="aborted"||i.status==="aborted")return m;n.status==="dirty"&&e.dirty(),i.status==="dirty"&&e.dirty(),n.value!=="__proto__"&&(typeof i.value<"u"||a.alwaysSet)&&(r[n.value]=i.value)}return{status:e.value,value:r}}}const m=Object.freeze({status:"aborted"}),J=s=>({status:"dirty",value:s}),O=s=>({status:"valid",value:s}),Ce=s=>s.status==="aborted",Oe=s=>s.status==="dirty",B=s=>s.status==="valid",X=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 E{constructor(e,t,r,a){this._cachedPath=[],this.parent=e,this.data=t,this._path=r,this._key=a}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 Ne=(s,e)=>{if(B(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 g(s){if(!s)return{};const{errorMap:e,invalid_type_error:t,required_error:r,description:a}=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:a}:{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:a}}class y{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(X(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)},a=this._parseSync({data:e,path:r.path,parent:r});return Ne(r,a)}"~validate"(e){var r,a;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 n=this._parseSync({data:e,path:[],parent:t});return B(n)?{value:n.value}:{issues:t.common.issues}}catch(n){(a=(r=n==null?void 0:n.message)==null?void 0:r.toLowerCase())!=null&&a.includes("encountered")&&(this["~standard"].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then(n=>B(n)?{value:n.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)},a=this._parse({data:e,path:r.path,parent:r}),n=await(X(a)?a:Promise.resolve(a));return Ne(r,n)}refine(e,t){const r=a=>typeof t=="string"||typeof t>"u"?{message:t}:typeof t=="function"?t(a):t;return this._refinement((a,n)=>{const i=e(a),o=()=>n.addIssue({code:d.custom,...r(a)});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,a)=>e(r)?!0:(a.addIssue(typeof t=="function"?t(r,a):t),!1))}_refinement(e){return new L({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 D.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return N.create(this)}promise(){return ae.create(this,this._def)}or(e){return ee.create([this,e],this._def)}and(e){return te.create(this,e,this._def)}transform(e){return new L({...g(this._def),schema:this,typeName:_.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t=typeof e=="function"?e:()=>e;return new ne({...g(this._def),innerType:this,defaultValue:t,typeName:_.ZodDefault})}brand(){return new ze({typeName:_.ZodBranded,type:this,...g(this._def)})}catch(e){const t=typeof e=="function"?e:()=>e;return new ie({...g(this._def),innerType:this,catchValue:t,typeName:_.ZodCatch})}describe(e){const t=this.constructor;return new t({...this._def,description:e})}pipe(e){return be.create(this,e)}readonly(){return oe.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const He=/^c[^\s-]{8,}$/i,Ge=/^[0-9a-z]+$/,Qe=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Xe=/^[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,Ke=/^[a-z0-9_-]{21}$/i,et=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,tt=/^[-+]?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)?)??$/,st=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,rt="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let ue;const at=/^(?:(?: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])$/,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]))$/,ot=/^(([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])$/,dt=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,ct=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,$e="((\\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])))",ut=new RegExp(`^${$e}$`);function Pe(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 lt(s){return new RegExp(`^${Pe(s)}$`)}function ht(s){let e=`${$e}T${Pe(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 ft(s,e){return!!((e==="v4"||!e)&&at.test(s)||(e==="v6"||!e)&&it.test(s))}function pt(s,e){if(!et.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,"="),a=JSON.parse(atob(r));return!(typeof a!="object"||a===null||"typ"in a&&(a==null?void 0:a.typ)!=="JWT"||!a.alg||e&&a.alg!==e)}catch{return!1}}function mt(s,e){return!!((e==="v4"||!e)&&nt.test(s)||(e==="v6"||!e)&&ot.test(s))}class R extends y{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==u.string){const n=this._getOrReturnCtx(e);return c(n,{code:d.invalid_type,expected:u.string,received:n.parsedType}),m}const r=new C;let a;for(const n of this._def.checks)if(n.kind==="min")e.data.lengthn.value&&(a=this._getOrReturnCtx(e,a),c(a,{code:d.too_big,maximum:n.value,type:"string",inclusive:!0,exact:!1,message:n.message}),r.dirty());else if(n.kind==="length"){const i=e.data.length>n.value,o=e.data.lengthe.test(a),{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,...g(s)});function _t(s,e){const t=(s.toString().split(".")[1]||"").length,r=(e.toString().split(".")[1]||"").length,a=t>r?t:r,n=Number.parseInt(s.toFixed(a).replace(".","")),i=Number.parseInt(e.toFixed(a).replace(".",""));return n%i/10**a}class q extends y{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 n=this._getOrReturnCtx(e);return c(n,{code:d.invalid_type,expected:u.number,received:n.parsedType}),m}let r;const a=new C;for(const n of this._def.checks)n.kind==="int"?v.isInteger(e.data)||(r=this._getOrReturnCtx(e,r),c(r,{code:d.invalid_type,expected:"integer",received:"float",message:n.message}),a.dirty()):n.kind==="min"?(n.inclusive?e.datan.value:e.data>=n.value)&&(r=this._getOrReturnCtx(e,r),c(r,{code:d.too_big,maximum:n.value,type:"number",inclusive:n.inclusive,exact:!1,message:n.message}),a.dirty()):n.kind==="multipleOf"?_t(e.data,n.value)!==0&&(r=this._getOrReturnCtx(e,r),c(r,{code:d.not_multiple_of,multipleOf:n.value,message:n.message}),a.dirty()):n.kind==="finite"?Number.isFinite(e.data)||(r=this._getOrReturnCtx(e,r),c(r,{code:d.not_finite,message:n.message}),a.dirty()):v.assertNever(n);return{status:a.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,a){return new q({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:h.toString(a)}]})}_addCheck(e){return new q({...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 q({checks:[],typeName:_.ZodNumber,coerce:(s==null?void 0:s.coerce)||!1,...g(s)});class Y extends y{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 a=new C;for(const n of this._def.checks)n.kind==="min"?(n.inclusive?e.datan.value:e.data>=n.value)&&(r=this._getOrReturnCtx(e,r),c(r,{code:d.too_big,type:"bigint",maximum:n.value,inclusive:n.inclusive,message:n.message}),a.dirty()):n.kind==="multipleOf"?e.data%n.value!==BigInt(0)&&(r=this._getOrReturnCtx(e,r),c(r,{code:d.not_multiple_of,multipleOf:n.value,message:n.message}),a.dirty()):v.assertNever(n);return{status:a.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,a){return new Y({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:h.toString(a)}]})}_addCheck(e){return new Y({...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 Y({checks:[],typeName:_.ZodBigInt,coerce:(s==null?void 0:s.coerce)??!1,...g(s)});class he extends y{_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)}}he.create=s=>new he({typeName:_.ZodBoolean,coerce:(s==null?void 0:s.coerce)||!1,...g(s)});class K extends y{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==u.date){const n=this._getOrReturnCtx(e);return c(n,{code:d.invalid_type,expected:u.date,received:n.parsedType}),m}if(Number.isNaN(e.data.getTime())){const n=this._getOrReturnCtx(e);return c(n,{code:d.invalid_date}),m}const r=new C;let a;for(const n of this._def.checks)n.kind==="min"?e.data.getTime()n.value&&(a=this._getOrReturnCtx(e,a),c(a,{code:d.too_big,message:n.message,inclusive:!0,exact:!1,maximum:n.value,type:"date"}),r.dirty()):v.assertNever(n);return{status:r.value,value:new Date(e.data.getTime())}}_addCheck(e){return new K({...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 K({checks:[],coerce:(s==null?void 0:s.coerce)||!1,typeName:_.ZodDate,...g(s)});class Ae extends y{_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)}}Ae.create=s=>new Ae({typeName:_.ZodSymbol,...g(s)});class fe extends y{_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)}}fe.create=s=>new fe({typeName:_.ZodUndefined,...g(s)});class pe extends y{_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)}}pe.create=s=>new pe({typeName:_.ZodNull,...g(s)});class Ee extends y{constructor(){super(...arguments),this._any=!0}_parse(e){return O(e.data)}}Ee.create=s=>new Ee({typeName:_.ZodAny,...g(s)});class me extends y{constructor(){super(...arguments),this._unknown=!0}_parse(e){return O(e.data)}}me.create=s=>new me({typeName:_.ZodUnknown,...g(s)});class P extends y{_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,...g(s)});class Ze extends y{_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,...g(s)});class N extends y{_parse(e){const{ctx:t,status:r}=this._processInputParams(e),a=this._def;if(t.parsedType!==u.array)return c(t,{code:d.invalid_type,expected:u.array,received:t.parsedType}),m;if(a.exactLength!==null){const i=t.data.length>a.exactLength.value,o=t.data.lengtha.maxLength.value&&(c(t,{code:d.too_big,maximum:a.maxLength.value,type:"array",inclusive:!0,exact:!1,message:a.maxLength.message}),r.dirty()),t.common.async)return Promise.all([...t.data].map((i,o)=>a.type._parseAsync(new E(t,i,t.path,o)))).then(i=>C.mergeArray(r,i));const n=[...t.data].map((i,o)=>a.type._parseSync(new E(t,i,t.path,o)));return C.mergeArray(r,n)}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,...g(e)});function U(s){if(s instanceof w){const e={};for(const t in s.shape){const r=s.shape[t];e[t]=j.create(U(r))}return new w({...s._def,shape:()=>e})}else return s instanceof N?new N({...s._def,type:U(s.element)}):s instanceof j?j.create(U(s.unwrap())):s instanceof D?D.create(U(s.unwrap())):s instanceof z?z.create(s.items.map(e=>U(e))):s}class w extends y{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:a}=this._processInputParams(e),{shape:n,keys:i}=this._getCached(),o=[];if(!(this._def.catchall instanceof P&&this._def.unknownKeys==="strip"))for(const p in a.data)i.includes(p)||o.push(p);const f=[];for(const p of i){const x=n[p],W=a.data[p];f.push({key:{status:"valid",value:p},value:x._parse(new E(a,W,a.path,p)),alwaysSet:p in a.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:a.data[x]}});else if(p==="strict")o.length>0&&(c(a,{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 W=a.data[x];f.push({key:{status:"valid",value:x},value:p._parse(new E(a,W,a.path,x)),alwaysSet:x in a.data})}}return a.common.async?Promise.resolve().then(async()=>{const p=[];for(const x of f){const W=await x.key,qe=await x.value;p.push({key:W,value:qe,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 n,i;const a=((i=(n=this._def).errorMap)==null?void 0:i.call(n,t,r).message)??r.defaultError;return t.code==="unrecognized_keys"?{message:h.errToObj(e).message??a}:{message:a}}}:{}})}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 U(this)}partial(e){const t={};for(const r of v.objectKeys(this.shape)){const a=this.shape[r];e&&!e[r]?t[r]=a:t[r]=a.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 n=this.shape[r];for(;n instanceof j;)n=n._def.innerType;t[r]=n}return new w({...this._def,shape:()=>t})}keyof(){return Me(v.objectKeys(this.shape))}}w.create=(s,e)=>new w({shape:()=>s,unknownKeys:"strip",catchall:P.create(),typeName:_.ZodObject,...g(e)});w.strictCreate=(s,e)=>new w({shape:()=>s,unknownKeys:"strict",catchall:P.create(),typeName:_.ZodObject,...g(e)});w.lazycreate=(s,e)=>new w({shape:s,unknownKeys:"strip",catchall:P.create(),typeName:_.ZodObject,...g(e)});class ee extends y{_parse(e){const{ctx:t}=this._processInputParams(e),r=this._def.options;function a(n){for(const o of n)if(o.result.status==="valid")return o.result;for(const o of n)if(o.result.status==="dirty")return t.common.issues.push(...o.ctx.common.issues),o.result;const i=n.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 n=>{const i={...t,common:{...t.common,issues:[]},parent:null};return{result:await n._parseAsync({data:t.data,path:t.path,parent:i}),ctx:i}})).then(a);{let n;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"&&!n&&(n={result:x,ctx:p}),p.common.issues.length&&i.push(p.common.issues)}if(n)return t.common.issues.push(...n.ctx.common.issues),n.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}}ee.create=(s,e)=>new ee({options:s,typeName:_.ZodUnion,...g(e)});const Z=s=>s instanceof ge?Z(s.schema):s instanceof L?Z(s.innerType()):s instanceof re?[s.value]:s instanceof V?s.options:s instanceof ye?v.objectValues(s.enum):s instanceof ne?Z(s._def.innerType):s instanceof fe?[void 0]:s instanceof pe?[null]:s instanceof j?[void 0,...Z(s.unwrap())]:s instanceof D?[null,...Z(s.unwrap())]:s instanceof ze||s instanceof oe?Z(s.unwrap()):s instanceof ie?Z(s._def.innerType):[];class ke extends y{_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,a=t.data[r],n=this.optionsMap.get(a);return n?t.common.async?n._parseAsync({data:t.data,path:t.path,parent:t}):n._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 a=new Map;for(const n of t){const i=Z(n.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(a.has(o))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(o)}`);a.set(o,n)}}return new ke({typeName:_.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:a,...g(r)})}}function _e(s,e){const t=$(s),r=$(e);if(s===e)return{valid:!0,data:s};if(t===u.object&&r===u.object){const a=v.objectKeys(e),n=v.objectKeys(s).filter(o=>a.indexOf(o)!==-1),i={...s,...e};for(const o of n){const f=_e(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 a=[];for(let n=0;n{if(Ce(n)||Ce(i))return m;const o=_e(n.value,i.value);return o.valid?((Oe(n)||Oe(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(([n,i])=>a(n,i)):a(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}te.create=(s,e,t)=>new te({left:s,right:e,typeName:_.ZodIntersection,...g(t)});class z extends y{_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 n=[...r.data].map((i,o)=>{const f=this._def.items[o]||this._def.rest;return f?f._parse(new E(r,i,r.path,o)):null}).filter(i=>!!i);return r.common.async?Promise.all(n).then(i=>C.mergeArray(t,i)):C.mergeArray(t,n)}get items(){return this._def.items}rest(e){return new z({...this._def,rest:e})}}z.create=(s,e)=>{if(!Array.isArray(s))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new z({items:s,typeName:_.ZodTuple,rest:null,...g(e)})};class se extends y{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 a=[],n=this._def.keyType,i=this._def.valueType;for(const o in r.data)a.push({key:n._parse(new E(r,o,r.path,o)),value:i._parse(new E(r,r.data[o],r.path,o)),alwaysSet:o in r.data});return r.common.async?C.mergeObjectAsync(t,a):C.mergeObjectSync(t,a)}get element(){return this._def.valueType}static create(e,t,r){return t instanceof y?new se({keyType:e,valueType:t,typeName:_.ZodRecord,...g(r)}):new se({keyType:R.create(),valueType:e,typeName:_.ZodRecord,...g(t)})}}class Re extends y{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 a=this._def.keyType,n=this._def.valueType,i=[...r.data.entries()].map(([o,f],p)=>({key:a._parse(new E(r,o,r.path,[p,"key"])),value:n._parse(new E(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}}}}Re.create=(s,e,t)=>new Re({valueType:e,keyType:s,typeName:_.ZodMap,...g(t)});class H extends y{_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 a=this._def;a.minSize!==null&&r.data.sizea.maxSize.value&&(c(r,{code:d.too_big,maximum:a.maxSize.value,type:"set",inclusive:!0,exact:!1,message:a.maxSize.message}),t.dirty());const n=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)=>n._parse(new E(r,f,r.path,p)));return r.common.async?Promise.all(o).then(f=>i(f)):i(o)}min(e,t){return new H({...this._def,minSize:{value:e,message:h.toString(t)}})}max(e,t){return new H({...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)}}H.create=(s,e)=>new H({valueType:s,minSize:null,maxSize:null,typeName:_.ZodSet,...g(e)});class ge extends y{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})}}ge.create=(s,e)=>new ge({getter:s,typeName:_.ZodLazy,...g(e)});class re extends y{_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}}re.create=(s,e)=>new re({value:s,typeName:_.ZodLiteral,...g(e)});function Me(s,e){return new V({values:s,typeName:_.ZodEnum,...g(e)})}class V extends y{_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=Me;class ye extends y{_parse(e){const t=v.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(e);if(r.parsedType!==u.string&&r.parsedType!==u.number){const a=v.objectValues(t);return c(r,{expected:v.joinValues(a),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 a=v.objectValues(t);return c(r,{received:r.data,code:d.invalid_enum_value,options:a}),m}return O(e.data)}get enum(){return this._def.values}}ye.create=(s,e)=>new ye({values:s,typeName:_.ZodNativeEnum,...g(e)});class ae extends y{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(a=>this._def.type.parseAsync(a,{path:t.path,errorMap:t.common.contextualErrorMap})))}}ae.create=(s,e)=>new ae({type:s,typeName:_.ZodPromise,...g(e)});class L extends y{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),a=this._def.effect||null,n={addIssue:i=>{c(r,i),i.fatal?t.abort():t.dirty()},get path(){return r.path}};if(n.addIssue=n.addIssue.bind(n),a.type==="preprocess"){const i=a.transform(r.data,n);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"?J(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"?J(o.value):o}}if(a.type==="refinement"){const i=o=>{const f=a.refinement(o,n);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(a.type==="transform")if(r.common.async===!1){const i=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!B(i))return m;const o=a.transform(i.value,n);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=>B(i)?Promise.resolve(a.transform(i.value,n)).then(o=>({status:t.value,value:o})):m);v.assertNever(a)}}L.create=(s,e,t)=>new L({schema:s,typeName:_.ZodEffects,effect:e,...g(t)});L.createWithPreprocess=(s,e,t)=>new L({schema:e,effect:{type:"preprocess",transform:s},typeName:_.ZodEffects,...g(t)});class j extends y{_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,...g(e)});class D extends y{_parse(e){return this._getType(e)===u.null?O(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}D.create=(s,e)=>new D({innerType:s,typeName:_.ZodNullable,...g(e)});class ne extends y{_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,...g(e)});class ie extends y{_parse(e){const{ctx:t}=this._processInputParams(e),r={...t,common:{...t.common,issues:[]}},a=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return X(a)?a.then(n=>({status:"valid",value:n.status==="valid"?n.value:this._def.catchValue({get error(){return new I(r.common.issues)},input:r.data})})):{status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new I(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}ie.create=(s,e)=>new ie({innerType:s,typeName:_.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...g(e)});class je extends y{_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}}}je.create=s=>new je({typeName:_.ZodNaN,...g(s)});class ze extends y{_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 be extends y{_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.common.async)return(async()=>{const n=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return n.status==="aborted"?m:n.status==="dirty"?(t.dirty(),J(n.value)):this._def.out._parseAsync({data:n.value,path:r.path,parent:r})})();{const a=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?m:a.status==="dirty"?(t.dirty(),{status:"dirty",value:a.value}):this._def.out._parseSync({data:a.value,path:r.path,parent:r})}}static create(e,t){return new be({in:e,out:t,typeName:_.ZodPipeline})}}class oe extends y{_parse(e){const t=this._def.innerType._parse(e),r=a=>(B(a)&&(a.value=Object.freeze(a.value)),a);return X(t)?t.then(a=>r(a)):r(t)}unwrap(){return this._def.innerType}}oe.create=(s,e)=>new oe({innerType:s,typeName:_.ZodReadonly,...g(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=q.create,de=he.create,gt=me.create;P.create;const T=N.create,k=w.create,Ve=ee.create,Le=ke.create;te.create;z.create;const De=se.create,Q=re.create,ve=V.create;ae.create;j.create;D.create;const A=De(gt()),we=k({id:b(),name:l(),slug:l().optional()}).passthrough(),ce=k({url:l(),is_official:de()}),xe=k({task_id:b(),dataset_id:b(),model_name:l().nullish(),harness:l().nullish(),methodology:l().nullish(),metrics:De(Ve([l(),b()])),uses_additional_data:de().optional(),is_open:de().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=xe.partial().extend({id:b().optional()}),vt=Le("op",[k({op:Q("create"),data:xe}),k({op:Q("update"),evaluation_id:b(),data:xe}),k({op:Q("delete"),evaluation_id:b()})]),Ie=k({hf_models:T(l()),hf_datasets:T(l()),hf_spaces:T(l())}),Te=k({file_name:l(),mime_type:l(),data_url:l().optional(),url:l().optional()}),F=k({name:l(),description:l().optional()}),xt=F.extend({image:Te.optional(),image_credit:l().optional(),parent_id:b().optional(),area_id:b().optional(),keywords:l().optional()}),kt=F.extend({image:Te.optional(),image_credit:l().optional(),source_paper_id:b().optional(),source_url:l().optional(),source_title:l().optional()}),bt=Ve([k({benchmark:l(),task:l(),description:l()}),F.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()})]),wt=F.extend({description:l(),direction:ve(["higher_is_better","lower_is_better"]),full_name:l().optional(),scale:l().optional(),task_id:b(),dataset_id:b()}),Tt=F.extend({short_name:l().optional(),venue:l().optional(),location:l().optional(),url:l(),year:b(),start_date:l().optional(),end_date:l().optional()}),St=F.extend({hf_slug:l().optional(),website_url:l().optional(),image:Te.optional()}),Ct=k({id:b(),paper_id:b().nullable(),hf_username:l(),hf_subject:l().nullish(),is_author:de(),status:ve(["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:ve(["human","codex","auto"]).nullish(),catalog_event_id:l().nullish(),review_evidence:A.nullish(),created_at:l(),updated_at:l(),reviewed_at:l().nullish()});function S(s,e,t){return Ct.extend({edit_type:Q(s),proposed_payload:e,current_payload:t.nullish()})}const Ot=S("tasks",k({task_ids:T(b())}),k({tasks:T(we)})),Nt=S("methods",k({method_ids:T(b())}),k({methods:T(we)})),At=S("evaluations",k({operations:T(vt)}),k({evaluations:T(yt)})),Et=S("repositories",k({repositories:T(ce)}),k({repositories:T(ce)})),Zt=S("project_pages",k({project_pages:T(ce)}),k({project_pages:T(ce)})),Rt=S("source_url",k({source_url:l()}),k({source_url:l().nullish()})),jt=S("hf_artifacts",Ie,Ie),It=S("x_threads",k({x_threads:T(l())}),k({x_threads:T(k({url:l()}))})),$t=S("organizations",k({organization_ids:T(b())}),k({organizations:T(we)})),Pt=S("new_task",xt,A),Mt=S("new_method",kt,A),zt=S("new_benchmark",bt,A),Vt=S("new_metric",wt,A),Lt=S("new_conference",Tt,A),Dt=S("new_organization",St,A),Ut=S("new_external_paper",k({title:l().optional(),source_url:l(),authors:T(l()),date_published:l().optional(),abstract:l().optional()}),A),Ue=Le("edit_type",[Ot,Nt,At,Et,Zt,Rt,jt,It,$t,Pt,Mt,zt,Vt,Lt,Dt,Ut]);function Yt(s,e,t){return{paper_id:s,edit_type:e,proposed_payload:t}}const M=(s,e)=>({directory:{title:s,subtitle:e}}),Ht={tasks:{label:"tasks",administrative:!1},methods:{label:"methods",administrative:!1},evaluations:{label:"evaluations",administrative:!1},repositories:{label:"repositories",administrative:!1},project_pages:{label:"project pages",administrative:!1},source_url:{label:"source url",administrative:!1},x_threads:{label:"x threads",administrative:!1},hf_artifacts:{label:"hf artifacts",administrative:!1},organizations:{label:"organizations",administrative:!1},new_task:{label:"new task",administrative:!0,...M("New task","Task suggestion")},new_method:{label:"new method",administrative:!0,...M("New method","Method suggestion")},new_benchmark:{label:"new benchmark",administrative:!0,...M("New benchmark","Benchmark suggestion")},new_metric:{label:"new metric",administrative:!0,...M("New metric","Metric suggestion")},new_conference:{label:"new conference",administrative:!0,...M("New conference","Conference suggestion")},new_organization:{label:"new organization",administrative:!1,...M("New organization","Organization suggestion")},new_external_paper:{label:"external paper",administrative:!1,...M("External paper","External paper submission")}},Bt=k({count:b(),results:T(Ue)});class qt extends Error{constructor(e){super(`Malformed pending-edit payload: ${e}`),this.name="PendingEditPayloadError"}}function Be(s,e){const t=s.safeParse(e);if(t.success)return t.data;const r=t.error.issues[0];throw new qt(`${(r==null?void 0:r.path.join("."))||"response"}: ${(r==null?void 0:r.message)||"invalid value"}`)}const G=s=>Be(Ue,s),Ft=s=>Be(Bt,s);class Wt{constructor(e){this.request=e}async submit(e){return G(await this.request("/me/paper-edits",{method:"POST",body:JSON.stringify(e)}))}list(e){const t=new URLSearchParams;for(const[a,n]of Object.entries(e??{}))n!==void 0&&t.set(a,String(n));const r=t.toString();return this.request(`/admin/paper-edits${r?`?${r}`:""}`).then(Ft)}revertAutoApproved(e,t={}){return this.request(`/admin/submitters/${encodeURIComponent(e)}/revert-auto-approved`,{method:"POST",body:JSON.stringify(t)})}async get(e){return G(await this.request(`/admin/paper-edits/${e}`))}async approve(e,t={}){return G(await this.request(`/admin/paper-edits/${e}/approve`,{method:"POST",body:JSON.stringify(t)}))}async reject(e,t={}){return G(await this.request(`/admin/paper-edits/${e}/reject`,{method:"POST",body:JSON.stringify(t)}))}}const Gt=new Wt(Fe);export{Ht as E,Yt as p,Gt as s}; +import{ac as Fe}from"./index-D2fBL-s6.js";var v;(function(s){s.assertEqual=a=>{};function e(a){}s.assertIs=e;function t(a){throw new Error}s.assertNever=t,s.arrayToEnum=a=>{const n={};for(const i of a)n[i]=i;return n},s.getValidEnumValues=a=>{const n=s.objectKeys(a).filter(o=>typeof a[a[o]]!="number"),i={};for(const o of n)i[o]=a[o];return s.objectValues(i)},s.objectValues=a=>s.objectKeys(a).map(function(n){return a[n]}),s.objectKeys=typeof Object.keys=="function"?a=>Object.keys(a):a=>{const n=[];for(const i in a)Object.prototype.hasOwnProperty.call(a,i)&&n.push(i);return n},s.find=(a,n)=>{for(const i of a)if(n(i))return i},s.isInteger=typeof Number.isInteger=="function"?a=>Number.isInteger(a):a=>typeof a=="number"&&Number.isFinite(a)&&Math.floor(a)===a;function r(a,n=" | "){return a.map(i=>typeof i=="string"?`'${i}'`:i).join(n)}s.joinValues=r,s.jsonStringifyReplacer=(a,n)=>typeof n=="bigint"?n.toString():n})(v||(v={}));var Se;(function(s){s.mergeShapes=(e,t)=>({...e,...t})})(Se||(Se={}));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(n){return n.message},r={_errors:[]},a=n=>{for(const i of n.issues)if(i.code==="invalid_union")i.unionErrors.map(a);else if(i.code==="invalid_return_type")a(i.returnTypeError);else if(i.code==="invalid_arguments")a(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 a of this.issues)if(a.path.length>0){const n=a.path[0];t[n]=t[n]||[],t[n].push(e(a))}else r.push(e(a));return{formErrors:r,fieldErrors:t}}get formErrors(){return this.flatten()}}I.create=s=>new I(s);const le=(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 We=le;function Je(){return We}const Ye=s=>{const{data:e,path:t,errorMaps:r,issueData:a}=s,n=[...t,...a.path||[]],i={...a,path:n};if(a.message!==void 0)return{...a,path:n,message:a.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{...a,path:n,message:o}};function c(s,e){const t=Je(),r=Ye({issueData:e,data:s.data,path:s.path,errorMaps:[s.common.contextualErrorMap,s.schemaErrorMap,t,t===le?void 0:le].filter(a=>!!a)});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 a of t){if(a.status==="aborted")return m;a.status==="dirty"&&e.dirty(),r.push(a.value)}return{status:e.value,value:r}}static async mergeObjectAsync(e,t){const r=[];for(const a of t){const n=await a.key,i=await a.value;r.push({key:n,value:i})}return C.mergeObjectSync(e,r)}static mergeObjectSync(e,t){const r={};for(const a of t){const{key:n,value:i}=a;if(n.status==="aborted"||i.status==="aborted")return m;n.status==="dirty"&&e.dirty(),i.status==="dirty"&&e.dirty(),n.value!=="__proto__"&&(typeof i.value<"u"||a.alwaysSet)&&(r[n.value]=i.value)}return{status:e.value,value:r}}}const m=Object.freeze({status:"aborted"}),J=s=>({status:"dirty",value:s}),O=s=>({status:"valid",value:s}),Ce=s=>s.status==="aborted",Oe=s=>s.status==="dirty",B=s=>s.status==="valid",X=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 E{constructor(e,t,r,a){this._cachedPath=[],this.parent=e,this.data=t,this._path=r,this._key=a}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 Ne=(s,e)=>{if(B(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 g(s){if(!s)return{};const{errorMap:e,invalid_type_error:t,required_error:r,description:a}=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:a}:{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:a}}class y{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(X(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)},a=this._parseSync({data:e,path:r.path,parent:r});return Ne(r,a)}"~validate"(e){var r,a;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 n=this._parseSync({data:e,path:[],parent:t});return B(n)?{value:n.value}:{issues:t.common.issues}}catch(n){(a=(r=n==null?void 0:n.message)==null?void 0:r.toLowerCase())!=null&&a.includes("encountered")&&(this["~standard"].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then(n=>B(n)?{value:n.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)},a=this._parse({data:e,path:r.path,parent:r}),n=await(X(a)?a:Promise.resolve(a));return Ne(r,n)}refine(e,t){const r=a=>typeof t=="string"||typeof t>"u"?{message:t}:typeof t=="function"?t(a):t;return this._refinement((a,n)=>{const i=e(a),o=()=>n.addIssue({code:d.custom,...r(a)});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,a)=>e(r)?!0:(a.addIssue(typeof t=="function"?t(r,a):t),!1))}_refinement(e){return new L({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 D.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return N.create(this)}promise(){return ae.create(this,this._def)}or(e){return ee.create([this,e],this._def)}and(e){return te.create(this,e,this._def)}transform(e){return new L({...g(this._def),schema:this,typeName:_.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t=typeof e=="function"?e:()=>e;return new ne({...g(this._def),innerType:this,defaultValue:t,typeName:_.ZodDefault})}brand(){return new ze({typeName:_.ZodBranded,type:this,...g(this._def)})}catch(e){const t=typeof e=="function"?e:()=>e;return new ie({...g(this._def),innerType:this,catchValue:t,typeName:_.ZodCatch})}describe(e){const t=this.constructor;return new t({...this._def,description:e})}pipe(e){return be.create(this,e)}readonly(){return oe.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const He=/^c[^\s-]{8,}$/i,Ge=/^[0-9a-z]+$/,Qe=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Xe=/^[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,Ke=/^[a-z0-9_-]{21}$/i,et=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,tt=/^[-+]?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)?)??$/,st=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,rt="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let ue;const at=/^(?:(?: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])$/,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]))$/,ot=/^(([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])$/,dt=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,ct=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,$e="((\\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])))",ut=new RegExp(`^${$e}$`);function Pe(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 lt(s){return new RegExp(`^${Pe(s)}$`)}function ht(s){let e=`${$e}T${Pe(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 ft(s,e){return!!((e==="v4"||!e)&&at.test(s)||(e==="v6"||!e)&&it.test(s))}function pt(s,e){if(!et.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,"="),a=JSON.parse(atob(r));return!(typeof a!="object"||a===null||"typ"in a&&(a==null?void 0:a.typ)!=="JWT"||!a.alg||e&&a.alg!==e)}catch{return!1}}function mt(s,e){return!!((e==="v4"||!e)&&nt.test(s)||(e==="v6"||!e)&&ot.test(s))}class R extends y{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==u.string){const n=this._getOrReturnCtx(e);return c(n,{code:d.invalid_type,expected:u.string,received:n.parsedType}),m}const r=new C;let a;for(const n of this._def.checks)if(n.kind==="min")e.data.lengthn.value&&(a=this._getOrReturnCtx(e,a),c(a,{code:d.too_big,maximum:n.value,type:"string",inclusive:!0,exact:!1,message:n.message}),r.dirty());else if(n.kind==="length"){const i=e.data.length>n.value,o=e.data.lengthe.test(a),{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,...g(s)});function _t(s,e){const t=(s.toString().split(".")[1]||"").length,r=(e.toString().split(".")[1]||"").length,a=t>r?t:r,n=Number.parseInt(s.toFixed(a).replace(".","")),i=Number.parseInt(e.toFixed(a).replace(".",""));return n%i/10**a}class q extends y{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 n=this._getOrReturnCtx(e);return c(n,{code:d.invalid_type,expected:u.number,received:n.parsedType}),m}let r;const a=new C;for(const n of this._def.checks)n.kind==="int"?v.isInteger(e.data)||(r=this._getOrReturnCtx(e,r),c(r,{code:d.invalid_type,expected:"integer",received:"float",message:n.message}),a.dirty()):n.kind==="min"?(n.inclusive?e.datan.value:e.data>=n.value)&&(r=this._getOrReturnCtx(e,r),c(r,{code:d.too_big,maximum:n.value,type:"number",inclusive:n.inclusive,exact:!1,message:n.message}),a.dirty()):n.kind==="multipleOf"?_t(e.data,n.value)!==0&&(r=this._getOrReturnCtx(e,r),c(r,{code:d.not_multiple_of,multipleOf:n.value,message:n.message}),a.dirty()):n.kind==="finite"?Number.isFinite(e.data)||(r=this._getOrReturnCtx(e,r),c(r,{code:d.not_finite,message:n.message}),a.dirty()):v.assertNever(n);return{status:a.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,a){return new q({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:h.toString(a)}]})}_addCheck(e){return new q({...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 q({checks:[],typeName:_.ZodNumber,coerce:(s==null?void 0:s.coerce)||!1,...g(s)});class Y extends y{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 a=new C;for(const n of this._def.checks)n.kind==="min"?(n.inclusive?e.datan.value:e.data>=n.value)&&(r=this._getOrReturnCtx(e,r),c(r,{code:d.too_big,type:"bigint",maximum:n.value,inclusive:n.inclusive,message:n.message}),a.dirty()):n.kind==="multipleOf"?e.data%n.value!==BigInt(0)&&(r=this._getOrReturnCtx(e,r),c(r,{code:d.not_multiple_of,multipleOf:n.value,message:n.message}),a.dirty()):v.assertNever(n);return{status:a.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,a){return new Y({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:h.toString(a)}]})}_addCheck(e){return new Y({...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 Y({checks:[],typeName:_.ZodBigInt,coerce:(s==null?void 0:s.coerce)??!1,...g(s)});class he extends y{_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)}}he.create=s=>new he({typeName:_.ZodBoolean,coerce:(s==null?void 0:s.coerce)||!1,...g(s)});class K extends y{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==u.date){const n=this._getOrReturnCtx(e);return c(n,{code:d.invalid_type,expected:u.date,received:n.parsedType}),m}if(Number.isNaN(e.data.getTime())){const n=this._getOrReturnCtx(e);return c(n,{code:d.invalid_date}),m}const r=new C;let a;for(const n of this._def.checks)n.kind==="min"?e.data.getTime()n.value&&(a=this._getOrReturnCtx(e,a),c(a,{code:d.too_big,message:n.message,inclusive:!0,exact:!1,maximum:n.value,type:"date"}),r.dirty()):v.assertNever(n);return{status:r.value,value:new Date(e.data.getTime())}}_addCheck(e){return new K({...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 K({checks:[],coerce:(s==null?void 0:s.coerce)||!1,typeName:_.ZodDate,...g(s)});class Ae extends y{_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)}}Ae.create=s=>new Ae({typeName:_.ZodSymbol,...g(s)});class fe extends y{_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)}}fe.create=s=>new fe({typeName:_.ZodUndefined,...g(s)});class pe extends y{_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)}}pe.create=s=>new pe({typeName:_.ZodNull,...g(s)});class Ee extends y{constructor(){super(...arguments),this._any=!0}_parse(e){return O(e.data)}}Ee.create=s=>new Ee({typeName:_.ZodAny,...g(s)});class me extends y{constructor(){super(...arguments),this._unknown=!0}_parse(e){return O(e.data)}}me.create=s=>new me({typeName:_.ZodUnknown,...g(s)});class P extends y{_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,...g(s)});class Ze extends y{_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,...g(s)});class N extends y{_parse(e){const{ctx:t,status:r}=this._processInputParams(e),a=this._def;if(t.parsedType!==u.array)return c(t,{code:d.invalid_type,expected:u.array,received:t.parsedType}),m;if(a.exactLength!==null){const i=t.data.length>a.exactLength.value,o=t.data.lengtha.maxLength.value&&(c(t,{code:d.too_big,maximum:a.maxLength.value,type:"array",inclusive:!0,exact:!1,message:a.maxLength.message}),r.dirty()),t.common.async)return Promise.all([...t.data].map((i,o)=>a.type._parseAsync(new E(t,i,t.path,o)))).then(i=>C.mergeArray(r,i));const n=[...t.data].map((i,o)=>a.type._parseSync(new E(t,i,t.path,o)));return C.mergeArray(r,n)}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,...g(e)});function U(s){if(s instanceof w){const e={};for(const t in s.shape){const r=s.shape[t];e[t]=j.create(U(r))}return new w({...s._def,shape:()=>e})}else return s instanceof N?new N({...s._def,type:U(s.element)}):s instanceof j?j.create(U(s.unwrap())):s instanceof D?D.create(U(s.unwrap())):s instanceof z?z.create(s.items.map(e=>U(e))):s}class w extends y{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:a}=this._processInputParams(e),{shape:n,keys:i}=this._getCached(),o=[];if(!(this._def.catchall instanceof P&&this._def.unknownKeys==="strip"))for(const p in a.data)i.includes(p)||o.push(p);const f=[];for(const p of i){const x=n[p],W=a.data[p];f.push({key:{status:"valid",value:p},value:x._parse(new E(a,W,a.path,p)),alwaysSet:p in a.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:a.data[x]}});else if(p==="strict")o.length>0&&(c(a,{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 W=a.data[x];f.push({key:{status:"valid",value:x},value:p._parse(new E(a,W,a.path,x)),alwaysSet:x in a.data})}}return a.common.async?Promise.resolve().then(async()=>{const p=[];for(const x of f){const W=await x.key,qe=await x.value;p.push({key:W,value:qe,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 n,i;const a=((i=(n=this._def).errorMap)==null?void 0:i.call(n,t,r).message)??r.defaultError;return t.code==="unrecognized_keys"?{message:h.errToObj(e).message??a}:{message:a}}}:{}})}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 U(this)}partial(e){const t={};for(const r of v.objectKeys(this.shape)){const a=this.shape[r];e&&!e[r]?t[r]=a:t[r]=a.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 n=this.shape[r];for(;n instanceof j;)n=n._def.innerType;t[r]=n}return new w({...this._def,shape:()=>t})}keyof(){return Me(v.objectKeys(this.shape))}}w.create=(s,e)=>new w({shape:()=>s,unknownKeys:"strip",catchall:P.create(),typeName:_.ZodObject,...g(e)});w.strictCreate=(s,e)=>new w({shape:()=>s,unknownKeys:"strict",catchall:P.create(),typeName:_.ZodObject,...g(e)});w.lazycreate=(s,e)=>new w({shape:s,unknownKeys:"strip",catchall:P.create(),typeName:_.ZodObject,...g(e)});class ee extends y{_parse(e){const{ctx:t}=this._processInputParams(e),r=this._def.options;function a(n){for(const o of n)if(o.result.status==="valid")return o.result;for(const o of n)if(o.result.status==="dirty")return t.common.issues.push(...o.ctx.common.issues),o.result;const i=n.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 n=>{const i={...t,common:{...t.common,issues:[]},parent:null};return{result:await n._parseAsync({data:t.data,path:t.path,parent:i}),ctx:i}})).then(a);{let n;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"&&!n&&(n={result:x,ctx:p}),p.common.issues.length&&i.push(p.common.issues)}if(n)return t.common.issues.push(...n.ctx.common.issues),n.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}}ee.create=(s,e)=>new ee({options:s,typeName:_.ZodUnion,...g(e)});const Z=s=>s instanceof ge?Z(s.schema):s instanceof L?Z(s.innerType()):s instanceof re?[s.value]:s instanceof V?s.options:s instanceof ye?v.objectValues(s.enum):s instanceof ne?Z(s._def.innerType):s instanceof fe?[void 0]:s instanceof pe?[null]:s instanceof j?[void 0,...Z(s.unwrap())]:s instanceof D?[null,...Z(s.unwrap())]:s instanceof ze||s instanceof oe?Z(s.unwrap()):s instanceof ie?Z(s._def.innerType):[];class ke extends y{_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,a=t.data[r],n=this.optionsMap.get(a);return n?t.common.async?n._parseAsync({data:t.data,path:t.path,parent:t}):n._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 a=new Map;for(const n of t){const i=Z(n.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(a.has(o))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(o)}`);a.set(o,n)}}return new ke({typeName:_.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:a,...g(r)})}}function _e(s,e){const t=$(s),r=$(e);if(s===e)return{valid:!0,data:s};if(t===u.object&&r===u.object){const a=v.objectKeys(e),n=v.objectKeys(s).filter(o=>a.indexOf(o)!==-1),i={...s,...e};for(const o of n){const f=_e(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 a=[];for(let n=0;n{if(Ce(n)||Ce(i))return m;const o=_e(n.value,i.value);return o.valid?((Oe(n)||Oe(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(([n,i])=>a(n,i)):a(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}te.create=(s,e,t)=>new te({left:s,right:e,typeName:_.ZodIntersection,...g(t)});class z extends y{_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 n=[...r.data].map((i,o)=>{const f=this._def.items[o]||this._def.rest;return f?f._parse(new E(r,i,r.path,o)):null}).filter(i=>!!i);return r.common.async?Promise.all(n).then(i=>C.mergeArray(t,i)):C.mergeArray(t,n)}get items(){return this._def.items}rest(e){return new z({...this._def,rest:e})}}z.create=(s,e)=>{if(!Array.isArray(s))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new z({items:s,typeName:_.ZodTuple,rest:null,...g(e)})};class se extends y{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 a=[],n=this._def.keyType,i=this._def.valueType;for(const o in r.data)a.push({key:n._parse(new E(r,o,r.path,o)),value:i._parse(new E(r,r.data[o],r.path,o)),alwaysSet:o in r.data});return r.common.async?C.mergeObjectAsync(t,a):C.mergeObjectSync(t,a)}get element(){return this._def.valueType}static create(e,t,r){return t instanceof y?new se({keyType:e,valueType:t,typeName:_.ZodRecord,...g(r)}):new se({keyType:R.create(),valueType:e,typeName:_.ZodRecord,...g(t)})}}class Re extends y{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 a=this._def.keyType,n=this._def.valueType,i=[...r.data.entries()].map(([o,f],p)=>({key:a._parse(new E(r,o,r.path,[p,"key"])),value:n._parse(new E(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}}}}Re.create=(s,e,t)=>new Re({valueType:e,keyType:s,typeName:_.ZodMap,...g(t)});class H extends y{_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 a=this._def;a.minSize!==null&&r.data.sizea.maxSize.value&&(c(r,{code:d.too_big,maximum:a.maxSize.value,type:"set",inclusive:!0,exact:!1,message:a.maxSize.message}),t.dirty());const n=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)=>n._parse(new E(r,f,r.path,p)));return r.common.async?Promise.all(o).then(f=>i(f)):i(o)}min(e,t){return new H({...this._def,minSize:{value:e,message:h.toString(t)}})}max(e,t){return new H({...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)}}H.create=(s,e)=>new H({valueType:s,minSize:null,maxSize:null,typeName:_.ZodSet,...g(e)});class ge extends y{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})}}ge.create=(s,e)=>new ge({getter:s,typeName:_.ZodLazy,...g(e)});class re extends y{_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}}re.create=(s,e)=>new re({value:s,typeName:_.ZodLiteral,...g(e)});function Me(s,e){return new V({values:s,typeName:_.ZodEnum,...g(e)})}class V extends y{_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=Me;class ye extends y{_parse(e){const t=v.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(e);if(r.parsedType!==u.string&&r.parsedType!==u.number){const a=v.objectValues(t);return c(r,{expected:v.joinValues(a),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 a=v.objectValues(t);return c(r,{received:r.data,code:d.invalid_enum_value,options:a}),m}return O(e.data)}get enum(){return this._def.values}}ye.create=(s,e)=>new ye({values:s,typeName:_.ZodNativeEnum,...g(e)});class ae extends y{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(a=>this._def.type.parseAsync(a,{path:t.path,errorMap:t.common.contextualErrorMap})))}}ae.create=(s,e)=>new ae({type:s,typeName:_.ZodPromise,...g(e)});class L extends y{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),a=this._def.effect||null,n={addIssue:i=>{c(r,i),i.fatal?t.abort():t.dirty()},get path(){return r.path}};if(n.addIssue=n.addIssue.bind(n),a.type==="preprocess"){const i=a.transform(r.data,n);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"?J(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"?J(o.value):o}}if(a.type==="refinement"){const i=o=>{const f=a.refinement(o,n);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(a.type==="transform")if(r.common.async===!1){const i=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!B(i))return m;const o=a.transform(i.value,n);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=>B(i)?Promise.resolve(a.transform(i.value,n)).then(o=>({status:t.value,value:o})):m);v.assertNever(a)}}L.create=(s,e,t)=>new L({schema:s,typeName:_.ZodEffects,effect:e,...g(t)});L.createWithPreprocess=(s,e,t)=>new L({schema:e,effect:{type:"preprocess",transform:s},typeName:_.ZodEffects,...g(t)});class j extends y{_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,...g(e)});class D extends y{_parse(e){return this._getType(e)===u.null?O(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}D.create=(s,e)=>new D({innerType:s,typeName:_.ZodNullable,...g(e)});class ne extends y{_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,...g(e)});class ie extends y{_parse(e){const{ctx:t}=this._processInputParams(e),r={...t,common:{...t.common,issues:[]}},a=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return X(a)?a.then(n=>({status:"valid",value:n.status==="valid"?n.value:this._def.catchValue({get error(){return new I(r.common.issues)},input:r.data})})):{status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new I(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}ie.create=(s,e)=>new ie({innerType:s,typeName:_.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...g(e)});class je extends y{_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}}}je.create=s=>new je({typeName:_.ZodNaN,...g(s)});class ze extends y{_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 be extends y{_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.common.async)return(async()=>{const n=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return n.status==="aborted"?m:n.status==="dirty"?(t.dirty(),J(n.value)):this._def.out._parseAsync({data:n.value,path:r.path,parent:r})})();{const a=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?m:a.status==="dirty"?(t.dirty(),{status:"dirty",value:a.value}):this._def.out._parseSync({data:a.value,path:r.path,parent:r})}}static create(e,t){return new be({in:e,out:t,typeName:_.ZodPipeline})}}class oe extends y{_parse(e){const t=this._def.innerType._parse(e),r=a=>(B(a)&&(a.value=Object.freeze(a.value)),a);return X(t)?t.then(a=>r(a)):r(t)}unwrap(){return this._def.innerType}}oe.create=(s,e)=>new oe({innerType:s,typeName:_.ZodReadonly,...g(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=q.create,de=he.create,gt=me.create;P.create;const T=N.create,k=w.create,Ve=ee.create,Le=ke.create;te.create;z.create;const De=se.create,Q=re.create,ve=V.create;ae.create;j.create;D.create;const A=De(gt()),we=k({id:b(),name:l(),slug:l().optional()}).passthrough(),ce=k({url:l(),is_official:de()}),xe=k({task_id:b(),dataset_id:b(),model_name:l().nullish(),harness:l().nullish(),methodology:l().nullish(),metrics:De(Ve([l(),b()])),uses_additional_data:de().optional(),is_open:de().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=xe.partial().extend({id:b().optional()}),vt=Le("op",[k({op:Q("create"),data:xe}),k({op:Q("update"),evaluation_id:b(),data:xe}),k({op:Q("delete"),evaluation_id:b()})]),Ie=k({hf_models:T(l()),hf_datasets:T(l()),hf_spaces:T(l())}),Te=k({file_name:l(),mime_type:l(),data_url:l().optional(),url:l().optional()}),F=k({name:l(),description:l().optional()}),xt=F.extend({image:Te.optional(),image_credit:l().optional(),parent_id:b().optional(),area_id:b().optional(),keywords:l().optional()}),kt=F.extend({image:Te.optional(),image_credit:l().optional(),source_paper_id:b().optional(),source_url:l().optional(),source_title:l().optional()}),bt=Ve([k({benchmark:l(),task:l(),description:l()}),F.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()})]),wt=F.extend({description:l(),direction:ve(["higher_is_better","lower_is_better"]),full_name:l().optional(),scale:l().optional(),task_id:b(),dataset_id:b()}),Tt=F.extend({short_name:l().optional(),venue:l().optional(),location:l().optional(),url:l(),year:b(),start_date:l().optional(),end_date:l().optional()}),St=F.extend({hf_slug:l().optional(),website_url:l().optional(),image:Te.optional()}),Ct=k({id:b(),paper_id:b().nullable(),hf_username:l(),hf_subject:l().nullish(),is_author:de(),status:ve(["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:ve(["human","codex","auto"]).nullish(),catalog_event_id:l().nullish(),review_evidence:A.nullish(),created_at:l(),updated_at:l(),reviewed_at:l().nullish()});function S(s,e,t){return Ct.extend({edit_type:Q(s),proposed_payload:e,current_payload:t.nullish()})}const Ot=S("tasks",k({task_ids:T(b())}),k({tasks:T(we)})),Nt=S("methods",k({method_ids:T(b())}),k({methods:T(we)})),At=S("evaluations",k({operations:T(vt)}),k({evaluations:T(yt)})),Et=S("repositories",k({repositories:T(ce)}),k({repositories:T(ce)})),Zt=S("project_pages",k({project_pages:T(ce)}),k({project_pages:T(ce)})),Rt=S("source_url",k({source_url:l()}),k({source_url:l().nullish()})),jt=S("hf_artifacts",Ie,Ie),It=S("x_threads",k({x_threads:T(l())}),k({x_threads:T(k({url:l()}))})),$t=S("organizations",k({organization_ids:T(b())}),k({organizations:T(we)})),Pt=S("new_task",xt,A),Mt=S("new_method",kt,A),zt=S("new_benchmark",bt,A),Vt=S("new_metric",wt,A),Lt=S("new_conference",Tt,A),Dt=S("new_organization",St,A),Ut=S("new_external_paper",k({title:l().optional(),source_url:l(),authors:T(l()),date_published:l().optional(),abstract:l().optional()}),A),Ue=Le("edit_type",[Ot,Nt,At,Et,Zt,Rt,jt,It,$t,Pt,Mt,zt,Vt,Lt,Dt,Ut]);function Yt(s,e,t){return{paper_id:s,edit_type:e,proposed_payload:t}}const M=(s,e)=>({directory:{title:s,subtitle:e}}),Ht={tasks:{label:"tasks",administrative:!1},methods:{label:"methods",administrative:!1},evaluations:{label:"evaluations",administrative:!1},repositories:{label:"repositories",administrative:!1},project_pages:{label:"project pages",administrative:!1},source_url:{label:"source url",administrative:!1},x_threads:{label:"x threads",administrative:!1},hf_artifacts:{label:"hf artifacts",administrative:!1},organizations:{label:"organizations",administrative:!1},new_task:{label:"new task",administrative:!0,...M("New task","Task suggestion")},new_method:{label:"new method",administrative:!0,...M("New method","Method suggestion")},new_benchmark:{label:"new benchmark",administrative:!0,...M("New benchmark","Benchmark suggestion")},new_metric:{label:"new metric",administrative:!0,...M("New metric","Metric suggestion")},new_conference:{label:"new conference",administrative:!0,...M("New conference","Conference suggestion")},new_organization:{label:"new organization",administrative:!1,...M("New organization","Organization suggestion")},new_external_paper:{label:"external paper",administrative:!1,...M("External paper","External paper submission")}},Bt=k({count:b(),results:T(Ue)});class qt extends Error{constructor(e){super(`Malformed pending-edit payload: ${e}`),this.name="PendingEditPayloadError"}}function Be(s,e){const t=s.safeParse(e);if(t.success)return t.data;const r=t.error.issues[0];throw new qt(`${(r==null?void 0:r.path.join("."))||"response"}: ${(r==null?void 0:r.message)||"invalid value"}`)}const G=s=>Be(Ue,s),Ft=s=>Be(Bt,s);class Wt{constructor(e){this.request=e}async submit(e){return G(await this.request("/me/paper-edits",{method:"POST",body:JSON.stringify(e)}))}list(e){const t=new URLSearchParams;for(const[a,n]of Object.entries(e??{}))n!==void 0&&t.set(a,String(n));const r=t.toString();return this.request(`/admin/paper-edits${r?`?${r}`:""}`).then(Ft)}revertAutoApproved(e,t={}){return this.request(`/admin/submitters/${encodeURIComponent(e)}/revert-auto-approved`,{method:"POST",body:JSON.stringify(t)})}async get(e){return G(await this.request(`/admin/paper-edits/${e}`))}async approve(e,t={}){return G(await this.request(`/admin/paper-edits/${e}/approve`,{method:"POST",body:JSON.stringify(t)}))}async reject(e,t={}){return G(await this.request(`/admin/paper-edits/${e}/reject`,{method:"POST",body:JSON.stringify(t)}))}}const Gt=new Wt(Fe);export{Ht as E,Yt as p,Gt as s}; diff --git a/assets/switch-B-_Aen3O.js b/assets/switch-B4eVY4fu.js similarity index 94% rename from assets/switch-B-_Aen3O.js rename to assets/switch-B4eVY4fu.js index 5867e8cb0868f08de2e37dd781c2fd3f09546eb0..dacb4854d06d01bd29de49a7bd6938ee1d211006 100644 --- a/assets/switch-B-_Aen3O.js +++ b/assets/switch-B4eVY4fu.js @@ -1 +1 @@ -import{f as s,D as C,B as T,j as a,z as y,E as M,F as H,G as z,I as x}from"./index-CTkdBAwI.js";import{u as A}from"./index-tW8cPsfP.js";var b="Switch",[U]=z(b),[q,D]=U(b),E=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),g=l?i||!!l.closest("form"):!0,[f,B]=T({prop:r,defaultProp:m??!1,onChange:v,caller:b});return a.jsxs(q,{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(I=>!I),g&&(k.current=h.isPropagationStopped(),k.current||h.stopPropagation())})}),g&&a.jsx(N,{control:l,bubbles:!k.current,name:n,value:u,checked:f,required:d,disabled:c,form:i,style:{transform:"translateX(-100%)"}})]})});E.displayName=b;var P="SwitchThumb",R=s.forwardRef((t,o)=>{const{__scopeSwitch:e,...n}=t,r=D(P,e);return a.jsx(y.span,{"data-state":j(r.checked),"data-disabled":r.disabled?"":void 0,...n,ref:o})});R.displayName=P;var F="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=F;function j(t){return t?"checked":"unchecked"}var _=E,L=R;const O=s.forwardRef(({className:t,...o},e)=>a.jsx(_,{className:x("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50",t),...o,ref:e,children:a.jsx(L,{className:x("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})}));O.displayName=_.displayName;export{O as S}; +import{f as s,D as C,B as T,j as a,z as y,E as M,F as H,G as z,I as x}from"./index-D2fBL-s6.js";import{u as A}from"./index-C_9KPu-E.js";var b="Switch",[U]=z(b),[q,D]=U(b),E=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),g=l?i||!!l.closest("form"):!0,[f,B]=T({prop:r,defaultProp:m??!1,onChange:v,caller:b});return a.jsxs(q,{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(I=>!I),g&&(k.current=h.isPropagationStopped(),k.current||h.stopPropagation())})}),g&&a.jsx(N,{control:l,bubbles:!k.current,name:n,value:u,checked:f,required:d,disabled:c,form:i,style:{transform:"translateX(-100%)"}})]})});E.displayName=b;var P="SwitchThumb",R=s.forwardRef((t,o)=>{const{__scopeSwitch:e,...n}=t,r=D(P,e);return a.jsx(y.span,{"data-state":j(r.checked),"data-disabled":r.disabled?"":void 0,...n,ref:o})});R.displayName=P;var F="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=F;function j(t){return t?"checked":"unchecked"}var _=E,L=R;const O=s.forwardRef(({className:t,...o},e)=>a.jsx(_,{className:x("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50",t),...o,ref:e,children:a.jsx(L,{className:x("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})}));O.displayName=_.displayName;export{O as S}; diff --git a/assets/textarea-DH3b7wpe.js b/assets/textarea-B8b7WxcV.js similarity index 86% rename from assets/textarea-DH3b7wpe.js rename to assets/textarea-B8b7WxcV.js index 2988f0d83f8aa47b8adbb85b5ac84c1b3713d81b..f225cacb0ae11482ea6086ede61529b28eb8b3e3 100644 --- a/assets/textarea-DH3b7wpe.js +++ b/assets/textarea-B8b7WxcV.js @@ -1 +1 @@ -import{f as s,j as a,I as t}from"./index-CTkdBAwI.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{f as s,j as a,I as t}from"./index-D2fBL-s6.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/thumbs-up-CYylDqig.js b/assets/thumbs-up-BnMguJ3s.js similarity index 90% rename from assets/thumbs-up-CYylDqig.js rename to assets/thumbs-up-BnMguJ3s.js index 5a4ea781ee991611d288b8cfb0233cfecaef4dbc..f6ff8aa7ad796f05db3b5c6b059e12b110a7f047 100644 --- a/assets/thumbs-up-CYylDqig.js +++ b/assets/thumbs-up-BnMguJ3s.js @@ -1,4 +1,4 @@ -import{c as a}from"./index-CTkdBAwI.js";/** +import{c as a}from"./index-D2fBL-s6.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/transform-CZL79kIa.js b/assets/transform-B_GaHMvk.js similarity index 99% rename from assets/transform-CZL79kIa.js rename to assets/transform-B_GaHMvk.js index 795075a9cd8dc86b4ae44f463f58942a7cee3f3b..cf2b7757d74ff557e6927e69bc84c1f99d4de69d 100644 --- a/assets/transform-CZL79kIa.js +++ b/assets/transform-B_GaHMvk.js @@ -1 +1 @@ -import{a3 as _}from"./index-CTkdBAwI.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 A=6048e5,z=864e5,I=6e4,R=36e5;let V={};function W(){return V}function v(t,e){var s,u,d,f;const n=W(),r=(e==null?void 0:e.weekStartsOn)??((u=(s=e==null?void 0:e.locale)==null?void 0:s.options)==null?void 0:u.weekStartsOn)??n.weekStartsOn??((f=(d=n.locale)==null?void 0:d.options)==null?void 0:f.weekStartsOn)??0,a=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 N(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:N({formats:at,defaultWidth:"full"}),time:N({formats:it,defaultWidth:"full"}),dateTime:N({formats:ot,defaultWidth:"full"})},ut={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},ct=(t,e,n,r)=>ut[t];function O(t){return(e,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let a;if(r==="formatting"&&t.formattingValues){const o=t.defaultFormattingWidth||t.defaultWidth,s=n!=null&&n.width?String(n.width):o;a=t.formattingValues[s]||t.formattingValues[o]}else{const o=t.defaultWidth,s=n!=null&&n.width?String(n.width):t.defaultWidth;a=t.values[s]||t.values[o]}const i=t.argumentCallback?t.argumentCallback(e):e;return a[i]}}const dt={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},lt={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},ft={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},ht={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},mt={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},gt={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},wt=(t,e)=>{const n=Number(t),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},yt={ordinalNumber:wt,era:O({values:dt,defaultWidth:"wide"}),quarter:O({values:lt,defaultWidth:"wide",argumentCallback:t=>t-1}),month:O({values:ft,defaultWidth:"wide"}),day:O({values:ht,defaultWidth:"wide"}),dayPeriod:O({values:mt,defaultWidth:"wide",formattingValues:gt,defaultFormattingWidth:"wide"})};function P(t){return(e,n={})=>{const r=n.width,a=r&&t.matchPatterns[r]||t.matchPatterns[t.defaultMatchWidth],i=e.match(a);if(!i)return null;const o=i[0],s=r&&t.parsePatterns[r]||t.parsePatterns[t.defaultParseWidth],u=Array.isArray(s)?Dt(s,g=>g.test(o)):bt(s,g=>g.test(o));let d;d=t.valueCallback?t.valueCallback(u):u,d=n.valueCallback?n.valueCallback(d):d;const f=e.slice(o.length);return{value:d,rest:f}}}function bt(t,e){for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&e(t[n]))return n}function Dt(t,e){for(let n=0;n{const r=e.match(t.matchPattern);if(!r)return null;const a=r[0],i=e.match(t.parsePattern);if(!i)return null;let o=t.valueCallback?t.valueCallback(i[0]):i[0];o=n.valueCallback?n.valueCallback(o):o;const s=e.slice(a.length);return{value:o,rest:s}}}const kt=/^(\d+)(th|st|nd|rd)?/i,Ot=/\d+/i,Pt={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},pt={any:[/^b/i,/^(a|c)/i]},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]},Nt={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Ct={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},_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:Nt,defaultMatchWidth:"any",parsePatterns:Ct,defaultParseWidth:"any"})},Ft={code:"en-US",formatDistance:rt,formatLong:st,formatRelative:ct,localize:yt,match:_t,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Et(t){const e=w(t);return J(e,et(e))+1}function qt(t){const e=w(t),n=+S(e)-+Z(e);return Math.round(n/A)+1}function Q(t,e){var f,g,l,k;const n=w(t),r=n.getFullYear(),a=W(),i=(e==null?void 0:e.firstWeekContainsDate)??((g=(f=e==null?void 0:e.locale)==null?void 0:f.options)==null?void 0:g.firstWeekContainsDate)??a.firstWeekContainsDate??((k=(l=a.locale)==null?void 0:l.options)==null?void 0:k.firstWeekContainsDate)??1,o=D(t,0);o.setFullYear(r+1,0,i),o.setHours(0,0,0,0);const s=v(o,e),u=D(t,0);u.setFullYear(r,0,i),u.setHours(0,0,0,0);const d=v(u,e);return n.getTime()>=s.getTime()?r+1:n.getTime()>=d.getTime()?r:r-1}function Ut(t,e){var s,u,d,f;const n=W(),r=(e==null?void 0:e.firstWeekContainsDate)??((u=(s=e==null?void 0:e.locale)==null?void 0:s.options)==null?void 0:u.firstWeekContainsDate)??n.firstWeekContainsDate??((f=(d=n.locale)==null?void 0:d.options)==null?void 0:f.firstWeekContainsDate)??1,a=Q(t,e),i=D(t,0);return i.setFullYear(a,0,r),i.setHours(0,0,0,0),v(i,e)}function Lt(t,e){const n=w(t),r=+v(n,e)-+Ut(n,e);return Math.round(r/A)+1}function c(t,e){const n=t<0?"-":"",r=Math.abs(t).toString().padStart(e,"0");return n+r}const y={y(t,e){const n=t.getFullYear(),r=n>0?n:1-n;return c(e==="yy"?r%100:r,e.length)},M(t,e){const n=t.getMonth();return e==="M"?String(n+1):c(n+1,2)},d(t,e){return c(t.getDate(),e.length)},a(t,e){const n=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(t,e){return c(t.getHours()%12||12,e.length)},H(t,e){return c(t.getHours(),e.length)},m(t,e){return c(t.getMinutes(),e.length)},s(t,e){return c(t.getSeconds(),e.length)},S(t,e){const n=e.length,r=t.getMilliseconds(),a=Math.trunc(r*Math.pow(10,n-3));return c(a,e.length)}},M={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},q={G:function(t,e,n){const r=t.getFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(t,e,n){if(e==="yo"){const r=t.getFullYear(),a=r>0?r:1-r;return n.ordinalNumber(a,{unit:"year"})}return y.y(t,e)},Y:function(t,e,n,r){const a=Q(t,r),i=a>0?a:1-a;if(e==="YY"){const o=i%100;return c(o,2)}return e==="Yo"?n.ordinalNumber(i,{unit:"year"}):c(i,e.length)},R:function(t,e){const n=j(t);return c(n,e.length)},u:function(t,e){const n=t.getFullYear();return c(n,e.length)},Q:function(t,e,n){const r=Math.ceil((t.getMonth()+1)/3);switch(e){case"Q":return String(r);case"QQ":return c(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(t,e,n){const r=Math.ceil((t.getMonth()+1)/3);switch(e){case"q":return String(r);case"qq":return c(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(t,e,n){const r=t.getMonth();switch(e){case"M":case"MM":return y.M(t,e);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(t,e,n){const r=t.getMonth();switch(e){case"L":return String(r+1);case"LL":return c(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(t,e,n,r){const a=Lt(t,r);return e==="wo"?n.ordinalNumber(a,{unit:"week"}):c(a,e.length)},I:function(t,e,n){const r=qt(t);return e==="Io"?n.ordinalNumber(r,{unit:"week"}):c(r,e.length)},d:function(t,e,n){return e==="do"?n.ordinalNumber(t.getDate(),{unit:"date"}):y.d(t,e)},D:function(t,e,n){const r=Et(t);return e==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):c(r,e.length)},E:function(t,e,n){const r=t.getDay();switch(e){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(t,e,n,r){const a=t.getDay(),i=(a-r.weekStartsOn+8)%7||7;switch(e){case"e":return String(i);case"ee":return c(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(a,{width:"short",context:"formatting"});case"eeee":default:return n.day(a,{width:"wide",context:"formatting"})}},c:function(t,e,n,r){const a=t.getDay(),i=(a-r.weekStartsOn+8)%7||7;switch(e){case"c":return String(i);case"cc":return c(i,e.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(a,{width:"narrow",context:"standalone"});case"cccccc":return n.day(a,{width:"short",context:"standalone"});case"cccc":default:return n.day(a,{width:"wide",context:"standalone"})}},i:function(t,e,n){const r=t.getDay(),a=r===0?7:r;switch(e){case"i":return String(a);case"ii":return c(a,e.length);case"io":return n.ordinalNumber(a,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(t,e,n){const a=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},b:function(t,e,n){const r=t.getHours();let a;switch(r===12?a=M.noon:r===0?a=M.midnight:a=r/12>=1?"pm":"am",e){case"b":case"bb":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(t,e,n){const r=t.getHours();let a;switch(r>=17?a=M.evening:r>=12?a=M.afternoon:r>=4?a=M.morning:a=M.night,e){case"B":case"BB":case"BBB":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(t,e,n){if(e==="ho"){let r=t.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return y.h(t,e)},H:function(t,e,n){return e==="Ho"?n.ordinalNumber(t.getHours(),{unit:"hour"}):y.H(t,e)},K:function(t,e,n){const r=t.getHours()%12;return e==="Ko"?n.ordinalNumber(r,{unit:"hour"}):c(r,e.length)},k:function(t,e,n){let r=t.getHours();return r===0&&(r=24),e==="ko"?n.ordinalNumber(r,{unit:"hour"}):c(r,e.length)},m:function(t,e,n){return e==="mo"?n.ordinalNumber(t.getMinutes(),{unit:"minute"}):y.m(t,e)},s:function(t,e,n){return e==="so"?n.ordinalNumber(t.getSeconds(),{unit:"second"}):y.s(t,e)},S:function(t,e){return y.S(t,e)},X:function(t,e,n){const r=t.getTimezoneOffset();if(r===0)return"Z";switch(e){case"X":return L(r);case"XXXX":case"XX":return b(r);case"XXXXX":case"XXX":default:return b(r,":")}},x:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"x":return L(r);case"xxxx":case"xx":return b(r);case"xxxxx":case"xxx":default:return b(r,":")}},O:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+U(r,":");case"OOOO":default:return"GMT"+b(r,":")}},z:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+U(r,":");case"zzzz":default:return"GMT"+b(r,":")}},t:function(t,e,n){const r=Math.trunc(t.getTime()/1e3);return c(r,e.length)},T:function(t,e,n){const r=t.getTime();return c(r,e.length)}};function U(t,e=""){const n=t>0?"-":"+",r=Math.abs(t),a=Math.trunc(r/60),i=r%60;return i===0?n+String(a):n+String(a)+e+c(i,2)}function L(t,e){return t%60===0?(t>0?"-":"+")+c(Math.abs(t)/60,2):b(t,e)}function b(t,e=""){const n=t>0?"-":"+",r=Math.abs(t),a=c(Math.trunc(r/60),2),i=c(r%60,2);return n+a+e+i}const H=(t,e)=>{switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});case"PPPP":default:return e.date({width:"full"})}},X=(t,e)=>{switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});case"pppp":default:return e.time({width:"full"})}},Ht=(t,e)=>{const n=t.match(/(P+)(p+)?/)||[],r=n[1],a=n[2];if(!a)return H(t,e);let i;switch(r){case"P":i=e.dateTime({width:"short"});break;case"PP":i=e.dateTime({width:"medium"});break;case"PPP":i=e.dateTime({width:"long"});break;case"PPPP":default:i=e.dateTime({width:"full"});break}return i.replace("{{date}}",H(r,e)).replace("{{time}}",X(a,e))},At={p:X,P:Ht},It=/^D+$/,Rt=/^Y+$/,jt=["D","DD","YY","YYYY"];function Qt(t){return It.test(t)}function Xt(t){return Rt.test(t)}function Bt(t,e,n){const r=Gt(t,e,n);if(console.warn(r),jt.includes(t))throw new RangeError(r)}function Gt(t,e,n){const r=t[0]==="Y"?"years":"days of the month";return`Use \`${t.toLowerCase()}\` instead of \`${t}\` (in \`${e}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const $t=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,zt=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Vt=/^'([^]*?)'?$/,Jt=/''/g,Zt=/[a-zA-Z]/;function Kt(t,e,n){var f,g,l,k;const r=W(),a=r.locale??Ft,i=r.firstWeekContainsDate??((g=(f=r.locale)==null?void 0:f.options)==null?void 0:g.firstWeekContainsDate)??1,o=r.weekStartsOn??((k=(l=r.locale)==null?void 0:l.options)==null?void 0:k.weekStartsOn)??0,s=w(t);if(!tt(s))throw new RangeError("Invalid time value");let u=e.match(zt).map(m=>{const h=m[0];if(h==="p"||h==="P"){const Y=At[h];return Y(m,a.formatLong)}return m}).join("").match($t).map(m=>{if(m==="''")return{isToken:!1,value:"'"};const h=m[0];if(h==="'")return{isToken:!1,value:te(m)};if(q[h])return{isToken:!0,value:m};if(h.match(Zt))throw new RangeError("Format string contains an unescaped latin alphabet character `"+h+"`");return{isToken:!1,value:m}});a.localize.preprocessor&&(u=a.localize.preprocessor(s,u));const d={firstWeekContainsDate:i,weekStartsOn:o,locale:a};return u.map(m=>{if(!m.isToken)return m.value;const h=m.value;(Xt(h)||Qt(h))&&Bt(h,e,String(t));const Y=q[h[0]];return Y(s,h,a.localize,d)}).join("")}function te(t){const e=t.match(Vt);return e?e[1].replace(Jt,"'"):t}function B(t,e){const r=ae(t);let a;if(r.date){const u=ie(r.date,2);a=oe(u.restDateString,u.year)}if(!a||isNaN(a.getTime()))return new Date(NaN);const i=a.getTime();let o=0,s;if(r.time&&(o=se(r.time),isNaN(o)))return new Date(NaN);if(r.timezone){if(s=ue(r.timezone),isNaN(s))return new Date(NaN)}else{const u=new Date(i+o),d=new Date(0);return d.setFullYear(u.getUTCFullYear(),u.getUTCMonth(),u.getUTCDate()),d.setHours(u.getUTCHours(),u.getUTCMinutes(),u.getUTCSeconds(),u.getUTCMilliseconds()),d}return new Date(i+o+s)}const 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 d=new Date(0);return!le(e,i,o)||!fe(e,a)?new Date(NaN):(d.setUTCFullYear(e,i,Math.max(a,o)),d)}}function p(t){return t?parseInt(t):1}function se(t){const e=t.match(ne);if(!e)return NaN;const n=C(e[1]),r=C(e[2]),a=C(e[3]);return me(n,r,a)?n*R+r*I+a*1e3:NaN}function C(t){return t&&parseFloat(t.replace(",","."))||0}function ue(t){if(t==="Z")return 0;const e=t.match(re);if(!e)return 0;const n=e[1]==="+"?-1:1,r=parseInt(e[2]),a=e[3]&&parseInt(e[3])||0;return ge(r,a)?n*(r*R+a*I):NaN}function ce(t,e,n){const r=new Date(0);r.setUTCFullYear(t,0,4);const a=r.getUTCDay()||7,i=(e-1)*7+n+1-a;return r.setUTCDate(r.getUTCDate()+i),r}const de=[31,null,31,30,31,30,31,31,30,31,30,31];function G(t){return t%400===0||t%4===0&&t%100!==0}function le(t,e,n){return e>=0&&e<=11&&n>=1&&n<=(de[e]||(G(t)?29:28))}function fe(t,e){return e>=1&&e<=(G(t)?366:365)}function he(t,e,n){return e>=1&&e<=53&&n>=0&&n<=6}function me(t,e,n){return t===24?e===0&&n===0:n>=0&&n<60&&e>=0&&e<60&&t>=0&&t<25}function ge(t,e){return e>=0&&e<=59}const we={model:"models",dataset:"datasets",space:"spaces"};function ye(t){const e=t.hf_artifact_summary;return!e||!e.best_kind||!e.best_url||e.best_count<=0?{hfKind:null,hfCount:0,hfUrl:null}:{hfKind:we[e.best_kind]??null,hfCount:e.best_count,hfUrl:e.best_url}}function be(t){if(!t||t.length===0)return{github:null,githubUrl:null,velocity24h:null};const e=t.filter(a=>a.is_official),r=[...e.length>0?e:t].sort((a,i)=>(i.num_stars||0)-(a.num_stars||0))[0];return{github:r&&r.num_stars>0?r.num_stars:null,githubUrl:(r==null?void 0:r.url)||null,velocity24h:(r==null?void 0:r.trending_score)??null}}function De(t){if(!t)return null;try{const e=typeof t=="string"?B(t):t;return Kt(e,"MMM d, yyyy")}catch{return null}}function Me(t){if(!t)return null;try{return B(t).getFullYear()}catch{return null}}function ke(t){return(t||[]).filter(e=>e.best_rank>=1&&e.best_rank<=3).map(e=>{let n=null;if(e.dataset_slug){const r=new URLSearchParams;e.task_slug&&r.set("task",e.task_slug),r.set("eval",e.evaluation_id),n=`/benchmark/${e.dataset_slug}?${r}`}return{name:e.dataset_name,href:n,rank:e.best_rank}})}function ve(t){var f,g;const{github:e,githubUrl:n,velocity24h:r}=be(t.repositories),{hfKind:a,hfCount:i,hfUrl:o}=ye(t),s=(t.tasks||[]).map(l=>l.slug||"").filter(Boolean),u=(t.methods||[]).map(l=>({id:l.id,name:l.name,slug:l.slug})),d=ke(t.leaderboard_ranks);return{id:t.arxiv_id||t.id,dbId:t.id,title:t.title,abstract:t.abstract||"",authors:t.authors||[],authorIds:(t.author_links||[]).map(l=>l.id??null),authorHfProfiles:(t.author_links||[]).map(l=>l.hf_username?{username:l.hf_username,avatarUrl:l.hf_avatar_url??null}:null),tags:s,methods:u,organizations:(t.organizations||[]).map(l=>({name:l.name,slug:l.slug,logoUrl:_(l.logo_url)||null})),citations:t.citation_count||0,github:e,githubUrl:n,project:((g=(f=t.project_pages)==null?void 0:f[0])==null?void 0:g.url)||null,date:De(t.published),publishedIso:t.published||null,year:Me(t.published),thumbnailUrl:_(t.thumbnail_url)||null,tldr:t.tldr||null,version:t.version||"v1",velocity24h:r,hfKind:a,hfCount:i,hfUrl:o,sotaRanks:d}}function Oe(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 xe(t,e){const n=t||Oe(e||""),r=$.get((e==null?void 0:e.toLowerCase())||Pe(n));if(r)return r;const a=e==null?void 0:e.toUpperCase(),i=n.toUpperCase();return/^[A-Z0-9][A-Z0-9-]{1,}$/.test(n)||a&&T.has(a)||T.has(i)?i:n.replace(/\b[A-Za-z0-9]+\b/g,s=>/^[A-Z0-9]{2,}$/.test(s)||T.has(s.toUpperCase())?s.toUpperCase():s.charAt(0).toUpperCase()+s.slice(1).toLowerCase())}function Pe(t){return t.trim().toLowerCase().replace(/[\s_]+/g,"-")}export{ke as a,xe as d,Oe as h,be as s,ve as t}; +import{a3 as _}from"./index-D2fBL-s6.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 A=6048e5,z=864e5,I=6e4,R=36e5;let V={};function W(){return V}function v(t,e){var s,u,d,f;const n=W(),r=(e==null?void 0:e.weekStartsOn)??((u=(s=e==null?void 0:e.locale)==null?void 0:s.options)==null?void 0:u.weekStartsOn)??n.weekStartsOn??((f=(d=n.locale)==null?void 0:d.options)==null?void 0:f.weekStartsOn)??0,a=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 N(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:N({formats:at,defaultWidth:"full"}),time:N({formats:it,defaultWidth:"full"}),dateTime:N({formats:ot,defaultWidth:"full"})},ut={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},ct=(t,e,n,r)=>ut[t];function O(t){return(e,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let a;if(r==="formatting"&&t.formattingValues){const o=t.defaultFormattingWidth||t.defaultWidth,s=n!=null&&n.width?String(n.width):o;a=t.formattingValues[s]||t.formattingValues[o]}else{const o=t.defaultWidth,s=n!=null&&n.width?String(n.width):t.defaultWidth;a=t.values[s]||t.values[o]}const i=t.argumentCallback?t.argumentCallback(e):e;return a[i]}}const dt={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},lt={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},ft={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},ht={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},mt={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},gt={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},wt=(t,e)=>{const n=Number(t),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},yt={ordinalNumber:wt,era:O({values:dt,defaultWidth:"wide"}),quarter:O({values:lt,defaultWidth:"wide",argumentCallback:t=>t-1}),month:O({values:ft,defaultWidth:"wide"}),day:O({values:ht,defaultWidth:"wide"}),dayPeriod:O({values:mt,defaultWidth:"wide",formattingValues:gt,defaultFormattingWidth:"wide"})};function P(t){return(e,n={})=>{const r=n.width,a=r&&t.matchPatterns[r]||t.matchPatterns[t.defaultMatchWidth],i=e.match(a);if(!i)return null;const o=i[0],s=r&&t.parsePatterns[r]||t.parsePatterns[t.defaultParseWidth],u=Array.isArray(s)?Dt(s,g=>g.test(o)):bt(s,g=>g.test(o));let d;d=t.valueCallback?t.valueCallback(u):u,d=n.valueCallback?n.valueCallback(d):d;const f=e.slice(o.length);return{value:d,rest:f}}}function bt(t,e){for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&e(t[n]))return n}function Dt(t,e){for(let n=0;n{const r=e.match(t.matchPattern);if(!r)return null;const a=r[0],i=e.match(t.parsePattern);if(!i)return null;let o=t.valueCallback?t.valueCallback(i[0]):i[0];o=n.valueCallback?n.valueCallback(o):o;const s=e.slice(a.length);return{value:o,rest:s}}}const kt=/^(\d+)(th|st|nd|rd)?/i,Ot=/\d+/i,Pt={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},pt={any:[/^b/i,/^(a|c)/i]},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]},Nt={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Ct={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},_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:Nt,defaultMatchWidth:"any",parsePatterns:Ct,defaultParseWidth:"any"})},Ft={code:"en-US",formatDistance:rt,formatLong:st,formatRelative:ct,localize:yt,match:_t,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Et(t){const e=w(t);return J(e,et(e))+1}function qt(t){const e=w(t),n=+S(e)-+Z(e);return Math.round(n/A)+1}function Q(t,e){var f,g,l,k;const n=w(t),r=n.getFullYear(),a=W(),i=(e==null?void 0:e.firstWeekContainsDate)??((g=(f=e==null?void 0:e.locale)==null?void 0:f.options)==null?void 0:g.firstWeekContainsDate)??a.firstWeekContainsDate??((k=(l=a.locale)==null?void 0:l.options)==null?void 0:k.firstWeekContainsDate)??1,o=D(t,0);o.setFullYear(r+1,0,i),o.setHours(0,0,0,0);const s=v(o,e),u=D(t,0);u.setFullYear(r,0,i),u.setHours(0,0,0,0);const d=v(u,e);return n.getTime()>=s.getTime()?r+1:n.getTime()>=d.getTime()?r:r-1}function Ut(t,e){var s,u,d,f;const n=W(),r=(e==null?void 0:e.firstWeekContainsDate)??((u=(s=e==null?void 0:e.locale)==null?void 0:s.options)==null?void 0:u.firstWeekContainsDate)??n.firstWeekContainsDate??((f=(d=n.locale)==null?void 0:d.options)==null?void 0:f.firstWeekContainsDate)??1,a=Q(t,e),i=D(t,0);return i.setFullYear(a,0,r),i.setHours(0,0,0,0),v(i,e)}function Lt(t,e){const n=w(t),r=+v(n,e)-+Ut(n,e);return Math.round(r/A)+1}function c(t,e){const n=t<0?"-":"",r=Math.abs(t).toString().padStart(e,"0");return n+r}const y={y(t,e){const n=t.getFullYear(),r=n>0?n:1-n;return c(e==="yy"?r%100:r,e.length)},M(t,e){const n=t.getMonth();return e==="M"?String(n+1):c(n+1,2)},d(t,e){return c(t.getDate(),e.length)},a(t,e){const n=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(t,e){return c(t.getHours()%12||12,e.length)},H(t,e){return c(t.getHours(),e.length)},m(t,e){return c(t.getMinutes(),e.length)},s(t,e){return c(t.getSeconds(),e.length)},S(t,e){const n=e.length,r=t.getMilliseconds(),a=Math.trunc(r*Math.pow(10,n-3));return c(a,e.length)}},M={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},q={G:function(t,e,n){const r=t.getFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(t,e,n){if(e==="yo"){const r=t.getFullYear(),a=r>0?r:1-r;return n.ordinalNumber(a,{unit:"year"})}return y.y(t,e)},Y:function(t,e,n,r){const a=Q(t,r),i=a>0?a:1-a;if(e==="YY"){const o=i%100;return c(o,2)}return e==="Yo"?n.ordinalNumber(i,{unit:"year"}):c(i,e.length)},R:function(t,e){const n=j(t);return c(n,e.length)},u:function(t,e){const n=t.getFullYear();return c(n,e.length)},Q:function(t,e,n){const r=Math.ceil((t.getMonth()+1)/3);switch(e){case"Q":return String(r);case"QQ":return c(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(t,e,n){const r=Math.ceil((t.getMonth()+1)/3);switch(e){case"q":return String(r);case"qq":return c(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(t,e,n){const r=t.getMonth();switch(e){case"M":case"MM":return y.M(t,e);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(t,e,n){const r=t.getMonth();switch(e){case"L":return String(r+1);case"LL":return c(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(t,e,n,r){const a=Lt(t,r);return e==="wo"?n.ordinalNumber(a,{unit:"week"}):c(a,e.length)},I:function(t,e,n){const r=qt(t);return e==="Io"?n.ordinalNumber(r,{unit:"week"}):c(r,e.length)},d:function(t,e,n){return e==="do"?n.ordinalNumber(t.getDate(),{unit:"date"}):y.d(t,e)},D:function(t,e,n){const r=Et(t);return e==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):c(r,e.length)},E:function(t,e,n){const r=t.getDay();switch(e){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(t,e,n,r){const a=t.getDay(),i=(a-r.weekStartsOn+8)%7||7;switch(e){case"e":return String(i);case"ee":return c(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(a,{width:"short",context:"formatting"});case"eeee":default:return n.day(a,{width:"wide",context:"formatting"})}},c:function(t,e,n,r){const a=t.getDay(),i=(a-r.weekStartsOn+8)%7||7;switch(e){case"c":return String(i);case"cc":return c(i,e.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(a,{width:"narrow",context:"standalone"});case"cccccc":return n.day(a,{width:"short",context:"standalone"});case"cccc":default:return n.day(a,{width:"wide",context:"standalone"})}},i:function(t,e,n){const r=t.getDay(),a=r===0?7:r;switch(e){case"i":return String(a);case"ii":return c(a,e.length);case"io":return n.ordinalNumber(a,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(t,e,n){const a=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},b:function(t,e,n){const r=t.getHours();let a;switch(r===12?a=M.noon:r===0?a=M.midnight:a=r/12>=1?"pm":"am",e){case"b":case"bb":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(t,e,n){const r=t.getHours();let a;switch(r>=17?a=M.evening:r>=12?a=M.afternoon:r>=4?a=M.morning:a=M.night,e){case"B":case"BB":case"BBB":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(t,e,n){if(e==="ho"){let r=t.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return y.h(t,e)},H:function(t,e,n){return e==="Ho"?n.ordinalNumber(t.getHours(),{unit:"hour"}):y.H(t,e)},K:function(t,e,n){const r=t.getHours()%12;return e==="Ko"?n.ordinalNumber(r,{unit:"hour"}):c(r,e.length)},k:function(t,e,n){let r=t.getHours();return r===0&&(r=24),e==="ko"?n.ordinalNumber(r,{unit:"hour"}):c(r,e.length)},m:function(t,e,n){return e==="mo"?n.ordinalNumber(t.getMinutes(),{unit:"minute"}):y.m(t,e)},s:function(t,e,n){return e==="so"?n.ordinalNumber(t.getSeconds(),{unit:"second"}):y.s(t,e)},S:function(t,e){return y.S(t,e)},X:function(t,e,n){const r=t.getTimezoneOffset();if(r===0)return"Z";switch(e){case"X":return L(r);case"XXXX":case"XX":return b(r);case"XXXXX":case"XXX":default:return b(r,":")}},x:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"x":return L(r);case"xxxx":case"xx":return b(r);case"xxxxx":case"xxx":default:return b(r,":")}},O:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+U(r,":");case"OOOO":default:return"GMT"+b(r,":")}},z:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+U(r,":");case"zzzz":default:return"GMT"+b(r,":")}},t:function(t,e,n){const r=Math.trunc(t.getTime()/1e3);return c(r,e.length)},T:function(t,e,n){const r=t.getTime();return c(r,e.length)}};function U(t,e=""){const n=t>0?"-":"+",r=Math.abs(t),a=Math.trunc(r/60),i=r%60;return i===0?n+String(a):n+String(a)+e+c(i,2)}function L(t,e){return t%60===0?(t>0?"-":"+")+c(Math.abs(t)/60,2):b(t,e)}function b(t,e=""){const n=t>0?"-":"+",r=Math.abs(t),a=c(Math.trunc(r/60),2),i=c(r%60,2);return n+a+e+i}const H=(t,e)=>{switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});case"PPPP":default:return e.date({width:"full"})}},X=(t,e)=>{switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});case"pppp":default:return e.time({width:"full"})}},Ht=(t,e)=>{const n=t.match(/(P+)(p+)?/)||[],r=n[1],a=n[2];if(!a)return H(t,e);let i;switch(r){case"P":i=e.dateTime({width:"short"});break;case"PP":i=e.dateTime({width:"medium"});break;case"PPP":i=e.dateTime({width:"long"});break;case"PPPP":default:i=e.dateTime({width:"full"});break}return i.replace("{{date}}",H(r,e)).replace("{{time}}",X(a,e))},At={p:X,P:Ht},It=/^D+$/,Rt=/^Y+$/,jt=["D","DD","YY","YYYY"];function Qt(t){return It.test(t)}function Xt(t){return Rt.test(t)}function Bt(t,e,n){const r=Gt(t,e,n);if(console.warn(r),jt.includes(t))throw new RangeError(r)}function Gt(t,e,n){const r=t[0]==="Y"?"years":"days of the month";return`Use \`${t.toLowerCase()}\` instead of \`${t}\` (in \`${e}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const $t=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,zt=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Vt=/^'([^]*?)'?$/,Jt=/''/g,Zt=/[a-zA-Z]/;function Kt(t,e,n){var f,g,l,k;const r=W(),a=r.locale??Ft,i=r.firstWeekContainsDate??((g=(f=r.locale)==null?void 0:f.options)==null?void 0:g.firstWeekContainsDate)??1,o=r.weekStartsOn??((k=(l=r.locale)==null?void 0:l.options)==null?void 0:k.weekStartsOn)??0,s=w(t);if(!tt(s))throw new RangeError("Invalid time value");let u=e.match(zt).map(m=>{const h=m[0];if(h==="p"||h==="P"){const Y=At[h];return Y(m,a.formatLong)}return m}).join("").match($t).map(m=>{if(m==="''")return{isToken:!1,value:"'"};const h=m[0];if(h==="'")return{isToken:!1,value:te(m)};if(q[h])return{isToken:!0,value:m};if(h.match(Zt))throw new RangeError("Format string contains an unescaped latin alphabet character `"+h+"`");return{isToken:!1,value:m}});a.localize.preprocessor&&(u=a.localize.preprocessor(s,u));const d={firstWeekContainsDate:i,weekStartsOn:o,locale:a};return u.map(m=>{if(!m.isToken)return m.value;const h=m.value;(Xt(h)||Qt(h))&&Bt(h,e,String(t));const Y=q[h[0]];return Y(s,h,a.localize,d)}).join("")}function te(t){const e=t.match(Vt);return e?e[1].replace(Jt,"'"):t}function B(t,e){const r=ae(t);let a;if(r.date){const u=ie(r.date,2);a=oe(u.restDateString,u.year)}if(!a||isNaN(a.getTime()))return new Date(NaN);const i=a.getTime();let o=0,s;if(r.time&&(o=se(r.time),isNaN(o)))return new Date(NaN);if(r.timezone){if(s=ue(r.timezone),isNaN(s))return new Date(NaN)}else{const u=new Date(i+o),d=new Date(0);return d.setFullYear(u.getUTCFullYear(),u.getUTCMonth(),u.getUTCDate()),d.setHours(u.getUTCHours(),u.getUTCMinutes(),u.getUTCSeconds(),u.getUTCMilliseconds()),d}return new Date(i+o+s)}const 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 d=new Date(0);return!le(e,i,o)||!fe(e,a)?new Date(NaN):(d.setUTCFullYear(e,i,Math.max(a,o)),d)}}function p(t){return t?parseInt(t):1}function se(t){const e=t.match(ne);if(!e)return NaN;const n=C(e[1]),r=C(e[2]),a=C(e[3]);return me(n,r,a)?n*R+r*I+a*1e3:NaN}function C(t){return t&&parseFloat(t.replace(",","."))||0}function ue(t){if(t==="Z")return 0;const e=t.match(re);if(!e)return 0;const n=e[1]==="+"?-1:1,r=parseInt(e[2]),a=e[3]&&parseInt(e[3])||0;return ge(r,a)?n*(r*R+a*I):NaN}function ce(t,e,n){const r=new Date(0);r.setUTCFullYear(t,0,4);const a=r.getUTCDay()||7,i=(e-1)*7+n+1-a;return r.setUTCDate(r.getUTCDate()+i),r}const de=[31,null,31,30,31,30,31,31,30,31,30,31];function G(t){return t%400===0||t%4===0&&t%100!==0}function le(t,e,n){return e>=0&&e<=11&&n>=1&&n<=(de[e]||(G(t)?29:28))}function fe(t,e){return e>=1&&e<=(G(t)?366:365)}function he(t,e,n){return e>=1&&e<=53&&n>=0&&n<=6}function me(t,e,n){return t===24?e===0&&n===0:n>=0&&n<60&&e>=0&&e<60&&t>=0&&t<25}function ge(t,e){return e>=0&&e<=59}const we={model:"models",dataset:"datasets",space:"spaces"};function ye(t){const e=t.hf_artifact_summary;return!e||!e.best_kind||!e.best_url||e.best_count<=0?{hfKind:null,hfCount:0,hfUrl:null}:{hfKind:we[e.best_kind]??null,hfCount:e.best_count,hfUrl:e.best_url}}function be(t){if(!t||t.length===0)return{github:null,githubUrl:null,velocity24h:null};const e=t.filter(a=>a.is_official),r=[...e.length>0?e:t].sort((a,i)=>(i.num_stars||0)-(a.num_stars||0))[0];return{github:r&&r.num_stars>0?r.num_stars:null,githubUrl:(r==null?void 0:r.url)||null,velocity24h:(r==null?void 0:r.trending_score)??null}}function De(t){if(!t)return null;try{const e=typeof t=="string"?B(t):t;return Kt(e,"MMM d, yyyy")}catch{return null}}function Me(t){if(!t)return null;try{return B(t).getFullYear()}catch{return null}}function ke(t){return(t||[]).filter(e=>e.best_rank>=1&&e.best_rank<=3).map(e=>{let n=null;if(e.dataset_slug){const r=new URLSearchParams;e.task_slug&&r.set("task",e.task_slug),r.set("eval",e.evaluation_id),n=`/benchmark/${e.dataset_slug}?${r}`}return{name:e.dataset_name,href:n,rank:e.best_rank}})}function ve(t){var f,g;const{github:e,githubUrl:n,velocity24h:r}=be(t.repositories),{hfKind:a,hfCount:i,hfUrl:o}=ye(t),s=(t.tasks||[]).map(l=>l.slug||"").filter(Boolean),u=(t.methods||[]).map(l=>({id:l.id,name:l.name,slug:l.slug})),d=ke(t.leaderboard_ranks);return{id:t.arxiv_id||t.id,dbId:t.id,title:t.title,abstract:t.abstract||"",authors:t.authors||[],authorIds:(t.author_links||[]).map(l=>l.id??null),authorHfProfiles:(t.author_links||[]).map(l=>l.hf_username?{username:l.hf_username,avatarUrl:l.hf_avatar_url??null}:null),tags:s,methods:u,organizations:(t.organizations||[]).map(l=>({name:l.name,slug:l.slug,logoUrl:_(l.logo_url)||null})),citations:t.citation_count||0,github:e,githubUrl:n,project:((g=(f=t.project_pages)==null?void 0:f[0])==null?void 0:g.url)||null,date:De(t.published),publishedIso:t.published||null,year:Me(t.published),thumbnailUrl:_(t.thumbnail_url)||null,tldr:t.tldr||null,version:t.version||"v1",velocity24h:r,hfKind:a,hfCount:i,hfUrl:o,sotaRanks:d}}function Oe(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 xe(t,e){const n=t||Oe(e||""),r=$.get((e==null?void 0:e.toLowerCase())||Pe(n));if(r)return r;const a=e==null?void 0:e.toUpperCase(),i=n.toUpperCase();return/^[A-Z0-9][A-Z0-9-]{1,}$/.test(n)||a&&T.has(a)||T.has(i)?i:n.replace(/\b[A-Za-z0-9]+\b/g,s=>/^[A-Z0-9]{2,}$/.test(s)||T.has(s.toUpperCase())?s.toUpperCase():s.charAt(0).toUpperCase()+s.slice(1).toLowerCase())}function Pe(t){return t.trim().toLowerCase().replace(/[\s_]+/g,"-")}export{ke as a,xe as d,Oe as h,be as s,ve as t}; diff --git a/assets/trending-up-DegPKMd3.js b/assets/trending-up-DFLWFJuY.js similarity index 88% rename from assets/trending-up-DegPKMd3.js rename to assets/trending-up-DFLWFJuY.js index a34a89dea950c97dddacdb30feeb3e06d633d358..896367ef4ef4a1fa83e95bb01e44b2e9a5fee1aa 100644 --- a/assets/trending-up-DegPKMd3.js +++ b/assets/trending-up-DFLWFJuY.js @@ -1,4 +1,4 @@ -import{c as e}from"./index-CTkdBAwI.js";/** +import{c as e}from"./index-D2fBL-s6.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/triangle-alert-CNTNZVPh.js b/assets/triangle-alert-VQM9i8wl.js similarity index 94% rename from assets/triangle-alert-CNTNZVPh.js rename to assets/triangle-alert-VQM9i8wl.js index 2617bcb23dae50d029223fcee0f29c26a3cc4c17..c2e8854e2e71678e5f8090b20f0c769f4c6f9a80 100644 --- a/assets/triangle-alert-CNTNZVPh.js +++ b/assets/triangle-alert-VQM9i8wl.js @@ -1,4 +1,4 @@ -import{c as e}from"./index-CTkdBAwI.js";/** +import{c as e}from"./index-D2fBL-s6.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/trophy-d-G-L_yg.js b/assets/trophy-DbAb1jY1.js similarity index 93% rename from assets/trophy-d-G-L_yg.js rename to assets/trophy-DbAb1jY1.js index e15a6bb92aa07a6f730f2deefef8248e3e5e6ab6..cff8c8ddd2a82e0218dcd68873658c9114aaa9ea 100644 --- a/assets/trophy-d-G-L_yg.js +++ b/assets/trophy-DbAb1jY1.js @@ -1,4 +1,4 @@ -import{c as a}from"./index-CTkdBAwI.js";/** +import{c as a}from"./index-D2fBL-s6.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/useDebounce-DwTufs8H.js b/assets/useDebounce-BLmmIPYP.js similarity index 66% rename from assets/useDebounce-DwTufs8H.js rename to assets/useDebounce-BLmmIPYP.js index f76253f51edbcd1b24b023c64329cf8200400b54..d76ffd899af53b6c5a7489ad444a654c3fb2ecb0 100644 --- a/assets/useDebounce-DwTufs8H.js +++ b/assets/useDebounce-BLmmIPYP.js @@ -1 +1 @@ -import{f as o}from"./index-CTkdBAwI.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{f as o}from"./index-D2fBL-s6.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/useDocumentTitle-WlHj7EYH.js b/assets/useDocumentTitle-ibepJVy2.js similarity index 96% rename from assets/useDocumentTitle-WlHj7EYH.js rename to assets/useDocumentTitle-ibepJVy2.js index 26eb07a3251590cac3de28cfa8ff23965fe5cafc..adb9fd9ea6d6877547001bdae1707fa53caf064f 100644 --- a/assets/useDocumentTitle-WlHj7EYH.js +++ b/assets/useDocumentTitle-ibepJVy2.js @@ -1 +1 @@ -import{f as s}from"./index-CTkdBAwI.js";const E={a:"á",e:"é",i:"í",o:"ó",u:"ú",y:"ý",A:"Á",E:"É",I:"Í",O:"Ó",U:"Ú",Y:"Ý"},p={a:"à",e:"è",i:"ì",o:"ò",u:"ù",A:"À",E:"È",I:"Ì",O:"Ò",U:"Ù"},u={a:"â",e:"ê",i:"î",o:"ô",u:"û",A:"Â",E:"Ê",I:"Î",O:"Ô",U:"Û"},_={a:"ä",e:"ë",i:"ï",o:"ö",u:"ü",y:"ÿ",A:"Ä",E:"Ë",I:"Ï",O:"Ö",U:"Ü",Y:"Ÿ"},T={"'":E,"`":p,"^":u,'"':_,"~":{n:"ñ",N:"Ñ"}},i={ss:"ß",ae:"æ",AE:"Æ",oe:"œ",OE:"Œ",o:"ø",O:"Ø",l:"ł",L:"Ł"},m=[["varphi","φ"],["varepsilon","ε"],["vartheta","ϑ"],["Gamma","Γ"],["Delta","Δ"],["Theta","Θ"],["Lambda","Λ"],["Sigma","Σ"],["Omega","Ω"],["alpha","α"],["beta","β"],["gamma","γ"],["delta","δ"],["epsilon","ε"],["zeta","ζ"],["eta","η"],["theta","θ"],["kappa","κ"],["lambda","λ"],["mu","μ"],["nu","ν"],["xi","ξ"],["pi","π"],["rho","ρ"],["sigma","σ"],["tau","τ"],["phi","φ"],["chi","χ"],["psi","ψ"],["omega","ω"]],L=/\\(?:textbf|mathbf|emph|textit|textsl|texttt|color|textcolor)\{([^{}]*)\}/g,f=/\\(['"`^~])([A-Za-z])/g,C=/\\c\{([cCsS])\}/g,M=new RegExp(`\\\\(${Object.keys(i).join("|")})(?![A-Za-z])`,"g"),g=/\$\$([^$]+)\$\$/g,O=/\$([^$]+)\$/g,$=/\\([A-Za-z]+)/g;function o(e,t,a){return e.split(t).join(a)}function r(e){let t=e.trim();for(const[a,n]of m)t=o(t,`\\${a}`,n);return t=t.replace($,(a,n)=>n),o(t,"$","")}function h(e){let t=e.replace(g,(a,n)=>r(n));return t=t.replace(O,(a,n)=>r(n)),o(t,"$","")}function D(e){if(!e)return e;let t=e.replace(L,"$1");return t=t.replace(C,(a,n)=>({c:"ç",C:"Ç"})[n]??a),t=t.replace(f,(a,n,A)=>{var c;return((c=T[n])==null?void 0:c[A])??a}),t=t.replace(M,(a,n)=>i[n]??a),t=h(t),o(t,"~"," ")}const l="Papers with Code";function I(e,t=l){return`${D(e.trim())||"Paper"} | ${t}`}function R(e,{restorePrevious:t=!1}={}){s.useEffect(()=>{if(!e)return;const a=document.title;return document.title=e,()=>{document.title=t?a:l}},[e,t])}export{I as f,R as u}; +import{f as s}from"./index-D2fBL-s6.js";const E={a:"á",e:"é",i:"í",o:"ó",u:"ú",y:"ý",A:"Á",E:"É",I:"Í",O:"Ó",U:"Ú",Y:"Ý"},p={a:"à",e:"è",i:"ì",o:"ò",u:"ù",A:"À",E:"È",I:"Ì",O:"Ò",U:"Ù"},u={a:"â",e:"ê",i:"î",o:"ô",u:"û",A:"Â",E:"Ê",I:"Î",O:"Ô",U:"Û"},_={a:"ä",e:"ë",i:"ï",o:"ö",u:"ü",y:"ÿ",A:"Ä",E:"Ë",I:"Ï",O:"Ö",U:"Ü",Y:"Ÿ"},T={"'":E,"`":p,"^":u,'"':_,"~":{n:"ñ",N:"Ñ"}},i={ss:"ß",ae:"æ",AE:"Æ",oe:"œ",OE:"Œ",o:"ø",O:"Ø",l:"ł",L:"Ł"},m=[["varphi","φ"],["varepsilon","ε"],["vartheta","ϑ"],["Gamma","Γ"],["Delta","Δ"],["Theta","Θ"],["Lambda","Λ"],["Sigma","Σ"],["Omega","Ω"],["alpha","α"],["beta","β"],["gamma","γ"],["delta","δ"],["epsilon","ε"],["zeta","ζ"],["eta","η"],["theta","θ"],["kappa","κ"],["lambda","λ"],["mu","μ"],["nu","ν"],["xi","ξ"],["pi","π"],["rho","ρ"],["sigma","σ"],["tau","τ"],["phi","φ"],["chi","χ"],["psi","ψ"],["omega","ω"]],L=/\\(?:textbf|mathbf|emph|textit|textsl|texttt|color|textcolor)\{([^{}]*)\}/g,f=/\\(['"`^~])([A-Za-z])/g,C=/\\c\{([cCsS])\}/g,M=new RegExp(`\\\\(${Object.keys(i).join("|")})(?![A-Za-z])`,"g"),g=/\$\$([^$]+)\$\$/g,O=/\$([^$]+)\$/g,$=/\\([A-Za-z]+)/g;function o(e,t,a){return e.split(t).join(a)}function r(e){let t=e.trim();for(const[a,n]of m)t=o(t,`\\${a}`,n);return t=t.replace($,(a,n)=>n),o(t,"$","")}function h(e){let t=e.replace(g,(a,n)=>r(n));return t=t.replace(O,(a,n)=>r(n)),o(t,"$","")}function D(e){if(!e)return e;let t=e.replace(L,"$1");return t=t.replace(C,(a,n)=>({c:"ç",C:"Ç"})[n]??a),t=t.replace(f,(a,n,A)=>{var c;return((c=T[n])==null?void 0:c[A])??a}),t=t.replace(M,(a,n)=>i[n]??a),t=h(t),o(t,"~"," ")}const l="Papers with Code";function I(e,t=l){return`${D(e.trim())||"Paper"} | ${t}`}function R(e,{restorePrevious:t=!1}={}){s.useEffect(()=>{if(!e)return;const a=document.title;return document.title=e,()=>{document.title=t?a:l}},[e,t])}export{I as f,R as u}; diff --git a/assets/useHashScrollOnReady-Ct6aPTRx.js b/assets/useHashScrollOnReady-C36cVkc9.js similarity index 90% rename from assets/useHashScrollOnReady-Ct6aPTRx.js rename to assets/useHashScrollOnReady-C36cVkc9.js index e47c8b62045a802c92f316c507a18004a8764c27..d7f74de7e5040004eb10afdfee7f4ac7c44a77b6 100644 --- a/assets/useHashScrollOnReady-Ct6aPTRx.js +++ b/assets/useHashScrollOnReady-C36cVkc9.js @@ -1 +1 @@ -import{j as s,L as h,f as x}from"./index-CTkdBAwI.js";import{S as p}from"./skeleton-p2_v-2W8.js";import{A as j,a as m}from"./alert-5nuL0v_r.js";import{T as d}from"./trending-up-DegPKMd3.js";const y=({noun:n,items:e,recentDays:i=30,baselineDays:l=180,isLoading:o,error:t,mono:c})=>!o&&!t&&!(e!=null&&e.length)?null:s.jsxs("section",{id:"trending",className:"taxonomy-trending","aria-label":`Trending ${n}s`,children:[s.jsxs("div",{className:"taxonomy-trending-header",children:[s.jsxs("h2",{children:[s.jsx(d,{size:22,"aria-hidden":"true"}),"Trending"]}),s.jsxs("p",{className:"taxonomy-trending-note",children:[n==="task"?"Tasks":"Methods"," across all areas whose share of papers in the last ",i," days grew the most against the preceding ",l," days."]})]}),t?s.jsx(j,{variant:"destructive",children:s.jsxs(m,{children:["Failed to load trending ",n,"s."]})}):o?s.jsx("div",{className:"tag-grid",children:Array.from({length:6}).map((a,r)=>s.jsx(p,{className:"h-20"},r))}):s.jsx("div",{className:"tag-grid",children:e==null?void 0:e.map((a,r)=>s.jsxs(h,{to:a.href,className:"tag-cell",children:[s.jsxs("div",{className:"name",style:c?{fontFamily:"var(--mono)",fontSize:15}:void 0,children:[s.jsx("span",{className:"taxonomy-trending-rank",children:r+1}),a.icon&&s.jsx("span",{className:"task-icon",style:{color:a.iconColor},children:s.jsx(a.icon,{size:16,strokeWidth:2,"aria-hidden":"true"})}),a.name]}),s.jsxs("div",{className:"meta taxonomy-trending-meta",children:[a.areaName&&s.jsxs(s.Fragment,{children:[s.jsx("span",{children:a.areaName}),s.jsx("span",{children:"·"})]}),s.jsxs("span",{children:[a.recentPaperCount.toLocaleString()," papers / ",i,"d"]}),s.jsx("span",{children:"·"}),s.jsxs("span",{className:"method-trend-score taxonomy-trending-lift",title:`Share of recent papers is ${a.shareLift.toFixed(1)}× its baseline share`,children:[s.jsx(d,{size:12,"aria-hidden":"true"}),a.shareLift.toFixed(1),"×"]})]})]},a.id))})]});function v(n){x.useEffect(()=>{var e;!n||!window.location.hash||(e=document.getElementById(window.location.hash.slice(1)))==null||e.scrollIntoView({block:"start"})},[n])}export{y as T,v as u}; +import{j as s,L as h,f as x}from"./index-D2fBL-s6.js";import{S as p}from"./skeleton-BDwfco0_.js";import{A as j,a as m}from"./alert-PnePcfgX.js";import{T as d}from"./trending-up-DFLWFJuY.js";const y=({noun:n,items:e,recentDays:i=30,baselineDays:l=180,isLoading:o,error:t,mono:c})=>!o&&!t&&!(e!=null&&e.length)?null:s.jsxs("section",{id:"trending",className:"taxonomy-trending","aria-label":`Trending ${n}s`,children:[s.jsxs("div",{className:"taxonomy-trending-header",children:[s.jsxs("h2",{children:[s.jsx(d,{size:22,"aria-hidden":"true"}),"Trending"]}),s.jsxs("p",{className:"taxonomy-trending-note",children:[n==="task"?"Tasks":"Methods"," across all areas whose share of papers in the last ",i," days grew the most against the preceding ",l," days."]})]}),t?s.jsx(j,{variant:"destructive",children:s.jsxs(m,{children:["Failed to load trending ",n,"s."]})}):o?s.jsx("div",{className:"tag-grid",children:Array.from({length:6}).map((a,r)=>s.jsx(p,{className:"h-20"},r))}):s.jsx("div",{className:"tag-grid",children:e==null?void 0:e.map((a,r)=>s.jsxs(h,{to:a.href,className:"tag-cell",children:[s.jsxs("div",{className:"name",style:c?{fontFamily:"var(--mono)",fontSize:15}:void 0,children:[s.jsx("span",{className:"taxonomy-trending-rank",children:r+1}),a.icon&&s.jsx("span",{className:"task-icon",style:{color:a.iconColor},children:s.jsx(a.icon,{size:16,strokeWidth:2,"aria-hidden":"true"})}),a.name]}),s.jsxs("div",{className:"meta taxonomy-trending-meta",children:[a.areaName&&s.jsxs(s.Fragment,{children:[s.jsx("span",{children:a.areaName}),s.jsx("span",{children:"·"})]}),s.jsxs("span",{children:[a.recentPaperCount.toLocaleString()," papers / ",i,"d"]}),s.jsx("span",{children:"·"}),s.jsxs("span",{className:"method-trend-score taxonomy-trending-lift",title:`Share of recent papers is ${a.shareLift.toFixed(1)}× its baseline share`,children:[s.jsx(d,{size:12,"aria-hidden":"true"}),a.shareLift.toFixed(1),"×"]})]})]},a.id))})]});function v(n){x.useEffect(()=>{var e;!n||!window.location.hash||(e=document.getElementById(window.location.hash.slice(1)))==null||e.scrollIntoView({block:"start"})},[n])}export{y as T,v as u}; diff --git a/assets/useInfiniteQuery-CLH4OKrI.js b/assets/useInfiniteQuery-CjJA-90e.js similarity index 94% rename from assets/useInfiniteQuery-CLH4OKrI.js rename to assets/useInfiniteQuery-CjJA-90e.js index b70e90b3a2edf3bb9548ff582fa006345cc76856..dda849c360c2455e498b81a14ad65f9d81fc06ba 100644 --- a/assets/useInfiniteQuery-CLH4OKrI.js +++ b/assets/useInfiniteQuery-CjJA-90e.js @@ -1 +1 @@ -import{aN as v,aO as x,aP as p,aQ as N}from"./index-CTkdBAwI.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:p(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 N(e,b)}export{O as u}; +import{aN as v,aO as x,aP as p,aQ as N}from"./index-D2fBL-s6.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:p(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 N(e,b)}export{O as u}; diff --git a/assets/useIntersectionObserver-BnA8TYxZ.js b/assets/useIntersectionObserver-C0Rq0EXm.js similarity index 86% rename from assets/useIntersectionObserver-BnA8TYxZ.js rename to assets/useIntersectionObserver-C0Rq0EXm.js index f7e8f69ab1b344094df49e6a4f8b782423ba6ce6..8818cfb116091409ddd097024e613234fd65f7a7 100644 --- a/assets/useIntersectionObserver-BnA8TYxZ.js +++ b/assets/useIntersectionObserver-C0Rq0EXm.js @@ -1 +1 @@ -import{f as r}from"./index-CTkdBAwI.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{f as r}from"./index-D2fBL-s6.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-DXSljxHA.js b/assets/useMutation-9dlTbuQj.js similarity index 97% rename from assets/useMutation-DXSljxHA.js rename to assets/useMutation-9dlTbuQj.js index f0fee30953742516c88d370584f1655ac14b8536..97b6fe85551b7602f5bd04a1b9c831a815968c11 100644 --- a/assets/useMutation-DXSljxHA.js +++ b/assets/useMutation-9dlTbuQj.js @@ -1 +1 @@ -var R=i=>{throw TypeError(i)};var E=(i,t,s)=>t.has(i)||R("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)?R("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{aB as U,aC as k,aD as j,aE as q,aF as P,l as D,f as v,aG as L,aH as A}from"./index-CTkdBAwI.js";var a,c,o,h,n,g,S,w,B=(w=class extends U{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,g).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),k(this.options,s)||e(this,a).getMutationCache().notify({type:"observerOptionsUpdated",mutation:e(this,o),observer:this}),s!=null&&s.mutationKey&&this.options.mutationKey&&j(s.mutationKey)!==j(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,g).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,g).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,g=function(){var s;const t=((s=e(this,o))==null?void 0:s.state)??q();p(this,c,{...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset})},S=function(t){P.batch(()=>{var s,r,u,f,d,O,x,K;if(e(this,h)&&this.hasListeners()){const m=e(this,c).variables,C=e(this,c).context,M={client:e(this,a),meta:this.options.meta,mutationKey:this.options.mutationKey};if((t==null?void 0:t.type)==="success"){try{(r=(s=e(this,h)).onSuccess)==null||r.call(s,t.data,m,C,M)}catch(l){Promise.reject(l)}try{(f=(u=e(this,h)).onSettled)==null||f.call(u,t.data,null,m,C,M)}catch(l){Promise.reject(l)}}else if((t==null?void 0:t.type)==="error"){try{(O=(d=e(this,h)).onError)==null||O.call(d,t.error,m,C,M)}catch(l){Promise.reject(l)}try{(K=(x=e(this,h)).onSettled)==null||K.call(x,void 0,t.error,m,C,M)}catch(l){Promise.reject(l)}}}this.listeners.forEach(m=>{m(e(this,c))})})},w);function H(i,t){const s=D(),[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(L)},[r]);if(u.error&&A(r.options.throwOnError,[u.error]))throw u.error;return{...u,mutate:f,mutateAsync:u.mutate}}export{H as u}; +var R=i=>{throw TypeError(i)};var E=(i,t,s)=>t.has(i)||R("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)?R("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{aB as U,aC as k,aD as j,aE as q,aF as P,l as D,f as v,aG as L,aH as A}from"./index-D2fBL-s6.js";var a,c,o,h,n,g,S,w,B=(w=class extends U{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,g).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),k(this.options,s)||e(this,a).getMutationCache().notify({type:"observerOptionsUpdated",mutation:e(this,o),observer:this}),s!=null&&s.mutationKey&&this.options.mutationKey&&j(s.mutationKey)!==j(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,g).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,g).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,g=function(){var s;const t=((s=e(this,o))==null?void 0:s.state)??q();p(this,c,{...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset})},S=function(t){P.batch(()=>{var s,r,u,f,d,O,x,K;if(e(this,h)&&this.hasListeners()){const m=e(this,c).variables,C=e(this,c).context,M={client:e(this,a),meta:this.options.meta,mutationKey:this.options.mutationKey};if((t==null?void 0:t.type)==="success"){try{(r=(s=e(this,h)).onSuccess)==null||r.call(s,t.data,m,C,M)}catch(l){Promise.reject(l)}try{(f=(u=e(this,h)).onSettled)==null||f.call(u,t.data,null,m,C,M)}catch(l){Promise.reject(l)}}else if((t==null?void 0:t.type)==="error"){try{(O=(d=e(this,h)).onError)==null||O.call(d,t.error,m,C,M)}catch(l){Promise.reject(l)}try{(K=(x=e(this,h)).onSettled)==null||K.call(x,void 0,t.error,m,C,M)}catch(l){Promise.reject(l)}}}this.listeners.forEach(m=>{m(e(this,c))})})},w);function H(i,t){const s=D(),[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(L)},[r]);if(u.error&&A(r.options.throwOnError,[u.error]))throw u.error;return{...u,mutate:f,mutateAsync:u.mutate}}export{H as u}; diff --git a/assets/usePapers-Cu-zovv8.js b/assets/usePapers-CAjdcUuj.js similarity index 63% rename from assets/usePapers-Cu-zovv8.js rename to assets/usePapers-CAjdcUuj.js index 5c28c65abe80ef79e3ffc6d757377bb1f17a5f29..6155db184b9192d0fed3213cc29e8786d98bea41 100644 --- a/assets/usePapers-Cu-zovv8.js +++ b/assets/usePapers-CAjdcUuj.js @@ -1 +1 @@ -import{b as s,T as u,p as i}from"./index-CTkdBAwI.js";import{u as m}from"./useInfiniteQuery-CLH4OKrI.js";import{p as o}from"./papers-POQWk4vk.js";function g(e,t=!0){return s({queryKey:i.detail(e),queryFn:()=>o.get(e),enabled:t&&!!e,staleTime:u})}function y(e,t,{enabled:n=!0,initialPage:p=1}={}){return m({queryKey:e,queryFn:({pageParam:a})=>t(a),initialPageParam:p,getNextPageParam:a=>a.next_page??void 0,enabled:n,staleTime:5*60*1e3,placeholderData:(a,r)=>(r==null?void 0:r.queryKey[0])===e[0]?a:void 0})}export{g as a,y as u}; +import{b as s,T as u,p as i}from"./index-D2fBL-s6.js";import{u as m}from"./useInfiniteQuery-CjJA-90e.js";import{p as o}from"./papers-khuZaSFb.js";function g(e,t=!0){return s({queryKey:i.detail(e),queryFn:()=>o.get(e),enabled:t&&!!e,staleTime:u})}function y(e,t,{enabled:n=!0,initialPage:p=1}={}){return m({queryKey:e,queryFn:({pageParam:a})=>t(a),initialPageParam:p,getNextPageParam:a=>a.next_page??void 0,enabled:n,staleTime:5*60*1e3,placeholderData:(a,r)=>(r==null?void 0:r.queryKey[0])===e[0]?a:void 0})}export{g as a,y as u}; diff --git a/index.html b/index.html index f594f30c7bfa3e3447d73084926e45430b5af3a3..3c3532b7429da03c1d6b78e875a732bd548c072f 100644 --- a/index.html +++ b/index.html @@ -72,7 +72,7 @@ plausible.init(); })(); - +