@xcpcio/board-app 0.66.2 → 0.67.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/dist/404.html +1 -1
- package/dist/assets/{Balloon.vue_vue_type_script_setup_true_lang-Cd-QNnDt.js → Balloon.vue_vue_type_script_setup_true_lang-DfFF1Ks0.js} +1 -1
- package/dist/assets/{Board-sX3HmCh3.js → Board-3MaXb78m.js} +100 -100
- package/dist/assets/{Board-CG69kAf7.css → Board-G4heBgt6.css} +1 -1
- package/dist/assets/{ContestStateBadge-Cad99MQ4.js → ContestStateBadge-Dx5wEApj.js} +1 -1
- package/dist/assets/{Countdown-Dhia-u0Y.js → Countdown-Bl6KQRW4.js} +1 -1
- package/dist/assets/{DataSourceInput.vue_vue_type_script_setup_true_lang-DVWnGqx-.js → DataSourceInput.vue_vue_type_script_setup_true_lang-DHdSK4c6.js} +1 -1
- package/dist/assets/{Footer-BWV6CMUR.js → Footer-Bg_bSWjB.js} +1 -1
- package/dist/assets/{NavBar-CVNz1--5.js → NavBar-cB_AhYzY.js} +1 -1
- package/dist/assets/{Resolver-Cu-OKY1L.js → Resolver-CcJz6DBo.js} +1 -1
- package/dist/assets/{RightArrowIcon-ClzV1Z1J.js → RightArrowIcon-DaCeCqSH.js} +1 -1
- package/dist/assets/{TheInput.vue_vue_type_script_setup_true_lang-C21qO8yZ.js → TheInput.vue_vue_type_script_setup_true_lang-B8H-RmO4.js} +1 -1
- package/dist/assets/{Tooltip.vue_vue_type_script_setup_true_lang-D8Y2xuKM.js → Tooltip.vue_vue_type_script_setup_true_lang-CrvtqC16.js} +1 -1
- package/dist/assets/{_...all_-DJwQ4yj4.js → _...all_-CT8hHVGU.js} +1 -1
- package/dist/assets/{_...all_-D0bkV7XM.js → _...all_-DZI0_2zk.js} +1 -1
- package/dist/assets/{_name_-CNK60UTb.js → _name_-DjTA6573.js} +1 -1
- package/dist/assets/{about-Cz2BvibQ.js → about-jasx0wKW.js} +1 -1
- package/dist/assets/board-WB70DN-I.js +1 -0
- package/dist/assets/{board-layout-DciCGZEs.js → board-layout-DPzrecxe.js} +1 -1
- package/dist/assets/{constant-BWnqIcmY.js → constant-zXGoeSUs.js} +1 -1
- package/dist/assets/{contest-CgNGJetR.js → contest-BrTkYMuZ.js} +1 -1
- package/dist/assets/{dayjs-Dk3pur30.js → dayjs-ErfWoYIs.js} +1 -1
- package/dist/assets/{default-C691w98Q.js → default-Dn8tKbdq.js} +1 -1
- package/dist/assets/en-DYzJz2c1.js +1 -0
- package/dist/assets/{headless-CORlMDXV.js → headless-CRpCRK1t.js} +1 -1
- package/dist/assets/{home-hTEr1TJm.js → home-CQBa08cQ.js} +1 -1
- package/dist/assets/{index-BiwUz1KO.css → index-BGJAeisZ.css} +1 -1
- package/dist/assets/{index-9_oqoLcR.js → index-BhjhJlKm.js} +5 -5
- package/dist/assets/{index-B4yWQlcU.js → index-D1ZL4-kn.js} +1 -1
- package/dist/assets/index-D2yB4w8u.js +1 -0
- package/dist/assets/{index-mCQ-iQmf.js → index-DePS8wRD.js} +1 -1
- package/dist/assets/index-DrRCpPOR.js +1 -0
- package/dist/assets/{index-D6pv9dGi.js → index-k7I8Lr2-.js} +1 -1
- package/dist/assets/{index-layout-CnsXfFdQ.js → index-layout-D5b_XfR0.js} +1 -1
- package/dist/assets/{pagination-DnhQ5r1u.js → pagination-R1BztuTi.js} +1 -1
- package/dist/assets/{person-U3tcpMKk.js → person-C-v09Xnw.js} +1 -1
- package/dist/assets/{query-CDfDbkZE.js → query-Ci5JHK5f.js} +1 -1
- package/dist/assets/rank-CzDyEdMa.js +1 -0
- package/dist/assets/{test-Cflk2EUV.js → test-e-qOmGRY.js} +1 -1
- package/dist/assets/{use-vmodel-Bl_BJeQo.js → use-vmodel-B41hlwAY.js} +1 -1
- package/dist/assets/{user-LgM0y5TK.js → user-Ht_z1r54.js} +1 -1
- package/dist/assets/{virtual_pwa-register-72WHXVVX.js → virtual_pwa-register-ddBGe6v9.js} +1 -1
- package/dist/assets/zh-CN-Cbd_t3aN.js +1 -0
- package/dist/index.html +1 -1
- package/dist/sw.js +1 -1
- package/package.json +3 -3
- package/src/components/board/Badge.vue +1 -1
- package/src/components/board/Standings.vue +1 -1
- package/src/components/board/TeamInfo.vue +116 -0
- package/src/components/board/TeamInfoModal.vue +16 -13
- package/src/components/board/TeamUI.vue +2 -1
- package/src/components.d.ts +1 -0
- package/dist/assets/board-CAZpPFLb.js +0 -1
- package/dist/assets/en-78xzu5B_.js +0 -1
- package/dist/assets/index-BX3T_nMP.js +0 -1
- package/dist/assets/index-DncwAlQA.js +0 -1
- package/dist/assets/rank-B4f6mi_k.js +0 -1
- package/dist/assets/zh-CN-32UqCzRy.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{I as n}from"./dayjs-
|
|
1
|
+
import{I as n}from"./dayjs-ErfWoYIs.js";class e{constructor(r){this.name=r??new n}toIPerson(){return{name:this.name.toI18NStringSet(),cf_id:this.cfID,icpc_id:this.icpcID}}static fromIPerson(r){const c=new e;return c.name=n.fromIText(r.name),c.cfID=r.cf_id,c.icpcID=r.icpc_id,c}}function m(t){if(!t)return[];if(typeof t=="string"){for(const r of" ,、|")if(t.includes(r))return t.split(r).map(c=>new e(n.fromIText(c)));return[new e(n.fromIText(t))]}return Array.isArray(t)?t.length>0&&typeof t[0]=="object"&&"name"in t[0]?t.map(r=>e.fromIPerson(r)):t.map(r=>new e(n.fromIText(r))):[new e(n.fromIText(t))]}export{e as P,m as c};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a5 as V,a6 as j,a7 as d,a8 as D,a9 as w,aa as z,ab as k,ac as M,ad as H,ae as T,af as K,ag as G,ah as L,ai as Y,aj as J,ak as X,al as Z,f as W,am as q,an as tt,ao as et,C as Q,ap as $,aq as st,ar as A,as as it,at as nt,au as rt}from"./index-
|
|
1
|
+
import{a5 as V,a6 as j,a7 as d,a8 as D,a9 as w,aa as z,ab as k,ac as M,ad as H,ae as T,af as K,ag as G,ah as L,ai as Y,aj as J,ak as X,al as Z,f as W,am as q,an as tt,ao as et,C as Q,ap as $,aq as st,ar as A,as as it,at as nt,au as rt}from"./index-BhjhJlKm.js";import{b as at}from"./constant-zXGoeSUs.js";import{u as B}from"./contest-BrTkYMuZ.js";var ot=class extends V{constructor(t,e){super(),this.options=e,this.#s=t,this.#n=null,this.#i=j(),this.bindMethods(),this.setOptions(e)}#s;#t=void 0;#p=void 0;#e=void 0;#a;#l;#i;#n;#b;#c;#f;#o;#h;#r;#d=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),_(this.#t,this.options)?this.#u():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return U(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return U(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#g(),this.#O(),this.#t.removeObserver(this)}setOptions(t){const e=this.options,i=this.#t;if(this.options=this.#s.defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof d(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#w(),this.#t.setOptions(this.options),e._defaulted&&!D(this.options,e)&&this.#s.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const s=this.hasListeners();s&&N(this.#t,i,this.options,e)&&this.#u(),this.updateResult(),s&&(this.#t!==i||d(this.options.enabled,this.#t)!==d(e.enabled,this.#t)||w(this.options.staleTime,this.#t)!==w(e.staleTime,this.#t))&&this.#v();const n=this.#m();s&&(this.#t!==i||d(this.options.enabled,this.#t)!==d(e.enabled,this.#t)||n!==this.#r)&&this.#R(n)}getOptimisticResult(t){const e=this.#s.getQueryCache().build(this.#s,t),i=this.createResult(e,t);return ut(this,i)&&(this.#e=i,this.#l=this.options,this.#a=this.#t.state),i}getCurrentResult(){return this.#e}trackResult(t,e){return new Proxy(t,{get:(i,s)=>(this.trackProp(s),e?.(s),s==="promise"&&!this.options.experimental_prefetchInRender&&this.#i.status==="pending"&&this.#i.reject(new Error("experimental_prefetchInRender feature flag is not enabled")),Reflect.get(i,s))})}trackProp(t){this.#d.add(t)}getCurrentQuery(){return this.#t}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const e=this.#s.defaultQueryOptions(t),i=this.#s.getQueryCache().build(this.#s,e);return i.fetch().then(()=>this.createResult(i,e))}fetch(t){return this.#u({...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#e))}#u(t){this.#w();let e=this.#t.fetch(this.options,t);return t?.throwOnError||(e=e.catch(z)),e}#v(){this.#g();const t=w(this.options.staleTime,this.#t);if(k||this.#e.isStale||!M(t))return;const i=H(this.#e.dataUpdatedAt,t)+1;this.#o=T.setTimeout(()=>{this.#e.isStale||this.updateResult()},i)}#m(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#R(t){this.#O(),this.#r=t,!(k||d(this.options.enabled,this.#t)===!1||!M(this.#r)||this.#r===0)&&(this.#h=T.setInterval(()=>{(this.options.refetchIntervalInBackground||K.isFocused())&&this.#u()},this.#r))}#y(){this.#v(),this.#R(this.#m())}#g(){this.#o&&(T.clearTimeout(this.#o),this.#o=void 0)}#O(){this.#h&&(T.clearInterval(this.#h),this.#h=void 0)}createResult(t,e){const i=this.#t,s=this.options,n=this.#e,a=this.#a,u=this.#l,v=t!==i?t.state:this.#p,{state:g}=t;let r={...g},S=!1,h;if(e._optimisticResults){const c=this.hasListeners(),C=!c&&_(t,e),y=c&&N(t,i,e,s);(C||y)&&(r={...r,...G(g.data,t.options)}),e._optimisticResults==="isRestoring"&&(r.fetchStatus="idle")}let{error:o,errorUpdatedAt:b,status:f}=r;h=r.data;let O=!1;if(e.placeholderData!==void 0&&h===void 0&&f==="pending"){let c;n?.isPlaceholderData&&e.placeholderData===u?.placeholderData?(c=n.data,O=!0):c=typeof e.placeholderData=="function"?e.placeholderData(this.#f?.state.data,this.#f):e.placeholderData,c!==void 0&&(f="success",h=L(n?.data,c,e),S=!0)}if(e.select&&h!==void 0&&!O)if(n&&h===a?.data&&e.select===this.#b)h=this.#c;else try{this.#b=e.select,h=e.select(h),h=L(n?.data,h,e),this.#c=h,this.#n=null}catch(c){this.#n=c}this.#n&&(o=this.#n,h=this.#c,b=Date.now(),f="error");const m=r.fetchStatus==="fetching",R=f==="pending",E=f==="error",P=R&&m,x=h!==void 0,p={status:f,fetchStatus:r.fetchStatus,isPending:R,isSuccess:f==="success",isError:E,isInitialLoading:P,isLoading:P,data:h,dataUpdatedAt:r.dataUpdatedAt,error:o,errorUpdatedAt:b,failureCount:r.fetchFailureCount,failureReason:r.fetchFailureReason,errorUpdateCount:r.errorUpdateCount,isFetched:r.dataUpdateCount>0||r.errorUpdateCount>0,isFetchedAfterMount:r.dataUpdateCount>v.dataUpdateCount||r.errorUpdateCount>v.errorUpdateCount,isFetching:m,isRefetching:m&&!R,isLoadingError:E&&!x,isPaused:r.fetchStatus==="paused",isPlaceholderData:S,isRefetchError:E&&x,isStale:F(t,e),refetch:this.refetch,promise:this.#i,isEnabled:d(e.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const c=I=>{p.status==="error"?I.reject(p.error):p.data!==void 0&&I.resolve(p.data)},C=()=>{const I=this.#i=p.promise=j();c(I)},y=this.#i;switch(y.status){case"pending":t.queryHash===i.queryHash&&c(y);break;case"fulfilled":(p.status==="error"||p.data!==y.value)&&C();break;case"rejected":(p.status!=="error"||p.error!==y.reason)&&C();break}}return p}updateResult(){const t=this.#e,e=this.createResult(this.#t,this.options);if(this.#a=this.#t.state,this.#l=this.options,this.#a.data!==void 0&&(this.#f=this.#t),D(e,t))return;this.#e=e;const i=()=>{if(!t)return!0;const{notifyOnChangeProps:s}=this.options,n=typeof s=="function"?s():s;if(n==="all"||!n&&!this.#d.size)return!0;const a=new Set(n??this.#d);return this.options.throwOnError&&a.add("error"),Object.keys(this.#e).some(u=>{const l=u;return this.#e[l]!==t[l]&&a.has(l)})};this.#S({listeners:i()})}#w(){const t=this.#s.getQueryCache().build(this.#s,this.options);if(t===this.#t)return;const e=this.#t;this.#t=t,this.#p=t.state,this.hasListeners()&&(e?.removeObserver(this),t.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}#S(t){Y.batch(()=>{t.listeners&&this.listeners.forEach(e=>{e(this.#e)}),this.#s.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function ht(t,e){return d(e.enabled,t)!==!1&&t.state.data===void 0&&!(t.state.status==="error"&&e.retryOnMount===!1)}function _(t,e){return ht(t,e)||t.state.data!==void 0&&U(t,e,e.refetchOnMount)}function U(t,e,i){if(d(e.enabled,t)!==!1&&w(e.staleTime,t)!=="static"){const s=typeof i=="function"?i(t):i;return s==="always"||s!==!1&&F(t,e)}return!1}function N(t,e,i,s){return(t!==e||d(s.enabled,t)===!1)&&(!i.suspense||t.state.status!=="error")&&F(t,i)}function F(t,e){return d(e.enabled,t)!==!1&&t.isStaleByTime(w(e.staleTime,t))}function ut(t,e){return!D(t.getCurrentResult(),e)}function lt(t=""){if(!J())throw new Error("vue-query hooks can only be used inside setup() function or functions that support injection context.");const e=Z(t),i=X(e);if(!i)throw new Error("No 'queryClient' found in Vue context, use 'VueQueryPlugin' to properly initialize the library.");return i}function ct(t,e,i){const s=lt(),n=W(()=>{const o=q(e);typeof o.enabled=="function"&&(o.enabled=o.enabled());const b=s.defaultQueryOptions(o);return b._optimisticResults=s.isRestoring?.value?"isRestoring":"optimistic",b}),a=new t(s,n.value),u=n.value.shallow?tt(a.getCurrentResult()):et(a.getCurrentResult());let l=()=>{};s.isRestoring&&Q(s.isRestoring,o=>{o||(l(),l=a.subscribe(b=>{$(u,b)}))},{immediate:!0});const v=()=>{a.setOptions(n.value),$(u,a.getCurrentResult())};Q(n,v),st(()=>{l()});const g=(...o)=>(v(),u.refetch(...o)),r=()=>new Promise((o,b)=>{let f=()=>{};const O=()=>{if(n.value.enabled!==!1){a.setOptions(n.value);const m=a.getOptimisticResult(n.value);m.isStale?(f(),a.fetchOptimistic(n.value).then(o,R=>{A(n.value.throwOnError,[R,a.getCurrentQuery()])?b(R):o(a.getCurrentResult())})):(f(),o(m))}};O(),f=Q(n,O)});Q(()=>u.error,o=>{if(u.isError&&!u.isFetching&&A(n.value.throwOnError,[o,a.getCurrentQuery()]))throw o});const S=n.value.shallow?it(u):nt(u),h=rt(S);for(const o in u)typeof u[o]=="function"&&(h[o]=u[o]);return h.suspense=r,h.refetch=g,h}function ft(t,e){return ct(ot,t)}const dt=3;async function pt(t,e){const i=t.startsWith("/")?t.slice(1):t;let s=`${window.DATA_HOST}${i}`;const n={allInOne:!1};if(s.includes("#")){const r=new URLSearchParams(s.split("#")[1]);n.allInOne=r.get("allInOne")==="true",s=s.split("#")[0]}t.startsWith("http")&&(s=t),s.endsWith("/")&&(s=s.slice(0,-1));const a=r=>r.includes("?")?`${r}&t=${e??0}`:`${r}?t=${e??0}`,u=n.allInOne?[await fetch(a(s))]:[await fetch(a(`${s}/config.json`)),await fetch(a(`${s}/team.json`)),await fetch(a(`${s}/run.json`))],{status:l,statusText:v}=u[0];if(l>=300||l<200)throw new Error(`fetch data failed. [status=${l}] [statusText=${v}]`);return Promise.all(u.map(r=>r.json())).then(r=>n.allInOne?r[0]:{contest:r[0],teams:r[1],submissions:r[2]})}function yt(t,e,i=!1){let s=3e4,n=s;const a=W(()=>Math.floor(e.value.getTime()/1e3/10));return at.value==="I18N"&&(s=10*1e3,n=s),i&&(s=Number.POSITIVE_INFINITY,n=!1),ft({queryKey:[t,a.value],queryFn:()=>pt(t,a.value),retry:dt,staleTime:s,refetchInterval:n})}function gt(){return B("data-source","",{transform:String})}function Ot(){return B("battle-of-giants","",{transform:String})}export{Ot as a,gt as g,yt as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as H,_ as f,P as $,T as q,M as T,A as R}from"./contest-BrTkYMuZ.js";import{I as F}from"./dayjs-ErfWoYIs.js";import{c as A}from"./person-C-v09Xnw.js";var r=(e=>(e.PENDING="PENDING",e.WAITING="WAITING",e.PREPARING="PREPARING",e.COMPILING="COMPILING",e.RUNNING="RUNNING",e.JUDGING="JUDGING",e.FROZEN="FROZEN",e.ACCEPTED="ACCEPTED",e.CORRECT="CORRECT",e.PARTIALLY_CORRECT="PARTIALLY_CORRECT",e.REJECTED="REJECTED",e.WRONG_ANSWER="WRONG_ANSWER",e.NO_OUTPUT="NO_OUTPUT",e.COMPILATION_ERROR="COMPILATION_ERROR",e.PRESENTATION_ERROR="PRESENTATION_ERROR",e.RUNTIME_ERROR="RUNTIME_ERROR",e.TIME_LIMIT_EXCEEDED="TIME_LIMIT_EXCEEDED",e.MEMORY_LIMIT_EXCEEDED="MEMORY_LIMIT_EXCEEDED",e.OUTPUT_LIMIT_EXCEEDED="OUTPUT_LIMIT_EXCEEDED",e.IDLENESS_LIMIT_EXCEEDED="IDLENESS_LIMIT_EXCEEDED",e.HACKED="HACKED",e.JUDGEMENT_FAILED="JUDGEMENT_FAILED",e.CONFIGURATION_ERROR="CONFIGURATION_ERROR",e.FILE_ERROR="FILE_ERROR",e.SYSTEM_ERROR="SYSTEM_ERROR",e.CANCELED="CANCELED",e.SKIPPED="SKIPPED",e.SECURITY_VIOLATED="SECURITY_VIOLATED",e.DENIAL_OF_JUDGEMENT="DENIAL_OF_JUDGEMENT",e.UNKNOWN="UNKNOWN",e.UNDEFINED="UNDEFINED",e))(r||{});const _t={PENDING:"Pending",WAITING:"Waiting",PREPARING:"Preparing",COMPILING:"Compiling",RUNNING:"Running",JUDGING:"Judging",FROZEN:"Frozen",ACCEPTED:"Accepted",CORRECT:"Correct",PARTIALLY_CORRECT:"Partially Correct",REJECTED:"Rejected",WRONG_ANSWER:"Wrong Answer",NO_OUTPUT:"No Output",COMPILATION_ERROR:"Compilation Error",PRESENTATION_ERROR:"Presentation Error",RUNTIME_ERROR:"Runtime Error",TIME_LIMIT_EXCEEDED:"Time Limit Exceeded",MEMORY_LIMIT_EXCEEDED:"Memory Limit Exceeded",OUTPUT_LIMIT_EXCEEDED:"Output Limit Exceeded",IDLENESS_LIMIT_EXCEEDED:"Idleness Limit Exceeded",HACKED:"Hacked",JUDGEMENT_FAILED:"Judgement Failed",CONFIGURATION_ERROR:"Configuration Error",FILE_ERROR:"File Error",SYSTEM_ERROR:"System Error",CANCELED:"Canceled",SKIPPED:"Skipped",SECURITY_VIOLATED:"Security Violated",DENIAL_OF_JUDGEMENT:"Denial Of Judgement",UNKNOWN:"Unknown",UNDEFINED:"Undefined"},Dt={PENDING:"PD",WAITING:"PD",PREPARING:"PD",COMPILING:"PD",RUNNING:"PD",JUDGING:"PD",FROZEN:"?",ACCEPTED:"AC",CORRECT:"AC",PARTIALLY_CORRECT:"RJ",REJECTED:"RJ",WRONG_ANSWER:"WA",NO_OUTPUT:"NO",COMPILATION_ERROR:"CE",PRESENTATION_ERROR:"PE",RUNTIME_ERROR:"RTE",TIME_LIMIT_EXCEEDED:"TLE",MEMORY_LIMIT_EXCEEDED:"MLE",OUTPUT_LIMIT_EXCEEDED:"OLE",IDLENESS_LIMIT_EXCEEDED:"ILE",HACKED:"RJ",JUDGEMENT_FAILED:"RJ",CONFIGURATION_ERROR:"RJ",FILE_ERROR:"RJ",SYSTEM_ERROR:"RJ",CANCELED:"RJ",SKIPPED:"RJ",SECURITY_VIOLATED:"RJ",DENIAL_OF_JUDGEMENT:"RJ",UNKNOWN:"RJ",UNDEFINED:"RJ"};function Q(e){return e=e.toUpperCase().replace(" ","_"),["OK","AC",r.ACCEPTED.toString()].includes(e)||[r.CORRECT.toString()].includes(e)?r.ACCEPTED:[r.PARTIALLY_CORRECT.toString()].includes(e)?r.PARTIALLY_CORRECT:["WA",r.WRONG_ANSWER.toString()].includes(e)?r.WRONG_ANSWER:["RJ","INCORRECT",r.REJECTED.toString()].includes(e)?r.REJECTED:["NO",r.NO_OUTPUT.toString()].includes(e)?r.NO_OUTPUT:["PD",r.PENDING.toString()].includes(e)?r.PENDING:[r.WAITING.toString()].includes(e)?r.WAITING:[r.JUDGING.toString()].includes(e)?r.JUDGING:[r.FROZEN.toString()].includes(e)?r.FROZEN:["CE",r.COMPILATION_ERROR.toString()].includes(e)?r.COMPILATION_ERROR:["PE",r.PRESENTATION_ERROR.toString()].includes(e)?r.PRESENTATION_ERROR:["TL","TLE",r.TIME_LIMIT_EXCEEDED.toString()].includes(e)?r.TIME_LIMIT_EXCEEDED:["ML","MLE",r.MEMORY_LIMIT_EXCEEDED.toString()].includes(e)?r.MEMORY_LIMIT_EXCEEDED:["OL","OLE",r.OUTPUT_LIMIT_EXCEEDED.toString()].includes(e)?r.OUTPUT_LIMIT_EXCEEDED:["IL","ILE",r.IDLENESS_LIMIT_EXCEEDED.toString()].includes(e)?r.IDLENESS_LIMIT_EXCEEDED:["RT","RE","RTE",r.RUNTIME_ERROR.toString()].includes(e)?r.RUNTIME_ERROR:["JE",r.JUDGEMENT_FAILED.toString()].includes(e)?r.JUDGEMENT_FAILED:["SE",r.SYSTEM_ERROR.toString()].includes(e)?r.SYSTEM_ERROR:[r.HACKED.toString()].includes(e)?r.HACKED:[r.CONFIGURATION_ERROR.toString()].includes(e)?r.CONFIGURATION_ERROR:[r.CANCELED.toString()].includes(e)?r.CANCELED:[r.SKIPPED.toString()].includes(e)?r.SKIPPED:[r.SECURITY_VIOLATED.toString()].includes(e)?r.SECURITY_VIOLATED:[r.DENIAL_OF_JUDGEMENT.toString()].includes(e)?r.DENIAL_OF_JUDGEMENT:r.UNKNOWN}function tt(e){return[r.ACCEPTED,r.CORRECT].includes(e)}function et(e){return[r.RUNTIME_ERROR,r.TIME_LIMIT_EXCEEDED,r.MEMORY_LIMIT_EXCEEDED,r.OUTPUT_LIMIT_EXCEEDED,r.IDLENESS_LIMIT_EXCEEDED,r.WRONG_ANSWER,r.REJECTED,r.NO_OUTPUT,r.JUDGEMENT_FAILED,r.HACKED].includes(e)}function it(e){return[r.PENDING,r.WAITING,r.COMPILING,r.JUDGING,r.FROZEN].includes(e)}function st(e){return[r.COMPILATION_ERROR,r.PRESENTATION_ERROR,r.CONFIGURATION_ERROR,r.SYSTEM_ERROR,r.CANCELED,r.SKIPPED,r.UNKNOWN,r.UNDEFINED].includes(e)}class b{constructor(){this.status=r.UNKNOWN,this.isIgnore=!1,this.isSolved=!1,this.isFirstSolved=!1,this.id="",this.teamId="",this.problemId="",this.timestamp=0,this.timestampUnit="second"}isAccepted(){return tt(this.status)}isRejected(){return et(this.status)}isPending(){return it(this.status)}isNotCalculatedPenaltyStatus(){return st(this.status)}get timestampToMinute(){return this.timestampUnit==="nanosecond"?Math.floor(this.timestamp/60/1e3/1e3/1e3):this.timestampUnit==="microsecond"?Math.floor(this.timestamp/60/1e3/1e3):this.timestampUnit==="millisecond"?Math.floor(this.timestamp/60/1e3):Math.floor(this.timestamp/60)}get timestampToSecond(){return this.timestampUnit==="nanosecond"?Math.floor(this.timestamp/1e3/1e3/1e3):this.timestampUnit==="microsecond"?Math.floor(this.timestamp/1e3/1e3):this.timestampUnit==="millisecond"?Math.floor(this.timestamp/1e3):this.timestamp}get timestampDisplayFormatWithSecond(){const t=this.timestampToSecond,i=Math.floor(t/3600),s=Math.floor(t%3600/60),n=t%60,a=m=>m.toString().padStart(2,"0");return`${a(i)}:${a(s)}:${a(n)}`}get timestampDisplayFormatWithMilliSecond(){let t=this.timestampDisplayFormatWithSecond;if(this.timestampUnit==="millisecond"){const i=(this.timestamp%1e3).toString().padStart(3,"0");t+=`.${i}`}return t}static compare(t,i){if(t.timestamp!==i.timestamp)return t.timestamp-i.timestamp;if(t.teamId===i.teamId){if(t.isAccepted()&&!i.isAccepted())return-1;if(!t.isAccepted()&&i.isAccepted())return 1}return t.id<i.id?-1:t.id===i.id?0:1}}function O(e,t){const i=new b;return i.id=String(e.id??e.submission_id??""),i.teamId=String(e.team_id),i.problemId=String(e.problem_id),i.timestamp=e.timestamp,i.status=Q(e.status),i.isIgnore=e.is_ignore??!1,e.time&&(i.time=e.time),e.language&&(i.language=e.language),e.reaction?i.reaction=e.reaction:t?.options.reactionVideoUrlTemplate&&(i.reaction={url:t.options.reactionVideoUrlTemplate.replace(/\$\{submission_id\}/,i.id)}),i}function Ct(e,t){return Array.isArray(e)?e.map((i,s)=>O({...i,id:i.submission_id??String(s)},t)):Object.entries(e).map(([s,n])=>O({...n,id:n.submission_id??s},t))}class p{constructor(){this.id="",this.name=new F,this.organization="",this.group=[],this.tag=[],this.coaches=[],this.members=[],this.rank=0,this.originalRank=0,this.organizationRank=-1,this.solvedProblemNum=0,this.attemptedProblemNum=0,this.lastSolvedProblem=null,this.lastSolvedProblemStatistics=null,this.penalty=0,this.problemStatistics=[],this.problemStatisticsMap=new Map,this.submissions=[],this.placeChartPoints=[],this.awards=[],this.missingPhoto=!1,this.se=0}reset(){this.rank=0,this.originalRank=0,this.organizationRank=-1,this.solvedProblemNum=0,this.attemptedProblemNum=0,this.lastSolvedProblem=null,this.lastSolvedProblemStatistics=null,this.penalty=0,this.problemStatistics=[],this.problemStatisticsMap=new Map,this.submissions=[],this.placeChartPoints=[],this.awards=[],this.se=0}get penaltyToMinute(){return Math.floor(this.penalty/60)}get isUnofficial(){return this.group.includes("unofficial")}get isGirl(){return this.group.includes("girl")}get isEffectiveTeam(){return this.solvedProblemNum>0}get dirt(){const t=this.attemptedProblemNum,i=this.solvedProblemNum;return H(t,i)}membersToString(t){return this.members.map(i=>i.name.getOrDefault(t)).join(", ")}coachesToString(t){return this.coaches.map(i=>i.name.getOrDefault(t)).join(", ")}calcSE(t){let i=0,s=0;if(this.problemStatistics.forEach(a=>{a.isSolved&&(i+=1,s+=a.problem.statistics.acceptedNum)}),t===0||i===0)return 0;const n=(i*t-s)/t/i;return this.se=Math.round(n*100)/100,this.se}calcSolvedData(t){this.solvedProblemNum=0,this.attemptedProblemNum=0,this.penalty=0;for(const i of this.problemStatistics)i.isAccepted&&(this.solvedProblemNum++,this.attemptedProblemNum+=i.failedCount+1,t?.calculationOfPenalty==="in_seconds"||t?.calculationOfPenalty==="accumulate_in_seconds_and_finally_to_the_minute"?this.penalty+=i.penaltyInSecond:this.penalty+=i.penalty);t?.calculationOfPenalty==="accumulate_in_seconds_and_finally_to_the_minute"&&(this.penalty=Math.floor(this.penalty/60)*60)}calcAwards(t){if(t)for(const i of t)this.rank>=i.minRank&&this.rank<=i.maxRank&&this.awards.push(i.medalType)}isEqualRank(t){return this.solvedProblemNum===t.solvedProblemNum&&this.penalty===t.penalty&&this.lastSolvedProblemStatistics?.solvedTimestampToMinute===t.lastSolvedProblemStatistics?.solvedTimestampToMinute}postProcessPlaceChartPoints(){if(this.placeChartPoints.length===0)return;const t=[];t.push(this.placeChartPoints[0]);for(let i=1;i<this.placeChartPoints.length-1;i++){const s=this.placeChartPoints[i],n=t[t.length-1];(s.rank!==n.rank||s.lastSolvedProblem!==n.lastSolvedProblem)&&t.push(s)}this.placeChartPoints.length>1&&t.push(this.placeChartPoints[this.placeChartPoints.length-1]),this.placeChartPoints=t}static compare(t,i){return t.solvedProblemNum!==i.solvedProblemNum?i.solvedProblemNum-t.solvedProblemNum:t.penalty!==i.penalty?t.penalty-i.penalty:t.lastSolvedProblemStatistics&&i.lastSolvedProblemStatistics?t.lastSolvedProblemStatistics.solvedTimestampToMinute-i.lastSolvedProblemStatistics.solvedTimestampToMinute:t.name<i.name?-1:t.name>i.name?1:0}}function M(e){const t=new p;t.id=e.id??e.team_id??"",t.name=F.fromIText(e.name??e.team_name??""),t.organization=e.organization??"",t.group=f.cloneDeep(e.group??[]),t.tag=f.cloneDeep(e.tag??[]),t.coaches=A(e.coach),t.members=A(e.members),e.official&&t.group.push("official"),e.unofficial&&t.group.push("unofficial"),e.girl&&t.group.push("girl");{const i=e;for(const s of Object.keys(i))s!=="missing_photo"&&(i[s]===1||i[s]===!0)&&t.group.push(s)}return t.group=[...new Set(t.group)],t.group.sort(),t.badge=e.badge,e.missing_photo&&(t.missingPhoto=!0),t.photo=e.photo,e.location&&(t.location=e.location),e.icpc_id&&(t.icpcID=e.icpc_id),t}function Pt(e){return Array.isArray(e)?e.map(t=>M(t)):Object.entries(e).map(([i,s])=>M({...s,team_id:s.team_id??i}))}class nt{constructor(){this.problem=new $,this.team=new p,this.submission=new b}get key(){return`balloon-${this.team.id}-${this.problem.id}`}static compare(t,i){return b.compare(t.submission,i.submission)}}const G="3.7.8",rt=G,h=typeof Buffer=="function",y=typeof TextDecoder=="function"?new TextDecoder:void 0,U=typeof TextEncoder=="function"?new TextEncoder:void 0,at="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",d=Array.prototype.slice.call(at),I=(e=>{let t={};return e.forEach((i,s)=>t[i]=s),t})(d),ot=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,u=String.fromCharCode.bind(String),L=typeof Uint8Array.from=="function"?Uint8Array.from.bind(Uint8Array):e=>new Uint8Array(Array.prototype.slice.call(e,0)),k=e=>e.replace(/=/g,"").replace(/[+\/]/g,t=>t=="+"?"-":"_"),w=e=>e.replace(/[^A-Za-z0-9\+\/]/g,""),B=e=>{let t,i,s,n,a="";const l=e.length%3;for(let m=0;m<e.length;){if((i=e.charCodeAt(m++))>255||(s=e.charCodeAt(m++))>255||(n=e.charCodeAt(m++))>255)throw new TypeError("invalid character found");t=i<<16|s<<8|n,a+=d[t>>18&63]+d[t>>12&63]+d[t>>6&63]+d[t&63]}return l?a.slice(0,l-3)+"===".substring(l):a},P=typeof btoa=="function"?e=>btoa(e):h?e=>Buffer.from(e,"binary").toString("base64"):B,D=h?e=>Buffer.from(e).toString("base64"):e=>{let i=[];for(let s=0,n=e.length;s<n;s+=4096)i.push(u.apply(null,e.subarray(s,s+4096)));return P(i.join(""))},N=(e,t=!1)=>t?k(D(e)):D(e),lt=e=>{if(e.length<2){var t=e.charCodeAt(0);return t<128?e:t<2048?u(192|t>>>6)+u(128|t&63):u(224|t>>>12&15)+u(128|t>>>6&63)+u(128|t&63)}else{var t=65536+(e.charCodeAt(0)-55296)*1024+(e.charCodeAt(1)-56320);return u(240|t>>>18&7)+u(128|t>>>12&63)+u(128|t>>>6&63)+u(128|t&63)}},mt=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,z=e=>e.replace(mt,lt),v=h?e=>Buffer.from(e,"utf8").toString("base64"):U?e=>D(U.encode(e)):e=>P(z(e)),E=(e,t=!1)=>t?k(v(e)):v(e),x=e=>E(e,!0),ct=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,ut=e=>{switch(e.length){case 4:var t=(7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3),i=t-65536;return u((i>>>10)+55296)+u((i&1023)+56320);case 3:return u((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return u((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},W=e=>e.replace(ct,ut),X=e=>{if(e=e.replace(/\s+/g,""),!ot.test(e))throw new TypeError("malformed base64.");e+="==".slice(2-(e.length&3));let t,i,s,n=[];for(let a=0;a<e.length;)t=I[e.charAt(a++)]<<18|I[e.charAt(a++)]<<12|(i=I[e.charAt(a++)])<<6|(s=I[e.charAt(a++)]),i===64?n.push(u(t>>16&255)):s===64?n.push(u(t>>16&255,t>>8&255)):n.push(u(t>>16&255,t>>8&255,t&255));return n.join("")},S=typeof atob=="function"?e=>atob(w(e)):h?e=>Buffer.from(e,"base64").toString("binary"):X,Y=h?e=>L(Buffer.from(e,"base64")):e=>L(S(e).split("").map(t=>t.charCodeAt(0))),K=e=>Y(j(e)),Et=h?e=>Buffer.from(e,"base64").toString("utf8"):y?e=>y.decode(Y(e)):e=>W(S(e)),j=e=>w(e.replace(/[-_]/g,t=>t=="-"?"+":"/")),C=e=>Et(j(e)),ht=e=>{if(typeof e!="string")return!1;const t=e.replace(/\s+/g,"").replace(/={0,2}$/,"");return!/[^\s0-9a-zA-Z\+/]/.test(t)||!/[^\s0-9a-zA-Z\-_]/.test(t)},V=e=>({value:e,enumerable:!1,writable:!0,configurable:!0}),Z=function(){const e=(t,i)=>Object.defineProperty(String.prototype,t,V(i));e("fromBase64",function(){return C(this)}),e("toBase64",function(t){return E(this,t)}),e("toBase64URI",function(){return E(this,!0)}),e("toBase64URL",function(){return E(this,!0)}),e("toUint8Array",function(){return K(this)})},J=function(){const e=(t,i)=>Object.defineProperty(Uint8Array.prototype,t,V(i));e("toBase64",function(t){return N(this,t)}),e("toBase64URI",function(){return N(this,!0)}),e("toBase64URL",function(){return N(this,!0)})},dt=()=>{Z(),J()},_={version:G,VERSION:rt,atob:S,atobPolyfill:X,btoa:P,btoaPolyfill:B,fromBase64:C,toBase64:E,encode:E,encodeURI:x,encodeURL:x,utob:z,btou:W,decode:C,isValid:ht,fromUint8Array:N,toUint8Array:K,extendString:Z,extendUint8Array:J,extendBuiltins:dt};var ft=(e=>(e[e.BLUE=0]="BLUE",e[e.RED=1]="RED",e))(ft||{});class g{constructor(t=0){this.type=t,this.name=`${t===0?"Blue":"Red"} Team`,this.teams=[],this.filterOrganizations=[],this.filterOrganizationMap=new Map,this.filterTeams=[],this.filterTeamMap=new Map}setFilterOrganizations(t){const i=new Map;t.forEach(s=>{i.set(s.value,s)}),this.filterOrganizations=t,this.filterOrganizationMap=i}setFilterTeams(t){const i=new Map;t.forEach(s=>{i.set(s.value,s)}),this.filterTeams=t,this.filterTeamMap=i}refreshName(){return this.filterOrganizations.length>0?this.name=this.filterOrganizations[0].text:this.name=`${this.type===0?"Blue":"Red"} Team`,this.name}get totalSolvedProblemNum(){let t=0;return this.teams.forEach(i=>{t+=i.solvedProblemNum}),t}get totalPenalty(){let t=0;return this.teams.forEach(i=>{t+=i.penaltyToMinute}),t}get totalPenaltyToString(){const t=this.totalPenalty,i=a=>a<10?`0${a}`:String(a),s=Math.floor(t/60),n=Math.floor(t%60);return[i(s),i(n)].join(":")}toJSON(){return{type:this.type,name:this.name,filterOrganizations:this.filterOrganizations,filterTeams:this.filterTeams}}}class pt{constructor(){this.enable=!1,this.topX=5,this.equalTeams=!0,this.persist=!1,this.blueTeam=new g(0),this.redTeam=new g(1)}ToBase64(){return _.encode(JSON.stringify(this))}FromBase64(t){if(t.length===0||_.isValid(t)===!1)return;const i=JSON.parse(_.decode(t));this.enable=i.enable,this.topX=i.topX,this.equalTeams=i.equalTeams,this.persist=i.persist,this.blueTeam=new g(0),this.blueTeam.name=i.blueTeam.name,this.blueTeam.setFilterOrganizations(i.blueTeam.filterOrganizations),this.blueTeam.setFilterTeams(i.blueTeam.filterTeams),this.redTeam=new g(1),this.redTeam.name=i.redTeam.name,this.redTeam.setFilterOrganizations(i.redTeam.filterOrganizations),this.redTeam.setFilterTeams(i.redTeam.filterTeams)}}class Tt{constructor(){this.teamSolvedNum=[],this.teamSolvedNumIndex=[],this.maxSolvedProblems=0,this.effectiveTeamNum=0,this.totalTeamNum=0}reset(){this.teamSolvedNum=[],this.teamSolvedNumIndex=[],this.maxSolvedProblems=0,this.effectiveTeamNum=0,this.totalTeamNum=0}getTeamSolvedNumIndex(t){return this.teamSolvedNumIndex[t]??0}}class Rt{constructor(){this.enableFilterSubmissionsByTimestamp=!1,this.width=0,this.timestamp=0,this.enableFilterTeamsByGroup=!1,this.group="all",this.filterOrganizations=[],this.filterOrganizationMap=new Map,this.filterTeams=[],this.filterTeamMap=new Map,this.enableAnimatedSubmissions=!1,this.battleOfGiants=new pt}setSelf(t){this.enableFilterSubmissionsByTimestamp=t.enableFilterSubmissionsByTimestamp,this.width=t.width,this.timestamp=t.timestamp,this.enableFilterTeamsByGroup=t.enableFilterTeamsByGroup,this.group=t.group,this.filterOrganizations=t.filterOrganizations,this.filterOrganizationMap=t.filterOrganizationMap,this.filterTeams=t.filterTeams,this.filterTeamMap=t.filterTeamMap,this.enableAnimatedSubmissions=t.enableAnimatedSubmissions,this.battleOfGiants=t.battleOfGiants}setWidth(t,i){this.width=t,this.timestamp=Math.floor((i.getEndTime().unix()-i.getStartTime().unix())*this.width*1e-4),this.enableFilterSubmissionsByTimestamp=!0}disableFilterSubmissionByTimestamp(){this.enableFilterSubmissionsByTimestamp=!1}setGroup(t){this.group=t,this.enableFilterTeamsByGroup=!0,this.group==="all"&&this.disableFilterTeamsByGroup()}disableFilterTeamsByGroup(){this.enableFilterTeamsByGroup=!1,this.group="all"}setFilterOrganizations(t){const i=new Map;t.forEach(s=>{i.set(s.value,s)}),this.filterOrganizations=t,this.filterOrganizationMap=i}setFilterTeams(t){const i=new Map;t.forEach(s=>{i.set(s.value,s)}),this.filterTeams=t,this.filterTeamMap=i}isNeedReBuildRank(t){return this.enableFilterSubmissionsByTimestamp!==t.enableFilterSubmissionsByTimestamp||this.width!==t.width||this.timestamp!==t.timestamp||this.enableFilterTeamsByGroup!==t.enableFilterTeamsByGroup||this.group!==t.group}}class St{constructor(t,i,s){this.contest=t,this.teams=f.cloneDeep(i),this.teamsMap=new Map(this.teams.map(n=>[n.id,n])),this.submissions=f.cloneDeep(s).sort(b.compare);{const n=this.contest.options,a=f.cloneDeep(n.submissionTimestampUnit);this.submissions.forEach(l=>{l.timestampUnit=a,l.time&&(n.submissionHasTimeField=!0),l.language&&(n.submissionHasLanguageField=!0)})}this.submissionsMap=new Map(this.submissions.map(n=>[n.id,n])),this.organizations=this.buildOrganizations(),this.originTeams=this.teams.map(n=>n),this.originTeams.sort(p.compare),this.rankStatistics=new Tt,this.options=new Rt,this.balloons=[];{const n=new Set;this.submissions.forEach(a=>{a.language&&n.add(a.language)}),this.languages=[...n].sort()}{const n=new Set;this.submissions.forEach(a=>{n.add(a.status)}),this.statuses=[...n].sort()}}cleanRank(){(()=>{this.teams=[];for(const[t,i]of this.teamsMap)this.filterTeamByOrg(i)||this.teams.push(i)})();for(const t of this.teams)t.reset(),t.problemStatistics=this.contest.problems.map(i=>{const s=new q;return s.problem=i,s.contestPenalty=this.contest.penalty,s}),t.problemStatisticsMap=new Map(t.problemStatistics.map(i=>[i.problem.id,i]));this.contest.problems.forEach(t=>{t.statistics.reset()})}buildRank(){return(()=>{this.cleanRank(),this.teams.forEach(s=>s.placeChartPoints.push({timePoint:0,rank:1,lastSolvedProblem:null})),this.rankStatistics.reset(),this.rankStatistics.teamSolvedNum=Array.from({length:this.contest.problems.length+1}).fill(0),this.rankStatistics.teamSolvedNumIndex=Array.from({length:this.contest.problems.length+1}).fill(0);let t=0;const i=this.getSubmissions();for(let s=0;s<i.length;s++){const n=i[s],a=n.teamId,l=n.problemId,m=this.teamsMap.get(a),c=this.contest.problemsMap.get(l);(()=>{if(m===void 0||this.filterTeamByOrg(m)||c===void 0)return;const o=m.problemStatisticsMap.get(l);if(o.submissions.push(n),m.submissions.push(n),c.statistics.submittedNum++,o.isSolved){n.isSolved=!1,n.isFirstSolved=!1;return}if(n.isIgnore||n.isNotCalculatedPenaltyStatus()){c.statistics.ignoreNum++,o.ignoreCount++;return}if(o.isSubmitted=!0,o.lastSubmitTimestamp=n.timestampToSecond,o.totalCount++,n.isAccepted()){for(n.isSolved=!0,o.isSolved=!0,o.solvedTimestamp=n.timestampToSecond,c.statistics.acceptedNum++,c.statistics.attemptedNum+=o.failedCount+1,(c.statistics.firstSolveSubmissions.length===0||c.statistics.firstSolveSubmissions[c.statistics.firstSolveSubmissions.length-1].timestamp===n.timestamp)&&(n.isFirstSolved=!0,o.isFirstSolved=!0,c.statistics.firstSolveSubmissions.push(n));c.statistics.lastSolveSubmissions.length>0;)c.statistics.lastSolveSubmissions.pop();c.statistics.lastSolveSubmissions.push(n),m.lastSolvedProblem=c,m.lastSolvedProblemStatistics=o}n.isRejected()&&(o.failedCount++,c.statistics.rejectedNum++),n.isPending()&&(o.pendingCount++,c.statistics.pendingNum++)})(),(n.timestampToMinute>t||s===i.length-1)&&(this.teams.forEach(o=>o.calcSolvedData(this.contest.options)),this.teams.sort(p.compare),this.buildTeamRank(),this.teams.forEach(o=>o.placeChartPoints.push({timePoint:n.timestampToMinute,rank:o.rank,lastSolvedProblem:o.lastSolvedProblem}))),t=n.timestampToMinute}this.teams.forEach(s=>s.calcSolvedData(this.contest.options)),this.teams.sort(p.compare),this.buildTeamRank(),this.buildOrgRank(),this.rankStatistics.effectiveTeamNum=this.teams.filter(s=>s.isEffectiveTeam).length,this.rankStatistics.totalTeamNum=this.teams.length,this.teams.forEach(s=>s.calcSE(this.rankStatistics.totalTeamNum)),this.contest.problems.forEach(s=>s.statistics.calcSE(this.rankStatistics.totalTeamNum)),this.buildAwards(),this.teams.forEach(s=>s.calcAwards(this.contest.awards?.get(this.options.group))),this.teams.forEach(s=>s.postProcessPlaceChartPoints())})(),(()=>{for(const t of this.teams)this.rankStatistics.teamSolvedNum[t.solvedProblemNum]++;{let t=0;const i=this.rankStatistics.teamSolvedNum,s=this.rankStatistics.teamSolvedNumIndex;for(let n=s.length-1;n>=0;n--)t+=i[n]>0?1:0,s[n]=t}this.teams.length>0&&(this.rankStatistics.maxSolvedProblems=this.teams[0].solvedProblemNum)})(),this}buildTeamRank(){let t=1,i=1,s=null;for(const n of this.teams)n.rank=t++,n.originalRank=i++,s!==null&&n.isEqualRank(s)&&(n.rank=s.rank),s=n}buildOrgRank(){if(!this.contest.organization)return;let t=1,i=null;const s=new Set;for(const n of this.teams){const a=n.organization;s.has(a)||(s.add(a),n.organizationRank=t++,i!==null&&n.isEqualRank(i)&&(n.organizationRank=i.organizationRank),i=n)}}buildOrganizations(){if(!this.contest.organization)return[];const t=new Array,i=new Set;return this.teams.forEach(s=>{const n=s.organization;i.has(n)||(t.push(n),i.add(n))}),t.sort(),t}buildAwards(){if(this.contest.medal==="ccpc"){this.contest.awards=new Map;const t=this.rankStatistics.effectiveTeamNum,i=[],s=new R,n=new R,a=new R,l=new R;s.medalType=T.GOLD,s.minRank=1,s.maxRank=Math.ceil(t*.1),s.maxRank>=s.minRank&&i.push(s),n.medalType=T.SILVER,n.minRank=s.maxRank+1,n.maxRank=Math.ceil(t*.3),n.maxRank>=n.minRank&&i.push(n),a.medalType=T.BRONZE,a.minRank=n.maxRank+1,a.maxRank=Math.ceil(t*.6),a.maxRank>=a.minRank&&i.push(a),l.medalType=T.HONORABLE,l.minRank=a.maxRank+1,this.teams.forEach(m=>{m.solvedProblemNum>0&&(l.maxRank=Math.max(l.maxRank,m.rank))}),l.maxRank>=l.minRank&&i.push(l),this.contest.awards.set("official",i)}}filterTeamByOrg(t){const i=this.options;return!!(i.enableFilterTeamsByGroup&&!t.group?.includes(i.group))}getSubmissions(){return this.contest.replayContestStartTimestamp===void 0&&this.options.enableFilterSubmissionsByTimestamp===!1?this.submissions:this.submissions.filter(t=>!(this.contest.replayContestStartTimestamp!==void 0&&t.timestampToSecond>this.contest.replayContestStartTimestamp||this.options.enableFilterSubmissionsByTimestamp&&t.timestampToSecond>this.options.timestamp))}buildBalloons(){this.balloons=[],this.cleanRank();const t=this.getSubmissions();for(let i=0;i<t.length;i++){const s=t[i],n=s.teamId,a=s.problemId,l=this.teamsMap.get(n),m=this.contest.problemsMap.get(a);(()=>{if(l===void 0||m===void 0)return;const c=l.problemStatisticsMap.get(a);if(!c.isSolved&&s.isAccepted()){c.isSolved=!0,c.solvedTimestamp=s.timestampToSecond;const o=new nt;o.team=l,o.problem=m,o.submission=s,this.balloons.push(o)}})()}}setReplayTime(t){this.contest.setReplayTime(t)}}export{nt as B,ft as G,St as R,r as S,p as T,Ct as a,st as b,Pt as c,it as d,Dt as e,b as f,et as g,_t as h,tt as i,Rt as j};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as p}from"./TheInput.vue_vue_type_script_setup_true_lang-
|
|
1
|
+
import{_ as p}from"./TheInput.vue_vue_type_script_setup_true_lang-B8H-RmO4.js";import{d as c,m as f,H as _,u as b,c as h,o as v,b as e,k as a,h as s,a as x,a2 as y,z as g}from"./index-BhjhJlKm.js";import{u as k}from"./user-Ht_z1r54.js";import{b as l}from"./route-block-B_A1xBdJ.js";import"./use-vmodel-B41hlwAY.js";const V={flex:"","flex-col":"","justify-center":"","items-center":""},w={"text-sm":"","opacity-75":""},I={"w-48":""},B={class:"hidden",for:"input"},C=["disabled"],N=c({name:"IndexPage",__name:"test",setup(R){const i=k(),o=f(i.savedName),u=_();function r(){o.value&&u.push(`/hi/${encodeURIComponent(o.value)}`)}const{t:n}=b();return(U,t)=>{const d=p;return v(),h("div",V,[t[1]||(t[1]=e("div",{"text-4xl":""},[e("div",{"i-carbon-campsite":""})],-1)),t[2]||(t[2]=e("p",null,[e("a",{rel:"noreferrer",href:"https://github.com/antfu/vitesse",target:"_blank"}," Vitesse ")],-1)),e("p",null,[e("em",w,a(s(n)("intro.desc")),1)]),t[3]||(t[3]=e("div",{"py-4":""},null,-1)),e("div",I,[x(d,{modelValue:s(o),"onUpdate:modelValue":t[0]||(t[0]=m=>g(o)?o.value=m:null),placeholder:s(n)("intro.whats-your-name"),autocomplete:"false",onKeydown:y(r,["enter"])},null,8,["modelValue","placeholder"]),e("label",B,a(s(n)("intro.whats-your-name")),1)]),e("div",null,[e("button",{"m-3":"","text-sm":"",btn:"",disabled:!s(o),onClick:r},a(s(n)("button.go")),9,C)])])}}});typeof l=="function"&&l(N);export{N as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{aA as c,aB as r}from"./index-
|
|
1
|
+
import{aA as c,aB as r}from"./index-BhjhJlKm.js";const d=(...p)=>{const s=c().proxy.$props,t=Object.create(null);for(const e of p)if(typeof e=="string")t[e]=r(s,e,void 0,{eventName:`update:${e}`,passive:!0});else{const[o,n=o,a=`update:${o}`,u={}]=e;t[o]=r(s,n,void 0,{eventName:a,passive:!0,...u})}return t};export{d as _};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ay as n,m as r,f as t}from"./index-
|
|
1
|
+
import{ay as n,m as r,f as t}from"./index-BhjhJlKm.js";const f=n("user",()=>{const e=r(""),s=r(new Set),o=t(()=>Array.from(s.value)),u=t(()=>o.value.filter(a=>a!==e.value));function m(a){e.value&&s.value.add(e.value),e.value=a}return{setNewName:m,otherNames:u,savedName:e}});export{f as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as f}from"./index-
|
|
1
|
+
import{_ as f}from"./index-BhjhJlKm.js";function p(n={}){const{immediate:s=!1,onNeedRefresh:u,onOfflineReady:o,onRegistered:d,onRegisteredSW:r,onRegisterError:i}=n;let t,a;const c=async(e=!0)=>{await a};async function l(){if("serviceWorker"in navigator){if(t=await f(async()=>{const{Workbox:e}=await import("./workbox-window.prod.es5-CwtvwXb3.js");return{Workbox:e}},[],import.meta.url).then(({Workbox:e})=>new e("/sw.js",{scope:"/",type:"classic"})).catch(e=>{i?.(e)}),!t)return;t.addEventListener("activated",e=>{(e.isUpdate||e.isExternal)&&window.location.reload()}),t.addEventListener("installed",e=>{e.isUpdate||o?.()}),t.register({immediate:s}).then(e=>{r?r("/sw.js",e):d?.(e)}).catch(e=>{i?.(e)})}}return a=l(),c}export{p as registerSW};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const t={button:{about:{t:0,b:{t:2,i:[{t:3}],s:"关于"}},back:{t:0,b:{t:2,i:[{t:3}],s:"返回"}},go:{t:0,b:{t:2,i:[{t:3}],s:"确定"}},home:{t:0,b:{t:2,i:[{t:3}],s:"首页"}},confirm:{t:0,b:{t:2,i:[{t:3}],s:"确认"}},cancel:{t:0,b:{t:2,i:[{t:3}],s:"取消"}},toggle_dark:{t:0,b:{t:2,i:[{t:3}],s:"切换深色模式"}},toggle_langs:{t:0,b:{t:2,i:[{t:3}],s:"切换语言"}}},intro:{desc:{t:0,b:{t:2,i:[{t:3}],s:"固执己见的 Vite 项目模板"}},"dynamic-route":{t:0,b:{t:2,i:[{t:3}],s:"动态路由演示"}},hi:{t:0,b:{t:2,i:[{t:3,v:"你好,"},{t:4,k:"name"}]}},aka:{t:0,b:{t:2,i:[{t:3}],s:"也叫"}},"whats-your-name":{t:0,b:{t:2,i:[{t:3}],s:"输入你的名字"}}},"not-found":{t:0,b:{t:2,i:[{t:3}],s:"未找到页面"}},common:{loading:{t:0,b:{t:2,i:[{t:3}],s:"加载中"}},colon:{t:0,b:{t:2,i:[{t:3}],s:":"}}},index:{start:{t:0,b:{t:2,i:[{t:3}],s:"开始时间"}},duration:{t:0,b:{t:2,i:[{t:3}],s:"持续时长"}}},type_menu:{rank:{t:0,b:{t:2,i:[{t:3}],s:"排名"}},info:{t:0,b:{t:2,i:[{t:3}],s:"简介"}},submissions:{t:0,b:{t:2,i:[{t:3}],s:"提交"}},statistics:{t:0,b:{t:2,i:[{t:3}],s:"统计"}},balloon:{t:0,b:{t:2,i:[{t:3}],s:"气球"}},resolver:{t:0,b:{t:2,i:[{t:3}],s:"滚榜"}},filter:{t:0,b:{t:2,i:[{t:3}],s:"筛选"}},options:{t:0,b:{t:2,i:[{t:3}],s:"选项"}},awards:{t:0,b:{t:2,i:[{t:3}],s:"奖项"}},utility:{t:0,b:{t:2,i:[{t:3}],s:"工具"}},countdown:{t:0,b:{t:2,i:[{t:3}],s:"倒计时"}}},utility:{tools:{t:0,b:{t:2,i:[{t:3}],s:"工具集"}},export:{t:0,b:{t:2,i:[{t:3}],s:"导出"}}},standings:{start_time:{t:0,b:{t:2,i:[{t:3}],s:"开始时间"}},end_time:{t:0,b:{t:2,i:[{t:3}],s:"结束时间"}},elapsed:{t:0,b:{t:2,i:[{t:3}],s:"当前时间"}},remaining:{t:0,b:{t:2,i:[{t:3}],s:"剩余时间"}},place:{t:0,b:{t:2,i:[{t:3}],s:"Place"}},team:{t:0,b:{t:2,i:[{t:3}],s:"Team"}},solved:{t:0,b:{t:2,i:[{t:3}],s:"Solved"}},penalty:{t:0,b:{t:2,i:[{t:3}],s:"Penalty"}},dirt:{t:0,b:{t:2,i:[{t:3}],s:"Dirt"}},se:{t:0,b:{t:2,i:[{t:3}],s:"SE"}},statistics:{submitted:{t:0,b:{t:2,i:[{t:3}],s:"Submitted"}},attempted:{t:0,b:{t:2,i:[{t:3}],s:"Attempted"}},accepted:{t:0,b:{t:2,i:[{t:3}],s:"Accepted"}},dirt:{t:0,b:{t:2,i:[{t:3}],s:"Dirt"}},se:{t:0,b:{t:2,i:[{t:3}],s:"SE"}},first_solved:{t:0,b:{t:2,i:[{t:3}],s:"First Solved"}},last_solved:{t:0,b:{t:2,i:[{t:3}],s:"Last Solved"}},head_data:{problems:{t:0,b:{t:2,i:[{t:3}],s:"题目数"}},teams:{t:0,b:{t:2,i:[{t:3}],s:"队伍数"}},submissions:{t:0,b:{t:2,i:[{t:3}],s:"提交数"}}},submit_heatmap:{t:0,b:{t:2,i:[{t:3}],s:"提交热力图"}}},options:{calculation_of_penalty:{t:0,b:{t:2,i:[{t:3}],s:"罚时计算方式"}},in_minutes:{t:0,b:{t:2,i:[{t:3}],s:"精确到分钟进行累加"}},in_seconds:{t:0,b:{t:2,i:[{t:3}],s:"精确到秒进行累加"}},accumulate_in_seconds_and_finally_to_the_minute:{t:0,b:{t:2,i:[{t:3}],s:"精确到秒进行累加,最后精确到分钟"}}}},submissions:{total_submissions:{t:0,b:{t:2,i:[{t:3}],s:"总提交数"}}},team_info:{rank:{t:0,b:{t:2,i:[{t:3}],s:"排名"}},team_name:{t:0,b:{t:2,i:[{t:3}],s:"队名"}},organization:{t:0,b:{t:2,i:[{t:3}],s:"组织"}},group:{t:0,b:{t:2,i:[{t:3}],s:"组别"}},members:{t:0,b:{t:2,i:[{t:3}],s:"队员"}},coaches:{t:0,b:{t:2,i:[{t:3}],s:"教练"}},location:{t:0,b:{t:2,i:[{t:3}],s:"位置"}}}};export{t as default};
|
package/dist/index.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!doctype html><html lang="en-US" dir="ltr"><head><meta charset="UTF-8"/><title>Board - XCPCIO</title><script>!function(e,t,a,n){e[n]=e[n]||[],e[n].push({"gtm.start":(new Date).getTime(),event:"gtm.js"});var g=t.getElementsByTagName(a)[0],m=t.createElement(a);m.async=!0,m.src="https://www.googletagmanager.com/gtm.js?id=GTM-WHLF55BJ",g.parentNode.insertBefore(m,g)}(window,document,"script","dataLayer")</script><link rel="icon" href="https://cdn.jsdelivr.net/npm/@xcpcio/board-app@0.
|
|
1
|
+
<!doctype html><html lang="en-US" dir="ltr"><head><meta charset="UTF-8"/><title>Board - XCPCIO</title><script>!function(e,t,a,n){e[n]=e[n]||[],e[n].push({"gtm.start":(new Date).getTime(),event:"gtm.js"});var g=t.getElementsByTagName(a)[0],m=t.createElement(a);m.async=!0,m.src="https://www.googletagmanager.com/gtm.js?id=GTM-WHLF55BJ",g.parentNode.insertBefore(m,g)}(window,document,"script","dataLayer")</script><link rel="icon" href="https://cdn.jsdelivr.net/npm/@xcpcio/board-app@0.67.0/dist/balloon-512x512.svg" type="image/svg+xml"/><link rel="mask-icon" href="https://cdn.jsdelivr.net/npm/@xcpcio/board-app@0.67.0/dist/balloon-512x512.svg" color="#00aba9"/><link rel="apple-touch-icon" href="https://cdn.jsdelivr.net/npm/@xcpcio/board-app@0.67.0/dist/balloon-192x192.png"/><meta name="msapplication-TileColor" content="#00aba9"/><meta name="author" content="Dup4"/><meta name="title" content="Board - XCPCIO"/><meta name="description" content="The ICPC Series Competition Leaderboard Visualization Engine."/><meta name="keywords" content="ICPC, Rank, Board, Leaderboard, ScoreBoard, Standings"/><meta property="og:site_name" content="XCPCIO"/><meta property="og:title" content="Board - XCPCIO"/><meta property="og:description" content="The ICPC Series Competition Leaderboard Visualization Engine."/><meta property="og:type" content="website"/><meta property="og:image" content="https://xcpcio.com/og.png"/><meta property="og:image:type" content="image/png"/><meta property="og:image:width" content="1200"/><meta property="og:image:height" content="630"/><meta name="twitter:title" content="Board - XCPCIO"/><meta name="twitter:description" content="The ICPC Series Competition Leaderboard Visualization Engine."/><meta name="twitter:card" content="summary_large_image"/><meta name="twitter:image" content="https://xcpcio.com/og.png"/><script>function normalizePath(_){for(;_.endsWith("/");)_=_.slice(0,-1);return`${_}/`}{let _="https://cdn.jsdelivr.net/npm/@xcpcio/board-app@0.67.0/dist";_=normalizePath(_),window.CDN_HOST=_,window.__toAssetUrl=_=>window.CDN_HOST+_}try{let _=__DATA_HOST__;_=normalizePath(_),window.DATA_HOST=_}catch(_){window.DATA_HOST="/data/"}try{let _=__DATA_REGION__;window.DATA_REGION=_}catch(_){window.DATA_REGION="CN"}try{let _=__DEFAULT_LANG__;window.DEFAULT_LANG=_}catch(_){window.DEFAULT_LANG="en"}</script><script>!function(){localStorage.getItem("vueuse-color-scheme")||localStorage.setItem("vueuse-color-scheme","light");const e=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches,o=localStorage.getItem("vueuse-color-scheme")||"auto";("dark"===o||e&&"light"!==o)&&document.documentElement.classList.toggle("dark",!0)}()</script><script type="module" crossorigin src="https://cdn.jsdelivr.net/npm/@xcpcio/board-app@0.67.0/dist/assets/index-BhjhJlKm.js"></script><link rel="stylesheet" crossorigin href="https://cdn.jsdelivr.net/npm/@xcpcio/board-app@0.67.0/dist/assets/index-BGJAeisZ.css"><link rel="manifest" href="/manifest.webmanifest"></head><body class="font-sans"><noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-WHLF55BJ" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript><div id="app"></div><noscript>This website requires JavaScript to function properly. Please enable JavaScript to continue.</noscript><script>try{var umamiJSUrl=__UMAMI_JS_URL__,umamiWebsiteId=__UMAMI_WEBSITE_ID__;!function(){var e=document.createElement("script");e.src=umamiJSUrl,e.defer=!0,e.setAttribute("data-website-id",umamiWebsiteId);var t=document.getElementsByTagName("script")[0];t.parentNode.insertBefore(e,t)}()}catch(e){}try{var baiduAnalyticsId=__BAIDU_ANALYTICS_ID__,_hmt=_hmt||[];!function(){var e=document.createElement("script");e.src=`https://hm.baidu.com/hm.js?${baiduAnalyticsId}`;var t=document.getElementsByTagName("script")[0];t.parentNode.insertBefore(e,t)}()}catch(e){}</script></body></html>
|
package/dist/sw.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
if(!self.define){let s,e={};const l=(l,n)=>(l=new URL(l+".js",n).href,e[l]||new Promise((e=>{if("document"in self){const s=document.createElement("script");s.src=l,s.onload=e,document.head.appendChild(s)}else s=l,importScripts(l),e()})).then((()=>{let s=e[l];if(!s)throw new Error(`Module ${l} didn’t register its module`);return s})));self.define=(n,
|
|
1
|
+
if(!self.define){let s,e={};const l=(l,n)=>(l=new URL(l+".js",n).href,e[l]||new Promise((e=>{if("document"in self){const s=document.createElement("script");s.src=l,s.onload=e,document.head.appendChild(s)}else s=l,importScripts(l),e()})).then((()=>{let s=e[l];if(!s)throw new Error(`Module ${l} didn’t register its module`);return s})));self.define=(n,r)=>{const i=s||("document"in self?document.currentScript.src:"")||location.href;if(e[i])return;let u={};const t=s=>l(s,i),o={module:{uri:i},exports:u,require:t};e[i]=Promise.all(n.map((s=>o[s]||t(s)))).then((s=>(r(...s),u)))}}define(["./workbox-7ee6f867"],(function(s){"use strict";self.skipWaiting(),s.clientsClaim(),s.precacheAndRoute([{url:"assets/_..-5I0UWqRG.css",revision:null},{url:"assets/_...all_-CT8hHVGU.js",revision:null},{url:"assets/_...all_-DZI0_2zk.js",revision:null},{url:"assets/_name_-DjTA6573.js",revision:null},{url:"assets/_plugin-vue_export-helper-DlAUqK2U.js",revision:null},{url:"assets/about-jasx0wKW.js",revision:null},{url:"assets/Balloon.vue_vue_type_script_setup_true_lang-DfFF1Ks0.js",revision:null},{url:"assets/Board-3MaXb78m.js",revision:null},{url:"assets/Board-G4heBgt6.css",revision:null},{url:"assets/board-layout-DPzrecxe.js",revision:null},{url:"assets/board-WB70DN-I.js",revision:null},{url:"assets/constant-zXGoeSUs.js",revision:null},{url:"assets/contest-BrTkYMuZ.js",revision:null},{url:"assets/ContestStateBadge-BqhxSQpe.css",revision:null},{url:"assets/ContestStateBadge-Dx5wEApj.js",revision:null},{url:"assets/Countdown-Bl6KQRW4.js",revision:null},{url:"assets/Countdown-CGwMuG9S.css",revision:null},{url:"assets/DataSourceInput.vue_vue_type_script_setup_true_lang-DHdSK4c6.js",revision:null},{url:"assets/dayjs-ErfWoYIs.js",revision:null},{url:"assets/default-Dn8tKbdq.js",revision:null},{url:"assets/en-DYzJz2c1.js",revision:null},{url:"assets/Footer-Bg_bSWjB.js",revision:null},{url:"assets/headless-CRpCRK1t.js",revision:null},{url:"assets/home-CQBa08cQ.js",revision:null},{url:"assets/index-Bce8wPYb.css",revision:null},{url:"assets/index-BGJAeisZ.css",revision:null},{url:"assets/index-BhjhJlKm.js",revision:null},{url:"assets/index-D-msPqye.css",revision:null},{url:"assets/index-D1ZL4-kn.js",revision:null},{url:"assets/index-D2yB4w8u.js",revision:null},{url:"assets/index-DePS8wRD.js",revision:null},{url:"assets/index-DrRCpPOR.js",revision:null},{url:"assets/index-k7I8Lr2-.js",revision:null},{url:"assets/index-layout-D5b_XfR0.js",revision:null},{url:"assets/NavBar-aT2xEvYz.css",revision:null},{url:"assets/NavBar-cB_AhYzY.js",revision:null},{url:"assets/pagination-R1BztuTi.js",revision:null},{url:"assets/person-C-v09Xnw.js",revision:null},{url:"assets/query-Ci5JHK5f.js",revision:null},{url:"assets/rank-CzDyEdMa.js",revision:null},{url:"assets/Resolver-CcJz6DBo.js",revision:null},{url:"assets/Resolver-ZGkKM3bm.css",revision:null},{url:"assets/RightArrowIcon-DaCeCqSH.js",revision:null},{url:"assets/route-block-B_A1xBdJ.js",revision:null},{url:"assets/test-e-qOmGRY.js",revision:null},{url:"assets/TheInput.vue_vue_type_script_setup_true_lang-B8H-RmO4.js",revision:null},{url:"assets/Tooltip-DzyPDwbo.css",revision:null},{url:"assets/Tooltip.vue_vue_type_script_setup_true_lang-CrvtqC16.js",revision:null},{url:"assets/use-vmodel-B41hlwAY.js",revision:null},{url:"assets/user-Ht_z1r54.js",revision:null},{url:"assets/virtual_pwa-register-ddBGe6v9.js",revision:null},{url:"assets/workbox-window.prod.es5-CwtvwXb3.js",revision:null},{url:"assets/zh-CN-Cbd_t3aN.js",revision:null},{url:"index.html",revision:"1842f59d702add9e7ac5662e85a72ec6"},{url:"balloon2-192x192.png",revision:"c857ae6d9dfae118ab4397d4358422bd"},{url:"balloon2-512x512.png",revision:"065594f4f743fe3884793c03d3fe7d9e"},{url:"favicon.svg",revision:"5a744f4ccbb122d4a0575be779ddcd43"},{url:"safari-pinned-tab.svg",revision:"5eaf74d1c43d30e0af743b68a3f48504"},{url:"manifest.webmanifest",revision:"2a3579b4def3b981643d514aab210ae8"}],{}),s.cleanupOutdatedCaches(),s.registerRoute(new s.NavigationRoute(s.createHandlerBoundToURL("index.html")))}));
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xcpcio/board-app",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.67.0",
|
|
5
5
|
"description": "The ICPC Series Competition Leaderboard Visualization Engine",
|
|
6
6
|
"author": "Dup4 <hi@dup4.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -53,8 +53,8 @@
|
|
|
53
53
|
"vue-router": "^4.5.1",
|
|
54
54
|
"vue-search-select": "^3.2.0",
|
|
55
55
|
"vue-toast-notification": "^3.1.3",
|
|
56
|
-
"@xcpcio/core": "0.
|
|
57
|
-
"@xcpcio/types": "0.
|
|
56
|
+
"@xcpcio/core": "0.67.0",
|
|
57
|
+
"@xcpcio/types": "0.67.0"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
60
|
"@iconify/json": "^2.2.394",
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { Rank, Team } from "@xcpcio/core";
|
|
3
|
+
import type { Lang } from "@xcpcio/types";
|
|
4
|
+
|
|
5
|
+
const props = defineProps<{
|
|
6
|
+
rank: Rank;
|
|
7
|
+
team: Team;
|
|
8
|
+
}>();
|
|
9
|
+
|
|
10
|
+
const { t, locale } = useI18n();
|
|
11
|
+
const lang = computed(() => locale.value as unknown as Lang);
|
|
12
|
+
|
|
13
|
+
const rank = computed(() => props.rank);
|
|
14
|
+
const team = computed(() => props.team);
|
|
15
|
+
|
|
16
|
+
const photoLoadError = ref(false);
|
|
17
|
+
function handlePhotoError() {
|
|
18
|
+
photoLoadError.value = true;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
const hasPhoto = computed(() => {
|
|
22
|
+
if (team.value.missingPhoto || photoLoadError.value) {
|
|
23
|
+
return false;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
return rank.value.contest.options.teamPhotoTemplate || team.value.photo;
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
const teamPhoto = computed(() => {
|
|
30
|
+
if (team.value.photo?.url) {
|
|
31
|
+
return {
|
|
32
|
+
url: team.value.photo.url,
|
|
33
|
+
width: team.value.photo.width,
|
|
34
|
+
height: team.value.photo.height,
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
const template = rank.value.contest.options.teamPhotoTemplate;
|
|
39
|
+
if (template?.url) {
|
|
40
|
+
return {
|
|
41
|
+
url: template.url.replace(/\$\{team_id\}/, team.value.id),
|
|
42
|
+
width: template.width,
|
|
43
|
+
height: template.height,
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
return { url: "", width: undefined, height: undefined };
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
const groupNames = computed(() => {
|
|
51
|
+
return team.value.group
|
|
52
|
+
.map((groupId) => {
|
|
53
|
+
const group = rank.value.contest.group.get(groupId);
|
|
54
|
+
return group ? group.name.getOrDefault(lang.value) : groupId;
|
|
55
|
+
})
|
|
56
|
+
.join(", ");
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
const tableRows = computed(() => {
|
|
60
|
+
const rows = [
|
|
61
|
+
{ label: t("team_info.rank"), value: team.value.rank, show: true },
|
|
62
|
+
{ label: t("team_info.team_name"), value: team.value.name.getOrDefault(lang.value), show: true },
|
|
63
|
+
{ label: t("team_info.organization"), value: team.value.organization, show: !!team.value.organization },
|
|
64
|
+
{ label: t("team_info.group"), value: groupNames.value, show: team.value.group.length > 0 },
|
|
65
|
+
{ label: t("team_info.members"), value: team.value.membersToString(lang.value), show: team.value.members.length > 0 },
|
|
66
|
+
{ label: t("team_info.coaches"), value: team.value.coachesToString(lang.value), show: team.value.coaches.length > 0 },
|
|
67
|
+
{ label: t("team_info.location"), value: team.value.location, show: !!team.value.location },
|
|
68
|
+
];
|
|
69
|
+
return rows.filter(row => row.show);
|
|
70
|
+
});
|
|
71
|
+
</script>
|
|
72
|
+
|
|
73
|
+
<template>
|
|
74
|
+
<div
|
|
75
|
+
flex w-full
|
|
76
|
+
:class="hasPhoto ? 'flex-row gap-8' : 'justify-center'"
|
|
77
|
+
>
|
|
78
|
+
<div
|
|
79
|
+
:class="hasPhoto ? 'flex-1' : 'w-1/2'"
|
|
80
|
+
flex items-center justify-center
|
|
81
|
+
>
|
|
82
|
+
<table w-full text-lg text-left text-gray-900 dark:text-gray-100>
|
|
83
|
+
<tbody>
|
|
84
|
+
<tr
|
|
85
|
+
v-for="(row, index) in tableRows"
|
|
86
|
+
:key="row.label"
|
|
87
|
+
:class="index % 2 === 0 ? 'bg-gray-100 dark:bg-gray-700' : 'bg-white dark:bg-gray-800'"
|
|
88
|
+
>
|
|
89
|
+
<td px-4 py-2>
|
|
90
|
+
{{ row.label }}
|
|
91
|
+
</td>
|
|
92
|
+
<td px-4 py-2>
|
|
93
|
+
{{ row.value }}
|
|
94
|
+
</td>
|
|
95
|
+
</tr>
|
|
96
|
+
</tbody>
|
|
97
|
+
</table>
|
|
98
|
+
</div>
|
|
99
|
+
<div v-if="hasPhoto" flex-1>
|
|
100
|
+
<div flex items-center justify-center>
|
|
101
|
+
<a
|
|
102
|
+
class="max-w-[98%]"
|
|
103
|
+
target="_blank" rel="nofollow" :href="teamPhoto.url"
|
|
104
|
+
>
|
|
105
|
+
<img
|
|
106
|
+
:src="teamPhoto.url"
|
|
107
|
+
:width="teamPhoto.width"
|
|
108
|
+
:height="teamPhoto.height"
|
|
109
|
+
alt="team photo"
|
|
110
|
+
@error="handlePhotoError"
|
|
111
|
+
>
|
|
112
|
+
</a>
|
|
113
|
+
</div>
|
|
114
|
+
</div>
|
|
115
|
+
</div>
|
|
116
|
+
</template>
|
|
@@ -25,7 +25,7 @@ const isHidden = computed({
|
|
|
25
25
|
},
|
|
26
26
|
});
|
|
27
27
|
|
|
28
|
-
const currentType = ref("
|
|
28
|
+
const currentType = ref("info");
|
|
29
29
|
|
|
30
30
|
const rank = computed(() => props.rank);
|
|
31
31
|
const team = computed(() => props.team);
|
|
@@ -39,21 +39,14 @@ const headerTitle = computed(() => {
|
|
|
39
39
|
|
|
40
40
|
res += `${team.value.name.getOrDefault(lang.value)}`;
|
|
41
41
|
|
|
42
|
-
if (team.value.members && team.value.members.length > 0) {
|
|
43
|
-
res += ` - ${team.value.membersToString(lang.value)}`;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
if (team.value.coaches && team.value.coaches.length > 0) {
|
|
47
|
-
res += ` - ${team.value.coachesToString(lang.value)}(coach)`;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
42
|
return res;
|
|
51
43
|
});
|
|
52
44
|
|
|
45
|
+
const TYPE_INFO = "info";
|
|
53
46
|
const TYPE_SUBMISSIONS = "submissions";
|
|
54
47
|
const TYPE_STATISTICS = "statistics";
|
|
55
48
|
const TYPE_AWARDS = "awards";
|
|
56
|
-
const types = [TYPE_SUBMISSIONS, TYPE_STATISTICS, TYPE_AWARDS];
|
|
49
|
+
const types = [TYPE_INFO, TYPE_SUBMISSIONS, TYPE_STATISTICS, TYPE_AWARDS];
|
|
57
50
|
</script>
|
|
58
51
|
|
|
59
52
|
<template>
|
|
@@ -75,13 +68,13 @@ const types = [TYPE_SUBMISSIONS, TYPE_STATISTICS, TYPE_AWARDS];
|
|
|
75
68
|
space-y-3 md:space-y-0
|
|
76
69
|
>
|
|
77
70
|
<div
|
|
78
|
-
flex flex-row
|
|
79
|
-
space-x-
|
|
71
|
+
flex flex-row items-center justify-center
|
|
72
|
+
space-x-4
|
|
80
73
|
>
|
|
81
74
|
<Badge
|
|
82
75
|
v-if="team.badge"
|
|
83
76
|
:image="team.badge"
|
|
84
|
-
width-class="h-
|
|
77
|
+
width-class="h-16 w-16"
|
|
85
78
|
/>
|
|
86
79
|
|
|
87
80
|
<Tooltip>
|
|
@@ -120,6 +113,16 @@ const types = [TYPE_SUBMISSIONS, TYPE_STATISTICS, TYPE_AWARDS];
|
|
|
120
113
|
font-bold font-mono
|
|
121
114
|
flex items-center justify-center
|
|
122
115
|
>
|
|
116
|
+
<div
|
|
117
|
+
v-if="currentType === TYPE_INFO"
|
|
118
|
+
w-full
|
|
119
|
+
>
|
|
120
|
+
<TeamInfo
|
|
121
|
+
:rank="rank"
|
|
122
|
+
:team="team"
|
|
123
|
+
/>
|
|
124
|
+
</div>
|
|
125
|
+
|
|
123
126
|
<div
|
|
124
127
|
v-if="currentType === TYPE_SUBMISSIONS"
|
|
125
128
|
w-full
|
|
@@ -91,10 +91,11 @@ function isRenderByVisible() {
|
|
|
91
91
|
<td
|
|
92
92
|
v-if="rank.contest.badge && team.badge && isRenderByVisible()"
|
|
93
93
|
class="empty flex items-center justify-center"
|
|
94
|
+
style="padding: 0px !important; margin: 0px !important;"
|
|
94
95
|
>
|
|
95
96
|
<Badge
|
|
96
97
|
:image="team.badge"
|
|
97
|
-
width-class="
|
|
98
|
+
width-class="w-full h-full"
|
|
98
99
|
/>
|
|
99
100
|
</td>
|
|
100
101
|
<td
|
package/src/components.d.ts
CHANGED
|
@@ -60,6 +60,7 @@ declare module 'vue' {
|
|
|
60
60
|
SubmitHeatMap: typeof import('./components/board/SubmitHeatMap.vue')['default']
|
|
61
61
|
TablePagination: typeof import('./components/table/TablePagination.vue')['default']
|
|
62
62
|
TeamAwards: typeof import('./components/board/TeamAwards.vue')['default']
|
|
63
|
+
TeamInfo: typeof import('./components/board/TeamInfo.vue')['default']
|
|
63
64
|
TeamInfoModal: typeof import('./components/board/TeamInfoModal.vue')['default']
|
|
64
65
|
TeamProblemBlock: typeof import('./components/board/TeamProblemBlock.vue')['default']
|
|
65
66
|
TeamUI: typeof import('./components/board/TeamUI.vue')['default']
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{_ as i}from"./Board-sX3HmCh3.js";import{_ as u}from"./DataSourceInput.vue_vue_type_script_setup_true_lang-DVWnGqx-.js";import{g as f}from"./query-CDfDbkZE.js";import{d,c as e,o as t,a as n,q as l,h as a,F as B,G as g}from"./index-9_oqoLcR.js";import{b as c}from"./route-block-B_A1xBdJ.js";import{_ as h}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"./pagination-DnhQ5r1u.js";import"./Tooltip.vue_vue_type_script_setup_true_lang-D8Y2xuKM.js";import"./TheInput.vue_vue_type_script_setup_true_lang-C21qO8yZ.js";import"./use-vmodel-Bl_BJeQo.js";import"./rank-B4f6mi_k.js";import"./contest-CgNGJetR.js";import"./dayjs-Dk3pur30.js";import"./person-U3tcpMKk.js";import"./ContestStateBadge-Cad99MQ4.js";import"./constant-BWnqIcmY.js";const k={key:0},x=d({__name:"CustomBoard",setup(s){const o=f();return(r,b)=>{const _=u,p=i;return t(),e(B,null,[n(_),a(o).length>0?(t(),e("div",k,[n(p,{"data-source-url":a(o)},null,8,["data-source-url"])])):l("",!0)],64)}}}),m={};function C(s,o){const r=x;return t(),g(r)}typeof c=="function"&&c(m);const A=h(m,[["render",C]]);export{A as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const t={button:{about:{t:0,b:{t:2,i:[{t:3}],s:"About"}},back:{t:0,b:{t:2,i:[{t:3}],s:"Back"}},go:{t:0,b:{t:2,i:[{t:3}],s:"GO"}},home:{t:0,b:{t:2,i:[{t:3}],s:"Home"}},confirm:{t:0,b:{t:2,i:[{t:3}],s:"Confirm"}},cancel:{t:0,b:{t:2,i:[{t:3}],s:"Cancel"}},toggle_dark:{t:0,b:{t:2,i:[{t:3}],s:"Toggle dark mode"}},toggle_langs:{t:0,b:{t:2,i:[{t:3}],s:"Change languages"}}},intro:{desc:{t:0,b:{t:2,i:[{t:3}],s:"Opinionated Vite Starter Template"}},"dynamic-route":{t:0,b:{t:2,i:[{t:3}],s:"Demo of dynamic route"}},hi:{t:0,b:{t:2,i:[{t:3,v:"Hi, "},{t:4,k:"name"},{t:3,v:"!"}]}},aka:{t:0,b:{t:2,i:[{t:3}],s:"Also known as"}},"whats-your-name":{t:0,b:{t:2,i:[{t:3}],s:"What's your name?"}}},"not-found":{t:0,b:{t:2,i:[{t:3}],s:"Not found"}},common:{loading:{t:0,b:{t:2,i:[{t:3}],s:"Loading"}},colon:{t:0,b:{t:2,i:[{t:3}],s:":"}}},index:{start:{t:0,b:{t:2,i:[{t:3}],s:"StartTime"}},duration:{t:0,b:{t:2,i:[{t:3}],s:"Duration"}}},type_menu:{rank:{t:0,b:{t:2,i:[{t:3}],s:"Rank"}},submissions:{t:0,b:{t:2,i:[{t:3}],s:"Submissions"}},statistics:{t:0,b:{t:2,i:[{t:3}],s:"Statistics"}},balloon:{t:0,b:{t:2,i:[{t:3}],s:"Balloon"}},resolver:{t:0,b:{t:2,i:[{t:3}],s:"Resolver"}},filter:{t:0,b:{t:2,i:[{t:3}],s:"Filter"}},options:{t:0,b:{t:2,i:[{t:3}],s:"Options"}},awards:{t:0,b:{t:2,i:[{t:3}],s:"Awards"}},utility:{t:0,b:{t:2,i:[{t:3}],s:"Utility"}},countdown:{t:0,b:{t:2,i:[{t:3}],s:"Countdown"}}},utility:{tools:{t:0,b:{t:2,i:[{t:3}],s:"Tools"}},export:{t:0,b:{t:2,i:[{t:3}],s:"Export"}}},standings:{start_time:{t:0,b:{t:2,i:[{t:3}],s:"Start"}},end_time:{t:0,b:{t:2,i:[{t:3}],s:"End"}},elapsed:{t:0,b:{t:2,i:[{t:3}],s:"Elapsed"}},remaining:{t:0,b:{t:2,i:[{t:3}],s:"Remaining"}},place:{t:0,b:{t:2,i:[{t:3}],s:"Place"}},team:{t:0,b:{t:2,i:[{t:3}],s:"Team"}},solved:{t:0,b:{t:2,i:[{t:3}],s:"Solved"}},penalty:{t:0,b:{t:2,i:[{t:3}],s:"Penalty"}},dirt:{t:0,b:{t:2,i:[{t:3}],s:"Dirt"}},se:{t:0,b:{t:2,i:[{t:3}],s:"SE"}},statistics:{submitted:{t:0,b:{t:2,i:[{t:3}],s:"Submitted"}},attempted:{t:0,b:{t:2,i:[{t:3}],s:"Attempted"}},accepted:{t:0,b:{t:2,i:[{t:3}],s:"Accepted"}},dirt:{t:0,b:{t:2,i:[{t:3}],s:"Dirt"}},se:{t:0,b:{t:2,i:[{t:3}],s:"SE"}},first_solved:{t:0,b:{t:2,i:[{t:3}],s:"First Solved"}},last_solved:{t:0,b:{t:2,i:[{t:3}],s:"Last Solved"}},head_data:{problems:{t:0,b:{t:2,i:[{t:3}],s:"Problems"}},teams:{t:0,b:{t:2,i:[{t:3}],s:"Teams"}},submissions:{t:0,b:{t:2,i:[{t:3}],s:"Submissions"}}},submit_heatmap:{t:0,b:{t:2,i:[{t:3}],s:"Submit Heatmap"}}},options:{calculation_of_penalty:{t:0,b:{t:2,i:[{t:3}],s:"Calculation Of Penalty"}},in_minutes:{t:0,b:{t:2,i:[{t:3}],s:"in minutes"}},in_seconds:{t:0,b:{t:2,i:[{t:3}],s:"in seconds"}},accumulate_in_seconds_and_finally_to_the_minute:{t:0,b:{t:2,i:[{t:3}],s:"Accumulate in seconds and finally to the minute"}}}},submissions:{total_submissions:{t:0,b:{t:2,i:[{t:3}],s:"Total Submissions"}}}};export{t as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{_ as p}from"./Countdown-Dhia-u0Y.js";import{_ as d}from"./DataSourceInput.vue_vue_type_script_setup_true_lang-DVWnGqx-.js";import{g as f}from"./query-CDfDbkZE.js";import{d as l,c as t,o as e,F as h,q as s,h as n,b as C,a as r}from"./index-9_oqoLcR.js";import{b as a}from"./route-block-B_A1xBdJ.js";import{_ as g}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"./contest-CgNGJetR.js";import"./dayjs-Dk3pur30.js";import"./constant-BWnqIcmY.js";import"./TheInput.vue_vue_type_script_setup_true_lang-C21qO8yZ.js";import"./use-vmodel-Bl_BJeQo.js";const k={key:0},x={"mt-20":""},v={key:1},b=l({__name:"CustomCountdown",setup(m){const o=f();return(c,y)=>{const u=d,i=p;return e(),t(h,null,[n(o).length===0?(e(),t("div",k,[C("div",x,[r(u)])])):s("",!0),n(o).length>0?(e(),t("div",v,[r(i,{"data-source-url":n(o)},null,8,["data-source-url"])])):s("",!0)],64)}}}),_={};function w(m,o){const c=b;return e(),t("div",null,[r(c)])}typeof a=="function"&&a(_);const j=g(_,[["render",w]]);export{j as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{_ as u}from"./Resolver-Cu-OKY1L.js";import{_ as l}from"./DataSourceInput.vue_vue_type_script_setup_true_lang-DVWnGqx-.js";import{g as d}from"./query-CDfDbkZE.js";import{d as f,c as t,o as e,F as h,q as c,h as r,b as v,a as n}from"./index-9_oqoLcR.js";import{b as a}from"./route-block-B_A1xBdJ.js";import{_ as g}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"./contest-CgNGJetR.js";import"./dayjs-Dk3pur30.js";import"./rank-B4f6mi_k.js";import"./person-U3tcpMKk.js";import"./constant-BWnqIcmY.js";import"./TheInput.vue_vue_type_script_setup_true_lang-C21qO8yZ.js";import"./use-vmodel-Bl_BJeQo.js";const k={key:0},x={"mt-20":""},C={key:1},b=f({__name:"CustomResolver",setup(m){const o=d();return(s,B)=>{const i=l,p=u;return e(),t(h,null,[r(o).length===0?(e(),t("div",k,[v("div",x,[n(i)])])):c("",!0),r(o).length>0?(e(),t("div",C,[n(p,{"data-source-url":r(o)},null,8,["data-source-url"])])):c("",!0)],64)}}}),_={};function y(m,o){const s=b;return e(),t("div",null,[n(s)])}typeof a=="function"&&a(_);const z=g(_,[["render",y]]);export{z as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as H,_ as f,P as $,T as q,M as T,A as R}from"./contest-CgNGJetR.js";import{I as F}from"./dayjs-Dk3pur30.js";import{c as A}from"./person-U3tcpMKk.js";var n=(e=>(e.PENDING="PENDING",e.WAITING="WAITING",e.PREPARING="PREPARING",e.COMPILING="COMPILING",e.RUNNING="RUNNING",e.JUDGING="JUDGING",e.FROZEN="FROZEN",e.ACCEPTED="ACCEPTED",e.CORRECT="CORRECT",e.PARTIALLY_CORRECT="PARTIALLY_CORRECT",e.REJECTED="REJECTED",e.WRONG_ANSWER="WRONG_ANSWER",e.NO_OUTPUT="NO_OUTPUT",e.COMPILATION_ERROR="COMPILATION_ERROR",e.PRESENTATION_ERROR="PRESENTATION_ERROR",e.RUNTIME_ERROR="RUNTIME_ERROR",e.TIME_LIMIT_EXCEEDED="TIME_LIMIT_EXCEEDED",e.MEMORY_LIMIT_EXCEEDED="MEMORY_LIMIT_EXCEEDED",e.OUTPUT_LIMIT_EXCEEDED="OUTPUT_LIMIT_EXCEEDED",e.IDLENESS_LIMIT_EXCEEDED="IDLENESS_LIMIT_EXCEEDED",e.HACKED="HACKED",e.JUDGEMENT_FAILED="JUDGEMENT_FAILED",e.CONFIGURATION_ERROR="CONFIGURATION_ERROR",e.FILE_ERROR="FILE_ERROR",e.SYSTEM_ERROR="SYSTEM_ERROR",e.CANCELED="CANCELED",e.SKIPPED="SKIPPED",e.SECURITY_VIOLATED="SECURITY_VIOLATED",e.DENIAL_OF_JUDGEMENT="DENIAL_OF_JUDGEMENT",e.UNKNOWN="UNKNOWN",e.UNDEFINED="UNDEFINED",e))(n||{});const _t={PENDING:"Pending",WAITING:"Waiting",PREPARING:"Preparing",COMPILING:"Compiling",RUNNING:"Running",JUDGING:"Judging",FROZEN:"Frozen",ACCEPTED:"Accepted",CORRECT:"Correct",PARTIALLY_CORRECT:"Partially Correct",REJECTED:"Rejected",WRONG_ANSWER:"Wrong Answer",NO_OUTPUT:"No Output",COMPILATION_ERROR:"Compilation Error",PRESENTATION_ERROR:"Presentation Error",RUNTIME_ERROR:"Runtime Error",TIME_LIMIT_EXCEEDED:"Time Limit Exceeded",MEMORY_LIMIT_EXCEEDED:"Memory Limit Exceeded",OUTPUT_LIMIT_EXCEEDED:"Output Limit Exceeded",IDLENESS_LIMIT_EXCEEDED:"Idleness Limit Exceeded",HACKED:"Hacked",JUDGEMENT_FAILED:"Judgement Failed",CONFIGURATION_ERROR:"Configuration Error",FILE_ERROR:"File Error",SYSTEM_ERROR:"System Error",CANCELED:"Canceled",SKIPPED:"Skipped",SECURITY_VIOLATED:"Security Violated",DENIAL_OF_JUDGEMENT:"Denial Of Judgement",UNKNOWN:"Unknown",UNDEFINED:"Undefined"},Dt={PENDING:"PD",WAITING:"PD",PREPARING:"PD",COMPILING:"PD",RUNNING:"PD",JUDGING:"PD",FROZEN:"?",ACCEPTED:"AC",CORRECT:"AC",PARTIALLY_CORRECT:"RJ",REJECTED:"RJ",WRONG_ANSWER:"WA",NO_OUTPUT:"NO",COMPILATION_ERROR:"CE",PRESENTATION_ERROR:"PE",RUNTIME_ERROR:"RTE",TIME_LIMIT_EXCEEDED:"TLE",MEMORY_LIMIT_EXCEEDED:"MLE",OUTPUT_LIMIT_EXCEEDED:"OLE",IDLENESS_LIMIT_EXCEEDED:"ILE",HACKED:"RJ",JUDGEMENT_FAILED:"RJ",CONFIGURATION_ERROR:"RJ",FILE_ERROR:"RJ",SYSTEM_ERROR:"RJ",CANCELED:"RJ",SKIPPED:"RJ",SECURITY_VIOLATED:"RJ",DENIAL_OF_JUDGEMENT:"RJ",UNKNOWN:"RJ",UNDEFINED:"RJ"};function Q(e){return e=e.toUpperCase().replace(" ","_"),["OK","AC",n.ACCEPTED.toString()].includes(e)||[n.CORRECT.toString()].includes(e)?n.ACCEPTED:[n.PARTIALLY_CORRECT.toString()].includes(e)?n.PARTIALLY_CORRECT:["WA",n.WRONG_ANSWER.toString()].includes(e)?n.WRONG_ANSWER:["RJ","INCORRECT",n.REJECTED.toString()].includes(e)?n.REJECTED:["NO",n.NO_OUTPUT.toString()].includes(e)?n.NO_OUTPUT:["PD",n.PENDING.toString()].includes(e)?n.PENDING:[n.WAITING.toString()].includes(e)?n.WAITING:[n.JUDGING.toString()].includes(e)?n.JUDGING:[n.FROZEN.toString()].includes(e)?n.FROZEN:["CE",n.COMPILATION_ERROR.toString()].includes(e)?n.COMPILATION_ERROR:["PE",n.PRESENTATION_ERROR.toString()].includes(e)?n.PRESENTATION_ERROR:["TL","TLE",n.TIME_LIMIT_EXCEEDED.toString()].includes(e)?n.TIME_LIMIT_EXCEEDED:["ML","MLE",n.MEMORY_LIMIT_EXCEEDED.toString()].includes(e)?n.MEMORY_LIMIT_EXCEEDED:["OL","OLE",n.OUTPUT_LIMIT_EXCEEDED.toString()].includes(e)?n.OUTPUT_LIMIT_EXCEEDED:["IL","ILE",n.IDLENESS_LIMIT_EXCEEDED.toString()].includes(e)?n.IDLENESS_LIMIT_EXCEEDED:["RT","RE","RTE",n.RUNTIME_ERROR.toString()].includes(e)?n.RUNTIME_ERROR:["JE",n.JUDGEMENT_FAILED.toString()].includes(e)?n.JUDGEMENT_FAILED:["SE",n.SYSTEM_ERROR.toString()].includes(e)?n.SYSTEM_ERROR:[n.HACKED.toString()].includes(e)?n.HACKED:[n.CONFIGURATION_ERROR.toString()].includes(e)?n.CONFIGURATION_ERROR:[n.CANCELED.toString()].includes(e)?n.CANCELED:[n.SKIPPED.toString()].includes(e)?n.SKIPPED:[n.SECURITY_VIOLATED.toString()].includes(e)?n.SECURITY_VIOLATED:[n.DENIAL_OF_JUDGEMENT.toString()].includes(e)?n.DENIAL_OF_JUDGEMENT:n.UNKNOWN}function tt(e){return[n.ACCEPTED,n.CORRECT].includes(e)}function et(e){return[n.RUNTIME_ERROR,n.TIME_LIMIT_EXCEEDED,n.MEMORY_LIMIT_EXCEEDED,n.OUTPUT_LIMIT_EXCEEDED,n.IDLENESS_LIMIT_EXCEEDED,n.WRONG_ANSWER,n.REJECTED,n.NO_OUTPUT,n.JUDGEMENT_FAILED,n.HACKED].includes(e)}function it(e){return[n.PENDING,n.WAITING,n.COMPILING,n.JUDGING,n.FROZEN].includes(e)}function st(e){return[n.COMPILATION_ERROR,n.PRESENTATION_ERROR,n.CONFIGURATION_ERROR,n.SYSTEM_ERROR,n.CANCELED,n.SKIPPED,n.UNKNOWN,n.UNDEFINED].includes(e)}class b{constructor(){this.status=n.UNKNOWN,this.isIgnore=!1,this.isSolved=!1,this.isFirstSolved=!1,this.id="",this.teamId="",this.problemId="",this.timestamp=0,this.timestampUnit="second"}isAccepted(){return tt(this.status)}isRejected(){return et(this.status)}isPending(){return it(this.status)}isNotCalculatedPenaltyStatus(){return st(this.status)}get timestampToMinute(){return this.timestampUnit==="nanosecond"?Math.floor(this.timestamp/60/1e3/1e3/1e3):this.timestampUnit==="microsecond"?Math.floor(this.timestamp/60/1e3/1e3):this.timestampUnit==="millisecond"?Math.floor(this.timestamp/60/1e3):Math.floor(this.timestamp/60)}get timestampToSecond(){return this.timestampUnit==="nanosecond"?Math.floor(this.timestamp/1e3/1e3/1e3):this.timestampUnit==="microsecond"?Math.floor(this.timestamp/1e3/1e3):this.timestampUnit==="millisecond"?Math.floor(this.timestamp/1e3):this.timestamp}get timestampDisplayFormatWithSecond(){const t=this.timestampToSecond,i=Math.floor(t/3600),s=Math.floor(t%3600/60),r=t%60,a=m=>m.toString().padStart(2,"0");return`${a(i)}:${a(s)}:${a(r)}`}get timestampDisplayFormatWithMilliSecond(){let t=this.timestampDisplayFormatWithSecond;if(this.timestampUnit==="millisecond"){const i=(this.timestamp%1e3).toString().padStart(3,"0");t+=`.${i}`}return t}static compare(t,i){if(t.timestamp!==i.timestamp)return t.timestamp-i.timestamp;if(t.teamId===i.teamId){if(t.isAccepted()&&!i.isAccepted())return-1;if(!t.isAccepted()&&i.isAccepted())return 1}return t.id<i.id?-1:t.id===i.id?0:1}}function O(e,t){const i=new b;return i.id=String(e.id??e.submission_id??""),i.teamId=String(e.team_id),i.problemId=String(e.problem_id),i.timestamp=e.timestamp,i.status=Q(e.status),i.isIgnore=e.is_ignore??!1,e.time&&(i.time=e.time),e.language&&(i.language=e.language),e.reaction?i.reaction=e.reaction:t?.options.reactionVideoUrlTemplate&&(i.reaction={url:t.options.reactionVideoUrlTemplate.replace(/\$\{submission_id\}/,i.id)}),i}function Ct(e,t){return Array.isArray(e)?e.map((i,s)=>O({...i,id:i.submission_id??String(s)},t)):Object.entries(e).map(([s,r])=>O({...r,id:r.submission_id??s},t))}class p{constructor(){this.id="",this.name=new F,this.organization="",this.group=[],this.tag=[],this.coaches=[],this.members=[],this.rank=0,this.originalRank=0,this.organizationRank=-1,this.solvedProblemNum=0,this.attemptedProblemNum=0,this.lastSolvedProblem=null,this.lastSolvedProblemStatistics=null,this.penalty=0,this.problemStatistics=[],this.problemStatisticsMap=new Map,this.submissions=[],this.placeChartPoints=[],this.awards=[],this.missingPhoto=!1,this.se=0}reset(){this.rank=0,this.originalRank=0,this.organizationRank=-1,this.solvedProblemNum=0,this.attemptedProblemNum=0,this.lastSolvedProblem=null,this.lastSolvedProblemStatistics=null,this.penalty=0,this.problemStatistics=[],this.problemStatisticsMap=new Map,this.submissions=[],this.placeChartPoints=[],this.awards=[],this.se=0}get penaltyToMinute(){return Math.floor(this.penalty/60)}get isUnofficial(){return this.group.includes("unofficial")}get isGirl(){return this.group.includes("girl")}get isEffectiveTeam(){return this.solvedProblemNum>0}get dirt(){const t=this.attemptedProblemNum,i=this.solvedProblemNum;return H(t,i)}membersToString(t){return this.members.map(i=>i.name.getOrDefault(t)).join(", ")}coachesToString(t){return this.coaches.map(i=>i.name.getOrDefault(t)).join(", ")}calcSE(t){let i=0,s=0;if(this.problemStatistics.forEach(a=>{a.isSolved&&(i+=1,s+=a.problem.statistics.acceptedNum)}),t===0||i===0)return 0;const r=(i*t-s)/t/i;return this.se=Math.round(r*100)/100,this.se}calcSolvedData(t){this.solvedProblemNum=0,this.attemptedProblemNum=0,this.penalty=0;for(const i of this.problemStatistics)i.isAccepted&&(this.solvedProblemNum++,this.attemptedProblemNum+=i.failedCount+1,t?.calculationOfPenalty==="in_seconds"||t?.calculationOfPenalty==="accumulate_in_seconds_and_finally_to_the_minute"?this.penalty+=i.penaltyInSecond:this.penalty+=i.penalty);t?.calculationOfPenalty==="accumulate_in_seconds_and_finally_to_the_minute"&&(this.penalty=Math.floor(this.penalty/60)*60)}calcAwards(t){if(t)for(const i of t)this.rank>=i.minRank&&this.rank<=i.maxRank&&this.awards.push(i.medalType)}isEqualRank(t){return this.solvedProblemNum===t.solvedProblemNum&&this.penalty===t.penalty&&this.lastSolvedProblemStatistics?.solvedTimestampToMinute===t.lastSolvedProblemStatistics?.solvedTimestampToMinute}postProcessPlaceChartPoints(){if(this.placeChartPoints.length===0)return;const t=[];t.push(this.placeChartPoints[0]);for(let i=1;i<this.placeChartPoints.length-1;i++){const s=this.placeChartPoints[i],r=t[t.length-1];(s.rank!==r.rank||s.lastSolvedProblem!==r.lastSolvedProblem)&&t.push(s)}this.placeChartPoints.length>1&&t.push(this.placeChartPoints[this.placeChartPoints.length-1]),this.placeChartPoints=t}static compare(t,i){return t.solvedProblemNum!==i.solvedProblemNum?i.solvedProblemNum-t.solvedProblemNum:t.penalty!==i.penalty?t.penalty-i.penalty:t.lastSolvedProblemStatistics&&i.lastSolvedProblemStatistics?t.lastSolvedProblemStatistics.solvedTimestampToMinute-i.lastSolvedProblemStatistics.solvedTimestampToMinute:t.name<i.name?-1:t.name>i.name?1:0}}function M(e){const t=new p;t.id=e.id??e.team_id??"",t.name=F.fromIText(e.name??e.team_name??""),t.organization=e.organization??"",t.group=f.cloneDeep(e.group??[]),t.tag=f.cloneDeep(e.tag??[]),t.coaches=A(e.coach),t.members=A(e.members),e.official&&t.group.push("official"),e.unofficial&&t.group.push("unofficial"),e.girl&&t.group.push("girl");{const i=e;for(const s of Object.keys(i))(i[s]===1||i[s]===!0)&&t.group.push(s)}return t.group=[...new Set(t.group)],t.group.sort(),t.badge=e.badge,e.missing_photo&&(t.missingPhoto=!0),t.photo=e.photo,e.location&&(t.location=e.location),e.icpc_id&&(t.icpcID=e.icpc_id),t}function Pt(e){return Array.isArray(e)?e.map(t=>M(t)):Object.entries(e).map(([i,s])=>M({...s,team_id:s.team_id??i}))}class rt{constructor(){this.problem=new $,this.team=new p,this.submission=new b}get key(){return`balloon-${this.team.id}-${this.problem.id}`}static compare(t,i){return b.compare(t.submission,i.submission)}}const G="3.7.8",nt=G,h=typeof Buffer=="function",y=typeof TextDecoder=="function"?new TextDecoder:void 0,U=typeof TextEncoder=="function"?new TextEncoder:void 0,at="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",d=Array.prototype.slice.call(at),I=(e=>{let t={};return e.forEach((i,s)=>t[i]=s),t})(d),ot=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,u=String.fromCharCode.bind(String),L=typeof Uint8Array.from=="function"?Uint8Array.from.bind(Uint8Array):e=>new Uint8Array(Array.prototype.slice.call(e,0)),k=e=>e.replace(/=/g,"").replace(/[+\/]/g,t=>t=="+"?"-":"_"),w=e=>e.replace(/[^A-Za-z0-9\+\/]/g,""),B=e=>{let t,i,s,r,a="";const l=e.length%3;for(let m=0;m<e.length;){if((i=e.charCodeAt(m++))>255||(s=e.charCodeAt(m++))>255||(r=e.charCodeAt(m++))>255)throw new TypeError("invalid character found");t=i<<16|s<<8|r,a+=d[t>>18&63]+d[t>>12&63]+d[t>>6&63]+d[t&63]}return l?a.slice(0,l-3)+"===".substring(l):a},P=typeof btoa=="function"?e=>btoa(e):h?e=>Buffer.from(e,"binary").toString("base64"):B,D=h?e=>Buffer.from(e).toString("base64"):e=>{let i=[];for(let s=0,r=e.length;s<r;s+=4096)i.push(u.apply(null,e.subarray(s,s+4096)));return P(i.join(""))},N=(e,t=!1)=>t?k(D(e)):D(e),lt=e=>{if(e.length<2){var t=e.charCodeAt(0);return t<128?e:t<2048?u(192|t>>>6)+u(128|t&63):u(224|t>>>12&15)+u(128|t>>>6&63)+u(128|t&63)}else{var t=65536+(e.charCodeAt(0)-55296)*1024+(e.charCodeAt(1)-56320);return u(240|t>>>18&7)+u(128|t>>>12&63)+u(128|t>>>6&63)+u(128|t&63)}},mt=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,z=e=>e.replace(mt,lt),v=h?e=>Buffer.from(e,"utf8").toString("base64"):U?e=>D(U.encode(e)):e=>P(z(e)),E=(e,t=!1)=>t?k(v(e)):v(e),x=e=>E(e,!0),ct=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,ut=e=>{switch(e.length){case 4:var t=(7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3),i=t-65536;return u((i>>>10)+55296)+u((i&1023)+56320);case 3:return u((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return u((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},W=e=>e.replace(ct,ut),X=e=>{if(e=e.replace(/\s+/g,""),!ot.test(e))throw new TypeError("malformed base64.");e+="==".slice(2-(e.length&3));let t,i,s,r=[];for(let a=0;a<e.length;)t=I[e.charAt(a++)]<<18|I[e.charAt(a++)]<<12|(i=I[e.charAt(a++)])<<6|(s=I[e.charAt(a++)]),i===64?r.push(u(t>>16&255)):s===64?r.push(u(t>>16&255,t>>8&255)):r.push(u(t>>16&255,t>>8&255,t&255));return r.join("")},S=typeof atob=="function"?e=>atob(w(e)):h?e=>Buffer.from(e,"base64").toString("binary"):X,Y=h?e=>L(Buffer.from(e,"base64")):e=>L(S(e).split("").map(t=>t.charCodeAt(0))),K=e=>Y(j(e)),Et=h?e=>Buffer.from(e,"base64").toString("utf8"):y?e=>y.decode(Y(e)):e=>W(S(e)),j=e=>w(e.replace(/[-_]/g,t=>t=="-"?"+":"/")),C=e=>Et(j(e)),ht=e=>{if(typeof e!="string")return!1;const t=e.replace(/\s+/g,"").replace(/={0,2}$/,"");return!/[^\s0-9a-zA-Z\+/]/.test(t)||!/[^\s0-9a-zA-Z\-_]/.test(t)},V=e=>({value:e,enumerable:!1,writable:!0,configurable:!0}),Z=function(){const e=(t,i)=>Object.defineProperty(String.prototype,t,V(i));e("fromBase64",function(){return C(this)}),e("toBase64",function(t){return E(this,t)}),e("toBase64URI",function(){return E(this,!0)}),e("toBase64URL",function(){return E(this,!0)}),e("toUint8Array",function(){return K(this)})},J=function(){const e=(t,i)=>Object.defineProperty(Uint8Array.prototype,t,V(i));e("toBase64",function(t){return N(this,t)}),e("toBase64URI",function(){return N(this,!0)}),e("toBase64URL",function(){return N(this,!0)})},dt=()=>{Z(),J()},_={version:G,VERSION:nt,atob:S,atobPolyfill:X,btoa:P,btoaPolyfill:B,fromBase64:C,toBase64:E,encode:E,encodeURI:x,encodeURL:x,utob:z,btou:W,decode:C,isValid:ht,fromUint8Array:N,toUint8Array:K,extendString:Z,extendUint8Array:J,extendBuiltins:dt};var ft=(e=>(e[e.BLUE=0]="BLUE",e[e.RED=1]="RED",e))(ft||{});class g{constructor(t=0){this.type=t,this.name=`${t===0?"Blue":"Red"} Team`,this.teams=[],this.filterOrganizations=[],this.filterOrganizationMap=new Map,this.filterTeams=[],this.filterTeamMap=new Map}setFilterOrganizations(t){const i=new Map;t.forEach(s=>{i.set(s.value,s)}),this.filterOrganizations=t,this.filterOrganizationMap=i}setFilterTeams(t){const i=new Map;t.forEach(s=>{i.set(s.value,s)}),this.filterTeams=t,this.filterTeamMap=i}refreshName(){return this.filterOrganizations.length>0?this.name=this.filterOrganizations[0].text:this.name=`${this.type===0?"Blue":"Red"} Team`,this.name}get totalSolvedProblemNum(){let t=0;return this.teams.forEach(i=>{t+=i.solvedProblemNum}),t}get totalPenalty(){let t=0;return this.teams.forEach(i=>{t+=i.penaltyToMinute}),t}get totalPenaltyToString(){const t=this.totalPenalty,i=a=>a<10?`0${a}`:String(a),s=Math.floor(t/60),r=Math.floor(t%60);return[i(s),i(r)].join(":")}toJSON(){return{type:this.type,name:this.name,filterOrganizations:this.filterOrganizations,filterTeams:this.filterTeams}}}class pt{constructor(){this.enable=!1,this.topX=5,this.equalTeams=!0,this.persist=!1,this.blueTeam=new g(0),this.redTeam=new g(1)}ToBase64(){return _.encode(JSON.stringify(this))}FromBase64(t){if(t.length===0||_.isValid(t)===!1)return;const i=JSON.parse(_.decode(t));this.enable=i.enable,this.topX=i.topX,this.equalTeams=i.equalTeams,this.persist=i.persist,this.blueTeam=new g(0),this.blueTeam.name=i.blueTeam.name,this.blueTeam.setFilterOrganizations(i.blueTeam.filterOrganizations),this.blueTeam.setFilterTeams(i.blueTeam.filterTeams),this.redTeam=new g(1),this.redTeam.name=i.redTeam.name,this.redTeam.setFilterOrganizations(i.redTeam.filterOrganizations),this.redTeam.setFilterTeams(i.redTeam.filterTeams)}}class Tt{constructor(){this.teamSolvedNum=[],this.teamSolvedNumIndex=[],this.maxSolvedProblems=0,this.effectiveTeamNum=0,this.totalTeamNum=0}reset(){this.teamSolvedNum=[],this.teamSolvedNumIndex=[],this.maxSolvedProblems=0,this.effectiveTeamNum=0,this.totalTeamNum=0}getTeamSolvedNumIndex(t){return this.teamSolvedNumIndex[t]??0}}class Rt{constructor(){this.enableFilterSubmissionsByTimestamp=!1,this.width=0,this.timestamp=0,this.enableFilterTeamsByGroup=!1,this.group="all",this.filterOrganizations=[],this.filterOrganizationMap=new Map,this.filterTeams=[],this.filterTeamMap=new Map,this.enableAnimatedSubmissions=!1,this.battleOfGiants=new pt}setSelf(t){this.enableFilterSubmissionsByTimestamp=t.enableFilterSubmissionsByTimestamp,this.width=t.width,this.timestamp=t.timestamp,this.enableFilterTeamsByGroup=t.enableFilterTeamsByGroup,this.group=t.group,this.filterOrganizations=t.filterOrganizations,this.filterOrganizationMap=t.filterOrganizationMap,this.filterTeams=t.filterTeams,this.filterTeamMap=t.filterTeamMap,this.enableAnimatedSubmissions=t.enableAnimatedSubmissions,this.battleOfGiants=t.battleOfGiants}setWidth(t,i){this.width=t,this.timestamp=Math.floor((i.getEndTime().unix()-i.getStartTime().unix())*this.width*1e-4),this.enableFilterSubmissionsByTimestamp=!0}disableFilterSubmissionByTimestamp(){this.enableFilterSubmissionsByTimestamp=!1}setGroup(t){this.group=t,this.enableFilterTeamsByGroup=!0,this.group==="all"&&this.disableFilterTeamsByGroup()}disableFilterTeamsByGroup(){this.enableFilterTeamsByGroup=!1,this.group="all"}setFilterOrganizations(t){const i=new Map;t.forEach(s=>{i.set(s.value,s)}),this.filterOrganizations=t,this.filterOrganizationMap=i}setFilterTeams(t){const i=new Map;t.forEach(s=>{i.set(s.value,s)}),this.filterTeams=t,this.filterTeamMap=i}isNeedReBuildRank(t){return this.enableFilterSubmissionsByTimestamp!==t.enableFilterSubmissionsByTimestamp||this.width!==t.width||this.timestamp!==t.timestamp||this.enableFilterTeamsByGroup!==t.enableFilterTeamsByGroup||this.group!==t.group}}class St{constructor(t,i,s){this.contest=t,this.teams=f.cloneDeep(i),this.teamsMap=new Map(this.teams.map(r=>[r.id,r])),this.submissions=f.cloneDeep(s).sort(b.compare);{const r=this.contest.options,a=f.cloneDeep(r.submissionTimestampUnit);this.submissions.forEach(l=>{l.timestampUnit=a,l.time&&(r.submissionHasTimeField=!0),l.language&&(r.submissionHasLanguageField=!0)})}this.submissionsMap=new Map(this.submissions.map(r=>[r.id,r])),this.organizations=this.buildOrganizations(),this.originTeams=this.teams.map(r=>r),this.originTeams.sort(p.compare),this.rankStatistics=new Tt,this.options=new Rt,this.balloons=[];{const r=new Set;this.submissions.forEach(a=>{a.language&&r.add(a.language)}),this.languages=[...r].sort()}{const r=new Set;this.submissions.forEach(a=>{r.add(a.status)}),this.statuses=[...r].sort()}}cleanRank(){(()=>{this.teams=[];for(const[t,i]of this.teamsMap)this.filterTeamByOrg(i)||this.teams.push(i)})();for(const t of this.teams)t.reset(),t.problemStatistics=this.contest.problems.map(i=>{const s=new q;return s.problem=i,s.contestPenalty=this.contest.penalty,s}),t.problemStatisticsMap=new Map(t.problemStatistics.map(i=>[i.problem.id,i]));this.contest.problems.forEach(t=>{t.statistics.reset()})}buildRank(){return(()=>{this.cleanRank(),this.teams.forEach(s=>s.placeChartPoints.push({timePoint:0,rank:1,lastSolvedProblem:null})),this.rankStatistics.reset(),this.rankStatistics.teamSolvedNum=Array.from({length:this.contest.problems.length+1}).fill(0),this.rankStatistics.teamSolvedNumIndex=Array.from({length:this.contest.problems.length+1}).fill(0);let t=0;const i=this.getSubmissions();for(let s=0;s<i.length;s++){const r=i[s],a=r.teamId,l=r.problemId,m=this.teamsMap.get(a),c=this.contest.problemsMap.get(l);(()=>{if(m===void 0||this.filterTeamByOrg(m)||c===void 0)return;const o=m.problemStatisticsMap.get(l);if(o.submissions.push(r),m.submissions.push(r),c.statistics.submittedNum++,o.isSolved){r.isSolved=!1,r.isFirstSolved=!1;return}if(r.isIgnore||r.isNotCalculatedPenaltyStatus()){c.statistics.ignoreNum++,o.ignoreCount++;return}if(o.isSubmitted=!0,o.lastSubmitTimestamp=r.timestampToSecond,o.totalCount++,r.isAccepted()){for(r.isSolved=!0,o.isSolved=!0,o.solvedTimestamp=r.timestampToSecond,c.statistics.acceptedNum++,c.statistics.attemptedNum+=o.failedCount+1,(c.statistics.firstSolveSubmissions.length===0||c.statistics.firstSolveSubmissions[c.statistics.firstSolveSubmissions.length-1].timestamp===r.timestamp)&&(r.isFirstSolved=!0,o.isFirstSolved=!0,c.statistics.firstSolveSubmissions.push(r));c.statistics.lastSolveSubmissions.length>0;)c.statistics.lastSolveSubmissions.pop();c.statistics.lastSolveSubmissions.push(r),m.lastSolvedProblem=c,m.lastSolvedProblemStatistics=o}r.isRejected()&&(o.failedCount++,c.statistics.rejectedNum++),r.isPending()&&(o.pendingCount++,c.statistics.pendingNum++)})(),(r.timestampToMinute>t||s===i.length-1)&&(this.teams.forEach(o=>o.calcSolvedData(this.contest.options)),this.teams.sort(p.compare),this.buildTeamRank(),this.teams.forEach(o=>o.placeChartPoints.push({timePoint:r.timestampToMinute,rank:o.rank,lastSolvedProblem:o.lastSolvedProblem}))),t=r.timestampToMinute}this.teams.forEach(s=>s.calcSolvedData(this.contest.options)),this.teams.sort(p.compare),this.buildTeamRank(),this.buildOrgRank(),this.rankStatistics.effectiveTeamNum=this.teams.filter(s=>s.isEffectiveTeam).length,this.rankStatistics.totalTeamNum=this.teams.length,this.teams.forEach(s=>s.calcSE(this.rankStatistics.totalTeamNum)),this.contest.problems.forEach(s=>s.statistics.calcSE(this.rankStatistics.totalTeamNum)),this.buildAwards(),this.teams.forEach(s=>s.calcAwards(this.contest.awards?.get(this.options.group))),this.teams.forEach(s=>s.postProcessPlaceChartPoints())})(),(()=>{for(const t of this.teams)this.rankStatistics.teamSolvedNum[t.solvedProblemNum]++;{let t=0;const i=this.rankStatistics.teamSolvedNum,s=this.rankStatistics.teamSolvedNumIndex;for(let r=s.length-1;r>=0;r--)t+=i[r]>0?1:0,s[r]=t}this.teams.length>0&&(this.rankStatistics.maxSolvedProblems=this.teams[0].solvedProblemNum)})(),this}buildTeamRank(){let t=1,i=1,s=null;for(const r of this.teams)r.rank=t++,r.originalRank=i++,s!==null&&r.isEqualRank(s)&&(r.rank=s.rank),s=r}buildOrgRank(){if(!this.contest.organization)return;let t=1,i=null;const s=new Set;for(const r of this.teams){const a=r.organization;s.has(a)||(s.add(a),r.organizationRank=t++,i!==null&&r.isEqualRank(i)&&(r.organizationRank=i.organizationRank),i=r)}}buildOrganizations(){if(!this.contest.organization)return[];const t=new Array,i=new Set;return this.teams.forEach(s=>{const r=s.organization;i.has(r)||(t.push(r),i.add(r))}),t.sort(),t}buildAwards(){if(this.contest.medal==="ccpc"){this.contest.awards=new Map;const t=this.rankStatistics.effectiveTeamNum,i=[],s=new R,r=new R,a=new R,l=new R;s.medalType=T.GOLD,s.minRank=1,s.maxRank=Math.ceil(t*.1),s.maxRank>=s.minRank&&i.push(s),r.medalType=T.SILVER,r.minRank=s.maxRank+1,r.maxRank=Math.ceil(t*.3),r.maxRank>=r.minRank&&i.push(r),a.medalType=T.BRONZE,a.minRank=r.maxRank+1,a.maxRank=Math.ceil(t*.6),a.maxRank>=a.minRank&&i.push(a),l.medalType=T.HONORABLE,l.minRank=a.maxRank+1,this.teams.forEach(m=>{m.solvedProblemNum>0&&(l.maxRank=Math.max(l.maxRank,m.rank))}),l.maxRank>=l.minRank&&i.push(l),this.contest.awards.set("official",i)}}filterTeamByOrg(t){const i=this.options;return!!(i.enableFilterTeamsByGroup&&!t.group?.includes(i.group))}getSubmissions(){return this.contest.replayContestStartTimestamp===void 0&&this.options.enableFilterSubmissionsByTimestamp===!1?this.submissions:this.submissions.filter(t=>!(this.contest.replayContestStartTimestamp!==void 0&&t.timestampToSecond>this.contest.replayContestStartTimestamp||this.options.enableFilterSubmissionsByTimestamp&&t.timestampToSecond>this.options.timestamp))}buildBalloons(){this.balloons=[],this.cleanRank();const t=this.getSubmissions();for(let i=0;i<t.length;i++){const s=t[i],r=s.teamId,a=s.problemId,l=this.teamsMap.get(r),m=this.contest.problemsMap.get(a);(()=>{if(l===void 0||m===void 0)return;const c=l.problemStatisticsMap.get(a);if(!c.isSolved&&s.isAccepted()){c.isSolved=!0,c.solvedTimestamp=s.timestampToSecond;const o=new rt;o.team=l,o.problem=m,o.submission=s,this.balloons.push(o)}})()}}setReplayTime(t){this.contest.setReplayTime(t)}}export{rt as B,ft as G,St as R,n as S,p as T,Ct as a,st as b,Pt as c,it as d,Dt as e,b as f,et as g,_t as h,tt as i,Rt as j};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const t={button:{about:{t:0,b:{t:2,i:[{t:3}],s:"关于"}},back:{t:0,b:{t:2,i:[{t:3}],s:"返回"}},go:{t:0,b:{t:2,i:[{t:3}],s:"确定"}},home:{t:0,b:{t:2,i:[{t:3}],s:"首页"}},confirm:{t:0,b:{t:2,i:[{t:3}],s:"确认"}},cancel:{t:0,b:{t:2,i:[{t:3}],s:"取消"}},toggle_dark:{t:0,b:{t:2,i:[{t:3}],s:"切换深色模式"}},toggle_langs:{t:0,b:{t:2,i:[{t:3}],s:"切换语言"}}},intro:{desc:{t:0,b:{t:2,i:[{t:3}],s:"固执己见的 Vite 项目模板"}},"dynamic-route":{t:0,b:{t:2,i:[{t:3}],s:"动态路由演示"}},hi:{t:0,b:{t:2,i:[{t:3,v:"你好,"},{t:4,k:"name"}]}},aka:{t:0,b:{t:2,i:[{t:3}],s:"也叫"}},"whats-your-name":{t:0,b:{t:2,i:[{t:3}],s:"输入你的名字"}}},"not-found":{t:0,b:{t:2,i:[{t:3}],s:"未找到页面"}},common:{loading:{t:0,b:{t:2,i:[{t:3}],s:"加载中"}},colon:{t:0,b:{t:2,i:[{t:3}],s:":"}}},index:{start:{t:0,b:{t:2,i:[{t:3}],s:"开始时间"}},duration:{t:0,b:{t:2,i:[{t:3}],s:"持续时长"}}},type_menu:{rank:{t:0,b:{t:2,i:[{t:3}],s:"排名"}},submissions:{t:0,b:{t:2,i:[{t:3}],s:"提交"}},statistics:{t:0,b:{t:2,i:[{t:3}],s:"统计"}},balloon:{t:0,b:{t:2,i:[{t:3}],s:"气球"}},resolver:{t:0,b:{t:2,i:[{t:3}],s:"滚榜"}},filter:{t:0,b:{t:2,i:[{t:3}],s:"筛选"}},options:{t:0,b:{t:2,i:[{t:3}],s:"选项"}},awards:{t:0,b:{t:2,i:[{t:3}],s:"奖项"}},utility:{t:0,b:{t:2,i:[{t:3}],s:"工具"}},countdown:{t:0,b:{t:2,i:[{t:3}],s:"倒计时"}}},utility:{tools:{t:0,b:{t:2,i:[{t:3}],s:"工具集"}},export:{t:0,b:{t:2,i:[{t:3}],s:"导出"}}},standings:{start_time:{t:0,b:{t:2,i:[{t:3}],s:"开始时间"}},end_time:{t:0,b:{t:2,i:[{t:3}],s:"结束时间"}},elapsed:{t:0,b:{t:2,i:[{t:3}],s:"当前时间"}},remaining:{t:0,b:{t:2,i:[{t:3}],s:"剩余时间"}},place:{t:0,b:{t:2,i:[{t:3}],s:"Place"}},team:{t:0,b:{t:2,i:[{t:3}],s:"Team"}},solved:{t:0,b:{t:2,i:[{t:3}],s:"Solved"}},penalty:{t:0,b:{t:2,i:[{t:3}],s:"Penalty"}},dirt:{t:0,b:{t:2,i:[{t:3}],s:"Dirt"}},se:{t:0,b:{t:2,i:[{t:3}],s:"SE"}},statistics:{submitted:{t:0,b:{t:2,i:[{t:3}],s:"Submitted"}},attempted:{t:0,b:{t:2,i:[{t:3}],s:"Attempted"}},accepted:{t:0,b:{t:2,i:[{t:3}],s:"Accepted"}},dirt:{t:0,b:{t:2,i:[{t:3}],s:"Dirt"}},se:{t:0,b:{t:2,i:[{t:3}],s:"SE"}},first_solved:{t:0,b:{t:2,i:[{t:3}],s:"First Solved"}},last_solved:{t:0,b:{t:2,i:[{t:3}],s:"Last Solved"}},head_data:{problems:{t:0,b:{t:2,i:[{t:3}],s:"题目数"}},teams:{t:0,b:{t:2,i:[{t:3}],s:"队伍数"}},submissions:{t:0,b:{t:2,i:[{t:3}],s:"提交数"}}},submit_heatmap:{t:0,b:{t:2,i:[{t:3}],s:"提交热力图"}}},options:{calculation_of_penalty:{t:0,b:{t:2,i:[{t:3}],s:"罚时计算方式"}},in_minutes:{t:0,b:{t:2,i:[{t:3}],s:"精确到分钟进行累加"}},in_seconds:{t:0,b:{t:2,i:[{t:3}],s:"精确到秒进行累加"}},accumulate_in_seconds_and_finally_to_the_minute:{t:0,b:{t:2,i:[{t:3}],s:"精确到秒进行累加,最后精确到分钟"}}}},submissions:{total_submissions:{t:0,b:{t:2,i:[{t:3}],s:"总提交数"}}}};export{t as default};
|