@xcpcio/board-app 0.74.0 → 0.74.2

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.
Files changed (46) hide show
  1. package/dist/404.html +1 -1
  2. package/dist/assets/{Balloon.vue_vue_type_script_setup_true_lang-CeyD9H5H.js → Balloon.vue_vue_type_script_setup_true_lang-BVfUciQ-.js} +1 -1
  3. package/dist/assets/{Board-BFvoTH8d.js → Board-Czrq4DtS.js} +23 -23
  4. package/dist/assets/{ContestStateBadge-BR1f4Iq-.js → ContestStateBadge-BiHZXi73.js} +1 -1
  5. package/dist/assets/{Countdown-jAwRBsgJ.js → Countdown-Dpt0MI7P.js} +1 -1
  6. package/dist/assets/{DataSourceInput.vue_vue_type_script_setup_true_lang-kagtc8bk.js → DataSourceInput.vue_vue_type_script_setup_true_lang-D_o9JwYS.js} +1 -1
  7. package/dist/assets/{NavBar-BLPM7t11.js → NavBar-DPNugPx9.js} +1 -1
  8. package/dist/assets/{Resolver-C8uCNFNR.js → Resolver-Di5gzWKf.js} +1 -1
  9. package/dist/assets/{RightArrowIcon-CxTngzuT.js → RightArrowIcon-CAcphpMB.js} +1 -1
  10. package/dist/assets/{TheInput.vue_vue_type_script_setup_true_lang-MKAklEWs.js → TheInput.vue_vue_type_script_setup_true_lang-4EASslBu.js} +1 -1
  11. package/dist/assets/{Tooltip.vue_vue_type_script_setup_true_lang-BUnVSWCB.js → Tooltip.vue_vue_type_script_setup_true_lang-DqsW-ncZ.js} +1 -1
  12. package/dist/assets/{_...all_-CnkT4PVb.js → _...all_-BwXneS2r.js} +1 -1
  13. package/dist/assets/{_...all_-D7WBSwOv.js → _...all_-CHhcrOv6.js} +1 -1
  14. package/dist/assets/{board-layout-Bu9E-8ti.js → board-layout-h2COplO6.js} +1 -1
  15. package/dist/assets/constant-hbYXej-M.js +1 -0
  16. package/dist/assets/{dayjs-CsJI1pvO.js → dayjs-Crt-XxG9.js} +1 -1
  17. package/dist/assets/default-mCPNjTt4.js +1 -0
  18. package/dist/assets/{headless-D_J5o7dw.js → headless-CKpo5hWl.js} +1 -1
  19. package/dist/assets/{index-DlnVAFjF.js → index-BX7NLYCU.js} +1 -1
  20. package/dist/assets/index-CGO5s095.js +1 -0
  21. package/dist/assets/{index-8PXU_sno.js → index-Cl8ui4U3.js} +3 -3
  22. package/dist/assets/{index-CsWAnEBP.js → index-DUsX43ur.js} +1 -1
  23. package/dist/assets/index-D_cZ1LCV.js +1 -0
  24. package/dist/assets/{index-WgD2LlAm.js → index-DdX8qtp6.js} +1 -1
  25. package/dist/assets/{index-BVGQ976A.js → index-DoPOjLrQ.js} +1 -1
  26. package/dist/assets/{index-layout-maIkLl-c.js → index-layout-pjrmzbp0.js} +1 -1
  27. package/dist/assets/{pagination-z8KCjwk9.js → pagination-CeQCwn68.js} +1 -1
  28. package/dist/assets/{person-BKesfx6Y.js → person-DeEVCAi-.js} +1 -1
  29. package/dist/assets/{rank-DYdp7LSn.js → rank-CmURXpVL.js} +1 -1
  30. package/dist/assets/{use-vmodel-BLyWK6hZ.js → use-vmodel-B-AJYPXB.js} +1 -1
  31. package/dist/index.html +1 -1
  32. package/dist/sw.js +28 -0
  33. package/package.json +3 -3
  34. package/public/sw.js +28 -0
  35. package/src/components/board/ProblemInfoModal.vue +1 -7
  36. package/tsconfig.json +0 -1
  37. package/dist/assets/constant-z3sbugPT.js +0 -1
  38. package/dist/assets/default-CV0hqP0u.js +0 -1
  39. package/dist/assets/index-Bv_d-8W3.js +0 -1
  40. package/dist/assets/index-HBssAgsv.js +0 -1
  41. package/dist/pwa-192x192.png +0 -0
  42. package/dist/pwa-512x512.png +0 -0
  43. package/dist/safari-pinned-tab.svg +0 -41
  44. package/public/pwa-192x192.png +0 -0
  45. package/public/pwa-512x512.png +0 -0
  46. package/public/safari-pinned-tab.svg +0 -41
