nielsr HF Staff commited on
Commit
95a6484
·
verified ·
1 Parent(s): 780ca14

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-X0gceHNa.js → AgentLogos-iXpPIhF4.js} +1 -1
  2. assets/{AiDeadlinesView-DXNTHNh7.js → AiDeadlinesView-DQKbmOEp.js} +1 -1
  3. assets/{ApiDocsView-TMUT1uKG.js → ApiDocsView-BIeltN2O.js} +1 -1
  4. assets/{ArtifactWorkspace-DjmVwPtv.js → ArtifactWorkspace-CJ1HK4Ql.js} +0 -0
  5. assets/{AstraForRoboticsView-BbszFVTy.js → AstraForRoboticsView-DmU0FsyS.js} +1 -1
  6. assets/{AuthorDetailView-CaGOhKvp.js → AuthorDetailView-B6Dfq2eT.js} +1 -1
  7. assets/{AuthorizePaperEditView-CACq7t0y.js → AuthorizePaperEditView-B8ZkbyDF.js} +1 -1
  8. assets/{AutonomousOperations-MICEiGP-.js → AutonomousOperations-CBwnK_3T.js} +1 -1
  9. assets/{BenchmarkDetailView-yNcqUPH5.js → BenchmarkDetailView-DxC3K--i.js} +1 -1
  10. assets/{BenchmarkTrendSparkline-zOCrwYee.js → BenchmarkTrendSparkline-qRluvC2o.js} +1 -1
  11. assets/{ChatView-D05FqzNN.js → ChatView-DIICJpRR.js} +1 -1
  12. assets/{ConferenceDetailView-BQNsWdTQ.js → ConferenceDetailView-CFkr6WaN.js} +1 -1
  13. assets/{ConferenceTaskView-1cQq839a.js → ConferenceTaskView-DgjhR-nI.js} +1 -1
  14. assets/{ConferencesIndexView-xuk0tUW3.js → ConferencesIndexView-DtVGQJO-.js} +1 -1
  15. assets/{CronDashboard-DB3sbLbc.js → CronDashboard-D7zjxrOi.js} +1 -1
  16. assets/{ExternalSourceEvalBadge-BJLG4V5e.js → ExternalSourceEvalBadge-CFCVDZdz.js} +1 -1
  17. assets/{FeedView-tDL-q83T.js → FeedView-CKzkkGT3.js} +1 -1
  18. assets/FollowingView-JS3HLSja.js +0 -1
  19. assets/FollowingView-K4wtbnIU.js +1 -0
  20. assets/{FrameworksIndexView-BN7MFr6Z.js → FrameworksIndexView-CZN5tVDP.js} +1 -1
  21. assets/{LatexTitle-hDpJaCcC.js → LatexTitle-DeUmWtI2.js} +1 -1
  22. assets/{MarkdownText-Day0Kgef.js → MarkdownText-BAxpQ8kL.js} +1 -1
  23. assets/{McpView-BYsLwetm.js → McpView-bG-GKlVn.js} +1 -1
  24. assets/{MethodDetailView-F9pllNW2.js → MethodDetailView-D6J0H0lp.js} +1 -1
  25. assets/{MethodsIndexView-DGJvf5Eu.js → MethodsIndexView-CvuwXR8P.js} +1 -1
  26. assets/{NotFound-B17io6Dc.js → NotFound-DxjoZmsI.js} +1 -1
  27. assets/{OrganizationContributionGraph-CZh_axJ7.js → OrganizationContributionGraph-MOADHS0w.js} +1 -1
  28. assets/OrganizationDetailView-BaWHf8c3.js +0 -1
  29. assets/OrganizationDetailView-Dx9jtmcN.js +1 -0
  30. assets/{OrganizationPaperFeed-Div4OPKZ.js → OrganizationPaperFeed-CSdBnVax.js} +1 -1
  31. assets/OrganizationTaskView-BAux-T_Q.js +0 -1
  32. assets/OrganizationTaskView-KXvg-Jdk.js +1 -0
  33. assets/{OrganizationsIndexView-DTBeE-_e.js → OrganizationsIndexView-BNnMb-df.js} +1 -1
  34. assets/{PaperDateFilter-_7LVshRy.js → PaperDateFilter-D1l9Effu.js} +1 -1
  35. assets/{PaperDetailView-BtTprUPH.js → PaperDetailView-D2DMSSYR.js} +0 -0
  36. assets/{PaperDetailView-zafDc-w2.css → PaperDetailView-gEwMf3J2.css} +1 -1
  37. assets/{PaperFeedFilters-DejcdS4D.js → PaperFeedFilters-DuB_em33.js} +1 -1
  38. assets/{PaperPreviewLink-o7boC8db.js → PaperPreviewLink-B3LP-qo2.js} +4 -4
  39. assets/{PaperReaderView-C1gVJgR9.js → PaperReaderView-Ca1UB_CN.js} +1 -1
  40. assets/{PapersListView-D9eWbp0V.js → PapersListView-9hEXDfZu.js} +1 -1
  41. assets/{PrivacyView-DhjlTRUO.js → PrivacyView-pSbRmtUq.js} +1 -1
  42. assets/{RateLimitsView-D-Ppxke0.js → RateLimitsView-Cgi9mlTV.js} +1 -1
  43. assets/{ResearchFollowButton-B4KEpku3.js → ResearchFollowButton-CSky6nMM.js} +1 -1
  44. assets/{SavedPapersView-CcXud9tN.js → SavedPapersView-BULUL_Ye.js} +1 -1
  45. assets/{SearchOverlay-DAENF2Gn.js → SearchOverlay-Dd2p25Gs.js} +1 -1
  46. assets/{SettingsView-Ctk16WdM.js → SettingsView-DJxBHPTp.js} +1 -1
  47. assets/{SharedChatView-OdvPYiTD.js → SharedChatView-CNCxZbRQ.js} +1 -1
  48. assets/{SignInToEditDialog-BlcFzmvx.js → SignInToEditDialog-D7miI02Z.js} +1 -1
  49. assets/{StagingAccessRequestView-V9BWLSa_.js → StagingAccessRequestView-7fNxCXia.js} +1 -1
  50. assets/{SubmissionsDashboard-CUVN0zVH.js → SubmissionsDashboard-DUs2AeDp.js} +2 -2
assets/{AgentLogos-X0gceHNa.js → AgentLogos-iXpPIhF4.js} RENAMED
@@ -1 +1 @@
1
- import{j as e}from"./index-CcJ6cWma.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-B9MfhMLC.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-DXNTHNh7.js → AiDeadlinesView-DQKbmOEp.js} RENAMED
@@ -1,3 +1,3 @@
1
- import{r as x,j as t}from"./index-CcJ6cWma.js";import{u as A}from"./useQuery-D3-GqcPN.js";import{c as B}from"./catalog-B7hp4mKD.js";import{S as U}from"./switch-BXzYt6AA.js";import{S as W}from"./skeleton-B-mlrgWO.js";import{A as O,a as V}from"./alert-CMODHIPT.js";import{s as z}from"./safeExternalHref-CkBrsh84.js";import{D as P,a as G,b as Y,c as H,d as K}from"./dialog-E2hweIxC.js";import"./index-n6sLvpB2.js";const b=1e3*60*60*24,S={urgent:"#c0392b",soon:"#b9770e",normal:"#3f7d3f",passed:"var(--ink-faint)"},k=e=>e.split("-").map(a=>a.charAt(0).toUpperCase()+a.slice(1)).join(" "),q=new Set(["machine-learning","computer-vision","natural-language-processing","data-mining","robotics","computer-graphics","human-computer-interaction","web-search","signal-processing","representation-learning","reinforcement-learning","optimization-methods","large-language-models","information-retrieval","speech","mathematics"]),Q=e=>e.trim().toLowerCase().replace(/\s+/g,"-"),D=e=>Array.from(new Set((e.tags??[]).map(Q).filter(a=>q.has(a)))),F=e=>new Date(e).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}),I=(e,a)=>{if(!e)return null;const n=new Date(`${e}T00:00:00`),r=a?new Date(`${a}T00:00:00`):null,o=s=>s.toLocaleDateString("en-US",{month:"long",day:"numeric"}),i=n.getFullYear();return r&&r.getTime()!==n.getTime()?n.getMonth()===r.getMonth()?`${o(n).replace(/\d+$/,"").trim()} ${n.getDate()}–${r.getDate()}, ${i}`:`${o(n)} – ${o(r)}, ${i}`:`${o(n)}, ${i}`},M=e=>[...e.deadlines??[]].sort((a,n)=>new Date(a.deadline_at).getTime()-new Date(n.deadline_at).getTime()),T=(e,a)=>M(e).find(n=>new Date(n.deadline_at).getTime()>a)??null,L=e=>{const a=M(e);return a.length?a[a.length-1]:null},J=(e,a)=>{const n=e-a;if(n<=0)return"Deadline passed";const r=Math.floor(n/b);if(r>=1){const s=Math.floor((n-r*b)/36e5);return`in ${r}d ${s}h`}const o=Math.floor(n/(1e3*60*60));return o>=1?`in ${o}h`:`in ${Math.max(1,Math.floor(n/(1e3*60)))}m`},X=(e,a)=>{const n=e-a;if(n<=0)return"Deadline passed";const r=Math.floor(n/b),o=Math.floor(n%b/(1e3*60*60)),i=Math.floor(n%(1e3*60*60)/(1e3*60)),s=Math.floor(n%(1e3*60)/1e3);return`${r}d ${o}h ${i}m ${s}s`},_=(e,a)=>{if(e==null)return S.passed;const n=(e-a)/b;return n<=0?S.passed:n<=7?S.urgent:n<=30?S.soon:S.normal},$={fontFamily:"var(--mono)",fontSize:10,letterSpacing:"0.12em",textTransform:"uppercase",color:"var(--ink-faint)"},Z=(e,a)=>{const n=Math.ceil((e-a)/b);return n<=0?"passed":`${n} ${n===1?"day":"days"}`},R=(e,a)=>{const n=I(e.start_date,e.end_date),r=e.venue||[e.city,e.country].filter(Boolean).join(", ");return[`${a.label||a.type||"Deadline"} for ${e.name}`,n?`Dates: ${n}`:null,r?`Location: ${r}`:null,e.url?`Website: ${e.url}`:null].filter(Boolean).join(`
2
  `)},C=e=>e.toISOString().replace(/[-:]/g,"").replace(/\.\d{3}/,""),ee=(e,a)=>{const n=new Date(a.deadline_at),r=new Date(n.getTime()+60*60*1e3),o=`${e.short_name||e.name} ${a.label||a.type||"deadline"}`,i=e.venue||[e.city,e.country].filter(Boolean).join(", "),s=`https://calendar.google.com/calendar/render?action=TEMPLATE&text=${encodeURIComponent(o)}&dates=${C(n)}/${C(r)}&details=${encodeURIComponent(R(e,a))}&location=${encodeURIComponent(i)}`,m=z(s);m&&window.open(m,"_blank","noopener,noreferrer")},te=(e,a)=>{const n=new Date(a.deadline_at),r=new Date(n.getTime()+60*60*1e3),o=`${e.short_name||e.name} ${a.label||a.type||"deadline"}`,i=e.venue||[e.city,e.country].filter(Boolean).join(", "),s=["BEGIN:VCALENDAR","VERSION:2.0","BEGIN:VEVENT",e.url?`URL:${e.url}`:null,`DTSTART:${C(n)}`,`DTEND:${C(r)}`,`SUMMARY:${o}`,`DESCRIPTION:${R(e,a).replace(/\n/g,"\\n")}`,i?`LOCATION:${i}`:null,"END:VEVENT","END:VCALENDAR"].filter(Boolean).join(`
3
  `),m=new Blob([s],{type:"text/calendar;charset=utf-8"}),c=document.createElement("a");c.href=URL.createObjectURL(m),c.download=`${(e.short_name||e.name).toLowerCase().replace(/\s+/g,"-")}-deadline.ics`,document.body.appendChild(c),c.click(),document.body.removeChild(c),URL.revokeObjectURL(c.href)},ne=({conf:e,open:a,onOpenChange:n})=>{const[r,o]=x.useState(()=>Date.now());x.useEffect(()=>{if(!a)return;o(Date.now());const d=setInterval(()=>o(Date.now()),1e3);return()=>clearInterval(d)},[a]);const i=x.useMemo(()=>e?M(e):[],[e]),s=x.useMemo(()=>e?T(e,r):null,[e,r]),m=e?I(e.start_date,e.end_date):null,c=e?e.venue||[e.city,e.country].filter(Boolean).join(", ")||e.location:null,u=s?new Date(s.deadline_at).getTime():null;return t.jsx(P,{open:a,onOpenChange:n,children:t.jsx(G,{className:"max-w-xl",style:{background:"var(--bg-elevated)",maxHeight:"85vh",overflowY:"auto"},children:e&&t.jsxs(t.Fragment,{children:[t.jsxs(Y,{children:[t.jsx(H,{asChild:!0,children:t.jsx("h2",{style:{fontFamily:"var(--serif)",fontSize:26,fontWeight:500,letterSpacing:"-0.01em",margin:0},children:e.short_name?`${e.short_name} ${e.year??""}`.trim():e.name})}),e.short_name&&e.name||e.description?t.jsx(K,{asChild:!0,children:t.jsx("span",{style:{fontFamily:"var(--serif)",fontSize:14,color:"var(--ink-soft)"},children:e.short_name?e.name:e.description})}):null]}),t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:20,marginTop:4},children:[t.jsxs("div",{style:{display:"flex",flexWrap:"wrap",gap:24},children:[m&&t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:4},children:[t.jsx("span",{style:$,children:"Dates"}),t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:13,color:"var(--ink-soft)"},children:m})]}),c&&t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:4},children:[t.jsx("span",{style:$,children:"Venue"}),t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:13,color:"var(--ink-soft)"},children:c})]})]}),u!=null&&t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:4,padding:"12px 14px",borderRadius:8,background:"var(--bg-subtle)",border:"1px solid var(--hairline)"},children:[t.jsx("span",{style:$,children:"Next deadline in"}),t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:22,fontWeight:600,color:_(u,r)},children:X(u,r)})]}),t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:8},children:[t.jsx("span",{style:$,children:"Important deadlines"}),i.length===0?t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:13,color:"var(--ink-faint)"},children:"No deadlines listed"}):i.map((d,p)=>{const y=new Date(d.deadline_at).getTime(),l=s!=null&&d.deadline_at===s.deadline_at&&d.type===s.type,h=y<=r;return t.jsxs("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:12,padding:"8px 12px",borderRadius:6,background:l?"var(--accent-soft)":"transparent",border:l?"1px solid var(--hairline-strong)":"1px solid var(--hairline)",opacity:h&&!l?.55:1},children:[t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:2},children:[t.jsxs("span",{style:{fontFamily:"var(--mono)",fontSize:13,color:"var(--ink)",fontWeight:l?600:400},children:[d.label||k(d.type||"deadline"),l&&t.jsx("span",{style:{...$,marginLeft:8},children:"Next"})]}),t.jsxs("span",{style:{fontFamily:"var(--mono)",fontSize:12,color:"var(--ink-faint)"},children:[F(d.deadline_at),d.timezone?` · ${d.timezone}`:""]})]}),t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:12,fontWeight:600,whiteSpace:"nowrap",color:_(h?null:y,r)},children:Z(y,r)})]},`${d.type??"deadline"}-${p}`)})]}),D(e).length>0&&t.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:6},children:D(e).map(d=>t.jsx("span",{className:"tag-chip",style:{background:"var(--bg-subtle)",color:"var(--ink-soft)"},children:k(d)},d))}),t.jsxs("div",{style:{display:"flex",flexWrap:"wrap",alignItems:"center",gap:16,paddingTop:12,borderTop:"1px solid var(--hairline)"},children:[e.url&&t.jsx("a",{href:z(e.url)??void 0,target:"_blank",rel:"noopener noreferrer",style:{fontFamily:"var(--mono)",fontSize:12,color:"var(--accent-text)"},children:"Visit website ↗"}),s&&t.jsxs("div",{style:{display:"flex",gap:12,marginLeft:"auto"},children:[t.jsx("button",{type:"button",className:"tag-chip",onClick:()=>ee(e,s),style:{background:"var(--bg-subtle)",color:"var(--ink-soft)"},children:"+ Google Calendar"}),t.jsx("button",{type:"button",className:"tag-chip",onClick:()=>te(e,s),style:{background:"var(--bg-subtle)",color:"var(--ink-soft)"},children:"+ Apple / .ics"})]})]})]})]})})})},E=({id:e,label:a,checked:n,onChange:r})=>t.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,fontFamily:"var(--mono)",fontSize:12,color:"var(--ink-soft)"},children:[t.jsx(U,{id:e,checked:n,onCheckedChange:r}),t.jsx("label",{htmlFor:e,style:{cursor:"pointer"},children:a})]}),ae=({conf:e,now:a,selectedDomains:n,onToggleDomain:r,onOpen:o})=>{const i=T(e,a),s=i??L(e),m=s?new Date(s.deadline_at).getTime():null,c=_(i?m:null,a),u=I(e.start_date,e.end_date),d=[e.city??null,e.country??null].filter(Boolean).join(", ");return t.jsxs("div",{role:"button",tabIndex:0,onClick:()=>o(e),onKeyDown:p=>{(p.key==="Enter"||p.key===" ")&&(p.preventDefault(),o(e))},style:{border:"1px solid var(--hairline)",borderRadius:8,padding:20,background:"var(--bg-elevated)",display:"flex",flexDirection:"column",gap:12,cursor:"pointer"},children:[t.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"baseline",gap:12},children:[t.jsx("h3",{style:{fontFamily:"var(--serif)",fontSize:20,fontWeight:500,letterSpacing:"-0.01em",margin:0},children:e.short_name?`${e.short_name} ${e.year??""}`.trim():e.name}),e.url&&t.jsx("a",{href:z(e.url)??void 0,target:"_blank",rel:"noopener noreferrer",onClick:p=>p.stopPropagation(),style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--accent-text)",whiteSpace:"nowrap"},children:"website ↗"})]}),t.jsxs("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:12,paddingBottom:12,borderBottom:"1px solid var(--hairline)"},children:[t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:2},children:[t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)"},children:(s==null?void 0:s.label)||(s==null?void 0:s.type)||"Deadline"}),t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:12,color:"var(--ink-soft)"},children:s?`${F(s.deadline_at)}${s.timezone?` · ${s.timezone}`:""}`:"TBD"})]}),t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:14,fontWeight:600,color:c,whiteSpace:"nowrap"},children:m!=null?J(m,a):"TBD"})]}),t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:4,fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)"},children:[u&&t.jsx("span",{children:u}),d&&t.jsx("span",{children:d})]}),D(e).length>0&&t.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:6},children:D(e).map(p=>{const y=n.has(p);return t.jsx("button",{className:"tag-chip",onClick:l=>{l.stopPropagation(),r(p)},style:{background:y?"var(--ink)":"var(--bg-subtle)",color:y?"var(--bg)":"var(--ink-soft)"},children:k(p)},p)})})]})},ue=()=>{const[e,a]=x.useState(!0),[n,r]=x.useState(!1),[o,i]=x.useState(new Set),[s,m]=x.useState(null),c=x.useMemo(()=>Date.now(),[]),u=A({queryKey:["conference-deadlines"],queryFn:()=>B.conferenceDeadlines(),staleTime:10*60*1e3}),d=l=>{i(h=>{const g=new Set(h);return g.has(l)?g.delete(l):g.add(l),g})},p=x.useMemo(()=>{var h;const l=new Map;return(h=u.data)==null||h.results.forEach(g=>{D(g).forEach(j=>l.set(j,(l.get(j)??0)+1))}),Array.from(l.entries()).sort((g,j)=>j[1]-g[1]).map(([g])=>g)},[u.data]),y=x.useMemo(()=>{var j;const h=(((j=u.data)==null?void 0:j.results)??[]).filter(f=>!(e&&f.tier!=="a"||o.size>0&&!D(f).some(v=>o.has(v))||!n&&!T(f,c))),g=f=>{const w=T(f,c);if(w)return{group:0,time:new Date(w.deadline_at).getTime()};const v=L(f);return{group:1,time:-(v?new Date(v.deadline_at).getTime():0)}};return[...h].sort((f,w)=>{const v=g(f),N=g(w);return v.group!==N.group?v.group-N.group:v.time-N.time})},[u.data,e,n,o,c]);return u.error?t.jsx("div",{className:"page",children:t.jsx(O,{variant:"destructive",children:t.jsx(V,{children:"Failed to load conference deadlines. Please try again."})})}):t.jsxs("div",{className:"page",children:[t.jsx("div",{className:"feed-header",children:t.jsxs("div",{children:[t.jsxs("h1",{className:"feed-title",children:["AI Conference ",t.jsx("em",{children:"Deadlines"})]}),t.jsx("div",{className:"feed-subtitle",children:"Upcoming submission deadlines for major AI conferences, counting down."})]})}),t.jsxs("div",{style:{display:"flex",flexWrap:"wrap",alignItems:"center",gap:20,padding:"16px 0",borderBottom:"1px solid var(--hairline)",marginBottom:24},children:[t.jsx(E,{id:"top-tier-only",label:"Top tier only",checked:e,onChange:a}),t.jsx(E,{id:"show-past",label:"Show past conferences",checked:n,onChange:r})]}),p.length>0&&t.jsxs("div",{style:{display:"flex",flexWrap:"wrap",gap:6,marginBottom:24},children:[p.map(l=>{const h=o.has(l);return t.jsx("button",{className:"tag-chip",onClick:()=>d(l),style:{background:h?"var(--ink)":"var(--bg-subtle)",color:h?"var(--bg)":"var(--ink-soft)"},children:k(l)},l)}),o.size>0&&t.jsx("button",{className:"tag-chip",onClick:()=>i(new Set),style:{background:"transparent",color:"var(--ink-faint)"},children:"Clear ✕"})]}),t.jsx("div",{className:"sort-bar",children:t.jsx("div",{className:"results-count",children:u.isLoading?"…":`${y.length} conferences`})}),u.isLoading?t.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(320px, 1fr))",gap:16},children:Array.from({length:6}).map((l,h)=>t.jsx(W,{className:"h-44"},h))}):y.length===0?t.jsxs("div",{className:"no-results",children:["No conferences match these filters",n?".":" — try enabling “Show past conferences”."]}):t.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(320px, 1fr))",gap:16},children:y.map(l=>t.jsx(ae,{conf:l,now:c,selectedDomains:o,onToggleDomain:d,onOpen:m},l.id))}),t.jsx(ne,{conf:s,open:s!==null,onOpenChange:l=>{l||m(null)}})]})};export{ue as default};
 
1
+ import{r as x,j as t}from"./index-B9MfhMLC.js";import{u as A}from"./useQuery-Bx81pmgm.js";import{c as B}from"./catalog-BqDz3O_s.js";import{S as U}from"./switch-BLheP41Z.js";import{S as W}from"./skeleton-BcfKeAOl.js";import{A as O,a as V}from"./alert-Bg2LnrDJ.js";import{s as z}from"./safeExternalHref-CkBrsh84.js";import{D as P,a as G,b as Y,c as H,d as K}from"./dialog-CR0TulAY.js";import"./index-Dcor-vPm.js";const b=1e3*60*60*24,S={urgent:"#c0392b",soon:"#b9770e",normal:"#3f7d3f",passed:"var(--ink-faint)"},k=e=>e.split("-").map(a=>a.charAt(0).toUpperCase()+a.slice(1)).join(" "),q=new Set(["machine-learning","computer-vision","natural-language-processing","data-mining","robotics","computer-graphics","human-computer-interaction","web-search","signal-processing","representation-learning","reinforcement-learning","optimization-methods","large-language-models","information-retrieval","speech","mathematics"]),Q=e=>e.trim().toLowerCase().replace(/\s+/g,"-"),D=e=>Array.from(new Set((e.tags??[]).map(Q).filter(a=>q.has(a)))),F=e=>new Date(e).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}),I=(e,a)=>{if(!e)return null;const n=new Date(`${e}T00:00:00`),r=a?new Date(`${a}T00:00:00`):null,o=s=>s.toLocaleDateString("en-US",{month:"long",day:"numeric"}),i=n.getFullYear();return r&&r.getTime()!==n.getTime()?n.getMonth()===r.getMonth()?`${o(n).replace(/\d+$/,"").trim()} ${n.getDate()}–${r.getDate()}, ${i}`:`${o(n)} – ${o(r)}, ${i}`:`${o(n)}, ${i}`},M=e=>[...e.deadlines??[]].sort((a,n)=>new Date(a.deadline_at).getTime()-new Date(n.deadline_at).getTime()),T=(e,a)=>M(e).find(n=>new Date(n.deadline_at).getTime()>a)??null,L=e=>{const a=M(e);return a.length?a[a.length-1]:null},J=(e,a)=>{const n=e-a;if(n<=0)return"Deadline passed";const r=Math.floor(n/b);if(r>=1){const s=Math.floor((n-r*b)/36e5);return`in ${r}d ${s}h`}const o=Math.floor(n/(1e3*60*60));return o>=1?`in ${o}h`:`in ${Math.max(1,Math.floor(n/(1e3*60)))}m`},X=(e,a)=>{const n=e-a;if(n<=0)return"Deadline passed";const r=Math.floor(n/b),o=Math.floor(n%b/(1e3*60*60)),i=Math.floor(n%(1e3*60*60)/(1e3*60)),s=Math.floor(n%(1e3*60)/1e3);return`${r}d ${o}h ${i}m ${s}s`},_=(e,a)=>{if(e==null)return S.passed;const n=(e-a)/b;return n<=0?S.passed:n<=7?S.urgent:n<=30?S.soon:S.normal},$={fontFamily:"var(--mono)",fontSize:10,letterSpacing:"0.12em",textTransform:"uppercase",color:"var(--ink-faint)"},Z=(e,a)=>{const n=Math.ceil((e-a)/b);return n<=0?"passed":`${n} ${n===1?"day":"days"}`},R=(e,a)=>{const n=I(e.start_date,e.end_date),r=e.venue||[e.city,e.country].filter(Boolean).join(", ");return[`${a.label||a.type||"Deadline"} for ${e.name}`,n?`Dates: ${n}`:null,r?`Location: ${r}`:null,e.url?`Website: ${e.url}`:null].filter(Boolean).join(`
2
  `)},C=e=>e.toISOString().replace(/[-:]/g,"").replace(/\.\d{3}/,""),ee=(e,a)=>{const n=new Date(a.deadline_at),r=new Date(n.getTime()+60*60*1e3),o=`${e.short_name||e.name} ${a.label||a.type||"deadline"}`,i=e.venue||[e.city,e.country].filter(Boolean).join(", "),s=`https://calendar.google.com/calendar/render?action=TEMPLATE&text=${encodeURIComponent(o)}&dates=${C(n)}/${C(r)}&details=${encodeURIComponent(R(e,a))}&location=${encodeURIComponent(i)}`,m=z(s);m&&window.open(m,"_blank","noopener,noreferrer")},te=(e,a)=>{const n=new Date(a.deadline_at),r=new Date(n.getTime()+60*60*1e3),o=`${e.short_name||e.name} ${a.label||a.type||"deadline"}`,i=e.venue||[e.city,e.country].filter(Boolean).join(", "),s=["BEGIN:VCALENDAR","VERSION:2.0","BEGIN:VEVENT",e.url?`URL:${e.url}`:null,`DTSTART:${C(n)}`,`DTEND:${C(r)}`,`SUMMARY:${o}`,`DESCRIPTION:${R(e,a).replace(/\n/g,"\\n")}`,i?`LOCATION:${i}`:null,"END:VEVENT","END:VCALENDAR"].filter(Boolean).join(`
3
  `),m=new Blob([s],{type:"text/calendar;charset=utf-8"}),c=document.createElement("a");c.href=URL.createObjectURL(m),c.download=`${(e.short_name||e.name).toLowerCase().replace(/\s+/g,"-")}-deadline.ics`,document.body.appendChild(c),c.click(),document.body.removeChild(c),URL.revokeObjectURL(c.href)},ne=({conf:e,open:a,onOpenChange:n})=>{const[r,o]=x.useState(()=>Date.now());x.useEffect(()=>{if(!a)return;o(Date.now());const d=setInterval(()=>o(Date.now()),1e3);return()=>clearInterval(d)},[a]);const i=x.useMemo(()=>e?M(e):[],[e]),s=x.useMemo(()=>e?T(e,r):null,[e,r]),m=e?I(e.start_date,e.end_date):null,c=e?e.venue||[e.city,e.country].filter(Boolean).join(", ")||e.location:null,u=s?new Date(s.deadline_at).getTime():null;return t.jsx(P,{open:a,onOpenChange:n,children:t.jsx(G,{className:"max-w-xl",style:{background:"var(--bg-elevated)",maxHeight:"85vh",overflowY:"auto"},children:e&&t.jsxs(t.Fragment,{children:[t.jsxs(Y,{children:[t.jsx(H,{asChild:!0,children:t.jsx("h2",{style:{fontFamily:"var(--serif)",fontSize:26,fontWeight:500,letterSpacing:"-0.01em",margin:0},children:e.short_name?`${e.short_name} ${e.year??""}`.trim():e.name})}),e.short_name&&e.name||e.description?t.jsx(K,{asChild:!0,children:t.jsx("span",{style:{fontFamily:"var(--serif)",fontSize:14,color:"var(--ink-soft)"},children:e.short_name?e.name:e.description})}):null]}),t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:20,marginTop:4},children:[t.jsxs("div",{style:{display:"flex",flexWrap:"wrap",gap:24},children:[m&&t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:4},children:[t.jsx("span",{style:$,children:"Dates"}),t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:13,color:"var(--ink-soft)"},children:m})]}),c&&t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:4},children:[t.jsx("span",{style:$,children:"Venue"}),t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:13,color:"var(--ink-soft)"},children:c})]})]}),u!=null&&t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:4,padding:"12px 14px",borderRadius:8,background:"var(--bg-subtle)",border:"1px solid var(--hairline)"},children:[t.jsx("span",{style:$,children:"Next deadline in"}),t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:22,fontWeight:600,color:_(u,r)},children:X(u,r)})]}),t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:8},children:[t.jsx("span",{style:$,children:"Important deadlines"}),i.length===0?t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:13,color:"var(--ink-faint)"},children:"No deadlines listed"}):i.map((d,p)=>{const y=new Date(d.deadline_at).getTime(),l=s!=null&&d.deadline_at===s.deadline_at&&d.type===s.type,h=y<=r;return t.jsxs("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:12,padding:"8px 12px",borderRadius:6,background:l?"var(--accent-soft)":"transparent",border:l?"1px solid var(--hairline-strong)":"1px solid var(--hairline)",opacity:h&&!l?.55:1},children:[t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:2},children:[t.jsxs("span",{style:{fontFamily:"var(--mono)",fontSize:13,color:"var(--ink)",fontWeight:l?600:400},children:[d.label||k(d.type||"deadline"),l&&t.jsx("span",{style:{...$,marginLeft:8},children:"Next"})]}),t.jsxs("span",{style:{fontFamily:"var(--mono)",fontSize:12,color:"var(--ink-faint)"},children:[F(d.deadline_at),d.timezone?` · ${d.timezone}`:""]})]}),t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:12,fontWeight:600,whiteSpace:"nowrap",color:_(h?null:y,r)},children:Z(y,r)})]},`${d.type??"deadline"}-${p}`)})]}),D(e).length>0&&t.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:6},children:D(e).map(d=>t.jsx("span",{className:"tag-chip",style:{background:"var(--bg-subtle)",color:"var(--ink-soft)"},children:k(d)},d))}),t.jsxs("div",{style:{display:"flex",flexWrap:"wrap",alignItems:"center",gap:16,paddingTop:12,borderTop:"1px solid var(--hairline)"},children:[e.url&&t.jsx("a",{href:z(e.url)??void 0,target:"_blank",rel:"noopener noreferrer",style:{fontFamily:"var(--mono)",fontSize:12,color:"var(--accent-text)"},children:"Visit website ↗"}),s&&t.jsxs("div",{style:{display:"flex",gap:12,marginLeft:"auto"},children:[t.jsx("button",{type:"button",className:"tag-chip",onClick:()=>ee(e,s),style:{background:"var(--bg-subtle)",color:"var(--ink-soft)"},children:"+ Google Calendar"}),t.jsx("button",{type:"button",className:"tag-chip",onClick:()=>te(e,s),style:{background:"var(--bg-subtle)",color:"var(--ink-soft)"},children:"+ Apple / .ics"})]})]})]})]})})})},E=({id:e,label:a,checked:n,onChange:r})=>t.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,fontFamily:"var(--mono)",fontSize:12,color:"var(--ink-soft)"},children:[t.jsx(U,{id:e,checked:n,onCheckedChange:r}),t.jsx("label",{htmlFor:e,style:{cursor:"pointer"},children:a})]}),ae=({conf:e,now:a,selectedDomains:n,onToggleDomain:r,onOpen:o})=>{const i=T(e,a),s=i??L(e),m=s?new Date(s.deadline_at).getTime():null,c=_(i?m:null,a),u=I(e.start_date,e.end_date),d=[e.city??null,e.country??null].filter(Boolean).join(", ");return t.jsxs("div",{role:"button",tabIndex:0,onClick:()=>o(e),onKeyDown:p=>{(p.key==="Enter"||p.key===" ")&&(p.preventDefault(),o(e))},style:{border:"1px solid var(--hairline)",borderRadius:8,padding:20,background:"var(--bg-elevated)",display:"flex",flexDirection:"column",gap:12,cursor:"pointer"},children:[t.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"baseline",gap:12},children:[t.jsx("h3",{style:{fontFamily:"var(--serif)",fontSize:20,fontWeight:500,letterSpacing:"-0.01em",margin:0},children:e.short_name?`${e.short_name} ${e.year??""}`.trim():e.name}),e.url&&t.jsx("a",{href:z(e.url)??void 0,target:"_blank",rel:"noopener noreferrer",onClick:p=>p.stopPropagation(),style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--accent-text)",whiteSpace:"nowrap"},children:"website ↗"})]}),t.jsxs("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:12,paddingBottom:12,borderBottom:"1px solid var(--hairline)"},children:[t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:2},children:[t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)"},children:(s==null?void 0:s.label)||(s==null?void 0:s.type)||"Deadline"}),t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:12,color:"var(--ink-soft)"},children:s?`${F(s.deadline_at)}${s.timezone?` · ${s.timezone}`:""}`:"TBD"})]}),t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:14,fontWeight:600,color:c,whiteSpace:"nowrap"},children:m!=null?J(m,a):"TBD"})]}),t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:4,fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)"},children:[u&&t.jsx("span",{children:u}),d&&t.jsx("span",{children:d})]}),D(e).length>0&&t.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:6},children:D(e).map(p=>{const y=n.has(p);return t.jsx("button",{className:"tag-chip",onClick:l=>{l.stopPropagation(),r(p)},style:{background:y?"var(--ink)":"var(--bg-subtle)",color:y?"var(--bg)":"var(--ink-soft)"},children:k(p)},p)})})]})},ue=()=>{const[e,a]=x.useState(!0),[n,r]=x.useState(!1),[o,i]=x.useState(new Set),[s,m]=x.useState(null),c=x.useMemo(()=>Date.now(),[]),u=A({queryKey:["conference-deadlines"],queryFn:()=>B.conferenceDeadlines(),staleTime:10*60*1e3}),d=l=>{i(h=>{const g=new Set(h);return g.has(l)?g.delete(l):g.add(l),g})},p=x.useMemo(()=>{var h;const l=new Map;return(h=u.data)==null||h.results.forEach(g=>{D(g).forEach(j=>l.set(j,(l.get(j)??0)+1))}),Array.from(l.entries()).sort((g,j)=>j[1]-g[1]).map(([g])=>g)},[u.data]),y=x.useMemo(()=>{var j;const h=(((j=u.data)==null?void 0:j.results)??[]).filter(f=>!(e&&f.tier!=="a"||o.size>0&&!D(f).some(v=>o.has(v))||!n&&!T(f,c))),g=f=>{const w=T(f,c);if(w)return{group:0,time:new Date(w.deadline_at).getTime()};const v=L(f);return{group:1,time:-(v?new Date(v.deadline_at).getTime():0)}};return[...h].sort((f,w)=>{const v=g(f),N=g(w);return v.group!==N.group?v.group-N.group:v.time-N.time})},[u.data,e,n,o,c]);return u.error?t.jsx("div",{className:"page",children:t.jsx(O,{variant:"destructive",children:t.jsx(V,{children:"Failed to load conference deadlines. Please try again."})})}):t.jsxs("div",{className:"page",children:[t.jsx("div",{className:"feed-header",children:t.jsxs("div",{children:[t.jsxs("h1",{className:"feed-title",children:["AI Conference ",t.jsx("em",{children:"Deadlines"})]}),t.jsx("div",{className:"feed-subtitle",children:"Upcoming submission deadlines for major AI conferences, counting down."})]})}),t.jsxs("div",{style:{display:"flex",flexWrap:"wrap",alignItems:"center",gap:20,padding:"16px 0",borderBottom:"1px solid var(--hairline)",marginBottom:24},children:[t.jsx(E,{id:"top-tier-only",label:"Top tier only",checked:e,onChange:a}),t.jsx(E,{id:"show-past",label:"Show past conferences",checked:n,onChange:r})]}),p.length>0&&t.jsxs("div",{style:{display:"flex",flexWrap:"wrap",gap:6,marginBottom:24},children:[p.map(l=>{const h=o.has(l);return t.jsx("button",{className:"tag-chip",onClick:()=>d(l),style:{background:h?"var(--ink)":"var(--bg-subtle)",color:h?"var(--bg)":"var(--ink-soft)"},children:k(l)},l)}),o.size>0&&t.jsx("button",{className:"tag-chip",onClick:()=>i(new Set),style:{background:"transparent",color:"var(--ink-faint)"},children:"Clear ✕"})]}),t.jsx("div",{className:"sort-bar",children:t.jsx("div",{className:"results-count",children:u.isLoading?"…":`${y.length} conferences`})}),u.isLoading?t.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(320px, 1fr))",gap:16},children:Array.from({length:6}).map((l,h)=>t.jsx(W,{className:"h-44"},h))}):y.length===0?t.jsxs("div",{className:"no-results",children:["No conferences match these filters",n?".":" — try enabling “Show past conferences”."]}):t.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(320px, 1fr))",gap:16},children:y.map(l=>t.jsx(ae,{conf:l,now:c,selectedDomains:o,onToggleDomain:d,onOpen:m},l.id))}),t.jsx(ne,{conf:s,open:s!==null,onOpenChange:l=>{l||m(null)}})]})};export{ue as default};
assets/{ApiDocsView-TMUT1uKG.js → ApiDocsView-BIeltN2O.js} RENAMED
@@ -1,4 +1,4 @@
1
- import{a4 as m,r as o,j as e}from"./index-CcJ6cWma.js";import{u as f}from"./useQuery-D3-GqcPN.js";import{M as g}from"./index-VElAzfws.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{a4 as m,r as o,j as e}from"./index-B9MfhMLC.js";import{u as f}from"./useQuery-Bx81pmgm.js";import{M as g}from"./index-10yxmORR.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/{ArtifactWorkspace-DjmVwPtv.js → ArtifactWorkspace-CJ1HK4Ql.js} RENAMED
The diff for this file is too large to render. See raw diff
 
assets/{AstraForRoboticsView-BbszFVTy.js → AstraForRoboticsView-DmU0FsyS.js} RENAMED
@@ -1 +1 @@
1
- import{d as v,r as h,j as a,L as n}from"./index-CcJ6cWma.js";import{P as N}from"./components-Bax1_3qI.js";import{P}from"./PaperFeedFilters-DejcdS4D.js";import{A as k,a as A}from"./alert-CMODHIPT.js";import{S as w}from"./skeleton-B-mlrgWO.js";import{u as S}from"./useIntersectionObserver-DtY8SYYt.js";import{u as R}from"./usePapers-TCIcWoUA.js";import{f as L,D as T}from"./latexPlainText-DI8YEXVe.js";import{t as F}from"./colors-DCzRcDI4.js";import"./paperQueryKeys-BP2E-0yf.js";import"./LatexTitle-hDpJaCcC.js";import"./papers-CClaKvmL.js";import"./safeExternalHref-CkBrsh84.js";import"./useQuery-D3-GqcPN.js";import"./useInfiniteQuery-CFy22PuG.js";const f="robotics",b="gpt-6-astra",I="https://x.com/YuXiang_IRVL/status/2100395131924840570",C=[["trending","trending"],["date_published","newest"],["citation_count","most cited"]],O=[{handle:"Frame_Robotics",author:"Frame Robotics",summary:"Real-arm control that fixes grip angle and carry height on the next try after a miss.",url:"https://x.com/Frame_Robotics/status/2099900836273090614"},{handle:"qineng_wang",author:"Qineng Wang",summary:"Dual-ALOHA spatial-constraint puzzles: unlocking interlocked parts and threading a rope through three rings.",url:"https://x.com/qineng_wang/status/2099893504658866561"},{handle:"__Rhodium__",author:"Lucas",summary:"In-context learning of the controls and the workspace, reaching the task goal in three tries.",url:"https://x.com/__Rhodium__/status/2099521054678925534"},{handle:"SuveenE",author:"Suveen Ellawela",summary:"Picking up a pipette and fitting a 5 mm tip on a MolmoAct2 real-world eval, using the free hand for a better view.",url:"https://x.com/SuveenE/status/2099448450341605672"},{handle:"cdngdev",author:"thijs",summary:"A robot arm with a paintbrush painting the Golden Gate Bridge, improving across attempts from camera feedback.",url:"https://x.com/cdngdev/status/2097339677128982873"},{handle:"IsaacSin12",author:"Isaac Sin",summary:"Zero-shot sorting of irregularly shaped blocks into cups by color.",url:"https://x.com/IsaacSin12/status/2096715382166098302"},{handle:"chooi_jeq",author:"Jay Chooi",summary:"Robocurve's robot-control comparison: 95% task completion versus 40% for Fable 5.1 at lower cost.",url:"https://x.com/chooi_jeq/status/2096064315115839904"}],G=[{handle:"Lingjun_Mao",author:"Lingjun Mao",summary:"Adapting to a new embodiment to put a cake into an air fryer through CuRobo motion-planning tool APIs.",url:"https://x.com/Lingjun_Mao/status/2100294902672462176"},{handle:"walterzhu8",author:"Wentao Zhu",summary:"A day-and-a-half autonomous run that builds and trains pen spinning on a Sharpa hand in Isaac Lab.",url:"https://x.com/walterzhu8/status/2100212420840989112"},{handle:"mishig25",author:"Mishig",summary:"Painting the Eiffel Tower in MuJoCo with an SO-101 and a brush, with the full experiment shared on Hugging Face.",url:"https://x.com/mishig25/status/2099611674793668676"},{handle:"RunpeiDong",author:"Runpei Dong",summary:"Getting a humanoid into a Tesla in MuJoCo: learning from feedback, then reusing that experience with egocentric perception.",url:"https://x.com/RunpeiDong/status/2099604536327614717"},{handle:"frankzydou",author:"Zhiyang (Frank) Dou",summary:"A LeRobot SO-101 real-world pickup from a third-person RGB camera, where the arm has to bend back to reach the pen.",url:"https://x.com/frankzydou/status/2099338127915512297"},{handle:"Parvkpr",author:"Parv Kapoor",summary:"Real-to-sim: building an interactive simulation environment from a single image or video.",url:"https://x.com/Parvkpr/status/2098847963867238597"},{handle:"z_code68632",author:"code_z",summary:"One demo per task: unscrewing a bottle cap, inserting a plug, clearing obstacles, and imitating a dance on a real robot.",url:"https://x.com/z_code68632/status/2098397364725895387"}],j=({posts:s,label:i})=>a.jsxs("div",{className:"astra-posts",children:[a.jsx("div",{className:"astra-posts-label",children:i}),a.jsx("ul",{children:s.map(o=>a.jsxs("li",{children:[a.jsxs("a",{href:o.url,target:"_blank",rel:"noreferrer",children:["@",o.handle]}),a.jsxs("span",{className:"astra-post-author",children:[" ",o.author]}),a.jsxs("span",{className:"astra-post-summary",children:[" — ",o.summary]})]},o.url))})]}),E=s=>s==="date_published"||s==="citation_count"?s:"trending",W=()=>{var g,x;const[s,i]=v(),o=E(s.get("order_by")),d=s.get("has_code")==="true",m=s.get("has_hf_artifacts")==="true",t=R({task:f,method:b,page_size:12,order_by:o,order_dir:"desc",include_resources:!0,has_code:d,has_hf_artifacts:m}),{targetRef:_,isIntersecting:u}=S({rootMargin:"200px"});h.useEffect(()=>(document.title=L("GPT-6 Astra for Robotics"),()=>{document.title=T}),[]),h.useEffect(()=>{u&&t.hasNextPage&&!t.isFetchingNextPage&&t.fetchNextPage()},[u,t.hasNextPage,t.isFetchingNextPage]);const p=h.useMemo(()=>{var e;return(((e=t.data)==null?void 0:e.pages)??[]).flatMap(r=>r.results.map(F))},[t.data]),y=((x=(g=t.data)==null?void 0:g.pages[0])==null?void 0:x.count)??0,c=(e,r)=>{const l=new URLSearchParams(s);r===null?l.delete(e):l.set(e,r),i(l)};return a.jsxs("div",{className:"page",children:[a.jsxs("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:[a.jsx(n,{to:"/",children:"Home"}),a.jsx("span",{children:" / "}),a.jsx("span",{children:"GPT-6 Astra for Robotics"})]}),a.jsx("header",{className:"feed-header",children:a.jsxs("div",{children:[a.jsx("div",{className:"astra-eyebrow",children:"Collection"}),a.jsxs("h1",{className:"feed-title",children:["GPT-6 Astra ",a.jsx("em",{children:"for Robotics"})]}),a.jsx("div",{className:"feed-subtitle",children:"Papers, technical reports, and evaluations that put OpenAI’s frontier model in control of real and simulated robots."}),a.jsxs("p",{className:"astra-lede",children:["The GPT-6 Astra launch never mentioned robots, yet within days the model was driving arms, hands, and humanoids. As"," ",a.jsx("a",{href:I,target:"_blank",rel:"noreferrer",children:"Yu Xiang"})," ","framed it, the work splits into two families: Astra acting as the robot policy itself, and Astra acting as an agent that orchestrates everything else."]})]})}),a.jsxs("section",{className:"astra-approaches","aria-label":"How GPT-6 Astra is used for robots",children:[a.jsxs("article",{className:"astra-approach",children:[a.jsx("div",{className:"astra-approach-num",children:"01 / Robot policy"}),a.jsx("h2",{children:"Astra as the policy, like a VLA"}),a.jsx("p",{children:"The model looks at camera frames and robot state and directly emits actions: end-effector poses, joint targets, or gripper commands, closing the control loop step by step with no task-specific training."}),a.jsx(j,{posts:O,label:"Seen on X"})]}),a.jsxs("article",{className:"astra-approach",children:[a.jsx("div",{className:"astra-approach-num",children:"02 / Agent"}),a.jsx("h2",{children:"Astra as the agent"}),a.jsx("p",{children:"The model reasons about the scene, writes and runs code, calls planners and tools, or delegates low-level motion to pretrained policies such as VLAs, and keeps the robot on task over long horizons."}),a.jsx(j,{posts:G,label:"Seen on X"})]})]}),a.jsxs("p",{className:"astra-note",children:["Listing is automatic: any paper tagged with both the"," ",a.jsx(n,{to:`/tasks/${f}`,children:"Robotics"})," task and the"," ",a.jsx(n,{to:`/methods/${b}`,children:"GPT-6 Astra"})," method appears here. Missing a report or preprint?"," ",a.jsx(n,{to:"/submit",children:"Submit it"}),"."]}),a.jsxs("div",{className:"task-section-head",style:{marginTop:36},children:[a.jsx("div",{className:"task-section-eyebrow",children:"Top trending · sort below"}),a.jsxs("div",{className:"task-section-title",children:["Papers ",a.jsxs("span",{className:"meta",children:["[",y.toLocaleString(),"]"]})]})]}),a.jsx("div",{className:"sort-bar",children:a.jsxs("div",{className:"paper-feed-toolbar-controls",children:[a.jsx("div",{className:"sort-options",children:C.map(([e,r])=>a.jsx("button",{type:"button",className:`sort-btn ${o===e?"active":""}`,onClick:()=>c("order_by",e==="trending"?null:e),children:r},e))}),a.jsx(P,{hasCode:d,hasHfArtifacts:m,onHasCodeChange:e=>c("has_code",e?"true":null),onHasHfArtifactsChange:e=>c("has_hf_artifacts",e?"true":null)})]})}),t.error?a.jsx(k,{variant:"destructive",children:a.jsx(A,{children:"Failed to load the collection. Please try again."})}):t.isLoading?a.jsx("div",{className:"paper-list",children:Array.from({length:3}).map((e,r)=>a.jsx(w,{className:"h-40 w-full"},r))}):p.length===0?a.jsx("div",{className:"no-results",children:"No papers match this selection yet."}):a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"paper-list",children:p.map((e,r)=>a.jsx(N,{paper:e,rank:r+1},e.id))}),a.jsx("div",{ref:_,style:{height:1}}),t.isFetchingNextPage&&a.jsx("div",{style:{padding:"20px 0",textAlign:"center",color:"var(--ink-faint)"},children:"Loading more…"})]})]})};export{W as default};
 
1
+ import{d as v,r as h,j as a,L as n}from"./index-B9MfhMLC.js";import{P as N}from"./components-BZrNefuY.js";import{P}from"./PaperFeedFilters-DuB_em33.js";import{A as k,a as A}from"./alert-Bg2LnrDJ.js";import{S as w}from"./skeleton-BcfKeAOl.js";import{u as S}from"./useIntersectionObserver-Dg35i96T.js";import{u as R}from"./usePapers-DP7fFbrs.js";import{f as L,D as T}from"./latexPlainText-DI8YEXVe.js";import{t as F}from"./colors-BCIVIuvj.js";import"./paperQueryKeys-BP2E-0yf.js";import"./LatexTitle-DeUmWtI2.js";import"./papers-BGvqL27Z.js";import"./safeExternalHref-CkBrsh84.js";import"./useQuery-Bx81pmgm.js";import"./useInfiniteQuery-4Zdqd3L2.js";const f="robotics",b="gpt-6-astra",I="https://x.com/YuXiang_IRVL/status/2100395131924840570",C=[["trending","trending"],["date_published","newest"],["citation_count","most cited"]],O=[{handle:"Frame_Robotics",author:"Frame Robotics",summary:"Real-arm control that fixes grip angle and carry height on the next try after a miss.",url:"https://x.com/Frame_Robotics/status/2099900836273090614"},{handle:"qineng_wang",author:"Qineng Wang",summary:"Dual-ALOHA spatial-constraint puzzles: unlocking interlocked parts and threading a rope through three rings.",url:"https://x.com/qineng_wang/status/2099893504658866561"},{handle:"__Rhodium__",author:"Lucas",summary:"In-context learning of the controls and the workspace, reaching the task goal in three tries.",url:"https://x.com/__Rhodium__/status/2099521054678925534"},{handle:"SuveenE",author:"Suveen Ellawela",summary:"Picking up a pipette and fitting a 5 mm tip on a MolmoAct2 real-world eval, using the free hand for a better view.",url:"https://x.com/SuveenE/status/2099448450341605672"},{handle:"cdngdev",author:"thijs",summary:"A robot arm with a paintbrush painting the Golden Gate Bridge, improving across attempts from camera feedback.",url:"https://x.com/cdngdev/status/2097339677128982873"},{handle:"IsaacSin12",author:"Isaac Sin",summary:"Zero-shot sorting of irregularly shaped blocks into cups by color.",url:"https://x.com/IsaacSin12/status/2096715382166098302"},{handle:"chooi_jeq",author:"Jay Chooi",summary:"Robocurve's robot-control comparison: 95% task completion versus 40% for Fable 5.1 at lower cost.",url:"https://x.com/chooi_jeq/status/2096064315115839904"}],G=[{handle:"Lingjun_Mao",author:"Lingjun Mao",summary:"Adapting to a new embodiment to put a cake into an air fryer through CuRobo motion-planning tool APIs.",url:"https://x.com/Lingjun_Mao/status/2100294902672462176"},{handle:"walterzhu8",author:"Wentao Zhu",summary:"A day-and-a-half autonomous run that builds and trains pen spinning on a Sharpa hand in Isaac Lab.",url:"https://x.com/walterzhu8/status/2100212420840989112"},{handle:"mishig25",author:"Mishig",summary:"Painting the Eiffel Tower in MuJoCo with an SO-101 and a brush, with the full experiment shared on Hugging Face.",url:"https://x.com/mishig25/status/2099611674793668676"},{handle:"RunpeiDong",author:"Runpei Dong",summary:"Getting a humanoid into a Tesla in MuJoCo: learning from feedback, then reusing that experience with egocentric perception.",url:"https://x.com/RunpeiDong/status/2099604536327614717"},{handle:"frankzydou",author:"Zhiyang (Frank) Dou",summary:"A LeRobot SO-101 real-world pickup from a third-person RGB camera, where the arm has to bend back to reach the pen.",url:"https://x.com/frankzydou/status/2099338127915512297"},{handle:"Parvkpr",author:"Parv Kapoor",summary:"Real-to-sim: building an interactive simulation environment from a single image or video.",url:"https://x.com/Parvkpr/status/2098847963867238597"},{handle:"z_code68632",author:"code_z",summary:"One demo per task: unscrewing a bottle cap, inserting a plug, clearing obstacles, and imitating a dance on a real robot.",url:"https://x.com/z_code68632/status/2098397364725895387"}],j=({posts:s,label:i})=>a.jsxs("div",{className:"astra-posts",children:[a.jsx("div",{className:"astra-posts-label",children:i}),a.jsx("ul",{children:s.map(o=>a.jsxs("li",{children:[a.jsxs("a",{href:o.url,target:"_blank",rel:"noreferrer",children:["@",o.handle]}),a.jsxs("span",{className:"astra-post-author",children:[" ",o.author]}),a.jsxs("span",{className:"astra-post-summary",children:[" — ",o.summary]})]},o.url))})]}),E=s=>s==="date_published"||s==="citation_count"?s:"trending",W=()=>{var g,x;const[s,i]=v(),o=E(s.get("order_by")),d=s.get("has_code")==="true",m=s.get("has_hf_artifacts")==="true",t=R({task:f,method:b,page_size:12,order_by:o,order_dir:"desc",include_resources:!0,has_code:d,has_hf_artifacts:m}),{targetRef:_,isIntersecting:u}=S({rootMargin:"200px"});h.useEffect(()=>(document.title=L("GPT-6 Astra for Robotics"),()=>{document.title=T}),[]),h.useEffect(()=>{u&&t.hasNextPage&&!t.isFetchingNextPage&&t.fetchNextPage()},[u,t.hasNextPage,t.isFetchingNextPage]);const p=h.useMemo(()=>{var e;return(((e=t.data)==null?void 0:e.pages)??[]).flatMap(r=>r.results.map(F))},[t.data]),y=((x=(g=t.data)==null?void 0:g.pages[0])==null?void 0:x.count)??0,c=(e,r)=>{const l=new URLSearchParams(s);r===null?l.delete(e):l.set(e,r),i(l)};return a.jsxs("div",{className:"page",children:[a.jsxs("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:[a.jsx(n,{to:"/",children:"Home"}),a.jsx("span",{children:" / "}),a.jsx("span",{children:"GPT-6 Astra for Robotics"})]}),a.jsx("header",{className:"feed-header",children:a.jsxs("div",{children:[a.jsx("div",{className:"astra-eyebrow",children:"Collection"}),a.jsxs("h1",{className:"feed-title",children:["GPT-6 Astra ",a.jsx("em",{children:"for Robotics"})]}),a.jsx("div",{className:"feed-subtitle",children:"Papers, technical reports, and evaluations that put OpenAI’s frontier model in control of real and simulated robots."}),a.jsxs("p",{className:"astra-lede",children:["The GPT-6 Astra launch never mentioned robots, yet within days the model was driving arms, hands, and humanoids. As"," ",a.jsx("a",{href:I,target:"_blank",rel:"noreferrer",children:"Yu Xiang"})," ","framed it, the work splits into two families: Astra acting as the robot policy itself, and Astra acting as an agent that orchestrates everything else."]})]})}),a.jsxs("section",{className:"astra-approaches","aria-label":"How GPT-6 Astra is used for robots",children:[a.jsxs("article",{className:"astra-approach",children:[a.jsx("div",{className:"astra-approach-num",children:"01 / Robot policy"}),a.jsx("h2",{children:"Astra as the policy, like a VLA"}),a.jsx("p",{children:"The model looks at camera frames and robot state and directly emits actions: end-effector poses, joint targets, or gripper commands, closing the control loop step by step with no task-specific training."}),a.jsx(j,{posts:O,label:"Seen on X"})]}),a.jsxs("article",{className:"astra-approach",children:[a.jsx("div",{className:"astra-approach-num",children:"02 / Agent"}),a.jsx("h2",{children:"Astra as the agent"}),a.jsx("p",{children:"The model reasons about the scene, writes and runs code, calls planners and tools, or delegates low-level motion to pretrained policies such as VLAs, and keeps the robot on task over long horizons."}),a.jsx(j,{posts:G,label:"Seen on X"})]})]}),a.jsxs("p",{className:"astra-note",children:["Listing is automatic: any paper tagged with both the"," ",a.jsx(n,{to:`/tasks/${f}`,children:"Robotics"})," task and the"," ",a.jsx(n,{to:`/methods/${b}`,children:"GPT-6 Astra"})," method appears here. Missing a report or preprint?"," ",a.jsx(n,{to:"/submit",children:"Submit it"}),"."]}),a.jsxs("div",{className:"task-section-head",style:{marginTop:36},children:[a.jsx("div",{className:"task-section-eyebrow",children:"Top trending · sort below"}),a.jsxs("div",{className:"task-section-title",children:["Papers ",a.jsxs("span",{className:"meta",children:["[",y.toLocaleString(),"]"]})]})]}),a.jsx("div",{className:"sort-bar",children:a.jsxs("div",{className:"paper-feed-toolbar-controls",children:[a.jsx("div",{className:"sort-options",children:C.map(([e,r])=>a.jsx("button",{type:"button",className:`sort-btn ${o===e?"active":""}`,onClick:()=>c("order_by",e==="trending"?null:e),children:r},e))}),a.jsx(P,{hasCode:d,hasHfArtifacts:m,onHasCodeChange:e=>c("has_code",e?"true":null),onHasHfArtifactsChange:e=>c("has_hf_artifacts",e?"true":null)})]})}),t.error?a.jsx(k,{variant:"destructive",children:a.jsx(A,{children:"Failed to load the collection. Please try again."})}):t.isLoading?a.jsx("div",{className:"paper-list",children:Array.from({length:3}).map((e,r)=>a.jsx(w,{className:"h-40 w-full"},r))}):p.length===0?a.jsx("div",{className:"no-results",children:"No papers match this selection yet."}):a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"paper-list",children:p.map((e,r)=>a.jsx(N,{paper:e,rank:r+1},e.id))}),a.jsx("div",{ref:_,style:{height:1}}),t.isFetchingNextPage&&a.jsx("div",{style:{padding:"20px 0",textAlign:"center",color:"var(--ink-faint)"},children:"Loading more…"})]})]})};export{W as default};
assets/{AuthorDetailView-CaGOhKvp.js → AuthorDetailView-B6Dfq2eT.js} RENAMED
@@ -1 +1 @@
1
- import{u as C,j as e,d as R,r as v,L as S}from"./index-CcJ6cWma.js";import{u as w}from"./useQuery-D3-GqcPN.js";import{A as H,P as k}from"./components-Bax1_3qI.js";import{a as L,P as O,b as B}from"./PaperDateFilter-_7LVshRy.js";import{P as I}from"./PaperFeedFilters-DejcdS4D.js";import{R as T}from"./ResearchFollowButton-B4KEpku3.js";import{A as $,a as E}from"./alert-CMODHIPT.js";import{S as y}from"./skeleton-B-mlrgWO.js";import{u as M}from"./useIntersectionObserver-DtY8SYYt.js";import{u as q}from"./usePapers-TCIcWoUA.js";import{p as z}from"./papers-CClaKvmL.js";import{t as U}from"./colors-DCzRcDI4.js";import A from"./NotFound-B17io6Dc.js";import"./paperQueryKeys-BP2E-0yf.js";import"./LatexTitle-hDpJaCcC.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-CRugk4PC.js";import"./useMutation-DPe9yGc6.js";import"./research-1Dm22Eft.js";import"./plus-CNhFESYj.js";import"./useInfiniteQuery-CFy22PuG.js";const K=[["trending","trending"],["date_published","newest"],["citation_count","most cited"]],Q=s=>s==="date_published"||s==="citation_count"?s:"trending",V=({authorId:s})=>{var f,x,j,_,N,b,P;const[o,h]=R(),p=Q(o.get("order_by")),m=o.get("has_code")==="true",u=o.get("has_hf_artifacts")==="true",i=L(o),t=w({queryKey:["author",s],queryFn:()=>z.getAuthor(s)}),r=q({author:s,page_size:12,order_by:p,order_dir:"desc",include_resources:!0,has_code:m,has_hf_artifacts:u,start_date:i.startDate,end_date:i.endDate}),{targetRef:F,isIntersecting:g}=M({rootMargin:"200px"}),c=v.useMemo(()=>{var a;return(((a=r.data)==null?void 0:a.pages)??[]).flatMap(n=>n.results.map(U))},[r.data]);v.useEffect(()=>{g&&r.hasNextPage&&!r.isFetchingNextPage&&r.fetchNextPage()},[g,r.hasNextPage,r.isFetchingNextPage,c.length]);const D=((x=(f=r.data)==null?void 0:f.pages[0])==null?void 0:x.count)??0,d=(a,n)=>{const l=new URLSearchParams(o);n?l.set(a,n):l.delete(a),h(l)};return((j=t.error)==null?void 0:j.status)===404?e.jsx(A,{}):e.jsxs("div",{className:"page",children:[e.jsxs("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:[e.jsx(S,{to:"/",children:"Home"}),e.jsx("span",{children:" / "}),e.jsx("span",{children:"Authors"}),e.jsx("span",{children:" / "}),e.jsx("span",{children:((_=t.data)==null?void 0:_.full_name)??s})]}),e.jsxs("header",{className:"author-hero",children:[e.jsx("div",{className:"organizations-eyebrow",children:"AUTHOR"}),e.jsxs("div",{className:"author-hero-title",children:[((N=t.data)==null?void 0:N.hf_username)&&e.jsx(H,{className:"author-avatar",url:t.data.hf_avatar_url,href:`https://huggingface.co/${t.data.hf_username}`,label:`@${t.data.hf_username} on Hugging Face`}),e.jsx("h1",{className:"feed-title",children:((b=t.data)==null?void 0:b.full_name)??e.jsx(y,{className:"h-12 w-64 inline-block"})})]}),t.data&&e.jsxs("div",{className:"feed-subtitle",children:[t.data.paper_count.toLocaleString()," ",t.data.paper_count===1?"paper":"papers",t.data.hf_username&&e.jsxs(e.Fragment,{children:[" · ",e.jsxs("a",{href:`https://huggingface.co/${t.data.hf_username}`,target:"_blank",rel:"noopener noreferrer",children:["@",t.data.hf_username," on Hugging Face ↗"]})]})]}),t.data&&e.jsx(T,{kind:"author",entityId:t.data.id})]}),e.jsxs("div",{className:"sort-bar",style:{alignItems:"center",gap:16},children:[e.jsxs("div",{className:"paper-feed-toolbar-controls",children:[e.jsx("div",{className:"sort-options",children:K.map(([a,n])=>e.jsx("button",{type:"button",className:`sort-btn ${p===a?"active":""}`,onClick:()=>d("order_by",a==="trending"?null:a),children:n},a))}),e.jsx(I,{hasCode:m,hasHfArtifacts:u,onHasCodeChange:a=>d("has_code",a?"true":null),onHasHfArtifactsChange:a=>d("has_hf_artifacts",a?"true":null)})]}),e.jsx(O,{startDate:i.startDate,endDate:i.endDate,onChange:a=>h(B(o,a))}),e.jsxs("div",{className:"results-count",children:[D.toLocaleString()," papers"]})]}),r.error?e.jsx($,{variant:"destructive",children:e.jsxs(E,{children:["Failed to load papers."," ",e.jsx("button",{type:"button",onClick:()=>void r.refetch(),children:"Try again"})]})}):r.isLoading?e.jsx("div",{className:"paper-list",children:Array.from({length:4}).map((a,n)=>e.jsx(y,{className:"h-40 w-full"},n))}):c.length===0?e.jsx("div",{className:"no-results",children:((P=t.data)==null?void 0:P.paper_count)===0?"No public papers are available.":"No papers found for this selection."}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"paper-list",children:c.map((a,n)=>e.jsx(k,{paper:a,rank:n+1},a.id))}),e.jsx("div",{ref:F,style:{height:1}}),r.isFetchingNextPage&&e.jsx("div",{style:{padding:"20px 0",textAlign:"center"},children:"Loading more…"})]})]})},ge=()=>{const{authorId:s}=C();return s?e.jsx(V,{authorId:s},s):e.jsx(A,{})};export{ge as default};
 
1
+ import{u as C,j as e,d as R,r as v,L as S}from"./index-B9MfhMLC.js";import{u as w}from"./useQuery-Bx81pmgm.js";import{A as H,P as k}from"./components-BZrNefuY.js";import{a as L,P as O,b as B}from"./PaperDateFilter-D1l9Effu.js";import{P as I}from"./PaperFeedFilters-DuB_em33.js";import{R as T}from"./ResearchFollowButton-CSky6nMM.js";import{A as $,a as E}from"./alert-Bg2LnrDJ.js";import{S as y}from"./skeleton-BcfKeAOl.js";import{u as M}from"./useIntersectionObserver-Dg35i96T.js";import{u as q}from"./usePapers-DP7fFbrs.js";import{p as z}from"./papers-BGvqL27Z.js";import{t as U}from"./colors-BCIVIuvj.js";import A from"./NotFound-DxjoZmsI.js";import"./paperQueryKeys-BP2E-0yf.js";import"./LatexTitle-DeUmWtI2.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-UrZdfRNz.js";import"./useMutation-C2athD5k.js";import"./research-DbRWvLsz.js";import"./plus-BZFi6ZWf.js";import"./useInfiniteQuery-4Zdqd3L2.js";const K=[["trending","trending"],["date_published","newest"],["citation_count","most cited"]],Q=s=>s==="date_published"||s==="citation_count"?s:"trending",V=({authorId:s})=>{var f,x,j,_,N,b,P;const[o,h]=R(),p=Q(o.get("order_by")),m=o.get("has_code")==="true",u=o.get("has_hf_artifacts")==="true",i=L(o),t=w({queryKey:["author",s],queryFn:()=>z.getAuthor(s)}),r=q({author:s,page_size:12,order_by:p,order_dir:"desc",include_resources:!0,has_code:m,has_hf_artifacts:u,start_date:i.startDate,end_date:i.endDate}),{targetRef:F,isIntersecting:g}=M({rootMargin:"200px"}),c=v.useMemo(()=>{var a;return(((a=r.data)==null?void 0:a.pages)??[]).flatMap(n=>n.results.map(U))},[r.data]);v.useEffect(()=>{g&&r.hasNextPage&&!r.isFetchingNextPage&&r.fetchNextPage()},[g,r.hasNextPage,r.isFetchingNextPage,c.length]);const D=((x=(f=r.data)==null?void 0:f.pages[0])==null?void 0:x.count)??0,d=(a,n)=>{const l=new URLSearchParams(o);n?l.set(a,n):l.delete(a),h(l)};return((j=t.error)==null?void 0:j.status)===404?e.jsx(A,{}):e.jsxs("div",{className:"page",children:[e.jsxs("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:[e.jsx(S,{to:"/",children:"Home"}),e.jsx("span",{children:" / "}),e.jsx("span",{children:"Authors"}),e.jsx("span",{children:" / "}),e.jsx("span",{children:((_=t.data)==null?void 0:_.full_name)??s})]}),e.jsxs("header",{className:"author-hero",children:[e.jsx("div",{className:"organizations-eyebrow",children:"AUTHOR"}),e.jsxs("div",{className:"author-hero-title",children:[((N=t.data)==null?void 0:N.hf_username)&&e.jsx(H,{className:"author-avatar",url:t.data.hf_avatar_url,href:`https://huggingface.co/${t.data.hf_username}`,label:`@${t.data.hf_username} on Hugging Face`}),e.jsx("h1",{className:"feed-title",children:((b=t.data)==null?void 0:b.full_name)??e.jsx(y,{className:"h-12 w-64 inline-block"})})]}),t.data&&e.jsxs("div",{className:"feed-subtitle",children:[t.data.paper_count.toLocaleString()," ",t.data.paper_count===1?"paper":"papers",t.data.hf_username&&e.jsxs(e.Fragment,{children:[" · ",e.jsxs("a",{href:`https://huggingface.co/${t.data.hf_username}`,target:"_blank",rel:"noopener noreferrer",children:["@",t.data.hf_username," on Hugging Face ↗"]})]})]}),t.data&&e.jsx(T,{kind:"author",entityId:t.data.id})]}),e.jsxs("div",{className:"sort-bar",style:{alignItems:"center",gap:16},children:[e.jsxs("div",{className:"paper-feed-toolbar-controls",children:[e.jsx("div",{className:"sort-options",children:K.map(([a,n])=>e.jsx("button",{type:"button",className:`sort-btn ${p===a?"active":""}`,onClick:()=>d("order_by",a==="trending"?null:a),children:n},a))}),e.jsx(I,{hasCode:m,hasHfArtifacts:u,onHasCodeChange:a=>d("has_code",a?"true":null),onHasHfArtifactsChange:a=>d("has_hf_artifacts",a?"true":null)})]}),e.jsx(O,{startDate:i.startDate,endDate:i.endDate,onChange:a=>h(B(o,a))}),e.jsxs("div",{className:"results-count",children:[D.toLocaleString()," papers"]})]}),r.error?e.jsx($,{variant:"destructive",children:e.jsxs(E,{children:["Failed to load papers."," ",e.jsx("button",{type:"button",onClick:()=>void r.refetch(),children:"Try again"})]})}):r.isLoading?e.jsx("div",{className:"paper-list",children:Array.from({length:4}).map((a,n)=>e.jsx(y,{className:"h-40 w-full"},n))}):c.length===0?e.jsx("div",{className:"no-results",children:((P=t.data)==null?void 0:P.paper_count)===0?"No public papers are available.":"No papers found for this selection."}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"paper-list",children:c.map((a,n)=>e.jsx(k,{paper:a,rank:n+1},a.id))}),e.jsx("div",{ref:F,style:{height:1}}),r.isFetchingNextPage&&e.jsx("div",{style:{padding:"20px 0",textAlign:"center"},children:"Loading more…"})]})]})},ge=()=>{const{authorId:s}=C();return s?e.jsx(V,{authorId:s},s):e.jsx(A,{})};export{ge as default};
assets/{AuthorizePaperEditView-CACq7t0y.js → AuthorizePaperEditView-B8ZkbyDF.js} RENAMED
@@ -1 +1 @@
1
- import{u,a as d,j as e,L as l,H as p}from"./index-CcJ6cWma.js";import{u as c}from"./useQuery-D3-GqcPN.js";import{u as h}from"./useMutation-DPe9yGc6.js";import{B as m}from"./button-CCtc-vkR.js";import{p as n}from"./paperEdits-CviwQWgR.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-B9MfhMLC.js";import{u as c}from"./useQuery-Bx81pmgm.js";import{u as h}from"./useMutation-C2athD5k.js";import{B as m}from"./button-DZAojLNy.js";import{p as n}from"./paperEdits-DYztItZs.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-MICEiGP-.js → AutonomousOperations-CBwnK_3T.js} RENAMED
@@ -1,4 +1,4 @@
1
- import{g as R,a as B,m as q,r as m,j as e,L as H}from"./index-CcJ6cWma.js";import{u as I}from"./useQuery-D3-GqcPN.js";import{u as Q}from"./useMutation-DPe9yGc6.js";import{B as P}from"./badge-B4a-IZlY.js";import{B as x}from"./button-CCtc-vkR.js";import{A as D,C as n,d as i,a as t,b as r,f as h,o as u}from"./operations-DsCAtQes.js";import{I as j}from"./input-CDtE_-7s.js";import{S as $}from"./shield-alert-DY4w7V_e.js";/**
2
  * @license lucide-react v0.462.0 - ISC
3
  *
4
  * This source code is licensed under the ISC license.
 
1
+ import{g as R,a as B,m as q,r as m,j as e,L as H}from"./index-B9MfhMLC.js";import{u as I}from"./useQuery-Bx81pmgm.js";import{u as Q}from"./useMutation-C2athD5k.js";import{B as P}from"./badge-CO0oD6ZM.js";import{B as x}from"./button-DZAojLNy.js";import{A as D,C as n,d as i,a as t,b as r,f as h,o as u}from"./operations-ClH3Qt6j.js";import{I as j}from"./input-DbV7135c.js";import{S as $}from"./shield-alert-BANoWW0F.js";/**
2
  * @license lucide-react v0.462.0 - ISC
3
  *
4
  * This source code is licensed under the ISC license.
assets/{BenchmarkDetailView-yNcqUPH5.js → BenchmarkDetailView-DxC3K--i.js} RENAMED
@@ -1,2 +1,2 @@
1
- import{r as F,j as a,y as le,L as ne,b as ot,h as ct,u as dt,d as ut,k as mt}from"./index-CcJ6cWma.js";import{R as ht}from"./ResearchFollowButton-B4KEpku3.js";import{u as te}from"./useQuery-D3-GqcPN.js";import{c as re}from"./catalog-B7hp4mKD.js";import{C as ft,E as pt,e as gt}from"./ExternalSourceEvalBadge-BJLG4V5e.js";import{L as oe}from"./LatexTitle-hDpJaCcC.js";import{S as Ke}from"./switch-BXzYt6AA.js";import{I as xt}from"./components-Bax1_3qI.js";import{S as ce}from"./skeleton-B-mlrgWO.js";import{A as bt,a as yt}from"./alert-CMODHIPT.js";import{B as wt}from"./BenchmarkTrendSparkline-zOCrwYee.js";import{s as vt}from"./safeExternalHref-CkBrsh84.js";import{s as jt}from"./slug-BpH-Nkvz.js";import"./useMutation-DPe9yGc6.js";import"./research-1Dm22Eft.js";import"./plus-CNhFESYj.js";import"./papers-CClaKvmL.js";import"./hover-card-Bj7-02L3.js";import"./index-n6sLvpB2.js";import"./paperQueryKeys-BP2E-0yf.js";import"./colors-DCzRcDI4.js";function _t(e,t,r){const s=t?(e??[]).filter(l=>l.task_id===t):e??[],n=s.filter(l=>l.is_open===!1),i=n.reduce((l,c)=>l?(c.best_rank??Number.POSITIVE_INFINITY)<(l.best_rank??Number.POSITIVE_INFINITY)?c:l:c,null);return{visible:r?s.filter(l=>l.is_open!==!1):s,hiddenClosed:n,topHiddenClosed:i}}function ie(e){if(e==null)return null;if(typeof e=="number")return Number.isFinite(e)?e:null;const t=e.includes("±")?e.split("±")[0].trim():e.trim(),r=parseFloat(t);return Number.isFinite(r)?r:null}const Ge=[{label:"All",maxParametersExclusive:void 0},{label:"<10M",maxParametersExclusive:1e7},{label:"<100M",maxParametersExclusive:1e8},{label:"<1B",maxParametersExclusive:1e9},{label:"<3B",maxParametersExclusive:3e9},{label:"<6B",maxParametersExclusive:6e9},{label:"<12B",maxParametersExclusive:12e9},{label:"<32B",maxParametersExclusive:32e9},{label:"<128B",maxParametersExclusive:128e9},{label:"<500B",maxParametersExclusive:5e11}];function St(e){const t=e===null?void 0:Number(e);return Ge.some(r=>r.maxParametersExclusive===t)?t:void 0}function kt(e){return new Intl.NumberFormat("en",{notation:"compact",maximumSignificantDigits:3}).format(e)}function Ct(e){return[e.paper_id,e.task_id,e.dataset_id,e.model_name,e.harness??""].join("|")}function Et(e){const t=new Map;for(const r of e){const s=Ct(r),n=t.get(s);if(!n){t.set(s,{...r,metrics:{...r.metrics||{}},sourceEvaluationIds:[r.id],ranksByMetric:r.best_metric&&r.best_rank!=null?{[r.best_metric]:r.best_rank}:{},parameterCount:r.num_parameters??null,hasParameterConflict:!1});continue}n.metrics={...n.metrics,...r.metrics||{}},n.sourceEvaluationIds.push(r.id),r.best_metric&&r.best_rank!=null&&(n.ranksByMetric[r.best_metric]=r.best_rank),r.num_parameters!=null&&!n.hasParameterConflict&&(n.parameterCount===null?n.parameterCount=r.num_parameters:n.parameterCount!==r.num_parameters&&(n.parameterCount=null,n.hasParameterConflict=!0))}return Array.from(t.values())}function Le(e,t){return t===void 0?e:e.filter(r=>r.parameterCount!==null&&r.parameterCount<t)}function Nt(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 Rt(e){const t=Date.parse(e);return Number.isNaN(t)?"":new Date(t).toISOString().slice(0,10)}function Pt(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 $t(e,t){const r=e.evaluated_on;return r&&r!==t&&r!==Rt(e.updated_at)?r:e.paper_published_date||""}function Mt(e,t,r){if(e.length===0)return{points:[],sota:0,sotaModel:""};const s=Pt(e),n=e.map(u=>{var R;const h=ie((R=u.metrics)==null?void 0:R[t]);return{eval:u,value:h,date:$t(u,s)}}).filter(u=>u.value!==null&&!!u.date).sort((u,h)=>u.date.localeCompare(h.date)),i=[];let l=null;for(const u of n){const h=l==null?!0:r==="↓"?u.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 Qe(e,t,r,s){const n=t.find(i=>i.id===s);if(e.length===0)return null;if(n!=null&&n.task_id&&e.some(i=>i.id===n.task_id))return n.task_id;if(r){const i=e.find(l=>l.slug===r);if(i)return i.id}if(e.length===1)return e[0].id;if(t.length>0){const i=new Map;for(const d of t)i.set(d.task_id,(i.get(d.task_id)||0)+1);let l=null,c=-1;for(const d of e){const f=i.get(d.id)||0;f>c&&(c=f,l=d.id)}if(l)return l}return e[0].id}function Tt(e){var _,X,Y;const{evaluations:t,tasks:r,taskSlug:s,highlightEvalId:n,parameterBound:i,showMoreMetrics:l,fittingMetricCount:c=1}=e,d=Qe(r,t,s,n),f=r.find(o=>o.id===d)||r[0]||null,x=t.find(o=>o.id===n),u=_t(t,d,e.hideClosed),h=Et(u.visible),R=Le(h,i),E=e.configuredMetrics.map(o=>o.metric_name),L=Array.from(new Set(h.flatMap(o=>[...o.best_metric?[o.best_metric]:[],...Object.keys(o.metrics||{})]))),S=E.length?E:L,g=new Map;for(const o of h){const m=o.best_metric;!m||ie(o.metrics[m])===null||E.length&&!S.includes(m)||g.set(m,(g.get(m)||0)+1)}const k=((_=[...g].sort((o,m)=>m[1]-o[1])[0])==null?void 0:_[0])||S[0]||"",j=S.find(o=>{var m;return o.toLocaleLowerCase()===((m=e.metric)==null?void 0:m.trim().toLocaleLowerCase())})||(x==null?void 0:x.best_metric)||k,D=((X=e.directions)==null?void 0:X.directions[j])==="lower_is_better"?"↓":"↑",W=j&&S.includes(j)?[j,...S.filter(o=>o!==j)]:S,w=W.length?l?W:W.slice(0,Math.max(1,c)):j?[j]:[],q=R.slice().sort((o,m)=>{const p=ie(o.metrics[j]),y=ie(m.metrics[j]);return p!==null&&y!==null?D==="↓"?p-y:y-p:p!==null?-1:y!==null?1:Ie(o,j)-Ie(m,j)});let I=null,N=0;const Q=q.map((o,m)=>{const p=ie(o.metrics[j]);return p!==null&&p!==I&&(I=p,N=m+1),{evaluation:o,rank:p===null?null:N,isHighlighted:Nt(o,n)}}),{points:z,sota:ee,sotaModel:O}=Mt(R,j,D),$=i===void 0?e.initialSummary:void 0,U=e.ready.evaluations&&e.ready.tasks&&e.ready.directions&&(!d||e.ready.metrics),K={parameter_coverage_known:h.filter(o=>o.parameterCount!==null).length,parameter_coverage_total:h.length};return{currentTaskId:d,primaryTask:f,activeMetric:j,arrow:D,allowedMetrics:S,orderedMetrics:W,visibleMetrics:w,rows:Q,chartPoints:z,highlightedEval:((Y=Q.find(o=>o.isHighlighted))==null?void 0:Y.evaluation)||null,hiddenClosedEvals:u.hiddenClosed,hiddenClosedTopEval:u.topHiddenClosed,parameterBound:i,parameterCoverage:K,hasParameterMetadata:K.parameter_coverage_known>0,parameterFilters:Ge.map(o=>({...o,selected:i===o.maxParametersExclusive,disabled:i!==o.maxParametersExclusive&&Le(h,o.maxParametersExclusive).length===0})),displayedMetric:U?j:$==null?void 0:$.metric,displayedSota:U?ee:$==null?void 0:$.value,displayedSotaModel:U?O:$==null?void 0:$.model_name,isSummaryLoading:!U&&!$,isInitialFilteredViewLoading:i!==void 0&&!U}}function Ft(e,t,r,s=1,n=0){const i=e-t.fixed-(r?t.harness:0);if(t.metric<=0)return 1;const l=Math.floor(i/t.metric);if(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 Lt(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 It=20;function Ae(e,t){return e?a.jsx(oe,{title:e}):t||"—"}function At({model:e,showHarness:t,setMetric:r,highlightRowRef:s,onFittingMetricCountChange:n}){const{rows:i,visibleMetrics:l,activeMetric:c,arrow:d}=e,[f,x]=F.useState(null);return F.useEffect(()=>{if(!f)return;const u=()=>{f.classList.toggle("has-horizontal-overflow",f.scrollWidth>f.clientWidth);const R=f.firstElementChild;if(!R)return;const E=f.clientWidth,L=Lt(R),S=document.documentElement,g=S.scrollHeight>S.clientHeight?0:It;n(k=>Ft(E,L,t,k,g))},h=new ResizeObserver(u);return h.observe(f),f.firstElementChild&&h.observe(f.firstElementChild),u(),()=>h.disconnect()},[f,t,n]),a.jsx("div",{ref:x,className:"bm-table-scroll",role:"region","aria-label":"Leaderboard metrics",tabIndex:0,children:a.jsxs("table",{id:"benchmark-leaderboard",className:"bm-table",style:{"--bm-metric-count":l.length,"--bm-harness-count":t?1:0},children:[a.jsxs("colgroup",{children:[a.jsx("col",{className:"bm-width-rank"}),a.jsx("col",{className:"bm-width-model"}),a.jsx("col",{className:"bm-width-parameters"}),t&&a.jsx("col",{className:"bm-width-harness"}),l.map(u=>a.jsx("col",{className:"bm-width-metric"},u)),a.jsx("col",{}),a.jsx("col",{className:"bm-width-year"})]}),a.jsx("thead",{children:a.jsxs("tr",{children:[a.jsx("th",{className:"col-rank",children:"Rank"}),a.jsx("th",{className:"col-model",children:"Model"}),a.jsx("th",{className:"col-parameters",children:"Parameters"}),t&&a.jsx("th",{className:"col-harness",children:"Harness"}),l.map(u=>{const h=u===c;return a.jsx("th",{className:`col-value ${h?"is-active":""}`,"aria-sort":h?d==="↓"?"ascending":"descending":"none",children:a.jsxs("button",{type:"button",className:"bm-metric-header",onClick:()=>r(u),"aria-pressed":h,title:`Sort by ${u}`,children:[u,h?` ${d}`:""]})},u)}),a.jsx("th",{className:"col-paper",children:"Paper"}),a.jsx("th",{className:"col-year",children:"Year"})]})}),a.jsx("tbody",{children:i.map(({evaluation:u,rank:h,isHighlighted:R})=>{var S;const E=u.paper_arxiv_id||u.paper_id,L=u.paper_title||(u.paper_arxiv_id?`arXiv:${u.paper_arxiv_id}`:null);return a.jsxs("tr",{ref:R?s:void 0,className:R?"is-highlighted":void 0,children:[a.jsx("td",{className:"col-rank",children:h??"—"}),a.jsxs("td",{className:"col-model",children:[R&&a.jsx("span",{className:"bm-row-marker","aria-hidden":"true"}),u.hf_model_url?a.jsx("a",{href:u.hf_model_url,target:"_blank",rel:"noopener noreferrer",className:"bm-model-link",title:`Open ${u.model_name||"model"} on Hugging Face`,children:u.model_name||"—"}):u.model_name||"—",u.is_open===!1&&a.jsx(ft,{}),(u.external??u.is_external)&&a.jsx(pt,{sourceUrl:u.source_url||u.external_source_url||u.result_url})]}),a.jsx("td",{className:"col-parameters",title:u.parameterCount===null?void 0:u.parameterCount.toLocaleString("en-US"),"aria-label":u.parameterCount===null?"Parameters unknown":`${u.parameterCount.toLocaleString("en-US")} parameters`,children:u.parameterCount===null?"—":kt(u.parameterCount)}),t&&a.jsx("td",{className:"col-harness",children:u.harness||"—"}),l.map(g=>{var j;const k=g===c,B=(j=u.metrics)==null?void 0:j[g];return a.jsx("td",{className:`col-value${k?" is-active":""}${k&&h===1?" is-best":""}`,children:B!=null&&B!==""?le(B):"—"},g)}),a.jsx("td",{className:"col-paper",children:E?a.jsx(ne,{to:`/paper/${E}`,title:u.paper_title||L||void 0,children:Ae(u.paper_title,L)}):Ae(u.paper_title,L)}),a.jsx("td",{className:"col-year",children:((S=u.evaluated_on||u.paper_published_date)==null?void 0:S.slice(0,4))||"—"})]},u.id)})})]})})}function Be(e){const t=e.length===7?`${e}-01`:e,r=new Date(t).getTime();return Number.isFinite(r)?r:0}const fe=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function pe(e){const t=new Date(e);return{year:t.getFullYear(),month:t.getMonth()}}function Bt(e,t){if(e===t){const{year:d,month:f}=pe(e);return[{timestamp:new Date(d,f,1).getTime(),key:`${d}-${f}`,label:`${fe[f]} ${d}`}]}const r=pe(e),s=pe(t);if(r.year===s.year){const d=s.month-r.month+1;let f=1;const x=12;d>x&&(f=Math.ceil(d/x));const u=[];for(let h=r.month;h<=s.month;h+=f)u.push({timestamp:new Date(r.year,h,1).getTime(),key:`${r.year}-${h}`,label:d<=3?`${fe[h]} ${r.year}`:fe[h]});return u}const n=s.year-r.year+1;let i=1;const l=12;n>l&&(i=Math.ceil(n/l));const c=[];for(let d=r.year;d<=s.year;d+=i)c.push({timestamp:new Date(d,0,1).getTime(),key:String(d),label:String(d)});return c}const Dt=({points:e,metric:t})=>{const r=ot(),[s,n]=F.useState(null),i=880,l=320,c=60,d=30,f=40,x=50,u=e.map(o=>o.value),h=Math.min(...u),E=Math.max(...u)-h||1,L=i-c-d,S=l-f-x,g=e.map(o=>Be(o.date)),k=Math.min(...g),B=Math.max(...g),j=B-k||1,D=o=>k===B?c+L/2:c+(o-k)/j*L,W=e.map((o,m)=>{const p=D(Be(o.date)),y=(o.value-h)/E,P=f+S*(1-y);return{x:p,y:P,data:o,idx:m}}),w=W.filter(o=>o.data.isSota);let q="";if(w.length>=2){q=`M${w[0].x},${w[0].y}`;for(let o=1;o<w.length;o++){const m=w[o-1],p=w[o],y=(m.x+p.x)/2;q+=` 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 P=o.x-y/2,C=o.x+y/2,v="middle";return P<c?(P=c,C=c+y,v="start"):C>i-d&&(C=i-d,P=C-y,v="end"),{x:v==="start"?c:v==="end"?i-d:o.x,y:o.y-Q,text:p,anchor:v,left:P,right:C}},ee=[],O=w.length>0?z(w[w.length-1]):null;let $=-1/0;for(let o=0;o<w.length-1;o++){const m=z(w[o]);m&&(m.left<$+N||O&&m.right>O.left-N||($=m.right,ee.push({x:m.x,y:m.y,text:m.text,anchor:m.anchor})))}O&&ee.push({x:O.x,y:O.y,text:O.text,anchor:O.anchor});const U=Bt(k,B),K=5,_=o=>n(m=>m===o?null:m),X=o=>{o&&r(`/paper/${o}`)},Y=(o,m)=>{const y=`${o.data.modelName||o.data.paperTitle||"Unknown model"}: ${le(o.data.value)} on ${o.data.dateLabel}`,P=!!o.data.paperRouteId;return a.jsxs("g",{children:[m,a.jsx("circle",{cx:o.x,cy:o.y,r:"10",fill:"transparent",style:{cursor:P?"pointer":"default",outline:"none"},tabIndex:0,role:P?"link":"img","aria-label":y,onMouseEnter:()=>n(o.idx),onMouseLeave:()=>_(o.idx),onFocus:()=>n(o.idx),onBlur:()=>_(o.idx),onClick:()=>X(o.data.paperRouteId),onKeyDown:C=>{P&&(C.key==="Enter"||C.key===" ")&&(C.preventDefault(),X(o.data.paperRouteId))},children:a.jsx("title",{children:y})})]},o.idx)};return a.jsxs("svg",{width:"100%",viewBox:`0 0 ${i} ${l}`,style:{display:"block"},children:[a.jsx("text",{x:c-38,y:f+S/2,fontSize:"11",fontFamily:"var(--mono)",fill:"var(--ink-faint)",textAnchor:"middle",transform:`rotate(-90 ${c-38} ${f+S/2})`,children:t}),Array.from({length:K}).map((o,m)=>{const p=m/(K-1),y=f+S*(1-p),P=h+E*p;return a.jsxs("g",{children:[a.jsx("line",{x1:c,y1:y,x2:i-d,y2:y,stroke:"var(--hairline)",strokeWidth:"1"}),a.jsx("text",{x:c-10,y:y+4,fontSize:"11",fontFamily:"var(--mono)",fill:"var(--ink-faint)",textAnchor:"end",children:le(P)})]},m)}),U.map(o=>{const m=D(o.timestamp);return a.jsx("text",{x:m,y:l-x+18,fontSize:"11",fontFamily:"var(--mono)",fill:"var(--ink-soft)",textAnchor:"middle",children:o.label},o.key)}),W.filter(o=>!o.data.isSota).map(o=>{const m=s===o.idx;return Y(o,a.jsx("circle",{cx:o.x,cy:o.y,r:m?3:2,fill:"var(--ink-faint)",opacity:m?1:.45,style:{transition:"r 0.12s ease, opacity 0.12s ease"}}))}),q&&a.jsx("path",{d:q,stroke:"var(--accent)",strokeWidth:"2",fill:"none",strokeLinejoin:"round",strokeLinecap:"round"}),w.map(o=>{const m=s===o.idx;return Y(o,a.jsx("circle",{cx:o.x,cy:o.y,r:m?4.5:3,fill:m?"var(--accent)":"var(--bg-elevated)",stroke:"var(--accent)",strokeWidth:"1.5",style:{transition:"r 0.12s ease, fill 0.12s ease"}}))}),ee.map((o,m)=>a.jsx("text",{x:o.x,y:o.y,fontSize:"9.5",fontFamily:"var(--mono)",fill:"var(--ink-soft)",textAnchor:o.anchor,pointerEvents:"none",style:{paintOrder:"stroke",stroke:"var(--bg-elevated)",strokeWidth:3,strokeLinejoin:"round"},children:o.text},`label-${m}`)),s!==null&&W[s]&&(()=>{const o=W[s],m=o.data.modelName||o.data.paperTitle||"Unknown model",y=`${m.length>40?m.slice(0,39)+"…":m}: ${le(o.data.value)}`,C=Math.max(120,Math.min(340,y.length*6.6+24)),v=30;let H=o.x-C/2;H<c&&(H=c),H+C>i-d&&(H=i-d-C);const G=o.y-v-14>=f?o.y-v-12:o.y+12;return a.jsxs("g",{pointerEvents:"none",children:[a.jsx("rect",{x:H,y:G,width:C,height:v,rx:"6",ry:"6",fill:"var(--bg-elevated)",stroke:"var(--hairline-strong)",strokeWidth:"1",style:{filter:"drop-shadow(0 2px 6px rgba(0,0,0,0.08))"}}),a.jsx("text",{x:H+12,y:G+19,fontSize:"12",fontFamily:"var(--sans)",fill:"var(--ink)",fontWeight:500,children:y})]})})()]})};function Ht(e,t){if(e.match(/^[a-z]+:\/\//i))return e;if(e.match(/^\/\//))return window.location.protocol+e;if(e.match(/^[a-z]+:/i))return e;const r=document.implementation.createHTMLDocument(),s=r.createElement("base"),n=r.createElement("a");return r.head.appendChild(s),r.body.appendChild(n),t&&(s.href=t),n.href=e,n.href}const Vt=(()=>{let e=0;const t=()=>`0000${(Math.random()*36**4<<0).toString(36)}`.slice(-4);return()=>(e+=1,`u${t()}${e}`)})();function Z(e){const t=[];for(let r=0,s=e.length;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 Wt(e){const t=de(e,"border-left-width"),r=de(e,"border-right-width");return e.clientWidth+t+r}function Ot(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||Wt(e),s=t.height||Ot(e);return{width:r,height:s}}function Ut(){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 qt(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 zt(e,t={}){return e.toBlob?new Promise(r=>{e.toBlob(r,t.type?t.type:"image/png",t.quality?t.quality:1)}):new Promise(r=>{const s=window.atob(e.toDataURL(t.type?t.type:void 0,t.quality?t.quality:void 0).split(",")[1]),n=s.length,i=new Uint8Array(n);for(let l=0;l<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 Kt(e){return Promise.resolve().then(()=>new XMLSerializer().serializeToString(e)).then(encodeURIComponent).then(t=>`data:image/svg+xml;charset=utf-8,${t}`)}async function Gt(e,t,r){const s="http://www.w3.org/2000/svg",n=document.createElementNS(s,"svg"),i=document.createElementNS(s,"foreignObject");return n.setAttribute("width",`${t}`),n.setAttribute("height",`${r}`),n.setAttribute("viewBox",`0 0 ${t} ${r}`),i.setAttribute("width","100%"),i.setAttribute("height","100%"),i.setAttribute("x","0"),i.setAttribute("y","0"),i.setAttribute("externalResourcesRequired","true"),n.appendChild(i),i.appendChild(e),Kt(n)}const A=(e,t)=>{if(e instanceof t)return!0;const r=Object.getPrototypeOf(e);return r===null?!1:r.constructor.name===t.name||A(r,t)};function Qt(e){const t=e.getPropertyValue("content");return`${e.cssText} content: '${t.replace(/'|"/g,"")}';`}function Xt(e,t){return Xe(t).map(r=>{const s=e.getPropertyValue(r),n=e.getPropertyPriority(r);return`${r}: ${s}${n?" !important":""};`}).join(" ")}function Yt(e,t,r,s){const n=`.${e}:${t}`,i=r.cssText?Qt(r):Xt(r,s);return document.createTextNode(`${n}{${i}}`)}function De(e,t,r,s){const n=window.getComputedStyle(e,r),i=n.getPropertyValue("content");if(i===""||i==="none")return;const l=Vt();try{t.className=`${t.className} ${l}`}catch{return}const c=document.createElement("style");c.appendChild(Yt(l,r,n,s)),t.appendChild(c)}function Jt(e,t,r){De(e,t,":before",r),De(e,t,":after",r)}const He="application/font-woff",Ve="image/jpeg",Zt={woff:He,woff2:He,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:Ve,jpeg:Ve,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml",webp:"image/webp"};function er(e){const t=/\.([^./]*?)$/g.exec(e);return t?t[1]:""}function ye(e){const t=er(e).toLowerCase();return Zt[t]||""}function tr(e){return e.split(/,/)[1]}function xe(e){return e.search(/^(data:)/)!==-1}function rr(e,t){return`data:${t};base64,${e}`}async function Je(e,t,r){const s=await fetch(e,t);if(s.status===404)throw new Error(`Resource "${s.url}" not found`);const n=await s.blob();return new Promise((i,l)=>{const c=new FileReader;c.onerror=l,c.onloadend=()=>{try{i(r({res:s,result:c.result}))}catch(d){l(d)}},c.readAsDataURL(n)})}const ge={};function ar(e,t,r){let s=e.replace(/\?.*/,"");return r&&(s=e),/ttf|otf|eot|woff2?/i.test(s)&&(s=s.replace(/.*\//,"")),t?`[${t}]${s}`:s}async function we(e,t,r){const s=ar(e,t,r.includeQueryParams);if(ge[s]!=null)return ge[s];r.cacheBust&&(e+=(/\?/.test(e)?"&":"?")+new Date().getTime());let n;try{const i=await Je(e,r.fetchRequestInit,({res:l,result:c})=>(t||(t=l.headers.get("Content-Type")||""),tr(c)));n=rr(i,t)}catch(i){n=r.imagePlaceholder||"";let l=`Failed to fetch resource: ${e}`;i&&(l=typeof i=="string"?i:i.message),l&&console.warn(l)}return ge[s]=n,n}async function sr(e){const t=e.toDataURL();return t==="data:,"?e.cloneNode(!1):ue(t)}async function nr(e,t){if(e.currentSrc){const i=document.createElement("canvas"),l=i.getContext("2d");i.width=e.clientWidth,i.height=e.clientHeight,l==null||l.drawImage(e,0,0,i.width,i.height);const c=i.toDataURL();return ue(c)}const r=e.poster,s=ye(r),n=await we(r,s,t);return ue(n)}async function ir(e,t){var r;try{if(!((r=e==null?void 0:e.contentDocument)===null||r===void 0)&&r.body)return await me(e.contentDocument.body,t,!0)}catch{}return e.cloneNode(!1)}async function lr(e,t){return A(e,HTMLCanvasElement)?sr(e):A(e,HTMLVideoElement)?nr(e,t):A(e,HTMLIFrameElement)?ir(e,t):e.cloneNode(Ze(e))}const or=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SLOT",Ze=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SVG";async function cr(e,t,r){var s,n;if(Ze(t))return t;let i=[];return or(e)&&e.assignedNodes?i=Z(e.assignedNodes()):A(e,HTMLIFrameElement)&&(!((s=e.contentDocument)===null||s===void 0)&&s.body)?i=Z(e.contentDocument.body.childNodes):i=Z(((n=e.shadowRoot)!==null&&n!==void 0?n:e).childNodes),i.length===0||A(e,HTMLVideoElement)||await i.reduce((l,c)=>l.then(()=>me(c,r)).then(d=>{d&&t.appendChild(d)}),Promise.resolve()),t}function dr(e,t,r){const s=t.style;if(!s)return;const n=window.getComputedStyle(e);n.cssText?(s.cssText=n.cssText,s.transformOrigin=n.transformOrigin):Xe(r).forEach(i=>{let l=n.getPropertyValue(i);i==="font-size"&&l.endsWith("px")&&(l=`${Math.floor(parseFloat(l.substring(0,l.length-2)))-.1}px`),A(e,HTMLIFrameElement)&&i==="display"&&l==="inline"&&(l="block"),i==="d"&&t.getAttribute("d")&&(l=`path(${t.getAttribute("d")})`),s.setProperty(i,l,n.getPropertyPriority(i))})}function ur(e,t){A(e,HTMLTextAreaElement)&&(t.innerHTML=e.value),A(e,HTMLInputElement)&&t.setAttribute("value",e.value)}function mr(e,t){if(A(e,HTMLSelectElement)){const r=t,s=Array.from(r.children).find(n=>e.value===n.getAttribute("value"));s&&s.setAttribute("selected","")}}function hr(e,t,r){return A(t,Element)&&(dr(e,t,r),Jt(e,t,r),ur(e,t),mr(e,t)),t}async function fr(e,t){const r=e.querySelectorAll?e.querySelectorAll("use"):[];if(r.length===0)return e;const s={};for(let i=0;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=>lr(s,t)).then(s=>cr(e,s,t)).then(s=>hr(e,s,t)).then(s=>fr(s,t))}const et=/url\((['"]?)([^'"]+?)\1\)/g,pr=/url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g,gr=/src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;function xr(e){const t=e.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1");return new RegExp(`(url\\(['"]?)(${t})(['"]?\\))`,"g")}function br(e){const t=[];return e.replace(et,(r,s,n)=>(t.push(n),r)),t.filter(r=>!xe(r))}async function yr(e,t,r,s,n){try{const i=r?Ht(t,r):t,l=ye(t);let c;return n||(c=await we(i,l,s)),e.replace(xr(t),`$1${c}$3`)}catch{}return e}function wr(e,{preferredFontFormat:t}){return t?e.replace(gr,r=>{for(;;){const[s,,n]=pr.exec(r)||[];if(!n)return"";if(n===t)return`src: ${s};`}}):e}function tt(e){return e.search(et)!==-1}async function rt(e,t,r){if(!tt(e))return e;const s=wr(e,r);return br(s).reduce((i,l)=>i.then(c=>yr(c,l,t,r)),Promise.resolve(s))}async function se(e,t,r){var s;const n=(s=t.style)===null||s===void 0?void 0:s.getPropertyValue(e);if(n){const i=await rt(n,null,r);return t.style.setProperty(e,i,t.style.getPropertyPriority(e)),!0}return!1}async function vr(e,t){await se("background",e,t)||await se("background-image",e,t),await se("mask",e,t)||await se("-webkit-mask",e,t)||await se("mask-image",e,t)||await se("-webkit-mask-image",e,t)}async function jr(e,t){const r=A(e,HTMLImageElement);if(!(r&&!xe(e.src))&&!(A(e,SVGImageElement)&&!xe(e.href.baseVal)))return;const s=r?e.src:e.href.baseVal,n=await we(s,ye(s),t);await new Promise((i,l)=>{e.onload=i,e.onerror=t.onImageErrorHandler?(...d)=>{try{i(t.onImageErrorHandler(...d))}catch(f){l(f)}}:l;const c=e;c.decode&&(c.decode=i),c.loading==="lazy"&&(c.loading="eager"),r?(e.srcset="",e.src=n):e.href.baseVal=n})}async function _r(e,t){const s=Z(e.childNodes).map(n=>at(n,t));await Promise.all(s).then(()=>e)}async function at(e,t){A(e,Element)&&(await vr(e,t),await jr(e,t),await _r(e,t))}function Sr(e,t){const{style:r}=e;t.backgroundColor&&(r.backgroundColor=t.backgroundColor),t.width&&(r.width=`${t.width}px`),t.height&&(r.height=`${t.height}px`);const s=t.style;return s!=null&&Object.keys(s).forEach(n=>{r[n]=s[n]}),e}const We={};async function Oe(e){let t=We[e];if(t!=null)return t;const s=await(await fetch(e)).text();return t={url:e,cssText:s},We[e]=t,t}async function Ue(e,t){let r=e.cssText;const s=/url\(["']?([^"')]+)["']?\)/g,i=(r.match(/url\([^)]+\)/g)||[]).map(async l=>{let c=l.replace(s,"$1");return c.startsWith("https://")||(c=new URL(c,e.url).href),Je(c,t.fetchRequestInit,({result:d})=>(r=r.replace(l,`url(${d})`),[l,d]))});return Promise.all(i).then(()=>r)}function qe(e){if(e==null)return[];const t=[],r=/(\/\*[\s\S]*?\*\/)/gi;let s=e.replace(r,"");const n=new RegExp("((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)})","gi");for(;;){const d=n.exec(s);if(d===null)break;t.push(d[0])}s=s.replace(n,"");const i=/@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi,l="((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})",c=new RegExp(l,"gi");for(;;){let d=i.exec(s);if(d===null){if(d=c.exec(s),d===null)break;i.lastIndex=c.lastIndex}else c.lastIndex=i.lastIndex;t.push(d[0])}return t}async function kr(e,t){const r=[],s=[];return e.forEach(n=>{if("cssRules"in n)try{Z(n.cssRules||[]).forEach((i,l)=>{if(i.type===CSSRule.IMPORT_RULE){let c=l+1;const d=i.href,f=Oe(d).then(x=>Ue(x,t)).then(x=>qe(x).forEach(u=>{try{n.insertRule(u,u.startsWith("@import")?c+=1:n.cssRules.length)}catch(h){console.error("Error inserting rule from remote css",{rule:u,error:h})}})).catch(x=>{console.error("Error loading remote css",x.toString())});s.push(f)}})}catch(i){const l=e.find(c=>c.href==null)||document.styleSheets[0];n.href!=null&&s.push(Oe(n.href).then(c=>Ue(c,t)).then(c=>qe(c).forEach(d=>{l.insertRule(d,l.cssRules.length)})).catch(c=>{console.error("Error loading remote stylesheet",c)})),console.error("Error inlining remote css file",i)}}),Promise.all(s).then(()=>(e.forEach(n=>{if("cssRules"in n)try{Z(n.cssRules||[]).forEach(i=>{r.push(i)})}catch(i){console.error(`Error while reading CSS rules from ${n.href}`,i)}}),r))}function Cr(e){return e.filter(t=>t.type===CSSRule.FONT_FACE_RULE).filter(t=>tt(t.style.getPropertyValue("src")))}async function Er(e,t){if(e.ownerDocument==null)throw new Error("Provided element is not within a Document");const r=Z(e.ownerDocument.styleSheets),s=await kr(r,t);return Cr(s)}function st(e){return e.trim().replace(/["']/g,"")}function Nr(e){const t=new Set;function r(s){(s.style.fontFamily||getComputedStyle(s).fontFamily).split(",").forEach(i=>{t.add(st(i))}),Array.from(s.children).forEach(i=>{i instanceof HTMLElement&&r(i)})}return r(e),t}async function Rr(e,t){const r=await Er(e,t),s=Nr(e);return(await Promise.all(r.filter(i=>s.has(st(i.style.fontFamily))).map(i=>{const l=i.parentStyleSheet?i.parentStyleSheet.href:null;return rt(i.cssText,l,t)}))).join(`
2
  `)}async function Pr(e,t){const r=t.fontEmbedCSS!=null?t.fontEmbedCSS:t.skipFonts?null:await Rr(e,t);if(r){const s=document.createElement("style"),n=document.createTextNode(r);s.appendChild(n),e.firstChild?e.insertBefore(s,e.firstChild):e.appendChild(s)}}async function $r(e,t={}){const{width:r,height:s}=Ye(e,t),n=await me(e,t,!0);return await Pr(n,t),await at(n,t),Sr(n,t),await Gt(n,r,s)}async function Mr(e,t={}){const{width:r,height:s}=Ye(e,t),n=await $r(e,t),i=await ue(n),l=document.createElement("canvas"),c=l.getContext("2d"),d=t.pixelRatio||Ut(),f=t.canvasWidth||r,x=t.canvasHeight||s;return l.width=f*d,l.height=x*d,t.skipAutoScale||qt(l),l.style.width=`${f}`,l.style.height=`${x}`,t.backgroundColor&&(c.fillStyle=t.backgroundColor,c.fillRect(0,0,l.width,l.height)),c.drawImage(i,0,0,l.width,l.height),l}async function Tr(e,t={}){const r=await Mr(e,t);return await zt(r)}const be="#ffffff";function Fr(){return typeof window>"u"?be:window.getComputedStyle(document.documentElement).getPropertyValue("--bg-elevated").trim()||be}function Lr(e){if(typeof window>"u")return be;const t=window.getComputedStyle(e).backgroundColor;return!t||t==="rgba(0, 0, 0, 0)"||t==="transparent"?Fr():t}async function Ir(e){var r,s;if(typeof window>"u"||!((s=(r=window.navigator)==null?void 0:r.clipboard)!=null&&s.write))throw new Error("Clipboard image copy is not supported in this browser.");if(typeof window.ClipboardItem>"u")throw new Error("Clipboard image copy is not supported in this browser.");const t=await Tr(e,{pixelRatio:2,cacheBust:!0,backgroundColor:Lr(e)});if(!t)throw new Error("Failed to render screenshot.");await window.navigator.clipboard.write([new window.ClipboardItem({"image/png":t})])}const nt=({targetRef:e,label:t})=>{const{toast:r}=ct(),[s,n]=F.useState("idle"),i=F.useRef(null);F.useEffect(()=>()=>{i.current!==null&&window.clearTimeout(i.current)},[]);const l=F.useCallback(async()=>{const d=e.current;if(d){n("copying"),d.classList.add("is-capturing"),d.offsetHeight,await new Promise(f=>window.requestAnimationFrame(()=>f()));try{await Ir(d),n("copied"),r({title:"Screenshot copied",description:`Image of the ${t} copied to your clipboard.`}),i.current!==null&&window.clearTimeout(i.current),i.current=window.setTimeout(()=>n("idle"),1500)}catch(f){n("idle"),r({title:"Copy failed",description:f instanceof Error&&f.message?f.message:"Could not copy the screenshot to your clipboard.",variant:"destructive"})}finally{d.classList.remove("is-capturing")}}},[e,t,r]),c=s==="copied"?"Copied":s==="copying"?"Copying…":"Copy image";return a.jsxs("button",{type:"button",className:"bm-copy-btn",onClick:l,disabled:s==="copying","aria-label":`Copy ${t} screenshot to clipboard`,title:`Copy ${t} screenshot to clipboard`,children:[a.jsx(xt,{name:"copy",size:11}),c]})};function Ar({model:e,datasetName:t,hideClosed:r,setHideClosed:s,setMetric:n}){const i=F.useRef(null),{isInitialFilteredViewLoading:l,chartPoints:c,activeMetric:d,allowedMetrics:f,orderedMetrics:x,parameterBound:u}=e;return l||c.length===0?null:a.jsxs("div",{className:"bm-card",ref:i,children:[a.jsxs("div",{className:"bm-card-screenshot-header","aria-hidden":"true",children:[a.jsxs("div",{className:"bm-card-screenshot-title",children:[a.jsx("span",{className:"bm-card-screenshot-eyebrow",children:"Benchmark"}),a.jsx("span",{className:"bm-card-screenshot-name",children:t})]}),a.jsxs("div",{className:"bm-card-screenshot-brand",children:[a.jsxs("span",{className:"brand",children:[a.jsx("span",{className:"brand-mark"}),a.jsxs("span",{className:"brand-name",children:["Papers ",a.jsx("em",{children:"With Code"})]})]}),a.jsx("span",{className:"bm-card-screenshot-url",children:"paperswithcode.co"})]})]}),a.jsxs("div",{className:"bm-card-head",children:[a.jsx("div",{className:"bm-card-title",children:"SOTA progression"}),a.jsxs("div",{className:"bm-card-actions",children:[f.length>1&&a.jsxs("label",{className:"bm-view-select",children:[a.jsx("span",{className:"bm-view-select-label",children:"View"}),a.jsx("select",{value:d,onChange:h=>n(h.target.value),children:x.map(h=>a.jsx("option",{value:h,children:h},h))})]}),a.jsxs("label",{className:"bm-closed-toggle",title:"Show or hide evaluations of closed-source models",children:[a.jsx(Ke,{className:"bm-closed-toggle-switch",checked:!r,onCheckedChange:h=>{s(!h)},"aria-label":"Show closed-source models"}),a.jsx("span",{className:"bm-closed-toggle-label",children:"Closed-source"})]}),a.jsx(nt,{targetRef:i,label:"SOTA chart"})]})]}),a.jsx("div",{className:"bm-chart-wrap",children:a.jsx(Dt,{points:c,metric:d})}),a.jsxs("div",{className:"bm-chart-foot",children:[a.jsx("span",{className:"legend-dot"}),u===void 0?"All models":"Filtered models"," over time · highlighted dots track the running best · hover for the model · click to open the paper"]})]})}function Br(e){if(!e)return null;const t=e.trim(),r=t.match(/^https?:\/\/(?:www\.)?arxiv\.org\/(?:abs|pdf)\/([^/?#]+)/i);if(r!=null&&r[1])return r[1].replace(/\.pdf$/i,"");const s=t.match(/^(?:https?:\/\/(?:www\.)?paperswithcode\.co)?\/paper\/([^/?#]+)/i);return(s==null?void 0:s[1])??null}function ze(e,t){return e?a.jsx(oe,{title:e}):t||"—"}const ia=()=>{var ve,je,_e,Se,ke,Ce,Ee,Ne,Re,Pe,$e;const{datasetSlug:e}=dt(),[t,r]=ut(),s=t.get("task")||void 0,n=t.get("eval")||void 0,i=St(t.get("max_parameters_exclusive")),{preferences:l,setHideClosedSourceEvals:c}=mt(),d=F.useRef(null),f=F.useRef(!1),x=F.useRef(null),[u,h]=F.useState(null),R=`${e}:${s||""}`,E=u===R,[L,S]=F.useState(1),g=te({queryKey:["dataset",e,"with-paper",s,l.hide_closed_source_evals?"open":"all"],queryFn:()=>re.getDatasetBySlug(e,{include_paper:!0,task:s,is_open:l.hide_closed_source_evals?!0:void 0}),enabled:!!e,staleTime:10*60*1e3}),k=te({queryKey:["dataset-evals",(ve=g.data)==null?void 0:ve.id],queryFn:()=>gt.byDataset(g.data.id),enabled:!!((je=g.data)!=null&&je.id),staleTime:5*60*1e3}),B=te({queryKey:["dataset-tasks",(_e=g.data)==null?void 0:_e.id],queryFn:()=>re.datasetTasks(g.data.id),enabled:!!((Se=g.data)!=null&&Se.id),staleTime:10*60*1e3}),j=te({queryKey:["metric-directions"],queryFn:()=>re.metricDirections(),staleTime:60*60*1e3}),D=Qe(B.data||[],k.data||[],s,n),W=te({queryKey:["task-benchmark-trends",D,l.hide_closed_source_evals?!0:void 0],queryFn:()=>re.trendingBenchmarks(D,{limit:100,min_recent_papers:0,is_open:l.hide_closed_source_evals?!0:void 0}),enabled:!!D&&!!((ke=g.data)!=null&&ke.id),staleTime:10*60*1e3}),w=F.useMemo(()=>{var b;return(((b=W.data)==null?void 0:b.results)||[]).find(M=>{var T;return M.id===((T=g.data)==null?void 0:T.id)})||null},[W.data,(Ce=g.data)==null?void 0:Ce.id]),q=te({queryKey:["leaderboard-metrics",(Ee=g.data)==null?void 0:Ee.id,D],queryFn:()=>re.leaderboardMetrics(g.data.id,D),enabled:!!((Ne=g.data)!=null&&Ne.id)&&!!D,staleTime:10*60*1e3}),I=Tt({evaluations:k.data||[],tasks:B.data||[],configuredMetrics:q.data||[],directions:j.data,initialSummary:(Re=g.data)==null?void 0:Re.leaderboard_summary,taskSlug:s,highlightEvalId:n,metric:t.get("metric")||void 0,hideClosed:l.hide_closed_source_evals,parameterBound:i,showMoreMetrics:E,fittingMetricCount:L,ready:{evaluations:k.isSuccess,tasks:B.isSuccess,directions:j.isSuccess,metrics:q.isSuccess}}),{primaryTask:N,hiddenClosedEvals:Q,hiddenClosedTopEval:z,isSummaryLoading:ee,displayedMetric:O,displayedSota:$,displayedSotaModel:U,isInitialFilteredViewLoading:K,highlightedEval:_,hasParameterMetadata:X,parameterCoverage:Y,orderedMetrics:o}=I;F.useEffect(()=>{if(f.current||!n||!k.data||k.data.length===0)return;const b=d.current;b&&(f.current=!0,b.scrollIntoView({behavior:"smooth",block:"start"}))},[n,k.data]);const m=te({queryKey:["area",N==null?void 0:N.area_id],queryFn:()=>re.getArea(N.area_id),enabled:!!(N!=null&&N.area_id),staleTime:10*60*1e3});if(g.isLoading)return a.jsxs("div",{className:"page",children:[a.jsx(ce,{className:"h-12 w-1/2 mb-6"}),a.jsx(ce,{className:"h-64 w-full"})]});if(g.error||!g.data)return a.jsx("div",{className:"page",children:a.jsx(bt,{variant:"destructive",children:a.jsx(yt,{children:"Benchmark not found."})})});const p=g.data,y=!!p.supports_harness,P=b=>{r(M=>{const T=new URLSearchParams(M);return b===void 0?T.delete("max_parameters_exclusive"):T.set("max_parameters_exclusive",String(b)),T})},C=b=>{r(M=>{const T=new URLSearchParams(M);return T.set("metric",b),T})},v=p.introducing_paper??void 0,H=(v==null?void 0:v.arxiv_id)||(v==null?void 0:v.id)||Br(p.paper_url),J=(v==null?void 0:v.title)||p.introducing_paper_title||null,G=((Pe=v==null?void 0:v.published)==null?void 0:Pe.slice(0,4))||p.introduced_year||null,it=!!H||!!p.paper_url||!!J,lt=v!=null&&v.arxiv_id||($e=p.paper_url)!=null&&$e.match(/^https?:\/\/(?:www\.)?arxiv\.org\//i)?`arXiv:${H}`:`Paper ${H}`;return a.jsx("div",{className:"page",children:a.jsxs("div",{className:"bm-page",children:[a.jsxs("div",{className:"breadcrumb",children:[a.jsx(ne,{to:"/tasks",children:"Tasks"}),m.data&&a.jsxs(a.Fragment,{children:[a.jsx("span",{className:"sep",children:"/"}),a.jsx(ne,{to:`/tasks#area-${jt(m.data.name)}`,children:m.data.name})]}),N&&a.jsxs(a.Fragment,{children:[a.jsx("span",{className:"sep",children:"/"}),a.jsx(ne,{to:`/tasks/${N.slug||N.id}`,children:N.name})]}),a.jsx("span",{className:"sep",children:"/"}),a.jsx("span",{style:{color:"var(--accent-text)"},children:p.name})]}),a.jsxs("div",{className:"bm-title-row",children:[a.jsx("h1",{className:"bm-title",children:p.name}),w&&a.jsxs("div",{className:"bm-title-trend","aria-label":`${p.name} reporting trend`,children:[a.jsx(wt,{history:w.history,benchmarkName:w.name}),a.jsxs("span",{className:"bm-title-trend-summary",children:[a.jsx("strong",{children:w.recent_paper_count})," ",w.recent_paper_count===1?"paper":"papers",w.rate_change==null?w.recent_paper_count>0&&a.jsx("span",{className:"benchmark-trend-change is-new",children:"new"}):a.jsxs("span",{className:`benchmark-trend-change ${w.rate_change>=1?"is-up":"is-down"}`,children:[w.rate_change>=1?"↑":"↓"," ",w.rate_change.toFixed(1),"×"]})]})]})]}),a.jsx(ht,{kind:"benchmark",entityId:p.id}),a.jsxs("div",{className:"bm-subtitle",children:[ee?a.jsx(ce,{className:"h-5 w-64 bm-summary-skeleton","aria-label":"Loading benchmark summary"}):a.jsxs("span",{children:[O&&a.jsxs(a.Fragment,{children:[a.jsx("span",{className:"metric-tag",children:O}),a.jsx("span",{style:{color:"var(--hairline-strong)",margin:"0 8px"},children:"·"})]}),U?a.jsxs("span",{children:["Best: ",a.jsx("span",{className:"best-name",children:le($)})," by ",a.jsx("span",{className:"best-name",style:{fontStyle:"normal"},children:U})]}):a.jsxs("span",{children:[I.rows.length," evaluations"]})]}),p.hf_url&&a.jsxs("a",{className:"bm-action-btn",href:p.hf_url,target:"_blank",rel:"noopener noreferrer",children:[a.jsx("span",{"aria-hidden":"true",children:"🤗"})," View on Hugging Face"]})]}),p.description&&a.jsx("p",{className:"bm-description",children:p.description}),l.hide_closed_source_evals&&Q.length>0&&a.jsxs("div",{className:"bm-hidden-closed-notice",children:[a.jsxs("span",{children:[Q.length," closed-source ",Q.length===1?"row is":"rows are"," hidden",z!=null&&z.model_name?a.jsxs(a.Fragment,{children:[", including ",a.jsx("strong",{children:z.model_name})]}):null,"."]}),a.jsx("button",{type:"button",className:"bm-hidden-closed-action",onClick:()=>{c(!1)},children:"Show closed-source"})]}),it&&a.jsxs("div",{className:"method-source",style:{marginTop:0,marginBottom:18},children:[a.jsx("span",{className:"method-source-label",children:"Source"}),H?a.jsxs(ne,{to:`/paper/${H}`,target:"_blank",rel:"noopener noreferrer",className:"method-source-link",children:[a.jsx("span",{className:"method-source-title",children:J?a.jsx(oe,{title:J}):lt}),G&&a.jsx("span",{className:"method-source-meta",children:G})]}):p.paper_url?a.jsxs("a",{href:vt(p.paper_url)??void 0,target:"_blank",rel:"noopener noreferrer",className:"method-source-link",children:[a.jsx("span",{className:"method-source-title",children:J?a.jsx(oe,{title:J}):p.paper_url}),G&&a.jsx("span",{className:"method-source-meta",children:G})]}):a.jsxs("div",{className:"method-source-link is-static",children:[a.jsx("span",{className:"method-source-title",children:J?a.jsx(oe,{title:J}):null}),G&&a.jsx("span",{className:"method-source-meta",children:G})]})]}),a.jsx(Ar,{model:I,datasetName:p.name,hideClosed:l.hide_closed_source_evals,setHideClosed:c,setMetric:C}),_&&(()=>{var Te,Fe;const b=_.paper_arxiv_id||_.paper_id,M=_.paper_title||(_.paper_arxiv_id?`arXiv:${_.paper_arxiv_id}`:null),T=_.best_metric&&((Te=_.metrics)==null?void 0:Te[_.best_metric])!==void 0?_.best_metric:I.activeMetric,Me=(Fe=_.metrics)==null?void 0:Fe[T];return a.jsxs("div",{className:"bm-highlight-banner",role:"status",children:[a.jsx("span",{className:"bm-highlight-dot","aria-hidden":"true"}),a.jsxs("div",{className:"bm-highlight-text",children:[a.jsx("span",{className:"bm-highlight-label",children:"Comparing result"}),a.jsxs("span",{className:"bm-highlight-paper",children:[_.model_name||M||"—",_.harness?` · ${_.harness}`:""]}),a.jsxs("span",{className:"bm-highlight-meta",children:[Me!==void 0&&T?a.jsxs(a.Fragment,{children:[T,": ",le(Me),M?" · ":""]}):null,b?a.jsx(ne,{to:`/paper/${b}`,children:ze(_.paper_title,M)}):ze(_.paper_title,M)]})]})]})})(),a.jsxs("div",{className:"bm-card",ref:x,children:[a.jsxs("div",{className:"bm-card-screenshot-header","aria-hidden":"true",children:[a.jsxs("div",{className:"bm-card-screenshot-title",children:[a.jsx("span",{className:"bm-card-screenshot-eyebrow",children:"Benchmark"}),a.jsx("span",{className:"bm-card-screenshot-name",children:p.name})]}),a.jsxs("div",{className:"bm-card-screenshot-brand",children:[a.jsxs("span",{className:"brand",children:[a.jsx("span",{className:"brand-mark"}),a.jsxs("span",{className:"brand-name",children:["Papers ",a.jsx("em",{children:"With Code"})]})]}),a.jsx("span",{className:"bm-card-screenshot-url",children:"paperswithcode.co"})]})]}),a.jsxs("div",{className:"bm-card-head",children:[a.jsx("div",{className:"bm-card-title",children:"Leaderboard"}),a.jsxs("div",{className:"bm-card-actions",children:[I.allowedMetrics.length>1&&a.jsxs("label",{className:"bm-view-select",children:[a.jsx("span",{className:"bm-view-select-label",children:"View"}),a.jsx("select",{value:I.activeMetric,onChange:b=>C(b.target.value),children:o.map(b=>a.jsx("option",{value:b,children:b},b))})]}),a.jsxs("label",{className:"bm-closed-toggle",title:"Show or hide evaluations of closed-source models",children:[a.jsx(Ke,{className:"bm-closed-toggle-switch",checked:!l.hide_closed_source_evals,onCheckedChange:b=>{c(!b)},"aria-label":"Show closed-source models"}),a.jsx("span",{className:"bm-closed-toggle-label",children:"Closed-source"})]}),!K&&!X&&k.isSuccess?a.jsx("span",{className:"bm-parameter-unavailable",children:"Parameter metadata unavailable"}):null,a.jsx(nt,{targetRef:x,label:"leaderboard"})]})]}),!K&&X&&a.jsxs("div",{className:"bm-parameter-filter-bar",children:[a.jsx("span",{className:"bm-parameter-filter-label",children:"Parameters Size"}),a.jsx("div",{className:"bm-parameter-filter-options",role:"group","aria-label":"Filter leaderboard by parameter size",children:I.parameterFilters.map(b=>{const{selected:M,disabled:T}=b;return a.jsx("button",{type:"button",className:`bm-parameter-filter-option${M?" is-active":""}`,"aria-pressed":M,disabled:T,onClick:()=>P(b.maxParametersExclusive),children:b.label},b.label)})}),a.jsxs("span",{className:"bm-parameter-coverage",children:["Parameters known for ",Y.parameter_coverage_known," of ",Y.parameter_coverage_total," entries"]})]}),k.isLoading||K?a.jsx("div",{style:{padding:16},children:Array.from({length:5}).map((b,M)=>a.jsx(ce,{className:"h-10 w-full mb-2"},M))}):I.rows.length===0?i?a.jsxs("div",{className:"no-results",children:["No known parameter counts match this filter. "," ",a.jsx("button",{type:"button",className:"bm-empty-filter-action",onClick:()=>P(void 0),children:"Show all"})]}):a.jsx("div",{className:"no-results",children:"No evaluations submitted yet."}):a.jsxs(a.Fragment,{children:[o.length>L&&a.jsxs("div",{className:"bm-metric-columns-control",children:[a.jsx("button",{type:"button",className:"bm-metric-columns-toggle","aria-expanded":E,"aria-controls":"benchmark-leaderboard",onClick:()=>h(E?null:R),children:E?"Show fewer metrics":`Show more metrics (${o.length-L})`}),E&&a.jsx("span",{children:"Scroll metrics horizontally; model and paper details stay visible."})]}),a.jsx(At,{model:I,showHarness:y,setMetric:C,highlightRowRef:d,onFittingMetricCountChange:S})]})]})]})})};export{ia as default};
 
1
+ import{r as F,j as a,y as le,L as ne,b as ot,h as ct,u as dt,d as ut,k as mt}from"./index-B9MfhMLC.js";import{R as ht}from"./ResearchFollowButton-CSky6nMM.js";import{u as te}from"./useQuery-Bx81pmgm.js";import{c as re}from"./catalog-BqDz3O_s.js";import{C as ft,E as pt,e as gt}from"./ExternalSourceEvalBadge-CFCVDZdz.js";import{L as oe}from"./LatexTitle-DeUmWtI2.js";import{S as Ke}from"./switch-BLheP41Z.js";import{I as xt}from"./components-BZrNefuY.js";import{S as ce}from"./skeleton-BcfKeAOl.js";import{A as bt,a as yt}from"./alert-Bg2LnrDJ.js";import{B as wt}from"./BenchmarkTrendSparkline-qRluvC2o.js";import{s as vt}from"./safeExternalHref-CkBrsh84.js";import{s as jt}from"./slug-BpH-Nkvz.js";import"./useMutation-C2athD5k.js";import"./research-DbRWvLsz.js";import"./plus-BZFi6ZWf.js";import"./papers-BGvqL27Z.js";import"./hover-card-Bv4bJws5.js";import"./index-Dcor-vPm.js";import"./paperQueryKeys-BP2E-0yf.js";import"./colors-BCIVIuvj.js";function _t(e,t,r){const s=t?(e??[]).filter(l=>l.task_id===t):e??[],n=s.filter(l=>l.is_open===!1),i=n.reduce((l,c)=>l?(c.best_rank??Number.POSITIVE_INFINITY)<(l.best_rank??Number.POSITIVE_INFINITY)?c:l:c,null);return{visible:r?s.filter(l=>l.is_open!==!1):s,hiddenClosed:n,topHiddenClosed:i}}function ie(e){if(e==null)return null;if(typeof e=="number")return Number.isFinite(e)?e:null;const t=e.includes("±")?e.split("±")[0].trim():e.trim(),r=parseFloat(t);return Number.isFinite(r)?r:null}const Ge=[{label:"All",maxParametersExclusive:void 0},{label:"<10M",maxParametersExclusive:1e7},{label:"<100M",maxParametersExclusive:1e8},{label:"<1B",maxParametersExclusive:1e9},{label:"<3B",maxParametersExclusive:3e9},{label:"<6B",maxParametersExclusive:6e9},{label:"<12B",maxParametersExclusive:12e9},{label:"<32B",maxParametersExclusive:32e9},{label:"<128B",maxParametersExclusive:128e9},{label:"<500B",maxParametersExclusive:5e11}];function St(e){const t=e===null?void 0:Number(e);return Ge.some(r=>r.maxParametersExclusive===t)?t:void 0}function kt(e){return new Intl.NumberFormat("en",{notation:"compact",maximumSignificantDigits:3}).format(e)}function Ct(e){return[e.paper_id,e.task_id,e.dataset_id,e.model_name,e.harness??""].join("|")}function Et(e){const t=new Map;for(const r of e){const s=Ct(r),n=t.get(s);if(!n){t.set(s,{...r,metrics:{...r.metrics||{}},sourceEvaluationIds:[r.id],ranksByMetric:r.best_metric&&r.best_rank!=null?{[r.best_metric]:r.best_rank}:{},parameterCount:r.num_parameters??null,hasParameterConflict:!1});continue}n.metrics={...n.metrics,...r.metrics||{}},n.sourceEvaluationIds.push(r.id),r.best_metric&&r.best_rank!=null&&(n.ranksByMetric[r.best_metric]=r.best_rank),r.num_parameters!=null&&!n.hasParameterConflict&&(n.parameterCount===null?n.parameterCount=r.num_parameters:n.parameterCount!==r.num_parameters&&(n.parameterCount=null,n.hasParameterConflict=!0))}return Array.from(t.values())}function Le(e,t){return t===void 0?e:e.filter(r=>r.parameterCount!==null&&r.parameterCount<t)}function Nt(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 Rt(e){const t=Date.parse(e);return Number.isNaN(t)?"":new Date(t).toISOString().slice(0,10)}function Pt(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 $t(e,t){const r=e.evaluated_on;return r&&r!==t&&r!==Rt(e.updated_at)?r:e.paper_published_date||""}function Mt(e,t,r){if(e.length===0)return{points:[],sota:0,sotaModel:""};const s=Pt(e),n=e.map(u=>{var R;const h=ie((R=u.metrics)==null?void 0:R[t]);return{eval:u,value:h,date:$t(u,s)}}).filter(u=>u.value!==null&&!!u.date).sort((u,h)=>u.date.localeCompare(h.date)),i=[];let l=null;for(const u of n){const h=l==null?!0:r==="↓"?u.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 Qe(e,t,r,s){const n=t.find(i=>i.id===s);if(e.length===0)return null;if(n!=null&&n.task_id&&e.some(i=>i.id===n.task_id))return n.task_id;if(r){const i=e.find(l=>l.slug===r);if(i)return i.id}if(e.length===1)return e[0].id;if(t.length>0){const i=new Map;for(const d of t)i.set(d.task_id,(i.get(d.task_id)||0)+1);let l=null,c=-1;for(const d of e){const f=i.get(d.id)||0;f>c&&(c=f,l=d.id)}if(l)return l}return e[0].id}function Tt(e){var _,X,Y;const{evaluations:t,tasks:r,taskSlug:s,highlightEvalId:n,parameterBound:i,showMoreMetrics:l,fittingMetricCount:c=1}=e,d=Qe(r,t,s,n),f=r.find(o=>o.id===d)||r[0]||null,x=t.find(o=>o.id===n),u=_t(t,d,e.hideClosed),h=Et(u.visible),R=Le(h,i),E=e.configuredMetrics.map(o=>o.metric_name),L=Array.from(new Set(h.flatMap(o=>[...o.best_metric?[o.best_metric]:[],...Object.keys(o.metrics||{})]))),S=E.length?E:L,g=new Map;for(const o of h){const m=o.best_metric;!m||ie(o.metrics[m])===null||E.length&&!S.includes(m)||g.set(m,(g.get(m)||0)+1)}const k=((_=[...g].sort((o,m)=>m[1]-o[1])[0])==null?void 0:_[0])||S[0]||"",j=S.find(o=>{var m;return o.toLocaleLowerCase()===((m=e.metric)==null?void 0:m.trim().toLocaleLowerCase())})||(x==null?void 0:x.best_metric)||k,D=((X=e.directions)==null?void 0:X.directions[j])==="lower_is_better"?"↓":"↑",W=j&&S.includes(j)?[j,...S.filter(o=>o!==j)]:S,w=W.length?l?W:W.slice(0,Math.max(1,c)):j?[j]:[],q=R.slice().sort((o,m)=>{const p=ie(o.metrics[j]),y=ie(m.metrics[j]);return p!==null&&y!==null?D==="↓"?p-y:y-p:p!==null?-1:y!==null?1:Ie(o,j)-Ie(m,j)});let I=null,N=0;const Q=q.map((o,m)=>{const p=ie(o.metrics[j]);return p!==null&&p!==I&&(I=p,N=m+1),{evaluation:o,rank:p===null?null:N,isHighlighted:Nt(o,n)}}),{points:z,sota:ee,sotaModel:O}=Mt(R,j,D),$=i===void 0?e.initialSummary:void 0,U=e.ready.evaluations&&e.ready.tasks&&e.ready.directions&&(!d||e.ready.metrics),K={parameter_coverage_known:h.filter(o=>o.parameterCount!==null).length,parameter_coverage_total:h.length};return{currentTaskId:d,primaryTask:f,activeMetric:j,arrow:D,allowedMetrics:S,orderedMetrics:W,visibleMetrics:w,rows:Q,chartPoints:z,highlightedEval:((Y=Q.find(o=>o.isHighlighted))==null?void 0:Y.evaluation)||null,hiddenClosedEvals:u.hiddenClosed,hiddenClosedTopEval:u.topHiddenClosed,parameterBound:i,parameterCoverage:K,hasParameterMetadata:K.parameter_coverage_known>0,parameterFilters:Ge.map(o=>({...o,selected:i===o.maxParametersExclusive,disabled:i!==o.maxParametersExclusive&&Le(h,o.maxParametersExclusive).length===0})),displayedMetric:U?j:$==null?void 0:$.metric,displayedSota:U?ee:$==null?void 0:$.value,displayedSotaModel:U?O:$==null?void 0:$.model_name,isSummaryLoading:!U&&!$,isInitialFilteredViewLoading:i!==void 0&&!U}}function Ft(e,t,r,s=1,n=0){const i=e-t.fixed-(r?t.harness:0);if(t.metric<=0)return 1;const l=Math.floor(i/t.metric);if(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 Lt(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 It=20;function Ae(e,t){return e?a.jsx(oe,{title:e}):t||"—"}function At({model:e,showHarness:t,setMetric:r,highlightRowRef:s,onFittingMetricCountChange:n}){const{rows:i,visibleMetrics:l,activeMetric:c,arrow:d}=e,[f,x]=F.useState(null);return F.useEffect(()=>{if(!f)return;const u=()=>{f.classList.toggle("has-horizontal-overflow",f.scrollWidth>f.clientWidth);const R=f.firstElementChild;if(!R)return;const E=f.clientWidth,L=Lt(R),S=document.documentElement,g=S.scrollHeight>S.clientHeight?0:It;n(k=>Ft(E,L,t,k,g))},h=new ResizeObserver(u);return h.observe(f),f.firstElementChild&&h.observe(f.firstElementChild),u(),()=>h.disconnect()},[f,t,n]),a.jsx("div",{ref:x,className:"bm-table-scroll",role:"region","aria-label":"Leaderboard metrics",tabIndex:0,children:a.jsxs("table",{id:"benchmark-leaderboard",className:"bm-table",style:{"--bm-metric-count":l.length,"--bm-harness-count":t?1:0},children:[a.jsxs("colgroup",{children:[a.jsx("col",{className:"bm-width-rank"}),a.jsx("col",{className:"bm-width-model"}),a.jsx("col",{className:"bm-width-parameters"}),t&&a.jsx("col",{className:"bm-width-harness"}),l.map(u=>a.jsx("col",{className:"bm-width-metric"},u)),a.jsx("col",{}),a.jsx("col",{className:"bm-width-year"})]}),a.jsx("thead",{children:a.jsxs("tr",{children:[a.jsx("th",{className:"col-rank",children:"Rank"}),a.jsx("th",{className:"col-model",children:"Model"}),a.jsx("th",{className:"col-parameters",children:"Parameters"}),t&&a.jsx("th",{className:"col-harness",children:"Harness"}),l.map(u=>{const h=u===c;return a.jsx("th",{className:`col-value ${h?"is-active":""}`,"aria-sort":h?d==="↓"?"ascending":"descending":"none",children:a.jsxs("button",{type:"button",className:"bm-metric-header",onClick:()=>r(u),"aria-pressed":h,title:`Sort by ${u}`,children:[u,h?` ${d}`:""]})},u)}),a.jsx("th",{className:"col-paper",children:"Paper"}),a.jsx("th",{className:"col-year",children:"Year"})]})}),a.jsx("tbody",{children:i.map(({evaluation:u,rank:h,isHighlighted:R})=>{var S;const E=u.paper_arxiv_id||u.paper_id,L=u.paper_title||(u.paper_arxiv_id?`arXiv:${u.paper_arxiv_id}`:null);return a.jsxs("tr",{ref:R?s:void 0,className:R?"is-highlighted":void 0,children:[a.jsx("td",{className:"col-rank",children:h??"—"}),a.jsxs("td",{className:"col-model",children:[R&&a.jsx("span",{className:"bm-row-marker","aria-hidden":"true"}),u.hf_model_url?a.jsx("a",{href:u.hf_model_url,target:"_blank",rel:"noopener noreferrer",className:"bm-model-link",title:`Open ${u.model_name||"model"} on Hugging Face`,children:u.model_name||"—"}):u.model_name||"—",u.is_open===!1&&a.jsx(ft,{}),(u.external??u.is_external)&&a.jsx(pt,{sourceUrl:u.source_url||u.external_source_url||u.result_url})]}),a.jsx("td",{className:"col-parameters",title:u.parameterCount===null?void 0:u.parameterCount.toLocaleString("en-US"),"aria-label":u.parameterCount===null?"Parameters unknown":`${u.parameterCount.toLocaleString("en-US")} parameters`,children:u.parameterCount===null?"—":kt(u.parameterCount)}),t&&a.jsx("td",{className:"col-harness",children:u.harness||"—"}),l.map(g=>{var j;const k=g===c,B=(j=u.metrics)==null?void 0:j[g];return a.jsx("td",{className:`col-value${k?" is-active":""}${k&&h===1?" is-best":""}`,children:B!=null&&B!==""?le(B):"—"},g)}),a.jsx("td",{className:"col-paper",children:E?a.jsx(ne,{to:`/paper/${E}`,title:u.paper_title||L||void 0,children:Ae(u.paper_title,L)}):Ae(u.paper_title,L)}),a.jsx("td",{className:"col-year",children:((S=u.evaluated_on||u.paper_published_date)==null?void 0:S.slice(0,4))||"—"})]},u.id)})})]})})}function Be(e){const t=e.length===7?`${e}-01`:e,r=new Date(t).getTime();return Number.isFinite(r)?r:0}const fe=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function pe(e){const t=new Date(e);return{year:t.getFullYear(),month:t.getMonth()}}function Bt(e,t){if(e===t){const{year:d,month:f}=pe(e);return[{timestamp:new Date(d,f,1).getTime(),key:`${d}-${f}`,label:`${fe[f]} ${d}`}]}const r=pe(e),s=pe(t);if(r.year===s.year){const d=s.month-r.month+1;let f=1;const x=12;d>x&&(f=Math.ceil(d/x));const u=[];for(let h=r.month;h<=s.month;h+=f)u.push({timestamp:new Date(r.year,h,1).getTime(),key:`${r.year}-${h}`,label:d<=3?`${fe[h]} ${r.year}`:fe[h]});return u}const n=s.year-r.year+1;let i=1;const l=12;n>l&&(i=Math.ceil(n/l));const c=[];for(let d=r.year;d<=s.year;d+=i)c.push({timestamp:new Date(d,0,1).getTime(),key:String(d),label:String(d)});return c}const Dt=({points:e,metric:t})=>{const r=ot(),[s,n]=F.useState(null),i=880,l=320,c=60,d=30,f=40,x=50,u=e.map(o=>o.value),h=Math.min(...u),E=Math.max(...u)-h||1,L=i-c-d,S=l-f-x,g=e.map(o=>Be(o.date)),k=Math.min(...g),B=Math.max(...g),j=B-k||1,D=o=>k===B?c+L/2:c+(o-k)/j*L,W=e.map((o,m)=>{const p=D(Be(o.date)),y=(o.value-h)/E,P=f+S*(1-y);return{x:p,y:P,data:o,idx:m}}),w=W.filter(o=>o.data.isSota);let q="";if(w.length>=2){q=`M${w[0].x},${w[0].y}`;for(let o=1;o<w.length;o++){const m=w[o-1],p=w[o],y=(m.x+p.x)/2;q+=` 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 P=o.x-y/2,C=o.x+y/2,v="middle";return P<c?(P=c,C=c+y,v="start"):C>i-d&&(C=i-d,P=C-y,v="end"),{x:v==="start"?c:v==="end"?i-d:o.x,y:o.y-Q,text:p,anchor:v,left:P,right:C}},ee=[],O=w.length>0?z(w[w.length-1]):null;let $=-1/0;for(let o=0;o<w.length-1;o++){const m=z(w[o]);m&&(m.left<$+N||O&&m.right>O.left-N||($=m.right,ee.push({x:m.x,y:m.y,text:m.text,anchor:m.anchor})))}O&&ee.push({x:O.x,y:O.y,text:O.text,anchor:O.anchor});const U=Bt(k,B),K=5,_=o=>n(m=>m===o?null:m),X=o=>{o&&r(`/paper/${o}`)},Y=(o,m)=>{const y=`${o.data.modelName||o.data.paperTitle||"Unknown model"}: ${le(o.data.value)} on ${o.data.dateLabel}`,P=!!o.data.paperRouteId;return a.jsxs("g",{children:[m,a.jsx("circle",{cx:o.x,cy:o.y,r:"10",fill:"transparent",style:{cursor:P?"pointer":"default",outline:"none"},tabIndex:0,role:P?"link":"img","aria-label":y,onMouseEnter:()=>n(o.idx),onMouseLeave:()=>_(o.idx),onFocus:()=>n(o.idx),onBlur:()=>_(o.idx),onClick:()=>X(o.data.paperRouteId),onKeyDown:C=>{P&&(C.key==="Enter"||C.key===" ")&&(C.preventDefault(),X(o.data.paperRouteId))},children:a.jsx("title",{children:y})})]},o.idx)};return a.jsxs("svg",{width:"100%",viewBox:`0 0 ${i} ${l}`,style:{display:"block"},children:[a.jsx("text",{x:c-38,y:f+S/2,fontSize:"11",fontFamily:"var(--mono)",fill:"var(--ink-faint)",textAnchor:"middle",transform:`rotate(-90 ${c-38} ${f+S/2})`,children:t}),Array.from({length:K}).map((o,m)=>{const p=m/(K-1),y=f+S*(1-p),P=h+E*p;return a.jsxs("g",{children:[a.jsx("line",{x1:c,y1:y,x2:i-d,y2:y,stroke:"var(--hairline)",strokeWidth:"1"}),a.jsx("text",{x:c-10,y:y+4,fontSize:"11",fontFamily:"var(--mono)",fill:"var(--ink-faint)",textAnchor:"end",children:le(P)})]},m)}),U.map(o=>{const m=D(o.timestamp);return a.jsx("text",{x:m,y:l-x+18,fontSize:"11",fontFamily:"var(--mono)",fill:"var(--ink-soft)",textAnchor:"middle",children:o.label},o.key)}),W.filter(o=>!o.data.isSota).map(o=>{const m=s===o.idx;return Y(o,a.jsx("circle",{cx:o.x,cy:o.y,r:m?3:2,fill:"var(--ink-faint)",opacity:m?1:.45,style:{transition:"r 0.12s ease, opacity 0.12s ease"}}))}),q&&a.jsx("path",{d:q,stroke:"var(--accent)",strokeWidth:"2",fill:"none",strokeLinejoin:"round",strokeLinecap:"round"}),w.map(o=>{const m=s===o.idx;return Y(o,a.jsx("circle",{cx:o.x,cy:o.y,r:m?4.5:3,fill:m?"var(--accent)":"var(--bg-elevated)",stroke:"var(--accent)",strokeWidth:"1.5",style:{transition:"r 0.12s ease, fill 0.12s ease"}}))}),ee.map((o,m)=>a.jsx("text",{x:o.x,y:o.y,fontSize:"9.5",fontFamily:"var(--mono)",fill:"var(--ink-soft)",textAnchor:o.anchor,pointerEvents:"none",style:{paintOrder:"stroke",stroke:"var(--bg-elevated)",strokeWidth:3,strokeLinejoin:"round"},children:o.text},`label-${m}`)),s!==null&&W[s]&&(()=>{const o=W[s],m=o.data.modelName||o.data.paperTitle||"Unknown model",y=`${m.length>40?m.slice(0,39)+"…":m}: ${le(o.data.value)}`,C=Math.max(120,Math.min(340,y.length*6.6+24)),v=30;let H=o.x-C/2;H<c&&(H=c),H+C>i-d&&(H=i-d-C);const G=o.y-v-14>=f?o.y-v-12:o.y+12;return a.jsxs("g",{pointerEvents:"none",children:[a.jsx("rect",{x:H,y:G,width:C,height:v,rx:"6",ry:"6",fill:"var(--bg-elevated)",stroke:"var(--hairline-strong)",strokeWidth:"1",style:{filter:"drop-shadow(0 2px 6px rgba(0,0,0,0.08))"}}),a.jsx("text",{x:H+12,y:G+19,fontSize:"12",fontFamily:"var(--sans)",fill:"var(--ink)",fontWeight:500,children:y})]})})()]})};function Ht(e,t){if(e.match(/^[a-z]+:\/\//i))return e;if(e.match(/^\/\//))return window.location.protocol+e;if(e.match(/^[a-z]+:/i))return e;const r=document.implementation.createHTMLDocument(),s=r.createElement("base"),n=r.createElement("a");return r.head.appendChild(s),r.body.appendChild(n),t&&(s.href=t),n.href=e,n.href}const Vt=(()=>{let e=0;const t=()=>`0000${(Math.random()*36**4<<0).toString(36)}`.slice(-4);return()=>(e+=1,`u${t()}${e}`)})();function Z(e){const t=[];for(let r=0,s=e.length;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 Wt(e){const t=de(e,"border-left-width"),r=de(e,"border-right-width");return e.clientWidth+t+r}function Ot(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||Wt(e),s=t.height||Ot(e);return{width:r,height:s}}function Ut(){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 qt(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 zt(e,t={}){return e.toBlob?new Promise(r=>{e.toBlob(r,t.type?t.type:"image/png",t.quality?t.quality:1)}):new Promise(r=>{const s=window.atob(e.toDataURL(t.type?t.type:void 0,t.quality?t.quality:void 0).split(",")[1]),n=s.length,i=new Uint8Array(n);for(let l=0;l<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 Kt(e){return Promise.resolve().then(()=>new XMLSerializer().serializeToString(e)).then(encodeURIComponent).then(t=>`data:image/svg+xml;charset=utf-8,${t}`)}async function Gt(e,t,r){const s="http://www.w3.org/2000/svg",n=document.createElementNS(s,"svg"),i=document.createElementNS(s,"foreignObject");return n.setAttribute("width",`${t}`),n.setAttribute("height",`${r}`),n.setAttribute("viewBox",`0 0 ${t} ${r}`),i.setAttribute("width","100%"),i.setAttribute("height","100%"),i.setAttribute("x","0"),i.setAttribute("y","0"),i.setAttribute("externalResourcesRequired","true"),n.appendChild(i),i.appendChild(e),Kt(n)}const A=(e,t)=>{if(e instanceof t)return!0;const r=Object.getPrototypeOf(e);return r===null?!1:r.constructor.name===t.name||A(r,t)};function Qt(e){const t=e.getPropertyValue("content");return`${e.cssText} content: '${t.replace(/'|"/g,"")}';`}function Xt(e,t){return Xe(t).map(r=>{const s=e.getPropertyValue(r),n=e.getPropertyPriority(r);return`${r}: ${s}${n?" !important":""};`}).join(" ")}function Yt(e,t,r,s){const n=`.${e}:${t}`,i=r.cssText?Qt(r):Xt(r,s);return document.createTextNode(`${n}{${i}}`)}function De(e,t,r,s){const n=window.getComputedStyle(e,r),i=n.getPropertyValue("content");if(i===""||i==="none")return;const l=Vt();try{t.className=`${t.className} ${l}`}catch{return}const c=document.createElement("style");c.appendChild(Yt(l,r,n,s)),t.appendChild(c)}function Jt(e,t,r){De(e,t,":before",r),De(e,t,":after",r)}const He="application/font-woff",Ve="image/jpeg",Zt={woff:He,woff2:He,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:Ve,jpeg:Ve,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml",webp:"image/webp"};function er(e){const t=/\.([^./]*?)$/g.exec(e);return t?t[1]:""}function ye(e){const t=er(e).toLowerCase();return Zt[t]||""}function tr(e){return e.split(/,/)[1]}function xe(e){return e.search(/^(data:)/)!==-1}function rr(e,t){return`data:${t};base64,${e}`}async function Je(e,t,r){const s=await fetch(e,t);if(s.status===404)throw new Error(`Resource "${s.url}" not found`);const n=await s.blob();return new Promise((i,l)=>{const c=new FileReader;c.onerror=l,c.onloadend=()=>{try{i(r({res:s,result:c.result}))}catch(d){l(d)}},c.readAsDataURL(n)})}const ge={};function ar(e,t,r){let s=e.replace(/\?.*/,"");return r&&(s=e),/ttf|otf|eot|woff2?/i.test(s)&&(s=s.replace(/.*\//,"")),t?`[${t}]${s}`:s}async function we(e,t,r){const s=ar(e,t,r.includeQueryParams);if(ge[s]!=null)return ge[s];r.cacheBust&&(e+=(/\?/.test(e)?"&":"?")+new Date().getTime());let n;try{const i=await Je(e,r.fetchRequestInit,({res:l,result:c})=>(t||(t=l.headers.get("Content-Type")||""),tr(c)));n=rr(i,t)}catch(i){n=r.imagePlaceholder||"";let l=`Failed to fetch resource: ${e}`;i&&(l=typeof i=="string"?i:i.message),l&&console.warn(l)}return ge[s]=n,n}async function sr(e){const t=e.toDataURL();return t==="data:,"?e.cloneNode(!1):ue(t)}async function nr(e,t){if(e.currentSrc){const i=document.createElement("canvas"),l=i.getContext("2d");i.width=e.clientWidth,i.height=e.clientHeight,l==null||l.drawImage(e,0,0,i.width,i.height);const c=i.toDataURL();return ue(c)}const r=e.poster,s=ye(r),n=await we(r,s,t);return ue(n)}async function ir(e,t){var r;try{if(!((r=e==null?void 0:e.contentDocument)===null||r===void 0)&&r.body)return await me(e.contentDocument.body,t,!0)}catch{}return e.cloneNode(!1)}async function lr(e,t){return A(e,HTMLCanvasElement)?sr(e):A(e,HTMLVideoElement)?nr(e,t):A(e,HTMLIFrameElement)?ir(e,t):e.cloneNode(Ze(e))}const or=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SLOT",Ze=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SVG";async function cr(e,t,r){var s,n;if(Ze(t))return t;let i=[];return or(e)&&e.assignedNodes?i=Z(e.assignedNodes()):A(e,HTMLIFrameElement)&&(!((s=e.contentDocument)===null||s===void 0)&&s.body)?i=Z(e.contentDocument.body.childNodes):i=Z(((n=e.shadowRoot)!==null&&n!==void 0?n:e).childNodes),i.length===0||A(e,HTMLVideoElement)||await i.reduce((l,c)=>l.then(()=>me(c,r)).then(d=>{d&&t.appendChild(d)}),Promise.resolve()),t}function dr(e,t,r){const s=t.style;if(!s)return;const n=window.getComputedStyle(e);n.cssText?(s.cssText=n.cssText,s.transformOrigin=n.transformOrigin):Xe(r).forEach(i=>{let l=n.getPropertyValue(i);i==="font-size"&&l.endsWith("px")&&(l=`${Math.floor(parseFloat(l.substring(0,l.length-2)))-.1}px`),A(e,HTMLIFrameElement)&&i==="display"&&l==="inline"&&(l="block"),i==="d"&&t.getAttribute("d")&&(l=`path(${t.getAttribute("d")})`),s.setProperty(i,l,n.getPropertyPriority(i))})}function ur(e,t){A(e,HTMLTextAreaElement)&&(t.innerHTML=e.value),A(e,HTMLInputElement)&&t.setAttribute("value",e.value)}function mr(e,t){if(A(e,HTMLSelectElement)){const r=t,s=Array.from(r.children).find(n=>e.value===n.getAttribute("value"));s&&s.setAttribute("selected","")}}function hr(e,t,r){return A(t,Element)&&(dr(e,t,r),Jt(e,t,r),ur(e,t),mr(e,t)),t}async function fr(e,t){const r=e.querySelectorAll?e.querySelectorAll("use"):[];if(r.length===0)return e;const s={};for(let i=0;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=>lr(s,t)).then(s=>cr(e,s,t)).then(s=>hr(e,s,t)).then(s=>fr(s,t))}const et=/url\((['"]?)([^'"]+?)\1\)/g,pr=/url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g,gr=/src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;function xr(e){const t=e.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1");return new RegExp(`(url\\(['"]?)(${t})(['"]?\\))`,"g")}function br(e){const t=[];return e.replace(et,(r,s,n)=>(t.push(n),r)),t.filter(r=>!xe(r))}async function yr(e,t,r,s,n){try{const i=r?Ht(t,r):t,l=ye(t);let c;return n||(c=await we(i,l,s)),e.replace(xr(t),`$1${c}$3`)}catch{}return e}function wr(e,{preferredFontFormat:t}){return t?e.replace(gr,r=>{for(;;){const[s,,n]=pr.exec(r)||[];if(!n)return"";if(n===t)return`src: ${s};`}}):e}function tt(e){return e.search(et)!==-1}async function rt(e,t,r){if(!tt(e))return e;const s=wr(e,r);return br(s).reduce((i,l)=>i.then(c=>yr(c,l,t,r)),Promise.resolve(s))}async function se(e,t,r){var s;const n=(s=t.style)===null||s===void 0?void 0:s.getPropertyValue(e);if(n){const i=await rt(n,null,r);return t.style.setProperty(e,i,t.style.getPropertyPriority(e)),!0}return!1}async function vr(e,t){await se("background",e,t)||await se("background-image",e,t),await se("mask",e,t)||await se("-webkit-mask",e,t)||await se("mask-image",e,t)||await se("-webkit-mask-image",e,t)}async function jr(e,t){const r=A(e,HTMLImageElement);if(!(r&&!xe(e.src))&&!(A(e,SVGImageElement)&&!xe(e.href.baseVal)))return;const s=r?e.src:e.href.baseVal,n=await we(s,ye(s),t);await new Promise((i,l)=>{e.onload=i,e.onerror=t.onImageErrorHandler?(...d)=>{try{i(t.onImageErrorHandler(...d))}catch(f){l(f)}}:l;const c=e;c.decode&&(c.decode=i),c.loading==="lazy"&&(c.loading="eager"),r?(e.srcset="",e.src=n):e.href.baseVal=n})}async function _r(e,t){const s=Z(e.childNodes).map(n=>at(n,t));await Promise.all(s).then(()=>e)}async function at(e,t){A(e,Element)&&(await vr(e,t),await jr(e,t),await _r(e,t))}function Sr(e,t){const{style:r}=e;t.backgroundColor&&(r.backgroundColor=t.backgroundColor),t.width&&(r.width=`${t.width}px`),t.height&&(r.height=`${t.height}px`);const s=t.style;return s!=null&&Object.keys(s).forEach(n=>{r[n]=s[n]}),e}const We={};async function Oe(e){let t=We[e];if(t!=null)return t;const s=await(await fetch(e)).text();return t={url:e,cssText:s},We[e]=t,t}async function Ue(e,t){let r=e.cssText;const s=/url\(["']?([^"')]+)["']?\)/g,i=(r.match(/url\([^)]+\)/g)||[]).map(async l=>{let c=l.replace(s,"$1");return c.startsWith("https://")||(c=new URL(c,e.url).href),Je(c,t.fetchRequestInit,({result:d})=>(r=r.replace(l,`url(${d})`),[l,d]))});return Promise.all(i).then(()=>r)}function qe(e){if(e==null)return[];const t=[],r=/(\/\*[\s\S]*?\*\/)/gi;let s=e.replace(r,"");const n=new RegExp("((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)})","gi");for(;;){const d=n.exec(s);if(d===null)break;t.push(d[0])}s=s.replace(n,"");const i=/@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi,l="((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})",c=new RegExp(l,"gi");for(;;){let d=i.exec(s);if(d===null){if(d=c.exec(s),d===null)break;i.lastIndex=c.lastIndex}else c.lastIndex=i.lastIndex;t.push(d[0])}return t}async function kr(e,t){const r=[],s=[];return e.forEach(n=>{if("cssRules"in n)try{Z(n.cssRules||[]).forEach((i,l)=>{if(i.type===CSSRule.IMPORT_RULE){let c=l+1;const d=i.href,f=Oe(d).then(x=>Ue(x,t)).then(x=>qe(x).forEach(u=>{try{n.insertRule(u,u.startsWith("@import")?c+=1:n.cssRules.length)}catch(h){console.error("Error inserting rule from remote css",{rule:u,error:h})}})).catch(x=>{console.error("Error loading remote css",x.toString())});s.push(f)}})}catch(i){const l=e.find(c=>c.href==null)||document.styleSheets[0];n.href!=null&&s.push(Oe(n.href).then(c=>Ue(c,t)).then(c=>qe(c).forEach(d=>{l.insertRule(d,l.cssRules.length)})).catch(c=>{console.error("Error loading remote stylesheet",c)})),console.error("Error inlining remote css file",i)}}),Promise.all(s).then(()=>(e.forEach(n=>{if("cssRules"in n)try{Z(n.cssRules||[]).forEach(i=>{r.push(i)})}catch(i){console.error(`Error while reading CSS rules from ${n.href}`,i)}}),r))}function Cr(e){return e.filter(t=>t.type===CSSRule.FONT_FACE_RULE).filter(t=>tt(t.style.getPropertyValue("src")))}async function Er(e,t){if(e.ownerDocument==null)throw new Error("Provided element is not within a Document");const r=Z(e.ownerDocument.styleSheets),s=await kr(r,t);return Cr(s)}function st(e){return e.trim().replace(/["']/g,"")}function Nr(e){const t=new Set;function r(s){(s.style.fontFamily||getComputedStyle(s).fontFamily).split(",").forEach(i=>{t.add(st(i))}),Array.from(s.children).forEach(i=>{i instanceof HTMLElement&&r(i)})}return r(e),t}async function Rr(e,t){const r=await Er(e,t),s=Nr(e);return(await Promise.all(r.filter(i=>s.has(st(i.style.fontFamily))).map(i=>{const l=i.parentStyleSheet?i.parentStyleSheet.href:null;return rt(i.cssText,l,t)}))).join(`
2
  `)}async function Pr(e,t){const r=t.fontEmbedCSS!=null?t.fontEmbedCSS:t.skipFonts?null:await Rr(e,t);if(r){const s=document.createElement("style"),n=document.createTextNode(r);s.appendChild(n),e.firstChild?e.insertBefore(s,e.firstChild):e.appendChild(s)}}async function $r(e,t={}){const{width:r,height:s}=Ye(e,t),n=await me(e,t,!0);return await Pr(n,t),await at(n,t),Sr(n,t),await Gt(n,r,s)}async function Mr(e,t={}){const{width:r,height:s}=Ye(e,t),n=await $r(e,t),i=await ue(n),l=document.createElement("canvas"),c=l.getContext("2d"),d=t.pixelRatio||Ut(),f=t.canvasWidth||r,x=t.canvasHeight||s;return l.width=f*d,l.height=x*d,t.skipAutoScale||qt(l),l.style.width=`${f}`,l.style.height=`${x}`,t.backgroundColor&&(c.fillStyle=t.backgroundColor,c.fillRect(0,0,l.width,l.height)),c.drawImage(i,0,0,l.width,l.height),l}async function Tr(e,t={}){const r=await Mr(e,t);return await zt(r)}const be="#ffffff";function Fr(){return typeof window>"u"?be:window.getComputedStyle(document.documentElement).getPropertyValue("--bg-elevated").trim()||be}function Lr(e){if(typeof window>"u")return be;const t=window.getComputedStyle(e).backgroundColor;return!t||t==="rgba(0, 0, 0, 0)"||t==="transparent"?Fr():t}async function Ir(e){var r,s;if(typeof window>"u"||!((s=(r=window.navigator)==null?void 0:r.clipboard)!=null&&s.write))throw new Error("Clipboard image copy is not supported in this browser.");if(typeof window.ClipboardItem>"u")throw new Error("Clipboard image copy is not supported in this browser.");const t=await Tr(e,{pixelRatio:2,cacheBust:!0,backgroundColor:Lr(e)});if(!t)throw new Error("Failed to render screenshot.");await window.navigator.clipboard.write([new window.ClipboardItem({"image/png":t})])}const nt=({targetRef:e,label:t})=>{const{toast:r}=ct(),[s,n]=F.useState("idle"),i=F.useRef(null);F.useEffect(()=>()=>{i.current!==null&&window.clearTimeout(i.current)},[]);const l=F.useCallback(async()=>{const d=e.current;if(d){n("copying"),d.classList.add("is-capturing"),d.offsetHeight,await new Promise(f=>window.requestAnimationFrame(()=>f()));try{await Ir(d),n("copied"),r({title:"Screenshot copied",description:`Image of the ${t} copied to your clipboard.`}),i.current!==null&&window.clearTimeout(i.current),i.current=window.setTimeout(()=>n("idle"),1500)}catch(f){n("idle"),r({title:"Copy failed",description:f instanceof Error&&f.message?f.message:"Could not copy the screenshot to your clipboard.",variant:"destructive"})}finally{d.classList.remove("is-capturing")}}},[e,t,r]),c=s==="copied"?"Copied":s==="copying"?"Copying…":"Copy image";return a.jsxs("button",{type:"button",className:"bm-copy-btn",onClick:l,disabled:s==="copying","aria-label":`Copy ${t} screenshot to clipboard`,title:`Copy ${t} screenshot to clipboard`,children:[a.jsx(xt,{name:"copy",size:11}),c]})};function Ar({model:e,datasetName:t,hideClosed:r,setHideClosed:s,setMetric:n}){const i=F.useRef(null),{isInitialFilteredViewLoading:l,chartPoints:c,activeMetric:d,allowedMetrics:f,orderedMetrics:x,parameterBound:u}=e;return l||c.length===0?null:a.jsxs("div",{className:"bm-card",ref:i,children:[a.jsxs("div",{className:"bm-card-screenshot-header","aria-hidden":"true",children:[a.jsxs("div",{className:"bm-card-screenshot-title",children:[a.jsx("span",{className:"bm-card-screenshot-eyebrow",children:"Benchmark"}),a.jsx("span",{className:"bm-card-screenshot-name",children:t})]}),a.jsxs("div",{className:"bm-card-screenshot-brand",children:[a.jsxs("span",{className:"brand",children:[a.jsx("span",{className:"brand-mark"}),a.jsxs("span",{className:"brand-name",children:["Papers ",a.jsx("em",{children:"With Code"})]})]}),a.jsx("span",{className:"bm-card-screenshot-url",children:"paperswithcode.co"})]})]}),a.jsxs("div",{className:"bm-card-head",children:[a.jsx("div",{className:"bm-card-title",children:"SOTA progression"}),a.jsxs("div",{className:"bm-card-actions",children:[f.length>1&&a.jsxs("label",{className:"bm-view-select",children:[a.jsx("span",{className:"bm-view-select-label",children:"View"}),a.jsx("select",{value:d,onChange:h=>n(h.target.value),children:x.map(h=>a.jsx("option",{value:h,children:h},h))})]}),a.jsxs("label",{className:"bm-closed-toggle",title:"Show or hide evaluations of closed-source models",children:[a.jsx(Ke,{className:"bm-closed-toggle-switch",checked:!r,onCheckedChange:h=>{s(!h)},"aria-label":"Show closed-source models"}),a.jsx("span",{className:"bm-closed-toggle-label",children:"Closed-source"})]}),a.jsx(nt,{targetRef:i,label:"SOTA chart"})]})]}),a.jsx("div",{className:"bm-chart-wrap",children:a.jsx(Dt,{points:c,metric:d})}),a.jsxs("div",{className:"bm-chart-foot",children:[a.jsx("span",{className:"legend-dot"}),u===void 0?"All models":"Filtered models"," over time · highlighted dots track the running best · hover for the model · click to open the paper"]})]})}function Br(e){if(!e)return null;const t=e.trim(),r=t.match(/^https?:\/\/(?:www\.)?arxiv\.org\/(?:abs|pdf)\/([^/?#]+)/i);if(r!=null&&r[1])return r[1].replace(/\.pdf$/i,"");const s=t.match(/^(?:https?:\/\/(?:www\.)?paperswithcode\.co)?\/paper\/([^/?#]+)/i);return(s==null?void 0:s[1])??null}function ze(e,t){return e?a.jsx(oe,{title:e}):t||"—"}const ia=()=>{var ve,je,_e,Se,ke,Ce,Ee,Ne,Re,Pe,$e;const{datasetSlug:e}=dt(),[t,r]=ut(),s=t.get("task")||void 0,n=t.get("eval")||void 0,i=St(t.get("max_parameters_exclusive")),{preferences:l,setHideClosedSourceEvals:c}=mt(),d=F.useRef(null),f=F.useRef(!1),x=F.useRef(null),[u,h]=F.useState(null),R=`${e}:${s||""}`,E=u===R,[L,S]=F.useState(1),g=te({queryKey:["dataset",e,"with-paper",s,l.hide_closed_source_evals?"open":"all"],queryFn:()=>re.getDatasetBySlug(e,{include_paper:!0,task:s,is_open:l.hide_closed_source_evals?!0:void 0}),enabled:!!e,staleTime:10*60*1e3}),k=te({queryKey:["dataset-evals",(ve=g.data)==null?void 0:ve.id],queryFn:()=>gt.byDataset(g.data.id),enabled:!!((je=g.data)!=null&&je.id),staleTime:5*60*1e3}),B=te({queryKey:["dataset-tasks",(_e=g.data)==null?void 0:_e.id],queryFn:()=>re.datasetTasks(g.data.id),enabled:!!((Se=g.data)!=null&&Se.id),staleTime:10*60*1e3}),j=te({queryKey:["metric-directions"],queryFn:()=>re.metricDirections(),staleTime:60*60*1e3}),D=Qe(B.data||[],k.data||[],s,n),W=te({queryKey:["task-benchmark-trends",D,l.hide_closed_source_evals?!0:void 0],queryFn:()=>re.trendingBenchmarks(D,{limit:100,min_recent_papers:0,is_open:l.hide_closed_source_evals?!0:void 0}),enabled:!!D&&!!((ke=g.data)!=null&&ke.id),staleTime:10*60*1e3}),w=F.useMemo(()=>{var b;return(((b=W.data)==null?void 0:b.results)||[]).find(M=>{var T;return M.id===((T=g.data)==null?void 0:T.id)})||null},[W.data,(Ce=g.data)==null?void 0:Ce.id]),q=te({queryKey:["leaderboard-metrics",(Ee=g.data)==null?void 0:Ee.id,D],queryFn:()=>re.leaderboardMetrics(g.data.id,D),enabled:!!((Ne=g.data)!=null&&Ne.id)&&!!D,staleTime:10*60*1e3}),I=Tt({evaluations:k.data||[],tasks:B.data||[],configuredMetrics:q.data||[],directions:j.data,initialSummary:(Re=g.data)==null?void 0:Re.leaderboard_summary,taskSlug:s,highlightEvalId:n,metric:t.get("metric")||void 0,hideClosed:l.hide_closed_source_evals,parameterBound:i,showMoreMetrics:E,fittingMetricCount:L,ready:{evaluations:k.isSuccess,tasks:B.isSuccess,directions:j.isSuccess,metrics:q.isSuccess}}),{primaryTask:N,hiddenClosedEvals:Q,hiddenClosedTopEval:z,isSummaryLoading:ee,displayedMetric:O,displayedSota:$,displayedSotaModel:U,isInitialFilteredViewLoading:K,highlightedEval:_,hasParameterMetadata:X,parameterCoverage:Y,orderedMetrics:o}=I;F.useEffect(()=>{if(f.current||!n||!k.data||k.data.length===0)return;const b=d.current;b&&(f.current=!0,b.scrollIntoView({behavior:"smooth",block:"start"}))},[n,k.data]);const m=te({queryKey:["area",N==null?void 0:N.area_id],queryFn:()=>re.getArea(N.area_id),enabled:!!(N!=null&&N.area_id),staleTime:10*60*1e3});if(g.isLoading)return a.jsxs("div",{className:"page",children:[a.jsx(ce,{className:"h-12 w-1/2 mb-6"}),a.jsx(ce,{className:"h-64 w-full"})]});if(g.error||!g.data)return a.jsx("div",{className:"page",children:a.jsx(bt,{variant:"destructive",children:a.jsx(yt,{children:"Benchmark not found."})})});const p=g.data,y=!!p.supports_harness,P=b=>{r(M=>{const T=new URLSearchParams(M);return b===void 0?T.delete("max_parameters_exclusive"):T.set("max_parameters_exclusive",String(b)),T})},C=b=>{r(M=>{const T=new URLSearchParams(M);return T.set("metric",b),T})},v=p.introducing_paper??void 0,H=(v==null?void 0:v.arxiv_id)||(v==null?void 0:v.id)||Br(p.paper_url),J=(v==null?void 0:v.title)||p.introducing_paper_title||null,G=((Pe=v==null?void 0:v.published)==null?void 0:Pe.slice(0,4))||p.introduced_year||null,it=!!H||!!p.paper_url||!!J,lt=v!=null&&v.arxiv_id||($e=p.paper_url)!=null&&$e.match(/^https?:\/\/(?:www\.)?arxiv\.org\//i)?`arXiv:${H}`:`Paper ${H}`;return a.jsx("div",{className:"page",children:a.jsxs("div",{className:"bm-page",children:[a.jsxs("div",{className:"breadcrumb",children:[a.jsx(ne,{to:"/tasks",children:"Tasks"}),m.data&&a.jsxs(a.Fragment,{children:[a.jsx("span",{className:"sep",children:"/"}),a.jsx(ne,{to:`/tasks#area-${jt(m.data.name)}`,children:m.data.name})]}),N&&a.jsxs(a.Fragment,{children:[a.jsx("span",{className:"sep",children:"/"}),a.jsx(ne,{to:`/tasks/${N.slug||N.id}`,children:N.name})]}),a.jsx("span",{className:"sep",children:"/"}),a.jsx("span",{style:{color:"var(--accent-text)"},children:p.name})]}),a.jsxs("div",{className:"bm-title-row",children:[a.jsx("h1",{className:"bm-title",children:p.name}),w&&a.jsxs("div",{className:"bm-title-trend","aria-label":`${p.name} reporting trend`,children:[a.jsx(wt,{history:w.history,benchmarkName:w.name}),a.jsxs("span",{className:"bm-title-trend-summary",children:[a.jsx("strong",{children:w.recent_paper_count})," ",w.recent_paper_count===1?"paper":"papers",w.rate_change==null?w.recent_paper_count>0&&a.jsx("span",{className:"benchmark-trend-change is-new",children:"new"}):a.jsxs("span",{className:`benchmark-trend-change ${w.rate_change>=1?"is-up":"is-down"}`,children:[w.rate_change>=1?"↑":"↓"," ",w.rate_change.toFixed(1),"×"]})]})]})]}),a.jsx(ht,{kind:"benchmark",entityId:p.id}),a.jsxs("div",{className:"bm-subtitle",children:[ee?a.jsx(ce,{className:"h-5 w-64 bm-summary-skeleton","aria-label":"Loading benchmark summary"}):a.jsxs("span",{children:[O&&a.jsxs(a.Fragment,{children:[a.jsx("span",{className:"metric-tag",children:O}),a.jsx("span",{style:{color:"var(--hairline-strong)",margin:"0 8px"},children:"·"})]}),U?a.jsxs("span",{children:["Best: ",a.jsx("span",{className:"best-name",children:le($)})," by ",a.jsx("span",{className:"best-name",style:{fontStyle:"normal"},children:U})]}):a.jsxs("span",{children:[I.rows.length," evaluations"]})]}),p.hf_url&&a.jsxs("a",{className:"bm-action-btn",href:p.hf_url,target:"_blank",rel:"noopener noreferrer",children:[a.jsx("span",{"aria-hidden":"true",children:"🤗"})," View on Hugging Face"]})]}),p.description&&a.jsx("p",{className:"bm-description",children:p.description}),l.hide_closed_source_evals&&Q.length>0&&a.jsxs("div",{className:"bm-hidden-closed-notice",children:[a.jsxs("span",{children:[Q.length," closed-source ",Q.length===1?"row is":"rows are"," hidden",z!=null&&z.model_name?a.jsxs(a.Fragment,{children:[", including ",a.jsx("strong",{children:z.model_name})]}):null,"."]}),a.jsx("button",{type:"button",className:"bm-hidden-closed-action",onClick:()=>{c(!1)},children:"Show closed-source"})]}),it&&a.jsxs("div",{className:"method-source",style:{marginTop:0,marginBottom:18},children:[a.jsx("span",{className:"method-source-label",children:"Source"}),H?a.jsxs(ne,{to:`/paper/${H}`,target:"_blank",rel:"noopener noreferrer",className:"method-source-link",children:[a.jsx("span",{className:"method-source-title",children:J?a.jsx(oe,{title:J}):lt}),G&&a.jsx("span",{className:"method-source-meta",children:G})]}):p.paper_url?a.jsxs("a",{href:vt(p.paper_url)??void 0,target:"_blank",rel:"noopener noreferrer",className:"method-source-link",children:[a.jsx("span",{className:"method-source-title",children:J?a.jsx(oe,{title:J}):p.paper_url}),G&&a.jsx("span",{className:"method-source-meta",children:G})]}):a.jsxs("div",{className:"method-source-link is-static",children:[a.jsx("span",{className:"method-source-title",children:J?a.jsx(oe,{title:J}):null}),G&&a.jsx("span",{className:"method-source-meta",children:G})]})]}),a.jsx(Ar,{model:I,datasetName:p.name,hideClosed:l.hide_closed_source_evals,setHideClosed:c,setMetric:C}),_&&(()=>{var Te,Fe;const b=_.paper_arxiv_id||_.paper_id,M=_.paper_title||(_.paper_arxiv_id?`arXiv:${_.paper_arxiv_id}`:null),T=_.best_metric&&((Te=_.metrics)==null?void 0:Te[_.best_metric])!==void 0?_.best_metric:I.activeMetric,Me=(Fe=_.metrics)==null?void 0:Fe[T];return a.jsxs("div",{className:"bm-highlight-banner",role:"status",children:[a.jsx("span",{className:"bm-highlight-dot","aria-hidden":"true"}),a.jsxs("div",{className:"bm-highlight-text",children:[a.jsx("span",{className:"bm-highlight-label",children:"Comparing result"}),a.jsxs("span",{className:"bm-highlight-paper",children:[_.model_name||M||"—",_.harness?` · ${_.harness}`:""]}),a.jsxs("span",{className:"bm-highlight-meta",children:[Me!==void 0&&T?a.jsxs(a.Fragment,{children:[T,": ",le(Me),M?" · ":""]}):null,b?a.jsx(ne,{to:`/paper/${b}`,children:ze(_.paper_title,M)}):ze(_.paper_title,M)]})]})]})})(),a.jsxs("div",{className:"bm-card",ref:x,children:[a.jsxs("div",{className:"bm-card-screenshot-header","aria-hidden":"true",children:[a.jsxs("div",{className:"bm-card-screenshot-title",children:[a.jsx("span",{className:"bm-card-screenshot-eyebrow",children:"Benchmark"}),a.jsx("span",{className:"bm-card-screenshot-name",children:p.name})]}),a.jsxs("div",{className:"bm-card-screenshot-brand",children:[a.jsxs("span",{className:"brand",children:[a.jsx("span",{className:"brand-mark"}),a.jsxs("span",{className:"brand-name",children:["Papers ",a.jsx("em",{children:"With Code"})]})]}),a.jsx("span",{className:"bm-card-screenshot-url",children:"paperswithcode.co"})]})]}),a.jsxs("div",{className:"bm-card-head",children:[a.jsx("div",{className:"bm-card-title",children:"Leaderboard"}),a.jsxs("div",{className:"bm-card-actions",children:[I.allowedMetrics.length>1&&a.jsxs("label",{className:"bm-view-select",children:[a.jsx("span",{className:"bm-view-select-label",children:"View"}),a.jsx("select",{value:I.activeMetric,onChange:b=>C(b.target.value),children:o.map(b=>a.jsx("option",{value:b,children:b},b))})]}),a.jsxs("label",{className:"bm-closed-toggle",title:"Show or hide evaluations of closed-source models",children:[a.jsx(Ke,{className:"bm-closed-toggle-switch",checked:!l.hide_closed_source_evals,onCheckedChange:b=>{c(!b)},"aria-label":"Show closed-source models"}),a.jsx("span",{className:"bm-closed-toggle-label",children:"Closed-source"})]}),!K&&!X&&k.isSuccess?a.jsx("span",{className:"bm-parameter-unavailable",children:"Parameter metadata unavailable"}):null,a.jsx(nt,{targetRef:x,label:"leaderboard"})]})]}),!K&&X&&a.jsxs("div",{className:"bm-parameter-filter-bar",children:[a.jsx("span",{className:"bm-parameter-filter-label",children:"Parameters Size"}),a.jsx("div",{className:"bm-parameter-filter-options",role:"group","aria-label":"Filter leaderboard by parameter size",children:I.parameterFilters.map(b=>{const{selected:M,disabled:T}=b;return a.jsx("button",{type:"button",className:`bm-parameter-filter-option${M?" is-active":""}`,"aria-pressed":M,disabled:T,onClick:()=>P(b.maxParametersExclusive),children:b.label},b.label)})}),a.jsxs("span",{className:"bm-parameter-coverage",children:["Parameters known for ",Y.parameter_coverage_known," of ",Y.parameter_coverage_total," entries"]})]}),k.isLoading||K?a.jsx("div",{style:{padding:16},children:Array.from({length:5}).map((b,M)=>a.jsx(ce,{className:"h-10 w-full mb-2"},M))}):I.rows.length===0?i?a.jsxs("div",{className:"no-results",children:["No known parameter counts match this filter. "," ",a.jsx("button",{type:"button",className:"bm-empty-filter-action",onClick:()=>P(void 0),children:"Show all"})]}):a.jsx("div",{className:"no-results",children:"No evaluations submitted yet."}):a.jsxs(a.Fragment,{children:[o.length>L&&a.jsxs("div",{className:"bm-metric-columns-control",children:[a.jsx("button",{type:"button",className:"bm-metric-columns-toggle","aria-expanded":E,"aria-controls":"benchmark-leaderboard",onClick:()=>h(E?null:R),children:E?"Show fewer metrics":`Show more metrics (${o.length-L})`}),E&&a.jsx("span",{children:"Scroll metrics horizontally; model and paper details stay visible."})]}),a.jsx(At,{model:I,showHarness:y,setMetric:C,highlightRowRef:d,onFittingMetricCountChange:S})]})]})]})})};export{ia as default};
assets/{BenchmarkTrendSparkline-zOCrwYee.js → BenchmarkTrendSparkline-qRluvC2o.js} RENAMED
@@ -1 +1 @@
1
- import{r as C,j as t}from"./index-CcJ6cWma.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-B9MfhMLC.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/{ChatView-D05FqzNN.js → ChatView-DIICJpRR.js} RENAMED
@@ -1,4 +1,4 @@
1
- var yr=Object.defineProperty;var _r=(t,e,r)=>e in t?yr(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var X=(t,e,r)=>_r(t,typeof e!="symbol"?e+"":e,r);import{g as br,r as u,A as zt,W as wr,j as i,X as vr,h as Gt,F as ot,a as Qt,u as Sr,b as xr,d as Rr,m as Er,Y as Tr,L as Nt,f as kr}from"./index-CcJ6cWma.js";import{u as Ke}from"./useQuery-D3-GqcPN.js";import{C as Cr,U as Mt,b as Ir,d as Ve,c as Ar,e as Or,A as jr,a as Dr}from"./ArtifactWorkspace-DjmVwPtv.js";import{c as Fe}from"./chat-CmC2kF8c.js";import{e as Nr,f as Jt,h as Mr,T as Lr,d as Xt,i as Fr,j as qr,k as Pr,l as $e,m as Yr,t as Lt,n as mt,o as Zt,r as Br,s as Wr,S as Hr,a as Ur,D as ct,v as Kr,w as tt,x as Xe,y as Vr,z as $r,B as Ze,E as et,F as zr,G as Gr,H as Qr,I as lt,J as Jr}from"./chatLaunch-BWQHjZ_V.js";import{S as Xr}from"./chatPrompts-DypmWIqx.js";import{u as Zr,O as es}from"./openrouter-DgpeaTae.js";import{q as er}from"./queryOptions-C9woPjwX.js";/* empty css */import"./hover-card-Bj7-02L3.js";import"./github-CloBLbHx.js";import"./github-B2H6YANV.js";import"./catalog-B7hp4mKD.js";import"./PaperPreviewLink-o7boC8db.js";import"./index-VElAzfws.js";import"./index-CVaIZy6l.js";import"./katex-DkKDou_j.js";import"./paperQueryKeys-BP2E-0yf.js";import"./papers-CClaKvmL.js";import"./useMutation-DPe9yGc6.js";import"./copy-C-Vd1dCk.js";import"./file-text-tKMRCnZb.js";import"./external-link-BuxK9KNv.js";import"./chevron-down-DJZrO8F3.js";/**
2
  * @license lucide-react v0.462.0 - ISC
3
  *
4
  * This source code is licensed under the ISC license.
 
1
+ var yr=Object.defineProperty;var _r=(t,e,r)=>e in t?yr(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var X=(t,e,r)=>_r(t,typeof e!="symbol"?e+"":e,r);import{g as br,r as u,A as zt,W as wr,j as i,X as vr,h as Gt,F as ot,a as Qt,u as Sr,b as xr,d as Rr,m as Er,Y as Tr,L as Nt,f as kr}from"./index-B9MfhMLC.js";import{u as Ke}from"./useQuery-Bx81pmgm.js";import{C as Cr,U as Mt,b as Ir,d as Ve,c as Ar,e as Or,A as jr,a as Dr}from"./ArtifactWorkspace-CJ1HK4Ql.js";import{c as Fe}from"./chat-BZn2Yz-P.js";import{e as Nr,f as Jt,h as Mr,T as Lr,d as Xt,i as Fr,j as qr,k as Pr,l as $e,m as Yr,t as Lt,n as mt,o as Zt,r as Br,s as Wr,S as Hr,a as Ur,D as ct,v as Kr,w as tt,x as Xe,y as Vr,z as $r,B as Ze,E as et,F as zr,G as Gr,H as Qr,I as lt,J as Jr}from"./chatLaunch-CsBovBmE.js";import{S as Xr}from"./chatPrompts-DypmWIqx.js";import{u as Zr,O as es}from"./openrouter-Ixy41X1P.js";import{q as er}from"./queryOptions-C9woPjwX.js";/* empty css */import"./hover-card-Bv4bJws5.js";import"./github-CE1K0ZU_.js";import"./github-D0bNa_Wx.js";import"./catalog-BqDz3O_s.js";import"./PaperPreviewLink-B3LP-qo2.js";import"./index-10yxmORR.js";import"./index-CSRWQTrf.js";import"./katex-DkKDou_j.js";import"./paperQueryKeys-BP2E-0yf.js";import"./papers-BGvqL27Z.js";import"./useMutation-C2athD5k.js";import"./copy-407Yr7lh.js";import"./file-text-B14SZiZO.js";import"./external-link-tLC4XD6r.js";import"./chevron-down-hgezkIWy.js";/**
2
  * @license lucide-react v0.462.0 - ISC
3
  *
4
  * This source code is licensed under the ISC license.
assets/{ConferenceDetailView-BQNsWdTQ.js → ConferenceDetailView-CFkr6WaN.js} RENAMED
@@ -1 +1 @@
1
- import{u as L,r as D,j as e,L as p}from"./index-CcJ6cWma.js";import{u as T}from"./useQuery-D3-GqcPN.js";import{M as F}from"./MarkdownText-Day0Kgef.js";import{c as A}from"./catalog-B7hp4mKD.js";import{c as B,h as C,d as E}from"./colors-DCzRcDI4.js";import{S as f}from"./skeleton-B-mlrgWO.js";import{A as P,a as z}from"./alert-CMODHIPT.js";import{s as M}from"./safeExternalHref-CkBrsh84.js";/* empty css */import"./PaperPreviewLink-o7boC8db.js";import"./index-VElAzfws.js";import"./index-CVaIZy6l.js";import"./katex-DkKDou_j.js";import"./hover-card-Bj7-02L3.js";import"./paperQueryKeys-BP2E-0yf.js";import"./papers-CClaKvmL.js";import"./useMutation-DPe9yGc6.js";const R=a=>(a==null?void 0:a.trim().toLowerCase().replace(/[\s_]+/g,"-"))??"",O=(a,t)=>{if(!a)return null;const i=new Date(`${a}T00:00:00`),s=t?new Date(`${t}T00:00:00`):null,c=g=>g.toLocaleDateString("en-US",{month:"long",day:"numeric"}),m=i.getFullYear();return s&&s.getTime()!==i.getTime()?i.getMonth()===s.getMonth()?`${c(i).replace(/\d+$/,"").trim()} ${i.getDate()}–${s.getDate()}, ${m}`:`${c(i)} – ${c(s)}, ${m}`:`${c(i)}, ${m}`},re=()=>{var k,S,b,_,$,w;const{confSlug:a}=L(),t=T({queryKey:["conference-areas-with-tasks",a],queryFn:()=>A.conferenceAreasWithTasks(a),enabled:!!a,staleTime:10*60*1e3}),i=D.useMemo(()=>{if(!t.data)return[];const n={general:0,vision:1,video:2,language:3,audio:4,other:5},r=o=>n[R(o)]??999;return[...t.data.results].sort((o,l)=>{const d=r(o.name),x=r(l.name);return d!==x?d-x:o.name.localeCompare(l.name)})},[t.data]),s=(k=t.data)==null?void 0:k.conference,c=((S=t.data)==null?void 0:S.total_paper_count)??0,m=((b=t.data)==null?void 0:b.oral_paper_count)??0,g=((_=t.data)==null?void 0:_.spotlight_paper_count)??0,u=(($=t.data)==null?void 0:$.outstanding_paper_count)??0,j=((w=t.data)==null?void 0:w.best_paper_finalist_paper_count)??0,v=i.reduce((n,r)=>n+r.tasks.length,0);if(t.error)return e.jsx("div",{className:"page",children:e.jsx(P,{variant:"destructive",children:e.jsx(z,{children:"Failed to load conference. Please try again."})})});const y=s?O(s.start_date,s.end_date):null,N=s?[s.venue,s.location].filter(Boolean).join(", "):null,h=s==null?void 0:s.name;return e.jsxs("div",{className:"page",children:[e.jsxs("div",{className:s!=null&&s.image_url?"task-hero-grid":void 0,children:[e.jsxs("div",{children:[e.jsx("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--accent-text)",letterSpacing:"0.1em",marginBottom:8},children:"CONFERENCE"}),e.jsx("h1",{className:"feed-title",children:h??e.jsx(f,{className:"h-10 w-64 inline-block"})}),e.jsxs("div",{className:"feed-subtitle",style:{display:"flex",flexDirection:"column",gap:4},children:[y&&e.jsx("span",{children:y}),N&&e.jsx("span",{children:N}),(s==null?void 0:s.url)&&e.jsx("a",{href:M(s.url)??void 0,target:"_blank",rel:"noopener noreferrer",style:{color:"var(--accent-text)"},children:s.url.replace(/^https?:\/\//,"")}),(s==null?void 0:s.hf_url)&&e.jsxs("a",{className:"bm-action-btn",href:s.hf_url,target:"_blank",rel:"noopener noreferrer",style:{alignSelf:"flex-start",marginTop:4},children:[e.jsx("span",{"aria-hidden":"true",children:"🤗"})," View on Hugging Face"]})]}),(s==null?void 0:s.description)&&e.jsx(F,{className:"method-description",text:s.description})]}),(s==null?void 0:s.image_url)&&e.jsxs("figure",{className:"task-figure-card",children:[e.jsx("div",{className:"task-figure-img-wrap",children:e.jsx("img",{className:"task-figure-img",src:s.image_url,alt:h?`${h} visual`:"Conference visual",onError:n=>{var r,o;(o=(r=n.currentTarget.parentElement)==null?void 0:r.parentElement)==null||o.style.setProperty("display","none")}})}),e.jsxs("figcaption",{children:["Figure · ",h??"Conference",s.image_credit&&e.jsxs(e.Fragment,{children:[e.jsx("br",{}),e.jsx(F,{className:"task-image-credit",text:s.image_credit})]})]})]})]}),!t.isLoading&&c>0&&e.jsxs("section",{style:{marginTop:48,marginBottom:48},children:[e.jsxs("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:24,paddingBottom:12,borderBottom:"1px solid var(--hairline-strong)"},children:[e.jsxs("div",{children:[e.jsx("h2",{style:{fontFamily:"var(--serif)",fontSize:26,fontWeight:500,letterSpacing:"-0.02em",marginBottom:4},children:"Browse papers"}),e.jsx("div",{style:{fontFamily:"var(--serif)",fontStyle:"italic",fontSize:13,color:"var(--ink-soft)"},children:"All accepted papers, plus oral, spotlight, outstanding, and best paper finalists."})]}),e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",whiteSpace:"nowrap"},children:[c.toLocaleString()," papers"]})]}),e.jsxs("div",{className:"tag-grid",children:[e.jsxs(p,{to:`/conferences/${a}/all`,className:"tag-cell",children:[e.jsxs("div",{className:"name",children:[e.jsx("span",{className:"dot",style:{background:"var(--accent)"}}),"All papers"]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[c.toLocaleString()," papers"]})})]}),m>0&&e.jsxs(p,{to:`/conferences/${a}/oral`,className:"tag-cell",children:[e.jsxs("div",{className:"name",children:[e.jsx("span",{className:"dot",style:{background:"#fdbb02"}}),"Oral papers"]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[m.toLocaleString()," papers"]})})]}),g>0&&e.jsxs(p,{to:`/conferences/${a}/spotlight`,className:"tag-cell",children:[e.jsxs("div",{className:"name",children:[e.jsx("span",{className:"dot",style:{background:"#fdbb02"}}),"Spotlight papers"]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[g.toLocaleString()," papers"]})})]}),u>0&&e.jsxs(p,{to:`/conferences/${a}/outstanding`,className:"tag-cell",children:[e.jsxs("div",{className:"name",children:[e.jsx("span",{className:"dot",style:{background:"#c45c26"}}),"Outstanding papers"]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[u.toLocaleString()," papers"]})})]}),j>0&&e.jsxs(p,{to:`/conferences/${a}/best-paper-finalists`,className:"tag-cell",children:[e.jsxs("div",{className:"name",children:[e.jsx("span",{className:"dot",style:{background:"#c9a227"}}),"Best paper finalists"]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[j.toLocaleString()," papers"]})})]})]})]}),t.isLoading?e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:32},children:Array.from({length:4}).map((n,r)=>e.jsxs("div",{children:[e.jsx(f,{className:"h-8 w-1/3 mb-4"}),e.jsx("div",{className:"tag-grid",children:Array.from({length:6}).map((o,l)=>e.jsx(f,{className:"h-24"},l))})]},r))}):i.map(n=>{const r=n.tasks;if(r.length===0)return null;const o=r.reduce((l,d)=>l+(d.paper_count||0),0);return e.jsxs("section",{style:{marginBottom:48},children:[e.jsxs("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:24,paddingBottom:12,borderBottom:"1px solid var(--hairline-strong)"},children:[e.jsxs("div",{children:[e.jsx("h2",{style:{fontFamily:"var(--serif)",fontSize:26,fontWeight:500,letterSpacing:"-0.02em",marginBottom:4},children:n.name}),n.description&&e.jsx("div",{style:{fontFamily:"var(--serif)",fontStyle:"italic",fontSize:13,color:"var(--ink-soft)"},children:n.description})]}),e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",whiteSpace:"nowrap"},children:[r.length," ",r.length===1?"task":"tasks"," · ",o.toLocaleString()," papers"]})]}),e.jsx("div",{className:"tag-grid",children:r.map(l=>{const d=l.slug||"",x=B(C(d));return e.jsxs(p,{to:`/conferences/${a}/${d}`,className:"tag-cell",children:[e.jsxs("div",{className:"name",children:[e.jsx("span",{className:"dot",style:{background:x.dot}}),E(l.name,d)]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[(l.paper_count??0).toLocaleString()," papers"]})})]},l.id)})})]},n.id)}),v>0&&e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",marginTop:24},children:[v," tasks across ",i.filter(n=>n.tasks.length>0).length," areas."]})]})};export{re as default};
 
1
+ import{u as L,r as D,j as e,L as p}from"./index-B9MfhMLC.js";import{u as T}from"./useQuery-Bx81pmgm.js";import{M as F}from"./MarkdownText-BAxpQ8kL.js";import{c as A}from"./catalog-BqDz3O_s.js";import{c as B,h as C,d as E}from"./colors-BCIVIuvj.js";import{S as f}from"./skeleton-BcfKeAOl.js";import{A as P,a as z}from"./alert-Bg2LnrDJ.js";import{s as M}from"./safeExternalHref-CkBrsh84.js";/* empty css */import"./PaperPreviewLink-B3LP-qo2.js";import"./index-10yxmORR.js";import"./index-CSRWQTrf.js";import"./katex-DkKDou_j.js";import"./hover-card-Bv4bJws5.js";import"./paperQueryKeys-BP2E-0yf.js";import"./papers-BGvqL27Z.js";import"./useMutation-C2athD5k.js";const R=a=>(a==null?void 0:a.trim().toLowerCase().replace(/[\s_]+/g,"-"))??"",O=(a,t)=>{if(!a)return null;const i=new Date(`${a}T00:00:00`),s=t?new Date(`${t}T00:00:00`):null,c=g=>g.toLocaleDateString("en-US",{month:"long",day:"numeric"}),m=i.getFullYear();return s&&s.getTime()!==i.getTime()?i.getMonth()===s.getMonth()?`${c(i).replace(/\d+$/,"").trim()} ${i.getDate()}–${s.getDate()}, ${m}`:`${c(i)} – ${c(s)}, ${m}`:`${c(i)}, ${m}`},re=()=>{var k,S,b,_,$,w;const{confSlug:a}=L(),t=T({queryKey:["conference-areas-with-tasks",a],queryFn:()=>A.conferenceAreasWithTasks(a),enabled:!!a,staleTime:10*60*1e3}),i=D.useMemo(()=>{if(!t.data)return[];const n={general:0,vision:1,video:2,language:3,audio:4,other:5},r=o=>n[R(o)]??999;return[...t.data.results].sort((o,l)=>{const d=r(o.name),x=r(l.name);return d!==x?d-x:o.name.localeCompare(l.name)})},[t.data]),s=(k=t.data)==null?void 0:k.conference,c=((S=t.data)==null?void 0:S.total_paper_count)??0,m=((b=t.data)==null?void 0:b.oral_paper_count)??0,g=((_=t.data)==null?void 0:_.spotlight_paper_count)??0,u=(($=t.data)==null?void 0:$.outstanding_paper_count)??0,j=((w=t.data)==null?void 0:w.best_paper_finalist_paper_count)??0,v=i.reduce((n,r)=>n+r.tasks.length,0);if(t.error)return e.jsx("div",{className:"page",children:e.jsx(P,{variant:"destructive",children:e.jsx(z,{children:"Failed to load conference. Please try again."})})});const y=s?O(s.start_date,s.end_date):null,N=s?[s.venue,s.location].filter(Boolean).join(", "):null,h=s==null?void 0:s.name;return e.jsxs("div",{className:"page",children:[e.jsxs("div",{className:s!=null&&s.image_url?"task-hero-grid":void 0,children:[e.jsxs("div",{children:[e.jsx("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--accent-text)",letterSpacing:"0.1em",marginBottom:8},children:"CONFERENCE"}),e.jsx("h1",{className:"feed-title",children:h??e.jsx(f,{className:"h-10 w-64 inline-block"})}),e.jsxs("div",{className:"feed-subtitle",style:{display:"flex",flexDirection:"column",gap:4},children:[y&&e.jsx("span",{children:y}),N&&e.jsx("span",{children:N}),(s==null?void 0:s.url)&&e.jsx("a",{href:M(s.url)??void 0,target:"_blank",rel:"noopener noreferrer",style:{color:"var(--accent-text)"},children:s.url.replace(/^https?:\/\//,"")}),(s==null?void 0:s.hf_url)&&e.jsxs("a",{className:"bm-action-btn",href:s.hf_url,target:"_blank",rel:"noopener noreferrer",style:{alignSelf:"flex-start",marginTop:4},children:[e.jsx("span",{"aria-hidden":"true",children:"🤗"})," View on Hugging Face"]})]}),(s==null?void 0:s.description)&&e.jsx(F,{className:"method-description",text:s.description})]}),(s==null?void 0:s.image_url)&&e.jsxs("figure",{className:"task-figure-card",children:[e.jsx("div",{className:"task-figure-img-wrap",children:e.jsx("img",{className:"task-figure-img",src:s.image_url,alt:h?`${h} visual`:"Conference visual",onError:n=>{var r,o;(o=(r=n.currentTarget.parentElement)==null?void 0:r.parentElement)==null||o.style.setProperty("display","none")}})}),e.jsxs("figcaption",{children:["Figure · ",h??"Conference",s.image_credit&&e.jsxs(e.Fragment,{children:[e.jsx("br",{}),e.jsx(F,{className:"task-image-credit",text:s.image_credit})]})]})]})]}),!t.isLoading&&c>0&&e.jsxs("section",{style:{marginTop:48,marginBottom:48},children:[e.jsxs("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:24,paddingBottom:12,borderBottom:"1px solid var(--hairline-strong)"},children:[e.jsxs("div",{children:[e.jsx("h2",{style:{fontFamily:"var(--serif)",fontSize:26,fontWeight:500,letterSpacing:"-0.02em",marginBottom:4},children:"Browse papers"}),e.jsx("div",{style:{fontFamily:"var(--serif)",fontStyle:"italic",fontSize:13,color:"var(--ink-soft)"},children:"All accepted papers, plus oral, spotlight, outstanding, and best paper finalists."})]}),e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",whiteSpace:"nowrap"},children:[c.toLocaleString()," papers"]})]}),e.jsxs("div",{className:"tag-grid",children:[e.jsxs(p,{to:`/conferences/${a}/all`,className:"tag-cell",children:[e.jsxs("div",{className:"name",children:[e.jsx("span",{className:"dot",style:{background:"var(--accent)"}}),"All papers"]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[c.toLocaleString()," papers"]})})]}),m>0&&e.jsxs(p,{to:`/conferences/${a}/oral`,className:"tag-cell",children:[e.jsxs("div",{className:"name",children:[e.jsx("span",{className:"dot",style:{background:"#fdbb02"}}),"Oral papers"]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[m.toLocaleString()," papers"]})})]}),g>0&&e.jsxs(p,{to:`/conferences/${a}/spotlight`,className:"tag-cell",children:[e.jsxs("div",{className:"name",children:[e.jsx("span",{className:"dot",style:{background:"#fdbb02"}}),"Spotlight papers"]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[g.toLocaleString()," papers"]})})]}),u>0&&e.jsxs(p,{to:`/conferences/${a}/outstanding`,className:"tag-cell",children:[e.jsxs("div",{className:"name",children:[e.jsx("span",{className:"dot",style:{background:"#c45c26"}}),"Outstanding papers"]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[u.toLocaleString()," papers"]})})]}),j>0&&e.jsxs(p,{to:`/conferences/${a}/best-paper-finalists`,className:"tag-cell",children:[e.jsxs("div",{className:"name",children:[e.jsx("span",{className:"dot",style:{background:"#c9a227"}}),"Best paper finalists"]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[j.toLocaleString()," papers"]})})]})]})]}),t.isLoading?e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:32},children:Array.from({length:4}).map((n,r)=>e.jsxs("div",{children:[e.jsx(f,{className:"h-8 w-1/3 mb-4"}),e.jsx("div",{className:"tag-grid",children:Array.from({length:6}).map((o,l)=>e.jsx(f,{className:"h-24"},l))})]},r))}):i.map(n=>{const r=n.tasks;if(r.length===0)return null;const o=r.reduce((l,d)=>l+(d.paper_count||0),0);return e.jsxs("section",{style:{marginBottom:48},children:[e.jsxs("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:24,paddingBottom:12,borderBottom:"1px solid var(--hairline-strong)"},children:[e.jsxs("div",{children:[e.jsx("h2",{style:{fontFamily:"var(--serif)",fontSize:26,fontWeight:500,letterSpacing:"-0.02em",marginBottom:4},children:n.name}),n.description&&e.jsx("div",{style:{fontFamily:"var(--serif)",fontStyle:"italic",fontSize:13,color:"var(--ink-soft)"},children:n.description})]}),e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",whiteSpace:"nowrap"},children:[r.length," ",r.length===1?"task":"tasks"," · ",o.toLocaleString()," papers"]})]}),e.jsx("div",{className:"tag-grid",children:r.map(l=>{const d=l.slug||"",x=B(C(d));return e.jsxs(p,{to:`/conferences/${a}/${d}`,className:"tag-cell",children:[e.jsxs("div",{className:"name",children:[e.jsx("span",{className:"dot",style:{background:x.dot}}),E(l.name,d)]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[(l.paper_count??0).toLocaleString()," papers"]})})]},l.id)})})]},n.id)}),v>0&&e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",marginTop:24},children:[v," tasks across ",i.filter(n=>n.tasks.length>0).length," areas."]})]})};export{re as default};
assets/{ConferenceTaskView-1cQq839a.js → ConferenceTaskView-DgjhR-nI.js} RENAMED
@@ -1 +1 @@
1
- import{u as $,d as W,r as P,j as e,L as y,F as G}from"./index-CcJ6cWma.js";import{u as M}from"./useQuery-D3-GqcPN.js";import{P as J}from"./components-Bax1_3qI.js";import{P as X}from"./PaperFeedFilters-DejcdS4D.js";import{a as Y,P as Z,b as ee}from"./PaperDateFilter-_7LVshRy.js";import{M as h}from"./MarkdownText-Day0Kgef.js";import{c as z}from"./catalog-B7hp4mKD.js";import{t as se,d as ae}from"./colors-DCzRcDI4.js";import{d as te}from"./usePapers-TCIcWoUA.js";import{u as re}from"./useIntersectionObserver-DtY8SYYt.js";import{S as ne}from"./skeleton-B-mlrgWO.js";import{A as ie,a as oe}from"./alert-CMODHIPT.js";import"./paperQueryKeys-BP2E-0yf.js";import"./LatexTitle-hDpJaCcC.js";import"./papers-CClaKvmL.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-CRugk4PC.js";/* empty css */import"./PaperPreviewLink-o7boC8db.js";import"./index-VElAzfws.js";import"./index-CVaIZy6l.js";import"./katex-DkKDou_j.js";import"./hover-card-Bj7-02L3.js";import"./useMutation-DPe9yGc6.js";import"./useInfiniteQuery-CFy22PuG.js";const ce=[["trending","trending"],["date_published","newest"],["citation_count","most cited"]],le=t=>t==="trending"||t==="date_published"||t==="citation_count"?t:"trending",Be=()=>{var A,L,O,T,B,D;const{confSlug:t,taskSlug:n}=$(),[o,u]=W(),w=le(o.get("order_by")),S=o.get("has_code")==="true",k=o.get("has_hf_artifacts")==="true",f=Y(o),I=a=>{const s=new URLSearchParams(o);s.set("order_by",a),u(s)},q=a=>{const s=new URLSearchParams(o);a?s.set("has_code","true"):s.delete("has_code"),u(s)},Q=a=>{const s=new URLSearchParams(o);a?s.set("has_hf_artifacts","true"):s.delete("has_hf_artifacts"),u(s)},R=n==="all",N=n==="oral",_=n==="spotlight",l=n==="outstanding",d=n==="best-paper-finalists",x=l||d,p=R||N||_||l||d,K=p?void 0:n,U=N?"oral":_?"spotlight":l?"outstanding":d?"best_paper_finalist":void 0,m=M({queryKey:["conference",t],queryFn:()=>z.getConference(t),enabled:!!t,staleTime:10*60*1e3}),j=M({queryKey:["task",n],queryFn:()=>z.getTask(n),enabled:!!n&&!p,staleTime:10*60*1e3}),i=te({conferenceSlug:t||"",taskSlug:K,presentation:U,page_size:12,order_by:w,order_dir:"desc",include_resources:!0,has_code:S,has_hf_artifacts:k,start_date:f.startDate,end_date:f.endDate,enabled:!!t}),{targetRef:V,isIntersecting:C}=re({rootMargin:"200px"});P.useEffect(()=>{C&&i.hasNextPage&&!i.isFetchingNextPage&&i.fetchNextPage()},[C,i.hasNextPage,i.isFetchingNextPage]),P.useEffect(()=>{window.scrollTo(0,0)},[t,n]);const v=P.useMemo(()=>{var s;return(((s=i.data)==null?void 0:s.pages)??[]).flatMap(c=>c.results)},[i.data]),b=P.useMemo(()=>v.map(se),[v]),g=R?"All papers":N?"Oral papers":_?"Spotlight papers":l?"Outstanding papers":d?"Best paper finalists":ae(((A=j.data)==null?void 0:A.name)||n||"",((L=j.data)==null?void 0:L.slug)||n),F=((T=(O=i.data)==null?void 0:O.pages[0])==null?void 0:T.count)??((B=m.data)==null?void 0:B.paper_count)??0,r=j.data;return m.error||j.error||i.error?e.jsx("div",{className:"page",children:e.jsx(ie,{variant:"destructive",children:e.jsx(oe,{children:"Failed to load conference papers. Please try again."})})}):e.jsxs("div",{className:"page",children:[e.jsxs("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:[e.jsx(y,{to:"/",children:"Home"}),e.jsx("span",{children:" / "}),e.jsx(y,{to:"/conferences",children:"Conferences"}),e.jsx("span",{children:" / "}),e.jsx(y,{to:`/conferences/${t}`,children:((D=m.data)==null?void 0:D.name)??t}),e.jsx("span",{children:" / "}),e.jsx("span",{children:g})]}),e.jsxs("div",{className:!p&&(r!=null&&r.image_url)?"task-hero-grid":void 0,style:{marginTop:16,marginBottom:28},children:[e.jsxs("div",{children:[e.jsx("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--accent-text)",letterSpacing:"0.1em",marginBottom:8},children:p?"BROWSE PAPERS":"TASK"}),e.jsx("h1",{className:"domain-mega-title",children:g}),l&&t==="iclr-2026"&&e.jsx(h,{className:"task-explainer",text:"ICLR 2026 recognized two Outstanding Papers and one Honorable Mention. [Read the announcement](https://blog.iclr.cc/2026/04/23/announcing-the-iclr-2026-outstanding-papers/)."}),l&&t==="icml-2026"&&e.jsx(h,{className:"task-explainer",text:"ICML 2026 recognized two Outstanding Papers and five Honorable Mentions. [Read the announcement](https://blog.icml.cc/2026/07/05/announcing-the-icml-2026-awards/)."}),d&&t==="cvpr-2026"&&e.jsx(h,{className:"task-explainer",text:"CVPR 2026 recognized fifteen Best Paper Award finalists, including the winners. [Read the announcement](https://x.com/CVPR/status/2062912519522717978)."}),!p&&(r==null?void 0:r.description)&&e.jsx(h,{className:"task-explainer",text:r.description}),m.data&&e.jsxs("div",{className:"task-quickstats",style:{marginTop:12},children:[e.jsxs("span",{children:[e.jsx("span",{className:"num",children:F.toLocaleString()}),"PAPERS"]}),e.jsx("span",{children:m.data.name})]})]}),!p&&(r==null?void 0:r.image_url)&&e.jsxs("figure",{className:"task-figure-card",children:[e.jsx("div",{className:"task-figure-img-wrap",children:e.jsx("img",{className:"task-figure-img",src:r.image_url,alt:`${g} schematic`,onError:a=>{var s,c;(c=(s=a.currentTarget.parentElement)==null?void 0:s.parentElement)==null||c.style.setProperty("display","none")}})}),e.jsxs("figcaption",{children:["Figure · ",g,r.image_credit&&e.jsxs(e.Fragment,{children:[e.jsx("br",{}),e.jsx(h,{className:"task-image-credit",text:r.image_credit})]})]})]})]}),e.jsxs("div",{className:"task-section-head",children:[e.jsx("div",{className:"task-section-eyebrow",children:x?"Award papers":"Conference papers · sort below"}),e.jsxs("div",{className:"task-section-title",children:["Papers ",e.jsxs("span",{className:"meta",children:["[",F.toLocaleString(),"]"]})]})]}),e.jsxs("div",{className:"sort-bar",children:[e.jsxs("div",{className:"paper-feed-toolbar-controls",children:[!x&&e.jsx("div",{className:"sort-options",children:ce.map(([a,s])=>e.jsx("button",{className:`sort-btn ${w===a?"active":""}`,onClick:()=>I(a),children:s},a))}),e.jsx(X,{hasCode:S,hasHfArtifacts:k,onHasCodeChange:q,onHasHfArtifactsChange:Q,showDivider:!x})]}),e.jsx(Z,{startDate:f.startDate,endDate:f.endDate,onChange:a=>u(ee(o,a))}),!x&&e.jsxs("div",{className:"results-count",children:[b.length," loaded in ",e.jsx("span",{children:g})]})]}),i.isLoading?e.jsx("div",{className:"paper-list",children:Array.from({length:4}).map((a,s)=>e.jsx(ne,{className:"h-40 w-full"},s))}):b.length===0?e.jsx("div",{className:"no-results",children:"No papers found for this selection."}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"paper-list",children:b.map((a,s)=>{var E;const c=(E=v[s])==null?void 0:E.conference_award,H=c==="outstanding"?"Outstanding Paper":c==="honorable_mention"?"Honorable Mention":c==="best_paper_finalist"&&!d?"Best Paper Finalist":null;return e.jsxs(G.Fragment,{children:[H&&e.jsx("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--accent-text)",letterSpacing:"0.08em",marginBottom:8},children:H}),e.jsx(J,{paper:a,rank:s+1})]},a.id)})}),e.jsx("div",{ref:V,style:{height:1}}),i.isFetchingNextPage&&e.jsx("div",{style:{padding:"20px 0",textAlign:"center",color:"var(--ink-faint)"},children:"Loading more…"})]})]})};export{Be as default};
 
1
+ import{u as $,d as W,r as P,j as e,L as y,F as G}from"./index-B9MfhMLC.js";import{u as M}from"./useQuery-Bx81pmgm.js";import{P as J}from"./components-BZrNefuY.js";import{P as X}from"./PaperFeedFilters-DuB_em33.js";import{a as Y,P as Z,b as ee}from"./PaperDateFilter-D1l9Effu.js";import{M as h}from"./MarkdownText-BAxpQ8kL.js";import{c as z}from"./catalog-BqDz3O_s.js";import{t as se,d as ae}from"./colors-BCIVIuvj.js";import{d as te}from"./usePapers-DP7fFbrs.js";import{u as re}from"./useIntersectionObserver-Dg35i96T.js";import{S as ne}from"./skeleton-BcfKeAOl.js";import{A as ie,a as oe}from"./alert-Bg2LnrDJ.js";import"./paperQueryKeys-BP2E-0yf.js";import"./LatexTitle-DeUmWtI2.js";import"./papers-BGvqL27Z.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-UrZdfRNz.js";/* empty css */import"./PaperPreviewLink-B3LP-qo2.js";import"./index-10yxmORR.js";import"./index-CSRWQTrf.js";import"./katex-DkKDou_j.js";import"./hover-card-Bv4bJws5.js";import"./useMutation-C2athD5k.js";import"./useInfiniteQuery-4Zdqd3L2.js";const ce=[["trending","trending"],["date_published","newest"],["citation_count","most cited"]],le=t=>t==="trending"||t==="date_published"||t==="citation_count"?t:"trending",Be=()=>{var A,L,O,T,B,D;const{confSlug:t,taskSlug:n}=$(),[o,u]=W(),w=le(o.get("order_by")),S=o.get("has_code")==="true",k=o.get("has_hf_artifacts")==="true",f=Y(o),I=a=>{const s=new URLSearchParams(o);s.set("order_by",a),u(s)},q=a=>{const s=new URLSearchParams(o);a?s.set("has_code","true"):s.delete("has_code"),u(s)},Q=a=>{const s=new URLSearchParams(o);a?s.set("has_hf_artifacts","true"):s.delete("has_hf_artifacts"),u(s)},R=n==="all",N=n==="oral",_=n==="spotlight",l=n==="outstanding",d=n==="best-paper-finalists",x=l||d,p=R||N||_||l||d,K=p?void 0:n,U=N?"oral":_?"spotlight":l?"outstanding":d?"best_paper_finalist":void 0,m=M({queryKey:["conference",t],queryFn:()=>z.getConference(t),enabled:!!t,staleTime:10*60*1e3}),j=M({queryKey:["task",n],queryFn:()=>z.getTask(n),enabled:!!n&&!p,staleTime:10*60*1e3}),i=te({conferenceSlug:t||"",taskSlug:K,presentation:U,page_size:12,order_by:w,order_dir:"desc",include_resources:!0,has_code:S,has_hf_artifacts:k,start_date:f.startDate,end_date:f.endDate,enabled:!!t}),{targetRef:V,isIntersecting:C}=re({rootMargin:"200px"});P.useEffect(()=>{C&&i.hasNextPage&&!i.isFetchingNextPage&&i.fetchNextPage()},[C,i.hasNextPage,i.isFetchingNextPage]),P.useEffect(()=>{window.scrollTo(0,0)},[t,n]);const v=P.useMemo(()=>{var s;return(((s=i.data)==null?void 0:s.pages)??[]).flatMap(c=>c.results)},[i.data]),b=P.useMemo(()=>v.map(se),[v]),g=R?"All papers":N?"Oral papers":_?"Spotlight papers":l?"Outstanding papers":d?"Best paper finalists":ae(((A=j.data)==null?void 0:A.name)||n||"",((L=j.data)==null?void 0:L.slug)||n),F=((T=(O=i.data)==null?void 0:O.pages[0])==null?void 0:T.count)??((B=m.data)==null?void 0:B.paper_count)??0,r=j.data;return m.error||j.error||i.error?e.jsx("div",{className:"page",children:e.jsx(ie,{variant:"destructive",children:e.jsx(oe,{children:"Failed to load conference papers. Please try again."})})}):e.jsxs("div",{className:"page",children:[e.jsxs("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:[e.jsx(y,{to:"/",children:"Home"}),e.jsx("span",{children:" / "}),e.jsx(y,{to:"/conferences",children:"Conferences"}),e.jsx("span",{children:" / "}),e.jsx(y,{to:`/conferences/${t}`,children:((D=m.data)==null?void 0:D.name)??t}),e.jsx("span",{children:" / "}),e.jsx("span",{children:g})]}),e.jsxs("div",{className:!p&&(r!=null&&r.image_url)?"task-hero-grid":void 0,style:{marginTop:16,marginBottom:28},children:[e.jsxs("div",{children:[e.jsx("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--accent-text)",letterSpacing:"0.1em",marginBottom:8},children:p?"BROWSE PAPERS":"TASK"}),e.jsx("h1",{className:"domain-mega-title",children:g}),l&&t==="iclr-2026"&&e.jsx(h,{className:"task-explainer",text:"ICLR 2026 recognized two Outstanding Papers and one Honorable Mention. [Read the announcement](https://blog.iclr.cc/2026/04/23/announcing-the-iclr-2026-outstanding-papers/)."}),l&&t==="icml-2026"&&e.jsx(h,{className:"task-explainer",text:"ICML 2026 recognized two Outstanding Papers and five Honorable Mentions. [Read the announcement](https://blog.icml.cc/2026/07/05/announcing-the-icml-2026-awards/)."}),d&&t==="cvpr-2026"&&e.jsx(h,{className:"task-explainer",text:"CVPR 2026 recognized fifteen Best Paper Award finalists, including the winners. [Read the announcement](https://x.com/CVPR/status/2062912519522717978)."}),!p&&(r==null?void 0:r.description)&&e.jsx(h,{className:"task-explainer",text:r.description}),m.data&&e.jsxs("div",{className:"task-quickstats",style:{marginTop:12},children:[e.jsxs("span",{children:[e.jsx("span",{className:"num",children:F.toLocaleString()}),"PAPERS"]}),e.jsx("span",{children:m.data.name})]})]}),!p&&(r==null?void 0:r.image_url)&&e.jsxs("figure",{className:"task-figure-card",children:[e.jsx("div",{className:"task-figure-img-wrap",children:e.jsx("img",{className:"task-figure-img",src:r.image_url,alt:`${g} schematic`,onError:a=>{var s,c;(c=(s=a.currentTarget.parentElement)==null?void 0:s.parentElement)==null||c.style.setProperty("display","none")}})}),e.jsxs("figcaption",{children:["Figure · ",g,r.image_credit&&e.jsxs(e.Fragment,{children:[e.jsx("br",{}),e.jsx(h,{className:"task-image-credit",text:r.image_credit})]})]})]})]}),e.jsxs("div",{className:"task-section-head",children:[e.jsx("div",{className:"task-section-eyebrow",children:x?"Award papers":"Conference papers · sort below"}),e.jsxs("div",{className:"task-section-title",children:["Papers ",e.jsxs("span",{className:"meta",children:["[",F.toLocaleString(),"]"]})]})]}),e.jsxs("div",{className:"sort-bar",children:[e.jsxs("div",{className:"paper-feed-toolbar-controls",children:[!x&&e.jsx("div",{className:"sort-options",children:ce.map(([a,s])=>e.jsx("button",{className:`sort-btn ${w===a?"active":""}`,onClick:()=>I(a),children:s},a))}),e.jsx(X,{hasCode:S,hasHfArtifacts:k,onHasCodeChange:q,onHasHfArtifactsChange:Q,showDivider:!x})]}),e.jsx(Z,{startDate:f.startDate,endDate:f.endDate,onChange:a=>u(ee(o,a))}),!x&&e.jsxs("div",{className:"results-count",children:[b.length," loaded in ",e.jsx("span",{children:g})]})]}),i.isLoading?e.jsx("div",{className:"paper-list",children:Array.from({length:4}).map((a,s)=>e.jsx(ne,{className:"h-40 w-full"},s))}):b.length===0?e.jsx("div",{className:"no-results",children:"No papers found for this selection."}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"paper-list",children:b.map((a,s)=>{var E;const c=(E=v[s])==null?void 0:E.conference_award,H=c==="outstanding"?"Outstanding Paper":c==="honorable_mention"?"Honorable Mention":c==="best_paper_finalist"&&!d?"Best Paper Finalist":null;return e.jsxs(G.Fragment,{children:[H&&e.jsx("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--accent-text)",letterSpacing:"0.08em",marginBottom:8},children:H}),e.jsx(J,{paper:a,rank:s+1})]},a.id)})}),e.jsx("div",{ref:V,style:{height:1}}),i.isFetchingNextPage&&e.jsx("div",{style:{padding:"20px 0",textAlign:"center",color:"var(--ink-faint)"},children:"Loading more…"})]})]})};export{Be as default};
assets/{ConferencesIndexView-xuk0tUW3.js → ConferencesIndexView-DtVGQJO-.js} RENAMED
@@ -1 +1 @@
1
- import{r as p,j as e,L as d}from"./index-CcJ6cWma.js";import{u}from"./useQuery-D3-GqcPN.js";import{c as f}from"./catalog-B7hp4mKD.js";import{S as m}from"./skeleton-B-mlrgWO.js";import{A as h,a as g}from"./alert-CMODHIPT.js";import{T as x}from"./TaxonomySuggestionTile-BHuB46eW.js";import"./SignInToEditDialog-BlcFzmvx.js";import"./button-CCtc-vkR.js";import"./input-CDtE_-7s.js";import"./textarea-V7qdwagm.js";import"./searchable-select-hSYn3P90.js";import"./popover-CRugk4PC.js";import"./dialog-E2hweIxC.js";import"./loader-circle-BXhZSOlA.js";import"./useMutation-DPe9yGc6.js";import"./submissions-DM97tJtn.js";import"./plus-CNhFESYj.js";const j=(r,a)=>{if(!r)return null;const t=new Date(`${r}T00:00:00`),s=a?new Date(`${a}T00:00:00`):null,n=o=>o.toLocaleDateString("en-US",{month:"long",day:"numeric"}),i=t.getFullYear();return s&&s.getTime()!==t.getTime()?t.getMonth()===s.getMonth()?`${n(t).replace(/\d+$/,"").trim()} ${t.getDate()}–${s.getDate()}, ${i}`:`${n(t)} – ${n(s)}, ${i}`:`${n(t)}, ${i}`},v=r=>{var t;if(r.year!=null)return r.year;if(r.start_date)return Number(r.start_date.slice(0,4));const a=(t=r.slug.match(/-(\d{4})$/))==null?void 0:t[1];return a?Number(a):0},y=(r,a)=>{if(r.start_date&&a.start_date){const t=r.start_date.localeCompare(a.start_date);if(t!==0)return t}else{if(r.start_date)return-1;if(a.start_date)return 1}return r.name.localeCompare(a.name)},N={display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:24,paddingBottom:12,borderBottom:"1px solid var(--hairline-strong)"},z=()=>{const r=u({queryKey:["conferences"],queryFn:()=>f.conferences(),staleTime:6e5}),a=p.useMemo(()=>{var s;if(!((s=r.data)!=null&&s.results))return null;const t={};return r.data.results.forEach(n=>{const i=v(n);(t[i]||(t[i]=[])).push(n)}),Object.values(t).forEach(n=>n.sort(y)),Object.keys(t).map(Number).sort((n,i)=>i-n).map(n=>({year:n,conferences:t[n]}))},[r.data]);return r.error?e.jsx("div",{className:"page",children:e.jsx(h,{variant:"destructive",children:e.jsx(g,{children:"Failed to load conferences. Please try again."})})}):e.jsxs("div",{className:"page",children:[e.jsx("div",{className:"feed-header",children:e.jsxs("div",{children:[e.jsxs("h1",{className:"feed-title",children:["All ",e.jsx("em",{children:"Conferences"})]}),e.jsx("div",{className:"feed-subtitle",children:"Browse accepted papers from major AI conferences, grouped by research area and task."}),e.jsxs("div",{className:"conference-deadlines-link",children:["Find deadlines for upcoming conferences"," ",e.jsx(d,{to:"/ai-deadlines",className:"underline underline-offset-2 hover:text-foreground",children:"here"}),". Conference information is based on"," ",e.jsx("a",{href:"https://huggingface.co/ai-conferences",target:"_blank",rel:"noreferrer",className:"underline underline-offset-2 hover:text-foreground",children:"Hugging Face AI Conferences"}),"."]})]})}),r.isLoading?e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:32},children:Array.from({length:2}).map((t,s)=>e.jsxs("div",{children:[e.jsx(m,{className:"h-8 w-24 mb-4"}),e.jsx("div",{className:"tag-grid",children:Array.from({length:3}).map((n,i)=>e.jsx(m,{className:"h-32"},i))})]},s))}):a==null?void 0:a.map(({year:t,conferences:s})=>{const n=s.reduce((o,l)=>o+(l.paper_count??0),0),i=t>0?String(t):"Unknown year";return e.jsxs("section",{style:{marginBottom:48},children:[e.jsxs("div",{style:N,children:[e.jsx("div",{children:e.jsx("h2",{style:{fontFamily:"var(--serif)",fontSize:26,fontWeight:500,letterSpacing:"-0.02em",marginBottom:4},children:i})}),e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",whiteSpace:"nowrap"},children:[s.length," ",s.length===1?"conference":"conferences"," ·"," ",n.toLocaleString()," papers"]})]}),e.jsxs("div",{className:"tag-grid",children:[s.map(o=>{const l=j(o.start_date,o.end_date),c=[o.venue,o.location].filter(Boolean).join(", ");return e.jsxs(d,{to:`/conferences/${o.slug}`,className:"tag-cell",children:[e.jsx("div",{className:"name",children:o.name}),e.jsxs("div",{className:"meta",style:{display:"flex",flexDirection:"column",gap:4},children:[l&&e.jsx("span",{children:l}),c&&e.jsx("span",{children:c}),e.jsxs("span",{children:[(o.paper_count??0).toLocaleString()," papers"]})]})]},o.id)}),e.jsx(x,{kind:"conference"})]})]},t)})]})};export{z as default};
 
1
+ import{r as p,j as e,L as d}from"./index-B9MfhMLC.js";import{u}from"./useQuery-Bx81pmgm.js";import{c as f}from"./catalog-BqDz3O_s.js";import{S as m}from"./skeleton-BcfKeAOl.js";import{A as h,a as g}from"./alert-Bg2LnrDJ.js";import{T as x}from"./TaxonomySuggestionTile-D67JWWL6.js";import"./SignInToEditDialog-D7miI02Z.js";import"./button-DZAojLNy.js";import"./input-DbV7135c.js";import"./textarea-BKTJjgMO.js";import"./searchable-select-C8cfKu2W.js";import"./popover-UrZdfRNz.js";import"./dialog-CR0TulAY.js";import"./loader-circle-BeMbSHvo.js";import"./useMutation-C2athD5k.js";import"./submissions-YISzGIO1.js";import"./plus-BZFi6ZWf.js";const j=(r,a)=>{if(!r)return null;const t=new Date(`${r}T00:00:00`),s=a?new Date(`${a}T00:00:00`):null,n=o=>o.toLocaleDateString("en-US",{month:"long",day:"numeric"}),i=t.getFullYear();return s&&s.getTime()!==t.getTime()?t.getMonth()===s.getMonth()?`${n(t).replace(/\d+$/,"").trim()} ${t.getDate()}–${s.getDate()}, ${i}`:`${n(t)} – ${n(s)}, ${i}`:`${n(t)}, ${i}`},v=r=>{var t;if(r.year!=null)return r.year;if(r.start_date)return Number(r.start_date.slice(0,4));const a=(t=r.slug.match(/-(\d{4})$/))==null?void 0:t[1];return a?Number(a):0},y=(r,a)=>{if(r.start_date&&a.start_date){const t=r.start_date.localeCompare(a.start_date);if(t!==0)return t}else{if(r.start_date)return-1;if(a.start_date)return 1}return r.name.localeCompare(a.name)},N={display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:24,paddingBottom:12,borderBottom:"1px solid var(--hairline-strong)"},z=()=>{const r=u({queryKey:["conferences"],queryFn:()=>f.conferences(),staleTime:6e5}),a=p.useMemo(()=>{var s;if(!((s=r.data)!=null&&s.results))return null;const t={};return r.data.results.forEach(n=>{const i=v(n);(t[i]||(t[i]=[])).push(n)}),Object.values(t).forEach(n=>n.sort(y)),Object.keys(t).map(Number).sort((n,i)=>i-n).map(n=>({year:n,conferences:t[n]}))},[r.data]);return r.error?e.jsx("div",{className:"page",children:e.jsx(h,{variant:"destructive",children:e.jsx(g,{children:"Failed to load conferences. Please try again."})})}):e.jsxs("div",{className:"page",children:[e.jsx("div",{className:"feed-header",children:e.jsxs("div",{children:[e.jsxs("h1",{className:"feed-title",children:["All ",e.jsx("em",{children:"Conferences"})]}),e.jsx("div",{className:"feed-subtitle",children:"Browse accepted papers from major AI conferences, grouped by research area and task."}),e.jsxs("div",{className:"conference-deadlines-link",children:["Find deadlines for upcoming conferences"," ",e.jsx(d,{to:"/ai-deadlines",className:"underline underline-offset-2 hover:text-foreground",children:"here"}),". Conference information is based on"," ",e.jsx("a",{href:"https://huggingface.co/ai-conferences",target:"_blank",rel:"noreferrer",className:"underline underline-offset-2 hover:text-foreground",children:"Hugging Face AI Conferences"}),"."]})]})}),r.isLoading?e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:32},children:Array.from({length:2}).map((t,s)=>e.jsxs("div",{children:[e.jsx(m,{className:"h-8 w-24 mb-4"}),e.jsx("div",{className:"tag-grid",children:Array.from({length:3}).map((n,i)=>e.jsx(m,{className:"h-32"},i))})]},s))}):a==null?void 0:a.map(({year:t,conferences:s})=>{const n=s.reduce((o,l)=>o+(l.paper_count??0),0),i=t>0?String(t):"Unknown year";return e.jsxs("section",{style:{marginBottom:48},children:[e.jsxs("div",{style:N,children:[e.jsx("div",{children:e.jsx("h2",{style:{fontFamily:"var(--serif)",fontSize:26,fontWeight:500,letterSpacing:"-0.02em",marginBottom:4},children:i})}),e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",whiteSpace:"nowrap"},children:[s.length," ",s.length===1?"conference":"conferences"," ·"," ",n.toLocaleString()," papers"]})]}),e.jsxs("div",{className:"tag-grid",children:[s.map(o=>{const l=j(o.start_date,o.end_date),c=[o.venue,o.location].filter(Boolean).join(", ");return e.jsxs(d,{to:`/conferences/${o.slug}`,className:"tag-cell",children:[e.jsx("div",{className:"name",children:o.name}),e.jsxs("div",{className:"meta",style:{display:"flex",flexDirection:"column",gap:4},children:[l&&e.jsx("span",{children:l}),c&&e.jsx("span",{children:c}),e.jsxs("span",{children:[(o.paper_count??0).toLocaleString()," papers"]})]})]},o.id)}),e.jsx(x,{kind:"conference"})]})]},t)})]})};export{z as default};
assets/{CronDashboard-DB3sbLbc.js → CronDashboard-D7zjxrOi.js} RENAMED
@@ -1,4 +1,4 @@
1
- import{g as O,r as h,z as as,q as rs,j as e,p as le,a1 as ns,R as ts,I as is,t as me,P as cs,w as ls,B as Re,x as A,m as Fe,L as xe,a as ds,f as os}from"./index-CcJ6cWma.js";import{u as X}from"./useQuery-D3-GqcPN.js";import{f as _,A as ie,C as v,a as b,b as y,c as q,d as f,o as ve}from"./operations-DsCAtQes.js";import{B as S}from"./badge-B4a-IZlY.js";import{B as C}from"./button-CCtc-vkR.js";import{C as ms}from"./chevron-down-DJZrO8F3.js";import{D as fe,r as us,f as hs,h as xs,j as ps,p as js,k as gs,l as vs}from"./codexAddEvals-Ddq5bm_a.js";import{T as fs}from"./trending-up-BxcjwQa1.js";import{F as _e}from"./file-text-tKMRCnZb.js";import{S as Te}from"./shield-alert-DY4w7V_e.js";import{E as ee}from"./external-link-BuxK9KNv.js";import{C as se,R as Ne}from"./refresh-cw-C-xWs560.js";import{L as D}from"./loader-circle-BXhZSOlA.js";import{C as pe}from"./circle-check-DjcpGLXK.js";import{u as I}from"./useMutation-DPe9yGc6.js";import{u as _s}from"./useInfiniteQuery-CFy22PuG.js";import{p as Ae}from"./paperEdits-CviwQWgR.js";import{c as ue}from"./catalog-B7hp4mKD.js";import{c as be}from"./chat-CmC2kF8c.js";/**
2
  * @license lucide-react v0.462.0 - ISC
3
  *
4
  * This source code is licensed under the ISC license.
 
1
+ import{g as O,r as h,z as as,q as rs,j as e,p as le,a1 as ns,R as ts,I as is,t as me,P as cs,w as ls,B as Re,x as A,m as Fe,L as xe,a as ds,f as os}from"./index-B9MfhMLC.js";import{u as X}from"./useQuery-Bx81pmgm.js";import{f as _,A as ie,C as v,a as b,b as y,c as q,d as f,o as ve}from"./operations-ClH3Qt6j.js";import{B as S}from"./badge-CO0oD6ZM.js";import{B as C}from"./button-DZAojLNy.js";import{C as ms}from"./chevron-down-hgezkIWy.js";import{D as fe,r as us,f as hs,h as xs,j as ps,p as js,k as gs,l as vs}from"./codexAddEvals-B53N-zkn.js";import{T as fs}from"./trending-up-C_hNEuqr.js";import{F as _e}from"./file-text-B14SZiZO.js";import{S as Te}from"./shield-alert-BANoWW0F.js";import{E as ee}from"./external-link-tLC4XD6r.js";import{C as se,R as Ne}from"./refresh-cw-D3I_8P9O.js";import{L as D}from"./loader-circle-BeMbSHvo.js";import{C as pe}from"./circle-check-C0vXNVWN.js";import{u as I}from"./useMutation-C2athD5k.js";import{u as _s}from"./useInfiniteQuery-4Zdqd3L2.js";import{p as Ae}from"./paperEdits-DYztItZs.js";import{c as ue}from"./catalog-BqDz3O_s.js";import{c as be}from"./chat-BZn2Yz-P.js";/**
2
  * @license lucide-react v0.462.0 - ISC
3
  *
4
  * This source code is licensed under the ISC license.
assets/{ExternalSourceEvalBadge-BJLG4V5e.js → ExternalSourceEvalBadge-CFCVDZdz.js} RENAMED
@@ -1 +1 @@
1
- import{a as o}from"./papers-CClaKvmL.js";import{a4 as g,j as a,L as l}from"./index-CcJ6cWma.js";import{H as u,a as c,b as d}from"./hover-card-Bj7-02L3.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{a as o}from"./papers-BGvqL27Z.js";import{a4 as g,j as a,L as l}from"./index-B9MfhMLC.js";import{H as u,a as c,b as d}from"./hover-card-Bv4bJws5.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-tDL-q83T.js → FeedView-CKzkkGT3.js} RENAMED
@@ -1 +1 @@
1
- import{j as e,H as Z,L as p,b as V,c as ee,d as se,r as m,i as $,e as X,C as ae,f as te}from"./index-CcJ6cWma.js";import{d as U,t as re}from"./colors-DCzRcDI4.js";import{L as ne,F as ie,B as oe,M as le}from"./mail-BlXkX--v.js";import{P as ce}from"./plus-CNhFESYj.js";import{r as G}from"./research-1Dm22Eft.js";import{P as de}from"./components-Bax1_3qI.js";import{A as he}from"./AgentLogos-X0gceHNa.js";import{P as me}from"./PaperFeedFilters-DejcdS4D.js";import{r as pe,P as ue,w as ge}from"./PaperDateFilter-_7LVshRy.js";import{D as fe,u as xe,P as je,M as be,S as we,a as ve,R as ye,W as Ne,A as _e,b as Pe,q as ke,c as Se}from"./chatLaunch-BWQHjZ_V.js";import{c as Ce}from"./chat-CmC2kF8c.js";import{c as W}from"./catalog-B7hp4mKD.js";import{S}from"./chatPrompts-DypmWIqx.js";import{u as Ae}from"./usePapers-TCIcWoUA.js";import{u as Le}from"./useIntersectionObserver-DtY8SYYt.js";import{S as k}from"./skeleton-B-mlrgWO.js";import{A as Te,a as Fe}from"./alert-CMODHIPT.js";import{u as I}from"./useQuery-D3-GqcPN.js";import{u as Me}from"./useInfiniteQuery-CFy22PuG.js";import"./paperQueryKeys-BP2E-0yf.js";import"./LatexTitle-hDpJaCcC.js";import"./papers-CClaKvmL.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-CRugk4PC.js";import"./chevron-down-DJZrO8F3.js";function Q({signedIn:t,popularTasks:u=[]}){const l=[...t?[]:[e.jsx(e.Fragment,{children:"Sign in with your Hugging Face account. Your follows stay private."})],e.jsxs(e.Fragment,{children:["Open any task, method, benchmark, author, or organization page and click"," ",e.jsxs("span",{className:"following-intro-pill",children:[e.jsx(ce,{"aria-hidden":"true"}),"Follow"]}),"."]}),e.jsxs(e.Fragment,{children:["New papers and benchmark results from everything you follow appear here, ranked like the trending feed. You can also get them as a weekly email from ",e.jsx(p,{to:"/settings",children:"Settings"}),"."]})];return e.jsxs("section",{className:"following-intro","aria-labelledby":"following-intro-title",children:[e.jsx("h2",{id:"following-intro-title",children:"Build your personal research feed"}),e.jsx("p",{className:"following-intro-lead",children:"Follow the tasks, benchmarks, authors, and organizations you care about, and this page collects their latest papers and results in one place."}),e.jsx("ol",{className:"following-intro-steps",children:l.map((n,o)=>e.jsxs("li",{children:[e.jsx("span",{"aria-hidden":"true",children:o+1}),e.jsx("p",{children:n})]},o))}),!t&&e.jsx("div",{className:"following-intro-signin",children:e.jsx(Z,{returnTo:"/following",label:"Sign in to start following"})}),e.jsxs("div",{className:"following-intro-browse",children:[e.jsxs(p,{to:"/tasks",children:[e.jsx(ne,{"aria-hidden":"true"}),"Browse tasks"]}),e.jsxs(p,{to:"/methods",children:[e.jsx(ie,{"aria-hidden":"true"}),"Browse methods"]}),e.jsxs(p,{to:"/organizations",children:[e.jsx(oe,{"aria-hidden":"true"}),"Browse organizations"]}),t&&e.jsxs(p,{to:"/settings",children:[e.jsx(le,{"aria-hidden":"true"}),"Weekly email"]})]}),u.length>0&&e.jsxs("div",{className:"following-intro-popular",children:[e.jsx("h3",{children:"Popular tasks to follow"}),e.jsx("div",{children:u.map(n=>e.jsx(p,{to:`/tasks/${n.slug}`,children:U(n.name,n.slug)},n.id))})]})]})}const Ee=[["trending","trending"],["date_published","newest"],["citation_count","most cited"]],Y=45,He=1800,De=25,Re=350,Ie=t=>{const[u,l]=m.useState(S[0].slice(0,1));return m.useEffect(()=>{var f,w;if(!t)return;if((w=(f=window.matchMedia)==null?void 0:f.call(window,"(prefers-reduced-motion: reduce)"))!=null&&w.matches){l(S[0]);return}let n=0,o=1,c=!1,g;l(S[0].slice(0,o));const h=()=>{const v=S[n];if(!c){if(o+=1,l(v.slice(0,o)),o===v.length){c=!0,g=window.setTimeout(h,He);return}g=window.setTimeout(h,Y);return}if(o-=1,l(v.slice(0,o)),o===0){c=!1,n=(n+1)%S.length,g=window.setTimeout(h,Re);return}g=window.setTimeout(h,De)};return g=window.setTimeout(h,Y),()=>window.clearTimeout(g)},[t]),u},Oe=t=>t==="trending"||t==="date_published"||t==="citation_count"?t:"trending",qe=()=>{var D,H;const t=V(),u=X(),l=te()?we:ve,[n,o]=m.useState({text:"",paperMentions:[]}),c=n.text,[g,h]=m.useState(0),[f,w]=m.useState(fe),[v,O]=m.useState(!0),[C,A]=m.useState("low"),[b,L]=m.useState(!1),[T,P]=m.useState(null),q=Ie(!c),F=m.useRef(null),M=I({queryKey:["chatAvailability"],queryFn:()=>Ce.getAvailability(),retry:!1,enabled:$()}),x=!!((D=M.data)!=null&&D.web_search_available),y=$()&&((H=M.data)==null?void 0:H.paper_mentions_enabled)!==!1,i=xe({draft:n,onChange:o,enabled:y,textareaRef:F});m.useLayoutEffect(()=>{const a=F.current;if(!a)return;const d=()=>{if(a.style.height="auto",c){a.style.height=`${Math.min(a.scrollHeight,160)}px`;return}const j=a.placeholder,N=S.reduce((_,R)=>(a.placeholder=R,Math.max(_,a.scrollHeight)),0);a.placeholder=j,a.style.height=`${Math.min(N,160)}px`};return d(),window.addEventListener("resize",d),()=>window.removeEventListener("resize",d)},[c]);const E=async(a=n)=>{const d=a.text.trim();if(!(!d||b)){if(u){const j=new URLSearchParams({q:d,model:f}),N=`${ae}?${j}`,_=window.open(N,"_blank");if(!_){P(N);return}_.opener=null,P(null),o({text:"",paperMentions:[]});return}L(!0),ke(a,f,{webSearchEnabled:v,reasoningEffort:C});try{const j=await Se(f,C);t(`/chat/${j.id}`)}catch{t("/chat")}}};return e.jsxs(e.Fragment,{children:[!u&&e.jsx("div",{className:"ask-home-new",children:"Hint: type @ to bring papers into context"}),e.jsxs("div",{className:"ask-home",children:[e.jsxs("div",{className:"ask-home-textarea-wrap",children:[e.jsx(je,{text:n.text,mentions:n.paperMentions,scrollTop:g,variant:"home"}),e.jsx("textarea",{ref:F,rows:1,value:c,placeholder:q,"aria-label":"Ask the assistant",disabled:b,onChange:a=>i.updateText(a.target.value,a.target.selectionStart),onSelect:a=>i.refresh(a.currentTarget.selectionStart),onClick:a=>i.refresh(a.currentTarget.selectionStart),onScroll:a=>h(a.currentTarget.scrollTop),onBlur:a=>{var d,j;(j=(d=a.relatedTarget)==null?void 0:d.closest)!=null&&j.call(d,".chat-paper-picker")||window.setTimeout(i.close,0)},onKeyDown:a=>{i.keyDown(a)||a.key==="Enter"&&!a.shiftKey&&(a.preventDefault(),E())},role:y?"combobox":void 0,"aria-expanded":y?i.open:void 0,"aria-controls":i.open?i.pickerId:void 0,"aria-activedescendant":i.open&&i.results.length?`${i.optionIdPrefix}-${i.activeIndex}`:void 0,"aria-autocomplete":y?"list":void 0,"aria-describedby":i.message?"ask-home-paper-mention-message":void 0})]}),T&&e.jsx("div",{className:"chat-paper-mention-message",role:"alert",children:e.jsx("a",{href:T,target:"_blank",rel:"noreferrer",children:"Open this question on paperswithcode.co"})}),i.message&&e.jsx("div",{id:"ask-home-paper-mention-message",className:"chat-paper-mention-message",role:"alert",children:i.message}),e.jsxs("div",{className:"ask-home-foot",children:[e.jsxs("div",{className:"ask-home-provider-tools",children:[e.jsx(be,{models:l,selectedModel:f,onModelChange:w}),!u&&e.jsx(ye,{value:C,onChange:A,disabled:b}),x&&e.jsx(Ne,{enabled:v,onChange:O,disabled:b})]}),e.jsx("button",{type:"button",className:`chat-send${c.trim()?" chat-send-on":""}`,onClick:()=>void E(),disabled:!c.trim()||b,"aria-label":"Ask the assistant",children:e.jsx(_e,{})})]}),e.jsx(Pe,{open:i.open,query:i.query,results:i.results,activeIndex:i.activeIndex,loading:i.loading,error:i.error,onSelect:i.select,id:i.pickerId,optionIdPrefix:i.optionIdPrefix})]})]})},ms=({following:t=!1})=>{var a,d,j,N,_,R,z;const u=V(),l=ee(),n=l==null?void 0:l.user,[o,c]=se(),g=Oe(o.get("order_by")),h=pe(o,void 0,t?"month":"week"),f=o.get("has_code")==="true",w=o.get("has_hf_artifacts")==="true",v=s=>{const r=new URLSearchParams(o);r.set("order_by",s),t?u(`/?${r}`):c(r)},O=s=>{const r=new URLSearchParams(o);s?r.set("has_code","true"):r.delete("has_code"),c(r)},C=s=>{const r=new URLSearchParams(o);s?r.set("has_hf_artifacts","true"):r.delete("has_hf_artifacts"),c(r)},A=I({queryKey:["top-tasks-sidebar"],queryFn:()=>W.topTasks(8),staleTime:10*60*1e3}),b=I({queryKey:["trending-tasks-sidebar"],queryFn:()=>W.trendingTasks({limit:8,level:0}),staleTime:10*60*1e3}),L=Ae({enabled:!t,page_size:30,order_by:g,order_dir:"desc",start_date:h.startDate,end_date:h.endDate,include_resources:!0,has_code:f,has_hf_artifacts:w}),T={...h,hasCode:f,hasHfArtifacts:w},P=Me({queryKey:["research-feed",n==null?void 0:n.hf_subject,T],queryFn:({pageParam:s})=>G.following(s,T),initialPageParam:0,getNextPageParam:(s,r)=>s.length===40?r.length*40:void 0,enabled:t&&!!n}),q=I({queryKey:["research-follows",n==null?void 0:n.hf_subject],queryFn:G.follows,enabled:t&&!!n}),F=t&&!!n&&((a=q.data)==null?void 0:a.length)===0,M=(d=A.data)==null?void 0:d.slice(0,8),x=t?P:L,y=m.useMemo(()=>{var r,K;return(t?((r=P.data)==null?void 0:r.pages.flatMap(B=>B.map(J=>J.paper)))??[]:((K=L.data)==null?void 0:K.pages.flatMap(B=>B.results))??[]).map(re)},[t,P.data,L.data]),{targetRef:i,isIntersecting:E}=Le({rootMargin:"400px"});m.useEffect(()=>{E&&x.hasNextPage&&!x.isFetchingNextPage&&x.fetchNextPage()},[E,x.hasNextPage,x.isFetchingNextPage]);const D=x.isLoading||t&&(l==null?void 0:l.isLoading),H=x.error;return e.jsxs("div",{className:"page",children:[e.jsx("div",{className:"feed-header",children:e.jsxs("div",{children:[e.jsxs("h1",{className:"feed-title",children:["Trending ",e.jsx("em",{children:"Research"})]}),e.jsx("div",{className:"feed-subtitle",children:"Curated daily from arXiv and Hugging Face"})]})}),e.jsxs("div",{className:"layout-with-sidebar",children:[e.jsxs("aside",{className:"sidebar",children:[e.jsxs("div",{className:"sidebar-section sidebar-section-top-domains",children:[e.jsx("div",{className:"sidebar-label",children:"Top Domains"}),A.isLoading&&e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:Array.from({length:6}).map((s,r)=>e.jsx(k,{className:"h-5 w-full"},r))}),(j=A.data)==null?void 0:j.map(s=>e.jsxs(p,{to:`/tasks/${s.slug}`,className:"sidebar-link",children:[U(s.name,s.slug),s.paper_count!=null&&e.jsx("span",{className:"count",children:s.paper_count})]},s.id)),e.jsx(p,{to:"/tasks",className:"sidebar-link",style:{marginTop:8,fontStyle:"italic"},children:"all domains →"})]}),e.jsxs("div",{className:"sidebar-section sidebar-section-trending-domains",children:[e.jsx("div",{className:"sidebar-label",children:"Trending Domains"}),b.isLoading&&e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:Array.from({length:6}).map((s,r)=>e.jsx(k,{className:"h-5 w-full"},r))}),((_=(N=b.data)==null?void 0:N.results)==null?void 0:_.length)===0&&!b.isLoading&&e.jsx("div",{style:{fontSize:12,color:"var(--ink-faint)"},children:"No domains gaining momentum right now."}),(z=(R=b.data)==null?void 0:R.results)==null?void 0:z.map(s=>e.jsxs(p,{to:`/tasks/${s.slug}`,className:"sidebar-link",children:[U(s.name,s.slug),e.jsxs("span",{className:"count",children:[s.share_lift.toFixed(1),"x"]})]},s.id))]}),e.jsxs("div",{className:"sidebar-section sidebar-section-tools",children:[e.jsx("div",{className:"sidebar-label",children:"Use PwC with your agent"}),e.jsxs(p,{to:"/mcp",className:"action-btn sidebar-tools-mcp",title:"Connect Claude, Codex, Cursor, or OpenCode to the PwC MCP server",children:["MCP server",e.jsx(he,{})]}),e.jsxs("p",{className:"sidebar-tools-copy",children:["Search papers, benchmarks, and leaderboards from any MCP client, or from the terminal with the"," ",e.jsxs("a",{href:"https://github.com/huggingface/pwc-cli",target:"_blank",rel:"noreferrer",children:[e.jsx("code",{children:"pwc"})," CLI"]}),"."]})]})]}),e.jsxs("div",{className:"feed-main",children:[($()||X())&&e.jsx("div",{className:"feed-chat",children:e.jsx(qe,{})}),e.jsxs("div",{className:"feed-content",children:[e.jsxs("div",{className:"sort-bar home-feed-sort-bar",children:[e.jsxs("div",{className:"paper-feed-toolbar-controls",children:[e.jsxs("div",{className:"sort-options",children:[Ee.map(([s,r])=>e.jsx("button",{className:`sort-btn ${!t&&g===s?"active":""}`,onClick:()=>v(s),children:r},s)),e.jsx("button",{className:`sort-btn ${t?"active":""}`,onClick:()=>{const s=new URLSearchParams(o);s.delete("order_by");const r=s.toString();u(r?`/following?${r}`:"/following")},children:"following"})]}),e.jsx(me,{hasCode:f,hasHfArtifacts:w,onHasCodeChange:O,onHasHfArtifactsChange:C})]}),e.jsx(ue,{startDate:h.startDate,endDate:h.endDate,onChange:s=>c(ge(o,s))})]}),H&&e.jsx(Te,{variant:"destructive",className:"mb-4",children:e.jsxs(Fe,{children:["Failed to load papers. ",e.jsx("button",{type:"button",onClick:()=>void x.refetch(),children:"Try again"})]})}),t&&!(l!=null&&l.isLoading)&&!n?e.jsx(Q,{signedIn:!1,popularTasks:M}):F?e.jsx(Q,{signedIn:!0,popularTasks:M}):D?e.jsx("div",{className:"paper-list",children:Array.from({length:6}).map((s,r)=>e.jsxs("div",{className:"paper-card",children:[e.jsx("div",{className:"paper-thumb-wrap",children:e.jsx(k,{className:"paper-thumb-skeleton"})}),e.jsxs("div",{className:"paper-body",style:{flex:1,gap:12},children:[e.jsx(k,{className:"h-6 w-3/4"}),e.jsx(k,{className:"h-4 w-1/2"}),e.jsx(k,{className:"h-12 w-full"})]})]},r))}):y.length===0?H?null:e.jsx("div",{className:"no-results",children:t?e.jsxs(e.Fragment,{children:["No papers from your follows match these filters. Widen the date range, or follow more from ",e.jsx(p,{to:"/tasks",children:"tasks"}),", ",e.jsx(p,{to:"/methods",children:"methods"}),", benchmark, author, or organization pages."]}):"No papers in this window."}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"paper-list",children:y.map((s,r)=>e.jsx(de,{paper:s,rank:r+1},s.id))}),e.jsx("div",{ref:i,style:{height:1}}),x.isFetchingNextPage&&e.jsx("div",{style:{padding:"20px 0",textAlign:"center",color:"var(--ink-faint)"},children:"Loading more…"})]})]})]})]})]})};export{qe as AskAssistant,ms as default};
 
1
+ import{j as e,H as Z,L as p,b as V,c as ee,d as se,r as m,i as $,e as X,C as ae,f as te}from"./index-B9MfhMLC.js";import{d as U,t as re}from"./colors-BCIVIuvj.js";import{L as ne,F as ie,B as oe,M as le}from"./mail-BizcmKOf.js";import{P as ce}from"./plus-BZFi6ZWf.js";import{r as G}from"./research-DbRWvLsz.js";import{P as de}from"./components-BZrNefuY.js";import{A as he}from"./AgentLogos-iXpPIhF4.js";import{P as me}from"./PaperFeedFilters-DuB_em33.js";import{r as pe,P as ue,w as ge}from"./PaperDateFilter-D1l9Effu.js";import{D as fe,u as xe,P as je,M as be,S as we,a as ve,R as ye,W as Ne,A as _e,b as Pe,q as ke,c as Se}from"./chatLaunch-CsBovBmE.js";import{c as Ce}from"./chat-BZn2Yz-P.js";import{c as W}from"./catalog-BqDz3O_s.js";import{S}from"./chatPrompts-DypmWIqx.js";import{u as Ae}from"./usePapers-DP7fFbrs.js";import{u as Le}from"./useIntersectionObserver-Dg35i96T.js";import{S as k}from"./skeleton-BcfKeAOl.js";import{A as Te,a as Fe}from"./alert-Bg2LnrDJ.js";import{u as I}from"./useQuery-Bx81pmgm.js";import{u as Me}from"./useInfiniteQuery-4Zdqd3L2.js";import"./paperQueryKeys-BP2E-0yf.js";import"./LatexTitle-DeUmWtI2.js";import"./papers-BGvqL27Z.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-UrZdfRNz.js";import"./chevron-down-hgezkIWy.js";function Q({signedIn:t,popularTasks:u=[]}){const l=[...t?[]:[e.jsx(e.Fragment,{children:"Sign in with your Hugging Face account. Your follows stay private."})],e.jsxs(e.Fragment,{children:["Open any task, method, benchmark, author, or organization page and click"," ",e.jsxs("span",{className:"following-intro-pill",children:[e.jsx(ce,{"aria-hidden":"true"}),"Follow"]}),"."]}),e.jsxs(e.Fragment,{children:["New papers and benchmark results from everything you follow appear here, ranked like the trending feed. You can also get them as a weekly email from ",e.jsx(p,{to:"/settings",children:"Settings"}),"."]})];return e.jsxs("section",{className:"following-intro","aria-labelledby":"following-intro-title",children:[e.jsx("h2",{id:"following-intro-title",children:"Build your personal research feed"}),e.jsx("p",{className:"following-intro-lead",children:"Follow the tasks, benchmarks, authors, and organizations you care about, and this page collects their latest papers and results in one place."}),e.jsx("ol",{className:"following-intro-steps",children:l.map((n,o)=>e.jsxs("li",{children:[e.jsx("span",{"aria-hidden":"true",children:o+1}),e.jsx("p",{children:n})]},o))}),!t&&e.jsx("div",{className:"following-intro-signin",children:e.jsx(Z,{returnTo:"/following",label:"Sign in to start following"})}),e.jsxs("div",{className:"following-intro-browse",children:[e.jsxs(p,{to:"/tasks",children:[e.jsx(ne,{"aria-hidden":"true"}),"Browse tasks"]}),e.jsxs(p,{to:"/methods",children:[e.jsx(ie,{"aria-hidden":"true"}),"Browse methods"]}),e.jsxs(p,{to:"/organizations",children:[e.jsx(oe,{"aria-hidden":"true"}),"Browse organizations"]}),t&&e.jsxs(p,{to:"/settings",children:[e.jsx(le,{"aria-hidden":"true"}),"Weekly email"]})]}),u.length>0&&e.jsxs("div",{className:"following-intro-popular",children:[e.jsx("h3",{children:"Popular tasks to follow"}),e.jsx("div",{children:u.map(n=>e.jsx(p,{to:`/tasks/${n.slug}`,children:U(n.name,n.slug)},n.id))})]})]})}const Ee=[["trending","trending"],["date_published","newest"],["citation_count","most cited"]],Y=45,He=1800,De=25,Re=350,Ie=t=>{const[u,l]=m.useState(S[0].slice(0,1));return m.useEffect(()=>{var f,w;if(!t)return;if((w=(f=window.matchMedia)==null?void 0:f.call(window,"(prefers-reduced-motion: reduce)"))!=null&&w.matches){l(S[0]);return}let n=0,o=1,c=!1,g;l(S[0].slice(0,o));const h=()=>{const v=S[n];if(!c){if(o+=1,l(v.slice(0,o)),o===v.length){c=!0,g=window.setTimeout(h,He);return}g=window.setTimeout(h,Y);return}if(o-=1,l(v.slice(0,o)),o===0){c=!1,n=(n+1)%S.length,g=window.setTimeout(h,Re);return}g=window.setTimeout(h,De)};return g=window.setTimeout(h,Y),()=>window.clearTimeout(g)},[t]),u},Oe=t=>t==="trending"||t==="date_published"||t==="citation_count"?t:"trending",qe=()=>{var D,H;const t=V(),u=X(),l=te()?we:ve,[n,o]=m.useState({text:"",paperMentions:[]}),c=n.text,[g,h]=m.useState(0),[f,w]=m.useState(fe),[v,O]=m.useState(!0),[C,A]=m.useState("low"),[b,L]=m.useState(!1),[T,P]=m.useState(null),q=Ie(!c),F=m.useRef(null),M=I({queryKey:["chatAvailability"],queryFn:()=>Ce.getAvailability(),retry:!1,enabled:$()}),x=!!((D=M.data)!=null&&D.web_search_available),y=$()&&((H=M.data)==null?void 0:H.paper_mentions_enabled)!==!1,i=xe({draft:n,onChange:o,enabled:y,textareaRef:F});m.useLayoutEffect(()=>{const a=F.current;if(!a)return;const d=()=>{if(a.style.height="auto",c){a.style.height=`${Math.min(a.scrollHeight,160)}px`;return}const j=a.placeholder,N=S.reduce((_,R)=>(a.placeholder=R,Math.max(_,a.scrollHeight)),0);a.placeholder=j,a.style.height=`${Math.min(N,160)}px`};return d(),window.addEventListener("resize",d),()=>window.removeEventListener("resize",d)},[c]);const E=async(a=n)=>{const d=a.text.trim();if(!(!d||b)){if(u){const j=new URLSearchParams({q:d,model:f}),N=`${ae}?${j}`,_=window.open(N,"_blank");if(!_){P(N);return}_.opener=null,P(null),o({text:"",paperMentions:[]});return}L(!0),ke(a,f,{webSearchEnabled:v,reasoningEffort:C});try{const j=await Se(f,C);t(`/chat/${j.id}`)}catch{t("/chat")}}};return e.jsxs(e.Fragment,{children:[!u&&e.jsx("div",{className:"ask-home-new",children:"Hint: type @ to bring papers into context"}),e.jsxs("div",{className:"ask-home",children:[e.jsxs("div",{className:"ask-home-textarea-wrap",children:[e.jsx(je,{text:n.text,mentions:n.paperMentions,scrollTop:g,variant:"home"}),e.jsx("textarea",{ref:F,rows:1,value:c,placeholder:q,"aria-label":"Ask the assistant",disabled:b,onChange:a=>i.updateText(a.target.value,a.target.selectionStart),onSelect:a=>i.refresh(a.currentTarget.selectionStart),onClick:a=>i.refresh(a.currentTarget.selectionStart),onScroll:a=>h(a.currentTarget.scrollTop),onBlur:a=>{var d,j;(j=(d=a.relatedTarget)==null?void 0:d.closest)!=null&&j.call(d,".chat-paper-picker")||window.setTimeout(i.close,0)},onKeyDown:a=>{i.keyDown(a)||a.key==="Enter"&&!a.shiftKey&&(a.preventDefault(),E())},role:y?"combobox":void 0,"aria-expanded":y?i.open:void 0,"aria-controls":i.open?i.pickerId:void 0,"aria-activedescendant":i.open&&i.results.length?`${i.optionIdPrefix}-${i.activeIndex}`:void 0,"aria-autocomplete":y?"list":void 0,"aria-describedby":i.message?"ask-home-paper-mention-message":void 0})]}),T&&e.jsx("div",{className:"chat-paper-mention-message",role:"alert",children:e.jsx("a",{href:T,target:"_blank",rel:"noreferrer",children:"Open this question on paperswithcode.co"})}),i.message&&e.jsx("div",{id:"ask-home-paper-mention-message",className:"chat-paper-mention-message",role:"alert",children:i.message}),e.jsxs("div",{className:"ask-home-foot",children:[e.jsxs("div",{className:"ask-home-provider-tools",children:[e.jsx(be,{models:l,selectedModel:f,onModelChange:w}),!u&&e.jsx(ye,{value:C,onChange:A,disabled:b}),x&&e.jsx(Ne,{enabled:v,onChange:O,disabled:b})]}),e.jsx("button",{type:"button",className:`chat-send${c.trim()?" chat-send-on":""}`,onClick:()=>void E(),disabled:!c.trim()||b,"aria-label":"Ask the assistant",children:e.jsx(_e,{})})]}),e.jsx(Pe,{open:i.open,query:i.query,results:i.results,activeIndex:i.activeIndex,loading:i.loading,error:i.error,onSelect:i.select,id:i.pickerId,optionIdPrefix:i.optionIdPrefix})]})]})},ms=({following:t=!1})=>{var a,d,j,N,_,R,z;const u=V(),l=ee(),n=l==null?void 0:l.user,[o,c]=se(),g=Oe(o.get("order_by")),h=pe(o,void 0,t?"month":"week"),f=o.get("has_code")==="true",w=o.get("has_hf_artifacts")==="true",v=s=>{const r=new URLSearchParams(o);r.set("order_by",s),t?u(`/?${r}`):c(r)},O=s=>{const r=new URLSearchParams(o);s?r.set("has_code","true"):r.delete("has_code"),c(r)},C=s=>{const r=new URLSearchParams(o);s?r.set("has_hf_artifacts","true"):r.delete("has_hf_artifacts"),c(r)},A=I({queryKey:["top-tasks-sidebar"],queryFn:()=>W.topTasks(8),staleTime:10*60*1e3}),b=I({queryKey:["trending-tasks-sidebar"],queryFn:()=>W.trendingTasks({limit:8,level:0}),staleTime:10*60*1e3}),L=Ae({enabled:!t,page_size:30,order_by:g,order_dir:"desc",start_date:h.startDate,end_date:h.endDate,include_resources:!0,has_code:f,has_hf_artifacts:w}),T={...h,hasCode:f,hasHfArtifacts:w},P=Me({queryKey:["research-feed",n==null?void 0:n.hf_subject,T],queryFn:({pageParam:s})=>G.following(s,T),initialPageParam:0,getNextPageParam:(s,r)=>s.length===40?r.length*40:void 0,enabled:t&&!!n}),q=I({queryKey:["research-follows",n==null?void 0:n.hf_subject],queryFn:G.follows,enabled:t&&!!n}),F=t&&!!n&&((a=q.data)==null?void 0:a.length)===0,M=(d=A.data)==null?void 0:d.slice(0,8),x=t?P:L,y=m.useMemo(()=>{var r,K;return(t?((r=P.data)==null?void 0:r.pages.flatMap(B=>B.map(J=>J.paper)))??[]:((K=L.data)==null?void 0:K.pages.flatMap(B=>B.results))??[]).map(re)},[t,P.data,L.data]),{targetRef:i,isIntersecting:E}=Le({rootMargin:"400px"});m.useEffect(()=>{E&&x.hasNextPage&&!x.isFetchingNextPage&&x.fetchNextPage()},[E,x.hasNextPage,x.isFetchingNextPage]);const D=x.isLoading||t&&(l==null?void 0:l.isLoading),H=x.error;return e.jsxs("div",{className:"page",children:[e.jsx("div",{className:"feed-header",children:e.jsxs("div",{children:[e.jsxs("h1",{className:"feed-title",children:["Trending ",e.jsx("em",{children:"Research"})]}),e.jsx("div",{className:"feed-subtitle",children:"Curated daily from arXiv and Hugging Face"})]})}),e.jsxs("div",{className:"layout-with-sidebar",children:[e.jsxs("aside",{className:"sidebar",children:[e.jsxs("div",{className:"sidebar-section sidebar-section-top-domains",children:[e.jsx("div",{className:"sidebar-label",children:"Top Domains"}),A.isLoading&&e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:Array.from({length:6}).map((s,r)=>e.jsx(k,{className:"h-5 w-full"},r))}),(j=A.data)==null?void 0:j.map(s=>e.jsxs(p,{to:`/tasks/${s.slug}`,className:"sidebar-link",children:[U(s.name,s.slug),s.paper_count!=null&&e.jsx("span",{className:"count",children:s.paper_count})]},s.id)),e.jsx(p,{to:"/tasks",className:"sidebar-link",style:{marginTop:8,fontStyle:"italic"},children:"all domains →"})]}),e.jsxs("div",{className:"sidebar-section sidebar-section-trending-domains",children:[e.jsx("div",{className:"sidebar-label",children:"Trending Domains"}),b.isLoading&&e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:Array.from({length:6}).map((s,r)=>e.jsx(k,{className:"h-5 w-full"},r))}),((_=(N=b.data)==null?void 0:N.results)==null?void 0:_.length)===0&&!b.isLoading&&e.jsx("div",{style:{fontSize:12,color:"var(--ink-faint)"},children:"No domains gaining momentum right now."}),(z=(R=b.data)==null?void 0:R.results)==null?void 0:z.map(s=>e.jsxs(p,{to:`/tasks/${s.slug}`,className:"sidebar-link",children:[U(s.name,s.slug),e.jsxs("span",{className:"count",children:[s.share_lift.toFixed(1),"x"]})]},s.id))]}),e.jsxs("div",{className:"sidebar-section sidebar-section-tools",children:[e.jsx("div",{className:"sidebar-label",children:"Use PwC with your agent"}),e.jsxs(p,{to:"/mcp",className:"action-btn sidebar-tools-mcp",title:"Connect Claude, Codex, Cursor, or OpenCode to the PwC MCP server",children:["MCP server",e.jsx(he,{})]}),e.jsxs("p",{className:"sidebar-tools-copy",children:["Search papers, benchmarks, and leaderboards from any MCP client, or from the terminal with the"," ",e.jsxs("a",{href:"https://github.com/huggingface/pwc-cli",target:"_blank",rel:"noreferrer",children:[e.jsx("code",{children:"pwc"})," CLI"]}),"."]})]})]}),e.jsxs("div",{className:"feed-main",children:[($()||X())&&e.jsx("div",{className:"feed-chat",children:e.jsx(qe,{})}),e.jsxs("div",{className:"feed-content",children:[e.jsxs("div",{className:"sort-bar home-feed-sort-bar",children:[e.jsxs("div",{className:"paper-feed-toolbar-controls",children:[e.jsxs("div",{className:"sort-options",children:[Ee.map(([s,r])=>e.jsx("button",{className:`sort-btn ${!t&&g===s?"active":""}`,onClick:()=>v(s),children:r},s)),e.jsx("button",{className:`sort-btn ${t?"active":""}`,onClick:()=>{const s=new URLSearchParams(o);s.delete("order_by");const r=s.toString();u(r?`/following?${r}`:"/following")},children:"following"})]}),e.jsx(me,{hasCode:f,hasHfArtifacts:w,onHasCodeChange:O,onHasHfArtifactsChange:C})]}),e.jsx(ue,{startDate:h.startDate,endDate:h.endDate,onChange:s=>c(ge(o,s))})]}),H&&e.jsx(Te,{variant:"destructive",className:"mb-4",children:e.jsxs(Fe,{children:["Failed to load papers. ",e.jsx("button",{type:"button",onClick:()=>void x.refetch(),children:"Try again"})]})}),t&&!(l!=null&&l.isLoading)&&!n?e.jsx(Q,{signedIn:!1,popularTasks:M}):F?e.jsx(Q,{signedIn:!0,popularTasks:M}):D?e.jsx("div",{className:"paper-list",children:Array.from({length:6}).map((s,r)=>e.jsxs("div",{className:"paper-card",children:[e.jsx("div",{className:"paper-thumb-wrap",children:e.jsx(k,{className:"paper-thumb-skeleton"})}),e.jsxs("div",{className:"paper-body",style:{flex:1,gap:12},children:[e.jsx(k,{className:"h-6 w-3/4"}),e.jsx(k,{className:"h-4 w-1/2"}),e.jsx(k,{className:"h-12 w-full"})]})]},r))}):y.length===0?H?null:e.jsx("div",{className:"no-results",children:t?e.jsxs(e.Fragment,{children:["No papers from your follows match these filters. Widen the date range, or follow more from ",e.jsx(p,{to:"/tasks",children:"tasks"}),", ",e.jsx(p,{to:"/methods",children:"methods"}),", benchmark, author, or organization pages."]}):"No papers in this window."}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"paper-list",children:y.map((s,r)=>e.jsx(de,{paper:s,rank:r+1},s.id))}),e.jsx("div",{ref:i,style:{height:1}}),x.isFetchingNextPage&&e.jsx("div",{style:{padding:"20px 0",textAlign:"center",color:"var(--ink-faint)"},children:"Loading more…"})]})]})]})]})]})};export{qe as AskAssistant,ms as default};
assets/FollowingView-JS3HLSja.js DELETED
@@ -1 +0,0 @@
1
- import{j as o}from"./index-CcJ6cWma.js";import r from"./FeedView-tDL-q83T.js";import"./colors-DCzRcDI4.js";import"./mail-BlXkX--v.js";import"./plus-CNhFESYj.js";import"./research-1Dm22Eft.js";import"./components-Bax1_3qI.js";import"./paperQueryKeys-BP2E-0yf.js";import"./LatexTitle-hDpJaCcC.js";import"./papers-CClaKvmL.js";import"./safeExternalHref-CkBrsh84.js";import"./AgentLogos-X0gceHNa.js";import"./PaperFeedFilters-DejcdS4D.js";import"./PaperDateFilter-_7LVshRy.js";import"./popover-CRugk4PC.js";import"./chatLaunch-BWQHjZ_V.js";import"./chat-CmC2kF8c.js";import"./chevron-down-DJZrO8F3.js";import"./useQuery-D3-GqcPN.js";import"./catalog-B7hp4mKD.js";import"./chatPrompts-DypmWIqx.js";import"./usePapers-TCIcWoUA.js";import"./useInfiniteQuery-CFy22PuG.js";import"./useIntersectionObserver-DtY8SYYt.js";import"./skeleton-B-mlrgWO.js";import"./alert-CMODHIPT.js";function y(){return o.jsx(r,{following:!0})}export{y as default};
 
 
assets/FollowingView-K4wtbnIU.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{j as o}from"./index-B9MfhMLC.js";import r from"./FeedView-CKzkkGT3.js";import"./colors-BCIVIuvj.js";import"./mail-BizcmKOf.js";import"./plus-BZFi6ZWf.js";import"./research-DbRWvLsz.js";import"./components-BZrNefuY.js";import"./paperQueryKeys-BP2E-0yf.js";import"./LatexTitle-DeUmWtI2.js";import"./papers-BGvqL27Z.js";import"./safeExternalHref-CkBrsh84.js";import"./AgentLogos-iXpPIhF4.js";import"./PaperFeedFilters-DuB_em33.js";import"./PaperDateFilter-D1l9Effu.js";import"./popover-UrZdfRNz.js";import"./chatLaunch-CsBovBmE.js";import"./chat-BZn2Yz-P.js";import"./chevron-down-hgezkIWy.js";import"./useQuery-Bx81pmgm.js";import"./catalog-BqDz3O_s.js";import"./chatPrompts-DypmWIqx.js";import"./usePapers-DP7fFbrs.js";import"./useInfiniteQuery-4Zdqd3L2.js";import"./useIntersectionObserver-Dg35i96T.js";import"./skeleton-BcfKeAOl.js";import"./alert-Bg2LnrDJ.js";function y(){return o.jsx(r,{following:!0})}export{y as default};
assets/{FrameworksIndexView-BN7MFr6Z.js → FrameworksIndexView-CZN5tVDP.js} RENAMED
@@ -1 +1 @@
1
- import{b as d,j as e,L as o,F as m}from"./index-CcJ6cWma.js";import{u as p}from"./useQuery-D3-GqcPN.js";import{I as h}from"./components-Bax1_3qI.js";import{c as u}from"./catalog-B7hp4mKD.js";import{c as g,h as f}from"./colors-DCzRcDI4.js";import"./paperQueryKeys-BP2E-0yf.js";import"./LatexTitle-hDpJaCcC.js";import"./papers-CClaKvmL.js";import"./safeExternalHref-CkBrsh84.js";const x={gpu:"GPU",cpu:"CPU",apple:"Apple silicon"},j={display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:24,paddingBottom:12,borderBottom:"1px solid var(--hairline-strong)"},k={fontFamily:"var(--serif)",fontSize:26,fontWeight:500,letterSpacing:"-0.02em",marginBottom:4},_={fontFamily:"var(--serif)",fontStyle:"italic",fontSize:13,color:"var(--ink-soft)"},v={fontFamily:"var(--mono)",fontSize:13,fontWeight:600,letterSpacing:"0.04em",textTransform:"uppercase",color:"var(--ink)",marginBottom:6},b=({platform:r})=>{const n=g(f(r));return e.jsx("span",{className:"framework-platform-chip",style:{background:n.bg,color:n.text},children:x[r]})},w=({framework:r})=>{const n=d(),l=`/papers?framework=${encodeURIComponent(r.slug)}`;return e.jsxs("article",{id:`framework-${r.slug}`,className:"framework-card framework-card-clickable",role:"link",tabIndex:0,"aria-label":`View papers implemented by ${r.name}`,onClick:a=>{a.target.closest("a, button")||n(l)},onKeyDown:a=>{a.target===a.currentTarget&&(a.key==="Enter"||a.key===" ")&&(a.preventDefault(),n(l))},children:[e.jsxs("div",{className:"framework-card-head",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"framework-card-name",children:r.name}),r.organization_name&&e.jsx("div",{className:"framework-card-org",children:r.organization_name})]}),r.platforms&&r.platforms.length>0&&e.jsx("div",{className:"framework-platform-row",children:r.platforms.map(a=>e.jsx(b,{platform:a},a))})]}),e.jsx("p",{className:"framework-card-desc",children:r.description}),r.when_to_use&&e.jsxs("div",{className:"framework-card-when",children:[e.jsx("span",{className:"framework-card-when-label",children:"When to use"}),r.when_to_use]}),(r.github_url||r.docs_url||r.introducing_paper_arxiv_id)&&e.jsxs("div",{className:"framework-card-links",children:[r.introducing_paper_arxiv_id&&e.jsx(o,{to:`/paper/${r.introducing_paper_arxiv_id}`,className:"framework-link",children:"Introducing paper"}),r.github_url&&r.paper_count>0&&e.jsxs(o,{to:l,className:"framework-link",children:["Implements ",r.paper_count," ",r.paper_count===1?"paper":"papers"]}),r.github_url&&r.paper_count===0&&e.jsx("span",{className:"framework-link framework-link-disabled","aria-disabled":"true",children:"Implements 0 papers"}),r.github_url&&e.jsxs("a",{href:r.github_url,target:"_blank",rel:"noopener noreferrer",className:"framework-link",children:[e.jsx(h,{name:"github",size:13}),"GitHub"]}),r.docs_url&&r.docs_url!==r.github_url&&e.jsx("a",{href:r.docs_url,target:"_blank",rel:"noopener noreferrer",className:"framework-link",children:"Docs"})]})]})},E=()=>{var a;const r=p({queryKey:["framework-catalog"],queryFn:()=>u.frameworkCatalog()}),n=((a=r.data)==null?void 0:a.domains)??[],l=n.reduce((i,s)=>i+s.categories.reduce((t,c)=>t+c.frameworks.length,0),0);return m.useEffect(()=>{var s;const i=window.location.hash.slice(1);i&&((s=document.getElementById(i))==null||s.scrollIntoView())},[r.data]),e.jsxs("div",{className:"page",children:[e.jsx("div",{className:"feed-header",children:e.jsxs("div",{children:[e.jsxs("h1",{className:"feed-title",children:["AI ",e.jsx("em",{children:"Frameworks"})]}),e.jsx("div",{className:"feed-subtitle",children:"Curated libraries and tools to run, serve, and train models — pick the right stack for your hardware and workload."})]})}),r.isLoading&&e.jsx("div",{className:"empty",children:"Loading frameworks…"}),r.isError&&e.jsx("div",{className:"empty",children:"Could not load frameworks."}),n.map(i=>e.jsxs("section",{style:{marginBottom:56},children:[e.jsxs("div",{style:j,children:[e.jsxs("div",{children:[e.jsx("h2",{style:k,children:i.name}),e.jsx("div",{style:_,children:i.description})]}),e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",whiteSpace:"nowrap"},children:[i.categories.length," ",i.categories.length===1?"category":"categories"," ·"," ",i.categories.reduce((s,t)=>s+t.frameworks.length,0)," frameworks"]})]}),i.categories.map(s=>e.jsxs("div",{className:"framework-category",children:[e.jsxs("div",{className:"framework-category-head",children:[e.jsxs("div",{children:[e.jsx("h3",{style:v,children:s.name}),s.description&&e.jsx("p",{className:"framework-category-blurb",children:s.description}),s.guide_url&&e.jsxs("a",{href:s.guide_url,target:"_blank",rel:"noopener noreferrer",className:"framework-guide-link",children:[s.guide_label??"Read guide"," →"]})]}),e.jsxs("div",{className:"framework-category-meta",children:[s.frameworks.length," ",s.frameworks.length===1?"framework":"frameworks"]})]}),e.jsx("div",{className:"framework-grid",children:s.frameworks.map(t=>e.jsx(w,{framework:t},t.slug))})]},s.slug))]},i.slug)),e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",marginTop:8},children:[l," frameworks across ",n.length," ",n.length===1?"domain":"domains",". More areas coming soon."]})]})};export{w as FrameworkCard,E as default};
 
1
+ import{b as d,j as e,L as o,F as m}from"./index-B9MfhMLC.js";import{u as p}from"./useQuery-Bx81pmgm.js";import{I as h}from"./components-BZrNefuY.js";import{c as u}from"./catalog-BqDz3O_s.js";import{c as g,h as f}from"./colors-BCIVIuvj.js";import"./paperQueryKeys-BP2E-0yf.js";import"./LatexTitle-DeUmWtI2.js";import"./papers-BGvqL27Z.js";import"./safeExternalHref-CkBrsh84.js";const x={gpu:"GPU",cpu:"CPU",apple:"Apple silicon"},j={display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:24,paddingBottom:12,borderBottom:"1px solid var(--hairline-strong)"},k={fontFamily:"var(--serif)",fontSize:26,fontWeight:500,letterSpacing:"-0.02em",marginBottom:4},_={fontFamily:"var(--serif)",fontStyle:"italic",fontSize:13,color:"var(--ink-soft)"},v={fontFamily:"var(--mono)",fontSize:13,fontWeight:600,letterSpacing:"0.04em",textTransform:"uppercase",color:"var(--ink)",marginBottom:6},b=({platform:r})=>{const n=g(f(r));return e.jsx("span",{className:"framework-platform-chip",style:{background:n.bg,color:n.text},children:x[r]})},w=({framework:r})=>{const n=d(),l=`/papers?framework=${encodeURIComponent(r.slug)}`;return e.jsxs("article",{id:`framework-${r.slug}`,className:"framework-card framework-card-clickable",role:"link",tabIndex:0,"aria-label":`View papers implemented by ${r.name}`,onClick:a=>{a.target.closest("a, button")||n(l)},onKeyDown:a=>{a.target===a.currentTarget&&(a.key==="Enter"||a.key===" ")&&(a.preventDefault(),n(l))},children:[e.jsxs("div",{className:"framework-card-head",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"framework-card-name",children:r.name}),r.organization_name&&e.jsx("div",{className:"framework-card-org",children:r.organization_name})]}),r.platforms&&r.platforms.length>0&&e.jsx("div",{className:"framework-platform-row",children:r.platforms.map(a=>e.jsx(b,{platform:a},a))})]}),e.jsx("p",{className:"framework-card-desc",children:r.description}),r.when_to_use&&e.jsxs("div",{className:"framework-card-when",children:[e.jsx("span",{className:"framework-card-when-label",children:"When to use"}),r.when_to_use]}),(r.github_url||r.docs_url||r.introducing_paper_arxiv_id)&&e.jsxs("div",{className:"framework-card-links",children:[r.introducing_paper_arxiv_id&&e.jsx(o,{to:`/paper/${r.introducing_paper_arxiv_id}`,className:"framework-link",children:"Introducing paper"}),r.github_url&&r.paper_count>0&&e.jsxs(o,{to:l,className:"framework-link",children:["Implements ",r.paper_count," ",r.paper_count===1?"paper":"papers"]}),r.github_url&&r.paper_count===0&&e.jsx("span",{className:"framework-link framework-link-disabled","aria-disabled":"true",children:"Implements 0 papers"}),r.github_url&&e.jsxs("a",{href:r.github_url,target:"_blank",rel:"noopener noreferrer",className:"framework-link",children:[e.jsx(h,{name:"github",size:13}),"GitHub"]}),r.docs_url&&r.docs_url!==r.github_url&&e.jsx("a",{href:r.docs_url,target:"_blank",rel:"noopener noreferrer",className:"framework-link",children:"Docs"})]})]})},E=()=>{var a;const r=p({queryKey:["framework-catalog"],queryFn:()=>u.frameworkCatalog()}),n=((a=r.data)==null?void 0:a.domains)??[],l=n.reduce((i,s)=>i+s.categories.reduce((t,c)=>t+c.frameworks.length,0),0);return m.useEffect(()=>{var s;const i=window.location.hash.slice(1);i&&((s=document.getElementById(i))==null||s.scrollIntoView())},[r.data]),e.jsxs("div",{className:"page",children:[e.jsx("div",{className:"feed-header",children:e.jsxs("div",{children:[e.jsxs("h1",{className:"feed-title",children:["AI ",e.jsx("em",{children:"Frameworks"})]}),e.jsx("div",{className:"feed-subtitle",children:"Curated libraries and tools to run, serve, and train models — pick the right stack for your hardware and workload."})]})}),r.isLoading&&e.jsx("div",{className:"empty",children:"Loading frameworks…"}),r.isError&&e.jsx("div",{className:"empty",children:"Could not load frameworks."}),n.map(i=>e.jsxs("section",{style:{marginBottom:56},children:[e.jsxs("div",{style:j,children:[e.jsxs("div",{children:[e.jsx("h2",{style:k,children:i.name}),e.jsx("div",{style:_,children:i.description})]}),e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",whiteSpace:"nowrap"},children:[i.categories.length," ",i.categories.length===1?"category":"categories"," ·"," ",i.categories.reduce((s,t)=>s+t.frameworks.length,0)," frameworks"]})]}),i.categories.map(s=>e.jsxs("div",{className:"framework-category",children:[e.jsxs("div",{className:"framework-category-head",children:[e.jsxs("div",{children:[e.jsx("h3",{style:v,children:s.name}),s.description&&e.jsx("p",{className:"framework-category-blurb",children:s.description}),s.guide_url&&e.jsxs("a",{href:s.guide_url,target:"_blank",rel:"noopener noreferrer",className:"framework-guide-link",children:[s.guide_label??"Read guide"," →"]})]}),e.jsxs("div",{className:"framework-category-meta",children:[s.frameworks.length," ",s.frameworks.length===1?"framework":"frameworks"]})]}),e.jsx("div",{className:"framework-grid",children:s.frameworks.map(t=>e.jsx(w,{framework:t},t.slug))})]},s.slug))]},i.slug)),e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",marginTop:8},children:[l," frameworks across ",n.length," ",n.length===1?"domain":"domains",". More areas coming soon."]})]})};export{w as FrameworkCard,E as default};
assets/{LatexTitle-hDpJaCcC.js → LatexTitle-DeUmWtI2.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,_ as L}from"./index-CcJ6cWma.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,_ as L}from"./index-B9MfhMLC.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-Day0Kgef.js → MarkdownText-BAxpQ8kL.js} RENAMED
@@ -1 +1 @@
1
- import{n as l,j as s,L as u}from"./index-CcJ6cWma.js";/* empty css */import{r as p,a as m,P as h}from"./PaperPreviewLink-o7boC8db.js";import{M as d}from"./index-VElAzfws.js";import{r as w}from"./index-CVaIZy6l.js";const x=new Set(["paperswithcode.co","www.paperswithcode.co","localhost","127.0.0.1","167.235.148.241"]),P=["/methods","/paper","/papers","/tasks","/benchmark","/conferences"];function f(n,o=window.location.origin){if(!n)return null;let t;if(n.startsWith("/"))t=n;else try{const e=new URL(n,o);if(!x.has(e.hostname))return null;t=`${e.pathname}${e.search}${e.hash}`}catch{return null}const r=t.split(/[?#]/,1)[0];return P.some(e=>r===e||r.startsWith(`${e}/`))?t:null}function k(n){const t=n.split(/[?#]/,1)[0].match(/^\/papers?\/([^/]+)$/);if(!t||t[1].includes("%"))return null;const r=t[1],e=/^\d{4}[.-]\d{4,5}(?:v\d+)?$/.test(r),a=/^[1-9]\d*$/.test(r);return!e&&!a?null:l(r)}const L=({text:n,className:o=""})=>s.jsx("div",{className:o,children:s.jsx(d,{remarkPlugins:[w,m],rehypePlugins:[p],components:{a:({href:t,children:r,node:e,...a})=>{const i=f(t);if(i){const c=k(i);return c?s.jsx(h,{routeId:c,to:i,...a,children:r}):s.jsx(u,{to:i,...a,children:r})}return s.jsx("a",{href:t,target:"_blank",rel:"noopener noreferrer",...a,children:r})}},children:n})});export{L as M,f as r};
 
1
+ import{n as l,j as s,L as u}from"./index-B9MfhMLC.js";/* empty css */import{r as p,a as m,P as h}from"./PaperPreviewLink-B3LP-qo2.js";import{M as d}from"./index-10yxmORR.js";import{r as w}from"./index-CSRWQTrf.js";const x=new Set(["paperswithcode.co","www.paperswithcode.co","localhost","127.0.0.1","167.235.148.241"]),P=["/methods","/paper","/papers","/tasks","/benchmark","/conferences"];function f(n,o=window.location.origin){if(!n)return null;let t;if(n.startsWith("/"))t=n;else try{const e=new URL(n,o);if(!x.has(e.hostname))return null;t=`${e.pathname}${e.search}${e.hash}`}catch{return null}const r=t.split(/[?#]/,1)[0];return P.some(e=>r===e||r.startsWith(`${e}/`))?t:null}function k(n){const t=n.split(/[?#]/,1)[0].match(/^\/papers?\/([^/]+)$/);if(!t||t[1].includes("%"))return null;const r=t[1],e=/^\d{4}[.-]\d{4,5}(?:v\d+)?$/.test(r),a=/^[1-9]\d*$/.test(r);return!e&&!a?null:l(r)}const L=({text:n,className:o=""})=>s.jsx("div",{className:o,children:s.jsx(d,{remarkPlugins:[w,m],rehypePlugins:[p],components:{a:({href:t,children:r,node:e,...a})=>{const i=f(t);if(i){const c=k(i);return c?s.jsx(h,{routeId:c,to:i,...a,children:r}):s.jsx(u,{to:i,...a,children:r})}return s.jsx("a",{href:t,target:"_blank",rel:"noopener noreferrer",...a,children:r})}},children:n})});export{L as M,f as r};
assets/{McpView-BYsLwetm.js → McpView-bG-GKlVn.js} RENAMED
@@ -1 +1 @@
1
- import{F as m,j as e,l as b}from"./index-CcJ6cWma.js";import{u as x}from"./useQuery-D3-GqcPN.js";import{f as j,D as f}from"./latexPlainText-DI8YEXVe.js";import{q as y}from"./queryOptions-C9woPjwX.js";import{E as i}from"./external-link-BuxK9KNv.js";import{C as g}from"./copy-C-Vd1dCk.js";const h="https://paperswithcode.co/mcp",v="https://staging.paperswithcode.co/mcp";function u(s){const a=typeof window>"u"?void 0:window.location;return a?a.hostname==="staging.paperswithcode.co"?v:a.hostname==="paperswithcode.co"||a.hostname==="www.paperswithcode.co"?h:`${a.origin.replace(/\/$/,"")}/mcp`:h}function w(s){if(!s||typeof s!="object"||s.status!=="ok"||s.service!=="pwc-mcp"||typeof s.version!="string"||typeof s.protocol!="string")throw new Error("MCP health response is invalid");return s}async function k(s){const a=new AbortController,c=()=>a.abort();s==null||s.addEventListener("abort",c,{once:!0});const o=window.setTimeout(c,5e3);try{const t=await fetch(`${u()}/health`,{headers:{Accept:"application/json"},signal:a.signal,credentials:"omit"});if(!t.ok)throw new Error("MCP service is unavailable");return w(await t.json())}finally{window.clearTimeout(o),s==null||s.removeEventListener("abort",c)}}const C=()=>y({queryKey:["mcp","health"],queryFn:({signal:s})=>k(s),retry:!1,staleTime:3e4,refetchInterval:6e4,refetchOnWindowFocus:!1}),N=[["search_papers","Search by topic, title, author, or arXiv ID."],["list_papers","Filter and order papers by taxonomy, venue, date, or organization."],["get_paper_info","Read canonical metadata, authors, abstract, links, and resources."],["read_paper","Read stored paper Markdown with safe continuation for long papers."],["list_recent_papers","Browse the most recently indexed research."],["get_related_papers","Find related work already indexed in the catalogue."],["list_trending_papers","Discover papers with recent repository momentum."],["get_paper_evaluations","Inspect benchmark results reported by one paper."],["get_paper_lineage","Follow explicit predecessor and successor relationships."],["list_tasks","Search tasks and retrieve stable slugs for exact lookup."],["get_task","Inspect a research task and its benchmark coverage."],["list_methods","Search methods and retrieve stable slugs for exact lookup."],["get_method","Inspect a method, its source paper, and catalogue metadata."],["list_conferences","Browse conferences with imported papers."],["get_conference","Inspect one exact conference edition."],["list_organizations","Browse research organizations."],["get_organization","Inspect one exact research organization."],["list_frameworks","Browse frameworks by domain, category, or platform."],["get_framework","Inspect one exact research framework."],["list_benchmarks","Browse and filter benchmark leaderboards."],["get_benchmark","Read one benchmark, metrics, datasets, and leading results."]],P=["pwc://papers/{paper}","pwc://papers/{paper}/markdown","pwc://tasks/{task}","pwc://benchmarks/{benchmark}"],_=["Find recent papers on test-time compute and summarize the main approaches.","Compare the methods and reported benchmarks in these three arXiv papers.","What are the leading benchmarks for text-to-video generation?","Trace the predecessor and successor papers for Mamba."],d=[{key:"chatgpt",label:"ChatGPT",summary:"In workspace developer settings, add a custom MCP app and paste the server URL. Availability and admin approval vary by plan."},{key:"claude",label:"Claude",summary:"Open Settings → Connectors → Add custom connector, paste the URL, then enable Papers With Code from Search and tools."},{key:"claude-code",label:"Claude Code",summary:"Add the anonymous Streamable HTTP server from a terminal.",code:s=>`claude mcp add --transport http paperswithcode ${s}`},{key:"cursor",label:"Cursor",summary:"Add this entry to your project or user MCP configuration.",code:s=>JSON.stringify({mcpServers:{paperswithcode:{url:s}}},null,2)},{key:"vscode",label:"VS Code",summary:"Add this Streamable HTTP server to .vscode/mcp.json.",code:s=>JSON.stringify({servers:{paperswithcode:{type:"http",url:s}}},null,2)},{key:"generic",label:"Generic",summary:"Configure an anonymous, stateless Streamable HTTP server using the URL below. No API key or OAuth flow is required."}],l=({value:s,label:a})=>{const[c,o]=m.useState(!1),t=async()=>{var n;(n=navigator.clipboard)!=null&&n.writeText&&(await navigator.clipboard.writeText(s),o(!0),window.setTimeout(()=>o(!1),1500))};return e.jsxs("button",{className:"action-btn mcp-copy",type:"button",onClick:()=>void t(),"aria-label":a,children:[c?e.jsx(b,{size:16,"aria-hidden":!0}):e.jsx(g,{size:16,"aria-hidden":!0}),c?"Copied":"Copy"]})},L=()=>{var n;const s=u(),a=x(C()),[c,o]=m.useState("chatgpt"),t=d.find(r=>r.key===c)??d[0];return m.useEffect(()=>(document.title=j("MCP Server"),()=>{document.title=f}),[]),e.jsxs("article",{className:"page mcp-page",children:[e.jsxs("header",{className:"mcp-hero",children:[e.jsxs("div",{children:[e.jsx("p",{className:"sidebar-label mcp-kicker",children:"Model Context Protocol"}),e.jsx("h1",{className:"feed-title",children:"Use Papers With Code in your AI assistant"}),e.jsx("p",{className:"mcp-lede",children:"Search research, inspect methods and benchmarks, and read complete papers through one anonymous, read-only MCP connection."}),e.jsxs("div",{className:"mcp-status","aria-live":"polite",children:[e.jsx("span",{className:a.isSuccess?"is-up":"is-unknown","aria-hidden":!0}),a.isSuccess?"Operational":"Status unavailable",a.data?` · v${a.data.version}`:""]})]}),e.jsxs("div",{className:"mcp-endpoint-card",children:[e.jsx("span",{children:"Remote MCP URL"}),e.jsx("code",{children:s}),e.jsx(l,{value:s,label:"Copy MCP server URL"})]})]}),e.jsxs("section",{className:"mcp-section","aria-labelledby":"mcp-connect",children:[e.jsxs("div",{className:"mcp-section-heading",children:[e.jsx("p",{className:"sidebar-label",children:"Connect"}),e.jsx("h2",{id:"mcp-connect",children:"One URL, your preferred client"}),e.jsx("span",{children:"Setup matrix reviewed September 13, 2026; staging qualification pending."})]}),e.jsx("div",{className:"mcp-client-tabs",role:"tablist","aria-label":"MCP client setup",children:d.map(r=>e.jsx("button",{type:"button",role:"tab","aria-selected":c===r.key,onClick:()=>o(r.key),children:r.label},r.key))}),e.jsxs("div",{className:"mcp-setup",role:"tabpanel",children:[e.jsx("p",{children:t.summary}),t.code?e.jsxs("div",{className:"mcp-code-row",children:[e.jsx("pre",{children:e.jsx("code",{children:t.code(s)})}),e.jsx(l,{value:t.code(s),label:`Copy ${t.label} setup`})]}):e.jsxs("div",{className:"mcp-code-row",children:[e.jsx("pre",{children:e.jsx("code",{children:s})}),e.jsx(l,{value:s,label:`Copy ${t.label} endpoint`})]})]})]}),e.jsxs("section",{className:"mcp-section","aria-labelledby":"mcp-capabilities",children:[e.jsxs("div",{className:"mcp-section-heading",children:[e.jsx("p",{className:"sidebar-label",children:"Capabilities"}),e.jsx("h2",{id:"mcp-capabilities",children:"Research context, structured for assistants"})]}),e.jsx("div",{className:"mcp-capability-grid",children:[["Discover","Search recent and established work with catalogue filters."],["Read","Continue through long stored papers without presenting a partial document as complete."],["Connect","Explore related work, paper lineage, tasks, and methods."],["Compare","Inspect benchmarks, datasets, metrics, and reported evaluations."]].map(([r,p])=>e.jsxs("div",{children:[e.jsx("h3",{children:r}),e.jsx("p",{children:p})]},r))})]}),e.jsxs("section",{className:"mcp-section","aria-labelledby":"mcp-tools",children:[e.jsxs("div",{className:"mcp-section-heading",children:[e.jsx("p",{className:"sidebar-label",children:"Catalogue"}),e.jsx("h2",{id:"mcp-tools",children:"Twenty-one focused, read-only tools"})]}),e.jsx("div",{className:"mcp-tool-grid",children:N.map(([r,p])=>e.jsxs("div",{className:"mcp-tool",children:[e.jsx("code",{children:r}),e.jsx("p",{children:p})]},r))}),e.jsx("h3",{className:"mcp-subheading",children:"Resource templates"}),e.jsx("div",{className:"mcp-resource-list",children:P.map(r=>e.jsx("code",{children:r},r))})]}),e.jsxs("section",{className:"mcp-section","aria-labelledby":"mcp-prompts",children:[e.jsxs("div",{className:"mcp-section-heading",children:[e.jsx("p",{className:"sidebar-label",children:"Try asking"}),e.jsx("h2",{id:"mcp-prompts",children:"Prompts that start useful research"})]}),e.jsx("div",{className:"mcp-prompt-list",children:_.map(r=>e.jsxs("div",{children:[e.jsx("p",{children:r}),e.jsx(l,{value:r,label:"Copy example prompt"})]},r))})]}),e.jsxs("section",{className:"mcp-section mcp-notes","aria-labelledby":"mcp-limits",children:[e.jsxs("div",{children:[e.jsx("p",{className:"sidebar-label mcp-kicker",children:"Limits & privacy"}),e.jsx("h2",{id:"mcp-limits",children:"Public by design"}),e.jsx("p",{children:"No account, API key, or write access. Fair-use limits are 60 total requests per minute, 10 semantic searches per minute, four concurrent requests per client, and 25 list results per call."}),e.jsx("p",{children:"MCP telemetry retains tool name, status, latency, response size, protocol, and server version—not prompts, paper IDs, cursors, resource URIs, raw IPs, authorization values, or bodies. Catalogue infrastructure has its own operational logging policy."})]}),e.jsxs("div",{children:[e.jsx("p",{className:"sidebar-label mcp-kicker",children:"Protocol & troubleshooting"}),e.jsx("h2",{children:"Streamable HTTP"}),e.jsxs("p",{children:["Primary protocol: ",((n=a.data)==null?void 0:n.protocol)??"verified during connection setup",". If setup fails, confirm your client supports remote Streamable HTTP, that custom servers are enabled by your workspace administrator, and that you pasted the URL exactly."]}),e.jsxs("nav",{className:"mcp-links","aria-label":"MCP documentation links",children:[e.jsxs("a",{href:"https://github.com/huggingface/pwc-cli",target:"_blank",rel:"noreferrer",children:["CLI repository ",e.jsx(i,{size:13})]}),e.jsxs("a",{href:"https://modelcontextprotocol.io/docs/2026-07-28/learn/server-concepts",target:"_blank",rel:"noreferrer",children:["MCP specification ",e.jsx(i,{size:13})]}),e.jsxs("a",{href:"/docs",target:"_blank",rel:"noreferrer",children:["Public API ",e.jsx(i,{size:13})]}),e.jsxs("a",{href:"/mcp/schema",target:"_blank",rel:"noreferrer",children:["MCP tool schema ",e.jsx(i,{size:13})]}),e.jsxs("a",{href:"/llms.txt",target:"_blank",rel:"noreferrer",children:["llms.txt ",e.jsx(i,{size:13})]})]})]})]})]})};export{L as default};
 
1
+ import{F as m,j as e,l as b}from"./index-B9MfhMLC.js";import{u as x}from"./useQuery-Bx81pmgm.js";import{f as j,D as f}from"./latexPlainText-DI8YEXVe.js";import{q as y}from"./queryOptions-C9woPjwX.js";import{E as i}from"./external-link-tLC4XD6r.js";import{C as g}from"./copy-407Yr7lh.js";const h="https://paperswithcode.co/mcp",v="https://staging.paperswithcode.co/mcp";function u(s){const a=typeof window>"u"?void 0:window.location;return a?a.hostname==="staging.paperswithcode.co"?v:a.hostname==="paperswithcode.co"||a.hostname==="www.paperswithcode.co"?h:`${a.origin.replace(/\/$/,"")}/mcp`:h}function w(s){if(!s||typeof s!="object"||s.status!=="ok"||s.service!=="pwc-mcp"||typeof s.version!="string"||typeof s.protocol!="string")throw new Error("MCP health response is invalid");return s}async function k(s){const a=new AbortController,c=()=>a.abort();s==null||s.addEventListener("abort",c,{once:!0});const o=window.setTimeout(c,5e3);try{const t=await fetch(`${u()}/health`,{headers:{Accept:"application/json"},signal:a.signal,credentials:"omit"});if(!t.ok)throw new Error("MCP service is unavailable");return w(await t.json())}finally{window.clearTimeout(o),s==null||s.removeEventListener("abort",c)}}const C=()=>y({queryKey:["mcp","health"],queryFn:({signal:s})=>k(s),retry:!1,staleTime:3e4,refetchInterval:6e4,refetchOnWindowFocus:!1}),N=[["search_papers","Search by topic, title, author, or arXiv ID."],["list_papers","Filter and order papers by taxonomy, venue, date, or organization."],["get_paper_info","Read canonical metadata, authors, abstract, links, and resources."],["read_paper","Read stored paper Markdown with safe continuation for long papers."],["list_recent_papers","Browse the most recently indexed research."],["get_related_papers","Find related work already indexed in the catalogue."],["list_trending_papers","Discover papers with recent repository momentum."],["get_paper_evaluations","Inspect benchmark results reported by one paper."],["get_paper_lineage","Follow explicit predecessor and successor relationships."],["list_tasks","Search tasks and retrieve stable slugs for exact lookup."],["get_task","Inspect a research task and its benchmark coverage."],["list_methods","Search methods and retrieve stable slugs for exact lookup."],["get_method","Inspect a method, its source paper, and catalogue metadata."],["list_conferences","Browse conferences with imported papers."],["get_conference","Inspect one exact conference edition."],["list_organizations","Browse research organizations."],["get_organization","Inspect one exact research organization."],["list_frameworks","Browse frameworks by domain, category, or platform."],["get_framework","Inspect one exact research framework."],["list_benchmarks","Browse and filter benchmark leaderboards."],["get_benchmark","Read one benchmark, metrics, datasets, and leading results."]],P=["pwc://papers/{paper}","pwc://papers/{paper}/markdown","pwc://tasks/{task}","pwc://benchmarks/{benchmark}"],_=["Find recent papers on test-time compute and summarize the main approaches.","Compare the methods and reported benchmarks in these three arXiv papers.","What are the leading benchmarks for text-to-video generation?","Trace the predecessor and successor papers for Mamba."],d=[{key:"chatgpt",label:"ChatGPT",summary:"In workspace developer settings, add a custom MCP app and paste the server URL. Availability and admin approval vary by plan."},{key:"claude",label:"Claude",summary:"Open Settings → Connectors → Add custom connector, paste the URL, then enable Papers With Code from Search and tools."},{key:"claude-code",label:"Claude Code",summary:"Add the anonymous Streamable HTTP server from a terminal.",code:s=>`claude mcp add --transport http paperswithcode ${s}`},{key:"cursor",label:"Cursor",summary:"Add this entry to your project or user MCP configuration.",code:s=>JSON.stringify({mcpServers:{paperswithcode:{url:s}}},null,2)},{key:"vscode",label:"VS Code",summary:"Add this Streamable HTTP server to .vscode/mcp.json.",code:s=>JSON.stringify({servers:{paperswithcode:{type:"http",url:s}}},null,2)},{key:"generic",label:"Generic",summary:"Configure an anonymous, stateless Streamable HTTP server using the URL below. No API key or OAuth flow is required."}],l=({value:s,label:a})=>{const[c,o]=m.useState(!1),t=async()=>{var n;(n=navigator.clipboard)!=null&&n.writeText&&(await navigator.clipboard.writeText(s),o(!0),window.setTimeout(()=>o(!1),1500))};return e.jsxs("button",{className:"action-btn mcp-copy",type:"button",onClick:()=>void t(),"aria-label":a,children:[c?e.jsx(b,{size:16,"aria-hidden":!0}):e.jsx(g,{size:16,"aria-hidden":!0}),c?"Copied":"Copy"]})},L=()=>{var n;const s=u(),a=x(C()),[c,o]=m.useState("chatgpt"),t=d.find(r=>r.key===c)??d[0];return m.useEffect(()=>(document.title=j("MCP Server"),()=>{document.title=f}),[]),e.jsxs("article",{className:"page mcp-page",children:[e.jsxs("header",{className:"mcp-hero",children:[e.jsxs("div",{children:[e.jsx("p",{className:"sidebar-label mcp-kicker",children:"Model Context Protocol"}),e.jsx("h1",{className:"feed-title",children:"Use Papers With Code in your AI assistant"}),e.jsx("p",{className:"mcp-lede",children:"Search research, inspect methods and benchmarks, and read complete papers through one anonymous, read-only MCP connection."}),e.jsxs("div",{className:"mcp-status","aria-live":"polite",children:[e.jsx("span",{className:a.isSuccess?"is-up":"is-unknown","aria-hidden":!0}),a.isSuccess?"Operational":"Status unavailable",a.data?` · v${a.data.version}`:""]})]}),e.jsxs("div",{className:"mcp-endpoint-card",children:[e.jsx("span",{children:"Remote MCP URL"}),e.jsx("code",{children:s}),e.jsx(l,{value:s,label:"Copy MCP server URL"})]})]}),e.jsxs("section",{className:"mcp-section","aria-labelledby":"mcp-connect",children:[e.jsxs("div",{className:"mcp-section-heading",children:[e.jsx("p",{className:"sidebar-label",children:"Connect"}),e.jsx("h2",{id:"mcp-connect",children:"One URL, your preferred client"}),e.jsx("span",{children:"Setup matrix reviewed September 13, 2026; staging qualification pending."})]}),e.jsx("div",{className:"mcp-client-tabs",role:"tablist","aria-label":"MCP client setup",children:d.map(r=>e.jsx("button",{type:"button",role:"tab","aria-selected":c===r.key,onClick:()=>o(r.key),children:r.label},r.key))}),e.jsxs("div",{className:"mcp-setup",role:"tabpanel",children:[e.jsx("p",{children:t.summary}),t.code?e.jsxs("div",{className:"mcp-code-row",children:[e.jsx("pre",{children:e.jsx("code",{children:t.code(s)})}),e.jsx(l,{value:t.code(s),label:`Copy ${t.label} setup`})]}):e.jsxs("div",{className:"mcp-code-row",children:[e.jsx("pre",{children:e.jsx("code",{children:s})}),e.jsx(l,{value:s,label:`Copy ${t.label} endpoint`})]})]})]}),e.jsxs("section",{className:"mcp-section","aria-labelledby":"mcp-capabilities",children:[e.jsxs("div",{className:"mcp-section-heading",children:[e.jsx("p",{className:"sidebar-label",children:"Capabilities"}),e.jsx("h2",{id:"mcp-capabilities",children:"Research context, structured for assistants"})]}),e.jsx("div",{className:"mcp-capability-grid",children:[["Discover","Search recent and established work with catalogue filters."],["Read","Continue through long stored papers without presenting a partial document as complete."],["Connect","Explore related work, paper lineage, tasks, and methods."],["Compare","Inspect benchmarks, datasets, metrics, and reported evaluations."]].map(([r,p])=>e.jsxs("div",{children:[e.jsx("h3",{children:r}),e.jsx("p",{children:p})]},r))})]}),e.jsxs("section",{className:"mcp-section","aria-labelledby":"mcp-tools",children:[e.jsxs("div",{className:"mcp-section-heading",children:[e.jsx("p",{className:"sidebar-label",children:"Catalogue"}),e.jsx("h2",{id:"mcp-tools",children:"Twenty-one focused, read-only tools"})]}),e.jsx("div",{className:"mcp-tool-grid",children:N.map(([r,p])=>e.jsxs("div",{className:"mcp-tool",children:[e.jsx("code",{children:r}),e.jsx("p",{children:p})]},r))}),e.jsx("h3",{className:"mcp-subheading",children:"Resource templates"}),e.jsx("div",{className:"mcp-resource-list",children:P.map(r=>e.jsx("code",{children:r},r))})]}),e.jsxs("section",{className:"mcp-section","aria-labelledby":"mcp-prompts",children:[e.jsxs("div",{className:"mcp-section-heading",children:[e.jsx("p",{className:"sidebar-label",children:"Try asking"}),e.jsx("h2",{id:"mcp-prompts",children:"Prompts that start useful research"})]}),e.jsx("div",{className:"mcp-prompt-list",children:_.map(r=>e.jsxs("div",{children:[e.jsx("p",{children:r}),e.jsx(l,{value:r,label:"Copy example prompt"})]},r))})]}),e.jsxs("section",{className:"mcp-section mcp-notes","aria-labelledby":"mcp-limits",children:[e.jsxs("div",{children:[e.jsx("p",{className:"sidebar-label mcp-kicker",children:"Limits & privacy"}),e.jsx("h2",{id:"mcp-limits",children:"Public by design"}),e.jsx("p",{children:"No account, API key, or write access. Fair-use limits are 60 total requests per minute, 10 semantic searches per minute, four concurrent requests per client, and 25 list results per call."}),e.jsx("p",{children:"MCP telemetry retains tool name, status, latency, response size, protocol, and server version—not prompts, paper IDs, cursors, resource URIs, raw IPs, authorization values, or bodies. Catalogue infrastructure has its own operational logging policy."})]}),e.jsxs("div",{children:[e.jsx("p",{className:"sidebar-label mcp-kicker",children:"Protocol & troubleshooting"}),e.jsx("h2",{children:"Streamable HTTP"}),e.jsxs("p",{children:["Primary protocol: ",((n=a.data)==null?void 0:n.protocol)??"verified during connection setup",". If setup fails, confirm your client supports remote Streamable HTTP, that custom servers are enabled by your workspace administrator, and that you pasted the URL exactly."]}),e.jsxs("nav",{className:"mcp-links","aria-label":"MCP documentation links",children:[e.jsxs("a",{href:"https://github.com/huggingface/pwc-cli",target:"_blank",rel:"noreferrer",children:["CLI repository ",e.jsx(i,{size:13})]}),e.jsxs("a",{href:"https://modelcontextprotocol.io/docs/2026-07-28/learn/server-concepts",target:"_blank",rel:"noreferrer",children:["MCP specification ",e.jsx(i,{size:13})]}),e.jsxs("a",{href:"/docs",target:"_blank",rel:"noreferrer",children:["Public API ",e.jsx(i,{size:13})]}),e.jsxs("a",{href:"/mcp/schema",target:"_blank",rel:"noreferrer",children:["MCP tool schema ",e.jsx(i,{size:13})]}),e.jsxs("a",{href:"/llms.txt",target:"_blank",rel:"noreferrer",children:["llms.txt ",e.jsx(i,{size:13})]})]})]})]})]})};export{L as default};
assets/{MethodDetailView-F9pllNW2.js → MethodDetailView-D6J0H0lp.js} RENAMED
@@ -1 +1 @@
1
- import{j as e,r as A,u as Q,d as O,L,af as U}from"./index-CcJ6cWma.js";import{R as G}from"./ResearchFollowButton-B4KEpku3.js";import{p as W}from"./paperQueryKeys-BP2E-0yf.js";import{u as w}from"./useQuery-D3-GqcPN.js";import{u as Z}from"./useInfiniteQuery-CFy22PuG.js";import{M as V,P as X}from"./components-Bax1_3qI.js";import{P as Y}from"./PaperFeedFilters-DejcdS4D.js";import{a as J,P as ee,b as te}from"./PaperDateFilter-_7LVshRy.js";import{r as se,M as R}from"./MarkdownText-Day0Kgef.js";import{c as F}from"./catalog-B7hp4mKD.js";import{p as ae}from"./papers-CClaKvmL.js";import{s as re}from"./slug-BpH-Nkvz.js";import{t as ne}from"./colors-DCzRcDI4.js";import{u as ie}from"./useIntersectionObserver-DtY8SYYt.js";import{S as M}from"./skeleton-B-mlrgWO.js";import{A as le,a as oe}from"./alert-CMODHIPT.js";import{s as ce}from"./safeExternalHref-CkBrsh84.js";import"./useMutation-DPe9yGc6.js";import"./research-1Dm22Eft.js";import"./plus-CNhFESYj.js";import"./LatexTitle-hDpJaCcC.js";import"./popover-CRugk4PC.js";/* empty css */import"./PaperPreviewLink-o7boC8db.js";import"./index-VElAzfws.js";import"./index-CVaIZy6l.js";import"./katex-DkKDou_j.js";import"./hover-card-Bj7-02L3.js";const s={pink:"#F8D7D9",pinkS:"#D9B0B3",yellow:"#FBEFC2",yellowS:"#C9B97D",orange:"#F8D7B3",orangeS:"#C99466",blue:"#CDE2EE",blueS:"#7FA4BA",purple:"#D4D2EA",purpleS:"#8E8AC0",green:"#CCE2C5",greenS:"#7DA475",ink:"#1A1814",faint:"#8E8678"},f=({x:t,y:r,w:c,h:d,fill:g,stroke:u,label:h,fontSize:l=10})=>e.jsxs("g",{children:[e.jsx("rect",{x:t,y:r,width:c,height:d,rx:"3",ry:"3",fill:g,stroke:u,strokeWidth:"1"}),e.jsx("text",{x:t+c/2,y:r+d/2,fontSize:l,fontFamily:"var(--sans)",fill:s.ink,textAnchor:"middle",dominantBaseline:"middle",children:h})]}),de=()=>e.jsxs("svg",{viewBox:"0 0 360 420",width:"100%",height:"100%",style:{display:"block"},children:[e.jsx("text",{x:"180",y:"20",fontSize:"11",fontFamily:"var(--serif)",fontStyle:"italic",fill:s.faint,textAnchor:"middle",children:"Scaled Dot-Product Attention"}),e.jsx(f,{x:140,y:40,w:80,h:26,fill:s.yellow,stroke:s.yellowS,label:"MatMul",fontSize:11}),e.jsx("path",{d:"M180 66 L180 80",stroke:s.ink}),e.jsx(f,{x:140,y:80,w:80,h:26,fill:s.green,stroke:s.greenS,label:"SoftMax",fontSize:11}),e.jsx("path",{d:"M180 106 L180 120",stroke:s.ink}),e.jsx(f,{x:140,y:120,w:80,h:26,fill:s.purple,stroke:s.purpleS,label:"Mask (opt.)",fontSize:11}),e.jsx("path",{d:"M180 146 L180 160",stroke:s.ink}),e.jsx(f,{x:140,y:160,w:80,h:26,fill:s.blue,stroke:s.blueS,label:"Scale ÷√dₖ",fontSize:11}),e.jsx("path",{d:"M180 186 L180 200",stroke:s.ink}),e.jsx(f,{x:140,y:200,w:80,h:26,fill:s.yellow,stroke:s.yellowS,label:"MatMul",fontSize:11}),e.jsx("path",{d:"M156 226 L120 270",stroke:s.ink}),e.jsx("path",{d:"M180 226 L180 270",stroke:s.ink}),e.jsx("path",{d:"M204 226 L240 270",stroke:s.ink}),e.jsx(f,{x:100,y:270,w:40,h:24,fill:s.pink,stroke:s.pinkS,label:"Q",fontSize:13}),e.jsx(f,{x:160,y:270,w:40,h:24,fill:s.pink,stroke:s.pinkS,label:"K",fontSize:13}),e.jsx(f,{x:220,y:270,w:40,h:24,fill:s.pink,stroke:s.pinkS,label:"V",fontSize:13}),e.jsxs("text",{x:"180",y:"330",fontSize:"14",fontFamily:"var(--serif)",fontStyle:"italic",fill:s.ink,textAnchor:"middle",children:["softmax(QK",e.jsx("tspan",{fontSize:"9",baselineShift:"super",children:"⊤"})," / √d) V"]})]}),me=[["my-skill/",""],["├── SKILL.md","# Required: metadata + instructions"],["├── scripts/","# Optional: executable code"],["├── references/","# Optional: documentation"],["├── assets/","# Optional: templates, resources"],["└── ...","# Any additional files or directories"]],he=()=>e.jsxs("svg",{viewBox:"0 0 360 420",width:"100%",height:"100%",style:{display:"block"},children:[e.jsx("text",{x:"180",y:"20",fontSize:"11",fontFamily:"var(--serif)",fontStyle:"italic",fill:s.faint,textAnchor:"middle",children:"Skill package layout"}),e.jsx("rect",{x:"28",y:"48",width:"304",height:"318",rx:"8",fill:"#FFFDF8",stroke:s.faint,strokeWidth:"1"}),me.map(([t,r],c)=>{const d=92+c*44;return e.jsxs("g",{children:[e.jsx("text",{x:"44",y:d,fontSize:"11",fontFamily:"var(--mono)",fill:s.ink,dominantBaseline:"middle",children:t}),r?e.jsx("text",{x:"138",y:d,fontSize:"8.5",fontFamily:"var(--mono)",fill:s.faint,dominantBaseline:"middle",children:r}):null]},t)})]}),pe={attention:de,"agent-skills":he},ue=({method:t})=>e.jsxs("svg",{viewBox:"0 0 360 420",width:"100%",height:"100%",children:[e.jsx("text",{x:"180",y:"20",fontSize:"11",fontFamily:"var(--serif)",fontStyle:"italic",fill:s.faint,textAnchor:"middle",children:t.name||"method"}),e.jsx(f,{x:80,y:70,w:200,h:50,fill:s.blue,stroke:s.blueS,label:"Input",fontSize:12}),e.jsx("path",{d:"M180 120 L180 150",stroke:s.ink}),e.jsx(f,{x:80,y:150,w:200,h:70,fill:s.orange,stroke:s.orangeS,label:t.name||"transform",fontSize:13}),e.jsx("path",{d:"M180 220 L180 250",stroke:s.ink}),e.jsx(f,{x:80,y:250,w:200,h:50,fill:s.purple,stroke:s.purpleS,label:"Output",fontSize:12})]}),xe=({method:t})=>{const r=(t.slug||"").toLowerCase(),c=pe[r];if(c)return e.jsx("div",{className:"method-figure-svg method-figure-svg--schematic",children:e.jsx(c,{})});if(t.image_url){const d=r==="transformer"||r==="gpt-4"||r==="gpt-4o"||r==="multi-head-attention"?" method-figure-svg--compact":r==="rpn"?" method-figure-svg--scaled-80":"";return e.jsx("div",{className:`method-figure-svg method-figure-svg--image${d}`,children:e.jsx("img",{className:"method-figure-img",src:t.image_url,alt:`${t.name} figure`})})}return e.jsx("div",{className:"method-figure-svg method-figure-svg--schematic",children:e.jsx(ue,{method:t})})},C=720,I=138,p={top:8,right:10,bottom:25,left:36},H=56,ge=new Intl.DateTimeFormat("en",{month:"short",year:"2-digit",timeZone:"UTC"}),fe=new Intl.DateTimeFormat("en",{year:"numeric",timeZone:"UTC"}),T=t=>ge.format(new Date(`${t}T00:00:00Z`)),je=(t,r)=>{if(t===0)return new Set;const c=t>48?12:t>36?6:t>18?3:2,d=Math.max(1,Math.ceil(H/r)),g=Math.max(c,d),u=t-1,h=new Set([0,u]);for(let l=g;l<u;l+=g)(u-l)*r>=H&&h.add(l);return h},q=t=>{if(t.coverage_status===void 0||["complete","not_applicable"].includes(t.coverage_status))return null;const r=t.processed_paper_count!==void 0&&t.eligible_paper_count!==void 0?`; ${t.processed_paper_count.toLocaleString()} of ${t.eligible_paper_count.toLocaleString()} eligible papers processed`:"";return`Historical tagging ${t.coverage_status==="failed"?"needs retry":"in progress"}${r}`},_e=({history:t,methodName:r})=>{const[c,d]=A.useState(null),g=Math.max(1,...t.map(o=>o.paper_count)),u=C-p.left-p.right,h=I-p.top-p.bottom,l=t.length?u/t.length:u,S=Math.max(2,l*.68),D=je(t.length,l),_=Array.from(new Set([0,Math.ceil(g/2),g])),j=c==null?null:t[c],x=j?q(j):null;return e.jsxs("div",{className:"method-usage-chart-wrap",children:[e.jsxs("svg",{className:"method-usage-chart",viewBox:`0 0 ${C} ${I}`,role:"group","aria-label":`${r}: papers mentioning this method by publication month`,children:[e.jsxs("title",{children:[r,": papers mentioning this method by publication month"]}),_.map(o=>{const i=p.top+h-o/g*h;return e.jsxs("g",{children:[e.jsx("line",{className:"method-usage-gridline",x1:p.left,x2:C-p.right,y1:i,y2:i}),e.jsx("text",{className:"method-usage-y-label",x:p.left-8,y:i+3,textAnchor:"end",children:o})]},o)}),t.map((o,i)=>{const k=o.paper_count/g*h,y=o.paper_count>0?Math.max(1,k):0,P=p.left+l*i+(l-S)/2,b=p.top+h-y,a=c===i,N=i===t.length-1,v=q(o);return e.jsxs("g",{className:`method-usage-bar${a?" is-active":""}${N?" is-current":""}`,tabIndex:0,role:"img","aria-label":`${T(o.start_date)}: ${o.paper_count} ${o.paper_count===1?"paper":"papers"}${v?`. ${v}`:""}`,onMouseEnter:()=>d(i),onMouseLeave:()=>d(null),onFocus:()=>d(i),onBlur:()=>d(null),children:[e.jsx("rect",{className:"method-usage-bar-hit",x:p.left+l*i,y:p.top,width:l,height:h}),e.jsx("rect",{className:"method-usage-bar-mark",x:P,y:b,width:S,height:y,rx:"1.5"})]},o.start_date)}),t.map((o,i)=>D.has(i)?e.jsx("text",{className:"method-usage-x-label",x:p.left+l*(i+.5),y:I-11,textAnchor:"middle",children:t.length>48?fe.format(new Date(`${o.start_date}T00:00:00Z`)):T(o.start_date)},o.start_date):null)]}),j&&e.jsxs("div",{className:"method-usage-tooltip",role:"status",children:[e.jsx("strong",{children:T(j.start_date)}),e.jsxs("span",{children:[j.paper_count," ",j.paper_count===1?"paper":"papers",c===t.length-1?" · month to date":""]}),e.jsxs("span",{children:[(j.catalog_share??0).toFixed(2),"% of"," ",(j.catalog_paper_count??0).toLocaleString()," catalog papers"]}),x&&e.jsx("span",{children:x})]})]})},ye=[["trending","trending"],["new","newest"],["cited","most cited"]],Ze=()=>{var B,E,$;const{methodSlug:t}=Q(),[r,c]=O(),[d,g]=A.useState("trending"),u=r.get("has_code")==="true",h=r.get("has_hf_artifacts")==="true",l=J(r),S=n=>{const m=new URLSearchParams(r);n?m.set("has_code","true"):m.delete("has_code"),c(m)},D=n=>{const m=new URLSearchParams(r);n?m.set("has_hf_artifacts","true"):m.delete("has_hf_artifacts"),c(m)},_=w({queryKey:["method",t],queryFn:()=>F.getMethod(t),enabled:!!t,staleTime:10*60*1e3}),j=w({queryKey:["areas-all"],queryFn:()=>F.listAreas({page_size:50,ordering:"name"}),enabled:!!((B=_.data)!=null&&B.area_id),staleTime:10*60*1e3}),x=w({queryKey:["method-trend",t],queryFn:()=>F.methodTrend(t),enabled:!!t,staleTime:10*60*1e3}),o=d==="trending"?"trending":d==="cited"?"citation_count":"date_published",i=Z({queryKey:[...W.feeds.method,t,o,u,h,l.startDate,l.endDate],queryFn:({pageParam:n=1})=>ae.forMethod(t,{page:n,page_size:20,order_by:o,order_dir:"desc",include_resources:!0,repository_limit:1,has_code:u,has_hf_artifacts:h,start_date:l.startDate,end_date:l.endDate}),getNextPageParam:n=>n.next_page,initialPageParam:1,enabled:!!t,staleTime:5*60*1e3,placeholderData:U}),k=w({queryKey:["related-methods",t],queryFn:()=>F.relatedMethods(t),enabled:!!t,staleTime:10*60*1e3}),y=A.useMemo(()=>{var m;return(((m=i.data)==null?void 0:m.pages.flatMap(K=>K.results))||[]).map(ne)},[i.data]),{targetRef:P,isIntersecting:b}=ie({rootMargin:"200px"});if(A.useEffect(()=>{b&&i.hasNextPage&&!i.isFetchingNextPage&&i.fetchNextPage()},[b,i.hasNextPage,i.isFetchingNextPage]),_.isLoading)return e.jsxs("div",{className:"page",children:[e.jsx(M,{className:"h-12 w-1/2 mb-4"}),e.jsx(M,{className:"h-64 w-full"})]});if(_.error||!_.data)return e.jsx("div",{className:"page",children:e.jsx(le,{variant:"destructive",children:e.jsx(oe,{children:"Method not found."})})});const a=_.data,N=(E=j.data)==null?void 0:E.results.find(n=>n.id===a.area_id),v=se(a.source_url),z=v?null:ce(a.source_url);return e.jsxs("div",{className:"page",children:[e.jsxs("div",{className:"breadcrumb",children:[e.jsx(L,{to:"/methods",children:"Methods"}),N&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"sep",children:"/"}),e.jsx(L,{to:`/methods#area-${re(N.name)}`,children:N.name})]}),e.jsx("span",{className:"sep",children:"/"}),e.jsx("span",{style:{color:"var(--ink)"},children:a.name})]}),e.jsxs("div",{className:`tag-hero method-hero-grid${a.slug==="grokking"||a.slug==="latent-reasoning"||a.slug==="world-action-models"?" method-hero-grid--wide-figure":""}`,children:[e.jsxs("div",{children:[e.jsx("div",{className:"tag-hero-eyebrow",children:"METHOD"}),e.jsx("h1",{className:"tag-hero-title method-hero-title",children:a.name}),e.jsx(G,{kind:"method",entityId:a.id}),a.full_name&&a.full_name!==a.name&&e.jsx("div",{style:{fontFamily:"var(--serif)",fontSize:16,fontStyle:"italic",color:"var(--ink-soft)",marginTop:8},children:a.full_name}),a.description&&e.jsx(R,{className:"method-description",text:a.description}),a.source_url&&a.source_title&&e.jsxs("div",{className:"method-source",children:[e.jsx("span",{className:"method-source-label",children:"Source"}),v?e.jsxs(L,{className:"method-source-link",to:v,target:"_blank",rel:"noopener noreferrer",children:[e.jsx("span",{className:"method-source-title",children:a.source_title}),a.introduced_year&&e.jsx("span",{className:"method-source-meta",children:a.introduced_year})]}):z?e.jsxs("a",{className:"method-source-link",href:z,target:"_blank",rel:"noopener noreferrer",children:[e.jsx("span",{className:"method-source-title",children:a.source_title}),a.introduced_year&&e.jsx("span",{className:"method-source-meta",children:a.introduced_year})]}):e.jsxs("div",{className:"method-source-link is-static",children:[e.jsx("span",{className:"method-source-title",children:a.source_title}),a.introduced_year&&e.jsx("span",{className:"method-source-meta",children:a.introduced_year})]})]}),e.jsxs("div",{className:"tag-hero-meta",children:[e.jsxs("div",{className:"stat",children:[e.jsx("span",{className:"label",children:"Papers mentioning"}),e.jsx("span",{className:"value",children:(a.paper_count??0).toLocaleString()})]}),x.data&&e.jsxs("div",{className:"stat",children:[e.jsx("span",{className:"label",children:"Recent mentions"}),e.jsxs("span",{className:"value",children:[(x.data.recent_paper_count*30/x.data.recent_days).toFixed(1),e.jsx("small",{children:"/mo"})]}),!x.data.comparison_complete&&e.jsx("span",{title:"Tagging is still catching up. This rate reflects mentions found so far.",children:"Partial coverage"})]}),a.introduced_year!=null&&e.jsxs("div",{className:"stat",children:[e.jsx("span",{className:"label",children:"Introduced"}),e.jsx("span",{className:"value",children:a.introduced_year})]})]}),x.isLoading?e.jsx(M,{className:"h-36 w-full method-trend-skeleton"}):x.data?e.jsxs("section",{className:"method-trend-panel method-trend-panel--compact",children:[e.jsxs("div",{className:"method-trend-header",children:[e.jsx("div",{children:e.jsx("div",{className:"method-trend-eyebrow",children:"Usage trend"})}),e.jsxs("div",{className:"method-trend-summary",children:[e.jsx("strong",{children:x.data.recent_paper_count}),e.jsxs("span",{children:["papers / ",x.data.recent_days,"d"]})]})]}),e.jsx(_e,{history:x.data.history,methodName:a.name})]}):null]}),e.jsxs("figure",{className:"method-figure-card",children:[e.jsx(xe,{method:a}),a.image_credit&&e.jsx("figcaption",{children:e.jsx(R,{className:"method-image-credit",text:a.image_credit})})]})]}),((($=k.data)==null?void 0:$.results.length)??0)>0&&e.jsxs("div",{className:"filter-row",children:[e.jsx("span",{className:"label",children:"Related methods"}),k.data.results.map(n=>e.jsx(V,{method:{slug:n.slug,name:n.name}},n.id))]}),e.jsxs("div",{className:"sort-bar",children:[e.jsxs("div",{className:"paper-feed-toolbar-controls",children:[e.jsx("div",{className:"sort-options",children:ye.map(([n,m])=>e.jsx("button",{className:`sort-btn ${d===n?"active":""}`,onClick:()=>g(n),children:m},n))}),e.jsx(Y,{hasCode:u,hasHfArtifacts:h,onHasCodeChange:S,onHasHfArtifactsChange:D})]}),e.jsx(ee,{startDate:l.startDate,endDate:l.endDate,onChange:n=>c(te(r,n))}),e.jsxs("div",{className:"results-count",children:[y.length," papers mentioning ",a.name]})]}),i.isLoading?e.jsx("div",{className:"paper-list",children:Array.from({length:4}).map((n,m)=>e.jsx(M,{className:"h-40 w-full"},m))}):y.length===0?e.jsx("div",{className:"no-results",children:"No papers tagged with this method yet."}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"paper-list",children:y.map((n,m)=>e.jsx(X,{paper:n,rank:m+1},n.id))}),e.jsx("div",{ref:P,style:{height:1}}),i.isFetchingNextPage&&e.jsx("div",{style:{padding:"20px 0",textAlign:"center",color:"var(--ink-faint)"},children:"Loading more…"})]})]})};export{Ze as default};
 
1
+ import{j as e,r as A,u as Q,d as O,L,af as U}from"./index-B9MfhMLC.js";import{R as G}from"./ResearchFollowButton-CSky6nMM.js";import{p as W}from"./paperQueryKeys-BP2E-0yf.js";import{u as w}from"./useQuery-Bx81pmgm.js";import{u as Z}from"./useInfiniteQuery-4Zdqd3L2.js";import{M as V,P as X}from"./components-BZrNefuY.js";import{P as Y}from"./PaperFeedFilters-DuB_em33.js";import{a as J,P as ee,b as te}from"./PaperDateFilter-D1l9Effu.js";import{r as se,M as R}from"./MarkdownText-BAxpQ8kL.js";import{c as F}from"./catalog-BqDz3O_s.js";import{p as ae}from"./papers-BGvqL27Z.js";import{s as re}from"./slug-BpH-Nkvz.js";import{t as ne}from"./colors-BCIVIuvj.js";import{u as ie}from"./useIntersectionObserver-Dg35i96T.js";import{S as M}from"./skeleton-BcfKeAOl.js";import{A as le,a as oe}from"./alert-Bg2LnrDJ.js";import{s as ce}from"./safeExternalHref-CkBrsh84.js";import"./useMutation-C2athD5k.js";import"./research-DbRWvLsz.js";import"./plus-BZFi6ZWf.js";import"./LatexTitle-DeUmWtI2.js";import"./popover-UrZdfRNz.js";/* empty css */import"./PaperPreviewLink-B3LP-qo2.js";import"./index-10yxmORR.js";import"./index-CSRWQTrf.js";import"./katex-DkKDou_j.js";import"./hover-card-Bv4bJws5.js";const s={pink:"#F8D7D9",pinkS:"#D9B0B3",yellow:"#FBEFC2",yellowS:"#C9B97D",orange:"#F8D7B3",orangeS:"#C99466",blue:"#CDE2EE",blueS:"#7FA4BA",purple:"#D4D2EA",purpleS:"#8E8AC0",green:"#CCE2C5",greenS:"#7DA475",ink:"#1A1814",faint:"#8E8678"},f=({x:t,y:r,w:c,h:d,fill:g,stroke:u,label:h,fontSize:l=10})=>e.jsxs("g",{children:[e.jsx("rect",{x:t,y:r,width:c,height:d,rx:"3",ry:"3",fill:g,stroke:u,strokeWidth:"1"}),e.jsx("text",{x:t+c/2,y:r+d/2,fontSize:l,fontFamily:"var(--sans)",fill:s.ink,textAnchor:"middle",dominantBaseline:"middle",children:h})]}),de=()=>e.jsxs("svg",{viewBox:"0 0 360 420",width:"100%",height:"100%",style:{display:"block"},children:[e.jsx("text",{x:"180",y:"20",fontSize:"11",fontFamily:"var(--serif)",fontStyle:"italic",fill:s.faint,textAnchor:"middle",children:"Scaled Dot-Product Attention"}),e.jsx(f,{x:140,y:40,w:80,h:26,fill:s.yellow,stroke:s.yellowS,label:"MatMul",fontSize:11}),e.jsx("path",{d:"M180 66 L180 80",stroke:s.ink}),e.jsx(f,{x:140,y:80,w:80,h:26,fill:s.green,stroke:s.greenS,label:"SoftMax",fontSize:11}),e.jsx("path",{d:"M180 106 L180 120",stroke:s.ink}),e.jsx(f,{x:140,y:120,w:80,h:26,fill:s.purple,stroke:s.purpleS,label:"Mask (opt.)",fontSize:11}),e.jsx("path",{d:"M180 146 L180 160",stroke:s.ink}),e.jsx(f,{x:140,y:160,w:80,h:26,fill:s.blue,stroke:s.blueS,label:"Scale ÷√dₖ",fontSize:11}),e.jsx("path",{d:"M180 186 L180 200",stroke:s.ink}),e.jsx(f,{x:140,y:200,w:80,h:26,fill:s.yellow,stroke:s.yellowS,label:"MatMul",fontSize:11}),e.jsx("path",{d:"M156 226 L120 270",stroke:s.ink}),e.jsx("path",{d:"M180 226 L180 270",stroke:s.ink}),e.jsx("path",{d:"M204 226 L240 270",stroke:s.ink}),e.jsx(f,{x:100,y:270,w:40,h:24,fill:s.pink,stroke:s.pinkS,label:"Q",fontSize:13}),e.jsx(f,{x:160,y:270,w:40,h:24,fill:s.pink,stroke:s.pinkS,label:"K",fontSize:13}),e.jsx(f,{x:220,y:270,w:40,h:24,fill:s.pink,stroke:s.pinkS,label:"V",fontSize:13}),e.jsxs("text",{x:"180",y:"330",fontSize:"14",fontFamily:"var(--serif)",fontStyle:"italic",fill:s.ink,textAnchor:"middle",children:["softmax(QK",e.jsx("tspan",{fontSize:"9",baselineShift:"super",children:"⊤"})," / √d) V"]})]}),me=[["my-skill/",""],["├── SKILL.md","# Required: metadata + instructions"],["├── scripts/","# Optional: executable code"],["├── references/","# Optional: documentation"],["├── assets/","# Optional: templates, resources"],["└── ...","# Any additional files or directories"]],he=()=>e.jsxs("svg",{viewBox:"0 0 360 420",width:"100%",height:"100%",style:{display:"block"},children:[e.jsx("text",{x:"180",y:"20",fontSize:"11",fontFamily:"var(--serif)",fontStyle:"italic",fill:s.faint,textAnchor:"middle",children:"Skill package layout"}),e.jsx("rect",{x:"28",y:"48",width:"304",height:"318",rx:"8",fill:"#FFFDF8",stroke:s.faint,strokeWidth:"1"}),me.map(([t,r],c)=>{const d=92+c*44;return e.jsxs("g",{children:[e.jsx("text",{x:"44",y:d,fontSize:"11",fontFamily:"var(--mono)",fill:s.ink,dominantBaseline:"middle",children:t}),r?e.jsx("text",{x:"138",y:d,fontSize:"8.5",fontFamily:"var(--mono)",fill:s.faint,dominantBaseline:"middle",children:r}):null]},t)})]}),pe={attention:de,"agent-skills":he},ue=({method:t})=>e.jsxs("svg",{viewBox:"0 0 360 420",width:"100%",height:"100%",children:[e.jsx("text",{x:"180",y:"20",fontSize:"11",fontFamily:"var(--serif)",fontStyle:"italic",fill:s.faint,textAnchor:"middle",children:t.name||"method"}),e.jsx(f,{x:80,y:70,w:200,h:50,fill:s.blue,stroke:s.blueS,label:"Input",fontSize:12}),e.jsx("path",{d:"M180 120 L180 150",stroke:s.ink}),e.jsx(f,{x:80,y:150,w:200,h:70,fill:s.orange,stroke:s.orangeS,label:t.name||"transform",fontSize:13}),e.jsx("path",{d:"M180 220 L180 250",stroke:s.ink}),e.jsx(f,{x:80,y:250,w:200,h:50,fill:s.purple,stroke:s.purpleS,label:"Output",fontSize:12})]}),xe=({method:t})=>{const r=(t.slug||"").toLowerCase(),c=pe[r];if(c)return e.jsx("div",{className:"method-figure-svg method-figure-svg--schematic",children:e.jsx(c,{})});if(t.image_url){const d=r==="transformer"||r==="gpt-4"||r==="gpt-4o"||r==="multi-head-attention"?" method-figure-svg--compact":r==="rpn"?" method-figure-svg--scaled-80":"";return e.jsx("div",{className:`method-figure-svg method-figure-svg--image${d}`,children:e.jsx("img",{className:"method-figure-img",src:t.image_url,alt:`${t.name} figure`})})}return e.jsx("div",{className:"method-figure-svg method-figure-svg--schematic",children:e.jsx(ue,{method:t})})},C=720,I=138,p={top:8,right:10,bottom:25,left:36},H=56,ge=new Intl.DateTimeFormat("en",{month:"short",year:"2-digit",timeZone:"UTC"}),fe=new Intl.DateTimeFormat("en",{year:"numeric",timeZone:"UTC"}),T=t=>ge.format(new Date(`${t}T00:00:00Z`)),je=(t,r)=>{if(t===0)return new Set;const c=t>48?12:t>36?6:t>18?3:2,d=Math.max(1,Math.ceil(H/r)),g=Math.max(c,d),u=t-1,h=new Set([0,u]);for(let l=g;l<u;l+=g)(u-l)*r>=H&&h.add(l);return h},q=t=>{if(t.coverage_status===void 0||["complete","not_applicable"].includes(t.coverage_status))return null;const r=t.processed_paper_count!==void 0&&t.eligible_paper_count!==void 0?`; ${t.processed_paper_count.toLocaleString()} of ${t.eligible_paper_count.toLocaleString()} eligible papers processed`:"";return`Historical tagging ${t.coverage_status==="failed"?"needs retry":"in progress"}${r}`},_e=({history:t,methodName:r})=>{const[c,d]=A.useState(null),g=Math.max(1,...t.map(o=>o.paper_count)),u=C-p.left-p.right,h=I-p.top-p.bottom,l=t.length?u/t.length:u,S=Math.max(2,l*.68),D=je(t.length,l),_=Array.from(new Set([0,Math.ceil(g/2),g])),j=c==null?null:t[c],x=j?q(j):null;return e.jsxs("div",{className:"method-usage-chart-wrap",children:[e.jsxs("svg",{className:"method-usage-chart",viewBox:`0 0 ${C} ${I}`,role:"group","aria-label":`${r}: papers mentioning this method by publication month`,children:[e.jsxs("title",{children:[r,": papers mentioning this method by publication month"]}),_.map(o=>{const i=p.top+h-o/g*h;return e.jsxs("g",{children:[e.jsx("line",{className:"method-usage-gridline",x1:p.left,x2:C-p.right,y1:i,y2:i}),e.jsx("text",{className:"method-usage-y-label",x:p.left-8,y:i+3,textAnchor:"end",children:o})]},o)}),t.map((o,i)=>{const k=o.paper_count/g*h,y=o.paper_count>0?Math.max(1,k):0,P=p.left+l*i+(l-S)/2,b=p.top+h-y,a=c===i,N=i===t.length-1,v=q(o);return e.jsxs("g",{className:`method-usage-bar${a?" is-active":""}${N?" is-current":""}`,tabIndex:0,role:"img","aria-label":`${T(o.start_date)}: ${o.paper_count} ${o.paper_count===1?"paper":"papers"}${v?`. ${v}`:""}`,onMouseEnter:()=>d(i),onMouseLeave:()=>d(null),onFocus:()=>d(i),onBlur:()=>d(null),children:[e.jsx("rect",{className:"method-usage-bar-hit",x:p.left+l*i,y:p.top,width:l,height:h}),e.jsx("rect",{className:"method-usage-bar-mark",x:P,y:b,width:S,height:y,rx:"1.5"})]},o.start_date)}),t.map((o,i)=>D.has(i)?e.jsx("text",{className:"method-usage-x-label",x:p.left+l*(i+.5),y:I-11,textAnchor:"middle",children:t.length>48?fe.format(new Date(`${o.start_date}T00:00:00Z`)):T(o.start_date)},o.start_date):null)]}),j&&e.jsxs("div",{className:"method-usage-tooltip",role:"status",children:[e.jsx("strong",{children:T(j.start_date)}),e.jsxs("span",{children:[j.paper_count," ",j.paper_count===1?"paper":"papers",c===t.length-1?" · month to date":""]}),e.jsxs("span",{children:[(j.catalog_share??0).toFixed(2),"% of"," ",(j.catalog_paper_count??0).toLocaleString()," catalog papers"]}),x&&e.jsx("span",{children:x})]})]})},ye=[["trending","trending"],["new","newest"],["cited","most cited"]],Ze=()=>{var B,E,$;const{methodSlug:t}=Q(),[r,c]=O(),[d,g]=A.useState("trending"),u=r.get("has_code")==="true",h=r.get("has_hf_artifacts")==="true",l=J(r),S=n=>{const m=new URLSearchParams(r);n?m.set("has_code","true"):m.delete("has_code"),c(m)},D=n=>{const m=new URLSearchParams(r);n?m.set("has_hf_artifacts","true"):m.delete("has_hf_artifacts"),c(m)},_=w({queryKey:["method",t],queryFn:()=>F.getMethod(t),enabled:!!t,staleTime:10*60*1e3}),j=w({queryKey:["areas-all"],queryFn:()=>F.listAreas({page_size:50,ordering:"name"}),enabled:!!((B=_.data)!=null&&B.area_id),staleTime:10*60*1e3}),x=w({queryKey:["method-trend",t],queryFn:()=>F.methodTrend(t),enabled:!!t,staleTime:10*60*1e3}),o=d==="trending"?"trending":d==="cited"?"citation_count":"date_published",i=Z({queryKey:[...W.feeds.method,t,o,u,h,l.startDate,l.endDate],queryFn:({pageParam:n=1})=>ae.forMethod(t,{page:n,page_size:20,order_by:o,order_dir:"desc",include_resources:!0,repository_limit:1,has_code:u,has_hf_artifacts:h,start_date:l.startDate,end_date:l.endDate}),getNextPageParam:n=>n.next_page,initialPageParam:1,enabled:!!t,staleTime:5*60*1e3,placeholderData:U}),k=w({queryKey:["related-methods",t],queryFn:()=>F.relatedMethods(t),enabled:!!t,staleTime:10*60*1e3}),y=A.useMemo(()=>{var m;return(((m=i.data)==null?void 0:m.pages.flatMap(K=>K.results))||[]).map(ne)},[i.data]),{targetRef:P,isIntersecting:b}=ie({rootMargin:"200px"});if(A.useEffect(()=>{b&&i.hasNextPage&&!i.isFetchingNextPage&&i.fetchNextPage()},[b,i.hasNextPage,i.isFetchingNextPage]),_.isLoading)return e.jsxs("div",{className:"page",children:[e.jsx(M,{className:"h-12 w-1/2 mb-4"}),e.jsx(M,{className:"h-64 w-full"})]});if(_.error||!_.data)return e.jsx("div",{className:"page",children:e.jsx(le,{variant:"destructive",children:e.jsx(oe,{children:"Method not found."})})});const a=_.data,N=(E=j.data)==null?void 0:E.results.find(n=>n.id===a.area_id),v=se(a.source_url),z=v?null:ce(a.source_url);return e.jsxs("div",{className:"page",children:[e.jsxs("div",{className:"breadcrumb",children:[e.jsx(L,{to:"/methods",children:"Methods"}),N&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"sep",children:"/"}),e.jsx(L,{to:`/methods#area-${re(N.name)}`,children:N.name})]}),e.jsx("span",{className:"sep",children:"/"}),e.jsx("span",{style:{color:"var(--ink)"},children:a.name})]}),e.jsxs("div",{className:`tag-hero method-hero-grid${a.slug==="grokking"||a.slug==="latent-reasoning"||a.slug==="world-action-models"?" method-hero-grid--wide-figure":""}`,children:[e.jsxs("div",{children:[e.jsx("div",{className:"tag-hero-eyebrow",children:"METHOD"}),e.jsx("h1",{className:"tag-hero-title method-hero-title",children:a.name}),e.jsx(G,{kind:"method",entityId:a.id}),a.full_name&&a.full_name!==a.name&&e.jsx("div",{style:{fontFamily:"var(--serif)",fontSize:16,fontStyle:"italic",color:"var(--ink-soft)",marginTop:8},children:a.full_name}),a.description&&e.jsx(R,{className:"method-description",text:a.description}),a.source_url&&a.source_title&&e.jsxs("div",{className:"method-source",children:[e.jsx("span",{className:"method-source-label",children:"Source"}),v?e.jsxs(L,{className:"method-source-link",to:v,target:"_blank",rel:"noopener noreferrer",children:[e.jsx("span",{className:"method-source-title",children:a.source_title}),a.introduced_year&&e.jsx("span",{className:"method-source-meta",children:a.introduced_year})]}):z?e.jsxs("a",{className:"method-source-link",href:z,target:"_blank",rel:"noopener noreferrer",children:[e.jsx("span",{className:"method-source-title",children:a.source_title}),a.introduced_year&&e.jsx("span",{className:"method-source-meta",children:a.introduced_year})]}):e.jsxs("div",{className:"method-source-link is-static",children:[e.jsx("span",{className:"method-source-title",children:a.source_title}),a.introduced_year&&e.jsx("span",{className:"method-source-meta",children:a.introduced_year})]})]}),e.jsxs("div",{className:"tag-hero-meta",children:[e.jsxs("div",{className:"stat",children:[e.jsx("span",{className:"label",children:"Papers mentioning"}),e.jsx("span",{className:"value",children:(a.paper_count??0).toLocaleString()})]}),x.data&&e.jsxs("div",{className:"stat",children:[e.jsx("span",{className:"label",children:"Recent mentions"}),e.jsxs("span",{className:"value",children:[(x.data.recent_paper_count*30/x.data.recent_days).toFixed(1),e.jsx("small",{children:"/mo"})]}),!x.data.comparison_complete&&e.jsx("span",{title:"Tagging is still catching up. This rate reflects mentions found so far.",children:"Partial coverage"})]}),a.introduced_year!=null&&e.jsxs("div",{className:"stat",children:[e.jsx("span",{className:"label",children:"Introduced"}),e.jsx("span",{className:"value",children:a.introduced_year})]})]}),x.isLoading?e.jsx(M,{className:"h-36 w-full method-trend-skeleton"}):x.data?e.jsxs("section",{className:"method-trend-panel method-trend-panel--compact",children:[e.jsxs("div",{className:"method-trend-header",children:[e.jsx("div",{children:e.jsx("div",{className:"method-trend-eyebrow",children:"Usage trend"})}),e.jsxs("div",{className:"method-trend-summary",children:[e.jsx("strong",{children:x.data.recent_paper_count}),e.jsxs("span",{children:["papers / ",x.data.recent_days,"d"]})]})]}),e.jsx(_e,{history:x.data.history,methodName:a.name})]}):null]}),e.jsxs("figure",{className:"method-figure-card",children:[e.jsx(xe,{method:a}),a.image_credit&&e.jsx("figcaption",{children:e.jsx(R,{className:"method-image-credit",text:a.image_credit})})]})]}),((($=k.data)==null?void 0:$.results.length)??0)>0&&e.jsxs("div",{className:"filter-row",children:[e.jsx("span",{className:"label",children:"Related methods"}),k.data.results.map(n=>e.jsx(V,{method:{slug:n.slug,name:n.name}},n.id))]}),e.jsxs("div",{className:"sort-bar",children:[e.jsxs("div",{className:"paper-feed-toolbar-controls",children:[e.jsx("div",{className:"sort-options",children:ye.map(([n,m])=>e.jsx("button",{className:`sort-btn ${d===n?"active":""}`,onClick:()=>g(n),children:m},n))}),e.jsx(Y,{hasCode:u,hasHfArtifacts:h,onHasCodeChange:S,onHasHfArtifactsChange:D})]}),e.jsx(ee,{startDate:l.startDate,endDate:l.endDate,onChange:n=>c(te(r,n))}),e.jsxs("div",{className:"results-count",children:[y.length," papers mentioning ",a.name]})]}),i.isLoading?e.jsx("div",{className:"paper-list",children:Array.from({length:4}).map((n,m)=>e.jsx(M,{className:"h-40 w-full"},m))}):y.length===0?e.jsx("div",{className:"no-results",children:"No papers tagged with this method yet."}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"paper-list",children:y.map((n,m)=>e.jsx(X,{paper:n,rank:m+1},n.id))}),e.jsx("div",{ref:P,style:{height:1}}),i.isFetchingNextPage&&e.jsx("div",{style:{padding:"20px 0",textAlign:"center",color:"var(--ink-faint)"},children:"Loading more…"})]})]})};export{Ze as default};
assets/{MethodsIndexView-DGJvf5Eu.js → MethodsIndexView-CvuwXR8P.js} RENAMED
@@ -1,4 +1,4 @@
1
- import{g as _,r as d,j as e,L as v}from"./index-CcJ6cWma.js";import{u as c}from"./useQuery-D3-GqcPN.js";import{c as m}from"./catalog-B7hp4mKD.js";import{s as N}from"./slug-BpH-Nkvz.js";import{S as x}from"./skeleton-B-mlrgWO.js";import{A as w,a as F}from"./alert-CMODHIPT.js";import{T as L}from"./TaxonomySuggestionTile-BHuB46eW.js";import{T}from"./TaxonomyTrending-DD-gGNIV.js";import"./SignInToEditDialog-BlcFzmvx.js";import"./button-CCtc-vkR.js";import"./input-CDtE_-7s.js";import"./textarea-V7qdwagm.js";import"./searchable-select-hSYn3P90.js";import"./popover-CRugk4PC.js";import"./dialog-E2hweIxC.js";import"./loader-circle-BXhZSOlA.js";import"./useMutation-DPe9yGc6.js";import"./submissions-DM97tJtn.js";import"./plus-CNhFESYj.js";import"./trending-up-BxcjwQa1.js";/**
2
  * @license lucide-react v0.462.0 - ISC
3
  *
4
  * This source code is licensed under the ISC license.
 
1
+ import{g as _,r as d,j as e,L as v}from"./index-B9MfhMLC.js";import{u as c}from"./useQuery-Bx81pmgm.js";import{c as m}from"./catalog-BqDz3O_s.js";import{s as N}from"./slug-BpH-Nkvz.js";import{S as x}from"./skeleton-BcfKeAOl.js";import{A as w,a as F}from"./alert-Bg2LnrDJ.js";import{T as L}from"./TaxonomySuggestionTile-D67JWWL6.js";import{T}from"./TaxonomyTrending-DE-mYM6U.js";import"./SignInToEditDialog-D7miI02Z.js";import"./button-DZAojLNy.js";import"./input-DbV7135c.js";import"./textarea-BKTJjgMO.js";import"./searchable-select-C8cfKu2W.js";import"./popover-UrZdfRNz.js";import"./dialog-CR0TulAY.js";import"./loader-circle-BeMbSHvo.js";import"./useMutation-C2athD5k.js";import"./submissions-YISzGIO1.js";import"./plus-BZFi6ZWf.js";import"./trending-up-C_hNEuqr.js";/**
2
  * @license lucide-react v0.462.0 - ISC
3
  *
4
  * This source code is licensed under the ISC license.
assets/{NotFound-B17io6Dc.js → NotFound-DxjoZmsI.js} RENAMED
@@ -1 +1 @@
1
- import{ar as o,r as a,j as t,L as s}from"./index-CcJ6cWma.js";const r=()=>{const e=o();return a.useEffect(()=>{console.error("404 Error: User attempted to access non-existent route:",e.pathname)},[e.pathname]),t.jsxs("div",{className:"page",style:{textAlign:"center",paddingTop:96},children:[t.jsx("h1",{className:"detail-title",style:{fontSize:96,marginBottom:8},children:"404"}),t.jsx("p",{style:{fontFamily:"var(--serif)",fontStyle:"italic",color:"var(--ink-soft)",marginBottom:24},children:"That route isn't on the map."}),t.jsx(s,{to:"/",className:"action-btn",children:"Return home"})]})};export{r as default};
 
1
+ import{ar as o,r as a,j as t,L as s}from"./index-B9MfhMLC.js";const r=()=>{const e=o();return a.useEffect(()=>{console.error("404 Error: User attempted to access non-existent route:",e.pathname)},[e.pathname]),t.jsxs("div",{className:"page",style:{textAlign:"center",paddingTop:96},children:[t.jsx("h1",{className:"detail-title",style:{fontSize:96,marginBottom:8},children:"404"}),t.jsx("p",{style:{fontFamily:"var(--serif)",fontStyle:"italic",color:"var(--ink-soft)",marginBottom:24},children:"That route isn't on the map."}),t.jsx(s,{to:"/",className:"action-btn",children:"Return home"})]})};export{r as default};
assets/{OrganizationContributionGraph-CZh_axJ7.js → OrganizationContributionGraph-MOADHS0w.js} RENAMED
@@ -1 +1 @@
1
- import{r as b,j as o}from"./index-CcJ6cWma.js";import{u as z}from"./useQuery-D3-GqcPN.js";import{S as T}from"./skeleton-B-mlrgWO.js";import{c as w}from"./catalog-B7hp4mKD.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-B9MfhMLC.js";import{u as z}from"./useQuery-Bx81pmgm.js";import{S as T}from"./skeleton-BcfKeAOl.js";import{c as w}from"./catalog-BqDz3O_s.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-BaWHf8c3.js DELETED
@@ -1 +0,0 @@
1
- import{u as t,j as r}from"./index-CcJ6cWma.js";import{O as i}from"./OrganizationPaperFeed-Div4OPKZ.js";import m from"./NotFound-B17io6Dc.js";import"./ResearchFollowButton-B4KEpku3.js";import"./useQuery-D3-GqcPN.js";import"./useMutation-DPe9yGc6.js";import"./research-1Dm22Eft.js";import"./plus-CNhFESYj.js";import"./components-Bax1_3qI.js";import"./paperQueryKeys-BP2E-0yf.js";import"./LatexTitle-hDpJaCcC.js";import"./colors-DCzRcDI4.js";import"./papers-CClaKvmL.js";import"./safeExternalHref-CkBrsh84.js";import"./MarkdownText-Day0Kgef.js";/* empty css */import"./PaperPreviewLink-o7boC8db.js";import"./index-VElAzfws.js";import"./index-CVaIZy6l.js";import"./katex-DkKDou_j.js";import"./hover-card-Bj7-02L3.js";import"./OrganizationContributionGraph-CZh_axJ7.js";import"./skeleton-B-mlrgWO.js";import"./catalog-B7hp4mKD.js";import"./PaperFeedFilters-DejcdS4D.js";import"./PaperDateFilter-_7LVshRy.js";import"./popover-CRugk4PC.js";import"./alert-CMODHIPT.js";import"./searchable-select-hSYn3P90.js";import"./button-CCtc-vkR.js";import"./dialog-E2hweIxC.js";import"./loader-circle-BXhZSOlA.js";import"./useIntersectionObserver-DtY8SYYt.js";import"./usePapers-TCIcWoUA.js";import"./useInfiniteQuery-CFy22PuG.js";const I=()=>{const{orgSlug:o}=t();return o?r.jsx(i,{organizationSlug:o}):r.jsx(m,{})};export{I as default};
 
 
assets/OrganizationDetailView-Dx9jtmcN.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{u as t,j as r}from"./index-B9MfhMLC.js";import{O as i}from"./OrganizationPaperFeed-CSdBnVax.js";import m from"./NotFound-DxjoZmsI.js";import"./ResearchFollowButton-CSky6nMM.js";import"./useQuery-Bx81pmgm.js";import"./useMutation-C2athD5k.js";import"./research-DbRWvLsz.js";import"./plus-BZFi6ZWf.js";import"./components-BZrNefuY.js";import"./paperQueryKeys-BP2E-0yf.js";import"./LatexTitle-DeUmWtI2.js";import"./colors-BCIVIuvj.js";import"./papers-BGvqL27Z.js";import"./safeExternalHref-CkBrsh84.js";import"./MarkdownText-BAxpQ8kL.js";/* empty css */import"./PaperPreviewLink-B3LP-qo2.js";import"./index-10yxmORR.js";import"./index-CSRWQTrf.js";import"./katex-DkKDou_j.js";import"./hover-card-Bv4bJws5.js";import"./OrganizationContributionGraph-MOADHS0w.js";import"./skeleton-BcfKeAOl.js";import"./catalog-BqDz3O_s.js";import"./PaperFeedFilters-DuB_em33.js";import"./PaperDateFilter-D1l9Effu.js";import"./popover-UrZdfRNz.js";import"./alert-Bg2LnrDJ.js";import"./searchable-select-C8cfKu2W.js";import"./button-DZAojLNy.js";import"./dialog-CR0TulAY.js";import"./loader-circle-BeMbSHvo.js";import"./useIntersectionObserver-Dg35i96T.js";import"./usePapers-DP7fFbrs.js";import"./useInfiniteQuery-4Zdqd3L2.js";const I=()=>{const{orgSlug:o}=t();return o?r.jsx(i,{organizationSlug:o}):r.jsx(m,{})};export{I as default};
assets/{OrganizationPaperFeed-Div4OPKZ.js → OrganizationPaperFeed-CSdBnVax.js} RENAMED
@@ -1 +1 @@
1
- import{b as E,d as B,r as d,j as e,L as A}from"./index-CcJ6cWma.js";import{R as Q}from"./ResearchFollowButton-B4KEpku3.js";import{u as C}from"./useQuery-D3-GqcPN.js";import{P as U}from"./components-Bax1_3qI.js";import{M as G}from"./MarkdownText-Day0Kgef.js";import{O as K}from"./OrganizationContributionGraph-CZh_axJ7.js";import{P as W}from"./PaperFeedFilters-DejcdS4D.js";import{a as Z,P as J,b as V}from"./PaperDateFilter-_7LVshRy.js";import{A as X,a as Y}from"./alert-CMODHIPT.js";import{S as z}from"./searchable-select-hSYn3P90.js";import{S as $}from"./skeleton-B-mlrgWO.js";import{u as ee}from"./useIntersectionObserver-DtY8SYYt.js";import{e as se}from"./usePapers-TCIcWoUA.js";import{c as R}from"./catalog-B7hp4mKD.js";import{d as D,t as ae}from"./colors-DCzRcDI4.js";import re from"./NotFound-B17io6Dc.js";const te=[["trending","trending"],["date_published","newest"],["citation_count","most cited"]],ne=n=>n==="date_published"||n==="citation_count"?n:"trending",ye=({organizationSlug:n,taskSlug:p})=>{var y,P,v,F,L,k,w,O;const T=E(),[o,h]=B(),[I,u]=d.useState(!1),g=ne(o.get("order_by")),f=o.get("has_code")==="true",_=o.get("has_hf_artifacts")==="true",m=Z(o),x=C({queryKey:["organization",n],queryFn:()=>R.getOrganization(n),staleTime:10*60*1e3}),c=C({queryKey:["organization-areas-with-tasks",n],queryFn:()=>R.organizationAreasWithTasks(n),staleTime:10*60*1e3}),i=se({organizationSlug:n,taskSlug:p,page_size:12,order_by:g,order_dir:"desc",include_resources:!0,has_code:f,has_hf_artifacts:_,start_date:m.startDate,end_date:m.endDate,enabled:!!n}),{targetRef:M,isIntersecting:j}=ee({rootMargin:"200px"});d.useEffect(()=>{j&&i.hasNextPage&&!i.isFetchingNextPage&&i.fetchNextPage()},[j,i.hasNextPage,i.isFetchingNextPage]),d.useEffect(()=>{u(!1)},[n,p]);const b=d.useMemo(()=>{var a;return(((a=c.data)==null?void 0:a.results)??[]).flatMap(r=>r.tasks.filter(t=>!!t.slug).map(t=>({...t,slug:t.slug,label:D(t.name,t.slug)})))},[c.data]),l=b.find(a=>a.slug===p),N=d.useMemo(()=>{var a;return(((a=i.data)==null?void 0:a.pages)??[]).flatMap(r=>r.results.map(ae))},[i.data]),s=x.data??((y=c.data)==null?void 0:y.organization),H=((v=(P=i.data)==null?void 0:P.pages[0])==null?void 0:v.count)??0;if(((F=x.error)==null?void 0:F.status)===404||((L=c.error)==null?void 0:L.status)===404||((k=i.error)==null?void 0:k.status)===404)return e.jsx(re,{});if(c.error||i.error)return e.jsx("div",{className:"page",children:e.jsx(X,{variant:"destructive",children:e.jsx(Y,{children:"Failed to load organization papers. Please try again."})})});const q=a=>{const r=a.trim().toLocaleLowerCase();return b.filter(t=>`${t.label} ${t.slug}`.toLocaleLowerCase().includes(r)).map(t=>({value:t.slug,label:t.label,description:`${t.paper_count.toLocaleString()} ${t.paper_count===1?"paper":"papers"}`}))},S=a=>{const r=a==="__all__"?`/orgs/${n}`:`/orgs/${n}/${a}`,t=o.toString();T({pathname:r,search:t?`?${t}`:""})};return e.jsxs("div",{className:"page",children:[e.jsxs("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:[e.jsx(A,{to:"/",children:"Home"}),e.jsx("span",{children:" / "}),e.jsx(A,{to:"/organizations",children:"Organizations"}),e.jsx("span",{children:" / "}),e.jsx("span",{children:(s==null?void 0:s.name)??n}),l&&e.jsxs(e.Fragment,{children:[e.jsx("span",{children:" / "}),e.jsx("span",{children:D(l.name,l.slug)})]})]}),e.jsxs("header",{className:"organization-hero",children:[e.jsxs("div",{className:"organization-hero-profile",children:[e.jsx("div",{className:"organizations-eyebrow",children:"ORGANIZATION"}),e.jsxs("h1",{className:"feed-title organization-hero-title",children:[s!=null&&s.logo_url&&!I?e.jsx("img",{src:s.logo_url,alt:"",width:58,height:58,onError:()=>u(!0)}):s?e.jsx("span",{className:"organization-logo organization-logo--fallback","aria-hidden":"true",children:s.name.slice(0,1).toUpperCase()}):null,(s==null?void 0:s.name)??e.jsx($,{className:"h-12 w-64"})]}),s&&e.jsx(Q,{kind:"organization",entityId:s.id}),s&&e.jsxs("div",{className:"feed-subtitle",children:[((w=s.paper_count)==null?void 0:w.toLocaleString())??0," papers",(s.organization_trending_score??0)>0&&s.trending_rank&&e.jsxs(e.Fragment,{children:[" · #",s.trending_rank," trending this month"]})]}),(s==null?void 0:s.description)&&e.jsx(G,{className:"method-description",text:s.description}),s&&e.jsxs("div",{className:"organization-hero-links",children:[s.website_url&&e.jsx("a",{href:s.website_url,target:"_blank",rel:"noreferrer",children:"Website ↗"}),s.hf_url&&e.jsx("a",{href:s.hf_url,target:"_blank",rel:"noreferrer",children:"Hugging Face ↗"}),s.github_url&&e.jsx("a",{href:s.github_url,target:"_blank",rel:"noreferrer",children:"GitHub ↗"})]})]}),e.jsx(K,{organizationSlug:n,organizationName:(s==null?void 0:s.name)??n})]}),e.jsxs("div",{className:"sort-bar",style:{alignItems:"center",gap:16},children:[e.jsx("div",{style:{minWidth:260},children:e.jsx(z,{value:p??"__all__",onChange:S,placeholder:"All tasks",searchPlaceholder:"Search organization tasks...",emptyMessage:"No matching tasks.",ariaLabel:"Filter papers by task",selectedOption:l?{value:l.slug,label:l.label,description:`${l.paper_count.toLocaleString()} ${l.paper_count===1?"paper":"papers"}`}:{value:"__all__",label:"All tasks",description:`${((O=s==null?void 0:s.paper_count)==null?void 0:O.toLocaleString())??0} papers`},queryKey:["organization-task-options",n],queryFn:async a=>{var r;return[{value:"__all__",label:"All tasks",description:`${((r=s==null?void 0:s.paper_count)==null?void 0:r.toLocaleString())??0} papers`},...q(a)]},enabled:!c.isLoading,className:"h-[38px]"})}),e.jsxs("div",{className:"paper-feed-toolbar-controls",children:[e.jsx("div",{className:"sort-options",children:te.map(([a,r])=>e.jsx("button",{type:"button",className:`sort-btn ${g===a?"active":""}`,onClick:()=>{const t=new URLSearchParams(o);a==="trending"?t.delete("order_by"):t.set("order_by",a),h(t)},children:r},a))}),e.jsx(W,{hasCode:f,hasHfArtifacts:_,onHasCodeChange:a=>{const r=new URLSearchParams(o);a?r.set("has_code","true"):r.delete("has_code"),h(r)},onHasHfArtifactsChange:a=>{const r=new URLSearchParams(o);a?r.set("has_hf_artifacts","true"):r.delete("has_hf_artifacts"),h(r)}})]}),e.jsx(J,{startDate:m.startDate,endDate:m.endDate,onChange:a=>h(V(o,a))}),e.jsxs("div",{className:"results-count",children:[H.toLocaleString()," papers"]})]}),i.isLoading?e.jsx("div",{className:"paper-list",children:Array.from({length:4}).map((a,r)=>e.jsx($,{className:"h-40 w-full"},r))}):N.length===0?e.jsx("div",{className:"no-results",children:(s==null?void 0:s.paper_count)===0?"No papers indexed yet":"No papers found for this selection."}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"paper-list",children:N.map((a,r)=>e.jsx(U,{paper:a,rank:r+1,showInstitution:!1},a.id))}),e.jsx("div",{ref:M,style:{height:1}}),i.isFetchingNextPage&&e.jsx("div",{style:{padding:"20px 0",textAlign:"center"},children:"Loading more…"})]})]})};export{ye as O};
 
1
+ import{b as E,d as B,r as d,j as e,L as A}from"./index-B9MfhMLC.js";import{R as Q}from"./ResearchFollowButton-CSky6nMM.js";import{u as C}from"./useQuery-Bx81pmgm.js";import{P as U}from"./components-BZrNefuY.js";import{M as G}from"./MarkdownText-BAxpQ8kL.js";import{O as K}from"./OrganizationContributionGraph-MOADHS0w.js";import{P as W}from"./PaperFeedFilters-DuB_em33.js";import{a as Z,P as J,b as V}from"./PaperDateFilter-D1l9Effu.js";import{A as X,a as Y}from"./alert-Bg2LnrDJ.js";import{S as z}from"./searchable-select-C8cfKu2W.js";import{S as $}from"./skeleton-BcfKeAOl.js";import{u as ee}from"./useIntersectionObserver-Dg35i96T.js";import{e as se}from"./usePapers-DP7fFbrs.js";import{c as R}from"./catalog-BqDz3O_s.js";import{d as D,t as ae}from"./colors-BCIVIuvj.js";import re from"./NotFound-DxjoZmsI.js";const te=[["trending","trending"],["date_published","newest"],["citation_count","most cited"]],ne=n=>n==="date_published"||n==="citation_count"?n:"trending",ye=({organizationSlug:n,taskSlug:p})=>{var y,P,v,F,L,k,w,O;const T=E(),[o,h]=B(),[I,u]=d.useState(!1),g=ne(o.get("order_by")),f=o.get("has_code")==="true",_=o.get("has_hf_artifacts")==="true",m=Z(o),x=C({queryKey:["organization",n],queryFn:()=>R.getOrganization(n),staleTime:10*60*1e3}),c=C({queryKey:["organization-areas-with-tasks",n],queryFn:()=>R.organizationAreasWithTasks(n),staleTime:10*60*1e3}),i=se({organizationSlug:n,taskSlug:p,page_size:12,order_by:g,order_dir:"desc",include_resources:!0,has_code:f,has_hf_artifacts:_,start_date:m.startDate,end_date:m.endDate,enabled:!!n}),{targetRef:M,isIntersecting:j}=ee({rootMargin:"200px"});d.useEffect(()=>{j&&i.hasNextPage&&!i.isFetchingNextPage&&i.fetchNextPage()},[j,i.hasNextPage,i.isFetchingNextPage]),d.useEffect(()=>{u(!1)},[n,p]);const b=d.useMemo(()=>{var a;return(((a=c.data)==null?void 0:a.results)??[]).flatMap(r=>r.tasks.filter(t=>!!t.slug).map(t=>({...t,slug:t.slug,label:D(t.name,t.slug)})))},[c.data]),l=b.find(a=>a.slug===p),N=d.useMemo(()=>{var a;return(((a=i.data)==null?void 0:a.pages)??[]).flatMap(r=>r.results.map(ae))},[i.data]),s=x.data??((y=c.data)==null?void 0:y.organization),H=((v=(P=i.data)==null?void 0:P.pages[0])==null?void 0:v.count)??0;if(((F=x.error)==null?void 0:F.status)===404||((L=c.error)==null?void 0:L.status)===404||((k=i.error)==null?void 0:k.status)===404)return e.jsx(re,{});if(c.error||i.error)return e.jsx("div",{className:"page",children:e.jsx(X,{variant:"destructive",children:e.jsx(Y,{children:"Failed to load organization papers. Please try again."})})});const q=a=>{const r=a.trim().toLocaleLowerCase();return b.filter(t=>`${t.label} ${t.slug}`.toLocaleLowerCase().includes(r)).map(t=>({value:t.slug,label:t.label,description:`${t.paper_count.toLocaleString()} ${t.paper_count===1?"paper":"papers"}`}))},S=a=>{const r=a==="__all__"?`/orgs/${n}`:`/orgs/${n}/${a}`,t=o.toString();T({pathname:r,search:t?`?${t}`:""})};return e.jsxs("div",{className:"page",children:[e.jsxs("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:[e.jsx(A,{to:"/",children:"Home"}),e.jsx("span",{children:" / "}),e.jsx(A,{to:"/organizations",children:"Organizations"}),e.jsx("span",{children:" / "}),e.jsx("span",{children:(s==null?void 0:s.name)??n}),l&&e.jsxs(e.Fragment,{children:[e.jsx("span",{children:" / "}),e.jsx("span",{children:D(l.name,l.slug)})]})]}),e.jsxs("header",{className:"organization-hero",children:[e.jsxs("div",{className:"organization-hero-profile",children:[e.jsx("div",{className:"organizations-eyebrow",children:"ORGANIZATION"}),e.jsxs("h1",{className:"feed-title organization-hero-title",children:[s!=null&&s.logo_url&&!I?e.jsx("img",{src:s.logo_url,alt:"",width:58,height:58,onError:()=>u(!0)}):s?e.jsx("span",{className:"organization-logo organization-logo--fallback","aria-hidden":"true",children:s.name.slice(0,1).toUpperCase()}):null,(s==null?void 0:s.name)??e.jsx($,{className:"h-12 w-64"})]}),s&&e.jsx(Q,{kind:"organization",entityId:s.id}),s&&e.jsxs("div",{className:"feed-subtitle",children:[((w=s.paper_count)==null?void 0:w.toLocaleString())??0," papers",(s.organization_trending_score??0)>0&&s.trending_rank&&e.jsxs(e.Fragment,{children:[" · #",s.trending_rank," trending this month"]})]}),(s==null?void 0:s.description)&&e.jsx(G,{className:"method-description",text:s.description}),s&&e.jsxs("div",{className:"organization-hero-links",children:[s.website_url&&e.jsx("a",{href:s.website_url,target:"_blank",rel:"noreferrer",children:"Website ↗"}),s.hf_url&&e.jsx("a",{href:s.hf_url,target:"_blank",rel:"noreferrer",children:"Hugging Face ↗"}),s.github_url&&e.jsx("a",{href:s.github_url,target:"_blank",rel:"noreferrer",children:"GitHub ↗"})]})]}),e.jsx(K,{organizationSlug:n,organizationName:(s==null?void 0:s.name)??n})]}),e.jsxs("div",{className:"sort-bar",style:{alignItems:"center",gap:16},children:[e.jsx("div",{style:{minWidth:260},children:e.jsx(z,{value:p??"__all__",onChange:S,placeholder:"All tasks",searchPlaceholder:"Search organization tasks...",emptyMessage:"No matching tasks.",ariaLabel:"Filter papers by task",selectedOption:l?{value:l.slug,label:l.label,description:`${l.paper_count.toLocaleString()} ${l.paper_count===1?"paper":"papers"}`}:{value:"__all__",label:"All tasks",description:`${((O=s==null?void 0:s.paper_count)==null?void 0:O.toLocaleString())??0} papers`},queryKey:["organization-task-options",n],queryFn:async a=>{var r;return[{value:"__all__",label:"All tasks",description:`${((r=s==null?void 0:s.paper_count)==null?void 0:r.toLocaleString())??0} papers`},...q(a)]},enabled:!c.isLoading,className:"h-[38px]"})}),e.jsxs("div",{className:"paper-feed-toolbar-controls",children:[e.jsx("div",{className:"sort-options",children:te.map(([a,r])=>e.jsx("button",{type:"button",className:`sort-btn ${g===a?"active":""}`,onClick:()=>{const t=new URLSearchParams(o);a==="trending"?t.delete("order_by"):t.set("order_by",a),h(t)},children:r},a))}),e.jsx(W,{hasCode:f,hasHfArtifacts:_,onHasCodeChange:a=>{const r=new URLSearchParams(o);a?r.set("has_code","true"):r.delete("has_code"),h(r)},onHasHfArtifactsChange:a=>{const r=new URLSearchParams(o);a?r.set("has_hf_artifacts","true"):r.delete("has_hf_artifacts"),h(r)}})]}),e.jsx(J,{startDate:m.startDate,endDate:m.endDate,onChange:a=>h(V(o,a))}),e.jsxs("div",{className:"results-count",children:[H.toLocaleString()," papers"]})]}),i.isLoading?e.jsx("div",{className:"paper-list",children:Array.from({length:4}).map((a,r)=>e.jsx($,{className:"h-40 w-full"},r))}):N.length===0?e.jsx("div",{className:"no-results",children:(s==null?void 0:s.paper_count)===0?"No papers indexed yet":"No papers found for this selection."}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"paper-list",children:N.map((a,r)=>e.jsx(U,{paper:a,rank:r+1,showInstitution:!1},a.id))}),e.jsx("div",{ref:M,style:{height:1}}),i.isFetchingNextPage&&e.jsx("div",{style:{padding:"20px 0",textAlign:"center"},children:"Loading more…"})]})]})};export{ye as O};
assets/OrganizationTaskView-BAux-T_Q.js DELETED
@@ -1 +0,0 @@
1
- import{u as i,j as t}from"./index-CcJ6cWma.js";import{O as m}from"./OrganizationPaperFeed-Div4OPKZ.js";import p from"./NotFound-B17io6Dc.js";import"./ResearchFollowButton-B4KEpku3.js";import"./useQuery-D3-GqcPN.js";import"./useMutation-DPe9yGc6.js";import"./research-1Dm22Eft.js";import"./plus-CNhFESYj.js";import"./components-Bax1_3qI.js";import"./paperQueryKeys-BP2E-0yf.js";import"./LatexTitle-hDpJaCcC.js";import"./colors-DCzRcDI4.js";import"./papers-CClaKvmL.js";import"./safeExternalHref-CkBrsh84.js";import"./MarkdownText-Day0Kgef.js";/* empty css */import"./PaperPreviewLink-o7boC8db.js";import"./index-VElAzfws.js";import"./index-CVaIZy6l.js";import"./katex-DkKDou_j.js";import"./hover-card-Bj7-02L3.js";import"./OrganizationContributionGraph-CZh_axJ7.js";import"./skeleton-B-mlrgWO.js";import"./catalog-B7hp4mKD.js";import"./PaperFeedFilters-DejcdS4D.js";import"./PaperDateFilter-_7LVshRy.js";import"./popover-CRugk4PC.js";import"./alert-CMODHIPT.js";import"./searchable-select-hSYn3P90.js";import"./button-CCtc-vkR.js";import"./dialog-E2hweIxC.js";import"./loader-circle-BXhZSOlA.js";import"./useIntersectionObserver-DtY8SYYt.js";import"./usePapers-TCIcWoUA.js";import"./useInfiniteQuery-CFy22PuG.js";const I=()=>{const{orgSlug:o,taskSlug:r}=i();return o&&r?t.jsx(m,{organizationSlug:o,taskSlug:r}):t.jsx(p,{})};export{I as default};
 
 
assets/OrganizationTaskView-KXvg-Jdk.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{u as i,j as t}from"./index-B9MfhMLC.js";import{O as m}from"./OrganizationPaperFeed-CSdBnVax.js";import p from"./NotFound-DxjoZmsI.js";import"./ResearchFollowButton-CSky6nMM.js";import"./useQuery-Bx81pmgm.js";import"./useMutation-C2athD5k.js";import"./research-DbRWvLsz.js";import"./plus-BZFi6ZWf.js";import"./components-BZrNefuY.js";import"./paperQueryKeys-BP2E-0yf.js";import"./LatexTitle-DeUmWtI2.js";import"./colors-BCIVIuvj.js";import"./papers-BGvqL27Z.js";import"./safeExternalHref-CkBrsh84.js";import"./MarkdownText-BAxpQ8kL.js";/* empty css */import"./PaperPreviewLink-B3LP-qo2.js";import"./index-10yxmORR.js";import"./index-CSRWQTrf.js";import"./katex-DkKDou_j.js";import"./hover-card-Bv4bJws5.js";import"./OrganizationContributionGraph-MOADHS0w.js";import"./skeleton-BcfKeAOl.js";import"./catalog-BqDz3O_s.js";import"./PaperFeedFilters-DuB_em33.js";import"./PaperDateFilter-D1l9Effu.js";import"./popover-UrZdfRNz.js";import"./alert-Bg2LnrDJ.js";import"./searchable-select-C8cfKu2W.js";import"./button-DZAojLNy.js";import"./dialog-CR0TulAY.js";import"./loader-circle-BeMbSHvo.js";import"./useIntersectionObserver-Dg35i96T.js";import"./usePapers-DP7fFbrs.js";import"./useInfiniteQuery-4Zdqd3L2.js";const I=()=>{const{orgSlug:o,taskSlug:r}=i();return o&&r?t.jsx(m,{organizationSlug:o,taskSlug:r}):t.jsx(p,{})};export{I as default};
assets/{OrganizationsIndexView-DTBeE-_e.js → OrganizationsIndexView-BNnMb-df.js} RENAMED
@@ -1 +1 @@
1
- import{d as u,r as g,j as e,L as x}from"./index-CcJ6cWma.js";import{u as j}from"./useQuery-D3-GqcPN.js";import{A as y,a as f}from"./alert-CMODHIPT.js";import{S as _}from"./skeleton-B-mlrgWO.js";import{c as N}from"./catalog-B7hp4mKD.js";const v=n=>n==="papers"||n==="name"?n:"trending",S=({organization:n})=>{const[d,t]=g.useState(!1);return!n.logo_url||d?e.jsx("span",{className:"organization-logo organization-logo--fallback","aria-hidden":"true",children:n.name.slice(0,1).toUpperCase()}):e.jsx("span",{className:"organization-logo",children:e.jsx("img",{src:n.logo_url,alt:"",width:48,height:48,onError:()=>t(!0)})})},A=()=>{var h;const[n,d]=u(),t=v(n.get("sort")),c=n.get("q")??"",o=j({queryKey:["organizations","featured"],queryFn:()=>N.organizationIndex(),staleTime:10*60*1e3}),p=s=>{const a=new URLSearchParams(n),i=s.sort??t,r=s.query??c;i==="trending"?a.delete("sort"):a.set("sort",i),r.trim()?a.set("q",r):a.delete("q"),d(a)},m=g.useMemo(()=>{var i;const s=c.trim().toLocaleLowerCase(),a=(((i=o.data)==null?void 0:i.results)??[]).filter(r=>[r.name,r.slug,r.hf_slug??""].join(" ").toLocaleLowerCase().includes(s));return t==="papers"?[...a].sort((r,l)=>(l.paper_count??0)-(r.paper_count??0)||r.name.localeCompare(l.name)||r.slug.localeCompare(l.slug)):t==="name"?[...a].sort((r,l)=>r.name.localeCompare(l.name)||r.slug.localeCompare(l.slug)):a},[o.data,c,t]);return e.jsxs("div",{className:"page organizations-page",children:[e.jsx("div",{className:"feed-header",children:e.jsxs("div",{children:[e.jsxs("h1",{className:"feed-title",children:["AI ",e.jsx("em",{children:"Organizations"})]}),e.jsx("div",{className:"feed-subtitle",children:"Explore papers from leading AI organizations, ranked by sustained community momentum over the past 30 days."})]})}),e.jsxs("section",{"aria-labelledby":"organizations-heading",children:[e.jsxs("div",{className:"organizations-section-heading",children:[e.jsxs("h2",{id:"organizations-heading",children:[((h=o.data)==null?void 0:h.count)??21," organizations"]}),e.jsx("span",{children:t==="trending"?"Ranked by 30-day momentum":t==="papers"?"Sorted by linked papers":"Sorted A–Z"})]}),e.jsxs("div",{className:"organizations-controls",children:[e.jsxs("label",{children:[e.jsx("span",{className:"sr-only",children:"Search organizations"}),e.jsx("input",{type:"search",value:c,onChange:s=>p({query:s.target.value}),placeholder:"Search organizations"})]}),e.jsx("div",{className:"organizations-sort","aria-label":"Sort organizations",children:[["trending","Trending"],["papers","Most papers"],["name","A–Z"]].map(([s,a])=>e.jsx("button",{type:"button",className:t===s?"active":"","aria-pressed":t===s,onClick:()=>p({sort:s}),children:a},s))})]}),o.isLoading?e.jsx("div",{className:"organizations-grid","aria-busy":"true",children:Array.from({length:6}).map((s,a)=>e.jsx(_,{className:"organization-card-skeleton"},a))}):o.error?e.jsx(y,{variant:"destructive",children:e.jsxs(f,{children:["Failed to load organizations."," ",e.jsx("button",{type:"button",onClick:()=>o.refetch(),children:"Try again"})]})}):m.length===0?e.jsxs("div",{className:"organizations-empty",children:["No organizations match “",c,"”."]}):e.jsx("div",{className:"organizations-grid",children:m.map(s=>{var r;const a=s.paper_count??0,i=s.first_paper_year&&s.latest_paper_year?s.first_paper_year===s.latest_paper_year?String(s.first_paper_year):`${s.first_paper_year}–${s.latest_paper_year}`:null;return e.jsxs(x,{to:`/orgs/${s.slug}`,className:"organization-card","aria-label":a?`Browse ${a.toLocaleString()} ${s.name} papers`:`Browse ${s.name} papers`,children:[e.jsxs("div",{className:"organization-card-header",children:[e.jsx(S,{organization:s}),e.jsxs("div",{children:[e.jsx("h3",{children:s.name}),e.jsxs("span",{children:["@",s.hf_slug??s.slug]})]})]}),e.jsxs("div",{className:"organization-card-metrics",children:[e.jsx("strong",{children:a.toLocaleString()}),e.jsx("span",{children:a===1?"paper":"papers"}),t==="trending"&&s.trending_rank&&e.jsxs("span",{className:"organization-rank",children:["#",s.trending_rank]})]}),e.jsxs("div",{className:"organization-highlight",children:[e.jsx("span",{children:"Trending paper"}),e.jsx("strong",{children:((r=s.top_trending_paper)==null?void 0:r.title)??"No papers indexed yet"})]}),e.jsxs("div",{className:"organization-card-footer",children:[i?`Publishing ${i}`:"Research archive ready",e.jsx("span",{"aria-hidden":"true",children:"↗"})]})]},s.id)})})]})]})};export{A as default};
 
1
+ import{d as u,r as g,j as e,L as x}from"./index-B9MfhMLC.js";import{u as j}from"./useQuery-Bx81pmgm.js";import{A as y,a as f}from"./alert-Bg2LnrDJ.js";import{S as _}from"./skeleton-BcfKeAOl.js";import{c as N}from"./catalog-BqDz3O_s.js";const v=n=>n==="papers"||n==="name"?n:"trending",S=({organization:n})=>{const[d,t]=g.useState(!1);return!n.logo_url||d?e.jsx("span",{className:"organization-logo organization-logo--fallback","aria-hidden":"true",children:n.name.slice(0,1).toUpperCase()}):e.jsx("span",{className:"organization-logo",children:e.jsx("img",{src:n.logo_url,alt:"",width:48,height:48,onError:()=>t(!0)})})},A=()=>{var h;const[n,d]=u(),t=v(n.get("sort")),c=n.get("q")??"",o=j({queryKey:["organizations","featured"],queryFn:()=>N.organizationIndex(),staleTime:10*60*1e3}),p=s=>{const a=new URLSearchParams(n),i=s.sort??t,r=s.query??c;i==="trending"?a.delete("sort"):a.set("sort",i),r.trim()?a.set("q",r):a.delete("q"),d(a)},m=g.useMemo(()=>{var i;const s=c.trim().toLocaleLowerCase(),a=(((i=o.data)==null?void 0:i.results)??[]).filter(r=>[r.name,r.slug,r.hf_slug??""].join(" ").toLocaleLowerCase().includes(s));return t==="papers"?[...a].sort((r,l)=>(l.paper_count??0)-(r.paper_count??0)||r.name.localeCompare(l.name)||r.slug.localeCompare(l.slug)):t==="name"?[...a].sort((r,l)=>r.name.localeCompare(l.name)||r.slug.localeCompare(l.slug)):a},[o.data,c,t]);return e.jsxs("div",{className:"page organizations-page",children:[e.jsx("div",{className:"feed-header",children:e.jsxs("div",{children:[e.jsxs("h1",{className:"feed-title",children:["AI ",e.jsx("em",{children:"Organizations"})]}),e.jsx("div",{className:"feed-subtitle",children:"Explore papers from leading AI organizations, ranked by sustained community momentum over the past 30 days."})]})}),e.jsxs("section",{"aria-labelledby":"organizations-heading",children:[e.jsxs("div",{className:"organizations-section-heading",children:[e.jsxs("h2",{id:"organizations-heading",children:[((h=o.data)==null?void 0:h.count)??21," organizations"]}),e.jsx("span",{children:t==="trending"?"Ranked by 30-day momentum":t==="papers"?"Sorted by linked papers":"Sorted A–Z"})]}),e.jsxs("div",{className:"organizations-controls",children:[e.jsxs("label",{children:[e.jsx("span",{className:"sr-only",children:"Search organizations"}),e.jsx("input",{type:"search",value:c,onChange:s=>p({query:s.target.value}),placeholder:"Search organizations"})]}),e.jsx("div",{className:"organizations-sort","aria-label":"Sort organizations",children:[["trending","Trending"],["papers","Most papers"],["name","A–Z"]].map(([s,a])=>e.jsx("button",{type:"button",className:t===s?"active":"","aria-pressed":t===s,onClick:()=>p({sort:s}),children:a},s))})]}),o.isLoading?e.jsx("div",{className:"organizations-grid","aria-busy":"true",children:Array.from({length:6}).map((s,a)=>e.jsx(_,{className:"organization-card-skeleton"},a))}):o.error?e.jsx(y,{variant:"destructive",children:e.jsxs(f,{children:["Failed to load organizations."," ",e.jsx("button",{type:"button",onClick:()=>o.refetch(),children:"Try again"})]})}):m.length===0?e.jsxs("div",{className:"organizations-empty",children:["No organizations match “",c,"”."]}):e.jsx("div",{className:"organizations-grid",children:m.map(s=>{var r;const a=s.paper_count??0,i=s.first_paper_year&&s.latest_paper_year?s.first_paper_year===s.latest_paper_year?String(s.first_paper_year):`${s.first_paper_year}–${s.latest_paper_year}`:null;return e.jsxs(x,{to:`/orgs/${s.slug}`,className:"organization-card","aria-label":a?`Browse ${a.toLocaleString()} ${s.name} papers`:`Browse ${s.name} papers`,children:[e.jsxs("div",{className:"organization-card-header",children:[e.jsx(S,{organization:s}),e.jsxs("div",{children:[e.jsx("h3",{children:s.name}),e.jsxs("span",{children:["@",s.hf_slug??s.slug]})]})]}),e.jsxs("div",{className:"organization-card-metrics",children:[e.jsx("strong",{children:a.toLocaleString()}),e.jsx("span",{children:a===1?"paper":"papers"}),t==="trending"&&s.trending_rank&&e.jsxs("span",{className:"organization-rank",children:["#",s.trending_rank]})]}),e.jsxs("div",{className:"organization-highlight",children:[e.jsx("span",{children:"Trending paper"}),e.jsx("strong",{children:((r=s.top_trending_paper)==null?void 0:r.title)??"No papers indexed yet"})]}),e.jsxs("div",{className:"organization-card-footer",children:[i?`Publishing ${i}`:"Research archive ready",e.jsx("span",{"aria-hidden":"true",children:"↗"})]})]},s.id)})})]})]})};export{A as default};
assets/{PaperDateFilter-_7LVshRy.js → PaperDateFilter-D1l9Effu.js} RENAMED
@@ -1 +1 @@
1
- import{r as p,j as n}from"./index-CcJ6cWma.js";import{P as q,a as G,b as Q}from"./popover-CRugk4PC.js";const E=(e,t)=>{const a=new Date(t),s=new Date(a);return s.setUTCDate(a.getUTCDate()-(e==="week"?6:29)),{startDate:s.toISOString().slice(0,10),endDate:a.toISOString().slice(0,10)}},z=e=>({startDate:e.get("start_date")||void 0,endDate:e.get("end_date")||void 0}),oe=(e,t=new Date,a="week")=>{const s=z(e);if(s.startDate||s.endDate||e.get("time")==="all_time")return s;const c=new Date(Date.UTC(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()));return E(a,c)},J=(e,t)=>{const a=new URLSearchParams(e);return t.startDate?a.set("start_date",t.startDate):a.delete("start_date"),t.endDate?a.set("end_date",t.endDate):a.delete("end_date"),a.delete("time"),a},ie=(e,t)=>{const a=J(e,t);return!t.startDate&&!t.endDate&&a.set("time","all_time"),a},K=new Intl.DateTimeFormat("en",{month:"long",year:"numeric",timeZone:"UTC"}),O=new Intl.DateTimeFormat("en",{month:"short",timeZone:"UTC"}),L="(max-width: 640px)",X=()=>{const[e,t]=p.useState(()=>typeof window<"u"&&window.matchMedia(L).matches);return p.useEffect(()=>{const a=window.matchMedia(L),s=c=>t(c.matches);return t(a.matches),a.addEventListener("change",s),()=>a.removeEventListener("change",s)},[]),e},V=e=>e.toISOString().slice(0,10),b=e=>new Date(`${e}T00:00:00Z`),ee=()=>{const e=new Date;return new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()))},R=(e,t)=>new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth()+t,1)),M=e=>new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),1)),te=(e,t)=>new Date(Date.UTC(t,e.getUTCMonth(),1)),w=(e,t)=>e.startDate===t.startDate&&e.endDate===t.endDate,ae=(e,t)=>{const a=b(e),s=b(t),c=O.format(a),l=O.format(s),g=a.getUTCDate(),d=s.getUTCDate(),o=a.getUTCFullYear(),u=s.getUTCFullYear();return e===t?`${c} ${g}, ${o}`:o===u&&a.getUTCMonth()===s.getUTCMonth()?`${c} ${g}–${d}, ${o}`:o===u?`${c} ${g}–${l} ${d}, ${o}`:`${c} ${g}, ${o}–${l} ${d}, ${u}`},ne=e=>{const t=e.getUTCFullYear(),a=e.getUTCMonth(),s=new Date(Date.UTC(t,a,1)),c=(s.getUTCDay()+6)%7,l=new Date(s);return l.setUTCDate(s.getUTCDate()-c),Array.from({length:42},(g,d)=>{const o=new Date(l);return o.setUTCDate(l.getUTCDate()+d),{iso:V(o),day:o.getUTCDate(),outsideMonth:o.getUTCMonth()!==a}})},A=({month:e,today:t,startDate:a,endDate:s,onSelect:c,yearLabel:l,yearValue:g,onYearChange:d,secondary:o=!1})=>{const u=p.useMemo(()=>ne(e),[e]);return n.jsxs("section",{className:`paper-date-calendar${o?" paper-date-calendar-secondary":""}`,children:[n.jsxs("label",{className:"paper-date-year",children:[n.jsx("span",{children:l}),n.jsx("input",{type:"number",inputMode:"numeric",min:"1900",max:t.slice(0,4),step:"1",value:g,onChange:r=>d(r.target.value)})]}),n.jsx("h3",{children:K.format(e)}),n.jsx("div",{className:"paper-date-weekdays","aria-hidden":"true",children:["Mon","Tue","Wed","Thu","Fri","Sat","Sun"].map(r=>n.jsx("span",{children:r},r))}),n.jsx("div",{className:"paper-date-days",children:u.map(r=>{const h=r.iso===a||r.iso===s,T=!!(a&&s&&r.iso>a&&r.iso<s),m=r.outsideMonth||r.iso>t;return n.jsx("button",{type:"button","aria-label":r.iso,"aria-selected":h,disabled:m,className:["paper-date-day",r.outsideMonth?"outside":"",h?"selected":"",T?"in-range":"",r.iso===t?"today":""].filter(Boolean).join(" "),onClick:()=>c(r.iso),children:r.day},r.iso)})})]})},I=({calendar:e,onPrevious:t,onNext:a,secondary:s=!1})=>n.jsxs("div",{className:`paper-date-navigation-group${s?" paper-date-navigation-group-secondary":""}`,children:[n.jsx("button",{type:"button","aria-label":`Previous ${e} month`,onClick:t,children:"←"}),n.jsx("button",{type:"button","aria-label":`Next ${e} month`,onClick:a,children:"→"})]}),ce=({startDate:e,endDate:t,onChange:a,currentDate:s})=>{const c=X(),l=s?b(s):ee(),[g,d]=p.useState(!1),[o,u]=p.useState(),[r,h]=p.useState(),[T,m]=p.useState(()=>M(l)),[$,D]=p.useState(()=>R(M(l),1)),[H,y]=p.useState(()=>String(l.getUTCFullYear())),[B,U]=p.useState(()=>String(l.getUTCFullYear())),f={startDate:e,endDate:t},N=E("week",l),Y=E("month",l),P=V(l),v=!!(e&&t&&!w(f,N)&&!w(f,Y)),Z=()=>{u(e),h(t);const i=M(e?b(e):l),C=M(t?b(t):R(i,1));m(i),D(C),y(String(i.getUTCFullYear())),U(String(C.getUTCFullYear())),d(!0)},k=(i,C,F)=>{if(C(i),!/^\d{4}$/.test(i))return;const x=Number(i);x>=1900&&x<=l.getUTCFullYear()&&F(j=>te(j,x))},S=(i,C,F,x)=>{const j=R(i,C);F(j),x(String(j.getUTCFullYear()))},_=i=>{!o||r?(u(i),h(void 0)):i<o?u(i):h(i)},W=()=>{a({}),d(!1)};return n.jsxs("div",{className:`paper-date-filter${c?" paper-date-filter-single-calendar":""}`,role:"group","aria-label":"Publication date",children:[n.jsx("button",{type:"button",className:`sort-btn sort-btn-time${w(f,N)?" active":""}`,onClick:()=>a(N),children:"Last Week"}),n.jsx("button",{type:"button",className:`sort-btn sort-btn-time${w(f,Y)?" active":""}`,onClick:()=>a(Y),children:"Last Month"}),n.jsx("button",{type:"button",className:`sort-btn sort-btn-time${!e&&!t?" active":""}`,onClick:()=>a({}),children:"All Time"}),n.jsxs(q,{open:g,onOpenChange:i=>{i?Z():d(!1)},children:[n.jsx(G,{asChild:!0,children:n.jsx("button",{type:"button",className:`sort-btn sort-btn-time${v?" active":""}`,"aria-label":v?"Change date range":"Select a range",children:v&&e&&t?ae(e,t):"Select a range"})}),n.jsxs(Q,{align:"end",className:`paper-date-popover${c?" paper-date-popover-single-calendar":""}`,role:"dialog","aria-label":"Select a date range",children:[n.jsxs("div",{className:"paper-date-popover-header",children:[n.jsx("h2",{children:"Select a date range"}),n.jsx("p",{children:"Choose an inclusive start and end publication date."})]}),n.jsxs("div",{className:"paper-date-navigation",children:[n.jsx(I,{calendar:"start",onPrevious:()=>S(T,-1,m,y),onNext:()=>S(T,1,m,y)}),!c&&n.jsx(I,{calendar:"end",onPrevious:()=>S($,-1,D,U),onNext:()=>S($,1,D,U),secondary:!0})]}),n.jsxs("div",{className:"paper-date-calendars",children:[n.jsx(A,{month:T,today:P,startDate:o,endDate:r,onSelect:_,yearLabel:c?"Year":"Start year",yearValue:H,onYearChange:i=>k(i,y,m)}),!c&&n.jsx(A,{month:$,today:P,startDate:o,endDate:r,onSelect:_,yearLabel:"End year",yearValue:B,onYearChange:i=>k(i,U,D),secondary:!0})]}),n.jsxs("div",{className:"paper-date-actions",children:[n.jsx("button",{type:"button",className:"paper-date-clear",onClick:W,children:"Clear range"}),n.jsxs("div",{children:[n.jsx("button",{type:"button",onClick:()=>d(!1),children:"Cancel"}),n.jsx("button",{type:"button",className:"paper-date-apply",disabled:!o||!r,onClick:()=>{o&&r&&a({startDate:o,endDate:r}),d(!1)},children:"Apply"})]})]})]})]})]})};export{ce as P,z as a,J as b,oe as r,ie as w};
 
1
+ import{r as p,j as n}from"./index-B9MfhMLC.js";import{P as q,a as G,b as Q}from"./popover-UrZdfRNz.js";const E=(e,t)=>{const a=new Date(t),s=new Date(a);return s.setUTCDate(a.getUTCDate()-(e==="week"?6:29)),{startDate:s.toISOString().slice(0,10),endDate:a.toISOString().slice(0,10)}},z=e=>({startDate:e.get("start_date")||void 0,endDate:e.get("end_date")||void 0}),oe=(e,t=new Date,a="week")=>{const s=z(e);if(s.startDate||s.endDate||e.get("time")==="all_time")return s;const c=new Date(Date.UTC(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()));return E(a,c)},J=(e,t)=>{const a=new URLSearchParams(e);return t.startDate?a.set("start_date",t.startDate):a.delete("start_date"),t.endDate?a.set("end_date",t.endDate):a.delete("end_date"),a.delete("time"),a},ie=(e,t)=>{const a=J(e,t);return!t.startDate&&!t.endDate&&a.set("time","all_time"),a},K=new Intl.DateTimeFormat("en",{month:"long",year:"numeric",timeZone:"UTC"}),O=new Intl.DateTimeFormat("en",{month:"short",timeZone:"UTC"}),L="(max-width: 640px)",X=()=>{const[e,t]=p.useState(()=>typeof window<"u"&&window.matchMedia(L).matches);return p.useEffect(()=>{const a=window.matchMedia(L),s=c=>t(c.matches);return t(a.matches),a.addEventListener("change",s),()=>a.removeEventListener("change",s)},[]),e},V=e=>e.toISOString().slice(0,10),b=e=>new Date(`${e}T00:00:00Z`),ee=()=>{const e=new Date;return new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()))},R=(e,t)=>new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth()+t,1)),M=e=>new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),1)),te=(e,t)=>new Date(Date.UTC(t,e.getUTCMonth(),1)),w=(e,t)=>e.startDate===t.startDate&&e.endDate===t.endDate,ae=(e,t)=>{const a=b(e),s=b(t),c=O.format(a),l=O.format(s),g=a.getUTCDate(),d=s.getUTCDate(),o=a.getUTCFullYear(),u=s.getUTCFullYear();return e===t?`${c} ${g}, ${o}`:o===u&&a.getUTCMonth()===s.getUTCMonth()?`${c} ${g}–${d}, ${o}`:o===u?`${c} ${g}–${l} ${d}, ${o}`:`${c} ${g}, ${o}–${l} ${d}, ${u}`},ne=e=>{const t=e.getUTCFullYear(),a=e.getUTCMonth(),s=new Date(Date.UTC(t,a,1)),c=(s.getUTCDay()+6)%7,l=new Date(s);return l.setUTCDate(s.getUTCDate()-c),Array.from({length:42},(g,d)=>{const o=new Date(l);return o.setUTCDate(l.getUTCDate()+d),{iso:V(o),day:o.getUTCDate(),outsideMonth:o.getUTCMonth()!==a}})},A=({month:e,today:t,startDate:a,endDate:s,onSelect:c,yearLabel:l,yearValue:g,onYearChange:d,secondary:o=!1})=>{const u=p.useMemo(()=>ne(e),[e]);return n.jsxs("section",{className:`paper-date-calendar${o?" paper-date-calendar-secondary":""}`,children:[n.jsxs("label",{className:"paper-date-year",children:[n.jsx("span",{children:l}),n.jsx("input",{type:"number",inputMode:"numeric",min:"1900",max:t.slice(0,4),step:"1",value:g,onChange:r=>d(r.target.value)})]}),n.jsx("h3",{children:K.format(e)}),n.jsx("div",{className:"paper-date-weekdays","aria-hidden":"true",children:["Mon","Tue","Wed","Thu","Fri","Sat","Sun"].map(r=>n.jsx("span",{children:r},r))}),n.jsx("div",{className:"paper-date-days",children:u.map(r=>{const h=r.iso===a||r.iso===s,T=!!(a&&s&&r.iso>a&&r.iso<s),m=r.outsideMonth||r.iso>t;return n.jsx("button",{type:"button","aria-label":r.iso,"aria-selected":h,disabled:m,className:["paper-date-day",r.outsideMonth?"outside":"",h?"selected":"",T?"in-range":"",r.iso===t?"today":""].filter(Boolean).join(" "),onClick:()=>c(r.iso),children:r.day},r.iso)})})]})},I=({calendar:e,onPrevious:t,onNext:a,secondary:s=!1})=>n.jsxs("div",{className:`paper-date-navigation-group${s?" paper-date-navigation-group-secondary":""}`,children:[n.jsx("button",{type:"button","aria-label":`Previous ${e} month`,onClick:t,children:"←"}),n.jsx("button",{type:"button","aria-label":`Next ${e} month`,onClick:a,children:"→"})]}),ce=({startDate:e,endDate:t,onChange:a,currentDate:s})=>{const c=X(),l=s?b(s):ee(),[g,d]=p.useState(!1),[o,u]=p.useState(),[r,h]=p.useState(),[T,m]=p.useState(()=>M(l)),[$,D]=p.useState(()=>R(M(l),1)),[H,y]=p.useState(()=>String(l.getUTCFullYear())),[B,U]=p.useState(()=>String(l.getUTCFullYear())),f={startDate:e,endDate:t},N=E("week",l),Y=E("month",l),P=V(l),v=!!(e&&t&&!w(f,N)&&!w(f,Y)),Z=()=>{u(e),h(t);const i=M(e?b(e):l),C=M(t?b(t):R(i,1));m(i),D(C),y(String(i.getUTCFullYear())),U(String(C.getUTCFullYear())),d(!0)},k=(i,C,F)=>{if(C(i),!/^\d{4}$/.test(i))return;const x=Number(i);x>=1900&&x<=l.getUTCFullYear()&&F(j=>te(j,x))},S=(i,C,F,x)=>{const j=R(i,C);F(j),x(String(j.getUTCFullYear()))},_=i=>{!o||r?(u(i),h(void 0)):i<o?u(i):h(i)},W=()=>{a({}),d(!1)};return n.jsxs("div",{className:`paper-date-filter${c?" paper-date-filter-single-calendar":""}`,role:"group","aria-label":"Publication date",children:[n.jsx("button",{type:"button",className:`sort-btn sort-btn-time${w(f,N)?" active":""}`,onClick:()=>a(N),children:"Last Week"}),n.jsx("button",{type:"button",className:`sort-btn sort-btn-time${w(f,Y)?" active":""}`,onClick:()=>a(Y),children:"Last Month"}),n.jsx("button",{type:"button",className:`sort-btn sort-btn-time${!e&&!t?" active":""}`,onClick:()=>a({}),children:"All Time"}),n.jsxs(q,{open:g,onOpenChange:i=>{i?Z():d(!1)},children:[n.jsx(G,{asChild:!0,children:n.jsx("button",{type:"button",className:`sort-btn sort-btn-time${v?" active":""}`,"aria-label":v?"Change date range":"Select a range",children:v&&e&&t?ae(e,t):"Select a range"})}),n.jsxs(Q,{align:"end",className:`paper-date-popover${c?" paper-date-popover-single-calendar":""}`,role:"dialog","aria-label":"Select a date range",children:[n.jsxs("div",{className:"paper-date-popover-header",children:[n.jsx("h2",{children:"Select a date range"}),n.jsx("p",{children:"Choose an inclusive start and end publication date."})]}),n.jsxs("div",{className:"paper-date-navigation",children:[n.jsx(I,{calendar:"start",onPrevious:()=>S(T,-1,m,y),onNext:()=>S(T,1,m,y)}),!c&&n.jsx(I,{calendar:"end",onPrevious:()=>S($,-1,D,U),onNext:()=>S($,1,D,U),secondary:!0})]}),n.jsxs("div",{className:"paper-date-calendars",children:[n.jsx(A,{month:T,today:P,startDate:o,endDate:r,onSelect:_,yearLabel:c?"Year":"Start year",yearValue:H,onYearChange:i=>k(i,y,m)}),!c&&n.jsx(A,{month:$,today:P,startDate:o,endDate:r,onSelect:_,yearLabel:"End year",yearValue:B,onYearChange:i=>k(i,U,D),secondary:!0})]}),n.jsxs("div",{className:"paper-date-actions",children:[n.jsx("button",{type:"button",className:"paper-date-clear",onClick:W,children:"Clear range"}),n.jsxs("div",{children:[n.jsx("button",{type:"button",onClick:()=>d(!1),children:"Cancel"}),n.jsx("button",{type:"button",className:"paper-date-apply",disabled:!o||!r,onClick:()=>{o&&r&&a({startDate:o,endDate:r}),d(!1)},children:"Apply"})]})]})]})]})]})};export{ce as P,z as a,J as b,oe as r,ie as w};
assets/{PaperDetailView-BtTprUPH.js → PaperDetailView-D2DMSSYR.js} RENAMED
The diff for this file is too large to render. See raw diff
 
assets/{PaperDetailView-zafDc-w2.css → PaperDetailView-gEwMf3J2.css} RENAMED
@@ -1 +1 @@
1
- .detail-grid{display:grid;grid-template-columns:1fr 320px;gap:56px;align-items:start}.detail-meta{display:flex;align-items:center;gap:16px;flex-wrap:wrap;font-family:var(--mono);font-size:11px;color:var(--ink-faint);margin-bottom:16px;padding-bottom:16px;border-bottom:1px solid var(--hairline)}.detail-authors{font-family:var(--serif);font-size:15px;color:var(--ink-soft);margin-bottom:8px;line-height:1.5}.detail-authors a{color:var(--ink);border-bottom:1px dotted var(--hairline-strong)}.detail-authors a:hover{border-bottom-color:var(--ink)}.detail-author-avatar{width:22px;height:22px;margin-right:5px;vertical-align:-6px}.abstract-text{font-family:var(--serif);font-size:16px;line-height:1.65;color:var(--ink);text-wrap:pretty;margin-bottom:32px}.abstract-text .first-letter:first-letter{font-size:3.2em;line-height:.9;float:left;margin:4px 8px 0 0;font-weight:600;font-family:var(--serif);color:var(--accent-text)}.project-page-menu{max-width:min(360px,calc(100vw - 24px))}.project-page-menu a{max-width:320px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.detail-hero{display:grid;grid-template-columns:minmax(0,1fr) 200px;gap:32px;align-items:stretch;margin-bottom:32px}.detail-hero-main{min-width:0}.detail-hero .action-row{margin-bottom:0}.detail-hero-thumb{display:flex;justify-content:center;align-self:stretch;min-height:0}.detail-hero-thumb>div{width:100%!important;max-width:200px;height:auto!important;aspect-ratio:160 / 220}.detail-hero-thumb>div>img,.detail-hero-thumb>div>svg{width:100%!important;height:100%!important}.detail-sidebar{font-size:13px}.sidebar-card{background:var(--bg-elevated);border:1px solid var(--hairline);border-radius:8px;padding:20px;margin-bottom:16px}.sidebar-card-title{font-family:var(--serif);font-size:15px;font-weight:600;margin-bottom:12px;display:flex;justify-content:space-between;align-items:baseline}.hf-artifact-row{display:block;padding:6px 0;border-bottom:1px dashed var(--hairline);font-family:var(--mono);font-size:11px;color:var(--ink-soft);text-decoration:none}.hf-artifact-row-header{display:flex;justify-content:space-between;align-items:center;gap:12px}.hf-artifact-count{font-weight:600;color:var(--ink);text-decoration:none}.hf-artifact-count:hover{text-decoration:underline}.hf-artifact-count--empty{color:var(--ink-faint)}.hf-artifact-links{display:flex;flex-direction:column;gap:4px;margin-top:6px;padding-left:10px}.hf-artifact-links a{color:var(--accent-text);text-decoration:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.hf-artifact-links a:hover{text-decoration:underline}.hf-artifact-toggle{align-self:flex-start;margin-top:2px;padding:0;border:0;background:transparent;color:var(--ink-faint);font:inherit;cursor:pointer}.hf-artifact-toggle:hover{color:var(--accent-text)}.sidebar-card-title .badge{font-family:var(--mono);font-size:10px;font-weight:500;color:var(--ink-faint);background:var(--bg-subtle);padding:2px 6px;border-radius:3px}.x-thread-list{display:flex;flex-direction:column;gap:10px}.x-thread{display:block;padding:12px;border:1px solid var(--hairline);border-radius:8px;background:var(--bg);color:var(--ink);text-decoration:none;transition:border-color .15s}.x-thread:hover{border-color:var(--hairline-strong)}.x-thread:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.x-thread-header{display:flex;align-items:center;gap:8px;min-width:0}.x-thread-avatar{width:28px;height:28px;border-radius:50%;flex-shrink:0;-o-object-fit:cover;object-fit:cover;background:var(--bg-subtle)}.x-thread-avatar--fallback{display:inline-flex;align-items:center;justify-content:center;font-family:var(--sans);font-size:12px;font-weight:600;color:var(--ink-soft)}.x-thread-author{display:flex;flex-direction:column;min-width:0;flex:1 1 auto;line-height:1.25}.x-thread-name{font-family:var(--sans);font-size:12.5px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.x-thread-handle{font-family:var(--mono);font-size:10.5px;color:var(--ink-faint);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.x-thread-logo{flex-shrink:0;color:var(--ink-soft);display:inline-flex}.x-thread-text{margin:10px 0 0;font-family:var(--sans);font-size:12.5px;line-height:1.5;color:var(--ink);white-space:pre-line;overflow-wrap:anywhere;display:-webkit-box;-webkit-line-clamp:7;-webkit-box-orient:vertical;overflow:hidden}.x-thread-link{color:var(--accent-text)}.x-thread-media{position:relative;margin-top:10px;border-radius:6px;overflow:hidden;border:1px solid var(--hairline);background:var(--bg-subtle);aspect-ratio:16 / 9}.x-thread-media img,.x-thread-media video{width:100%;height:100%;-o-object-fit:cover;object-fit:cover;display:block}.x-thread-play{position:absolute;inset:50% auto auto 50%;transform:translate(-50%,-50%);width:36px;height:36px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;padding-left:3px;font-size:13px;color:#fff;background:#0009}.x-thread-meta{display:flex;flex-wrap:wrap;align-items:center;gap:4px 10px;margin-top:10px;font-family:var(--mono);font-size:10.5px;color:var(--ink-faint)}.x-thread-read{margin-left:auto;color:var(--accent-text)}.citation-copy-btn{display:inline-flex;align-items:center;gap:4px;font-family:var(--mono);font-size:10px;font-weight:500;color:var(--ink-faint);background:var(--bg-subtle);border:1px solid var(--hairline);padding:2px 8px;border-radius:3px;cursor:pointer;transition:color .15s,border-color .15s,background .15s}.citation-copy-btn:hover{color:var(--ink);border-color:var(--ink)}.citation-copy-btn:focus-visible{outline:none;border-color:var(--ink);color:var(--ink)}.copy-to-bucket-card{padding:0;overflow:hidden}.copy-to-bucket-trigger{display:flex;align-items:center;gap:8px;width:100%;padding:13px 14px 8px;border:0;background:transparent;color:var(--ink);font-family:var(--sans);font-size:14px;font-weight:650;text-align:left;cursor:pointer}.copy-to-bucket-trigger:hover{color:var(--accent)}.copy-to-bucket-title{font-family:var(--serif);font-size:15px;font-weight:600}.copy-to-bucket-arrow{font-family:var(--sans);font-size:20px;font-weight:400;line-height:.75}.copy-to-bucket-dialog-arrow{font-family:var(--sans);font-size:26px;font-weight:400;line-height:1}.copy-to-bucket-new{margin-left:auto;padding:2px 5px;border-radius:4px;background:color-mix(in srgb,#2563eb 14%,transparent);color:#2563eb;font-size:9px;font-weight:800;letter-spacing:.04em;text-transform:uppercase}.copy-to-bucket-meta{padding:0 14px 12px 37px;color:var(--ink-faint);font-family:var(--mono);font-size:10px}.bucket-choice{display:flex;align-items:center;justify-content:center;gap:8px;min-height:46px;border:1px solid var(--hairline);border-radius:6px;font-weight:500;cursor:pointer}.bucket-choice:has([data-state=checked]){border-color:var(--ink-soft);box-shadow:inset 0 0 0 1px var(--ink-soft)}.bucket-artifact-list{max-height:168px;overflow-y:auto;border:1px solid var(--hairline);border-radius:6px}.bucket-artifact-row{display:flex;align-items:center;gap:9px;min-height:42px;padding:7px 10px;border-bottom:1px solid var(--hairline)}.bucket-artifact-row:last-child{border-bottom:0}.bucket-artifact-kind{display:inline-block;width:52px;color:var(--ink-faint);font-family:var(--mono);font-size:9px;text-transform:uppercase}.bucket-artifact-name{overflow-wrap:anywhere;color:var(--ink);font-family:var(--mono);font-size:11px}.bucket-artifact-open{display:flex;flex:none;align-items:center;gap:4px;color:var(--ink-soft);font-size:11px;text-decoration:none}.bucket-artifact-open:hover{color:var(--accent);text-decoration:underline}.bucket-copy-commands{max-height:190px;overflow:auto;margin:0;padding:12px;border:1px solid var(--hairline);border-radius:6px;background:var(--bg-subtle);color:var(--ink-soft);font-family:var(--mono);font-size:10px;line-height:1.5;white-space:pre-wrap;word-break:break-word}.code-line{font-family:var(--mono);font-size:11px;background:var(--bg);padding:8px 10px;border-radius:4px;border:1px solid var(--hairline);display:flex;justify-content:space-between;align-items:center;gap:10px;color:var(--ink-soft);margin-bottom:8px;min-width:0}.code-line-repo{display:flex;align-items:center;gap:8px;min-width:0;flex:1 1 auto}.code-line-repo-name{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.code-line-official{flex-shrink:0;font-family:var(--mono);font-size:10px;color:var(--accent-text)}.code-line-stars{flex-shrink:0;font-family:var(--mono);font-size:11px}.code-line .copy{color:var(--ink-faint);cursor:pointer;padding:2px 4px}.code-line .copy:hover{color:var(--ink)}.related-paper{display:block;padding:12px 0;border-bottom:1px solid var(--hairline);cursor:pointer}.related-paper:last-child{border-bottom:none;padding-bottom:0}.related-paper:first-child{padding-top:0}.related-title{font-family:var(--serif);font-size:13.5px;font-weight:500;line-height:1.3;margin-bottom:6px;color:var(--ink)}.related-paper:hover .related-title{color:var(--accent-text)}.related-meta{font-family:var(--mono);font-size:10px;color:var(--ink-faint);display:flex;gap:10px}.introduced-banner{display:flex;flex-wrap:wrap;align-items:center;gap:10px 14px;margin-top:18px;margin-bottom:8px;padding:12px 14px;background:var(--highlight-bg);border:1px solid var(--highlight-border);border-radius:3px}.introduced-label{font-family:var(--mono);font-size:10px;letter-spacing:.14em;text-transform:uppercase;color:var(--highlight-text);font-weight:600}.introduced-methods{display:flex;flex-wrap:wrap;gap:6px}.introduced-pill{display:inline-flex;align-items:center;gap:6px;padding:5px 11px;background:var(--bg-elevated);border:1px solid var(--highlight-border);border-radius:999px;font-family:var(--mono);font-size:12px;font-weight:500;color:var(--ink);cursor:pointer;transition:background .12s,border-color .12s}.introduced-pill:hover{background:var(--bg-subtle);border-color:var(--highlight-text)}.introduced-banner--framework{--highlight-bg: oklch(.97 .035 295);--highlight-text: oklch(.42 .1 295);--highlight-border: oklch(.85 .07 295)}.dark .introduced-banner--framework{--highlight-bg: oklch(.27 .04 295);--highlight-text: oklch(.82 .1 295);--highlight-border: oklch(.46 .07 295)}.introduced-arrow{font-family:var(--mono);color:var(--ink-faint);font-size:12px}.introduced-note{font-family:var(--serif);font-style:italic;font-size:13px;color:var(--ink-soft)}.lineage-banner{background:var(--info-bg);border-color:var(--info-border);flex-direction:column;align-items:stretch;gap:8px}.lineage-row{display:flex;flex-wrap:wrap;align-items:center;gap:10px 14px}.lineage-label{color:var(--info-text)}.lineage-pill{border-color:var(--info-border)}.lineage-pill:hover{background:var(--bg-subtle);border-color:var(--info-text)}.lineage-arrow-back{margin-right:-2px}.results-table{width:100%;border-collapse:collapse;font-size:13px;margin-bottom:32px;table-layout:fixed}.results-table th{text-align:left;font-family:var(--mono);font-size:10px;letter-spacing:.12em;text-transform:uppercase;color:var(--ink-faint);font-weight:500;padding:10px 6px;border-bottom:1px solid var(--hairline-strong);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.results-table th:first-child,.results-table td:first-child{padding-left:0}.results-table th:last-child,.results-table td:last-child{padding-right:0}.results-table td{padding:14px 6px;border-bottom:1px solid var(--hairline);font-family:var(--serif);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.results-table tr:last-child td{border-bottom:none}.results-table .task-link{color:var(--accent-text);font-family:var(--mono);font-size:11px;cursor:pointer}.results-table .task-link:hover{text-decoration:underline;text-underline-offset:3px}.results-table .model{color:var(--ink)}.results-table .model-hf-link{display:inline-flex;align-items:center;gap:4px;color:inherit;text-decoration:none}.results-table .model-hf-link:hover{text-decoration:underline;text-underline-offset:3px}.results-table .model-hf-link svg{opacity:.6;flex-shrink:0}.results-table .benchmark{color:var(--ink)}.results-table .benchmark a{color:inherit;text-decoration:none}.results-table .benchmark a:hover{color:var(--accent-text);text-decoration:underline;text-underline-offset:3px}.results-table .metric{font-family:var(--mono);font-size:11px;color:var(--ink-soft);text-transform:uppercase;letter-spacing:.05em}.results-table .value{font-family:var(--mono);font-size:13px;font-weight:600;color:var(--ink);font-feature-settings:"tnum"}.results-table .rank{font-family:var(--mono);font-size:12px;color:var(--ink-soft);font-feature-settings:"tnum"}.results-table .compare{font-family:var(--mono);font-size:11px;text-align:right}.results-table .compare a{color:var(--accent-text);cursor:pointer;white-space:nowrap}.results-table .compare a:hover{text-decoration:underline;text-underline-offset:3px}.tldr-box{position:relative;padding:18px 22px 18px 24px;background:var(--bg-elevated);border:1px solid var(--hairline);border-left:3px solid var(--accent);border-radius:4px;margin-bottom:32px;font-family:var(--serif);font-size:15px;line-height:1.6;color:var(--ink)}.tldr-box .model-stamp{position:absolute;top:18px;right:22px;font-family:var(--mono);font-size:9px;letter-spacing:.08em;color:var(--ink-faint)}.section-rule{font-family:var(--mono);font-size:10px;letter-spacing:.12em;text-transform:uppercase;color:var(--ink-faint);padding-bottom:10px;border-bottom:1px solid var(--hairline);margin-bottom:18px;margin-top:32px;display:flex;align-items:baseline;justify-content:space-between}.section-rule .accent{color:var(--ink-soft);font-family:var(--serif);font-style:italic;text-transform:none;letter-spacing:0;font-size:12px}.section-rule a:hover{color:var(--accent-text);text-decoration:underline;text-underline-offset:3px}.paper-section-anchor{scroll-margin-top:80px}.section-anchor-link{color:inherit;text-decoration:none}.section-anchor-link:hover{color:var(--accent-text);text-decoration:underline;text-underline-offset:3px}.results-task-permalink{margin-left:6px;font-size:11px;opacity:.55}.results-task-permalink:hover{opacity:1}.edit-link{margin-left:8px;background:none;border:none;cursor:pointer;color:var(--accent-text);text-decoration:underline;font-family:var(--mono);font-size:11px;padding:0}.edit-link:hover{opacity:.85}.results-badge-copy{position:relative;padding-left:16px;white-space:nowrap}.results-badge-copy svg{position:absolute;top:50%;left:0;transform:translateY(-50%)}.read-full{font-family:var(--mono);font-size:11px;color:var(--ink-faint);cursor:pointer;margin-top:12px}.read-full:hover{color:var(--accent-text)}.version-select{font-family:var(--mono);font-size:11px;background:var(--bg-elevated);border:1px solid var(--hairline-strong);border-radius:3px;padding:2px 6px;color:var(--ink);cursor:pointer}.version-select:hover{border-color:var(--accent)}@media (max-width: 880px){.detail-grid{grid-template-columns:minmax(0,1fr);gap:32px}.detail-grid>*{min-width:0}.detail-hero{grid-template-columns:minmax(0,1fr);gap:24px}.detail-hero .action-row>*{min-width:0;max-width:100%}.detail-hero .action-btn,.detail-hero .action-btn-segment.action-btn-main,.detail-hero .bm-action-btn{max-width:100%;white-space:normal;overflow-wrap:anywhere}.detail-hero-thumb{justify-content:flex-start}.detail-hero-thumb>div{max-width:200px;min-height:0;aspect-ratio:160 / 220;height:auto!important}.detail-sidebar{font-size:13px}}@media (max-width: 640px){.detail-hero-thumb{justify-content:center}.results-table{font-size:12px}.results-table th,.results-table td{padding:10px 4px}}.action-row{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:32px}.action-btn-composite{display:inline-flex;align-items:stretch;overflow:hidden;border:1px solid var(--hairline);border-radius:6px;background:var(--bg-elevated)}.action-btn-segment.action-btn-main{display:inline-flex;align-items:center;gap:6px;padding:7px 12px;border:0;background:transparent;color:var(--ink);font-size:12px;font-weight:500;text-decoration:none;cursor:pointer;transition:background .15s}.action-btn-segment.action-btn-main:hover,.action-btn-segment.action-btn-edit:hover{background:var(--bg-subtle)}.action-btn-segment.action-btn-edit{padding:7px 10px;border:0;border-left:1px solid var(--hairline);background:transparent;color:var(--accent-text);font-family:var(--mono);font-size:11px;font-weight:400;cursor:pointer;transition:background .15s}
 
1
+ .detail-grid{display:grid;grid-template-columns:1fr 320px;gap:56px;align-items:start}.detail-meta{display:flex;align-items:center;gap:16px;flex-wrap:wrap;font-family:var(--mono);font-size:11px;color:var(--ink-faint);margin-bottom:16px;padding-bottom:16px;border-bottom:1px solid var(--hairline)}.detail-authors{font-family:var(--serif);font-size:15px;color:var(--ink-soft);margin-bottom:8px;line-height:1.5}.detail-authors a{color:var(--ink);border-bottom:1px dotted var(--hairline-strong)}.detail-authors a:hover{border-bottom-color:var(--ink)}.detail-author-avatar{width:22px;height:22px;margin-right:5px;vertical-align:-6px}.abstract-text{font-family:var(--serif);font-size:16px;line-height:1.65;color:var(--ink);text-wrap:pretty;margin-bottom:32px}.abstract-text .first-letter:first-letter{font-size:3.2em;line-height:.9;float:left;margin:4px 8px 0 0;font-weight:600;font-family:var(--serif);color:var(--accent-text)}.project-page-menu{max-width:min(360px,calc(100vw - 24px))}.project-page-menu a{max-width:320px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.detail-hero{display:grid;grid-template-columns:minmax(0,1fr) 200px;gap:32px;align-items:stretch;margin-bottom:32px}.detail-hero-main{min-width:0}.detail-hero .action-row{margin-bottom:0}.detail-hero-thumb{display:flex;justify-content:center;align-self:stretch;min-height:0}.detail-hero-thumb>div{width:100%!important;max-width:200px;height:auto!important;aspect-ratio:160 / 220}.detail-hero-thumb>div>img,.detail-hero-thumb>div>svg{width:100%!important;height:100%!important}.detail-sidebar{font-size:13px}.sidebar-card{background:var(--bg-elevated);border:1px solid var(--hairline);border-radius:8px;padding:20px;margin-bottom:16px}.sidebar-card-title{font-family:var(--serif);font-size:15px;font-weight:600;margin-bottom:12px;display:flex;justify-content:space-between;align-items:baseline}.hf-artifact-row{display:block;padding:6px 0;border-bottom:1px dashed var(--hairline);font-family:var(--mono);font-size:11px;color:var(--ink-soft);text-decoration:none}.hf-artifact-row-header{display:flex;justify-content:space-between;align-items:center;gap:12px}.hf-artifact-count{font-weight:600;color:var(--ink);text-decoration:none}.hf-artifact-count:hover{text-decoration:underline}.hf-artifact-count--empty{color:var(--ink-faint)}.hf-artifact-links{display:flex;flex-direction:column;gap:4px;margin-top:6px;padding-left:10px}.hf-artifact-links a{color:var(--accent-text);text-decoration:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.hf-artifact-links a:hover{text-decoration:underline}.hf-artifact-toggle{align-self:flex-start;margin-top:2px;padding:0;border:0;background:transparent;color:var(--ink-faint);font:inherit;cursor:pointer}.hf-artifact-toggle:hover{color:var(--accent-text)}.sidebar-card-title .badge{font-family:var(--mono);font-size:10px;font-weight:500;color:var(--ink-faint);background:var(--bg-subtle);padding:2px 6px;border-radius:3px}.x-thread-list{display:flex;flex-direction:column;gap:10px}.x-thread{display:block;padding:12px;border:1px solid var(--hairline);border-radius:8px;background:var(--bg);color:var(--ink);text-decoration:none;transition:border-color .15s}.x-thread:hover{border-color:var(--hairline-strong)}.x-thread:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.x-thread-header{display:flex;align-items:center;gap:8px;min-width:0}.x-thread-avatar{width:28px;height:28px;border-radius:50%;flex-shrink:0;-o-object-fit:cover;object-fit:cover;background:var(--bg-subtle)}.x-thread-avatar--fallback{display:inline-flex;align-items:center;justify-content:center;font-family:var(--sans);font-size:12px;font-weight:600;color:var(--ink-soft)}.x-thread-author{display:flex;flex-direction:column;min-width:0;flex:1 1 auto;line-height:1.25}.x-thread-name{font-family:var(--sans);font-size:12.5px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.x-thread-handle{font-family:var(--mono);font-size:10.5px;color:var(--ink-faint);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.x-thread-logo{flex-shrink:0;color:var(--ink-soft);display:inline-flex}.x-thread-text{margin:10px 0 0;font-family:var(--sans);font-size:12.5px;line-height:1.5;color:var(--ink);white-space:pre-line;overflow-wrap:anywhere;display:-webkit-box;-webkit-line-clamp:7;-webkit-box-orient:vertical;overflow:hidden}.x-thread-link{color:var(--accent-text)}.x-thread-media{position:relative;margin-top:10px;border-radius:6px;overflow:hidden;border:1px solid var(--hairline);background:var(--bg-subtle);aspect-ratio:16 / 9}.x-thread-media img,.x-thread-media video{width:100%;height:100%;-o-object-fit:cover;object-fit:cover;display:block}.x-thread-play{position:absolute;inset:50% auto auto 50%;transform:translate(-50%,-50%);width:36px;height:36px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;padding-left:3px;font-size:13px;color:#fff;background:#0009}.x-thread-meta{display:flex;flex-wrap:wrap;align-items:center;gap:4px 10px;margin-top:10px;font-family:var(--mono);font-size:10.5px;color:var(--ink-faint)}.x-thread-read{margin-left:auto;color:var(--accent-text)}.citation-copy-btn{display:inline-flex;align-items:center;gap:4px;font-family:var(--mono);font-size:10px;font-weight:500;color:var(--ink-faint);background:var(--bg-subtle);border:1px solid var(--hairline);padding:2px 8px;border-radius:3px;cursor:pointer;transition:color .15s,border-color .15s,background .15s}.citation-copy-btn:hover{color:var(--ink);border-color:var(--ink)}.citation-copy-btn:focus-visible{outline:none;border-color:var(--ink);color:var(--ink)}.copy-to-bucket-card{padding:0;overflow:hidden}.copy-to-bucket-trigger{display:flex;align-items:center;gap:8px;width:100%;padding:13px 14px 8px;border:0;background:transparent;color:var(--ink);font-family:var(--sans);font-size:14px;font-weight:650;text-align:left;cursor:pointer}.copy-to-bucket-trigger:hover{color:var(--accent)}.copy-to-bucket-title{font-family:var(--serif);font-size:15px;font-weight:600}.copy-to-bucket-arrow{font-family:var(--sans);font-size:20px;font-weight:400;line-height:.75}.copy-to-bucket-dialog-arrow{font-family:var(--sans);font-size:26px;font-weight:400;line-height:1}.copy-to-bucket-new{margin-left:auto;padding:2px 5px;border-radius:4px;background:color-mix(in srgb,#2563eb 14%,transparent);color:#2563eb;font-size:9px;font-weight:800;letter-spacing:.04em;text-transform:uppercase}.copy-to-bucket-meta{padding:0 14px 12px 37px;color:var(--ink-faint);font-family:var(--mono);font-size:10px}.bucket-choice{display:flex;align-items:center;justify-content:center;gap:8px;min-height:46px;border:1px solid var(--hairline);border-radius:6px;font-weight:500;cursor:pointer}.bucket-choice:has([data-state=checked]){border-color:var(--ink-soft);box-shadow:inset 0 0 0 1px var(--ink-soft)}.bucket-artifact-list{max-height:168px;overflow-y:auto;border:1px solid var(--hairline);border-radius:6px}.bucket-artifact-row{display:flex;align-items:center;gap:9px;min-height:42px;padding:7px 10px;border-bottom:1px solid var(--hairline)}.bucket-artifact-row:last-child{border-bottom:0}.bucket-artifact-kind{display:inline-block;width:52px;color:var(--ink-faint);font-family:var(--mono);font-size:9px;text-transform:uppercase}.bucket-artifact-name{overflow-wrap:anywhere;color:var(--ink);font-family:var(--mono);font-size:11px}.bucket-artifact-open{display:flex;flex:none;align-items:center;gap:4px;color:var(--ink-soft);font-size:11px;text-decoration:none}.bucket-artifact-open:hover{color:var(--accent);text-decoration:underline}.bucket-copy-commands{max-height:190px;overflow:auto;margin:0;padding:12px;border:1px solid var(--hairline);border-radius:6px;background:var(--bg-subtle);color:var(--ink-soft);font-family:var(--mono);font-size:10px;line-height:1.5;white-space:pre-wrap;word-break:break-word}.code-line{font-family:var(--mono);font-size:11px;background:var(--bg);padding:8px 10px;border-radius:4px;border:1px solid var(--hairline);display:flex;justify-content:space-between;align-items:center;gap:10px;color:var(--ink-soft);margin-bottom:8px;min-width:0}.code-line-repo{display:flex;align-items:center;gap:8px;min-width:0;flex:1 1 auto}.code-line-repo-name{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.code-line-official{flex-shrink:0;font-family:var(--mono);font-size:10px;color:var(--accent-text)}.code-line-stars{flex-shrink:0;font-family:var(--mono);font-size:11px}.code-line .copy{color:var(--ink-faint);cursor:pointer;padding:2px 4px}.code-line .copy:hover{color:var(--ink)}.related-paper{display:block;padding:12px 0;border-bottom:1px solid var(--hairline);cursor:pointer}.related-paper:last-child{border-bottom:none;padding-bottom:0}.related-paper:first-child{padding-top:0}.related-title{font-family:var(--serif);font-size:13.5px;font-weight:500;line-height:1.3;margin-bottom:6px;color:var(--ink)}.related-paper:hover .related-title{color:var(--accent-text)}.related-meta{font-family:var(--mono);font-size:10px;color:var(--ink-faint);display:flex;gap:10px}.introduced-banner{display:flex;flex-wrap:wrap;align-items:center;gap:10px 14px;margin-top:18px;margin-bottom:8px;padding:12px 14px;background:var(--highlight-bg);border:1px solid var(--highlight-border);border-radius:3px}.introduced-label{font-family:var(--mono);font-size:10px;letter-spacing:.14em;text-transform:uppercase;color:var(--highlight-text);font-weight:600}.introduced-methods{display:flex;flex-wrap:wrap;gap:6px}.introduced-pill{display:inline-flex;align-items:center;gap:6px;padding:5px 11px;background:var(--bg-elevated);border:1px solid var(--highlight-border);border-radius:999px;font-family:var(--mono);font-size:12px;font-weight:500;color:var(--ink);cursor:pointer;transition:background .12s,border-color .12s}.introduced-pill:hover{background:var(--bg-subtle);border-color:var(--highlight-text)}.introduced-banner--framework{--highlight-bg: oklch(.97 .035 295);--highlight-text: oklch(.42 .1 295);--highlight-border: oklch(.85 .07 295)}.dark .introduced-banner--framework{--highlight-bg: oklch(.27 .04 295);--highlight-text: oklch(.82 .1 295);--highlight-border: oklch(.46 .07 295)}.introduced-arrow{font-family:var(--mono);color:var(--ink-faint);font-size:12px}.introduced-note{font-family:var(--serif);font-style:italic;font-size:13px;color:var(--ink-soft)}.lineage-banner{background:var(--info-bg);border-color:var(--info-border);flex-direction:column;align-items:stretch;gap:8px}.lineage-row{display:flex;flex-wrap:wrap;align-items:center;gap:10px 14px}.lineage-label{color:var(--info-text)}.lineage-pill{border-color:var(--info-border)}.lineage-pill:hover{background:var(--bg-subtle);border-color:var(--info-text)}.lineage-arrow-back{margin-right:-2px}.results-table{width:100%;border-collapse:collapse;font-size:13px;margin-bottom:32px;table-layout:fixed}.results-table th{text-align:left;font-family:var(--mono);font-size:10px;letter-spacing:.12em;text-transform:uppercase;color:var(--ink-faint);font-weight:500;padding:10px 6px;border-bottom:1px solid var(--hairline-strong);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.results-table th:first-child,.results-table td:first-child{padding-left:0}.results-table th:last-child,.results-table td:last-child{padding-right:0}.results-table td{padding:14px 6px;border-bottom:1px solid var(--hairline);font-family:var(--serif);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.results-table tr:last-child td{border-bottom:none}.results-table .task-link{color:var(--accent-text);font-family:var(--mono);font-size:11px;cursor:pointer}.results-table .task-link:hover{text-decoration:underline;text-underline-offset:3px}.results-table .model{color:var(--ink)}.results-table .model-hf-link{display:inline-flex;align-items:center;gap:4px;color:inherit;text-decoration:none}.results-table .model-hf-link:hover{text-decoration:underline;text-underline-offset:3px}.results-table .model-hf-link svg{opacity:.6;flex-shrink:0}.results-table .benchmark{color:var(--ink)}.results-table .benchmark a{color:inherit;text-decoration:none}.results-table .benchmark a:hover{color:var(--accent-text);text-decoration:underline;text-underline-offset:3px}.results-table .metric{font-family:var(--mono);font-size:11px;color:var(--ink-soft);text-transform:uppercase;letter-spacing:.05em}.results-table .value{font-family:var(--mono);font-size:13px;font-weight:600;color:var(--ink);font-feature-settings:"tnum"}.results-table .rank{font-family:var(--mono);font-size:12px;color:var(--ink-soft);font-feature-settings:"tnum"}.results-table .compare{font-family:var(--mono);font-size:11px;text-align:right}.results-table .compare a{color:var(--accent-text);cursor:pointer;white-space:nowrap}.results-table .compare a:hover{text-decoration:underline;text-underline-offset:3px}.tldr-box{position:relative;padding:18px 22px 18px 24px;background:var(--bg-elevated);border:1px solid var(--hairline);border-left:3px solid var(--accent);border-radius:4px;margin-bottom:32px;font-family:var(--serif);font-size:15px;line-height:1.6;color:var(--ink)}.tldr-box .model-stamp{position:absolute;top:18px;right:22px;font-family:var(--mono);font-size:9px;letter-spacing:.08em;color:var(--ink-faint)}.suggested-questions{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 32px;padding:0;list-style:none}.tldr-box+.suggested-questions{margin-top:-16px}.suggested-question{display:inline-flex;align-items:center;gap:8px;max-width:100%;padding:7px 12px;border:1px solid var(--hairline);border-radius:999px;background:var(--bg-elevated);color:var(--ink-soft);font-size:13px;line-height:1.35;text-decoration:none;transition:border-color .12s ease,color .12s ease}.suggested-question svg{flex-shrink:0;color:var(--accent)}.suggested-question:hover,.suggested-question:focus-visible{border-color:var(--accent);color:var(--ink)}.section-rule{font-family:var(--mono);font-size:10px;letter-spacing:.12em;text-transform:uppercase;color:var(--ink-faint);padding-bottom:10px;border-bottom:1px solid var(--hairline);margin-bottom:18px;margin-top:32px;display:flex;align-items:baseline;justify-content:space-between}.section-rule .accent{color:var(--ink-soft);font-family:var(--serif);font-style:italic;text-transform:none;letter-spacing:0;font-size:12px}.section-rule a:hover{color:var(--accent-text);text-decoration:underline;text-underline-offset:3px}.paper-section-anchor{scroll-margin-top:80px}.section-anchor-link{color:inherit;text-decoration:none}.section-anchor-link:hover{color:var(--accent-text);text-decoration:underline;text-underline-offset:3px}.results-task-permalink{margin-left:6px;font-size:11px;opacity:.55}.results-task-permalink:hover{opacity:1}.edit-link{margin-left:8px;background:none;border:none;cursor:pointer;color:var(--accent-text);text-decoration:underline;font-family:var(--mono);font-size:11px;padding:0}.edit-link:hover{opacity:.85}.results-badge-copy{position:relative;padding-left:16px;white-space:nowrap}.results-badge-copy svg{position:absolute;top:50%;left:0;transform:translateY(-50%)}.read-full{font-family:var(--mono);font-size:11px;color:var(--ink-faint);cursor:pointer;margin-top:12px}.read-full:hover{color:var(--accent-text)}.version-select{font-family:var(--mono);font-size:11px;background:var(--bg-elevated);border:1px solid var(--hairline-strong);border-radius:3px;padding:2px 6px;color:var(--ink);cursor:pointer}.version-select:hover{border-color:var(--accent)}@media (max-width: 880px){.detail-grid{grid-template-columns:minmax(0,1fr);gap:32px}.detail-grid>*{min-width:0}.detail-hero{grid-template-columns:minmax(0,1fr);gap:24px}.detail-hero .action-row>*{min-width:0;max-width:100%}.detail-hero .action-btn,.detail-hero .action-btn-segment.action-btn-main,.detail-hero .bm-action-btn{max-width:100%;white-space:normal;overflow-wrap:anywhere}.detail-hero-thumb{justify-content:flex-start}.detail-hero-thumb>div{max-width:200px;min-height:0;aspect-ratio:160 / 220;height:auto!important}.detail-sidebar{font-size:13px}}@media (max-width: 640px){.detail-hero-thumb{justify-content:center}.results-table{font-size:12px}.results-table th,.results-table td{padding:10px 4px}}.action-row{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:32px}.action-btn-composite{display:inline-flex;align-items:stretch;overflow:hidden;border:1px solid var(--hairline);border-radius:6px;background:var(--bg-elevated)}.action-btn-segment.action-btn-main{display:inline-flex;align-items:center;gap:6px;padding:7px 12px;border:0;background:transparent;color:var(--ink);font-size:12px;font-weight:500;text-decoration:none;cursor:pointer;transition:background .15s}.action-btn-segment.action-btn-main:hover,.action-btn-segment.action-btn-edit:hover{background:var(--bg-subtle)}.action-btn-segment.action-btn-edit{padding:7px 10px;border:0;border-left:1px solid var(--hairline);background:transparent;color:var(--accent-text);font-family:var(--mono);font-size:11px;font-weight:400;cursor:pointer;transition:background .15s}
assets/{PaperFeedFilters-DejcdS4D.js → PaperFeedFilters-DuB_em33.js} RENAMED
@@ -1 +1 @@
1
- import{j as e}from"./index-CcJ6cWma.js";import{I as n}from"./components-Bax1_3qI.js";const t=()=>e.jsxs("span",{className:"hf-resource-logo",children:[e.jsx("img",{className:"hf-resource-logo-black",src:"/hf-logo-monochrome-black.svg?v=20260729",alt:""}),e.jsx("img",{className:"hf-resource-logo-white",src:"/hf-logo-monochrome-white.svg?v=20260729",alt:""})]}),l=({checked:s,icon:a,label:r,onChange:o})=>e.jsxs("button",{type:"button",className:`paper-feed-filter ${s?"active":""}`,"aria-pressed":s,onClick:()=>o(!s),children:[e.jsxs("span",{className:"paper-feed-filter-content",children:[e.jsx("span",{className:"paper-feed-filter-icon","aria-hidden":"true",children:a}),r]}),s&&e.jsx("span",{className:"paper-feed-filter-check","aria-hidden":"true",children:"✓"})]}),h=({hasCode:s,hasHfArtifacts:a,onHasCodeChange:r,onHasHfArtifactsChange:o,showDivider:c=!0,showHasCode:i=!0})=>e.jsxs("div",{className:"paper-feed-resource-controls",role:"group","aria-label":"Resource filters",children:[c&&e.jsx("span",{className:"paper-feed-resource-divider","aria-hidden":"true"}),e.jsxs("div",{className:"paper-feed-filter-options",children:[i&&e.jsx(l,{checked:s,icon:e.jsx(n,{name:"github",size:14}),label:"Has code",onChange:r}),e.jsx(l,{checked:a,icon:e.jsx(t,{}),label:"Has artifacts",onChange:o})]})]});export{h as P};
 
1
+ import{j as e}from"./index-B9MfhMLC.js";import{I as n}from"./components-BZrNefuY.js";const t=()=>e.jsxs("span",{className:"hf-resource-logo",children:[e.jsx("img",{className:"hf-resource-logo-black",src:"/hf-logo-monochrome-black.svg?v=20260729",alt:""}),e.jsx("img",{className:"hf-resource-logo-white",src:"/hf-logo-monochrome-white.svg?v=20260729",alt:""})]}),l=({checked:s,icon:a,label:r,onChange:o})=>e.jsxs("button",{type:"button",className:`paper-feed-filter ${s?"active":""}`,"aria-pressed":s,onClick:()=>o(!s),children:[e.jsxs("span",{className:"paper-feed-filter-content",children:[e.jsx("span",{className:"paper-feed-filter-icon","aria-hidden":"true",children:a}),r]}),s&&e.jsx("span",{className:"paper-feed-filter-check","aria-hidden":"true",children:"✓"})]}),h=({hasCode:s,hasHfArtifacts:a,onHasCodeChange:r,onHasHfArtifactsChange:o,showDivider:c=!0,showHasCode:i=!0})=>e.jsxs("div",{className:"paper-feed-resource-controls",role:"group","aria-label":"Resource filters",children:[c&&e.jsx("span",{className:"paper-feed-resource-divider","aria-hidden":"true"}),e.jsxs("div",{className:"paper-feed-filter-options",children:[i&&e.jsx(l,{checked:s,icon:e.jsx(n,{name:"github",size:14}),label:"Has code",onChange:r}),e.jsx(l,{checked:a,icon:e.jsx(t,{}),label:"Has artifacts",onChange:o})]})]});export{h as P};
assets/{PaperPreviewLink-o7boC8db.js → PaperPreviewLink-B3LP-qo2.js} RENAMED
@@ -1,7 +1,7 @@
1
- import{o as k,f as F,m as b,a as oe,p as L,b as O,n as z,h as le,s as ce,c as ue,v as he,S as pe}from"./index-VElAzfws.js";import{l as me}from"./index-CVaIZy6l.js";import D from"./katex-DkKDou_j.js";import{j as m,F as M,U as fe,n as j,c as de,m as ge,L as E,A as xe}from"./index-CcJ6cWma.js";import{u as ye}from"./useQuery-D3-GqcPN.js";import{H as we,a as be,b as Ne}from"./hover-card-Bj7-02L3.js";import{p as ve}from"./paperQueryKeys-BP2E-0yf.js";import{p as P}from"./papers-CClaKvmL.js";import{u as ke}from"./useMutation-DPe9yGc6.js";function Fe(){return{enter:{mathFlow:e,mathFlowFenceMeta:t,mathText:s},exit:{mathFlow:i,mathFlowFence:n,mathFlowFenceMeta:r,mathFlowValue:l,mathText:o,mathTextData:l}};function e(a){const c={type:"element",tagName:"code",properties:{className:["language-math","math-display"]},children:[]};this.enter({type:"math",meta:null,value:"",data:{hName:"pre",hChildren:[c]}},a)}function t(){this.buffer()}function r(){const a=this.resume(),c=this.stack[this.stack.length-1];k(c.type==="math"),c.meta=a}function n(){this.data.mathFlowInside||(this.buffer(),this.data.mathFlowInside=!0)}function i(a){const c=this.resume().replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),h=this.stack[this.stack.length-1];k(h.type==="math"),this.exit(a),h.value=c;const f=h.data.hChildren[0];k(f.type==="element"),k(f.tagName==="code"),f.children.push({type:"text",value:c}),this.data.mathFlowInside=void 0}function s(a){this.enter({type:"inlineMath",value:"",data:{hName:"code",hProperties:{className:["language-math","math-inline"]},hChildren:[]}},a),this.buffer()}function o(a){const c=this.resume(),h=this.stack[this.stack.length-1];k(h.type==="inlineMath"),this.exit(a),h.value=c,h.data.hChildren.push({type:"text",value:c})}function l(a){this.config.enter.data.call(this,a),this.config.exit.data.call(this,a)}}function je(e){let t=(e||{}).singleDollarTextMath;return t==null&&(t=!0),n.peek=i,{unsafe:[{character:"\r",inConstruct:"mathFlowMeta"},{character:`
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||"",h=l.createTracker(a),f="$".repeat(Math.max(me(c,"$")+1,2)),g=l.enter("mathFlow");let x=h.move(f);if(s.meta){const d=l.enter("mathFlowMeta");x+=h.move(l.safe(s.meta,{after:`
3
  `,before:x,encode:["$"],...h.current()})),d()}return x+=h.move(`
4
  `),c&&(x+=h.move(c+`
5
- `)),x+=h.move(f),g(),x}function n(s,o,l){let a=s.value||"",c=1;for(t||c++;new RegExp("(^|[^$])"+"\\$".repeat(c)+"([^$]|$)").test(a);)c++;const h="$".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 x=l.compilePattern(g);let d;for(;d=x.exec(a);){let p=d.index;a.codePointAt(p)===10&&a.codePointAt(p-1)===13&&p--,a=a.slice(0,p)+" "+a.slice(d.index+1)}}return h+a+h}function i(){return"$"}}const Ce={tokenize:Te,concrete:!0,name:"mathFlow"},R={tokenize:Me,partial:!0};function Te(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"),F(e,c,"whitespace")(u))}function c(u){return u===null||b(u)?f(u):(e.enter("mathFlowFenceMeta"),e.enter("chunkString",{contentType:"string"}),h(u))}function h(u){return u===null||b(u)?(e.exit("chunkString"),e.exit("mathFlowFenceMeta"),f(u)):u===36?r(u):(e.consume(u),h)}function f(u){return e.exit("mathFlowFence"),n.interrupt?t(u):e.attempt(R,g,w)(u)}function g(u){return e.attempt({tokenize:v,partial:!0},w,x)(u)}function x(u){return(s?F(e,d,"linePrefix",s+1):d)(u)}function d(u){return u===null?w(u):b(u)?e.attempt(R,g,w)(u):(e.enter("mathFlowValue"),p(u))}function p(u){return u===null||b(u)?(e.exit("mathFlowValue"),d(u)):(e.consume(u),p)}function w(u){return e.exit("mathFlow"),t(u)}function v(u,ie,q){let _=0;return F(u,ae,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4);function ae(y){return u.enter("mathFlowFence"),u.enter("mathFlowFenceSequence"),$(y)}function $(y){return y===36?(_++,u.consume(y),$):_<o?q(y):(u.exit("mathFlowFenceSequence"),F(u,se,"whitespace")(y))}function se(y){return y===null||b(y)?(u.exit("mathFlowFence"),ie(y)):q(y)}}}function Me(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 Ee(e){let r=(e||{}).singleDollarTextMath;return r==null&&(r=!0),{tokenize:n,resolve:Ae,previous:Se,name:"mathText"};function n(i,s,o){let l=0,a,c;return h;function h(p){return i.enter("mathText"),i.enter("mathTextSequence"),f(p)}function f(p){return p===36?(i.consume(p),l++,f):l<2&&!r?o(p):(i.exit("mathTextSequence"),g(p))}function g(p){return p===null?o(p):p===36?(c=i.enter("mathTextSequence"),a=0,d(p)):p===32?(i.enter("space"),i.consume(p),i.exit("space"),g):b(p)?(i.enter("lineEnding"),i.consume(p),i.exit("lineEnding"),g):(i.enter("mathTextData"),x(p))}function x(p){return p===null||p===32||p===36||b(p)?(i.exit("mathTextData"),g(p)):(i.consume(p),x)}function d(p){return p===36?(i.consume(p),a++,d):a===l?(i.exit("mathTextSequence"),i.exit("mathText"),s(p)):(c.type="mathTextData",x(p))}}}function Ae(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 Se(e){return e!==36||this.events[this.events.length-1][1].type==="characterEscape"}function Pe(e){return{flow:{36:Ce},text:{36:Ee(e)}}}const Ie={};function At(e){const t=this,r=e||Ie,n=t.data(),i=n.micromarkExtensions||(n.micromarkExtensions=[]),s=n.fromMarkdownExtensions||(n.fromMarkdownExtensions=[]),o=n.toMarkdownExtensions||(n.toMarkdownExtensions=[]);i.push(Pe(r)),s.push(Fe()),o.push(je(r))}const B=/[#.]/g;function qe(e,t){const r=e||"",n={};let i=0,s,o;for(;i<r.length;){B.lastIndex=i;const l=B.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 Y(e,t,r){const n=r?Oe(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(),h=n?n.get(c):void 0;if(a.tagName=h||c,_e(o))l.unshift(o);else for(const[f,g]of Object.entries(o))$e(e,a.properties,f,g)}for(const c of l)A(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 $e(e,t,r,n){const i=oe(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=L(n):i.commaSeparated?s=O(n):i.commaOrSpaceSeparated?s=L(O(n).join(" ")):s=U(i,i.property,n):Array.isArray(n)?s=[...n]:s=i.property==="style"?Le(n):String(n);if(Array.isArray(s)){const o=[];for(const l of s)o.push(U(i,i.property,l));s=o}i.property==="className"&&Array.isArray(t.className)&&(s=t.className.concat(s)),t[i.property]=s}}function A(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)A(e,r);else if(typeof t=="object"&&"type"in t)t.type==="root"?A(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function U(e,t,r){if(typeof r=="string"){if(e.number&&r&&!Number.isNaN(Number(r)))return Number(r);if((e.boolean||e.overloadedBoolean)&&(r===""||z(r)===z(t)))return!0}return r}function Le(e){const t=[];for(const[r,n]of Object.entries(e))t.push([r,n].join(": "));return t.join("; ")}function Oe(e){const t=new Map;for(const r of e)t.set(r.toLowerCase(),r);return t}const ze=["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"],De=Y(le,"div"),Re=Y(ce,"g",ze),T={html:"http://www.w3.org/1999/xhtml",svg:"http://www.w3.org/2000/svg"};function Be(e,t){return Z(e,{})||{type:"root",children:[]}}function Z(e,t){const r=Ue(e,t);return r&&t.afterTransform&&t.afterTransform(e,r),r}function Ue(e,t){switch(e.nodeType){case 1:return Ge(e,t);case 3:return Ke(e);case 8:return Ve(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:J(e,t)}}function He(){return{type:"doctype"}}function Ke(e){return{type:"text",value:e.nodeValue||""}}function Ve(e){return{type:"comment",value:e.nodeValue||""}}function Ge(e,t){const r=e.namespaceURI,n=r===T.svg?Re:De,i=r===T.html?e.tagName.toLowerCase():e.tagName,s=r===T.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,J(s,t))}function J(e,t){const r=e.childNodes,n=[];let i=-1;for(;++i<r.length;){const s=Z(r[i],t);s!==void 0&&n.push(s)}return n}new DOMParser;function Qe(e,t){const r=Xe(e);return Be(r)}function Xe(e){const t=document.createElement("template");return t.innerHTML=e,t.content}const K=function(e,t,r){const n=ue(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 Ye(e);if(typeof e=="object")return We(e);if(typeof e=="function")return I(e);throw new Error("Expected function, string, or array as `test`")};function We(e){const t=[];let r=-1;for(;++r<e.length;)t[r]=N(e[r]);return I(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 I(t);function t(r){return r.tagName===e}}function I(e){return t;function t(r,n,i){return!!(Je(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 Je(e){return e!==null&&typeof e=="object"&&"type"in e&&"tagName"in e}const V=/\n/g,G=/[\t ]+/g,S=N("br"),Q=N(ot),et=N("p"),X=N("tr"),tt=N(["datalist","head","noembed","noframes","noscript","rp","script","style","template","title",st,lt]),ee=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 nt(e,t){const r=t||{},n="children"in e?e.children:[],i=ee(e),s=re(e,{whitespace:r.whitespace||"normal"}),o=[];(e.type==="text"||e.type==="comment")&&o.push(...ne(e,{breakBefore:!0,breakAfter:!0}));let l=-1;for(;++l<n.length;)o.push(...te(n[l],e,{whitespace:s,breakBefore:l?void 0:i,breakAfter:l<n.length-1?S(n[l+1]):i}));const a=[];let c;for(l=-1;++l<o.length;){const h=o[l];typeof h=="number"?c!==void 0&&h>c&&(c=h):h&&(c!==void 0&&c>-1&&a.push(`
6
- `.repeat(c)||" "),c=-1,a.push(h))}return a.join("")}function te(e,t,r){return e.type==="element"?rt(e,t,r):e.type==="text"?r.whitespace==="normal"?ne(e,r):it(e):[]}function rt(e,t,r){const n=re(e,r),i=e.children||[];let s=-1,o=[];if(tt(e))return o;let l,a;for(S(e)||X(e)&&K(t,e,X)?a=`
7
- `:et(e)?(l=2,a=2):ee(e)&&(l=1,a=1);++s<i.length;)o=o.concat(te(i[s],e,{whitespace:n,breakBefore:s?void 0:l,breakAfter:s<i.length-1?S(i[s+1]):a}));return Q(e)&&K(t,e,Q)&&o.push(" "),l&&o.unshift(l),a&&o.push(a),o}function ne(e,t){const r=String(e.value),n=[],i=[];let s=0;for(;s<=r.length;){V.lastIndex=s;const a=V.exec(r),c=a&&"index"in a?a.index:r.length;n.push(at(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 it(e){return[String(e.value)]}function at(e,t,r){const n=[];let i=0,s;for(;i<e.length;){G.lastIndex=i;const o=G.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 re(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 st(e){return!!(e.properties||{}).hidden}function ot(e){return e.tagName==="td"||e.tagName==="th"}function lt(e){return e.tagName==="dialog"&&!(e.properties||{}).open}const ct={},ut=[];function St(e){const t=e||ct;return function(r,n){he(r,"element",function(i,s){const o=Array.isArray(i.properties.className)?i.properties.className:ut,l=o.includes("language-math"),a=o.includes("math-display"),c=o.includes("math-inline");let h=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],h=!0),!f)return;const x=nt(g,{whitespace:"pre"});let d;try{d=D.renderToString(x,{...t,displayMode:h,throwOnError:!0})}catch(w){const v=w,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{d=D.renderToString(x,{...t,displayMode:h,strict:"ignore",throwOnError:!1})}catch{d=[{type:"element",tagName:"span",properties:{className:["katex-error"],style:"color:"+(t.errorColor||"#cc0000"),title:String(w)},children:[{type:"text",value:x}]}]}}typeof d=="string"&&(d=Qe(d).children);const p=f.children.indexOf(g);return f.children.splice(p,1,...d),pe})}}function ht(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 pt(e){if(!e.authors.length)return"";const t=e.authors.slice(0,3).join(", ");return e.authors.length>3?`${t}, et al.`:t}function mt(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 ft=({seed:e=0})=>m.jsxs("div",{className:"paper-preview-thumb","aria-hidden":"true","data-testid":"faux-paper-thumb",children:[m.jsxs("div",{className:"paper-preview-thumb-title",children:[m.jsx("span",{}),m.jsx("span",{})]}),m.jsx("div",{className:"paper-preview-thumb-auth"}),m.jsxs("div",{className:"paper-preview-thumb-cols",children:[m.jsx("div",{className:"paper-preview-thumb-col"}),m.jsx("div",{className:"paper-preview-thumb-col"})]}),m.jsx("div",{className:"paper-preview-thumb-fig",style:{top:62+e%3*8}})]}),dt=({thumbnailUrl:e,seed:t})=>{const[r,n]=M.useState(!1),i=fe(e);return M.useEffect(()=>n(!1),[i]),!i||r?m.jsx(ft,{seed:t}):m.jsx("div",{className:"paper-preview-thumb paper-preview-thumb-real",children:m.jsx("img",{"data-testid":"paper-preview-image",src:i,alt:"",loading:"lazy",decoding:"async",onError:()=>n(!0)})})},gt=({data:e})=>{const t=e.routeId.split("").reduce((n,i)=>n+i.charCodeAt(0),0),r=pt(e);return m.jsxs("div",{className:"paper-preview-inner",children:[m.jsx(dt,{thumbnailUrl:e.thumbnailUrl,seed:t}),m.jsxs("div",{className:"paper-preview-meta",children:[m.jsx("div",{className:"paper-preview-title",children:e.title}),r&&m.jsx("div",{className:"paper-preview-auth",children:r}),m.jsxs("div",{className:"paper-preview-venue",children:[mt(e),e.arxivId&&m.jsxs(m.Fragment,{children:[" · arXiv:",e.arxivId]}),e.citationCount!=null&&m.jsxs(m.Fragment,{children:[" · ↑ ",e.citationCount.toLocaleString()]})]}),e.tasks.length>0&&m.jsx("div",{className:"paper-preview-tags",children:e.tasks.map(n=>m.jsx("span",{className:"paper-preview-tag",children:n.name},n.slug||n.name))})]})]})},C=e=>ve.preview(j(e)),xt=e=>e.arxiv_id??e.id,W=200;function Pt(e,t=P){const r=new Set,n=async s=>{const o=new Map;for(const l of s)l.arxiv_id&&r.add(j(l.arxiv_id));for(let l=0;l<s.length;l+=W){const{references:a}=await t.lookup(s.slice(l,l+W));for(const c of a){if(!c.paper)continue;const h=xt(c.paper);e.setQueryData(C(h),c.paper),o.set(c.key,h)}}return o};return{lookup:n,warm:s=>{const o=s.filter(l=>{const a=j(l);return r.has(a)||e.getQueryData(C(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=de(),r=ge(),n=ke({mutationFn:()=>P.submit({arxiv_id:e}),onSuccess:s=>{s.pending_review||r.invalidateQueries({queryKey:C(e)})}});return(i=n.data)!=null&&i.pending_review?m.jsxs("div",{className:"paper-preview-status paper-preview-index-request",children:[m.jsx("span",{children:"Indexing request queued for review."}),m.jsx(E,{to:"/submissions",target:"_blank",rel:"noopener noreferrer",children:"View submissions ↗"})]}):m.jsxs("div",{className:"paper-preview-status paper-preview-index-request",children:[m.jsx("span",{children:"Not indexed on Papers with Code yet."}),t!=null&&t.user?m.jsx("button",{type:"button",disabled:n.isPending,onClick:()=>n.mutate(),children:n.isPending?"Requesting…":"Request indexing"}):m.jsx(E,{to:`/submit?arxiv_id=${encodeURIComponent(e)}`,target:"_blank",rel:"noopener noreferrer",children:"Request indexing ↗"}),n.isError&&m.jsx("span",{role:"alert",children:n.error.message})]})},bt=()=>typeof window.matchMedia=="function"&&window.matchMedia("(hover: none), (pointer: coarse)").matches,It=({routeId:e,to:t,initialData:r,className:n,children:i,target:s,title:o,ariaLabel:l,onClick:a,previewFooter:c})=>{const h=j(e),[f,g]=M.useState(!1),x=!!(r!=null&&r.title.trim()),d=ye({queryKey:C(h),queryFn:()=>P.get(h,!1),enabled:f&&!x,staleTime:5*60*1e3,gcTime:30*60*1e3,retry:!1}),p=r??(d.data?ht(d.data,h):void 0),w=d.error instanceof xe&&d.error.status===404&&yt.test(h),v=m.jsx(E,{className:n,to:t??`/paper/${h}`,target:s,title:o,"aria-label":l,onClick:u=>{g(!1),a==null||a(u)},rel:s==="_blank"?"noopener noreferrer":void 0,children:i});return m.jsxs(we,{open:f,onOpenChange:u=>{(!u||!bt())&&g(u)},openDelay:150,closeDelay:100,children:[m.jsx(be,{asChild:!0,children:v}),m.jsx(Ne,{className:"paper-preview-pop",side:"bottom",align:"start",collisionPadding:12,children:p?m.jsxs(m.Fragment,{children:[m.jsx(gt,{data:p}),c==null?void 0:c(p)]}):w?m.jsx(wt,{arxivId:h}):d.isError?m.jsx("div",{className:"paper-preview-status",children:"Preview unavailable"}):m.jsx("div",{className:"paper-preview-status","aria-live":"polite",children:"Loading preview…"})})]})};export{It as P,At as a,Pt as c,St as r};
 
1
+ import{o as k,f as F,m as b,a as oe,p as L,b as O,n as z,h as le,s as ce,c as ue,v as he,S as pe}from"./index-10yxmORR.js";import{l as me}from"./index-CSRWQTrf.js";import D from"./katex-DkKDou_j.js";import{j as m,F as M,V as fe,n as j,c as de,m as ge,L as E,A as xe}from"./index-B9MfhMLC.js";import{u as ye}from"./useQuery-Bx81pmgm.js";import{H as we,a as be,b as Ne}from"./hover-card-Bv4bJws5.js";import{p as ve}from"./paperQueryKeys-BP2E-0yf.js";import{p as P}from"./papers-BGvqL27Z.js";import{u as ke}from"./useMutation-C2athD5k.js";function Fe(){return{enter:{mathFlow:e,mathFlowFenceMeta:t,mathText:s},exit:{mathFlow:i,mathFlowFence:n,mathFlowFenceMeta:r,mathFlowValue:l,mathText:o,mathTextData:l}};function e(a){const c={type:"element",tagName:"code",properties:{className:["language-math","math-display"]},children:[]};this.enter({type:"math",meta:null,value:"",data:{hName:"pre",hChildren:[c]}},a)}function t(){this.buffer()}function r(){const a=this.resume(),c=this.stack[this.stack.length-1];k(c.type==="math"),c.meta=a}function n(){this.data.mathFlowInside||(this.buffer(),this.data.mathFlowInside=!0)}function i(a){const c=this.resume().replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),h=this.stack[this.stack.length-1];k(h.type==="math"),this.exit(a),h.value=c;const f=h.data.hChildren[0];k(f.type==="element"),k(f.tagName==="code"),f.children.push({type:"text",value:c}),this.data.mathFlowInside=void 0}function s(a){this.enter({type:"inlineMath",value:"",data:{hName:"code",hProperties:{className:["language-math","math-inline"]},hChildren:[]}},a),this.buffer()}function o(a){const c=this.resume(),h=this.stack[this.stack.length-1];k(h.type==="inlineMath"),this.exit(a),h.value=c,h.data.hChildren.push({type:"text",value:c})}function l(a){this.config.enter.data.call(this,a),this.config.exit.data.call(this,a)}}function je(e){let t=(e||{}).singleDollarTextMath;return t==null&&(t=!0),n.peek=i,{unsafe:[{character:"\r",inConstruct:"mathFlowMeta"},{character:`
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||"",h=l.createTracker(a),f="$".repeat(Math.max(me(c,"$")+1,2)),g=l.enter("mathFlow");let x=h.move(f);if(s.meta){const d=l.enter("mathFlowMeta");x+=h.move(l.safe(s.meta,{after:`
3
  `,before:x,encode:["$"],...h.current()})),d()}return x+=h.move(`
4
  `),c&&(x+=h.move(c+`
5
+ `)),x+=h.move(f),g(),x}function n(s,o,l){let a=s.value||"",c=1;for(t||c++;new RegExp("(^|[^$])"+"\\$".repeat(c)+"([^$]|$)").test(a);)c++;const h="$".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 x=l.compilePattern(g);let d;for(;d=x.exec(a);){let p=d.index;a.codePointAt(p)===10&&a.codePointAt(p-1)===13&&p--,a=a.slice(0,p)+" "+a.slice(d.index+1)}}return h+a+h}function i(){return"$"}}const Ce={tokenize:Te,concrete:!0,name:"mathFlow"},R={tokenize:Me,partial:!0};function Te(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"),F(e,c,"whitespace")(u))}function c(u){return u===null||b(u)?f(u):(e.enter("mathFlowFenceMeta"),e.enter("chunkString",{contentType:"string"}),h(u))}function h(u){return u===null||b(u)?(e.exit("chunkString"),e.exit("mathFlowFenceMeta"),f(u)):u===36?r(u):(e.consume(u),h)}function f(u){return e.exit("mathFlowFence"),n.interrupt?t(u):e.attempt(R,g,w)(u)}function g(u){return e.attempt({tokenize:v,partial:!0},w,x)(u)}function x(u){return(s?F(e,d,"linePrefix",s+1):d)(u)}function d(u){return u===null?w(u):b(u)?e.attempt(R,g,w)(u):(e.enter("mathFlowValue"),p(u))}function p(u){return u===null||b(u)?(e.exit("mathFlowValue"),d(u)):(e.consume(u),p)}function w(u){return e.exit("mathFlow"),t(u)}function v(u,ie,q){let _=0;return F(u,ae,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4);function ae(y){return u.enter("mathFlowFence"),u.enter("mathFlowFenceSequence"),$(y)}function $(y){return y===36?(_++,u.consume(y),$):_<o?q(y):(u.exit("mathFlowFenceSequence"),F(u,se,"whitespace")(y))}function se(y){return y===null||b(y)?(u.exit("mathFlowFence"),ie(y)):q(y)}}}function Me(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 Ee(e){let r=(e||{}).singleDollarTextMath;return r==null&&(r=!0),{tokenize:n,resolve:Ae,previous:Se,name:"mathText"};function n(i,s,o){let l=0,a,c;return h;function h(p){return i.enter("mathText"),i.enter("mathTextSequence"),f(p)}function f(p){return p===36?(i.consume(p),l++,f):l<2&&!r?o(p):(i.exit("mathTextSequence"),g(p))}function g(p){return p===null?o(p):p===36?(c=i.enter("mathTextSequence"),a=0,d(p)):p===32?(i.enter("space"),i.consume(p),i.exit("space"),g):b(p)?(i.enter("lineEnding"),i.consume(p),i.exit("lineEnding"),g):(i.enter("mathTextData"),x(p))}function x(p){return p===null||p===32||p===36||b(p)?(i.exit("mathTextData"),g(p)):(i.consume(p),x)}function d(p){return p===36?(i.consume(p),a++,d):a===l?(i.exit("mathTextSequence"),i.exit("mathText"),s(p)):(c.type="mathTextData",x(p))}}}function Ae(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 Se(e){return e!==36||this.events[this.events.length-1][1].type==="characterEscape"}function Pe(e){return{flow:{36:Ce},text:{36:Ee(e)}}}const Ie={};function At(e){const t=this,r=e||Ie,n=t.data(),i=n.micromarkExtensions||(n.micromarkExtensions=[]),s=n.fromMarkdownExtensions||(n.fromMarkdownExtensions=[]),o=n.toMarkdownExtensions||(n.toMarkdownExtensions=[]);i.push(Pe(r)),s.push(Fe()),o.push(je(r))}const B=/[#.]/g;function qe(e,t){const r=e||"",n={};let i=0,s,o;for(;i<r.length;){B.lastIndex=i;const l=B.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 Y(e,t,r){const n=r?Oe(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(),h=n?n.get(c):void 0;if(a.tagName=h||c,_e(o))l.unshift(o);else for(const[f,g]of Object.entries(o))$e(e,a.properties,f,g)}for(const c of l)A(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 $e(e,t,r,n){const i=oe(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=L(n):i.commaSeparated?s=O(n):i.commaOrSpaceSeparated?s=L(O(n).join(" ")):s=U(i,i.property,n):Array.isArray(n)?s=[...n]:s=i.property==="style"?Le(n):String(n);if(Array.isArray(s)){const o=[];for(const l of s)o.push(U(i,i.property,l));s=o}i.property==="className"&&Array.isArray(t.className)&&(s=t.className.concat(s)),t[i.property]=s}}function A(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)A(e,r);else if(typeof t=="object"&&"type"in t)t.type==="root"?A(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function U(e,t,r){if(typeof r=="string"){if(e.number&&r&&!Number.isNaN(Number(r)))return Number(r);if((e.boolean||e.overloadedBoolean)&&(r===""||z(r)===z(t)))return!0}return r}function Le(e){const t=[];for(const[r,n]of Object.entries(e))t.push([r,n].join(": "));return t.join("; ")}function Oe(e){const t=new Map;for(const r of e)t.set(r.toLowerCase(),r);return t}const ze=["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"],De=Y(le,"div"),Re=Y(ce,"g",ze),T={html:"http://www.w3.org/1999/xhtml",svg:"http://www.w3.org/2000/svg"};function Be(e,t){return Z(e,{})||{type:"root",children:[]}}function Z(e,t){const r=Ue(e,t);return r&&t.afterTransform&&t.afterTransform(e,r),r}function Ue(e,t){switch(e.nodeType){case 1:return Ge(e,t);case 3:return He(e);case 8:return Ke(e);case 9:return V(e,t);case 10:return Ve();case 11:return V(e,t);default:return}}function V(e,t){return{type:"root",children:J(e,t)}}function Ve(){return{type:"doctype"}}function He(e){return{type:"text",value:e.nodeValue||""}}function Ke(e){return{type:"comment",value:e.nodeValue||""}}function Ge(e,t){const r=e.namespaceURI,n=r===T.svg?Re:De,i=r===T.html?e.tagName.toLowerCase():e.tagName,s=r===T.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,J(s,t))}function J(e,t){const r=e.childNodes,n=[];let i=-1;for(;++i<r.length;){const s=Z(r[i],t);s!==void 0&&n.push(s)}return n}new DOMParser;function Qe(e,t){const r=Xe(e);return Be(r)}function Xe(e){const t=document.createElement("template");return t.innerHTML=e,t.content}const H=function(e,t,r){const n=ue(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 Ye(e);if(typeof e=="object")return We(e);if(typeof e=="function")return I(e);throw new Error("Expected function, string, or array as `test`")};function We(e){const t=[];let r=-1;for(;++r<e.length;)t[r]=N(e[r]);return I(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 I(t);function t(r){return r.tagName===e}}function I(e){return t;function t(r,n,i){return!!(Je(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 Je(e){return e!==null&&typeof e=="object"&&"type"in e&&"tagName"in e}const K=/\n/g,G=/[\t ]+/g,S=N("br"),Q=N(ot),et=N("p"),X=N("tr"),tt=N(["datalist","head","noembed","noframes","noscript","rp","script","style","template","title",st,lt]),ee=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 nt(e,t){const r=t||{},n="children"in e?e.children:[],i=ee(e),s=re(e,{whitespace:r.whitespace||"normal"}),o=[];(e.type==="text"||e.type==="comment")&&o.push(...ne(e,{breakBefore:!0,breakAfter:!0}));let l=-1;for(;++l<n.length;)o.push(...te(n[l],e,{whitespace:s,breakBefore:l?void 0:i,breakAfter:l<n.length-1?S(n[l+1]):i}));const a=[];let c;for(l=-1;++l<o.length;){const h=o[l];typeof h=="number"?c!==void 0&&h>c&&(c=h):h&&(c!==void 0&&c>-1&&a.push(`
6
+ `.repeat(c)||" "),c=-1,a.push(h))}return a.join("")}function te(e,t,r){return e.type==="element"?rt(e,t,r):e.type==="text"?r.whitespace==="normal"?ne(e,r):it(e):[]}function rt(e,t,r){const n=re(e,r),i=e.children||[];let s=-1,o=[];if(tt(e))return o;let l,a;for(S(e)||X(e)&&H(t,e,X)?a=`
7
+ `:et(e)?(l=2,a=2):ee(e)&&(l=1,a=1);++s<i.length;)o=o.concat(te(i[s],e,{whitespace:n,breakBefore:s?void 0:l,breakAfter:s<i.length-1?S(i[s+1]):a}));return Q(e)&&H(t,e,Q)&&o.push(" "),l&&o.unshift(l),a&&o.push(a),o}function ne(e,t){const r=String(e.value),n=[],i=[];let s=0;for(;s<=r.length;){K.lastIndex=s;const a=K.exec(r),c=a&&"index"in a?a.index:r.length;n.push(at(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 it(e){return[String(e.value)]}function at(e,t,r){const n=[];let i=0,s;for(;i<e.length;){G.lastIndex=i;const o=G.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 re(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 st(e){return!!(e.properties||{}).hidden}function ot(e){return e.tagName==="td"||e.tagName==="th"}function lt(e){return e.tagName==="dialog"&&!(e.properties||{}).open}const ct={},ut=[];function St(e){const t=e||ct;return function(r,n){he(r,"element",function(i,s){const o=Array.isArray(i.properties.className)?i.properties.className:ut,l=o.includes("language-math"),a=o.includes("math-display"),c=o.includes("math-inline");let h=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],h=!0),!f)return;const x=nt(g,{whitespace:"pre"});let d;try{d=D.renderToString(x,{...t,displayMode:h,throwOnError:!0})}catch(w){const v=w,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{d=D.renderToString(x,{...t,displayMode:h,strict:"ignore",throwOnError:!1})}catch{d=[{type:"element",tagName:"span",properties:{className:["katex-error"],style:"color:"+(t.errorColor||"#cc0000"),title:String(w)},children:[{type:"text",value:x}]}]}}typeof d=="string"&&(d=Qe(d).children);const p=f.children.indexOf(g);return f.children.splice(p,1,...d),pe})}}function ht(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 pt(e){if(!e.authors.length)return"";const t=e.authors.slice(0,3).join(", ");return e.authors.length>3?`${t}, et al.`:t}function mt(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 ft=({seed:e=0})=>m.jsxs("div",{className:"paper-preview-thumb","aria-hidden":"true","data-testid":"faux-paper-thumb",children:[m.jsxs("div",{className:"paper-preview-thumb-title",children:[m.jsx("span",{}),m.jsx("span",{})]}),m.jsx("div",{className:"paper-preview-thumb-auth"}),m.jsxs("div",{className:"paper-preview-thumb-cols",children:[m.jsx("div",{className:"paper-preview-thumb-col"}),m.jsx("div",{className:"paper-preview-thumb-col"})]}),m.jsx("div",{className:"paper-preview-thumb-fig",style:{top:62+e%3*8}})]}),dt=({thumbnailUrl:e,seed:t})=>{const[r,n]=M.useState(!1),i=fe(e);return M.useEffect(()=>n(!1),[i]),!i||r?m.jsx(ft,{seed:t}):m.jsx("div",{className:"paper-preview-thumb paper-preview-thumb-real",children:m.jsx("img",{"data-testid":"paper-preview-image",src:i,alt:"",loading:"lazy",decoding:"async",onError:()=>n(!0)})})},gt=({data:e})=>{const t=e.routeId.split("").reduce((n,i)=>n+i.charCodeAt(0),0),r=pt(e);return m.jsxs("div",{className:"paper-preview-inner",children:[m.jsx(dt,{thumbnailUrl:e.thumbnailUrl,seed:t}),m.jsxs("div",{className:"paper-preview-meta",children:[m.jsx("div",{className:"paper-preview-title",children:e.title}),r&&m.jsx("div",{className:"paper-preview-auth",children:r}),m.jsxs("div",{className:"paper-preview-venue",children:[mt(e),e.arxivId&&m.jsxs(m.Fragment,{children:[" · arXiv:",e.arxivId]}),e.citationCount!=null&&m.jsxs(m.Fragment,{children:[" · ↑ ",e.citationCount.toLocaleString()]})]}),e.tasks.length>0&&m.jsx("div",{className:"paper-preview-tags",children:e.tasks.map(n=>m.jsx("span",{className:"paper-preview-tag",children:n.name},n.slug||n.name))})]})]})},C=e=>ve.preview(j(e)),xt=e=>e.arxiv_id??e.id,W=200;function Pt(e,t=P){const r=new Set,n=async s=>{const o=new Map;for(const l of s)l.arxiv_id&&r.add(j(l.arxiv_id));for(let l=0;l<s.length;l+=W){const{references:a}=await t.lookup(s.slice(l,l+W));for(const c of a){if(!c.paper)continue;const h=xt(c.paper);e.setQueryData(C(h),c.paper),o.set(c.key,h)}}return o};return{lookup:n,warm:s=>{const o=s.filter(l=>{const a=j(l);return r.has(a)||e.getQueryData(C(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=de(),r=ge(),n=ke({mutationFn:()=>P.submit({arxiv_id:e}),onSuccess:s=>{s.pending_review||r.invalidateQueries({queryKey:C(e)})}});return(i=n.data)!=null&&i.pending_review?m.jsxs("div",{className:"paper-preview-status paper-preview-index-request",children:[m.jsx("span",{children:"Indexing request queued for review."}),m.jsx(E,{to:"/submissions",target:"_blank",rel:"noopener noreferrer",children:"View submissions ↗"})]}):m.jsxs("div",{className:"paper-preview-status paper-preview-index-request",children:[m.jsx("span",{children:"Not indexed on Papers with Code yet."}),t!=null&&t.user?m.jsx("button",{type:"button",disabled:n.isPending,onClick:()=>n.mutate(),children:n.isPending?"Requesting…":"Request indexing"}):m.jsx(E,{to:`/submit?arxiv_id=${encodeURIComponent(e)}`,target:"_blank",rel:"noopener noreferrer",children:"Request indexing ↗"}),n.isError&&m.jsx("span",{role:"alert",children:n.error.message})]})},bt=()=>typeof window.matchMedia=="function"&&window.matchMedia("(hover: none), (pointer: coarse)").matches,It=({routeId:e,to:t,initialData:r,className:n,children:i,target:s,title:o,ariaLabel:l,onClick:a,previewFooter:c})=>{const h=j(e),[f,g]=M.useState(!1),x=!!(r!=null&&r.title.trim()),d=ye({queryKey:C(h),queryFn:()=>P.get(h,!1),enabled:f&&!x,staleTime:5*60*1e3,gcTime:30*60*1e3,retry:!1}),p=r??(d.data?ht(d.data,h):void 0),w=d.error instanceof xe&&d.error.status===404&&yt.test(h),v=m.jsx(E,{className:n,to:t??`/paper/${h}`,target:s,title:o,"aria-label":l,onClick:u=>{g(!1),a==null||a(u)},rel:s==="_blank"?"noopener noreferrer":void 0,children:i});return m.jsxs(we,{open:f,onOpenChange:u=>{(!u||!bt())&&g(u)},openDelay:150,closeDelay:100,children:[m.jsx(be,{asChild:!0,children:v}),m.jsx(Ne,{className:"paper-preview-pop",side:"bottom",align:"start",collisionPadding:12,children:p?m.jsxs(m.Fragment,{children:[m.jsx(gt,{data:p}),c==null?void 0:c(p)]}):w?m.jsx(wt,{arxivId:h}):d.isError?m.jsx("div",{className:"paper-preview-status",children:"Preview unavailable"}):m.jsx("div",{className:"paper-preview-status","aria-live":"polite",children:"Loading preview…"})})]})};export{It as P,At as a,Pt as c,St as r};
assets/{PaperReaderView-C1gVJgR9.js → PaperReaderView-Ca1UB_CN.js} RENAMED
@@ -1 +1 @@
1
- import{r as s,j as a,A as X,u as me,b as Ee,n as Te,U as he,V as We,L as D}from"./index-CcJ6cWma.js";import{u as ge}from"./useQuery-D3-GqcPN.js";import{u as ze,R as Me,A as Le,c as Fe,a as He,P as Ue}from"./ArtifactWorkspace-DjmVwPtv.js";import{M as Ke}from"./MarkdownText-Day0Kgef.js";import{g as qe}from"./papers-CClaKvmL.js";import{w as Be,e as De}from"./paperReader-CarQTapU.js";import{b as Oe}from"./usePapers-TCIcWoUA.js";import{c as Ve}from"./chat-CmC2kF8c.js";import{s as Q}from"./safeExternalHref-CkBrsh84.js";import{ChatExperience as Xe}from"./ChatView-D05FqzNN.js";import"./chatLaunch-BWQHjZ_V.js";import"./chevron-down-DJZrO8F3.js";/* empty css */import"./hover-card-Bj7-02L3.js";import"./github-CloBLbHx.js";import"./github-B2H6YANV.js";import"./catalog-B7hp4mKD.js";import"./PaperPreviewLink-o7boC8db.js";import"./index-VElAzfws.js";import"./index-CVaIZy6l.js";import"./katex-DkKDou_j.js";import"./paperQueryKeys-BP2E-0yf.js";import"./useMutation-DPe9yGc6.js";import"./copy-C-Vd1dCk.js";import"./file-text-tKMRCnZb.js";import"./external-link-BuxK9KNv.js";import"./useInfiniteQuery-CFy22PuG.js";import"./chatPrompts-DypmWIqx.js";import"./openrouter-DgpeaTae.js";import"./queryOptions-C9woPjwX.js";function Qe(r){return r instanceof X&&r.status===422?"This page could not be turned into a readable paper.":r instanceof X&&r.status===503?"Paper content is still being prepared. Please try again later.":"The paper could not be loaded."}function Ye({paperId:r,paperKey:i,paperTitle:n,paperHref:b,sourceUrl:c,resources:t,paperVersion:u="",selectionEnabled:v=!1,onReady:g,onPaperSelection:k,onPaperSelectionError:l}){const $=s.useRef(null),p=ge({queryKey:["paperWebMarkdown",r],queryFn:()=>qe(r),staleTime:5*6e4,retry:(y,d)=>y<2&&!(d instanceof X&&d.status<500),retryDelay:3e3}),P=p.isSuccess;s.useEffect(()=>{P&&(g==null||g())},[g,P]),ze({enabled:v&&!!u&&P,pagesRoot:$,routeId:i,paperVersion:u,numPages:1,onSelect:k,onError:l});const w=p.data?Be(p.data):"";return a.jsxs("div",{className:"pdf-viewer",children:[a.jsx(Me,{paperTitle:n,paperHref:b,resources:t,label:"Paper controls",children:a.jsx("div",{className:"pdf-toolbar-controls",children:a.jsx("a",{href:c,target:"_blank",rel:"noopener noreferrer",children:"Open original"})})}),a.jsx("div",{className:"pdf-scroll-frame",children:a.jsx("div",{className:"pdf-scroll",role:"region","aria-label":"Paper web page",children:p.isPending?a.jsx("div",{className:"pdf-loading",role:"status",children:"Preparing a readable version of this page…"}):p.isError?a.jsxs("div",{className:"pdf-error",role:"alert",children:[a.jsx("p",{children:Qe(p.error)}),a.jsxs("div",{children:[a.jsx("button",{type:"button",onClick:()=>void p.refetch(),children:"Retry"})," ",a.jsx("a",{href:c,target:"_blank",rel:"noopener noreferrer",children:"Open original"})]})]}):a.jsxs("article",{ref:$,className:"reader-web-document","data-page":"1",children:[!w.startsWith("# ")&&a.jsx("h1",{children:n}),a.jsx(Ke,{text:w})]})})})]})}const be=66,Ze=240,Y="pwc:reader:split-ratio",z=r=>`pwc:reader:session:${r}`,O=r=>`pwc:reader:assistant-collapsed:${r}`,ve=r=>`pwc:reader:page:${r}`;function V(r){const i=Number(sessionStorage.getItem(ve(r)));return Number.isInteger(i)&&i>0?i:1}function Ge(){const r=Number(localStorage.getItem(Y));return Number.isFinite(r)&&r>=45&&r<=75?r:be}function Je(r){const i=Q(r);if(!i)return null;const n=new URL(i);return(n.hostname==="arxiv.org"||n.hostname==="www.arxiv.org")&&n.pathname.startsWith("/pdf/")&&n.pathname.endsWith(".pdf")&&(n.pathname=n.pathname.slice(0,-4)),n.href}const et=/^\/pdf\/(\d{4}\.\d{4,5}(?:v\d{1,3})?|[a-z]+(?:-[a-z]+)*(?:\.[A-Z]{2})?\/\d{7}(?:v\d{1,3})?)$/;function tt(r){const i=new URL(r),n=i.pathname.match(et);return(i.hostname==="arxiv.org"||i.hostname==="www.arxiv.org")&&n&&!i.search?he(`/paper-assets/arxiv-pdf/${n[1]}`)??r:r}function rt(r){return new URL(r).hostname.replace(/^www\./,"")}function at(r){if(!r)return{};const i={};for(const c of r.repositories??[]){if(!c.is_official)continue;const t=Q(c.url);if(!t)continue;const u=new URL(t),v=u.pathname.split("/").filter(Boolean);if((u.hostname==="github.com"||u.hostname==="www.github.com")&&v.length>=2){i.repository={href:t,stars:c.num_stars||0};break}}const n=[...r.project_pages??[]].sort((c,t)=>Number(t.is_official)-Number(c.is_official));for(const c of n){const t=Q(c.url);if(t){i.projectPage={href:t,label:rt(t)};break}}const b=r.hf_artifact_summary?r.hf_artifact_summary.model_count+r.hf_artifact_summary.dataset_count+r.hf_artifact_summary.space_count:new Set([...r.hf_models??[],...r.hf_datasets??[],...r.hf_spaces??[]]).size;return b>0&&r.arxiv_id&&(i.huggingFace={href:`https://huggingface.co/papers/${r.arxiv_id.replace(/v\d+$/i,"")}`,count:b}),i}function st(){var de,ue,pe,fe;const r=Ee(),{paperId:i}=me(),n=Te(i??"").replace(/v\d+$/i,""),b=Oe(n,!!n),c=ge({queryKey:["chatAvailability"],queryFn:()=>Ve.getAvailability(),refetchInterval:3e4,retry:!1}),t=b.data,u=t?De(t):null,v=u?null:(t==null?void 0:t.source)==="external"?he(`/paper-assets/external/${t.id}/paper.pdf`):Je(t==null?void 0:t.url_pdf),g=v&&(t==null?void 0:t.source)!=="external"?tt(v):v,k=at(t),l=((de=t==null?void 0:t.arxiv_id)==null?void 0:de.replace(/v\d+$/i,""))||n,$=s.useCallback(()=>r(`/paper/${l}`),[l,r]),[p,P]=s.useState(()=>sessionStorage.getItem(z(n))||void 0),[w,y]=s.useState(Ge),[d,Z]=s.useState(()=>sessionStorage.getItem(O(n))==="1"),[x,A]=s.useState("paper"),[M,j]=s.useState(),[we,G]=s.useState(!1),xe=s.useCallback(()=>G(!0),[]),[Pe,R]=s.useState(""),[Re,Se]=s.useState(()=>V(n)),[C,ye]=s.useState(0),[J,ee]=s.useState(!1),[je,L]=s.useState(!1),I=s.useRef(null),F=s.useRef(null),H=s.useRef(null),te=s.useRef(null),N=s.useRef(!1),E=s.useRef(0),S=s.useRef(0),U=s.useRef(0),_=s.useRef(w),K=s.useRef(V(n)),q=s.useRef(t==null?void 0:t.version),re=Fe().reset,ae=s.useRef(`${n}:${p??"new"}`),f=C>=840;s.useEffect(()=>{const e=`${n}:${p??"new"}`;ae.current!==e&&(ae.current=e,re())},[p,re,n]),s.useEffect(()=>{t!=null&&t.version&&q.current&&t.version!==q.current&&(j(void 0),R("")),q.current=t==null?void 0:t.version},[t==null?void 0:t.version]),s.useEffect(()=>{window.clearTimeout(E.current),L(!1);const e=sessionStorage.getItem(z(n));P(e||void 0),Z(sessionStorage.getItem(O(n))==="1"),A("paper"),G(!1),j(void 0),R("");const o=V(n);K.current=o,Se(o)},[n]),s.useEffect(()=>()=>{window.clearTimeout(E.current),cancelAnimationFrame(S.current)},[]),s.useLayoutEffect(()=>{const e=I.current;if(!e)return;const o=()=>ye(e.clientWidth);o();const m=new ResizeObserver(o);return m.observe(e),()=>m.disconnect()},[t]),s.useEffect(()=>{if(!t)return;document.title=`${t.title} — Papers With Code reader`;let e=document.querySelector('meta[name="robots"]');const o=!e;e||(e=document.createElement("meta"),e.name="robots",document.head.appendChild(e));const m=e.content;e.content="noindex, nofollow";let h=document.querySelector('link[rel="canonical"]');const Ie=!h;h||(h=document.createElement("link"),h.rel="canonical",document.head.appendChild(h));const Ne=h.href;return h.href=`${window.location.origin}/paper/${l}`,()=>{document.title="Papers With Code",o?e==null||e.remove():e&&(e.content=m),Ie?h==null||h.remove():h&&(h.href=Ne)}},[l,t]);const T=s.useCallback(e=>{if(!C)return Math.max(45,Math.min(75,e));const o=480/C*100,m=100-360/C*100;return Math.max(o,Math.min(m,e))},[C]);s.useEffect(()=>y(e=>{const o=T(e);return _.current=o,o}),[T]);const W=e=>{const o=T(e);_.current=o,y(o),localStorage.setItem(Y,String(o))},se=e=>{var m;const o=T(e);_.current=o,F.current&&(F.current.style.width=`${o}%`),H.current&&(H.current.style.width=`${100-o}%`),(m=te.current)==null||m.setAttribute("aria-valuenow",String(Math.round(o)))},ne=e=>{U.current=e,!S.current&&(S.current=requestAnimationFrame(()=>{var m;S.current=0;const o=(m=I.current)==null?void 0:m.getBoundingClientRect();o!=null&&o.width&&se((U.current-o.left)/o.width*100)}))},Ce=e=>{N.current=!0,ee(!0),e.currentTarget.setPointerCapture(e.pointerId),ne(e.clientX)},B=()=>{var e;if(N.current){if(S.current){cancelAnimationFrame(S.current),S.current=0;const o=(e=I.current)==null?void 0:e.getBoundingClientRect();o!=null&&o.width&&se((U.current-o.left)/o.width*100)}N.current=!1,y(_.current),localStorage.setItem(Y,String(_.current)),ee(!1)}},oe=e=>{window.clearTimeout(E.current),L(!0),Z(e),sessionStorage.setItem(O(n),e?"1":"0"),E.current=window.setTimeout(()=>L(!1),Ze+40)},_e=e=>{P(e),sessionStorage.setItem(z(n),e)},ke=()=>{P(void 0),sessionStorage.removeItem(z(n)),j(void 0),R("")},ie=((ue=c.data)==null?void 0:ue.paper_reader_selection_enabled)===!0,ce=e=>{j(e),R(`Selection from page ${e.page} added to chat`),f&&d&&oe(!1)},$e=s.useCallback(e=>{j(e),e||R("")},[]),le=We()&&((pe=c.data)==null?void 0:pe.paper_reader_chat_enabled)!==!1,Ae=t&&le&&u&&!we?a.jsx("div",{className:"reader-chat-unavailable",role:"status",children:"Chat opens once the paper is ready."}):t&&le?a.jsx(Xe,{mode:"paper",routeSessionId:p,primaryPaper:{id:t.id,routeId:l,title:t.title},currentPage:()=>K.current,paperSelection:M,onPaperSelectionChange:$e,onSessionId:_e,onReaderSubmit:()=>A("assistant"),onReaderNewChat:ke}):a.jsx("div",{className:"reader-chat-unavailable",children:"Chat is not enabled for this preview."});return b.isLoading?a.jsx("div",{className:"reader-status",role:"status",children:"Loading paper…"}):b.error||!t?a.jsxs("div",{className:"reader-status",role:"alert",children:[a.jsx("p",{children:"Paper not found."}),a.jsx(D,{to:"/papers",children:"Browse papers"})]}):((fe=c.data)==null?void 0:fe.native_pdf_reader_enabled)===!1?a.jsxs("div",{className:"reader-status",role:"alert",children:[a.jsx("p",{children:"The native reader is currently unavailable."}),a.jsx(D,{to:`/paper/${l}`,children:"Back to paper"})]}):!g&&!u?a.jsxs("div",{className:"reader-status",role:"alert",children:[a.jsx("p",{children:"Native reading is unavailable for this resource."}),a.jsx(D,{to:`/paper/${l}`,children:"Back to paper"})]}):a.jsxs("div",{className:"paper-reader-shell",children:[!f&&a.jsxs("div",{className:"reader-tabs",role:"tablist","aria-label":"Reader panels",children:[a.jsx("button",{type:"button",role:"tab","aria-selected":x==="paper",onClick:()=>A("paper"),children:"Paper"}),a.jsxs("button",{type:"button",role:"tab","aria-selected":x==="assistant","aria-label":M&&x!=="assistant"?"Chat, selection attached":"Chat",onClick:()=>A("assistant"),children:["Chat",M&&x!=="assistant"&&a.jsx("span",{className:"reader-tab-pending","aria-hidden":"true"})]})]}),a.jsx(He,{variant:"reader",children:a.jsxs("div",{ref:I,className:`reader-workspace${f?" is-desktop":" is-tabs"}${d?" is-assistant-collapsed":""}${J?" is-resizing":""}`,"data-testid":"paper-chat-workspace",children:[a.jsx("section",{ref:F,className:`reader-paper-pane${!f&&x!=="paper"?" is-hidden":""}`,style:f?{width:d?"100%":`${w}%`}:void 0,role:"tabpanel","aria-label":"Paper","aria-hidden":!f&&x!=="paper",children:u?a.jsx(Ye,{paperId:t.id,paperKey:l,paperTitle:t.title,paperHref:`/paper/${l}`,sourceUrl:u,resources:k,paperVersion:t.version,selectionEnabled:ie,onReady:xe,onPaperSelection:ce,onPaperSelectionError:R}):g&&a.jsx(Ue,{url:g,downloadUrl:v??g,paperKey:l,paperTitle:t.title,paperHref:`/paper/${l}`,onClose:$,resources:k,initialPage:Re,resizeActive:J||je,selectionEnabled:ie,paperVersion:t.version,loadErrorMessage:t.source==="external"?"Paper content is still being prepared. Please try again later.":void 0,onPaperSelection:ce,onPaperSelectionError:R,onPageChange:e=>{K.current=e,sessionStorage.setItem(ve(n),String(e))}})}),f&&!d&&a.jsx("div",{ref:te,className:"reader-resize-handle",role:"separator","aria-label":"Resize paper and Chat panels","aria-orientation":"vertical","aria-valuemin":45,"aria-valuemax":75,"aria-valuenow":Math.round(w),tabIndex:0,onPointerDown:Ce,onPointerMove:e=>{N.current&&ne(e.clientX)},onPointerUp:B,onPointerCancel:B,onLostPointerCapture:B,onDoubleClick:()=>W(be),onKeyDown:e=>{(e.key==="ArrowLeft"||e.key==="ArrowRight")&&(e.preventDefault(),W(w+(e.key==="ArrowRight"?2:-2))),e.key==="Home"&&W(45),e.key==="End"&&W(75)}}),a.jsx("aside",{ref:H,id:"reader-chat-panel",className:`reader-assistant-pane${!f&&x!=="assistant"?" is-hidden":""}${f&&d?" is-collapsed":""}`,style:f?{width:d?0:`${100-w}%`}:void 0,role:"tabpanel","aria-label":"Chat","aria-hidden":!f&&x!=="assistant"||d,children:Ae}),a.jsx("div",{className:"sr-only","aria-live":"polite",children:Pe}),f&&a.jsx("button",{type:"button",className:"reader-collapse-assistant","aria-controls":"reader-chat-panel","aria-expanded":!d,onClick:()=>oe(!d),children:d?"Open chat":"Hide chat"})]})})]})}function zt(){const{paperId:r=""}=me();return a.jsx(Le,{workspaceKey:`reader:${r}`,children:a.jsx(st,{})})}export{zt as default,at as readerToolbarResources};
 
1
+ import{r as s,j as a,A as X,u as me,b as Ee,n as Te,V as he,N as We,L as D}from"./index-B9MfhMLC.js";import{u as ge}from"./useQuery-Bx81pmgm.js";import{u as ze,R as Me,A as Le,c as Fe,a as He,P as Ke}from"./ArtifactWorkspace-CJ1HK4Ql.js";import{M as Ue}from"./MarkdownText-BAxpQ8kL.js";import{g as qe}from"./papers-BGvqL27Z.js";import{w as Be,e as De}from"./paperReader-BIpQD5HO.js";import{b as Oe}from"./usePapers-DP7fFbrs.js";import{c as Ve}from"./chat-BZn2Yz-P.js";import{s as Q}from"./safeExternalHref-CkBrsh84.js";import{ChatExperience as Xe}from"./ChatView-DIICJpRR.js";import"./chatLaunch-CsBovBmE.js";import"./chevron-down-hgezkIWy.js";/* empty css */import"./hover-card-Bv4bJws5.js";import"./github-CE1K0ZU_.js";import"./github-D0bNa_Wx.js";import"./catalog-BqDz3O_s.js";import"./PaperPreviewLink-B3LP-qo2.js";import"./index-10yxmORR.js";import"./index-CSRWQTrf.js";import"./katex-DkKDou_j.js";import"./paperQueryKeys-BP2E-0yf.js";import"./useMutation-C2athD5k.js";import"./copy-407Yr7lh.js";import"./file-text-B14SZiZO.js";import"./external-link-tLC4XD6r.js";import"./useInfiniteQuery-4Zdqd3L2.js";import"./chatPrompts-DypmWIqx.js";import"./openrouter-Ixy41X1P.js";import"./queryOptions-C9woPjwX.js";function Qe(r){return r instanceof X&&r.status===422?"This page could not be turned into a readable paper.":r instanceof X&&r.status===503?"Paper content is still being prepared. Please try again later.":"The paper could not be loaded."}function Ye({paperId:r,paperKey:i,paperTitle:n,paperHref:b,sourceUrl:c,resources:t,paperVersion:u="",selectionEnabled:v=!1,onReady:g,onPaperSelection:k,onPaperSelectionError:l}){const N=s.useRef(null),p=ge({queryKey:["paperWebMarkdown",r],queryFn:()=>qe(r),staleTime:5*6e4,retry:(y,d)=>y<2&&!(d instanceof X&&d.status<500),retryDelay:3e3}),P=p.isSuccess;s.useEffect(()=>{P&&(g==null||g())},[g,P]),ze({enabled:v&&!!u&&P,pagesRoot:N,routeId:i,paperVersion:u,numPages:1,onSelect:k,onError:l});const w=p.data?Be(p.data):"";return a.jsxs("div",{className:"pdf-viewer",children:[a.jsx(Me,{paperTitle:n,paperHref:b,resources:t,label:"Paper controls",children:a.jsx("div",{className:"pdf-toolbar-controls",children:a.jsx("a",{href:c,target:"_blank",rel:"noopener noreferrer",children:"Open original"})})}),a.jsx("div",{className:"pdf-scroll-frame",children:a.jsx("div",{className:"pdf-scroll",role:"region","aria-label":"Paper web page",children:p.isPending?a.jsx("div",{className:"pdf-loading",role:"status",children:"Preparing a readable version of this page…"}):p.isError?a.jsxs("div",{className:"pdf-error",role:"alert",children:[a.jsx("p",{children:Qe(p.error)}),a.jsxs("div",{children:[a.jsx("button",{type:"button",onClick:()=>void p.refetch(),children:"Retry"})," ",a.jsx("a",{href:c,target:"_blank",rel:"noopener noreferrer",children:"Open original"})]})]}):a.jsxs("article",{ref:N,className:"reader-web-document","data-page":"1",children:[!w.startsWith("# ")&&a.jsx("h1",{children:n}),a.jsx(Ue,{text:w})]})})})]})}const be=66,Ze=240,Y="pwc:reader:split-ratio",z=r=>`pwc:reader:session:${r}`,O=r=>`pwc:reader:assistant-collapsed:${r}`,ve=r=>`pwc:reader:page:${r}`;function V(r){const i=Number(sessionStorage.getItem(ve(r)));return Number.isInteger(i)&&i>0?i:1}function Ge(){const r=Number(localStorage.getItem(Y));return Number.isFinite(r)&&r>=45&&r<=75?r:be}function Je(r){const i=Q(r);if(!i)return null;const n=new URL(i);return(n.hostname==="arxiv.org"||n.hostname==="www.arxiv.org")&&n.pathname.startsWith("/pdf/")&&n.pathname.endsWith(".pdf")&&(n.pathname=n.pathname.slice(0,-4)),n.href}const et=/^\/pdf\/(\d{4}\.\d{4,5}(?:v\d{1,3})?|[a-z]+(?:-[a-z]+)*(?:\.[A-Z]{2})?\/\d{7}(?:v\d{1,3})?)$/;function tt(r){const i=new URL(r),n=i.pathname.match(et);return(i.hostname==="arxiv.org"||i.hostname==="www.arxiv.org")&&n&&!i.search?he(`/paper-assets/arxiv-pdf/${n[1]}`)??r:r}function rt(r){return new URL(r).hostname.replace(/^www\./,"")}function at(r){if(!r)return{};const i={};for(const c of r.repositories??[]){if(!c.is_official)continue;const t=Q(c.url);if(!t)continue;const u=new URL(t),v=u.pathname.split("/").filter(Boolean);if((u.hostname==="github.com"||u.hostname==="www.github.com")&&v.length>=2){i.repository={href:t,stars:c.num_stars||0};break}}const n=[...r.project_pages??[]].sort((c,t)=>Number(t.is_official)-Number(c.is_official));for(const c of n){const t=Q(c.url);if(t){i.projectPage={href:t,label:rt(t)};break}}const b=r.hf_artifact_summary?r.hf_artifact_summary.model_count+r.hf_artifact_summary.dataset_count+r.hf_artifact_summary.space_count:new Set([...r.hf_models??[],...r.hf_datasets??[],...r.hf_spaces??[]]).size;return b>0&&r.arxiv_id&&(i.huggingFace={href:`https://huggingface.co/papers/${r.arxiv_id.replace(/v\d+$/i,"")}`,count:b}),i}function st(){var de,ue,pe,fe;const r=Ee(),{paperId:i}=me(),n=Te(i??"").replace(/v\d+$/i,""),b=Oe(n,!!n),c=ge({queryKey:["chatAvailability"],queryFn:()=>Ve.getAvailability(),refetchInterval:3e4,retry:!1}),t=b.data,u=t?De(t):null,v=u?null:(t==null?void 0:t.source)==="external"?he(`/paper-assets/external/${t.id}/paper.pdf`):Je(t==null?void 0:t.url_pdf),g=v&&(t==null?void 0:t.source)!=="external"?tt(v):v,k=at(t),l=((de=t==null?void 0:t.arxiv_id)==null?void 0:de.replace(/v\d+$/i,""))||n,N=s.useCallback(()=>r(`/paper/${l}`),[l,r]),[p,P]=s.useState(()=>sessionStorage.getItem(z(n))||void 0),[w,y]=s.useState(Ge),[d,Z]=s.useState(()=>sessionStorage.getItem(O(n))==="1"),[x,$]=s.useState("paper"),[M,j]=s.useState(),[we,G]=s.useState(!1),xe=s.useCallback(()=>G(!0),[]),[Pe,R]=s.useState(""),[Re,Se]=s.useState(()=>V(n)),[C,ye]=s.useState(0),[J,ee]=s.useState(!1),[je,L]=s.useState(!1),A=s.useRef(null),F=s.useRef(null),H=s.useRef(null),te=s.useRef(null),I=s.useRef(!1),E=s.useRef(0),S=s.useRef(0),K=s.useRef(0),_=s.useRef(w),U=s.useRef(V(n)),q=s.useRef(t==null?void 0:t.version),re=Fe().reset,ae=s.useRef(`${n}:${p??"new"}`),f=C>=840;s.useEffect(()=>{const e=`${n}:${p??"new"}`;ae.current!==e&&(ae.current=e,re())},[p,re,n]),s.useEffect(()=>{t!=null&&t.version&&q.current&&t.version!==q.current&&(j(void 0),R("")),q.current=t==null?void 0:t.version},[t==null?void 0:t.version]),s.useEffect(()=>{window.clearTimeout(E.current),L(!1);const e=sessionStorage.getItem(z(n));P(e||void 0),Z(sessionStorage.getItem(O(n))==="1"),$("paper"),G(!1),j(void 0),R("");const o=V(n);U.current=o,Se(o)},[n]),s.useEffect(()=>()=>{window.clearTimeout(E.current),cancelAnimationFrame(S.current)},[]),s.useLayoutEffect(()=>{const e=A.current;if(!e)return;const o=()=>ye(e.clientWidth);o();const m=new ResizeObserver(o);return m.observe(e),()=>m.disconnect()},[t]),s.useEffect(()=>{if(!t)return;document.title=`${t.title} — Papers With Code reader`;let e=document.querySelector('meta[name="robots"]');const o=!e;e||(e=document.createElement("meta"),e.name="robots",document.head.appendChild(e));const m=e.content;e.content="noindex, nofollow";let h=document.querySelector('link[rel="canonical"]');const Ae=!h;h||(h=document.createElement("link"),h.rel="canonical",document.head.appendChild(h));const Ie=h.href;return h.href=`${window.location.origin}/paper/${l}`,()=>{document.title="Papers With Code",o?e==null||e.remove():e&&(e.content=m),Ae?h==null||h.remove():h&&(h.href=Ie)}},[l,t]);const T=s.useCallback(e=>{if(!C)return Math.max(45,Math.min(75,e));const o=480/C*100,m=100-360/C*100;return Math.max(o,Math.min(m,e))},[C]);s.useEffect(()=>y(e=>{const o=T(e);return _.current=o,o}),[T]);const W=e=>{const o=T(e);_.current=o,y(o),localStorage.setItem(Y,String(o))},se=e=>{var m;const o=T(e);_.current=o,F.current&&(F.current.style.width=`${o}%`),H.current&&(H.current.style.width=`${100-o}%`),(m=te.current)==null||m.setAttribute("aria-valuenow",String(Math.round(o)))},ne=e=>{K.current=e,!S.current&&(S.current=requestAnimationFrame(()=>{var m;S.current=0;const o=(m=A.current)==null?void 0:m.getBoundingClientRect();o!=null&&o.width&&se((K.current-o.left)/o.width*100)}))},Ce=e=>{I.current=!0,ee(!0),e.currentTarget.setPointerCapture(e.pointerId),ne(e.clientX)},B=()=>{var e;if(I.current){if(S.current){cancelAnimationFrame(S.current),S.current=0;const o=(e=A.current)==null?void 0:e.getBoundingClientRect();o!=null&&o.width&&se((K.current-o.left)/o.width*100)}I.current=!1,y(_.current),localStorage.setItem(Y,String(_.current)),ee(!1)}},oe=e=>{window.clearTimeout(E.current),L(!0),Z(e),sessionStorage.setItem(O(n),e?"1":"0"),E.current=window.setTimeout(()=>L(!1),Ze+40)},_e=e=>{P(e),sessionStorage.setItem(z(n),e)},ke=()=>{P(void 0),sessionStorage.removeItem(z(n)),j(void 0),R("")},ie=((ue=c.data)==null?void 0:ue.paper_reader_selection_enabled)===!0,ce=e=>{j(e),R(`Selection from page ${e.page} added to chat`),f&&d&&oe(!1)},Ne=s.useCallback(e=>{j(e),e||R("")},[]),le=We()&&((pe=c.data)==null?void 0:pe.paper_reader_chat_enabled)!==!1,$e=t&&le&&u&&!we?a.jsx("div",{className:"reader-chat-unavailable",role:"status",children:"Chat opens once the paper is ready."}):t&&le?a.jsx(Xe,{mode:"paper",routeSessionId:p,primaryPaper:{id:t.id,routeId:l,title:t.title},currentPage:()=>U.current,paperSelection:M,onPaperSelectionChange:Ne,onSessionId:_e,onReaderSubmit:()=>$("assistant"),onReaderNewChat:ke}):a.jsx("div",{className:"reader-chat-unavailable",children:"Chat is not enabled for this preview."});return b.isLoading?a.jsx("div",{className:"reader-status",role:"status",children:"Loading paper…"}):b.error||!t?a.jsxs("div",{className:"reader-status",role:"alert",children:[a.jsx("p",{children:"Paper not found."}),a.jsx(D,{to:"/papers",children:"Browse papers"})]}):((fe=c.data)==null?void 0:fe.native_pdf_reader_enabled)===!1?a.jsxs("div",{className:"reader-status",role:"alert",children:[a.jsx("p",{children:"The native reader is currently unavailable."}),a.jsx(D,{to:`/paper/${l}`,children:"Back to paper"})]}):!g&&!u?a.jsxs("div",{className:"reader-status",role:"alert",children:[a.jsx("p",{children:"Native reading is unavailable for this resource."}),a.jsx(D,{to:`/paper/${l}`,children:"Back to paper"})]}):a.jsxs("div",{className:"paper-reader-shell",children:[!f&&a.jsxs("div",{className:"reader-tabs",role:"tablist","aria-label":"Reader panels",children:[a.jsx("button",{type:"button",role:"tab","aria-selected":x==="paper",onClick:()=>$("paper"),children:"Paper"}),a.jsxs("button",{type:"button",role:"tab","aria-selected":x==="assistant","aria-label":M&&x!=="assistant"?"Chat, selection attached":"Chat",onClick:()=>$("assistant"),children:["Chat",M&&x!=="assistant"&&a.jsx("span",{className:"reader-tab-pending","aria-hidden":"true"})]})]}),a.jsx(He,{variant:"reader",children:a.jsxs("div",{ref:A,className:`reader-workspace${f?" is-desktop":" is-tabs"}${d?" is-assistant-collapsed":""}${J?" is-resizing":""}`,"data-testid":"paper-chat-workspace",children:[a.jsx("section",{ref:F,className:`reader-paper-pane${!f&&x!=="paper"?" is-hidden":""}`,style:f?{width:d?"100%":`${w}%`}:void 0,role:"tabpanel","aria-label":"Paper","aria-hidden":!f&&x!=="paper",children:u?a.jsx(Ye,{paperId:t.id,paperKey:l,paperTitle:t.title,paperHref:`/paper/${l}`,sourceUrl:u,resources:k,paperVersion:t.version,selectionEnabled:ie,onReady:xe,onPaperSelection:ce,onPaperSelectionError:R}):g&&a.jsx(Ke,{url:g,downloadUrl:v??g,paperKey:l,paperTitle:t.title,paperHref:`/paper/${l}`,onClose:N,resources:k,initialPage:Re,resizeActive:J||je,selectionEnabled:ie,paperVersion:t.version,loadErrorMessage:t.source==="external"?"Paper content is still being prepared. Please try again later.":void 0,onPaperSelection:ce,onPaperSelectionError:R,onPageChange:e=>{U.current=e,sessionStorage.setItem(ve(n),String(e))}})}),f&&!d&&a.jsx("div",{ref:te,className:"reader-resize-handle",role:"separator","aria-label":"Resize paper and Chat panels","aria-orientation":"vertical","aria-valuemin":45,"aria-valuemax":75,"aria-valuenow":Math.round(w),tabIndex:0,onPointerDown:Ce,onPointerMove:e=>{I.current&&ne(e.clientX)},onPointerUp:B,onPointerCancel:B,onLostPointerCapture:B,onDoubleClick:()=>W(be),onKeyDown:e=>{(e.key==="ArrowLeft"||e.key==="ArrowRight")&&(e.preventDefault(),W(w+(e.key==="ArrowRight"?2:-2))),e.key==="Home"&&W(45),e.key==="End"&&W(75)}}),a.jsx("aside",{ref:H,id:"reader-chat-panel",className:`reader-assistant-pane${!f&&x!=="assistant"?" is-hidden":""}${f&&d?" is-collapsed":""}`,style:f?{width:d?0:`${100-w}%`}:void 0,role:"tabpanel","aria-label":"Chat","aria-hidden":!f&&x!=="assistant"||d,children:$e}),a.jsx("div",{className:"sr-only","aria-live":"polite",children:Pe}),f&&a.jsx("button",{type:"button",className:"reader-collapse-assistant","aria-controls":"reader-chat-panel","aria-expanded":!d,onClick:()=>oe(!d),children:d?"Open chat":"Hide chat"})]})})]})}function zt(){const{paperId:r=""}=me();return a.jsx(Le,{workspaceKey:`reader:${r}`,children:a.jsx(st,{})})}export{zt as default,at as readerToolbarResources};
assets/{PapersListView-D9eWbp0V.js → PapersListView-9hEXDfZu.js} RENAMED
@@ -1 +1 @@
1
- import{d as X,r as x,A as J,j as e,L as j,i as W}from"./index-CcJ6cWma.js";import{I as U,T as Y,P as Z}from"./components-Bax1_3qI.js";import{c as ee}from"./catalog-B7hp4mKD.js";import{t as se,d as ae}from"./colors-DCzRcDI4.js";import{u as re,a as te}from"./usePapers-TCIcWoUA.js";import{u as ne}from"./useDebounce-eerL6LIs.js";import{u as ie}from"./useIntersectionObserver-DtY8SYYt.js";import{S as _}from"./skeleton-B-mlrgWO.js";import{A as oe,a as ce}from"./alert-CMODHIPT.js";import{u as le}from"./useQuery-D3-GqcPN.js";import{P as de}from"./PaperFeedFilters-DejcdS4D.js";import{a as me,P as he,b as pe}from"./PaperDateFilter-_7LVshRy.js";import"./paperQueryKeys-BP2E-0yf.js";import"./LatexTitle-hDpJaCcC.js";import"./papers-CClaKvmL.js";import"./safeExternalHref-CkBrsh84.js";import"./useInfiniteQuery-CFy22PuG.js";import"./popover-CRugk4PC.js";const v=360;function ue(a,o){const m=a.toLocaleLowerCase();return o.trim().split(/\s+/).filter(Boolean).reduce((c,t)=>{const l=m.indexOf(t.toLocaleLowerCase());return l>=0&&(c<0||l<c)?l:c},-1)}function z(a,o,m){if((a.slice(0,o).match(/\$/g)||[]).length%2===0)return o;if(m==="start")return a.lastIndexOf("$",o)+1;const t=a.indexOf("$",o);return t>=0?t+1:o}function fe(a,o){if(a.length<=v)return a;const m=ue(a,o);if(m<0||m<v*.6)return a;let c=Math.max(0,m-Math.floor(v*.35)),t=Math.min(a.length,c+v);return c=z(a,c,"start"),t=z(a,t,"end"),`${c>0?"…":""}${a.slice(c,t).trim()}${t<a.length?"…":""}`}const xe=[["trending","trending"],["new","newest"],["cited","most cited"]],ge=[["relevance","relevance"],["new","newest"],["cited","most cited"]],je=a=>new Intl.NumberFormat("en",{notation:a>=1e3?"compact":"standard",maximumFractionDigits:1}).format(a),Oe=()=>{var I,$,T,O,B,H,M,q,G;const[a,o]=X(),m=a.get("framework")||void 0,c=a.get("repository")||void 0,t=!!(m||c),l=a.get("search")||"",[F,C]=x.useState(l),p=ne(F,300),n=!t&&l.trim().length>0;x.useEffect(()=>C(l),[l]),x.useEffect(()=>{if(p===l)return;const s=new URLSearchParams(a);p?s.set("search",p):s.delete("search"),o(s,{replace:!0})},[p]),x.useEffect(()=>{const s=a.get("order_by"),i=new URLSearchParams(a);n&&!["relevance","date_published","citation_count"].includes(s||"")?(i.set("order_by","relevance"),o(i,{replace:!0})):!n&&s==="relevance"&&(i.delete("order_by"),o(i,{replace:!0}))},[n,a,o]);const L=a.get("order_by"),g=L==="citation_count"?"cited":L==="date_published"?"new":n?"relevance":"trending",u=me(a),w=a.get("has_hf_artifacts")==="true",k=!t&&a.get("has_code")==="true",y=(s,i)=>{const h=new URLSearchParams(a);i?h.set(s,i):h.delete(s),o(h)},Q=s=>{y("order_by",s==="cited"?"citation_count":s==="new"?"date_published":s)},b=re({page_size:20,order_by:g==="trending"?"trending":g==="cited"?"citation_count":"date_published",order_dir:"desc",search:t&&p||void 0,start_date:u.startDate,end_date:u.endDate,include_resources:!0,conference:a.get("conference")||void 0,latest_only:a.get("latest_only")!=="false",has_code:k,has_hf_artifacts:w,framework:m,repository:c,enabled:!n}),R=te({q:p.trim(),order_by:g==="cited"?"citation_count":g==="new"?"date_published":"relevance",start_date:u.startDate,end_date:u.endDate,has_code:k,has_hf_artifacts:w,enabled:n}),d=n?R:b,A=le({queryKey:["top-tasks-sidebar"],queryFn:()=>ee.topTasks(8),enabled:!t&&!n,staleTime:10*60*1e3}),N=x.useMemo(()=>{var i;return(((i=d.data)==null?void 0:i.pages.flatMap(h=>h.results))||[]).map(h=>{const S=se(h);return n?{...S,abstract:fe(S.abstract,l)}:S})},[d.data,n,l]),{targetRef:K,isIntersecting:D}=ie({rootMargin:"200px"});x.useEffect(()=>{D&&d.hasNextPage&&!d.isFetchingNextPage&&d.fetchNextPage()},[D,d.hasNextPage,d.isFetchingNextPage]);const f=((T=($=(I=b.data)==null?void 0:I.pages)==null?void 0:$[0])==null?void 0:T.count)??0,r=(H=(B=(O=b.data)==null?void 0:O.pages)==null?void 0:B[0])==null?void 0:H.scope,P=(q=(M=R.data)==null?void 0:M.pages)==null?void 0:q.at(-1),E=m&&d.error instanceof J&&d.error.status===404,V=(r==null?void 0:r.kind)==="framework"?r.framework_name:r==null?void 0:r.repository;return e.jsxs("div",{className:"page",children:[(r==null?void 0:r.kind)==="framework"&&e.jsxs("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:[e.jsx(j,{to:"/",children:"Papers"}),e.jsx("span",{className:"sep",children:"/"}),e.jsx(j,{to:"/frameworks",children:"Frameworks"}),e.jsx("span",{className:"sep",children:"/"}),e.jsx("span",{style:{color:"var(--ink)"},children:r.framework_name})]}),e.jsxs("div",{className:"feed-header",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"feed-title",children:t?e.jsxs(e.Fragment,{children:["Papers implemented by ",e.jsx("em",{children:V||m||c})]}):n?e.jsxs(e.Fragment,{children:["Search results for ",e.jsxs("em",{children:["“",l,"”"]})]}):e.jsxs(e.Fragment,{children:["All ",e.jsx("em",{children:"Papers"})]})}),e.jsx("div",{className:"feed-subtitle",children:t?(r==null?void 0:r.kind)==="framework"?f>0&&`${f.toLocaleString()} papers.`:r!=null&&r.repository?e.jsxs(e.Fragment,{children:["GitHub repository ",e.jsx("strong",{children:r.repository}),". ",f>0&&`${f.toLocaleString()} papers.`]}):"Repository-scoped paper feed.":n?`${N.length} loaded from the most relevant results.`:e.jsxs(e.Fragment,{children:["Search the full corpus. ",f>0&&`${f.toLocaleString()} papers indexed.`]})}),t&&r&&e.jsxs("div",{className:"paper-feed-scope-links",children:[e.jsxs("div",{className:"paper-feed-primary-links",children:[r.github_url&&e.jsxs("a",{href:r.github_url,target:"_blank",rel:"noopener noreferrer",className:r.kind==="framework"?"task-framework-link":"framework-link",children:[e.jsx(U,{name:"github",size:13}),r.kind==="framework"?e.jsxs(e.Fragment,{children:[e.jsx("span",{children:r.repository||"GitHub"}),r.num_stars!=null&&e.jsxs("span",{className:"task-framework-link-stars",children:["★ ",je(r.num_stars)]})]}):"GitHub"]}),r.kind==="framework"&&r.introducing_paper_arxiv_id&&e.jsx(j,{to:`/paper/${r.introducing_paper_arxiv_id}`,className:"framework-link",children:"Introducing paper"})]}),r.kind==="framework"&&r.recommended_tasks&&r.recommended_tasks.length>0&&e.jsx("div",{className:"paper-feed-task-tags",children:r.recommended_tasks.map(s=>s.slug?e.jsx(Y,{slug:s.slug,label:s.name},s.id):null)})]})]}),e.jsx(he,{startDate:u.startDate,endDate:u.endDate,onChange:s=>o(pe(a,s))})]}),e.jsx("div",{className:"papers-search-row",children:e.jsxs("div",{className:"papers-search-input-wrap",children:[e.jsx(U,{name:"search",size:14}),e.jsx("input",{className:"papers-search-input",placeholder:"Search title or abstract…",value:F,onChange:s=>C(s.target.value)})]})}),e.jsxs("div",{className:t||n?"papers-feed-layout-scoped":"layout-with-sidebar",children:[!t&&!n&&e.jsx("aside",{className:"sidebar",children:e.jsxs("div",{className:"sidebar-section",children:[e.jsx("div",{className:"sidebar-label",children:"Top Domains"}),A.isLoading&&e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:Array.from({length:6}).map((s,i)=>e.jsx(_,{className:"h-5 w-full"},i))}),(G=A.data)==null?void 0:G.map(s=>e.jsxs(j,{to:`/tasks/${s.slug}`,className:"sidebar-link",children:[ae(s.name,s.slug),s.paper_count!=null&&e.jsx("span",{className:"count",children:s.paper_count})]},s.id))]})}),e.jsxs("div",{children:[e.jsxs("div",{className:"sort-bar",children:[e.jsxs("div",{className:"paper-feed-toolbar-controls",children:[e.jsx("div",{className:"sort-options",children:(n?ge:xe).map(([s,i])=>e.jsx("button",{className:`sort-btn ${g===s?"active":""}`,onClick:()=>Q(s),children:i},s))}),e.jsx(de,{hasCode:k,hasHfArtifacts:w,onHasCodeChange:s=>y("has_code",s?"true":void 0),onHasHfArtifactsChange:s=>y("has_hf_artifacts",s?"true":void 0),showHasCode:!t})]}),e.jsxs("div",{className:"results-count",children:[N.length," loaded"]})]}),E?e.jsx("div",{className:"no-results",children:"Framework not found."}):d.error&&e.jsx(oe,{variant:"destructive",className:"mb-4",children:e.jsx(ce,{children:"Failed to load papers. Please try again."})}),!E&&(d.isLoading?e.jsx("div",{className:"paper-list",children:Array.from({length:6}).map((s,i)=>e.jsxs("div",{className:"paper-card",children:[e.jsx(_,{className:"h-[220px] w-[160px]"}),e.jsxs("div",{className:"paper-body",style:{flex:1,gap:12},children:[e.jsx(_,{className:"h-6 w-3/4"}),e.jsx(_,{className:"h-4 w-1/2"}),e.jsx(_,{className:"h-12 w-full"})]})]},i))}):N.length===0?e.jsxs("div",{className:"no-results",children:[e.jsx("p",{children:"No matching papers."}),n&&W()&&e.jsx(j,{to:`/chat?q=${encodeURIComponent(l.trim())}`,children:"Ask the assistant instead"})]}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"paper-list",children:N.map((s,i)=>e.jsx(Z,{paper:s,rank:i+1,highlightQuery:n?l:void 0},s.id))}),e.jsx("div",{ref:K,style:{height:1}}),d.isFetchingNextPage&&e.jsx("div",{style:{padding:"20px 0",textAlign:"center",color:"var(--ink-faint)"},children:"Loading more…"}),!d.hasNextPage&&!d.isFetchingNextPage&&n&&e.jsx("div",{className:"search-results-end",children:P!=null&&P.cap_reached?"End of the top 100 results":"End of results"})]}))]})]})]})};export{Oe as default};
 
1
+ import{d as X,r as x,A as J,j as e,L as j,i as W}from"./index-B9MfhMLC.js";import{I as U,T as Y,P as Z}from"./components-BZrNefuY.js";import{c as ee}from"./catalog-BqDz3O_s.js";import{t as se,d as ae}from"./colors-BCIVIuvj.js";import{u as re,a as te}from"./usePapers-DP7fFbrs.js";import{u as ne}from"./useDebounce-BxfPERyW.js";import{u as ie}from"./useIntersectionObserver-Dg35i96T.js";import{S as _}from"./skeleton-BcfKeAOl.js";import{A as oe,a as ce}from"./alert-Bg2LnrDJ.js";import{u as le}from"./useQuery-Bx81pmgm.js";import{P as de}from"./PaperFeedFilters-DuB_em33.js";import{a as me,P as he,b as pe}from"./PaperDateFilter-D1l9Effu.js";import"./paperQueryKeys-BP2E-0yf.js";import"./LatexTitle-DeUmWtI2.js";import"./papers-BGvqL27Z.js";import"./safeExternalHref-CkBrsh84.js";import"./useInfiniteQuery-4Zdqd3L2.js";import"./popover-UrZdfRNz.js";const v=360;function ue(a,o){const m=a.toLocaleLowerCase();return o.trim().split(/\s+/).filter(Boolean).reduce((c,t)=>{const l=m.indexOf(t.toLocaleLowerCase());return l>=0&&(c<0||l<c)?l:c},-1)}function z(a,o,m){if((a.slice(0,o).match(/\$/g)||[]).length%2===0)return o;if(m==="start")return a.lastIndexOf("$",o)+1;const t=a.indexOf("$",o);return t>=0?t+1:o}function fe(a,o){if(a.length<=v)return a;const m=ue(a,o);if(m<0||m<v*.6)return a;let c=Math.max(0,m-Math.floor(v*.35)),t=Math.min(a.length,c+v);return c=z(a,c,"start"),t=z(a,t,"end"),`${c>0?"…":""}${a.slice(c,t).trim()}${t<a.length?"…":""}`}const xe=[["trending","trending"],["new","newest"],["cited","most cited"]],ge=[["relevance","relevance"],["new","newest"],["cited","most cited"]],je=a=>new Intl.NumberFormat("en",{notation:a>=1e3?"compact":"standard",maximumFractionDigits:1}).format(a),Oe=()=>{var I,$,T,O,B,H,M,q,G;const[a,o]=X(),m=a.get("framework")||void 0,c=a.get("repository")||void 0,t=!!(m||c),l=a.get("search")||"",[F,C]=x.useState(l),p=ne(F,300),n=!t&&l.trim().length>0;x.useEffect(()=>C(l),[l]),x.useEffect(()=>{if(p===l)return;const s=new URLSearchParams(a);p?s.set("search",p):s.delete("search"),o(s,{replace:!0})},[p]),x.useEffect(()=>{const s=a.get("order_by"),i=new URLSearchParams(a);n&&!["relevance","date_published","citation_count"].includes(s||"")?(i.set("order_by","relevance"),o(i,{replace:!0})):!n&&s==="relevance"&&(i.delete("order_by"),o(i,{replace:!0}))},[n,a,o]);const L=a.get("order_by"),g=L==="citation_count"?"cited":L==="date_published"?"new":n?"relevance":"trending",u=me(a),w=a.get("has_hf_artifacts")==="true",k=!t&&a.get("has_code")==="true",y=(s,i)=>{const h=new URLSearchParams(a);i?h.set(s,i):h.delete(s),o(h)},Q=s=>{y("order_by",s==="cited"?"citation_count":s==="new"?"date_published":s)},b=re({page_size:20,order_by:g==="trending"?"trending":g==="cited"?"citation_count":"date_published",order_dir:"desc",search:t&&p||void 0,start_date:u.startDate,end_date:u.endDate,include_resources:!0,conference:a.get("conference")||void 0,latest_only:a.get("latest_only")!=="false",has_code:k,has_hf_artifacts:w,framework:m,repository:c,enabled:!n}),R=te({q:p.trim(),order_by:g==="cited"?"citation_count":g==="new"?"date_published":"relevance",start_date:u.startDate,end_date:u.endDate,has_code:k,has_hf_artifacts:w,enabled:n}),d=n?R:b,A=le({queryKey:["top-tasks-sidebar"],queryFn:()=>ee.topTasks(8),enabled:!t&&!n,staleTime:10*60*1e3}),N=x.useMemo(()=>{var i;return(((i=d.data)==null?void 0:i.pages.flatMap(h=>h.results))||[]).map(h=>{const S=se(h);return n?{...S,abstract:fe(S.abstract,l)}:S})},[d.data,n,l]),{targetRef:K,isIntersecting:D}=ie({rootMargin:"200px"});x.useEffect(()=>{D&&d.hasNextPage&&!d.isFetchingNextPage&&d.fetchNextPage()},[D,d.hasNextPage,d.isFetchingNextPage]);const f=((T=($=(I=b.data)==null?void 0:I.pages)==null?void 0:$[0])==null?void 0:T.count)??0,r=(H=(B=(O=b.data)==null?void 0:O.pages)==null?void 0:B[0])==null?void 0:H.scope,P=(q=(M=R.data)==null?void 0:M.pages)==null?void 0:q.at(-1),E=m&&d.error instanceof J&&d.error.status===404,V=(r==null?void 0:r.kind)==="framework"?r.framework_name:r==null?void 0:r.repository;return e.jsxs("div",{className:"page",children:[(r==null?void 0:r.kind)==="framework"&&e.jsxs("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:[e.jsx(j,{to:"/",children:"Papers"}),e.jsx("span",{className:"sep",children:"/"}),e.jsx(j,{to:"/frameworks",children:"Frameworks"}),e.jsx("span",{className:"sep",children:"/"}),e.jsx("span",{style:{color:"var(--ink)"},children:r.framework_name})]}),e.jsxs("div",{className:"feed-header",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"feed-title",children:t?e.jsxs(e.Fragment,{children:["Papers implemented by ",e.jsx("em",{children:V||m||c})]}):n?e.jsxs(e.Fragment,{children:["Search results for ",e.jsxs("em",{children:["“",l,"”"]})]}):e.jsxs(e.Fragment,{children:["All ",e.jsx("em",{children:"Papers"})]})}),e.jsx("div",{className:"feed-subtitle",children:t?(r==null?void 0:r.kind)==="framework"?f>0&&`${f.toLocaleString()} papers.`:r!=null&&r.repository?e.jsxs(e.Fragment,{children:["GitHub repository ",e.jsx("strong",{children:r.repository}),". ",f>0&&`${f.toLocaleString()} papers.`]}):"Repository-scoped paper feed.":n?`${N.length} loaded from the most relevant results.`:e.jsxs(e.Fragment,{children:["Search the full corpus. ",f>0&&`${f.toLocaleString()} papers indexed.`]})}),t&&r&&e.jsxs("div",{className:"paper-feed-scope-links",children:[e.jsxs("div",{className:"paper-feed-primary-links",children:[r.github_url&&e.jsxs("a",{href:r.github_url,target:"_blank",rel:"noopener noreferrer",className:r.kind==="framework"?"task-framework-link":"framework-link",children:[e.jsx(U,{name:"github",size:13}),r.kind==="framework"?e.jsxs(e.Fragment,{children:[e.jsx("span",{children:r.repository||"GitHub"}),r.num_stars!=null&&e.jsxs("span",{className:"task-framework-link-stars",children:["★ ",je(r.num_stars)]})]}):"GitHub"]}),r.kind==="framework"&&r.introducing_paper_arxiv_id&&e.jsx(j,{to:`/paper/${r.introducing_paper_arxiv_id}`,className:"framework-link",children:"Introducing paper"})]}),r.kind==="framework"&&r.recommended_tasks&&r.recommended_tasks.length>0&&e.jsx("div",{className:"paper-feed-task-tags",children:r.recommended_tasks.map(s=>s.slug?e.jsx(Y,{slug:s.slug,label:s.name},s.id):null)})]})]}),e.jsx(he,{startDate:u.startDate,endDate:u.endDate,onChange:s=>o(pe(a,s))})]}),e.jsx("div",{className:"papers-search-row",children:e.jsxs("div",{className:"papers-search-input-wrap",children:[e.jsx(U,{name:"search",size:14}),e.jsx("input",{className:"papers-search-input",placeholder:"Search title or abstract…",value:F,onChange:s=>C(s.target.value)})]})}),e.jsxs("div",{className:t||n?"papers-feed-layout-scoped":"layout-with-sidebar",children:[!t&&!n&&e.jsx("aside",{className:"sidebar",children:e.jsxs("div",{className:"sidebar-section",children:[e.jsx("div",{className:"sidebar-label",children:"Top Domains"}),A.isLoading&&e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:Array.from({length:6}).map((s,i)=>e.jsx(_,{className:"h-5 w-full"},i))}),(G=A.data)==null?void 0:G.map(s=>e.jsxs(j,{to:`/tasks/${s.slug}`,className:"sidebar-link",children:[ae(s.name,s.slug),s.paper_count!=null&&e.jsx("span",{className:"count",children:s.paper_count})]},s.id))]})}),e.jsxs("div",{children:[e.jsxs("div",{className:"sort-bar",children:[e.jsxs("div",{className:"paper-feed-toolbar-controls",children:[e.jsx("div",{className:"sort-options",children:(n?ge:xe).map(([s,i])=>e.jsx("button",{className:`sort-btn ${g===s?"active":""}`,onClick:()=>Q(s),children:i},s))}),e.jsx(de,{hasCode:k,hasHfArtifacts:w,onHasCodeChange:s=>y("has_code",s?"true":void 0),onHasHfArtifactsChange:s=>y("has_hf_artifacts",s?"true":void 0),showHasCode:!t})]}),e.jsxs("div",{className:"results-count",children:[N.length," loaded"]})]}),E?e.jsx("div",{className:"no-results",children:"Framework not found."}):d.error&&e.jsx(oe,{variant:"destructive",className:"mb-4",children:e.jsx(ce,{children:"Failed to load papers. Please try again."})}),!E&&(d.isLoading?e.jsx("div",{className:"paper-list",children:Array.from({length:6}).map((s,i)=>e.jsxs("div",{className:"paper-card",children:[e.jsx(_,{className:"h-[220px] w-[160px]"}),e.jsxs("div",{className:"paper-body",style:{flex:1,gap:12},children:[e.jsx(_,{className:"h-6 w-3/4"}),e.jsx(_,{className:"h-4 w-1/2"}),e.jsx(_,{className:"h-12 w-full"})]})]},i))}):N.length===0?e.jsxs("div",{className:"no-results",children:[e.jsx("p",{children:"No matching papers."}),n&&W()&&e.jsx(j,{to:`/chat?q=${encodeURIComponent(l.trim())}`,children:"Ask the assistant instead"})]}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"paper-list",children:N.map((s,i)=>e.jsx(Z,{paper:s,rank:i+1,highlightQuery:n?l:void 0},s.id))}),e.jsx("div",{ref:K,style:{height:1}}),d.isFetchingNextPage&&e.jsx("div",{style:{padding:"20px 0",textAlign:"center",color:"var(--ink-faint)"},children:"Loading more…"}),!d.hasNextPage&&!d.isFetchingNextPage&&n&&e.jsx("div",{className:"search-results-end",children:P!=null&&P.cap_reached?"End of the top 100 results":"End of results"})]}))]})]})]})};export{Oe as default};
assets/{PrivacyView-DhjlTRUO.js → PrivacyView-pSbRmtUq.js} RENAMED
@@ -1 +1 @@
1
- import{F as s,j as e}from"./index-CcJ6cWma.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{F as s,j as e}from"./index-B9MfhMLC.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-D-Ppxke0.js → RateLimitsView-Cgi9mlTV.js} RENAMED
@@ -1 +1 @@
1
- import{j as e,G as t}from"./index-CcJ6cWma.js";import{u as s}from"./useQuery-D3-GqcPN.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,G as t}from"./index-B9MfhMLC.js";import{u as s}from"./useQuery-Bx81pmgm.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-B4KEpku3.js → ResearchFollowButton-CSky6nMM.js} RENAMED
@@ -1 +1 @@
1
- import{c as y,ar as F,m as N,r as S,J as L,j as e,Y as v,l as C,L as i}from"./index-CcJ6cWma.js";import{u as G}from"./useQuery-D3-GqcPN.js";import{u as k}from"./useMutation-DPe9yGc6.js";import{r as m}from"./research-1Dm22Eft.js";import{P as p}from"./plus-CNhFESYj.js";const j={task:"Get new papers on this task",method:"Get new papers using this method",benchmark:"Get new results on this benchmark",author:"Get new papers by this author",organization:"Get new papers from this organization"};function R({kind:a,entityId:n}){var f;const l=y(),s=l==null?void 0:l.user,c=F(),h=N(),[x,g]=S.useState(null),u=`${a}:${n}`,d=["research-follows",s==null?void 0:s.hf_subject],r=G({queryKey:d,queryFn:m.follows,enabled:!!s}),o=((f=r.data)==null?void 0:f.some(w=>w.kind===a&&String(w.entity_id)===String(n)))??!1,t=k({mutationFn:()=>m.setFollow(a,n,!o),onSuccess:async()=>{g(o?null:u),await h.invalidateQueries({queryKey:d}),await h.invalidateQueries({queryKey:["research-feed",s==null?void 0:s.hf_subject]})}});if(!l||!s&&L())return null;if(!s)return e.jsxs("div",{className:"research-follow",children:[e.jsxs("a",{className:"research-follow-btn",href:v(c.pathname+c.search),children:[e.jsx(p,{"aria-hidden":"true"}),"Follow"]}),e.jsxs("span",{className:"research-follow-hint",children:["Sign in to ",j[a].toLowerCase(),"."]})]});const b=t.error||r.error;return e.jsxs("div",{className:"research-follow",children:[e.jsx("button",{type:"button",className:o?"research-follow-btn is-following":"research-follow-btn",disabled:r.isLoading||!!r.error||t.isPending,"aria-pressed":o,"aria-label":o?"Unfollow":"Follow",onClick:()=>t.mutate(),children:o?e.jsxs(e.Fragment,{children:[e.jsx(C,{"aria-hidden":"true"}),e.jsx("span",{className:"research-follow-label",children:"Following"}),e.jsx("span",{className:"research-follow-label-hover",children:"Unfollow"})]}):e.jsxs(e.Fragment,{children:[e.jsx(p,{"aria-hidden":"true"}),"Follow"]})}),b?e.jsx("span",{className:"research-follow-hint is-error",role:"alert",children:"Could not update follows. Please try again."}):o?x===u&&e.jsxs("span",{className:"research-follow-hint",role:"status",children:["Added to ",e.jsx(i,{to:"/following",children:"your Following feed"})," · ",e.jsx(i,{to:"/settings",children:"Manage in Settings"})]}):e.jsxs("span",{className:"research-follow-hint",children:[j[a]," in ",e.jsx(i,{to:"/following",children:"your Following feed"}),"."]})]})}export{R};
 
1
+ import{c as y,ar as F,m as N,r as S,J as L,j as e,Y as v,l as C,L as i}from"./index-B9MfhMLC.js";import{u as G}from"./useQuery-Bx81pmgm.js";import{u as k}from"./useMutation-C2athD5k.js";import{r as m}from"./research-DbRWvLsz.js";import{P as p}from"./plus-BZFi6ZWf.js";const j={task:"Get new papers on this task",method:"Get new papers using this method",benchmark:"Get new results on this benchmark",author:"Get new papers by this author",organization:"Get new papers from this organization"};function R({kind:a,entityId:n}){var f;const l=y(),s=l==null?void 0:l.user,c=F(),h=N(),[x,g]=S.useState(null),u=`${a}:${n}`,d=["research-follows",s==null?void 0:s.hf_subject],r=G({queryKey:d,queryFn:m.follows,enabled:!!s}),o=((f=r.data)==null?void 0:f.some(w=>w.kind===a&&String(w.entity_id)===String(n)))??!1,t=k({mutationFn:()=>m.setFollow(a,n,!o),onSuccess:async()=>{g(o?null:u),await h.invalidateQueries({queryKey:d}),await h.invalidateQueries({queryKey:["research-feed",s==null?void 0:s.hf_subject]})}});if(!l||!s&&L())return null;if(!s)return e.jsxs("div",{className:"research-follow",children:[e.jsxs("a",{className:"research-follow-btn",href:v(c.pathname+c.search),children:[e.jsx(p,{"aria-hidden":"true"}),"Follow"]}),e.jsxs("span",{className:"research-follow-hint",children:["Sign in to ",j[a].toLowerCase(),"."]})]});const b=t.error||r.error;return e.jsxs("div",{className:"research-follow",children:[e.jsx("button",{type:"button",className:o?"research-follow-btn is-following":"research-follow-btn",disabled:r.isLoading||!!r.error||t.isPending,"aria-pressed":o,"aria-label":o?"Unfollow":"Follow",onClick:()=>t.mutate(),children:o?e.jsxs(e.Fragment,{children:[e.jsx(C,{"aria-hidden":"true"}),e.jsx("span",{className:"research-follow-label",children:"Following"}),e.jsx("span",{className:"research-follow-label-hover",children:"Unfollow"})]}):e.jsxs(e.Fragment,{children:[e.jsx(p,{"aria-hidden":"true"}),"Follow"]})}),b?e.jsx("span",{className:"research-follow-hint is-error",role:"alert",children:"Could not update follows. Please try again."}):o?x===u&&e.jsxs("span",{className:"research-follow-hint",role:"status",children:["Added to ",e.jsx(i,{to:"/following",children:"your Following feed"})," · ",e.jsx(i,{to:"/settings",children:"Manage in Settings"})]}):e.jsxs("span",{className:"research-follow-hint",children:[j[a]," in ",e.jsx(i,{to:"/following",children:"your Following feed"}),"."]})]})}export{R};
assets/{SavedPapersView-CcXud9tN.js → SavedPapersView-BULUL_Ye.js} RENAMED
@@ -1 +1 @@
1
- import{a as h,A as g,j as e,H as v,L as x,G as j}from"./index-CcJ6cWma.js";import{p as f}from"./paperQueryKeys-BP2E-0yf.js";import{u as N}from"./useQuery-D3-GqcPN.js";import{T as b,P as k}from"./components-Bax1_3qI.js";import{S as r}from"./skeleton-B-mlrgWO.js";import{A as y,a as w}from"./alert-CMODHIPT.js";import{t as A}from"./colors-DCzRcDI4.js";import{s as B}from"./savedPapersAuth-BYykGTFr.js";import"./LatexTitle-hDpJaCcC.js";import"./papers-CClaKvmL.js";import"./safeExternalHref-CkBrsh84.js";const W=()=>{var c,o;const{user:t,isLoading:u}=h(),a=N({queryKey:[...f.feeds.saved],queryFn:()=>j.getBookmarks(),enabled:!!t,staleTime:30*1e3,refetchOnWindowFocus:!1}),n=a.error instanceof g&&a.error.code==="saved_papers_bucket_authorization_required",m=!!a.data&&!a.data.bucket_connected,d=()=>{window.location.assign(B())};return u?e.jsxs("div",{className:"page",children:[e.jsx(r,{className:"h-10 w-1/3 mb-4"}),e.jsx(r,{className:"h-6 w-1/2 mb-8"})]}):t?e.jsxs("div",{className:"page",children:[e.jsx("div",{className:"feed-header",children:e.jsxs("div",{children:[e.jsxs("h1",{className:"feed-title",children:["Saved ",e.jsx("em",{children:"Papers"})]}),e.jsxs("div",{className:"feed-subtitle",children:[(c=a.data)!=null&&c.count?`${a.data.count.toLocaleString()} saved · grouped by domain`:"Your bookmarked papers, grouped by domain.",(o=a.data)!=null&&o.bucket_connected?e.jsxs(e.Fragment,{children:[" · ",e.jsx("a",{href:`https://huggingface.co/buckets/${t.username}/pwc-saved-papers`,target:"_blank",rel:"noopener noreferrer",children:"Open your Hugging Face Bucket"})]}):null]})]})}),n?e.jsxs("div",{className:"saved-bucket-migration",children:[e.jsx("p",{children:"Your saved papers are still safe in Papers With Code. Approve Bucket access to copy them into a private Hugging Face Bucket that belongs to you."}),e.jsx("button",{type:"button",className:"hf-signin-btn",onClick:d,children:"Approve and migrate saved papers"})]}):a.error?e.jsx(y,{variant:"destructive",className:"mb-4",children:e.jsx(w,{children:"Failed to load your saved papers. Please try again."})}):null,m?e.jsxs("div",{className:"saved-bucket-migration",children:[e.jsxs("p",{children:[a.data.count?`Your ${a.data.count.toLocaleString()} saved ${a.data.count===1?"paper is":"papers are"} still available below. `:"When you save your first paper, ","Approve Bucket access to copy saved papers into a private Hugging Face Bucket that belongs to you. The existing data is kept until the copy is verified."]}),e.jsx("button",{type:"button",className:"hf-signin-btn",onClick:d,children:a.data.count?"Approve and migrate saved papers":"Use a Hugging Face Bucket"})]}):null,n||a.error?null:a.isLoading?e.jsx("div",{className:"paper-list",children:Array.from({length:4}).map((i,s)=>e.jsxs("div",{className:"paper-card",children:[e.jsx(r,{className:"h-[220px] w-[160px]"}),e.jsxs("div",{className:"paper-body",style:{flex:1,gap:12},children:[e.jsx(r,{className:"h-6 w-3/4"}),e.jsx(r,{className:"h-4 w-1/2"}),e.jsx(r,{className:"h-12 w-full"})]})]},s))}):!a.data||a.data.count===0?e.jsxs("div",{className:"no-results",children:["No saved papers yet."," ",e.jsx(x,{to:"/papers",className:"sidebar-link",style:{display:"inline"},children:"Browse papers →"})]}):a.data.areas.map(i=>e.jsxs("section",{className:"saved-area-section",children:[e.jsx("h2",{className:"saved-area-heading",children:i.name}),i.tasks.map(s=>{const l=s.papers.length;return e.jsxs("div",{className:"saved-task-block",children:[e.jsxs("div",{className:"saved-task-row",children:[s.slug?e.jsx(b,{slug:s.slug,label:s.name}):e.jsx("span",{className:"tag-chip",style:{background:"var(--surface)"},children:s.name}),e.jsxs("span",{className:"saved-task-count",children:[l," ",l===1?"paper":"papers"]})]}),e.jsx("div",{className:"paper-list",children:s.papers.map(p=>e.jsx(k,{paper:A(p),rank:1},p.id))})]},`task-${i.id??"other"}-${s.id??"untagged"}`)})]},`area-${i.id??"other"}`))]}):e.jsxs("div",{className:"page",children:[e.jsx("div",{className:"feed-header",children:e.jsxs("div",{children:[e.jsxs("h1",{className:"feed-title",children:["Saved ",e.jsx("em",{children:"Papers"})]}),e.jsx("div",{className:"feed-subtitle",children:"Sign in with Hugging Face to save papers and revisit them later."})]})}),e.jsx("div",{className:"saved-signin-panel",children:e.jsx(v,{returnTo:"/saved"})})]})};export{W as default};
 
1
+ import{a as h,A as g,j as e,H as v,L as x,G as j}from"./index-B9MfhMLC.js";import{p as f}from"./paperQueryKeys-BP2E-0yf.js";import{u as N}from"./useQuery-Bx81pmgm.js";import{T as b,P as k}from"./components-BZrNefuY.js";import{S as r}from"./skeleton-BcfKeAOl.js";import{A as y,a as w}from"./alert-Bg2LnrDJ.js";import{t as A}from"./colors-BCIVIuvj.js";import{s as B}from"./savedPapersAuth-BjQx0VVU.js";import"./LatexTitle-DeUmWtI2.js";import"./papers-BGvqL27Z.js";import"./safeExternalHref-CkBrsh84.js";const W=()=>{var c,o;const{user:t,isLoading:u}=h(),a=N({queryKey:[...f.feeds.saved],queryFn:()=>j.getBookmarks(),enabled:!!t,staleTime:30*1e3,refetchOnWindowFocus:!1}),n=a.error instanceof g&&a.error.code==="saved_papers_bucket_authorization_required",m=!!a.data&&!a.data.bucket_connected,d=()=>{window.location.assign(B())};return u?e.jsxs("div",{className:"page",children:[e.jsx(r,{className:"h-10 w-1/3 mb-4"}),e.jsx(r,{className:"h-6 w-1/2 mb-8"})]}):t?e.jsxs("div",{className:"page",children:[e.jsx("div",{className:"feed-header",children:e.jsxs("div",{children:[e.jsxs("h1",{className:"feed-title",children:["Saved ",e.jsx("em",{children:"Papers"})]}),e.jsxs("div",{className:"feed-subtitle",children:[(c=a.data)!=null&&c.count?`${a.data.count.toLocaleString()} saved · grouped by domain`:"Your bookmarked papers, grouped by domain.",(o=a.data)!=null&&o.bucket_connected?e.jsxs(e.Fragment,{children:[" · ",e.jsx("a",{href:`https://huggingface.co/buckets/${t.username}/pwc-saved-papers`,target:"_blank",rel:"noopener noreferrer",children:"Open your Hugging Face Bucket"})]}):null]})]})}),n?e.jsxs("div",{className:"saved-bucket-migration",children:[e.jsx("p",{children:"Your saved papers are still safe in Papers With Code. Approve Bucket access to copy them into a private Hugging Face Bucket that belongs to you."}),e.jsx("button",{type:"button",className:"hf-signin-btn",onClick:d,children:"Approve and migrate saved papers"})]}):a.error?e.jsx(y,{variant:"destructive",className:"mb-4",children:e.jsx(w,{children:"Failed to load your saved papers. Please try again."})}):null,m?e.jsxs("div",{className:"saved-bucket-migration",children:[e.jsxs("p",{children:[a.data.count?`Your ${a.data.count.toLocaleString()} saved ${a.data.count===1?"paper is":"papers are"} still available below. `:"When you save your first paper, ","Approve Bucket access to copy saved papers into a private Hugging Face Bucket that belongs to you. The existing data is kept until the copy is verified."]}),e.jsx("button",{type:"button",className:"hf-signin-btn",onClick:d,children:a.data.count?"Approve and migrate saved papers":"Use a Hugging Face Bucket"})]}):null,n||a.error?null:a.isLoading?e.jsx("div",{className:"paper-list",children:Array.from({length:4}).map((i,s)=>e.jsxs("div",{className:"paper-card",children:[e.jsx(r,{className:"h-[220px] w-[160px]"}),e.jsxs("div",{className:"paper-body",style:{flex:1,gap:12},children:[e.jsx(r,{className:"h-6 w-3/4"}),e.jsx(r,{className:"h-4 w-1/2"}),e.jsx(r,{className:"h-12 w-full"})]})]},s))}):!a.data||a.data.count===0?e.jsxs("div",{className:"no-results",children:["No saved papers yet."," ",e.jsx(x,{to:"/papers",className:"sidebar-link",style:{display:"inline"},children:"Browse papers →"})]}):a.data.areas.map(i=>e.jsxs("section",{className:"saved-area-section",children:[e.jsx("h2",{className:"saved-area-heading",children:i.name}),i.tasks.map(s=>{const l=s.papers.length;return e.jsxs("div",{className:"saved-task-block",children:[e.jsxs("div",{className:"saved-task-row",children:[s.slug?e.jsx(b,{slug:s.slug,label:s.name}):e.jsx("span",{className:"tag-chip",style:{background:"var(--surface)"},children:s.name}),e.jsxs("span",{className:"saved-task-count",children:[l," ",l===1?"paper":"papers"]})]}),e.jsx("div",{className:"paper-list",children:s.papers.map(p=>e.jsx(k,{paper:A(p),rank:1},p.id))})]},`task-${i.id??"other"}-${s.id??"untagged"}`)})]},`area-${i.id??"other"}`))]}):e.jsxs("div",{className:"page",children:[e.jsx("div",{className:"feed-header",children:e.jsxs("div",{children:[e.jsxs("h1",{className:"feed-title",children:["Saved ",e.jsx("em",{children:"Papers"})]}),e.jsx("div",{className:"feed-subtitle",children:"Sign in with Hugging Face to save papers and revisit them later."})]})}),e.jsx("div",{className:"saved-signin-panel",children:e.jsx(v,{returnTo:"/saved"})})]})};export{W as default};
assets/{SearchOverlay-DAENF2Gn.js → SearchOverlay-Dd2p25Gs.js} RENAMED
@@ -1 +1 @@
1
- import{r as C,b as Q,F as S,i as D,j as e}from"./index-CcJ6cWma.js";import{p as K}from"./paperQueryKeys-BP2E-0yf.js";import{u}from"./useQuery-D3-GqcPN.js";import{L as $}from"./LatexTitle-hDpJaCcC.js";import{c as j}from"./catalog-B7hp4mKD.js";import{p as L}from"./papers-CClaKvmL.js";import{u as M}from"./useDebounce-eerL6LIs.js";import{c as I,h as z,d as B}from"./colors-DCzRcDI4.js";const H=10,O=350,y=3,ss=({open:t,onClose:i})=>{var E,F,q,w;const v=C.useRef(null),T=Q(),[r,A]=S.useState(""),a=M(r,O),p=r.trim(),c=a.length>=y,x=D();C.useEffect(()=>{var n;if(!t)return;(n=v.current)==null||n.focus();const s=g=>{g.key==="Escape"&&(g.preventDefault(),g.stopPropagation(),i())};return window.addEventListener("keydown",s,!0),()=>window.removeEventListener("keydown",s,!0)},[t,i]);const f=u({queryKey:[...K.feeds.searchOverlay,a],queryFn:()=>L.search(a,1,H),enabled:t&&c,staleTime:6e4,retry:!1}),k=u({queryKey:["search-tasks",a],queryFn:()=>j.listTasks({q:a,page_size:6}),enabled:t&&c,staleTime:6e4,retry:!1}),N=u({queryKey:["search-methods",a],queryFn:()=>j.listMethods({q:a,page_size:6}),enabled:t&&c,staleTime:6e4,retry:!1}),b=u({queryKey:["search-benchmarks",a],queryFn:()=>j.listDatasets({q:a,page_size:6}),enabled:t&&c,staleTime:6e4,retry:!1});if(!t)return null;const o=((E=k.data)==null?void 0:E.results)||[],h=((F=N.data)==null?void 0:F.results)||[],d=((q=b.data)==null?void 0:q.results)||[],m=((w=f.data)==null?void 0:w.results)||[],P=f.isFetching||k.isFetching||N.isFetching||b.isFetching,R=o.length||m.length||h.length||d.length,l=s=>{i(),T(s)},_=()=>{const s=r.trim();s&&l(`/chat?q=${encodeURIComponent(s)}`)};return e.jsx("div",{className:"search-overlay",onClick:i,children:e.jsxs("div",{className:"search-modal",onClick:s=>s.stopPropagation(),children:[e.jsx("input",{ref:v,className:"search-modal-input",placeholder:"Search papers, tasks, methods, or benchmarks…",value:r,onChange:s=>A(s.target.value),onKeyDown:s=>{x&&s.key==="Enter"&&(s.preventDefault(),_())}}),e.jsxs("div",{className:"search-results",children:[x&&r.trim()&&e.jsxs("button",{type:"button",className:"search-ask-row",onClick:_,children:[e.jsx("span",{className:"search-ask-chip",children:"assistant"}),e.jsxs("span",{className:"search-ask-text",children:["Ask: “",r.trim(),"”"]}),e.jsx("kbd",{children:"↵"})]}),!a&&e.jsxs("div",{className:"search-empty",children:["Try “diffusion”, “object detection”, or an arXiv id.",x&&e.jsx("span",{className:"search-empty-sub",children:"Press Enter to ask the assistant"})]}),a&&!c&&e.jsxs("div",{className:"search-empty",children:["Keep typing: results appear from ",y," characters."]}),c&&!P&&!R&&e.jsxs("div",{className:"search-empty",children:['No matches for "',r,'"']}),o.length>0&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"search-section-label",children:["Tasks · ",o.length]}),o.map(s=>{const n=I(z(s.slug||""));return e.jsxs("div",{className:"search-result-tag",onClick:()=>l(`/tasks/${s.slug}`),children:[e.jsx("span",{className:"dot",style:{width:6,height:6,borderRadius:"50%",background:n.dot}}),e.jsx("span",{className:"name",children:B(s.name,s.slug)}),s.paper_count!=null&&e.jsxs("span",{className:"count",children:[s.paper_count," papers"]})]},s.id)})]}),h.length>0&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"search-section-label",children:["Methods · ",h.length]}),h.map(s=>e.jsxs("div",{className:"search-result-tag",onClick:()=>l(`/methods/${s.slug||s.id}`),children:[e.jsx("span",{style:{fontFamily:"var(--mono)",fontWeight:600},children:s.name}),s.paper_count!=null&&e.jsxs("span",{className:"count",children:[s.paper_count," papers"]})]},s.id))]}),d.length>0&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"search-section-label",children:["Benchmarks · ",d.length]}),d.map(s=>e.jsxs("div",{className:"search-result-tag",onClick:()=>l(`/benchmark/${s.slug||s.id}`),children:[e.jsx("span",{className:"name",children:s.name}),s.paper_count!=null&&s.paper_count>0&&e.jsxs("span",{className:"count",children:[s.paper_count," entries"]})]},s.id))]}),m.length>0&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"search-section-label",children:["Papers · ",m.length]}),m.map(s=>{var n;return e.jsxs("div",{className:"search-result",onClick:()=>l(`/paper/${s.arxiv_id||s.id}`),children:[e.jsx("div",{className:"search-result-title",children:e.jsx($,{title:s.title})}),e.jsxs("div",{className:"search-result-meta",children:[e.jsx("span",{children:s.arxiv_id?`arXiv:${s.arxiv_id}`:"External resource"}),((n=s.authors)==null?void 0:n[0])&&e.jsxs(e.Fragment,{children:[e.jsx("span",{children:"·"}),e.jsxs("span",{children:[s.authors[0],s.authors.length>1?" et al.":""]})]}),s.citation_count!=null&&e.jsxs(e.Fragment,{children:[e.jsx("span",{children:"·"}),e.jsxs("span",{children:["↑ ",s.citation_count.toLocaleString()]})]})]})]},s.id)})]}),p.length>=y&&e.jsxs("button",{type:"button",className:"search-view-all-row",onClick:()=>l(`/papers?search=${encodeURIComponent(p)}`),children:["View all paper results for “",p,"”"]})]})]})})};export{ss as default};
 
1
+ import{r as C,b as Q,F as S,i as D,j as e}from"./index-B9MfhMLC.js";import{p as K}from"./paperQueryKeys-BP2E-0yf.js";import{u}from"./useQuery-Bx81pmgm.js";import{L as $}from"./LatexTitle-DeUmWtI2.js";import{c as j}from"./catalog-BqDz3O_s.js";import{p as L}from"./papers-BGvqL27Z.js";import{u as M}from"./useDebounce-BxfPERyW.js";import{c as I,h as z,d as B}from"./colors-BCIVIuvj.js";const H=10,O=350,y=3,ss=({open:t,onClose:i})=>{var E,F,q,w;const v=C.useRef(null),T=Q(),[r,A]=S.useState(""),a=M(r,O),p=r.trim(),c=a.length>=y,x=D();C.useEffect(()=>{var n;if(!t)return;(n=v.current)==null||n.focus();const s=g=>{g.key==="Escape"&&(g.preventDefault(),g.stopPropagation(),i())};return window.addEventListener("keydown",s,!0),()=>window.removeEventListener("keydown",s,!0)},[t,i]);const f=u({queryKey:[...K.feeds.searchOverlay,a],queryFn:()=>L.search(a,1,H),enabled:t&&c,staleTime:6e4,retry:!1}),k=u({queryKey:["search-tasks",a],queryFn:()=>j.listTasks({q:a,page_size:6}),enabled:t&&c,staleTime:6e4,retry:!1}),N=u({queryKey:["search-methods",a],queryFn:()=>j.listMethods({q:a,page_size:6}),enabled:t&&c,staleTime:6e4,retry:!1}),b=u({queryKey:["search-benchmarks",a],queryFn:()=>j.listDatasets({q:a,page_size:6}),enabled:t&&c,staleTime:6e4,retry:!1});if(!t)return null;const o=((E=k.data)==null?void 0:E.results)||[],h=((F=N.data)==null?void 0:F.results)||[],d=((q=b.data)==null?void 0:q.results)||[],m=((w=f.data)==null?void 0:w.results)||[],P=f.isFetching||k.isFetching||N.isFetching||b.isFetching,R=o.length||m.length||h.length||d.length,l=s=>{i(),T(s)},_=()=>{const s=r.trim();s&&l(`/chat?q=${encodeURIComponent(s)}`)};return e.jsx("div",{className:"search-overlay",onClick:i,children:e.jsxs("div",{className:"search-modal",onClick:s=>s.stopPropagation(),children:[e.jsx("input",{ref:v,className:"search-modal-input",placeholder:"Search papers, tasks, methods, or benchmarks…",value:r,onChange:s=>A(s.target.value),onKeyDown:s=>{x&&s.key==="Enter"&&(s.preventDefault(),_())}}),e.jsxs("div",{className:"search-results",children:[x&&r.trim()&&e.jsxs("button",{type:"button",className:"search-ask-row",onClick:_,children:[e.jsx("span",{className:"search-ask-chip",children:"assistant"}),e.jsxs("span",{className:"search-ask-text",children:["Ask: “",r.trim(),"”"]}),e.jsx("kbd",{children:"↵"})]}),!a&&e.jsxs("div",{className:"search-empty",children:["Try “diffusion”, “object detection”, or an arXiv id.",x&&e.jsx("span",{className:"search-empty-sub",children:"Press Enter to ask the assistant"})]}),a&&!c&&e.jsxs("div",{className:"search-empty",children:["Keep typing: results appear from ",y," characters."]}),c&&!P&&!R&&e.jsxs("div",{className:"search-empty",children:['No matches for "',r,'"']}),o.length>0&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"search-section-label",children:["Tasks · ",o.length]}),o.map(s=>{const n=I(z(s.slug||""));return e.jsxs("div",{className:"search-result-tag",onClick:()=>l(`/tasks/${s.slug}`),children:[e.jsx("span",{className:"dot",style:{width:6,height:6,borderRadius:"50%",background:n.dot}}),e.jsx("span",{className:"name",children:B(s.name,s.slug)}),s.paper_count!=null&&e.jsxs("span",{className:"count",children:[s.paper_count," papers"]})]},s.id)})]}),h.length>0&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"search-section-label",children:["Methods · ",h.length]}),h.map(s=>e.jsxs("div",{className:"search-result-tag",onClick:()=>l(`/methods/${s.slug||s.id}`),children:[e.jsx("span",{style:{fontFamily:"var(--mono)",fontWeight:600},children:s.name}),s.paper_count!=null&&e.jsxs("span",{className:"count",children:[s.paper_count," papers"]})]},s.id))]}),d.length>0&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"search-section-label",children:["Benchmarks · ",d.length]}),d.map(s=>e.jsxs("div",{className:"search-result-tag",onClick:()=>l(`/benchmark/${s.slug||s.id}`),children:[e.jsx("span",{className:"name",children:s.name}),s.paper_count!=null&&s.paper_count>0&&e.jsxs("span",{className:"count",children:[s.paper_count," entries"]})]},s.id))]}),m.length>0&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"search-section-label",children:["Papers · ",m.length]}),m.map(s=>{var n;return e.jsxs("div",{className:"search-result",onClick:()=>l(`/paper/${s.arxiv_id||s.id}`),children:[e.jsx("div",{className:"search-result-title",children:e.jsx($,{title:s.title})}),e.jsxs("div",{className:"search-result-meta",children:[e.jsx("span",{children:s.arxiv_id?`arXiv:${s.arxiv_id}`:"External resource"}),((n=s.authors)==null?void 0:n[0])&&e.jsxs(e.Fragment,{children:[e.jsx("span",{children:"·"}),e.jsxs("span",{children:[s.authors[0],s.authors.length>1?" et al.":""]})]}),s.citation_count!=null&&e.jsxs(e.Fragment,{children:[e.jsx("span",{children:"·"}),e.jsxs("span",{children:["↑ ",s.citation_count.toLocaleString()]})]})]})]},s.id)})]}),p.length>=y&&e.jsxs("button",{type:"button",className:"search-view-all-row",onClick:()=>l(`/papers?search=${encodeURIComponent(p)}`),children:["View all paper results for “",p,"”"]})]})]})})};export{ss as default};
assets/{SettingsView-Ctk16WdM.js → SettingsView-DJxBHPTp.js} RENAMED
@@ -1,4 +1,4 @@
1
- import{g as I,a as B,m as Y,j as e,L as Q,H as w,Y as le,r as re,k as oe,as as ce,i as de,F as k,A as ee}from"./index-CcJ6cWma.js";import{u as P}from"./useQuery-D3-GqcPN.js";import{u as N}from"./useMutation-DPe9yGc6.js";import{r as O}from"./research-1Dm22Eft.js";import{S as H}from"./switch-BXzYt6AA.js";import{A as he,T as ue}from"./trophy-DL1c4XLr.js";import{M as ge,L as me,F as pe,B as xe}from"./mail-BlXkX--v.js";import{c as v}from"./chat-CmC2kF8c.js";import{f as je,D as be}from"./latexPlainText-DI8YEXVe.js";import{a as ye,u as fe,r as ve,O as U}from"./openrouter-DgpeaTae.js";import{E as J}from"./external-link-BuxK9KNv.js";import"./index-n6sLvpB2.js";/**
2
  * @license lucide-react v0.462.0 - ISC
3
  *
4
  * This source code is licensed under the ISC license.
 
1
+ import{g as I,a as B,m as Y,j as e,L as Q,H as w,Y as le,r as re,k as oe,as as ce,i as de,F as k,A as ee}from"./index-B9MfhMLC.js";import{u as P}from"./useQuery-Bx81pmgm.js";import{u as N}from"./useMutation-C2athD5k.js";import{r as O}from"./research-DbRWvLsz.js";import{S as H}from"./switch-BLheP41Z.js";import{A as he,T as ue}from"./trophy-_AcJD7E9.js";import{M as ge,L as me,F as pe,B as xe}from"./mail-BizcmKOf.js";import{c as v}from"./chat-BZn2Yz-P.js";import{f as je,D as be}from"./latexPlainText-DI8YEXVe.js";import{a as ye,u as fe,r as ve,O as U}from"./openrouter-Ixy41X1P.js";import{E as J}from"./external-link-tLC4XD6r.js";import"./index-Dcor-vPm.js";/**
2
  * @license lucide-react v0.462.0 - ISC
3
  *
4
  * This source code is licensed under the ISC license.
assets/{SharedChatView-OdvPYiTD.js → SharedChatView-CNCxZbRQ.js} RENAMED
@@ -1 +1 @@
1
- import{u as f,b as x,r as h,j as e,f as g}from"./index-CcJ6cWma.js";import{u as v}from"./useQuery-D3-GqcPN.js";import{A as j,a as b,C as y,U as S,b as k}from"./ArtifactWorkspace-DjmVwPtv.js";import{C as m,d as w,p as N,q as C,g as q}from"./chatLaunch-BWQHjZ_V.js";/* empty css */import"./hover-card-Bj7-02L3.js";import"./github-CloBLbHx.js";import"./github-B2H6YANV.js";import"./catalog-B7hp4mKD.js";import"./PaperPreviewLink-o7boC8db.js";import"./index-VElAzfws.js";import"./index-CVaIZy6l.js";import"./katex-DkKDou_j.js";import"./paperQueryKeys-BP2E-0yf.js";import"./papers-CClaKvmL.js";import"./useMutation-DPe9yGc6.js";import"./chat-CmC2kF8c.js";import"./copy-C-Vd1dCk.js";import"./file-text-tKMRCnZb.js";import"./external-link-BuxK9KNv.js";import"./chevron-down-DJZrO8F3.js";const _=({detail:i})=>{const[d,l]=h.useState(()=>N(i)),p=h.useMemo(()=>{const t={};for(const c of d)for(const n of c.blocks??[])if(n.kind==="tool")for(const r of n.results??[])t[r.route_id]=r;return t},[d]),u=(t,c)=>{l(n=>n.map(r=>{var a;return r.id!==t?r:{...r,blocks:(a=r.blocks)==null?void 0:a.map((s,o)=>o===c&&(s.kind==="reasoning"||s.kind==="tool")?{...s,open:!s.open}:s)}}))};return e.jsx("div",{className:"shared-chat-transcript",children:d.map(t=>t.role==="user"?e.jsx(S,{id:t.id,text:t.text??"",paperMentions:t.paperMentions??[],paperSelection:t.paperSelection},t.id):e.jsx(k,{msg:t,papers:p,onToggleBlock:u},t.id))})},D=()=>{const{shareId:i=""}=f(),d=x(),l=g(),[p,u]=h.useState(60),t=v({queryKey:["shared-chat",i],queryFn:()=>q(i),retry:(r,a)=>!(a instanceof m&&a.status===404)&&r<1});h.useEffect(()=>{const r=document.title,a=document.head.querySelector('meta[name="robots"]'),s=a==null?void 0:a.content,o=a??document.createElement("meta");return o.name="robots",o.content="noindex,nofollow",a||document.head.appendChild(o),document.title="Shared conversation",()=>{document.title=r,a?a.content=s??"":o.remove()}},[]),h.useLayoutEffect(()=>{const r=document.querySelector(".app-header");if(!r)return;const a=()=>u(r.offsetHeight);a();const s=new ResizeObserver(a);return s.observe(r),()=>s.disconnect()},[]);const c=r=>{C(r,void 0,{autoSend:!1}),d("/chat")},n=t.error instanceof m&&t.error.status===404;return t.isLoading?e.jsxs("div",{className:"shared-chat-state",role:"status",children:[e.jsx(w,{})," Loading shared conversation…"]}):n?e.jsxs("div",{className:"shared-chat-state shared-chat-not-found",children:[e.jsx("h1",{children:"Shared conversation not found"}),e.jsx("p",{children:"This link is invalid or is no longer available."})]}):t.isError||!t.data?e.jsxs("div",{className:"shared-chat-state",role:"alert",children:[e.jsx("h1",{children:"Couldn’t load this conversation"}),e.jsx("p",{children:"Please check your connection and try again."}),e.jsx("button",{type:"button",onClick:()=>void t.refetch(),children:"Try again"})]}):e.jsx(j,{workspaceKey:`share:${i}:${t.data.updated_at}`,autoOpenOnMount:!0,children:e.jsxs("div",{className:"shared-chat-page",style:{height:`calc(100dvh - ${p}px)`},children:[e.jsxs("div",{className:"shared-chat-heading",children:[e.jsx("h1",{children:"Shared conversation"}),l&&e.jsx("span",{className:"chat-staging-badge",children:"Staging"})]}),e.jsx(b,{variant:"shared",children:e.jsxs("div",{className:"shared-chat-content","data-testid":"shared-conversation-pane",children:[e.jsx(_,{detail:t.data},t.data.updated_at),t.data.model_label&&e.jsxs("div",{className:"shared-chat-attribution",children:[e.jsxs("span",{children:["Generated with ",t.data.model_label]}),t.data.model_provider==="huggingface"&&e.jsxs("span",{children:["Powered by ",e.jsx("span",{"aria-hidden":"true",children:"🤗"})," ",e.jsx("a",{href:"https://huggingface.co/docs/inference-providers/en/index",target:"_blank",rel:"noreferrer",children:"Inference Providers"})]}),t.data.model_provider==="openrouter"&&e.jsxs("span",{children:["Powered by ",e.jsx("a",{href:"https://openrouter.ai",target:"_blank",rel:"noreferrer",children:"OpenRouter"})]}),t.data.model_provider==="openai"&&e.jsx("span",{children:"Powered by OpenAI"})]}),e.jsxs("section",{className:"shared-chat-fresh","aria-labelledby":"shared-chat-fresh-title",children:[e.jsx("h2",{id:"shared-chat-fresh-title",children:"Start a new conversation"}),e.jsx("p",{children:"Your new question starts with an empty context."}),l&&e.jsxs("div",{className:"shared-chat-access-note",role:"note",children:[e.jsx("strong",{children:"Limited staging preview."})," Starting a chat is available only to approved Hugging Face users."]}),e.jsx(y,{onSend:r=>c(r.text),placeholder:"Ask a new research question…"})]})]})})]})})};export{D as default};
 
1
+ import{u as f,b as x,r as h,j as e,f as g}from"./index-B9MfhMLC.js";import{u as v}from"./useQuery-Bx81pmgm.js";import{A as j,a as b,C as y,U as S,b as k}from"./ArtifactWorkspace-CJ1HK4Ql.js";import{C as m,d as w,p as N,q as C,g as q}from"./chatLaunch-CsBovBmE.js";/* empty css */import"./hover-card-Bv4bJws5.js";import"./github-CE1K0ZU_.js";import"./github-D0bNa_Wx.js";import"./catalog-BqDz3O_s.js";import"./PaperPreviewLink-B3LP-qo2.js";import"./index-10yxmORR.js";import"./index-CSRWQTrf.js";import"./katex-DkKDou_j.js";import"./paperQueryKeys-BP2E-0yf.js";import"./papers-BGvqL27Z.js";import"./useMutation-C2athD5k.js";import"./chat-BZn2Yz-P.js";import"./copy-407Yr7lh.js";import"./file-text-B14SZiZO.js";import"./external-link-tLC4XD6r.js";import"./chevron-down-hgezkIWy.js";const _=({detail:i})=>{const[d,l]=h.useState(()=>N(i)),p=h.useMemo(()=>{const t={};for(const c of d)for(const n of c.blocks??[])if(n.kind==="tool")for(const r of n.results??[])t[r.route_id]=r;return t},[d]),u=(t,c)=>{l(n=>n.map(r=>{var a;return r.id!==t?r:{...r,blocks:(a=r.blocks)==null?void 0:a.map((s,o)=>o===c&&(s.kind==="reasoning"||s.kind==="tool")?{...s,open:!s.open}:s)}}))};return e.jsx("div",{className:"shared-chat-transcript",children:d.map(t=>t.role==="user"?e.jsx(S,{id:t.id,text:t.text??"",paperMentions:t.paperMentions??[],paperSelection:t.paperSelection},t.id):e.jsx(k,{msg:t,papers:p,onToggleBlock:u},t.id))})},D=()=>{const{shareId:i=""}=f(),d=x(),l=g(),[p,u]=h.useState(60),t=v({queryKey:["shared-chat",i],queryFn:()=>q(i),retry:(r,a)=>!(a instanceof m&&a.status===404)&&r<1});h.useEffect(()=>{const r=document.title,a=document.head.querySelector('meta[name="robots"]'),s=a==null?void 0:a.content,o=a??document.createElement("meta");return o.name="robots",o.content="noindex,nofollow",a||document.head.appendChild(o),document.title="Shared conversation",()=>{document.title=r,a?a.content=s??"":o.remove()}},[]),h.useLayoutEffect(()=>{const r=document.querySelector(".app-header");if(!r)return;const a=()=>u(r.offsetHeight);a();const s=new ResizeObserver(a);return s.observe(r),()=>s.disconnect()},[]);const c=r=>{C(r,void 0,{autoSend:!1}),d("/chat")},n=t.error instanceof m&&t.error.status===404;return t.isLoading?e.jsxs("div",{className:"shared-chat-state",role:"status",children:[e.jsx(w,{})," Loading shared conversation…"]}):n?e.jsxs("div",{className:"shared-chat-state shared-chat-not-found",children:[e.jsx("h1",{children:"Shared conversation not found"}),e.jsx("p",{children:"This link is invalid or is no longer available."})]}):t.isError||!t.data?e.jsxs("div",{className:"shared-chat-state",role:"alert",children:[e.jsx("h1",{children:"Couldn’t load this conversation"}),e.jsx("p",{children:"Please check your connection and try again."}),e.jsx("button",{type:"button",onClick:()=>void t.refetch(),children:"Try again"})]}):e.jsx(j,{workspaceKey:`share:${i}:${t.data.updated_at}`,autoOpenOnMount:!0,children:e.jsxs("div",{className:"shared-chat-page",style:{height:`calc(100dvh - ${p}px)`},children:[e.jsxs("div",{className:"shared-chat-heading",children:[e.jsx("h1",{children:"Shared conversation"}),l&&e.jsx("span",{className:"chat-staging-badge",children:"Staging"})]}),e.jsx(b,{variant:"shared",children:e.jsxs("div",{className:"shared-chat-content","data-testid":"shared-conversation-pane",children:[e.jsx(_,{detail:t.data},t.data.updated_at),t.data.model_label&&e.jsxs("div",{className:"shared-chat-attribution",children:[e.jsxs("span",{children:["Generated with ",t.data.model_label]}),t.data.model_provider==="huggingface"&&e.jsxs("span",{children:["Powered by ",e.jsx("span",{"aria-hidden":"true",children:"🤗"})," ",e.jsx("a",{href:"https://huggingface.co/docs/inference-providers/en/index",target:"_blank",rel:"noreferrer",children:"Inference Providers"})]}),t.data.model_provider==="openrouter"&&e.jsxs("span",{children:["Powered by ",e.jsx("a",{href:"https://openrouter.ai",target:"_blank",rel:"noreferrer",children:"OpenRouter"})]}),t.data.model_provider==="openai"&&e.jsx("span",{children:"Powered by OpenAI"})]}),e.jsxs("section",{className:"shared-chat-fresh","aria-labelledby":"shared-chat-fresh-title",children:[e.jsx("h2",{id:"shared-chat-fresh-title",children:"Start a new conversation"}),e.jsx("p",{children:"Your new question starts with an empty context."}),l&&e.jsxs("div",{className:"shared-chat-access-note",role:"note",children:[e.jsx("strong",{children:"Limited staging preview."})," Starting a chat is available only to approved Hugging Face users."]}),e.jsx(y,{onSend:r=>c(r.text),placeholder:"Ask a new research question…"})]})]})})]})})};export{D as default};
assets/{SignInToEditDialog-BlcFzmvx.js → SignInToEditDialog-D7miI02Z.js} RENAMED
@@ -1,4 +1,4 @@
1
- import{g as be,r as a,j as e,a5 as je,x as fe,a6 as ye,h as Ne,o as we,X as Se,l as _e,H as ke}from"./index-CcJ6cWma.js";import{B as P}from"./button-CCtc-vkR.js";import{I as u}from"./input-CDtE_-7s.js";import{T as Ce}from"./textarea-V7qdwagm.js";import{S as se}from"./searchable-select-hSYn3P90.js";import{D as ie,a as oe,b as le,c as ce,d as de,e as De}from"./dialog-E2hweIxC.js";import{u as Ie}from"./useMutation-DPe9yGc6.js";import{s as b,p as j}from"./submissions-DM97tJtn.js";import{c as te}from"./catalog-B7hp4mKD.js";import{L as Ee}from"./loader-circle-BXhZSOlA.js";/**
2
  * @license lucide-react v0.462.0 - ISC
3
  *
4
  * This source code is licensed under the ISC license.
 
1
+ import{g as be,r as a,j as e,a5 as je,x as fe,a6 as ye,h as Ne,o as we,X as Se,l as _e,H as ke}from"./index-B9MfhMLC.js";import{B as P}from"./button-DZAojLNy.js";import{I as u}from"./input-DbV7135c.js";import{T as Ce}from"./textarea-BKTJjgMO.js";import{S as se}from"./searchable-select-C8cfKu2W.js";import{D as ie,a as oe,b as le,c as ce,d as de,e as De}from"./dialog-CR0TulAY.js";import{u as Ie}from"./useMutation-C2athD5k.js";import{s as b,p as j}from"./submissions-YISzGIO1.js";import{c as te}from"./catalog-BqDz3O_s.js";import{L as Ee}from"./loader-circle-BeMbSHvo.js";/**
2
  * @license lucide-react v0.462.0 - ISC
3
  *
4
  * This source code is licensed under the ISC license.
assets/{StagingAccessRequestView-V9BWLSa_.js → StagingAccessRequestView-7fNxCXia.js} RENAMED
@@ -1 +1 @@
1
- import{a as m,F as a,j as e,H as g,aU as p}from"./index-CcJ6cWma.js";import{C as j}from"./circle-check-DjcpGLXK.js";const f=()=>{const{user:s,isLoading:u}=m(),[l,d]=a.useState(!1),[r,t]=a.useState(!1),[c,i]=a.useState(null),o=async h=>{h.preventDefault(),t(!0),i(null);try{await p.requestStagingAccess(),d(!0)}catch(n){i(n instanceof Error?n.message:"Could not submit your request.")}finally{t(!1)}};return e.jsx("main",{className:"access-request-page",children:e.jsxs("section",{className:"access-request-card","aria-labelledby":"access-request-title",children:[e.jsxs("a",{className:"access-request-brand",href:"https://paperswithcode.co",children:[e.jsx("span",{className:"brand-mark","aria-hidden":"true"}),e.jsxs("span",{className:"brand-name",children:["Papers ",e.jsx("em",{children:"with"})," Code"]})]}),l?e.jsxs("div",{className:"access-request-success",role:"status",children:[e.jsx(j,{size:34,strokeWidth:1.6,"aria-hidden":"true"}),e.jsx("h1",{id:"access-request-title",children:"Request received"}),e.jsxs("p",{children:["Thanks, @",s==null?void 0:s.username,". We’ll review your contributor access request."]})]}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"access-request-heading",children:[e.jsx("p",{className:"access-request-eyebrow",children:"Staging preview"}),e.jsx("h1",{id:"access-request-title",children:"Request access"}),e.jsx("p",{children:"This preview is limited to project contributors. Send us your verified Hugging Face username and email address to request access."})]}),u?e.jsx("p",{className:"access-request-status",role:"status",children:"Checking your Hugging Face account…"}):s?e.jsxs("form",{className:"access-request-form",onSubmit:o,children:[e.jsx("label",{htmlFor:"hf-username",children:"Hugging Face username"}),e.jsxs("div",{className:"access-request-input-wrap",children:[e.jsx("span",{"aria-hidden":"true",children:"@"}),e.jsx("input",{id:"hf-username",name:"hf_username",value:s.username,readOnly:!0,autoComplete:"username"})]}),e.jsxs("p",{className:"access-request-verified",children:["Username and email verified through Hugging Face sign-in. See our"," ",e.jsx("a",{href:"https://paperswithcode.co/privacy",children:"Privacy Policy"}),"."]}),c&&e.jsx("p",{className:"access-request-error",role:"alert",children:c}),e.jsx("button",{className:"access-request-submit",type:"submit",disabled:r,children:r?"Sending…":"Request access"})]}):e.jsxs("div",{className:"access-request-signin",children:[e.jsx("p",{children:"Sign in first so we can verify the account you’re requesting access for."}),e.jsx(g,{returnTo:"/request-access",label:"Sign in with Hugging Face",collectEmail:!0})]})]})]})})};export{f as default};
 
1
+ import{a as m,F as a,j as e,H as g,aU as p}from"./index-B9MfhMLC.js";import{C as j}from"./circle-check-C0vXNVWN.js";const f=()=>{const{user:s,isLoading:u}=m(),[l,d]=a.useState(!1),[r,t]=a.useState(!1),[c,i]=a.useState(null),o=async h=>{h.preventDefault(),t(!0),i(null);try{await p.requestStagingAccess(),d(!0)}catch(n){i(n instanceof Error?n.message:"Could not submit your request.")}finally{t(!1)}};return e.jsx("main",{className:"access-request-page",children:e.jsxs("section",{className:"access-request-card","aria-labelledby":"access-request-title",children:[e.jsxs("a",{className:"access-request-brand",href:"https://paperswithcode.co",children:[e.jsx("span",{className:"brand-mark","aria-hidden":"true"}),e.jsxs("span",{className:"brand-name",children:["Papers ",e.jsx("em",{children:"with"})," Code"]})]}),l?e.jsxs("div",{className:"access-request-success",role:"status",children:[e.jsx(j,{size:34,strokeWidth:1.6,"aria-hidden":"true"}),e.jsx("h1",{id:"access-request-title",children:"Request received"}),e.jsxs("p",{children:["Thanks, @",s==null?void 0:s.username,". We’ll review your contributor access request."]})]}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"access-request-heading",children:[e.jsx("p",{className:"access-request-eyebrow",children:"Staging preview"}),e.jsx("h1",{id:"access-request-title",children:"Request access"}),e.jsx("p",{children:"This preview is limited to project contributors. Send us your verified Hugging Face username and email address to request access."})]}),u?e.jsx("p",{className:"access-request-status",role:"status",children:"Checking your Hugging Face account…"}):s?e.jsxs("form",{className:"access-request-form",onSubmit:o,children:[e.jsx("label",{htmlFor:"hf-username",children:"Hugging Face username"}),e.jsxs("div",{className:"access-request-input-wrap",children:[e.jsx("span",{"aria-hidden":"true",children:"@"}),e.jsx("input",{id:"hf-username",name:"hf_username",value:s.username,readOnly:!0,autoComplete:"username"})]}),e.jsxs("p",{className:"access-request-verified",children:["Username and email verified through Hugging Face sign-in. See our"," ",e.jsx("a",{href:"https://paperswithcode.co/privacy",children:"Privacy Policy"}),"."]}),c&&e.jsx("p",{className:"access-request-error",role:"alert",children:c}),e.jsx("button",{className:"access-request-submit",type:"submit",disabled:r,children:r?"Sending…":"Request access"})]}):e.jsxs("div",{className:"access-request-signin",children:[e.jsx("p",{children:"Sign in first so we can verify the account you’re requesting access for."}),e.jsx(g,{returnTo:"/request-access",label:"Sign in with Hugging Face",collectEmail:!0})]})]})]})})};export{f as default};
assets/{SubmissionsDashboard-CUVN0zVH.js → SubmissionsDashboard-DUs2AeDp.js} RENAMED
@@ -1,6 +1,6 @@
1
- var be=s=>{throw TypeError(s)};var ne=(s,t,i)=>t.has(s)||be("Cannot "+i);var g=(s,t,i)=>(ne(s,t,"read from private field"),i?i.call(s):t.get(s)),C=(s,t,i)=>t.has(s)?be("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(s):t.set(s,i),k=(s,t,i,n)=>(ne(s,t,"write to private field"),n?n.call(s,i):t.set(s,i),i),O=(s,t,i)=>(ne(s,t,"access private method"),i);import{aw as Oe,aJ as ae,az as Me,aP as Te,m as we,r as P,aB as Ie,g as Ae,j as e,U as Se,x as L,F as w,a as Fe,h as Ee,aQ as Ue,aR as Le,aS as Qe}from"./index-CcJ6cWma.js";import{i as De,r as qe,e as ze,b as $e}from"./evaluationQueryInvalidation-CC5JhGiX.js";import{p as He}from"./paperQueryKeys-BP2E-0yf.js";import{Q as Re,b as Be,c as Pe,e as Je,d as Ke,f as Ge,s as xe,g as We,h as Ve,u as oe}from"./useQuery-D3-GqcPN.js";import{u as je}from"./useMutation-DPe9yGc6.js";import{c as Q}from"./catalog-B7hp4mKD.js";import{s as q}from"./safeExternalHref-CkBrsh84.js";import{p as Ye}from"./papers-CClaKvmL.js";import{s as G}from"./submissions-DM97tJtn.js";import{R as Xe,C as Ze}from"./refresh-cw-C-xWs560.js";import{L as W}from"./loader-circle-BXhZSOlA.js";import{S as es}from"./shield-alert-DY4w7V_e.js";import{C as ss}from"./circle-check-DjcpGLXK.js";function _e(s,t){const i=new Set(t);return s.filter(n=>!i.has(n))}function ts(s,t,i){const n=s.slice(0);return n[t]=i,n}var $,E,H,D,R,U,V,Y,X,Z,N,le,ce,Ce,de,ue,me,ke,is=(ke=class extends Oe{constructor(t,i,n){super();C(this,N);C(this,$);C(this,E);C(this,H);C(this,D);C(this,R);C(this,U);C(this,V);C(this,Y);C(this,X);C(this,Z,[]);k(this,$,t),k(this,D,n),k(this,H,[]),k(this,R,[]),k(this,E,[]),this.setQueries(i)}onSubscribe(){this.listeners.size===1&&g(this,R).forEach(t=>{t.subscribe(i=>{O(this,N,ue).call(this,t,i)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,g(this,R).forEach(t=>{t.destroy()})}setQueries(t,i){k(this,H,t),k(this,D,i),ae.batch(()=>{const n=g(this,R),r=O(this,N,de).call(this,g(this,H));r.forEach(a=>a.observer.setOptions(a.defaultedQueryOptions));const l=r.map(a=>a.observer),o=l.map(a=>a.getCurrentResult()),d=n.length!==l.length,m=l.some((a,h)=>a!==n[h]),f=d||m,_=f?!0:o.some((a,h)=>{const c=g(this,E)[h];return!c||!Me(a,c)});!f&&!_||(f&&(k(this,Z,r),k(this,R,l)),k(this,E,o),this.hasListeners()&&(f&&(_e(n,l).forEach(a=>{a.destroy()}),_e(l,n).forEach(a=>{a.subscribe(h=>{O(this,N,ue).call(this,a,h)})})),O(this,N,me).call(this)))})}getCurrentResult(){return g(this,E)}getQueries(){return g(this,R).map(t=>t.getCurrentQuery())}getObservers(){return g(this,R)}getOptimisticResult(t,i){const n=O(this,N,de).call(this,t),r=n.map(o=>o.observer.getOptimisticResult(o.defaultedQueryOptions)),l=n.map(o=>o.defaultedQueryOptions.queryHash);return[r,o=>O(this,N,ce).call(this,o??r,i,l),()=>O(this,N,le).call(this,r,n)]}},$=new WeakMap,E=new WeakMap,H=new WeakMap,D=new WeakMap,R=new WeakMap,U=new WeakMap,V=new WeakMap,Y=new WeakMap,X=new WeakMap,Z=new WeakMap,N=new WeakSet,le=function(t,i){return i.map((n,r)=>{const l=t[r];return n.defaultedQueryOptions.notifyOnChangeProps?l:n.observer.trackResult(l,o=>{i.forEach(d=>{d.observer.trackProp(o)})})})},ce=function(t,i,n){if(i){const r=g(this,X),l=n!==void 0&&r!==void 0&&(r.length!==n.length||n.some((o,d)=>o!==r[d]));return(!g(this,U)||g(this,E)!==g(this,Y)||l||i!==g(this,V))&&(k(this,V,i),k(this,Y,g(this,E)),n!==void 0&&k(this,X,n),k(this,U,Te(g(this,U),i(t)))),g(this,U)}return t},Ce=function(){var t;return((t=g(this,D))==null?void 0:t.combine)!==void 0&&g(this,R).some((i,n)=>{var r;return i.options.suspense&&((r=g(this,E)[n])==null?void 0:r.data)===void 0})},de=function(t){const i=new Map;g(this,R).forEach(r=>{const l=r.options.queryHash;if(!l)return;const o=i.get(l);o?o.push(r):i.set(l,[r])});const n=[];return t.forEach(r=>{var m;const l=g(this,$).defaultQueryOptions(r),d=((m=i.get(l.queryHash))==null?void 0:m.shift())??new Re(g(this,$),l);n.push({defaultedQueryOptions:l,observer:d})}),n},ue=function(t,i){const n=g(this,R).indexOf(t);n!==-1&&(k(this,E,ts(g(this,E),n,i)),O(this,N,me).call(this))},me=function(){var t;if(this.hasListeners()){const i=O(this,N,le).call(this,g(this,E),g(this,Z)),n=O(this,N,Ce).call(this),r=g(this,U),l=n?r:O(this,N,ce).call(this,i,(t=g(this,D))==null?void 0:t.combine);(n||r!==l)&&ae.batch(()=>{this.listeners.forEach(o=>{o(g(this,E))})})}},ke);function te({queries:s,...t},i){const n=we(),r=Be(),l=Pe(),o=P.useMemo(()=>s.map(u=>{const v=n.defaultQueryOptions(u);return v._optimisticResults=r?"isRestoring":"optimistic",v}),[s,n,r]);o.forEach(u=>{Je(u);const v=n.getQueryCache().get(u.queryHash);Ke(u,l,v)}),Ge(l);const[d]=P.useState(()=>new is(n,o,t)),[m,f,_]=d.getOptimisticResult(o,t.combine),a=!r&&t.subscribed!==!1;P.useSyncExternalStore(P.useCallback(u=>a?d.subscribe(ae.batchCalls(u)):Ie,[d,a]),()=>d.getCurrentResult(),()=>d.getCurrentResult()),P.useEffect(()=>{d.setQueries(o,t)},[o,t,d]);const c=m.some((u,v)=>xe(o[v],u))?m.flatMap((u,v)=>{const S=o[v];if(S&&xe(S,u)){const M=new Re(n,S);return We(S,M,l)}return[]}):[];if(c.length>0)throw Promise.all(c);const p=m.find((u,v)=>{const S=o[v];return S&&Ve({result:u,errorResetBoundary:l,throwOnError:S.throwOnError,query:n.getQueryCache().get(S.queryHash),suspense:S.suspense})});if(p!=null&&p.error)throw p.error;return f(_())}/**
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 ve=Ae("Inbox",[["polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12",key:"o97t9d"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}]]);function ns({currentPayload:s,proposedPayload:t}){const[i,n]=w.useState(!1);return e.jsxs("div",{className:"submission-raw-toggle",children:[e.jsx("button",{type:"button",className:"raw-json-btn",onClick:()=>n(r=>!r),children:i?"Hide raw JSON":"Show raw JSON"}),i&&e.jsxs("div",{className:"submission-json-grid",children:[e.jsx(he,{title:"Current payload",value:s??{}}),e.jsx(he,{title:"Proposed payload",value:t})]})]})}function he({title:s,value:t}){return e.jsxs("div",{className:"submission-json-block",children:[e.jsx("div",{className:"submission-diff-label",children:s}),e.jsx("pre",{children:JSON.stringify(t,null,2)})]})}function pe({currentItems:s,proposedIds:t,queryPrefix:i,fetchEntity:n,knownNames:r}){const l=w.useMemo(()=>Array.from(new Set([...s.map(c=>c.id),...t])).sort((c,p)=>c-p),[s,t]),o=te({queries:n?l.map(c=>({queryKey:[i,String(c)],queryFn:()=>n(String(c)),staleTime:5*60*1e3})):[]}),d=w.useMemo(()=>{const c=new Map;return s.forEach(p=>c.set(p.id,p.name)),r==null||r.forEach((p,u)=>c.set(u,p)),o.forEach(p=>{const u=p.data;if(!u)return;const v=Number(u.id);Number.isFinite(v)&&c.set(v,u.name)}),c},[s,o,r]),m=new Set(s.map(c=>c.id)),f=new Set(t),_=l.filter(c=>m.has(c)&&!f.has(c)),a=l.filter(c=>!m.has(c)&&f.has(c)),h=(c,p)=>{const u=p==="current"&&_.includes(c),v=p==="proposed"&&a.includes(c);return e.jsx("span",{className:L("submission-diff-pill",u&&"removed",v&&"added"),children:d.get(c)??`#${c}`},c)};return e.jsxs("div",{className:"submission-diff-columns",children:[e.jsx(x,{title:"Currently tagged",children:s.length>0?s.map(c=>h(c.id,"current")):e.jsx(j,{children:"No current tags"})}),e.jsx(x,{title:"Will be tagged",children:t.length>0?t.map(c=>h(c,"proposed")):e.jsx(j,{children:"No proposed tags"})})]})}function rs({currentItems:s,proposedIds:t}){var l;const i=oe({queryKey:["organizations","submission-diff"],queryFn:()=>Q.organizations(),staleTime:3e5}),n=new Map(s.map(o=>[o.id,o.name]));(l=i.data)==null||l.results.forEach(o=>{const d=Number(o.id);Number.isFinite(d)&&n.set(d,o.name)});const r=s.map(o=>({...o,name:n.get(o.id)??o.name}));return e.jsx(pe,{currentItems:r,proposedIds:t,queryPrefix:"organization",knownNames:n})}function se({label:s,currentItems:t,proposedItems:i}){const n=new Map(t.map(o=>[o.url,o])),r=new Map(i.map(o=>[o.url,o])),l=Array.from(new Set([...n.keys(),...r.keys()])).sort();return l.length===0?e.jsxs(j,{children:["No ",s," in this submission."]}):e.jsx("div",{className:"submission-url-list",children:l.map(o=>{var h;const d=n.get(o),m=r.get(o),f=!d&&m,_=d&&!m,a=d&&m&&d.is_official!==m.is_official;return e.jsx("div",{className:L("submission-url-row",f&&"added",_&&"removed",a&&"changed"),children:e.jsxs("div",{className:"submission-url-content",children:[e.jsx("a",{href:q(o)??void 0,target:"_blank",rel:"noopener noreferrer",className:L("submission-url-link",_&&"removed"),children:o}),f&&e.jsx("span",{className:"submission-pill status approved",children:"Added"}),_&&e.jsx("span",{className:"submission-pill status rejected",children:"Removed"}),a&&e.jsxs("span",{className:"submission-pill changed",children:["Official: ",String(d.is_official)," ","->"," ",String(m.is_official)]}),((h=m??d)==null?void 0:h.is_official)&&e.jsx("span",{className:"submission-pill",children:"Official"})]})},o)})})}function as({currentPayload:s,proposedPayload:t}){const i=w.useMemo(()=>(s==null?void 0:s.evaluations)??[],[s]),n=t.operations,r=w.useMemo(()=>{const a=new Set;return i.forEach(h=>{h.task_id&&a.add(Number(h.task_id))}),n.forEach(h=>{const c=h.data;c!=null&&c.task_id&&a.add(Number(c.task_id))}),Array.from(a).filter(h=>Number.isFinite(h))},[i,n]),l=w.useMemo(()=>{const a=new Set;return i.forEach(h=>{h.dataset_id&&a.add(Number(h.dataset_id))}),n.forEach(h=>{const c=h.data;c!=null&&c.dataset_id&&a.add(Number(c.dataset_id))}),Array.from(a).filter(h=>Number.isFinite(h))},[i,n]),o=te({queries:r.map(a=>({queryKey:["task",String(a)],queryFn:()=>Q.getTask(String(a)),staleTime:5*60*1e3}))}),d=te({queries:l.map(a=>({queryKey:["dataset",String(a)],queryFn:()=>Q.getDataset(String(a)),staleTime:5*60*1e3}))}),m=w.useMemo(()=>{const a=new Map;return o.forEach(h=>{const c=h.data;if(!c)return;const p=Number(c.id);Number.isFinite(p)&&a.set(p,c.name)}),a},[o]),f=w.useMemo(()=>{const a=new Map;return d.forEach(h=>{const c=h.data;if(!c)return;const p=Number(c.id);Number.isFinite(p)&&a.set(p,c.name)}),a},[d]),_=new Map(i.filter(a=>a.id!=null).map(a=>[Number(a.id),a]));return n.length===0?e.jsx(j,{children:"No evaluation operations in this payload."}):e.jsx("div",{className:"submission-eval-list",children:n.map((a,h)=>{const c=a.evaluation_id?_.get(a.evaluation_id):void 0,u=(a.op==="update"?{...c,...a.data}:a.data??c)??{};return e.jsxs("div",{className:"submission-eval-op",children:[e.jsxs("div",{className:"submission-eval-op-header",children:[e.jsx("span",{className:L("submission-pill status",a.op==="create"&&"approved",a.op==="update"&&"changed",a.op==="delete"&&"rejected"),children:a.op??"unknown"}),a.evaluation_id&&e.jsxs("span",{className:"submission-meta",children:["Evaluation #",a.evaluation_id]})]}),a.op&&["create","update","delete"].includes(a.op)?e.jsx(os,{evaluation:u,taskNames:m,datasetNames:f}):e.jsx(he,{title:"Unsupported operation",value:a})]},`${a.op}-${a.evaluation_id??h}`)})})}function os({evaluation:s,taskNames:t,datasetNames:i}){const n=s.task_id?Number(s.task_id):void 0,r=s.dataset_id?Number(s.dataset_id):void 0,l=s.metrics??{};return e.jsxs("div",{className:"submission-eval-fields",children:[e.jsx(F,{label:"Task",value:n?t.get(n)??`#${n}`:null}),e.jsx(F,{label:"Dataset",value:r?i.get(r)??`#${r}`:null}),e.jsx(F,{label:"Model",value:s.model_name||null}),e.jsx(F,{label:"Harness",value:s.harness||null}),e.jsx(F,{label:"Best rank",value:s.best_rank??null}),e.jsx(F,{label:"Parameters",value:s.num_parameters??null}),e.jsx(F,{label:"HF model URL",value:s.hf_model_url||null}),e.jsx(F,{label:"Open source",value:s.is_open===void 0?null:s.is_open?"Yes":"No"}),e.jsxs("div",{className:"submission-eval-metrics",children:[e.jsx("div",{className:"submission-diff-label",children:"Metrics"}),Object.keys(l).length>0?e.jsx("div",{className:"submission-metric-list",children:Object.entries(l).map(([o,d])=>e.jsxs("span",{className:"submission-metric-pill",children:[o,": ",String(d)]},o))}):e.jsx(j,{children:"No metrics"})]})]})}function F({label:s,value:t}){return e.jsxs("div",{children:[e.jsx("div",{className:"submission-diff-label",children:s}),e.jsx("div",{className:"submission-field-value",children:t??e.jsx("span",{className:"submission-muted",children:"Not set"})})]})}function ls({currentPayload:s,proposedPayload:t}){const i=s==null?void 0:s.source_url,n=t.source_url;return e.jsxs("div",{className:"submission-diff-columns",children:[e.jsx(x,{title:"Current source URL",children:typeof i=="string"&&i?e.jsx("a",{className:"submission-url-link",href:q(i)??void 0,target:"_blank",rel:"noopener noreferrer",children:i}):e.jsx(j,{children:"No current URL"})}),e.jsx(x,{title:"Proposed source URL",children:typeof n=="string"&&n?e.jsx("a",{className:"submission-url-link",href:q(n)??void 0,target:"_blank",rel:"noopener noreferrer",children:n}):e.jsx(j,{children:"No proposed URL"})})]})}function ye({url:s,empty:t}){return s?e.jsx("a",{className:"submission-url-link",href:q(s)??void 0,target:"_blank",rel:"noopener noreferrer",children:s}):e.jsx(j,{children:t})}function cs({proposedPayload:s}){var o;const{name:t,hf_slug:i,website_url:n,image:r}=s,l=r!=null&&r.url?Se(r.url):(o=r==null?void 0:r.data_url)!=null&&o.startsWith("data:image/")?r.data_url:void 0;return e.jsxs("div",{className:"submission-diff-columns",children:[e.jsx(x,{title:"Suggested organization name",children:e.jsx("span",{className:"submission-diff-pill added",children:t})}),e.jsx(x,{title:"Hugging Face organization",children:e.jsx(ye,{url:i?`https://huggingface.co/${i}`:void 0,empty:"No Hugging Face organization provided"})}),e.jsx(x,{title:"Website",children:e.jsx(ye,{url:n,empty:"No website provided"})}),e.jsx(x,{title:"Logo",children:l?e.jsx("img",{src:l,alt:(r==null?void 0:r.file_name)??"Suggested logo",className:"max-h-32 max-w-full rounded-md border border-border object-contain"}):e.jsx(j,{children:"No logo provided"})})]})}function ds({proposedPayload:s}){const{title:t,source_url:i,abstract:n="",date_published:r,authors:l}=s;return e.jsxs("div",{className:"submission-diff-columns",children:[e.jsx(x,{title:"Title",children:t?e.jsx("span",{className:"submission-field-value",children:t}):e.jsx(j,{children:"No title provided"})}),e.jsx(x,{title:"Publication date",children:r||e.jsx(j,{children:"No publication date provided"})}),e.jsx(x,{title:"Authors",children:l.length>0?l.map((o,d)=>e.jsx("span",{className:"submission-diff-pill added",children:o},`${o}-${d}`)):e.jsx(j,{children:"No authors provided"})}),e.jsx(x,{title:"Source URL",children:i?e.jsx("a",{className:"submission-url-link",href:q(i)??void 0,target:"_blank",rel:"noopener noreferrer",children:i}):e.jsx(j,{children:"No source URL provided"})}),e.jsx(x,{title:"Abstract",children:n?e.jsx("span",{className:"submission-field-value",children:n}):e.jsx(j,{children:"No abstract provided"})})]})}function J({kind:s,proposedPayload:t}){const i=typeof t.benchmark=="string"?t.benchmark:typeof t.name=="string"?t.name:"",n=typeof t.description=="string"?t.description:"",r=typeof t.year=="number"?t.year:null,l=typeof t.start_date=="string"?t.start_date:"",o=typeof t.end_date=="string"?t.end_date:"",d=typeof t.venue=="string"?t.venue:"",m=typeof t.url=="string"?t.url:"",f=t.image??{},_=typeof f.data_url=="string"&&f.data_url.startsWith("data:image/")?f.data_url:"",a=typeof f.url=="string"?Se(f.url)??"":_,h=typeof f.file_name=="string"?f.file_name:"Suggested image",c=typeof t.image_credit=="string"?t.image_credit:"",p=typeof t.source_url=="string"?t.source_url:"";return e.jsxs("div",{className:"submission-diff-columns",children:[e.jsx(x,{title:`Suggested ${s} name`,children:i?e.jsx("span",{className:"submission-diff-pill added",children:i}):e.jsx(j,{children:"No name provided"})}),e.jsx(x,{title:"Description",children:n?e.jsx("span",{className:"submission-field-value",children:n}):e.jsx(j,{children:"No description provided"})}),(s==="task"||s==="method")&&e.jsxs(e.Fragment,{children:[e.jsx(x,{title:"Image",children:a?e.jsx("img",{src:a,alt:h,className:"max-h-64 max-w-full rounded-md border border-border object-contain"}):e.jsx(j,{children:"No image provided"})}),e.jsx(x,{title:"Image source",children:c||e.jsx(j,{children:"No image source provided"})})]}),s==="task"&&e.jsx(x,{title:"Placement and keywords",children:e.jsx("span",{className:"submission-field-value",children:JSON.stringify({parent_id:t.parent_id??null,area_id:t.area_id??null,keywords:t.keywords??null})})}),s==="benchmark"&&e.jsx(x,{title:"Task",children:e.jsx("span",{className:"submission-field-value",children:typeof t.task=="string"?t.task:JSON.stringify(t.task_ids??[])})}),s==="metric"&&e.jsx(x,{title:"Metric and leaderboard definition",children:e.jsx("span",{className:"submission-field-value",children:JSON.stringify({direction:t.direction,scale:t.scale,task_id:t.task_id,dataset_id:t.dataset_id})})}),s==="method"&&e.jsx(x,{title:"Source",children:p?p.startsWith("http://")||p.startsWith("https://")?e.jsx("a",{className:"submission-url-link",href:q(p)??void 0,target:"_blank",rel:"noopener noreferrer",children:p}):e.jsx("span",{className:"submission-field-value",children:p}):e.jsx(j,{children:"No source provided"})}),s==="conference"&&e.jsxs(e.Fragment,{children:[e.jsx(x,{title:"Edition and dates",children:r?`${r}${l?` · ${l}${o?` – ${o}`:""}`:""}`:e.jsx(j,{children:"No edition provided"})}),e.jsx(x,{title:"Venue",children:d||e.jsx(j,{children:"No venue provided"})}),e.jsx(x,{title:"URL",children:m?e.jsx("a",{className:"submission-url-link",href:q(m)??void 0,target:"_blank",rel:"noopener noreferrer",children:m}):e.jsx(j,{children:"No URL provided"})})]})]})}function x({title:s,children:t}){return e.jsxs("div",{className:"submission-diff-column",children:[e.jsx("div",{className:"submission-diff-label",children:s}),e.jsx("div",{className:"submission-diff-pills",children:t})]})}function j({children:s}){return e.jsx("span",{className:"submission-muted",children:s})}function us({currentPayload:s,proposedPayload:t}){const i=s,n=[{key:"hf_models",label:"Models"},{key:"hf_datasets",label:"Datasets"},{key:"hf_spaces",label:"Spaces"}];return e.jsx("div",{className:"submission-hf-artifacts-diff",children:n.map(({key:r,label:l})=>{const o=(i==null?void 0:i[r])??[],d=t[r];return e.jsxs("div",{className:"submission-hf-artifacts-section",children:[e.jsx("div",{className:"submission-diff-label",children:l}),e.jsx(se,{label:l.toLowerCase(),currentItems:o.map(m=>({url:m,is_official:!1})),proposedItems:d.map(m=>({url:m,is_official:!1}))})]},r)})})}function ms(s){throw new Error(`Unhandled pending edit: ${JSON.stringify(s)}`)}function hs({edit:s}){var i,n,r,l,o,d;let t;switch(s.edit_type){case"tasks":t=e.jsx(pe,{currentItems:((i=s.current_payload)==null?void 0:i.tasks)??[],proposedIds:s.proposed_payload.task_ids,queryPrefix:"task",fetchEntity:Q.getTask.bind(Q)});break;case"methods":t=e.jsx(pe,{currentItems:((n=s.current_payload)==null?void 0:n.methods)??[],proposedIds:s.proposed_payload.method_ids,queryPrefix:"method",fetchEntity:Q.getMethod.bind(Q)});break;case"organizations":t=e.jsx(rs,{currentItems:((r=s.current_payload)==null?void 0:r.organizations)??[],proposedIds:s.proposed_payload.organization_ids});break;case"repositories":t=e.jsx(se,{label:"repositories",currentItems:((l=s.current_payload)==null?void 0:l.repositories)??[],proposedItems:s.proposed_payload.repositories});break;case"project_pages":t=e.jsx(se,{label:"project pages",currentItems:((o=s.current_payload)==null?void 0:o.project_pages)??[],proposedItems:s.proposed_payload.project_pages});break;case"evaluations":t=e.jsx(as,{currentPayload:s.current_payload,proposedPayload:s.proposed_payload});break;case"source_url":t=e.jsx(ls,{currentPayload:s.current_payload,proposedPayload:s.proposed_payload});break;case"hf_artifacts":t=e.jsx(us,{currentPayload:s.current_payload,proposedPayload:s.proposed_payload});break;case"x_threads":t=e.jsx(se,{label:"X threads",currentItems:(((d=s.current_payload)==null?void 0:d.x_threads)??[]).map(({url:m})=>({url:m,is_official:!1})),proposedItems:s.proposed_payload.x_threads.map(m=>({url:m,is_official:!1}))});break;case"new_task":t=e.jsx(J,{kind:"task",proposedPayload:s.proposed_payload});break;case"new_method":t=e.jsx(J,{kind:"method",proposedPayload:s.proposed_payload});break;case"new_benchmark":t=e.jsx(J,{kind:"benchmark",proposedPayload:s.proposed_payload});break;case"new_metric":t=e.jsx(J,{kind:"metric",proposedPayload:s.proposed_payload});break;case"new_conference":t=e.jsx(J,{kind:"conference",proposedPayload:s.proposed_payload});break;case"new_organization":t=e.jsx(cs,{proposedPayload:s.proposed_payload});break;case"new_external_paper":t=e.jsx(ds,{proposedPayload:s.proposed_payload});break;default:ms(s)}return e.jsxs("div",{className:"submission-diff-body",children:[t,e.jsx(ns,{currentPayload:s.current_payload,proposedPayload:s.proposed_payload})]})}const re=25,ps=["pending","approved","rejected","all"],fs=["all","tasks","methods","evaluations","repositories","project_pages","source_url","x_threads","new_task","new_method","new_benchmark","new_metric","new_conference","new_organization","new_external_paper"],fe=["pending","approved","rejected"],gs=new Set(["new_task","new_method","new_benchmark","new_metric","new_conference"]);function bs(s){return s.slice(0,2).toUpperCase()}function K(s){return s.replace(/_/g," ")}function xs(s){return s==="new_external_paper"?"external paper":K(s)}const js={new_task:{title:"New task",subtitle:"Task suggestion"},new_method:{title:"New method",subtitle:"Method suggestion"},new_benchmark:{title:"New benchmark",subtitle:"Benchmark suggestion"},new_metric:{title:"New metric",subtitle:"Metric suggestion"},new_conference:{title:"New conference",subtitle:"Conference suggestion"},new_organization:{title:"New organization",subtitle:"Organization suggestion"},new_external_paper:{title:"External paper",subtitle:"External paper submission"}};function Ne(s){if(!s)return"unknown time";const t=new Date(s);if(Number.isNaN(t.getTime()))return s;const i=Date.now()-t.getTime(),n=Math.floor(i/6e4),r=Math.floor(i/36e5),l=Math.floor(i/864e5);return n<1?"just now":n<60?`${n}m ago`:r<24?`${r}h ago`:l<14?`${l}d ago`:t.toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})}function ie(s,t){var n;const i=s;if(i.response)try{const r=JSON.parse(i.response);if(typeof(r==null?void 0:r.detail)=="string")return r.detail;if(Array.isArray(r==null?void 0:r.detail)&&((n=r.detail[0])!=null&&n.msg))return r.detail[0].msg}catch{return i.response}return i.message||t}function _s(s){return s==="approved"?"approved":s==="rejected"?"rejected":"pending"}function vs(s,t){return(s==null?void 0:s.arxiv_id)||(s==null?void 0:s.id)||String(t)}function ys(s){return[...s].sort((t,i)=>new Date(i.created_at).getTime()-new Date(t.created_at).getTime())}async function Ns(s,t,i){const n=t==="all"?void 0:t;if(s!=="all")return G.list({status:s,edit_type:n,limit:i,offset:0});const r=await Promise.all(fe.map(l=>G.list({status:l,edit_type:n,limit:i,offset:0})));return{count:r.reduce((l,o)=>l+o.count,0),results:ys(r.flatMap(l=>l.results)).slice(0,i)}}function ks(){return e.jsx("div",{className:"page",children:e.jsxs("div",{className:"submission-empty submission-empty-warn",children:[e.jsx(es,{size:22}),e.jsx("h1",{children:"Admin access required"}),e.jsx("p",{children:"Sign in with an allowlisted Hugging Face admin account to review paper edit submissions."})]})})}function ws(){return e.jsx("div",{className:"page",children:e.jsxs("div",{className:"submission-loading",children:[e.jsx(W,{className:"spin",size:18}),e.jsx("span",{children:"Checking admin session..."})]})})}function Ss({submission:s,paper:t}){var z;const i=we(),{toast:n}=Ee(),r=s.paper_id,l=r===null,o=gs.has(s.edit_type),d=js[s.edit_type]??{title:"Taxonomy directory",subtitle:"Directory suggestion"},m=l?null:vs(t,r),f=l?d.title:(t==null?void 0:t.title)||`Paper #${r}`,_=`https://huggingface.co/${encodeURIComponent(s.hf_username)}/avatar`,a=s.status==="pending",h=!!s.user_review_reason&&s.user_review_reason.trim()!==((z=s.admin_note)==null?void 0:z.trim()),c=w.useCallback(y=>{i.invalidateQueries({queryKey:["pendingPaperEdits"]}),i.invalidateQueries({queryKey:["pendingPaperEdit",y.id]}),y.paper_id!=null&&y.edit_type!=="evaluations"&&De(i,[String(y.paper_id),t==null?void 0:t.arxiv_id])},[t==null?void 0:t.arxiv_id,i]),p=je({mutationFn:()=>G.approve(s.id),onSuccess:y=>{var B;c(y),y.edit_type==="evaluations"&&y.paper_id!=null?qe(i,ze(String(y.paper_id),((B=y.current_payload)==null?void 0:B.evaluations)??[],y.proposed_payload.operations.map(T=>T.op==="create"?{kind:"create",data:T.data}:T.op==="update"?{kind:"update",evaluationId:T.evaluation_id,data:T.data}:{kind:"delete",evaluationId:T.evaluation_id}),(t==null?void 0:t.arxiv_id)??void 0)):y.paper_id!=null&&!o&&$e(i),n({title:"Submission approved",description:o?`Marked ${K(s.edit_type)} suggestion as approved. No catalog changes were applied.`:`Applied ${K(s.edit_type)} changes for ${f}.`})},onError:y=>{n({title:"Could not approve submission",description:ie(y,"Approval failed. Please try again."),variant:"destructive"})}}),u=je({mutationFn:()=>G.reject(s.id),onSuccess:y=>{c(y),n({title:"Submission rejected",description:`Rejected ${K(s.edit_type)} changes for ${f}.`})},onError:y=>{n({title:"Could not reject submission",description:ie(y,"Rejection failed. Please try again."),variant:"destructive"})}}),v=p.isPending,S=u.isPending,M=v||S;return e.jsxs("article",{id:`submission-${s.id}`,className:"submission-card",children:[e.jsxs("header",{className:"submission-card-header",children:[e.jsxs("div",{className:"submission-card-top",children:[e.jsxs("div",{children:[m?e.jsx("a",{href:`/paper/${encodeURIComponent(m)}`,target:"_blank",rel:"noopener noreferrer",className:"submission-title",children:f}):e.jsx("div",{className:"submission-title",children:f}),e.jsxs("div",{className:"submission-meta",children:[e.jsxs("span",{children:["#",s.id]}),e.jsx("span",{children:l?d.subtitle:`Paper #${s.paper_id}`}),e.jsx("span",{children:Ne(s.created_at)})]})]}),e.jsxs("div",{className:"submission-badges",children:[e.jsx("span",{className:"submission-pill",children:K(s.edit_type)}),s.is_author&&e.jsx("span",{className:"submission-pill author",children:"Linked author"}),e.jsx("span",{className:L("submission-pill status",_s(s.status)),children:s.status})]})]}),e.jsxs("a",{href:`https://huggingface.co/${encodeURIComponent(s.hf_username)}`,target:"_blank",rel:"noopener noreferrer",className:"submission-user",children:[e.jsxs(Ue,{className:"h-6 w-6",children:[e.jsx(Le,{src:_,alt:s.hf_username}),e.jsx(Qe,{className:"text-[10px]",children:bs(s.hf_username)})]}),e.jsxs("span",{children:["@",s.hf_username]})]})]}),e.jsx("div",{className:"submission-diff",children:e.jsx(hs,{edit:s})}),s.conflict_payload&&e.jsxs("div",{className:"submission-empty submission-empty-warn",children:["Canonical state changed after this submission. Review the conflict before deciding.",e.jsx("pre",{children:JSON.stringify(s.conflict_payload,null,2)})]}),e.jsx("footer",{className:"submission-actions",children:a?e.jsx(e.Fragment,{children:e.jsxs("div",{className:"submission-action-buttons",children:[e.jsxs("button",{type:"button",onClick:()=>u.mutate(),disabled:M,className:"submission-action-btn reject",children:[S?e.jsx(W,{className:"spin",size:14}):e.jsx(Ze,{size:14}),"Reject"]}),e.jsxs("button",{type:"button",onClick:()=>p.mutate(),disabled:M,className:"submission-action-btn approve",children:[v?e.jsx(W,{className:"spin",size:14}):e.jsx(ss,{size:14}),"Approve"]})]})}):e.jsxs("div",{className:"submission-reviewed",children:[e.jsxs("span",{children:["Reviewed by ",e.jsx("strong",{children:s.reviewed_by||"unknown"}),s.reviewed_at?` ${Ne(s.reviewed_at)}`:""]}),s.admin_note&&e.jsxs("span",{children:["Admin note: ",e.jsx("strong",{children:s.admin_note})]}),h&&e.jsxs("span",{children:["Submitter-visible reason: ",e.jsx("strong",{children:s.user_review_reason})]}),s.applied_payload&&e.jsxs("details",{children:[e.jsx("summary",{children:o?"Reviewed payload":"Applied payload"}),e.jsx("pre",{children:JSON.stringify(s.applied_payload,null,2)})]}),s.result_entity_type&&e.jsxs("span",{children:["Created/applied: ",e.jsxs("strong",{children:[s.result_entity_type," #",s.result_entity_id]})]})]})})]})}function zs(){var B,T,ge;const{user:s,isLoading:t}=Fe(),{toast:i}=Ee(),[n,r]=w.useState("pending"),[l,o]=w.useState("all"),[d,m]=w.useState(re),f=!!(s!=null&&s.is_admin);w.useEffect(()=>{m(re)},[n,l]);const _=oe({queryKey:["pendingPaperEdits","counts",l],queryFn:async()=>{const b=l==="all"?void 0:l,I=await Promise.all(fe.map(A=>G.list({status:A,edit_type:b,limit:1,offset:0})));return Object.fromEntries(I.map((A,ee)=>[fe[ee],A.count]))},enabled:f,staleTime:30*1e3}),a=oe({queryKey:["pendingPaperEdits",{status:n,editType:l,visibleLimit:d}],queryFn:()=>Ns(n,l,d),enabled:f,retry:!1}),h=w.useMemo(()=>{var b;return Array.from(new Set((((b=a.data)==null?void 0:b.results)??[]).map(I=>I.paper_id).filter(I=>I!=null))).sort((I,A)=>I-A)},[(B=a.data)==null?void 0:B.results]),c=te({queries:h.map(b=>({queryKey:He.summary(String(b)),queryFn:()=>Ye.get(String(b),!1),enabled:f,staleTime:5*60*1e3}))}),p=w.useMemo(()=>{const b=new Map;return c.forEach(I=>{const A=I.data;if(!A)return;const ee=Number(A.id);Number.isFinite(ee)&&b.set(ee,A)}),b},[c]);if(w.useEffect(()=>{a.error&&i({title:"Could not load submissions",description:ie(a.error,"Failed to load pending paper edits."),variant:"destructive"})},[a.error,i]),t)return e.jsx(ws,{});if(!f)return e.jsx(ks,{});const u=_.data,v=u?u.pending+u.approved+u.rejected:void 0,S={pending:u==null?void 0:u.pending,approved:u==null?void 0:u.approved,rejected:u==null?void 0:u.rejected,all:v},M=((T=a.data)==null?void 0:T.results)??[],z=((ge=a.data)==null?void 0:ge.count)??0,y=M.length<z;return e.jsxs("div",{className:"page submissions-page",children:[e.jsxs("div",{className:"feed-header",children:[e.jsxs("div",{children:[e.jsxs("h1",{className:"feed-title",children:["Pending ",e.jsx("em",{children:"Edits"})]}),e.jsx("div",{className:"feed-subtitle",children:"Review submitted changes to paper metadata and benchmark results"})]}),e.jsxs("button",{type:"button",className:"feedback-link",onClick:()=>{_.refetch(),a.refetch()},disabled:a.isFetching||_.isFetching,children:[e.jsx(Xe,{className:L((a.isFetching||_.isFetching)&&"spin"),size:14}),"Refresh"]})]}),e.jsxs("div",{className:"submissions-filter-panel",children:[e.jsxs("div",{className:"submission-filter-block",children:[e.jsx("div",{className:"sidebar-label",children:"Status"}),e.jsx("div",{className:"period-switch",children:ps.map(b=>e.jsxs("button",{type:"button",className:L("period-btn",n===b&&"active"),onClick:()=>r(b),children:[b,S[b]!=null&&e.jsx("span",{className:"submission-count",children:S[b]})]},b))})]}),e.jsxs("div",{className:"submission-filter-block",children:[e.jsx("div",{className:"sidebar-label",children:"Edit Type"}),e.jsx("div",{className:"sort-options submissions-type-options",children:fs.map(b=>e.jsx("button",{type:"button",className:L("sort-btn",l===b&&"active"),onClick:()=>o(b),children:xs(b)},b))})]})]}),e.jsxs("div",{children:[e.jsx("div",{className:"sort-bar submissions-sort-bar",children:e.jsx("div",{children:e.jsx("div",{className:"sort-options",children:e.jsx("span",{className:"results-count",children:a.isFetching?"refreshing":`${z} submissions`})})})}),a.isLoading?e.jsxs("div",{className:"submission-loading",children:[e.jsx(W,{className:"spin",size:18}),e.jsx("span",{children:"Loading submissions..."})]}):a.isError?e.jsxs("div",{className:"submission-empty submission-empty-warn",role:"alert",children:[e.jsx(ve,{size:28}),e.jsx("h2",{children:"Could not display submissions."}),e.jsx("p",{children:ie(a.error,"The submissions response was invalid.")})]}):M.length===0?e.jsxs("div",{className:"submission-empty",children:[e.jsx(ve,{size:28}),e.jsx("h2",{children:"No pending submissions."}),e.jsxs("p",{children:["The SQL and curl fallback is still documented in"," ",e.jsx("a",{href:"https://github.com/huggingface/paperswithcode/blob/main/docs/operations.md",target:"_blank",rel:"noopener noreferrer",children:"operations.md"}),"."]})]}):e.jsx("div",{className:"submission-list",children:M.map(b=>e.jsx(Ss,{submission:b,paper:b.paper_id==null?void 0:p.get(b.paper_id)},b.id))}),M.length>0&&e.jsxs("div",{className:"submission-pagination",children:[e.jsxs("p",{children:["Showing ",M.length," of ",z," submissions"]}),y&&e.jsxs("button",{type:"button",className:"feedback-link",onClick:()=>m(b=>b+re),disabled:a.isFetching,children:[a.isFetching&&e.jsx(W,{className:"spin",size:14}),"Load more"]})]})]})]})}export{zs as default};
 
1
+ var be=s=>{throw TypeError(s)};var ne=(s,t,i)=>t.has(s)||be("Cannot "+i);var g=(s,t,i)=>(ne(s,t,"read from private field"),i?i.call(s):t.get(s)),C=(s,t,i)=>t.has(s)?be("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(s):t.set(s,i),k=(s,t,i,n)=>(ne(s,t,"write to private field"),n?n.call(s,i):t.set(s,i),i),O=(s,t,i)=>(ne(s,t,"access private method"),i);import{aw as Oe,aJ as ae,az as Me,aP as Te,m as we,r as P,aB as Ie,g as Ae,j as e,V as Se,x as L,F as w,a as Fe,h as Ee,aQ as Ue,aR as Le,aS as Qe}from"./index-B9MfhMLC.js";import{i as De,r as qe,e as ze,b as $e}from"./evaluationQueryInvalidation-CC5JhGiX.js";import{p as He}from"./paperQueryKeys-BP2E-0yf.js";import{Q as Re,b as Be,c as Pe,e as Je,d as Ke,f as Ge,s as xe,g as Ve,h as We,u as oe}from"./useQuery-Bx81pmgm.js";import{u as je}from"./useMutation-C2athD5k.js";import{c as Q}from"./catalog-BqDz3O_s.js";import{s as q}from"./safeExternalHref-CkBrsh84.js";import{p as Ye}from"./papers-BGvqL27Z.js";import{s as G}from"./submissions-YISzGIO1.js";import{R as Xe,C as Ze}from"./refresh-cw-D3I_8P9O.js";import{L as V}from"./loader-circle-BeMbSHvo.js";import{S as es}from"./shield-alert-BANoWW0F.js";import{C as ss}from"./circle-check-C0vXNVWN.js";function _e(s,t){const i=new Set(t);return s.filter(n=>!i.has(n))}function ts(s,t,i){const n=s.slice(0);return n[t]=i,n}var $,E,H,D,R,U,W,Y,X,Z,N,le,ce,Ce,de,ue,me,ke,is=(ke=class extends Oe{constructor(t,i,n){super();C(this,N);C(this,$);C(this,E);C(this,H);C(this,D);C(this,R);C(this,U);C(this,W);C(this,Y);C(this,X);C(this,Z,[]);k(this,$,t),k(this,D,n),k(this,H,[]),k(this,R,[]),k(this,E,[]),this.setQueries(i)}onSubscribe(){this.listeners.size===1&&g(this,R).forEach(t=>{t.subscribe(i=>{O(this,N,ue).call(this,t,i)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,g(this,R).forEach(t=>{t.destroy()})}setQueries(t,i){k(this,H,t),k(this,D,i),ae.batch(()=>{const n=g(this,R),r=O(this,N,de).call(this,g(this,H));r.forEach(a=>a.observer.setOptions(a.defaultedQueryOptions));const l=r.map(a=>a.observer),o=l.map(a=>a.getCurrentResult()),d=n.length!==l.length,m=l.some((a,h)=>a!==n[h]),f=d||m,_=f?!0:o.some((a,h)=>{const c=g(this,E)[h];return!c||!Me(a,c)});!f&&!_||(f&&(k(this,Z,r),k(this,R,l)),k(this,E,o),this.hasListeners()&&(f&&(_e(n,l).forEach(a=>{a.destroy()}),_e(l,n).forEach(a=>{a.subscribe(h=>{O(this,N,ue).call(this,a,h)})})),O(this,N,me).call(this)))})}getCurrentResult(){return g(this,E)}getQueries(){return g(this,R).map(t=>t.getCurrentQuery())}getObservers(){return g(this,R)}getOptimisticResult(t,i){const n=O(this,N,de).call(this,t),r=n.map(o=>o.observer.getOptimisticResult(o.defaultedQueryOptions)),l=n.map(o=>o.defaultedQueryOptions.queryHash);return[r,o=>O(this,N,ce).call(this,o??r,i,l),()=>O(this,N,le).call(this,r,n)]}},$=new WeakMap,E=new WeakMap,H=new WeakMap,D=new WeakMap,R=new WeakMap,U=new WeakMap,W=new WeakMap,Y=new WeakMap,X=new WeakMap,Z=new WeakMap,N=new WeakSet,le=function(t,i){return i.map((n,r)=>{const l=t[r];return n.defaultedQueryOptions.notifyOnChangeProps?l:n.observer.trackResult(l,o=>{i.forEach(d=>{d.observer.trackProp(o)})})})},ce=function(t,i,n){if(i){const r=g(this,X),l=n!==void 0&&r!==void 0&&(r.length!==n.length||n.some((o,d)=>o!==r[d]));return(!g(this,U)||g(this,E)!==g(this,Y)||l||i!==g(this,W))&&(k(this,W,i),k(this,Y,g(this,E)),n!==void 0&&k(this,X,n),k(this,U,Te(g(this,U),i(t)))),g(this,U)}return t},Ce=function(){var t;return((t=g(this,D))==null?void 0:t.combine)!==void 0&&g(this,R).some((i,n)=>{var r;return i.options.suspense&&((r=g(this,E)[n])==null?void 0:r.data)===void 0})},de=function(t){const i=new Map;g(this,R).forEach(r=>{const l=r.options.queryHash;if(!l)return;const o=i.get(l);o?o.push(r):i.set(l,[r])});const n=[];return t.forEach(r=>{var m;const l=g(this,$).defaultQueryOptions(r),d=((m=i.get(l.queryHash))==null?void 0:m.shift())??new Re(g(this,$),l);n.push({defaultedQueryOptions:l,observer:d})}),n},ue=function(t,i){const n=g(this,R).indexOf(t);n!==-1&&(k(this,E,ts(g(this,E),n,i)),O(this,N,me).call(this))},me=function(){var t;if(this.hasListeners()){const i=O(this,N,le).call(this,g(this,E),g(this,Z)),n=O(this,N,Ce).call(this),r=g(this,U),l=n?r:O(this,N,ce).call(this,i,(t=g(this,D))==null?void 0:t.combine);(n||r!==l)&&ae.batch(()=>{this.listeners.forEach(o=>{o(g(this,E))})})}},ke);function te({queries:s,...t},i){const n=we(),r=Be(),l=Pe(),o=P.useMemo(()=>s.map(u=>{const v=n.defaultQueryOptions(u);return v._optimisticResults=r?"isRestoring":"optimistic",v}),[s,n,r]);o.forEach(u=>{Je(u);const v=n.getQueryCache().get(u.queryHash);Ke(u,l,v)}),Ge(l);const[d]=P.useState(()=>new is(n,o,t)),[m,f,_]=d.getOptimisticResult(o,t.combine),a=!r&&t.subscribed!==!1;P.useSyncExternalStore(P.useCallback(u=>a?d.subscribe(ae.batchCalls(u)):Ie,[d,a]),()=>d.getCurrentResult(),()=>d.getCurrentResult()),P.useEffect(()=>{d.setQueries(o,t)},[o,t,d]);const c=m.some((u,v)=>xe(o[v],u))?m.flatMap((u,v)=>{const S=o[v];if(S&&xe(S,u)){const M=new Re(n,S);return Ve(S,M,l)}return[]}):[];if(c.length>0)throw Promise.all(c);const p=m.find((u,v)=>{const S=o[v];return S&&We({result:u,errorResetBoundary:l,throwOnError:S.throwOnError,query:n.getQueryCache().get(S.queryHash),suspense:S.suspense})});if(p!=null&&p.error)throw p.error;return f(_())}/**
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 ve=Ae("Inbox",[["polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12",key:"o97t9d"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}]]);function ns({currentPayload:s,proposedPayload:t}){const[i,n]=w.useState(!1);return e.jsxs("div",{className:"submission-raw-toggle",children:[e.jsx("button",{type:"button",className:"raw-json-btn",onClick:()=>n(r=>!r),children:i?"Hide raw JSON":"Show raw JSON"}),i&&e.jsxs("div",{className:"submission-json-grid",children:[e.jsx(he,{title:"Current payload",value:s??{}}),e.jsx(he,{title:"Proposed payload",value:t})]})]})}function he({title:s,value:t}){return e.jsxs("div",{className:"submission-json-block",children:[e.jsx("div",{className:"submission-diff-label",children:s}),e.jsx("pre",{children:JSON.stringify(t,null,2)})]})}function pe({currentItems:s,proposedIds:t,queryPrefix:i,fetchEntity:n,knownNames:r}){const l=w.useMemo(()=>Array.from(new Set([...s.map(c=>c.id),...t])).sort((c,p)=>c-p),[s,t]),o=te({queries:n?l.map(c=>({queryKey:[i,String(c)],queryFn:()=>n(String(c)),staleTime:5*60*1e3})):[]}),d=w.useMemo(()=>{const c=new Map;return s.forEach(p=>c.set(p.id,p.name)),r==null||r.forEach((p,u)=>c.set(u,p)),o.forEach(p=>{const u=p.data;if(!u)return;const v=Number(u.id);Number.isFinite(v)&&c.set(v,u.name)}),c},[s,o,r]),m=new Set(s.map(c=>c.id)),f=new Set(t),_=l.filter(c=>m.has(c)&&!f.has(c)),a=l.filter(c=>!m.has(c)&&f.has(c)),h=(c,p)=>{const u=p==="current"&&_.includes(c),v=p==="proposed"&&a.includes(c);return e.jsx("span",{className:L("submission-diff-pill",u&&"removed",v&&"added"),children:d.get(c)??`#${c}`},c)};return e.jsxs("div",{className:"submission-diff-columns",children:[e.jsx(x,{title:"Currently tagged",children:s.length>0?s.map(c=>h(c.id,"current")):e.jsx(j,{children:"No current tags"})}),e.jsx(x,{title:"Will be tagged",children:t.length>0?t.map(c=>h(c,"proposed")):e.jsx(j,{children:"No proposed tags"})})]})}function rs({currentItems:s,proposedIds:t}){var l;const i=oe({queryKey:["organizations","submission-diff"],queryFn:()=>Q.organizations(),staleTime:3e5}),n=new Map(s.map(o=>[o.id,o.name]));(l=i.data)==null||l.results.forEach(o=>{const d=Number(o.id);Number.isFinite(d)&&n.set(d,o.name)});const r=s.map(o=>({...o,name:n.get(o.id)??o.name}));return e.jsx(pe,{currentItems:r,proposedIds:t,queryPrefix:"organization",knownNames:n})}function se({label:s,currentItems:t,proposedItems:i}){const n=new Map(t.map(o=>[o.url,o])),r=new Map(i.map(o=>[o.url,o])),l=Array.from(new Set([...n.keys(),...r.keys()])).sort();return l.length===0?e.jsxs(j,{children:["No ",s," in this submission."]}):e.jsx("div",{className:"submission-url-list",children:l.map(o=>{var h;const d=n.get(o),m=r.get(o),f=!d&&m,_=d&&!m,a=d&&m&&d.is_official!==m.is_official;return e.jsx("div",{className:L("submission-url-row",f&&"added",_&&"removed",a&&"changed"),children:e.jsxs("div",{className:"submission-url-content",children:[e.jsx("a",{href:q(o)??void 0,target:"_blank",rel:"noopener noreferrer",className:L("submission-url-link",_&&"removed"),children:o}),f&&e.jsx("span",{className:"submission-pill status approved",children:"Added"}),_&&e.jsx("span",{className:"submission-pill status rejected",children:"Removed"}),a&&e.jsxs("span",{className:"submission-pill changed",children:["Official: ",String(d.is_official)," ","->"," ",String(m.is_official)]}),((h=m??d)==null?void 0:h.is_official)&&e.jsx("span",{className:"submission-pill",children:"Official"})]})},o)})})}function as({currentPayload:s,proposedPayload:t}){const i=w.useMemo(()=>(s==null?void 0:s.evaluations)??[],[s]),n=t.operations,r=w.useMemo(()=>{const a=new Set;return i.forEach(h=>{h.task_id&&a.add(Number(h.task_id))}),n.forEach(h=>{const c=h.data;c!=null&&c.task_id&&a.add(Number(c.task_id))}),Array.from(a).filter(h=>Number.isFinite(h))},[i,n]),l=w.useMemo(()=>{const a=new Set;return i.forEach(h=>{h.dataset_id&&a.add(Number(h.dataset_id))}),n.forEach(h=>{const c=h.data;c!=null&&c.dataset_id&&a.add(Number(c.dataset_id))}),Array.from(a).filter(h=>Number.isFinite(h))},[i,n]),o=te({queries:r.map(a=>({queryKey:["task",String(a)],queryFn:()=>Q.getTask(String(a)),staleTime:5*60*1e3}))}),d=te({queries:l.map(a=>({queryKey:["dataset",String(a)],queryFn:()=>Q.getDataset(String(a)),staleTime:5*60*1e3}))}),m=w.useMemo(()=>{const a=new Map;return o.forEach(h=>{const c=h.data;if(!c)return;const p=Number(c.id);Number.isFinite(p)&&a.set(p,c.name)}),a},[o]),f=w.useMemo(()=>{const a=new Map;return d.forEach(h=>{const c=h.data;if(!c)return;const p=Number(c.id);Number.isFinite(p)&&a.set(p,c.name)}),a},[d]),_=new Map(i.filter(a=>a.id!=null).map(a=>[Number(a.id),a]));return n.length===0?e.jsx(j,{children:"No evaluation operations in this payload."}):e.jsx("div",{className:"submission-eval-list",children:n.map((a,h)=>{const c=a.evaluation_id?_.get(a.evaluation_id):void 0,u=(a.op==="update"?{...c,...a.data}:a.data??c)??{};return e.jsxs("div",{className:"submission-eval-op",children:[e.jsxs("div",{className:"submission-eval-op-header",children:[e.jsx("span",{className:L("submission-pill status",a.op==="create"&&"approved",a.op==="update"&&"changed",a.op==="delete"&&"rejected"),children:a.op??"unknown"}),a.evaluation_id&&e.jsxs("span",{className:"submission-meta",children:["Evaluation #",a.evaluation_id]})]}),a.op&&["create","update","delete"].includes(a.op)?e.jsx(os,{evaluation:u,taskNames:m,datasetNames:f}):e.jsx(he,{title:"Unsupported operation",value:a})]},`${a.op}-${a.evaluation_id??h}`)})})}function os({evaluation:s,taskNames:t,datasetNames:i}){const n=s.task_id?Number(s.task_id):void 0,r=s.dataset_id?Number(s.dataset_id):void 0,l=s.metrics??{};return e.jsxs("div",{className:"submission-eval-fields",children:[e.jsx(F,{label:"Task",value:n?t.get(n)??`#${n}`:null}),e.jsx(F,{label:"Dataset",value:r?i.get(r)??`#${r}`:null}),e.jsx(F,{label:"Model",value:s.model_name||null}),e.jsx(F,{label:"Harness",value:s.harness||null}),e.jsx(F,{label:"Best rank",value:s.best_rank??null}),e.jsx(F,{label:"Parameters",value:s.num_parameters??null}),e.jsx(F,{label:"HF model URL",value:s.hf_model_url||null}),e.jsx(F,{label:"Open source",value:s.is_open===void 0?null:s.is_open?"Yes":"No"}),e.jsxs("div",{className:"submission-eval-metrics",children:[e.jsx("div",{className:"submission-diff-label",children:"Metrics"}),Object.keys(l).length>0?e.jsx("div",{className:"submission-metric-list",children:Object.entries(l).map(([o,d])=>e.jsxs("span",{className:"submission-metric-pill",children:[o,": ",String(d)]},o))}):e.jsx(j,{children:"No metrics"})]})]})}function F({label:s,value:t}){return e.jsxs("div",{children:[e.jsx("div",{className:"submission-diff-label",children:s}),e.jsx("div",{className:"submission-field-value",children:t??e.jsx("span",{className:"submission-muted",children:"Not set"})})]})}function ls({currentPayload:s,proposedPayload:t}){const i=s==null?void 0:s.source_url,n=t.source_url;return e.jsxs("div",{className:"submission-diff-columns",children:[e.jsx(x,{title:"Current source URL",children:typeof i=="string"&&i?e.jsx("a",{className:"submission-url-link",href:q(i)??void 0,target:"_blank",rel:"noopener noreferrer",children:i}):e.jsx(j,{children:"No current URL"})}),e.jsx(x,{title:"Proposed source URL",children:typeof n=="string"&&n?e.jsx("a",{className:"submission-url-link",href:q(n)??void 0,target:"_blank",rel:"noopener noreferrer",children:n}):e.jsx(j,{children:"No proposed URL"})})]})}function ye({url:s,empty:t}){return s?e.jsx("a",{className:"submission-url-link",href:q(s)??void 0,target:"_blank",rel:"noopener noreferrer",children:s}):e.jsx(j,{children:t})}function cs({proposedPayload:s}){var o;const{name:t,hf_slug:i,website_url:n,image:r}=s,l=r!=null&&r.url?Se(r.url):(o=r==null?void 0:r.data_url)!=null&&o.startsWith("data:image/")?r.data_url:void 0;return e.jsxs("div",{className:"submission-diff-columns",children:[e.jsx(x,{title:"Suggested organization name",children:e.jsx("span",{className:"submission-diff-pill added",children:t})}),e.jsx(x,{title:"Hugging Face organization",children:e.jsx(ye,{url:i?`https://huggingface.co/${i}`:void 0,empty:"No Hugging Face organization provided"})}),e.jsx(x,{title:"Website",children:e.jsx(ye,{url:n,empty:"No website provided"})}),e.jsx(x,{title:"Logo",children:l?e.jsx("img",{src:l,alt:(r==null?void 0:r.file_name)??"Suggested logo",className:"max-h-32 max-w-full rounded-md border border-border object-contain"}):e.jsx(j,{children:"No logo provided"})})]})}function ds({proposedPayload:s}){const{title:t,source_url:i,abstract:n="",date_published:r,authors:l}=s;return e.jsxs("div",{className:"submission-diff-columns",children:[e.jsx(x,{title:"Title",children:t?e.jsx("span",{className:"submission-field-value",children:t}):e.jsx(j,{children:"No title provided"})}),e.jsx(x,{title:"Publication date",children:r||e.jsx(j,{children:"No publication date provided"})}),e.jsx(x,{title:"Authors",children:l.length>0?l.map((o,d)=>e.jsx("span",{className:"submission-diff-pill added",children:o},`${o}-${d}`)):e.jsx(j,{children:"No authors provided"})}),e.jsx(x,{title:"Source URL",children:i?e.jsx("a",{className:"submission-url-link",href:q(i)??void 0,target:"_blank",rel:"noopener noreferrer",children:i}):e.jsx(j,{children:"No source URL provided"})}),e.jsx(x,{title:"Abstract",children:n?e.jsx("span",{className:"submission-field-value",children:n}):e.jsx(j,{children:"No abstract provided"})})]})}function J({kind:s,proposedPayload:t}){const i=typeof t.benchmark=="string"?t.benchmark:typeof t.name=="string"?t.name:"",n=typeof t.description=="string"?t.description:"",r=typeof t.year=="number"?t.year:null,l=typeof t.start_date=="string"?t.start_date:"",o=typeof t.end_date=="string"?t.end_date:"",d=typeof t.venue=="string"?t.venue:"",m=typeof t.url=="string"?t.url:"",f=t.image??{},_=typeof f.data_url=="string"&&f.data_url.startsWith("data:image/")?f.data_url:"",a=typeof f.url=="string"?Se(f.url)??"":_,h=typeof f.file_name=="string"?f.file_name:"Suggested image",c=typeof t.image_credit=="string"?t.image_credit:"",p=typeof t.source_url=="string"?t.source_url:"";return e.jsxs("div",{className:"submission-diff-columns",children:[e.jsx(x,{title:`Suggested ${s} name`,children:i?e.jsx("span",{className:"submission-diff-pill added",children:i}):e.jsx(j,{children:"No name provided"})}),e.jsx(x,{title:"Description",children:n?e.jsx("span",{className:"submission-field-value",children:n}):e.jsx(j,{children:"No description provided"})}),(s==="task"||s==="method")&&e.jsxs(e.Fragment,{children:[e.jsx(x,{title:"Image",children:a?e.jsx("img",{src:a,alt:h,className:"max-h-64 max-w-full rounded-md border border-border object-contain"}):e.jsx(j,{children:"No image provided"})}),e.jsx(x,{title:"Image source",children:c||e.jsx(j,{children:"No image source provided"})})]}),s==="task"&&e.jsx(x,{title:"Placement and keywords",children:e.jsx("span",{className:"submission-field-value",children:JSON.stringify({parent_id:t.parent_id??null,area_id:t.area_id??null,keywords:t.keywords??null})})}),s==="benchmark"&&e.jsx(x,{title:"Task",children:e.jsx("span",{className:"submission-field-value",children:typeof t.task=="string"?t.task:JSON.stringify(t.task_ids??[])})}),s==="metric"&&e.jsx(x,{title:"Metric and leaderboard definition",children:e.jsx("span",{className:"submission-field-value",children:JSON.stringify({direction:t.direction,scale:t.scale,task_id:t.task_id,dataset_id:t.dataset_id})})}),s==="method"&&e.jsx(x,{title:"Source",children:p?p.startsWith("http://")||p.startsWith("https://")?e.jsx("a",{className:"submission-url-link",href:q(p)??void 0,target:"_blank",rel:"noopener noreferrer",children:p}):e.jsx("span",{className:"submission-field-value",children:p}):e.jsx(j,{children:"No source provided"})}),s==="conference"&&e.jsxs(e.Fragment,{children:[e.jsx(x,{title:"Edition and dates",children:r?`${r}${l?` · ${l}${o?` – ${o}`:""}`:""}`:e.jsx(j,{children:"No edition provided"})}),e.jsx(x,{title:"Venue",children:d||e.jsx(j,{children:"No venue provided"})}),e.jsx(x,{title:"URL",children:m?e.jsx("a",{className:"submission-url-link",href:q(m)??void 0,target:"_blank",rel:"noopener noreferrer",children:m}):e.jsx(j,{children:"No URL provided"})})]})]})}function x({title:s,children:t}){return e.jsxs("div",{className:"submission-diff-column",children:[e.jsx("div",{className:"submission-diff-label",children:s}),e.jsx("div",{className:"submission-diff-pills",children:t})]})}function j({children:s}){return e.jsx("span",{className:"submission-muted",children:s})}function us({currentPayload:s,proposedPayload:t}){const i=s,n=[{key:"hf_models",label:"Models"},{key:"hf_datasets",label:"Datasets"},{key:"hf_spaces",label:"Spaces"}];return e.jsx("div",{className:"submission-hf-artifacts-diff",children:n.map(({key:r,label:l})=>{const o=(i==null?void 0:i[r])??[],d=t[r];return e.jsxs("div",{className:"submission-hf-artifacts-section",children:[e.jsx("div",{className:"submission-diff-label",children:l}),e.jsx(se,{label:l.toLowerCase(),currentItems:o.map(m=>({url:m,is_official:!1})),proposedItems:d.map(m=>({url:m,is_official:!1}))})]},r)})})}function ms(s){throw new Error(`Unhandled pending edit: ${JSON.stringify(s)}`)}function hs({edit:s}){var i,n,r,l,o,d;let t;switch(s.edit_type){case"tasks":t=e.jsx(pe,{currentItems:((i=s.current_payload)==null?void 0:i.tasks)??[],proposedIds:s.proposed_payload.task_ids,queryPrefix:"task",fetchEntity:Q.getTask.bind(Q)});break;case"methods":t=e.jsx(pe,{currentItems:((n=s.current_payload)==null?void 0:n.methods)??[],proposedIds:s.proposed_payload.method_ids,queryPrefix:"method",fetchEntity:Q.getMethod.bind(Q)});break;case"organizations":t=e.jsx(rs,{currentItems:((r=s.current_payload)==null?void 0:r.organizations)??[],proposedIds:s.proposed_payload.organization_ids});break;case"repositories":t=e.jsx(se,{label:"repositories",currentItems:((l=s.current_payload)==null?void 0:l.repositories)??[],proposedItems:s.proposed_payload.repositories});break;case"project_pages":t=e.jsx(se,{label:"project pages",currentItems:((o=s.current_payload)==null?void 0:o.project_pages)??[],proposedItems:s.proposed_payload.project_pages});break;case"evaluations":t=e.jsx(as,{currentPayload:s.current_payload,proposedPayload:s.proposed_payload});break;case"source_url":t=e.jsx(ls,{currentPayload:s.current_payload,proposedPayload:s.proposed_payload});break;case"hf_artifacts":t=e.jsx(us,{currentPayload:s.current_payload,proposedPayload:s.proposed_payload});break;case"x_threads":t=e.jsx(se,{label:"X threads",currentItems:(((d=s.current_payload)==null?void 0:d.x_threads)??[]).map(({url:m})=>({url:m,is_official:!1})),proposedItems:s.proposed_payload.x_threads.map(m=>({url:m,is_official:!1}))});break;case"new_task":t=e.jsx(J,{kind:"task",proposedPayload:s.proposed_payload});break;case"new_method":t=e.jsx(J,{kind:"method",proposedPayload:s.proposed_payload});break;case"new_benchmark":t=e.jsx(J,{kind:"benchmark",proposedPayload:s.proposed_payload});break;case"new_metric":t=e.jsx(J,{kind:"metric",proposedPayload:s.proposed_payload});break;case"new_conference":t=e.jsx(J,{kind:"conference",proposedPayload:s.proposed_payload});break;case"new_organization":t=e.jsx(cs,{proposedPayload:s.proposed_payload});break;case"new_external_paper":t=e.jsx(ds,{proposedPayload:s.proposed_payload});break;default:ms(s)}return e.jsxs("div",{className:"submission-diff-body",children:[t,e.jsx(ns,{currentPayload:s.current_payload,proposedPayload:s.proposed_payload})]})}const re=25,ps=["pending","approved","rejected","all"],fs=["all","tasks","methods","evaluations","repositories","project_pages","source_url","x_threads","new_task","new_method","new_benchmark","new_metric","new_conference","new_organization","new_external_paper"],fe=["pending","approved","rejected"],gs=new Set(["new_task","new_method","new_benchmark","new_metric","new_conference"]);function bs(s){return s.slice(0,2).toUpperCase()}function K(s){return s.replace(/_/g," ")}function xs(s){return s==="new_external_paper"?"external paper":K(s)}const js={new_task:{title:"New task",subtitle:"Task suggestion"},new_method:{title:"New method",subtitle:"Method suggestion"},new_benchmark:{title:"New benchmark",subtitle:"Benchmark suggestion"},new_metric:{title:"New metric",subtitle:"Metric suggestion"},new_conference:{title:"New conference",subtitle:"Conference suggestion"},new_organization:{title:"New organization",subtitle:"Organization suggestion"},new_external_paper:{title:"External paper",subtitle:"External paper submission"}};function Ne(s){if(!s)return"unknown time";const t=new Date(s);if(Number.isNaN(t.getTime()))return s;const i=Date.now()-t.getTime(),n=Math.floor(i/6e4),r=Math.floor(i/36e5),l=Math.floor(i/864e5);return n<1?"just now":n<60?`${n}m ago`:r<24?`${r}h ago`:l<14?`${l}d ago`:t.toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})}function ie(s,t){var n;const i=s;if(i.response)try{const r=JSON.parse(i.response);if(typeof(r==null?void 0:r.detail)=="string")return r.detail;if(Array.isArray(r==null?void 0:r.detail)&&((n=r.detail[0])!=null&&n.msg))return r.detail[0].msg}catch{return i.response}return i.message||t}function _s(s){return s==="approved"?"approved":s==="rejected"?"rejected":"pending"}function vs(s,t){return(s==null?void 0:s.arxiv_id)||(s==null?void 0:s.id)||String(t)}function ys(s){return[...s].sort((t,i)=>new Date(i.created_at).getTime()-new Date(t.created_at).getTime())}async function Ns(s,t,i){const n=t==="all"?void 0:t;if(s!=="all")return G.list({status:s,edit_type:n,limit:i,offset:0});const r=await Promise.all(fe.map(l=>G.list({status:l,edit_type:n,limit:i,offset:0})));return{count:r.reduce((l,o)=>l+o.count,0),results:ys(r.flatMap(l=>l.results)).slice(0,i)}}function ks(){return e.jsx("div",{className:"page",children:e.jsxs("div",{className:"submission-empty submission-empty-warn",children:[e.jsx(es,{size:22}),e.jsx("h1",{children:"Admin access required"}),e.jsx("p",{children:"Sign in with an allowlisted Hugging Face admin account to review paper edit submissions."})]})})}function ws(){return e.jsx("div",{className:"page",children:e.jsxs("div",{className:"submission-loading",children:[e.jsx(V,{className:"spin",size:18}),e.jsx("span",{children:"Checking admin session..."})]})})}function Ss({submission:s,paper:t}){var z;const i=we(),{toast:n}=Ee(),r=s.paper_id,l=r===null,o=gs.has(s.edit_type),d=js[s.edit_type]??{title:"Taxonomy directory",subtitle:"Directory suggestion"},m=l?null:vs(t,r),f=l?d.title:(t==null?void 0:t.title)||`Paper #${r}`,_=`https://huggingface.co/${encodeURIComponent(s.hf_username)}/avatar`,a=s.status==="pending",h=!!s.user_review_reason&&s.user_review_reason.trim()!==((z=s.admin_note)==null?void 0:z.trim()),c=w.useCallback(y=>{i.invalidateQueries({queryKey:["pendingPaperEdits"]}),i.invalidateQueries({queryKey:["pendingPaperEdit",y.id]}),y.paper_id!=null&&y.edit_type!=="evaluations"&&De(i,[String(y.paper_id),t==null?void 0:t.arxiv_id])},[t==null?void 0:t.arxiv_id,i]),p=je({mutationFn:()=>G.approve(s.id),onSuccess:y=>{var B;c(y),y.edit_type==="evaluations"&&y.paper_id!=null?qe(i,ze(String(y.paper_id),((B=y.current_payload)==null?void 0:B.evaluations)??[],y.proposed_payload.operations.map(T=>T.op==="create"?{kind:"create",data:T.data}:T.op==="update"?{kind:"update",evaluationId:T.evaluation_id,data:T.data}:{kind:"delete",evaluationId:T.evaluation_id}),(t==null?void 0:t.arxiv_id)??void 0)):y.paper_id!=null&&!o&&$e(i),n({title:"Submission approved",description:o?`Marked ${K(s.edit_type)} suggestion as approved. No catalog changes were applied.`:`Applied ${K(s.edit_type)} changes for ${f}.`})},onError:y=>{n({title:"Could not approve submission",description:ie(y,"Approval failed. Please try again."),variant:"destructive"})}}),u=je({mutationFn:()=>G.reject(s.id),onSuccess:y=>{c(y),n({title:"Submission rejected",description:`Rejected ${K(s.edit_type)} changes for ${f}.`})},onError:y=>{n({title:"Could not reject submission",description:ie(y,"Rejection failed. Please try again."),variant:"destructive"})}}),v=p.isPending,S=u.isPending,M=v||S;return e.jsxs("article",{id:`submission-${s.id}`,className:"submission-card",children:[e.jsxs("header",{className:"submission-card-header",children:[e.jsxs("div",{className:"submission-card-top",children:[e.jsxs("div",{children:[m?e.jsx("a",{href:`/paper/${encodeURIComponent(m)}`,target:"_blank",rel:"noopener noreferrer",className:"submission-title",children:f}):e.jsx("div",{className:"submission-title",children:f}),e.jsxs("div",{className:"submission-meta",children:[e.jsxs("span",{children:["#",s.id]}),e.jsx("span",{children:l?d.subtitle:`Paper #${s.paper_id}`}),e.jsx("span",{children:Ne(s.created_at)})]})]}),e.jsxs("div",{className:"submission-badges",children:[e.jsx("span",{className:"submission-pill",children:K(s.edit_type)}),s.is_author&&e.jsx("span",{className:"submission-pill author",children:"Linked author"}),e.jsx("span",{className:L("submission-pill status",_s(s.status)),children:s.status})]})]}),e.jsxs("a",{href:`https://huggingface.co/${encodeURIComponent(s.hf_username)}`,target:"_blank",rel:"noopener noreferrer",className:"submission-user",children:[e.jsxs(Ue,{className:"h-6 w-6",children:[e.jsx(Le,{src:_,alt:s.hf_username}),e.jsx(Qe,{className:"text-[10px]",children:bs(s.hf_username)})]}),e.jsxs("span",{children:["@",s.hf_username]})]})]}),e.jsx("div",{className:"submission-diff",children:e.jsx(hs,{edit:s})}),s.conflict_payload&&e.jsxs("div",{className:"submission-empty submission-empty-warn",children:["Canonical state changed after this submission. Review the conflict before deciding.",e.jsx("pre",{children:JSON.stringify(s.conflict_payload,null,2)})]}),e.jsx("footer",{className:"submission-actions",children:a?e.jsx(e.Fragment,{children:e.jsxs("div",{className:"submission-action-buttons",children:[e.jsxs("button",{type:"button",onClick:()=>u.mutate(),disabled:M,className:"submission-action-btn reject",children:[S?e.jsx(V,{className:"spin",size:14}):e.jsx(Ze,{size:14}),"Reject"]}),e.jsxs("button",{type:"button",onClick:()=>p.mutate(),disabled:M,className:"submission-action-btn approve",children:[v?e.jsx(V,{className:"spin",size:14}):e.jsx(ss,{size:14}),"Approve"]})]})}):e.jsxs("div",{className:"submission-reviewed",children:[e.jsxs("span",{children:["Reviewed by ",e.jsx("strong",{children:s.reviewed_by||"unknown"}),s.reviewed_at?` ${Ne(s.reviewed_at)}`:""]}),s.admin_note&&e.jsxs("span",{children:["Admin note: ",e.jsx("strong",{children:s.admin_note})]}),h&&e.jsxs("span",{children:["Submitter-visible reason: ",e.jsx("strong",{children:s.user_review_reason})]}),s.applied_payload&&e.jsxs("details",{children:[e.jsx("summary",{children:o?"Reviewed payload":"Applied payload"}),e.jsx("pre",{children:JSON.stringify(s.applied_payload,null,2)})]}),s.result_entity_type&&e.jsxs("span",{children:["Created/applied: ",e.jsxs("strong",{children:[s.result_entity_type," #",s.result_entity_id]})]})]})})]})}function zs(){var B,T,ge;const{user:s,isLoading:t}=Fe(),{toast:i}=Ee(),[n,r]=w.useState("pending"),[l,o]=w.useState("all"),[d,m]=w.useState(re),f=!!(s!=null&&s.is_admin);w.useEffect(()=>{m(re)},[n,l]);const _=oe({queryKey:["pendingPaperEdits","counts",l],queryFn:async()=>{const b=l==="all"?void 0:l,I=await Promise.all(fe.map(A=>G.list({status:A,edit_type:b,limit:1,offset:0})));return Object.fromEntries(I.map((A,ee)=>[fe[ee],A.count]))},enabled:f,staleTime:30*1e3}),a=oe({queryKey:["pendingPaperEdits",{status:n,editType:l,visibleLimit:d}],queryFn:()=>Ns(n,l,d),enabled:f,retry:!1}),h=w.useMemo(()=>{var b;return Array.from(new Set((((b=a.data)==null?void 0:b.results)??[]).map(I=>I.paper_id).filter(I=>I!=null))).sort((I,A)=>I-A)},[(B=a.data)==null?void 0:B.results]),c=te({queries:h.map(b=>({queryKey:He.summary(String(b)),queryFn:()=>Ye.get(String(b),!1),enabled:f,staleTime:5*60*1e3}))}),p=w.useMemo(()=>{const b=new Map;return c.forEach(I=>{const A=I.data;if(!A)return;const ee=Number(A.id);Number.isFinite(ee)&&b.set(ee,A)}),b},[c]);if(w.useEffect(()=>{a.error&&i({title:"Could not load submissions",description:ie(a.error,"Failed to load pending paper edits."),variant:"destructive"})},[a.error,i]),t)return e.jsx(ws,{});if(!f)return e.jsx(ks,{});const u=_.data,v=u?u.pending+u.approved+u.rejected:void 0,S={pending:u==null?void 0:u.pending,approved:u==null?void 0:u.approved,rejected:u==null?void 0:u.rejected,all:v},M=((T=a.data)==null?void 0:T.results)??[],z=((ge=a.data)==null?void 0:ge.count)??0,y=M.length<z;return e.jsxs("div",{className:"page submissions-page",children:[e.jsxs("div",{className:"feed-header",children:[e.jsxs("div",{children:[e.jsxs("h1",{className:"feed-title",children:["Pending ",e.jsx("em",{children:"Edits"})]}),e.jsx("div",{className:"feed-subtitle",children:"Review submitted changes to paper metadata and benchmark results"})]}),e.jsxs("button",{type:"button",className:"feedback-link",onClick:()=>{_.refetch(),a.refetch()},disabled:a.isFetching||_.isFetching,children:[e.jsx(Xe,{className:L((a.isFetching||_.isFetching)&&"spin"),size:14}),"Refresh"]})]}),e.jsxs("div",{className:"submissions-filter-panel",children:[e.jsxs("div",{className:"submission-filter-block",children:[e.jsx("div",{className:"sidebar-label",children:"Status"}),e.jsx("div",{className:"period-switch",children:ps.map(b=>e.jsxs("button",{type:"button",className:L("period-btn",n===b&&"active"),onClick:()=>r(b),children:[b,S[b]!=null&&e.jsx("span",{className:"submission-count",children:S[b]})]},b))})]}),e.jsxs("div",{className:"submission-filter-block",children:[e.jsx("div",{className:"sidebar-label",children:"Edit Type"}),e.jsx("div",{className:"sort-options submissions-type-options",children:fs.map(b=>e.jsx("button",{type:"button",className:L("sort-btn",l===b&&"active"),onClick:()=>o(b),children:xs(b)},b))})]})]}),e.jsxs("div",{children:[e.jsx("div",{className:"sort-bar submissions-sort-bar",children:e.jsx("div",{children:e.jsx("div",{className:"sort-options",children:e.jsx("span",{className:"results-count",children:a.isFetching?"refreshing":`${z} submissions`})})})}),a.isLoading?e.jsxs("div",{className:"submission-loading",children:[e.jsx(V,{className:"spin",size:18}),e.jsx("span",{children:"Loading submissions..."})]}):a.isError?e.jsxs("div",{className:"submission-empty submission-empty-warn",role:"alert",children:[e.jsx(ve,{size:28}),e.jsx("h2",{children:"Could not display submissions."}),e.jsx("p",{children:ie(a.error,"The submissions response was invalid.")})]}):M.length===0?e.jsxs("div",{className:"submission-empty",children:[e.jsx(ve,{size:28}),e.jsx("h2",{children:"No pending submissions."}),e.jsxs("p",{children:["The SQL and curl fallback is still documented in"," ",e.jsx("a",{href:"https://github.com/huggingface/paperswithcode/blob/main/docs/operations.md",target:"_blank",rel:"noopener noreferrer",children:"operations.md"}),"."]})]}):e.jsx("div",{className:"submission-list",children:M.map(b=>e.jsx(Ss,{submission:b,paper:b.paper_id==null?void 0:p.get(b.paper_id)},b.id))}),M.length>0&&e.jsxs("div",{className:"submission-pagination",children:[e.jsxs("p",{children:["Showing ",M.length," of ",z," submissions"]}),y&&e.jsxs("button",{type:"button",className:"feedback-link",onClick:()=>m(b=>b+re),disabled:a.isFetching,children:[a.isFetching&&e.jsx(V,{className:"spin",size:14}),"Load more"]})]})]})]})}export{zs as default};