@opencompass-fe/oc-webkit-eval 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +37 -0
- package/dist/assets/svg/arrow.svg.js +1 -0
- package/dist/assets/svg/blueNewLogo.svg.js +1 -0
- package/dist/assets/svg/blueNewLogoEn.svg.js +1 -0
- package/dist/assets/svg/evaluation/comprehensive.svg.js +1 -0
- package/dist/assets/svg/evaluation/customize.svg.js +1 -0
- package/dist/assets/svg/evaluation/done.svg.js +1 -0
- package/dist/assets/svg/evaluation/part.svg.js +1 -0
- package/dist/assets/svg/evaluation/quick.svg.js +1 -0
- package/dist/assets/svg/footer/github.svg.js +1 -0
- package/dist/assets/svg/footer/twitter.svg.js +1 -0
- package/dist/assets/svg/footer/wechat.svg.js +1 -0
- package/dist/assets/svg/footer/zhihu.svg.js +1 -0
- package/dist/assets/svg/left-wing.svg.js +1 -0
- package/dist/assets/svg/llm-evaluation.svg.js +1 -0
- package/dist/assets/svg/mm-evaluation.svg.js +1 -0
- package/dist/assets/svg/newLogo.svg.js +1 -0
- package/dist/assets/svg/newLogoEn.svg.js +1 -0
- package/dist/assets/svg/right-wing.svg.js +1 -0
- package/dist/assets/svg/top-nav/AI4S.svg.js +1 -0
- package/dist/assets/svg/top-nav/LLM.svg.js +1 -0
- package/dist/assets/svg/top-nav/agent.svg.js +1 -0
- package/dist/assets/svg/top-nav/arena-flag-mobile.svg.js +1 -0
- package/dist/assets/svg/top-nav/arena-flag.svg.js +1 -0
- package/dist/assets/svg/top-nav/arrow-right-up.svg.js +1 -0
- package/dist/assets/svg/top-nav/arrow-up.svg.js +1 -0
- package/dist/assets/svg/top-nav/finance.svg.js +1 -0
- package/dist/assets/svg/top-nav/group-bullet.svg.js +1 -0
- package/dist/assets/svg/top-nav/image-understanding.svg.js +1 -0
- package/dist/assets/svg/top-nav/logo-mark.svg.js +1 -0
- package/dist/assets/svg/top-nav/logo-word.svg.js +1 -0
- package/dist/assets/svg/top-nav/medical.svg.js +1 -0
- package/dist/assets/svg/top-nav/nav-down.svg.js +1 -0
- package/dist/assets/svg/top-nav/physical-intelligence.svg.js +1 -0
- package/dist/assets/svg/top-nav/video-understanding.svg.js +1 -0
- package/dist/components/dropdown/dropdown.js +1 -0
- package/dist/components/dropdown/dropdown.module.less.js +175 -0
- package/dist/components/dropdown/index.js +1 -0
- package/dist/components/footer/footer.js +1 -0
- package/dist/components/footer/footer.module.less.js +68 -0
- package/dist/components/footer/index.js +1 -0
- package/dist/components/footer-expansion/footer-expansion.js +1 -0
- package/dist/components/footer-expansion/footer-expansion.module.less.js +120 -0
- package/dist/components/footer-expansion/index.js +1 -0
- package/dist/components/header/components/create-online-evaluation/component/create-evaluation/create-evaluation.js +1 -0
- package/dist/components/header/components/create-online-evaluation/component/create-evaluation/create-evaluation.module.less.js +249 -0
- package/dist/components/header/components/create-online-evaluation/component/evaluation-button/evaluation-button.js +1 -0
- package/dist/components/header/components/create-online-evaluation/component/evaluation-button/evaluation-button.module.less.js +19 -0
- package/dist/components/header/components/create-online-evaluation/component/pre-create-evaluation/index.js +1 -0
- package/dist/components/header/components/create-online-evaluation/component/pre-create-evaluation/index.module.less.js +68 -0
- package/dist/components/header/components/create-online-evaluation/component/sidebar/sidebar.module.less.js +18 -0
- package/dist/components/header/firstHeader.module.less.js +305 -0
- package/dist/components/header/header.js +1 -0
- package/dist/components/header/header.module.less.js +434 -0
- package/dist/components/header/hooks/useUrl.js +1 -0
- package/dist/components/header/index.js +1 -0
- package/dist/components/header/secondHeader.js +1 -0
- package/dist/components/md-render/index.js +6 -0
- package/dist/components/md-render/index.module.less.js +369 -0
- package/dist/components/online-evaluation/index.js +1 -0
- package/dist/components/online-evaluation/online-evaluation.js +1 -0
- package/dist/components/side-nav/index.js +1 -0
- package/dist/components/side-nav/side-nav.js +1 -0
- package/dist/components/side-nav/side-nav.module.less.js +80 -0
- package/dist/components/top-nav/index.js +1 -0
- package/dist/components/top-nav/shared.js +1 -0
- package/dist/components/top-nav/top-nav.js +1 -0
- package/dist/components/top-nav/top-nav.module.less.js +526 -0
- package/dist/constants/enums.js +1 -0
- package/dist/extraComponents/button/button.js +1 -0
- package/dist/extraComponents/button/button.module.less.js +52 -0
- package/dist/extraComponents/icon-font/index.js +1 -0
- package/dist/google-log/home.js +1 -0
- package/dist/helper/index.js +1 -0
- package/dist/index.js +1 -0
- package/dist/locale/en.js +3 -0
- package/dist/locale/index.js +1 -0
- package/dist/locale/zh.js +3 -0
- package/dist/mobile/components/top-nav/top-nav.js +1 -0
- package/dist/mobile/components/top-nav/top-nav.module.less.js +343 -0
- package/dist/node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.js +1 -0
- package/dist/providers/OcConfigContext.js +1 -0
- package/dist/providers/OcContext.js +1 -0
- package/dist/types/components/dropdown/dropdown.d.ts +39 -0
- package/dist/types/components/dropdown/index.d.ts +2 -0
- package/dist/types/components/footer/index.d.ts +6 -0
- package/dist/types/components/footer-expansion/index.d.ts +6 -0
- package/dist/types/components/header/index.d.ts +6 -0
- package/dist/types/components/md-render/index.d.ts +9 -0
- package/dist/types/components/online-evaluation/index.d.ts +6 -0
- package/dist/types/components/side-nav/index.d.ts +6 -0
- package/dist/types/components/top-nav/index.d.ts +6 -0
- package/dist/types/constants/enums.d.ts +22 -0
- package/dist/types/google-log/home.d.ts +9 -0
- package/dist/types/helper/index.d.ts +13 -0
- package/dist/types/index.d.ts +164 -0
- package/dist/utils/utils.js +1 -0
- package/package.json +149 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import o,{useContext as j,useState as H,useEffect as T,useMemo as d}from"react";import{Dropdown as R,message as J}from"antd";import{goCommon as E,goOCHome as Q}from"../../google-log/home.js";import y from"classnames";import{OcContext as X}from"../../providers/OcContext.js";import{OcConfigContext as Z}from"../../providers/OcConfigContext.js";import ee from"./hooks/useUrl.js";import n from"./firstHeader.module.less.js";import te from"../../assets/svg/newLogo.svg.js";import ne from"../../assets/svg/newLogoEn.svg.js";import W from"../../extraComponents/icon-font/index.js";import oe from"../../assets/svg/blueNewLogo.svg.js";import le from"../../assets/svg/blueNewLogoEn.svg.js";import P from"./secondHeader.js";import{useLocation as re}from"react-router-dom";import"@ant-design/icons";import{webTypeEnum as i,langTypeEnum as L}from"../../constants/enums.js";import"../../mobile/components/top-nav/top-nav.module.less.js";import"../top-nav/shared.js";import"../top-nav/top-nav.module.less.js";import"react-device-detect";import"./components/create-online-evaluation/component/evaluation-button/evaluation-button.module.less.js";import"./components/create-online-evaluation/component/create-evaluation/create-evaluation.js";import"./components/create-online-evaluation/component/pre-create-evaluation/index.module.less.js";import"../side-nav/side-nav.module.less.js";import"../footer/footer.module.less.js";import"../dropdown/dropdown.module.less.js";import"ahooks";import"../footer-expansion/footer-expansion.module.less.js";import"../md-render/index.js";import"../../helper/index.js";var ie=Object.defineProperty,ae=Object.defineProperties,se=Object.getOwnPropertyDescriptors,V=Object.getOwnPropertySymbols,ce=Object.prototype.hasOwnProperty,ue=Object.prototype.propertyIsEnumerable,x=(s,t,c)=>t in s?ie(s,t,{enumerable:!0,configurable:!0,writable:!0,value:c}):s[t]=c,$=(s,t)=>{for(var c in t||(t={}))ce.call(t,c)&&x(s,c,t[c]);if(V)for(var c of V(t))ue.call(t,c)&&x(s,c,t[c]);return s},F=(s,t)=>ae(s,se(t)),me=(s,t,c)=>new Promise((v,a)=>{var k=m=>{try{e(c.next(m))}catch(_){a(_)}},u=m=>{try{e(c.throw(m))}catch(_){a(_)}},e=m=>m.done?v(m.value):Promise.resolve(m.value).then(k,u);e((c=c.apply(s,t)).next())});const de=64,ve=57;let z,I=0;const fe=s=>{const{locales:t}=j(X),{setConfig:c,config:v}=j(Z),{locale:a,setLocale:k}=v,{pathname:u}=re(),{urls:e}=ee(),{handleUnauth:m,logout:_,userInfo:B,jumpLogin:G,webType:l,isDefaultShowSecondMenu:U}=s,[b,C]=H(!1),[f,A]=H(!0);T(()=>{c(s)},[s]),T(()=>{U&&C(!0)},[U]);const M=d(()=>[{title:{"zh-CN":"\u5927\u6A21\u578B\u8BC4\u6D4B","en-US":"LLM"},key:"large-model",href:`${e==null?void 0:e.VITE_COMPASS_URL}large-model`,onClick:E,isActive:u.startsWith("/large-model")||u.startsWith("/arena")||u.startsWith("/doc")||u.startsWith("/rule")||u.startsWith("/policy")||window.location.href.startsWith(e==null?void 0:e.VITE_RANK_URL)||window.location.href.startsWith(e==null?void 0:e.VITE_HUB_URL)||window.location.href.startsWith(e==null?void 0:e.VITE_DOC_URL)||window.location.href.startsWith(e==null?void 0:e.VITE_SPECIAL_LIST_URL)||window.location.href.startsWith(e==null?void 0:e.VITE_DATA_URL)},{title:{"zh-CN":"\u79D1\u5B66\u667A\u80FD\u8BC4\u6D4B","en-US":"Scientific Intelligence"},key:"Intern-Discovery-Eval",href:`${e==null?void 0:e.VITE_COMPASS_URL}Intern-Discovery-Eval`,onClick:E,isActive:u.startsWith("/Intern-Discovery-Eval")},{title:{"zh-CN":"\u5177\u8EAB\u667A\u80FD\u8BC4\u6D4B","en-US":"Embodied Intelligence"},key:"Embodied-Intelligence",href:`${e==null?void 0:e.VITE_COMPASS_URL}embodied-intelligence`,onClick:E,isActive:u.startsWith("/embodied-intelligence")},{title:{"zh-CN":"\u5B89\u5168\u8BC4\u6D4B","en-US":"Safety"},key:"security-evaluation",href:`${e==null?void 0:e.VITE_COMPASS_URL}safety`,onClick:E,isActive:u.startsWith("/safety")},{title:{"zh-CN":"AI \u8BA1\u7B97\u7CFB\u7EDF\u8BC4\u6D4B","en-US":"AI Computing System"},key:"computing-system-evaluation",href:`${e==null?void 0:e.VITE_COMPASS_URL}computing-system`,onClick:E,isActive:u.startsWith("/computing-system")||u.startsWith("/evaluation-plan")},{title:{"zh-CN":"\u5782\u7C7B\u9886\u57DF\u8BC4\u6D4B","en-US":"Industry Verticals"},key:"Vertical-domain-evaluation",href:`${e==null?void 0:e.VITE_COMPASS_URL}ecosystem/finance`,onClick:E,isActive:u.startsWith("/ecosystem/finance")}],[e,u,window.location]),q=r=>me(void 0,[r],function*({key:S}){if(S==="logout")try{yield _()}catch(g){J.error("request error!")}finally{m(),window.location.reload()}}),p=d(()=>l!==i.miniWeb&&l!==i.lightMiniWeb,[l]),K=d(()=>[{label:o.createElement("div",null,t==null?void 0:t.finance," ",o.createElement(W,{type:"icon-GotoOutline"})),key:"https://cnfinbench.opencompass.org.cn/"},{label:o.createElement("div",null,t==null?void 0:t.medical," ",o.createElement(W,{type:"icon-GotoOutline"})),key:"https://medbench.opencompass.org.cn/home"}],[t,e]),O=d(()=>l===i.blueWeb||l===i.miniWeb||l===i.transparentWeb?a==="en-US"?ne:te:a==="en-US"?le:oe,[l,a]),Y=({key:r})=>{r.startsWith(e==null?void 0:e.VITE_COMPASS_URL)?location.href=r:window.open(r)},h=d(()=>!!(v.navMenuList&&v.navMenuList.length>1||!v.navMenuList),[v.navMenuList]),D=d(()=>[{key:"myEvaluation",label:o.createElement("a",{href:`${e==null?void 0:e.VITE_RANK_URL}/online-evaluation?lang=${a}`},t==null?void 0:t.myEvaluation)},{key:"myBenchmark",label:o.createElement("a",{href:`${e==null?void 0:e.VITE_HUB_URL}/benchmarks?lang=${a}`},t==null?void 0:t.myBenchmark)},{key:"myModel",label:o.createElement("a",{href:`${e==null?void 0:e.VITE_RANK_URL}/models?lang=${a}`},t==null?void 0:t.myModel)},{key:"collaboration",label:o.createElement("a",{className:n.collaboration,href:`${e==null?void 0:e.VITE_DATA_URL}/data-list?lang=${a}`},t==null?void 0:t.commitRecord)},{key:"user-center",label:o.createElement("a",{href:`${e==null?void 0:e.VITE_SSO_URL}/usercenter?lang=${a}`,target:"_blank",rel:"noreferrer"},t==null?void 0:t.userCenter)},{key:"logout",label:t==null?void 0:t.logout}],[t==null?void 0:t.myEvaluation,t==null?void 0:t.logout,t==null?void 0:t.userCenter,t==null?void 0:t.myBenchmark,a,e]),N=d(()=>o.createElement("header",{className:y(n.firstHeader,b&&h&&p&&n.animateHide,!b&&p&&n.animateShow,l===i.lightWeb&&n.lightHeader,l===i.lightMiniWeb&&n.lightHeader,l===i.miniWeb&&n.miniWeb,!f&&l===i.miniWeb&&n.blackMiniWeb,l===i.transparentWeb&&!f&&n.blueBackHeaderBox,l===i.lightWeb&&!f&&n.lightBackHeader,a==="en-US"&&n.enHeader)},o.createElement("a",{className:n.logo,href:`${e==null?void 0:e.VITE_COMPASS_URL}?lang=${a}`,onClick:r=>{r.preventDefault(),Q(a,"header",e==null?void 0:e.VITE_COMPASS_URL)}},o.createElement("img",{src:O,alt:"logo"})),o.createElement("div",{className:n.rightBox},M.map(r=>r.key==="Vertical-domain-evaluation"?o.createElement(R,{placement:"bottom",overlayClassName:n.whiteCustomDropdown,menu:{items:K,onClick:Y}},o.createElement("a",{key:r.key,className:y(n.firstMenuItem,r.isActive&&n.activeMenu),target:"_self",rel:"noreferrer"},r.title[a])):o.createElement("a",{key:r.key,className:y(n.firstMenuItem,r.isActive&&n.activeMenu),target:"_self",rel:"noreferrer",onClick:S=>{S.preventDefault(),r.onClick&&r.onClick(a,"header",r.href)}},r.title[a])),o.createElement("div",{onClick:()=>k(a===L.zh?L.en:L.zh),className:n.lang},o.createElement(W,{type:a!=="zh-CN"?"icon-zhongyingqiehuanyingTranslateE":"icon-zhongyingqiehuanzhongTranslateC"})),o.createElement("div",{className:n.userWrapper},B&&B.token?o.createElement(R,{overlayClassName:n.userInfoDropdown,menu:{items:D,onClick:q}},o.createElement("div",{className:n.avatar},o.createElement(W,{type:l===i.lightMiniWeb||l===i.lightWeb?"icon-a-Frame1321316814":"icon-a-Frame1321316813"}))):o.createElement("a",{className:y(n.loginBtn),onClick:()=>{let r=G();r&&(window.location.href=r)}},t==null?void 0:t.login)))),[b,l,p,O,t,f,M,D,h,e,B]),w=d(()=>h?de:ve,[h]);return T(()=>{console.log("scrollOffset",w);const r=S=>{let g=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop;window.clearTimeout(z),z=setTimeout(function(){g===0?(C(!1),A(!0)):(A(!1),g>I+w+5?(console.log("\u5411\u4E0B\u6EDA\u52A8"),g>=I&&C(!0)):g<I-w-5&&C(!1)),I=g},50)};return window.addEventListener("scroll",r),()=>{window.removeEventListener("scroll",r)}},[window.location.pathname,l,h,w]),o.createElement(o.Fragment,null,b&&p?h?o.createElement(P,F($({},s),{isTop:!1,isScrollDown:b})):o.createElement("div",{className:y(n.headerBox,n.onlyFirstHeaderBox,l===i.lightWeb&&n.lightHeadBox,l===i.lightMiniWeb&&n.lightMiniWeb,l===i.miniWeb&&n.miniWeb,l===i.transparentWeb&&n.transparentWeb)},N):o.createElement("div",{className:y(n.headerBox,!p&&n.onlyFirstHeaderBox,l===i.lightWeb&&n.lightHeadBox,l===i.lightMiniWeb&&n.lightMiniWeb,l===i.miniWeb&&n.miniWeb,l===i.transparentWeb&&n.transparentWeb,l===i.lightWeb&&!f&&n.lightBackHeadBox)},N,p&&o.createElement(P,F($({},s),{isTop:f,isScrollDown:!1}))))};export{fe as default};
|
|
@@ -0,0 +1,434 @@
|
|
|
1
|
+
import e from"../../node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.js";var n=`.header-module_button__IQokx {
|
|
2
|
+
font-size: 16px;
|
|
3
|
+
line-height: 24px;
|
|
4
|
+
border-radius: 2px;
|
|
5
|
+
text-align: center;
|
|
6
|
+
border: none;
|
|
7
|
+
padding: 4px 16px;
|
|
8
|
+
transition: all 0.2s;
|
|
9
|
+
}
|
|
10
|
+
.header-module_button__IQokx[disabled] {
|
|
11
|
+
cursor: wait;
|
|
12
|
+
opacity: 0.5;
|
|
13
|
+
}
|
|
14
|
+
.header-module_drop__2z-pn .ant-dropdown-menu {
|
|
15
|
+
padding: 4px 24px !important;
|
|
16
|
+
}
|
|
17
|
+
.header-module_topHeaderBg__uJ8Vy {
|
|
18
|
+
backdrop-filter: blur(10px);
|
|
19
|
+
}
|
|
20
|
+
.header-module_header__cv0Px {
|
|
21
|
+
box-sizing: border-box;
|
|
22
|
+
position: sticky;
|
|
23
|
+
top: 0;
|
|
24
|
+
height: 56px;
|
|
25
|
+
width: 100%;
|
|
26
|
+
padding-left: 64px;
|
|
27
|
+
padding-right: 20px;
|
|
28
|
+
min-width: calc(1280px - 8px);
|
|
29
|
+
display: flex;
|
|
30
|
+
align-items: center;
|
|
31
|
+
justify-content: space-between;
|
|
32
|
+
z-index: 11;
|
|
33
|
+
}
|
|
34
|
+
.header-module_header__cv0Px .header-module_headerLeft__MaWm3 {
|
|
35
|
+
display: flex;
|
|
36
|
+
justify-content: flex-start;
|
|
37
|
+
align-items: center;
|
|
38
|
+
height: 100%;
|
|
39
|
+
}
|
|
40
|
+
.header-module_header__cv0Px .header-module_menus__Y-KD- {
|
|
41
|
+
display: flex;
|
|
42
|
+
align-items: center;
|
|
43
|
+
gap: 24px;
|
|
44
|
+
}
|
|
45
|
+
.header-module_header__cv0Px .header-module_menus__Y-KD- .header-module_menuItem__igkBl {
|
|
46
|
+
display: flex;
|
|
47
|
+
align-items: center;
|
|
48
|
+
white-space: nowrap;
|
|
49
|
+
color: var(---fill-0, #fff);
|
|
50
|
+
font-family: 'PingFang SC';
|
|
51
|
+
font-size: 14px;
|
|
52
|
+
font-style: normal;
|
|
53
|
+
font-weight: 400;
|
|
54
|
+
line-height: 24px;
|
|
55
|
+
/* 120% */
|
|
56
|
+
cursor: pointer;
|
|
57
|
+
text-decoration: none;
|
|
58
|
+
}
|
|
59
|
+
.header-module_header__cv0Px .header-module_menus__Y-KD- .header-module_menuItem__igkBl:hover {
|
|
60
|
+
color: rgba(255, 255, 255, 0.75);
|
|
61
|
+
}
|
|
62
|
+
.header-module_header__cv0Px .header-module_menus__Y-KD- .header-module_activeMenuItem__IGmnZ {
|
|
63
|
+
font-weight: 600 !important;
|
|
64
|
+
}
|
|
65
|
+
.header-module_header__cv0Px .header-module_menus__Y-KD- .header-module_lightArena__Y4TUy {
|
|
66
|
+
background: linear-gradient(92deg, rgba(0, 247, 255, 0.3) -10.59%, rgba(153, 224, 255, 0.3) 12.69%, rgba(153, 172, 255, 0.3) 59.11%, rgba(161, 137, 255, 0.3) 105.78%) !important;
|
|
67
|
+
}
|
|
68
|
+
.header-module_header__cv0Px .header-module_menus__Y-KD- .header-module_lightArena__Y4TUy .header-module_arenaText__ChVbe {
|
|
69
|
+
white-space: nowrap;
|
|
70
|
+
font-family: 'Alimama ShuHeiTi';
|
|
71
|
+
font-size: 13px;
|
|
72
|
+
line-height: normal;
|
|
73
|
+
color: var(--Brand1-6, #1b3882);
|
|
74
|
+
}
|
|
75
|
+
.header-module_header__cv0Px .header-module_menus__Y-KD- .header-module_arena__fcdbK {
|
|
76
|
+
cursor: pointer;
|
|
77
|
+
display: flex;
|
|
78
|
+
height: 16px;
|
|
79
|
+
padding: 4px 12px;
|
|
80
|
+
justify-content: center;
|
|
81
|
+
align-items: center;
|
|
82
|
+
border-radius: 32px;
|
|
83
|
+
background: rgba(255, 255, 255, 0.1);
|
|
84
|
+
text-decoration: none;
|
|
85
|
+
}
|
|
86
|
+
.header-module_header__cv0Px .header-module_menus__Y-KD- .header-module_arena__fcdbK .header-module_arenaWords__YvzvB {
|
|
87
|
+
font-family: 'Alimama ShuHeiTi';
|
|
88
|
+
font-size: 13px;
|
|
89
|
+
line-height: normal;
|
|
90
|
+
background: linear-gradient(92deg, #00f7ff -10.59%, #99e0ff 12.69%, #99acff 59.11%, #a189ff 105.78%);
|
|
91
|
+
background-clip: text;
|
|
92
|
+
-webkit-background-clip: text;
|
|
93
|
+
-webkit-text-fill-color: transparent;
|
|
94
|
+
}
|
|
95
|
+
.header-module_header__cv0Px .header-module_menus__Y-KD- .header-module_arena__fcdbK .header-module_arenaArrow__yA9rt {
|
|
96
|
+
position: absolute;
|
|
97
|
+
right: -5px;
|
|
98
|
+
top: -4px;
|
|
99
|
+
width: 20px;
|
|
100
|
+
height: 20px;
|
|
101
|
+
}
|
|
102
|
+
.header-module_header__cv0Px .header-module_headerRight__C1TP2 {
|
|
103
|
+
display: flex;
|
|
104
|
+
justify-content: flex-end;
|
|
105
|
+
align-items: center;
|
|
106
|
+
font-size: 16px;
|
|
107
|
+
color: var(--75-text-dark-4, rgba(255, 255, 255, 0.75));
|
|
108
|
+
}
|
|
109
|
+
.header-module_header__cv0Px .header-module_headerRight__C1TP2 .header-module_github__n7i56 {
|
|
110
|
+
display: flex;
|
|
111
|
+
justify-content: flex-start;
|
|
112
|
+
align-items: center;
|
|
113
|
+
margin-right: 24px;
|
|
114
|
+
cursor: pointer;
|
|
115
|
+
}
|
|
116
|
+
.header-module_header__cv0Px .header-module_headerRight__C1TP2 .header-module_github__n7i56 img {
|
|
117
|
+
margin-right: 4px;
|
|
118
|
+
}
|
|
119
|
+
.header-module_header__cv0Px .header-module_headerRight__C1TP2 .header-module_github__n7i56:hover {
|
|
120
|
+
color: var(--fill-0, #fff);
|
|
121
|
+
}
|
|
122
|
+
.header-module_header__cv0Px .header-module_headerRight__C1TP2 .header-module_lang__OYAoP {
|
|
123
|
+
cursor: pointer;
|
|
124
|
+
margin-right: 24px;
|
|
125
|
+
font-size: 24px;
|
|
126
|
+
color: white;
|
|
127
|
+
}
|
|
128
|
+
.header-module_header__cv0Px .header-module_headerRight__C1TP2 .header-module_addDatasetBtn__IJHz9 {
|
|
129
|
+
font-size: 16px;
|
|
130
|
+
text-align: center;
|
|
131
|
+
border: none;
|
|
132
|
+
padding: 4px 16px;
|
|
133
|
+
transition: all 0.2s;
|
|
134
|
+
white-space: nowrap;
|
|
135
|
+
padding: 3px 16px;
|
|
136
|
+
color: var(---fill-0, #fff);
|
|
137
|
+
font-size: 14px;
|
|
138
|
+
text-decoration: none;
|
|
139
|
+
font-weight: 400;
|
|
140
|
+
line-height: 24px;
|
|
141
|
+
border-radius: 2px;
|
|
142
|
+
border: 1px solid var(---fill-0, #fff);
|
|
143
|
+
margin-left: 8px;
|
|
144
|
+
}
|
|
145
|
+
.header-module_header__cv0Px .header-module_headerRight__C1TP2 .header-module_addDatasetBtn__IJHz9[disabled] {
|
|
146
|
+
cursor: wait;
|
|
147
|
+
opacity: 0.5;
|
|
148
|
+
}
|
|
149
|
+
.header-module_header__cv0Px .header-module_headerRight__C1TP2 .header-module_addDatasetBtn__IJHz9:hover {
|
|
150
|
+
cursor: pointer;
|
|
151
|
+
background: rgba(255, 255, 255, 0.2);
|
|
152
|
+
}
|
|
153
|
+
.header-module_header__cv0Px .header-module_headerRight__C1TP2 .header-module_contributeBtn__T1ok4 {
|
|
154
|
+
padding: 4px 16px;
|
|
155
|
+
border: 0px !important;
|
|
156
|
+
}
|
|
157
|
+
.header-module_header__cv0Px .header-module_headerRight__C1TP2 .header-module_wrapBtn__f7GV2 {
|
|
158
|
+
width: min-content;
|
|
159
|
+
white-space: normal;
|
|
160
|
+
line-height: 21px;
|
|
161
|
+
}
|
|
162
|
+
.header-module_topHeaderBg__uJ8Vy {
|
|
163
|
+
backdrop-filter: blur(10px);
|
|
164
|
+
}
|
|
165
|
+
.header-module_drop__2z-pn .ant-dropdown-menu {
|
|
166
|
+
padding: 4px 24px !important;
|
|
167
|
+
}
|
|
168
|
+
@media screen and (max-width: 1439px) {
|
|
169
|
+
.header-module_enHeader__z6IpW {
|
|
170
|
+
padding-left: 16px !important;
|
|
171
|
+
}
|
|
172
|
+
.header-module_enHeader__z6IpW .header-module_menus__Y-KD- {
|
|
173
|
+
gap: 12px !important;
|
|
174
|
+
white-space: nowrap;
|
|
175
|
+
}
|
|
176
|
+
.header-module_enHeader__z6IpW .header-module_logo__fQW6p {
|
|
177
|
+
margin-right: 12px !important;
|
|
178
|
+
}
|
|
179
|
+
.header-module_enHeader__z6IpW .header-module_contributeBtn__T1ok4 {
|
|
180
|
+
margin-left: -9px !important;
|
|
181
|
+
}
|
|
182
|
+
.header-module_zhHeader__eqSvJ {
|
|
183
|
+
padding-left: 16px !important;
|
|
184
|
+
padding-right: 16px !important;
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
.header-module_noBg__TMnKh {
|
|
188
|
+
background: transparent;
|
|
189
|
+
}
|
|
190
|
+
.header-module_logo__fQW6p {
|
|
191
|
+
height: 36px;
|
|
192
|
+
margin-right: 24px;
|
|
193
|
+
}
|
|
194
|
+
.header-module_logo__fQW6p img {
|
|
195
|
+
height: 36px;
|
|
196
|
+
}
|
|
197
|
+
.header-module_topSecondMenu__vonPJ {
|
|
198
|
+
border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
|
|
199
|
+
border-top: 0px !important;
|
|
200
|
+
background: #192668 !important;
|
|
201
|
+
top: 0px !important;
|
|
202
|
+
}
|
|
203
|
+
.header-module_topSecondMenuHub__J-oal {
|
|
204
|
+
top: 0px !important;
|
|
205
|
+
background-color: #fff !important;
|
|
206
|
+
border-top: 0px !important;
|
|
207
|
+
}
|
|
208
|
+
.header-module_secondMenu__JLSnJ {
|
|
209
|
+
z-index: 9999;
|
|
210
|
+
position: sticky;
|
|
211
|
+
top: 64px;
|
|
212
|
+
border-top: 1px solid rgba(255, 255, 255, 0.1);
|
|
213
|
+
background: rgba(255, 255, 255, 0.03);
|
|
214
|
+
}
|
|
215
|
+
.header-module_lightSecondMenu__ei07C {
|
|
216
|
+
border-bottom: 1px solid var(----line-2, #ebecf0);
|
|
217
|
+
background: rgba(255, 255, 255, 0.35);
|
|
218
|
+
backdrop-filter: blur(2px);
|
|
219
|
+
}
|
|
220
|
+
.header-module_lightSecondMenu__ei07C .header-module_menus__Y-KD- {
|
|
221
|
+
display: flex;
|
|
222
|
+
align-items: center;
|
|
223
|
+
gap: 24px;
|
|
224
|
+
}
|
|
225
|
+
.header-module_lightSecondMenu__ei07C .header-module_menus__Y-KD- .header-module_menuItem__igkBl {
|
|
226
|
+
color: var(--100-text-5, #121316);
|
|
227
|
+
font-family: 'PingFang SC';
|
|
228
|
+
font-size: 14px;
|
|
229
|
+
font-style: normal;
|
|
230
|
+
font-weight: 400;
|
|
231
|
+
line-height: 24px;
|
|
232
|
+
/* 171.429% */
|
|
233
|
+
cursor: pointer;
|
|
234
|
+
text-decoration: none;
|
|
235
|
+
}
|
|
236
|
+
.header-module_lightSecondMenu__ei07C .header-module_menus__Y-KD- .header-module_menuItem__igkBl:hover {
|
|
237
|
+
color: var(--Brand1-5, #36569b);
|
|
238
|
+
}
|
|
239
|
+
.header-module_lightSecondMenu__ei07C .header-module_menus__Y-KD- .header-module_activeMenuItem__IGmnZ {
|
|
240
|
+
font-weight: 600 !important;
|
|
241
|
+
}
|
|
242
|
+
.header-module_lightSecondMenu__ei07C .header-module_addDatasetBtn__IJHz9 {
|
|
243
|
+
font-size: 16px;
|
|
244
|
+
text-align: center;
|
|
245
|
+
border: none;
|
|
246
|
+
padding: 4px 16px;
|
|
247
|
+
transition: all 0.2s;
|
|
248
|
+
white-space: nowrap;
|
|
249
|
+
padding: 3px 16px;
|
|
250
|
+
color: var(--Brand1-6, #1b3882) !important;
|
|
251
|
+
font-size: 14px;
|
|
252
|
+
text-decoration: none;
|
|
253
|
+
font-weight: 400;
|
|
254
|
+
line-height: 24px;
|
|
255
|
+
border-radius: 2px;
|
|
256
|
+
border: 1px solid var(--Brand1-6, #1b3882) !important;
|
|
257
|
+
margin-left: 8px;
|
|
258
|
+
}
|
|
259
|
+
.header-module_lightSecondMenu__ei07C .header-module_addDatasetBtn__IJHz9[disabled] {
|
|
260
|
+
cursor: wait;
|
|
261
|
+
opacity: 0.5;
|
|
262
|
+
}
|
|
263
|
+
.header-module_lightSecondMenu__ei07C .header-module_addDatasetBtn__IJHz9:hover {
|
|
264
|
+
cursor: pointer;
|
|
265
|
+
background: var(--fill-2, #f4f5f9) !important;
|
|
266
|
+
}
|
|
267
|
+
.header-module_lightSecondMenu__ei07C .header-module_contributeBtn__T1ok4 {
|
|
268
|
+
padding: 4px 16px;
|
|
269
|
+
border: 0px !important;
|
|
270
|
+
}
|
|
271
|
+
.header-module_blueBackSecondHeaderBox__DyGHH {
|
|
272
|
+
border-top: 1px solid rgba(255, 255, 255, 0.1);
|
|
273
|
+
background: #0d1a60;
|
|
274
|
+
}
|
|
275
|
+
.header-module_lightBackSecondMenu__MpT6y {
|
|
276
|
+
border-bottom: 1px solid var(----line-2, #ebecf0) !important;
|
|
277
|
+
background: rgba(255, 255, 255, 0.6) !important;
|
|
278
|
+
backdrop-filter: blur(8px) !important;
|
|
279
|
+
}
|
|
280
|
+
.header-module_arenaDropdown__NPfPC {
|
|
281
|
+
z-index: 10000;
|
|
282
|
+
}
|
|
283
|
+
.ant-message {
|
|
284
|
+
z-index: 10002 !important;
|
|
285
|
+
}
|
|
286
|
+
.ant-modal-mask {
|
|
287
|
+
z-index: 10000 !important;
|
|
288
|
+
}
|
|
289
|
+
.ant-modal-wrap {
|
|
290
|
+
z-index: 10001 !important;
|
|
291
|
+
}
|
|
292
|
+
.header-module_yearEvaluation__DHXWs {
|
|
293
|
+
width: min-content;
|
|
294
|
+
white-space: nowrap;
|
|
295
|
+
height: 24px;
|
|
296
|
+
display: flex;
|
|
297
|
+
padding: 0 16px;
|
|
298
|
+
justify-content: center;
|
|
299
|
+
align-items: center;
|
|
300
|
+
gap: 20px;
|
|
301
|
+
border-radius: 20px;
|
|
302
|
+
background: linear-gradient(153.97deg, #A1E9FF 10.42%, #E8F2FF 59.51%, #B183EE 107.83%);
|
|
303
|
+
position: relative;
|
|
304
|
+
}
|
|
305
|
+
.header-module_yearEvaluation__DHXWs:hover {
|
|
306
|
+
cursor: pointer;
|
|
307
|
+
}
|
|
308
|
+
.header-module_yearEvaluation__DHXWs .header-module_innerBtn__W-du8 {
|
|
309
|
+
border-radius: 20px;
|
|
310
|
+
position: absolute;
|
|
311
|
+
width: calc(100% - 2px);
|
|
312
|
+
height: calc(100% - 2px);
|
|
313
|
+
top: 1px;
|
|
314
|
+
left: 1px;
|
|
315
|
+
overflow: hidden;
|
|
316
|
+
background: linear-gradient(87deg, #011a51 -3.03%, #021c46 101.27%);
|
|
317
|
+
}
|
|
318
|
+
.header-module_yearEvaluation__DHXWs .header-module_innerYearEvaluation__o92aJ {
|
|
319
|
+
z-index: 3;
|
|
320
|
+
color: #fefeff;
|
|
321
|
+
leading-trim: both;
|
|
322
|
+
text-edge: cap;
|
|
323
|
+
font-feature-settings: 'liga' off, 'clig' off;
|
|
324
|
+
font-family: 'Alimama ShuHeiTi';
|
|
325
|
+
font-size: 13px;
|
|
326
|
+
font-style: normal;
|
|
327
|
+
font-weight: 700;
|
|
328
|
+
line-height: normal;
|
|
329
|
+
}
|
|
330
|
+
.header-module_yearEvaluation__DHXWs .header-module_wrapStyle__afGSN {
|
|
331
|
+
white-space: normal;
|
|
332
|
+
}
|
|
333
|
+
.header-module_yearEvaluation__DHXWs .header-module_wrapLeftWing__FeQqT {
|
|
334
|
+
position: absolute;
|
|
335
|
+
left: -16.213px;
|
|
336
|
+
top: -19.539px;
|
|
337
|
+
}
|
|
338
|
+
.header-module_yearEvaluation__DHXWs .header-module_wrapRightWing__z8eMG {
|
|
339
|
+
position: absolute;
|
|
340
|
+
right: -25.125px;
|
|
341
|
+
top: -19.539px;
|
|
342
|
+
}
|
|
343
|
+
.header-module_yearEvaluation__DHXWs .header-module_wing__Zhwve {
|
|
344
|
+
z-index: 2;
|
|
345
|
+
display: flex;
|
|
346
|
+
width: 50px;
|
|
347
|
+
height: 47.432px;
|
|
348
|
+
}
|
|
349
|
+
.header-module_yearEvaluation__DHXWs .header-module_leftWing__-wWea {
|
|
350
|
+
position: absolute;
|
|
351
|
+
left: -16.213px;
|
|
352
|
+
top: -19.539px;
|
|
353
|
+
}
|
|
354
|
+
.header-module_yearEvaluation__DHXWs .header-module_rightWing__jGUSq {
|
|
355
|
+
position: absolute;
|
|
356
|
+
right: -17.125px;
|
|
357
|
+
top: -19.539px;
|
|
358
|
+
}
|
|
359
|
+
.header-module_wrapYearEvaluation__jWtHa {
|
|
360
|
+
height: 41px;
|
|
361
|
+
text-align: center;
|
|
362
|
+
}
|
|
363
|
+
.header-module_modalContainer__yabCN {
|
|
364
|
+
text-align: left;
|
|
365
|
+
width: 368px;
|
|
366
|
+
z-index: 9999;
|
|
367
|
+
position: absolute;
|
|
368
|
+
top: 32px;
|
|
369
|
+
left: 50%;
|
|
370
|
+
transform: translateX(-50%);
|
|
371
|
+
border-radius: 4px;
|
|
372
|
+
background: #fff;
|
|
373
|
+
/* \u6295\u5F71/\u8F7B\u6295\u5F71 */
|
|
374
|
+
box-shadow: 0px 4px 12px 2px rgba(18, 19, 22, 0.12);
|
|
375
|
+
display: flex;
|
|
376
|
+
flex-direction: column;
|
|
377
|
+
background-color: #fff;
|
|
378
|
+
gap: 9px;
|
|
379
|
+
white-space: wrap;
|
|
380
|
+
}
|
|
381
|
+
.header-module_modalContainer__yabCN .header-module_title__002Ok {
|
|
382
|
+
padding: 16px 24px 0px 24px;
|
|
383
|
+
color: var(--100-text-5, #121316);
|
|
384
|
+
font-family: 'PingFang SC';
|
|
385
|
+
font-size: 16px;
|
|
386
|
+
font-style: normal;
|
|
387
|
+
font-weight: 600;
|
|
388
|
+
line-height: 24px;
|
|
389
|
+
/* 150% */
|
|
390
|
+
}
|
|
391
|
+
.header-module_modalContainer__yabCN .header-module_body__nmz-A {
|
|
392
|
+
padding: 0px 24px;
|
|
393
|
+
background-color: #fff;
|
|
394
|
+
color: var(--100-text-5, #121316);
|
|
395
|
+
font-feature-settings: 'liga' off, 'clig' off;
|
|
396
|
+
/* \u6B63\u6587/\u5E38\u89C4text-1-regular */
|
|
397
|
+
font-family: 'PingFang SC';
|
|
398
|
+
font-size: 14px;
|
|
399
|
+
font-style: normal;
|
|
400
|
+
font-weight: 400;
|
|
401
|
+
line-height: 21px;
|
|
402
|
+
/* 150% */
|
|
403
|
+
margin-bottom: 7px;
|
|
404
|
+
}
|
|
405
|
+
.header-module_modalContainer__yabCN .header-module_footer__mhfnG {
|
|
406
|
+
height: 52px;
|
|
407
|
+
display: flex;
|
|
408
|
+
justify-content: flex-end;
|
|
409
|
+
padding-right: 24px;
|
|
410
|
+
}
|
|
411
|
+
.header-module_modalContainer__yabCN .header-module_knownButton__rKoZE {
|
|
412
|
+
width: auto;
|
|
413
|
+
height: 36px;
|
|
414
|
+
color: var(--95-text-dark-5, rgba(255, 255, 255, 0.95));
|
|
415
|
+
font-size: 12px;
|
|
416
|
+
font-weight: 400;
|
|
417
|
+
line-height: 36px;
|
|
418
|
+
padding: 0 16px;
|
|
419
|
+
}
|
|
420
|
+
.header-module_arrow__thsPc {
|
|
421
|
+
z-index: 5;
|
|
422
|
+
position: absolute;
|
|
423
|
+
top: 15px;
|
|
424
|
+
left: 50%;
|
|
425
|
+
transform: translateX(-50%);
|
|
426
|
+
width: 48px;
|
|
427
|
+
}
|
|
428
|
+
.header-module_wrapArrow__79bl6 {
|
|
429
|
+
top: 32px;
|
|
430
|
+
}
|
|
431
|
+
.header-module_wrapModalContainer__z-II7 {
|
|
432
|
+
top: 49px;
|
|
433
|
+
}
|
|
434
|
+
`,a={button:"header-module_button__IQokx",drop:"header-module_drop__2z-pn",topHeaderBg:"header-module_topHeaderBg__uJ8Vy",header:"header-module_header__cv0Px",headerLeft:"header-module_headerLeft__MaWm3",menus:"header-module_menus__Y-KD-",menuItem:"header-module_menuItem__igkBl",activeMenuItem:"header-module_activeMenuItem__IGmnZ",lightArena:"header-module_lightArena__Y4TUy",arenaText:"header-module_arenaText__ChVbe",arena:"header-module_arena__fcdbK",arenaWords:"header-module_arenaWords__YvzvB",arenaArrow:"header-module_arenaArrow__yA9rt",headerRight:"header-module_headerRight__C1TP2",github:"header-module_github__n7i56",lang:"header-module_lang__OYAoP",addDatasetBtn:"header-module_addDatasetBtn__IJHz9",contributeBtn:"header-module_contributeBtn__T1ok4",wrapBtn:"header-module_wrapBtn__f7GV2",enHeader:"header-module_enHeader__z6IpW",logo:"header-module_logo__fQW6p",zhHeader:"header-module_zhHeader__eqSvJ",noBg:"header-module_noBg__TMnKh",topSecondMenu:"header-module_topSecondMenu__vonPJ",topSecondMenuHub:"header-module_topSecondMenuHub__J-oal",secondMenu:"header-module_secondMenu__JLSnJ",lightSecondMenu:"header-module_lightSecondMenu__ei07C",blueBackSecondHeaderBox:"header-module_blueBackSecondHeaderBox__DyGHH",lightBackSecondMenu:"header-module_lightBackSecondMenu__MpT6y",arenaDropdown:"header-module_arenaDropdown__NPfPC",yearEvaluation:"header-module_yearEvaluation__DHXWs",innerBtn:"header-module_innerBtn__W-du8",innerYearEvaluation:"header-module_innerYearEvaluation__o92aJ",wrapStyle:"header-module_wrapStyle__afGSN",wrapLeftWing:"header-module_wrapLeftWing__FeQqT",wrapRightWing:"header-module_wrapRightWing__z8eMG",wing:"header-module_wing__Zhwve",leftWing:"header-module_leftWing__-wWea",rightWing:"header-module_rightWing__jGUSq",wrapYearEvaluation:"header-module_wrapYearEvaluation__jWtHa",modalContainer:"header-module_modalContainer__yabCN",title:"header-module_title__002Ok",body:"header-module_body__nmz-A",footer:"header-module_footer__mhfnG",knownButton:"header-module_knownButton__rKoZE",arrow:"header-module_arrow__thsPc",wrapArrow:"header-module_wrapArrow__79bl6",wrapModalContainer:"header-module_wrapModalContainer__z-II7"};e(n);export{a as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{useContext as n,useState as p,useEffect as r}from"react";import{OcConfigContext as a}from"../../../providers/OcConfigContext.js";import"../../../providers/OcContext.js";import"antd";import"classnames";import"../firstHeader.module.less.js";import"../../../extraComponents/icon-font/index.js";import"../secondHeader.js";import"react-router-dom";import"@ant-design/icons";import{envTypeEnum as s}from"../../../constants/enums.js";import"../../../mobile/components/top-nav/top-nav.module.less.js";import"../../top-nav/shared.js";import"../../top-nav/top-nav.module.less.js";import"react-device-detect";import"../components/create-online-evaluation/component/evaluation-button/evaluation-button.module.less.js";import"../components/create-online-evaluation/component/create-evaluation/create-evaluation.js";import"../components/create-online-evaluation/component/pre-create-evaluation/index.module.less.js";import"../../side-nav/side-nav.module.less.js";import"../../footer/footer.module.less.js";import"../../dropdown/dropdown.module.less.js";import"ahooks";import"../../footer-expansion/footer-expansion.module.less.js";import"../../md-render/index.js";import"../../../helper/index.js";const c=()=>{const{config:o}=n(a),[e,t]=p();return r(()=>{(o==null?void 0:o.envType)===s.development?t({VITE_SSO_URL:"https://sso.dev.openxlab.org.cn",VITE_COMPASS_URL:"http://dev.opencompass.org.cn/",VITE_RANK_URL:"http://rank.dev.opencompass.org.cn",VITE_HUB_URL:"http://hub.dev.opencompass.org.cn",VITE_DOC_URL:"http://doc.dev.opencompass.org.cn",VITE_DOC_URL_ZH:"http://doc.dev.opencompass.org.cn/zh_CN/",VITE_DATA_URL:"http://collaboration.dev.opencompass.org.cn",VITE_SPECIAL_LIST_URL:"https://specialist.dev.opencompass.org.cn/"}):(o==null?void 0:o.envType)===s.staging?t({VITE_COMPASS_URL:"https://staging.opencompass.org.cn/",VITE_RANK_URL:"https://rank.staging.opencompass.org.cn",VITE_HUB_URL:"https://hub.staging.opencompass.org.cn",VITE_SSO_URL:"https://sso.staging.openxlab.org.cn",VITE_DOC_URL:"https://doc.staging.opencompass.org.cn",VITE_DOC_URL_ZH:"http://doc.staging.opencompass.org.cn/zh_CN/",VITE_DATA_URL:"https://collaboration.staging.opencompass.org.cn",VITE_SPECIAL_LIST_URL:"https://specialist.staging.opencompass.org.cn/"}):t({VITE_COMPASS_URL:"https://opencompass.org.cn/",VITE_RANK_URL:"https://rank.opencompass.org.cn",VITE_HUB_URL:"https://hub.opencompass.org.cn",VITE_SSO_URL:"https://sso.openxlab.org.cn",VITE_DOC_URL:"https://doc.opencompass.org.cn",VITE_DOC_URL_ZH:"https://doc.opencompass.org.cn/zh_CN/",VITE_DATA_URL:"https://collaboration.opencompass.org.cn",VITE_SPECIAL_LIST_URL:"https://specialist.opencompass.org.cn/"})},[o.envType]),{urls:e}};export{c as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import m from"../../providers/OcContext.js";import p from"../../providers/OcConfigContext.js";import i from"./header.js";import{ConfigProvider as c}from"antd";import o from"react";var l=Object.defineProperty,n=Object.getOwnPropertySymbols,f=Object.prototype.hasOwnProperty,s=Object.prototype.propertyIsEnumerable,a=(t,r,e)=>r in t?l(t,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[r]=e,d=(t,r)=>{for(var e in r||(r={}))f.call(r,e)&&a(t,e,r[e]);if(n)for(var e of n(r))s.call(r,e)&&a(t,e,r[e]);return t};const O=t=>o.createElement(p,null,o.createElement(m,null,o.createElement(c,{theme:{components:{}}},o.createElement(i,d({},t)))));export{O as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import n,{useContext as A,useState as I,useRef as B,useEffect as L,useMemo as g}from"react";import{Dropdown as D}from"antd";import V from"../../extraComponents/button/button.js";import{goCommon as W,goHub as x,goRank as M,goRules as O,goKit as H,goData as z,goOCHome as P,clickArena as K,goAnnualBenchmark as F,clickContributeBenchmarks as Y}from"../../google-log/home.js";import t from"./header.module.less.js";import G from"./components/create-online-evaluation/component/evaluation-button/evaluation-button.js";import"./components/create-online-evaluation/component/create-evaluation/create-evaluation.js";import"./components/create-online-evaluation/component/pre-create-evaluation/index.module.less.js";import{OcContext as Z}from"../../providers/OcContext.js";import q from"./hooks/useUrl.js";import{OcConfigContext as J}from"../../providers/OcConfigContext.js";import r from"classnames";import"./firstHeader.module.less.js";import Q from"../../assets/svg/newLogo.svg.js";import X from"../../assets/svg/newLogoEn.svg.js";import ee from"../../extraComponents/icon-font/index.js";import te from"../../assets/svg/blueNewLogo.svg.js";import ne from"../../assets/svg/blueNewLogoEn.svg.js";import{useLocation as oe}from"react-router-dom";import"@ant-design/icons";import{webTypeEnum as u}from"../../constants/enums.js";import"../../mobile/components/top-nav/top-nav.module.less.js";import"../top-nav/shared.js";import"../top-nav/top-nav.module.less.js";import"react-device-detect";import"../side-nav/side-nav.module.less.js";import"../footer/footer.module.less.js";import"../dropdown/dropdown.module.less.js";import{useSize as ae}from"ahooks";import"../footer-expansion/footer-expansion.module.less.js";import"../md-render/index.js";import"../../helper/index.js";import"./components/create-online-evaluation/component/sidebar/sidebar.module.less.js";import le from"../../assets/svg/left-wing.svg.js";import re from"../../assets/svg/right-wing.svg.js";import se from"../../assets/svg/arrow.svg.js";var f;(function(s){s.llm="large-model",s.aiComputingSystem="computing-system",s.embodiedIntelligence="embodied-intelligence",s.industryVerticals="ecosystem/finance",s.safety="safety",s.safetyRank="safety-rank",s.rankDetail="safety/rank",s.evaluationPlan="evaluation-plan"})(f||(f={}));const R="YearEvaluationNotion",ie=s=>{const{webType:i,navMenuList:h,isLLM:v,isTop:E,isScrollDown:c}=s,{locales:a}=A(Z),{config:U}=A(J),[m,p]=I(!1),[w,C]=I(!1),{urls:e}=q(),{pathname:_}=oe(),{locale:l}=U,k=B(),d=ae(k);L(()=>{if(l==="zh-CN"){p(!1);return}c?(d==null?void 0:d.width)<1665?p(!0):p(!1):(d==null?void 0:d.width)<1464?p(!0):p(!1)},[d==null?void 0:d.width,c,l]);const S=g(()=>Array.isArray(h)&&h.length>0?h:[{title:{zh:"\u9879\u76EE\u4ECB\u7ECD",en:"Introduction"},key:"largeModel",href:`${e==null?void 0:e.VITE_COMPASS_URL}${f.llm}`,onClick:W,isActive:_.startsWith(f.llm)},{title:{zh:"\u8BC4\u6D4B\u96C6\u793E\u533A",en:"CompassHub"},key:"CompassHub",href:e==null?void 0:e.VITE_HUB_URL,onClick:x,isActive:location.href.startsWith(e==null?void 0:e.VITE_HUB_URL)},{title:{zh:"\u8BC4\u6D4B\u699C\u5355",en:"CompassRank"},key:"CompassRank",href:e==null?void 0:e.VITE_RANK_URL,onClick:M,isActive:location.href.startsWith(e==null?void 0:e.VITE_RANK_URL)||location.href.startsWith(e==null?void 0:e.VITE_SPECIAL_LIST_URL)},{title:{zh:"\u699C\u5355\u89C4\u5219",en:"Rules"},key:"Rules",href:`${e==null?void 0:e.VITE_COMPASS_URL}`,onClick:O,isActive:location.href.startsWith(`${e==null?void 0:e.VITE_COMPASS_URL}rule`)},{title:{zh:"\u8BC4\u6D4B\u5DE5\u5177",en:"CompassKit"},key:"CompassKit",isExternal:!0,href:{zh:"https://github.com/open-compass/",en:"https://github.com/open-compass/"},onClick:H,isActive:!1},{title:{zh:"\u4F7F\u7528\u6307\u5357",en:"Docs"},key:"Docs",isExternal:!0,href:{zh:`${e==null?void 0:e.VITE_DOC_URL_ZH}`,en:`${e==null?void 0:e.VITE_DOC_URL}`},isActive:location.href.startsWith(e==null?void 0:e.VITE_DOC_URL)},{title:{zh:"\u6D66\u6C5F\u79D1\u5B66\u8BC4\u6D4B\u5171\u521B\u8BA1\u5212",en:"AI4S Program"},key:"collaboration",href:`${e==null?void 0:e.VITE_DATA_URL}`,onClick:z,isActive:location.href.startsWith(e==null?void 0:e.VITE_DATA_URL)}],[e,_,h,location.href]),N=g(()=>i===u.blueWeb||i===u.miniWeb||i===u.transparentWeb?l==="en-US"?X:Q:l==="en-US"?ne:te,[i,l]),T=o=>{window.open(o)},$=g(()=>[{key:"llm",label:n.createElement("a",{href:`${e==null?void 0:e.VITE_COMPASS_URL}arena?lang=${l}`},a==null?void 0:a.llmArena)},{key:"mm",label:n.createElement("a",{href:`${e==null?void 0:e.VITE_COMPASS_URL}arena/multimodal?lang=${l}`},a==null?void 0:a.mmArena)},{key:"tcm",label:n.createElement("a",{href:`${e==null?void 0:e.VITE_COMPASS_URL}arena/task?lang=${l}`},a==null?void 0:a.ArenaMode)}],[a==null?void 0:a.llmArena,a==null?void 0:a.mmArena,l,e]);return L(()=>{!v||!localStorage.getItem(`${R}`)&&location.href.startsWith(e==null?void 0:e.VITE_HUB_URL)&&(C(!1),localStorage.setItem(`${R}`,"1"))},[v,e]),n.createElement("header",{className:r(t.header,l==="en-US"&&c&&t.enHeader,t.secondMenu,l!=="en-US"&&c&&t.zhHeader,i!==u.lightWeb&&c&&t.topSecondMenu,i===u.lightWeb&&c&&t.topSecondMenuHub,i===u.lightWeb&&t.lightSecondMenu,i===u.transparentWeb&&!E&&!c&&t.blueBackSecondHeaderBox,i===u.lightWeb&&!E&&!c&&t.lightBackSecondMenu),ref:k},n.createElement("div",{className:t.headerLeft},c&&n.createElement("a",{className:t.logo,href:`${e==null?void 0:e.VITE_COMPASS_URL}?lang=${l}`,onClick:o=>{o.preventDefault(),P(l,"header",e==null?void 0:e.VITE_COMPASS_URL)}},n.createElement("img",{src:N,alt:"logo"})),n.createElement("div",{className:t.menus},S==null?void 0:S.map(o=>n.createElement("a",{key:o.key,className:r(t.menuItem,o.isActive&&t.activeMenuItem),style:{fontWeight:o.href===window.location.origin?600:400},target:o.isExternal?"_blank":"_self",href:`${o.href}${o.isExternal?"":`?lang=${l}`}`,rel:"noreferrer",onClick:j=>{var b,y;j.preventDefault(),o.isExternal?T(l==="zh-CN"?`${(b=o.href)==null?void 0:b.zh}`:`${(y=o.href)==null?void 0:y.en}`):o.onClick&&o.onClick(l,o.key,o.href)}},(o==null?void 0:o.customNode)&&(o==null?void 0:o.customNode),o.title[l==null?void 0:l.split("-")[0]],o.isExternal&&n.createElement(ee,{type:"icon-GotoOutline",style:{marginLeft:4,fontSize:"16px"}}))),v&&n.createElement(n.Fragment,null,n.createElement(D,{overlayClassName:t.arenaDropdown,placement:"bottom",menu:{items:$}},n.createElement("a",{className:r(t.menuItem,location.href.startsWith((e==null?void 0:e.VITE_COMPASS_URL)+"arena")&&t.activeMenuItem),href:`${e==null?void 0:e.VITE_COMPASS_URL}arena?lang=${l}`,onClick:o=>{o.preventDefault(),K(l,{key:"llm"},e==null?void 0:e.VITE_COMPASS_URL)}},n.createElement("div",{className:t.arenaWords},a==null?void 0:a.arena)))),v&&n.createElement("div",{onClick:()=>{F(l,"CompassHub",`${e==null?void 0:e.VITE_HUB_URL}/2025-annual-benchmark`)},className:r(t.yearEvaluation,m&&t.wrapYearEvaluation)},n.createElement("div",{className:t.innerBtn},n.createElement("img",{src:le,className:r(m?t.wrapLeftWing:t.leftWing,t.wing)}),n.createElement("img",{src:re,className:r(m?t.wrapRightWing:t.rightWing,t.wing)})),n.createElement("div",{className:r(m&&t.wrapStyle,t.innerYearEvaluation)},a==null?void 0:a.yearEvaluation),w&&n.createElement(n.Fragment,null,n.createElement("img",{src:se,className:r(m&&t.wrapArrow,t.arrow)}),n.createElement("div",{className:r(m&&t.wrapModalContainer,t.modalContainer)},n.createElement("span",{className:t.title},a==null?void 0:a.yearEvaluationTitle),n.createElement("div",{className:t.body},a==null?void 0:a.yearEvaluationDesc),n.createElement("div",{className:t.footer},n.createElement(V,{className:t.knownButton,type:"primary",onClick:o=>{o.stopPropagation(),C(!1)}},a==null?void 0:a.yearEvaluationKnown))))))),v&&n.createElement("div",{className:t.headerRight},n.createElement("a",{href:`${e==null?void 0:e.VITE_HUB_URL}/dataset-submit?lang=${l}`,className:r(t.addDatasetBtn,t.contributeBtn,m&&t.wrapBtn),onClick:o=>{o.preventDefault(),Y(l,e==null?void 0:e.VITE_HUB_URL)}},a==null?void 0:a.contributeBenchmarks),n.createElement(G,null,n.createElement("div",{className:r(m&&t.wrapBtn,t.addDatasetBtn)},a==null?void 0:a.onlineEvaluation))))};export{f as BigCompassModuleEnum,ie as default};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import i,{memo as h,useState as M,useEffect as p}from"react";import A from"react-markdown";import{Prism as C}from"react-syntax-highlighter";import g from"remark-math";import P from"rehype-katex";import S from"remark-gfm";import u from"./index.module.less.js";import v from"classnames";import{coy as H}from"react-syntax-highlighter/dist/esm/styles/prism";import $ from"remark-breaks";import{isOldSafari as j}from"../../utils/utils.js";var I=Object.defineProperty,d=Object.getOwnPropertySymbols,y=Object.prototype.hasOwnProperty,k=Object.prototype.propertyIsEnumerable,b=(t,a,l)=>a in t?I(t,a,{enumerable:!0,configurable:!0,writable:!0,value:l}):t[a]=l,E=(t,a)=>{for(var l in a||(a={}))y.call(a,l)&&b(t,l,a[l]);if(d)for(var l of d(a))k.call(a,l)&&b(t,l,a[l]);return t},w=(t,a)=>{var l={};for(var o in t)y.call(t,o)&&a.indexOf(o)<0&&(l[o]=t[o]);if(t!=null&&d)for(var o of d(t))a.indexOf(o)<0&&k.call(t,o)&&(l[o]=t[o]);return l};const _=h(t=>i.createElement("div",{className:v(u.codeOperationHeader)},i.createElement("div",{className:u.iconWithText},t.codeLanguage)));_.displayName="HighlightHeader";const R=t=>{const[a,l]=M(""),o=e=>(e==null?void 0:e.length)>0&&(e==null?void 0:e.replaceAll)?e==null?void 0:e.replaceAll("\uFFFD",""):"",x=e=>(e==null?void 0:e.length)>0&&e.replace?e.replace(/(\$\$)(\$\$)/g,"$1 $2"):"";function F(e){const n=/\$+[^$]+\$+/g,r=e.split(n),c=e.match(n)||[],s=[];for(let m=0;m<r.length;m++)s.push(r[m]),m<c.length&&s.push(c[m]);return s}const N=e=>{const n=/\$(.*?)\$/g,r=/\$\$(.*?)\$\$/gs,c=[];let s;for(;(s=n.exec(e))!==null;)s[1]&&c.push(s[1]);for(;(s=r.exec(e))!==null;)s[1]&&c.push(s[1]);return c},O=e=>{var n,r;return(r=(n=e==null?void 0:e.replaceAll("\\(","$$"))==null?void 0:n.replaceAll("\\)","$$"))==null?void 0:r.replaceAll(/\\\[([\s\S]*?)\\\]/g,"$$$1$$")};return p(()=>{const e=o(t.message),n=O(e),r=x(n),c=F(r);let s=r;c&&c.length>0&&(s=c.map(f=>f.startsWith("$$")&&f.endsWith("$$")?`
|
|
2
|
+
$$
|
|
3
|
+
${N(f)}
|
|
4
|
+
$$
|
|
5
|
+
`:f).join("")),l(s)},[t.message]),p(()=>{if(typeof window!="undefined"&&window.document){const e="https://static.openxlab.org.cn/oc-webkit/katex/katex/dist/katex.min.css",n=document.getElementsByTagName("head")[0],r=document.createElement("link");r.setAttribute("rel","stylesheet"),r.setAttribute("type","text/css"),r.setAttribute("href",e),r.setAttribute("integrity","sha384-3UiQGuEI4TTMaFmGIZumfRPtfKQ3trwQE2JgosJxCnGmQpL/lJdjpcHkaaFwHlcI"),r.setAttribute("crossorigin","anonymous"),n.appendChild(r)}},[]),i.createElement("div",{className:u.container},i.createElement(A,{components:{code:e=>{var n=e,{children:r="",className:c}=n,s=w(n,["children","className"]);if(r.indexOf(`
|
|
6
|
+
`)<0)return i.createElement("div",{className:u.beautifulCodeBox},i.createElement("span",{className:u.beautifulCode},r));{const m=/language-(\w+)/.exec(c||"");return i.createElement(i.Fragment,null,i.createElement(_,{codeLanguage:(m==null?void 0:m[1])||"",text:r}),i.createElement(C,E({style:H,language:(m==null?void 0:m[1])||"python",PreTag:"div",className:v(u.syntaxHightWrapper)},s),r))}},table:e=>{var n=w(e,[]);return i.createElement("div",{className:u.tableContainer},i.createElement("table",E({},n)))},a:e=>i.createElement("a",{href:e.href,target:"_blank",rel:"noreferrer"},e.children),img:e=>(t==null?void 0:t.baseImgUrl)?i.createElement("img",{src:`${t==null?void 0:t.baseImgUrl}${e.src}`,alt:(e==null?void 0:e.alt)||""}):i.createElement("img",{src:e==null?void 0:e.src,alt:(e==null?void 0:e.alt)||""})},remarkPlugins:j()?[g,$]:[S,g,$],rehypePlugins:[P]},o(a)))};var U=h(R);export{U as default};
|