@@ -1 +1 @@
1
- import{j as u,k as A}from"./use-vmodel-BLyWK6hZ.js";import{e as F,h as B,m as n,U as G,D as V,c as v,o as g,b as c,I,n as D,u as x,q as E,F as X,t as k}from"./index-8PXU_sno.js";import{c as j,g as q}from"./dayjs-CsJI1pvO.js";import{_ as C}from"./_plugin-vue_export-helper-DlAUqK2U.js";function ae(s,e){return s?.url?!e||s.url.startsWith("http")?s.url:`${e}/${s.url}`:s?.base64?`data:image/${s.type??"png"};base64,${s.base64}`:""}const H=F({__name:"Progress",props:{width:null,state:null,needScroll:{type:Boolean},rank:null,rankOptions:null,elapsedTime:null},emits:["update:rank-options"],setup(s,{emit:e}){const t=s,M=e,h=B({get(){return t.rankOptions},set(l){M("update:rank-options",l)}}),N=B(()=>{switch(t.state){case u.PENDING:return"am-progress-bar-secondary";case u.RUNNING:return"am-progress-bar-success";case u.FROZEN:return"am-progress-bar-danger";case u.FINISHED:return"am-progress-bar-primary";case u.PAUSED:return"am-progress-bar-danger"}return""}),r=n(!1),S=n(!1),m=n(0),_=n(t.width),T=n(0),d=A(),o=n(null),L=n(null),p=n(null),W=n(null),U=n(null);function R(l){S.value=!0;const f=l.clientX-p.value.offsetLeft,b=w=>{if(!S.value)return;r.value=!0;let a=w.clientX-f;a=Math.max(a,0),a=Math.min(a,o.value.offsetWidth-p.value.offsetWidth);const $=o.value.offsetWidth*Number.parseInt(L.value.style?.width)*.01;a>=$&&(a=$,r.value=!1);let i=0;a>0&&(i=Math.round((a+p.value.offsetWidth)/o.value.offsetWidth*1e4)),i>1e4&&(i=1e4),i===1e4&&(r.value=!1),window.getSelection()?.removeAllRanges(),m.value=i,T.value=a,_.value=i*.01},y=()=>{document.removeEventListener("mouseup",y),document.removeEventListener("mousemove",b),S.value=!1,r.value===!0?(d.value=m.value,h.value?.setWidth(m.value,t.rank.contest)):(d.value=void 0,h.value?.disableFilterSubmissionByTimestamp())};document.addEventListener("mousemove",b),document.addEventListener("mouseup",y)}function z(){const l=t.rank.contest.getStartTime(),f=t.rank.contest.getEndTime(),b=f.unix()-l.unix(),y=Math.floor(b*_.value*.01),w=j(),a=Math.max(0,Math.min(w.unix(),f.unix())-l.unix());return q(Math.min(y,a))}function O(){return r.value===!0?z():t.elapsedTime}function P(){return r.value===!0?`${Math.max(0,T.value)}px`:`max(calc(0%), min(calc(${t.width}%), calc(100% - 10px)))`}return G(()=>{t.needScroll===!0&&(o.value.onmouseenter=()=>{W.value.classList.add("in")},o.value.onmouseleave=()=>{W.value.classList.remove("in")}),d.value!==-1?(r.value=!0,m.value=Math.max(0,Math.min(1e4,d.value)),_.value=m.value*.01,T.value=_.value*.01*o.value.offsetWidth-p.value.offsetWidth,h.value?.setWidth(d.value,t.rank.contest)):h.value?.disableFilterSubmissionByTimestamp()}),V(()=>{}),(l,f)=>(g(),v("div",{ref_key:"scroll",ref:o,class:"am-progress am-progress-striped am-active","w-full":"",style:{position:"relative"}},[c("div",{ref_key:"mask",ref:L,class:D(["am-progress-bar",[x(N)]]),style:I({width:`${t.width}%`})},[t.needScroll?(g(),v(X,{key:0},[c("div",{ref_key:"tooltip",ref:W,class:"tooltip tooltip-top",style:I({marginLeft:"-32px",bottom:"22px",left:P()})},[c("div",{ref_key:"tooltipInner",ref:U,class:"tooltip-inner"},k(O()),513)],4),c("div",{ref_key:"bar",ref:p,class:D(["am-progress-bar am-progress-cursor am-progress-scroll-size z-99",[x(N)]]),style:I({left:P()}),onMousedown:R},null,38)],64)):E("",!0)],6)],512))}}),ne=C(H,[["__scopeId","data-v-4607820e"]]),J={flex:"","flex-row":"","items-center":"","justify-center":""},Q={key:0,"ml-2":""},Z={key:1,"ml-2":""},K=F({__name:"ContestStateBadge",props:{state:null,pendingTime:null,pausedTime:null},setup(s){const e=s;return(t,M)=>(g(),v("div",J,[c("div",{class:D(["label",e.state])},null,2),c("div",null,k(e.state),1),e.pendingTime&&e.state===x(u).PENDING?(g(),v("div",Q,k(e.pendingTime),1)):E("",!0),e.pausedTime&&e.state===x(u).PAUSED?(g(),v("div",Z,k(e.pausedTime),1)):E("",!0)]))}}),re=C(K,[["__scopeId","data-v-68586c4d"]]);export{re as _,ne as a,ae as g};
1
+ import{j as u,k as A}from"./use-vmodel-B-AJYPXB.js";import{e as F,h as B,m as n,U as G,D as V,c as v,o as g,b as c,I,n as D,u as x,q as E,F as X,t as k}from"./index-Cl8ui4U3.js";import{c as j,g as q}from"./dayjs-Crt-XxG9.js";import{_ as C}from"./_plugin-vue_export-helper-DlAUqK2U.js";function ae(s,e){return s?.url?!e||s.url.startsWith("http")?s.url:`${e}/${s.url}`:s?.base64?`data:image/${s.type??"png"};base64,${s.base64}`:""}const H=F({__name:"Progress",props:{width:null,state:null,needScroll:{type:Boolean},rank:null,rankOptions:null,elapsedTime:null},emits:["update:rank-options"],setup(s,{emit:e}){const t=s,M=e,h=B({get(){return t.rankOptions},set(l){M("update:rank-options",l)}}),N=B(()=>{switch(t.state){case u.PENDING:return"am-progress-bar-secondary";case u.RUNNING:return"am-progress-bar-success";case u.FROZEN:return"am-progress-bar-danger";case u.FINISHED:return"am-progress-bar-primary";case u.PAUSED:return"am-progress-bar-danger"}return""}),r=n(!1),S=n(!1),m=n(0),_=n(t.width),T=n(0),d=A(),o=n(null),L=n(null),p=n(null),W=n(null),U=n(null);function R(l){S.value=!0;const f=l.clientX-p.value.offsetLeft,b=w=>{if(!S.value)return;r.value=!0;let a=w.clientX-f;a=Math.max(a,0),a=Math.min(a,o.value.offsetWidth-p.value.offsetWidth);const $=o.value.offsetWidth*Number.parseInt(L.value.style?.width)*.01;a>=$&&(a=$,r.value=!1);let i=0;a>0&&(i=Math.round((a+p.value.offsetWidth)/o.value.offsetWidth*1e4)),i>1e4&&(i=1e4),i===1e4&&(r.value=!1),window.getSelection()?.removeAllRanges(),m.value=i,T.value=a,_.value=i*.01},y=()=>{document.removeEventListener("mouseup",y),document.removeEventListener("mousemove",b),S.value=!1,r.value===!0?(d.value=m.value,h.value?.setWidth(m.value,t.rank.contest)):(d.value=void 0,h.value?.disableFilterSubmissionByTimestamp())};document.addEventListener("mousemove",b),document.addEventListener("mouseup",y)}function z(){const l=t.rank.contest.getStartTime(),f=t.rank.contest.getEndTime(),b=f.unix()-l.unix(),y=Math.floor(b*_.value*.01),w=j(),a=Math.max(0,Math.min(w.unix(),f.unix())-l.unix());return q(Math.min(y,a))}function O(){return r.value===!0?z():t.elapsedTime}function P(){return r.value===!0?`${Math.max(0,T.value)}px`:`max(calc(0%), min(calc(${t.width}%), calc(100% - 10px)))`}return G(()=>{t.needScroll===!0&&(o.value.onmouseenter=()=>{W.value.classList.add("in")},o.value.onmouseleave=()=>{W.value.classList.remove("in")}),d.value!==-1?(r.value=!0,m.value=Math.max(0,Math.min(1e4,d.value)),_.value=m.value*.01,T.value=_.value*.01*o.value.offsetWidth-p.value.offsetWidth,h.value?.setWidth(d.value,t.rank.contest)):h.value?.disableFilterSubmissionByTimestamp()}),V(()=>{}),(l,f)=>(g(),v("div",{ref_key:"scroll",ref:o,class:"am-progress am-progress-striped am-active","w-full":"",style:{position:"relative"}},[c("div",{ref_key:"mask",ref:L,class:D(["am-progress-bar",[x(N)]]),style:I({width:`${t.width}%`})},[t.needScroll?(g(),v(X,{key:0},[c("div",{ref_key:"tooltip",ref:W,class:"tooltip tooltip-top",style:I({marginLeft:"-32px",bottom:"22px",left:P()})},[c("div",{ref_key:"tooltipInner",ref:U,class:"tooltip-inner"},k(O()),513)],4),c("div",{ref_key:"bar",ref:p,class:D(["am-progress-bar am-progress-cursor am-progress-scroll-size z-99",[x(N)]]),style:I({left:P()}),onMousedown:R},null,38)],64)):E("",!0)],6)],512))}}),ne=C(H,[["__scopeId","data-v-4607820e"]]),J={flex:"","flex-row":"","items-center":"","justify-center":""},Q={key:0,"ml-2":""},Z={key:1,"ml-2":""},K=F({__name:"ContestStateBadge",props:{state:null,pendingTime:null,pausedTime:null},setup(s){const e=s;return(t,M)=>(g(),v("div",J,[c("div",{class:D(["label",e.state])},null,2),c("div",null,k(e.state),1),e.pendingTime&&e.state===x(u).PENDING?(g(),v("div",Q,k(e.pendingTime),1)):E("",!0),e.pausedTime&&e.state===x(u).PAUSED?(g(),v("div",Z,k(e.pausedTime),1)):E("",!0)]))}}),re=C(K,[["__scopeId","data-v-68586c4d"]]);export{re as _,ne as a,ae as g};
@@ -1 +1 @@
1
- import{c as h,j as y}from"./use-vmodel-BLyWK6hZ.js";import{e as S,f as k,h as N,A as w,m as l,C as T,c as o,o as n,u as t,b as a,q as D,t as c,n as d,s as E}from"./index-8PXU_sno.js";import{c as u}from"./constant-z3sbugPT.js";import{u as I}from"./TheInput.vue_vue_type_script_setup_true_lang-MKAklEWs.js";import{_ as B}from"./_plugin-vue_export-helper-DlAUqK2U.js";const U={class:"bg-[#323443]","text-gray-200":"","w-screen":"","h-screen":""},j={key:0},O={flex:"","flex-col":"","justify-center":"","items-center":"","w-screen":"","h-screen":"","text-xl":"",italic:""},b={key:0},F={key:1},L={flex:"","flex-col":"","items-center":"","justify-center":"","font-mono":""},P={key:0},V={key:1},$=S({__name:"Countdown",props:{dataSourceUrl:null},setup(_){const m=_,{t:f,locale:v}=k(),p=N(()=>v.value),g=w(u),s=E(),e=l({}),i=l(!1),{data:r,isError:x,error:C}=I(m.dataSourceUrl,s);return T(r,async()=>{r.value===null||r.value===void 0||(e.value=h(r.value?.contest),g.value=`${e.value.name.getOrDefault(p.value)} | ${u}`,i.value=!0)},{immediate:!0}),(q,z)=>(n(),o("div",U,[t(i)?(n(),o("div",F,[a("div",L,[a("div",{"mt-20":"","text-6xl":"",class:d([t(e).getContestState(t(s)).toString()])},c(t(e).getContestState(t(s))),3),a("div",{"mt-20":"",class:d(["text-[320px]",[t(e).getContestState(t(s)).toString()]])},[t(e).getContestState(t(s))===t(y).PENDING?(n(),o("div",P,c(t(e).getContestPendingTime(t(s))),1)):(n(),o("div",V,c(t(e).getContestElapsedTime(t(s))),1))],2)])])):(n(),o("div",j,[a("div",O,[a("div",null,c(t(f)("common.loading"))+"... ",1),t(x)?(n(),o("div",b,c(t(C)),1)):D("",!0)])]))]))}}),H=B($,[["__scopeId","data-v-22f76880"]]);export{H as _};
1
+ import{c as h,j as y}from"./use-vmodel-B-AJYPXB.js";import{e as S,f as k,h as N,A as w,m as l,C as T,c as o,o as n,u as t,b as a,q as D,t as c,n as d,s as E}from"./index-Cl8ui4U3.js";import{c as u}from"./constant-hbYXej-M.js";import{u as I}from"./TheInput.vue_vue_type_script_setup_true_lang-4EASslBu.js";import{_ as B}from"./_plugin-vue_export-helper-DlAUqK2U.js";const U={class:"bg-[#323443]","text-gray-200":"","w-screen":"","h-screen":""},j={key:0},O={flex:"","flex-col":"","justify-center":"","items-center":"","w-screen":"","h-screen":"","text-xl":"",italic:""},b={key:0},F={key:1},L={flex:"","flex-col":"","items-center":"","justify-center":"","font-mono":""},P={key:0},V={key:1},$=S({__name:"Countdown",props:{dataSourceUrl:null},setup(_){const m=_,{t:f,locale:v}=k(),p=N(()=>v.value),g=w(u),s=E(),e=l({}),i=l(!1),{data:r,isError:x,error:C}=I(m.dataSourceUrl,s);return T(r,async()=>{r.value===null||r.value===void 0||(e.value=h(r.value?.contest),g.value=`${e.value.name.getOrDefault(p.value)} | ${u}`,i.value=!0)},{immediate:!0}),(q,z)=>(n(),o("div",U,[t(i)?(n(),o("div",F,[a("div",L,[a("div",{"mt-20":"","text-6xl":"",class:d([t(e).getContestState(t(s)).toString()])},c(t(e).getContestState(t(s))),3),a("div",{"mt-20":"",class:d(["text-[320px]",[t(e).getContestState(t(s)).toString()]])},[t(e).getContestState(t(s))===t(y).PENDING?(n(),o("div",P,c(t(e).getContestPendingTime(t(s))),1)):(n(),o("div",V,c(t(e).getContestElapsedTime(t(s))),1))],2)])])):(n(),o("div",j,[a("div",O,[a("div",null,c(t(f)("common.loading"))+"... ",1),t(x)?(n(),o("div",b,c(t(C)),1)):D("",!0)])]))]))}}),H=B($,[["__scopeId","data-v-22f76880"]]);export{H as _};
@@ -1 +1 @@
1
- import{_ as p}from"./TheInput.vue_vue_type_script_setup_true_lang-MKAklEWs.js";import{e as f,f as _,m as b,i as h,H as v,c as S,q as x,u as a,o as y,b as t,a as U,$ as V,z as g,t as l}from"./index-8PXU_sno.js";import{b as k}from"./use-vmodel-BLyWK6hZ.js";const w={key:0,class:"flex flex-col items-center"},D={"w-128":""},I=["disabled"],u="Data Source URL",K=f({__name:"DataSourceInput",setup(R){const{t:r}=_(),s=k(),e=b(s.value),c=h(),d=v();function n(){d.push(`${c.fullPath}/?data-source=${e.value.trim()}`)}return($,o)=>{const i=p;return a(s).length===0?(y(),S("div",w,[t("div",D,[U(i,{modelValue:a(e),"onUpdate:modelValue":o[0]||(o[0]=m=>g(e)?e.value=m:null),"w-full":"",placeholder:u,autocomplete:"false",onKeydown:V(n,["enter"])},null,8,["modelValue"]),t("label",{class:"hidden",for:"input"},l(u))]),o[1]||(o[1]=t("div",{"py-2":""},null,-1)),t("div",null,[t("button",{"m-3":"","text-sm":"",btn:"",disabled:a(e).length===0,onClick:n},l(a(r)("button.go")),9,I)])])):x("",!0)}}});export{K as _};
1
+ import{_ as p}from"./TheInput.vue_vue_type_script_setup_true_lang-4EASslBu.js";import{e as f,f as _,m as b,i as h,H as v,c as S,q as x,u as a,o as y,b as t,a as U,$ as V,z as g,t as l}from"./index-Cl8ui4U3.js";import{b as k}from"./use-vmodel-B-AJYPXB.js";const w={key:0,class:"flex flex-col items-center"},D={"w-128":""},I=["disabled"],u="Data Source URL",K=f({__name:"DataSourceInput",setup(R){const{t:r}=_(),s=k(),e=b(s.value),c=h(),d=v();function n(){d.push(`${c.fullPath}/?data-source=${e.value.trim()}`)}return($,o)=>{const i=p;return a(s).length===0?(y(),S("div",w,[t("div",D,[U(i,{modelValue:a(e),"onUpdate:modelValue":o[0]||(o[0]=m=>g(e)?e.value=m:null),"w-full":"",placeholder:u,autocomplete:"false",onKeydown:V(n,["enter"])},null,8,["modelValue"]),t("label",{class:"hidden",for:"input"},l(u))]),o[1]||(o[1]=t("div",{"py-2":""},null,-1)),t("div",null,[t("button",{"m-3":"","text-sm":"",btn:"",disabled:a(e).length===0,onClick:n},l(a(r)("button.go")),9,I)])])):x("",!0)}}});export{K as _};
@@ -1 +1 @@
1
- import{_ as w}from"./Tooltip.vue_vue_type_script_setup_true_lang-BUnVSWCB.js";import{G as _,A as y,a as O,C as R,D as S,b as D,X as G}from"./constant-z3sbugPT.js";import{_ as g}from"./_plugin-vue_export-helper-DlAUqK2U.js";import{c as v,o as b,b as t,a,w as r,d,r as T,u as l,t as f,e as c,f as x,g as L,h as N,i as E,n as m,j as P,k as U,l as B}from"./index-8PXU_sno.js";const $={},j={"mt-8":"","py-4":"","md:py-8":"","lg:py-10":"","w-full":"",flex:"","justify-center":"","items-center":""},V={"text-center":"","w-full":""},X={"mb-6":"","w-full":"",flex:"","flex-wrap":"","items-center":"","justify-center":"","text-gray-900":"","dark:text-white":""},z={"mr-4":"","md:mr-6":""},M=["href"],W={flex:"","justify-center":"","items-start":"","flex-col":""},q={"mr-4":"","md:mr-6":""},F={flex:"","justify-center":"","items-start":"","flex-col":""},J={"text-sm":"","text-gray-500":"","sm:text-center":"","dark:text-gray-400":"","w-full":""};function K(n,o){const s=T("RouterLink"),u=w;return b(),v("footer",j,[t("div",V,[a(s,{flex:"","items-center":"","justify-center":"","text-2xl":"","font-semibold":"","text-gray-900":"","dark:text-white":"",to:"/"},{default:r(()=>[...o[0]||(o[0]=[t("div",{"i-ion-balloon-sharp":"","mr-4":"","h-8":""},null,-1),d(" Get more balloons ",-1)])]),_:1}),o[6]||(o[6]=t("p",{"my-6":"","text-gray-500":"","dark:text-gray-400":"","w-full":"",flex:"","justify-center":""}," The ICPC Series Competition Leaderboard Visualization Engine. ",-1)),t("ul",X,[t("li",null,[a(s,{to:"/","mr-4":"","md:mr-6":"","hover:underline":""},{default:r(()=>[...o[1]||(o[1]=[d(" Home ",-1)])]),_:1})]),t("li",null,[t("div",z,[a(u,null,{popper:r(()=>[t("div",W,[t("div",null,"Tag: "+f("APP_VERSION"in n?n.APP_VERSION:l(y)),1),t("div",null,"Sha: "+f("GITHUB_SHA"in n?n.GITHUB_SHA:l(O)),1)])]),default:r(()=>[t("a",{href:"GITHUB_URL"in n?n.GITHUB_URL:l(_),"hover:underline":"",rel:"noreferrer",target:"_blank",title:"GitHub"}," GitHub ",8,M)]),_:1})])]),t("li",null,[t("div",q,[a(u,null,{popper:r(()=>[t("div",F,[t("div",null,"CDN Host: "+f("CDN_HOST"in n?n.CDN_HOST:l(R)),1),t("div",null,"DATA Host: "+f("DATA_HOST"in n?n.DATA_HOST:l(S)),1),t("div",null,"Data Region: "+f("DATA_REGION"in n?n.DATA_REGION:l(D)),1)])]),default:r(()=>[o[2]||(o[2]=t("a",{href:"mailto:hi@dup4.com","hover:underline":""}," Contact ",-1))]),_:1})])])]),t("span",J,[o[4]||(o[4]=d("© 2020-PRESENT ",-1)),a(s,{to:"/","hover:underline":""},{default:r(()=>[...o[3]||(o[3]=[d("XCPCIO™",-1)])]),_:1}),o[5]||(o[5]=d(". All Rights Reserved.",-1))])])])}const st=g($,[["render",K]]),Q={class:"right","print:op0":""},Y=["title"],Z=["title"],tt=["href"],et=["href"],ot=c({__name:"NavBar",props:{width:null},setup(n){const o=n,{t:s,locale:u}=x(),{y:H}=L(),h=E();function C(){window.scrollTo({top:0,behavior:"smooth"})}async function k(){const i=U,e=i[(i.indexOf(u.value)+1)%i.length];await B(e),u.value=e}const A=N(()=>h.fullPath.startsWith("/rating")?"/rating":"/");return(i,e)=>{const I=T("RouterLink");return b(),v("header",{class:m(["header z-40",[o?.width??""]])},[t("button",{title:"Scroll to top",fixed:"","bottom-6":"","right-6":"","z-100":"","h-10":"","w-10":"","rounded-full":"",transition:"","duration-300":"","print:hidden":"","hover-bg-hex-8883":"","hover:op100":"",class:m(l(H)>300?"op30":"op0! pointer-events-none"),onClick:e[0]||(e[0]=p=>C())},[...e[3]||(e[3]=[t("div",{"i-ri-arrow-up-line":""},null,-1)])],2),t("nav",{class:m(["nav",[o?.width?"":"fixed"]]),"text-xl":""},[e[9]||(e[9]=t("div",{class:"spacer"},null,-1)),t("div",Q,[a(I,{"icon-btn":"",title:l(s)("button.home"),to:l(A),focusable:"false"},{default:r(()=>[...e[4]||(e[4]=[t("div",{"i-ion-balloon-sharp":""},null,-1)])]),_:1},8,["title","to"]),t("a",{"icon-btn":"",title:l(s)("button.toggle_langs"),onClick:e[1]||(e[1]=p=>k())},[...e[5]||(e[5]=[t("div",{"i-carbon-language":""},null,-1)])],8,Y),t("a",{"icon-btn":"",title:l(s)("button.toggle_dark"),onClick:e[2]||(e[2]=p=>("toggleDark"in i?i.toggleDark:l(P))())},[...e[6]||(e[6]=[t("div",{i:"carbon-sun dark:carbon-moon"},null,-1)])],8,Z),t("a",{"icon-btn":"",rel:"noreferrer",href:"GITHUB_URL"in i?i.GITHUB_URL:l(_),target:"_blank",title:"GitHub"},[...e[7]||(e[7]=[t("div",{"i-carbon-logo-github":""},null,-1)])],8,tt),t("a",{"icon-btn":"",rel:"noreferrer",href:"XCPCIO_HOME"in i?i.XCPCIO_HOME:l(G),target:"_blank",title:"GitHub"},[...e[8]||(e[8]=[t("div",{"i-simple-icons-githubsponsors":""},null,-1)])],8,et)])],2)],2)}}}),at=g(ot,[["__scopeId","data-v-f4512469"]]);export{at as _,st as a};
1
+ import{_ as w}from"./Tooltip.vue_vue_type_script_setup_true_lang-DqsW-ncZ.js";import{G as _,A as y,a as O,C as R,D as S,b as D,X as G}from"./constant-hbYXej-M.js";import{_ as g}from"./_plugin-vue_export-helper-DlAUqK2U.js";import{c as v,o as b,b as t,a,w as r,d,r as T,u as l,t as f,e as c,f as x,g as L,h as N,i as E,n as m,j as P,k as U,l as B}from"./index-Cl8ui4U3.js";const $={},j={"mt-8":"","py-4":"","md:py-8":"","lg:py-10":"","w-full":"",flex:"","justify-center":"","items-center":""},V={"text-center":"","w-full":""},X={"mb-6":"","w-full":"",flex:"","flex-wrap":"","items-center":"","justify-center":"","text-gray-900":"","dark:text-white":""},z={"mr-4":"","md:mr-6":""},M=["href"],W={flex:"","justify-center":"","items-start":"","flex-col":""},q={"mr-4":"","md:mr-6":""},F={flex:"","justify-center":"","items-start":"","flex-col":""},J={"text-sm":"","text-gray-500":"","sm:text-center":"","dark:text-gray-400":"","w-full":""};function K(n,o){const s=T("RouterLink"),u=w;return b(),v("footer",j,[t("div",V,[a(s,{flex:"","items-center":"","justify-center":"","text-2xl":"","font-semibold":"","text-gray-900":"","dark:text-white":"",to:"/"},{default:r(()=>[...o[0]||(o[0]=[t("div",{"i-ion-balloon-sharp":"","mr-4":"","h-8":""},null,-1),d(" Get more balloons ",-1)])]),_:1}),o[6]||(o[6]=t("p",{"my-6":"","text-gray-500":"","dark:text-gray-400":"","w-full":"",flex:"","justify-center":""}," The ICPC Series Competition Leaderboard Visualization Engine. ",-1)),t("ul",X,[t("li",null,[a(s,{to:"/","mr-4":"","md:mr-6":"","hover:underline":""},{default:r(()=>[...o[1]||(o[1]=[d(" Home ",-1)])]),_:1})]),t("li",null,[t("div",z,[a(u,null,{popper:r(()=>[t("div",W,[t("div",null,"Tag: "+f("APP_VERSION"in n?n.APP_VERSION:l(y)),1),t("div",null,"Sha: "+f("GITHUB_SHA"in n?n.GITHUB_SHA:l(O)),1)])]),default:r(()=>[t("a",{href:"GITHUB_URL"in n?n.GITHUB_URL:l(_),"hover:underline":"",rel:"noreferrer",target:"_blank",title:"GitHub"}," GitHub ",8,M)]),_:1})])]),t("li",null,[t("div",q,[a(u,null,{popper:r(()=>[t("div",F,[t("div",null,"CDN Host: "+f("CDN_HOST"in n?n.CDN_HOST:l(R)),1),t("div",null,"DATA Host: "+f("DATA_HOST"in n?n.DATA_HOST:l(S)),1),t("div",null,"Data Region: "+f("DATA_REGION"in n?n.DATA_REGION:l(D)),1)])]),default:r(()=>[o[2]||(o[2]=t("a",{href:"mailto:hi@dup4.com","hover:underline":""}," Contact ",-1))]),_:1})])])]),t("span",J,[o[4]||(o[4]=d("© 2020-PRESENT ",-1)),a(s,{to:"/","hover:underline":""},{default:r(()=>[...o[3]||(o[3]=[d("XCPCIO™",-1)])]),_:1}),o[5]||(o[5]=d(". All Rights Reserved.",-1))])])])}const st=g($,[["render",K]]),Q={class:"right","print:op0":""},Y=["title"],Z=["title"],tt=["href"],et=["href"],ot=c({__name:"NavBar",props:{width:null},setup(n){const o=n,{t:s,locale:u}=x(),{y:H}=L(),h=E();function C(){window.scrollTo({top:0,behavior:"smooth"})}async function k(){const i=U,e=i[(i.indexOf(u.value)+1)%i.length];await B(e),u.value=e}const A=N(()=>h.fullPath.startsWith("/rating")?"/rating":"/");return(i,e)=>{const I=T("RouterLink");return b(),v("header",{class:m(["header z-40",[o?.width??""]])},[t("button",{title:"Scroll to top",fixed:"","bottom-6":"","right-6":"","z-100":"","h-10":"","w-10":"","rounded-full":"",transition:"","duration-300":"","print:hidden":"","hover-bg-hex-8883":"","hover:op100":"",class:m(l(H)>300?"op30":"op0! pointer-events-none"),onClick:e[0]||(e[0]=p=>C())},[...e[3]||(e[3]=[t("div",{"i-ri-arrow-up-line":""},null,-1)])],2),t("nav",{class:m(["nav",[o?.width?"":"fixed"]]),"text-xl":""},[e[9]||(e[9]=t("div",{class:"spacer"},null,-1)),t("div",Q,[a(I,{"icon-btn":"",title:l(s)("button.home"),to:l(A),focusable:"false"},{default:r(()=>[...e[4]||(e[4]=[t("div",{"i-ion-balloon-sharp":""},null,-1)])]),_:1},8,["title","to"]),t("a",{"icon-btn":"",title:l(s)("button.toggle_langs"),onClick:e[1]||(e[1]=p=>k())},[...e[5]||(e[5]=[t("div",{"i-carbon-language":""},null,-1)])],8,Y),t("a",{"icon-btn":"",title:l(s)("button.toggle_dark"),onClick:e[2]||(e[2]=p=>("toggleDark"in i?i.toggleDark:l(P))())},[...e[6]||(e[6]=[t("div",{i:"carbon-sun dark:carbon-moon"},null,-1)])],8,Z),t("a",{"icon-btn":"",rel:"noreferrer",href:"GITHUB_URL"in i?i.GITHUB_URL:l(_),target:"_blank",title:"GitHub"},[...e[7]||(e[7]=[t("div",{"i-carbon-logo-github":""},null,-1)])],8,tt),t("a",{"icon-btn":"",rel:"noreferrer",href:"XCPCIO_HOME"in i?i.XCPCIO_HOME:l(G),target:"_blank",title:"GitHub"},[...e[8]||(e[8]=[t("div",{"i-simple-icons-githubsponsors":""},null,-1)])],8,et)])],2)],2)}}}),at=g(ot,[["__scopeId","data-v-f4512469"]]);export{at as _,st as a};
@@ -1,4 +1,4 @@
1
- import{e as _r,h as pe,m as mt,f as cr,c as Q,o as Z,n as oi,u as I,b as nt,t as gt,F as Qt,E as dr,q as me,d as Ie,A as bn,C as Qe,X as wn,a1 as Ee,U as kn,a as Yi,w as Sn,T as Pn,s as On}from"./index-8PXU_sno.js";import{_ as pr}from"./_plugin-vue_export-helper-DlAUqK2U.js";import{T as Xi,d as $i,c as Cn}from"./use-vmodel-BLyWK6hZ.js";import{T as Zt,R as Gi,f as Rn,c as Mn,a as Dn}from"./rank-DYdp7LSn.js";import{e as Wi}from"./constant-z3sbugPT.js";import{u as An}from"./TheInput.vue_vue_type_script_setup_true_lang-MKAklEWs.js";class In{constructor(){this.id=0,this.team=new Zt,this.problemIx=0,this.beforeTeamProblemStatistics=new Xi,this.afterTeamProblemStatistics=new Xi}}class En extends Gi{constructor(t,e,i){i.sort(Rn.compare);let r=i,n=i;{let s=t.unFreezeDurationTimestamp;t.options.submissionTimestampUnit==="millisecond"&&(s*=1e3),t.options.submissionTimestampUnit==="microsecond"&&(s*=1e6),t.options.submissionTimestampUnit==="nanosecond"&&(s*=1e9);const o=$i.sortedIndex(i.map(u=>u.timestamp),s);r=i.slice(0,o+1),n=i.slice(o,-1)}super(t,e,r),this.finalRank=new Gi(t,e,i),this.operations=[],this.beforeFreezeSubmissions=r,this.afterFreezeSubmissions=n}buildResolver(){this.buildRank(),this.finalRank.buildRank(),this.teams.forEach(t=>t.rank=t.originalRank),this.finalRank.teams.forEach(t=>t.rank=t.originalRank);for(const t of this.afterFreezeSubmissions){const e=t.teamId,i=t.problemId,r=this.teamsMap.get(e),n=this.contest.problemsMap.get(i);if(r===void 0||n===void 0)continue;const s=r.problemStatisticsMap.get(i);s.pendingCount++,s.totalCount++,s.isAccepted||(s.lastSubmitTimestamp=t.timestamp)}{const t=$i.cloneDeep(this.teams);for(let e=this.teams.length-1;e>=0;){const i=t[e],r=i.id;let n=0,s=-1;for(const o of i.problemStatistics){if(s++,!o.isPending)continue;n++;const u=this.teamsMap.get(r)?.problemStatistics[s],l=this.finalRank.teamsMap.get(r)?.problemStatistics[s],f=new In;f.id=this.operations.length,f.team=this.teamsMap.get(r),f.problemIx=s,f.beforeTeamProblemStatistics=u,f.afterTeamProblemStatistics=l,this.operations.push(f),i.problemStatistics[s]=l,i.calcSolvedData(this.contest.options);break}{let o=e;for(;o>0&&Zt.compare(t[o],t[o-1])<0;)[t[o],t[o-1]]=[t[o-1],t[o]],o--}n===0&&e--}}}}class Fn extends En{constructor(t,e,i){super(t,e,i),this.FLASHING_TIME_MS=100,this.ROLLING_TIME_MS=600,this.maxIndex=0,this.currentIndex=0,this.maxOpIndex=0,this.currentOpIndex=0,this.oldRank=-1,this.newRank=-1,this.currentTeamId="",this.currentProblemIndex=-1,this.problemFlashingEnded=!0,this.duringAnimation=!1,this.startScrollUp=!1,this.startScrollDown=!1}buildResolver(){super.buildResolver(),this.maxIndex=this.teams.length-1,this.currentIndex=this.maxIndex,this.maxOpIndex=this.operations.length-1,this.currentOpIndex=0,this.oldRank=-1,this.newRank=-1,this.currentTeamId="",this.currentProblemIndex=-1,this.problemFlashingEnded=!0,this.duringAnimation=!1,this.startScrollUp=!1,this.startScrollDown=!1}next(){if(this.duringAnimation)return;if(this.currentOpIndex>this.maxOpIndex){this.currentIndex>0&&this.currentIndex--;return}const t=this.operations[this.currentOpIndex],e=t.problemIx,i=t.team.id,r=this.teamsMap.get(i),n=r.rank;if(this.currentIndex+1>n){this.currentIndex--;return}if(this.currentIndex+1===n){r.problemStatistics[e]=t.afterTeamProblemStatistics,r.calcSolvedData(this.contest.options),this.currentProblemIndex=e,this.currentTeamId=i;{this.oldRank=r.rank,this.newRank=this.oldRank;for(let s=this.currentIndex-1;s>=0&&Zt.compare(r,this.teams[s])<0;s--)this.newRank=this.teams[s].rank}this.currentOpIndex++;{let s=this.oldRank-1;for(;s>=0&&Zt.compare(this.teams[s],this.teams[s-1])<0;)[this.teams[s],this.teams[s-1]]=[this.teams[s-1],this.teams[s]],this.teams[s].rank=s+1,this.teams[s-1].rank=s,s--}}}rewind(){if(this.duringAnimation||this.currentOpIndex<1)return;this.currentOpIndex--;const t=this.operations[this.currentOpIndex],e=t.problemIx,i=t.team.id,r=this.teamsMap.get(i);r.problemStatistics[e]=t.beforeTeamProblemStatistics,r.calcSolvedData(this.contest.options),this.currentProblemIndex=e,this.currentTeamId=i;{this.oldRank=r.rank,this.newRank=this.oldRank;for(let n=this.currentIndex+1;n<=this.maxIndex&&Zt.compare(r,this.teams[n])>0;n++)this.newRank=this.teams[n].rank}{let n=this.oldRank-1,s=n;for(;n<this.maxIndex&&Zt.compare(this.teams[n],this.teams[n+1])>0;)[this.teams[n],this.teams[n+1]]=[this.teams[n+1],this.teams[n]],this.teams[n].rank=n+1,this.teams[n+1].rank=n+2,s=n+1,n++;this.currentIndex=s}}}const zn={"w-20":"",flex:"","flex-shrink-0":"","justify-center":"","items-center":""},Ln={flex:"","flex-1":"","flex-col":"","justify-center":"","items-start":"","gap-y-3":""},Nn={class:"resolver-team-name",truncate:"","overflow-hidden":""},Bn={flex:"","flex-row":"","text-sm":"","items-start":"","gap-x-2":""},Un={"w-48":"",flex:"","flex-shrink-0":"","flex-row":"","justify-start":"","items-center":""},Vn={class:"w-1/3"},Yn={class:"w-2/3"},Xn=_r({__name:"ResolverTeamRow",props:{index:null,team:null,resolver:null},setup(a){const t=a,e=pe(()=>t.index),i=pe(()=>t.team),r=pe(()=>t.resolver),n=mt(null),{locale:s}=cr(),o=pe(()=>s.value);function u(l){return[l.organization?.name.getOrDefault(o.value),l.name.getOrDefault(o.value)].filter(_=>_).join(" - ")}return(l,f)=>(Z(),Q("div",{ref_key:"el",ref:n,"h-24":""},[(Z(),Q("div",{key:0,"h-24":"",flex:"","flex-row":"","gap-x-4":"","font-mono":"","text-4xl":"",class:oi([I(e)%2===0?"bg-resolver-bg-zero":"bg-resolver-bg-one",I(r).duringAnimation&&I(r).currentTeamId===I(i).id?"bg-resolver-selected":"",!I(r).duringAnimation&&I(e)===I(r).currentIndex?"bg-resolver-selected":""])},[nt("div",zn,[nt("div",null,gt(I(i).rank),1)]),nt("div",Ln,[nt("div",Nn,gt(u(I(i))),1),nt("div",Bn,[(Z(!0),Q(Qt,null,dr(I(i).problemStatistics,(_,c)=>(Z(),Q("div",{key:_.problem.id,class:oi(["rounded w-22 h-7 flex justify-center items-center",[_.isAccepted?"bg-resolver-ac":"",_.isWrongAnswer?"bg-resolver-wa":"",_.isPending?"bg-resolver-pending":"",_.isUnSubmitted?"bg-resolver-untouched":"",I(r).problemFlashingEnded===!1&&I(e)===I(r).currentIndex&&I(r).currentProblemIndex===c?"resolver-uncover":""]])},[_.isAccepted?(Z(),Q(Qt,{key:0},[Ie(gt(`${_.failedCount+Number(_.isAccepted)}/${Math.floor(_.lastSubmitTimestamp/60)}`),1)],64)):me("",!0),_.isWrongAnswer?(Z(),Q(Qt,{key:1},[Ie(gt(`${_.failedCount}/${Math.floor(_.lastSubmitTimestamp/60)}`),1)],64)):me("",!0),_.isPending?(Z(),Q(Qt,{key:2},[Ie(gt(`${_.failedCount} + ${_.pendingCount}`),1)],64)):me("",!0),_.isUnSubmitted?(Z(),Q(Qt,{key:3},[Ie(gt(_.problem.label),1)],64)):me("",!0)],2))),128))])]),nt("div",Un,[nt("div",Vn,gt(I(i).solvedProblemNum),1),nt("div",Yn,gt(I(i).penaltyToMinute),1)])],2))],512))}}),$n=pr(Xn,[["__scopeId","data-v-672c0a86"]]);function kt(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}function mr(a,t){a.prototype=Object.create(t.prototype),a.prototype.constructor=a,a.__proto__=t}/*!
1
+ import{e as _r,h as pe,m as mt,f as cr,c as Q,o as Z,n as oi,u as I,b as nt,t as gt,F as Qt,E as dr,q as me,d as Ie,A as bn,C as Qe,X as wn,a1 as Ee,U as kn,a as Yi,w as Sn,T as Pn,s as On}from"./index-Cl8ui4U3.js";import{_ as pr}from"./_plugin-vue_export-helper-DlAUqK2U.js";import{T as Xi,d as $i,c as Cn}from"./use-vmodel-B-AJYPXB.js";import{T as Zt,R as Gi,f as Rn,c as Mn,a as Dn}from"./rank-CmURXpVL.js";import{e as Wi}from"./constant-hbYXej-M.js";import{u as An}from"./TheInput.vue_vue_type_script_setup_true_lang-4EASslBu.js";class In{constructor(){this.id=0,this.team=new Zt,this.problemIx=0,this.beforeTeamProblemStatistics=new Xi,this.afterTeamProblemStatistics=new Xi}}class En extends Gi{constructor(t,e,i){i.sort(Rn.compare);let r=i,n=i;{let s=t.unFreezeDurationTimestamp;t.options.submissionTimestampUnit==="millisecond"&&(s*=1e3),t.options.submissionTimestampUnit==="microsecond"&&(s*=1e6),t.options.submissionTimestampUnit==="nanosecond"&&(s*=1e9);const o=$i.sortedIndex(i.map(u=>u.timestamp),s);r=i.slice(0,o+1),n=i.slice(o,-1)}super(t,e,r),this.finalRank=new Gi(t,e,i),this.operations=[],this.beforeFreezeSubmissions=r,this.afterFreezeSubmissions=n}buildResolver(){this.buildRank(),this.finalRank.buildRank(),this.teams.forEach(t=>t.rank=t.originalRank),this.finalRank.teams.forEach(t=>t.rank=t.originalRank);for(const t of this.afterFreezeSubmissions){const e=t.teamId,i=t.problemId,r=this.teamsMap.get(e),n=this.contest.problemsMap.get(i);if(r===void 0||n===void 0)continue;const s=r.problemStatisticsMap.get(i);s.pendingCount++,s.totalCount++,s.isAccepted||(s.lastSubmitTimestamp=t.timestamp)}{const t=$i.cloneDeep(this.teams);for(let e=this.teams.length-1;e>=0;){const i=t[e],r=i.id;let n=0,s=-1;for(const o of i.problemStatistics){if(s++,!o.isPending)continue;n++;const u=this.teamsMap.get(r)?.problemStatistics[s],l=this.finalRank.teamsMap.get(r)?.problemStatistics[s],f=new In;f.id=this.operations.length,f.team=this.teamsMap.get(r),f.problemIx=s,f.beforeTeamProblemStatistics=u,f.afterTeamProblemStatistics=l,this.operations.push(f),i.problemStatistics[s]=l,i.calcSolvedData(this.contest.options);break}{let o=e;for(;o>0&&Zt.compare(t[o],t[o-1])<0;)[t[o],t[o-1]]=[t[o-1],t[o]],o--}n===0&&e--}}}}class Fn extends En{constructor(t,e,i){super(t,e,i),this.FLASHING_TIME_MS=100,this.ROLLING_TIME_MS=600,this.maxIndex=0,this.currentIndex=0,this.maxOpIndex=0,this.currentOpIndex=0,this.oldRank=-1,this.newRank=-1,this.currentTeamId="",this.currentProblemIndex=-1,this.problemFlashingEnded=!0,this.duringAnimation=!1,this.startScrollUp=!1,this.startScrollDown=!1}buildResolver(){super.buildResolver(),this.maxIndex=this.teams.length-1,this.currentIndex=this.maxIndex,this.maxOpIndex=this.operations.length-1,this.currentOpIndex=0,this.oldRank=-1,this.newRank=-1,this.currentTeamId="",this.currentProblemIndex=-1,this.problemFlashingEnded=!0,this.duringAnimation=!1,this.startScrollUp=!1,this.startScrollDown=!1}next(){if(this.duringAnimation)return;if(this.currentOpIndex>this.maxOpIndex){this.currentIndex>0&&this.currentIndex--;return}const t=this.operations[this.currentOpIndex],e=t.problemIx,i=t.team.id,r=this.teamsMap.get(i),n=r.rank;if(this.currentIndex+1>n){this.currentIndex--;return}if(this.currentIndex+1===n){r.problemStatistics[e]=t.afterTeamProblemStatistics,r.calcSolvedData(this.contest.options),this.currentProblemIndex=e,this.currentTeamId=i;{this.oldRank=r.rank,this.newRank=this.oldRank;for(let s=this.currentIndex-1;s>=0&&Zt.compare(r,this.teams[s])<0;s--)this.newRank=this.teams[s].rank}this.currentOpIndex++;{let s=this.oldRank-1;for(;s>=0&&Zt.compare(this.teams[s],this.teams[s-1])<0;)[this.teams[s],this.teams[s-1]]=[this.teams[s-1],this.teams[s]],this.teams[s].rank=s+1,this.teams[s-1].rank=s,s--}}}rewind(){if(this.duringAnimation||this.currentOpIndex<1)return;this.currentOpIndex--;const t=this.operations[this.currentOpIndex],e=t.problemIx,i=t.team.id,r=this.teamsMap.get(i);r.problemStatistics[e]=t.beforeTeamProblemStatistics,r.calcSolvedData(this.contest.options),this.currentProblemIndex=e,this.currentTeamId=i;{this.oldRank=r.rank,this.newRank=this.oldRank;for(let n=this.currentIndex+1;n<=this.maxIndex&&Zt.compare(r,this.teams[n])>0;n++)this.newRank=this.teams[n].rank}{let n=this.oldRank-1,s=n;for(;n<this.maxIndex&&Zt.compare(this.teams[n],this.teams[n+1])>0;)[this.teams[n],this.teams[n+1]]=[this.teams[n+1],this.teams[n]],this.teams[n].rank=n+1,this.teams[n+1].rank=n+2,s=n+1,n++;this.currentIndex=s}}}const zn={"w-20":"",flex:"","flex-shrink-0":"","justify-center":"","items-center":""},Ln={flex:"","flex-1":"","flex-col":"","justify-center":"","items-start":"","gap-y-3":""},Nn={class:"resolver-team-name",truncate:"","overflow-hidden":""},Bn={flex:"","flex-row":"","text-sm":"","items-start":"","gap-x-2":""},Un={"w-48":"",flex:"","flex-shrink-0":"","flex-row":"","justify-start":"","items-center":""},Vn={class:"w-1/3"},Yn={class:"w-2/3"},Xn=_r({__name:"ResolverTeamRow",props:{index:null,team:null,resolver:null},setup(a){const t=a,e=pe(()=>t.index),i=pe(()=>t.team),r=pe(()=>t.resolver),n=mt(null),{locale:s}=cr(),o=pe(()=>s.value);function u(l){return[l.organization?.name.getOrDefault(o.value),l.name.getOrDefault(o.value)].filter(_=>_).join(" - ")}return(l,f)=>(Z(),Q("div",{ref_key:"el",ref:n,"h-24":""},[(Z(),Q("div",{key:0,"h-24":"",flex:"","flex-row":"","gap-x-4":"","font-mono":"","text-4xl":"",class:oi([I(e)%2===0?"bg-resolver-bg-zero":"bg-resolver-bg-one",I(r).duringAnimation&&I(r).currentTeamId===I(i).id?"bg-resolver-selected":"",!I(r).duringAnimation&&I(e)===I(r).currentIndex?"bg-resolver-selected":""])},[nt("div",zn,[nt("div",null,gt(I(i).rank),1)]),nt("div",Ln,[nt("div",Nn,gt(u(I(i))),1),nt("div",Bn,[(Z(!0),Q(Qt,null,dr(I(i).problemStatistics,(_,c)=>(Z(),Q("div",{key:_.problem.id,class:oi(["rounded w-22 h-7 flex justify-center items-center",[_.isAccepted?"bg-resolver-ac":"",_.isWrongAnswer?"bg-resolver-wa":"",_.isPending?"bg-resolver-pending":"",_.isUnSubmitted?"bg-resolver-untouched":"",I(r).problemFlashingEnded===!1&&I(e)===I(r).currentIndex&&I(r).currentProblemIndex===c?"resolver-uncover":""]])},[_.isAccepted?(Z(),Q(Qt,{key:0},[Ie(gt(`${_.failedCount+Number(_.isAccepted)}/${Math.floor(_.lastSubmitTimestamp/60)}`),1)],64)):me("",!0),_.isWrongAnswer?(Z(),Q(Qt,{key:1},[Ie(gt(`${_.failedCount}/${Math.floor(_.lastSubmitTimestamp/60)}`),1)],64)):me("",!0),_.isPending?(Z(),Q(Qt,{key:2},[Ie(gt(`${_.failedCount} + ${_.pendingCount}`),1)],64)):me("",!0),_.isUnSubmitted?(Z(),Q(Qt,{key:3},[Ie(gt(_.problem.label),1)],64)):me("",!0)],2))),128))])]),nt("div",Un,[nt("div",Vn,gt(I(i).solvedProblemNum),1),nt("div",Yn,gt(I(i).penaltyToMinute),1)])],2))],512))}}),$n=pr(Xn,[["__scopeId","data-v-672c0a86"]]);function kt(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}function mr(a,t){a.prototype=Object.create(t.prototype),a.prototype.constructor=a,a.__proto__=t}/*!
2
2
  * GSAP 3.13.0
3
3
  * https://gsap.com
4
4
  *
@@ -1 +1 @@
1
- import{_ as t}from"./_plugin-vue_export-helper-DlAUqK2U.js";import{c as e,o as l,b as o}from"./index-8PXU_sno.js";const s={},n={class:"color-gray-700 dark:color-gray-200"};function a(c,r){return l(),e("div",n,[...r[0]||(r[0]=[o("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"1161",width:"30",height:"30"},[o("path",{d:"M837.9904 570.0608H124.5696a29.0304 29.0304 0 0 1-29.0304-29.0304V482.9696a29.0304 29.0304 0 0 1 29.0304-29.0304h713.4208z",fill:"currentColor","p-id":"1162"}),o("path",{d:"M561.3056 808.96l-40.96-40.96a28.928 28.928 0 0 1 0-40.96l215.04-215.04-215.04-215.04a28.9792 28.9792 0 0 1 0-40.96l40.96-40.96a28.9792 28.9792 0 0 1 40.96 0l296.96 296.96-296.96 296.96a28.9792 28.9792 0 0 1-40.96 0z",fill:"currentColor","p-id":"1163"})],-1)])])}const d=t(s,[["render",a]]);export{d as _};
1
+ import{_ as t}from"./_plugin-vue_export-helper-DlAUqK2U.js";import{c as e,o as l,b as o}from"./index-Cl8ui4U3.js";const s={},n={class:"color-gray-700 dark:color-gray-200"};function a(c,r){return l(),e("div",n,[...r[0]||(r[0]=[o("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"1161",width:"30",height:"30"},[o("path",{d:"M837.9904 570.0608H124.5696a29.0304 29.0304 0 0 1-29.0304-29.0304V482.9696a29.0304 29.0304 0 0 1 29.0304-29.0304h713.4208z",fill:"currentColor","p-id":"1162"}),o("path",{d:"M561.3056 808.96l-40.96-40.96a28.928 28.928 0 0 1 0-40.96l215.04-215.04-215.04-215.04a28.9792 28.9792 0 0 1 0-40.96l40.96-40.96a28.9792 28.9792 0 0 1 40.96 0l296.96 296.96-296.96 296.96a28.9792 28.9792 0 0 1-40.96 0z",fill:"currentColor","p-id":"1163"})],-1)])])}const d=t(s,[["render",a]]);export{d as _};
@@ -1 +1 @@
1
- import{a2 as W,a3 as F,a4 as f,a5 as Q,a6 as w,a7 as B,a8 as k,a9 as M,aa as z,ab as T,ac as H,ad as K,ae as j,af as Y,ag as G,ah as J,ai as X,h as N,aj as Z,ak as q,al as tt,C as x,am as A,an as et,ao as $,ap as st,aq as it,ar as nt,e as at,v as rt,as as ot,u as ht,c as lt,o as ut,y as ct,z as dt}from"./index-8PXU_sno.js";import{b as ft}from"./constant-z3sbugPT.js";import{_ as pt}from"./use-vmodel-BLyWK6hZ.js";var vt=class extends W{constructor(t,e){super(),this.options=e,this.#s=t,this.#n=null,this.#i=F(),this.bindMethods(),this.setOptions(e)}#s;#t=void 0;#p=void 0;#e=void 0;#r;#u;#i;#n;#v;#c;#d;#o;#h;#a;#f=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),L(this.#t,this.options)?this.#l():this.updateResult(),this.#R())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return D(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return D(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 f(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&&!Q(this.options,e)&&this.#s.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const s=this.hasListeners();s&&V(this.#t,i,this.options,e)&&this.#l(),this.updateResult(),s&&(this.#t!==i||f(this.options.enabled,this.#t)!==f(e.enabled,this.#t)||w(this.options.staleTime,this.#t)!==w(e.staleTime,this.#t))&&this.#m();const n=this.#b();s&&(this.#t!==i||f(this.options.enabled,this.#t)!==f(e.enabled,this.#t)||n!==this.#a)&&this.#y(n)}getOptimisticResult(t){const e=this.#s.getQueryCache().build(this.#s,t),i=this.createResult(e,t);return bt(this,i)&&(this.#e=i,this.#u=this.options,this.#r=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.trackProp("data"),!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.#f.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.#l({...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#e))}#l(t){this.#w();let e=this.#t.fetch(this.options,t);return t?.throwOnError||(e=e.catch(B)),e}#m(){this.#g();const t=w(this.options.staleTime,this.#t);if(k||this.#e.isStale||!M(t))return;const i=z(this.#e.dataUpdatedAt,t)+1;this.#o=T.setTimeout(()=>{this.#e.isStale||this.updateResult()},i)}#b(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#y(t){this.#O(),this.#a=t,!(k||f(this.options.enabled,this.#t)===!1||!M(this.#a)||this.#a===0)&&(this.#h=T.setInterval(()=>{(this.options.refetchIntervalInBackground||H.isFocused())&&this.#l()},this.#a))}#R(){this.#m(),this.#y(this.#b())}#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,r=this.#r,l=this.#u,m=t!==i?t.state:this.#p,{state:g}=t;let a={...g},C=!1,h;if(e._optimisticResults){const c=this.hasListeners(),I=!c&&L(t,e),R=c&&V(t,i,e,s);(I||R)&&(a={...a,...K(g.data,t.options)}),e._optimisticResults==="isRestoring"&&(a.fetchStatus="idle")}let{error:o,errorUpdatedAt:v,status:d}=a;h=a.data;let O=!1;if(e.placeholderData!==void 0&&h===void 0&&d==="pending"){let c;n?.isPlaceholderData&&e.placeholderData===l?.placeholderData?(c=n.data,O=!0):c=typeof e.placeholderData=="function"?e.placeholderData(this.#d?.state.data,this.#d):e.placeholderData,c!==void 0&&(d="success",h=j(n?.data,c,e),C=!0)}if(e.select&&h!==void 0&&!O)if(n&&h===r?.data&&e.select===this.#v)h=this.#c;else try{this.#v=e.select,h=e.select(h),h=j(n?.data,h,e),this.#c=h,this.#n=null}catch(c){this.#n=c}this.#n&&(o=this.#n,h=this.#c,v=Date.now(),d="error");const b=a.fetchStatus==="fetching",y=d==="pending",E=d==="error",U=y&&b,_=h!==void 0,p={status:d,fetchStatus:a.fetchStatus,isPending:y,isSuccess:d==="success",isError:E,isInitialLoading:U,isLoading:U,data:h,dataUpdatedAt:a.dataUpdatedAt,error:o,errorUpdatedAt:v,failureCount:a.fetchFailureCount,failureReason:a.fetchFailureReason,errorUpdateCount:a.errorUpdateCount,isFetched:a.dataUpdateCount>0||a.errorUpdateCount>0,isFetchedAfterMount:a.dataUpdateCount>m.dataUpdateCount||a.errorUpdateCount>m.errorUpdateCount,isFetching:b,isRefetching:b&&!y,isLoadingError:E&&!_,isPaused:a.fetchStatus==="paused",isPlaceholderData:C,isRefetchError:E&&_,isStale:P(t,e),refetch:this.refetch,promise:this.#i,isEnabled:f(e.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const c=S=>{p.status==="error"?S.reject(p.error):p.data!==void 0&&S.resolve(p.data)},I=()=>{const S=this.#i=p.promise=F();c(S)},R=this.#i;switch(R.status){case"pending":t.queryHash===i.queryHash&&c(R);break;case"fulfilled":(p.status==="error"||p.data!==R.value)&&I();break;case"rejected":(p.status!=="error"||p.error!==R.reason)&&I();break}}return p}updateResult(){const t=this.#e,e=this.createResult(this.#t,this.options);if(this.#r=this.#t.state,this.#u=this.options,this.#r.data!==void 0&&(this.#d=this.#t),Q(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.#f.size)return!0;const r=new Set(n??this.#f);return this.options.throwOnError&&r.add("error"),Object.keys(this.#e).some(l=>{const u=l;return this.#e[u]!==t[u]&&r.has(u)})};this.#C({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.#R()}#C(t){Y.batch(()=>{t.listeners&&this.listeners.forEach(e=>{e(this.#e)}),this.#s.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function mt(t,e){return f(e.enabled,t)!==!1&&t.state.data===void 0&&!(t.state.status==="error"&&e.retryOnMount===!1)}function L(t,e){return mt(t,e)||t.state.data!==void 0&&D(t,e,e.refetchOnMount)}function D(t,e,i){if(f(e.enabled,t)!==!1&&w(e.staleTime,t)!=="static"){const s=typeof i=="function"?i(t):i;return s==="always"||s!==!1&&P(t,e)}return!1}function V(t,e,i,s){return(t!==e||f(s.enabled,t)===!1)&&(!i.suspense||t.state.status!=="error")&&P(t,i)}function P(t,e){return f(e.enabled,t)!==!1&&t.isStaleByTime(w(e.staleTime,t))}function bt(t,e){return!Q(t.getCurrentResult(),e)}function yt(t=""){if(!G())throw new Error("vue-query hooks can only be used inside setup() function or functions that support injection context.");const e=X(t),i=J(e);if(!i)throw new Error("No 'queryClient' found in Vue context, use 'VueQueryPlugin' to properly initialize the library.");return i}function Rt(t,e,i){const s=yt(),n=N(()=>{const o=Z(e);typeof o.enabled=="function"&&(o.enabled=o.enabled());const v=s.defaultQueryOptions(o);return v._optimisticResults=s.isRestoring?.value?"isRestoring":"optimistic",v}),r=new t(s,n.value),l=n.value.shallow?q(r.getCurrentResult()):tt(r.getCurrentResult());let u=()=>{};s.isRestoring&&x(s.isRestoring,o=>{o||(u(),u=r.subscribe(v=>{A(l,v)}))},{immediate:!0});const m=()=>{r.setOptions(n.value),A(l,r.getCurrentResult())};x(n,m),et(()=>{u()});const g=(...o)=>(m(),l.refetch(...o)),a=()=>new Promise((o,v)=>{let d=()=>{};const O=()=>{if(n.value.enabled!==!1){r.setOptions(n.value);const b=r.getOptimisticResult(n.value);b.isStale?(d(),r.fetchOptimistic(n.value).then(o,y=>{$(n.value.throwOnError,[y,r.getCurrentQuery()])?v(y):o(r.getCurrentResult())})):(d(),o(b))}};O(),d=x(n,O)});x(()=>l.error,o=>{if(l.isError&&!l.isFetching&&$(n.value.throwOnError,[o,r.getCurrentQuery()]))throw o});const C=n.value.shallow?st(l):it(l),h=nt(C);for(const o in l)typeof l[o]=="function"&&(h[o]=l[o]);return h.suspense=a,h.refetch=g,h}function gt(t,e){return Rt(vt,t)}const Ot=3;async function wt(t,e){const i=t.startsWith("/")?t.slice(1):t;let s=`${window.DATA_HOST}${i}`;const n={allInOne:!1};if(s.includes("#")){const a=new URLSearchParams(s.split("#")[1]);n.allInOne=a.get("allInOne")==="true",s=s.split("#")[0]}t.startsWith("http")&&(s=t),s.endsWith("/")&&(s=s.slice(0,-1));const r=a=>a.includes("?")?`${a}&t=${e??0}`:`${a}?t=${e??0}`,l=n.allInOne?[await fetch(r(s))]:[await fetch(r(`${s}/config.json`)),await fetch(r(`${s}/team.json`)),await fetch(r(`${s}/run.json`))],{status:u,statusText:m}=l[0];if(u>=300||u<200)throw new Error(`fetch data failed. [status=${u}] [statusText=${m}]`);return Promise.all(l.map(a=>a.json())).then(a=>n.allInOne?a[0]:{contest:a[0],teams:a[1],submissions:a[2]})}function Et(t,e,i=!1){let s=3e4,n=s;const r=N(()=>Math.floor(e.value.getTime()/1e3/10));return ft.value==="I18N"&&(s=10*1e3,n=s),i&&(s=Number.POSITIVE_INFINITY,n=!1),gt({queryKey:[t,r.value],queryFn:()=>wt(t,r.value),retry:Ot,staleTime:s,refetchInterval:n})}const Ct=["type","text"],Qt=at({__name:"TheInput",props:{textAlign:null,textType:null,modelValue:null},emits:["update:modelValue"],setup(t){const e=t,{modelValue:i}=pt("modelValue");return(s,n)=>rt((ut(),lt("input",ct({id:"input","onUpdate:modelValue":n[0]||(n[0]=r=>dt(i)?i.value=r:null)},s.$attrs,{type:e.textType??"text",text:e.textAlign??"center",p:"x-4 y-2","w-full":"",bg:"transparent",border:"~ rounded gray-200 dark:gray-700",outline:"none active:none"}),null,16,Ct)),[[ot,ht(i)]])}});export{Qt as _,Et as u};
1
+ import{a2 as W,a3 as F,a4 as f,a5 as Q,a6 as w,a7 as B,a8 as k,a9 as M,aa as z,ab as T,ac as H,ad as K,ae as j,af as Y,ag as G,ah as J,ai as X,h as N,aj as Z,ak as q,al as tt,C as x,am as A,an as et,ao as $,ap as st,aq as it,ar as nt,e as at,v as rt,as as ot,u as ht,c as lt,o as ut,y as ct,z as dt}from"./index-Cl8ui4U3.js";import{b as ft}from"./constant-hbYXej-M.js";import{_ as pt}from"./use-vmodel-B-AJYPXB.js";var vt=class extends W{constructor(t,e){super(),this.options=e,this.#s=t,this.#n=null,this.#i=F(),this.bindMethods(),this.setOptions(e)}#s;#t=void 0;#p=void 0;#e=void 0;#r;#u;#i;#n;#v;#c;#d;#o;#h;#a;#f=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),L(this.#t,this.options)?this.#l():this.updateResult(),this.#R())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return D(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return D(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 f(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&&!Q(this.options,e)&&this.#s.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const s=this.hasListeners();s&&V(this.#t,i,this.options,e)&&this.#l(),this.updateResult(),s&&(this.#t!==i||f(this.options.enabled,this.#t)!==f(e.enabled,this.#t)||w(this.options.staleTime,this.#t)!==w(e.staleTime,this.#t))&&this.#m();const n=this.#b();s&&(this.#t!==i||f(this.options.enabled,this.#t)!==f(e.enabled,this.#t)||n!==this.#a)&&this.#y(n)}getOptimisticResult(t){const e=this.#s.getQueryCache().build(this.#s,t),i=this.createResult(e,t);return bt(this,i)&&(this.#e=i,this.#u=this.options,this.#r=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.trackProp("data"),!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.#f.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.#l({...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#e))}#l(t){this.#w();let e=this.#t.fetch(this.options,t);return t?.throwOnError||(e=e.catch(B)),e}#m(){this.#g();const t=w(this.options.staleTime,this.#t);if(k||this.#e.isStale||!M(t))return;const i=z(this.#e.dataUpdatedAt,t)+1;this.#o=T.setTimeout(()=>{this.#e.isStale||this.updateResult()},i)}#b(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#y(t){this.#O(),this.#a=t,!(k||f(this.options.enabled,this.#t)===!1||!M(this.#a)||this.#a===0)&&(this.#h=T.setInterval(()=>{(this.options.refetchIntervalInBackground||H.isFocused())&&this.#l()},this.#a))}#R(){this.#m(),this.#y(this.#b())}#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,r=this.#r,l=this.#u,m=t!==i?t.state:this.#p,{state:g}=t;let a={...g},C=!1,h;if(e._optimisticResults){const c=this.hasListeners(),I=!c&&L(t,e),R=c&&V(t,i,e,s);(I||R)&&(a={...a,...K(g.data,t.options)}),e._optimisticResults==="isRestoring"&&(a.fetchStatus="idle")}let{error:o,errorUpdatedAt:v,status:d}=a;h=a.data;let O=!1;if(e.placeholderData!==void 0&&h===void 0&&d==="pending"){let c;n?.isPlaceholderData&&e.placeholderData===l?.placeholderData?(c=n.data,O=!0):c=typeof e.placeholderData=="function"?e.placeholderData(this.#d?.state.data,this.#d):e.placeholderData,c!==void 0&&(d="success",h=j(n?.data,c,e),C=!0)}if(e.select&&h!==void 0&&!O)if(n&&h===r?.data&&e.select===this.#v)h=this.#c;else try{this.#v=e.select,h=e.select(h),h=j(n?.data,h,e),this.#c=h,this.#n=null}catch(c){this.#n=c}this.#n&&(o=this.#n,h=this.#c,v=Date.now(),d="error");const b=a.fetchStatus==="fetching",y=d==="pending",E=d==="error",U=y&&b,_=h!==void 0,p={status:d,fetchStatus:a.fetchStatus,isPending:y,isSuccess:d==="success",isError:E,isInitialLoading:U,isLoading:U,data:h,dataUpdatedAt:a.dataUpdatedAt,error:o,errorUpdatedAt:v,failureCount:a.fetchFailureCount,failureReason:a.fetchFailureReason,errorUpdateCount:a.errorUpdateCount,isFetched:a.dataUpdateCount>0||a.errorUpdateCount>0,isFetchedAfterMount:a.dataUpdateCount>m.dataUpdateCount||a.errorUpdateCount>m.errorUpdateCount,isFetching:b,isRefetching:b&&!y,isLoadingError:E&&!_,isPaused:a.fetchStatus==="paused",isPlaceholderData:C,isRefetchError:E&&_,isStale:P(t,e),refetch:this.refetch,promise:this.#i,isEnabled:f(e.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const c=S=>{p.status==="error"?S.reject(p.error):p.data!==void 0&&S.resolve(p.data)},I=()=>{const S=this.#i=p.promise=F();c(S)},R=this.#i;switch(R.status){case"pending":t.queryHash===i.queryHash&&c(R);break;case"fulfilled":(p.status==="error"||p.data!==R.value)&&I();break;case"rejected":(p.status!=="error"||p.error!==R.reason)&&I();break}}return p}updateResult(){const t=this.#e,e=this.createResult(this.#t,this.options);if(this.#r=this.#t.state,this.#u=this.options,this.#r.data!==void 0&&(this.#d=this.#t),Q(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.#f.size)return!0;const r=new Set(n??this.#f);return this.options.throwOnError&&r.add("error"),Object.keys(this.#e).some(l=>{const u=l;return this.#e[u]!==t[u]&&r.has(u)})};this.#C({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.#R()}#C(t){Y.batch(()=>{t.listeners&&this.listeners.forEach(e=>{e(this.#e)}),this.#s.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function mt(t,e){return f(e.enabled,t)!==!1&&t.state.data===void 0&&!(t.state.status==="error"&&e.retryOnMount===!1)}function L(t,e){return mt(t,e)||t.state.data!==void 0&&D(t,e,e.refetchOnMount)}function D(t,e,i){if(f(e.enabled,t)!==!1&&w(e.staleTime,t)!=="static"){const s=typeof i=="function"?i(t):i;return s==="always"||s!==!1&&P(t,e)}return!1}function V(t,e,i,s){return(t!==e||f(s.enabled,t)===!1)&&(!i.suspense||t.state.status!=="error")&&P(t,i)}function P(t,e){return f(e.enabled,t)!==!1&&t.isStaleByTime(w(e.staleTime,t))}function bt(t,e){return!Q(t.getCurrentResult(),e)}function yt(t=""){if(!G())throw new Error("vue-query hooks can only be used inside setup() function or functions that support injection context.");const e=X(t),i=J(e);if(!i)throw new Error("No 'queryClient' found in Vue context, use 'VueQueryPlugin' to properly initialize the library.");return i}function Rt(t,e,i){const s=yt(),n=N(()=>{const o=Z(e);typeof o.enabled=="function"&&(o.enabled=o.enabled());const v=s.defaultQueryOptions(o);return v._optimisticResults=s.isRestoring?.value?"isRestoring":"optimistic",v}),r=new t(s,n.value),l=n.value.shallow?q(r.getCurrentResult()):tt(r.getCurrentResult());let u=()=>{};s.isRestoring&&x(s.isRestoring,o=>{o||(u(),u=r.subscribe(v=>{A(l,v)}))},{immediate:!0});const m=()=>{r.setOptions(n.value),A(l,r.getCurrentResult())};x(n,m),et(()=>{u()});const g=(...o)=>(m(),l.refetch(...o)),a=()=>new Promise((o,v)=>{let d=()=>{};const O=()=>{if(n.value.enabled!==!1){r.setOptions(n.value);const b=r.getOptimisticResult(n.value);b.isStale?(d(),r.fetchOptimistic(n.value).then(o,y=>{$(n.value.throwOnError,[y,r.getCurrentQuery()])?v(y):o(r.getCurrentResult())})):(d(),o(b))}};O(),d=x(n,O)});x(()=>l.error,o=>{if(l.isError&&!l.isFetching&&$(n.value.throwOnError,[o,r.getCurrentQuery()]))throw o});const C=n.value.shallow?st(l):it(l),h=nt(C);for(const o in l)typeof l[o]=="function"&&(h[o]=l[o]);return h.suspense=a,h.refetch=g,h}function gt(t,e){return Rt(vt,t)}const Ot=3;async function wt(t,e){const i=t.startsWith("/")?t.slice(1):t;let s=`${window.DATA_HOST}${i}`;const n={allInOne:!1};if(s.includes("#")){const a=new URLSearchParams(s.split("#")[1]);n.allInOne=a.get("allInOne")==="true",s=s.split("#")[0]}t.startsWith("http")&&(s=t),s.endsWith("/")&&(s=s.slice(0,-1));const r=a=>a.includes("?")?`${a}&t=${e??0}`:`${a}?t=${e??0}`,l=n.allInOne?[await fetch(r(s))]:[await fetch(r(`${s}/config.json`)),await fetch(r(`${s}/team.json`)),await fetch(r(`${s}/run.json`))],{status:u,statusText:m}=l[0];if(u>=300||u<200)throw new Error(`fetch data failed. [status=${u}] [statusText=${m}]`);return Promise.all(l.map(a=>a.json())).then(a=>n.allInOne?a[0]:{contest:a[0],teams:a[1],submissions:a[2]})}function Et(t,e,i=!1){let s=3e4,n=s;const r=N(()=>Math.floor(e.value.getTime()/1e3/10));return ft.value==="I18N"&&(s=10*1e3,n=s),i&&(s=Number.POSITIVE_INFINITY,n=!1),gt({queryKey:[t,r.value],queryFn:()=>wt(t,r.value),retry:Ot,staleTime:s,refetchInterval:n})}const Ct=["type","text"],Qt=at({__name:"TheInput",props:{textAlign:null,textType:null,modelValue:null},emits:["update:modelValue"],setup(t){const e=t,{modelValue:i}=pt("modelValue");return(s,n)=>rt((ut(),lt("input",ct({id:"input","onUpdate:modelValue":n[0]||(n[0]=r=>dt(i)?i.value=r:null)},s.$attrs,{type:e.textType??"text",text:e.textAlign??"center",p:"x-4 y-2","w-full":"",bg:"transparent",border:"~ rounded gray-200 dark:gray-700",outline:"none active:none"}),null,16,Ct)),[[ot,ht(i)]])}});export{Qt as _,Et as u};