nielsr HF Staff commited on
Commit
8869d70
·
verified ·
1 Parent(s): 915144f

Sync paperswithcode.co frontend

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. assets/{AgentLogos-DhD8p5ds.js → AgentLogos-BBl9UNVD.js} +1 -1
  2. assets/{AiDeadlinesView-BWqSvLms.js → AiDeadlinesView-BhXjtcbF.js} +1 -1
  3. assets/{ApiDocsView-Bb326kAF.js → ApiDocsView-hjoHKqpf.js} +1 -1
  4. assets/{AreaSection-CfCNkiTd.js → AreaSection-NWvfO4Sb.js} +1 -1
  5. assets/{ArtifactWorkspace-BxDA6yNF.js → ArtifactWorkspace-Cwix1Wp6.js} +1 -1
  6. assets/{AstraForRoboticsView-CqbM4y2W.js → AstraForRoboticsView-pQ4cp5_V.js} +1 -1
  7. assets/{AuthorAvatar-CoTET6B3.js → AuthorAvatar-CUJMmp_z.js} +1 -1
  8. assets/{AuthorDetailView-ETu8URv_.js → AuthorDetailView-BpcSKHs1.js} +1 -1
  9. assets/{AuthorizePaperEditView-BxV6NPKV.js → AuthorizePaperEditView-D0e1jji8.js} +1 -1
  10. assets/{AutonomousOperations-epH5w9S2.js → AutonomousOperations-CzJGtkdV.js} +1 -1
  11. assets/{BenchmarkDetailView-CzOCvqTF.js → BenchmarkDetailView-BGwBE1Ld.js} +1 -1
  12. assets/{BenchmarkTrendSparkline-BBLKxMdW.js → BenchmarkTrendSparkline-C135_NtS.js} +1 -1
  13. assets/{CatalogEntityPreviewLink-Cv_oezOz.js → CatalogEntityPreviewLink-Cvehtzvn.js} +1 -1
  14. assets/{ChatView-DsnEMREv.js → ChatView-DlSbJMKT.js} +1 -1
  15. assets/{ConferenceDetailView-CX4S54m2.js → ConferenceDetailView-i-HB-ysc.js} +1 -1
  16. assets/{ConferenceTaskView-DvbWh5_R.js → ConferenceTaskView-BZBMXZD8.js} +1 -1
  17. assets/{ConferencesIndexView-DUaazjEx.js → ConferencesIndexView-Cw6IrAk5.js} +1 -1
  18. assets/{CronDashboard-DcLcBHdd.js → CronDashboard-B3Xofwvu.js} +2 -2
  19. assets/{CronDashboard-DMMdAs4p.js → CronDashboard-CC1lPV3k.js} +1 -1
  20. assets/{ExternalSourceEvalBadge-CimjRPVg.js → ExternalSourceEvalBadge-npO6bZ8N.js} +1 -1
  21. assets/{FeedView-CFzlAcol.js → FeedView-BR2dQQ-K.js} +1 -1
  22. assets/FollowingView-BYs2N-nq.js +0 -1
  23. assets/FollowingView-nVVViEvV.js +1 -0
  24. assets/{FrameworksIndexView-CqtIM7jE.js → FrameworksIndexView-CQtYg5mA.js} +1 -1
  25. assets/{Icon-DXQ4sjQk.js → Icon-D-kA0Owz.js} +1 -1
  26. assets/{LatexTitle-DI6voLfI.js → LatexTitle-Z-HGmZ-H.js} +1 -1
  27. assets/{MarkdownText-C-8yLDus.js → MarkdownText-Bj-G_S-B.js} +1 -1
  28. assets/{McpShowcase-Fj71TTNl.js → McpShowcase-CMLfdJM2.js} +1 -1
  29. assets/{McpView-CMm_vOrt.js → McpView-BrXaRo4V.js} +1 -1
  30. assets/{MethodDetailView-CU5sbo2E.js → MethodDetailView-CEUGGyVV.js} +1 -1
  31. assets/{MethodsIndexView-CS3VxsBJ.js → MethodsIndexView-DYp0dUSa.js} +1 -1
  32. assets/{NotFound-D8hwuoEl.js → NotFound-DtzwOULp.js} +1 -1
  33. assets/{OrganizationContributionGraph-BZyCpVX4.js → OrganizationContributionGraph-ah6EPb13.js} +1 -1
  34. assets/{OrganizationDetailView-C69MBUc4.js → OrganizationDetailView-BD-vOirQ.js} +1 -1
  35. assets/{OrganizationsIndexView-CbWS3zNq.js → OrganizationsIndexView-Bd4D8teF.js} +1 -1
  36. assets/{PaperCard-FG-bEpJk.js → PaperCard-tdTC_dRN.js} +1 -1
  37. assets/PaperDetailView-F3D4F2PU.js +0 -0
  38. assets/PaperDetailView-uLa9aL0s.js +0 -0
  39. assets/{PaperFeed-kaLm5US2.js → PaperFeed-DMvUfA47.js} +1 -1
  40. assets/{PaperPreviewLink-CKfmgBjs.js → PaperPreviewLink-DZDNIh1g.js} +3 -3
  41. assets/{PaperReaderView-D2y857wl.js → PaperReaderView-9hbbSNRK.js} +1 -1
  42. assets/{PapersListView-zhvzkmK9.js → PapersListView-DhkGuTns.js} +1 -1
  43. assets/{PrivacyView-B0DBzRMW.js → PrivacyView-CodFIqUq.js} +1 -1
  44. assets/{RateLimitsView-JyYAwVUh.js → RateLimitsView-C9bDo_Dq.js} +1 -1
  45. assets/{ResearchFollowButton-BFXC8E3t.js → ResearchFollowButton-D2BXlDtQ.js} +1 -1
  46. assets/{SavedPapersView-CWUM_gRn.js → SavedPapersView-CewIlVsw.js} +1 -1
  47. assets/{SearchOverlay-CzggQ3fk.js → SearchOverlay-LaDVSpVs.js} +1 -1
  48. assets/{SettingsView-BurbOJNZ.js → SettingsView-C0A-yv3U.js} +2 -2
  49. assets/{SharedChatView-C8jGkNjy.js → SharedChatView-DO_TTtXn.js} +1 -1
  50. assets/{SignInToEditDialog-DpqyyHCb.js → SignInToEditDialog-CNIcNqbK.js} +2 -2
assets/{AgentLogos-DhD8p5ds.js → AgentLogos-BBl9UNVD.js} RENAMED
@@ -1 +1 @@
1
- import{j as e}from"./index-YwiKC6Po.js";const s="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='256'%20height='257'%20preserveAspectRatio='xMidYMid'%20viewBox='0%200%20256%20257'%3e%3cpath%20fill='%23D97757'%20d='m50.228%20170.321%2050.357-28.257.843-2.463-.843-1.361h-2.462l-8.426-.518-28.775-.778-24.952-1.037-24.175-1.296-6.092-1.297L0%20125.796l.583-3.759%205.12-3.434%207.324.648%2016.202%201.101%2024.304%201.685%2017.629%201.037%2026.118%202.722h4.148l.583-1.685-1.426-1.037-1.101-1.037-25.147-17.045-27.22-18.017-14.258-10.37-7.713-5.25-3.888-4.925-1.685-10.758%207-7.713%209.397.649%202.398.648%209.527%207.323%2020.35%2015.75L94.817%2091.9l3.889%203.24%201.555-1.102.195-.777-1.75-2.917-14.453-26.118-15.425-26.572-6.87-11.018-1.814-6.61c-.648-2.723-1.102-4.991-1.102-7.778l7.972-10.823L71.42%200%2082.05%201.426l4.472%203.888%206.61%2015.101%2010.694%2023.786%2016.591%2032.34%204.861%209.592%202.592%208.879.973%202.722h1.685v-1.556l1.36-18.211%202.528-22.36%202.463-28.776.843-8.1%204.018-9.722%207.971-5.25%206.222%202.981%205.12%207.324-.713%204.73-3.046%2019.768-5.962%2030.98-3.889%2020.739h2.268l2.593-2.593%2010.499-13.934%2017.628-22.036%207.778-8.749%209.073-9.657%205.833-4.601h11.018l8.1%2012.055-3.628%2012.443-11.342%2014.388-9.398%2012.184-13.48%2018.147-8.426%2014.518.778%201.166%202.01-.194%2030.46-6.481%2016.462-2.982%2019.637-3.37%208.88%204.148.971%204.213-3.5%208.62-20.998%205.184-24.628%204.926-36.682%208.685-.454.324.519.648%2016.526%201.555%207.065.389h17.304l32.21%202.398%208.426%205.574%205.055%206.805-.843%205.184-12.962%206.611-17.498-4.148-40.83-9.721-14-3.5h-1.944v1.167l11.666%2011.406%2021.387%2019.314%2026.767%2024.887%201.36%206.157-3.434%204.86-3.63-.518-23.526-17.693-9.073-7.972-20.545-17.304h-1.36v1.814l4.73%206.935%2025.017%2037.59%201.296%2011.536-1.814%203.76-6.481%202.268-7.13-1.297-14.647-20.544-15.1-23.138-12.185-20.739-1.49.843-7.194%2077.448-3.37%203.953-7.778%202.981-6.48-4.925-3.436-7.972%203.435-15.749%204.148-20.544%203.37-16.333%203.046-20.285%201.815-6.74-.13-.454-1.49.194-15.295%2020.999-23.267%2031.433-18.406%2019.702-4.407%201.75-7.648-3.954.713-7.064%204.277-6.286%2025.47-32.405%2015.36-20.092%209.917-11.6-.065-1.686h-.583L44.07%20198.125l-12.055%201.555-5.185-4.86.648-7.972%202.463-2.593%2020.35-13.999-.064.065Z'/%3e%3c/svg%3e",a="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='256'%20height='257'%20preserveAspectRatio='xMidYMid'%20viewBox='0%200%20256%20257'%3e%3cpath%20fill='%23D97757'%20d='m50.228%20170.321%2050.357-28.257.843-2.463-.843-1.361h-2.462l-8.426-.518-28.775-.778-24.952-1.037-24.175-1.296-6.092-1.297L0%20125.796l.583-3.759%205.12-3.434%207.324.648%2016.202%201.101%2024.304%201.685%2017.629%201.037%2026.118%202.722h4.148l.583-1.685-1.426-1.037-1.101-1.037-25.147-17.045-27.22-18.017-14.258-10.37-7.713-5.25-3.888-4.925-1.685-10.758%207-7.713%209.397.649%202.398.648%209.527%207.323%2020.35%2015.75L94.817%2091.9l3.889%203.24%201.555-1.102.195-.777-1.75-2.917-14.453-26.118-15.425-26.572-6.87-11.018-1.814-6.61c-.648-2.723-1.102-4.991-1.102-7.778l7.972-10.823L71.42%200%2082.05%201.426l4.472%203.888%206.61%2015.101%2010.694%2023.786%2016.591%2032.34%204.861%209.592%202.592%208.879.973%202.722h1.685v-1.556l1.36-18.211%202.528-22.36%202.463-28.776.843-8.1%204.018-9.722%207.971-5.25%206.222%202.981%205.12%207.324-.713%204.73-3.046%2019.768-5.962%2030.98-3.889%2020.739h2.268l2.593-2.593%2010.499-13.934%2017.628-22.036%207.778-8.749%209.073-9.657%205.833-4.601h11.018l8.1%2012.055-3.628%2012.443-11.342%2014.388-9.398%2012.184-13.48%2018.147-8.426%2014.518.778%201.166%202.01-.194%2030.46-6.481%2016.462-2.982%2019.637-3.37%208.88%204.148.971%204.213-3.5%208.62-20.998%205.184-24.628%204.926-36.682%208.685-.454.324.519.648%2016.526%201.555%207.065.389h17.304l32.21%202.398%208.426%205.574%205.055%206.805-.843%205.184-12.962%206.611-17.498-4.148-40.83-9.721-14-3.5h-1.944v1.167l11.666%2011.406%2021.387%2019.314%2026.767%2024.887%201.36%206.157-3.434%204.86-3.63-.518-23.526-17.693-9.073-7.972-20.545-17.304h-1.36v1.814l4.73%206.935%2025.017%2037.59%201.296%2011.536-1.814%203.76-6.481%202.268-7.13-1.297-14.647-20.544-15.1-23.138-12.185-20.739-1.49.843-7.194%2077.448-3.37%203.953-7.778%202.981-6.48-4.925-3.436-7.972%203.435-15.749%204.148-20.544%203.37-16.333%203.046-20.285%201.815-6.74-.13-.454-1.49.194-15.295%2020.999-23.267%2031.433-18.406%2019.702-4.407%201.75-7.648-3.954.713-7.064%204.277-6.286%2025.47-32.405%2015.36-20.092%209.917-11.6-.065-1.686h-.583L44.07%20198.125l-12.055%201.555-5.185-4.86.648-7.972%202.463-2.593%2020.35-13.999-.064.065Z'/%3e%3c/svg%3e",h="data:image/svg+xml,%3csvg%20fill='%23111'%20fill-rule='evenodd'%20height='1em'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='1em'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eCodex%3c/title%3e%3cpath%20clip-rule='evenodd'%20d='M8.086.457a6.105%206.105%200%20013.046-.415c1.333.153%202.521.72%203.564%201.7a.117.117%200%2000.107.029c1.408-.346%202.762-.224%204.061.366l.063.03.154.076c1.357.703%202.33%201.77%202.918%203.198.278.679.418%201.388.421%202.126a5.655%205.655%200%2001-.18%201.631.167.167%200%2000.04.155%205.982%205.982%200%20011.578%202.891c.385%201.901-.01%203.615-1.183%205.14l-.182.22a6.063%206.063%200%2001-2.934%201.851.162.162%200%2000-.108.102c-.255.736-.511%201.364-.987%201.992-1.199%201.582-2.962%202.462-4.948%202.451-1.583-.008-2.986-.587-4.21-1.736a.145.145%200%2000-.14-.032c-.518.167-1.04.191-1.604.185a5.924%205.924%200%2001-2.595-.622%206.058%206.058%200%2001-2.146-1.781c-.203-.269-.404-.522-.551-.821a7.74%207.74%200%2001-.495-1.283%206.11%206.11%200%2001-.017-3.064.166.166%200%2000.008-.074.115.115%200%2000-.037-.064%205.958%205.958%200%2001-1.38-2.202%205.196%205.196%200%2001-.333-1.589%206.915%206.915%200%2001.188-2.132c.45-1.484%201.309-2.648%202.577-3.493.282-.188.55-.334.802-.438.286-.12.573-.22.861-.304a.129.129%200%2000.087-.087A6.016%206.016%200%20015.635%202.31C6.315%201.464%207.132.846%208.086.457zm-.804%207.85a.848.848%200%2000-1.473.842l1.694%202.965-1.688%202.848a.849.849%200%20001.46.864l1.94-3.272a.849.849%200%2000.007-.854l-1.94-3.393zm5.446%206.24a.849.849%200%20000%201.695h4.848a.849.849%200%20000-1.696h-4.848z'%3e%3c/path%3e%3c/svg%3e",o="data:image/svg+xml,%3csvg%20fill='%23fff'%20fill-rule='evenodd'%20height='1em'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='1em'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eCodex%3c/title%3e%3cpath%20clip-rule='evenodd'%20d='M8.086.457a6.105%206.105%200%20013.046-.415c1.333.153%202.521.72%203.564%201.7a.117.117%200%2000.107.029c1.408-.346%202.762-.224%204.061.366l.063.03.154.076c1.357.703%202.33%201.77%202.918%203.198.278.679.418%201.388.421%202.126a5.655%205.655%200%2001-.18%201.631.167.167%200%2000.04.155%205.982%205.982%200%20011.578%202.891c.385%201.901-.01%203.615-1.183%205.14l-.182.22a6.063%206.063%200%2001-2.934%201.851.162.162%200%2000-.108.102c-.255.736-.511%201.364-.987%201.992-1.199%201.582-2.962%202.462-4.948%202.451-1.583-.008-2.986-.587-4.21-1.736a.145.145%200%2000-.14-.032c-.518.167-1.04.191-1.604.185a5.924%205.924%200%2001-2.595-.622%206.058%206.058%200%2001-2.146-1.781c-.203-.269-.404-.522-.551-.821a7.74%207.74%200%2001-.495-1.283%206.11%206.11%200%2001-.017-3.064.166.166%200%2000.008-.074.115.115%200%2000-.037-.064%205.958%205.958%200%2001-1.38-2.202%205.196%205.196%200%2001-.333-1.589%206.915%206.915%200%2001.188-2.132c.45-1.484%201.309-2.648%202.577-3.493.282-.188.55-.334.802-.438.286-.12.573-.22.861-.304a.129.129%200%2000.087-.087A6.016%206.016%200%20015.635%202.31C6.315%201.464%207.132.846%208.086.457zm-.804%207.85a.848.848%200%2000-1.473.842l1.694%202.965-1.688%202.848a.849.849%200%20001.46.864l1.94-3.272a.849.849%200%2000.007-.854l-1.94-3.393zm5.446%206.24a.849.849%200%20000%201.695h4.848a.849.849%200%20000-1.696h-4.848z'%3e%3c/path%3e%3c/svg%3e",r="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20id='cursor_light__Ebene_1'%20xmlns='http://www.w3.org/2000/svg'%20version='1.1'%20viewBox='0%200%20466.73%20532.09'%3e%3c!--Generator:%20Adobe%20Illustrator%2029.6.1,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%202.1.1%20Build%209)--%3e%3cdefs%3e%3cstyle%3e.cursor_light__st0{fill:%2326251e}%3c/style%3e%3c/defs%3e%3cpath%20class='cursor_light__st0'%20d='M457.43,125.94L244.42,2.96c-6.84-3.95-15.28-3.95-22.12,0L9.3,125.94c-5.75,3.32-9.3,9.46-9.3,16.11v247.99c0,6.65,3.55,12.79,9.3,16.11l213.01,122.98c6.84,3.95,15.28,3.95,22.12,0l213.01-122.98c5.75-3.32,9.3-9.46,9.3-16.11v-247.99c0-6.65-3.55-12.79-9.3-16.11h-.01ZM444.05,151.99l-205.63,356.16c-1.39,2.4-5.06,1.42-5.06-1.36v-233.21c0-4.66-2.49-8.97-6.53-11.31L24.87,145.67c-2.4-1.39-1.42-5.06,1.36-5.06h411.26c5.84,0,9.49,6.33,6.57,11.39h-.01Z'/%3e%3c/svg%3e",d="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20id='cursor_dark__Ebene_1'%20xmlns='http://www.w3.org/2000/svg'%20version='1.1'%20viewBox='0%200%20466.73%20532.09'%3e%3c!--Generator:%20Adobe%20Illustrator%2029.6.1,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%202.1.1%20Build%209)--%3e%3cdefs%3e%3cstyle%3e.cursor_dark__st0{fill:%23edecec}%3c/style%3e%3c/defs%3e%3cpath%20class='cursor_dark__st0'%20d='M457.43,125.94L244.42,2.96c-6.84-3.95-15.28-3.95-22.12,0L9.3,125.94c-5.75,3.32-9.3,9.46-9.3,16.11v247.99c0,6.65,3.55,12.79,9.3,16.11l213.01,122.98c6.84,3.95,15.28,3.95,22.12,0l213.01-122.98c5.75-3.32,9.3-9.46,9.3-16.11v-247.99c0-6.65-3.55-12.79-9.3-16.11h-.01ZM444.05,151.99l-205.63,356.16c-1.39,2.4-5.06,1.42-5.06-1.36v-233.21c0-4.66-2.49-8.97-6.53-11.31L24.87,145.67c-2.4-1.39-1.42-5.06,1.36-5.06h411.26c5.84,0,9.49,6.33,6.57,11.39h-.01Z'/%3e%3c/svg%3e",n="data:image/svg+xml,%3csvg%20width='512'%20height='512'%20viewBox='0%200%20512%20512'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20width='512'%20height='512'%20fill='%23FDFCFC'/%3e%3cpath%20d='M320%20224V352H192V224H320Z'%20fill='%23E6E5E6'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M384%20416H128V96H384V416ZM320%20160H192V352H320V160Z'%20fill='%2317181C'/%3e%3c/svg%3e",g="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20version='1.1'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='512'%20height='512'%3e%3csvg%20width='512'%20height='512'%20viewBox='0%200%20512%20512'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20width='512'%20height='512'%20fill='%23131010'%3e%3c/rect%3e%3cpath%20d='M320%20224V352H192V224H320Z'%20fill='%235A5858'%3e%3c/path%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M384%20416H128V96H384V416ZM320%20160H192V352H320V160Z'%20fill='white'%3e%3c/path%3e%3c/svg%3e%3cstyle%3e@media%20(prefers-color-scheme:%20light)%20{%20:root%20{%20filter:%20none;%20}%20}%20@media%20(prefers-color-scheme:%20dark)%20{%20:root%20{%20filter:%20none;%20}%20}%20%3c/style%3e%3c/svg%3e",i=[{name:"Claude",light:s,dark:a},{name:"Codex",light:h,dark:o},{name:"Cursor",light:r,dark:d},{name:"OpenCode",light:n,dark:g}];function w(){return e.jsx("span",{className:"ml-1 inline-flex shrink-0 items-center gap-1.5","aria-hidden":"true",children:i.map(({name:l,light:t,dark:c})=>e.jsxs("span",{title:l,className:"inline-flex h-[18px] w-[18px]",children:[e.jsx("img",{src:t,alt:"",width:18,height:18,className:"h-full w-full object-contain dark:hidden"}),e.jsx("img",{src:c,alt:"",width:18,height:18,className:"hidden h-full w-full object-contain dark:block"})]},l))})}function m(){return e.jsx("ul",{className:"flex flex-wrap gap-2","aria-label":"Supported coding agents",children:i.map(({name:l,light:t,dark:c})=>e.jsxs("li",{className:"inline-flex items-center gap-2 rounded-full border px-3 py-1 text-sm",children:[e.jsx("img",{src:t,alt:"",width:18,height:18,className:"h-[18px] w-[18px] object-contain dark:hidden"}),e.jsx("img",{src:c,alt:"",width:18,height:18,className:"hidden h-[18px] w-[18px] object-contain dark:block"}),l]},l))})}export{w as A,m as a};
 
1
+ import{j as e}from"./index-CbgxfyGU.js";const s="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='256'%20height='257'%20preserveAspectRatio='xMidYMid'%20viewBox='0%200%20256%20257'%3e%3cpath%20fill='%23D97757'%20d='m50.228%20170.321%2050.357-28.257.843-2.463-.843-1.361h-2.462l-8.426-.518-28.775-.778-24.952-1.037-24.175-1.296-6.092-1.297L0%20125.796l.583-3.759%205.12-3.434%207.324.648%2016.202%201.101%2024.304%201.685%2017.629%201.037%2026.118%202.722h4.148l.583-1.685-1.426-1.037-1.101-1.037-25.147-17.045-27.22-18.017-14.258-10.37-7.713-5.25-3.888-4.925-1.685-10.758%207-7.713%209.397.649%202.398.648%209.527%207.323%2020.35%2015.75L94.817%2091.9l3.889%203.24%201.555-1.102.195-.777-1.75-2.917-14.453-26.118-15.425-26.572-6.87-11.018-1.814-6.61c-.648-2.723-1.102-4.991-1.102-7.778l7.972-10.823L71.42%200%2082.05%201.426l4.472%203.888%206.61%2015.101%2010.694%2023.786%2016.591%2032.34%204.861%209.592%202.592%208.879.973%202.722h1.685v-1.556l1.36-18.211%202.528-22.36%202.463-28.776.843-8.1%204.018-9.722%207.971-5.25%206.222%202.981%205.12%207.324-.713%204.73-3.046%2019.768-5.962%2030.98-3.889%2020.739h2.268l2.593-2.593%2010.499-13.934%2017.628-22.036%207.778-8.749%209.073-9.657%205.833-4.601h11.018l8.1%2012.055-3.628%2012.443-11.342%2014.388-9.398%2012.184-13.48%2018.147-8.426%2014.518.778%201.166%202.01-.194%2030.46-6.481%2016.462-2.982%2019.637-3.37%208.88%204.148.971%204.213-3.5%208.62-20.998%205.184-24.628%204.926-36.682%208.685-.454.324.519.648%2016.526%201.555%207.065.389h17.304l32.21%202.398%208.426%205.574%205.055%206.805-.843%205.184-12.962%206.611-17.498-4.148-40.83-9.721-14-3.5h-1.944v1.167l11.666%2011.406%2021.387%2019.314%2026.767%2024.887%201.36%206.157-3.434%204.86-3.63-.518-23.526-17.693-9.073-7.972-20.545-17.304h-1.36v1.814l4.73%206.935%2025.017%2037.59%201.296%2011.536-1.814%203.76-6.481%202.268-7.13-1.297-14.647-20.544-15.1-23.138-12.185-20.739-1.49.843-7.194%2077.448-3.37%203.953-7.778%202.981-6.48-4.925-3.436-7.972%203.435-15.749%204.148-20.544%203.37-16.333%203.046-20.285%201.815-6.74-.13-.454-1.49.194-15.295%2020.999-23.267%2031.433-18.406%2019.702-4.407%201.75-7.648-3.954.713-7.064%204.277-6.286%2025.47-32.405%2015.36-20.092%209.917-11.6-.065-1.686h-.583L44.07%20198.125l-12.055%201.555-5.185-4.86.648-7.972%202.463-2.593%2020.35-13.999-.064.065Z'/%3e%3c/svg%3e",a="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='256'%20height='257'%20preserveAspectRatio='xMidYMid'%20viewBox='0%200%20256%20257'%3e%3cpath%20fill='%23D97757'%20d='m50.228%20170.321%2050.357-28.257.843-2.463-.843-1.361h-2.462l-8.426-.518-28.775-.778-24.952-1.037-24.175-1.296-6.092-1.297L0%20125.796l.583-3.759%205.12-3.434%207.324.648%2016.202%201.101%2024.304%201.685%2017.629%201.037%2026.118%202.722h4.148l.583-1.685-1.426-1.037-1.101-1.037-25.147-17.045-27.22-18.017-14.258-10.37-7.713-5.25-3.888-4.925-1.685-10.758%207-7.713%209.397.649%202.398.648%209.527%207.323%2020.35%2015.75L94.817%2091.9l3.889%203.24%201.555-1.102.195-.777-1.75-2.917-14.453-26.118-15.425-26.572-6.87-11.018-1.814-6.61c-.648-2.723-1.102-4.991-1.102-7.778l7.972-10.823L71.42%200%2082.05%201.426l4.472%203.888%206.61%2015.101%2010.694%2023.786%2016.591%2032.34%204.861%209.592%202.592%208.879.973%202.722h1.685v-1.556l1.36-18.211%202.528-22.36%202.463-28.776.843-8.1%204.018-9.722%207.971-5.25%206.222%202.981%205.12%207.324-.713%204.73-3.046%2019.768-5.962%2030.98-3.889%2020.739h2.268l2.593-2.593%2010.499-13.934%2017.628-22.036%207.778-8.749%209.073-9.657%205.833-4.601h11.018l8.1%2012.055-3.628%2012.443-11.342%2014.388-9.398%2012.184-13.48%2018.147-8.426%2014.518.778%201.166%202.01-.194%2030.46-6.481%2016.462-2.982%2019.637-3.37%208.88%204.148.971%204.213-3.5%208.62-20.998%205.184-24.628%204.926-36.682%208.685-.454.324.519.648%2016.526%201.555%207.065.389h17.304l32.21%202.398%208.426%205.574%205.055%206.805-.843%205.184-12.962%206.611-17.498-4.148-40.83-9.721-14-3.5h-1.944v1.167l11.666%2011.406%2021.387%2019.314%2026.767%2024.887%201.36%206.157-3.434%204.86-3.63-.518-23.526-17.693-9.073-7.972-20.545-17.304h-1.36v1.814l4.73%206.935%2025.017%2037.59%201.296%2011.536-1.814%203.76-6.481%202.268-7.13-1.297-14.647-20.544-15.1-23.138-12.185-20.739-1.49.843-7.194%2077.448-3.37%203.953-7.778%202.981-6.48-4.925-3.436-7.972%203.435-15.749%204.148-20.544%203.37-16.333%203.046-20.285%201.815-6.74-.13-.454-1.49.194-15.295%2020.999-23.267%2031.433-18.406%2019.702-4.407%201.75-7.648-3.954.713-7.064%204.277-6.286%2025.47-32.405%2015.36-20.092%209.917-11.6-.065-1.686h-.583L44.07%20198.125l-12.055%201.555-5.185-4.86.648-7.972%202.463-2.593%2020.35-13.999-.064.065Z'/%3e%3c/svg%3e",h="data:image/svg+xml,%3csvg%20fill='%23111'%20fill-rule='evenodd'%20height='1em'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='1em'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eCodex%3c/title%3e%3cpath%20clip-rule='evenodd'%20d='M8.086.457a6.105%206.105%200%20013.046-.415c1.333.153%202.521.72%203.564%201.7a.117.117%200%2000.107.029c1.408-.346%202.762-.224%204.061.366l.063.03.154.076c1.357.703%202.33%201.77%202.918%203.198.278.679.418%201.388.421%202.126a5.655%205.655%200%2001-.18%201.631.167.167%200%2000.04.155%205.982%205.982%200%20011.578%202.891c.385%201.901-.01%203.615-1.183%205.14l-.182.22a6.063%206.063%200%2001-2.934%201.851.162.162%200%2000-.108.102c-.255.736-.511%201.364-.987%201.992-1.199%201.582-2.962%202.462-4.948%202.451-1.583-.008-2.986-.587-4.21-1.736a.145.145%200%2000-.14-.032c-.518.167-1.04.191-1.604.185a5.924%205.924%200%2001-2.595-.622%206.058%206.058%200%2001-2.146-1.781c-.203-.269-.404-.522-.551-.821a7.74%207.74%200%2001-.495-1.283%206.11%206.11%200%2001-.017-3.064.166.166%200%2000.008-.074.115.115%200%2000-.037-.064%205.958%205.958%200%2001-1.38-2.202%205.196%205.196%200%2001-.333-1.589%206.915%206.915%200%2001.188-2.132c.45-1.484%201.309-2.648%202.577-3.493.282-.188.55-.334.802-.438.286-.12.573-.22.861-.304a.129.129%200%2000.087-.087A6.016%206.016%200%20015.635%202.31C6.315%201.464%207.132.846%208.086.457zm-.804%207.85a.848.848%200%2000-1.473.842l1.694%202.965-1.688%202.848a.849.849%200%20001.46.864l1.94-3.272a.849.849%200%2000.007-.854l-1.94-3.393zm5.446%206.24a.849.849%200%20000%201.695h4.848a.849.849%200%20000-1.696h-4.848z'%3e%3c/path%3e%3c/svg%3e",o="data:image/svg+xml,%3csvg%20fill='%23fff'%20fill-rule='evenodd'%20height='1em'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='1em'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eCodex%3c/title%3e%3cpath%20clip-rule='evenodd'%20d='M8.086.457a6.105%206.105%200%20013.046-.415c1.333.153%202.521.72%203.564%201.7a.117.117%200%2000.107.029c1.408-.346%202.762-.224%204.061.366l.063.03.154.076c1.357.703%202.33%201.77%202.918%203.198.278.679.418%201.388.421%202.126a5.655%205.655%200%2001-.18%201.631.167.167%200%2000.04.155%205.982%205.982%200%20011.578%202.891c.385%201.901-.01%203.615-1.183%205.14l-.182.22a6.063%206.063%200%2001-2.934%201.851.162.162%200%2000-.108.102c-.255.736-.511%201.364-.987%201.992-1.199%201.582-2.962%202.462-4.948%202.451-1.583-.008-2.986-.587-4.21-1.736a.145.145%200%2000-.14-.032c-.518.167-1.04.191-1.604.185a5.924%205.924%200%2001-2.595-.622%206.058%206.058%200%2001-2.146-1.781c-.203-.269-.404-.522-.551-.821a7.74%207.74%200%2001-.495-1.283%206.11%206.11%200%2001-.017-3.064.166.166%200%2000.008-.074.115.115%200%2000-.037-.064%205.958%205.958%200%2001-1.38-2.202%205.196%205.196%200%2001-.333-1.589%206.915%206.915%200%2001.188-2.132c.45-1.484%201.309-2.648%202.577-3.493.282-.188.55-.334.802-.438.286-.12.573-.22.861-.304a.129.129%200%2000.087-.087A6.016%206.016%200%20015.635%202.31C6.315%201.464%207.132.846%208.086.457zm-.804%207.85a.848.848%200%2000-1.473.842l1.694%202.965-1.688%202.848a.849.849%200%20001.46.864l1.94-3.272a.849.849%200%2000.007-.854l-1.94-3.393zm5.446%206.24a.849.849%200%20000%201.695h4.848a.849.849%200%20000-1.696h-4.848z'%3e%3c/path%3e%3c/svg%3e",r="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20id='cursor_light__Ebene_1'%20xmlns='http://www.w3.org/2000/svg'%20version='1.1'%20viewBox='0%200%20466.73%20532.09'%3e%3c!--Generator:%20Adobe%20Illustrator%2029.6.1,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%202.1.1%20Build%209)--%3e%3cdefs%3e%3cstyle%3e.cursor_light__st0{fill:%2326251e}%3c/style%3e%3c/defs%3e%3cpath%20class='cursor_light__st0'%20d='M457.43,125.94L244.42,2.96c-6.84-3.95-15.28-3.95-22.12,0L9.3,125.94c-5.75,3.32-9.3,9.46-9.3,16.11v247.99c0,6.65,3.55,12.79,9.3,16.11l213.01,122.98c6.84,3.95,15.28,3.95,22.12,0l213.01-122.98c5.75-3.32,9.3-9.46,9.3-16.11v-247.99c0-6.65-3.55-12.79-9.3-16.11h-.01ZM444.05,151.99l-205.63,356.16c-1.39,2.4-5.06,1.42-5.06-1.36v-233.21c0-4.66-2.49-8.97-6.53-11.31L24.87,145.67c-2.4-1.39-1.42-5.06,1.36-5.06h411.26c5.84,0,9.49,6.33,6.57,11.39h-.01Z'/%3e%3c/svg%3e",d="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20id='cursor_dark__Ebene_1'%20xmlns='http://www.w3.org/2000/svg'%20version='1.1'%20viewBox='0%200%20466.73%20532.09'%3e%3c!--Generator:%20Adobe%20Illustrator%2029.6.1,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%202.1.1%20Build%209)--%3e%3cdefs%3e%3cstyle%3e.cursor_dark__st0{fill:%23edecec}%3c/style%3e%3c/defs%3e%3cpath%20class='cursor_dark__st0'%20d='M457.43,125.94L244.42,2.96c-6.84-3.95-15.28-3.95-22.12,0L9.3,125.94c-5.75,3.32-9.3,9.46-9.3,16.11v247.99c0,6.65,3.55,12.79,9.3,16.11l213.01,122.98c6.84,3.95,15.28,3.95,22.12,0l213.01-122.98c5.75-3.32,9.3-9.46,9.3-16.11v-247.99c0-6.65-3.55-12.79-9.3-16.11h-.01ZM444.05,151.99l-205.63,356.16c-1.39,2.4-5.06,1.42-5.06-1.36v-233.21c0-4.66-2.49-8.97-6.53-11.31L24.87,145.67c-2.4-1.39-1.42-5.06,1.36-5.06h411.26c5.84,0,9.49,6.33,6.57,11.39h-.01Z'/%3e%3c/svg%3e",n="data:image/svg+xml,%3csvg%20width='512'%20height='512'%20viewBox='0%200%20512%20512'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20width='512'%20height='512'%20fill='%23FDFCFC'/%3e%3cpath%20d='M320%20224V352H192V224H320Z'%20fill='%23E6E5E6'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M384%20416H128V96H384V416ZM320%20160H192V352H320V160Z'%20fill='%2317181C'/%3e%3c/svg%3e",g="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20version='1.1'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='512'%20height='512'%3e%3csvg%20width='512'%20height='512'%20viewBox='0%200%20512%20512'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20width='512'%20height='512'%20fill='%23131010'%3e%3c/rect%3e%3cpath%20d='M320%20224V352H192V224H320Z'%20fill='%235A5858'%3e%3c/path%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M384%20416H128V96H384V416ZM320%20160H192V352H320V160Z'%20fill='white'%3e%3c/path%3e%3c/svg%3e%3cstyle%3e@media%20(prefers-color-scheme:%20light)%20{%20:root%20{%20filter:%20none;%20}%20}%20@media%20(prefers-color-scheme:%20dark)%20{%20:root%20{%20filter:%20none;%20}%20}%20%3c/style%3e%3c/svg%3e",i=[{name:"Claude",light:s,dark:a},{name:"Codex",light:h,dark:o},{name:"Cursor",light:r,dark:d},{name:"OpenCode",light:n,dark:g}];function w(){return e.jsx("span",{className:"ml-1 inline-flex shrink-0 items-center gap-1.5","aria-hidden":"true",children:i.map(({name:l,light:t,dark:c})=>e.jsxs("span",{title:l,className:"inline-flex h-[18px] w-[18px]",children:[e.jsx("img",{src:t,alt:"",width:18,height:18,className:"h-full w-full object-contain dark:hidden"}),e.jsx("img",{src:c,alt:"",width:18,height:18,className:"hidden h-full w-full object-contain dark:block"})]},l))})}function m(){return e.jsx("ul",{className:"flex flex-wrap gap-2","aria-label":"Supported coding agents",children:i.map(({name:l,light:t,dark:c})=>e.jsxs("li",{className:"inline-flex items-center gap-2 rounded-full border px-3 py-1 text-sm",children:[e.jsx("img",{src:t,alt:"",width:18,height:18,className:"h-[18px] w-[18px] object-contain dark:hidden"}),e.jsx("img",{src:c,alt:"",width:18,height:18,className:"hidden h-[18px] w-[18px] object-contain dark:block"}),l]},l))})}export{w as A,m as a};
assets/{AiDeadlinesView-BWqSvLms.js → AiDeadlinesView-BhXjtcbF.js} RENAMED
@@ -1,3 +1,3 @@
1
- import{r as g,j as t}from"./index-YwiKC6Po.js";import{u as R}from"./useQuery-DPH6Mb2w.js";import{c as A}from"./catalog-B15Yh5dN.js";import{S as L}from"./switch-Crqp0RkL.js";import{S as B}from"./skeleton-CXR1qouH.js";import{A as W,a as U}from"./alert-Cx5luC5D.js";import{s as $}from"./safeExternalHref-CkBrsh84.js";import{D as M,a as O,c as V,b as P,d as G}from"./dialog-foxx0Wu6.js";import{s as H,n as S,f as _,p as K,u as N,l as k,a as I,c as b,D as Y,b as E,d as q}from"./deadlines-BH32v7D1.js";import"./index-BaDZKp6X.js";const w={fontFamily:"var(--mono)",fontSize:10,letterSpacing:"0.12em",textTransform:"uppercase",color:"var(--ink-faint)"},Q=(e,l)=>{const s=Math.ceil((e-l)/Y);return s<=0?"passed":`${s} ${s===1?"day":"days"}`},F=(e,l)=>{const s=_(e.start_date,e.end_date),r=e.venue||[e.city,e.country].filter(Boolean).join(", ");return[`${l.label||l.type||"Deadline"} for ${e.name}`,s?`Dates: ${s}`:null,r?`Location: ${r}`:null,e.url?`Website: ${e.url}`:null].filter(Boolean).join(`
2
  `)},C=e=>e.toISOString().replace(/[-:]/g,"").replace(/\.\d{3}/,""),J=(e,l)=>{const s=new Date(l.deadline_at),r=new Date(s.getTime()+60*60*1e3),o=`${e.short_name||e.name} ${l.label||l.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=${C(s)}/${C(r)}&details=${encodeURIComponent(F(e,l))}&location=${encodeURIComponent(h)}`,p=$(n);p&&window.open(p,"_blank","noopener,noreferrer")},X=(e,l)=>{const s=new Date(l.deadline_at),r=new Date(s.getTime()+60*60*1e3),o=`${e.short_name||e.name} ${l.label||l.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:${C(s)}`,`DTEND:${C(r)}`,`SUMMARY:${o}`,`DESCRIPTION:${F(e,l).replace(/\n/g,"\\n")}`,h?`LOCATION:${h}`:null,"END:VEVENT","END:VCALENDAR"].filter(Boolean).join(`
3
  `),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)},Z=({conf:e,open:l,onOpenChange:s})=>{const[r,o]=g.useState(()=>Date.now());g.useEffect(()=>{if(!l)return;o(Date.now());const i=setInterval(()=>o(Date.now()),1e3);return()=>clearInterval(i)},[l]);const h=g.useMemo(()=>e?H(e):[],[e]),n=g.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(M,{open:l,onOpenChange:s,children:t.jsx(O,{className:"max-w-xl",style:{background:"var(--bg-elevated)",maxHeight:"85vh",overflowY:"auto"},children:e&&t.jsxs(t.Fragment,{children:[t.jsxs(V,{children:[t.jsx(P,{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(G,{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:K(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:"No deadlines listed"}):h.map((i,c)=>{const y=new Date(i.deadline_at).getTime(),a=n!=null&&i.deadline_at===n.deadline_at&&i.type===n.type,u=y<=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:[I(i.deadline_at),i.timezone?` · ${i.timezone}`:""]})]}),t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:12,fontWeight:600,whiteSpace:"nowrap",color:N(u?null:y,r)},children:Q(y,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:()=>J(e,n),style:{background:"var(--bg-subtle)",color:"var(--ink-soft)"},children:"+ Google Calendar"}),t.jsx("button",{type:"button",className:"tag-chip",onClick:()=>X(e,n),style:{background:"var(--bg-subtle)",color:"var(--ink-soft)"},children:"+ Apple / .ics"})]})]})]})]})})})},z=({id:e,label:l,checked:s,onChange:r})=>t.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,fontFamily:"var(--mono)",fontSize:12,color:"var(--ink-soft)"},children:[t.jsx(L,{id:e,checked:s,onCheckedChange:r}),t.jsx("label",{htmlFor:e,style:{cursor:"pointer"},children:l})]}),ee=({conf:e,now:l,selectedDomains:s,onToggleDomain:r,onOpen:o})=>{const h=S(e,l),n=h??E(e),p=n?new Date(n.deadline_at).getTime():null,d=N(h?p:null,l),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)||"Deadline"}),t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:12,color:"var(--ink-soft)"},children:n?`${I(n.deadline_at)}${n.timezone?` · ${n.timezone}`:""}`:"TBD"})]}),t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:14,fontWeight:600,color:d,whiteSpace:"nowrap"},children:p!=null?q(p,l):"TBD"})]}),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 y=s.has(c);return t.jsx("button",{className:"tag-chip",onClick:a=>{a.stopPropagation(),r(c)},style:{background:y?"var(--ink)":"var(--bg-subtle)",color:y?"var(--bg)":"var(--ink-soft)"},children:k(c)},c)})})]})},pe=()=>{const[e,l]=g.useState(!0),[s,r]=g.useState(!1),[o,h]=g.useState(new Set),[n,p]=g.useState(null),d=g.useMemo(()=>Date.now(),[]),m=R({queryKey:["conference-deadlines"],queryFn:()=>A.conferenceDeadlines(),staleTime:10*60*1e3}),i=a=>{h(u=>{const x=new Set(u);return x.has(a)?x.delete(a):x.add(a),x})},c=g.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]),y=g.useMemo(()=>{var j;const u=(((j=m.data)==null?void 0:j.results)??[]).filter(f=>!(e&&f.tier!=="a"||o.size>0&&!b(f).some(v=>o.has(v))||!s&&!S(f,d))),x=f=>{const D=S(f,d);if(D)return{group:0,time:new Date(D.deadline_at).getTime()};const v=E(f);return{group:1,time:-(v?new Date(v.deadline_at).getTime():0)}};return[...u].sort((f,D)=>{const v=x(f),T=x(D);return v.group!==T.group?v.group-T.group:v.time-T.time})},[m.data,e,s,o,d]);return m.error?t.jsx("div",{className:"page",children:t.jsx(W,{variant:"destructive",children:t.jsx(U,{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(z,{id:"top-tier-only",label:"Top tier only",checked:e,onChange:l}),t.jsx(z,{id:"show-past",label:"Show past conferences",checked:s,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?"…":`${y.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(B,{className:"h-44"},u))}):y.length===0?t.jsxs("div",{className:"no-results",children:["No conferences match these filters",s?".":" — try enabling “Show past conferences”."]}):t.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(320px, 1fr))",gap:16},children:y.map(a=>t.jsx(ee,{conf:a,now:d,selectedDomains:o,onToggleDomain:i,onOpen:p},a.id))}),t.jsx(Z,{conf:n,open:n!==null,onOpenChange:a=>{a||p(null)}})]})};export{pe as default};
 
1
+ import{r as g,j as t}from"./index-CbgxfyGU.js";import{u as R}from"./useQuery-Bx9s5-D2.js";import{c as A}from"./catalog-DhK7_9-6.js";import{S as L}from"./switch-BSZohE4x.js";import{S as B}from"./skeleton-HwvdxvSN.js";import{A as W,a as U}from"./alert-CFDDvdIM.js";import{s as $}from"./safeExternalHref-CkBrsh84.js";import{D as M,a as O,c as V,b as P,d as G}from"./dialog-Cfp_d3CC.js";import{s as H,n as S,f as _,p as K,u as N,l as k,a as I,c as b,D as Y,b as E,d as q}from"./deadlines-BH32v7D1.js";import"./index-CxPKwmVQ.js";const w={fontFamily:"var(--mono)",fontSize:10,letterSpacing:"0.12em",textTransform:"uppercase",color:"var(--ink-faint)"},Q=(e,l)=>{const s=Math.ceil((e-l)/Y);return s<=0?"passed":`${s} ${s===1?"day":"days"}`},F=(e,l)=>{const s=_(e.start_date,e.end_date),r=e.venue||[e.city,e.country].filter(Boolean).join(", ");return[`${l.label||l.type||"Deadline"} for ${e.name}`,s?`Dates: ${s}`:null,r?`Location: ${r}`:null,e.url?`Website: ${e.url}`:null].filter(Boolean).join(`
2
  `)},C=e=>e.toISOString().replace(/[-:]/g,"").replace(/\.\d{3}/,""),J=(e,l)=>{const s=new Date(l.deadline_at),r=new Date(s.getTime()+60*60*1e3),o=`${e.short_name||e.name} ${l.label||l.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=${C(s)}/${C(r)}&details=${encodeURIComponent(F(e,l))}&location=${encodeURIComponent(h)}`,p=$(n);p&&window.open(p,"_blank","noopener,noreferrer")},X=(e,l)=>{const s=new Date(l.deadline_at),r=new Date(s.getTime()+60*60*1e3),o=`${e.short_name||e.name} ${l.label||l.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:${C(s)}`,`DTEND:${C(r)}`,`SUMMARY:${o}`,`DESCRIPTION:${F(e,l).replace(/\n/g,"\\n")}`,h?`LOCATION:${h}`:null,"END:VEVENT","END:VCALENDAR"].filter(Boolean).join(`
3
  `),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)},Z=({conf:e,open:l,onOpenChange:s})=>{const[r,o]=g.useState(()=>Date.now());g.useEffect(()=>{if(!l)return;o(Date.now());const i=setInterval(()=>o(Date.now()),1e3);return()=>clearInterval(i)},[l]);const h=g.useMemo(()=>e?H(e):[],[e]),n=g.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(M,{open:l,onOpenChange:s,children:t.jsx(O,{className:"max-w-xl",style:{background:"var(--bg-elevated)",maxHeight:"85vh",overflowY:"auto"},children:e&&t.jsxs(t.Fragment,{children:[t.jsxs(V,{children:[t.jsx(P,{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(G,{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:K(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:"No deadlines listed"}):h.map((i,c)=>{const y=new Date(i.deadline_at).getTime(),a=n!=null&&i.deadline_at===n.deadline_at&&i.type===n.type,u=y<=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:[I(i.deadline_at),i.timezone?` · ${i.timezone}`:""]})]}),t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:12,fontWeight:600,whiteSpace:"nowrap",color:N(u?null:y,r)},children:Q(y,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:()=>J(e,n),style:{background:"var(--bg-subtle)",color:"var(--ink-soft)"},children:"+ Google Calendar"}),t.jsx("button",{type:"button",className:"tag-chip",onClick:()=>X(e,n),style:{background:"var(--bg-subtle)",color:"var(--ink-soft)"},children:"+ Apple / .ics"})]})]})]})]})})})},z=({id:e,label:l,checked:s,onChange:r})=>t.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,fontFamily:"var(--mono)",fontSize:12,color:"var(--ink-soft)"},children:[t.jsx(L,{id:e,checked:s,onCheckedChange:r}),t.jsx("label",{htmlFor:e,style:{cursor:"pointer"},children:l})]}),ee=({conf:e,now:l,selectedDomains:s,onToggleDomain:r,onOpen:o})=>{const h=S(e,l),n=h??E(e),p=n?new Date(n.deadline_at).getTime():null,d=N(h?p:null,l),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)||"Deadline"}),t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:12,color:"var(--ink-soft)"},children:n?`${I(n.deadline_at)}${n.timezone?` · ${n.timezone}`:""}`:"TBD"})]}),t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:14,fontWeight:600,color:d,whiteSpace:"nowrap"},children:p!=null?q(p,l):"TBD"})]}),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 y=s.has(c);return t.jsx("button",{className:"tag-chip",onClick:a=>{a.stopPropagation(),r(c)},style:{background:y?"var(--ink)":"var(--bg-subtle)",color:y?"var(--bg)":"var(--ink-soft)"},children:k(c)},c)})})]})},pe=()=>{const[e,l]=g.useState(!0),[s,r]=g.useState(!1),[o,h]=g.useState(new Set),[n,p]=g.useState(null),d=g.useMemo(()=>Date.now(),[]),m=R({queryKey:["conference-deadlines"],queryFn:()=>A.conferenceDeadlines(),staleTime:10*60*1e3}),i=a=>{h(u=>{const x=new Set(u);return x.has(a)?x.delete(a):x.add(a),x})},c=g.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]),y=g.useMemo(()=>{var j;const u=(((j=m.data)==null?void 0:j.results)??[]).filter(f=>!(e&&f.tier!=="a"||o.size>0&&!b(f).some(v=>o.has(v))||!s&&!S(f,d))),x=f=>{const D=S(f,d);if(D)return{group:0,time:new Date(D.deadline_at).getTime()};const v=E(f);return{group:1,time:-(v?new Date(v.deadline_at).getTime():0)}};return[...u].sort((f,D)=>{const v=x(f),T=x(D);return v.group!==T.group?v.group-T.group:v.time-T.time})},[m.data,e,s,o,d]);return m.error?t.jsx("div",{className:"page",children:t.jsx(W,{variant:"destructive",children:t.jsx(U,{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(z,{id:"top-tier-only",label:"Top tier only",checked:e,onChange:l}),t.jsx(z,{id:"show-past",label:"Show past conferences",checked:s,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?"…":`${y.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(B,{className:"h-44"},u))}):y.length===0?t.jsxs("div",{className:"no-results",children:["No conferences match these filters",s?".":" — try enabling “Show past conferences”."]}):t.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(320px, 1fr))",gap:16},children:y.map(a=>t.jsx(ee,{conf:a,now:d,selectedDomains:o,onToggleDomain:i,onOpen:p},a.id))}),t.jsx(Z,{conf:n,open:n!==null,onOpenChange:a=>{a||p(null)}})]})};export{pe as default};
assets/{ApiDocsView-Bb326kAF.js → ApiDocsView-hjoHKqpf.js} RENAMED
@@ -1,4 +1,4 @@
1
- import{a5 as m,r as o,j as e}from"./index-YwiKC6Po.js";import{u as f}from"./useQuery-DPH6Mb2w.js";import{M as g}from"./index-CoRCN2p0.js";const y={queryKey:["public-api-schema"],queryFn:()=>m("/openapi.json",{credentials:"omit"}),staleTime:5*60*1e3};function b(s,r){const n=new URLSearchParams;for(const[a,t]of Object.entries(r["x-example-parameters"]))s.includes(`{${a}}`)?s=s.replace(`{${a}}`,encodeURIComponent(String(t))):n.append(a,String(t));return`https://paperswithcode.co${s}${n.size?`?${n}`:""}`}function w(s,r){return r==="Python"?`import requests
2
 
3
  response = requests.get(${JSON.stringify(s)}, timeout=30)
4
  response.raise_for_status()
 
1
+ import{a6 as m,r as o,j as e}from"./index-CbgxfyGU.js";import{u as f}from"./useQuery-Bx9s5-D2.js";import{M as g}from"./index-ZkEATkOr.js";const y={queryKey:["public-api-schema"],queryFn:()=>m("/openapi.json",{credentials:"omit"}),staleTime:5*60*1e3};function b(s,r){const n=new URLSearchParams;for(const[a,t]of Object.entries(r["x-example-parameters"]))s.includes(`{${a}}`)?s=s.replace(`{${a}}`,encodeURIComponent(String(t))):n.append(a,String(t));return`https://paperswithcode.co${s}${n.size?`?${n}`:""}`}function w(s,r){return r==="Python"?`import requests
2
 
3
  response = requests.get(${JSON.stringify(s)}, timeout=30)
4
  response.raise_for_status()
assets/{AreaSection-CfCNkiTd.js → AreaSection-NWvfO4Sb.js} RENAMED
@@ -1 +1 @@
1
- import{j as s}from"./index-YwiKC6Po.js";import{S as l}from"./skeleton-CXR1qouH.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};
 
1
+ import{j as s}from"./index-CbgxfyGU.js";import{S as l}from"./skeleton-HwvdxvSN.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};
assets/{ArtifactWorkspace-BxDA6yNF.js → ArtifactWorkspace-Cwix1Wp6.js} RENAMED
@@ -1,4 +1,4 @@
1
- var TL=Object.defineProperty;var yA=n=>{throw TypeError(n)};var PL=(n,e,t)=>e in n?TL(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var oe=(n,e,t)=>PL(n,typeof e!="symbol"?e+"":e,t),av=(n,e,t)=>e.has(n)||yA("Cannot "+t);var f=(n,e,t)=>(av(n,e,"read from private field"),t?t.call(n):e.get(n)),M=(n,e,t)=>e.has(n)?yA("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(n):e.set(n,t),$=(n,e,t,s)=>(av(n,e,"write to private field"),s?s.call(n,t):e.set(n,t),t),P=(n,e,t)=>(av(n,e,"access private method"),t);var hs=(n,e,t,s)=>({set _(i){$(n,e,i,t)},get _(){return f(n,e,s)}});import{n as Mo,r as q,j as S,K as ee,_ as eS,$ as rn,a0 as gm,a1 as l0,L as Nd,a2 as RL,X as c0,a3 as ML,f as ZC,C as IL}from"./index-YwiKC6Po.js";import{u as XC,a as OL,c as NL,P as YC,i as LL,b as JC,e as tS,A as DL,v as jL,Z as FL,_ as zL,$ as HL,a0 as QC,a1 as BL}from"./chatSessions-CdNQ1toA.js";/* empty css */import{H as Np,a as Lp,b as Dp}from"./hover-card-BY9tUGxy.js";import{u as wo}from"./useQuery-DPH6Mb2w.js";import{f as UL,i as e$,p as qL,C as VL,a as WL,T as GL}from"./CatalogEntityPreviewLink-Cv_oezOz.js";import{G as h0}from"./github-BZMCt7Ub.js";import{F as t$}from"./file-text-Cijxx2XD.js";import{r as KL,a as ZL,P as u0,c as XL}from"./PaperPreviewLink-CKfmgBjs.js";import{M as YL,d as JL}from"./index-CoRCN2p0.js";import{r as QL}from"./index-BM_xSDJM.js";import{c as vA}from"./chat-DHGOonJg.js";import{C as eD}from"./copy-YHg6twss.js";import{T as tD}from"./thumbs-up-D9G2aLNB.js";import{u as ym}from"./useMutation-f6iDkf3w.js";import{A as nD}from"./arrow-left-B08fyfNi.js";import{E as n$}from"./external-link-4bBJT0yO.js";import{P as sD}from"./plus-Cfz0QbT1.js";import{S as iD}from"./search-wcEXdf1i.js";import{C as s$,a as i$}from"./chevron-up-BXtxbTfV.js";import{A as rD}from"./AuthorAvatar-CoTET6B3.js";import{a as oD}from"./paperQueryKeys-C5FMa4Oj.js";/**
2
  * @license lucide-react v0.462.0 - ISC
3
  *
4
  * This source code is licensed under the ISC license.
 
1
+ var TL=Object.defineProperty;var yA=n=>{throw TypeError(n)};var PL=(n,e,t)=>e in n?TL(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var oe=(n,e,t)=>PL(n,typeof e!="symbol"?e+"":e,t),av=(n,e,t)=>e.has(n)||yA("Cannot "+t);var f=(n,e,t)=>(av(n,e,"read from private field"),t?t.call(n):e.get(n)),M=(n,e,t)=>e.has(n)?yA("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(n):e.set(n,t),$=(n,e,t,s)=>(av(n,e,"write to private field"),s?s.call(n,t):e.set(n,t),t),P=(n,e,t)=>(av(n,e,"access private method"),t);var hs=(n,e,t,s)=>({set _(i){$(n,e,i,t)},get _(){return f(n,e,s)}});import{n as Mo,r as q,j as S,M as ee,$ as eS,a0 as rn,a1 as gm,a2 as l0,L as Nd,a3 as RL,X as c0,a4 as ML,f as ZC,C as IL}from"./index-CbgxfyGU.js";import{u as XC,a as OL,c as NL,P as YC,i as LL,b as JC,e as tS,A as DL,v as jL,Z as FL,_ as zL,$ as HL,a0 as QC,a1 as BL}from"./chatSessions-DwLUbLRo.js";/* empty css */import{H as Np,a as Lp,b as Dp}from"./hover-card-ufez2uMo.js";import{u as wo}from"./useQuery-Bx9s5-D2.js";import{f as UL,i as e$,p as qL,C as VL,a as WL,T as GL}from"./CatalogEntityPreviewLink-Cvehtzvn.js";import{G as h0}from"./github-BYklgHDz.js";import{F as t$}from"./file-text-BK_7Q2rV.js";import{r as KL,a as ZL,P as u0,c as XL}from"./PaperPreviewLink-DZDNIh1g.js";import{M as YL,d as JL}from"./index-ZkEATkOr.js";import{r as QL}from"./index-BH3yOoza.js";import{c as vA}from"./chat-DzTo2WUO.js";import{C as eD}from"./copy-bzw7JVus.js";import{T as tD}from"./thumbs-up-CDCzGuPd.js";import{u as ym}from"./useMutation-P_trTy9i.js";import{A as nD}from"./arrow-left-Czeu3VzJ.js";import{E as n$}from"./external-link-DZIH4GGr.js";import{P as sD}from"./plus-UK0TEjgd.js";import{S as iD}from"./search-CLtAJGOp.js";import{C as s$,a as i$}from"./chevron-up-Cpt5JLeI.js";import{A as rD}from"./AuthorAvatar-CUJMmp_z.js";import{a as oD}from"./paperQueryKeys-B8u1BWlI.js";/**
2
  * @license lucide-react v0.462.0 - ISC
3
  *
4
  * This source code is licensed under the ISC license.
assets/{AstraForRoboticsView-CqbM4y2W.js → AstraForRoboticsView-pQ4cp5_V.js} RENAMED
@@ -1 +1 @@
1
- import{r as h,j as a,L as o}from"./index-YwiKC6Po.js";import{u,b as g,a as x}from"./PaperFeed-kaLm5US2.js";import{A as f,a as b}from"./alert-Cx5luC5D.js";import{u as j}from"./usePapers-C1deOZKl.js";import{p as y,a as v}from"./paperQueryKeys-C5FMa4Oj.js";import{f as k,D as w}from"./latexPlainText-DI8YEXVe.js";import{t as A}from"./transform-CNg3rvXk.js";import"./PaperCard-FG-bEpJk.js";import"./AuthorAvatar-CoTET6B3.js";import"./SotaBadges-DiQuEzfo.js";import"./colors-BkWRhvFI.js";import"./Icon-DXQ4sjQk.js";import"./LatexTitle-DI6voLfI.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-D7ygxg37.js";import"./skeleton-CXR1qouH.js";import"./useIntersectionObserver-Dt36kyjs.js";import"./useQuery-DPH6Mb2w.js";import"./useInfiniteQuery-BEbL80ez.js";import"./curation-CkzNFTMJ.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"}],m=({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))})]}),J=()=>{var l,c;const s=u(),e=j([...y.feeds.infinite,{task:n,method:i,...s.filters}],r=>v.list({...s.filters,task:n,method:i,page:r,page_size:12}));h.useEffect(()=>(document.title=k("GPT-6 Astra for Robotics"),()=>{document.title=w}),[]);const t=h.useMemo(()=>{var r;return(((r=e.data)==null?void 0:r.pages)??[]).flatMap(p=>p.results.map(A))},[e.data]),d=((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(m,{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(m,{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:["[",d.toLocaleString(),"]"]})]})]}),a.jsx(g,{feed:s,showDateFilter:!1}),e.error?a.jsx(f,{variant:"destructive",children:a.jsx(b,{children:"Failed to load the collection. Please try again."})}):a.jsx(x,{query:e,cards:t,empty:"No papers match this selection yet."})]})};export{J as default};
 
1
+ import{r as h,j as a,L as o}from"./index-CbgxfyGU.js";import{u,b as g,a as x}from"./PaperFeed-DMvUfA47.js";import{A as f,a as b}from"./alert-CFDDvdIM.js";import{u as j}from"./usePapers-CJaWLZ3y.js";import{p as y,a as v}from"./paperQueryKeys-B8u1BWlI.js";import{f as k,D as w}from"./latexPlainText-DI8YEXVe.js";import{t as A}from"./transform-0Udg2p6b.js";import"./PaperCard-tdTC_dRN.js";import"./AuthorAvatar-CUJMmp_z.js";import"./SotaBadges-C-sTR-EF.js";import"./colors-BkWRhvFI.js";import"./Icon-D-kA0Owz.js";import"./LatexTitle-Z-HGmZ-H.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-DKJYnYjk.js";import"./skeleton-HwvdxvSN.js";import"./useIntersectionObserver-CID9Kkak.js";import"./useQuery-Bx9s5-D2.js";import"./useInfiniteQuery-BAc_4HO5.js";import"./curation-C7Gmmp4z.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"}],m=({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))})]}),J=()=>{var l,c;const s=u(),e=j([...y.feeds.infinite,{task:n,method:i,...s.filters}],r=>v.list({...s.filters,task:n,method:i,page:r,page_size:12}));h.useEffect(()=>(document.title=k("GPT-6 Astra for Robotics"),()=>{document.title=w}),[]);const t=h.useMemo(()=>{var r;return(((r=e.data)==null?void 0:r.pages)??[]).flatMap(p=>p.results.map(A))},[e.data]),d=((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(m,{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(m,{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:["[",d.toLocaleString(),"]"]})]})]}),a.jsx(g,{feed:s,showDateFilter:!1}),e.error?a.jsx(f,{variant:"destructive",children:a.jsx(b,{children:"Failed to load the collection. Please try again."})}):a.jsx(x,{query:e,cards:t,empty:"No papers match this selection yet."})]})};export{J as default};
assets/{AuthorAvatar-CoTET6B3.js → AuthorAvatar-CUJMmp_z.js} RENAMED
@@ -1 +1 @@
1
- import{r as c,j as e}from"./index-YwiKC6Po.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 r=e.jsx("img",{className:`author-avatar-base ${o}`,src:s,alt:"",loading:"lazy",onError:()=>l(!0)});return t?e.jsx("a",{href:t,target:"_blank",rel:"noopener noreferrer","aria-label":n,children:r}):r};export{h as A};
 
1
+ import{r as c,j as e}from"./index-CbgxfyGU.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 r=e.jsx("img",{className:`author-avatar-base ${o}`,src:s,alt:"",loading:"lazy",onError:()=>l(!0)});return t?e.jsx("a",{href:t,target:"_blank",rel:"noopener noreferrer","aria-label":n,children:r}):r};export{h as A};
assets/{AuthorDetailView-ETu8URv_.js → AuthorDetailView-BpcSKHs1.js} RENAMED
@@ -1 +1 @@
1
- import{u as b,j as a,r as N,ah as v,L as F}from"./index-YwiKC6Po.js";import{u as y}from"./useQuery-DPH6Mb2w.js";import{A}from"./AuthorAvatar-CoTET6B3.js";import{u as k,b as P,a as $}from"./PaperFeed-kaLm5US2.js";import{R as S}from"./ResearchFollowButton-BFXC8E3t.js";import{A as L,a as R}from"./alert-Cx5luC5D.js";import{S as w}from"./skeleton-CXR1qouH.js";import{u as z}from"./usePapers-C1deOZKl.js";import{p as C,a as m}from"./paperQueryKeys-C5FMa4Oj.js";import{i as H}from"./apiErrors-DBfE_SVR.js";import{t as q}from"./transform-CNg3rvXk.js";import f from"./NotFound-D8hwuoEl.js";import"./PaperCard-FG-bEpJk.js";import"./SotaBadges-DiQuEzfo.js";import"./colors-BkWRhvFI.js";import"./Icon-DXQ4sjQk.js";import"./LatexTitle-DI6voLfI.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-D7ygxg37.js";import"./useIntersectionObserver-Dt36kyjs.js";import"./useMutation-f6iDkf3w.js";import"./research-5UpiU-ea.js";import"./plus-Cfz0QbT1.js";import"./useInfiniteQuery-BEbL80ez.js";import"./curation-CkzNFTMJ.js";const Q=({authorId:r})=>{var n,i,l,p,c,d,h,u;const o=k(),{searchParams:g}=o,e=y({queryKey:["author",r],queryFn:()=>m.getAuthor(r)}),s=z([...C.feeds.infinite,{author:r,...o.filters}],t=>m.list({...o.filters,author:r,page:t,page_size:12})),x=N.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(v,{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(F,{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(A,{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(w,{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(S,{kind:"author",entityId:e.data.id})]}),a.jsx(P,{feed:o,style:{alignItems:"center",gap:16},children:a.jsxs("div",{className:"results-count",children:[j.toLocaleString()," papers"]})}),s.error?a.jsx(L,{variant:"destructive",children:a.jsxs(R,{children:["Failed to load papers."," ",a.jsx("button",{type:"button",onClick:()=>void s.refetch(),children:"Try again"})]})}):a.jsx($,{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."})]})},pa=()=>{const{authorId:r}=b();return r?a.jsx(Q,{authorId:r},r):a.jsx(f,{})};export{pa as default};
 
1
+ import{u as b,j as a,r as N,ai as v,L as F}from"./index-CbgxfyGU.js";import{u as y}from"./useQuery-Bx9s5-D2.js";import{A}from"./AuthorAvatar-CUJMmp_z.js";import{u as k,b as P,a as $}from"./PaperFeed-DMvUfA47.js";import{R as S}from"./ResearchFollowButton-D2BXlDtQ.js";import{A as L,a as R}from"./alert-CFDDvdIM.js";import{S as w}from"./skeleton-HwvdxvSN.js";import{u as z}from"./usePapers-CJaWLZ3y.js";import{p as C,a as m}from"./paperQueryKeys-B8u1BWlI.js";import{i as H}from"./apiErrors-BZ5h1Kmb.js";import{t as q}from"./transform-0Udg2p6b.js";import f from"./NotFound-DtzwOULp.js";import"./PaperCard-tdTC_dRN.js";import"./SotaBadges-C-sTR-EF.js";import"./colors-BkWRhvFI.js";import"./Icon-D-kA0Owz.js";import"./LatexTitle-Z-HGmZ-H.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-DKJYnYjk.js";import"./useIntersectionObserver-CID9Kkak.js";import"./useMutation-P_trTy9i.js";import"./research-DgpyzSy_.js";import"./plus-UK0TEjgd.js";import"./useInfiniteQuery-BAc_4HO5.js";import"./curation-C7Gmmp4z.js";const Q=({authorId:r})=>{var n,i,l,p,c,d,h,u;const o=k(),{searchParams:g}=o,e=y({queryKey:["author",r],queryFn:()=>m.getAuthor(r)}),s=z([...C.feeds.infinite,{author:r,...o.filters}],t=>m.list({...o.filters,author:r,page:t,page_size:12})),x=N.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(v,{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(F,{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(A,{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(w,{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(S,{kind:"author",entityId:e.data.id})]}),a.jsx(P,{feed:o,style:{alignItems:"center",gap:16},children:a.jsxs("div",{className:"results-count",children:[j.toLocaleString()," papers"]})}),s.error?a.jsx(L,{variant:"destructive",children:a.jsxs(R,{children:["Failed to load papers."," ",a.jsx("button",{type:"button",onClick:()=>void s.refetch(),children:"Try again"})]})}):a.jsx($,{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."})]})},pa=()=>{const{authorId:r}=b();return r?a.jsx(Q,{authorId:r},r):a.jsx(f,{})};export{pa as default};
assets/{AuthorizePaperEditView-BxV6NPKV.js → AuthorizePaperEditView-D0e1jji8.js} RENAMED
@@ -1 +1 @@
1
- import{u,a as d,j as e,L as l,H as p}from"./index-YwiKC6Po.js";import{u as c}from"./useQuery-DPH6Mb2w.js";import{u as h}from"./useMutation-f6iDkf3w.js";import{B as m}from"./button-B90pJJiy.js";import{p as n}from"./paperEdits-B8a9u4Tx.js";function b(){const{authorizationId:t=""}=u(),{user:s,isLoading:o}=d(),i=c({queryKey:["paper-edit-authorization",t],queryFn:()=>n.authorization(t),retry:!1}),r=h({mutationFn:()=>n.approve(t)}),a=i.data;return e.jsxs("main",{className:"mx-auto max-w-xl space-y-5 px-6 py-12",children:[e.jsx("h1",{className:"text-2xl font-semibold",children:"Authorize your agent to edit a paper"}),(i.isLoading||o)&&e.jsx("p",{children:"Loading authorization…"}),i.error&&e.jsx("p",{role:"alert",children:i.error.message}),a&&e.jsxs(e.Fragment,{children:[e.jsx(l,{className:"underline",to:`/paper/${a.paper_id}`,children:a.title}),e.jsxs("p",{children:["Check that your CLI shows this code: ",e.jsx("strong",{className:"font-mono",children:a.user_code})]}),e.jsx("p",{children:"Only approve a request you started. Your agent will be able to publish changes to this paper’s links, tags, and evaluation results for one hour, without further approval."}),e.jsx("p",{children:"Edits appear publicly under your Hugging Face username. You can edit up to 20 distinct papers per UTC day. Evaluation deletion and changes to shared benchmark definitions require an administrator."}),r.isSuccess||a.approved?e.jsx("p",{role:"status",children:"Access approved. Return to your CLI to continue."}):s?e.jsxs(e.Fragment,{children:[e.jsxs("p",{children:["Signed in as ",e.jsxs("strong",{children:["@",s.username]})]}),e.jsx(m,{disabled:r.isPending||!s.can_directly_edit_catalog,onClick:()=>r.mutate(),children:r.isPending?"Authorizing…":"Authorize for one hour"}),!s.can_directly_edit_catalog&&e.jsx("p",{children:"Direct editing is unavailable for this session."})]}):e.jsx(p,{returnTo:`/authorize-paper-edit/${t}`,label:"Sign in with Hugging Face"}),r.error&&e.jsx("p",{role:"alert",children:r.error.message})]})]})}export{b as default};
 
1
+ import{u,a as d,j as e,L as l,H as p}from"./index-CbgxfyGU.js";import{u as c}from"./useQuery-Bx9s5-D2.js";import{u as h}from"./useMutation-P_trTy9i.js";import{B as m}from"./button-Bv9oZ-QU.js";import{p as n}from"./paperEdits-C5GTaRR8.js";function b(){const{authorizationId:t=""}=u(),{user:s,isLoading:o}=d(),i=c({queryKey:["paper-edit-authorization",t],queryFn:()=>n.authorization(t),retry:!1}),r=h({mutationFn:()=>n.approve(t)}),a=i.data;return e.jsxs("main",{className:"mx-auto max-w-xl space-y-5 px-6 py-12",children:[e.jsx("h1",{className:"text-2xl font-semibold",children:"Authorize your agent to edit a paper"}),(i.isLoading||o)&&e.jsx("p",{children:"Loading authorization…"}),i.error&&e.jsx("p",{role:"alert",children:i.error.message}),a&&e.jsxs(e.Fragment,{children:[e.jsx(l,{className:"underline",to:`/paper/${a.paper_id}`,children:a.title}),e.jsxs("p",{children:["Check that your CLI shows this code: ",e.jsx("strong",{className:"font-mono",children:a.user_code})]}),e.jsx("p",{children:"Only approve a request you started. Your agent will be able to publish changes to this paper’s links, tags, and evaluation results for one hour, without further approval."}),e.jsx("p",{children:"Edits appear publicly under your Hugging Face username. You can edit up to 20 distinct papers per UTC day. Evaluation deletion and changes to shared benchmark definitions require an administrator."}),r.isSuccess||a.approved?e.jsx("p",{role:"status",children:"Access approved. Return to your CLI to continue."}):s?e.jsxs(e.Fragment,{children:[e.jsxs("p",{children:["Signed in as ",e.jsxs("strong",{children:["@",s.username]})]}),e.jsx(m,{disabled:r.isPending||!s.can_directly_edit_catalog,onClick:()=>r.mutate(),children:r.isPending?"Authorizing…":"Authorize for one hour"}),!s.can_directly_edit_catalog&&e.jsx("p",{children:"Direct editing is unavailable for this session."})]}):e.jsx(p,{returnTo:`/authorize-paper-edit/${t}`,label:"Sign in with Hugging Face"}),r.error&&e.jsx("p",{role:"alert",children:r.error.message})]})]})}export{b as default};
assets/{AutonomousOperations-epH5w9S2.js → AutonomousOperations-CzJGtkdV.js} RENAMED
@@ -1 +1 @@
1
- import{f as R,r as d,j as e,L as B}from"./index-YwiKC6Po.js";import{u as q}from"./useQuery-DPH6Mb2w.js";import{u as H}from"./useMutation-f6iDkf3w.js";import{C as n,e as i,S as I,b as l,c as r,t as C,f as m,o as x}from"./CronDashboard-DcLcBHdd.js";import{B as Q}from"./badge-CFf6CiSg.js";import{B as h}from"./button-B90pJJiy.js";import{I as u}from"./input-DEeEc0bH.js";import{A as P}from"./activity-95309hog.js";import{A as D}from"./arrow-left-B08fyfNi.js";const j={submissions:"Submission review",curation:"Scheduled curation",cron_health:"CRON health",chat_reliability:"Chat reliability"},E={healthy:"healthy",degraded:"degraded",repairing:"running","rolled-back":"broken",manual:"degraded"},S=["admin","autonomousOperations"],W=()=>{var A;const M=R(),[p,T]=d.useState(""),[f,_]=d.useState(""),[g,v]=d.useState({}),[b,N]=d.useState(""),c=q({queryKey:S,queryFn:()=>x.getAutonomousOperations(),refetchInterval:3e4,retry:!1}),t=H({mutationFn:s=>s(),onSuccess:s=>{M.setQueryData(S,s),_(""),v({}),N("")}}),a=c.data,y=t.error instanceof Error?t.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=()=>t.mutate(()=>x.setAutonomousManualMode(!a.manual_mode,a.revision,f)),k=(s,o)=>t.mutate(()=>x.setAutonomousOperator(s,o,a.revision,g[s]??"")),w=()=>{var o;const s=((o=a.baseline)==null?void 0:o.revision)??0;t.mutate(()=>x.qualifyAutonomousChatBaseline(p,s,b))};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(B,{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(I,{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:C(E[a.display_state]),children:[e.jsx(l,{children:e.jsx(r,{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(r,{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(r,{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(r,{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:t.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:C(E[s.status]),children:[e.jsx(l,{children:e.jsxs(r,{className:"flex justify-between gap-2",children:[e.jsx("span",{children:j[s.operator]}),e.jsx(Q,{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:g[s.operator]??"",onChange:o=>v(L=>({...L,[s.operator]:o.target.value})),placeholder:"Type SET_OPERATOR_STATE"}),e.jsx(h,{disabled:t.isPending||a.manual_mode&&!s.enabled||g[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(r,{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:b,onChange:s=>N(s.target.value),placeholder:"Type QUALIFY_CHAT_BASELINE"}),e.jsx(h,{disabled:t.isPending||!/^[0-9a-f]{40}$/.test(p)||b!=="QUALIFY_CHAT_BASELINE",onClick:w,children:"Qualify exact SHA"})]})]})]}),e.jsxs(n,{children:[e.jsx(l,{children:e.jsx(r,{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(r,{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(r,{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(r,{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{W as default};
 
1
+ import{f as R,r as d,j as e,L as B}from"./index-CbgxfyGU.js";import{u as q}from"./useQuery-Bx9s5-D2.js";import{u as H}from"./useMutation-P_trTy9i.js";import{C as n,e as i,S as I,b as l,c as r,t as C,f as m,o as x}from"./CronDashboard-B3Xofwvu.js";import{B as Q}from"./badge-Klg-RRGs.js";import{B as h}from"./button-Bv9oZ-QU.js";import{I as u}from"./input-B6pxtfPe.js";import{A as P}from"./activity-dcKMRXBy.js";import{A as D}from"./arrow-left-Czeu3VzJ.js";const j={submissions:"Submission review",curation:"Scheduled curation",cron_health:"CRON health",chat_reliability:"Chat reliability"},E={healthy:"healthy",degraded:"degraded",repairing:"running","rolled-back":"broken",manual:"degraded"},S=["admin","autonomousOperations"],W=()=>{var A;const M=R(),[p,T]=d.useState(""),[f,_]=d.useState(""),[g,v]=d.useState({}),[b,N]=d.useState(""),c=q({queryKey:S,queryFn:()=>x.getAutonomousOperations(),refetchInterval:3e4,retry:!1}),t=H({mutationFn:s=>s(),onSuccess:s=>{M.setQueryData(S,s),_(""),v({}),N("")}}),a=c.data,y=t.error instanceof Error?t.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=()=>t.mutate(()=>x.setAutonomousManualMode(!a.manual_mode,a.revision,f)),k=(s,o)=>t.mutate(()=>x.setAutonomousOperator(s,o,a.revision,g[s]??"")),w=()=>{var o;const s=((o=a.baseline)==null?void 0:o.revision)??0;t.mutate(()=>x.qualifyAutonomousChatBaseline(p,s,b))};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(B,{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(I,{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:C(E[a.display_state]),children:[e.jsx(l,{children:e.jsx(r,{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(r,{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(r,{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(r,{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:t.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:C(E[s.status]),children:[e.jsx(l,{children:e.jsxs(r,{className:"flex justify-between gap-2",children:[e.jsx("span",{children:j[s.operator]}),e.jsx(Q,{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:g[s.operator]??"",onChange:o=>v(L=>({...L,[s.operator]:o.target.value})),placeholder:"Type SET_OPERATOR_STATE"}),e.jsx(h,{disabled:t.isPending||a.manual_mode&&!s.enabled||g[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(r,{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:b,onChange:s=>N(s.target.value),placeholder:"Type QUALIFY_CHAT_BASELINE"}),e.jsx(h,{disabled:t.isPending||!/^[0-9a-f]{40}$/.test(p)||b!=="QUALIFY_CHAT_BASELINE",onClick:w,children:"Qualify exact SHA"})]})]})]}),e.jsxs(n,{children:[e.jsx(l,{children:e.jsx(r,{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(r,{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(r,{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(r,{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{W as default};
assets/{BenchmarkDetailView-CzOCvqTF.js → BenchmarkDetailView-BGwBE1Ld.js} RENAMED
@@ -1,2 +1,2 @@
1
- import{r as L,j as a,D as le,L as ne,c as ot,p as ct,u as dt,e as ut,q as mt}from"./index-YwiKC6Po.js";import{R as ht}from"./ResearchFollowButton-BFXC8E3t.js";import{u as te}from"./useQuery-DPH6Mb2w.js";import{c as re}from"./catalog-B15Yh5dN.js";import{C as ft,E as pt,e as gt}from"./ExternalSourceEvalBadge-CimjRPVg.js";import{L as oe}from"./LatexTitle-DI6voLfI.js";import{S as Ke}from"./switch-Crqp0RkL.js";import{I as xt}from"./Icon-DXQ4sjQk.js";import{S as ce}from"./skeleton-CXR1qouH.js";import{A as bt,a as yt}from"./alert-Cx5luC5D.js";import{B as wt}from"./BenchmarkTrendSparkline-BBLKxMdW.js";import{s as vt}from"./safeExternalHref-CkBrsh84.js";import{s as jt}from"./slug-BpH-Nkvz.js";import{i as _t}from"./apiErrors-DBfE_SVR.js";import St from"./NotFound-D8hwuoEl.js";import"./useMutation-f6iDkf3w.js";import"./research-5UpiU-ea.js";import"./plus-Cfz0QbT1.js";import"./curation-CkzNFTMJ.js";import"./hover-card-BY9tUGxy.js";import"./index-BaDZKp6X.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 Ge=[{label:"All",maxParametersExclusive:void 0},{label:"<10M",maxParametersExclusive:1e7},{label:"<100M",maxParametersExclusive:1e8},{label:"<1B",maxParametersExclusive:1e9},{label:"<3B",maxParametersExclusive:3e9},{label:"<6B",maxParametersExclusive:6e9},{label:"<12B",maxParametersExclusive:12e9},{label:"<32B",maxParametersExclusive:32e9},{label:"<128B",maxParametersExclusive:128e9},{label:"<500B",maxParametersExclusive:5e11}];function kt(e){const t=e===null?void 0:Number(e);return Ge.some(r=>r.maxParametersExclusive===t)?t:void 0}function Ct(e){return new Intl.NumberFormat("en",{notation:"compact",maximumSignificantDigits:3}).format(e)}function Et(e){return[e.paper_id,e.task_id,e.dataset_id,e.model_name,e.harness??""].join("|")}function Nt(e){const t=new Map;for(const r of e){const s=Et(r),n=t.get(s);if(!n){t.set(s,{...r,metrics:{...r.metrics||{}},sourceEvaluationIds:[r.id],ranksByMetric:r.best_metric&&r.best_rank!=null?{[r.best_metric]:r.best_rank}:{},parameterCount:r.num_parameters??null,hasParameterConflict:!1});continue}n.metrics={...n.metrics,...r.metrics||{}},n.sourceEvaluationIds.push(r.id),r.best_metric&&r.best_rank!=null&&(n.ranksByMetric[r.best_metric]=r.best_rank),r.num_parameters!=null&&!n.hasParameterConflict&&(n.parameterCount===null?n.parameterCount=r.num_parameters:n.parameterCount!==r.num_parameters&&(n.parameterCount=null,n.hasParameterConflict=!0))}return Array.from(t.values())}function Le(e,t){return t===void 0?e:e.filter(r=>r.parameterCount!==null&&r.parameterCount<t)}function Rt(e,t){return t?e.id===t||e.sourceEvaluationIds.includes(t):!1}function Ie(e,t){return e.ranksByMetric[t]??e.best_rank??9999}function Pt(e){const t=Date.parse(e);return Number.isNaN(t)?"":new Date(t).toISOString().slice(0,10)}function $t(e){const t=new Map;for(const s of e)s.evaluated_on&&t.set(s.evaluated_on,(t.get(s.evaluated_on)??0)+1);const r=Array.from(t.values()).reduce((s,n)=>s+n,0);for(const[s,n]of t)if(n>=2&&n*2>r)return s;return null}function Mt(e,t){const r=e.evaluated_on;return r&&r!==t&&r!==Pt(e.updated_at)?r:e.paper_published_date||""}function Tt(e,t,r){if(e.length===0)return{points:[],sota:0,sotaModel:""};const s=$t(e),n=e.map(u=>{var R;const h=ie((R=u.metrics)==null?void 0:R[t]);return{eval:u,value:h,date:Mt(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.value<l:u.value>l;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 Ft(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 Qe(e,t,r,s){const n=t.find(i=>i.id===s);if(e.length===0)return null;if(n!=null&&n.task_id&&e.some(i=>i.id===n.task_id))return n.task_id;if(r){const i=e.find(l=>l.slug===r);if(i)return i.id}if(e.length===1)return e[0].id;if(t.length>0){const i=new Map;for(const d of t)i.set(d.task_id,(i.get(d.task_id)||0)+1);let l=null,c=-1;for(const d of e){const f=i.get(d.id)||0;f>c&&(c=f,l=d.id)}if(l)return l}return e[0].id}function Lt(e){var _,X,Y;const{evaluations:t,tasks:r,taskSlug:s,highlightEvalId:n,parameterBound:i,showMoreMetrics:l,fittingMetricCount:c=1}=e,d=Qe(r,t,s,n),f=r.find(o=>o.id===d)||r[0]||null,x=t.find(o=>o.id===n),u=Ft(t,d,e.hideClosed),h=Nt(u.visible),R=Le(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]:[],U=R.slice().sort((o,m)=>{const p=ie(o.metrics[j]),y=ie(m.metrics[j]);return p!==null&&y!==null?D==="↓"?p-y:y-p:p!==null?-1:y!==null?1:Ie(o,j)-Ie(m,j)});let I=null,N=0;const Q=U.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:Rt(o,n)}}),{points:z,sota:ee,sotaModel:O}=Tt(R,j,D),M=i===void 0?e.initialSummary:void 0,q=e.ready.evaluations&&e.ready.tasks&&e.ready.directions&&(!d||e.ready.metrics),K={parameter_coverage_known:h.filter(o=>o.parameterCount!==null).length,parameter_coverage_total:h.length};return{currentTaskId:d,primaryTask:f,activeMetric:j,arrow:D,allowedMetrics:S,orderedMetrics:W,visibleMetrics:w,rows:Q,chartPoints:z,highlightedEval:((Y=Q.find(o=>o.isHighlighted))==null?void 0:Y.evaluation)||null,hiddenClosedEvals:u.hiddenClosed,hiddenClosedTopEval:u.topHiddenClosed,parameterBound:i,parameterCoverage:K,hasParameterMetadata:K.parameter_coverage_known>0,parameterFilters:Ge.map(o=>({...o,selected:i===o.maxParametersExclusive,disabled:i!==o.maxParametersExclusive&&Le(h,o.maxParametersExclusive).length===0})),displayedMetric:q?j:M==null?void 0:M.metric,displayedSota:q?ee:M==null?void 0:M.value,displayedSotaModel:q?O:M==null?void 0:M.model_name,isSummaryLoading:!q&&!M,isInitialFilteredViewLoading:i!==void 0&&!q}}function It(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(l<s)return Math.max(1,l);const c=Math.floor((i-n)/t.metric);return Math.max(1,s,c)}function he(e,t){return parseFloat(e.getPropertyValue(t))||0}function At(e){const t=getComputedStyle(e);return{fixed:["--bm-rank-width","--bm-model-width","--bm-parameters-width","--bm-paper-width","--bm-year-width"].reduce((r,s)=>r+he(t,s),0),harness:he(t,"--bm-harness-width"),metric:he(t,"--bm-metric-width")}}const Bt=20;function Ae(e,t){return e?a.jsx(oe,{title:e}):t||"—"}function Dt({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=At(R);f.classList.toggle("unpins-trailing-columns",C<P.fixed+P.metric);const S=document.documentElement,g=S.scrollHeight>S.clientHeight?0:Bt;n(k=>It(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(ft,{}),(u.external??u.is_external)&&a.jsx(pt,{sourceUrl:u.source_url||u.external_source_url||u.result_url})]}),a.jsx("td",{className:"col-parameters",title:u.parameterCount===null?void 0:u.parameterCount.toLocaleString("en-US"),"aria-label":u.parameterCount===null?"Parameters unknown":`${u.parameterCount.toLocaleString("en-US")} parameters`,children:u.parameterCount===null?"—":Ct(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:Ae(u.paper_title,P)}):Ae(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 Be(e){const t=e.length===7?`${e}-01`:e,r=new Date(t).getTime();return Number.isFinite(r)?r:0}const fe=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function pe(e){const t=new Date(e);return{year:t.getFullYear(),month:t.getMonth()}}function Ht(e,t){if(e===t){const{year:d,month:f}=pe(e);return[{timestamp:new Date(d,f,1).getTime(),key:`${d}-${f}`,label:`${fe[f]} ${d}`}]}const r=pe(e),s=pe(t);if(r.year===s.year){const d=s.month-r.month+1;let f=1;const x=12;d>x&&(f=Math.ceil(d/x));const u=[];for(let h=r.month;h<=s.month;h+=f)u.push({timestamp:new Date(r.year,h,1).getTime(),key:`${r.year}-${h}`,label:d<=3?`${fe[h]} ${r.year}`:fe[h]});return u}const n=s.year-r.year+1;let i=1;const l=12;n>l&&(i=Math.ceil(n/l));const c=[];for(let d=r.year;d<=s.year;d+=i)c.push({timestamp:new Date(d,0,1).getTime(),key:String(d),label:String(d)});return c}const Vt=({points:e,metric:t})=>{const r=ot(),[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=>Be(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(Be(o.date)),y=(o.value-h)/C,$=f+S*(1-y);return{x:p,y:$,data:o,idx:m}}),w=W.filter(o=>o.data.isSota);let U="";if(w.length>=2){U=`M${w[0].x},${w[0].y}`;for(let o=1;o<w.length;o++){const m=w[o-1],p=w[o],y=(m.x+p.x)/2;U+=` C${y},${m.y} ${y},${p.y} ${p.x},${p.y}`}}const I=5.4,N=8,Q=9,z=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 $=o.x-y/2,E=o.x+y/2,v="middle";return $<c?($=c,E=c+y,v="start"):E>i-d&&(E=i-d,$=E-y,v="end"),{x:v==="start"?c:v==="end"?i-d:o.x,y:o.y-Q,text:p,anchor:v,left:$,right:E}},ee=[],O=w.length>0?z(w[w.length-1]):null;let M=-1/0;for(let o=0;o<w.length-1;o++){const m=z(w[o]);m&&(m.left<M+N||O&&m.right>O.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 q=Ht(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}`,$=!!o.data.paperRouteId;return a.jsxs("g",{children:[m,a.jsx("circle",{cx:o.x,cy:o.y,r:"10",fill:"transparent",style:{cursor:$?"pointer":"default",outline:"none"},tabIndex:0,role:$?"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=>{$&&(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),$=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($)})]},m)}),q.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"}}))}),U&&a.jsx("path",{d:U,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;H<c&&(H=c),H+E>i-d&&(H=i-d-E);const G=o.y-v-14>=f?o.y-v-12:o.y+12;return a.jsxs("g",{pointerEvents:"none",children:[a.jsx("rect",{x:H,y:G,width: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:G+19,fontSize:"12",fontFamily:"var(--sans)",fill:"var(--ink)",fontWeight:500,children:y})]})})()]})};function Wt(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 Ot=(()=>{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;r<s;r++)t.push(e[r]);return t}let ae=null;function Xe(e={}){return ae||(e.includeStyleProperties?(ae=e.includeStyleProperties,ae):(ae=Z(window.getComputedStyle(document.documentElement)),ae))}function de(e,t){const s=(e.ownerDocument.defaultView||window).getComputedStyle(e).getPropertyValue(t);return s?parseFloat(s.replace("px","")):0}function qt(e){const t=de(e,"border-left-width"),r=de(e,"border-right-width");return e.clientWidth+t+r}function Ut(e){const t=de(e,"border-top-width"),r=de(e,"border-bottom-width");return e.clientHeight+t+r}function Ye(e,t={}){const r=t.width||qt(e),s=t.height||Ut(e);return{width:r,height:s}}function zt(){let e,t;try{t=process}catch{}const r=t&&t.env?t.env.devicePixelRatio:null;return r&&(e=parseInt(r,10),Number.isNaN(e)&&(e=1)),e||window.devicePixelRatio||1}const V=16384;function Kt(e){(e.width>V||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 Gt(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<n;l+=1)i[l]=s.charCodeAt(l);r(new Blob([i],{type:t.type?t.type:"image/png"}))})}function ue(e){return new Promise((t,r)=>{const s=new Image;s.onload=()=>{s.decode().then(()=>{requestAnimationFrame(()=>t(s))})},s.onerror=r,s.crossOrigin="anonymous",s.decoding="async",s.src=e})}async function Qt(e){return Promise.resolve().then(()=>new XMLSerializer().serializeToString(e)).then(encodeURIComponent).then(t=>`data:image/svg+xml;charset=utf-8,${t}`)}async function Xt(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),Qt(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 Yt(e){const t=e.getPropertyValue("content");return`${e.cssText} content: '${t.replace(/'|"/g,"")}';`}function Jt(e,t){return Xe(t).map(r=>{const s=e.getPropertyValue(r),n=e.getPropertyPriority(r);return`${r}: ${s}${n?" !important":""};`}).join(" ")}function Zt(e,t,r,s){const n=`.${e}:${t}`,i=r.cssText?Yt(r):Jt(r,s);return document.createTextNode(`${n}{${i}}`)}function De(e,t,r,s){const n=window.getComputedStyle(e,r),i=n.getPropertyValue("content");if(i===""||i==="none")return;const l=Ot();try{t.className=`${t.className} ${l}`}catch{return}const c=document.createElement("style");c.appendChild(Zt(l,r,n,s)),t.appendChild(c)}function er(e,t,r){De(e,t,":before",r),De(e,t,":after",r)}const He="application/font-woff",Ve="image/jpeg",tr={woff:He,woff2:He,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:Ve,jpeg:Ve,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml",webp:"image/webp"};function rr(e){const t=/\.([^./]*?)$/g.exec(e);return t?t[1]:""}function ye(e){const t=rr(e).toLowerCase();return tr[t]||""}function ar(e){return e.split(/,/)[1]}function xe(e){return e.search(/^(data:)/)!==-1}function sr(e,t){return`data:${t};base64,${e}`}async function Je(e,t,r){const s=await fetch(e,t);if(s.status===404)throw new Error(`Resource "${s.url}" not found`);const n=await s.blob();return new Promise((i,l)=>{const c=new FileReader;c.onerror=l,c.onloadend=()=>{try{i(r({res:s,result:c.result}))}catch(d){l(d)}},c.readAsDataURL(n)})}const ge={};function nr(e,t,r){let s=e.replace(/\?.*/,"");return r&&(s=e),/ttf|otf|eot|woff2?/i.test(s)&&(s=s.replace(/.*\//,"")),t?`[${t}]${s}`:s}async function we(e,t,r){const s=nr(e,t,r.includeQueryParams);if(ge[s]!=null)return ge[s];r.cacheBust&&(e+=(/\?/.test(e)?"&":"?")+new Date().getTime());let n;try{const i=await Je(e,r.fetchRequestInit,({res:l,result:c})=>(t||(t=l.headers.get("Content-Type")||""),ar(c)));n=sr(i,t)}catch(i){n=r.imagePlaceholder||"";let l=`Failed to fetch resource: ${e}`;i&&(l=typeof i=="string"?i:i.message),l&&console.warn(l)}return ge[s]=n,n}async function ir(e){const t=e.toDataURL();return t==="data:,"?e.cloneNode(!1):ue(t)}async function lr(e,t){if(e.currentSrc){const i=document.createElement("canvas"),l=i.getContext("2d");i.width=e.clientWidth,i.height=e.clientHeight,l==null||l.drawImage(e,0,0,i.width,i.height);const c=i.toDataURL();return ue(c)}const r=e.poster,s=ye(r),n=await we(r,s,t);return ue(n)}async function or(e,t){var r;try{if(!((r=e==null?void 0:e.contentDocument)===null||r===void 0)&&r.body)return await me(e.contentDocument.body,t,!0)}catch{}return e.cloneNode(!1)}async function cr(e,t){return A(e,HTMLCanvasElement)?ir(e):A(e,HTMLVideoElement)?lr(e,t):A(e,HTMLIFrameElement)?or(e,t):e.cloneNode(Ze(e))}const dr=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SLOT",Ze=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SVG";async function ur(e,t,r){var s,n;if(Ze(t))return t;let i=[];return dr(e)&&e.assignedNodes?i=Z(e.assignedNodes()):A(e,HTMLIFrameElement)&&(!((s=e.contentDocument)===null||s===void 0)&&s.body)?i=Z(e.contentDocument.body.childNodes):i=Z(((n=e.shadowRoot)!==null&&n!==void 0?n:e).childNodes),i.length===0||A(e,HTMLVideoElement)||await i.reduce((l,c)=>l.then(()=>me(c,r)).then(d=>{d&&t.appendChild(d)}),Promise.resolve()),t}function mr(e,t,r){const s=t.style;if(!s)return;const n=window.getComputedStyle(e);n.cssText?(s.cssText=n.cssText,s.transformOrigin=n.transformOrigin):Xe(r).forEach(i=>{let l=n.getPropertyValue(i);i==="font-size"&&l.endsWith("px")&&(l=`${Math.floor(parseFloat(l.substring(0,l.length-2)))-.1}px`),A(e,HTMLIFrameElement)&&i==="display"&&l==="inline"&&(l="block"),i==="d"&&t.getAttribute("d")&&(l=`path(${t.getAttribute("d")})`),s.setProperty(i,l,n.getPropertyPriority(i))})}function hr(e,t){A(e,HTMLTextAreaElement)&&(t.innerHTML=e.value),A(e,HTMLInputElement)&&t.setAttribute("value",e.value)}function fr(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 pr(e,t,r){return A(t,Element)&&(mr(e,t,r),er(e,t,r),hr(e,t),fr(e,t)),t}async function gr(e,t){const r=e.querySelectorAll?e.querySelectorAll("use"):[];if(r.length===0)return e;const s={};for(let i=0;i<r.length;i++){const c=r[i].getAttribute("xlink:href");if(c){const d=e.querySelector(c),f=document.querySelector(c);!d&&f&&!s[c]&&(s[c]=await me(f,t,!0))}}const n=Object.values(s);if(n.length){const i="http://www.w3.org/1999/xhtml",l=document.createElementNS(i,"svg");l.setAttribute("xmlns",i),l.style.position="absolute",l.style.width="0",l.style.height="0",l.style.overflow="hidden",l.style.display="none";const c=document.createElementNS(i,"defs");l.appendChild(c);for(let d=0;d<n.length;d++)c.appendChild(n[d]);e.appendChild(l)}return e}async function me(e,t,r){return!r&&t.filter&&!t.filter(e)?null:Promise.resolve(e).then(s=>cr(s,t)).then(s=>ur(e,s,t)).then(s=>pr(e,s,t)).then(s=>gr(s,t))}const et=/url\((['"]?)([^'"]+?)\1\)/g,xr=/url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g,br=/src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;function yr(e){const t=e.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1");return new RegExp(`(url\\(['"]?)(${t})(['"]?\\))`,"g")}function wr(e){const t=[];return e.replace(et,(r,s,n)=>(t.push(n),r)),t.filter(r=>!xe(r))}async function vr(e,t,r,s,n){try{const i=r?Wt(t,r):t,l=ye(t);let c;return n||(c=await we(i,l,s)),e.replace(yr(t),`$1${c}$3`)}catch{}return e}function jr(e,{preferredFontFormat:t}){return t?e.replace(br,r=>{for(;;){const[s,,n]=xr.exec(r)||[];if(!n)return"";if(n===t)return`src: ${s};`}}):e}function tt(e){return e.search(et)!==-1}async function rt(e,t,r){if(!tt(e))return e;const s=jr(e,r);return wr(s).reduce((i,l)=>i.then(c=>vr(c,l,t,r)),Promise.resolve(s))}async function se(e,t,r){var s;const n=(s=t.style)===null||s===void 0?void 0:s.getPropertyValue(e);if(n){const i=await rt(n,null,r);return t.style.setProperty(e,i,t.style.getPropertyPriority(e)),!0}return!1}async function _r(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 Sr(e,t){const r=A(e,HTMLImageElement);if(!(r&&!xe(e.src))&&!(A(e,SVGImageElement)&&!xe(e.href.baseVal)))return;const s=r?e.src:e.href.baseVal,n=await we(s,ye(s),t);await new Promise((i,l)=>{e.onload=i,e.onerror=t.onImageErrorHandler?(...d)=>{try{i(t.onImageErrorHandler(...d))}catch(f){l(f)}}:l;const c=e;c.decode&&(c.decode=i),c.loading==="lazy"&&(c.loading="eager"),r?(e.srcset="",e.src=n):e.href.baseVal=n})}async function kr(e,t){const s=Z(e.childNodes).map(n=>at(n,t));await Promise.all(s).then(()=>e)}async function at(e,t){A(e,Element)&&(await _r(e,t),await Sr(e,t),await kr(e,t))}function Cr(e,t){const{style:r}=e;t.backgroundColor&&(r.backgroundColor=t.backgroundColor),t.width&&(r.width=`${t.width}px`),t.height&&(r.height=`${t.height}px`);const s=t.style;return s!=null&&Object.keys(s).forEach(n=>{r[n]=s[n]}),e}const We={};async function Oe(e){let t=We[e];if(t!=null)return t;const s=await(await fetch(e)).text();return t={url:e,cssText:s},We[e]=t,t}async function qe(e,t){let r=e.cssText;const s=/url\(["']?([^"')]+)["']?\)/g,i=(r.match(/url\([^)]+\)/g)||[]).map(async l=>{let c=l.replace(s,"$1");return c.startsWith("https://")||(c=new URL(c,e.url).href),Je(c,t.fetchRequestInit,({result:d})=>(r=r.replace(l,`url(${d})`),[l,d]))});return Promise.all(i).then(()=>r)}function Ue(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 Er(e,t){const r=[],s=[];return e.forEach(n=>{if("cssRules"in n)try{Z(n.cssRules||[]).forEach((i,l)=>{if(i.type===CSSRule.IMPORT_RULE){let c=l+1;const d=i.href,f=Oe(d).then(x=>qe(x,t)).then(x=>Ue(x).forEach(u=>{try{n.insertRule(u,u.startsWith("@import")?c+=1:n.cssRules.length)}catch(h){console.error("Error inserting rule from remote css",{rule:u,error:h})}})).catch(x=>{console.error("Error loading remote css",x.toString())});s.push(f)}})}catch(i){const l=e.find(c=>c.href==null)||document.styleSheets[0];n.href!=null&&s.push(Oe(n.href).then(c=>qe(c,t)).then(c=>Ue(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 Nr(e){return e.filter(t=>t.type===CSSRule.FONT_FACE_RULE).filter(t=>tt(t.style.getPropertyValue("src")))}async function Rr(e,t){if(e.ownerDocument==null)throw new Error("Provided element is not within a Document");const r=Z(e.ownerDocument.styleSheets),s=await Er(r,t);return Nr(s)}function st(e){return e.trim().replace(/["']/g,"")}function Pr(e){const t=new Set;function r(s){(s.style.fontFamily||getComputedStyle(s).fontFamily).split(",").forEach(i=>{t.add(st(i))}),Array.from(s.children).forEach(i=>{i instanceof HTMLElement&&r(i)})}return r(e),t}async function $r(e,t){const r=await Rr(e,t),s=Pr(e);return(await Promise.all(r.filter(i=>s.has(st(i.style.fontFamily))).map(i=>{const l=i.parentStyleSheet?i.parentStyleSheet.href:null;return rt(i.cssText,l,t)}))).join(`
2
  `)}async function Mr(e,t){const r=t.fontEmbedCSS!=null?t.fontEmbedCSS:t.skipFonts?null:await $r(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 Tr(e,t={}){const{width:r,height:s}=Ye(e,t),n=await me(e,t,!0);return await Mr(n,t),await at(n,t),Cr(n,t),await Xt(n,r,s)}async function Fr(e,t={}){const{width:r,height:s}=Ye(e,t),n=await Tr(e,t),i=await ue(n),l=document.createElement("canvas"),c=l.getContext("2d"),d=t.pixelRatio||zt(),f=t.canvasWidth||r,x=t.canvasHeight||s;return l.width=f*d,l.height=x*d,t.skipAutoScale||Kt(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 Lr(e,t={}){const r=await Fr(e,t);return await Gt(r)}const be="#ffffff";function Ir(){return typeof window>"u"?be:window.getComputedStyle(document.documentElement).getPropertyValue("--bg-elevated").trim()||be}function Ar(e){if(typeof window>"u")return be;const t=window.getComputedStyle(e).backgroundColor;return!t||t==="rgba(0, 0, 0, 0)"||t==="transparent"?Ir():t}async function Br(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 Lr(e,{pixelRatio:2,cacheBust:!0,backgroundColor:Ar(e)});if(!t)throw new Error("Failed to render screenshot.");await window.navigator.clipboard.write([new window.ClipboardItem({"image/png":t})])}const nt=({targetRef:e,label:t})=>{const{toast:r}=ct(),[s,n]=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 Br(d),n("copied"),r({title:"Screenshot copied",description:`Image of the ${t} copied to your clipboard.`}),i.current!==null&&window.clearTimeout(i.current),i.current=window.setTimeout(()=>n("idle"),1500)}catch(f){n("idle"),r({title:"Copy failed",description:f instanceof Error&&f.message?f.message:"Could not copy the screenshot to your clipboard.",variant:"destructive"})}finally{d.classList.remove("is-capturing")}}},[e,t,r]),c=s==="copied"?"Copied":s==="copying"?"Copying…":"Copy image";return a.jsxs("button",{type:"button",className:"bm-copy-btn",onClick:l,disabled:s==="copying","aria-label":`Copy ${t} screenshot to clipboard`,title:`Copy ${t} screenshot to clipboard`,children:[a.jsx(xt,{name:"copy",size:11}),c]})};function Dr({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(Ke,{className:"bm-closed-toggle-switch",checked:!r,onCheckedChange:h=>{s(!h)},"aria-label":"Show closed-source models"}),a.jsx("span",{className:"bm-closed-toggle-label",children:"Closed-source"})]}),a.jsx(nt,{targetRef:i,label:"SOTA chart"})]})]}),a.jsx("div",{className:"bm-chart-wrap",children:a.jsx(Vt,{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 Hr(e){if(!e)return null;const t=e.trim(),r=t.match(/^https?:\/\/(?:www\.)?arxiv\.org\/(?:abs|pdf)\/([^/?#]+)/i);if(r!=null&&r[1])return r[1].replace(/\.pdf$/i,"");const s=t.match(/^(?:https?:\/\/(?:www\.)?paperswithcode\.co)?\/paper\/([^/?#]+)/i);return(s==null?void 0:s[1])??null}function ze(e,t){return e?a.jsx(oe,{title:e}):t||"—"}const oa=()=>{var ve,je,_e,Se,ke,Ce,Ee,Ne,Re,Pe,$e;const{datasetSlug:e}=dt(),[t,r]=ut(),s=t.get("task")||void 0,n=t.get("eval")||void 0,i=kt(t.get("max_parameters_exclusive")),{preferences:l,setHideClosedSourceEvals:c}=mt(),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:["dataset",e,"with-paper",s,l.hide_closed_source_evals?"open":"all"],queryFn:()=>re.getDatasetBySlug(e,{include_paper:!0,task:s,is_open:l.hide_closed_source_evals?!0:void 0}),enabled:!!e,staleTime:10*60*1e3}),k=te({queryKey:["dataset-evals",(ve=g.data)==null?void 0:ve.id],queryFn:()=>gt.byDataset(g.data.id),enabled:!!((je=g.data)!=null&&je.id),staleTime:5*60*1e3}),B=te({queryKey:["dataset-tasks",(_e=g.data)==null?void 0:_e.id],queryFn:()=>re.datasetTasks(g.data.id),enabled:!!((Se=g.data)!=null&&Se.id),staleTime:10*60*1e3}),j=te({queryKey:["metric-directions"],queryFn:()=>re.metricDirections(),staleTime:60*60*1e3}),D=Qe(B.data||[],k.data||[],s,n),W=te({queryKey:["task-benchmark-trends",D,l.hide_closed_source_evals?!0:void 0],queryFn:()=>re.trendingBenchmarks(D,{limit:100,min_recent_papers:0,is_open:l.hide_closed_source_evals?!0:void 0}),enabled:!!D&&!!((ke=g.data)!=null&&ke.id),staleTime:10*60*1e3}),w=L.useMemo(()=>{var b;return(((b=W.data)==null?void 0:b.results)||[]).find(T=>{var F;return T.id===((F=g.data)==null?void 0:F.id)})||null},[W.data,(Ce=g.data)==null?void 0:Ce.id]),U=te({queryKey:["leaderboard-metrics",(Ee=g.data)==null?void 0:Ee.id,D],queryFn:()=>re.leaderboardMetrics(g.data.id,D),enabled:!!((Ne=g.data)!=null&&Ne.id)&&!!D,staleTime:10*60*1e3}),I=Lt({evaluations:k.data||[],tasks:B.data||[],configuredMetrics:U.data||[],directions:j.data,initialSummary:(Re=g.data)==null?void 0:Re.leaderboard_summary,taskSlug:s,highlightEvalId:n,metric:t.get("metric")||void 0,hideClosed:l.hide_closed_source_evals,parameterBound:i,showMoreMetrics:C,fittingMetricCount:P,ready:{evaluations:k.isSuccess,tasks:B.isSuccess,directions:j.isSuccess,metrics:U.isSuccess}}),{primaryTask:N,hiddenClosedEvals:Q,hiddenClosedTopEval:z,isSummaryLoading:ee,displayedMetric:O,displayedSota:M,displayedSotaModel:q,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:["area",N==null?void 0:N.area_id],queryFn:()=>re.getArea(N.area_id),enabled:!!(N!=null&&N.area_id),staleTime:10*60*1e3});if(g.isLoading)return a.jsxs("div",{className:"page",children:[a.jsx(ce,{className:"h-12 w-1/2 mb-6"}),a.jsx(ce,{className:"h-64 w-full"})]});if(_t(g.error))return a.jsx(St,{});if(g.error||!g.data)return a.jsx("div",{className:"page",children:a.jsx(bt,{variant:"destructive",children:a.jsx(yt,{children:"Benchmark not found."})})});const p=g.data,y=!!p.supports_harness,$=b=>{r(T=>{const F=new URLSearchParams(T);return b===void 0?F.delete("max_parameters_exclusive"):F.set("max_parameters_exclusive",String(b)),F})},E=b=>{r(T=>{const F=new URLSearchParams(T);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)||Hr(p.paper_url),J=(v==null?void 0:v.title)||p.introducing_paper_title||null,G=((Pe=v==null?void 0:v.published)==null?void 0:Pe.slice(0,4))||p.introduced_year||null,it=!!H||!!p.paper_url||!!J,lt=v!=null&&v.arxiv_id||($e=p.paper_url)!=null&&$e.match(/^https?:\/\/(?:www\.)?arxiv\.org\//i)?`arXiv:${H}`:`Paper ${H}`;return a.jsx("div",{className:"page",children:a.jsxs("div",{className:"bm-page",children:[a.jsxs("div",{className:"breadcrumb",children:[a.jsx(ne,{to:"/tasks",children:"Tasks"}),m.data&&a.jsxs(a.Fragment,{children:[a.jsx("span",{className:"sep",children:"/"}),a.jsx(ne,{to:`/tasks#area-${jt(m.data.name)}`,children:m.data.name})]}),N&&a.jsxs(a.Fragment,{children:[a.jsx("span",{className:"sep",children:"/"}),a.jsx(ne,{to:`/tasks/${N.slug||N.id}`,children:N.name})]}),a.jsx("span",{className:"sep",children:"/"}),a.jsx("span",{style:{color:"var(--accent-text)"},children:p.name})]}),a.jsxs("div",{className:"bm-title-row",children:[a.jsx("h1",{className:"bm-title",children:p.name}),w&&a.jsxs("div",{className:"bm-title-trend","aria-label":`${p.name} reporting trend`,children:[a.jsx(wt,{history:w.history,benchmarkName:w.name}),a.jsxs("span",{className:"bm-title-trend-summary",children:[a.jsx("strong",{children:w.recent_paper_count})," ",w.recent_paper_count===1?"paper":"papers",w.rate_change==null?w.recent_paper_count>0&&a.jsx("span",{className:"benchmark-trend-change is-new",children:"new"}):a.jsxs("span",{className:`benchmark-trend-change ${w.rate_change>=1?"is-up":"is-down"}`,children:[w.rate_change>=1?"↑":"↓"," ",w.rate_change.toFixed(1),"×"]})]})]})]}),a.jsx(ht,{kind:"benchmark",entityId:p.id}),a.jsxs("div",{className:"bm-subtitle",children:[ee?a.jsx(ce,{className:"h-5 w-64 bm-summary-skeleton","aria-label":"Loading benchmark summary"}):a.jsxs("span",{children:[O&&a.jsxs(a.Fragment,{children:[a.jsx("span",{className:"metric-tag",children:O}),a.jsx("span",{style:{color:"var(--hairline-strong)",margin:"0 8px"},children:"·"})]}),q?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:q})]}):a.jsxs("span",{children:[I.rows.length," evaluations"]})]}),p.hf_url&&a.jsxs("a",{className:"bm-action-btn",href:p.hf_url,target:"_blank",rel:"noopener noreferrer",children:[a.jsx("span",{"aria-hidden":"true",children:"🤗"})," View on Hugging Face"]})]}),p.description&&a.jsx("p",{className:"bm-description",children:p.description}),l.hide_closed_source_evals&&Q.length>0&&a.jsxs("div",{className:"bm-hidden-closed-notice",children:[a.jsxs("span",{children:[Q.length," closed-source ",Q.length===1?"row is":"rows are"," hidden",z!=null&&z.model_name?a.jsxs(a.Fragment,{children:[", including ",a.jsx("strong",{children:z.model_name})]}):null,"."]}),a.jsx("button",{type:"button",className:"bm-hidden-closed-action",onClick:()=>{c(!1)},children:"Show closed-source"})]}),it&&a.jsxs("div",{className:"method-source",style:{marginTop:0,marginBottom:18},children:[a.jsx("span",{className:"method-source-label",children:"Source"}),H?a.jsxs(ne,{to:`/paper/${H}`,target:"_blank",rel:"noopener noreferrer",className:"method-source-link",children:[a.jsx("span",{className:"method-source-title",children:J?a.jsx(oe,{title:J}):lt}),G&&a.jsx("span",{className:"method-source-meta",children:G})]}):p.paper_url?a.jsxs("a",{href:vt(p.paper_url)??void 0,target:"_blank",rel:"noopener noreferrer",className:"method-source-link",children:[a.jsx("span",{className:"method-source-title",children:J?a.jsx(oe,{title:J}):p.paper_url}),G&&a.jsx("span",{className:"method-source-meta",children:G})]}):a.jsxs("div",{className:"method-source-link is-static",children:[a.jsx("span",{className:"method-source-title",children:J?a.jsx(oe,{title:J}):null}),G&&a.jsx("span",{className:"method-source-meta",children:G})]})]}),a.jsx(Dr,{model:I,datasetName:p.name,hideClosed:l.hide_closed_source_evals,setHideClosed:c,setMetric:E}),_&&(()=>{var Te,Fe;const b=_.paper_arxiv_id||_.paper_id,T=_.paper_title||(_.paper_arxiv_id?`arXiv:${_.paper_arxiv_id}`:null),F=_.best_metric&&((Te=_.metrics)==null?void 0:Te[_.best_metric])!==void 0?_.best_metric:I.activeMetric,Me=(Fe=_.metrics)==null?void 0:Fe[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||T||"—",_.harness?` · ${_.harness}`:""]}),a.jsxs("span",{className:"bm-highlight-meta",children:[Me!==void 0&&F?a.jsxs(a.Fragment,{children:[F,": ",le(Me),T?" · ":""]}):null,b?a.jsx(ne,{to:`/paper/${b}`,children:ze(_.paper_title,T)}):ze(_.paper_title,T)]})]})]})})(),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(Ke,{className:"bm-closed-toggle-switch",checked:!l.hide_closed_source_evals,onCheckedChange:b=>{c(!b)},"aria-label":"Show closed-source models"}),a.jsx("span",{className:"bm-closed-toggle-label",children:"Closed-source"})]}),!K&&!X&&k.isSuccess?a.jsx("span",{className:"bm-parameter-unavailable",children:"Parameter metadata unavailable"}):null,a.jsx(nt,{targetRef:x,label:"leaderboard"})]})]}),!K&&X&&a.jsxs("div",{className:"bm-parameter-filter-bar",children:[a.jsx("span",{className:"bm-parameter-filter-label",children:"Parameters Size"}),a.jsx("div",{className:"bm-parameter-filter-options",role:"group","aria-label":"Filter leaderboard by parameter size",children:I.parameterFilters.map(b=>{const{selected:T,disabled:F}=b;return a.jsx("button",{type:"button",className:`bm-parameter-filter-option${T?" is-active":""}`,"aria-pressed":T,disabled:F,onClick:()=>$(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,T)=>a.jsx(ce,{className:"h-10 w-full mb-2"},T))}):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:()=>$(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(Dt,{model:I,showHarness:y,setMetric:E,highlightRowRef:d,onFittingMetricCountChange:S})]})]})]})})};export{oa as default};
 
1
+ import{r as L,j as a,E as le,L as ne,c as ot,p as ct,u as dt,e as ut,q as mt}from"./index-CbgxfyGU.js";import{R as ht}from"./ResearchFollowButton-D2BXlDtQ.js";import{u as te}from"./useQuery-Bx9s5-D2.js";import{c as re}from"./catalog-DhK7_9-6.js";import{C as ft,E as pt,e as gt}from"./ExternalSourceEvalBadge-npO6bZ8N.js";import{L as oe}from"./LatexTitle-Z-HGmZ-H.js";import{S as Ke}from"./switch-BSZohE4x.js";import{I as xt}from"./Icon-D-kA0Owz.js";import{S as ce}from"./skeleton-HwvdxvSN.js";import{A as bt,a as yt}from"./alert-CFDDvdIM.js";import{B as wt}from"./BenchmarkTrendSparkline-C135_NtS.js";import{s as vt}from"./safeExternalHref-CkBrsh84.js";import{s as jt}from"./slug-BpH-Nkvz.js";import{i as _t}from"./apiErrors-BZ5h1Kmb.js";import St from"./NotFound-DtzwOULp.js";import"./useMutation-P_trTy9i.js";import"./research-DgpyzSy_.js";import"./plus-UK0TEjgd.js";import"./curation-C7Gmmp4z.js";import"./hover-card-ufez2uMo.js";import"./index-CxPKwmVQ.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 Ge=[{label:"All",maxParametersExclusive:void 0},{label:"<10M",maxParametersExclusive:1e7},{label:"<100M",maxParametersExclusive:1e8},{label:"<1B",maxParametersExclusive:1e9},{label:"<3B",maxParametersExclusive:3e9},{label:"<6B",maxParametersExclusive:6e9},{label:"<12B",maxParametersExclusive:12e9},{label:"<32B",maxParametersExclusive:32e9},{label:"<128B",maxParametersExclusive:128e9},{label:"<500B",maxParametersExclusive:5e11}];function kt(e){const t=e===null?void 0:Number(e);return Ge.some(r=>r.maxParametersExclusive===t)?t:void 0}function Ct(e){return new Intl.NumberFormat("en",{notation:"compact",maximumSignificantDigits:3}).format(e)}function Et(e){return[e.paper_id,e.task_id,e.dataset_id,e.model_name,e.harness??""].join("|")}function Nt(e){const t=new Map;for(const r of e){const s=Et(r),n=t.get(s);if(!n){t.set(s,{...r,metrics:{...r.metrics||{}},sourceEvaluationIds:[r.id],ranksByMetric:r.best_metric&&r.best_rank!=null?{[r.best_metric]:r.best_rank}:{},parameterCount:r.num_parameters??null,hasParameterConflict:!1});continue}n.metrics={...n.metrics,...r.metrics||{}},n.sourceEvaluationIds.push(r.id),r.best_metric&&r.best_rank!=null&&(n.ranksByMetric[r.best_metric]=r.best_rank),r.num_parameters!=null&&!n.hasParameterConflict&&(n.parameterCount===null?n.parameterCount=r.num_parameters:n.parameterCount!==r.num_parameters&&(n.parameterCount=null,n.hasParameterConflict=!0))}return Array.from(t.values())}function Le(e,t){return t===void 0?e:e.filter(r=>r.parameterCount!==null&&r.parameterCount<t)}function Rt(e,t){return t?e.id===t||e.sourceEvaluationIds.includes(t):!1}function Ie(e,t){return e.ranksByMetric[t]??e.best_rank??9999}function Pt(e){const t=Date.parse(e);return Number.isNaN(t)?"":new Date(t).toISOString().slice(0,10)}function $t(e){const t=new Map;for(const s of e)s.evaluated_on&&t.set(s.evaluated_on,(t.get(s.evaluated_on)??0)+1);const r=Array.from(t.values()).reduce((s,n)=>s+n,0);for(const[s,n]of t)if(n>=2&&n*2>r)return s;return null}function Mt(e,t){const r=e.evaluated_on;return r&&r!==t&&r!==Pt(e.updated_at)?r:e.paper_published_date||""}function Tt(e,t,r){if(e.length===0)return{points:[],sota:0,sotaModel:""};const s=$t(e),n=e.map(u=>{var R;const h=ie((R=u.metrics)==null?void 0:R[t]);return{eval:u,value:h,date:Mt(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.value<l:u.value>l;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 Ft(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 Qe(e,t,r,s){const n=t.find(i=>i.id===s);if(e.length===0)return null;if(n!=null&&n.task_id&&e.some(i=>i.id===n.task_id))return n.task_id;if(r){const i=e.find(l=>l.slug===r);if(i)return i.id}if(e.length===1)return e[0].id;if(t.length>0){const i=new Map;for(const d of t)i.set(d.task_id,(i.get(d.task_id)||0)+1);let l=null,c=-1;for(const d of e){const f=i.get(d.id)||0;f>c&&(c=f,l=d.id)}if(l)return l}return e[0].id}function Lt(e){var _,X,Y;const{evaluations:t,tasks:r,taskSlug:s,highlightEvalId:n,parameterBound:i,showMoreMetrics:l,fittingMetricCount:c=1}=e,d=Qe(r,t,s,n),f=r.find(o=>o.id===d)||r[0]||null,x=t.find(o=>o.id===n),u=Ft(t,d,e.hideClosed),h=Nt(u.visible),R=Le(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]:[],U=R.slice().sort((o,m)=>{const p=ie(o.metrics[j]),y=ie(m.metrics[j]);return p!==null&&y!==null?D==="↓"?p-y:y-p:p!==null?-1:y!==null?1:Ie(o,j)-Ie(m,j)});let I=null,N=0;const Q=U.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:Rt(o,n)}}),{points:z,sota:ee,sotaModel:O}=Tt(R,j,D),M=i===void 0?e.initialSummary:void 0,q=e.ready.evaluations&&e.ready.tasks&&e.ready.directions&&(!d||e.ready.metrics),K={parameter_coverage_known:h.filter(o=>o.parameterCount!==null).length,parameter_coverage_total:h.length};return{currentTaskId:d,primaryTask:f,activeMetric:j,arrow:D,allowedMetrics:S,orderedMetrics:W,visibleMetrics:w,rows:Q,chartPoints:z,highlightedEval:((Y=Q.find(o=>o.isHighlighted))==null?void 0:Y.evaluation)||null,hiddenClosedEvals:u.hiddenClosed,hiddenClosedTopEval:u.topHiddenClosed,parameterBound:i,parameterCoverage:K,hasParameterMetadata:K.parameter_coverage_known>0,parameterFilters:Ge.map(o=>({...o,selected:i===o.maxParametersExclusive,disabled:i!==o.maxParametersExclusive&&Le(h,o.maxParametersExclusive).length===0})),displayedMetric:q?j:M==null?void 0:M.metric,displayedSota:q?ee:M==null?void 0:M.value,displayedSotaModel:q?O:M==null?void 0:M.model_name,isSummaryLoading:!q&&!M,isInitialFilteredViewLoading:i!==void 0&&!q}}function It(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(l<s)return Math.max(1,l);const c=Math.floor((i-n)/t.metric);return Math.max(1,s,c)}function he(e,t){return parseFloat(e.getPropertyValue(t))||0}function At(e){const t=getComputedStyle(e);return{fixed:["--bm-rank-width","--bm-model-width","--bm-parameters-width","--bm-paper-width","--bm-year-width"].reduce((r,s)=>r+he(t,s),0),harness:he(t,"--bm-harness-width"),metric:he(t,"--bm-metric-width")}}const Bt=20;function Ae(e,t){return e?a.jsx(oe,{title:e}):t||"—"}function Dt({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=At(R);f.classList.toggle("unpins-trailing-columns",C<P.fixed+P.metric);const S=document.documentElement,g=S.scrollHeight>S.clientHeight?0:Bt;n(k=>It(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(ft,{}),(u.external??u.is_external)&&a.jsx(pt,{sourceUrl:u.source_url||u.external_source_url||u.result_url})]}),a.jsx("td",{className:"col-parameters",title:u.parameterCount===null?void 0:u.parameterCount.toLocaleString("en-US"),"aria-label":u.parameterCount===null?"Parameters unknown":`${u.parameterCount.toLocaleString("en-US")} parameters`,children:u.parameterCount===null?"—":Ct(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:Ae(u.paper_title,P)}):Ae(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 Be(e){const t=e.length===7?`${e}-01`:e,r=new Date(t).getTime();return Number.isFinite(r)?r:0}const fe=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function pe(e){const t=new Date(e);return{year:t.getFullYear(),month:t.getMonth()}}function Ht(e,t){if(e===t){const{year:d,month:f}=pe(e);return[{timestamp:new Date(d,f,1).getTime(),key:`${d}-${f}`,label:`${fe[f]} ${d}`}]}const r=pe(e),s=pe(t);if(r.year===s.year){const d=s.month-r.month+1;let f=1;const x=12;d>x&&(f=Math.ceil(d/x));const u=[];for(let h=r.month;h<=s.month;h+=f)u.push({timestamp:new Date(r.year,h,1).getTime(),key:`${r.year}-${h}`,label:d<=3?`${fe[h]} ${r.year}`:fe[h]});return u}const n=s.year-r.year+1;let i=1;const l=12;n>l&&(i=Math.ceil(n/l));const c=[];for(let d=r.year;d<=s.year;d+=i)c.push({timestamp:new Date(d,0,1).getTime(),key:String(d),label:String(d)});return c}const Vt=({points:e,metric:t})=>{const r=ot(),[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=>Be(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(Be(o.date)),y=(o.value-h)/C,$=f+S*(1-y);return{x:p,y:$,data:o,idx:m}}),w=W.filter(o=>o.data.isSota);let U="";if(w.length>=2){U=`M${w[0].x},${w[0].y}`;for(let o=1;o<w.length;o++){const m=w[o-1],p=w[o],y=(m.x+p.x)/2;U+=` C${y},${m.y} ${y},${p.y} ${p.x},${p.y}`}}const I=5.4,N=8,Q=9,z=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 $=o.x-y/2,E=o.x+y/2,v="middle";return $<c?($=c,E=c+y,v="start"):E>i-d&&(E=i-d,$=E-y,v="end"),{x:v==="start"?c:v==="end"?i-d:o.x,y:o.y-Q,text:p,anchor:v,left:$,right:E}},ee=[],O=w.length>0?z(w[w.length-1]):null;let M=-1/0;for(let o=0;o<w.length-1;o++){const m=z(w[o]);m&&(m.left<M+N||O&&m.right>O.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 q=Ht(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}`,$=!!o.data.paperRouteId;return a.jsxs("g",{children:[m,a.jsx("circle",{cx:o.x,cy:o.y,r:"10",fill:"transparent",style:{cursor:$?"pointer":"default",outline:"none"},tabIndex:0,role:$?"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=>{$&&(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),$=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($)})]},m)}),q.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"}}))}),U&&a.jsx("path",{d:U,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;H<c&&(H=c),H+E>i-d&&(H=i-d-E);const G=o.y-v-14>=f?o.y-v-12:o.y+12;return a.jsxs("g",{pointerEvents:"none",children:[a.jsx("rect",{x:H,y:G,width: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:G+19,fontSize:"12",fontFamily:"var(--sans)",fill:"var(--ink)",fontWeight:500,children:y})]})})()]})};function Wt(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 Ot=(()=>{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;r<s;r++)t.push(e[r]);return t}let ae=null;function Xe(e={}){return ae||(e.includeStyleProperties?(ae=e.includeStyleProperties,ae):(ae=Z(window.getComputedStyle(document.documentElement)),ae))}function de(e,t){const s=(e.ownerDocument.defaultView||window).getComputedStyle(e).getPropertyValue(t);return s?parseFloat(s.replace("px","")):0}function qt(e){const t=de(e,"border-left-width"),r=de(e,"border-right-width");return e.clientWidth+t+r}function Ut(e){const t=de(e,"border-top-width"),r=de(e,"border-bottom-width");return e.clientHeight+t+r}function Ye(e,t={}){const r=t.width||qt(e),s=t.height||Ut(e);return{width:r,height:s}}function zt(){let e,t;try{t=process}catch{}const r=t&&t.env?t.env.devicePixelRatio:null;return r&&(e=parseInt(r,10),Number.isNaN(e)&&(e=1)),e||window.devicePixelRatio||1}const V=16384;function Kt(e){(e.width>V||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 Gt(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<n;l+=1)i[l]=s.charCodeAt(l);r(new Blob([i],{type:t.type?t.type:"image/png"}))})}function ue(e){return new Promise((t,r)=>{const s=new Image;s.onload=()=>{s.decode().then(()=>{requestAnimationFrame(()=>t(s))})},s.onerror=r,s.crossOrigin="anonymous",s.decoding="async",s.src=e})}async function Qt(e){return Promise.resolve().then(()=>new XMLSerializer().serializeToString(e)).then(encodeURIComponent).then(t=>`data:image/svg+xml;charset=utf-8,${t}`)}async function Xt(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),Qt(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 Yt(e){const t=e.getPropertyValue("content");return`${e.cssText} content: '${t.replace(/'|"/g,"")}';`}function Jt(e,t){return Xe(t).map(r=>{const s=e.getPropertyValue(r),n=e.getPropertyPriority(r);return`${r}: ${s}${n?" !important":""};`}).join(" ")}function Zt(e,t,r,s){const n=`.${e}:${t}`,i=r.cssText?Yt(r):Jt(r,s);return document.createTextNode(`${n}{${i}}`)}function De(e,t,r,s){const n=window.getComputedStyle(e,r),i=n.getPropertyValue("content");if(i===""||i==="none")return;const l=Ot();try{t.className=`${t.className} ${l}`}catch{return}const c=document.createElement("style");c.appendChild(Zt(l,r,n,s)),t.appendChild(c)}function er(e,t,r){De(e,t,":before",r),De(e,t,":after",r)}const He="application/font-woff",Ve="image/jpeg",tr={woff:He,woff2:He,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:Ve,jpeg:Ve,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml",webp:"image/webp"};function rr(e){const t=/\.([^./]*?)$/g.exec(e);return t?t[1]:""}function ye(e){const t=rr(e).toLowerCase();return tr[t]||""}function ar(e){return e.split(/,/)[1]}function xe(e){return e.search(/^(data:)/)!==-1}function sr(e,t){return`data:${t};base64,${e}`}async function Je(e,t,r){const s=await fetch(e,t);if(s.status===404)throw new Error(`Resource "${s.url}" not found`);const n=await s.blob();return new Promise((i,l)=>{const c=new FileReader;c.onerror=l,c.onloadend=()=>{try{i(r({res:s,result:c.result}))}catch(d){l(d)}},c.readAsDataURL(n)})}const ge={};function nr(e,t,r){let s=e.replace(/\?.*/,"");return r&&(s=e),/ttf|otf|eot|woff2?/i.test(s)&&(s=s.replace(/.*\//,"")),t?`[${t}]${s}`:s}async function we(e,t,r){const s=nr(e,t,r.includeQueryParams);if(ge[s]!=null)return ge[s];r.cacheBust&&(e+=(/\?/.test(e)?"&":"?")+new Date().getTime());let n;try{const i=await Je(e,r.fetchRequestInit,({res:l,result:c})=>(t||(t=l.headers.get("Content-Type")||""),ar(c)));n=sr(i,t)}catch(i){n=r.imagePlaceholder||"";let l=`Failed to fetch resource: ${e}`;i&&(l=typeof i=="string"?i:i.message),l&&console.warn(l)}return ge[s]=n,n}async function ir(e){const t=e.toDataURL();return t==="data:,"?e.cloneNode(!1):ue(t)}async function lr(e,t){if(e.currentSrc){const i=document.createElement("canvas"),l=i.getContext("2d");i.width=e.clientWidth,i.height=e.clientHeight,l==null||l.drawImage(e,0,0,i.width,i.height);const c=i.toDataURL();return ue(c)}const r=e.poster,s=ye(r),n=await we(r,s,t);return ue(n)}async function or(e,t){var r;try{if(!((r=e==null?void 0:e.contentDocument)===null||r===void 0)&&r.body)return await me(e.contentDocument.body,t,!0)}catch{}return e.cloneNode(!1)}async function cr(e,t){return A(e,HTMLCanvasElement)?ir(e):A(e,HTMLVideoElement)?lr(e,t):A(e,HTMLIFrameElement)?or(e,t):e.cloneNode(Ze(e))}const dr=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SLOT",Ze=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SVG";async function ur(e,t,r){var s,n;if(Ze(t))return t;let i=[];return dr(e)&&e.assignedNodes?i=Z(e.assignedNodes()):A(e,HTMLIFrameElement)&&(!((s=e.contentDocument)===null||s===void 0)&&s.body)?i=Z(e.contentDocument.body.childNodes):i=Z(((n=e.shadowRoot)!==null&&n!==void 0?n:e).childNodes),i.length===0||A(e,HTMLVideoElement)||await i.reduce((l,c)=>l.then(()=>me(c,r)).then(d=>{d&&t.appendChild(d)}),Promise.resolve()),t}function mr(e,t,r){const s=t.style;if(!s)return;const n=window.getComputedStyle(e);n.cssText?(s.cssText=n.cssText,s.transformOrigin=n.transformOrigin):Xe(r).forEach(i=>{let l=n.getPropertyValue(i);i==="font-size"&&l.endsWith("px")&&(l=`${Math.floor(parseFloat(l.substring(0,l.length-2)))-.1}px`),A(e,HTMLIFrameElement)&&i==="display"&&l==="inline"&&(l="block"),i==="d"&&t.getAttribute("d")&&(l=`path(${t.getAttribute("d")})`),s.setProperty(i,l,n.getPropertyPriority(i))})}function hr(e,t){A(e,HTMLTextAreaElement)&&(t.innerHTML=e.value),A(e,HTMLInputElement)&&t.setAttribute("value",e.value)}function fr(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 pr(e,t,r){return A(t,Element)&&(mr(e,t,r),er(e,t,r),hr(e,t),fr(e,t)),t}async function gr(e,t){const r=e.querySelectorAll?e.querySelectorAll("use"):[];if(r.length===0)return e;const s={};for(let i=0;i<r.length;i++){const c=r[i].getAttribute("xlink:href");if(c){const d=e.querySelector(c),f=document.querySelector(c);!d&&f&&!s[c]&&(s[c]=await me(f,t,!0))}}const n=Object.values(s);if(n.length){const i="http://www.w3.org/1999/xhtml",l=document.createElementNS(i,"svg");l.setAttribute("xmlns",i),l.style.position="absolute",l.style.width="0",l.style.height="0",l.style.overflow="hidden",l.style.display="none";const c=document.createElementNS(i,"defs");l.appendChild(c);for(let d=0;d<n.length;d++)c.appendChild(n[d]);e.appendChild(l)}return e}async function me(e,t,r){return!r&&t.filter&&!t.filter(e)?null:Promise.resolve(e).then(s=>cr(s,t)).then(s=>ur(e,s,t)).then(s=>pr(e,s,t)).then(s=>gr(s,t))}const et=/url\((['"]?)([^'"]+?)\1\)/g,xr=/url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g,br=/src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;function yr(e){const t=e.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1");return new RegExp(`(url\\(['"]?)(${t})(['"]?\\))`,"g")}function wr(e){const t=[];return e.replace(et,(r,s,n)=>(t.push(n),r)),t.filter(r=>!xe(r))}async function vr(e,t,r,s,n){try{const i=r?Wt(t,r):t,l=ye(t);let c;return n||(c=await we(i,l,s)),e.replace(yr(t),`$1${c}$3`)}catch{}return e}function jr(e,{preferredFontFormat:t}){return t?e.replace(br,r=>{for(;;){const[s,,n]=xr.exec(r)||[];if(!n)return"";if(n===t)return`src: ${s};`}}):e}function tt(e){return e.search(et)!==-1}async function rt(e,t,r){if(!tt(e))return e;const s=jr(e,r);return wr(s).reduce((i,l)=>i.then(c=>vr(c,l,t,r)),Promise.resolve(s))}async function se(e,t,r){var s;const n=(s=t.style)===null||s===void 0?void 0:s.getPropertyValue(e);if(n){const i=await rt(n,null,r);return t.style.setProperty(e,i,t.style.getPropertyPriority(e)),!0}return!1}async function _r(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 Sr(e,t){const r=A(e,HTMLImageElement);if(!(r&&!xe(e.src))&&!(A(e,SVGImageElement)&&!xe(e.href.baseVal)))return;const s=r?e.src:e.href.baseVal,n=await we(s,ye(s),t);await new Promise((i,l)=>{e.onload=i,e.onerror=t.onImageErrorHandler?(...d)=>{try{i(t.onImageErrorHandler(...d))}catch(f){l(f)}}:l;const c=e;c.decode&&(c.decode=i),c.loading==="lazy"&&(c.loading="eager"),r?(e.srcset="",e.src=n):e.href.baseVal=n})}async function kr(e,t){const s=Z(e.childNodes).map(n=>at(n,t));await Promise.all(s).then(()=>e)}async function at(e,t){A(e,Element)&&(await _r(e,t),await Sr(e,t),await kr(e,t))}function Cr(e,t){const{style:r}=e;t.backgroundColor&&(r.backgroundColor=t.backgroundColor),t.width&&(r.width=`${t.width}px`),t.height&&(r.height=`${t.height}px`);const s=t.style;return s!=null&&Object.keys(s).forEach(n=>{r[n]=s[n]}),e}const We={};async function Oe(e){let t=We[e];if(t!=null)return t;const s=await(await fetch(e)).text();return t={url:e,cssText:s},We[e]=t,t}async function qe(e,t){let r=e.cssText;const s=/url\(["']?([^"')]+)["']?\)/g,i=(r.match(/url\([^)]+\)/g)||[]).map(async l=>{let c=l.replace(s,"$1");return c.startsWith("https://")||(c=new URL(c,e.url).href),Je(c,t.fetchRequestInit,({result:d})=>(r=r.replace(l,`url(${d})`),[l,d]))});return Promise.all(i).then(()=>r)}function Ue(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 Er(e,t){const r=[],s=[];return e.forEach(n=>{if("cssRules"in n)try{Z(n.cssRules||[]).forEach((i,l)=>{if(i.type===CSSRule.IMPORT_RULE){let c=l+1;const d=i.href,f=Oe(d).then(x=>qe(x,t)).then(x=>Ue(x).forEach(u=>{try{n.insertRule(u,u.startsWith("@import")?c+=1:n.cssRules.length)}catch(h){console.error("Error inserting rule from remote css",{rule:u,error:h})}})).catch(x=>{console.error("Error loading remote css",x.toString())});s.push(f)}})}catch(i){const l=e.find(c=>c.href==null)||document.styleSheets[0];n.href!=null&&s.push(Oe(n.href).then(c=>qe(c,t)).then(c=>Ue(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 Nr(e){return e.filter(t=>t.type===CSSRule.FONT_FACE_RULE).filter(t=>tt(t.style.getPropertyValue("src")))}async function Rr(e,t){if(e.ownerDocument==null)throw new Error("Provided element is not within a Document");const r=Z(e.ownerDocument.styleSheets),s=await Er(r,t);return Nr(s)}function st(e){return e.trim().replace(/["']/g,"")}function Pr(e){const t=new Set;function r(s){(s.style.fontFamily||getComputedStyle(s).fontFamily).split(",").forEach(i=>{t.add(st(i))}),Array.from(s.children).forEach(i=>{i instanceof HTMLElement&&r(i)})}return r(e),t}async function $r(e,t){const r=await Rr(e,t),s=Pr(e);return(await Promise.all(r.filter(i=>s.has(st(i.style.fontFamily))).map(i=>{const l=i.parentStyleSheet?i.parentStyleSheet.href:null;return rt(i.cssText,l,t)}))).join(`
2
  `)}async function Mr(e,t){const r=t.fontEmbedCSS!=null?t.fontEmbedCSS:t.skipFonts?null:await $r(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 Tr(e,t={}){const{width:r,height:s}=Ye(e,t),n=await me(e,t,!0);return await Mr(n,t),await at(n,t),Cr(n,t),await Xt(n,r,s)}async function Fr(e,t={}){const{width:r,height:s}=Ye(e,t),n=await Tr(e,t),i=await ue(n),l=document.createElement("canvas"),c=l.getContext("2d"),d=t.pixelRatio||zt(),f=t.canvasWidth||r,x=t.canvasHeight||s;return l.width=f*d,l.height=x*d,t.skipAutoScale||Kt(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 Lr(e,t={}){const r=await Fr(e,t);return await Gt(r)}const be="#ffffff";function Ir(){return typeof window>"u"?be:window.getComputedStyle(document.documentElement).getPropertyValue("--bg-elevated").trim()||be}function Ar(e){if(typeof window>"u")return be;const t=window.getComputedStyle(e).backgroundColor;return!t||t==="rgba(0, 0, 0, 0)"||t==="transparent"?Ir():t}async function Br(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 Lr(e,{pixelRatio:2,cacheBust:!0,backgroundColor:Ar(e)});if(!t)throw new Error("Failed to render screenshot.");await window.navigator.clipboard.write([new window.ClipboardItem({"image/png":t})])}const nt=({targetRef:e,label:t})=>{const{toast:r}=ct(),[s,n]=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 Br(d),n("copied"),r({title:"Screenshot copied",description:`Image of the ${t} copied to your clipboard.`}),i.current!==null&&window.clearTimeout(i.current),i.current=window.setTimeout(()=>n("idle"),1500)}catch(f){n("idle"),r({title:"Copy failed",description:f instanceof Error&&f.message?f.message:"Could not copy the screenshot to your clipboard.",variant:"destructive"})}finally{d.classList.remove("is-capturing")}}},[e,t,r]),c=s==="copied"?"Copied":s==="copying"?"Copying…":"Copy image";return a.jsxs("button",{type:"button",className:"bm-copy-btn",onClick:l,disabled:s==="copying","aria-label":`Copy ${t} screenshot to clipboard`,title:`Copy ${t} screenshot to clipboard`,children:[a.jsx(xt,{name:"copy",size:11}),c]})};function Dr({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(Ke,{className:"bm-closed-toggle-switch",checked:!r,onCheckedChange:h=>{s(!h)},"aria-label":"Show closed-source models"}),a.jsx("span",{className:"bm-closed-toggle-label",children:"Closed-source"})]}),a.jsx(nt,{targetRef:i,label:"SOTA chart"})]})]}),a.jsx("div",{className:"bm-chart-wrap",children:a.jsx(Vt,{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 Hr(e){if(!e)return null;const t=e.trim(),r=t.match(/^https?:\/\/(?:www\.)?arxiv\.org\/(?:abs|pdf)\/([^/?#]+)/i);if(r!=null&&r[1])return r[1].replace(/\.pdf$/i,"");const s=t.match(/^(?:https?:\/\/(?:www\.)?paperswithcode\.co)?\/paper\/([^/?#]+)/i);return(s==null?void 0:s[1])??null}function ze(e,t){return e?a.jsx(oe,{title:e}):t||"—"}const oa=()=>{var ve,je,_e,Se,ke,Ce,Ee,Ne,Re,Pe,$e;const{datasetSlug:e}=dt(),[t,r]=ut(),s=t.get("task")||void 0,n=t.get("eval")||void 0,i=kt(t.get("max_parameters_exclusive")),{preferences:l,setHideClosedSourceEvals:c}=mt(),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:["dataset",e,"with-paper",s,l.hide_closed_source_evals?"open":"all"],queryFn:()=>re.getDatasetBySlug(e,{include_paper:!0,task:s,is_open:l.hide_closed_source_evals?!0:void 0}),enabled:!!e,staleTime:10*60*1e3}),k=te({queryKey:["dataset-evals",(ve=g.data)==null?void 0:ve.id],queryFn:()=>gt.byDataset(g.data.id),enabled:!!((je=g.data)!=null&&je.id),staleTime:5*60*1e3}),B=te({queryKey:["dataset-tasks",(_e=g.data)==null?void 0:_e.id],queryFn:()=>re.datasetTasks(g.data.id),enabled:!!((Se=g.data)!=null&&Se.id),staleTime:10*60*1e3}),j=te({queryKey:["metric-directions"],queryFn:()=>re.metricDirections(),staleTime:60*60*1e3}),D=Qe(B.data||[],k.data||[],s,n),W=te({queryKey:["task-benchmark-trends",D,l.hide_closed_source_evals?!0:void 0],queryFn:()=>re.trendingBenchmarks(D,{limit:100,min_recent_papers:0,is_open:l.hide_closed_source_evals?!0:void 0}),enabled:!!D&&!!((ke=g.data)!=null&&ke.id),staleTime:10*60*1e3}),w=L.useMemo(()=>{var b;return(((b=W.data)==null?void 0:b.results)||[]).find(T=>{var F;return T.id===((F=g.data)==null?void 0:F.id)})||null},[W.data,(Ce=g.data)==null?void 0:Ce.id]),U=te({queryKey:["leaderboard-metrics",(Ee=g.data)==null?void 0:Ee.id,D],queryFn:()=>re.leaderboardMetrics(g.data.id,D),enabled:!!((Ne=g.data)!=null&&Ne.id)&&!!D,staleTime:10*60*1e3}),I=Lt({evaluations:k.data||[],tasks:B.data||[],configuredMetrics:U.data||[],directions:j.data,initialSummary:(Re=g.data)==null?void 0:Re.leaderboard_summary,taskSlug:s,highlightEvalId:n,metric:t.get("metric")||void 0,hideClosed:l.hide_closed_source_evals,parameterBound:i,showMoreMetrics:C,fittingMetricCount:P,ready:{evaluations:k.isSuccess,tasks:B.isSuccess,directions:j.isSuccess,metrics:U.isSuccess}}),{primaryTask:N,hiddenClosedEvals:Q,hiddenClosedTopEval:z,isSummaryLoading:ee,displayedMetric:O,displayedSota:M,displayedSotaModel:q,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:["area",N==null?void 0:N.area_id],queryFn:()=>re.getArea(N.area_id),enabled:!!(N!=null&&N.area_id),staleTime:10*60*1e3});if(g.isLoading)return a.jsxs("div",{className:"page",children:[a.jsx(ce,{className:"h-12 w-1/2 mb-6"}),a.jsx(ce,{className:"h-64 w-full"})]});if(_t(g.error))return a.jsx(St,{});if(g.error||!g.data)return a.jsx("div",{className:"page",children:a.jsx(bt,{variant:"destructive",children:a.jsx(yt,{children:"Benchmark not found."})})});const p=g.data,y=!!p.supports_harness,$=b=>{r(T=>{const F=new URLSearchParams(T);return b===void 0?F.delete("max_parameters_exclusive"):F.set("max_parameters_exclusive",String(b)),F})},E=b=>{r(T=>{const F=new URLSearchParams(T);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)||Hr(p.paper_url),J=(v==null?void 0:v.title)||p.introducing_paper_title||null,G=((Pe=v==null?void 0:v.published)==null?void 0:Pe.slice(0,4))||p.introduced_year||null,it=!!H||!!p.paper_url||!!J,lt=v!=null&&v.arxiv_id||($e=p.paper_url)!=null&&$e.match(/^https?:\/\/(?:www\.)?arxiv\.org\//i)?`arXiv:${H}`:`Paper ${H}`;return a.jsx("div",{className:"page",children:a.jsxs("div",{className:"bm-page",children:[a.jsxs("div",{className:"breadcrumb",children:[a.jsx(ne,{to:"/tasks",children:"Tasks"}),m.data&&a.jsxs(a.Fragment,{children:[a.jsx("span",{className:"sep",children:"/"}),a.jsx(ne,{to:`/tasks#area-${jt(m.data.name)}`,children:m.data.name})]}),N&&a.jsxs(a.Fragment,{children:[a.jsx("span",{className:"sep",children:"/"}),a.jsx(ne,{to:`/tasks/${N.slug||N.id}`,children:N.name})]}),a.jsx("span",{className:"sep",children:"/"}),a.jsx("span",{style:{color:"var(--accent-text)"},children:p.name})]}),a.jsxs("div",{className:"bm-title-row",children:[a.jsx("h1",{className:"bm-title",children:p.name}),w&&a.jsxs("div",{className:"bm-title-trend","aria-label":`${p.name} reporting trend`,children:[a.jsx(wt,{history:w.history,benchmarkName:w.name}),a.jsxs("span",{className:"bm-title-trend-summary",children:[a.jsx("strong",{children:w.recent_paper_count})," ",w.recent_paper_count===1?"paper":"papers",w.rate_change==null?w.recent_paper_count>0&&a.jsx("span",{className:"benchmark-trend-change is-new",children:"new"}):a.jsxs("span",{className:`benchmark-trend-change ${w.rate_change>=1?"is-up":"is-down"}`,children:[w.rate_change>=1?"↑":"↓"," ",w.rate_change.toFixed(1),"×"]})]})]})]}),a.jsx(ht,{kind:"benchmark",entityId:p.id}),a.jsxs("div",{className:"bm-subtitle",children:[ee?a.jsx(ce,{className:"h-5 w-64 bm-summary-skeleton","aria-label":"Loading benchmark summary"}):a.jsxs("span",{children:[O&&a.jsxs(a.Fragment,{children:[a.jsx("span",{className:"metric-tag",children:O}),a.jsx("span",{style:{color:"var(--hairline-strong)",margin:"0 8px"},children:"·"})]}),q?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:q})]}):a.jsxs("span",{children:[I.rows.length," evaluations"]})]}),p.hf_url&&a.jsxs("a",{className:"bm-action-btn",href:p.hf_url,target:"_blank",rel:"noopener noreferrer",children:[a.jsx("span",{"aria-hidden":"true",children:"🤗"})," View on Hugging Face"]})]}),p.description&&a.jsx("p",{className:"bm-description",children:p.description}),l.hide_closed_source_evals&&Q.length>0&&a.jsxs("div",{className:"bm-hidden-closed-notice",children:[a.jsxs("span",{children:[Q.length," closed-source ",Q.length===1?"row is":"rows are"," hidden",z!=null&&z.model_name?a.jsxs(a.Fragment,{children:[", including ",a.jsx("strong",{children:z.model_name})]}):null,"."]}),a.jsx("button",{type:"button",className:"bm-hidden-closed-action",onClick:()=>{c(!1)},children:"Show closed-source"})]}),it&&a.jsxs("div",{className:"method-source",style:{marginTop:0,marginBottom:18},children:[a.jsx("span",{className:"method-source-label",children:"Source"}),H?a.jsxs(ne,{to:`/paper/${H}`,target:"_blank",rel:"noopener noreferrer",className:"method-source-link",children:[a.jsx("span",{className:"method-source-title",children:J?a.jsx(oe,{title:J}):lt}),G&&a.jsx("span",{className:"method-source-meta",children:G})]}):p.paper_url?a.jsxs("a",{href:vt(p.paper_url)??void 0,target:"_blank",rel:"noopener noreferrer",className:"method-source-link",children:[a.jsx("span",{className:"method-source-title",children:J?a.jsx(oe,{title:J}):p.paper_url}),G&&a.jsx("span",{className:"method-source-meta",children:G})]}):a.jsxs("div",{className:"method-source-link is-static",children:[a.jsx("span",{className:"method-source-title",children:J?a.jsx(oe,{title:J}):null}),G&&a.jsx("span",{className:"method-source-meta",children:G})]})]}),a.jsx(Dr,{model:I,datasetName:p.name,hideClosed:l.hide_closed_source_evals,setHideClosed:c,setMetric:E}),_&&(()=>{var Te,Fe;const b=_.paper_arxiv_id||_.paper_id,T=_.paper_title||(_.paper_arxiv_id?`arXiv:${_.paper_arxiv_id}`:null),F=_.best_metric&&((Te=_.metrics)==null?void 0:Te[_.best_metric])!==void 0?_.best_metric:I.activeMetric,Me=(Fe=_.metrics)==null?void 0:Fe[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||T||"—",_.harness?` · ${_.harness}`:""]}),a.jsxs("span",{className:"bm-highlight-meta",children:[Me!==void 0&&F?a.jsxs(a.Fragment,{children:[F,": ",le(Me),T?" · ":""]}):null,b?a.jsx(ne,{to:`/paper/${b}`,children:ze(_.paper_title,T)}):ze(_.paper_title,T)]})]})]})})(),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(Ke,{className:"bm-closed-toggle-switch",checked:!l.hide_closed_source_evals,onCheckedChange:b=>{c(!b)},"aria-label":"Show closed-source models"}),a.jsx("span",{className:"bm-closed-toggle-label",children:"Closed-source"})]}),!K&&!X&&k.isSuccess?a.jsx("span",{className:"bm-parameter-unavailable",children:"Parameter metadata unavailable"}):null,a.jsx(nt,{targetRef:x,label:"leaderboard"})]})]}),!K&&X&&a.jsxs("div",{className:"bm-parameter-filter-bar",children:[a.jsx("span",{className:"bm-parameter-filter-label",children:"Parameters Size"}),a.jsx("div",{className:"bm-parameter-filter-options",role:"group","aria-label":"Filter leaderboard by parameter size",children:I.parameterFilters.map(b=>{const{selected:T,disabled:F}=b;return a.jsx("button",{type:"button",className:`bm-parameter-filter-option${T?" is-active":""}`,"aria-pressed":T,disabled:F,onClick:()=>$(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,T)=>a.jsx(ce,{className:"h-10 w-full mb-2"},T))}):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:()=>$(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(Dt,{model:I,showHarness:y,setMetric:E,highlightRowRef:d,onFittingMetricCountChange:S})]})]})]})})};export{oa as default};
assets/{BenchmarkTrendSparkline-BBLKxMdW.js → BenchmarkTrendSparkline-C135_NtS.js} RENAMED
@@ -1 +1 @@
1
- import{r as C,j as t}from"./index-YwiKC6Po.js";const g=112,p=42,o=5,m=5,b=new Intl.DateTimeFormat("en",{month:"short",timeZone:"UTC"}),y=(e,d)=>{const r=new Date(`${e}T00:00:00Z`),n=new Date(`${d}T00:00:00Z`);return r.getUTCMonth()===n.getUTCMonth()?`${b.format(r)} ${r.getUTCDate()}–${n.getUTCDate()}`:`${b.format(r)} ${r.getUTCDate()}–${b.format(n)} ${n.getUTCDate()}`},I=({history:e,benchmarkName:d,interactive:r=!1})=>{const[n,x]=C.useState(null),h=e.map(s=>s.paper_count),M=Math.max(1,...h),f=g-o*2,T=p-m*2,v=h.length>1?f/(h.length-1):0,a=h.map((s,c)=>({x:o+v*c,y:m+T-s/M*T})),$=a.map(({x:s,y:c})=>`${s},${c}`).join(" "),_=a.length?`${o},${p-m} ${$} ${a[a.length-1].x},${p-m}`:"",D=h.reduce((s,c)=>s+c,0),u=49,N=14,i=n==null?null:a[n],j=i?Math.min(g-o-u,Math.max(o,i.x-u/2)):0,k=i?i.y>p/2?i.y-N-3:i.y+3:0;return t.jsxs("svg",{className:`benchmark-trend-sparkline${r?" is-interactive":""}`,viewBox:`0 0 ${g} ${p}`,role:r?"group":"img","aria-label":`${d}: ${D} reporting papers across the displayed trend history`,children:[t.jsxs("title",{children:[d,": ",D," reporting papers across the displayed trend history"]}),t.jsx("line",{className:"benchmark-trend-axis",x1:o,y1:p-m,x2:g-o,y2:p-m}),t.jsx("line",{className:"benchmark-trend-axis",x1:o,y1:m,x2:o,y2:p-m}),_&&t.jsx("polygon",{className:"benchmark-trend-area",points:_}),$&&t.jsx("polyline",{className:"benchmark-trend-line",points:$}),r?a.map(({x:s,y:c},l)=>t.jsxs("g",{className:"benchmark-trend-point",tabIndex:0,role:"img","aria-label":`${y(e[l].start_date,e[l].end_date)}: ${e[l].paper_count} ${e[l].paper_count===1?"paper":"papers"}`,onMouseEnter:()=>x(l),onMouseLeave:()=>x(null),onFocus:()=>x(l),onBlur:()=>x(null),children:[t.jsx("circle",{className:"benchmark-trend-point-hit",cx:s,cy:c,r:"5"}),t.jsx("circle",{className:"benchmark-trend-point-mark",cx:s,cy:c,r:"1.8"})]},`${e[l].start_date}-${e[l].end_date}`)):a.length>0&&t.jsx("circle",{className:"benchmark-trend-dot",cx:a[a.length-1].x,cy:a[a.length-1].y,r:"2.6"}),i&&n!=null&&t.jsxs("g",{className:"benchmark-trend-tooltip",pointerEvents:"none",children:[t.jsx("rect",{x:j,y:k,width:u,height:N,rx:"2"}),t.jsx("text",{x:j+3,y:k+5.4,children:y(e[n].start_date,e[n].end_date)}),t.jsxs("text",{className:"benchmark-trend-tooltip-value",x:j+3,y:k+11,children:[e[n].paper_count," ",e[n].paper_count===1?"paper":"papers"]})]})]})};export{I as B};
 
1
+ import{r as C,j as t}from"./index-CbgxfyGU.js";const g=112,p=42,o=5,m=5,b=new Intl.DateTimeFormat("en",{month:"short",timeZone:"UTC"}),y=(e,d)=>{const r=new Date(`${e}T00:00:00Z`),n=new Date(`${d}T00:00:00Z`);return r.getUTCMonth()===n.getUTCMonth()?`${b.format(r)} ${r.getUTCDate()}–${n.getUTCDate()}`:`${b.format(r)} ${r.getUTCDate()}–${b.format(n)} ${n.getUTCDate()}`},I=({history:e,benchmarkName:d,interactive:r=!1})=>{const[n,x]=C.useState(null),h=e.map(s=>s.paper_count),M=Math.max(1,...h),f=g-o*2,T=p-m*2,v=h.length>1?f/(h.length-1):0,a=h.map((s,c)=>({x:o+v*c,y:m+T-s/M*T})),$=a.map(({x:s,y:c})=>`${s},${c}`).join(" "),_=a.length?`${o},${p-m} ${$} ${a[a.length-1].x},${p-m}`:"",D=h.reduce((s,c)=>s+c,0),u=49,N=14,i=n==null?null:a[n],j=i?Math.min(g-o-u,Math.max(o,i.x-u/2)):0,k=i?i.y>p/2?i.y-N-3:i.y+3:0;return t.jsxs("svg",{className:`benchmark-trend-sparkline${r?" is-interactive":""}`,viewBox:`0 0 ${g} ${p}`,role:r?"group":"img","aria-label":`${d}: ${D} reporting papers across the displayed trend history`,children:[t.jsxs("title",{children:[d,": ",D," reporting papers across the displayed trend history"]}),t.jsx("line",{className:"benchmark-trend-axis",x1:o,y1:p-m,x2:g-o,y2:p-m}),t.jsx("line",{className:"benchmark-trend-axis",x1:o,y1:m,x2:o,y2:p-m}),_&&t.jsx("polygon",{className:"benchmark-trend-area",points:_}),$&&t.jsx("polyline",{className:"benchmark-trend-line",points:$}),r?a.map(({x:s,y:c},l)=>t.jsxs("g",{className:"benchmark-trend-point",tabIndex:0,role:"img","aria-label":`${y(e[l].start_date,e[l].end_date)}: ${e[l].paper_count} ${e[l].paper_count===1?"paper":"papers"}`,onMouseEnter:()=>x(l),onMouseLeave:()=>x(null),onFocus:()=>x(l),onBlur:()=>x(null),children:[t.jsx("circle",{className:"benchmark-trend-point-hit",cx:s,cy:c,r:"5"}),t.jsx("circle",{className:"benchmark-trend-point-mark",cx:s,cy:c,r:"1.8"})]},`${e[l].start_date}-${e[l].end_date}`)):a.length>0&&t.jsx("circle",{className:"benchmark-trend-dot",cx:a[a.length-1].x,cy:a[a.length-1].y,r:"2.6"}),i&&n!=null&&t.jsxs("g",{className:"benchmark-trend-tooltip",pointerEvents:"none",children:[t.jsx("rect",{x:j,y:k,width:u,height:N,rx:"2"}),t.jsx("text",{x:j+3,y:k+5.4,children:y(e[n].start_date,e[n].end_date)}),t.jsxs("text",{className:"benchmark-trend-tooltip-value",x:j+3,y:k+11,children:[e[n].paper_count," ",e[n].paper_count===1?"paper":"papers"]})]})]})};export{I as B};
assets/{CatalogEntityPreviewLink-Cv_oezOz.js → CatalogEntityPreviewLink-Cvehtzvn.js} RENAMED
@@ -1,4 +1,4 @@
1
- import{n as m,$ as h,K as d,j as s,L as g,Y as f}from"./index-YwiKC6Po.js";import{u as k}from"./useQuery-DPH6Mb2w.js";import{H as w,a as y,b as v}from"./hover-card-BY9tUGxy.js";import{c as l}from"./catalog-B15Yh5dN.js";/**
2
  * @license lucide-react v0.462.0 - ISC
3
  *
4
  * This source code is licensed under the ISC license.
 
1
+ import{n as m,a0 as h,M as d,j as s,L as g,Z as f}from"./index-CbgxfyGU.js";import{u as k}from"./useQuery-Bx9s5-D2.js";import{H as w,a as y,b as v}from"./hover-card-ufez2uMo.js";import{c as l}from"./catalog-DhK7_9-6.js";/**
2
  * @license lucide-react v0.462.0 - ISC
3
  *
4
  * This source code is licensed under the ISC license.
assets/{ChatView-DsnEMREv.js → ChatView-DlSbJMKT.js} RENAMED
@@ -1,4 +1,4 @@
1
- var ir=Object.defineProperty;var or=(e,r,t)=>r in e?ir(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t;var ee=(e,r,t)=>or(e,typeof r!="symbol"?r+"":r,t);import{n as cr,r as d,j as n,X as Pt,p as Ht,K as rt,a as Ut,u as lr,c as ur,e as dr,f as pr,Z as fr,J as hr,L as Ct,Q as mr,S as gr,U as yr,V as At,m as _r}from"./index-YwiKC6Po.js";import{u as Pe}from"./useQuery-DPH6Mb2w.js";import{C as br,U as jt,b as wr,f as De,c as xr,g as vr,A as Sr,a as Er}from"./ArtifactWorkspace-BxDA6yNF.js";import{f as Ue,h as Rr,j as Kt,k as Ir,T as kr,e as Wt,l as Cr,m as Ar,n as jr,r as Tr,o as Tt,s as Yt,t as nt,v as He,w as Le,x as Mr,y as Mt,z as Nr,B as Dr,E as ut,F as $t,G as Lr,H as Fr,I as Or,J as qr,D as st,K as Br,L as Pr,M as Je,N as Qe,O as Hr,Q as ze,R as Ge,U as Ur,V as Kr,S as Wr,W as Yr,X as Nt,Y as $r}from"./chatSessions-CdNQ1toA.js";import{M as Vr}from"./McpShowcase-Fj71TTNl.js";import{S as Qr}from"./share-2-m8aPY8Vq.js";import{c as Xe}from"./chat-DHGOonJg.js";import{u as zr,O as Gr}from"./openrouter-BT3NQ0bL.js";import{q as Vt}from"./queryOptions-C9woPjwX.js";/* empty css */import"./hover-card-BY9tUGxy.js";import"./CatalogEntityPreviewLink-Cv_oezOz.js";import"./catalog-B15Yh5dN.js";import"./github-BZMCt7Ub.js";import"./file-text-Cijxx2XD.js";import"./PaperPreviewLink-CKfmgBjs.js";import"./index-CoRCN2p0.js";import"./index-BM_xSDJM.js";import"./katex-DkKDou_j.js";import"./paperQueryKeys-C5FMa4Oj.js";import"./curation-CkzNFTMJ.js";import"./useMutation-f6iDkf3w.js";import"./copy-YHg6twss.js";import"./thumbs-up-D9G2aLNB.js";import"./arrow-left-B08fyfNi.js";import"./external-link-4bBJT0yO.js";import"./plus-Cfz0QbT1.js";import"./search-wcEXdf1i.js";import"./chevron-up-BXtxbTfV.js";import"./AuthorAvatar-CoTET6B3.js";import"./AgentLogos-DhD8p5ds.js";/**
2
  * @license lucide-react v0.462.0 - ISC
3
  *
4
  * This source code is licensed under the ISC license.
 
1
+ var ir=Object.defineProperty;var or=(e,r,t)=>r in e?ir(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t;var ee=(e,r,t)=>or(e,typeof r!="symbol"?r+"":r,t);import{n as cr,r as d,j as n,X as Pt,p as Ht,M as rt,a as Ut,u as lr,c as ur,e as dr,f as pr,_ as fr,K as hr,L as Ct,S as mr,U as gr,V as yr,W as At,m as _r}from"./index-CbgxfyGU.js";import{u as Pe}from"./useQuery-Bx9s5-D2.js";import{C as br,U as jt,b as wr,f as De,c as xr,g as vr,A as Sr,a as Er}from"./ArtifactWorkspace-Cwix1Wp6.js";import{f as Ue,h as Rr,j as Kt,k as Ir,T as kr,e as Wt,l as Cr,m as Ar,n as jr,r as Tr,o as Tt,s as Yt,t as nt,v as He,w as Le,x as Mr,y as Mt,z as Nr,B as Dr,E as ut,F as $t,G as Lr,H as Fr,I as Or,J as qr,D as st,K as Br,L as Pr,M as Je,N as Qe,O as Hr,Q as ze,R as Ge,U as Ur,V as Kr,S as Wr,W as Yr,X as Nt,Y as $r}from"./chatSessions-DwLUbLRo.js";import{M as Vr}from"./McpShowcase-CMLfdJM2.js";import{S as Qr}from"./share-2-hXe4dX_y.js";import{c as Xe}from"./chat-DzTo2WUO.js";import{u as zr,O as Gr}from"./openrouter-DiuY1sPP.js";import{q as Vt}from"./queryOptions-C9woPjwX.js";/* empty css */import"./hover-card-ufez2uMo.js";import"./CatalogEntityPreviewLink-Cvehtzvn.js";import"./catalog-DhK7_9-6.js";import"./github-BYklgHDz.js";import"./file-text-BK_7Q2rV.js";import"./PaperPreviewLink-DZDNIh1g.js";import"./index-ZkEATkOr.js";import"./index-BH3yOoza.js";import"./katex-DkKDou_j.js";import"./paperQueryKeys-B8u1BWlI.js";import"./curation-C7Gmmp4z.js";import"./useMutation-P_trTy9i.js";import"./copy-bzw7JVus.js";import"./thumbs-up-CDCzGuPd.js";import"./arrow-left-Czeu3VzJ.js";import"./external-link-DZIH4GGr.js";import"./plus-UK0TEjgd.js";import"./search-CLtAJGOp.js";import"./chevron-up-Cpt5JLeI.js";import"./AuthorAvatar-CUJMmp_z.js";import"./AgentLogos-BBl9UNVD.js";/**
2
  * @license lucide-react v0.462.0 - ISC
3
  *
4
  * This source code is licensed under the ISC license.
assets/{ConferenceDetailView-CX4S54m2.js → ConferenceDetailView-i-HB-ysc.js} RENAMED
@@ -1 +1 @@
1
- import{u as y,r as k,j as e,L as h}from"./index-YwiKC6Po.js";import{u as _}from"./useQuery-DPH6Mb2w.js";import{a as f,A as S,b}from"./AreaSection-CfCNkiTd.js";import{M as j}from"./MarkdownText-C-8yLDus.js";import{c as A}from"./catalog-B15Yh5dN.js";import{i as C}from"./apiErrors-DBfE_SVR.js";import{s as E}from"./areas-Dvi8w2dp.js";import{c as F,h as L}from"./colors-BkWRhvFI.js";import{C as $}from"./conferenceListings-BnmhBx-_.js";import{f as T}from"./deadlines-BH32v7D1.js";import{d as w}from"./transform-CNg3rvXk.js";import{S as D}from"./skeleton-CXR1qouH.js";import{A as P,a as R}from"./alert-Cx5luC5D.js";import{s as B}from"./safeExternalHref-CkBrsh84.js";import K from"./NotFound-D8hwuoEl.js";/* empty css */import"./PaperPreviewLink-CKfmgBjs.js";import"./index-CoRCN2p0.js";import"./index-BM_xSDJM.js";import"./katex-DkKDou_j.js";import"./hover-card-BY9tUGxy.js";import"./paperQueryKeys-C5FMa4Oj.js";import"./curation-CkzNFTMJ.js";import"./useMutation-f6iDkf3w.js";const ce=()=>{var g,x;const{confSlug:o}=y(),t=_({queryKey:["conference-areas-with-tasks",o],queryFn:()=>A.conferenceAreasWithTasks(o),enabled:!!o,staleTime:10*60*1e3}),m=k.useMemo(()=>{var a;return E(((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(K,{});if(t.error)return e.jsx("div",{className:"page",children:e.jsx(P,{variant:"destructive",children:e.jsx(R,{children:"Failed to load conference. Please try again."})})});const p=s?T(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(D,{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(S,{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=F(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}}),w(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(b,{areas:m})]})};export{ce as default};
 
1
+ import{u as y,r as k,j as e,L as h}from"./index-CbgxfyGU.js";import{u as _}from"./useQuery-Bx9s5-D2.js";import{a as f,A as S,b}from"./AreaSection-NWvfO4Sb.js";import{M as j}from"./MarkdownText-Bj-G_S-B.js";import{c as A}from"./catalog-DhK7_9-6.js";import{i as C}from"./apiErrors-BZ5h1Kmb.js";import{s as E}from"./areas-Dvi8w2dp.js";import{c as F,h as L}from"./colors-BkWRhvFI.js";import{C as $}from"./conferenceListings-BnmhBx-_.js";import{f as T}from"./deadlines-BH32v7D1.js";import{d as w}from"./transform-0Udg2p6b.js";import{S as D}from"./skeleton-HwvdxvSN.js";import{A as P,a as R}from"./alert-CFDDvdIM.js";import{s as B}from"./safeExternalHref-CkBrsh84.js";import K from"./NotFound-DtzwOULp.js";/* empty css */import"./PaperPreviewLink-DZDNIh1g.js";import"./index-ZkEATkOr.js";import"./index-BH3yOoza.js";import"./katex-DkKDou_j.js";import"./hover-card-ufez2uMo.js";import"./paperQueryKeys-B8u1BWlI.js";import"./curation-C7Gmmp4z.js";import"./useMutation-P_trTy9i.js";const ce=()=>{var g,x;const{confSlug:o}=y(),t=_({queryKey:["conference-areas-with-tasks",o],queryFn:()=>A.conferenceAreasWithTasks(o),enabled:!!o,staleTime:10*60*1e3}),m=k.useMemo(()=>{var a;return E(((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(K,{});if(t.error)return e.jsx("div",{className:"page",children:e.jsx(P,{variant:"destructive",children:e.jsx(R,{children:"Failed to load conference. Please try again."})})});const p=s?T(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(D,{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(S,{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=F(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}}),w(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(b,{areas:m})]})};export{ce as default};
assets/{ConferenceTaskView-DvbWh5_R.js → ConferenceTaskView-BZBMXZD8.js} RENAMED
@@ -1 +1 @@
1
- import{u as S,r as F,j as e,L as x}from"./index-YwiKC6Po.js";import{u as _}from"./useQuery-DPH6Mb2w.js";import{u as T,b as R,a as L}from"./PaperFeed-kaLm5US2.js";import{M as g}from"./MarkdownText-C-8yLDus.js";import{c as A}from"./catalog-B15Yh5dN.js";import{p as M,a as q}from"./paperQueryKeys-C5FMa4Oj.js";import{i as E}from"./apiErrors-DBfE_SVR.js";import{C as B}from"./conferenceListings-BnmhBx-_.js";import{t as O,d as Q}from"./transform-CNg3rvXk.js";import{u as z}from"./usePapers-C1deOZKl.js";import{A as H,a as I}from"./alert-Cx5luC5D.js";import K from"./NotFound-D8hwuoEl.js";import"./PaperCard-FG-bEpJk.js";import"./AuthorAvatar-CoTET6B3.js";import"./SotaBadges-DiQuEzfo.js";import"./colors-BkWRhvFI.js";import"./Icon-DXQ4sjQk.js";import"./LatexTitle-DI6voLfI.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-D7ygxg37.js";import"./skeleton-CXR1qouH.js";import"./useIntersectionObserver-Dt36kyjs.js";/* empty css */import"./PaperPreviewLink-CKfmgBjs.js";import"./index-CoRCN2p0.js";import"./index-BM_xSDJM.js";import"./katex-DkKDou_j.js";import"./hover-card-BY9tUGxy.js";import"./useMutation-f6iDkf3w.js";import"./curation-CkzNFTMJ.js";import"./useInfiniteQuery-BEbL80ez.js";const $={"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)."},ye=()=>{var b,v,y,P,k,w;const{confSlug:t,taskSlug:n}=S(),p=T(),a=B.find(s=>s.slug===n),u=!!(a!=null&&a.award),i=_({queryKey:["conference",t],queryFn:()=>A.getConference(t),enabled:!!t,staleTime:10*60*1e3}),c=_({queryKey:["task",n],queryFn:()=>A.getTask(n),enabled:!!n&&!a,staleTime:10*60*1e3}),l=z([...M.feeds.conference,t,n,p.filters],s=>q.forConference(t,{...p.filters,task:a?void 0:n,presentation:a==null?void 0:a.presentation,page:s,page_size:12}),{enabled:!!t}),f=F.useMemo(()=>{var s;return((s=l.data)==null?void 0:s.pages.flatMap(o=>o.results))??[]},[l.data]),h=F.useMemo(()=>f.map(O),[f]),d=(a==null?void 0:a.label)??Q(((b=c.data)==null?void 0:b.name)||n||"",((v=c.data)==null?void 0:v.slug)||n),j=$[`${t}/${n}`],N=((P=(y=l.data)==null?void 0:y.pages[0])==null?void 0:P.count)??((k=i.data)==null?void 0:k.paper_count)??0,r=c.data;return E(i.error)||E(c.error)?e.jsx(K,{}):i.error||c.error||l.error?e.jsx("div",{className:"page",children:e.jsx(H,{variant:"destructive",children:e.jsx(I,{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&&(r!=null&&r.image_url)?"task-hero-grid":void 0,style:{marginTop:16,marginBottom:28},children:[e.jsxs("div",{children:[e.jsx("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--accent-text)",letterSpacing:"0.1em",marginBottom:8},children:a?"BROWSE PAPERS":"TASK"}),e.jsx("h1",{className:"domain-mega-title",children:d}),j&&e.jsx(g,{className:"task-explainer",text:j}),!a&&(r==null?void 0:r.description)&&e.jsx(g,{className:"task-explainer",text:r.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&&(r==null?void 0:r.image_url)&&e.jsxs("figure",{className:"task-figure-card",children:[e.jsx("div",{className:"task-figure-img-wrap",children:e.jsx("img",{className:"task-figure-img",src:r.image_url,alt:`${d} schematic`,onError:s=>{var o,m;(m=(o=s.currentTarget.parentElement)==null?void 0:o.parentElement)==null||m.style.setProperty("display","none")}})}),e.jsxs("figcaption",{children:["Figure · ",d,r.image_credit&&e.jsxs(e.Fragment,{children:[e.jsx("br",{}),e.jsx(g,{className:"task-image-credit",text:r.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(R,{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(L,{query:l,cards:h,empty:"No papers found for this selection.",cardHeader:s=>{var C;const o=(C=f[s])==null?void 0:C.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{ye as default};
 
1
+ import{u as S,r as F,j as e,L as x}from"./index-CbgxfyGU.js";import{u as _}from"./useQuery-Bx9s5-D2.js";import{u as T,b as R,a as L}from"./PaperFeed-DMvUfA47.js";import{M as g}from"./MarkdownText-Bj-G_S-B.js";import{c as A}from"./catalog-DhK7_9-6.js";import{p as M,a as q}from"./paperQueryKeys-B8u1BWlI.js";import{i as E}from"./apiErrors-BZ5h1Kmb.js";import{C as B}from"./conferenceListings-BnmhBx-_.js";import{t as O,d as Q}from"./transform-0Udg2p6b.js";import{u as z}from"./usePapers-CJaWLZ3y.js";import{A as H,a as I}from"./alert-CFDDvdIM.js";import K from"./NotFound-DtzwOULp.js";import"./PaperCard-tdTC_dRN.js";import"./AuthorAvatar-CUJMmp_z.js";import"./SotaBadges-C-sTR-EF.js";import"./colors-BkWRhvFI.js";import"./Icon-D-kA0Owz.js";import"./LatexTitle-Z-HGmZ-H.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-DKJYnYjk.js";import"./skeleton-HwvdxvSN.js";import"./useIntersectionObserver-CID9Kkak.js";/* empty css */import"./PaperPreviewLink-DZDNIh1g.js";import"./index-ZkEATkOr.js";import"./index-BH3yOoza.js";import"./katex-DkKDou_j.js";import"./hover-card-ufez2uMo.js";import"./useMutation-P_trTy9i.js";import"./curation-C7Gmmp4z.js";import"./useInfiniteQuery-BAc_4HO5.js";const $={"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)."},ye=()=>{var b,v,y,P,k,w;const{confSlug:t,taskSlug:n}=S(),p=T(),a=B.find(s=>s.slug===n),u=!!(a!=null&&a.award),i=_({queryKey:["conference",t],queryFn:()=>A.getConference(t),enabled:!!t,staleTime:10*60*1e3}),c=_({queryKey:["task",n],queryFn:()=>A.getTask(n),enabled:!!n&&!a,staleTime:10*60*1e3}),l=z([...M.feeds.conference,t,n,p.filters],s=>q.forConference(t,{...p.filters,task:a?void 0:n,presentation:a==null?void 0:a.presentation,page:s,page_size:12}),{enabled:!!t}),f=F.useMemo(()=>{var s;return((s=l.data)==null?void 0:s.pages.flatMap(o=>o.results))??[]},[l.data]),h=F.useMemo(()=>f.map(O),[f]),d=(a==null?void 0:a.label)??Q(((b=c.data)==null?void 0:b.name)||n||"",((v=c.data)==null?void 0:v.slug)||n),j=$[`${t}/${n}`],N=((P=(y=l.data)==null?void 0:y.pages[0])==null?void 0:P.count)??((k=i.data)==null?void 0:k.paper_count)??0,r=c.data;return E(i.error)||E(c.error)?e.jsx(K,{}):i.error||c.error||l.error?e.jsx("div",{className:"page",children:e.jsx(H,{variant:"destructive",children:e.jsx(I,{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&&(r!=null&&r.image_url)?"task-hero-grid":void 0,style:{marginTop:16,marginBottom:28},children:[e.jsxs("div",{children:[e.jsx("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--accent-text)",letterSpacing:"0.1em",marginBottom:8},children:a?"BROWSE PAPERS":"TASK"}),e.jsx("h1",{className:"domain-mega-title",children:d}),j&&e.jsx(g,{className:"task-explainer",text:j}),!a&&(r==null?void 0:r.description)&&e.jsx(g,{className:"task-explainer",text:r.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&&(r==null?void 0:r.image_url)&&e.jsxs("figure",{className:"task-figure-card",children:[e.jsx("div",{className:"task-figure-img-wrap",children:e.jsx("img",{className:"task-figure-img",src:r.image_url,alt:`${d} schematic`,onError:s=>{var o,m;(m=(o=s.currentTarget.parentElement)==null?void 0:o.parentElement)==null||m.style.setProperty("display","none")}})}),e.jsxs("figcaption",{children:["Figure · ",d,r.image_credit&&e.jsxs(e.Fragment,{children:[e.jsx("br",{}),e.jsx(g,{className:"task-image-credit",text:r.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(R,{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(L,{query:l,cards:h,empty:"No papers found for this selection.",cardHeader:s=>{var C;const o=(C=f[s])==null?void 0:C.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{ye as default};
assets/{ConferencesIndexView-DUaazjEx.js → ConferencesIndexView-Cw6IrAk5.js} RENAMED
@@ -1 +1 @@
1
- import{r as d,j as e,L as c}from"./index-YwiKC6Po.js";import{u as m}from"./useQuery-DPH6Mb2w.js";import{c as p}from"./catalog-B15Yh5dN.js";import{f as u}from"./deadlines-BH32v7D1.js";import{A as f,a as h}from"./alert-Cx5luC5D.js";import{A as x,a as g}from"./AreaSection-CfCNkiTd.js";import{T as j}from"./TaxonomySuggestionTile-4WqZSJGN.js";import"./skeleton-CXR1qouH.js";import"./SignInToEditDialog-DpqyyHCb.js";import"./button-B90pJJiy.js";import"./input-DEeEc0bH.js";import"./textarea-BPIMGf5w.js";import"./searchable-select-Bqfyxu17.js";import"./popover-D7ygxg37.js";import"./dialog-foxx0Wu6.js";import"./search-wcEXdf1i.js";import"./loader-circle-B0KtDERb.js";import"./useMutation-f6iDkf3w.js";import"./submissions-BJgYjF7O.js";import"./plus-Cfz0QbT1.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},N=(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)},R=()=>{const r=m({queryKey:["conferences"],queryFn:()=>p.conferences(),staleTime:6e5}),a=d.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(N)),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(f,{variant:"destructive",children:e.jsx(h,{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(x,{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(g,{title:t>0?String(t):"Unknown year",meta:`${i.length} ${i.length===1?"conference":"conferences"} · ${n.toLocaleString()} papers`,children:[i.map(s=>{const o=u(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(j,{kind:"conference"})]},t)})]})};export{R as default};
 
1
+ import{r as d,j as e,L as c}from"./index-CbgxfyGU.js";import{u as m}from"./useQuery-Bx9s5-D2.js";import{c as p}from"./catalog-DhK7_9-6.js";import{f as u}from"./deadlines-BH32v7D1.js";import{A as f,a as h}from"./alert-CFDDvdIM.js";import{A as x,a as g}from"./AreaSection-NWvfO4Sb.js";import{T as j}from"./TaxonomySuggestionTile-DIw_GKfA.js";import"./skeleton-HwvdxvSN.js";import"./SignInToEditDialog-CNIcNqbK.js";import"./button-Bv9oZ-QU.js";import"./input-B6pxtfPe.js";import"./textarea-Bf06GTSH.js";import"./searchable-select-DNdBIahG.js";import"./popover-DKJYnYjk.js";import"./dialog-Cfp_d3CC.js";import"./search-CLtAJGOp.js";import"./loader-circle-CWMja8Zn.js";import"./useMutation-P_trTy9i.js";import"./submissions-aWj7YtuZ.js";import"./plus-UK0TEjgd.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},N=(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)},R=()=>{const r=m({queryKey:["conferences"],queryFn:()=>p.conferences(),staleTime:6e5}),a=d.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(N)),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(f,{variant:"destructive",children:e.jsx(h,{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(x,{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(g,{title:t>0?String(t):"Unknown year",meta:`${i.length} ${i.length===1?"conference":"conferences"} · ${n.toLocaleString()} papers`,children:[i.map(s=>{const o=u(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(j,{kind:"conference"})]},t)})]})};export{R as default};
assets/{CronDashboard-DcLcBHdd.js → CronDashboard-B3Xofwvu.js} RENAMED
@@ -1,6 +1,6 @@
1
- import{n as c,r,j as a,A as n,a5 as u}from"./index-YwiKC6Po.js";/**
2
  * @license lucide-react v0.462.0 - ISC
3
  *
4
  * This source code is licensed under the ISC license.
5
  * See the LICENSE file in the root directory of this source tree.
6
- */const N=c("ShieldAlert",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]]),f=r.forwardRef(({className:o,...e},t)=>a.jsx("div",{ref:t,className:n("rounded-lg border bg-card text-card-foreground shadow-sm",o),...e}));f.displayName="Card";const m=r.forwardRef(({className:o,...e},t)=>a.jsx("div",{ref:t,className:n("flex flex-col space-y-1.5 p-6",o),...e}));m.displayName="CardHeader";const p=r.forwardRef(({className:o,...e},t)=>a.jsx("h3",{ref:t,className:n("text-2xl font-semibold leading-none tracking-tight",o),...e}));p.displayName="CardTitle";const l=r.forwardRef(({className:o,...e},t)=>a.jsx("p",{ref:t,className:n("text-sm text-muted-foreground",o),...e}));l.displayName="CardDescription";const h=r.forwardRef(({className:o,...e},t)=>a.jsx("div",{ref:t,className:n("p-6 pt-0",o),...e}));h.displayName="CardContent";const C=r.forwardRef(({className:o,...e},t)=>a.jsx("div",{ref:t,className:n("flex items-center p-6 pt-0",o),...e}));C.displayName="CardFooter";const b=o=>`cron-status--${o}`,x=o=>`$${o.toFixed(2)}`,w=o=>x(o/1e6);function M(o){if(!o)return"Never";const e=new Date(o);if(Number.isNaN(e.getTime()))return o;const t=Date.now()-e.getTime(),s=Math.floor(t/6e4),i=Math.floor(t/36e5),d=Math.floor(t/864e5);return s<1?"Just now":s<60?`${s}m ago`:i<24?`${i}h ago`:d<7?`${d}d ago`:e.toLocaleString("en-US",{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}class g{constructor(e){this.request=e}getCronStatus(e=!1){const t=e?"?force_refresh=true":"";return this.request(`/cron/status${t}`,{cache:"no-store"})}getPaperMarkdownJobs(){return this.request("/cron/paper-markdown-jobs",{cache:"no-store"})}getAutonomousOperations(){return this.request("/admin/autonomous-operations",{cache:"no-store"})}setAutonomousManualMode(e,t,s){return this.request("/admin/autonomous-operations/manual-mode",{method:"PATCH",body:JSON.stringify({enabled:e,expected_revision:t,confirmation:s})})}setAutonomousOperator(e,t,s,i){return this.request(`/admin/autonomous-operations/operators/${e}`,{method:"PATCH",body:JSON.stringify({enabled:t,expected_revision:s,confirmation:i})})}qualifyAutonomousChatBaseline(e,t,s){return this.request("/admin/autonomous-operations/chat-baseline",{method:"POST",body:JSON.stringify({sha:e,expected_revision:t,confirmation:s})})}}const A=new g(u);export{f as C,N as S,x as a,m as b,p as c,l as d,h as e,M as f,w as g,A as o,b as t};
 
1
+ import{n as c,r,j as a,B as n,a6 as u}from"./index-CbgxfyGU.js";/**
2
  * @license lucide-react v0.462.0 - ISC
3
  *
4
  * This source code is licensed under the ISC license.
5
  * See the LICENSE file in the root directory of this source tree.
6
+ */const N=c("ShieldAlert",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]]),f=r.forwardRef(({className:o,...e},t)=>a.jsx("div",{ref:t,className:n("rounded-lg border bg-card text-card-foreground shadow-sm",o),...e}));f.displayName="Card";const m=r.forwardRef(({className:o,...e},t)=>a.jsx("div",{ref:t,className:n("flex flex-col space-y-1.5 p-6",o),...e}));m.displayName="CardHeader";const p=r.forwardRef(({className:o,...e},t)=>a.jsx("h3",{ref:t,className:n("text-2xl font-semibold leading-none tracking-tight",o),...e}));p.displayName="CardTitle";const l=r.forwardRef(({className:o,...e},t)=>a.jsx("p",{ref:t,className:n("text-sm text-muted-foreground",o),...e}));l.displayName="CardDescription";const h=r.forwardRef(({className:o,...e},t)=>a.jsx("div",{ref:t,className:n("p-6 pt-0",o),...e}));h.displayName="CardContent";const C=r.forwardRef(({className:o,...e},t)=>a.jsx("div",{ref:t,className:n("flex items-center p-6 pt-0",o),...e}));C.displayName="CardFooter";const b=o=>`cron-status--${o}`,x=o=>`$${o.toFixed(2)}`,w=o=>x(o/1e6);function M(o){if(!o)return"Never";const e=new Date(o);if(Number.isNaN(e.getTime()))return o;const t=Date.now()-e.getTime(),s=Math.floor(t/6e4),i=Math.floor(t/36e5),d=Math.floor(t/864e5);return s<1?"Just now":s<60?`${s}m ago`:i<24?`${i}h ago`:d<7?`${d}d ago`:e.toLocaleString("en-US",{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}class g{constructor(e){this.request=e}getCronStatus(e=!1){const t=e?"?force_refresh=true":"";return this.request(`/cron/status${t}`,{cache:"no-store"})}getPaperMarkdownJobs(){return this.request("/cron/paper-markdown-jobs",{cache:"no-store"})}getAutonomousOperations(){return this.request("/admin/autonomous-operations",{cache:"no-store"})}setAutonomousManualMode(e,t,s){return this.request("/admin/autonomous-operations/manual-mode",{method:"PATCH",body:JSON.stringify({enabled:e,expected_revision:t,confirmation:s})})}setAutonomousOperator(e,t,s,i){return this.request(`/admin/autonomous-operations/operators/${e}`,{method:"PATCH",body:JSON.stringify({enabled:t,expected_revision:s,confirmation:i})})}qualifyAutonomousChatBaseline(e,t,s){return this.request("/admin/autonomous-operations/chat-baseline",{method:"POST",body:JSON.stringify({sha:e,expected_revision:t,confirmation:s})})}}const q=new g(u);export{f as C,N as S,x as a,m as b,p as c,l as d,h as e,M as f,w as g,q as o,b as t};
assets/{CronDashboard-DMMdAs4p.js → CronDashboard-CC1lPV3k.js} RENAMED
@@ -1,4 +1,4 @@
1
- import{n as D,r as x,E as is,v as cs,j as e,t as ie,a8 as ls,R as ds,I as os,x as oe,P as ms,z as us,F as Re,A as $,f as xe,J as Te,L as pe,a as hs,m as xs}from"./index-YwiKC6Po.js";import{u as z}from"./useQuery-DPH6Mb2w.js";import{u as L}from"./useMutation-f6iDkf3w.js";import{t as ge,f as v,a as S,S as Ae,o as ue,C as g,b as f,c as N,d as P,e as j,g as C}from"./CronDashboard-DcLcBHdd.js";import{B as I}from"./badge-CFf6CiSg.js";import{B as y}from"./button-B90pJJiy.js";import{C as ps,a as gs}from"./chevron-up-BXtxbTfV.js";import{D as fe}from"./database-2w-JFZSG.js";import{T as js}from"./trending-up-Sm0tkX5g.js";import{A as ne}from"./activity-95309hog.js";import{F as Ne}from"./file-text-Cijxx2XD.js";import{T as Ee,I as vs}from"./triangle-alert-BWObrJc7.js";import{E as X}from"./external-link-4bBJT0yO.js";import{C as Y,R as be}from"./refresh-cw-4AZFTXDl.js";import{L as R}from"./loader-circle-B0KtDERb.js";import{C as je}from"./circle-check-BPcHPjjB.js";import{c as E,A as _s}from"./codex-C9BvAdr-.js";import{u as fs}from"./useInfiniteQuery-BEbL80ez.js";import{p as Me}from"./paperEdits-B8a9u4Tx.js";import{c as me}from"./catalog-B15Yh5dN.js";import{c as ye}from"./chat-DHGOonJg.js";/**
2
  * @license lucide-react v0.462.0 - ISC
3
  *
4
  * This source code is licensed under the ISC license.
 
1
+ import{n as D,r as x,F as is,w as cs,j as e,v as ie,a9 as ls,R as ds,I as os,y as oe,P as ms,A as us,G as Re,B as $,f as xe,K as Te,L as pe,a as hs,m as xs}from"./index-CbgxfyGU.js";import{u as z}from"./useQuery-Bx9s5-D2.js";import{u as L}from"./useMutation-P_trTy9i.js";import{t as ge,f as v,a as S,S as Ae,o as ue,C as g,b as f,c as N,d as P,e as j,g as C}from"./CronDashboard-B3Xofwvu.js";import{B as I}from"./badge-Klg-RRGs.js";import{B as y}from"./button-Bv9oZ-QU.js";import{C as ps,a as gs}from"./chevron-up-Cpt5JLeI.js";import{D as fe}from"./database-CTvEb5JG.js";import{T as js}from"./trending-up-B3K5RlyX.js";import{A as ne}from"./activity-dcKMRXBy.js";import{F as Ne}from"./file-text-BK_7Q2rV.js";import{T as Ee,I as vs}from"./triangle-alert-U7T_j3JE.js";import{E as X}from"./external-link-DZIH4GGr.js";import{C as Y,R as be}from"./refresh-cw-Cps6nypW.js";import{L as R}from"./loader-circle-CWMja8Zn.js";import{C as je}from"./circle-check-Bci9ZTu9.js";import{c as E,A as _s}from"./codex-Bl7j51l-.js";import{u as fs}from"./useInfiniteQuery-BAc_4HO5.js";import{p as Me}from"./paperEdits-C5GTaRR8.js";import{c as me}from"./catalog-DhK7_9-6.js";import{c as ye}from"./chat-DzTo2WUO.js";/**
2
  * @license lucide-react v0.462.0 - ISC
3
  *
4
  * This source code is licensed under the ISC license.
assets/{ExternalSourceEvalBadge-CimjRPVg.js → ExternalSourceEvalBadge-npO6bZ8N.js} RENAMED
@@ -1 +1 @@
1
- import{p as o}from"./curation-CkzNFTMJ.js";import{a5 as g,j as a,L as l}from"./index-YwiKC6Po.js";import{H as u,a as c,b as d}from"./hover-card-BY9tUGxy.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};
 
1
+ import{p as o}from"./curation-C7Gmmp4z.js";import{a6 as g,j as a,L as l}from"./index-CbgxfyGU.js";import{H as u,a as c,b as d}from"./hover-card-ufez2uMo.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};
assets/{FeedView-CFzlAcol.js → FeedView-BR2dQQ-K.js} RENAMED
@@ -1 +1 @@
1
- import{j as e,L as E,a as Se,b as Te,r as h,h as _e,C as Pe,c as be,d as Ce,e as Fe,f as Ee,i as Le,g as ne,k as ye,l as Ae}from"./index-YwiKC6Po.js";import{S as De}from"./sparkles-C3L7JDLC.js";import{u as R}from"./useQuery-DPH6Mb2w.js";import{D as Re,a as qe,b as Me}from"./dialog-foxx0Wu6.js";import{c as ee}from"./catalog-B15Yh5dN.js";import{T as pe,r as B}from"./research-5UpiU-ea.js";import{d as ie,t as Ie}from"./transform-CNg3rvXk.js";import{u as je,a as ve,s as Oe,b as He,r as he,c as me,d as $e}from"./researchTopic-CAL_T-Y-.js";import{P as ze}from"./plus-Cfz0QbT1.js";import{A as Ke}from"./arrow-right-CSx7rJG4.js";import{r as Be,P as Ue,w as Ge,a as Qe}from"./PaperFeed-kaLm5US2.js";import{M as We}from"./McpShowcase-Fj71TTNl.js";import{u as Xe,a as Ye,P as Ze,i as Ve,A as Je,b as es,S as $,c as ss,D as se,q as ts,d as as}from"./chatSessions-CdNQ1toA.js";import{c as os}from"./chat-DHGOonJg.js";import{u as ns}from"./usePapers-C1deOZKl.js";import{p as J,a as ge}from"./paperQueryKeys-C5FMa4Oj.js";import{S as te}from"./skeleton-CXR1qouH.js";import{A as ae,a as oe}from"./alert-Cx5luC5D.js";import"./useMutation-f6iDkf3w.js";import"./PaperCard-FG-bEpJk.js";import"./AuthorAvatar-CoTET6B3.js";import"./SotaBadges-DiQuEzfo.js";import"./colors-BkWRhvFI.js";import"./Icon-DXQ4sjQk.js";import"./LatexTitle-DI6voLfI.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-D7ygxg37.js";import"./useIntersectionObserver-Dt36kyjs.js";import"./AgentLogos-DhD8p5ds.js";import"./useInfiniteQuery-BEbL80ez.js";import"./curation-CkzNFTMJ.js";function is({onBuild:r}){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 a topic 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."}),r&&e.jsxs("button",{type:"button",className:"research-topic-save following-intro-topic",onClick:r,children:[e.jsx(De,{"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(E,{to:"/settings",children:"Settings"}),"."]})]})}const fe=16;function rs({open:r,onOpenChange:a}){return e.jsx(Re,{open:r,onOpenChange:a,children:e.jsx(qe,{className:"topic-dialog","aria-describedby":void 0,children:e.jsx(ls,{onDone:()=>a(!1)})})})}function ls({onDone:r}){var W,X,Y,Z,H,z,U;const{user:a}=Se(),m=Te(),l=R({queryKey:["research-topic",a==null?void 0:a.hf_subject],queryFn:B.topic,enabled:!!a}),s=R({queryKey:["research-follows",a==null?void 0:a.hf_subject],queryFn:B.follows,enabled:!!a}),w=R({queryKey:["trending-tasks-follow"],queryFn:()=>ee.trendingTasks({limit:fe,level:0}),staleTime:10*60*1e3}),y=R({queryKey:["trending-methods-follow"],queryFn:()=>ee.trendingMethods({limit:fe}),staleTime:10*60*1e3}),c=R({queryKey:["research-follow-suggestions"],queryFn:B.followSuggestions,staleTime:10*60*1e3}),j=(i=[])=>i.map(p=>({id:String(p.entity_id),name:p.name,image:p.image_url})),[k,L]=h.useState(null),[_,v]=h.useState([]),P=je(),M=ve(),b=((W=l.data)==null?void 0:W.text)??"",n=k??b,d=n.trim().replace(/\s+/g," "),C=((X=l.data)==null?void 0:X.status)==="failed"&&d===b,A=d.length>=3&&(d!==b||C),D=P.isPending||M.isPending,o=(i,p)=>{var N;return((N=s.data)==null?void 0:N.some(S=>S.kind===i&&String(S.entity_id)===p))??!1},g=(i,p)=>{var N;return((N=_.find(S=>S.kind===i&&S.id===p))==null?void 0:N.follow)??o(i,p)},f=_.filter(i=>i.follow!==o(i.kind,i.id)),F=!D&&(A||f.length>0),q=(i,p,N)=>v(S=>[...S.filter(G=>G.kind!==i||G.id!==p),{kind:i,id:p,name:N,follow:!g(i,p)}]),I=()=>{if(!F)return;if(!a){A&&Oe(d),f.length&&He(f),window.location.href=_e(`${m.pathname}${m.search}`);return}const i=[...f.length?[M.mutateAsync(f)]:[],...A?[P.mutateAsync(d)]:[]];Promise.allSettled(i).then(p=>{p.every(N=>N.status==="fulfilled")&&r()})},O=(i,p,N,S)=>{const V=[...(s.data??[]).filter(x=>x.kind===p).map(x=>({id:String(x.entity_id),name:x.name,slug:x.url.split("/").pop(),image:x.image_url})),...N.filter(x=>!o(p,x.id)).map(x=>({...x,suggested:!0}))];return V.length>0&&e.jsxs("div",{className:"topic-dialog-group",children:[e.jsx("h3",{children:i}),e.jsxs(cs,{children:[V.map(x=>{const Q=g(p,x.id),K=p==="task"?ie(x.name,x.slug??void 0):x.name;return e.jsxs("button",{type:"button",className:"topic-dialog-chip","aria-pressed":Q,disabled:D,"data-suggested":"suggested"in x||void 0,onClick:()=>q(p,x.id,K),children:[Q?e.jsx(Pe,{"aria-hidden":"true"}):e.jsx(ze,{"aria-hidden":"true"}),(p==="author"||p==="organization")&&e.jsx(ds,{kind:p,name:K,src:x.image}),K]},x.id)}),S&&e.jsxs(E,{to:S.to,className:"topic-dialog-browse",children:[S.label,e.jsx(Ke,{"aria-hidden":"true"})]})]})]})};return e.jsxs("form",{className:"topic-dialog-form",onSubmit:i=>{i.preventDefault(),I()},children:[e.jsx(Me,{className:"topic-dialog-title",children:b||(Y=s.data)!=null&&Y.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:"Describe a topic in your own words"})}),e.jsx("p",{className:"topic-dialog-hint",children:"A model reads every new paper and adds the ones that match to your Following feed."}),e.jsx("textarea",{id:"topic-dialog-input",className:"research-topic-input",rows:4,maxLength:pe,"aria-label":"Research topic",placeholder:"e.g. diffusion policies for robot manipulation, or speculative decoding for LLM inference",value:n,onChange:i=>L(i.target.value),onKeyDown:i=>{i.key==="Enter"&&!i.shiftKey&&!i.nativeEvent.isComposing&&(i.preventDefault(),I())}}),e.jsxs("span",{className:"research-topic-count",children:[n.length,"/",pe]})]}),O("Trending tasks","task",((Z=w.data)==null?void 0:Z.results)??[],{to:"/tasks",label:"Browse tasks"}),O("Trending methods","method",((H=y.data)==null?void 0:H.results)??[],{to:"/methods",label:"Browse methods"}),O("Benchmarks","benchmark",[],{to:"/tasks",label:"Browse benchmarks"}),O("Popular authors","author",j((z=c.data)==null?void 0:z.authors)),O("Popular organizations","organization",j((U=c.data)==null?void 0:U.organizations),{to:"/organizations",label:"Browse organizations"}),(P.error||M.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:[b&&e.jsx("button",{type:"button",className:"research-follow-action topic-dialog-remove",disabled:D,onClick:()=>P.mutate(null,{onSuccess:r}),children:"Remove topic"}),e.jsx("button",{type:"button",className:"research-follow-action",disabled:D,onClick:r,children:"Cancel"}),e.jsx("button",{type:"submit",className:"research-topic-save",disabled:!F,children:f.some(i=>i.follow===!1)?"Save":f.length?"Follow":C?"Retry":b?"Update topic":"Follow"})]})]})}function cs({children:r}){const a=h.useRef(null);return h.useLayoutEffect(()=>{const m=a.current;if(!m)return;const l=()=>{const s=[...m.children],w=s.filter(c=>c.dataset.suggested);w.forEach(c=>{c.hidden=!1});const y=()=>new Set(s.filter(c=>!c.hidden).map(c=>c.offsetTop)).size;for(let c=w.length-1;c>=0&&y()>2;c--)w[c].hidden=!0};return l(),window.addEventListener("resize",l),()=>window.removeEventListener("resize",l)}),e.jsx("div",{ref:a,className:"topic-dialog-chips",children:r})}function ds({kind:r,name:a,src:m}){const[l,s]=h.useState(!1);if(m&&!l)return e.jsx("img",{className:`topic-dialog-chip-image is-${r}`,src:m,alt:"",loading:"lazy",onError:()=>s(!0)});if(r!=="author")return null;const w=a.split(/\s+/).filter(Boolean).map(y=>y[0]).slice(0,2).join("").toUpperCase();return e.jsx("span",{className:"topic-dialog-chip-image is-author is-initials","aria-hidden":"true",children:w})}const xe=45,us=1800,ps=25,hs=350,ms=r=>{const[a,m]=h.useState($[0].slice(0,1)),[l,s]=h.useState(0);return h.useEffect(()=>{var L,_;if(!r)return;if((_=(L=window.matchMedia)==null?void 0:L.call(window,"(prefers-reduced-motion: reduce)"))!=null&&_.matches){m($[0]),s(0);return}let w=0,y=1,c=!1,j;m($[0].slice(0,y)),s(0);const k=()=>{const v=$[w];if(!c){if(y+=1,m(v.slice(0,y)),y===v.length){c=!0,j=window.setTimeout(k,us);return}j=window.setTimeout(k,xe);return}if(y-=1,m(v.slice(0,y)),y===0){c=!1,w=(w+1)%$.length,s(w),j=window.setTimeout(k,hs);return}j=window.setTimeout(k,ps)};return j=window.setTimeout(k,xe),()=>window.clearTimeout(j)},[r]),{placeholder:a,prompt:$[l]}},gs=()=>{var D;const r=be(),a=ye(),[m,l]=h.useState({text:"",paperMentions:[]}),s=m.text,[w,y]=h.useState(0),[c,j]=h.useState(!1),[k,L]=h.useState(null),{placeholder:_,prompt:v}=ms(!s),P=h.useRef(null),M=R({queryKey:["chatAvailability"],queryFn:()=>os.getAvailability(),retry:!1,enabled:ne()}),b=ne()&&((D=M.data)==null?void 0:D.paper_mentions_enabled)!==!1,n=Xe({draft:m,onChange:l,enabled:b,textareaRef:P}),d=Ye(m,n.open),C=s?d.completion:v;h.useLayoutEffect(()=>{const o=P.current;if(!o)return;const g=()=>{if(o.style.height="auto",s){o.style.height=`${Math.min(ss(o),160)}px`;return}const f=o.placeholder,F=$.reduce((q,I)=>(o.placeholder=I,Math.max(q,o.scrollHeight)),0);o.placeholder=f,o.style.height=`${Math.min(F,160)}px`};return g(),window.addEventListener("resize",g),()=>window.removeEventListener("resize",g)},[s,C]);const A=async(o=m)=>{const g=o.text.trim();if(!(!g||c)){if(a){const f=new URLSearchParams({q:g,model:se}),F=`${Ae}?${f}`,q=window.open(F,"_blank");if(!q){L(F);return}q.opener=null,L(null),l({text:"",paperMentions:[]});return}j(!0),ts(o,se);try{const f=await as(se);r(`/chat/${f.id}`)}catch{r("/chat")}}};return e.jsxs(e.Fragment,{children:[!a&&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(Ze,{text:m.text,mentions:m.paperMentions,scrollTop:w,variant:"home",completion:s?C:""}),e.jsx("textarea",{ref:P,rows:1,value:s,placeholder:_,"aria-label":"Ask the assistant",disabled:c,onChange:o=>{n.updateText(o.target.value,o.target.selectionStart),d.trackCaret(o.target)},onSelect:o=>{n.refresh(o.currentTarget.selectionStart),d.trackCaret(o.currentTarget)},onClick:o=>{n.refresh(o.currentTarget.selectionStart),d.trackCaret(o.currentTarget)},onScroll:o=>y(o.currentTarget.scrollTop),onBlur:o=>{var g,f;(f=(g=o.relatedTarget)==null?void 0:g.closest)!=null&&f.call(g,".chat-paper-picker")||window.setTimeout(n.close,0)},onKeyDown:o=>{if(!n.keyDown(o)){if(Ve(o)&&C){o.preventDefault();const g=s+C;n.updateText(g,g.length),window.requestAnimationFrame(()=>{var f;return(f=P.current)==null?void 0:f.setSelectionRange(g.length,g.length)});return}o.key==="Enter"&&!o.shiftKey&&(o.preventDefault(),A())}},role:b?"combobox":void 0,"aria-expanded":b?n.open:void 0,"aria-controls":n.open?n.pickerId:void 0,"aria-activedescendant":n.open&&n.results.length?`${n.optionIdPrefix}-${n.activeIndex}`:void 0,"aria-autocomplete":b?"list":void 0,"aria-describedby":n.message?"ask-home-paper-mention-message":void 0})]}),e.jsx("button",{type:"button",className:`chat-send${s.trim()?" chat-send-on":""}`,onClick:()=>void A(),disabled:!s.trim()||c,"aria-label":"Ask the assistant",children:e.jsx(Je,{})})]}),k&&e.jsx("div",{className:"chat-paper-mention-message",role:"alert",children:e.jsx("a",{href:k,target:"_blank",rel:"noreferrer",children:"Open this question on paperswithcode.co"})}),n.message&&e.jsx("div",{id:"ask-home-paper-mention-message",className:"chat-paper-mention-message",role:"alert",children:n.message}),e.jsx(es,{open:n.open,query:n.query,results:n.results,activeIndex:n.activeIndex,loading:n.loading,error:n.error,onSelect:n.select,id:n.pickerId,optionIdPrefix:n.optionIdPrefix})]})]})},Ne={task:"Tasks",method:"Methods",benchmark:"Benchmarks",author:"Authors",organization:"Orgs"},fs=Object.keys(Ne),xs=30,we=40,ws=async r=>{const a=await r;return{results:a.results.map(m=>({paper:m})),next_page:a.next_page}},bs=({mode:r})=>{var Q,K,re,le,ce,de,ue;const a=r==="following",m=be(),l=Ce(),s=l==null?void 0:l.user,[w,y]=Fe(),c=Be(w,void 0,a?"month":"week"),j=t=>{const u=new URLSearchParams(w);u.delete("order_by"),u.delete("only");const T=u.toString();m(T?`${t}?${T}`:t)},k=t=>{const u=new URLSearchParams(w);t?u.set("only","topic"):u.delete("only");const T=u.toString();return T?`/following?${T}`:"/following"},L=R({queryKey:["top-tasks-sidebar"],queryFn:()=>ee.topTasks(8),staleTime:10*60*1e3}),_=R({queryKey:["trending-tasks-sidebar"],queryFn:()=>ee.trendingTasks({limit:8,level:0}),staleTime:10*60*1e3}),v=a&&w.get("only")==="topic",P={start_date:c.startDate,end_date:c.endDate},M={...c,topicOnly:v},b=ns(a?[...J.feeds.following,s==null?void 0:s.hf_subject,M]:[...r==="x"?J.feeds.xTrending:J.feeds.trending,P],async t=>{if(a){const T=await B.following(t,M),ke=T.length===we?t+we:null;return{results:T,next_page:ke}}const u={...P,page:t,page_size:xs,include_resources:!0};return ws(r==="x"?ge.xTrending(u):ge.list({...u,order_by:"trending",order_dir:"desc",latest_only:!0}))},{enabled:!a||!!s,initialPage:a?0:1}),n=R({queryKey:["research-follows",s==null?void 0:s.hf_subject],queryFn:B.follows,enabled:a&&!!s}),d=R({queryKey:["research-topic",s==null?void 0:s.hf_subject],queryFn:B.topic,enabled:a&&!!s,refetchInterval:t=>t.state.data&&["pending","running"].includes(t.state.data.status)?1e4:!1}),C=!!d.data&&["pending","running"].includes(d.data.status),A=d.data?d.data.label??d.data.text:"",[D,o]=h.useState(!1),g=Ee(),f=h.useRef(!1);h.useEffect(()=>{f.current&&!C&&g.invalidateQueries({queryKey:[...J.feeds.following,s==null?void 0:s.hf_subject]}),f.current=C},[C,g,s==null?void 0:s.hf_subject]);const F=a&&!!s&&((Q=n.data)==null?void 0:Q.length)===0&&d.isSuccess&&!d.data,q=a&&!(l!=null&&l.isLoading)&&!s||F,I=!!s||!Le(),[O,W]=h.useState(!1),[X]=h.useState(()=>!!he()||me().length>0),[Y,Z]=h.useState(!1);!O&&(d.data||(K=n.data)!=null&&K.length)&&W(!0),q&&!Y&&(Z(!0),I&&!O&&!X&&o(!0));const H=je(),{mutate:z}=H,U=h.useRef(!1);h.useEffect(()=>{var u;const t=he();!s||!d.isSuccess||!t||U.current||(U.current=!0,t===((u=d.data)==null?void 0:u.text)?$e():z(t))},[s,d.isSuccess,d.data,z]);const i=ve(),{mutate:p}=i,N=h.useRef(!1);h.useEffect(()=>{const t=me();!s||!t.length||N.current||(N.current=!0,p(t))},[s,p]);const S=h.useMemo(()=>fs.map(t=>{var u;return{kind:t,follows:a?((u=n.data)==null?void 0:u.filter(T=>T.kind===t))??[]:[]}}).filter(t=>t.follows.length>0),[a,n.data]),G=a&&(!!(l!=null&&l.isLoading)||!!s&&!F),V=h.useMemo(()=>{var t;return((t=b.data)==null?void 0:t.pages.flatMap(u=>u.results.map(T=>({...Ie(T.paper),followReasons:T.reasons}))))??[]},[b.data]),x=b.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:r==="x"?"Papers people share most on X, picked daily":"Curated daily from arXiv and Hugging Face"})]})}),e.jsxs("div",{className:"layout-with-sidebar",children:[e.jsxs("aside",{className:"sidebar feed-sidebar",children:[G?e.jsxs("div",{className:"sidebar-section sidebar-section-follows",children:[e.jsx("div",{className:"sidebar-label",children:"You follow"}),((l==null?void 0:l.isLoading)||n.isLoading)&&e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:Array.from({length:4}).map((t,u)=>e.jsx(te,{className:"h-5 w-full"},u))}),n.isError&&e.jsx("div",{style:{fontSize:12,color:"var(--ink-faint)"},children:"Couldn't load your follows."}),e.jsxs("div",{className:"sidebar-links",children:[d.data&&e.jsxs("div",{className:`sidebar-follow-topic ${v?"active":""}`,children:[e.jsxs(E,{to:k(!v),className:"sidebar-link sidebar-follow-link",title:v?"Show papers from everything you follow":`Show only papers about “${d.data.text}”`,"aria-current":v?"true":void 0,children:[e.jsx("span",{className:"sidebar-follow-kind",children:"Topic"}),e.jsx("span",{className:"sidebar-follow-name",children:A})]}),e.jsx("button",{type:"button",className:"sidebar-follow-edit","aria-label":"Edit topic","aria-expanded":D,onClick:()=>o(!0),children:"edit"})]}),S.map(t=>e.jsxs("div",{className:"sidebar-follow-group",children:[e.jsx("span",{className:"sidebar-follow-kind",children:Ne[t.kind]}),t.follows.map(u=>e.jsx(E,{to:u.url,className:"sidebar-link sidebar-follow-link",children:e.jsx("span",{className:"sidebar-follow-name",children:u.name})},u.entity_id))]},t.kind))]}),e.jsx(E,{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"}),L.isLoading&&e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:Array.from({length:6}).map((t,u)=>e.jsx(te,{className:"h-5 w-full"},u))}),e.jsxs("div",{className:"sidebar-links",children:[(re=L.data)==null?void 0:re.map(t=>e.jsxs(E,{to:`/tasks/${t.slug}`,className:"sidebar-link",children:[ie(t.name,t.slug),t.paper_count!=null&&e.jsx("span",{className:"count",children:t.paper_count})]},t.id)),e.jsx(E,{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"}),_.isLoading&&e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:Array.from({length:6}).map((t,u)=>e.jsx(te,{className:"h-5 w-full"},u))}),((ce=(le=_.data)==null?void 0:le.results)==null?void 0:ce.length)===0&&!_.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:(ue=(de=_.data)==null?void 0:de.results)==null?void 0:ue.map(t=>e.jsxs(E,{to:`/tasks/${t.slug}`,className:"sidebar-link",children:[ie(t.name,t.slug),e.jsxs("span",{className:"count",children:[t.share_lift.toFixed(1),"x"]})]},t.id))})]})]}),e.jsx(We,{})]}),e.jsxs("div",{className:"feed-main",children:[(ne()||ye())&&e.jsx("div",{className:"feed-chat",children:e.jsx(gs,{})}),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 ${r==="trending"?"active":""}`,onClick:()=>j("/"),children:"trending"}),e.jsx("button",{className:`sort-btn ${r==="x"?"active":""}`,onClick:()=>j("/x-trending"),children:"trending (X)"}),e.jsx("button",{className:`sort-btn ${a?"active":""}`,onClick:()=>j("/following"),children:"following"})]})}),e.jsx(Ue,{startDate:c.startDate,endDate:c.endDate,onChange:t=>y(Ge(w,t))})]}),x&&e.jsx(ae,{variant:"destructive",className:"mb-4",children:e.jsxs(oe,{children:["Failed to load papers. ",e.jsx("button",{type:"button",onClick:()=>void b.refetch(),children:"Try again"})]})}),H.isError&&H.variables&&e.jsx(ae,{variant:"destructive",className:"mb-4",children:e.jsxs(oe,{children:["Could not follow “",H.variables,"”. ",e.jsx("button",{type:"button",onClick:()=>z(H.variables),children:"Try again"})]})}),i.isError&&i.variables&&e.jsx(ae,{variant:"destructive",className:"mb-4",children:e.jsxs(oe,{children:["Could not follow ",i.variables.map(t=>t.name).join(", "),". ",e.jsx("button",{type:"button",onClick:()=>p(i.variables),children:"Try again"})]})}),a&&!!s&&d.isSuccess&&!n.isPending&&!F&&(d.data?C?e.jsxs("div",{className:"following-topic-note",role:"status",children:["Showing the closest papers about “",A,"” now. A model is reading papers to refine these matches, which takes a few minutes."]}):null: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:()=>o(!0),children:"Follow a topic"})]})),a&&I&&e.jsx(rs,{open:D,onOpenChange:o}),v&&d.data&&e.jsxs("div",{className:"following-topic-note following-topic-filter",role:"status",children:["Showing only papers about “",A,"”."," ",e.jsx(E,{to:k(!1),children:"Show everything you follow"})]}),q?e.jsx(is,{onBuild:I?()=>o(!0):void 0}):e.jsx(Qe,{query:b,isLoading:b.isLoading||a&&!!(l!=null&&l.isLoading),cards:V,skeleton:"card",rootMargin:"400px",empty:x?null:v?e.jsxs(e.Fragment,{children:["No papers about your topic match these filters. Widen the date range or ",e.jsx("button",{type:"button",className:"link-button",onClick:()=>o(!0),children:"edit your topic"}),"."]}):a?e.jsxs(e.Fragment,{children:["No papers from your topic or follows match these filters. Widen the date range, or follow more from ",e.jsx(E,{to:"/tasks",children:"tasks"}),", ",e.jsx(E,{to:"/methods",children:"methods"}),", benchmark, author, or organization pages."]}):r==="x"?"No papers shared on X in this window.":"No papers in this window."})]})]})]})]})},Zs=({xTrending:r=!1})=>e.jsx(bs,{mode:r?"x":"trending"});export{gs as AskAssistant,bs as HomeFeed,Zs as default};
 
1
+ import{j as e,L as E,a as Se,b as Te,r as h,h as _e,C as Pe,c as be,d as Ce,e as Fe,f as Ee,i as Le,g as ne,k as ye,l as Ae}from"./index-CbgxfyGU.js";import{S as De}from"./sparkles-BqBXJPmy.js";import{u as R}from"./useQuery-Bx9s5-D2.js";import{D as Re,a as qe,b as Me}from"./dialog-Cfp_d3CC.js";import{c as ee}from"./catalog-DhK7_9-6.js";import{T as pe,r as B}from"./research-DgpyzSy_.js";import{d as ie,t as Ie}from"./transform-0Udg2p6b.js";import{u as je,a as ve,s as Oe,b as He,r as he,c as me,d as $e}from"./researchTopic-CteUev4M.js";import{P as ze}from"./plus-UK0TEjgd.js";import{A as Ke}from"./arrow-right-DotD9yNb.js";import{r as Be,P as Ue,w as Ge,a as Qe}from"./PaperFeed-DMvUfA47.js";import{M as We}from"./McpShowcase-CMLfdJM2.js";import{u as Xe,a as Ye,P as Ze,i as Ve,A as Je,b as es,S as $,c as ss,D as se,q as ts,d as as}from"./chatSessions-DwLUbLRo.js";import{c as os}from"./chat-DzTo2WUO.js";import{u as ns}from"./usePapers-CJaWLZ3y.js";import{p as J,a as ge}from"./paperQueryKeys-B8u1BWlI.js";import{S as te}from"./skeleton-HwvdxvSN.js";import{A as ae,a as oe}from"./alert-CFDDvdIM.js";import"./useMutation-P_trTy9i.js";import"./PaperCard-tdTC_dRN.js";import"./AuthorAvatar-CUJMmp_z.js";import"./SotaBadges-C-sTR-EF.js";import"./colors-BkWRhvFI.js";import"./Icon-D-kA0Owz.js";import"./LatexTitle-Z-HGmZ-H.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-DKJYnYjk.js";import"./useIntersectionObserver-CID9Kkak.js";import"./AgentLogos-BBl9UNVD.js";import"./useInfiniteQuery-BAc_4HO5.js";import"./curation-C7Gmmp4z.js";function is({onBuild:r}){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 a topic 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."}),r&&e.jsxs("button",{type:"button",className:"research-topic-save following-intro-topic",onClick:r,children:[e.jsx(De,{"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(E,{to:"/settings",children:"Settings"}),"."]})]})}const fe=16;function rs({open:r,onOpenChange:a}){return e.jsx(Re,{open:r,onOpenChange:a,children:e.jsx(qe,{className:"topic-dialog","aria-describedby":void 0,children:e.jsx(ls,{onDone:()=>a(!1)})})})}function ls({onDone:r}){var W,X,Y,Z,H,z,U;const{user:a}=Se(),m=Te(),l=R({queryKey:["research-topic",a==null?void 0:a.hf_subject],queryFn:B.topic,enabled:!!a}),s=R({queryKey:["research-follows",a==null?void 0:a.hf_subject],queryFn:B.follows,enabled:!!a}),w=R({queryKey:["trending-tasks-follow"],queryFn:()=>ee.trendingTasks({limit:fe,level:0}),staleTime:10*60*1e3}),y=R({queryKey:["trending-methods-follow"],queryFn:()=>ee.trendingMethods({limit:fe}),staleTime:10*60*1e3}),c=R({queryKey:["research-follow-suggestions"],queryFn:B.followSuggestions,staleTime:10*60*1e3}),j=(i=[])=>i.map(p=>({id:String(p.entity_id),name:p.name,image:p.image_url})),[k,L]=h.useState(null),[_,v]=h.useState([]),P=je(),M=ve(),b=((W=l.data)==null?void 0:W.text)??"",n=k??b,d=n.trim().replace(/\s+/g," "),C=((X=l.data)==null?void 0:X.status)==="failed"&&d===b,A=d.length>=3&&(d!==b||C),D=P.isPending||M.isPending,o=(i,p)=>{var N;return((N=s.data)==null?void 0:N.some(S=>S.kind===i&&String(S.entity_id)===p))??!1},g=(i,p)=>{var N;return((N=_.find(S=>S.kind===i&&S.id===p))==null?void 0:N.follow)??o(i,p)},f=_.filter(i=>i.follow!==o(i.kind,i.id)),F=!D&&(A||f.length>0),q=(i,p,N)=>v(S=>[...S.filter(G=>G.kind!==i||G.id!==p),{kind:i,id:p,name:N,follow:!g(i,p)}]),I=()=>{if(!F)return;if(!a){A&&Oe(d),f.length&&He(f),window.location.href=_e(`${m.pathname}${m.search}`);return}const i=[...f.length?[M.mutateAsync(f)]:[],...A?[P.mutateAsync(d)]:[]];Promise.allSettled(i).then(p=>{p.every(N=>N.status==="fulfilled")&&r()})},O=(i,p,N,S)=>{const V=[...(s.data??[]).filter(x=>x.kind===p).map(x=>({id:String(x.entity_id),name:x.name,slug:x.url.split("/").pop(),image:x.image_url})),...N.filter(x=>!o(p,x.id)).map(x=>({...x,suggested:!0}))];return V.length>0&&e.jsxs("div",{className:"topic-dialog-group",children:[e.jsx("h3",{children:i}),e.jsxs(cs,{children:[V.map(x=>{const Q=g(p,x.id),K=p==="task"?ie(x.name,x.slug??void 0):x.name;return e.jsxs("button",{type:"button",className:"topic-dialog-chip","aria-pressed":Q,disabled:D,"data-suggested":"suggested"in x||void 0,onClick:()=>q(p,x.id,K),children:[Q?e.jsx(Pe,{"aria-hidden":"true"}):e.jsx(ze,{"aria-hidden":"true"}),(p==="author"||p==="organization")&&e.jsx(ds,{kind:p,name:K,src:x.image}),K]},x.id)}),S&&e.jsxs(E,{to:S.to,className:"topic-dialog-browse",children:[S.label,e.jsx(Ke,{"aria-hidden":"true"})]})]})]})};return e.jsxs("form",{className:"topic-dialog-form",onSubmit:i=>{i.preventDefault(),I()},children:[e.jsx(Me,{className:"topic-dialog-title",children:b||(Y=s.data)!=null&&Y.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:"Describe a topic in your own words"})}),e.jsx("p",{className:"topic-dialog-hint",children:"A model reads every new paper and adds the ones that match to your Following feed."}),e.jsx("textarea",{id:"topic-dialog-input",className:"research-topic-input",rows:4,maxLength:pe,"aria-label":"Research topic",placeholder:"e.g. diffusion policies for robot manipulation, or speculative decoding for LLM inference",value:n,onChange:i=>L(i.target.value),onKeyDown:i=>{i.key==="Enter"&&!i.shiftKey&&!i.nativeEvent.isComposing&&(i.preventDefault(),I())}}),e.jsxs("span",{className:"research-topic-count",children:[n.length,"/",pe]})]}),O("Trending tasks","task",((Z=w.data)==null?void 0:Z.results)??[],{to:"/tasks",label:"Browse tasks"}),O("Trending methods","method",((H=y.data)==null?void 0:H.results)??[],{to:"/methods",label:"Browse methods"}),O("Benchmarks","benchmark",[],{to:"/tasks",label:"Browse benchmarks"}),O("Popular authors","author",j((z=c.data)==null?void 0:z.authors)),O("Popular organizations","organization",j((U=c.data)==null?void 0:U.organizations),{to:"/organizations",label:"Browse organizations"}),(P.error||M.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:[b&&e.jsx("button",{type:"button",className:"research-follow-action topic-dialog-remove",disabled:D,onClick:()=>P.mutate(null,{onSuccess:r}),children:"Remove topic"}),e.jsx("button",{type:"button",className:"research-follow-action",disabled:D,onClick:r,children:"Cancel"}),e.jsx("button",{type:"submit",className:"research-topic-save",disabled:!F,children:f.some(i=>i.follow===!1)?"Save":f.length?"Follow":C?"Retry":b?"Update topic":"Follow"})]})]})}function cs({children:r}){const a=h.useRef(null);return h.useLayoutEffect(()=>{const m=a.current;if(!m)return;const l=()=>{const s=[...m.children],w=s.filter(c=>c.dataset.suggested);w.forEach(c=>{c.hidden=!1});const y=()=>new Set(s.filter(c=>!c.hidden).map(c=>c.offsetTop)).size;for(let c=w.length-1;c>=0&&y()>2;c--)w[c].hidden=!0};return l(),window.addEventListener("resize",l),()=>window.removeEventListener("resize",l)}),e.jsx("div",{ref:a,className:"topic-dialog-chips",children:r})}function ds({kind:r,name:a,src:m}){const[l,s]=h.useState(!1);if(m&&!l)return e.jsx("img",{className:`topic-dialog-chip-image is-${r}`,src:m,alt:"",loading:"lazy",onError:()=>s(!0)});if(r!=="author")return null;const w=a.split(/\s+/).filter(Boolean).map(y=>y[0]).slice(0,2).join("").toUpperCase();return e.jsx("span",{className:"topic-dialog-chip-image is-author is-initials","aria-hidden":"true",children:w})}const xe=45,us=1800,ps=25,hs=350,ms=r=>{const[a,m]=h.useState($[0].slice(0,1)),[l,s]=h.useState(0);return h.useEffect(()=>{var L,_;if(!r)return;if((_=(L=window.matchMedia)==null?void 0:L.call(window,"(prefers-reduced-motion: reduce)"))!=null&&_.matches){m($[0]),s(0);return}let w=0,y=1,c=!1,j;m($[0].slice(0,y)),s(0);const k=()=>{const v=$[w];if(!c){if(y+=1,m(v.slice(0,y)),y===v.length){c=!0,j=window.setTimeout(k,us);return}j=window.setTimeout(k,xe);return}if(y-=1,m(v.slice(0,y)),y===0){c=!1,w=(w+1)%$.length,s(w),j=window.setTimeout(k,hs);return}j=window.setTimeout(k,ps)};return j=window.setTimeout(k,xe),()=>window.clearTimeout(j)},[r]),{placeholder:a,prompt:$[l]}},gs=()=>{var D;const r=be(),a=ye(),[m,l]=h.useState({text:"",paperMentions:[]}),s=m.text,[w,y]=h.useState(0),[c,j]=h.useState(!1),[k,L]=h.useState(null),{placeholder:_,prompt:v}=ms(!s),P=h.useRef(null),M=R({queryKey:["chatAvailability"],queryFn:()=>os.getAvailability(),retry:!1,enabled:ne()}),b=ne()&&((D=M.data)==null?void 0:D.paper_mentions_enabled)!==!1,n=Xe({draft:m,onChange:l,enabled:b,textareaRef:P}),d=Ye(m,n.open),C=s?d.completion:v;h.useLayoutEffect(()=>{const o=P.current;if(!o)return;const g=()=>{if(o.style.height="auto",s){o.style.height=`${Math.min(ss(o),160)}px`;return}const f=o.placeholder,F=$.reduce((q,I)=>(o.placeholder=I,Math.max(q,o.scrollHeight)),0);o.placeholder=f,o.style.height=`${Math.min(F,160)}px`};return g(),window.addEventListener("resize",g),()=>window.removeEventListener("resize",g)},[s,C]);const A=async(o=m)=>{const g=o.text.trim();if(!(!g||c)){if(a){const f=new URLSearchParams({q:g,model:se}),F=`${Ae}?${f}`,q=window.open(F,"_blank");if(!q){L(F);return}q.opener=null,L(null),l({text:"",paperMentions:[]});return}j(!0),ts(o,se);try{const f=await as(se);r(`/chat/${f.id}`)}catch{r("/chat")}}};return e.jsxs(e.Fragment,{children:[!a&&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(Ze,{text:m.text,mentions:m.paperMentions,scrollTop:w,variant:"home",completion:s?C:""}),e.jsx("textarea",{ref:P,rows:1,value:s,placeholder:_,"aria-label":"Ask the assistant",disabled:c,onChange:o=>{n.updateText(o.target.value,o.target.selectionStart),d.trackCaret(o.target)},onSelect:o=>{n.refresh(o.currentTarget.selectionStart),d.trackCaret(o.currentTarget)},onClick:o=>{n.refresh(o.currentTarget.selectionStart),d.trackCaret(o.currentTarget)},onScroll:o=>y(o.currentTarget.scrollTop),onBlur:o=>{var g,f;(f=(g=o.relatedTarget)==null?void 0:g.closest)!=null&&f.call(g,".chat-paper-picker")||window.setTimeout(n.close,0)},onKeyDown:o=>{if(!n.keyDown(o)){if(Ve(o)&&C){o.preventDefault();const g=s+C;n.updateText(g,g.length),window.requestAnimationFrame(()=>{var f;return(f=P.current)==null?void 0:f.setSelectionRange(g.length,g.length)});return}o.key==="Enter"&&!o.shiftKey&&(o.preventDefault(),A())}},role:b?"combobox":void 0,"aria-expanded":b?n.open:void 0,"aria-controls":n.open?n.pickerId:void 0,"aria-activedescendant":n.open&&n.results.length?`${n.optionIdPrefix}-${n.activeIndex}`:void 0,"aria-autocomplete":b?"list":void 0,"aria-describedby":n.message?"ask-home-paper-mention-message":void 0})]}),e.jsx("button",{type:"button",className:`chat-send${s.trim()?" chat-send-on":""}`,onClick:()=>void A(),disabled:!s.trim()||c,"aria-label":"Ask the assistant",children:e.jsx(Je,{})})]}),k&&e.jsx("div",{className:"chat-paper-mention-message",role:"alert",children:e.jsx("a",{href:k,target:"_blank",rel:"noreferrer",children:"Open this question on paperswithcode.co"})}),n.message&&e.jsx("div",{id:"ask-home-paper-mention-message",className:"chat-paper-mention-message",role:"alert",children:n.message}),e.jsx(es,{open:n.open,query:n.query,results:n.results,activeIndex:n.activeIndex,loading:n.loading,error:n.error,onSelect:n.select,id:n.pickerId,optionIdPrefix:n.optionIdPrefix})]})]})},Ne={task:"Tasks",method:"Methods",benchmark:"Benchmarks",author:"Authors",organization:"Orgs"},fs=Object.keys(Ne),xs=30,we=40,ws=async r=>{const a=await r;return{results:a.results.map(m=>({paper:m})),next_page:a.next_page}},bs=({mode:r})=>{var Q,K,re,le,ce,de,ue;const a=r==="following",m=be(),l=Ce(),s=l==null?void 0:l.user,[w,y]=Fe(),c=Be(w,void 0,a?"month":"week"),j=t=>{const u=new URLSearchParams(w);u.delete("order_by"),u.delete("only");const T=u.toString();m(T?`${t}?${T}`:t)},k=t=>{const u=new URLSearchParams(w);t?u.set("only","topic"):u.delete("only");const T=u.toString();return T?`/following?${T}`:"/following"},L=R({queryKey:["top-tasks-sidebar"],queryFn:()=>ee.topTasks(8),staleTime:10*60*1e3}),_=R({queryKey:["trending-tasks-sidebar"],queryFn:()=>ee.trendingTasks({limit:8,level:0}),staleTime:10*60*1e3}),v=a&&w.get("only")==="topic",P={start_date:c.startDate,end_date:c.endDate},M={...c,topicOnly:v},b=ns(a?[...J.feeds.following,s==null?void 0:s.hf_subject,M]:[...r==="x"?J.feeds.xTrending:J.feeds.trending,P],async t=>{if(a){const T=await B.following(t,M),ke=T.length===we?t+we:null;return{results:T,next_page:ke}}const u={...P,page:t,page_size:xs,include_resources:!0};return ws(r==="x"?ge.xTrending(u):ge.list({...u,order_by:"trending",order_dir:"desc",latest_only:!0}))},{enabled:!a||!!s,initialPage:a?0:1}),n=R({queryKey:["research-follows",s==null?void 0:s.hf_subject],queryFn:B.follows,enabled:a&&!!s}),d=R({queryKey:["research-topic",s==null?void 0:s.hf_subject],queryFn:B.topic,enabled:a&&!!s,refetchInterval:t=>t.state.data&&["pending","running"].includes(t.state.data.status)?1e4:!1}),C=!!d.data&&["pending","running"].includes(d.data.status),A=d.data?d.data.label??d.data.text:"",[D,o]=h.useState(!1),g=Ee(),f=h.useRef(!1);h.useEffect(()=>{f.current&&!C&&g.invalidateQueries({queryKey:[...J.feeds.following,s==null?void 0:s.hf_subject]}),f.current=C},[C,g,s==null?void 0:s.hf_subject]);const F=a&&!!s&&((Q=n.data)==null?void 0:Q.length)===0&&d.isSuccess&&!d.data,q=a&&!(l!=null&&l.isLoading)&&!s||F,I=!!s||!Le(),[O,W]=h.useState(!1),[X]=h.useState(()=>!!he()||me().length>0),[Y,Z]=h.useState(!1);!O&&(d.data||(K=n.data)!=null&&K.length)&&W(!0),q&&!Y&&(Z(!0),I&&!O&&!X&&o(!0));const H=je(),{mutate:z}=H,U=h.useRef(!1);h.useEffect(()=>{var u;const t=he();!s||!d.isSuccess||!t||U.current||(U.current=!0,t===((u=d.data)==null?void 0:u.text)?$e():z(t))},[s,d.isSuccess,d.data,z]);const i=ve(),{mutate:p}=i,N=h.useRef(!1);h.useEffect(()=>{const t=me();!s||!t.length||N.current||(N.current=!0,p(t))},[s,p]);const S=h.useMemo(()=>fs.map(t=>{var u;return{kind:t,follows:a?((u=n.data)==null?void 0:u.filter(T=>T.kind===t))??[]:[]}}).filter(t=>t.follows.length>0),[a,n.data]),G=a&&(!!(l!=null&&l.isLoading)||!!s&&!F),V=h.useMemo(()=>{var t;return((t=b.data)==null?void 0:t.pages.flatMap(u=>u.results.map(T=>({...Ie(T.paper),followReasons:T.reasons}))))??[]},[b.data]),x=b.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:r==="x"?"Papers people share most on X, picked daily":"Curated daily from arXiv and Hugging Face"})]})}),e.jsxs("div",{className:"layout-with-sidebar",children:[e.jsxs("aside",{className:"sidebar feed-sidebar",children:[G?e.jsxs("div",{className:"sidebar-section sidebar-section-follows",children:[e.jsx("div",{className:"sidebar-label",children:"You follow"}),((l==null?void 0:l.isLoading)||n.isLoading)&&e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:Array.from({length:4}).map((t,u)=>e.jsx(te,{className:"h-5 w-full"},u))}),n.isError&&e.jsx("div",{style:{fontSize:12,color:"var(--ink-faint)"},children:"Couldn't load your follows."}),e.jsxs("div",{className:"sidebar-links",children:[d.data&&e.jsxs("div",{className:`sidebar-follow-topic ${v?"active":""}`,children:[e.jsxs(E,{to:k(!v),className:"sidebar-link sidebar-follow-link",title:v?"Show papers from everything you follow":`Show only papers about “${d.data.text}”`,"aria-current":v?"true":void 0,children:[e.jsx("span",{className:"sidebar-follow-kind",children:"Topic"}),e.jsx("span",{className:"sidebar-follow-name",children:A})]}),e.jsx("button",{type:"button",className:"sidebar-follow-edit","aria-label":"Edit topic","aria-expanded":D,onClick:()=>o(!0),children:"edit"})]}),S.map(t=>e.jsxs("div",{className:"sidebar-follow-group",children:[e.jsx("span",{className:"sidebar-follow-kind",children:Ne[t.kind]}),t.follows.map(u=>e.jsx(E,{to:u.url,className:"sidebar-link sidebar-follow-link",children:e.jsx("span",{className:"sidebar-follow-name",children:u.name})},u.entity_id))]},t.kind))]}),e.jsx(E,{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"}),L.isLoading&&e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:Array.from({length:6}).map((t,u)=>e.jsx(te,{className:"h-5 w-full"},u))}),e.jsxs("div",{className:"sidebar-links",children:[(re=L.data)==null?void 0:re.map(t=>e.jsxs(E,{to:`/tasks/${t.slug}`,className:"sidebar-link",children:[ie(t.name,t.slug),t.paper_count!=null&&e.jsx("span",{className:"count",children:t.paper_count})]},t.id)),e.jsx(E,{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"}),_.isLoading&&e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:Array.from({length:6}).map((t,u)=>e.jsx(te,{className:"h-5 w-full"},u))}),((ce=(le=_.data)==null?void 0:le.results)==null?void 0:ce.length)===0&&!_.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:(ue=(de=_.data)==null?void 0:de.results)==null?void 0:ue.map(t=>e.jsxs(E,{to:`/tasks/${t.slug}`,className:"sidebar-link",children:[ie(t.name,t.slug),e.jsxs("span",{className:"count",children:[t.share_lift.toFixed(1),"x"]})]},t.id))})]})]}),e.jsx(We,{})]}),e.jsxs("div",{className:"feed-main",children:[(ne()||ye())&&e.jsx("div",{className:"feed-chat",children:e.jsx(gs,{})}),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 ${r==="trending"?"active":""}`,onClick:()=>j("/"),children:"trending"}),e.jsx("button",{className:`sort-btn ${r==="x"?"active":""}`,onClick:()=>j("/x-trending"),children:"trending (X)"}),e.jsx("button",{className:`sort-btn ${a?"active":""}`,onClick:()=>j("/following"),children:"following"})]})}),e.jsx(Ue,{startDate:c.startDate,endDate:c.endDate,onChange:t=>y(Ge(w,t))})]}),x&&e.jsx(ae,{variant:"destructive",className:"mb-4",children:e.jsxs(oe,{children:["Failed to load papers. ",e.jsx("button",{type:"button",onClick:()=>void b.refetch(),children:"Try again"})]})}),H.isError&&H.variables&&e.jsx(ae,{variant:"destructive",className:"mb-4",children:e.jsxs(oe,{children:["Could not follow “",H.variables,"”. ",e.jsx("button",{type:"button",onClick:()=>z(H.variables),children:"Try again"})]})}),i.isError&&i.variables&&e.jsx(ae,{variant:"destructive",className:"mb-4",children:e.jsxs(oe,{children:["Could not follow ",i.variables.map(t=>t.name).join(", "),". ",e.jsx("button",{type:"button",onClick:()=>p(i.variables),children:"Try again"})]})}),a&&!!s&&d.isSuccess&&!n.isPending&&!F&&(d.data?C?e.jsxs("div",{className:"following-topic-note",role:"status",children:["Showing the closest papers about “",A,"” now. A model is reading papers to refine these matches, which takes a few minutes."]}):null: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:()=>o(!0),children:"Follow a topic"})]})),a&&I&&e.jsx(rs,{open:D,onOpenChange:o}),v&&d.data&&e.jsxs("div",{className:"following-topic-note following-topic-filter",role:"status",children:["Showing only papers about “",A,"”."," ",e.jsx(E,{to:k(!1),children:"Show everything you follow"})]}),q?e.jsx(is,{onBuild:I?()=>o(!0):void 0}):e.jsx(Qe,{query:b,isLoading:b.isLoading||a&&!!(l!=null&&l.isLoading),cards:V,skeleton:"card",rootMargin:"400px",empty:x?null:v?e.jsxs(e.Fragment,{children:["No papers about your topic match these filters. Widen the date range or ",e.jsx("button",{type:"button",className:"link-button",onClick:()=>o(!0),children:"edit your topic"}),"."]}):a?e.jsxs(e.Fragment,{children:["No papers from your topic or follows match these filters. Widen the date range, or follow more from ",e.jsx(E,{to:"/tasks",children:"tasks"}),", ",e.jsx(E,{to:"/methods",children:"methods"}),", benchmark, author, or organization pages."]}):r==="x"?"No papers shared on X in this window.":"No papers in this window."})]})]})]})]})},Zs=({xTrending:r=!1})=>e.jsx(bs,{mode:r?"x":"trending"});export{gs as AskAssistant,bs as HomeFeed,Zs as default};
assets/FollowingView-BYs2N-nq.js DELETED
@@ -1 +0,0 @@
1
- import{j as o}from"./index-YwiKC6Po.js";import{HomeFeed as r}from"./FeedView-CFzlAcol.js";import"./sparkles-C3L7JDLC.js";import"./useQuery-DPH6Mb2w.js";import"./dialog-foxx0Wu6.js";import"./catalog-B15Yh5dN.js";import"./research-5UpiU-ea.js";import"./transform-CNg3rvXk.js";import"./researchTopic-CAL_T-Y-.js";import"./useMutation-f6iDkf3w.js";import"./plus-Cfz0QbT1.js";import"./arrow-right-CSx7rJG4.js";import"./PaperFeed-kaLm5US2.js";import"./PaperCard-FG-bEpJk.js";import"./AuthorAvatar-CoTET6B3.js";import"./SotaBadges-DiQuEzfo.js";import"./colors-BkWRhvFI.js";import"./Icon-DXQ4sjQk.js";import"./LatexTitle-DI6voLfI.js";import"./paperQueryKeys-C5FMa4Oj.js";import"./curation-CkzNFTMJ.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-D7ygxg37.js";import"./skeleton-CXR1qouH.js";import"./useIntersectionObserver-Dt36kyjs.js";import"./McpShowcase-Fj71TTNl.js";import"./AgentLogos-DhD8p5ds.js";import"./chatSessions-CdNQ1toA.js";import"./chat-DHGOonJg.js";import"./usePapers-C1deOZKl.js";import"./useInfiniteQuery-BEbL80ez.js";import"./alert-Cx5luC5D.js";function D(){return o.jsx(r,{mode:"following"})}export{D as default};
 
 
assets/FollowingView-nVVViEvV.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{j as o}from"./index-CbgxfyGU.js";import{HomeFeed as r}from"./FeedView-BR2dQQ-K.js";import"./sparkles-BqBXJPmy.js";import"./useQuery-Bx9s5-D2.js";import"./dialog-Cfp_d3CC.js";import"./catalog-DhK7_9-6.js";import"./research-DgpyzSy_.js";import"./transform-0Udg2p6b.js";import"./researchTopic-CteUev4M.js";import"./useMutation-P_trTy9i.js";import"./plus-UK0TEjgd.js";import"./arrow-right-DotD9yNb.js";import"./PaperFeed-DMvUfA47.js";import"./PaperCard-tdTC_dRN.js";import"./AuthorAvatar-CUJMmp_z.js";import"./SotaBadges-C-sTR-EF.js";import"./colors-BkWRhvFI.js";import"./Icon-D-kA0Owz.js";import"./LatexTitle-Z-HGmZ-H.js";import"./paperQueryKeys-B8u1BWlI.js";import"./curation-C7Gmmp4z.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-DKJYnYjk.js";import"./skeleton-HwvdxvSN.js";import"./useIntersectionObserver-CID9Kkak.js";import"./McpShowcase-CMLfdJM2.js";import"./AgentLogos-BBl9UNVD.js";import"./chatSessions-DwLUbLRo.js";import"./chat-DzTo2WUO.js";import"./usePapers-CJaWLZ3y.js";import"./useInfiniteQuery-BAc_4HO5.js";import"./alert-CFDDvdIM.js";function D(){return o.jsx(r,{mode:"following"})}export{D as default};
assets/{FrameworksIndexView-CqtIM7jE.js → FrameworksIndexView-CQtYg5mA.js} RENAMED
@@ -1 +1 @@
1
- import{c as d,j as e,L as c,K as m}from"./index-YwiKC6Po.js";import{u as h}from"./useQuery-DPH6Mb2w.js";import{I as p}from"./Icon-DXQ4sjQk.js";import{c as u}from"./catalog-B15Yh5dN.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"})]})]})},F=()=>{var a;const s=h({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 m.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,F as default};
 
1
+ import{c as d,j as e,L as c,M as m}from"./index-CbgxfyGU.js";import{u as h}from"./useQuery-Bx9s5-D2.js";import{I as p}from"./Icon-D-kA0Owz.js";import{c as u}from"./catalog-DhK7_9-6.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"})]})]})},F=()=>{var a;const s=h({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 m.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,F as default};
assets/{Icon-DXQ4sjQk.js → Icon-D-kA0Owz.js} RENAMED
@@ -1 +1 @@
1
- import{j as o}from"./index-YwiKC6Po.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"})};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};
 
1
+ import{j as o}from"./index-CbgxfyGU.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"})};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};
assets/{LatexTitle-DI6voLfI.js → LatexTitle-Z-HGmZ-H.js} RENAMED
@@ -1,2 +1,2 @@
1
  const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/katex-wklAmtGL.css"])))=>i.map(i=>d[i]);
2
- import{j as u,r as A,a0 as L}from"./index-YwiKC6Po.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;){if(n[e]==="$"&&n[e+1]==="$"){r();const o=n.indexOf("$$",e+2);if(o===-1){t+=n.slice(e);break}i.push({type:"display",content:n.slice(e+2,o)}),e=o+2;continue}if(n[e]==="$"){r();const o=n.indexOf("$",e+1);if(o===-1){t+=n.slice(e);break}i.push({type:"inline",content:n.slice(e+1,o)}),e=o+1;continue}t+=n[e],e+=1}return r(),i}function d(n,i){if(n[i]!=="{")return null;let e=0;for(let t=i;t<n.length;t+=1)if(n[t]==="{")e+=1;else if(n[t]==="}"&&(e-=1,e===0))return{content:n.slice(i+1,t),end:t+1};return null}function j(n,i){let e=i+1;if(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&&/[a-zA-Z]/.test(n[e]);)e+=1;return{name:n.slice(t,e),end:e}}function U(n,i){const e=n[i];if(e!=="^"&&e!=="_"||i+1>=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(;o<n.length&&/[A-Za-z0-9]/.test(n[o]);)o+=1;if(n[o]!=="^"&&n[o]!=="_")return null;e=o}else return null;const t=i;let r=0;for(;e<n.length;){const o=U(n,e);if(!o)break;r+=1,e=o.end}return r===0?null:{latex:n.slice(t,e),end:e}}function z(n){return Array.from(new Set((n||"").trim().split(/\s+/).filter(Boolean))).sort((i,e)=>e.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(;r<n.length;){if(n[r]==="\\"){const{name:l,end:C}=j(n,r);if(r=C,T[l]){t.push(T[l]);continue}if(l.length===1&&r<n.length&&/[A-Za-z]/.test(n[r])){const c=I(l,n[r]);if(c){t.push(c),r+=1;continue}}if(l==="c"){const c=d(n,r);if((c==null?void 0:c.content.length)===1){const h={c:"ç",C:"Ç"}[c.content];if(h){t.push(h),r=c.end;continue}}}if(l==="textbf"||l==="mathbf"){const c=d(n,r);if(c){r=c.end,t.push(a("strong",m(c.content,s(),e)));continue}}if(l==="emph"||l==="textit"||l==="textsl"||l==="texttt"){const c=d(n,r);if(c){r=c.end,t.push(a("em",m(c.content,s(),e)));continue}}if(l==="color"||l==="textcolor"){const c=d(n,r);if(c){r=c.end;const h=d(n,r);h&&(r=h.end,t.push(...m(h.content,s(),e)));continue}}if(O.has(l)){t.push(" ");continue}if(l==="~"){t.push(" ");continue}const E=d(n,r);if(E){r=E.end,t.push(...m(E.content,s(),e));continue}t.push(`\\${l}`);continue}if(n[r]==="~"){t.push(" "),r+=1;continue}const p=y(n,r);if(p){t.push(u.jsx(_,{latex:p.latex,display:!1},s())),r=p.end;continue}let f=r;for(;f<n.length&&n[f]!=="\\"&&n[f]!=="~"&&!y(n,f);)f+=1;f>r&&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};
 
1
  const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/katex-wklAmtGL.css"])))=>i.map(i=>d[i]);
2
+ import{j as u,r as A,a1 as L}from"./index-CbgxfyGU.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;){if(n[e]==="$"&&n[e+1]==="$"){r();const o=n.indexOf("$$",e+2);if(o===-1){t+=n.slice(e);break}i.push({type:"display",content:n.slice(e+2,o)}),e=o+2;continue}if(n[e]==="$"){r();const o=n.indexOf("$",e+1);if(o===-1){t+=n.slice(e);break}i.push({type:"inline",content:n.slice(e+1,o)}),e=o+1;continue}t+=n[e],e+=1}return r(),i}function d(n,i){if(n[i]!=="{")return null;let e=0;for(let t=i;t<n.length;t+=1)if(n[t]==="{")e+=1;else if(n[t]==="}"&&(e-=1,e===0))return{content:n.slice(i+1,t),end:t+1};return null}function j(n,i){let e=i+1;if(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&&/[a-zA-Z]/.test(n[e]);)e+=1;return{name:n.slice(t,e),end:e}}function U(n,i){const e=n[i];if(e!=="^"&&e!=="_"||i+1>=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(;o<n.length&&/[A-Za-z0-9]/.test(n[o]);)o+=1;if(n[o]!=="^"&&n[o]!=="_")return null;e=o}else return null;const t=i;let r=0;for(;e<n.length;){const o=U(n,e);if(!o)break;r+=1,e=o.end}return r===0?null:{latex:n.slice(t,e),end:e}}function z(n){return Array.from(new Set((n||"").trim().split(/\s+/).filter(Boolean))).sort((i,e)=>e.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(;r<n.length;){if(n[r]==="\\"){const{name:l,end:C}=j(n,r);if(r=C,T[l]){t.push(T[l]);continue}if(l.length===1&&r<n.length&&/[A-Za-z]/.test(n[r])){const c=I(l,n[r]);if(c){t.push(c),r+=1;continue}}if(l==="c"){const c=d(n,r);if((c==null?void 0:c.content.length)===1){const h={c:"ç",C:"Ç"}[c.content];if(h){t.push(h),r=c.end;continue}}}if(l==="textbf"||l==="mathbf"){const c=d(n,r);if(c){r=c.end,t.push(a("strong",m(c.content,s(),e)));continue}}if(l==="emph"||l==="textit"||l==="textsl"||l==="texttt"){const c=d(n,r);if(c){r=c.end,t.push(a("em",m(c.content,s(),e)));continue}}if(l==="color"||l==="textcolor"){const c=d(n,r);if(c){r=c.end;const h=d(n,r);h&&(r=h.end,t.push(...m(h.content,s(),e)));continue}}if(O.has(l)){t.push(" ");continue}if(l==="~"){t.push(" ");continue}const E=d(n,r);if(E){r=E.end,t.push(...m(E.content,s(),e));continue}t.push(`\\${l}`);continue}if(n[r]==="~"){t.push(" "),r+=1;continue}const p=y(n,r);if(p){t.push(u.jsx(_,{latex:p.latex,display:!1},s())),r=p.end;continue}let f=r;for(;f<n.length&&n[f]!=="\\"&&n[f]!=="~"&&!y(n,f);)f+=1;f>r&&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};
assets/{MarkdownText-C-8yLDus.js → MarkdownText-Bj-G_S-B.js} RENAMED
@@ -1 +1 @@
1
- import{o as c,j as s,L as u}from"./index-YwiKC6Po.js";/* empty css */import{r as p,a as m,P as d}from"./PaperPreviewLink-CKfmgBjs.js";import{M as h}from"./index-CoRCN2p0.js";import{r as f}from"./index-BM_xSDJM.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),o=/^[1-9]\d*$/.test(r);return!n&&!o?null:c(r)}const M=({text:e,className:a=""})=>s.jsx("div",{className:a,children:s.jsx(h,{remarkPlugins:[f,m],rehypePlugins:[p],components:{a:({href:t,children:r,node:n,...o})=>{const i=k(t);if(i){const l=I(i);return l?s.jsx(d,{routeId:l,to:i,...o,children:r}):s.jsx(u,{to:i,...o,children:r})}return s.jsx("a",{href:t,target:"_blank",rel:"noopener noreferrer",...o,children:r})}},children:e})});export{M,k as r};
 
1
+ import{o as c,j as s,L as u}from"./index-CbgxfyGU.js";/* empty css */import{r as p,a as m,P as d}from"./PaperPreviewLink-DZDNIh1g.js";import{M as h}from"./index-ZkEATkOr.js";import{r as f}from"./index-BH3yOoza.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),o=/^[1-9]\d*$/.test(r);return!n&&!o?null:c(r)}const M=({text:e,className:a=""})=>s.jsx("div",{className:a,children:s.jsx(h,{remarkPlugins:[f,m],rehypePlugins:[p],components:{a:({href:t,children:r,node:n,...o})=>{const i=k(t);if(i){const l=I(i);return l?s.jsx(d,{routeId:l,to:i,...o,children:r}):s.jsx(u,{to:i,...o,children:r})}return s.jsx("a",{href:t,target:"_blank",rel:"noopener noreferrer",...o,children:r})}},children:e})});export{M,k as r};
assets/{McpShowcase-Fj71TTNl.js → McpShowcase-CMLfdJM2.js} RENAMED
@@ -1 +1 @@
1
- import{j as e,L as t}from"./index-YwiKC6Po.js";import{A as a}from"./AgentLogos-DhD8p5ds.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};
 
1
+ import{j as e,L as t}from"./index-CbgxfyGU.js";import{A as a}from"./AgentLogos-BBl9UNVD.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};
assets/{McpView-CMm_vOrt.js → McpView-BrXaRo4V.js} RENAMED
@@ -1,4 +1,4 @@
1
- import{n as b,K as h,j as e,C as x}from"./index-YwiKC6Po.js";import{u as j}from"./useQuery-DPH6Mb2w.js";import{f,D as g}from"./latexPlainText-DI8YEXVe.js";import{q as y}from"./queryOptions-C9woPjwX.js";import{G as v}from"./github-BZMCt7Ub.js";import{E as i}from"./external-link-4bBJT0yO.js";import{C as w}from"./copy-YHg6twss.js";/**
2
  * @license lucide-react v0.462.0 - ISC
3
  *
4
  * This source code is licensed under the ISC license.
 
1
+ import{n as b,M as h,j as e,C as x}from"./index-CbgxfyGU.js";import{u as j}from"./useQuery-Bx9s5-D2.js";import{f,D as g}from"./latexPlainText-DI8YEXVe.js";import{q as y}from"./queryOptions-C9woPjwX.js";import{G as v}from"./github-BYklgHDz.js";import{E as i}from"./external-link-DZIH4GGr.js";import{C as w}from"./copy-bzw7JVus.js";/**
2
  * @license lucide-react v0.462.0 - ISC
3
  *
4
  * This source code is licensed under the ISC license.
assets/{MethodDetailView-CU5sbo2E.js → MethodDetailView-CEUGGyVV.js} RENAMED
@@ -1 +1 @@
1
- import{j as e,r as E,u as $,L as b}from"./index-YwiKC6Po.js";import{R as B}from"./ResearchFollowButton-BFXC8E3t.js";import{p as P,a as V}from"./paperQueryKeys-C5FMa4Oj.js";import{u as k}from"./useQuery-DPH6Mb2w.js";import{M as H}from"./SotaBadges-DiQuEzfo.js";import{u as q,b as Q,a as K}from"./PaperFeed-kaLm5US2.js";import{r as R,M as z}from"./MarkdownText-C-8yLDus.js";import{c as v}from"./catalog-B15Yh5dN.js";import{i as G}from"./apiErrors-DBfE_SVR.js";import{s as O}from"./slug-BpH-Nkvz.js";import{t as U}from"./transform-CNg3rvXk.js";import{u as W}from"./usePapers-C1deOZKl.js";import{S as _}from"./skeleton-CXR1qouH.js";import{A as Z,a as X}from"./alert-Cx5luC5D.js";import{s as Y}from"./safeExternalHref-CkBrsh84.js";import J from"./NotFound-D8hwuoEl.js";import"./useMutation-f6iDkf3w.js";import"./research-5UpiU-ea.js";import"./plus-Cfz0QbT1.js";import"./curation-CkzNFTMJ.js";import"./colors-BkWRhvFI.js";import"./PaperCard-FG-bEpJk.js";import"./AuthorAvatar-CoTET6B3.js";import"./Icon-DXQ4sjQk.js";import"./LatexTitle-DI6voLfI.js";import"./popover-D7ygxg37.js";import"./useIntersectionObserver-Dt36kyjs.js";/* empty css */import"./PaperPreviewLink-CKfmgBjs.js";import"./index-CoRCN2p0.js";import"./index-BM_xSDJM.js";import"./katex-DkKDou_j.js";import"./hover-card-BY9tUGxy.js";import"./useInfiniteQuery-BEbL80ez.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})]}),ee=()=>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"]})]}),te=()=>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₂) / τ"})]}),se=[["my-skill/",""],["├── SKILL.md","# Required: metadata + instructions"],["├── scripts/","# Optional: executable code"],["├── references/","# Optional: documentation"],["├── assets/","# Optional: templates, resources"],["└── ...","# Any additional files or directories"]],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:"Skill package layout"}),e.jsx("rect",{x:"28",y:"48",width:"304",height:"318",rx:"8",fill:"#FFFDF8",stroke:t.faint,strokeWidth:"1"}),se.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)})]}),re={attention:ee,"contrastive-learning":te,"agent-skills":ae},le=({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})]}),ie=({method:s})=>{const r=(s.slug||"").toLowerCase(),l=re[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(le,{method:s})})},N=720,w=138,x={top:8,right:10,bottom:25,left:36},A=56,ne=new Intl.DateTimeFormat("en",{month:"short",year:"2-digit",timeZone:"UTC"}),oe=new Intl.DateTimeFormat("en",{year:"numeric",timeZone:"UTC"}),M=s=>ne.format(new Date(`${s}T00:00:00Z`)),ce=(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(A/r)),o=Math.max(l,d),p=s-1,h=new Set([0,p]);for(let c=o;c<p;c+=o)(p-c)*r>=A&&h.add(c);return h},L=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}`},de=({history:s,methodName:r})=>{const[l,d]=E.useState(null),o=Math.max(1,...s.map(i=>i.paper_count)),p=N-x.left-x.right,h=w-x.top-x.bottom,c=s.length?p/s.length:p,a=Math.max(2,c*.68),g=ce(s.length,c),j=Array.from(new Set([0,Math.ceil(o/2),o])),f=l==null?null:s[l],y=f?L(f):null;return e.jsxs("div",{className:"method-usage-chart-wrap",children:[e.jsxs("svg",{className:"method-usage-chart",viewBox:`0 0 ${N} ${w}`,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:N-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,I=x.left+c*m+(c-a)/2,C=x.top+h-S,D=l===m,T=m===s.length-1,F=L(i);return e.jsxs("g",{className:`method-usage-bar${D?" is-active":""}${T?" is-current":""}`,tabIndex:0,role:"img","aria-label":`${M(i.start_date)}: ${i.paper_count} ${i.paper_count===1?"paper":"papers"}${F?`. ${F}`:""}`,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:I,y:C,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:w-11,textAnchor:"middle",children:s.length>48?oe.format(new Date(`${i.start_date}T00:00:00Z`)):M(i.start_date)},i.start_date):null)]}),f&&e.jsxs("div",{className:"method-usage-tooltip",role:"status",children:[e.jsx("strong",{children:M(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})]})]})},Re=()=>{var y,i,m;const{methodSlug:s}=$(),r=q(),l=k({queryKey:["method",s],queryFn:()=>v.getMethod(s),enabled:!!s,staleTime:10*60*1e3}),d=k({queryKey:["areas-all"],queryFn:()=>v.listAreas({page_size:50,ordering:"name"}),enabled:!!((y=l.data)!=null&&y.area_id),staleTime:10*60*1e3}),o=k({queryKey:["method-trend",s],queryFn:()=>v.methodTrend(s),enabled:!!s,staleTime:10*60*1e3}),p=W([...P.feeds.method,s,r.filters],u=>V.forMethod(s,{...r.filters,page:u,page_size:20,repository_limit:1}),{enabled:!!s}),h=k({queryKey:["related-methods",s],queryFn:()=>v.relatedMethods(s),enabled:!!s,staleTime:10*60*1e3}),c=E.useMemo(()=>{var u;return((u=p.data)==null?void 0:u.pages.flatMap(S=>S.results.map(U)))??[]},[p.data]);if(l.isLoading)return e.jsxs("div",{className:"page",children:[e.jsx(_,{className:"h-12 w-1/2 mb-4"}),e.jsx(_,{className:"h-64 w-full"})]});if(G(l.error))return e.jsx(J,{});if(l.error||!l.data)return e.jsx("div",{className:"page",children:e.jsx(Z,{variant:"destructive",children:e.jsx(X,{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=R(a.source_url),f=j?null:Y(a.source_url);return e.jsxs("div",{className:"page",children:[e.jsxs("div",{className:"breadcrumb",children:[e.jsx(b,{to:"/methods",children:"Methods"}),g&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"sep",children:"/"}),e.jsx(b,{to:`/methods#area-${O(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(B,{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(z,{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(b,{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(_,{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(de,{history:o.data.history,methodName:a.name})]}):null]}),e.jsxs("figure",{className:"method-figure-card",children:[e.jsx(ie,{method:a}),a.image_credit&&e.jsx("figcaption",{children:e.jsx(z,{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(Q,{feed:r,children:e.jsxs("div",{className:"results-count",children:[c.length," papers mentioning ",a.name]})}),e.jsx(K,{query:p,cards:c,empty:"No papers tagged with this method yet."})]})};export{Re as default};
 
1
+ import{j as e,r as E,u as $,L as b}from"./index-CbgxfyGU.js";import{R as B}from"./ResearchFollowButton-D2BXlDtQ.js";import{p as P,a as V}from"./paperQueryKeys-B8u1BWlI.js";import{u as k}from"./useQuery-Bx9s5-D2.js";import{M as H}from"./SotaBadges-C-sTR-EF.js";import{u as q,b as Q,a as K}from"./PaperFeed-DMvUfA47.js";import{r as R,M as z}from"./MarkdownText-Bj-G_S-B.js";import{c as v}from"./catalog-DhK7_9-6.js";import{i as G}from"./apiErrors-BZ5h1Kmb.js";import{s as O}from"./slug-BpH-Nkvz.js";import{t as U}from"./transform-0Udg2p6b.js";import{u as W}from"./usePapers-CJaWLZ3y.js";import{S as _}from"./skeleton-HwvdxvSN.js";import{A as Z,a as X}from"./alert-CFDDvdIM.js";import{s as Y}from"./safeExternalHref-CkBrsh84.js";import J from"./NotFound-DtzwOULp.js";import"./useMutation-P_trTy9i.js";import"./research-DgpyzSy_.js";import"./plus-UK0TEjgd.js";import"./curation-C7Gmmp4z.js";import"./colors-BkWRhvFI.js";import"./PaperCard-tdTC_dRN.js";import"./AuthorAvatar-CUJMmp_z.js";import"./Icon-D-kA0Owz.js";import"./LatexTitle-Z-HGmZ-H.js";import"./popover-DKJYnYjk.js";import"./useIntersectionObserver-CID9Kkak.js";/* empty css */import"./PaperPreviewLink-DZDNIh1g.js";import"./index-ZkEATkOr.js";import"./index-BH3yOoza.js";import"./katex-DkKDou_j.js";import"./hover-card-ufez2uMo.js";import"./useInfiniteQuery-BAc_4HO5.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})]}),ee=()=>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"]})]}),te=()=>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₂) / τ"})]}),se=[["my-skill/",""],["├── SKILL.md","# Required: metadata + instructions"],["├── scripts/","# Optional: executable code"],["├── references/","# Optional: documentation"],["├── assets/","# Optional: templates, resources"],["└── ...","# Any additional files or directories"]],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:"Skill package layout"}),e.jsx("rect",{x:"28",y:"48",width:"304",height:"318",rx:"8",fill:"#FFFDF8",stroke:t.faint,strokeWidth:"1"}),se.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)})]}),re={attention:ee,"contrastive-learning":te,"agent-skills":ae},le=({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})]}),ie=({method:s})=>{const r=(s.slug||"").toLowerCase(),l=re[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(le,{method:s})})},N=720,w=138,x={top:8,right:10,bottom:25,left:36},A=56,ne=new Intl.DateTimeFormat("en",{month:"short",year:"2-digit",timeZone:"UTC"}),oe=new Intl.DateTimeFormat("en",{year:"numeric",timeZone:"UTC"}),M=s=>ne.format(new Date(`${s}T00:00:00Z`)),ce=(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(A/r)),o=Math.max(l,d),p=s-1,h=new Set([0,p]);for(let c=o;c<p;c+=o)(p-c)*r>=A&&h.add(c);return h},L=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}`},de=({history:s,methodName:r})=>{const[l,d]=E.useState(null),o=Math.max(1,...s.map(i=>i.paper_count)),p=N-x.left-x.right,h=w-x.top-x.bottom,c=s.length?p/s.length:p,a=Math.max(2,c*.68),g=ce(s.length,c),j=Array.from(new Set([0,Math.ceil(o/2),o])),f=l==null?null:s[l],y=f?L(f):null;return e.jsxs("div",{className:"method-usage-chart-wrap",children:[e.jsxs("svg",{className:"method-usage-chart",viewBox:`0 0 ${N} ${w}`,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:N-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,I=x.left+c*m+(c-a)/2,C=x.top+h-S,D=l===m,T=m===s.length-1,F=L(i);return e.jsxs("g",{className:`method-usage-bar${D?" is-active":""}${T?" is-current":""}`,tabIndex:0,role:"img","aria-label":`${M(i.start_date)}: ${i.paper_count} ${i.paper_count===1?"paper":"papers"}${F?`. ${F}`:""}`,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:I,y:C,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:w-11,textAnchor:"middle",children:s.length>48?oe.format(new Date(`${i.start_date}T00:00:00Z`)):M(i.start_date)},i.start_date):null)]}),f&&e.jsxs("div",{className:"method-usage-tooltip",role:"status",children:[e.jsx("strong",{children:M(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})]})]})},Re=()=>{var y,i,m;const{methodSlug:s}=$(),r=q(),l=k({queryKey:["method",s],queryFn:()=>v.getMethod(s),enabled:!!s,staleTime:10*60*1e3}),d=k({queryKey:["areas-all"],queryFn:()=>v.listAreas({page_size:50,ordering:"name"}),enabled:!!((y=l.data)!=null&&y.area_id),staleTime:10*60*1e3}),o=k({queryKey:["method-trend",s],queryFn:()=>v.methodTrend(s),enabled:!!s,staleTime:10*60*1e3}),p=W([...P.feeds.method,s,r.filters],u=>V.forMethod(s,{...r.filters,page:u,page_size:20,repository_limit:1}),{enabled:!!s}),h=k({queryKey:["related-methods",s],queryFn:()=>v.relatedMethods(s),enabled:!!s,staleTime:10*60*1e3}),c=E.useMemo(()=>{var u;return((u=p.data)==null?void 0:u.pages.flatMap(S=>S.results.map(U)))??[]},[p.data]);if(l.isLoading)return e.jsxs("div",{className:"page",children:[e.jsx(_,{className:"h-12 w-1/2 mb-4"}),e.jsx(_,{className:"h-64 w-full"})]});if(G(l.error))return e.jsx(J,{});if(l.error||!l.data)return e.jsx("div",{className:"page",children:e.jsx(Z,{variant:"destructive",children:e.jsx(X,{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=R(a.source_url),f=j?null:Y(a.source_url);return e.jsxs("div",{className:"page",children:[e.jsxs("div",{className:"breadcrumb",children:[e.jsx(b,{to:"/methods",children:"Methods"}),g&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"sep",children:"/"}),e.jsx(b,{to:`/methods#area-${O(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(B,{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(z,{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(b,{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(_,{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(de,{history:o.data.history,methodName:a.name})]}):null]}),e.jsxs("figure",{className:"method-figure-card",children:[e.jsx(ie,{method:a}),a.image_credit&&e.jsx("figcaption",{children:e.jsx(z,{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(Q,{feed:r,children:e.jsxs("div",{className:"results-count",children:[c.length," papers mentioning ",a.name]})}),e.jsx(K,{query:p,cards:c,empty:"No papers tagged with this method yet."})]})};export{Re as default};
assets/{MethodsIndexView-CS3VxsBJ.js → MethodsIndexView-DYp0dUSa.js} RENAMED
@@ -1,4 +1,4 @@
1
- import{n as y,r as c,j as s,L as f}from"./index-YwiKC6Po.js";import{u as l}from"./useQuery-DPH6Mb2w.js";import{c as m}from"./catalog-B15Yh5dN.js";import{s as _}from"./areas-Dvi8w2dp.js";import{s as v}from"./slug-BpH-Nkvz.js";import{A as N,a as L}from"./alert-Cx5luC5D.js";import{A as T,a as A}from"./AreaSection-CfCNkiTd.js";import{T as F}from"./TaxonomySuggestionTile-4WqZSJGN.js";import{u as M,T as q}from"./useHashScrollOnReady-BKkkyVVX.js";import"./skeleton-CXR1qouH.js";import"./SignInToEditDialog-DpqyyHCb.js";import"./button-B90pJJiy.js";import"./input-DEeEc0bH.js";import"./textarea-BPIMGf5w.js";import"./searchable-select-Bqfyxu17.js";import"./popover-D7ygxg37.js";import"./dialog-foxx0Wu6.js";import"./search-wcEXdf1i.js";import"./loader-circle-B0KtDERb.js";import"./useMutation-f6iDkf3w.js";import"./submissions-BJgYjF7O.js";import"./plus-Cfz0QbT1.js";import"./trending-up-Sm0tkX5g.js";/**
2
  * @license lucide-react v0.462.0 - ISC
3
  *
4
  * This source code is licensed under the ISC license.
 
1
+ import{n as y,r as c,j as s,L as f}from"./index-CbgxfyGU.js";import{u as l}from"./useQuery-Bx9s5-D2.js";import{c as m}from"./catalog-DhK7_9-6.js";import{s as _}from"./areas-Dvi8w2dp.js";import{s as v}from"./slug-BpH-Nkvz.js";import{A as N,a as L}from"./alert-CFDDvdIM.js";import{A as T,a as A}from"./AreaSection-NWvfO4Sb.js";import{T as F}from"./TaxonomySuggestionTile-DIw_GKfA.js";import{u as M,T as q}from"./useHashScrollOnReady-DgB3XFQL.js";import"./skeleton-HwvdxvSN.js";import"./SignInToEditDialog-CNIcNqbK.js";import"./button-Bv9oZ-QU.js";import"./input-B6pxtfPe.js";import"./textarea-Bf06GTSH.js";import"./searchable-select-DNdBIahG.js";import"./popover-DKJYnYjk.js";import"./dialog-Cfp_d3CC.js";import"./search-CLtAJGOp.js";import"./loader-circle-CWMja8Zn.js";import"./useMutation-P_trTy9i.js";import"./submissions-aWj7YtuZ.js";import"./plus-UK0TEjgd.js";import"./trending-up-B3K5RlyX.js";/**
2
  * @license lucide-react v0.462.0 - ISC
3
  *
4
  * This source code is licensed under the ISC license.
assets/{NotFound-D8hwuoEl.js → NotFound-DtzwOULp.js} RENAMED
@@ -1 +1 @@
1
- import{b as o,r as s,j as t,L as a}from"./index-YwiKC6Po.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};
 
1
+ import{b as o,r as s,j as t,L as a}from"./index-CbgxfyGU.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};
assets/{OrganizationContributionGraph-BZyCpVX4.js → OrganizationContributionGraph-ah6EPb13.js} RENAMED
@@ -1 +1 @@
1
- import{r as b,j as o}from"./index-YwiKC6Po.js";import{u as z}from"./useQuery-DPH6Mb2w.js";import{S as T}from"./skeleton-CXR1qouH.js";import{c as w}from"./catalog-B15Yh5dN.js";const x=24*60*60*1e3,f=12,y=3,v=new Map([[1,"Mon"],[3,"Wed"],[5,"Fri"]]),$=n=>new Date(`${n}T00:00:00Z`),N=n=>n.toISOString().slice(0,10),_=(n,r)=>{if(n===0)return 0;const i=r.findIndex(s=>n<=s);return i===-1?4:i+1},D=n=>{const r=$(n.start_date),i=$(n.end_date),s=new Date(r.getTime()-r.getUTCDay()*x),h=new Date(i.getTime()+(6-i.getUTCDay())*x),p=new Map(n.results.map(e=>[e.date,e.paper_count])),u=n.results.map(e=>e.paper_count).sort((e,m)=>e-m),c=[.25,.5,.75].map(e=>u[Math.min(u.length-1,Math.floor(u.length*e))]??1),l=[];for(let e=s.getTime();e<=h.getTime();e+=x){const m=new Date(e),d=N(m),g=e>=r.getTime()&&e<=i.getTime(),C=g?p.get(d)??0:0;l.push({key:d,date:m,count:C,inRange:g,level:_(C,c)})}const t=l.length/7,a=[];let j=-1;for(let e=0;e<t;e+=1){const d=l.slice(e*7,e*7+7).find(g=>g.inRange&&(e===0||g.date.getUTCDate()<=7));d&&d.date.getUTCMonth()!==j&&(j=d.date.getUTCMonth(),a.length>0&&e-a[a.length-1].column<3&&a.pop(),a.push({label:d.date.toLocaleString("en",{month:"short",timeZone:"UTC"}),column:e}))}return{days:l,months:a,weekCount:t}},L=({data:n,organizationName:r,title:i="Paper contributions",noun:s="paper"})=>{const h=b.useRef(null),{days:p,months:u,weekCount:c}=b.useMemo(()=>D(n),[n]),l=c*f+(c-1)*y;return b.useEffect(()=>{const t=h.current;t&&(t.scrollLeft=t.scrollWidth)},[c]),o.jsxs("section",{className:"organization-contributions","aria-labelledby":"organization-contributions-title",children:[o.jsxs("div",{className:"organization-contributions-header",children:[o.jsx("h2",{id:"organization-contributions-title",className:"organization-contributions-title",children:i}),o.jsxs("p",{className:"organization-contributions-summary",children:[n.total_count.toLocaleString()," ",n.total_count===1?s:`${s}s`," recorded in the last year"]})]}),o.jsx("div",{className:"organization-contributions-scroll",ref:h,children:o.jsxs("div",{className:"organization-contributions-plot",style:{width:l+34},role:"img","aria-label":`${r} recorded ${n.total_count} ${n.total_count===1?s:`${s}s`} in the last year`,children:[o.jsx("div",{className:"organization-contributions-weekdays","aria-hidden":"true",children:Array.from({length:7}).map((t,a)=>o.jsx("span",{children:v.get(a)??""},a))}),o.jsxs("div",{children:[o.jsx("div",{className:"organization-contributions-months",style:{width:l,gridTemplateColumns:`repeat(${c}, ${f}px)`},"aria-hidden":"true",children:u.map(t=>o.jsx("span",{style:{gridColumnStart:t.column+1},children:t.label},`${t.label}-${t.column}`))}),o.jsx("div",{className:"organization-contributions-grid",style:{width:l,gridTemplateColumns:`repeat(${c}, ${f}px)`},"aria-hidden":"true",children:p.map(t=>o.jsx("span",{className:`organization-contribution-cell ${t.inRange?`level-${t.level}`:"is-outside"}`,title:t.inRange?`${t.count} ${t.count===1?s:`${s}s`} on ${t.date.toLocaleDateString("en",{dateStyle:"long",timeZone:"UTC"})}`:void 0},t.key))})]})]})}),o.jsxs("div",{className:"organization-contributions-legend","aria-hidden":"true",children:[o.jsx("span",{children:"Fewer"}),[0,1,2,3,4].map(t=>o.jsx("span",{className:`organization-contribution-cell level-${t}`},t)),o.jsx("span",{children:"More"})]})]})},A=({organizationSlug:n,organizationName:r})=>{const i=z({queryKey:["organization-contributions",n],queryFn:()=>w.organizationContributions(n),staleTime:6e5});return i.isLoading?o.jsx(T,{className:"organization-contributions-skeleton"}):i.data?o.jsx(L,{data:i.data,organizationName:r}):null};export{L as C,A as O};
 
1
+ import{r as b,j as o}from"./index-CbgxfyGU.js";import{u as z}from"./useQuery-Bx9s5-D2.js";import{S as T}from"./skeleton-HwvdxvSN.js";import{c as w}from"./catalog-DhK7_9-6.js";const x=24*60*60*1e3,f=12,y=3,v=new Map([[1,"Mon"],[3,"Wed"],[5,"Fri"]]),$=n=>new Date(`${n}T00:00:00Z`),N=n=>n.toISOString().slice(0,10),_=(n,r)=>{if(n===0)return 0;const i=r.findIndex(s=>n<=s);return i===-1?4:i+1},D=n=>{const r=$(n.start_date),i=$(n.end_date),s=new Date(r.getTime()-r.getUTCDay()*x),h=new Date(i.getTime()+(6-i.getUTCDay())*x),p=new Map(n.results.map(e=>[e.date,e.paper_count])),u=n.results.map(e=>e.paper_count).sort((e,m)=>e-m),c=[.25,.5,.75].map(e=>u[Math.min(u.length-1,Math.floor(u.length*e))]??1),l=[];for(let e=s.getTime();e<=h.getTime();e+=x){const m=new Date(e),d=N(m),g=e>=r.getTime()&&e<=i.getTime(),C=g?p.get(d)??0:0;l.push({key:d,date:m,count:C,inRange:g,level:_(C,c)})}const t=l.length/7,a=[];let j=-1;for(let e=0;e<t;e+=1){const d=l.slice(e*7,e*7+7).find(g=>g.inRange&&(e===0||g.date.getUTCDate()<=7));d&&d.date.getUTCMonth()!==j&&(j=d.date.getUTCMonth(),a.length>0&&e-a[a.length-1].column<3&&a.pop(),a.push({label:d.date.toLocaleString("en",{month:"short",timeZone:"UTC"}),column:e}))}return{days:l,months:a,weekCount:t}},L=({data:n,organizationName:r,title:i="Paper contributions",noun:s="paper"})=>{const h=b.useRef(null),{days:p,months:u,weekCount:c}=b.useMemo(()=>D(n),[n]),l=c*f+(c-1)*y;return b.useEffect(()=>{const t=h.current;t&&(t.scrollLeft=t.scrollWidth)},[c]),o.jsxs("section",{className:"organization-contributions","aria-labelledby":"organization-contributions-title",children:[o.jsxs("div",{className:"organization-contributions-header",children:[o.jsx("h2",{id:"organization-contributions-title",className:"organization-contributions-title",children:i}),o.jsxs("p",{className:"organization-contributions-summary",children:[n.total_count.toLocaleString()," ",n.total_count===1?s:`${s}s`," recorded in the last year"]})]}),o.jsx("div",{className:"organization-contributions-scroll",ref:h,children:o.jsxs("div",{className:"organization-contributions-plot",style:{width:l+34},role:"img","aria-label":`${r} recorded ${n.total_count} ${n.total_count===1?s:`${s}s`} in the last year`,children:[o.jsx("div",{className:"organization-contributions-weekdays","aria-hidden":"true",children:Array.from({length:7}).map((t,a)=>o.jsx("span",{children:v.get(a)??""},a))}),o.jsxs("div",{children:[o.jsx("div",{className:"organization-contributions-months",style:{width:l,gridTemplateColumns:`repeat(${c}, ${f}px)`},"aria-hidden":"true",children:u.map(t=>o.jsx("span",{style:{gridColumnStart:t.column+1},children:t.label},`${t.label}-${t.column}`))}),o.jsx("div",{className:"organization-contributions-grid",style:{width:l,gridTemplateColumns:`repeat(${c}, ${f}px)`},"aria-hidden":"true",children:p.map(t=>o.jsx("span",{className:`organization-contribution-cell ${t.inRange?`level-${t.level}`:"is-outside"}`,title:t.inRange?`${t.count} ${t.count===1?s:`${s}s`} on ${t.date.toLocaleDateString("en",{dateStyle:"long",timeZone:"UTC"})}`:void 0},t.key))})]})]})}),o.jsxs("div",{className:"organization-contributions-legend","aria-hidden":"true",children:[o.jsx("span",{children:"Fewer"}),[0,1,2,3,4].map(t=>o.jsx("span",{className:`organization-contribution-cell level-${t}`},t)),o.jsx("span",{children:"More"})]})]})},A=({organizationSlug:n,organizationName:r})=>{const i=z({queryKey:["organization-contributions",n],queryFn:()=>w.organizationContributions(n),staleTime:6e5});return i.isLoading?o.jsx(T,{className:"organization-contributions-skeleton"}):i.data?o.jsx(L,{data:i.data,organizationName:r}):null};export{L as C,A as O};
assets/{OrganizationDetailView-C69MBUc4.js → OrganizationDetailView-BD-vOirQ.js} RENAMED
@@ -1 +1 @@
1
- import{c as q,r as d,j as r,L as N,u as C}from"./index-YwiKC6Po.js";import{R as M}from"./ResearchFollowButton-BFXC8E3t.js";import{u as y}from"./useQuery-DPH6Mb2w.js";import{M as z}from"./MarkdownText-C-8yLDus.js";import{O as Q}from"./OrganizationContributionGraph-BZyCpVX4.js";import{u as I,b as E,a as K}from"./PaperFeed-kaLm5US2.js";import{A as R,a as G}from"./alert-Cx5luC5D.js";import{S as H}from"./searchable-select-Bqfyxu17.js";import{S as W}from"./skeleton-CXR1qouH.js";import{u as B}from"./usePapers-C1deOZKl.js";import{c as F}from"./catalog-B15Yh5dN.js";import{a as D,p as S}from"./paperQueryKeys-C5FMa4Oj.js";import{i as U}from"./apiErrors-DBfE_SVR.js";import{d as v,t as V}from"./transform-CNg3rvXk.js";import{o as Z,i as J}from"./organizationNames-BVKzYEBp.js";import L from"./NotFound-D8hwuoEl.js";import"./useMutation-f6iDkf3w.js";import"./research-5UpiU-ea.js";import"./plus-Cfz0QbT1.js";/* empty css */import"./PaperPreviewLink-CKfmgBjs.js";import"./index-CoRCN2p0.js";import"./index-BM_xSDJM.js";import"./katex-DkKDou_j.js";import"./hover-card-BY9tUGxy.js";import"./PaperCard-FG-bEpJk.js";import"./AuthorAvatar-CoTET6B3.js";import"./SotaBadges-DiQuEzfo.js";import"./colors-BkWRhvFI.js";import"./Icon-DXQ4sjQk.js";import"./LatexTitle-DI6voLfI.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-D7ygxg37.js";import"./useIntersectionObserver-Dt36kyjs.js";import"./button-B90pJJiy.js";import"./dialog-foxx0Wu6.js";import"./search-wcEXdf1i.js";import"./loader-circle-B0KtDERb.js";import"./useInfiniteQuery-BEbL80ez.js";import"./curation-CkzNFTMJ.js";const X=({organizationSlug:a,taskSlug:n})=>{var f,x,j,_,b;const k=q(),c=I(),{searchParams:$}=c,[w,h]=d.useState(!1),u=y({queryKey:["organization",a],queryFn:()=>F.getOrganization(a),staleTime:10*60*1e3}),l=y({queryKey:["organization-areas-with-tasks",a],queryFn:()=>F.organizationAreasWithTasks(a),staleTime:10*60*1e3}),p=B([...S.feeds.organization,a,n,c.filters],t=>D.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:v(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(V))},[p.data]),e=u.data??((f=l.data)==null?void 0:f.organization),m=e?Z(e):null,A=((j=(x=p.data)==null?void 0:x.pages[0])==null?void 0:j.count)??0;if([u.error,l.error,p.error].some(U))return r.jsx(L,{});if(l.error||p.error)return r.jsx("div",{className:"page",children:r.jsx(R,{variant:"destructive",children:r.jsx(G,{children:"Failed to load organization papers. Please try again."})})});const P=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"}`}))},T=t=>{const o=t==="__all__"?`/orgs/${a}`:`/orgs/${a}/${t}`,s=$.toString();k({pathname:o,search:s?`?${s}`:""})};return r.jsxs("div",{className:"page",children:[r.jsxs("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:[r.jsx(N,{to:"/",children:"Home"}),r.jsx("span",{children:" / "}),r.jsx(N,{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:v(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&&J(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(W,{className:"h-12 w-64"})]}),e&&r.jsx(M,{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(z,{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(Q,{organizationSlug:a,organizationName:(e==null?void 0:e.name)??a})]}),r.jsx(E,{feed:c,style:{alignItems:"center",gap:16},leading:r.jsx("div",{style:{minWidth:260},children:r.jsx(H,{value:n??"__all__",onChange:T,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`},...P(t)]},enabled:!l.isLoading,className:"h-[38px]"})}),children:r.jsxs("div",{className:"results-count",children:[A.toLocaleString()," papers"]})}),r.jsx(K,{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."})]})},Ee=()=>{const{orgSlug:a,taskSlug:n}=C();return a?r.jsx(X,{organizationSlug:a,taskSlug:n}):r.jsx(L,{})};export{Ee as default};
 
1
+ import{c as q,r as d,j as r,L as N,u as C}from"./index-CbgxfyGU.js";import{R as M}from"./ResearchFollowButton-D2BXlDtQ.js";import{u as y}from"./useQuery-Bx9s5-D2.js";import{M as z}from"./MarkdownText-Bj-G_S-B.js";import{O as Q}from"./OrganizationContributionGraph-ah6EPb13.js";import{u as I,b as E,a as K}from"./PaperFeed-DMvUfA47.js";import{A as R,a as G}from"./alert-CFDDvdIM.js";import{S as H}from"./searchable-select-DNdBIahG.js";import{S as W}from"./skeleton-HwvdxvSN.js";import{u as B}from"./usePapers-CJaWLZ3y.js";import{c as F}from"./catalog-DhK7_9-6.js";import{a as D,p as S}from"./paperQueryKeys-B8u1BWlI.js";import{i as U}from"./apiErrors-BZ5h1Kmb.js";import{d as v,t as V}from"./transform-0Udg2p6b.js";import{o as Z,i as J}from"./organizationNames-BVKzYEBp.js";import L from"./NotFound-DtzwOULp.js";import"./useMutation-P_trTy9i.js";import"./research-DgpyzSy_.js";import"./plus-UK0TEjgd.js";/* empty css */import"./PaperPreviewLink-DZDNIh1g.js";import"./index-ZkEATkOr.js";import"./index-BH3yOoza.js";import"./katex-DkKDou_j.js";import"./hover-card-ufez2uMo.js";import"./PaperCard-tdTC_dRN.js";import"./AuthorAvatar-CUJMmp_z.js";import"./SotaBadges-C-sTR-EF.js";import"./colors-BkWRhvFI.js";import"./Icon-D-kA0Owz.js";import"./LatexTitle-Z-HGmZ-H.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-DKJYnYjk.js";import"./useIntersectionObserver-CID9Kkak.js";import"./button-Bv9oZ-QU.js";import"./dialog-Cfp_d3CC.js";import"./search-CLtAJGOp.js";import"./loader-circle-CWMja8Zn.js";import"./useInfiniteQuery-BAc_4HO5.js";import"./curation-C7Gmmp4z.js";const X=({organizationSlug:a,taskSlug:n})=>{var f,x,j,_,b;const k=q(),c=I(),{searchParams:$}=c,[w,h]=d.useState(!1),u=y({queryKey:["organization",a],queryFn:()=>F.getOrganization(a),staleTime:10*60*1e3}),l=y({queryKey:["organization-areas-with-tasks",a],queryFn:()=>F.organizationAreasWithTasks(a),staleTime:10*60*1e3}),p=B([...S.feeds.organization,a,n,c.filters],t=>D.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:v(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(V))},[p.data]),e=u.data??((f=l.data)==null?void 0:f.organization),m=e?Z(e):null,A=((j=(x=p.data)==null?void 0:x.pages[0])==null?void 0:j.count)??0;if([u.error,l.error,p.error].some(U))return r.jsx(L,{});if(l.error||p.error)return r.jsx("div",{className:"page",children:r.jsx(R,{variant:"destructive",children:r.jsx(G,{children:"Failed to load organization papers. Please try again."})})});const P=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"}`}))},T=t=>{const o=t==="__all__"?`/orgs/${a}`:`/orgs/${a}/${t}`,s=$.toString();k({pathname:o,search:s?`?${s}`:""})};return r.jsxs("div",{className:"page",children:[r.jsxs("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:[r.jsx(N,{to:"/",children:"Home"}),r.jsx("span",{children:" / "}),r.jsx(N,{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:v(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&&J(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(W,{className:"h-12 w-64"})]}),e&&r.jsx(M,{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(z,{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(Q,{organizationSlug:a,organizationName:(e==null?void 0:e.name)??a})]}),r.jsx(E,{feed:c,style:{alignItems:"center",gap:16},leading:r.jsx("div",{style:{minWidth:260},children:r.jsx(H,{value:n??"__all__",onChange:T,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`},...P(t)]},enabled:!l.isLoading,className:"h-[38px]"})}),children:r.jsxs("div",{className:"results-count",children:[A.toLocaleString()," papers"]})}),r.jsx(K,{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."})]})},Ee=()=>{const{orgSlug:a,taskSlug:n}=C();return a?r.jsx(X,{organizationSlug:a,taskSlug:n}):r.jsx(L,{})};export{Ee as default};
assets/{OrganizationsIndexView-CbWS3zNq.js → OrganizationsIndexView-Bd4D8teF.js} RENAMED
@@ -1 +1 @@
1
- import{e as g,r as h,j as e,L as x}from"./index-YwiKC6Po.js";import{u}from"./useQuery-DPH6Mb2w.js";import{A as j,a as y}from"./alert-Cx5luC5D.js";import{c as N}from"./catalog-B15Yh5dN.js";const f=n=>n==="papers"||n==="name"?n:"trending",_=({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)})})},S=()=>{const[n,d]=g(),i=f(n.get("sort")),c=n.get("q")??"",o=u({queryKey:["organizations","featured"],queryFn:()=>N.organizationIndex(),staleTime:10*60*1e3}),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)},m=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(j,{variant:"destructive",children:e.jsxs(y,{children:["Failed to load organizations."," ",e.jsx("button",{type:"button",onClick:()=>o.refetch(),children:"Try again"})]})}):m.length===0?e.jsxs("div",{className:"organizations-empty",children:["No organizations match “",c,"”."]}):e.jsx("div",{className:"organizations-grid",children:m.map(s=>{var r;const a=s.paper_count??0,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(x,{to:`/orgs/${s.slug}`,className:"organization-card","aria-label":a?`Browse ${a.toLocaleString()} ${s.name} papers`:`Browse ${s.name} papers`,children:[e.jsxs("div",{className:"organization-card-header",children:[e.jsx(_,{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{S as default};
 
1
+ import{e as g,r as h,j as e,L as x}from"./index-CbgxfyGU.js";import{u}from"./useQuery-Bx9s5-D2.js";import{A as j,a as y}from"./alert-CFDDvdIM.js";import{c as N}from"./catalog-DhK7_9-6.js";const f=n=>n==="papers"||n==="name"?n:"trending",_=({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)})})},S=()=>{const[n,d]=g(),i=f(n.get("sort")),c=n.get("q")??"",o=u({queryKey:["organizations","featured"],queryFn:()=>N.organizationIndex(),staleTime:10*60*1e3}),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)},m=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(j,{variant:"destructive",children:e.jsxs(y,{children:["Failed to load organizations."," ",e.jsx("button",{type:"button",onClick:()=>o.refetch(),children:"Try again"})]})}):m.length===0?e.jsxs("div",{className:"organizations-empty",children:["No organizations match “",c,"”."]}):e.jsx("div",{className:"organizations-grid",children:m.map(s=>{var r;const a=s.paper_count??0,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(x,{to:`/orgs/${s.slug}`,className:"organization-card","aria-label":a?`Browse ${a.toLocaleString()} ${s.name} papers`:`Browse ${s.name} papers`,children:[e.jsxs("div",{className:"organization-card-header",children:[e.jsx(_,{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{S as default};
assets/{PaperCard-FG-bEpJk.js → PaperCard-tdTC_dRN.js} RENAMED
@@ -1 +1 @@
1
- import{f as v,K as g,j as a,L as d}from"./index-YwiKC6Po.js";import{A as M}from"./AuthorAvatar-CoTET6B3.js";import{P as y,S as L,T as Z,M as A}from"./SotaBadges-DiQuEzfo.js";import{I as k}from"./Icon-DXQ4sjQk.js";import{L as P,a as w}from"./LatexTitle-DI6voLfI.js";import{a as C,p as E}from"./paperQueryKeys-C5FMa4Oj.js";import{s as h}from"./safeExternalHref-CkBrsh84.js";const U=({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 $(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 K=({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)})})},O=({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:E.detail(s.id),queryFn:()=>C.get(s.id,!0),staleTime:10*60*1e3})},[s.id,m]),N=s.authors.slice(0,3).map((e,o)=>{var b,F;const f=(b=s.authorIds)==null?void 0:b[o],j=(F=s.authorHfProfiles)==null?void 0:F[o];return a.jsxs(g.Fragment,{children:[o>0&&", ",j&&a.jsx(M,{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(y,{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 ",$(i)]}),a.jsxs("h3",{className:"paper-title",children:[a.jsx(d,{to:u,onFocus:n,onMouseEnter:n,children:a.jsx(P,{title:s.title,highlight:r})}),l&&s.organizations.length>0&&a.jsx("span",{className:"paper-organization-logos",children:s.organizations.map(e=>a.jsx(K,{...e},e.slug))})]}),a.jsxs("div",{className:"paper-authors",children:[N,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(L,{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(Z,{slug:e},e)),x.map(e=>a.jsx(A,{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(k,{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(U,{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{O as P};
 
1
+ import{f as v,M as g,j as a,L as d}from"./index-CbgxfyGU.js";import{A as M}from"./AuthorAvatar-CUJMmp_z.js";import{P as y,S as L,T as Z,M as A}from"./SotaBadges-C-sTR-EF.js";import{I as k}from"./Icon-D-kA0Owz.js";import{L as P,a as w}from"./LatexTitle-Z-HGmZ-H.js";import{a as C,p as E}from"./paperQueryKeys-B8u1BWlI.js";import{s as h}from"./safeExternalHref-CkBrsh84.js";const U=({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 $(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 K=({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)})})},O=({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:E.detail(s.id),queryFn:()=>C.get(s.id,!0),staleTime:10*60*1e3})},[s.id,m]),N=s.authors.slice(0,3).map((e,o)=>{var b,F;const f=(b=s.authorIds)==null?void 0:b[o],j=(F=s.authorHfProfiles)==null?void 0:F[o];return a.jsxs(g.Fragment,{children:[o>0&&", ",j&&a.jsx(M,{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(y,{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 ",$(i)]}),a.jsxs("h3",{className:"paper-title",children:[a.jsx(d,{to:u,onFocus:n,onMouseEnter:n,children:a.jsx(P,{title:s.title,highlight:r})}),l&&s.organizations.length>0&&a.jsx("span",{className:"paper-organization-logos",children:s.organizations.map(e=>a.jsx(K,{...e},e.slug))})]}),a.jsxs("div",{className:"paper-authors",children:[N,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(L,{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(Z,{slug:e},e)),x.map(e=>a.jsx(A,{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(k,{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(U,{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{O as P};
assets/PaperDetailView-F3D4F2PU.js ADDED
The diff for this file is too large to render. See raw diff
 
assets/PaperDetailView-uLa9aL0s.js DELETED
The diff for this file is too large to render. See raw diff
 
assets/{PaperFeed-kaLm5US2.js → PaperFeed-DMvUfA47.js} RENAMED
@@ -1 +1 @@
1
- import{r as u,j as t,e as q,K as J}from"./index-YwiKC6Po.js";import{P as X}from"./PaperCard-FG-bEpJk.js";import{P as ee,a as te,b as ae}from"./popover-D7ygxg37.js";import{I as se}from"./Icon-DXQ4sjQk.js";import{S as j}from"./skeleton-CXR1qouH.js";import{u as ne}from"./useIntersectionObserver-Dt36kyjs.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.iso<n),f=c.outsideMonth||c.iso>a;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)),K=()=>{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<r?p(h):g(h)},Q=()=>{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?K():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]=q(),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(J.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{he as P,we as a,ve as b,me as c,Ne as r,Ue as u,Se as w};
 
1
+ import{r as u,j as t,e as J,M as K}from"./index-CbgxfyGU.js";import{P as X}from"./PaperCard-tdTC_dRN.js";import{P as ee,a as te,b as ae}from"./popover-DKJYnYjk.js";import{I as se}from"./Icon-D-kA0Owz.js";import{S as j}from"./skeleton-HwvdxvSN.js";import{u as ne}from"./useIntersectionObserver-CID9Kkak.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.iso<n),f=c.outsideMonth||c.iso>a;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<r?p(h):g(h)},q=()=>{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{he as P,we as a,ve as b,me as c,Ne as r,Ue as u,Se as w};
assets/{PaperPreviewLink-CKfmgBjs.js → PaperPreviewLink-DZDNIh1g.js} RENAMED
@@ -1,7 +1,7 @@
1
- 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-CoRCN2p0.js";import{l as fe}from"./index-BM_xSDJM.js";import R from"./katex-DkKDou_j.js";import{j as p,K as A,Y as de,o as C,d as xe,f as ge,L as T,J as ye}from"./index-YwiKC6Po.js";import{u as we}from"./useQuery-DPH6Mb2w.js";import{H as be,a as Ne,b as ve}from"./hover-card-BY9tUGxy.js";import{a as I,p as ke}from"./paperQueryKeys-C5FMa4Oj.js";import{u as Fe}from"./useMutation-f6iDkf3w.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:`
2
  `,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:`
3
  `,before:d,encode:["$"],...m.current()})),x()}return d+=m.move(`
4
  `),c&&(d+=m.move(c+`
5
- `)),d+=m.move(f),g(),d}function n(s,o,l){let a=s.value||"",c=1;for(t||c++;new RegExp("(^|[^$])"+"\\$".repeat(c)+"([^$]|$)").test(a);)c++;const m="$".repeat(c);/[^ \r\n]/.test(a)&&(/^[ \r\n]/.test(a)&&/[ \r\n]$/.test(a)||/^\$|\$$/.test(a))&&(a=" "+a+" ");let f=-1;for(;++f<l.unsafe.length;){const g=l.unsafe[f];if(!g.atBreak)continue;const d=l.compilePattern(g);let x;for(;x=d.exec(a);){let h=x.index;a.codePointAt(h)===10&&a.codePointAt(h-1)===13&&h--,a=a.slice(0,h)+" "+a.slice(x.index+1)}}return m+a+m}function i(){return"$"}}const Te={tokenize:Me,concrete:!0,name:"mathFlow"},B={tokenize:Ee,partial:!0};function Me(e,t,r){const n=this,i=n.events[n.events.length-1],s=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0;let o=0;return l;function l(u){return e.enter("mathFlow"),e.enter("mathFlowFence"),e.enter("mathFlowFenceSequence"),a(u)}function a(u){return u===36?(e.consume(u),o++,a):o<2?r(u):(e.exit("mathFlowFenceSequence"),j(e,c,"whitespace")(u))}function c(u){return u===null||b(u)?f(u):(e.enter("mathFlowFenceMeta"),e.enter("chunkString",{contentType:"string"}),m(u))}function m(u){return u===null||b(u)?(e.exit("chunkString"),e.exit("mathFlowFenceMeta"),f(u)):u===36?r(u):(e.consume(u),m)}function f(u){return e.exit("mathFlowFence"),n.interrupt?t(u):e.attempt(B,g,y)(u)}function g(u){return e.attempt({tokenize:v,partial:!0},y,d)(u)}function d(u){return(s?j(e,x,"linePrefix",s+1):x)(u)}function x(u){return u===null?y(u):b(u)?e.attempt(B,g,y)(u):(e.enter("mathFlowValue"),h(u))}function h(u){return u===null||b(u)?(e.exit("mathFlowValue"),x(u)):(e.consume(u),h)}function y(u){return e.exit("mathFlow"),t(u)}function v(u,k,q){let $=0;return j(u,se,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4);function se(w){return u.enter("mathFlowFence"),u.enter("mathFlowFenceSequence"),L(w)}function L(w){return w===36?($++,u.consume(w),L):$<o?q(w):(u.exit("mathFlowFenceSequence"),j(u,oe,"whitespace")(w))}function oe(w){return w===null||b(w)?(u.exit("mathFlowFence"),k(w)):q(w)}}}function Ee(e,t,r){const n=this;return i;function i(o){return o===null?t(o):(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),s)}function s(o){return n.parser.lazy[n.now().line]?r(o):t(o)}}function Ae(e){let r=(e||{}).singleDollarTextMath;return r==null&&(r=!0),{tokenize:n,resolve:Se,previous:Pe,name:"mathText"};function n(i,s,o){let l=0,a,c;return m;function m(h){return i.enter("mathText"),i.enter("mathTextSequence"),f(h)}function f(h){return h===36?(i.consume(h),l++,f):l<2&&!r?o(h):(i.exit("mathTextSequence"),g(h))}function g(h){return h===null?o(h):h===36?(c=i.enter("mathTextSequence"),a=0,x(h)):h===32?(i.enter("space"),i.consume(h),i.exit("space"),g):b(h)?(i.enter("lineEnding"),i.consume(h),i.exit("lineEnding"),g):(i.enter("mathTextData"),d(h))}function d(h){return h===null||h===32||h===36||b(h)?(i.exit("mathTextData"),g(h)):(i.consume(h),d)}function x(h){return h===36?(i.consume(h),a++,x):a===l?(i.exit("mathTextSequence"),i.exit("mathText"),s(h)):(c.type="mathTextData",d(h))}}}function Se(e){let t=e.length-4,r=3,n,i;if((e[r][1].type==="lineEnding"||e[r][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(n=r;++n<t;)if(e[n][1].type==="mathTextData"){e[t][1].type="mathTextPadding",e[r][1].type="mathTextPadding",r+=2,t-=2;break}}for(n=r-1,t++;++n<=t;)i===void 0?n!==t&&e[n][1].type!=="lineEnding"&&(i=n):(n===t||e[n][1].type==="lineEnding")&&(e[i][1].type="mathTextData",n!==i+2&&(e[i][1].end=e[n-1][1].end,e.splice(i+2,n-i-2),t-=n-i-2,n=i+2),i=void 0);return e}function Pe(e){return e!==36||this.events[this.events.length-1][1].type==="characterEscape"}function Ie(e){return{flow:{36:Te},text:{36:Ae(e)}}}const _e={};function Et(e){const t=this,r=e||_e,n=t.data(),i=n.micromarkExtensions||(n.micromarkExtensions=[]),s=n.fromMarkdownExtensions||(n.fromMarkdownExtensions=[]),o=n.toMarkdownExtensions||(n.toMarkdownExtensions=[]);i.push(Ie(r)),s.push(je()),o.push(Ce(r))}const U=/[#.]/g;function qe(e,t){const r=e||"",n={};let i=0,s,o;for(;i<r.length;){U.lastIndex=i;const l=U.exec(r),a=r.slice(i,l?l.index:r.length);a&&(s?s==="#"?n.id=a:Array.isArray(n.className)?n.className.push(a):n.className=[a]:o=a,i+=a.length),l&&(s=l[0],i++)}return{type:"element",tagName:o||t||"div",properties:n,children:[]}}function Z(e,t,r){const n=r?ze(r):void 0;function i(s,o,...l){let a;if(s==null){a={type:"root",children:[]};const c=o;l.unshift(c)}else{a=qe(s,t);const c=a.tagName.toLowerCase(),m=n?n.get(c):void 0;if(a.tagName=m||c,$e(o))l.unshift(o);else for(const[f,g]of Object.entries(o))Le(e,a.properties,f,g)}for(const c of l)S(a.children,c);return a.type==="element"&&a.tagName==="template"&&(a.content={type:"root",children:a.children},a.children=[]),a}return i}function $e(e){if(e===null||typeof e!="object"||Array.isArray(e))return!0;if(typeof e.type!="string")return!1;const t=e,r=Object.keys(e);for(const n of r){const i=t[n];if(i&&typeof i=="object"){if(!Array.isArray(i))return!0;const s=i;for(const o of s)if(typeof o!="number"&&typeof o!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function Le(e,t,r,n){const i=le(e,r);let s;if(n!=null){if(typeof n=="number"){if(Number.isNaN(n))return;s=n}else typeof n=="boolean"?s=n:typeof n=="string"?i.spaceSeparated?s=O(n):i.commaSeparated?s=z(n):i.commaOrSpaceSeparated?s=O(z(n).join(" ")):s=K(i,i.property,n):Array.isArray(n)?s=[...n]:s=i.property==="style"?Oe(n):String(n);if(Array.isArray(s)){const o=[];for(const l of s)o.push(K(i,i.property,l));s=o}i.property==="className"&&Array.isArray(t.className)&&(s=t.className.concat(s)),t[i.property]=s}}function S(e,t){if(t!=null)if(typeof t=="number"||typeof t=="string")e.push({type:"text",value:String(t)});else if(Array.isArray(t))for(const r of t)S(e,r);else if(typeof t=="object"&&"type"in t)t.type==="root"?S(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function K(e,t,r){if(typeof r=="string"){if(e.number&&r&&!Number.isNaN(Number(r)))return Number(r);if((e.boolean||e.overloadedBoolean)&&(r===""||D(r)===D(t)))return!0}return r}function Oe(e){const t=[];for(const[r,n]of Object.entries(e))t.push([r,n].join(": "));return t.join("; ")}function ze(e){const t=new Map;for(const r of e)t.set(r.toLowerCase(),r);return t}const De=["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","solidColor","textArea","textPath"],Re=Z(ce,"div"),Be=Z(ue,"g",De),E={html:"http://www.w3.org/1999/xhtml",svg:"http://www.w3.org/2000/svg"};function Ue(e,t){return ee(e,{})||{type:"root",children:[]}}function ee(e,t){const r=Ke(e,t);return r&&t.afterTransform&&t.afterTransform(e,r),r}function Ke(e,t){switch(e.nodeType){case 1:return Qe(e,t);case 3:return Ve(e);case 8:return Ge(e);case 9:return H(e,t);case 10:return He();case 11:return H(e,t);default:return}}function H(e,t){return{type:"root",children:te(e,t)}}function He(){return{type:"doctype"}}function Ve(e){return{type:"text",value:e.nodeValue||""}}function Ge(e){return{type:"comment",value:e.nodeValue||""}}function Qe(e,t){const r=e.namespaceURI,n=r===E.svg?Be:Re,i=r===E.html?e.tagName.toLowerCase():e.tagName,s=r===E.html&&i==="template"?e.content:e,o=e.getAttributeNames(),l={};let a=-1;for(;++a<o.length;)l[o[a]]=e.getAttribute(o[a])||"";return n(i,l,te(s,t))}function te(e,t){const r=e.childNodes,n=[];let i=-1;for(;++i<r.length;){const s=ee(r[i],t);s!==void 0&&n.push(s)}return n}new DOMParser;function Xe(e,t){const r=We(e);return Ue(r)}function We(e){const t=document.createElement("template");return t.innerHTML=e,t.content}const V=function(e,t,r){const n=he(r);if(!e||!e.type||!e.children)throw new Error("Expected parent node");if(typeof t=="number"){if(t<0||t===Number.POSITIVE_INFINITY)throw new Error("Expected positive finite number as index")}else if(t=e.children.indexOf(t),t<0)throw new Error("Expected child node or index");for(;++t<e.children.length;)if(n(e.children[t],t,e))return e.children[t]},N=function(e){if(e==null)return Ze;if(typeof e=="string")return Je(e);if(typeof e=="object")return Ye(e);if(typeof e=="function")return _(e);throw new Error("Expected function, string, or array as `test`")};function Ye(e){const t=[];let r=-1;for(;++r<e.length;)t[r]=N(e[r]);return _(n);function n(...i){let s=-1;for(;++s<t.length;)if(t[s].apply(this,i))return!0;return!1}}function Je(e){return _(t);function t(r){return r.tagName===e}}function _(e){return t;function t(r,n,i){return!!(et(r)&&e.call(this,r,typeof n=="number"?n:void 0,i||void 0))}}function Ze(e){return!!(e&&typeof e=="object"&&"type"in e&&e.type==="element"&&"tagName"in e&&typeof e.tagName=="string")}function et(e){return e!==null&&typeof e=="object"&&"type"in e&&"tagName"in e}const G=/\n/g,Q=/[\t ]+/g,P=N("br"),X=N(lt),tt=N("p"),W=N("tr"),nt=N(["datalist","head","noembed","noframes","noscript","rp","script","style","template","title",ot,ct]),ne=N(["address","article","aside","blockquote","body","caption","center","dd","dialog","dir","dl","dt","div","figure","figcaption","footer","form,","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","legend","li","listing","main","menu","nav","ol","p","plaintext","pre","section","ul","xmp"]);function rt(e,t){const r=t||{},n="children"in e?e.children:[],i=ne(e),s=ae(e,{whitespace:r.whitespace||"normal"}),o=[];(e.type==="text"||e.type==="comment")&&o.push(...ie(e,{breakBefore:!0,breakAfter:!0}));let l=-1;for(;++l<n.length;)o.push(...re(n[l],e,{whitespace:s,breakBefore:l?void 0:i,breakAfter:l<n.length-1?P(n[l+1]):i}));const a=[];let c;for(l=-1;++l<o.length;){const m=o[l];typeof m=="number"?c!==void 0&&m>c&&(c=m):m&&(c!==void 0&&c>-1&&a.push(`
6
  `.repeat(c)||" "),c=-1,a.push(m))}return a.join("")}function re(e,t,r){return e.type==="element"?it(e,t,r):e.type==="text"?r.whitespace==="normal"?ie(e,r):at(e):[]}function it(e,t,r){const n=ae(e,r),i=e.children||[];let s=-1,o=[];if(nt(e))return o;let l,a;for(P(e)||W(e)&&V(t,e,W)?a=`
7
- `:tt(e)?(l=2,a=2):ne(e)&&(l=1,a=1);++s<i.length;)o=o.concat(re(i[s],e,{whitespace:n,breakBefore:s?void 0:l,breakAfter:s<i.length-1?P(i[s+1]):a}));return X(e)&&V(t,e,X)&&o.push(" "),l&&o.unshift(l),a&&o.push(a),o}function ie(e,t){const r=String(e.value),n=[],i=[];let s=0;for(;s<=r.length;){G.lastIndex=s;const a=G.exec(r),c=a&&"index"in a?a.index:r.length;n.push(st(r.slice(s,c).replace(/[\u061C\u200E\u200F\u202A-\u202E\u2066-\u2069]/g,""),s===0?t.breakBefore:!0,c===r.length?t.breakAfter:!0)),s=c+1}let o=-1,l;for(;++o<n.length;)n[o].charCodeAt(n[o].length-1)===8203||o<n.length-1&&n[o+1].charCodeAt(0)===8203?(i.push(n[o]),l=void 0):n[o]?(typeof l=="number"&&i.push(l),i.push(n[o]),l=0):(o===0||o===n.length-1)&&i.push(0);return i}function at(e){return[String(e.value)]}function st(e,t,r){const n=[];let i=0,s;for(;i<e.length;){Q.lastIndex=i;const o=Q.exec(e);s=o?o.index:e.length,!i&&!s&&o&&!t&&n.push(""),i!==s&&n.push(e.slice(i,s)),i=o?s+o[0].length:s}return i!==s&&!r&&n.push(""),n.join(" ")}function ae(e,t){if(e.type==="element"){const r=e.properties||{};switch(e.tagName){case"listing":case"plaintext":case"xmp":return"pre";case"nobr":return"nowrap";case"pre":return r.wrap?"pre-wrap":"pre";case"td":case"th":return r.noWrap?"nowrap":t.whitespace;case"textarea":return"pre-wrap"}}return t.whitespace}function ot(e){return!!(e.properties||{}).hidden}function lt(e){return e.tagName==="td"||e.tagName==="th"}function ct(e){return e.tagName==="dialog"&&!(e.properties||{}).open}const ut={},ht=[];function At(e){const t=e||ut;return function(r,n){pe(r,"element",function(i,s){const o=Array.isArray(i.properties.className)?i.properties.className:ht,l=o.includes("language-math"),a=o.includes("math-display"),c=o.includes("math-inline");let m=a;if(!l&&!a&&!c)return;let f=s[s.length-1],g=i;if(i.tagName==="code"&&l&&f&&f.type==="element"&&f.tagName==="pre"&&(g=f,f=s[s.length-2],m=!0),!f)return;const d=rt(g,{whitespace:"pre"});let x;try{x=R.renderToString(d,{...t,displayMode:m,throwOnError:!0})}catch(y){const v=y,u=v.name.toLowerCase();n.message("Could not render math with KaTeX",{ancestors:[...s,i],cause:v,place:i.position,ruleId:u,source:"rehype-katex"});try{x=R.renderToString(d,{...t,displayMode:m,strict:"ignore",throwOnError:!1})}catch{x=[{type:"element",tagName:"span",properties:{className:["katex-error"],style:"color:"+(t.errorColor||"#cc0000"),title:String(y)},children:[{type:"text",value:d}]}]}}typeof x=="string"&&(x=Xe(x).children);const h=f.children.indexOf(g);return f.children.splice(h,1,...x),me})}}function pt(e,t=e.arxiv_id??e.id){return{routeId:t,title:e.title,arxivId:e.arxiv_id,source:e.source??(e.arxiv_id?"arxiv":"external"),sourceUrl:e.source_url??e.url_abs,thumbnailUrl:e.thumbnail_url??null,authors:e.authors,published:e.published??null,conference:e.conference_name??e.conference??null,citationCount:e.citation_count,tasks:(e.tasks??[]).map(r=>({name:r.name,slug:r.slug??""}))}}function mt(e){if(!e.authors.length)return"";const t=e.authors.slice(0,3).join(", ");return e.authors.length>3?`${t}, et al.`:t}function ft(e){var r;if(e.conference)return e.conference;const t=(r=e.published)==null?void 0:r.slice(0,4);if(e.arxivId)return t?`arXiv ${t}`:"arXiv";if(e.sourceUrl)try{return new URL(e.sourceUrl).hostname.replace(/^www\./,"")}catch{}return t??"external"}const dt=({seed:e=0})=>p.jsxs("div",{className:"paper-preview-thumb","aria-hidden":"true","data-testid":"faux-paper-thumb",children:[p.jsxs("div",{className:"paper-preview-thumb-title",children:[p.jsx("span",{}),p.jsx("span",{})]}),p.jsx("div",{className:"paper-preview-thumb-auth"}),p.jsxs("div",{className:"paper-preview-thumb-cols",children:[p.jsx("div",{className:"paper-preview-thumb-col"}),p.jsx("div",{className:"paper-preview-thumb-col"})]}),p.jsx("div",{className:"paper-preview-thumb-fig",style:{top:62+e%3*8}})]}),xt=({thumbnailUrl:e,seed:t})=>{const[r,n]=A.useState(!1),i=de(e);return A.useEffect(()=>n(!1),[i]),!i||r?p.jsx(dt,{seed:t}):p.jsx("div",{className:"paper-preview-thumb paper-preview-thumb-real",children:p.jsx("img",{"data-testid":"paper-preview-image",src:i,alt:"",loading:"lazy",decoding:"async",onError:()=>n(!0)})})},Y=({data:e})=>{const t=e.routeId.split("").reduce((n,i)=>n+i.charCodeAt(0),0),r=mt(e);return p.jsxs("div",{className:"paper-preview-inner",children:[p.jsx(xt,{thumbnailUrl:e.thumbnailUrl,seed:t}),p.jsxs("div",{className:"paper-preview-meta",children:[p.jsx("div",{className:"paper-preview-title",children:e.title}),r&&p.jsx("div",{className:"paper-preview-auth",children:r}),p.jsxs("div",{className:"paper-preview-venue",children:[ft(e),e.arxivId&&p.jsxs(p.Fragment,{children:[" · arXiv:",e.arxivId]}),e.citationCount!=null&&p.jsxs(p.Fragment,{children:[" · ↑ ",e.citationCount.toLocaleString()]})]}),e.tasks.length>0&&p.jsx("div",{className:"paper-preview-tags",children:e.tasks.map(n=>p.jsx("span",{className:"paper-preview-tag",children:n.name},n.slug||n.name))})]})]})},M=e=>ke.preview(C(e)),gt=e=>e.arxiv_id??e.id,J=200;function St(e,t=I){const r=new Set,n=async s=>{const o=new Map;for(const l of s)l.arxiv_id&&r.add(C(l.arxiv_id));for(let l=0;l<s.length;l+=J){const{references:a}=await t.lookup(s.slice(l,l+J));for(const c of a){if(!c.paper)continue;const m=gt(c.paper);e.setQueryData(M(m),c.paper),o.set(c.key,m)}}return o};return{lookup:n,warm:s=>{const o=s.filter(l=>{const a=C(l);return r.has(a)||e.getQueryData(M(a))?!1:(r.add(a),!0)});o.length&&n(o.map(l=>({key:l,arxiv_id:l}))).catch(()=>{})}}}const yt=/^(\d{4}\.\d{4,5}|[a-z-]+(\.[A-Z]{2})?\/\d{7})$/i,wt=({arxivId:e})=>{var i;const t=xe(),r=ge(),n=Fe({mutationFn:()=>I.submit({arxiv_id:e}),onSuccess:s=>{s.pending_review||r.invalidateQueries({queryKey:M(e)})}});return(i=n.data)!=null&&i.pending_review?p.jsxs("div",{className:"paper-preview-status paper-preview-index-request",children:[p.jsx("span",{children:"Indexing request queued for review."}),p.jsx(T,{to:"/submissions",target:"_blank",rel:"noopener noreferrer",children:"View submissions ↗"})]}):p.jsxs("div",{className:"paper-preview-status paper-preview-index-request",children:[p.jsx("span",{children:"Not indexed on Papers with Code yet."}),t!=null&&t.user?p.jsx("button",{type:"button",disabled:n.isPending,onClick:()=>n.mutate(),children:n.isPending?"Requesting…":"Request indexing"}):p.jsx(T,{to:`/submit?arxiv_id=${encodeURIComponent(e)}`,target:"_blank",rel:"noopener noreferrer",children:"Request indexing ↗"}),n.isError&&p.jsx("span",{role:"alert",children:n.error.message})]})},bt=()=>typeof window.matchMedia=="function"&&window.matchMedia("(hover: none), (pointer: coarse)").matches,Pt=({routeId:e,to:t,initialData:r,className:n,children:i,target:s,title:o,ariaLabel:l,onClick:a,previewFooter:c,cardOpensPaper:m=!1})=>{const f=C(e),[g,d]=A.useState(!1),x=!!(r!=null&&r.title.trim()),h=we({queryKey:M(f),queryFn:()=>I.get(f,!1),enabled:g&&!x,staleTime:5*60*1e3,gcTime:30*60*1e3,retry:!1}),y=r??(h.data?pt(h.data,f):void 0),v=h.error instanceof ye&&h.error.status===404&&yt.test(f),u=p.jsx(T,{className:n,to:t??`/paper/${f}`,target:s,title:o,"aria-label":l,onClick:k=>{d(!1),a==null||a(k)},rel:s==="_blank"?"noopener noreferrer":void 0,children:i});return p.jsxs(be,{open:g,onOpenChange:k=>{(!k||!bt())&&d(k)},openDelay:150,closeDelay:100,children:[p.jsx(Ne,{asChild:!0,children:u}),p.jsx(ve,{className:"paper-preview-pop",side:"bottom",align:"start",collisionPadding:12,children:y?p.jsxs(p.Fragment,{children:[m?p.jsx(T,{className:"paper-preview-card-link",to:`/paper/${encodeURIComponent(f)}`,target:"_blank",rel:"noopener noreferrer",onClick:()=>d(!1),children:p.jsx(Y,{data:y})}):p.jsx(Y,{data:y}),c==null?void 0:c(y)]}):v?p.jsx(wt,{arxivId:f}):h.isError?p.jsx("div",{className:"paper-preview-status",children:"Preview unavailable"}):p.jsx("div",{className:"paper-preview-status","aria-live":"polite",children:"Loading preview…"})})]})};export{Pt as P,Et as a,St as c,At as r};
 
1
+ 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-ZkEATkOr.js";import{l as fe}from"./index-BH3yOoza.js";import R from"./katex-DkKDou_j.js";import{j as p,M as A,Z as de,o as C,d as xe,f as ge,L as T,K as ye}from"./index-CbgxfyGU.js";import{u as we}from"./useQuery-Bx9s5-D2.js";import{H as be,a as Ne,b as ve}from"./hover-card-ufez2uMo.js";import{a as I,p as ke}from"./paperQueryKeys-B8u1BWlI.js";import{u as Fe}from"./useMutation-P_trTy9i.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:`
2
  `,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:`
3
  `,before:d,encode:["$"],...m.current()})),x()}return d+=m.move(`
4
  `),c&&(d+=m.move(c+`
5
+ `)),d+=m.move(f),g(),d}function n(s,o,l){let a=s.value||"",c=1;for(t||c++;new RegExp("(^|[^$])"+"\\$".repeat(c)+"([^$]|$)").test(a);)c++;const m="$".repeat(c);/[^ \r\n]/.test(a)&&(/^[ \r\n]/.test(a)&&/[ \r\n]$/.test(a)||/^\$|\$$/.test(a))&&(a=" "+a+" ");let f=-1;for(;++f<l.unsafe.length;){const g=l.unsafe[f];if(!g.atBreak)continue;const d=l.compilePattern(g);let x;for(;x=d.exec(a);){let h=x.index;a.codePointAt(h)===10&&a.codePointAt(h-1)===13&&h--,a=a.slice(0,h)+" "+a.slice(x.index+1)}}return m+a+m}function i(){return"$"}}const Te={tokenize:Me,concrete:!0,name:"mathFlow"},B={tokenize:Ee,partial:!0};function Me(e,t,r){const n=this,i=n.events[n.events.length-1],s=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0;let o=0;return l;function l(u){return e.enter("mathFlow"),e.enter("mathFlowFence"),e.enter("mathFlowFenceSequence"),a(u)}function a(u){return u===36?(e.consume(u),o++,a):o<2?r(u):(e.exit("mathFlowFenceSequence"),j(e,c,"whitespace")(u))}function c(u){return u===null||b(u)?f(u):(e.enter("mathFlowFenceMeta"),e.enter("chunkString",{contentType:"string"}),m(u))}function m(u){return u===null||b(u)?(e.exit("chunkString"),e.exit("mathFlowFenceMeta"),f(u)):u===36?r(u):(e.consume(u),m)}function f(u){return e.exit("mathFlowFence"),n.interrupt?t(u):e.attempt(B,g,y)(u)}function g(u){return e.attempt({tokenize:v,partial:!0},y,d)(u)}function d(u){return(s?j(e,x,"linePrefix",s+1):x)(u)}function x(u){return u===null?y(u):b(u)?e.attempt(B,g,y)(u):(e.enter("mathFlowValue"),h(u))}function h(u){return u===null||b(u)?(e.exit("mathFlowValue"),x(u)):(e.consume(u),h)}function y(u){return e.exit("mathFlow"),t(u)}function v(u,k,q){let $=0;return j(u,se,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4);function se(w){return u.enter("mathFlowFence"),u.enter("mathFlowFenceSequence"),L(w)}function L(w){return w===36?($++,u.consume(w),L):$<o?q(w):(u.exit("mathFlowFenceSequence"),j(u,oe,"whitespace")(w))}function oe(w){return w===null||b(w)?(u.exit("mathFlowFence"),k(w)):q(w)}}}function Ee(e,t,r){const n=this;return i;function i(o){return o===null?t(o):(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),s)}function s(o){return n.parser.lazy[n.now().line]?r(o):t(o)}}function Ae(e){let r=(e||{}).singleDollarTextMath;return r==null&&(r=!0),{tokenize:n,resolve:Se,previous:Pe,name:"mathText"};function n(i,s,o){let l=0,a,c;return m;function m(h){return i.enter("mathText"),i.enter("mathTextSequence"),f(h)}function f(h){return h===36?(i.consume(h),l++,f):l<2&&!r?o(h):(i.exit("mathTextSequence"),g(h))}function g(h){return h===null?o(h):h===36?(c=i.enter("mathTextSequence"),a=0,x(h)):h===32?(i.enter("space"),i.consume(h),i.exit("space"),g):b(h)?(i.enter("lineEnding"),i.consume(h),i.exit("lineEnding"),g):(i.enter("mathTextData"),d(h))}function d(h){return h===null||h===32||h===36||b(h)?(i.exit("mathTextData"),g(h)):(i.consume(h),d)}function x(h){return h===36?(i.consume(h),a++,x):a===l?(i.exit("mathTextSequence"),i.exit("mathText"),s(h)):(c.type="mathTextData",d(h))}}}function Se(e){let t=e.length-4,r=3,n,i;if((e[r][1].type==="lineEnding"||e[r][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(n=r;++n<t;)if(e[n][1].type==="mathTextData"){e[t][1].type="mathTextPadding",e[r][1].type="mathTextPadding",r+=2,t-=2;break}}for(n=r-1,t++;++n<=t;)i===void 0?n!==t&&e[n][1].type!=="lineEnding"&&(i=n):(n===t||e[n][1].type==="lineEnding")&&(e[i][1].type="mathTextData",n!==i+2&&(e[i][1].end=e[n-1][1].end,e.splice(i+2,n-i-2),t-=n-i-2,n=i+2),i=void 0);return e}function Pe(e){return e!==36||this.events[this.events.length-1][1].type==="characterEscape"}function Ie(e){return{flow:{36:Te},text:{36:Ae(e)}}}const _e={};function Et(e){const t=this,r=e||_e,n=t.data(),i=n.micromarkExtensions||(n.micromarkExtensions=[]),s=n.fromMarkdownExtensions||(n.fromMarkdownExtensions=[]),o=n.toMarkdownExtensions||(n.toMarkdownExtensions=[]);i.push(Ie(r)),s.push(je()),o.push(Ce(r))}const U=/[#.]/g;function qe(e,t){const r=e||"",n={};let i=0,s,o;for(;i<r.length;){U.lastIndex=i;const l=U.exec(r),a=r.slice(i,l?l.index:r.length);a&&(s?s==="#"?n.id=a:Array.isArray(n.className)?n.className.push(a):n.className=[a]:o=a,i+=a.length),l&&(s=l[0],i++)}return{type:"element",tagName:o||t||"div",properties:n,children:[]}}function J(e,t,r){const n=r?ze(r):void 0;function i(s,o,...l){let a;if(s==null){a={type:"root",children:[]};const c=o;l.unshift(c)}else{a=qe(s,t);const c=a.tagName.toLowerCase(),m=n?n.get(c):void 0;if(a.tagName=m||c,$e(o))l.unshift(o);else for(const[f,g]of Object.entries(o))Le(e,a.properties,f,g)}for(const c of l)S(a.children,c);return a.type==="element"&&a.tagName==="template"&&(a.content={type:"root",children:a.children},a.children=[]),a}return i}function $e(e){if(e===null||typeof e!="object"||Array.isArray(e))return!0;if(typeof e.type!="string")return!1;const t=e,r=Object.keys(e);for(const n of r){const i=t[n];if(i&&typeof i=="object"){if(!Array.isArray(i))return!0;const s=i;for(const o of s)if(typeof o!="number"&&typeof o!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function Le(e,t,r,n){const i=le(e,r);let s;if(n!=null){if(typeof n=="number"){if(Number.isNaN(n))return;s=n}else typeof n=="boolean"?s=n:typeof n=="string"?i.spaceSeparated?s=O(n):i.commaSeparated?s=z(n):i.commaOrSpaceSeparated?s=O(z(n).join(" ")):s=K(i,i.property,n):Array.isArray(n)?s=[...n]:s=i.property==="style"?Oe(n):String(n);if(Array.isArray(s)){const o=[];for(const l of s)o.push(K(i,i.property,l));s=o}i.property==="className"&&Array.isArray(t.className)&&(s=t.className.concat(s)),t[i.property]=s}}function S(e,t){if(t!=null)if(typeof t=="number"||typeof t=="string")e.push({type:"text",value:String(t)});else if(Array.isArray(t))for(const r of t)S(e,r);else if(typeof t=="object"&&"type"in t)t.type==="root"?S(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function K(e,t,r){if(typeof r=="string"){if(e.number&&r&&!Number.isNaN(Number(r)))return Number(r);if((e.boolean||e.overloadedBoolean)&&(r===""||D(r)===D(t)))return!0}return r}function Oe(e){const t=[];for(const[r,n]of Object.entries(e))t.push([r,n].join(": "));return t.join("; ")}function ze(e){const t=new Map;for(const r of e)t.set(r.toLowerCase(),r);return t}const De=["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","solidColor","textArea","textPath"],Re=J(ce,"div"),Be=J(ue,"g",De),E={html:"http://www.w3.org/1999/xhtml",svg:"http://www.w3.org/2000/svg"};function Ue(e,t){return ee(e,{})||{type:"root",children:[]}}function ee(e,t){const r=Ke(e,t);return r&&t.afterTransform&&t.afterTransform(e,r),r}function Ke(e,t){switch(e.nodeType){case 1:return Qe(e,t);case 3:return Ve(e);case 8:return Ge(e);case 9:return H(e,t);case 10:return He();case 11:return H(e,t);default:return}}function H(e,t){return{type:"root",children:te(e,t)}}function He(){return{type:"doctype"}}function Ve(e){return{type:"text",value:e.nodeValue||""}}function Ge(e){return{type:"comment",value:e.nodeValue||""}}function Qe(e,t){const r=e.namespaceURI,n=r===E.svg?Be:Re,i=r===E.html?e.tagName.toLowerCase():e.tagName,s=r===E.html&&i==="template"?e.content:e,o=e.getAttributeNames(),l={};let a=-1;for(;++a<o.length;)l[o[a]]=e.getAttribute(o[a])||"";return n(i,l,te(s,t))}function te(e,t){const r=e.childNodes,n=[];let i=-1;for(;++i<r.length;){const s=ee(r[i],t);s!==void 0&&n.push(s)}return n}new DOMParser;function Xe(e,t){const r=We(e);return Ue(r)}function We(e){const t=document.createElement("template");return t.innerHTML=e,t.content}const V=function(e,t,r){const n=he(r);if(!e||!e.type||!e.children)throw new Error("Expected parent node");if(typeof t=="number"){if(t<0||t===Number.POSITIVE_INFINITY)throw new Error("Expected positive finite number as index")}else if(t=e.children.indexOf(t),t<0)throw new Error("Expected child node or index");for(;++t<e.children.length;)if(n(e.children[t],t,e))return e.children[t]},N=function(e){if(e==null)return Je;if(typeof e=="string")return Ye(e);if(typeof e=="object")return Ze(e);if(typeof e=="function")return _(e);throw new Error("Expected function, string, or array as `test`")};function Ze(e){const t=[];let r=-1;for(;++r<e.length;)t[r]=N(e[r]);return _(n);function n(...i){let s=-1;for(;++s<t.length;)if(t[s].apply(this,i))return!0;return!1}}function Ye(e){return _(t);function t(r){return r.tagName===e}}function _(e){return t;function t(r,n,i){return!!(et(r)&&e.call(this,r,typeof n=="number"?n:void 0,i||void 0))}}function Je(e){return!!(e&&typeof e=="object"&&"type"in e&&e.type==="element"&&"tagName"in e&&typeof e.tagName=="string")}function et(e){return e!==null&&typeof e=="object"&&"type"in e&&"tagName"in e}const G=/\n/g,Q=/[\t ]+/g,P=N("br"),X=N(lt),tt=N("p"),W=N("tr"),nt=N(["datalist","head","noembed","noframes","noscript","rp","script","style","template","title",ot,ct]),ne=N(["address","article","aside","blockquote","body","caption","center","dd","dialog","dir","dl","dt","div","figure","figcaption","footer","form,","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","legend","li","listing","main","menu","nav","ol","p","plaintext","pre","section","ul","xmp"]);function rt(e,t){const r=t||{},n="children"in e?e.children:[],i=ne(e),s=ae(e,{whitespace:r.whitespace||"normal"}),o=[];(e.type==="text"||e.type==="comment")&&o.push(...ie(e,{breakBefore:!0,breakAfter:!0}));let l=-1;for(;++l<n.length;)o.push(...re(n[l],e,{whitespace:s,breakBefore:l?void 0:i,breakAfter:l<n.length-1?P(n[l+1]):i}));const a=[];let c;for(l=-1;++l<o.length;){const m=o[l];typeof m=="number"?c!==void 0&&m>c&&(c=m):m&&(c!==void 0&&c>-1&&a.push(`
6
  `.repeat(c)||" "),c=-1,a.push(m))}return a.join("")}function re(e,t,r){return e.type==="element"?it(e,t,r):e.type==="text"?r.whitespace==="normal"?ie(e,r):at(e):[]}function it(e,t,r){const n=ae(e,r),i=e.children||[];let s=-1,o=[];if(nt(e))return o;let l,a;for(P(e)||W(e)&&V(t,e,W)?a=`
7
+ `:tt(e)?(l=2,a=2):ne(e)&&(l=1,a=1);++s<i.length;)o=o.concat(re(i[s],e,{whitespace:n,breakBefore:s?void 0:l,breakAfter:s<i.length-1?P(i[s+1]):a}));return X(e)&&V(t,e,X)&&o.push(" "),l&&o.unshift(l),a&&o.push(a),o}function ie(e,t){const r=String(e.value),n=[],i=[];let s=0;for(;s<=r.length;){G.lastIndex=s;const a=G.exec(r),c=a&&"index"in a?a.index:r.length;n.push(st(r.slice(s,c).replace(/[\u061C\u200E\u200F\u202A-\u202E\u2066-\u2069]/g,""),s===0?t.breakBefore:!0,c===r.length?t.breakAfter:!0)),s=c+1}let o=-1,l;for(;++o<n.length;)n[o].charCodeAt(n[o].length-1)===8203||o<n.length-1&&n[o+1].charCodeAt(0)===8203?(i.push(n[o]),l=void 0):n[o]?(typeof l=="number"&&i.push(l),i.push(n[o]),l=0):(o===0||o===n.length-1)&&i.push(0);return i}function at(e){return[String(e.value)]}function st(e,t,r){const n=[];let i=0,s;for(;i<e.length;){Q.lastIndex=i;const o=Q.exec(e);s=o?o.index:e.length,!i&&!s&&o&&!t&&n.push(""),i!==s&&n.push(e.slice(i,s)),i=o?s+o[0].length:s}return i!==s&&!r&&n.push(""),n.join(" ")}function ae(e,t){if(e.type==="element"){const r=e.properties||{};switch(e.tagName){case"listing":case"plaintext":case"xmp":return"pre";case"nobr":return"nowrap";case"pre":return r.wrap?"pre-wrap":"pre";case"td":case"th":return r.noWrap?"nowrap":t.whitespace;case"textarea":return"pre-wrap"}}return t.whitespace}function ot(e){return!!(e.properties||{}).hidden}function lt(e){return e.tagName==="td"||e.tagName==="th"}function ct(e){return e.tagName==="dialog"&&!(e.properties||{}).open}const ut={},ht=[];function At(e){const t=e||ut;return function(r,n){pe(r,"element",function(i,s){const o=Array.isArray(i.properties.className)?i.properties.className:ht,l=o.includes("language-math"),a=o.includes("math-display"),c=o.includes("math-inline");let m=a;if(!l&&!a&&!c)return;let f=s[s.length-1],g=i;if(i.tagName==="code"&&l&&f&&f.type==="element"&&f.tagName==="pre"&&(g=f,f=s[s.length-2],m=!0),!f)return;const d=rt(g,{whitespace:"pre"});let x;try{x=R.renderToString(d,{...t,displayMode:m,throwOnError:!0})}catch(y){const v=y,u=v.name.toLowerCase();n.message("Could not render math with KaTeX",{ancestors:[...s,i],cause:v,place:i.position,ruleId:u,source:"rehype-katex"});try{x=R.renderToString(d,{...t,displayMode:m,strict:"ignore",throwOnError:!1})}catch{x=[{type:"element",tagName:"span",properties:{className:["katex-error"],style:"color:"+(t.errorColor||"#cc0000"),title:String(y)},children:[{type:"text",value:d}]}]}}typeof x=="string"&&(x=Xe(x).children);const h=f.children.indexOf(g);return f.children.splice(h,1,...x),me})}}function pt(e,t=e.arxiv_id??e.id){return{routeId:t,title:e.title,arxivId:e.arxiv_id,source:e.source??(e.arxiv_id?"arxiv":"external"),sourceUrl:e.source_url??e.url_abs,thumbnailUrl:e.thumbnail_url??null,authors:e.authors,published:e.published??null,conference:e.conference_name??e.conference??null,citationCount:e.citation_count,tasks:(e.tasks??[]).map(r=>({name:r.name,slug:r.slug??""}))}}function mt(e){if(!e.authors.length)return"";const t=e.authors.slice(0,3).join(", ");return e.authors.length>3?`${t}, et al.`:t}function ft(e){var r;if(e.conference)return e.conference;const t=(r=e.published)==null?void 0:r.slice(0,4);if(e.arxivId)return t?`arXiv ${t}`:"arXiv";if(e.sourceUrl)try{return new URL(e.sourceUrl).hostname.replace(/^www\./,"")}catch{}return t??"external"}const dt=({seed:e=0})=>p.jsxs("div",{className:"paper-preview-thumb","aria-hidden":"true","data-testid":"faux-paper-thumb",children:[p.jsxs("div",{className:"paper-preview-thumb-title",children:[p.jsx("span",{}),p.jsx("span",{})]}),p.jsx("div",{className:"paper-preview-thumb-auth"}),p.jsxs("div",{className:"paper-preview-thumb-cols",children:[p.jsx("div",{className:"paper-preview-thumb-col"}),p.jsx("div",{className:"paper-preview-thumb-col"})]}),p.jsx("div",{className:"paper-preview-thumb-fig",style:{top:62+e%3*8}})]}),xt=({thumbnailUrl:e,seed:t})=>{const[r,n]=A.useState(!1),i=de(e);return A.useEffect(()=>n(!1),[i]),!i||r?p.jsx(dt,{seed:t}):p.jsx("div",{className:"paper-preview-thumb paper-preview-thumb-real",children:p.jsx("img",{"data-testid":"paper-preview-image",src:i,alt:"",loading:"lazy",decoding:"async",onError:()=>n(!0)})})},Z=({data:e})=>{const t=e.routeId.split("").reduce((n,i)=>n+i.charCodeAt(0),0),r=mt(e);return p.jsxs("div",{className:"paper-preview-inner",children:[p.jsx(xt,{thumbnailUrl:e.thumbnailUrl,seed:t}),p.jsxs("div",{className:"paper-preview-meta",children:[p.jsx("div",{className:"paper-preview-title",children:e.title}),r&&p.jsx("div",{className:"paper-preview-auth",children:r}),p.jsxs("div",{className:"paper-preview-venue",children:[ft(e),e.arxivId&&p.jsxs(p.Fragment,{children:[" · arXiv:",e.arxivId]}),e.citationCount!=null&&p.jsxs(p.Fragment,{children:[" · ↑ ",e.citationCount.toLocaleString()]})]}),e.tasks.length>0&&p.jsx("div",{className:"paper-preview-tags",children:e.tasks.map(n=>p.jsx("span",{className:"paper-preview-tag",children:n.name},n.slug||n.name))})]})]})},M=e=>ke.preview(C(e)),gt=e=>e.arxiv_id??e.id,Y=200;function St(e,t=I){const r=new Set,n=async s=>{const o=new Map;for(const l of s)l.arxiv_id&&r.add(C(l.arxiv_id));for(let l=0;l<s.length;l+=Y){const{references:a}=await t.lookup(s.slice(l,l+Y));for(const c of a){if(!c.paper)continue;const m=gt(c.paper);e.setQueryData(M(m),c.paper),o.set(c.key,m)}}return o};return{lookup:n,warm:s=>{const o=s.filter(l=>{const a=C(l);return r.has(a)||e.getQueryData(M(a))?!1:(r.add(a),!0)});o.length&&n(o.map(l=>({key:l,arxiv_id:l}))).catch(()=>{})}}}const yt=/^(\d{4}\.\d{4,5}|[a-z-]+(\.[A-Z]{2})?\/\d{7})$/i,wt=({arxivId:e})=>{var i;const t=xe(),r=ge(),n=Fe({mutationFn:()=>I.submit({arxiv_id:e}),onSuccess:s=>{s.pending_review||r.invalidateQueries({queryKey:M(e)})}});return(i=n.data)!=null&&i.pending_review?p.jsxs("div",{className:"paper-preview-status paper-preview-index-request",children:[p.jsx("span",{children:"Indexing request queued for review."}),p.jsx(T,{to:"/submissions",target:"_blank",rel:"noopener noreferrer",children:"View submissions ↗"})]}):p.jsxs("div",{className:"paper-preview-status paper-preview-index-request",children:[p.jsx("span",{children:"Not indexed on Papers with Code yet."}),t!=null&&t.user?p.jsx("button",{type:"button",disabled:n.isPending,onClick:()=>n.mutate(),children:n.isPending?"Requesting…":"Request indexing"}):p.jsx(T,{to:`/submit?arxiv_id=${encodeURIComponent(e)}`,target:"_blank",rel:"noopener noreferrer",children:"Request indexing ↗"}),n.isError&&p.jsx("span",{role:"alert",children:n.error.message})]})},bt=()=>typeof window.matchMedia=="function"&&window.matchMedia("(hover: none), (pointer: coarse)").matches,Pt=({routeId:e,to:t,initialData:r,className:n,children:i,target:s,title:o,ariaLabel:l,onClick:a,previewFooter:c,cardOpensPaper:m=!1})=>{const f=C(e),[g,d]=A.useState(!1),x=!!(r!=null&&r.title.trim()),h=we({queryKey:M(f),queryFn:()=>I.get(f,!1),enabled:g&&!x,staleTime:5*60*1e3,gcTime:30*60*1e3,retry:!1}),y=r??(h.data?pt(h.data,f):void 0),v=h.error instanceof ye&&h.error.status===404&&yt.test(f),u=p.jsx(T,{className:n,to:t??`/paper/${f}`,target:s,title:o,"aria-label":l,onClick:k=>{d(!1),a==null||a(k)},rel:s==="_blank"?"noopener noreferrer":void 0,children:i});return p.jsxs(be,{open:g,onOpenChange:k=>{(!k||!bt())&&d(k)},openDelay:150,closeDelay:100,children:[p.jsx(Ne,{asChild:!0,children:u}),p.jsx(ve,{className:"paper-preview-pop",side:"bottom",align:"start",collisionPadding:12,children:y?p.jsxs(p.Fragment,{children:[m?p.jsx(T,{className:"paper-preview-card-link",to:`/paper/${encodeURIComponent(f)}`,target:"_blank",rel:"noopener noreferrer",onClick:()=>d(!1),children:p.jsx(Z,{data:y})}):p.jsx(Z,{data:y}),c==null?void 0:c(y)]}):v?p.jsx(wt,{arxivId:f}):h.isError?p.jsx("div",{className:"paper-preview-status",children:"Preview unavailable"}):p.jsx("div",{className:"paper-preview-status","aria-live":"polite",children:"Loading preview…"})})]})};export{Pt as P,Et as a,St as c,At as r};
assets/{PaperReaderView-D2y857wl.js → PaperReaderView-9hbbSNRK.js} RENAMED
@@ -1 +1 @@
1
- import{r as s,j as a,J as G,u as Se,c as Ue,o as De,Y as je,O as Oe,L as Y}from"./index-YwiKC6Po.js";import{u as ee}from"./useQuery-DPH6Mb2w.js";import{u as Ve,R as Qe,A as Xe,c as Ye,d as Je,a as Ze,P as Ge,e as et}from"./ArtifactWorkspace-BxDA6yNF.js";import{M as tt}from"./MarkdownText-C-8yLDus.js";import{g as rt,b as at}from"./paperQueryKeys-C5FMa4Oj.js";import{w as st,e as nt}from"./paperReader-BIpQD5HO.js";import{a as ot}from"./usePapers-C1deOZKl.js";import{c as it}from"./chat-DHGOonJg.js";import{s as te}from"./safeExternalHref-CkBrsh84.js";import{ChatExperience as ct}from"./ChatView-DsnEMREv.js";import"./chatSessions-CdNQ1toA.js";/* empty css */import"./hover-card-BY9tUGxy.js";import"./CatalogEntityPreviewLink-Cv_oezOz.js";import"./catalog-B15Yh5dN.js";import"./github-BZMCt7Ub.js";import"./file-text-Cijxx2XD.js";import"./PaperPreviewLink-CKfmgBjs.js";import"./index-CoRCN2p0.js";import"./index-BM_xSDJM.js";import"./katex-DkKDou_j.js";import"./useMutation-f6iDkf3w.js";import"./copy-YHg6twss.js";import"./thumbs-up-D9G2aLNB.js";import"./arrow-left-B08fyfNi.js";import"./external-link-4bBJT0yO.js";import"./plus-Cfz0QbT1.js";import"./search-wcEXdf1i.js";import"./chevron-up-BXtxbTfV.js";import"./AuthorAvatar-CoTET6B3.js";import"./curation-CkzNFTMJ.js";import"./useInfiniteQuery-BEbL80ez.js";import"./McpShowcase-Fj71TTNl.js";import"./AgentLogos-DhD8p5ds.js";import"./share-2-m8aPY8Vq.js";import"./openrouter-BT3NQ0bL.js";import"./queryOptions-C9woPjwX.js";function lt(r){return r instanceof G&&r.status===422?"This page could not be turned into a readable paper.":r instanceof G&&r.status===503?"Paper content is still being prepared. Please try again later.":"The paper could not be loaded."}function dt({paperId:r,paperKey:i,paperTitle:o,paperHref:b,sourceUrl:d,resources:t,paperVersion:f="",selectionEnabled:v=!1,onReady:h,onPaperSelection:I,onPaperSelectionError:B}){const c=s.useRef(null),g=ee({queryKey:["paperWebMarkdown",r],queryFn:()=>rt(r),staleTime:5*6e4,retry:(w,j)=>w<2&&!(j instanceof G&&j.status<500),retryDelay:3e3}),x=g.isSuccess;s.useEffect(()=>{x&&(h==null||h())},[h,x]),Ve({enabled:v&&!!f&&x,pagesRoot:c,routeId:i,paperVersion:f,numPages:1,onSelect:I,onError:B});const S=g.data?st(g.data):"";return a.jsxs("div",{className:"pdf-viewer",children:[a.jsx(Qe,{paperTitle:o,paperHref:b,resources:t,label:"Paper controls",children:a.jsx("div",{className:"pdf-toolbar-controls",children:a.jsx("a",{href:d,target:"_blank",rel:"noopener noreferrer",children:"Open original"})})}),a.jsx("div",{className:"pdf-scroll-frame",children:a.jsx("div",{className:"pdf-scroll",role:"region","aria-label":"Paper web page",children:g.isPending?a.jsx("div",{className:"pdf-loading",role:"status",children:"Preparing a readable version of this page…"}):g.isError?a.jsxs("div",{className:"pdf-error",role:"alert",children:[a.jsx("p",{children:lt(g.error)}),a.jsxs("div",{children:[a.jsx("button",{type:"button",onClick:()=>void g.refetch(),children:"Retry"})," ",a.jsx("a",{href:d,target:"_blank",rel:"noopener noreferrer",children:"Open original"})]})]}):a.jsxs("article",{ref:c,className:"reader-web-document","data-page":"1",children:[!S.startsWith("# ")&&a.jsx("h1",{children:o}),a.jsx(tt,{text:S})]})})})]})}const _e=66,ut=240,re="pwc:reader:split-ratio",L=r=>`pwc:reader:session:${r}`,J=r=>`pwc:reader:assistant-collapsed:${r}`,Ce=r=>`pwc:reader:page:${r}`;function Z(r){const i=Number(sessionStorage.getItem(Ce(r)));return Number.isInteger(i)&&i>0?i:1}function pt(){const r=Number(localStorage.getItem(re));return Number.isFinite(r)&&r>=45&&r<=75?r:_e}function ft(r){const i=te(r);if(!i)return null;const o=new URL(i);return(o.hostname==="arxiv.org"||o.hostname==="www.arxiv.org")&&o.pathname.startsWith("/pdf/")&&o.pathname.endsWith(".pdf")&&(o.pathname=o.pathname.slice(0,-4)),o.href}const mt=/^\/pdf\/(\d{4}\.\d{4,5}(?:v\d{1,3})?|[a-z]+(?:-[a-z]+)*(?:\.[A-Z]{2})?\/\d{7}(?:v\d{1,3})?)$/;function ht(r){const i=new URL(r),o=i.pathname.match(mt);return(i.hostname==="arxiv.org"||i.hostname==="www.arxiv.org")&&o&&!i.search?je(`/paper-assets/arxiv-pdf/${o[1]}`)??r:r}function gt(r){return new URL(r).hostname.replace(/^www\./,"")}function bt(r){if(!r)return{};const i={};for(const d of r.repositories??[]){if(!d.is_official)continue;const t=te(d.url);if(!t)continue;const f=new URL(t),v=f.pathname.split("/").filter(Boolean);if((f.hostname==="github.com"||f.hostname==="www.github.com")&&v.length>=2){i.repository={href:t,stars:d.num_stars||0};break}}const o=[...r.project_pages??[]].sort((d,t)=>Number(t.is_official)-Number(d.is_official));for(const d of o){const t=te(d.url);if(t){i.projectPage={href:t,label:gt(t)};break}}const b=r.hf_artifact_summary?r.hf_artifact_summary.model_count+r.hf_artifact_summary.dataset_count+r.hf_artifact_summary.space_count:new Set([...r.hf_models??[],...r.hf_datasets??[],...r.hf_spaces??[]]).size;return b>0&&r.arxiv_id&&(i.huggingFace={href:`https://huggingface.co/papers/${r.arxiv_id.replace(/v\d+$/i,"")}`,count:b}),i}function vt(){var xe,Pe,we,ye,Re;const r=Ue(),{paperId:i}=Se(),o=De(i??"").replace(/v\d+$/i,""),b=ot(o,!!o),d=ee({queryKey:["chatAvailability"],queryFn:()=>it.getAvailability(),refetchInterval:3e4,retry:!1}),t=b.data,f=t?nt(t):null,v=f?null:(t==null?void 0:t.source)==="external"?je(`/paper-assets/external/${t.id}/paper.pdf`):ft(t==null?void 0:t.url_pdf),h=v&&(t==null?void 0:t.source)!=="external"?ht(v):v,I=bt(t),B=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]),c=((xe=t==null?void 0:t.arxiv_id)==null?void 0:xe.replace(/v\d+$/i,""))||o,g=s.useCallback(()=>r(`/paper/${c}`),[c,r]),[x,S]=s.useState(()=>sessionStorage.getItem(L(o))||void 0),[w,j]=s.useState(pt),[u,ae]=s.useState(()=>sessionStorage.getItem(J(o))==="1"),[P,_]=s.useState("paper"),[H,C]=s.useState(),[ke,se]=s.useState(),[Ae,ne]=s.useState(!1),Ie=s.useCallback(()=>ne(!0),[]),[$e,y]=s.useState(""),[Ne,Ee]=s.useState(()=>Z(o)),[k,Te]=s.useState(0),[oe,ie]=s.useState(!1),[Me,F]=s.useState(!1),$=s.useRef(null),q=s.useRef(null),N=s.useRef(null),ce=s.useRef(null),le=s.useRef(null),K=s.useRef(!1),E=s.useRef(!1),T=s.useRef(0),R=s.useRef(0),U=s.useRef(0),A=s.useRef(w),D=s.useRef(Z(o)),O=s.useRef(t==null?void 0:t.version),de=Ye().reset,ue=s.useRef(`${o}:${x??"new"}`),p=k>=840;s.useEffect(()=>{const e=`${o}:${x??"new"}`;ue.current!==e&&(ue.current=e,de())},[x,de,o]),s.useEffect(()=>{t!=null&&t.version&&O.current&&t.version!==O.current&&(C(void 0),y("")),O.current=t==null?void 0:t.version},[t==null?void 0:t.version]),s.useEffect(()=>{window.clearTimeout(T.current),F(!1);const e=sessionStorage.getItem(L(o));S(e||void 0),ae(sessionStorage.getItem(J(o))==="1"),_("paper"),ne(!1),C(void 0),se(void 0),y("");const n=Z(o);D.current=n,Ee(n)},[o]),s.useEffect(()=>()=>{window.clearTimeout(T.current),cancelAnimationFrame(R.current)},[]),s.useLayoutEffect(()=>{const e=$.current;if(!e)return;const n=()=>Te(e.clientWidth);n();const l=new ResizeObserver(n);return l.observe(e),()=>l.disconnect()},[t]),s.useEffect(()=>{if(!t)return;document.title=`${t.title} — Papers With Code reader`;let e=document.querySelector('meta[name="robots"]');const n=!e;e||(e=document.createElement("meta"),e.name="robots",document.head.appendChild(e));const l=e.content;e.content="noindex, nofollow";let m=document.querySelector('link[rel="canonical"]');const qe=!m;m||(m=document.createElement("link"),m.rel="canonical",document.head.appendChild(m));const Ke=m.href;return m.href=`${window.location.origin}/paper/${c}`,()=>{document.title="Papers With Code",n?e==null||e.remove():e&&(e.content=l),qe?m==null||m.remove():m&&(m.href=Ke)}},[c,t]);const M=s.useCallback(e=>{if(!k)return Math.max(45,Math.min(75,e));const n=480/k*100,l=100-360/k*100;return Math.max(n,Math.min(l,e))},[k]);s.useEffect(()=>j(e=>{const n=M(e);return A.current=n,n}),[M]);const W=e=>{const n=M(e);A.current=n,j(n),localStorage.setItem(re,String(n))},pe=e=>{var l;const n=M(e);A.current=n,q.current&&(q.current.style.width=`${n}%`),N.current&&(N.current.style.width=`${100-n}%`),(l=ce.current)==null||l.setAttribute("aria-valuenow",String(Math.round(n)))},fe=e=>{U.current=e,!R.current&&(R.current=requestAnimationFrame(()=>{var l;R.current=0;const n=(l=$.current)==null?void 0:l.getBoundingClientRect();n!=null&&n.width&&pe((U.current-n.left)/n.width*100)}))},We=e=>{E.current=!0,ie(!0),e.currentTarget.setPointerCapture(e.pointerId),fe(e.clientX)},V=()=>{var e;if(E.current){if(R.current){cancelAnimationFrame(R.current),R.current=0;const n=(e=$.current)==null?void 0:e.getBoundingClientRect();n!=null&&n.width&&pe((U.current-n.left)/n.width*100)}E.current=!1,j(A.current),localStorage.setItem(re,String(A.current)),ie(!1)}},me=e=>{window.clearTimeout(T.current),F(!0),ae(e),sessionStorage.setItem(J(o),e?"1":"0"),T.current=window.setTimeout(()=>F(!1),ut+40)},he=e=>{K.current=!0,me(e)};s.useEffect(()=>{var e;K.current&&(K.current=!1,(e=u?le.current:N.current)==null||e.focus())},[u]);const ze=e=>{S(e),sessionStorage.setItem(L(o),e)},Le=()=>{S(void 0),sessionStorage.removeItem(L(o)),C(void 0),y("")},ge=((Pe=d.data)==null?void 0:Pe.paper_reader_selection_enabled)===!0,be=e=>{C(e),y(`Selection from page ${e.page} added to chat`),p&&u&&me(!1)},Be=s.useCallback(e=>{C(e),e||y("")},[]),Q=((we=d.data)==null?void 0:we.paper_reader_citations_enabled)===!0&&!!h,z=ee({queryKey:["paper-layout",c],queryFn:()=>at(c),enabled:Q&&!!c,staleTime:5*6e4}).data,He=s.useMemo(()=>Q?{layout:z,open:e=>{const n=z?Je(z,e):[];n.length&&(se(l=>({boxes:n,nonce:((l==null?void 0:l.nonce)??0)+1})),_("paper"))}}:null,[Q,z]),ve=Oe()&&((ye=d.data)==null?void 0:ye.paper_reader_chat_enabled)!==!1,X=!!(t&&ve&&!(f&&!Ae)),Fe=t&&ve&&!X?a.jsx("div",{className:"reader-chat-unavailable",role:"status",children:"Chat opens once the paper is ready."}):t&&X?a.jsx(ct,{mode:"paper",routeSessionId:x,primaryPaper:{id:t.id,routeId:c,title:t.title},currentPage:()=>D.current,paperSelection:H,onPaperSelectionChange:Be,onSessionId:ze,onReaderSubmit:()=>_("assistant"),onReaderNewChat:Le,onReaderClose:p?()=>he(!0):void 0}):a.jsx("div",{className:"reader-chat-unavailable",children:"Chat is not enabled for this preview."});return b.isLoading?a.jsx("div",{className:"reader-status",role:"status",children:"Loading paper…"}):b.error||!t?a.jsxs("div",{className:"reader-status",role:"alert",children:[a.jsx("p",{children:"Paper not found."}),a.jsx(Y,{to:"/papers",children:"Browse papers"})]}):((Re=d.data)==null?void 0:Re.native_pdf_reader_enabled)===!1?a.jsxs("div",{className:"reader-status",role:"alert",children:[a.jsx("p",{children:"The native reader is currently unavailable."}),a.jsx(Y,{to:`/paper/${c}`,children:"Back to paper"})]}):!h&&!f?a.jsxs("div",{className:"reader-status",role:"alert",children:[a.jsx("p",{children:"Native reading is unavailable for this resource."}),a.jsx(Y,{to:`/paper/${c}`,children:"Back to paper"})]}):a.jsxs("div",{className:"paper-reader-shell",children:[!p&&a.jsxs("div",{className:"reader-tabs",role:"tablist","aria-label":"Reader panels",children:[a.jsx("button",{type:"button",role:"tab","aria-selected":P==="paper",onClick:()=>_("paper"),children:"Paper"}),a.jsxs("button",{type:"button",role:"tab","aria-selected":P==="assistant","aria-label":H&&P!=="assistant"?"Chat, selection attached":"Chat",onClick:()=>_("assistant"),children:["Chat",H&&P!=="assistant"&&a.jsx("span",{className:"reader-tab-pending","aria-hidden":"true"})]})]}),a.jsx(Ze,{variant:"reader",children:a.jsxs("div",{ref:$,className:`reader-workspace${p?" is-desktop":" is-tabs"}${u?" is-assistant-collapsed":""}${oe?" is-resizing":""}`,"data-testid":"paper-chat-workspace",children:[a.jsx("section",{ref:q,className:`reader-paper-pane${!p&&P!=="paper"?" is-hidden":""}`,style:p?{width:u?"100%":`${w}%`}:void 0,role:"tabpanel","aria-label":"Paper","aria-hidden":!p&&P!=="paper",children:f?a.jsx(dt,{paperId:t.id,paperKey:c,paperTitle:t.title,paperHref:`/paper/${c}`,sourceUrl:f,resources:I,paperVersion:t.version,selectionEnabled:ge,onReady:Ie,onPaperSelection:be,onPaperSelectionError:y}):h&&a.jsx(Ge,{url:h,downloadUrl:v??h,paperKey:c,paperTitle:t.title,paperHref:`/paper/${c}`,onClose:g,resources:I,initialPage:Ne,resizeActive:oe||Me,selectionEnabled:ge,paperVersion:t.version,authors:B,loadErrorMessage:t.source==="external"?"Paper content is still being prepared. Please try again later.":void 0,onPaperSelection:be,onPaperSelectionError:y,highlight:ke,onPageChange:e=>{D.current=e,sessionStorage.setItem(Ce(o),String(e))}})}),p&&!u&&a.jsx("div",{ref:ce,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:We,onPointerMove:e=>{E.current&&fe(e.clientX)},onPointerUp:V,onPointerCancel:V,onLostPointerCapture:V,onDoubleClick:()=>W(_e),onKeyDown:e=>{(e.key==="ArrowLeft"||e.key==="ArrowRight")&&(e.preventDefault(),W(w+(e.key==="ArrowRight"?2:-2))),e.key==="Home"&&W(45),e.key==="End"&&W(75)}}),a.jsx("aside",{ref:N,id:"reader-chat-panel",className:`reader-assistant-pane${!p&&P!=="assistant"?" is-hidden":""}${p&&u?" is-collapsed":""}`,style:p?{width:u?0:`${100-w}%`}:void 0,role:"tabpanel","aria-label":"Chat","aria-hidden":!p&&P!=="assistant"||u,tabIndex:-1,children:a.jsx(et.Provider,{value:He,children:Fe})}),a.jsx("div",{className:"sr-only","aria-live":"polite",children:$e}),p&&(u||!X)&&a.jsx("button",{ref:le,type:"button",className:"reader-collapse-assistant","aria-controls":"reader-chat-panel","aria-expanded":!u,onClick:()=>he(!u),children:u?"Open chat":"Hide chat"})]})})]})}function sr(){const{paperId:r=""}=Se();return a.jsx(Xe,{workspaceKey:`reader:${r}`,children:a.jsx(vt,{})})}export{sr as default,bt as readerToolbarResources};
 
1
+ import{r as s,j as a,K as J,u as Se,c as Ue,o as De,Z as je,Q as Oe,L as Z}from"./index-CbgxfyGU.js";import{u as ee}from"./useQuery-Bx9s5-D2.js";import{u as Ve,R as Qe,A as Xe,c as Ze,d as Ye,a as Ge,P as Je,e as et}from"./ArtifactWorkspace-Cwix1Wp6.js";import{M as tt}from"./MarkdownText-Bj-G_S-B.js";import{g as rt,b as at}from"./paperQueryKeys-B8u1BWlI.js";import{w as st,e as nt}from"./paperReader-BIpQD5HO.js";import{a as ot}from"./usePapers-CJaWLZ3y.js";import{c as it}from"./chat-DzTo2WUO.js";import{s as te}from"./safeExternalHref-CkBrsh84.js";import{ChatExperience as ct}from"./ChatView-DlSbJMKT.js";import"./chatSessions-DwLUbLRo.js";/* empty css */import"./hover-card-ufez2uMo.js";import"./CatalogEntityPreviewLink-Cvehtzvn.js";import"./catalog-DhK7_9-6.js";import"./github-BYklgHDz.js";import"./file-text-BK_7Q2rV.js";import"./PaperPreviewLink-DZDNIh1g.js";import"./index-ZkEATkOr.js";import"./index-BH3yOoza.js";import"./katex-DkKDou_j.js";import"./useMutation-P_trTy9i.js";import"./copy-bzw7JVus.js";import"./thumbs-up-CDCzGuPd.js";import"./arrow-left-Czeu3VzJ.js";import"./external-link-DZIH4GGr.js";import"./plus-UK0TEjgd.js";import"./search-CLtAJGOp.js";import"./chevron-up-Cpt5JLeI.js";import"./AuthorAvatar-CUJMmp_z.js";import"./curation-C7Gmmp4z.js";import"./useInfiniteQuery-BAc_4HO5.js";import"./McpShowcase-CMLfdJM2.js";import"./AgentLogos-BBl9UNVD.js";import"./share-2-hXe4dX_y.js";import"./openrouter-DiuY1sPP.js";import"./queryOptions-C9woPjwX.js";function lt(r){return r instanceof J&&r.status===422?"This page could not be turned into a readable paper.":r instanceof J&&r.status===503?"Paper content is still being prepared. Please try again later.":"The paper could not be loaded."}function dt({paperId:r,paperKey:i,paperTitle:o,paperHref:b,sourceUrl:d,resources:t,paperVersion:f="",selectionEnabled:v=!1,onReady:h,onPaperSelection:I,onPaperSelectionError:B}){const c=s.useRef(null),g=ee({queryKey:["paperWebMarkdown",r],queryFn:()=>rt(r),staleTime:5*6e4,retry:(w,j)=>w<2&&!(j instanceof J&&j.status<500),retryDelay:3e3}),x=g.isSuccess;s.useEffect(()=>{x&&(h==null||h())},[h,x]),Ve({enabled:v&&!!f&&x,pagesRoot:c,routeId:i,paperVersion:f,numPages:1,onSelect:I,onError:B});const S=g.data?st(g.data):"";return a.jsxs("div",{className:"pdf-viewer",children:[a.jsx(Qe,{paperTitle:o,paperHref:b,resources:t,label:"Paper controls",children:a.jsx("div",{className:"pdf-toolbar-controls",children:a.jsx("a",{href:d,target:"_blank",rel:"noopener noreferrer",children:"Open original"})})}),a.jsx("div",{className:"pdf-scroll-frame",children:a.jsx("div",{className:"pdf-scroll",role:"region","aria-label":"Paper web page",children:g.isPending?a.jsx("div",{className:"pdf-loading",role:"status",children:"Preparing a readable version of this page…"}):g.isError?a.jsxs("div",{className:"pdf-error",role:"alert",children:[a.jsx("p",{children:lt(g.error)}),a.jsxs("div",{children:[a.jsx("button",{type:"button",onClick:()=>void g.refetch(),children:"Retry"})," ",a.jsx("a",{href:d,target:"_blank",rel:"noopener noreferrer",children:"Open original"})]})]}):a.jsxs("article",{ref:c,className:"reader-web-document","data-page":"1",children:[!S.startsWith("# ")&&a.jsx("h1",{children:o}),a.jsx(tt,{text:S})]})})})]})}const _e=66,ut=240,re="pwc:reader:split-ratio",L=r=>`pwc:reader:session:${r}`,Y=r=>`pwc:reader:assistant-collapsed:${r}`,Ce=r=>`pwc:reader:page:${r}`;function G(r){const i=Number(sessionStorage.getItem(Ce(r)));return Number.isInteger(i)&&i>0?i:1}function pt(){const r=Number(localStorage.getItem(re));return Number.isFinite(r)&&r>=45&&r<=75?r:_e}function ft(r){const i=te(r);if(!i)return null;const o=new URL(i);return(o.hostname==="arxiv.org"||o.hostname==="www.arxiv.org")&&o.pathname.startsWith("/pdf/")&&o.pathname.endsWith(".pdf")&&(o.pathname=o.pathname.slice(0,-4)),o.href}const mt=/^\/pdf\/(\d{4}\.\d{4,5}(?:v\d{1,3})?|[a-z]+(?:-[a-z]+)*(?:\.[A-Z]{2})?\/\d{7}(?:v\d{1,3})?)$/;function ht(r){const i=new URL(r),o=i.pathname.match(mt);return(i.hostname==="arxiv.org"||i.hostname==="www.arxiv.org")&&o&&!i.search?je(`/paper-assets/arxiv-pdf/${o[1]}`)??r:r}function gt(r){return new URL(r).hostname.replace(/^www\./,"")}function bt(r){if(!r)return{};const i={};for(const d of r.repositories??[]){if(!d.is_official)continue;const t=te(d.url);if(!t)continue;const f=new URL(t),v=f.pathname.split("/").filter(Boolean);if((f.hostname==="github.com"||f.hostname==="www.github.com")&&v.length>=2){i.repository={href:t,stars:d.num_stars||0};break}}const o=[...r.project_pages??[]].sort((d,t)=>Number(t.is_official)-Number(d.is_official));for(const d of o){const t=te(d.url);if(t){i.projectPage={href:t,label:gt(t)};break}}const b=r.hf_artifact_summary?r.hf_artifact_summary.model_count+r.hf_artifact_summary.dataset_count+r.hf_artifact_summary.space_count:new Set([...r.hf_models??[],...r.hf_datasets??[],...r.hf_spaces??[]]).size;return b>0&&r.arxiv_id&&(i.huggingFace={href:`https://huggingface.co/papers/${r.arxiv_id.replace(/v\d+$/i,"")}`,count:b}),i}function vt(){var xe,Pe,we,ye,Re;const r=Ue(),{paperId:i}=Se(),o=De(i??"").replace(/v\d+$/i,""),b=ot(o,!!o),d=ee({queryKey:["chatAvailability"],queryFn:()=>it.getAvailability(),refetchInterval:3e4,retry:!1}),t=b.data,f=t?nt(t):null,v=f?null:(t==null?void 0:t.source)==="external"?je(`/paper-assets/external/${t.id}/paper.pdf`):ft(t==null?void 0:t.url_pdf),h=v&&(t==null?void 0:t.source)!=="external"?ht(v):v,I=bt(t),B=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]),c=((xe=t==null?void 0:t.arxiv_id)==null?void 0:xe.replace(/v\d+$/i,""))||o,g=s.useCallback(()=>r(`/paper/${c}`),[c,r]),[x,S]=s.useState(()=>sessionStorage.getItem(L(o))||void 0),[w,j]=s.useState(pt),[u,ae]=s.useState(()=>sessionStorage.getItem(Y(o))==="1"),[P,_]=s.useState("paper"),[H,C]=s.useState(),[ke,se]=s.useState(),[Ae,ne]=s.useState(!1),Ie=s.useCallback(()=>ne(!0),[]),[$e,y]=s.useState(""),[Ne,Ee]=s.useState(()=>G(o)),[k,Te]=s.useState(0),[oe,ie]=s.useState(!1),[Me,F]=s.useState(!1),$=s.useRef(null),K=s.useRef(null),N=s.useRef(null),ce=s.useRef(null),le=s.useRef(null),q=s.useRef(!1),E=s.useRef(!1),T=s.useRef(0),R=s.useRef(0),U=s.useRef(0),A=s.useRef(w),D=s.useRef(G(o)),O=s.useRef(t==null?void 0:t.version),de=Ze().reset,ue=s.useRef(`${o}:${x??"new"}`),p=k>=840;s.useEffect(()=>{const e=`${o}:${x??"new"}`;ue.current!==e&&(ue.current=e,de())},[x,de,o]),s.useEffect(()=>{t!=null&&t.version&&O.current&&t.version!==O.current&&(C(void 0),y("")),O.current=t==null?void 0:t.version},[t==null?void 0:t.version]),s.useEffect(()=>{window.clearTimeout(T.current),F(!1);const e=sessionStorage.getItem(L(o));S(e||void 0),ae(sessionStorage.getItem(Y(o))==="1"),_("paper"),ne(!1),C(void 0),se(void 0),y("");const n=G(o);D.current=n,Ee(n)},[o]),s.useEffect(()=>()=>{window.clearTimeout(T.current),cancelAnimationFrame(R.current)},[]),s.useLayoutEffect(()=>{const e=$.current;if(!e)return;const n=()=>Te(e.clientWidth);n();const l=new ResizeObserver(n);return l.observe(e),()=>l.disconnect()},[t]),s.useEffect(()=>{if(!t)return;document.title=`${t.title} — Papers With Code reader`;let e=document.querySelector('meta[name="robots"]');const n=!e;e||(e=document.createElement("meta"),e.name="robots",document.head.appendChild(e));const l=e.content;e.content="noindex, nofollow";let m=document.querySelector('link[rel="canonical"]');const Ke=!m;m||(m=document.createElement("link"),m.rel="canonical",document.head.appendChild(m));const qe=m.href;return m.href=`${window.location.origin}/paper/${c}`,()=>{document.title="Papers With Code",n?e==null||e.remove():e&&(e.content=l),Ke?m==null||m.remove():m&&(m.href=qe)}},[c,t]);const M=s.useCallback(e=>{if(!k)return Math.max(45,Math.min(75,e));const n=480/k*100,l=100-360/k*100;return Math.max(n,Math.min(l,e))},[k]);s.useEffect(()=>j(e=>{const n=M(e);return A.current=n,n}),[M]);const W=e=>{const n=M(e);A.current=n,j(n),localStorage.setItem(re,String(n))},pe=e=>{var l;const n=M(e);A.current=n,K.current&&(K.current.style.width=`${n}%`),N.current&&(N.current.style.width=`${100-n}%`),(l=ce.current)==null||l.setAttribute("aria-valuenow",String(Math.round(n)))},fe=e=>{U.current=e,!R.current&&(R.current=requestAnimationFrame(()=>{var l;R.current=0;const n=(l=$.current)==null?void 0:l.getBoundingClientRect();n!=null&&n.width&&pe((U.current-n.left)/n.width*100)}))},We=e=>{E.current=!0,ie(!0),e.currentTarget.setPointerCapture(e.pointerId),fe(e.clientX)},V=()=>{var e;if(E.current){if(R.current){cancelAnimationFrame(R.current),R.current=0;const n=(e=$.current)==null?void 0:e.getBoundingClientRect();n!=null&&n.width&&pe((U.current-n.left)/n.width*100)}E.current=!1,j(A.current),localStorage.setItem(re,String(A.current)),ie(!1)}},me=e=>{window.clearTimeout(T.current),F(!0),ae(e),sessionStorage.setItem(Y(o),e?"1":"0"),T.current=window.setTimeout(()=>F(!1),ut+40)},he=e=>{q.current=!0,me(e)};s.useEffect(()=>{var e;q.current&&(q.current=!1,(e=u?le.current:N.current)==null||e.focus())},[u]);const ze=e=>{S(e),sessionStorage.setItem(L(o),e)},Le=()=>{S(void 0),sessionStorage.removeItem(L(o)),C(void 0),y("")},ge=((Pe=d.data)==null?void 0:Pe.paper_reader_selection_enabled)===!0,be=e=>{C(e),y(`Selection from page ${e.page} added to chat`),p&&u&&me(!1)},Be=s.useCallback(e=>{C(e),e||y("")},[]),Q=((we=d.data)==null?void 0:we.paper_reader_citations_enabled)===!0&&!!h,z=ee({queryKey:["paper-layout",c],queryFn:()=>at(c),enabled:Q&&!!c,staleTime:5*6e4}).data,He=s.useMemo(()=>Q?{layout:z,open:e=>{const n=z?Ye(z,e):[];n.length&&(se(l=>({boxes:n,nonce:((l==null?void 0:l.nonce)??0)+1})),_("paper"))}}:null,[Q,z]),ve=Oe()&&((ye=d.data)==null?void 0:ye.paper_reader_chat_enabled)!==!1,X=!!(t&&ve&&!(f&&!Ae)),Fe=t&&ve&&!X?a.jsx("div",{className:"reader-chat-unavailable",role:"status",children:"Chat opens once the paper is ready."}):t&&X?a.jsx(ct,{mode:"paper",routeSessionId:x,primaryPaper:{id:t.id,routeId:c,title:t.title},currentPage:()=>D.current,paperSelection:H,onPaperSelectionChange:Be,onSessionId:ze,onReaderSubmit:()=>_("assistant"),onReaderNewChat:Le,onReaderClose:p?()=>he(!0):void 0}):a.jsx("div",{className:"reader-chat-unavailable",children:"Chat is not enabled for this preview."});return b.isLoading?a.jsx("div",{className:"reader-status",role:"status",children:"Loading paper…"}):b.error||!t?a.jsxs("div",{className:"reader-status",role:"alert",children:[a.jsx("p",{children:"Paper not found."}),a.jsx(Z,{to:"/papers",children:"Browse papers"})]}):((Re=d.data)==null?void 0:Re.native_pdf_reader_enabled)===!1?a.jsxs("div",{className:"reader-status",role:"alert",children:[a.jsx("p",{children:"The native reader is currently unavailable."}),a.jsx(Z,{to:`/paper/${c}`,children:"Back to paper"})]}):!h&&!f?a.jsxs("div",{className:"reader-status",role:"alert",children:[a.jsx("p",{children:"Native reading is unavailable for this resource."}),a.jsx(Z,{to:`/paper/${c}`,children:"Back to paper"})]}):a.jsxs("div",{className:"paper-reader-shell",children:[!p&&a.jsxs("div",{className:"reader-tabs",role:"tablist","aria-label":"Reader panels",children:[a.jsx("button",{type:"button",role:"tab","aria-selected":P==="paper",onClick:()=>_("paper"),children:"Paper"}),a.jsxs("button",{type:"button",role:"tab","aria-selected":P==="assistant","aria-label":H&&P!=="assistant"?"Chat, selection attached":"Chat",onClick:()=>_("assistant"),children:["Chat",H&&P!=="assistant"&&a.jsx("span",{className:"reader-tab-pending","aria-hidden":"true"})]})]}),a.jsx(Ge,{variant:"reader",children:a.jsxs("div",{ref:$,className:`reader-workspace${p?" is-desktop":" is-tabs"}${u?" is-assistant-collapsed":""}${oe?" is-resizing":""}`,"data-testid":"paper-chat-workspace",children:[a.jsx("section",{ref:K,className:`reader-paper-pane${!p&&P!=="paper"?" is-hidden":""}`,style:p?{width:u?"100%":`${w}%`}:void 0,role:"tabpanel","aria-label":"Paper","aria-hidden":!p&&P!=="paper",children:f?a.jsx(dt,{paperId:t.id,paperKey:c,paperTitle:t.title,paperHref:`/paper/${c}`,sourceUrl:f,resources:I,paperVersion:t.version,selectionEnabled:ge,onReady:Ie,onPaperSelection:be,onPaperSelectionError:y}):h&&a.jsx(Je,{url:h,downloadUrl:v??h,paperKey:c,paperTitle:t.title,paperHref:`/paper/${c}`,onClose:g,resources:I,initialPage:Ne,resizeActive:oe||Me,selectionEnabled:ge,paperVersion:t.version,authors:B,loadErrorMessage:t.source==="external"?"Paper content is still being prepared. Please try again later.":void 0,onPaperSelection:be,onPaperSelectionError:y,highlight:ke,onPageChange:e=>{D.current=e,sessionStorage.setItem(Ce(o),String(e))}})}),p&&!u&&a.jsx("div",{ref:ce,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:We,onPointerMove:e=>{E.current&&fe(e.clientX)},onPointerUp:V,onPointerCancel:V,onLostPointerCapture:V,onDoubleClick:()=>W(_e),onKeyDown:e=>{(e.key==="ArrowLeft"||e.key==="ArrowRight")&&(e.preventDefault(),W(w+(e.key==="ArrowRight"?2:-2))),e.key==="Home"&&W(45),e.key==="End"&&W(75)}}),a.jsx("aside",{ref:N,id:"reader-chat-panel",className:`reader-assistant-pane${!p&&P!=="assistant"?" is-hidden":""}${p&&u?" is-collapsed":""}`,style:p?{width:u?0:`${100-w}%`}:void 0,role:"tabpanel","aria-label":"Chat","aria-hidden":!p&&P!=="assistant"||u,tabIndex:-1,children:a.jsx(et.Provider,{value:He,children:Fe})}),a.jsx("div",{className:"sr-only","aria-live":"polite",children:$e}),p&&(u||!X)&&a.jsx("button",{ref:le,type:"button",className:"reader-collapse-assistant","aria-controls":"reader-chat-panel","aria-expanded":!u,onClick:()=>he(!u),children:u?"Open chat":"Hide chat"})]})})]})}function sr(){const{paperId:r=""}=Se();return a.jsx(Xe,{workspaceKey:`reader:${r}`,children:a.jsx(vt,{})})}export{sr as default,bt as readerToolbarResources};
assets/{PapersListView-zhvzkmK9.js → PapersListView-DhkGuTns.js} RENAMED
@@ -1 +1 @@
1
- import{r as f,j as e,L as x,g as K}from"./index-YwiKC6Po.js";import{T as V}from"./SotaBadges-DiQuEzfo.js";import{I as H}from"./Icon-DXQ4sjQk.js";import{u as X,P as J,b as W,c as Y,a as Z}from"./PaperFeed-kaLm5US2.js";import{c as ee}from"./catalog-B15Yh5dN.js";import{a as M,p as O}from"./paperQueryKeys-C5FMa4Oj.js";import{t as re,d as se}from"./transform-CNg3rvXk.js";import{u as z}from"./usePapers-C1deOZKl.js";import{u as ae}from"./useDebounce-BFugPTG4.js";import{S as te}from"./skeleton-CXR1qouH.js";import{A as ne,a as ie}from"./alert-Cx5luC5D.js";import{u as oe}from"./useQuery-DPH6Mb2w.js";import{i as le}from"./apiErrors-DBfE_SVR.js";import{f as ce}from"./frameworks-DDA0P4Tf.js";import"./colors-BkWRhvFI.js";import"./PaperCard-FG-bEpJk.js";import"./AuthorAvatar-CoTET6B3.js";import"./LatexTitle-DI6voLfI.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-D7ygxg37.js";import"./useIntersectionObserver-Dt36kyjs.js";import"./curation-CkzNFTMJ.js";import"./useInfiniteQuery-BEbL80ez.js";const g=360;function de(s,t){const c=s.toLocaleLowerCase();return t.trim().split(/\s+/).filter(Boolean).reduce((i,l)=>{const o=c.indexOf(l.toLocaleLowerCase());return o>=0&&(i<0||o<i)?o:i},-1)}function G(s,t,c){if((s.slice(0,t).match(/\$/g)||[]).length%2===0)return t;if(c==="start")return s.lastIndexOf("$",t)+1;const l=s.indexOf("$",t);return l>=0?l+1:t}function me(s,t){if(s.length<=g)return s;const c=de(s,t);if(c<0||c<g*.6)return s;let i=Math.max(0,c-Math.floor(g*.35)),l=Math.min(s.length,i+g);return i=G(s,i,"start"),l=G(s,l,"end"),`${i>0?"…":""}${s.slice(i,l).trim()}${l<s.length?"…":""}`}const pe=[["relevance","relevance"],["date_published","newest"],["citation_count","most cited"]],Ae=()=>{var L,R,D,$,T,A,B,I,q;const s=X(),{searchParams:t,setSearchParams:c}=s,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=ae(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&&s.orderBy==="trending"?"relevance":s.orderBy,S=!o&&s.hasCode,P={...s.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=z([...O.feeds.infinite,P],a=>M.list({...P,page:a,page_size:20}),{enabled:!n}),_={q:h.trim(),order_by:j==="trending"?"relevance":j,start_date:s.dateRange.startDate,end_date:s.dateRange.endDate,has_code:S,has_hf_artifacts:s.hasHfArtifacts},C=z([...O.feeds.search,_],a=>M.searchFeed({..._,page:a,page_size:20,mode:"hybrid"}),{enabled:n&&_.q.length>0}),p=n?C:k,E=oe({queryKey:["top-tasks-sidebar"],queryFn:()=>ee.topTasks(8),enabled:!o&&!n,staleTime:10*60*1e3}),v=f.useMemo(()=>{var m;return(((m=p.data)==null?void 0:m.pages.flatMap(N=>N.results))||[]).map(N=>{const w=re(N);return n?{...w,abstract:me(w.abstract,d)}:w})},[p.data,n,d]),u=((D=(R=(L=k.data)==null?void 0:L.pages)==null?void 0:R[0])==null?void 0:D.count)??0,r=(A=(T=($=k.data)==null?void 0:$.pages)==null?void 0:T[0])==null?void 0:A.scope,y=(I=(B=C.data)==null?void 0:B.pages)==null?void 0:I.at(-1),Q=i&&le(p.error),U=(r==null?void 0:r.kind)==="framework"?r.framework_name:r==null?void 0:r.repository;return e.jsxs("div",{className:"page",children:[(r==null?void 0:r.kind)==="framework"&&e.jsxs("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:[e.jsx(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:r.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?(r==null?void 0:r.kind)==="framework"?u>0&&`${u.toLocaleString()} papers.`:r!=null&&r.repository?e.jsxs(e.Fragment,{children:["GitHub repository ",e.jsx("strong",{children:r.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&&r&&e.jsxs("div",{className:"paper-feed-scope-links",children:[e.jsxs("div",{className:"paper-feed-primary-links",children:[r.github_url&&e.jsxs("a",{href:r.github_url,target:"_blank",rel:"noopener noreferrer",className:r.kind==="framework"?"task-framework-link":"framework-link",children:[e.jsx(H,{name:"github",size:13}),r.kind==="framework"?e.jsxs(e.Fragment,{children:[e.jsx("span",{children:r.repository||"GitHub"}),r.num_stars!=null&&e.jsxs("span",{className:"task-framework-link-stars",children:["★ ",ce(r.num_stars)]})]}):"GitHub"]}),r.kind==="framework"&&r.introducing_paper_arxiv_id&&e.jsx(x,{to:`/paper/${r.introducing_paper_arxiv_id}`,className:"framework-link",children:"Introducing paper"})]}),r.kind==="framework"&&r.recommended_tasks&&r.recommended_tasks.length>0&&e.jsx("div",{className:"paper-feed-task-tags",children:r.recommended_tasks.map(a=>a.slug?e.jsx(V,{slug:a.slug,label:a.name},a.id):null)})]})]}),e.jsx(J,{startDate:s.dateRange.startDate,endDate:s.dateRange.endDate,onChange:s.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"}),E.isLoading&&e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:Array.from({length:6}).map((a,m)=>e.jsx(te,{className:"h-5 w-full"},m))}),e.jsx("div",{className:"sidebar-links",children:(q=E.data)==null?void 0:q.map(a=>e.jsxs(x,{to:`/tasks/${a.slug}`,className:"sidebar-link",children:[se(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(W,{feed:s,sorts:n?pe:Y,activeSort:j,showDateFilter:!1,showHasCode:!o,children:e.jsxs("div",{className:"results-count",children:[v.length," loaded"]})}),Q?e.jsx("div",{className:"no-results",children:"Framework not found."}):e.jsxs(e.Fragment,{children:[p.error&&e.jsx(ne,{variant:"destructive",className:"mb-4",children:e.jsx(ie,{children:"Failed to load papers. Please try again."})}),e.jsx(Z,{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&&K()&&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{Ae as default};
 
1
+ import{r as f,j as e,L as x,g as K}from"./index-CbgxfyGU.js";import{T as V}from"./SotaBadges-C-sTR-EF.js";import{I as H}from"./Icon-D-kA0Owz.js";import{u as X,P as J,b as W,c as Y,a as Z}from"./PaperFeed-DMvUfA47.js";import{c as ee}from"./catalog-DhK7_9-6.js";import{a as M,p as O}from"./paperQueryKeys-B8u1BWlI.js";import{t as re,d as se}from"./transform-0Udg2p6b.js";import{u as z}from"./usePapers-CJaWLZ3y.js";import{u as ae}from"./useDebounce-DkuI5tkx.js";import{S as te}from"./skeleton-HwvdxvSN.js";import{A as ne,a as ie}from"./alert-CFDDvdIM.js";import{u as oe}from"./useQuery-Bx9s5-D2.js";import{i as le}from"./apiErrors-BZ5h1Kmb.js";import{f as ce}from"./frameworks-DDA0P4Tf.js";import"./colors-BkWRhvFI.js";import"./PaperCard-tdTC_dRN.js";import"./AuthorAvatar-CUJMmp_z.js";import"./LatexTitle-Z-HGmZ-H.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-DKJYnYjk.js";import"./useIntersectionObserver-CID9Kkak.js";import"./curation-C7Gmmp4z.js";import"./useInfiniteQuery-BAc_4HO5.js";const g=360;function de(s,t){const c=s.toLocaleLowerCase();return t.trim().split(/\s+/).filter(Boolean).reduce((i,l)=>{const o=c.indexOf(l.toLocaleLowerCase());return o>=0&&(i<0||o<i)?o:i},-1)}function G(s,t,c){if((s.slice(0,t).match(/\$/g)||[]).length%2===0)return t;if(c==="start")return s.lastIndexOf("$",t)+1;const l=s.indexOf("$",t);return l>=0?l+1:t}function me(s,t){if(s.length<=g)return s;const c=de(s,t);if(c<0||c<g*.6)return s;let i=Math.max(0,c-Math.floor(g*.35)),l=Math.min(s.length,i+g);return i=G(s,i,"start"),l=G(s,l,"end"),`${i>0?"…":""}${s.slice(i,l).trim()}${l<s.length?"…":""}`}const pe=[["relevance","relevance"],["date_published","newest"],["citation_count","most cited"]],Ae=()=>{var L,R,D,$,T,A,B,I,q;const s=X(),{searchParams:t,setSearchParams:c}=s,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=ae(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&&s.orderBy==="trending"?"relevance":s.orderBy,S=!o&&s.hasCode,P={...s.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=z([...O.feeds.infinite,P],a=>M.list({...P,page:a,page_size:20}),{enabled:!n}),_={q:h.trim(),order_by:j==="trending"?"relevance":j,start_date:s.dateRange.startDate,end_date:s.dateRange.endDate,has_code:S,has_hf_artifacts:s.hasHfArtifacts},C=z([...O.feeds.search,_],a=>M.searchFeed({..._,page:a,page_size:20,mode:"hybrid"}),{enabled:n&&_.q.length>0}),p=n?C:k,E=oe({queryKey:["top-tasks-sidebar"],queryFn:()=>ee.topTasks(8),enabled:!o&&!n,staleTime:10*60*1e3}),v=f.useMemo(()=>{var m;return(((m=p.data)==null?void 0:m.pages.flatMap(N=>N.results))||[]).map(N=>{const w=re(N);return n?{...w,abstract:me(w.abstract,d)}:w})},[p.data,n,d]),u=((D=(R=(L=k.data)==null?void 0:L.pages)==null?void 0:R[0])==null?void 0:D.count)??0,r=(A=(T=($=k.data)==null?void 0:$.pages)==null?void 0:T[0])==null?void 0:A.scope,y=(I=(B=C.data)==null?void 0:B.pages)==null?void 0:I.at(-1),Q=i&&le(p.error),U=(r==null?void 0:r.kind)==="framework"?r.framework_name:r==null?void 0:r.repository;return e.jsxs("div",{className:"page",children:[(r==null?void 0:r.kind)==="framework"&&e.jsxs("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:[e.jsx(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:r.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?(r==null?void 0:r.kind)==="framework"?u>0&&`${u.toLocaleString()} papers.`:r!=null&&r.repository?e.jsxs(e.Fragment,{children:["GitHub repository ",e.jsx("strong",{children:r.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&&r&&e.jsxs("div",{className:"paper-feed-scope-links",children:[e.jsxs("div",{className:"paper-feed-primary-links",children:[r.github_url&&e.jsxs("a",{href:r.github_url,target:"_blank",rel:"noopener noreferrer",className:r.kind==="framework"?"task-framework-link":"framework-link",children:[e.jsx(H,{name:"github",size:13}),r.kind==="framework"?e.jsxs(e.Fragment,{children:[e.jsx("span",{children:r.repository||"GitHub"}),r.num_stars!=null&&e.jsxs("span",{className:"task-framework-link-stars",children:["★ ",ce(r.num_stars)]})]}):"GitHub"]}),r.kind==="framework"&&r.introducing_paper_arxiv_id&&e.jsx(x,{to:`/paper/${r.introducing_paper_arxiv_id}`,className:"framework-link",children:"Introducing paper"})]}),r.kind==="framework"&&r.recommended_tasks&&r.recommended_tasks.length>0&&e.jsx("div",{className:"paper-feed-task-tags",children:r.recommended_tasks.map(a=>a.slug?e.jsx(V,{slug:a.slug,label:a.name},a.id):null)})]})]}),e.jsx(J,{startDate:s.dateRange.startDate,endDate:s.dateRange.endDate,onChange:s.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"}),E.isLoading&&e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:Array.from({length:6}).map((a,m)=>e.jsx(te,{className:"h-5 w-full"},m))}),e.jsx("div",{className:"sidebar-links",children:(q=E.data)==null?void 0:q.map(a=>e.jsxs(x,{to:`/tasks/${a.slug}`,className:"sidebar-link",children:[se(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(W,{feed:s,sorts:n?pe:Y,activeSort:j,showDateFilter:!1,showHasCode:!o,children:e.jsxs("div",{className:"results-count",children:[v.length," loaded"]})}),Q?e.jsx("div",{className:"no-results",children:"Framework not found."}):e.jsxs(e.Fragment,{children:[p.error&&e.jsx(ne,{variant:"destructive",className:"mb-4",children:e.jsx(ie,{children:"Failed to load papers. Please try again."})}),e.jsx(Z,{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&&K()&&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{Ae as default};
assets/{PrivacyView-B0DBzRMW.js → PrivacyView-CodFIqUq.js} RENAMED
@@ -1 +1 @@
1
- import{K as s,j as e}from"./index-YwiKC6Po.js";import{f as i,D as r}from"./latexPlainText-DI8YEXVe.js";const n=()=>(s.useEffect(()=>(document.title=i("Privacy Policy"),()=>{document.title=r}),[]),e.jsxs("article",{className:"page legal-page",children:[e.jsxs("header",{className:"legal-header",children:[e.jsx("p",{className:"legal-kicker",children:"Legal"}),e.jsx("h1",{children:"Privacy Policy"}),e.jsx("p",{className:"legal-effective-date",children:"Effective August 11, 2026"})]}),e.jsx("p",{children:"This Privacy Policy explains how Hugging Face, Inc. (“Hugging Face,” “we,” or “us”) collects, uses, and shares information when you use Papers With Code, including its website, research assistant, APIs, and related services (the “Service”)."}),e.jsxs("section",{children:[e.jsx("h2",{children:"1. Information we collect"}),e.jsx("h3",{children:"Information you provide"}),e.jsxs("ul",{children:[e.jsxs("li",{children:[e.jsx("strong",{children:"Account information."})," If you sign in with Hugging Face, we receive account identifiers and profile details needed to authenticate you, such as your user ID, username, and avatar. If you request contributor access, we also receive and retain the verified email address associated with your Hugging Face account so we can review and communicate about your request."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Contributions and preferences."})," We collect information you submit or save, such as paper submissions and edits, bookmarks, display preferences, feedback, and communications with us. Material you submit to a public research page may be publicly visible."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Research assistant content."})," We collect your questions, conversation history, generated answers, citations, tool calls and results, and feedback about answers. Chats are private to your account unless you choose to create a share link; anyone with that link may be able to view the shared chat."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Provider and billing information."})," If you enable a model provider, we process the authorization or API credentials needed to make requests on your behalf. Hugging Face or another provider processes its own billing information under its terms. Papers With Code does not collect your payment-card details."]})]}),e.jsx("h3",{children:"Information collected automatically"}),e.jsx("p",{children:"We collect technical and usage information such as IP address, browser and device type, operating system, pages or features used, dates and times, referring pages, request identifiers, cookies, logs, and diagnostic data. For research-assistant requests, this may include the selected model, token and cost details, latency, errors, and other operational metadata."}),e.jsx("h3",{children:"Research assistant tracing"}),e.jsxs("p",{children:["To evaluate, debug, secure, and improve the research assistant, we use Langfuse to record traces. A trace may contain the complete text of your question and the assistant's answer, as well as tool inputs, tool outputs, retrieved research material, model details, usage data, and related operational metadata.",e.jsx("strong",{children:" This trace content is not redacted before it is sent to Langfuse."})]}),e.jsx("p",{children:"Papers With Code is designed for questions about research literature. Do not put passwords, API keys, confidential information, health or financial data, or other sensitive personal information in research-assistant prompts."})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"2. How we use information"}),e.jsx("p",{children:"We use information to:"}),e.jsxs("ul",{children:[e.jsx("li",{children:"provide, personalize, maintain, and operate the Service;"}),e.jsx("li",{children:"authenticate users and keep accounts and the Service secure;"}),e.jsx("li",{children:"run research-assistant requests and preserve conversation history;"}),e.jsx("li",{children:"measure performance, troubleshoot failures, and improve quality;"}),e.jsx("li",{children:"review contributions, prevent abuse, and enforce applicable terms;"}),e.jsx("li",{children:"communicate with you and respond to requests; and"}),e.jsx("li",{children:"comply with law and protect users, Hugging Face, and the public."})]})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"3. How we share information"}),e.jsx("p",{children:"We may share information in these circumstances:"}),e.jsxs("ul",{children:[e.jsxs("li",{children:[e.jsx("strong",{children:"Service providers."})," Vendors process information for hosting, authentication, analytics, observability, security, and support. These include Hugging Face services, Langfuse for research-assistant tracing, Plausible for website analytics, and infrastructure providers."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Model providers."})," Research-assistant content is sent to the model provider you use, such as Hugging Face Inference Providers or OpenRouter, so it can generate a response. That provider's privacy terms also apply to its processing."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Public and shared content."})," Contributions intended for public pages are public. A chat is disclosed through the Service when you create and distribute a share link."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Legal, safety, and corporate events."})," We may disclose information when reasonably necessary to comply with law, protect rights and safety, investigate abuse, or complete a merger, acquisition, financing, or transfer of assets."]})]}),e.jsx("p",{children:"We do not sell your personal information."})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"4. Cookies and analytics"}),e.jsx("p",{children:"We use cookies and similar storage when needed for sign-in, security, preferences, and operation of the Service. We also use Plausible to understand aggregate website usage. You can control cookies through your browser, but disabling necessary cookies may prevent account features from working."})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"5. Legal bases"}),e.jsx("p",{children:"Where applicable law requires a legal basis, we process information as needed to perform our agreement with you, with your consent, to comply with legal obligations, and for legitimate interests such as operating, securing, and improving the Service. You may withdraw consent where consent is the basis for processing, without affecting earlier processing."})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"6. Retention and deletion"}),e.jsx("p",{children:"Private chats are retained until you delete them, subject to limits of 500 active chats and 100 MB of chat data per user. Archiving hides a chat and frees active-chat quota but does not delete it. You may deliberately share an unlisted snapshot; deleting its private chat removes the durable transcript, workspace reference, and share link after deletion is verified. No dedicated private-chat export format is currently offered."}),e.jsx("p",{children:"We keep information for as long as reasonably needed for the purposes described here, including providing the Service, maintaining security and audit records, resolving disputes, and meeting legal obligations. Retention periods vary by data type and service provider. You can delete individual chats in the Service. Deletion may not immediately remove information from backups, security logs, or third-party systems where limited retention is required."})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"7. Security and international transfers"}),e.jsx("p",{children:"We use reasonable administrative, technical, and organizational safeguards, but no internet service can guarantee absolute security. We and our service providers may process information in the United States and other countries, which may have different data-protection laws from your country. Where required, we use appropriate safeguards for international transfers."})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"8. Your privacy rights"}),e.jsx("p",{children:"Depending on where you live, you may have rights to access, correct, delete, or receive a copy of your personal information; object to or restrict processing; withdraw consent; or appeal a decision about a request. You may also have the right to complain to a data-protection authority. We may need to verify your identity before fulfilling a request."})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"9. Children"}),e.jsx("p",{children:"The Service is not directed to children under 13, and we do not knowingly collect personal information from children under 13. If you believe a child has provided personal information, please contact us."})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"10. Changes to this policy"}),e.jsx("p",{children:"We may update this policy as the Service changes. We will post the revised policy here and update its effective date. If a change is material, we will provide additional notice when appropriate."})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"11. Contact us"}),e.jsxs("p",{children:["For questions or privacy requests, contact"," ",e.jsx("a",{href:"mailto:privacy@huggingface.co",children:"privacy@huggingface.co"}),". Please do not include passwords, API keys, or other sensitive credentials in your message."]})]})]}));export{n as default};
 
1
+ import{M as s,j as e}from"./index-CbgxfyGU.js";import{f as i,D as r}from"./latexPlainText-DI8YEXVe.js";const n=()=>(s.useEffect(()=>(document.title=i("Privacy Policy"),()=>{document.title=r}),[]),e.jsxs("article",{className:"page legal-page",children:[e.jsxs("header",{className:"legal-header",children:[e.jsx("p",{className:"legal-kicker",children:"Legal"}),e.jsx("h1",{children:"Privacy Policy"}),e.jsx("p",{className:"legal-effective-date",children:"Effective August 11, 2026"})]}),e.jsx("p",{children:"This Privacy Policy explains how Hugging Face, Inc. (“Hugging Face,” “we,” or “us”) collects, uses, and shares information when you use Papers With Code, including its website, research assistant, APIs, and related services (the “Service”)."}),e.jsxs("section",{children:[e.jsx("h2",{children:"1. Information we collect"}),e.jsx("h3",{children:"Information you provide"}),e.jsxs("ul",{children:[e.jsxs("li",{children:[e.jsx("strong",{children:"Account information."})," If you sign in with Hugging Face, we receive account identifiers and profile details needed to authenticate you, such as your user ID, username, and avatar. If you request contributor access, we also receive and retain the verified email address associated with your Hugging Face account so we can review and communicate about your request."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Contributions and preferences."})," We collect information you submit or save, such as paper submissions and edits, bookmarks, display preferences, feedback, and communications with us. Material you submit to a public research page may be publicly visible."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Research assistant content."})," We collect your questions, conversation history, generated answers, citations, tool calls and results, and feedback about answers. Chats are private to your account unless you choose to create a share link; anyone with that link may be able to view the shared chat."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Provider and billing information."})," If you enable a model provider, we process the authorization or API credentials needed to make requests on your behalf. Hugging Face or another provider processes its own billing information under its terms. Papers With Code does not collect your payment-card details."]})]}),e.jsx("h3",{children:"Information collected automatically"}),e.jsx("p",{children:"We collect technical and usage information such as IP address, browser and device type, operating system, pages or features used, dates and times, referring pages, request identifiers, cookies, logs, and diagnostic data. For research-assistant requests, this may include the selected model, token and cost details, latency, errors, and other operational metadata."}),e.jsx("h3",{children:"Research assistant tracing"}),e.jsxs("p",{children:["To evaluate, debug, secure, and improve the research assistant, we use Langfuse to record traces. A trace may contain the complete text of your question and the assistant's answer, as well as tool inputs, tool outputs, retrieved research material, model details, usage data, and related operational metadata.",e.jsx("strong",{children:" This trace content is not redacted before it is sent to Langfuse."})]}),e.jsx("p",{children:"Papers With Code is designed for questions about research literature. Do not put passwords, API keys, confidential information, health or financial data, or other sensitive personal information in research-assistant prompts."})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"2. How we use information"}),e.jsx("p",{children:"We use information to:"}),e.jsxs("ul",{children:[e.jsx("li",{children:"provide, personalize, maintain, and operate the Service;"}),e.jsx("li",{children:"authenticate users and keep accounts and the Service secure;"}),e.jsx("li",{children:"run research-assistant requests and preserve conversation history;"}),e.jsx("li",{children:"measure performance, troubleshoot failures, and improve quality;"}),e.jsx("li",{children:"review contributions, prevent abuse, and enforce applicable terms;"}),e.jsx("li",{children:"communicate with you and respond to requests; and"}),e.jsx("li",{children:"comply with law and protect users, Hugging Face, and the public."})]})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"3. How we share information"}),e.jsx("p",{children:"We may share information in these circumstances:"}),e.jsxs("ul",{children:[e.jsxs("li",{children:[e.jsx("strong",{children:"Service providers."})," Vendors process information for hosting, authentication, analytics, observability, security, and support. These include Hugging Face services, Langfuse for research-assistant tracing, Plausible for website analytics, and infrastructure providers."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Model providers."})," Research-assistant content is sent to the model provider you use, such as Hugging Face Inference Providers or OpenRouter, so it can generate a response. That provider's privacy terms also apply to its processing."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Public and shared content."})," Contributions intended for public pages are public. A chat is disclosed through the Service when you create and distribute a share link."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Legal, safety, and corporate events."})," We may disclose information when reasonably necessary to comply with law, protect rights and safety, investigate abuse, or complete a merger, acquisition, financing, or transfer of assets."]})]}),e.jsx("p",{children:"We do not sell your personal information."})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"4. Cookies and analytics"}),e.jsx("p",{children:"We use cookies and similar storage when needed for sign-in, security, preferences, and operation of the Service. We also use Plausible to understand aggregate website usage. You can control cookies through your browser, but disabling necessary cookies may prevent account features from working."})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"5. Legal bases"}),e.jsx("p",{children:"Where applicable law requires a legal basis, we process information as needed to perform our agreement with you, with your consent, to comply with legal obligations, and for legitimate interests such as operating, securing, and improving the Service. You may withdraw consent where consent is the basis for processing, without affecting earlier processing."})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"6. Retention and deletion"}),e.jsx("p",{children:"Private chats are retained until you delete them, subject to limits of 500 active chats and 100 MB of chat data per user. Archiving hides a chat and frees active-chat quota but does not delete it. You may deliberately share an unlisted snapshot; deleting its private chat removes the durable transcript, workspace reference, and share link after deletion is verified. No dedicated private-chat export format is currently offered."}),e.jsx("p",{children:"We keep information for as long as reasonably needed for the purposes described here, including providing the Service, maintaining security and audit records, resolving disputes, and meeting legal obligations. Retention periods vary by data type and service provider. You can delete individual chats in the Service. Deletion may not immediately remove information from backups, security logs, or third-party systems where limited retention is required."})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"7. Security and international transfers"}),e.jsx("p",{children:"We use reasonable administrative, technical, and organizational safeguards, but no internet service can guarantee absolute security. We and our service providers may process information in the United States and other countries, which may have different data-protection laws from your country. Where required, we use appropriate safeguards for international transfers."})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"8. Your privacy rights"}),e.jsx("p",{children:"Depending on where you live, you may have rights to access, correct, delete, or receive a copy of your personal information; object to or restrict processing; withdraw consent; or appeal a decision about a request. You may also have the right to complain to a data-protection authority. We may need to verify your identity before fulfilling a request."})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"9. Children"}),e.jsx("p",{children:"The Service is not directed to children under 13, and we do not knowingly collect personal information from children under 13. If you believe a child has provided personal information, please contact us."})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"10. Changes to this policy"}),e.jsx("p",{children:"We may update this policy as the Service changes. We will post the revised policy here and update its effective date. If a change is material, we will provide additional notice when appropriate."})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"11. Contact us"}),e.jsxs("p",{children:["For questions or privacy requests, contact"," ",e.jsx("a",{href:"mailto:privacy@huggingface.co",children:"privacy@huggingface.co"}),". Please do not include passwords, API keys, or other sensitive credentials in your message."]})]})]}));export{n as default};
assets/{RateLimitsView-JyYAwVUh.js → RateLimitsView-C9bDo_Dq.js} RENAMED
@@ -1 +1 @@
1
- import{j as e,M as t}from"./index-YwiKC6Po.js";import{u as s}from"./useQuery-DPH6Mb2w.js";const n=()=>{const i=s({queryKey:["submission-rate-limit-policy"],queryFn:()=>t.getRateLimitPolicy()}).data;return e.jsxs("div",{className:"page",style:{maxWidth:760},children:[e.jsx("h1",{children:"Submission and rate-limit policy"}),i?e.jsxs(e.Fragment,{children:[e.jsxs("p",{children:["Each account may have up to ",i.active_pending," active submissions."]}),e.jsxs("p",{children:["New submissions are limited to ",i.subject_per_hour," per account and ",i.ip_per_hour," per source network in a rolling hour."]})]}):e.jsx("p",{children:"Loading current limits…"}),e.jsx("p",{children:"Duplicate, no-op, and idempotently replayed requests do not consume creation quota."}),e.jsx("p",{children:"Rate-limited responses use HTTP 429 with Retry-After, RateLimit, and RateLimit-Policy headers."}),e.jsx("p",{children:"Good-faith contributors who are blocked should contact the Papers with Code maintainers with their Hugging Face username."})]})};export{n as default};
 
1
+ import{j as e,N as t}from"./index-CbgxfyGU.js";import{u as s}from"./useQuery-Bx9s5-D2.js";const n=()=>{const i=s({queryKey:["submission-rate-limit-policy"],queryFn:()=>t.getRateLimitPolicy()}).data;return e.jsxs("div",{className:"page",style:{maxWidth:760},children:[e.jsx("h1",{children:"Submission and rate-limit policy"}),i?e.jsxs(e.Fragment,{children:[e.jsxs("p",{children:["Each account may have up to ",i.active_pending," active submissions."]}),e.jsxs("p",{children:["New submissions are limited to ",i.subject_per_hour," per account and ",i.ip_per_hour," per source network in a rolling hour."]})]}):e.jsx("p",{children:"Loading current limits…"}),e.jsx("p",{children:"Duplicate, no-op, and idempotently replayed requests do not consume creation quota."}),e.jsx("p",{children:"Rate-limited responses use HTTP 429 with Retry-After, RateLimit, and RateLimit-Policy headers."}),e.jsx("p",{children:"Good-faith contributors who are blocked should contact the Papers with Code maintainers with their Hugging Face username."})]})};export{n as default};
assets/{ResearchFollowButton-BFXC8E3t.js → ResearchFollowButton-D2BXlDtQ.js} RENAMED
@@ -1 +1 @@
1
- import{d as y,b as F,f as N,r as S,i as v,j as e,h as C,C as L,L as c}from"./index-YwiKC6Po.js";import{u as G}from"./useQuery-DPH6Mb2w.js";import{u as Q}from"./useMutation-f6iDkf3w.js";import{r as m}from"./research-5UpiU-ea.js";import{P as p}from"./plus-Cfz0QbT1.js";const j={task:"Get new papers on this task",method:"Get new papers using this method",benchmark:"Get new results on this benchmark",author:"Get new papers by this author",organization:"Get new papers from this organization"};function _({kind:a,entityId:t}){var f;const l=y(),s=l==null?void 0:l.user,h=F(),n=N(),[x,g]=S.useState(null),u=`${a}:${t}`,d=["research-follows",s==null?void 0:s.hf_subject],r=G({queryKey:d,queryFn:m.follows,enabled:!!s}),o=((f=r.data)==null?void 0:f.some(w=>w.kind===a&&String(w.entity_id)===String(t)))??!1,i=Q({mutationFn:()=>m.setFollow(a,t,!o),onSuccess:async()=>{g(o?null:u),await n.invalidateQueries({queryKey:d}),await n.invalidateQueries({queryKey:["research-feed",s==null?void 0:s.hf_subject]}),await n.invalidateQueries({queryKey:["research-email",s==null?void 0:s.hf_subject]})}});if(!l||!s&&v())return null;if(!s)return e.jsxs("div",{className:"research-follow",children:[e.jsxs("a",{className:"research-follow-btn",href:C(h.pathname+h.search),children:[e.jsx(p,{"aria-hidden":"true"}),"Follow"]}),e.jsxs("span",{className:"research-follow-hint",children:["Sign in to ",j[a].toLowerCase(),"."]})]});const b=i.error||r.error;return e.jsxs("div",{className:"research-follow",children:[e.jsx("button",{type:"button",className:o?"research-follow-btn is-following":"research-follow-btn",disabled:r.isLoading||!!r.error||i.isPending,"aria-pressed":o,"aria-label":o?"Unfollow":"Follow",onClick:()=>i.mutate(),children:o?e.jsxs(e.Fragment,{children:[e.jsx(L,{"aria-hidden":"true"}),e.jsx("span",{className:"research-follow-label",children:"Following"}),e.jsx("span",{className:"research-follow-label-hover",children:"Unfollow"})]}):e.jsxs(e.Fragment,{children:[e.jsx(p,{"aria-hidden":"true"}),"Follow"]})}),b?e.jsx("span",{className:"research-follow-hint is-error",role:"alert",children:"Could not update follows. Please try again."}):o?x===u&&e.jsxs("span",{className:"research-follow-hint",role:"status",children:["Added to ",e.jsx(c,{to:"/following",children:"your Following feed"})," · ",e.jsx(c,{to:"/settings",children:"Manage in Settings"})]}):e.jsxs("span",{className:"research-follow-hint",children:[j[a]," in ",e.jsx(c,{to:"/following",children:"your Following feed"}),"."]})]})}export{_ as R};
 
1
+ import{d as y,b as F,f as N,r as S,i as v,j as e,h as C,C as L,L as c}from"./index-CbgxfyGU.js";import{u as G}from"./useQuery-Bx9s5-D2.js";import{u as Q}from"./useMutation-P_trTy9i.js";import{r as m}from"./research-DgpyzSy_.js";import{P as p}from"./plus-UK0TEjgd.js";const j={task:"Get new papers on this task",method:"Get new papers using this method",benchmark:"Get new results on this benchmark",author:"Get new papers by this author",organization:"Get new papers from this organization"};function _({kind:a,entityId:t}){var f;const l=y(),s=l==null?void 0:l.user,h=F(),n=N(),[x,g]=S.useState(null),u=`${a}:${t}`,d=["research-follows",s==null?void 0:s.hf_subject],r=G({queryKey:d,queryFn:m.follows,enabled:!!s}),o=((f=r.data)==null?void 0:f.some(w=>w.kind===a&&String(w.entity_id)===String(t)))??!1,i=Q({mutationFn:()=>m.setFollow(a,t,!o),onSuccess:async()=>{g(o?null:u),await n.invalidateQueries({queryKey:d}),await n.invalidateQueries({queryKey:["research-feed",s==null?void 0:s.hf_subject]}),await n.invalidateQueries({queryKey:["research-email",s==null?void 0:s.hf_subject]})}});if(!l||!s&&v())return null;if(!s)return e.jsxs("div",{className:"research-follow",children:[e.jsxs("a",{className:"research-follow-btn",href:C(h.pathname+h.search),children:[e.jsx(p,{"aria-hidden":"true"}),"Follow"]}),e.jsxs("span",{className:"research-follow-hint",children:["Sign in to ",j[a].toLowerCase(),"."]})]});const b=i.error||r.error;return e.jsxs("div",{className:"research-follow",children:[e.jsx("button",{type:"button",className:o?"research-follow-btn is-following":"research-follow-btn",disabled:r.isLoading||!!r.error||i.isPending,"aria-pressed":o,"aria-label":o?"Unfollow":"Follow",onClick:()=>i.mutate(),children:o?e.jsxs(e.Fragment,{children:[e.jsx(L,{"aria-hidden":"true"}),e.jsx("span",{className:"research-follow-label",children:"Following"}),e.jsx("span",{className:"research-follow-label-hover",children:"Unfollow"})]}):e.jsxs(e.Fragment,{children:[e.jsx(p,{"aria-hidden":"true"}),"Follow"]})}),b?e.jsx("span",{className:"research-follow-hint is-error",role:"alert",children:"Could not update follows. Please try again."}):o?x===u&&e.jsxs("span",{className:"research-follow-hint",role:"status",children:["Added to ",e.jsx(c,{to:"/following",children:"your Following feed"})," · ",e.jsx(c,{to:"/settings",children:"Manage in Settings"})]}):e.jsxs("span",{className:"research-follow-hint",children:[j[a]," in ",e.jsx(c,{to:"/following",children:"your Following feed"}),"."]})]})}export{_ as R};
assets/{SavedPapersView-CWUM_gRn.js → SavedPapersView-CewIlVsw.js} RENAMED
@@ -1 +1 @@
1
- import{a as g,J as v,j as e,H as x,L as j,M as b}from"./index-YwiKC6Po.js";import{p as f}from"./paperQueryKeys-C5FMa4Oj.js";import{u as N}from"./useQuery-DPH6Mb2w.js";import{P as k}from"./PaperCard-FG-bEpJk.js";import{T as y}from"./SotaBadges-DiQuEzfo.js";import{S as r}from"./skeleton-CXR1qouH.js";import{A as w,a as A}from"./alert-Cx5luC5D.js";import{t as B}from"./transform-CNg3rvXk.js";import{s as F}from"./savedPapersAuth-k5u0Ozsk.js";import"./curation-CkzNFTMJ.js";import"./AuthorAvatar-CoTET6B3.js";import"./Icon-DXQ4sjQk.js";import"./LatexTitle-DI6voLfI.js";import"./safeExternalHref-CkBrsh84.js";import"./colors-BkWRhvFI.js";const M=()=>{var d,l;const{user:i,isLoading:m}=g(),a=N({queryKey:[...f.feeds.saved],queryFn:()=>b.getBookmarks(),enabled:!!i,staleTime:30*1e3,refetchOnWindowFocus:!1}),c=a.error instanceof v&&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(x,{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(w,{variant:"destructive",className:"mb-4",children:e.jsx(A,{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(j,{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(y,{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(k,{paper:B(u),priority:h++<3},u.id))})]},`task-${t.id??"other"}-${s.id??"untagged"}`)})]},`area-${t.id??"other"}`))]})};export{M as default};
 
1
+ import{a as g,K as v,j as e,H as x,L as j,N as b}from"./index-CbgxfyGU.js";import{p as f}from"./paperQueryKeys-B8u1BWlI.js";import{u as N}from"./useQuery-Bx9s5-D2.js";import{P as k}from"./PaperCard-tdTC_dRN.js";import{T as y}from"./SotaBadges-C-sTR-EF.js";import{S as r}from"./skeleton-HwvdxvSN.js";import{A as w,a as A}from"./alert-CFDDvdIM.js";import{t as B}from"./transform-0Udg2p6b.js";import{s as F}from"./savedPapersAuth-DsQUuWa_.js";import"./curation-C7Gmmp4z.js";import"./AuthorAvatar-CUJMmp_z.js";import"./Icon-D-kA0Owz.js";import"./LatexTitle-Z-HGmZ-H.js";import"./safeExternalHref-CkBrsh84.js";import"./colors-BkWRhvFI.js";const O=()=>{var d,l;const{user:i,isLoading:m}=g(),a=N({queryKey:[...f.feeds.saved],queryFn:()=>b.getBookmarks(),enabled:!!i,staleTime:30*1e3,refetchOnWindowFocus:!1}),c=a.error instanceof v&&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(x,{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(w,{variant:"destructive",className:"mb-4",children:e.jsx(A,{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(j,{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(y,{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(k,{paper:B(u),priority:h++<3},u.id))})]},`task-${t.id??"other"}-${s.id??"untagged"}`)})]},`area-${t.id??"other"}`))]})};export{O as default};
assets/{SearchOverlay-CzggQ3fk.js → SearchOverlay-LaDVSpVs.js} RENAMED
@@ -1 +1 @@
1
- import{r as z,c as O,K as M,g as B,j as e}from"./index-YwiKC6Po.js";import{p as H,a as R}from"./paperQueryKeys-C5FMa4Oj.js";import{u as i}from"./useQuery-DPH6Mb2w.js";import{L as U}from"./LatexTitle-DI6voLfI.js";import{c as x}from"./catalog-B15Yh5dN.js";import{u as Y}from"./useDebounce-BFugPTG4.js";import{c as G,h as X}from"./colors-BkWRhvFI.js";import{d as Z}from"./transform-CNg3rvXk.js";import"./curation-CkzNFTMJ.js";const V=10,S=6,W=350,f=3,is=({open:t,onClose:h})=>{var A,C,w,K,P,Q;const v=z.useRef(null),$=O(),[c,D]=M.useState(""),a=Y(c,W),j=c.trim(),r=a.trim().length>=f,y=B();z.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,V),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=((K=F.data)==null?void 0:K.results)||[],p=((P=q.data)==null?void 0:P.results)||[],g=((Q=k.data)==null?void 0:Q.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(X(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:Z(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{is as default};
 
1
+ import{r as K,c as M,M as O,g as B,j as e}from"./index-CbgxfyGU.js";import{p as H,a as R}from"./paperQueryKeys-B8u1BWlI.js";import{u as i}from"./useQuery-Bx9s5-D2.js";import{L as U}from"./LatexTitle-Z-HGmZ-H.js";import{c as x}from"./catalog-DhK7_9-6.js";import{u as Y}from"./useDebounce-DkuI5tkx.js";import{c as G,h as X}from"./colors-BkWRhvFI.js";import{d as Z}from"./transform-0Udg2p6b.js";import"./curation-C7Gmmp4z.js";const V=10,S=6,W=350,f=3,is=({open:t,onClose:h})=>{var A,C,w,P,Q,z;const v=K.useRef(null),$=M(),[c,D]=O.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,V),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(X(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:Z(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{is as default};
assets/{SettingsView-BurbOJNZ.js → SettingsView-C0A-yv3U.js} RENAMED
@@ -1,4 +1,4 @@
1
- import{n as C,a as T,b as le,r as A,j as e,L as q,f as Q,H as R,h as ce,q as de,ap as he,g as ue,K as S,J as ne}from"./index-YwiKC6Po.js";import{u as O}from"./useQuery-DPH6Mb2w.js";import{u as _}from"./useMutation-f6iDkf3w.js";import{T as ee,r as M}from"./research-5UpiU-ea.js";import{S as z}from"./switch-Crqp0RkL.js";import{u as ge}from"./researchTopic-CAL_T-Y-.js";import{S as me}from"./sparkles-C3L7JDLC.js";import{A as pe}from"./arrow-right-CSx7rJG4.js";import{T as fe}from"./trophy-B60aAfG3.js";import{c as F}from"./chat-DHGOonJg.js";import{f as ye,D as xe}from"./latexPlainText-DI8YEXVe.js";import{a as je,u as be,r as ve,O as Y}from"./openrouter-BT3NQ0bL.js";import{E as se}from"./external-link-4bBJT0yO.js";import{M as we}from"./moon-DfjUzC9G.js";import"./index-BaDZKp6X.js";/**
2
  * @license lucide-react v0.462.0 - ISC
3
  *
4
  * This source code is licensed under the ISC license.
@@ -33,4 +33,4 @@ import{n as C,a as T,b as le,r as A,j as e,L as q,f as Q,H as R,h as ce,q as de,
33
  *
34
  * This source code is licensed under the ISC license.
35
  * See the LICENSE file in the root directory of this source tree.
36
- */const Ee=C("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]),Se={task:"task",method:"method",benchmark:"benchmark",author:"author",organization:"organization"};function Me(s){return s.status==="failed"?"We could not finish finding papers for this topic. Save it again to retry.":s.status==="done"?"Matching papers appear in your Following feed, and new ones are added every hour.":s.total?`Your feed shows the closest papers now. Refining matches: ${s.judged.toLocaleString()} of ${s.total.toLocaleString()} checked…`:"Your feed shows the closest papers now. Refining matches…"}function Oe(){var E,w,k;const{user:s}=T(),l=le(),h=A.useRef(null),j=["research-topic",s==null?void 0:s.hf_subject],d=O({queryKey:j,queryFn:M.topic,enabled:!!s,refetchInterval:i=>i.state.data&&["pending","running"].includes(i.state.data.status)?5e3:!1}),[f,y]=A.useState(null),a=ge(()=>y(null));if(A.useEffect(()=>{var i,N;l.hash==="#topic"&&d.isSuccess&&((i=h.current)==null||i.scrollIntoView({block:"center"}),(N=h.current)==null||N.focus())},[l.hash,d.isSuccess]),!s)return null;const c=((E=d.data)==null?void 0:E.text)??"",t=f??c,u=t.trim().replace(/\s+/g," "),g=((w=d.data)==null?void 0:w.status)==="failed"&&u===c,o=u.length>=3&&(u!==c||g),r=()=>{o&&!a.isPending&&a.mutate(u)};return e.jsxs("div",{className:"research-topic",id:"topic",children:[e.jsxs("h3",{className:"research-follow-group-title",children:[e.jsx(me,{"aria-hidden":"true"}),"Topic"]}),e.jsxs("p",{className:"settings-row-desc",children:["Describe the research you want to follow in your own words, for example"," ",e.jsx("em",{children:"real-time video generation"})," or ",e.jsx("em",{children:"speculative decoding for LLM inference"}),". A model reads every new paper and adds the ones that match to your Following feed."]}),d.isLoading?e.jsx("p",{className:"settings-billing-loading",children:"Loading your topic…"}):d.error?e.jsx("p",{className:"settings-token-error",role:"alert",children:"Could not load your topic."}):e.jsxs("form",{className:"research-topic-form",onSubmit:i=>{i.preventDefault(),r()},children:[e.jsx("textarea",{ref:h,className:"research-topic-input",rows:4,maxLength:ee,"aria-label":"Research topic",placeholder:"e.g. diffusion policies for robot manipulation",value:t,onChange:i=>y(i.target.value),onKeyDown:i=>{i.key==="Enter"&&!i.shiftKey&&!i.nativeEvent.isComposing&&(i.preventDefault(),r())}}),e.jsxs("div",{className:"research-topic-actions",children:[e.jsxs("span",{className:"research-topic-count",children:[t.length,"/",ee]}),c&&e.jsx("button",{type:"button",className:"research-follow-action",disabled:a.isPending,onClick:()=>a.mutate(null),children:"Remove"}),e.jsx("button",{type:"submit",className:"research-topic-save",disabled:a.isPending||!o,children:g?"Retry":c?"Update topic":"Follow topic"})]})]}),d.data&&e.jsx("p",{className:"research-email-status",role:"status",children:Me(d.data)}),(k=d.data)==null?void 0:k.suggestions.map(i=>e.jsxs("p",{className:"research-topic-suggestion",children:[e.jsx(q,{to:i.url,children:i.name})," is a ",Se[i.kind]," in the catalog. Following it as well adds every paper tagged with it."]},`${i.kind}:${i.entity_id}`)),a.error&&e.jsx("p",{className:"settings-token-error",role:"alert",children:"Could not save your topic. Please try again."})]})}const ae=[{kind:"task",label:"Tasks",icon:Ce,browse:"/tasks"},{kind:"method",label:"Methods",icon:Ne,browse:"/methods"},{kind:"benchmark",label:"Benchmarks",icon:fe},{kind:"author",label:"Authors",icon:Ee},{kind:"organization",label:"Organizations",icon:ke,browse:"/organizations"}],v=s=>`${s.kind}:${s.entity_id}`,Le=s=>new Date(s).toLocaleDateString(void 0,{month:"short",day:"numeric",year:"numeric"});function Pe({follows:s}){const{user:l}=T(),h=Q(),[j,d]=A.useState([]),f=_({mutationFn:({follow:c,enabled:t})=>M.setFollow(c.kind,c.entity_id,t),onSuccess:(c,{follow:t,enabled:u})=>{const g=["research-follows",l==null?void 0:l.hf_subject];h.setQueryData(g,o=>u?[...o??[],t]:(o??[]).filter(r=>v(r)!==v(t))),d(o=>[...o.filter(r=>v(r)!==v(t)),...u?[]:[t]]),h.invalidateQueries({queryKey:g}),h.invalidateQueries({queryKey:["research-feed",l==null?void 0:l.hf_subject]})}}),y=new Set(s.map(v)),a=[...s,...j.filter(c=>!y.has(v(c)))];return a.length?e.jsxs(e.Fragment,{children:[ae.map(({kind:c,label:t,icon:u})=>{const g=a.filter(o=>o.kind===c).sort((o,r)=>o.name.localeCompare(r.name));return g.length?e.jsxs("div",{className:"research-follow-group",children:[e.jsxs("h3",{className:"research-follow-group-title",children:[e.jsx(u,{"aria-hidden":"true"}),t]}),e.jsx("ul",{className:"research-follow-list",children:g.map(o=>{const r=y.has(v(o));return e.jsxs("li",{className:r?"research-follow-row":"research-follow-row is-unfollowed",children:[e.jsxs("div",{className:"research-follow-text",children:[e.jsx(q,{to:o.url,children:o.name}),e.jsx("span",{children:r?`Following since ${Le(o.created_at)}`:"Unfollowed"})]}),e.jsx("button",{type:"button",className:r?"research-follow-action":"research-follow-action is-refollow",disabled:f.isPending,"aria-label":`${r?"Unfollow":"Follow"} ${o.name}`,onClick:()=>f.mutate({follow:o,enabled:!r}),children:r?"Unfollow":"Follow again"})]},v(o))})})]},c):null}),f.error&&e.jsx("p",{className:"settings-token-error",role:"alert",children:"Could not update follows. Please try again."})]}):e.jsx(Ie,{})}function Ie(){return e.jsxs("div",{className:"research-follow-empty",children:[e.jsx("p",{children:e.jsx("strong",{children:"You are not following any tasks, methods, benchmarks, authors, or organizations yet."})}),e.jsx("p",{children:"Use the Follow button on any task, method, benchmark, author, or organization page."}),e.jsx("div",{className:"research-follow-browse",children:ae.filter(s=>s.browse).map(({kind:s,label:l,icon:h,browse:j})=>e.jsxs(q,{to:j,children:[e.jsx(h,{"aria-hidden":"true"}),"Browse ",l.toLowerCase()]},s))})]})}function Ae(){var t;const{user:s}=T(),l=Q(),h=O({queryKey:["research-follows",s==null?void 0:s.hf_subject],queryFn:M.follows,enabled:!!s}),j=["research-email",s==null?void 0:s.hf_subject],d=O({queryKey:j,queryFn:M.email,enabled:!!s}),f=_({mutationFn:M.setEmail,onSuccess:u=>l.setQueryData(j,u)}),y=((t=h.data)==null?void 0:t.length)??0,a=d.data,c=!!(a!=null&&a.email)&&!a.suppressed;return e.jsxs(e.Fragment,{children:[e.jsxs("section",{className:"settings-section","aria-labelledby":"research-following-heading",children:[e.jsxs("div",{className:"research-section-heading",children:[e.jsxs("h2",{className:"settings-section-title",id:"research-following-heading",children:["Following",y>0&&e.jsx("span",{className:"research-follow-count",children:y})]}),s&&e.jsxs(q,{className:"research-feed-link",to:"/following",children:["Open Following feed ",e.jsx(pe,{"aria-hidden":"true"})]})]}),e.jsx("p",{className:"settings-row-desc research-section-intro",children:"New papers and benchmark results from your topic and what you follow appear in your Following feed. Your topic and follows are private."}),s?h.isLoading?e.jsx("p",{className:"settings-billing-loading",children:"Loading follows…"}):h.error?e.jsx("p",{className:"settings-token-error",role:"alert",children:"Could not load your follows."}):e.jsxs(e.Fragment,{children:[e.jsx(Oe,{}),e.jsx(Pe,{follows:h.data??[]})]}):e.jsxs("div",{className:"settings-note",children:[e.jsx("span",{children:"Sign in to follow research and build your personal feed."}),e.jsx("div",{className:"settings-note-action",children:e.jsx(R,{returnTo:"/settings"})})]})]}),s&&e.jsxs("section",{className:"settings-section","aria-labelledby":"research-email-heading",children:[e.jsx("h2",{className:"settings-section-title",id:"research-email-heading",children:"Weekly research email"}),d.isLoading?e.jsx("p",{className:"settings-billing-loading",children:"Loading email preferences…"}):d.error||!a?e.jsx("p",{className:"settings-token-error",role:"alert",children:"Could not load email preferences."}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"settings-row",children:[e.jsxs("label",{className:"settings-row-text",htmlFor:"research-weekly-email",children:[e.jsx("span",{className:"settings-row-label",children:"Email me a weekly digest"}),e.jsx("span",{className:"settings-row-desc",children:"Up to 20 new papers and benchmark results matching your follows, sent Mondays at 08:00 UTC. No email is sent in weeks without new matches. On by default once you follow something; turn it off here or from any email."})]}),e.jsx(z,{id:"research-weekly-email",checked:a.enabled,disabled:f.isPending||!a.enabled&&!c,onCheckedChange:u=>f.mutate(u)})]}),e.jsxs("div",{className:"research-email-destination",children:[e.jsx(Fe,{"aria-hidden":"true"}),a.email?e.jsxs(e.Fragment,{children:[e.jsxs("span",{children:["Sending to ",e.jsx("strong",{children:a.email})]}),e.jsx("a",{href:ce("/settings",{collectEmail:!0}),children:"Refresh from Hugging Face"})]}):e.jsxs(e.Fragment,{children:[e.jsx("span",{children:"To receive it, allow access to the verified email on your Hugging Face account."}),e.jsx(R,{returnTo:"/settings",collectEmail:!0,label:"Allow email access"})]})]}),a.suppressed&&e.jsx("p",{className:"research-email-status is-warning",role:"status",children:"Delivery to this address is paused after a bounce or spam complaint."}),!a.delivery_ready&&e.jsx("p",{className:"research-email-status",role:"status",children:"Weekly emails have not launched yet. Your preference is saved and applies from launch."}),f.error&&e.jsx("p",{className:"settings-token-error",role:"alert",children:"Could not save your preference. Refresh your email from Hugging Face and try again."})]})]})]})}const Te="https://openrouter.ai/settings/keys";function qe(s,l){if(s instanceof ne){if(typeof s.detail=="string")return s.detail;if(typeof s.detail=="object"&&s.detail!==null&&"message"in s.detail&&typeof s.detail.message=="string")return s.detail.message}return s instanceof Error&&!s.message.startsWith("API request failed:")?s.message:l}const es=()=>{var J;const{user:s,isLoading:l}=T(),{preferences:h,setHideClosedSourceEvals:j,canPersist:d,isLoading:f}=de(),{theme:y,setTheme:a}=he(),c=y??"system",t=ue(),[u,g]=S.useState(""),[o,r]=S.useState(""),[E,w]=S.useState(""),[k,i]=S.useState(""),N=Q(),L=O({queryKey:["chat","models","settings"],enabled:t&&!!s,queryFn:()=>F.getModels()}),D=new Set((((J=L.data)==null?void 0:J.items)??[]).map(n=>n.provider)),H=D.has("huggingface"),P=D.has("openrouter"),te=D.has("openai"),I=O({queryKey:["inference-billing",s==null?void 0:s.hf_subject],enabled:t&&!!s&&H,queryFn:()=>F.getInferenceBilling()}),x=I.data??null,U=je(t&&!!s&&P),W=be(t&&!!s&&P),m=U.data,b=W.data,p=m?ve(m.resets_at):null,ie=t&&!!s&&(L.isLoading||!L.isError&&(H&&I.isLoading||P&&(U.isLoading||W.isLoading))),oe=l||f||y===void 0||ie,V=_({mutationFn:n=>F.selectInferenceBillingAccount(n),onSuccess:n=>{N.setQueryData(["inference-billing",s==null?void 0:s.hf_subject],n),g("")},onError:n=>{g(n instanceof Error?n.message:"Could not change the billing account.")}}),re=I.isLoading||V.isPending,K=(n,B)=>{r(qe(n,B)),w(n instanceof ne?n.code??"":"")},$=_({mutationFn:n=>F.connectOpenRouterCredential(n),onSuccess:n=>{N.setQueryData(Y,n),i(""),r(""),w("")},onError:n=>K(n,"Could not connect the OpenRouter key.")}),G=_({mutationFn:n=>F.setOpenRouterFallback(n),onSuccess:n=>{N.setQueryData(Y,n),r(""),w("")},onError:n=>K(n,"Could not change paid fallback.")}),X=_({mutationFn:()=>F.disconnectOpenRouterCredential(),onSuccess:()=>{N.setQueryData(Y,{connected:!1,verified_at:null,fallback_enabled:!1}),r(""),w("")},onError:n=>K(n,"Could not disconnect the OpenRouter key.")});return S.useEffect(()=>(document.title=ye("Settings"),()=>{document.title=xe}),[]),e.jsxs("div",{className:"page",children:[e.jsx("div",{className:"feed-header",children:e.jsxs("div",{children:[e.jsx("h1",{className:"feed-title",children:e.jsx("em",{children:"Settings"})}),e.jsx("div",{className:"feed-subtitle",children:"Manage what you follow, your weekly email, and how papers are displayed."})]})}),oe?e.jsx("div",{className:"settings-page-loading",role:"status","aria-live":"polite",children:e.jsx("span",{className:"sr-only",children:"Loading settings…"})}):e.jsxs("div",{className:"settings-page-content",children:[e.jsx(Ae,{}),s&&e.jsxs("section",{className:"settings-section",children:[e.jsx("h2",{className:"settings-section-title",children:"Catalog access"}),e.jsx("div",{className:"settings-note settings-note-flush",children:e.jsxs("span",{children:["Role: ",e.jsx("strong",{children:s.role??"community member"}),"."," ",s.can_directly_edit_catalog?"You can apply catalog edits directly. Destructive changes require a recent sign-in.":"Your catalog suggestions are sent to the submissions queue for review.",s.is_admin?" You can also review submissions and use administrative maintenance tools.":" Submission review and maintenance tools remain admin-only."]})})]}),t&&e.jsxs("section",{className:"settings-section",children:[e.jsx("h2",{className:"settings-section-title",children:"Chat usage & billing"}),s?L.isError?e.jsx("div",{className:"settings-billing-loading",role:"alert",children:"Could not load the enabled chat providers."}):e.jsxs("div",{className:"settings-provider-grid",children:[H&&e.jsxs("section",{className:"settings-provider-card","aria-labelledby":"inference-providers-heading",children:[e.jsxs("div",{className:"settings-provider-heading",children:[e.jsxs("div",{children:[e.jsx("h3",{id:"inference-providers-heading",children:"Inference Providers"}),e.jsx("p",{children:"Hugging Face-billed model usage"})]}),(x==null?void 0:x.connected)&&e.jsx("span",{className:"settings-connected-badge",children:"Connected"})]}),I.isError?e.jsx("div",{className:"settings-billing-loading",role:"alert",children:"Hugging Face billing is currently unavailable."}):x!=null&&x.connected?e.jsxs("div",{className:"settings-billing",children:[e.jsx("div",{className:"settings-row-label",children:x.bill_to?`Organization · ${x.bill_to}`:`Personal account · @${s.username}`}),e.jsx("p",{className:"settings-row-desc",children:"Usage for Hugging Face Inference Providers is billed by Hugging Face to your selected account. Included Hugging Face usage is applied first; pay-as-you-go billing follows your Hugging Face plan and billing settings. Papers With Code does not fund, meter, or reset these credits."}),e.jsx("label",{className:"settings-token-label",htmlFor:"hf-billing-account",children:"Bill chat usage to"}),e.jsxs("select",{id:"hf-billing-account",className:"settings-billing-select",value:x.bill_to??"",onChange:n=>{g(""),V.mutate(n.target.value||null)},disabled:re,children:[e.jsxs("option",{value:"",children:["Personal account (@",s.username,")"]}),x.organizations.map(n=>e.jsxs("option",{value:n.name,children:[n.display_name," (",n.name,")"]},n.name))]}),u&&e.jsx("div",{className:"settings-token-error",children:u}),e.jsx("div",{className:"settings-billing-actions",children:e.jsxs("a",{className:"button button-primary",href:x.usage_url,target:"_blank",rel:"noreferrer",children:["View Hugging Face usage & billing ",e.jsx(se,{"aria-hidden":"true"})]})})]}):e.jsxs("div",{className:"settings-billing-connect",children:[e.jsx("p",{className:"settings-row-desc",children:"Reconnect with Hugging Face to authorize Inference Providers. Hugging Face bills your personal account or the organization you select."}),e.jsx("div",{className:"settings-billing-actions",children:e.jsx(R,{returnTo:"/settings",label:"Re-sign in with Hugging Face",authorizeInference:!0})})]})]}),P&&e.jsxs("section",{className:"settings-provider-card",id:"openrouter-byok","aria-labelledby":"openrouter-heading",children:[e.jsxs("div",{className:"settings-provider-heading",children:[e.jsxs("div",{children:[e.jsx("h3",{id:"openrouter-heading",children:"OpenRouter"}),e.jsx("p",{children:"Papers With Code-funded allowance and optional fallback"})]}),(b==null?void 0:b.connected)&&e.jsx("span",{className:"settings-connected-badge",children:"Key connected"})]}),e.jsx("p",{className:"settings-row-desc",children:"Papers With Code pays for these OpenRouter requests and provides free but limited monthly usage. Your own key is available as an optional fallback."}),m?e.jsxs("div",{className:"settings-usage-row",children:[e.jsxs("div",{className:"settings-usage-heading",children:[e.jsxs("div",{children:[e.jsx("div",{className:"settings-row-label",children:"Monthly OpenRouter usage"}),e.jsxs("div",{className:"settings-row-desc",children:["Resets ",p==null?void 0:p.local," ",e.jsxs("span",{"aria-label":"UTC reset time",children:["(",p==null?void 0:p.utc,")"]})]})]}),e.jsx("strong",{children:m.available?`${m.remaining_percent}% left`:"Unavailable"})]}),e.jsx("div",{className:"settings-usage-track",role:"progressbar","aria-label":`${m.remaining_percent}% remaining; resets ${p==null?void 0:p.local}; ${p==null?void 0:p.utc}`,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":m.remaining_percent,children:e.jsx("span",{style:{width:`${m.remaining_percent}%`}})}),!m.available&&e.jsxs("p",{className:"settings-limit-note",children:[m.unavailable_reason==="personal_allowance_exhausted"?"Your free monthly allowance is depleted.":`The shared OpenRouter credits are currently unavailable. ${m.remaining_percent}% of your personal allowance remains.`," DeepSeek V4 Flash is temporarily unavailable unless you enable your own key below."]})]}):e.jsx("div",{className:"settings-billing-loading",children:U.isError||m?"OpenRouter usage is currently unavailable.":"Checking OpenRouter usage…"}),e.jsxs("div",{className:"settings-byok-controls",children:[e.jsx("div",{className:"settings-row-label",children:"Provide your own OpenRouter API key"}),b!=null&&b.connected?e.jsxs(e.Fragment,{children:[e.jsxs("p",{className:"settings-row-desc",children:["Connected",b.verified_at?` · Last verified ${new Date(b.verified_at).toLocaleString()}`:"",". Your API key is stored securely using AES-256 encryption. It is never shown again."]}),e.jsxs("label",{className:"settings-fallback-control",children:[e.jsx(z,{checked:b.fallback_enabled,disabled:G.isPending,onCheckedChange:n=>G.mutate(!!n)}),e.jsxs("span",{children:[e.jsx("strong",{children:"Use my OpenRouter key when Papers With Code-funded OpenRouter access is unavailable"}),e.jsx("small",{children:"OpenRouter bills this usage to your own account. It is not covered by Papers With Code."})]})]}),e.jsx("p",{className:"settings-billing-help",children:"Disconnecting prevents new requests but cannot cancel a request already sent to OpenRouter."}),e.jsxs("div",{className:"settings-billing-actions",children:[e.jsx("button",{className:"button",type:"button",disabled:X.isPending,onClick:()=>X.mutate(),children:"Disconnect"}),e.jsxs("a",{className:"button",href:Te,target:"_blank",rel:"noreferrer",children:["Revoke or rotate at OpenRouter ",e.jsx(se,{"aria-hidden":"true"})]})]})]}):e.jsxs("form",{onSubmit:n=>{n.preventDefault(),k.trim()&&$.mutate(k.trim())},children:[e.jsx("label",{className:"settings-token-label",htmlFor:"openrouter-api-key",children:"OpenRouter API key"}),e.jsx("input",{id:"openrouter-api-key",type:"password",autoComplete:"off",value:k,onChange:n=>i(n.target.value),placeholder:"sk-or-…"}),e.jsx("p",{className:"settings-billing-help",children:"Connecting stores the key but does not authorize paid fallback. Enable billing separately after it is verified."}),e.jsx("div",{className:"settings-billing-actions",children:e.jsx("button",{className:"button button-primary",type:"submit",disabled:!k.trim()||$.isPending,children:$.isPending?"Verifying…":"Connect key"})})]}),o&&e.jsxs("div",{className:"settings-token-error",children:[e.jsx("p",{children:E==="fresh_auth_required"?"Your account is signed in, but adding or enabling an API key requires a Hugging Face sign-in from the last 15 minutes.":o}),E==="fresh_auth_required"&&e.jsx("div",{className:"settings-billing-actions",children:e.jsx(R,{returnTo:"/settings#openrouter-byok",label:"Re-authenticate with Hugging Face"})})]})]})]}),te&&e.jsx("div",{className:"settings-note settings-note-flush",role:"note",children:"Direct OpenAI usage is provided by Papers With Code. No OpenAI API key or billing account is required from you."})]}):e.jsxs("div",{className:"settings-note settings-note-flush",children:[e.jsx("span",{children:"Sign in to manage billing and credentials for the enabled chat providers."}),e.jsx("div",{className:"settings-note-action",children:e.jsx(R,{returnTo:"/settings",authorizeInference:!0})})]})]}),t&&e.jsxs("section",{className:"settings-section",children:[e.jsx("h2",{className:"settings-section-title",children:"Chat privacy & retention"}),e.jsx("div",{className:"settings-note settings-note-flush",children:e.jsx("span",{children:"Chats are private and retained until you delete them. You can keep up to 500 active chats and 100 MB of chat data. Archiving removes chats from the active list and frees active-chat quota, but does not delete them. Deleting a chat permanently removes its durable transcript, workspace reference, and any public share link after deletion is verified. You can deliberately share an unlisted snapshot, but no dedicated private-chat export format is currently offered."})})]}),e.jsxs("section",{className:"settings-section",children:[e.jsx("h2",{className:"settings-section-title",children:"Appearance"}),e.jsx("div",{className:"theme-options","aria-label":"Color theme",children:[{value:"system",label:"System",description:"Match your device",icon:Re},{value:"light",label:"Light",description:"Always use light mode",icon:_e},{value:"dark",label:"Dark",description:"Always use dark mode",icon:we}].map(n=>{const B=n.icon,Z=c===n.value;return e.jsxs("button",{type:"button",className:`theme-option ${Z?"is-selected":""}`,"aria-pressed":Z,onClick:()=>a(n.value),children:[e.jsx(B,{"aria-hidden":"true"}),e.jsxs("span",{className:"theme-option-copy",children:[e.jsx("span",{className:"theme-option-label",children:n.label}),e.jsx("span",{className:"theme-option-desc",children:n.description})]})]},n.value)})})]}),e.jsxs("section",{className:"settings-section",children:[e.jsx("h2",{className:"settings-section-title",children:"Evaluations"}),e.jsxs("div",{className:"settings-row",children:[e.jsxs("label",{className:"settings-row-text",htmlFor:"hide-closed-source-evals",children:[e.jsx("span",{className:"settings-row-label",children:"Hide closed-source models"}),e.jsx("span",{className:"settings-row-desc",children:"When enabled, evaluations of closed-source models (proprietary APIs and unreleased flagship models) are hidden from benchmark leaderboards and paper result tables."})]}),e.jsx(z,{id:"hide-closed-source-evals",checked:h.hide_closed_source_evals,onCheckedChange:n=>{j(!!n)}})]}),!l&&!d&&!s&&e.jsxs("div",{className:"settings-note",children:[e.jsx("span",{children:"You are browsing as a guest, so this choice only applies to the current session. Sign in to save it to your account."}),e.jsx("div",{className:"settings-note-action",children:e.jsx(R,{returnTo:"/settings"})})]})]})]})]})};export{es as default};
 
1
+ import{n as C,a as q,b as le,r as A,j as e,L as T,f as Q,H as R,h as ce,q as de,aq as he,g as ue,M as S,K as ne}from"./index-CbgxfyGU.js";import{u as O}from"./useQuery-Bx9s5-D2.js";import{u as _}from"./useMutation-P_trTy9i.js";import{T as ee,r as M}from"./research-DgpyzSy_.js";import{S as z}from"./switch-BSZohE4x.js";import{u as ge}from"./researchTopic-CteUev4M.js";import{S as me}from"./sparkles-BqBXJPmy.js";import{A as pe}from"./arrow-right-DotD9yNb.js";import{T as fe}from"./trophy-BQwEH3L7.js";import{c as F}from"./chat-DzTo2WUO.js";import{f as ye,D as xe}from"./latexPlainText-DI8YEXVe.js";import{a as je,u as be,r as ve,O as Y}from"./openrouter-DiuY1sPP.js";import{E as se}from"./external-link-DZIH4GGr.js";import{M as we}from"./moon-BVv5zopc.js";import"./index-CxPKwmVQ.js";/**
2
  * @license lucide-react v0.462.0 - ISC
3
  *
4
  * This source code is licensed under the ISC license.
 
33
  *
34
  * This source code is licensed under the ISC license.
35
  * See the LICENSE file in the root directory of this source tree.
36
+ */const Ee=C("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]),Se={task:"task",method:"method",benchmark:"benchmark",author:"author",organization:"organization"};function Me(s){return s.status==="failed"?"We could not finish finding papers for this topic. Save it again to retry.":s.status==="done"?"Matching papers appear in your Following feed, and new ones are added every hour.":s.total?`Your feed shows the closest papers now. Refining matches: ${s.judged.toLocaleString()} of ${s.total.toLocaleString()} checked…`:"Your feed shows the closest papers now. Refining matches…"}function Oe(){var E,w,k;const{user:s}=q(),l=le(),h=A.useRef(null),j=["research-topic",s==null?void 0:s.hf_subject],d=O({queryKey:j,queryFn:M.topic,enabled:!!s,refetchInterval:i=>i.state.data&&["pending","running"].includes(i.state.data.status)?5e3:!1}),[f,y]=A.useState(null),a=ge(()=>y(null));if(A.useEffect(()=>{var i,N;l.hash==="#topic"&&d.isSuccess&&((i=h.current)==null||i.scrollIntoView({block:"center"}),(N=h.current)==null||N.focus())},[l.hash,d.isSuccess]),!s)return null;const c=((E=d.data)==null?void 0:E.text)??"",t=f??c,u=t.trim().replace(/\s+/g," "),g=((w=d.data)==null?void 0:w.status)==="failed"&&u===c,o=u.length>=3&&(u!==c||g),r=()=>{o&&!a.isPending&&a.mutate(u)};return e.jsxs("div",{className:"research-topic",id:"topic",children:[e.jsxs("h3",{className:"research-follow-group-title",children:[e.jsx(me,{"aria-hidden":"true"}),"Topic"]}),e.jsxs("p",{className:"settings-row-desc",children:["Describe the research you want to follow in your own words, for example"," ",e.jsx("em",{children:"real-time video generation"})," or ",e.jsx("em",{children:"speculative decoding for LLM inference"}),". A model reads every new paper and adds the ones that match to your Following feed."]}),d.isLoading?e.jsx("p",{className:"settings-billing-loading",children:"Loading your topic…"}):d.error?e.jsx("p",{className:"settings-token-error",role:"alert",children:"Could not load your topic."}):e.jsxs("form",{className:"research-topic-form",onSubmit:i=>{i.preventDefault(),r()},children:[e.jsx("textarea",{ref:h,className:"research-topic-input",rows:4,maxLength:ee,"aria-label":"Research topic",placeholder:"e.g. diffusion policies for robot manipulation",value:t,onChange:i=>y(i.target.value),onKeyDown:i=>{i.key==="Enter"&&!i.shiftKey&&!i.nativeEvent.isComposing&&(i.preventDefault(),r())}}),e.jsxs("div",{className:"research-topic-actions",children:[e.jsxs("span",{className:"research-topic-count",children:[t.length,"/",ee]}),c&&e.jsx("button",{type:"button",className:"research-follow-action",disabled:a.isPending,onClick:()=>a.mutate(null),children:"Remove"}),e.jsx("button",{type:"submit",className:"research-topic-save",disabled:a.isPending||!o,children:g?"Retry":c?"Update topic":"Follow topic"})]})]}),d.data&&e.jsx("p",{className:"research-email-status",role:"status",children:Me(d.data)}),(k=d.data)==null?void 0:k.suggestions.map(i=>e.jsxs("p",{className:"research-topic-suggestion",children:[e.jsx(T,{to:i.url,children:i.name})," is a ",Se[i.kind]," in the catalog. Following it as well adds every paper tagged with it."]},`${i.kind}:${i.entity_id}`)),a.error&&e.jsx("p",{className:"settings-token-error",role:"alert",children:"Could not save your topic. Please try again."})]})}const ae=[{kind:"task",label:"Tasks",icon:Ce,browse:"/tasks"},{kind:"method",label:"Methods",icon:Ne,browse:"/methods"},{kind:"benchmark",label:"Benchmarks",icon:fe},{kind:"author",label:"Authors",icon:Ee},{kind:"organization",label:"Organizations",icon:ke,browse:"/organizations"}],v=s=>`${s.kind}:${s.entity_id}`,Le=s=>new Date(s).toLocaleDateString(void 0,{month:"short",day:"numeric",year:"numeric"});function Pe({follows:s}){const{user:l}=q(),h=Q(),[j,d]=A.useState([]),f=_({mutationFn:({follow:c,enabled:t})=>M.setFollow(c.kind,c.entity_id,t),onSuccess:(c,{follow:t,enabled:u})=>{const g=["research-follows",l==null?void 0:l.hf_subject];h.setQueryData(g,o=>u?[...o??[],t]:(o??[]).filter(r=>v(r)!==v(t))),d(o=>[...o.filter(r=>v(r)!==v(t)),...u?[]:[t]]),h.invalidateQueries({queryKey:g}),h.invalidateQueries({queryKey:["research-feed",l==null?void 0:l.hf_subject]})}}),y=new Set(s.map(v)),a=[...s,...j.filter(c=>!y.has(v(c)))];return a.length?e.jsxs(e.Fragment,{children:[ae.map(({kind:c,label:t,icon:u})=>{const g=a.filter(o=>o.kind===c).sort((o,r)=>o.name.localeCompare(r.name));return g.length?e.jsxs("div",{className:"research-follow-group",children:[e.jsxs("h3",{className:"research-follow-group-title",children:[e.jsx(u,{"aria-hidden":"true"}),t]}),e.jsx("ul",{className:"research-follow-list",children:g.map(o=>{const r=y.has(v(o));return e.jsxs("li",{className:r?"research-follow-row":"research-follow-row is-unfollowed",children:[e.jsxs("div",{className:"research-follow-text",children:[e.jsx(T,{to:o.url,children:o.name}),e.jsx("span",{children:r?`Following since ${Le(o.created_at)}`:"Unfollowed"})]}),e.jsx("button",{type:"button",className:r?"research-follow-action":"research-follow-action is-refollow",disabled:f.isPending,"aria-label":`${r?"Unfollow":"Follow"} ${o.name}`,onClick:()=>f.mutate({follow:o,enabled:!r}),children:r?"Unfollow":"Follow again"})]},v(o))})})]},c):null}),f.error&&e.jsx("p",{className:"settings-token-error",role:"alert",children:"Could not update follows. Please try again."})]}):e.jsx(Ie,{})}function Ie(){return e.jsxs("div",{className:"research-follow-empty",children:[e.jsx("p",{children:e.jsx("strong",{children:"You are not following any tasks, methods, benchmarks, authors, or organizations yet."})}),e.jsx("p",{children:"Use the Follow button on any task, method, benchmark, author, or organization page."}),e.jsx("div",{className:"research-follow-browse",children:ae.filter(s=>s.browse).map(({kind:s,label:l,icon:h,browse:j})=>e.jsxs(T,{to:j,children:[e.jsx(h,{"aria-hidden":"true"}),"Browse ",l.toLowerCase()]},s))})]})}function Ae(){var t;const{user:s}=q(),l=Q(),h=O({queryKey:["research-follows",s==null?void 0:s.hf_subject],queryFn:M.follows,enabled:!!s}),j=["research-email",s==null?void 0:s.hf_subject],d=O({queryKey:j,queryFn:M.email,enabled:!!s}),f=_({mutationFn:M.setEmail,onSuccess:u=>l.setQueryData(j,u)}),y=((t=h.data)==null?void 0:t.length)??0,a=d.data,c=!!(a!=null&&a.email)&&!a.suppressed;return e.jsxs(e.Fragment,{children:[e.jsxs("section",{className:"settings-section","aria-labelledby":"research-following-heading",children:[e.jsxs("div",{className:"research-section-heading",children:[e.jsxs("h2",{className:"settings-section-title",id:"research-following-heading",children:["Following",y>0&&e.jsx("span",{className:"research-follow-count",children:y})]}),s&&e.jsxs(T,{className:"research-feed-link",to:"/following",children:["Open Following feed ",e.jsx(pe,{"aria-hidden":"true"})]})]}),e.jsx("p",{className:"settings-row-desc research-section-intro",children:"New papers and benchmark results from your topic and what you follow appear in your Following feed. Your topic and follows are private."}),s?h.isLoading?e.jsx("p",{className:"settings-billing-loading",children:"Loading follows…"}):h.error?e.jsx("p",{className:"settings-token-error",role:"alert",children:"Could not load your follows."}):e.jsxs(e.Fragment,{children:[e.jsx(Oe,{}),e.jsx(Pe,{follows:h.data??[]})]}):e.jsxs("div",{className:"settings-note",children:[e.jsx("span",{children:"Sign in to follow research and build your personal feed."}),e.jsx("div",{className:"settings-note-action",children:e.jsx(R,{returnTo:"/settings"})})]})]}),s&&e.jsxs("section",{className:"settings-section","aria-labelledby":"research-email-heading",children:[e.jsx("h2",{className:"settings-section-title",id:"research-email-heading",children:"Weekly research email"}),d.isLoading?e.jsx("p",{className:"settings-billing-loading",children:"Loading email preferences…"}):d.error||!a?e.jsx("p",{className:"settings-token-error",role:"alert",children:"Could not load email preferences."}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"settings-row",children:[e.jsxs("label",{className:"settings-row-text",htmlFor:"research-weekly-email",children:[e.jsx("span",{className:"settings-row-label",children:"Email me a weekly digest"}),e.jsx("span",{className:"settings-row-desc",children:"Up to 20 new papers and benchmark results matching your follows, sent Mondays at 08:00 UTC. No email is sent in weeks without new matches. On by default once you follow something; turn it off here or from any email."})]}),e.jsx(z,{id:"research-weekly-email",checked:a.enabled,disabled:f.isPending||!a.enabled&&!c,onCheckedChange:u=>f.mutate(u)})]}),e.jsxs("div",{className:"research-email-destination",children:[e.jsx(Fe,{"aria-hidden":"true"}),a.email?e.jsxs(e.Fragment,{children:[e.jsxs("span",{children:["Sending to ",e.jsx("strong",{children:a.email})]}),e.jsx("a",{href:ce("/settings",{collectEmail:!0}),children:"Refresh from Hugging Face"})]}):e.jsxs(e.Fragment,{children:[e.jsx("span",{children:"To receive it, allow access to the verified email on your Hugging Face account."}),e.jsx(R,{returnTo:"/settings",collectEmail:!0,label:"Allow email access"})]})]}),a.suppressed&&e.jsx("p",{className:"research-email-status is-warning",role:"status",children:"Delivery to this address is paused after a bounce or spam complaint."}),!a.delivery_ready&&e.jsx("p",{className:"research-email-status",role:"status",children:"Weekly emails have not launched yet. Your preference is saved and applies from launch."}),f.error&&e.jsx("p",{className:"settings-token-error",role:"alert",children:"Could not save your preference. Refresh your email from Hugging Face and try again."})]})]})]})}const qe="https://openrouter.ai/settings/keys";function Te(s,l){if(s instanceof ne){if(typeof s.detail=="string")return s.detail;if(typeof s.detail=="object"&&s.detail!==null&&"message"in s.detail&&typeof s.detail.message=="string")return s.detail.message}return s instanceof Error&&!s.message.startsWith("API request failed:")?s.message:l}const es=()=>{var Z;const{user:s,isLoading:l}=q(),{preferences:h,setHideClosedSourceEvals:j,canPersist:d,isLoading:f}=de(),{theme:y,setTheme:a}=he(),c=y??"system",t=ue(),[u,g]=S.useState(""),[o,r]=S.useState(""),[E,w]=S.useState(""),[k,i]=S.useState(""),N=Q(),L=O({queryKey:["chat","models","settings"],enabled:t&&!!s,queryFn:()=>F.getModels()}),D=new Set((((Z=L.data)==null?void 0:Z.items)??[]).map(n=>n.provider)),H=D.has("huggingface"),P=D.has("openrouter"),te=D.has("openai"),I=O({queryKey:["inference-billing",s==null?void 0:s.hf_subject],enabled:t&&!!s&&H,queryFn:()=>F.getInferenceBilling()}),x=I.data??null,U=je(t&&!!s&&P),W=be(t&&!!s&&P),m=U.data,b=W.data,p=m?ve(m.resets_at):null,ie=t&&!!s&&(L.isLoading||!L.isError&&(H&&I.isLoading||P&&(U.isLoading||W.isLoading))),oe=l||f||y===void 0||ie,V=_({mutationFn:n=>F.selectInferenceBillingAccount(n),onSuccess:n=>{N.setQueryData(["inference-billing",s==null?void 0:s.hf_subject],n),g("")},onError:n=>{g(n instanceof Error?n.message:"Could not change the billing account.")}}),re=I.isLoading||V.isPending,K=(n,B)=>{r(Te(n,B)),w(n instanceof ne?n.code??"":"")},$=_({mutationFn:n=>F.connectOpenRouterCredential(n),onSuccess:n=>{N.setQueryData(Y,n),i(""),r(""),w("")},onError:n=>K(n,"Could not connect the OpenRouter key.")}),G=_({mutationFn:n=>F.setOpenRouterFallback(n),onSuccess:n=>{N.setQueryData(Y,n),r(""),w("")},onError:n=>K(n,"Could not change paid fallback.")}),X=_({mutationFn:()=>F.disconnectOpenRouterCredential(),onSuccess:()=>{N.setQueryData(Y,{connected:!1,verified_at:null,fallback_enabled:!1}),r(""),w("")},onError:n=>K(n,"Could not disconnect the OpenRouter key.")});return S.useEffect(()=>(document.title=ye("Settings"),()=>{document.title=xe}),[]),e.jsxs("div",{className:"page",children:[e.jsx("div",{className:"feed-header",children:e.jsxs("div",{children:[e.jsx("h1",{className:"feed-title",children:e.jsx("em",{children:"Settings"})}),e.jsx("div",{className:"feed-subtitle",children:"Manage what you follow, your weekly email, and how papers are displayed."})]})}),oe?e.jsx("div",{className:"settings-page-loading",role:"status","aria-live":"polite",children:e.jsx("span",{className:"sr-only",children:"Loading settings…"})}):e.jsxs("div",{className:"settings-page-content",children:[e.jsx(Ae,{}),s&&e.jsxs("section",{className:"settings-section",children:[e.jsx("h2",{className:"settings-section-title",children:"Catalog access"}),e.jsx("div",{className:"settings-note settings-note-flush",children:e.jsxs("span",{children:["Role: ",e.jsx("strong",{children:s.role??"community member"}),"."," ",s.can_directly_edit_catalog?"You can apply catalog edits directly. Destructive changes require a recent sign-in.":"Your catalog suggestions are sent to the submissions queue for review.",s.is_admin?" You can also review submissions and use administrative maintenance tools.":" Submission review and maintenance tools remain admin-only."]})})]}),t&&e.jsxs("section",{className:"settings-section",children:[e.jsx("h2",{className:"settings-section-title",children:"Chat usage & billing"}),s?L.isError?e.jsx("div",{className:"settings-billing-loading",role:"alert",children:"Could not load the enabled chat providers."}):e.jsxs("div",{className:"settings-provider-grid",children:[H&&e.jsxs("section",{className:"settings-provider-card","aria-labelledby":"inference-providers-heading",children:[e.jsxs("div",{className:"settings-provider-heading",children:[e.jsxs("div",{children:[e.jsx("h3",{id:"inference-providers-heading",children:"Inference Providers"}),e.jsx("p",{children:"Hugging Face-billed model usage"})]}),(x==null?void 0:x.connected)&&e.jsx("span",{className:"settings-connected-badge",children:"Connected"})]}),I.isError?e.jsx("div",{className:"settings-billing-loading",role:"alert",children:"Hugging Face billing is currently unavailable."}):x!=null&&x.connected?e.jsxs("div",{className:"settings-billing",children:[e.jsx("div",{className:"settings-row-label",children:x.bill_to?`Organization · ${x.bill_to}`:`Personal account · @${s.username}`}),e.jsx("p",{className:"settings-row-desc",children:"Usage for Hugging Face Inference Providers is billed by Hugging Face to your selected account. Included Hugging Face usage is applied first; pay-as-you-go billing follows your Hugging Face plan and billing settings. Papers With Code does not fund, meter, or reset these credits."}),e.jsx("label",{className:"settings-token-label",htmlFor:"hf-billing-account",children:"Bill chat usage to"}),e.jsxs("select",{id:"hf-billing-account",className:"settings-billing-select",value:x.bill_to??"",onChange:n=>{g(""),V.mutate(n.target.value||null)},disabled:re,children:[e.jsxs("option",{value:"",children:["Personal account (@",s.username,")"]}),x.organizations.map(n=>e.jsxs("option",{value:n.name,children:[n.display_name," (",n.name,")"]},n.name))]}),u&&e.jsx("div",{className:"settings-token-error",children:u}),e.jsx("div",{className:"settings-billing-actions",children:e.jsxs("a",{className:"button button-primary",href:x.usage_url,target:"_blank",rel:"noreferrer",children:["View Hugging Face usage & billing ",e.jsx(se,{"aria-hidden":"true"})]})})]}):e.jsxs("div",{className:"settings-billing-connect",children:[e.jsx("p",{className:"settings-row-desc",children:"Reconnect with Hugging Face to authorize Inference Providers. Hugging Face bills your personal account or the organization you select."}),e.jsx("div",{className:"settings-billing-actions",children:e.jsx(R,{returnTo:"/settings",label:"Re-sign in with Hugging Face",authorizeInference:!0})})]})]}),P&&e.jsxs("section",{className:"settings-provider-card",id:"openrouter-byok","aria-labelledby":"openrouter-heading",children:[e.jsxs("div",{className:"settings-provider-heading",children:[e.jsxs("div",{children:[e.jsx("h3",{id:"openrouter-heading",children:"OpenRouter"}),e.jsx("p",{children:"Papers With Code-funded allowance and optional fallback"})]}),(b==null?void 0:b.connected)&&e.jsx("span",{className:"settings-connected-badge",children:"Key connected"})]}),e.jsx("p",{className:"settings-row-desc",children:"Papers With Code pays for these OpenRouter requests and provides free but limited monthly usage. Your own key is available as an optional fallback."}),m?e.jsxs("div",{className:"settings-usage-row",children:[e.jsxs("div",{className:"settings-usage-heading",children:[e.jsxs("div",{children:[e.jsx("div",{className:"settings-row-label",children:"Monthly OpenRouter usage"}),e.jsxs("div",{className:"settings-row-desc",children:["Resets ",p==null?void 0:p.local," ",e.jsxs("span",{"aria-label":"UTC reset time",children:["(",p==null?void 0:p.utc,")"]})]})]}),e.jsx("strong",{children:m.available?`${m.remaining_percent}% left`:"Unavailable"})]}),e.jsx("div",{className:"settings-usage-track",role:"progressbar","aria-label":`${m.remaining_percent}% remaining; resets ${p==null?void 0:p.local}; ${p==null?void 0:p.utc}`,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":m.remaining_percent,children:e.jsx("span",{style:{width:`${m.remaining_percent}%`}})}),!m.available&&e.jsxs("p",{className:"settings-limit-note",children:[m.unavailable_reason==="personal_allowance_exhausted"?"Your free monthly allowance is depleted.":`The shared OpenRouter credits are currently unavailable. ${m.remaining_percent}% of your personal allowance remains.`," DeepSeek V4 Flash is temporarily unavailable unless you enable your own key below."]})]}):e.jsx("div",{className:"settings-billing-loading",children:U.isError||m?"OpenRouter usage is currently unavailable.":"Checking OpenRouter usage…"}),e.jsxs("div",{className:"settings-byok-controls",children:[e.jsx("div",{className:"settings-row-label",children:"Provide your own OpenRouter API key"}),b!=null&&b.connected?e.jsxs(e.Fragment,{children:[e.jsxs("p",{className:"settings-row-desc",children:["Connected",b.verified_at?` · Last verified ${new Date(b.verified_at).toLocaleString()}`:"",". Your API key is stored securely using AES-256 encryption. It is never shown again."]}),e.jsxs("label",{className:"settings-fallback-control",children:[e.jsx(z,{checked:b.fallback_enabled,disabled:G.isPending,onCheckedChange:n=>G.mutate(!!n)}),e.jsxs("span",{children:[e.jsx("strong",{children:"Use my OpenRouter key when Papers With Code-funded OpenRouter access is unavailable"}),e.jsx("small",{children:"OpenRouter bills this usage to your own account. It is not covered by Papers With Code."})]})]}),e.jsx("p",{className:"settings-billing-help",children:"Disconnecting prevents new requests but cannot cancel a request already sent to OpenRouter."}),e.jsxs("div",{className:"settings-billing-actions",children:[e.jsx("button",{className:"button",type:"button",disabled:X.isPending,onClick:()=>X.mutate(),children:"Disconnect"}),e.jsxs("a",{className:"button",href:qe,target:"_blank",rel:"noreferrer",children:["Revoke or rotate at OpenRouter ",e.jsx(se,{"aria-hidden":"true"})]})]})]}):e.jsxs("form",{onSubmit:n=>{n.preventDefault(),k.trim()&&$.mutate(k.trim())},children:[e.jsx("label",{className:"settings-token-label",htmlFor:"openrouter-api-key",children:"OpenRouter API key"}),e.jsx("input",{id:"openrouter-api-key",type:"password",autoComplete:"off",value:k,onChange:n=>i(n.target.value),placeholder:"sk-or-…"}),e.jsx("p",{className:"settings-billing-help",children:"Connecting stores the key but does not authorize paid fallback. Enable billing separately after it is verified."}),e.jsx("div",{className:"settings-billing-actions",children:e.jsx("button",{className:"button button-primary",type:"submit",disabled:!k.trim()||$.isPending,children:$.isPending?"Verifying…":"Connect key"})})]}),o&&e.jsxs("div",{className:"settings-token-error",children:[e.jsx("p",{children:E==="fresh_auth_required"?"Your account is signed in, but adding or enabling an API key requires a Hugging Face sign-in from the last 15 minutes.":o}),E==="fresh_auth_required"&&e.jsx("div",{className:"settings-billing-actions",children:e.jsx(R,{returnTo:"/settings#openrouter-byok",label:"Re-authenticate with Hugging Face"})})]})]})]}),te&&e.jsx("div",{className:"settings-note settings-note-flush",role:"note",children:"Direct OpenAI usage is provided by Papers With Code. No OpenAI API key or billing account is required from you."})]}):e.jsxs("div",{className:"settings-note settings-note-flush",children:[e.jsx("span",{children:"Sign in to manage billing and credentials for the enabled chat providers."}),e.jsx("div",{className:"settings-note-action",children:e.jsx(R,{returnTo:"/settings",authorizeInference:!0})})]})]}),t&&e.jsxs("section",{className:"settings-section",children:[e.jsx("h2",{className:"settings-section-title",children:"Chat privacy & retention"}),e.jsx("div",{className:"settings-note settings-note-flush",children:e.jsx("span",{children:"Chats are private and retained until you delete them. You can keep up to 500 active chats and 100 MB of chat data. Archiving removes chats from the active list and frees active-chat quota, but does not delete them. Deleting a chat permanently removes its durable transcript, workspace reference, and any public share link after deletion is verified. You can deliberately share an unlisted snapshot, but no dedicated private-chat export format is currently offered."})})]}),e.jsxs("section",{className:"settings-section",children:[e.jsx("h2",{className:"settings-section-title",children:"Appearance"}),e.jsx("div",{className:"theme-options","aria-label":"Color theme",children:[{value:"system",label:"System",description:"Match your device",icon:Re},{value:"light",label:"Light",description:"Always use light mode",icon:_e},{value:"dark",label:"Dark",description:"Always use dark mode",icon:we}].map(n=>{const B=n.icon,J=c===n.value;return e.jsxs("button",{type:"button",className:`theme-option ${J?"is-selected":""}`,"aria-pressed":J,onClick:()=>a(n.value),children:[e.jsx(B,{"aria-hidden":"true"}),e.jsxs("span",{className:"theme-option-copy",children:[e.jsx("span",{className:"theme-option-label",children:n.label}),e.jsx("span",{className:"theme-option-desc",children:n.description})]})]},n.value)})})]}),e.jsxs("section",{className:"settings-section",children:[e.jsx("h2",{className:"settings-section-title",children:"Evaluations"}),e.jsxs("div",{className:"settings-row",children:[e.jsxs("label",{className:"settings-row-text",htmlFor:"hide-closed-source-evals",children:[e.jsx("span",{className:"settings-row-label",children:"Hide closed-source models"}),e.jsx("span",{className:"settings-row-desc",children:"When enabled, evaluations of closed-source models (proprietary APIs and unreleased flagship models) are hidden from benchmark leaderboards and paper result tables."})]}),e.jsx(z,{id:"hide-closed-source-evals",checked:h.hide_closed_source_evals,onCheckedChange:n=>{j(!!n)}})]}),!l&&!d&&!s&&e.jsxs("div",{className:"settings-note",children:[e.jsx("span",{children:"You are browsing as a guest, so this choice only applies to the current session. Sign in to save it to your account."}),e.jsx("div",{className:"settings-note-action",children:e.jsx(R,{returnTo:"/settings"})})]})]})]})]})};export{es as default};
assets/{SharedChatView-C8jGkNjy.js → SharedChatView-DO_TTtXn.js} RENAMED
@@ -1 +1 @@
1
- import{u as f,c as x,r as h,j as e,m as g}from"./index-YwiKC6Po.js";import{u as v}from"./useQuery-DPH6Mb2w.js";import{A as j,a as b,C as y,U as S,b as k}from"./ArtifactWorkspace-BxDA6yNF.js";import{C as m,e as w,p as N,q as C,g as q}from"./chatSessions-CdNQ1toA.js";/* empty css */import"./hover-card-BY9tUGxy.js";import"./CatalogEntityPreviewLink-Cv_oezOz.js";import"./catalog-B15Yh5dN.js";import"./github-BZMCt7Ub.js";import"./file-text-Cijxx2XD.js";import"./PaperPreviewLink-CKfmgBjs.js";import"./index-CoRCN2p0.js";import"./index-BM_xSDJM.js";import"./katex-DkKDou_j.js";import"./paperQueryKeys-C5FMa4Oj.js";import"./curation-CkzNFTMJ.js";import"./useMutation-f6iDkf3w.js";import"./chat-DHGOonJg.js";import"./copy-YHg6twss.js";import"./thumbs-up-D9G2aLNB.js";import"./arrow-left-B08fyfNi.js";import"./external-link-4bBJT0yO.js";import"./plus-Cfz0QbT1.js";import"./search-wcEXdf1i.js";import"./chevron-up-BXtxbTfV.js";import"./AuthorAvatar-CoTET6B3.js";const _=({detail:i})=>{const[d,l]=h.useState(()=>N(i)),p=h.useMemo(()=>{const t={};for(const c of d)for(const n of c.blocks??[])if(n.kind==="tool")for(const r of n.results??[])t[r.route_id]=r;return t},[d]),u=(t,c)=>{l(n=>n.map(r=>{var a;return r.id!==t?r:{...r,blocks:(a=r.blocks)==null?void 0:a.map((s,o)=>o===c&&(s.kind==="reasoning"||s.kind==="tool")?{...s,open:!s.open}:s)}}))};return e.jsx("div",{className:"shared-chat-transcript",children:d.map(t=>t.role==="user"?e.jsx(S,{id:t.id,text:t.text??"",paperMentions:t.paperMentions??[],paperSelection:t.paperSelection},t.id):e.jsx(k,{msg:t,papers:p,onToggleBlock:u},t.id))})},te=()=>{const{shareId:i=""}=f(),d=x(),l=g(),[p,u]=h.useState(60),t=v({queryKey:["shared-chat",i],queryFn:()=>q(i),retry:(r,a)=>!(a instanceof m&&a.status===404)&&r<1});h.useEffect(()=>{const r=document.title,a=document.head.querySelector('meta[name="robots"]'),s=a==null?void 0:a.content,o=a??document.createElement("meta");return o.name="robots",o.content="noindex,nofollow",a||document.head.appendChild(o),document.title="Shared conversation",()=>{document.title=r,a?a.content=s??"":o.remove()}},[]),h.useLayoutEffect(()=>{const r=document.querySelector(".app-header");if(!r)return;const a=()=>u(r.offsetHeight);a();const s=new ResizeObserver(a);return s.observe(r),()=>s.disconnect()},[]);const c=r=>{C(r,void 0,{autoSend:!1}),d("/chat")},n=t.error instanceof m&&t.error.status===404;return t.isLoading?e.jsxs("div",{className:"shared-chat-state",role:"status",children:[e.jsx(w,{})," Loading shared conversation…"]}):n?e.jsxs("div",{className:"shared-chat-state shared-chat-not-found",children:[e.jsx("h1",{children:"Shared conversation not found"}),e.jsx("p",{children:"This link is invalid or is no longer available."})]}):t.isError||!t.data?e.jsxs("div",{className:"shared-chat-state",role:"alert",children:[e.jsx("h1",{children:"Couldn’t load this conversation"}),e.jsx("p",{children:"Please check your connection and try again."}),e.jsx("button",{type:"button",onClick:()=>void t.refetch(),children:"Try again"})]}):e.jsx(j,{workspaceKey:`share:${i}:${t.data.updated_at}`,autoOpenOnMount:!0,children:e.jsxs("div",{className:"shared-chat-page",style:{height:`calc(100dvh - ${p}px)`},children:[e.jsxs("div",{className:"shared-chat-heading",children:[e.jsx("h1",{children:"Shared conversation"}),l&&e.jsx("span",{className:"chat-staging-badge",children:"Staging"})]}),e.jsx(b,{variant:"shared",children:e.jsxs("div",{className:"shared-chat-content","data-testid":"shared-conversation-pane",children:[e.jsx(_,{detail:t.data},t.data.updated_at),t.data.model_label&&e.jsxs("div",{className:"shared-chat-attribution",children:[e.jsxs("span",{children:["Generated with ",t.data.model_label]}),t.data.model_provider==="huggingface"&&e.jsxs("span",{children:["Powered by ",e.jsx("span",{"aria-hidden":"true",children:"🤗"})," ",e.jsx("a",{href:"https://huggingface.co/docs/inference-providers/en/index",target:"_blank",rel:"noreferrer",children:"Inference Providers"})]}),t.data.model_provider==="openrouter"&&e.jsxs("span",{children:["Powered by ",e.jsx("a",{href:"https://openrouter.ai",target:"_blank",rel:"noreferrer",children:"OpenRouter"})]}),t.data.model_provider==="openai"&&e.jsx("span",{children:"Powered by OpenAI"})]}),e.jsxs("section",{className:"shared-chat-fresh","aria-labelledby":"shared-chat-fresh-title",children:[e.jsx("h2",{id:"shared-chat-fresh-title",children:"Start a new conversation"}),e.jsx("p",{children:"Your new question starts with an empty context."}),l&&e.jsxs("div",{className:"shared-chat-access-note",role:"note",children:[e.jsx("strong",{children:"Limited staging preview."})," Starting a chat is available only to approved Hugging Face users."]}),e.jsx(y,{onSend:r=>c(r.text),placeholder:"Ask a new research question…"})]})]})})]})})};export{te as default};
 
1
+ import{u as f,c as x,r as h,j as e,m as g}from"./index-CbgxfyGU.js";import{u as v}from"./useQuery-Bx9s5-D2.js";import{A as j,a as b,C as y,U as S,b as k}from"./ArtifactWorkspace-Cwix1Wp6.js";import{C as m,e as w,p as N,q as C,g as q}from"./chatSessions-DwLUbLRo.js";/* empty css */import"./hover-card-ufez2uMo.js";import"./CatalogEntityPreviewLink-Cvehtzvn.js";import"./catalog-DhK7_9-6.js";import"./github-BYklgHDz.js";import"./file-text-BK_7Q2rV.js";import"./PaperPreviewLink-DZDNIh1g.js";import"./index-ZkEATkOr.js";import"./index-BH3yOoza.js";import"./katex-DkKDou_j.js";import"./paperQueryKeys-B8u1BWlI.js";import"./curation-C7Gmmp4z.js";import"./useMutation-P_trTy9i.js";import"./chat-DzTo2WUO.js";import"./copy-bzw7JVus.js";import"./thumbs-up-CDCzGuPd.js";import"./arrow-left-Czeu3VzJ.js";import"./external-link-DZIH4GGr.js";import"./plus-UK0TEjgd.js";import"./search-CLtAJGOp.js";import"./chevron-up-Cpt5JLeI.js";import"./AuthorAvatar-CUJMmp_z.js";const _=({detail:i})=>{const[d,l]=h.useState(()=>N(i)),p=h.useMemo(()=>{const t={};for(const c of d)for(const n of c.blocks??[])if(n.kind==="tool")for(const r of n.results??[])t[r.route_id]=r;return t},[d]),u=(t,c)=>{l(n=>n.map(r=>{var a;return r.id!==t?r:{...r,blocks:(a=r.blocks)==null?void 0:a.map((s,o)=>o===c&&(s.kind==="reasoning"||s.kind==="tool")?{...s,open:!s.open}:s)}}))};return e.jsx("div",{className:"shared-chat-transcript",children:d.map(t=>t.role==="user"?e.jsx(S,{id:t.id,text:t.text??"",paperMentions:t.paperMentions??[],paperSelection:t.paperSelection},t.id):e.jsx(k,{msg:t,papers:p,onToggleBlock:u},t.id))})},te=()=>{const{shareId:i=""}=f(),d=x(),l=g(),[p,u]=h.useState(60),t=v({queryKey:["shared-chat",i],queryFn:()=>q(i),retry:(r,a)=>!(a instanceof m&&a.status===404)&&r<1});h.useEffect(()=>{const r=document.title,a=document.head.querySelector('meta[name="robots"]'),s=a==null?void 0:a.content,o=a??document.createElement("meta");return o.name="robots",o.content="noindex,nofollow",a||document.head.appendChild(o),document.title="Shared conversation",()=>{document.title=r,a?a.content=s??"":o.remove()}},[]),h.useLayoutEffect(()=>{const r=document.querySelector(".app-header");if(!r)return;const a=()=>u(r.offsetHeight);a();const s=new ResizeObserver(a);return s.observe(r),()=>s.disconnect()},[]);const c=r=>{C(r,void 0,{autoSend:!1}),d("/chat")},n=t.error instanceof m&&t.error.status===404;return t.isLoading?e.jsxs("div",{className:"shared-chat-state",role:"status",children:[e.jsx(w,{})," Loading shared conversation…"]}):n?e.jsxs("div",{className:"shared-chat-state shared-chat-not-found",children:[e.jsx("h1",{children:"Shared conversation not found"}),e.jsx("p",{children:"This link is invalid or is no longer available."})]}):t.isError||!t.data?e.jsxs("div",{className:"shared-chat-state",role:"alert",children:[e.jsx("h1",{children:"Couldn’t load this conversation"}),e.jsx("p",{children:"Please check your connection and try again."}),e.jsx("button",{type:"button",onClick:()=>void t.refetch(),children:"Try again"})]}):e.jsx(j,{workspaceKey:`share:${i}:${t.data.updated_at}`,autoOpenOnMount:!0,children:e.jsxs("div",{className:"shared-chat-page",style:{height:`calc(100dvh - ${p}px)`},children:[e.jsxs("div",{className:"shared-chat-heading",children:[e.jsx("h1",{children:"Shared conversation"}),l&&e.jsx("span",{className:"chat-staging-badge",children:"Staging"})]}),e.jsx(b,{variant:"shared",children:e.jsxs("div",{className:"shared-chat-content","data-testid":"shared-conversation-pane",children:[e.jsx(_,{detail:t.data},t.data.updated_at),t.data.model_label&&e.jsxs("div",{className:"shared-chat-attribution",children:[e.jsxs("span",{children:["Generated with ",t.data.model_label]}),t.data.model_provider==="huggingface"&&e.jsxs("span",{children:["Powered by ",e.jsx("span",{"aria-hidden":"true",children:"🤗"})," ",e.jsx("a",{href:"https://huggingface.co/docs/inference-providers/en/index",target:"_blank",rel:"noreferrer",children:"Inference Providers"})]}),t.data.model_provider==="openrouter"&&e.jsxs("span",{children:["Powered by ",e.jsx("a",{href:"https://openrouter.ai",target:"_blank",rel:"noreferrer",children:"OpenRouter"})]}),t.data.model_provider==="openai"&&e.jsx("span",{children:"Powered by OpenAI"})]}),e.jsxs("section",{className:"shared-chat-fresh","aria-labelledby":"shared-chat-fresh-title",children:[e.jsx("h2",{id:"shared-chat-fresh-title",children:"Start a new conversation"}),e.jsx("p",{children:"Your new question starts with an empty context."}),l&&e.jsxs("div",{className:"shared-chat-access-note",role:"note",children:[e.jsx("strong",{children:"Limited staging preview."})," Starting a chat is available only to approved Hugging Face users."]}),e.jsx(y,{onSend:r=>c(r.text),placeholder:"Ask a new research question…"})]})]})})]})})};export{te as default};
assets/{SignInToEditDialog-DpqyyHCb.js → SignInToEditDialog-CNIcNqbK.js} RENAMED
@@ -1,6 +1,6 @@
1
- import{n as be,r as a,j as e,a6 as je,A as fe,a7 as ye,p as Ne,s as we,X as Se,C as _e,H as ke}from"./index-YwiKC6Po.js";import{B as P}from"./button-B90pJJiy.js";import{I as u}from"./input-DEeEc0bH.js";import{T as Ce}from"./textarea-BPIMGf5w.js";import{S as se}from"./searchable-select-Bqfyxu17.js";import{D as ie,a as oe,c as le,b as ce,d as de,e as De}from"./dialog-foxx0Wu6.js";import{u as Ie}from"./useMutation-f6iDkf3w.js";import{s as b,p as j}from"./submissions-BJgYjF7O.js";import{c as te}from"./catalog-B15Yh5dN.js";import{L as Ee}from"./loader-circle-B0KtDERb.js";/**
2
  * @license lucide-react v0.462.0 - ISC
3
  *
4
  * This source code is licensed under the ISC license.
5
  * See the LICENSE file in the root directory of this source tree.
6
- */const Me=be("ImagePlus",[["path",{d:"M16 5h6",key:"1vod17"}],["path",{d:"M19 2v6",key:"4bpg5p"}],["path",{d:"M21 11.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7.5",key:"1ue2ih"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}]]);var Le=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Pe=Le.reduce((l,c)=>{const d=je(`Primitive.${c}`),t=a.forwardRef((o,f)=>{const{asChild:m,...y}=o,p=m?d:c;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),e.jsx(p,{...y,ref:f})});return t.displayName=`Primitive.${c}`,{...l,[c]:t}},{}),Ae="Label",ue=a.forwardRef((l,c)=>e.jsx(Pe.label,{...l,ref:c,onMouseDown:d=>{var o;d.target.closest("button, input, select, textarea")||((o=l.onMouseDown)==null||o.call(l,d),!d.defaultPrevented&&d.detail>1&&d.preventDefault())}}));ue.displayName=Ae;var me=ue;const Fe=ye("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),i=a.forwardRef(({className:l,...c},d)=>e.jsx(me,{ref:d,className:fe(Fe(),l),...c}));i.displayName=me.displayName;const ae=200,Be=2e3,Re=300,Te=500,re=1e3,Ge=2*1024*1024,ne=["image/jpeg","image/png","image/webp","image/gif"],He={task:"e.g. Long-context Retrieval",method:"e.g. Rotary Position Embedding",benchmark:"e.g. ImageNet (ReaL)",metric:"e.g. Top-5 Accuracy",conference:"e.g. International Conference on Machine Learning 2026"},Ue={task:"Briefly describe this task and what it covers.",method:"Briefly describe this method and what it covers.",benchmark:"Briefly describe this benchmark, the task it belongs to, and where it comes from.",metric:"Briefly describe this metric and whether higher or lower is better.",conference:"Briefly describe this conference, including its research focus and edition."};function Qe({open:l,onOpenChange:c,paperId:d,kind:t}){const[o,f]=a.useState(""),[m,y]=a.useState(""),[p,A]=a.useState(""),[F,B]=a.useState(""),[R,T]=a.useState(""),[G,H]=a.useState(""),[S,U]=a.useState(""),[x,_]=a.useState(null),[k,O]=a.useState(""),[C,V]=a.useState(""),[X,K]=a.useState(""),[D,z]=a.useState(""),[I,$]=a.useState(""),[E,q]=a.useState(""),[n,Y]=a.useState(null),[g,M]=a.useState(null),[J,W]=a.useState("higher_is_better"),[Q,h]=a.useState(""),N=a.useRef(null),{toast:Z}=Ne(),w=t,ge=t==="task"||t==="method";a.useEffect(()=>{l||(f(""),y(""),A(""),B(""),T(""),H(""),U(""),_(null),O(""),V(""),K(""),z(""),$(""),q(""),Y(null),M(null),W("higher_is_better"),h(""))},[l]);const ee=s=>{if(!s)return;if(h(""),!ne.includes(s.type)){h("Choose a JPEG, PNG, WebP, or GIF image.");return}if(s.size>Ge){h("Image must be 2 MB or smaller.");return}const r=new FileReader;r.onload=()=>{if(typeof r.result!="string"){h("Could not read that image.");return}_({file_name:s.name,mime_type:s.type,data_url:r.result})},r.onerror=()=>h("Could not read that image."),r.readAsDataURL(s)},he=s=>{s.preventDefault(),ee(s.dataTransfer.files[0])},pe=async s=>(await te.listTasks({page_size:100,...s?{q:s}:{}})).results.map(v=>({value:v.id,label:v.name})),xe=async s=>n?(await te.listDatasets({task_id:Number(n.value),page_size:100,...s?{q:s}:{}})).results.map(v=>({value:v.id,label:v.name})):[],L=Ie({mutationFn:async()=>{const s=d?parseInt(d):null,r=m.trim()||void 0;switch(t){case"task":return b.submit(j(s,"new_task",{name:o.trim(),description:r,image:x??void 0,image_credit:k.trim()||void 0,keywords:X.trim()||void 0,parent_id:D?Number(D):void 0,area_id:I?Number(I):void 0}));case"method":return b.submit(j(s,"new_method",{name:o.trim(),description:r,image:x??void 0,image_credit:k.trim()||void 0,source_url:C.trim()||void 0}));case"benchmark":return b.submit(j(s,"new_benchmark",{benchmark:o.trim(),task:E.trim(),description:m.trim()}));case"metric":return b.submit(j(s,"new_metric",{name:o.trim(),description:m.trim(),direction:J==="lower_is_better"?"lower_is_better":"higher_is_better",task_id:Number(n==null?void 0:n.value),dataset_id:Number(g==null?void 0:g.value)}));case"conference":return b.submit(j(s,"new_conference",{name:o.trim(),description:r,year:Number(p),start_date:F||void 0,end_date:R||void 0,venue:G.trim()||void 0,url:S.trim()}))}},onSuccess:()=>{Z({title:"Suggestion submitted for review",description:`Thanks! An admin will review your suggested ${w} shortly.`}),c(!1)},onError:s=>{const r=we(s,`Failed to submit your ${w} suggestion.`);Z({title:"Could not submit suggestion",description:r,variant:"destructive"})}}),ve=o.trim().length>0&&(t==="task"||t==="method"&&!!C.trim()||t==="conference"&&!!p&&!!S.trim()||t==="benchmark"&&!!E.trim()&&!!m.trim()||t==="metric"&&!!n&&!!g&&!!m.trim());return e.jsx(ie,{open:l,onOpenChange:c,children:e.jsxs(oe,{className:"max-w-lg max-h-[90vh] overflow-y-auto",children:[e.jsxs(le,{children:[e.jsxs(ce,{children:["Suggest a new ",w]}),e.jsxs(de,{children:["Propose a ",w," that isn't in the list yet. An admin will review the suggestion, but approval won't automatically change the catalog."]})]}),e.jsxs("div",{className:"space-y-4 py-2",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(i,{htmlFor:"suggest-name",children:t==="benchmark"?"Benchmark":"Name"}),e.jsx(u,{id:"suggest-name",value:o,maxLength:ae,placeholder:He[t],onChange:s=>f(s.target.value)})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs(i,{htmlFor:"suggest-description",children:["Description",t==="task"||t==="method"||t==="conference"?" (optional)":""]}),e.jsx(Ce,{id:"suggest-description",value:m,maxLength:Be,placeholder:Ue[t],onChange:s=>y(s.target.value)})]}),t==="task"&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(i,{htmlFor:"suggest-keywords",children:"Keywords (optional)"}),e.jsx(u,{id:"suggest-keywords",value:X,onChange:s=>K(s.target.value),placeholder:"comma-separated matching terms"})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsx(u,{type:"number",min:"1",value:D,onChange:s=>z(s.target.value),placeholder:"Parent task ID (optional)"}),e.jsx(u,{type:"number",min:"1",value:I,onChange:s=>$(s.target.value),placeholder:"Area ID (optional)"})]})]}),t==="benchmark"&&e.jsxs("div",{className:"space-y-2",children:[e.jsx(i,{htmlFor:"suggest-benchmark-task",children:"Task"}),e.jsx(u,{id:"suggest-benchmark-task",value:E,maxLength:ae,placeholder:"e.g. Deepfake Detection",onChange:s=>q(s.target.value)})]}),t==="metric"&&e.jsxs("div",{className:"space-y-3",children:[e.jsx(i,{children:"Intended leaderboard"}),e.jsxs("select",{"aria-label":"Metric direction",className:"w-full rounded-md border bg-background p-2",value:J,onChange:s=>W(s.target.value),children:[e.jsx("option",{value:"higher_is_better",children:"Higher is better"}),e.jsx("option",{value:"lower_is_better",children:"Lower is better"})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(i,{children:"Task"}),e.jsx(se,{value:(n==null?void 0:n.value)??"",onChange:(s,r)=>{Y(r),M(null)},selectedOption:n,placeholder:"Select task",searchPlaceholder:"Search tasks...",emptyMessage:"No tasks found.",errorMessage:"Could not load tasks. Try again.",queryKey:["suggest-metric-task-search"],queryFn:pe,ariaLabel:"Select task",className:"h-10"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(i,{children:"Benchmark"}),e.jsx(se,{value:(g==null?void 0:g.value)??"",onChange:(s,r)=>M(r),selectedOption:g,placeholder:n?"Select benchmark":"Select task first",searchPlaceholder:"Search benchmarks...",emptyMessage:"No benchmarks found for this task.",errorMessage:"Could not load benchmarks. Try again.",disabled:!n,queryKey:["suggest-metric-benchmark-search",n==null?void 0:n.value],queryFn:xe,enabled:!!n,ariaLabel:"Select benchmark",className:"h-10"})]})]})]}),ge&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(i,{children:"Image (optional)"}),e.jsx("input",{ref:N,className:"sr-only",type:"file",accept:ne.join(","),onChange:s=>{var r;return ee((r=s.target.files)==null?void 0:r[0])}}),x?e.jsxs("div",{className:"relative overflow-hidden rounded-md border border-border bg-muted/30",children:[e.jsx("img",{src:x.data_url,alt:"Selected suggestion",className:"max-h-48 w-full object-contain"}),e.jsxs(P,{type:"button",variant:"secondary",size:"sm",className:"absolute right-2 top-2 h-8 px-2",onClick:()=>{_(null),N.current&&(N.current.value="")},children:[e.jsx(Se,{className:"mr-1 h-4 w-4"}),"Remove"]}),e.jsx("div",{className:"truncate border-t border-border px-3 py-2 text-xs text-muted-foreground",children:x.file_name})]}):e.jsxs("button",{type:"button",className:"flex w-full flex-col items-center justify-center rounded-md border border-dashed border-border px-4 py-6 text-center text-sm text-muted-foreground transition-colors hover:border-foreground/50 hover:text-foreground",onClick:()=>{var s;return(s=N.current)==null?void 0:s.click()},onDragOver:s=>s.preventDefault(),onDrop:he,children:[e.jsx(Me,{className:"mb-2 h-6 w-6"}),e.jsx("span",{children:"Drop an image here, or click to choose one"}),e.jsx("span",{className:"mt-1 text-xs",children:"JPEG, PNG, WebP, or GIF · max 2 MB"})]}),Q&&e.jsx("p",{className:"text-sm text-destructive",role:"alert",children:Q})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(i,{htmlFor:"suggest-image-source",children:"Image source (optional)"}),e.jsx(u,{id:"suggest-image-source",value:k,maxLength:re,placeholder:"Creator, publication, or source URL",onChange:s=>O(s.target.value)})]}),t==="method"&&e.jsxs("div",{className:"space-y-2",children:[e.jsx(i,{htmlFor:"suggest-method-source",children:"Source URL (optional)"}),e.jsx(u,{id:"suggest-method-source",value:C,maxLength:re,placeholder:"https://arxiv.org/abs/...",onChange:s=>V(s.target.value)})]})]}),t==="conference"&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(i,{htmlFor:"suggest-year",children:"Edition year"}),e.jsx(u,{id:"suggest-year",type:"number",min:"1900",max:"2200",value:p,placeholder:"2026",onChange:s=>A(s.target.value)})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsxs("div",{children:[e.jsx(i,{htmlFor:"suggest-start-date",children:"Start date (optional)"}),e.jsx(u,{id:"suggest-start-date",type:"date",value:F,onChange:s=>B(s.target.value)})]}),e.jsxs("div",{children:[e.jsx(i,{htmlFor:"suggest-end-date",children:"End date (optional)"}),e.jsx(u,{id:"suggest-end-date",type:"date",value:R,onChange:s=>T(s.target.value)})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(i,{htmlFor:"suggest-venue",children:"Venue (optional)"}),e.jsx(u,{id:"suggest-venue",value:G,maxLength:Re,placeholder:"e.g. Vancouver Convention Centre, Canada",onChange:s=>H(s.target.value)})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(i,{htmlFor:"suggest-url",children:"URL (optional)"}),e.jsx(u,{id:"suggest-url",type:"url",inputMode:"url",value:S,maxLength:Te,placeholder:"https://example.org/conference",onChange:s=>U(s.target.value)})]})]})]}),e.jsxs(De,{children:[e.jsx(P,{variant:"outline",onClick:()=>c(!1),children:"Cancel"}),e.jsx(P,{onClick:()=>L.mutate(),disabled:L.isPending||!ve,children:L.isPending?e.jsxs(e.Fragment,{children:[e.jsx(Ee,{className:"w-4 h-4 mr-2 animate-spin"}),"Submitting..."]}):e.jsxs(e.Fragment,{children:[e.jsx(_e,{className:"w-4 h-4 mr-2"}),"Submit suggestion"]})})]})]})})}function Ze({open:l,onOpenChange:c,sectionLabel:d,returnTo:t,taxonomySuggestion:o=!1}){return e.jsx(ie,{open:l,onOpenChange:c,children:e.jsxs(oe,{className:"max-w-md",children:[e.jsxs(le,{children:[e.jsxs(ce,{children:["Sign in to ",o?"suggest":"edit"," ",d]}),e.jsx(de,{children:o?"Sign in with your Hugging Face account so an admin can review your suggestion.":"Anyone can suggest edits to a paper page. Sign in with your Hugging Face account first so an admin can review your submission."})]}),e.jsx("div",{className:"flex justify-center pt-2",children:e.jsx(ke,{returnTo:t})})]})})}export{i as L,Qe as S,Ze as a};
 
1
+ import{n as be,r as a,j as e,a7 as je,B as fe,a8 as ye,p as Ne,t as we,X as Se,C as _e,H as ke}from"./index-CbgxfyGU.js";import{B as P}from"./button-Bv9oZ-QU.js";import{I as u}from"./input-B6pxtfPe.js";import{T as Ce}from"./textarea-Bf06GTSH.js";import{S as te}from"./searchable-select-DNdBIahG.js";import{D as ie,a as oe,c as le,b as ce,d as de,e as De}from"./dialog-Cfp_d3CC.js";import{u as Ie}from"./useMutation-P_trTy9i.js";import{s as b,p as j}from"./submissions-aWj7YtuZ.js";import{c as se}from"./catalog-DhK7_9-6.js";import{L as Ee}from"./loader-circle-CWMja8Zn.js";/**
2
  * @license lucide-react v0.462.0 - ISC
3
  *
4
  * This source code is licensed under the ISC license.
5
  * See the LICENSE file in the root directory of this source tree.
6
+ */const Me=be("ImagePlus",[["path",{d:"M16 5h6",key:"1vod17"}],["path",{d:"M19 2v6",key:"4bpg5p"}],["path",{d:"M21 11.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7.5",key:"1ue2ih"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}]]);var Le=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Pe=Le.reduce((l,c)=>{const d=je(`Primitive.${c}`),s=a.forwardRef((o,f)=>{const{asChild:m,...y}=o,p=m?d:c;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),e.jsx(p,{...y,ref:f})});return s.displayName=`Primitive.${c}`,{...l,[c]:s}},{}),Fe="Label",ue=a.forwardRef((l,c)=>e.jsx(Pe.label,{...l,ref:c,onMouseDown:d=>{var o;d.target.closest("button, input, select, textarea")||((o=l.onMouseDown)==null||o.call(l,d),!d.defaultPrevented&&d.detail>1&&d.preventDefault())}}));ue.displayName=Fe;var me=ue;const Ae=ye("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),i=a.forwardRef(({className:l,...c},d)=>e.jsx(me,{ref:d,className:fe(Ae(),l),...c}));i.displayName=me.displayName;const ae=200,Be=2e3,Re=300,Te=500,re=1e3,Ge=2*1024*1024,ne=["image/jpeg","image/png","image/webp","image/gif"],He={task:"e.g. Long-context Retrieval",method:"e.g. Rotary Position Embedding",benchmark:"e.g. ImageNet (ReaL)",metric:"e.g. Top-5 Accuracy",conference:"e.g. International Conference on Machine Learning 2026"},Ue={task:"Briefly describe this task and what it covers.",method:"Briefly describe this method and what it covers.",benchmark:"Briefly describe this benchmark, the task it belongs to, and where it comes from.",metric:"Briefly describe this metric and whether higher or lower is better.",conference:"Briefly describe this conference, including its research focus and edition."};function Qe({open:l,onOpenChange:c,paperId:d,kind:s}){const[o,f]=a.useState(""),[m,y]=a.useState(""),[p,F]=a.useState(""),[A,B]=a.useState(""),[R,T]=a.useState(""),[G,H]=a.useState(""),[S,U]=a.useState(""),[x,_]=a.useState(null),[k,O]=a.useState(""),[C,V]=a.useState(""),[X,K]=a.useState(""),[D,z]=a.useState(""),[I,$]=a.useState(""),[E,q]=a.useState(""),[n,Y]=a.useState(null),[g,M]=a.useState(null),[J,W]=a.useState("higher_is_better"),[Q,h]=a.useState(""),N=a.useRef(null),{toast:Z}=Ne(),w=s,ge=s==="task"||s==="method";a.useEffect(()=>{l||(f(""),y(""),F(""),B(""),T(""),H(""),U(""),_(null),O(""),V(""),K(""),z(""),$(""),q(""),Y(null),M(null),W("higher_is_better"),h(""))},[l]);const ee=t=>{if(!t)return;if(h(""),!ne.includes(t.type)){h("Choose a JPEG, PNG, WebP, or GIF image.");return}if(t.size>Ge){h("Image must be 2 MB or smaller.");return}const r=new FileReader;r.onload=()=>{if(typeof r.result!="string"){h("Could not read that image.");return}_({file_name:t.name,mime_type:t.type,data_url:r.result})},r.onerror=()=>h("Could not read that image."),r.readAsDataURL(t)},he=t=>{t.preventDefault(),ee(t.dataTransfer.files[0])},pe=async t=>(await se.listTasks({page_size:100,...t?{q:t}:{}})).results.map(v=>({value:v.id,label:v.name})),xe=async t=>n?(await se.listDatasets({task_id:Number(n.value),page_size:100,...t?{q:t}:{}})).results.map(v=>({value:v.id,label:v.name})):[],L=Ie({mutationFn:async()=>{const t=d?parseInt(d):null,r=m.trim()||void 0;switch(s){case"task":return b.submit(j(t,"new_task",{name:o.trim(),description:r,image:x??void 0,image_credit:k.trim()||void 0,keywords:X.trim()||void 0,parent_id:D?Number(D):void 0,area_id:I?Number(I):void 0}));case"method":return b.submit(j(t,"new_method",{name:o.trim(),description:r,image:x??void 0,image_credit:k.trim()||void 0,source_url:C.trim()||void 0}));case"benchmark":return b.submit(j(t,"new_benchmark",{benchmark:o.trim(),task:E.trim(),description:m.trim()}));case"metric":return b.submit(j(t,"new_metric",{name:o.trim(),description:m.trim(),direction:J==="lower_is_better"?"lower_is_better":"higher_is_better",task_id:Number(n==null?void 0:n.value),dataset_id:Number(g==null?void 0:g.value)}));case"conference":return b.submit(j(t,"new_conference",{name:o.trim(),description:r,year:Number(p),start_date:A||void 0,end_date:R||void 0,venue:G.trim()||void 0,url:S.trim()}))}},onSuccess:()=>{Z({title:"Suggestion submitted for review",description:`Thanks! An admin will review your suggested ${w} shortly.`}),c(!1)},onError:t=>{const r=we(t,`Failed to submit your ${w} suggestion.`);Z({title:"Could not submit suggestion",description:r,variant:"destructive"})}}),ve=o.trim().length>0&&(s==="task"||s==="method"&&!!C.trim()||s==="conference"&&!!p&&!!S.trim()||s==="benchmark"&&!!E.trim()&&!!m.trim()||s==="metric"&&!!n&&!!g&&!!m.trim());return e.jsx(ie,{open:l,onOpenChange:c,children:e.jsxs(oe,{className:"max-w-lg max-h-[90vh] overflow-y-auto",children:[e.jsxs(le,{children:[e.jsxs(ce,{children:["Suggest a new ",w]}),e.jsxs(de,{children:["Propose a ",w," that isn't in the list yet. An admin will review the suggestion, but approval won't automatically change the catalog."]})]}),e.jsxs("div",{className:"space-y-4 py-2",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(i,{htmlFor:"suggest-name",children:s==="benchmark"?"Benchmark":"Name"}),e.jsx(u,{id:"suggest-name",value:o,maxLength:ae,placeholder:He[s],onChange:t=>f(t.target.value)})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs(i,{htmlFor:"suggest-description",children:["Description",s==="task"||s==="method"||s==="conference"?" (optional)":""]}),e.jsx(Ce,{id:"suggest-description",value:m,maxLength:Be,placeholder:Ue[s],onChange:t=>y(t.target.value)})]}),s==="task"&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(i,{htmlFor:"suggest-keywords",children:"Keywords (optional)"}),e.jsx(u,{id:"suggest-keywords",value:X,onChange:t=>K(t.target.value),placeholder:"comma-separated matching terms"})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsx(u,{type:"number",min:"1",value:D,onChange:t=>z(t.target.value),placeholder:"Parent task ID (optional)"}),e.jsx(u,{type:"number",min:"1",value:I,onChange:t=>$(t.target.value),placeholder:"Area ID (optional)"})]})]}),s==="benchmark"&&e.jsxs("div",{className:"space-y-2",children:[e.jsx(i,{htmlFor:"suggest-benchmark-task",children:"Task"}),e.jsx(u,{id:"suggest-benchmark-task",value:E,maxLength:ae,placeholder:"e.g. Deepfake Detection",onChange:t=>q(t.target.value)})]}),s==="metric"&&e.jsxs("div",{className:"space-y-3",children:[e.jsx(i,{children:"Intended leaderboard"}),e.jsxs("select",{"aria-label":"Metric direction",className:"w-full rounded-md border bg-background p-2",value:J,onChange:t=>W(t.target.value),children:[e.jsx("option",{value:"higher_is_better",children:"Higher is better"}),e.jsx("option",{value:"lower_is_better",children:"Lower is better"})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(i,{children:"Task"}),e.jsx(te,{value:(n==null?void 0:n.value)??"",onChange:(t,r)=>{Y(r),M(null)},selectedOption:n,placeholder:"Select task",searchPlaceholder:"Search tasks...",emptyMessage:"No tasks found.",errorMessage:"Could not load tasks. Try again.",queryKey:["suggest-metric-task-search"],queryFn:pe,ariaLabel:"Select task",className:"h-10"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(i,{children:"Benchmark"}),e.jsx(te,{value:(g==null?void 0:g.value)??"",onChange:(t,r)=>M(r),selectedOption:g,placeholder:n?"Select benchmark":"Select task first",searchPlaceholder:"Search benchmarks...",emptyMessage:"No benchmarks found for this task.",errorMessage:"Could not load benchmarks. Try again.",disabled:!n,queryKey:["suggest-metric-benchmark-search",n==null?void 0:n.value],queryFn:xe,enabled:!!n,ariaLabel:"Select benchmark",className:"h-10"})]})]})]}),ge&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(i,{children:"Image (optional)"}),e.jsx("input",{ref:N,className:"sr-only",type:"file",accept:ne.join(","),onChange:t=>{var r;return ee((r=t.target.files)==null?void 0:r[0])}}),x?e.jsxs("div",{className:"relative overflow-hidden rounded-md border border-border bg-muted/30",children:[e.jsx("img",{src:x.data_url,alt:"Selected suggestion",className:"max-h-48 w-full object-contain"}),e.jsxs(P,{type:"button",variant:"secondary",size:"sm",className:"absolute right-2 top-2 h-8 px-2",onClick:()=>{_(null),N.current&&(N.current.value="")},children:[e.jsx(Se,{className:"mr-1 h-4 w-4"}),"Remove"]}),e.jsx("div",{className:"truncate border-t border-border px-3 py-2 text-xs text-muted-foreground",children:x.file_name})]}):e.jsxs("button",{type:"button",className:"flex w-full flex-col items-center justify-center rounded-md border border-dashed border-border px-4 py-6 text-center text-sm text-muted-foreground transition-colors hover:border-foreground/50 hover:text-foreground",onClick:()=>{var t;return(t=N.current)==null?void 0:t.click()},onDragOver:t=>t.preventDefault(),onDrop:he,children:[e.jsx(Me,{className:"mb-2 h-6 w-6"}),e.jsx("span",{children:"Drop an image here, or click to choose one"}),e.jsx("span",{className:"mt-1 text-xs",children:"JPEG, PNG, WebP, or GIF · max 2 MB"})]}),Q&&e.jsx("p",{className:"text-sm text-destructive",role:"alert",children:Q})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(i,{htmlFor:"suggest-image-source",children:"Image source (optional)"}),e.jsx(u,{id:"suggest-image-source",value:k,maxLength:re,placeholder:"Creator, publication, or source URL",onChange:t=>O(t.target.value)})]}),s==="method"&&e.jsxs("div",{className:"space-y-2",children:[e.jsx(i,{htmlFor:"suggest-method-source",children:"Source URL (optional)"}),e.jsx(u,{id:"suggest-method-source",value:C,maxLength:re,placeholder:"https://arxiv.org/abs/...",onChange:t=>V(t.target.value)})]})]}),s==="conference"&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(i,{htmlFor:"suggest-year",children:"Edition year"}),e.jsx(u,{id:"suggest-year",type:"number",min:"1900",max:"2200",value:p,placeholder:"2026",onChange:t=>F(t.target.value)})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsxs("div",{children:[e.jsx(i,{htmlFor:"suggest-start-date",children:"Start date (optional)"}),e.jsx(u,{id:"suggest-start-date",type:"date",value:A,onChange:t=>B(t.target.value)})]}),e.jsxs("div",{children:[e.jsx(i,{htmlFor:"suggest-end-date",children:"End date (optional)"}),e.jsx(u,{id:"suggest-end-date",type:"date",value:R,onChange:t=>T(t.target.value)})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(i,{htmlFor:"suggest-venue",children:"Venue (optional)"}),e.jsx(u,{id:"suggest-venue",value:G,maxLength:Re,placeholder:"e.g. Vancouver Convention Centre, Canada",onChange:t=>H(t.target.value)})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(i,{htmlFor:"suggest-url",children:"URL (optional)"}),e.jsx(u,{id:"suggest-url",type:"url",inputMode:"url",value:S,maxLength:Te,placeholder:"https://example.org/conference",onChange:t=>U(t.target.value)})]})]})]}),e.jsxs(De,{children:[e.jsx(P,{variant:"outline",onClick:()=>c(!1),children:"Cancel"}),e.jsx(P,{onClick:()=>L.mutate(),disabled:L.isPending||!ve,children:L.isPending?e.jsxs(e.Fragment,{children:[e.jsx(Ee,{className:"w-4 h-4 mr-2 animate-spin"}),"Submitting..."]}):e.jsxs(e.Fragment,{children:[e.jsx(_e,{className:"w-4 h-4 mr-2"}),"Submit suggestion"]})})]})]})})}function Ze({open:l,onOpenChange:c,sectionLabel:d,returnTo:s,taxonomySuggestion:o=!1}){return e.jsx(ie,{open:l,onOpenChange:c,children:e.jsxs(oe,{className:"max-w-md",children:[e.jsxs(le,{children:[e.jsxs(ce,{children:["Sign in to ",o?"suggest":"edit"," ",d]}),e.jsx(de,{children:o?"Sign in with your Hugging Face account so an admin can review your suggestion.":"Anyone can suggest edits to a paper page. Sign in with your Hugging Face account first so an admin can review your submission."})]}),e.jsx("div",{className:"flex justify-center pt-2",children:e.jsx(ke,{returnTo:s})})]})})}export{i as L,Qe as S,Ze as a};