@xcpcio/board-app 0.45.0 → 0.45.1

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 (25) hide show
  1. package/dist/404.html +1 -1
  2. package/dist/assets/Board-18b9172e.js +3 -0
  3. package/dist/assets/{Board-eada7b82.css → Board-24564942.css} +1 -1
  4. package/dist/assets/{DataSourceInput.vue_vue_type_script_setup_true_lang-355e8892.js → DataSourceInput.vue_vue_type_script_setup_true_lang-427dce23.js} +1 -1
  5. package/dist/assets/{TheInput.vue_vue_type_script_setup_true_lang-d53a2e94.js → TheInput.vue_vue_type_script_setup_true_lang-5240cefb.js} +1 -1
  6. package/dist/assets/{_...all_-49fdf693.js → _...all_-3f3ad044.js} +1 -1
  7. package/dist/assets/{_name_-ecfcaff9.js → _name_-b216f907.js} +1 -1
  8. package/dist/assets/{about-aafa19e0.js → about-82769d21.js} +1 -1
  9. package/dist/assets/{board-ac08a49e.js → board-bb7bf0ea.js} +1 -1
  10. package/dist/assets/{board-layout-ca4c1273.js → board-layout-57ee4bf7.js} +1 -1
  11. package/dist/assets/{headless-e170f56d.js → headless-97bcf036.js} +1 -1
  12. package/dist/assets/{home-3bd8e303.js → home-cb1bfaec.js} +1 -1
  13. package/dist/assets/{index-fa8b49d4.js → index-3feadeb5.js} +1 -1
  14. package/dist/assets/{index-eb93e748.js → index-40849fcd.js} +1 -1
  15. package/dist/assets/{index-c5ed7f0e.js → index-8920b1dd.js} +93 -93
  16. package/dist/assets/{index-layout-4c56300c.js → index-layout-f82ee3d7.js} +1 -1
  17. package/dist/assets/{query-3fa14ec7.js → query-98ac309e.js} +1 -1
  18. package/dist/assets/{test-8377af2c.js → test-4db0702c.js} +1 -1
  19. package/dist/assets/{user-59dce06c.js → user-c84c315a.js} +1 -1
  20. package/dist/assets/{virtual_pwa-register-97a9bef2.js → virtual_pwa-register-3935cae2.js} +1 -1
  21. package/dist/index.html +1 -1
  22. package/dist/sw.js +1 -1
  23. package/package.json +3 -3
  24. package/src/components/board/Board.vue +15 -3
  25. package/dist/assets/Board-d8672557.js +0 -3
@@ -1 +1 @@
1
- import{a as s,r as a,o as c,c as r,b as e,d as _,F as m,e as p,f as l}from"./index-c5ed7f0e.js";const i={},d={class:"lg:mt-[-52px]","py-2":"","text-gray-700":"","dark:text-gray-200":""};function u(x,f){const o=p,t=a("RouterView"),n=l;return c(),r(m,null,[e(o,{width:"sm:w-[1024px] lg:w-screen"}),_("main",d,[e(t),e(n,{class:"sm:w-[1024px] lg:w-screen"})])],64)}const w=s(i,[["render",u]]);export{w as default};
1
+ import{a as s,r as a,o as c,c as r,b as e,d as _,F as m,e as p,f as l}from"./index-8920b1dd.js";const i={},d={class:"lg:mt-[-52px]","py-2":"","text-gray-700":"","dark:text-gray-200":""};function u(x,f){const o=p,t=a("RouterView"),n=l;return c(),r(m,null,[e(o,{width:"sm:w-[1024px] lg:w-screen"}),_("main",d,[e(t),e(n,{class:"sm:w-[1024px] lg:w-screen"})])],64)}const w=s(i,[["render",u]]);export{w as default};
@@ -1 +1 @@
1
- import{at as K,au as T,av as L,aw as D,ax as A,ay as B,az as N,aA as W,aB as P,aC as z,aD as V,aE as G,aF as $,aG as H,s as Q,aH as J,w as b,aI as x,aJ as Y,aK as _,aL as X,aM as Z,l as S,aN as ee,aO as te,aP as se,ai as j}from"./index-c5ed7f0e.js";class re extends K{constructor(e,t){super(),this.client=e,this.options=t,this.trackedProps=new Set,this.selectError=null,this.bindMethods(),this.setOptions(t)}bindMethods(){this.remove=this.remove.bind(this),this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.currentQuery.addObserver(this),M(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return E(this.currentQuery,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return E(this.currentQuery,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.clearStaleTimeout(),this.clearRefetchInterval(),this.currentQuery.removeObserver(this)}setOptions(e,t){const s=this.options,n=this.currentQuery;if(this.options=this.client.defaultQueryOptions(e),T(s,this.options)||this.client.getQueryCache().notify({type:"observerOptionsUpdated",query:this.currentQuery,observer:this}),typeof this.options.enabled<"u"&&typeof this.options.enabled!="boolean")throw new Error("Expected enabled to be a boolean");this.options.queryKey||(this.options.queryKey=s.queryKey),this.updateQuery();const i=this.hasListeners();i&&k(this.currentQuery,n,this.options,s)&&this.executeFetch(),this.updateResult(t),i&&(this.currentQuery!==n||this.options.enabled!==s.enabled||this.options.staleTime!==s.staleTime)&&this.updateStaleTimeout();const u=this.computeRefetchInterval();i&&(this.currentQuery!==n||this.options.enabled!==s.enabled||u!==this.currentRefetchInterval)&&this.updateRefetchInterval(u)}getOptimisticResult(e){const t=this.client.getQueryCache().build(this.client,e),s=this.createResult(t,e);return ne(this,s,e)&&(this.currentResult=s,this.currentResultOptions=this.options,this.currentResultState=this.currentQuery.state),s}getCurrentResult(){return this.currentResult}trackResult(e){const t={};return Object.keys(e).forEach(s=>{Object.defineProperty(t,s,{configurable:!1,enumerable:!0,get:()=>(this.trackedProps.add(s),e[s])})}),t}getCurrentQuery(){return this.currentQuery}remove(){this.client.getQueryCache().remove(this.currentQuery)}refetch({refetchPage:e,...t}={}){return this.fetch({...t,meta:{refetchPage:e}})}fetchOptimistic(e){const t=this.client.defaultQueryOptions(e),s=this.client.getQueryCache().build(this.client,t);return s.isFetchingOptimistic=!0,s.fetch().then(()=>this.createResult(s,t))}fetch(e){var t;return this.executeFetch({...e,cancelRefetch:(t=e.cancelRefetch)!=null?t:!0}).then(()=>(this.updateResult(),this.currentResult))}executeFetch(e){this.updateQuery();let t=this.currentQuery.fetch(this.options,e);return e!=null&&e.throwOnError||(t=t.catch(L)),t}updateStaleTimeout(){if(this.clearStaleTimeout(),D||this.currentResult.isStale||!A(this.options.staleTime))return;const t=B(this.currentResult.dataUpdatedAt,this.options.staleTime)+1;this.staleTimeoutId=setTimeout(()=>{this.currentResult.isStale||this.updateResult()},t)}computeRefetchInterval(){var e;return typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.currentResult.data,this.currentQuery):(e=this.options.refetchInterval)!=null?e:!1}updateRefetchInterval(e){this.clearRefetchInterval(),this.currentRefetchInterval=e,!(D||this.options.enabled===!1||!A(this.currentRefetchInterval)||this.currentRefetchInterval===0)&&(this.refetchIntervalId=setInterval(()=>{(this.options.refetchIntervalInBackground||N.isFocused())&&this.executeFetch()},this.currentRefetchInterval))}updateTimers(){this.updateStaleTimeout(),this.updateRefetchInterval(this.computeRefetchInterval())}clearStaleTimeout(){this.staleTimeoutId&&(clearTimeout(this.staleTimeoutId),this.staleTimeoutId=void 0)}clearRefetchInterval(){this.refetchIntervalId&&(clearInterval(this.refetchIntervalId),this.refetchIntervalId=void 0)}createResult(e,t){const s=this.currentQuery,n=this.options,i=this.currentResult,u=this.currentResultState,a=this.currentResultOptions,c=e!==s,h=c?e.state:this.currentQueryInitialState,l=c?this.currentResult:this.previousQueryResult,{state:o}=e;let{dataUpdatedAt:d,error:R,errorUpdatedAt:m,fetchStatus:v,status:f}=o,F=!1,U=!1,y;if(t._optimisticResults){const p=this.hasListeners(),C=!p&&M(e,t),q=p&&k(e,s,t,n);(C||q)&&(v=W(e.options.networkMode)?"fetching":"paused",d||(f="loading")),t._optimisticResults==="isRestoring"&&(v="idle")}if(t.keepPreviousData&&!o.dataUpdatedAt&&l!=null&&l.isSuccess&&f!=="error")y=l.data,d=l.dataUpdatedAt,f=l.status,F=!0;else if(t.select&&typeof o.data<"u")if(i&&o.data===(u==null?void 0:u.data)&&t.select===this.selectFn)y=this.selectResult;else try{this.selectFn=t.select,y=t.select(o.data),y=P(i==null?void 0:i.data,y,t),this.selectResult=y,this.selectError=null}catch(p){this.selectError=p}else y=o.data;if(typeof t.placeholderData<"u"&&typeof y>"u"&&f==="loading"){let p;if(i!=null&&i.isPlaceholderData&&t.placeholderData===(a==null?void 0:a.placeholderData))p=i.data;else if(p=typeof t.placeholderData=="function"?t.placeholderData():t.placeholderData,t.select&&typeof p<"u")try{p=t.select(p),this.selectError=null}catch(C){this.selectError=C}typeof p<"u"&&(f="success",y=P(i==null?void 0:i.data,p,t),U=!0)}this.selectError&&(R=this.selectError,y=this.selectResult,m=Date.now(),f="error");const g=v==="fetching",I=f==="loading",O=f==="error";return{status:f,fetchStatus:v,isLoading:I,isSuccess:f==="success",isError:O,isInitialLoading:I&&g,data:y,dataUpdatedAt:d,error:R,errorUpdatedAt:m,failureCount:o.fetchFailureCount,failureReason:o.fetchFailureReason,errorUpdateCount:o.errorUpdateCount,isFetched:o.dataUpdateCount>0||o.errorUpdateCount>0,isFetchedAfterMount:o.dataUpdateCount>h.dataUpdateCount||o.errorUpdateCount>h.errorUpdateCount,isFetching:g,isRefetching:g&&!I,isLoadingError:O&&o.dataUpdatedAt===0,isPaused:v==="paused",isPlaceholderData:U,isPreviousData:F,isRefetchError:O&&o.dataUpdatedAt!==0,isStale:w(e,t),refetch:this.refetch,remove:this.remove}}updateResult(e){const t=this.currentResult,s=this.createResult(this.currentQuery,this.options);if(this.currentResultState=this.currentQuery.state,this.currentResultOptions=this.options,T(s,t))return;this.currentResult=s;const n={cache:!0},i=()=>{if(!t)return!0;const{notifyOnChangeProps:u}=this.options,a=typeof u=="function"?u():u;if(a==="all"||!a&&!this.trackedProps.size)return!0;const c=new Set(a??this.trackedProps);return this.options.useErrorBoundary&&c.add("error"),Object.keys(this.currentResult).some(h=>{const l=h;return this.currentResult[l]!==t[l]&&c.has(l)})};(e==null?void 0:e.listeners)!==!1&&i()&&(n.listeners=!0),this.notify({...n,...e})}updateQuery(){const e=this.client.getQueryCache().build(this.client,this.options);if(e===this.currentQuery)return;const t=this.currentQuery;this.currentQuery=e,this.currentQueryInitialState=e.state,this.previousQueryResult=this.currentResult,this.hasListeners()&&(t==null||t.removeObserver(this),e.addObserver(this))}onQueryUpdate(e){const t={};e.type==="success"?t.onSuccess=!e.manual:e.type==="error"&&!z(e.error)&&(t.onError=!0),this.updateResult(t),this.hasListeners()&&this.updateTimers()}notify(e){V.batch(()=>{if(e.onSuccess){var t,s,n,i;(t=(s=this.options).onSuccess)==null||t.call(s,this.currentResult.data),(n=(i=this.options).onSettled)==null||n.call(i,this.currentResult.data,null)}else if(e.onError){var u,a,c,h;(u=(a=this.options).onError)==null||u.call(a,this.currentResult.error),(c=(h=this.options).onSettled)==null||c.call(h,void 0,this.currentResult.error)}e.listeners&&this.listeners.forEach(({listener:l})=>{l(this.currentResult)}),e.cache&&this.client.getQueryCache().notify({query:this.currentQuery,type:"observerResultsUpdated"})})}}function ie(r,e){return e.enabled!==!1&&!r.state.dataUpdatedAt&&!(r.state.status==="error"&&e.retryOnMount===!1)}function M(r,e){return ie(r,e)||r.state.dataUpdatedAt>0&&E(r,e,e.refetchOnMount)}function E(r,e,t){if(e.enabled!==!1){const s=typeof t=="function"?t(r):t;return s==="always"||s!==!1&&w(r,e)}return!1}function k(r,e,t,s){return t.enabled!==!1&&(r!==e||s.enabled===!1)&&(!t.suspense||r.state.status!=="error")&&w(r,t)}function w(r,e){return r.isStaleByTime(e.staleTime)}function ne(r,e,t){return t.keepPreviousData?!1:t.placeholderData!==void 0?e.isPlaceholderData:!T(r.getCurrentResult(),e)}function ue(r=""){var e;if(!((e=G())==null?void 0:e.proxy))throw new Error("vue-query hooks can only be used inside setup() function.");const s=H(r),n=$(s);if(!n)throw new Error("No 'queryClient' found in Vue context, use 'VueQueryPlugin' to properly initialize the library.");return n}function ae(r,e,t={},s={}){var n;const i=Q(()=>le(e,t,s)),u=(n=i.value.queryClient)!=null?n:ue(i.value.queryClientKey),a=Q(()=>{const d=u.defaultQueryOptions(i.value);return d._optimisticResults=u.isRestoring.value?"isRestoring":"optimistic",d}),c=new r(u,a.value),h=J(c.getCurrentResult());let l=()=>{};b(u.isRestoring,d=>{d||(l(),l=c.subscribe(R=>{x(h,R)}))},{immediate:!0}),b(a,()=>{c.setOptions(a.value),x(h,c.getCurrentResult())}),Y(()=>{l()});const o=()=>new Promise((d,R)=>{let m=()=>{};const v=()=>{if(a.value.enabled!==!1){const f=c.getOptimisticResult(a.value);f.isStale?(m(),c.fetchOptimistic(a.value).then(d,R)):(m(),d(f))}};v(),m=b(a,v,{deep:!0})});return b(()=>h.error,d=>{if(h.isError&&!h.isFetching&&_(a.value.useErrorBoundary,[d,c.getCurrentQuery()]))throw d}),{...X(Z(h)),suspense:o}}function le(r,e={},t={}){const s=S(r),n=S(e),i=S(t);let u=s;return ee(s)?typeof n=="function"?u={...i,queryKey:s,queryFn:n}:u={...n,queryKey:s}:u=s,te(u)}function ce(r,e,t){const s=ae(re,r,e,t);return{...s,refetch:s.refetch.value,remove:s.remove.value}}const oe=3;async function he(r,e){const t=r.startsWith("/")?r.slice(1):r;let s=`${window.DATA_HOST}${t}`;r.startsWith("http")&&(s=r),s.endsWith("/")&&(s=s.slice(0,-1));const n=await fetch(`${s}/config.json?t=${e??0}`),i=await fetch(`${s}/team.json?t=${e??0}`),u=await fetch(`${s}/run.json?t=${e??0}`),{status:a,statusText:c}=n;if(a>=300||a<200)throw new Error(`fetch data failed. [status=${a}] [statusText=${c}]`);return Promise.all([n.json(),i.json(),u.json()]).then(l=>({contest:l[0],teams:l[1],submissions:l[2]}))}function pe(r,e){let t=3e4,s=Q(()=>Math.floor(e.value.getTime()/1e3/10));return se.value==="I18N"&&(t=10*1e3,s=Q(()=>Math.floor(e.value.getTime()/1e3))),ce({queryKey:[r,s.value],queryFn:()=>he(r,s.value),retry:oe,staleTime:t,refetchInterval:t})}function ye(){return j("data-source","",{transform:String})}function ve(){return j("battle-of-giants","",{transform:String})}export{ve as a,ye as g,pe as u};
1
+ import{av as K,aw as T,ax as L,ay as D,az as A,aA as B,aB as N,aC as W,aD as P,aE as z,aF as V,aG as G,aH as $,aI as H,s as Q,aJ as J,w as b,aK as x,aL as Y,aM as _,aN as X,aO as Z,l as S,aP as ee,aQ as te,aR as se,ai as j}from"./index-8920b1dd.js";class re extends K{constructor(e,t){super(),this.client=e,this.options=t,this.trackedProps=new Set,this.selectError=null,this.bindMethods(),this.setOptions(t)}bindMethods(){this.remove=this.remove.bind(this),this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.currentQuery.addObserver(this),M(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return E(this.currentQuery,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return E(this.currentQuery,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.clearStaleTimeout(),this.clearRefetchInterval(),this.currentQuery.removeObserver(this)}setOptions(e,t){const s=this.options,n=this.currentQuery;if(this.options=this.client.defaultQueryOptions(e),T(s,this.options)||this.client.getQueryCache().notify({type:"observerOptionsUpdated",query:this.currentQuery,observer:this}),typeof this.options.enabled<"u"&&typeof this.options.enabled!="boolean")throw new Error("Expected enabled to be a boolean");this.options.queryKey||(this.options.queryKey=s.queryKey),this.updateQuery();const i=this.hasListeners();i&&k(this.currentQuery,n,this.options,s)&&this.executeFetch(),this.updateResult(t),i&&(this.currentQuery!==n||this.options.enabled!==s.enabled||this.options.staleTime!==s.staleTime)&&this.updateStaleTimeout();const u=this.computeRefetchInterval();i&&(this.currentQuery!==n||this.options.enabled!==s.enabled||u!==this.currentRefetchInterval)&&this.updateRefetchInterval(u)}getOptimisticResult(e){const t=this.client.getQueryCache().build(this.client,e),s=this.createResult(t,e);return ne(this,s,e)&&(this.currentResult=s,this.currentResultOptions=this.options,this.currentResultState=this.currentQuery.state),s}getCurrentResult(){return this.currentResult}trackResult(e){const t={};return Object.keys(e).forEach(s=>{Object.defineProperty(t,s,{configurable:!1,enumerable:!0,get:()=>(this.trackedProps.add(s),e[s])})}),t}getCurrentQuery(){return this.currentQuery}remove(){this.client.getQueryCache().remove(this.currentQuery)}refetch({refetchPage:e,...t}={}){return this.fetch({...t,meta:{refetchPage:e}})}fetchOptimistic(e){const t=this.client.defaultQueryOptions(e),s=this.client.getQueryCache().build(this.client,t);return s.isFetchingOptimistic=!0,s.fetch().then(()=>this.createResult(s,t))}fetch(e){var t;return this.executeFetch({...e,cancelRefetch:(t=e.cancelRefetch)!=null?t:!0}).then(()=>(this.updateResult(),this.currentResult))}executeFetch(e){this.updateQuery();let t=this.currentQuery.fetch(this.options,e);return e!=null&&e.throwOnError||(t=t.catch(L)),t}updateStaleTimeout(){if(this.clearStaleTimeout(),D||this.currentResult.isStale||!A(this.options.staleTime))return;const t=B(this.currentResult.dataUpdatedAt,this.options.staleTime)+1;this.staleTimeoutId=setTimeout(()=>{this.currentResult.isStale||this.updateResult()},t)}computeRefetchInterval(){var e;return typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.currentResult.data,this.currentQuery):(e=this.options.refetchInterval)!=null?e:!1}updateRefetchInterval(e){this.clearRefetchInterval(),this.currentRefetchInterval=e,!(D||this.options.enabled===!1||!A(this.currentRefetchInterval)||this.currentRefetchInterval===0)&&(this.refetchIntervalId=setInterval(()=>{(this.options.refetchIntervalInBackground||N.isFocused())&&this.executeFetch()},this.currentRefetchInterval))}updateTimers(){this.updateStaleTimeout(),this.updateRefetchInterval(this.computeRefetchInterval())}clearStaleTimeout(){this.staleTimeoutId&&(clearTimeout(this.staleTimeoutId),this.staleTimeoutId=void 0)}clearRefetchInterval(){this.refetchIntervalId&&(clearInterval(this.refetchIntervalId),this.refetchIntervalId=void 0)}createResult(e,t){const s=this.currentQuery,n=this.options,i=this.currentResult,u=this.currentResultState,a=this.currentResultOptions,c=e!==s,h=c?e.state:this.currentQueryInitialState,l=c?this.currentResult:this.previousQueryResult,{state:o}=e;let{dataUpdatedAt:d,error:R,errorUpdatedAt:m,fetchStatus:v,status:f}=o,F=!1,U=!1,y;if(t._optimisticResults){const p=this.hasListeners(),C=!p&&M(e,t),q=p&&k(e,s,t,n);(C||q)&&(v=W(e.options.networkMode)?"fetching":"paused",d||(f="loading")),t._optimisticResults==="isRestoring"&&(v="idle")}if(t.keepPreviousData&&!o.dataUpdatedAt&&l!=null&&l.isSuccess&&f!=="error")y=l.data,d=l.dataUpdatedAt,f=l.status,F=!0;else if(t.select&&typeof o.data<"u")if(i&&o.data===(u==null?void 0:u.data)&&t.select===this.selectFn)y=this.selectResult;else try{this.selectFn=t.select,y=t.select(o.data),y=P(i==null?void 0:i.data,y,t),this.selectResult=y,this.selectError=null}catch(p){this.selectError=p}else y=o.data;if(typeof t.placeholderData<"u"&&typeof y>"u"&&f==="loading"){let p;if(i!=null&&i.isPlaceholderData&&t.placeholderData===(a==null?void 0:a.placeholderData))p=i.data;else if(p=typeof t.placeholderData=="function"?t.placeholderData():t.placeholderData,t.select&&typeof p<"u")try{p=t.select(p),this.selectError=null}catch(C){this.selectError=C}typeof p<"u"&&(f="success",y=P(i==null?void 0:i.data,p,t),U=!0)}this.selectError&&(R=this.selectError,y=this.selectResult,m=Date.now(),f="error");const g=v==="fetching",I=f==="loading",O=f==="error";return{status:f,fetchStatus:v,isLoading:I,isSuccess:f==="success",isError:O,isInitialLoading:I&&g,data:y,dataUpdatedAt:d,error:R,errorUpdatedAt:m,failureCount:o.fetchFailureCount,failureReason:o.fetchFailureReason,errorUpdateCount:o.errorUpdateCount,isFetched:o.dataUpdateCount>0||o.errorUpdateCount>0,isFetchedAfterMount:o.dataUpdateCount>h.dataUpdateCount||o.errorUpdateCount>h.errorUpdateCount,isFetching:g,isRefetching:g&&!I,isLoadingError:O&&o.dataUpdatedAt===0,isPaused:v==="paused",isPlaceholderData:U,isPreviousData:F,isRefetchError:O&&o.dataUpdatedAt!==0,isStale:w(e,t),refetch:this.refetch,remove:this.remove}}updateResult(e){const t=this.currentResult,s=this.createResult(this.currentQuery,this.options);if(this.currentResultState=this.currentQuery.state,this.currentResultOptions=this.options,T(s,t))return;this.currentResult=s;const n={cache:!0},i=()=>{if(!t)return!0;const{notifyOnChangeProps:u}=this.options,a=typeof u=="function"?u():u;if(a==="all"||!a&&!this.trackedProps.size)return!0;const c=new Set(a??this.trackedProps);return this.options.useErrorBoundary&&c.add("error"),Object.keys(this.currentResult).some(h=>{const l=h;return this.currentResult[l]!==t[l]&&c.has(l)})};(e==null?void 0:e.listeners)!==!1&&i()&&(n.listeners=!0),this.notify({...n,...e})}updateQuery(){const e=this.client.getQueryCache().build(this.client,this.options);if(e===this.currentQuery)return;const t=this.currentQuery;this.currentQuery=e,this.currentQueryInitialState=e.state,this.previousQueryResult=this.currentResult,this.hasListeners()&&(t==null||t.removeObserver(this),e.addObserver(this))}onQueryUpdate(e){const t={};e.type==="success"?t.onSuccess=!e.manual:e.type==="error"&&!z(e.error)&&(t.onError=!0),this.updateResult(t),this.hasListeners()&&this.updateTimers()}notify(e){V.batch(()=>{if(e.onSuccess){var t,s,n,i;(t=(s=this.options).onSuccess)==null||t.call(s,this.currentResult.data),(n=(i=this.options).onSettled)==null||n.call(i,this.currentResult.data,null)}else if(e.onError){var u,a,c,h;(u=(a=this.options).onError)==null||u.call(a,this.currentResult.error),(c=(h=this.options).onSettled)==null||c.call(h,void 0,this.currentResult.error)}e.listeners&&this.listeners.forEach(({listener:l})=>{l(this.currentResult)}),e.cache&&this.client.getQueryCache().notify({query:this.currentQuery,type:"observerResultsUpdated"})})}}function ie(r,e){return e.enabled!==!1&&!r.state.dataUpdatedAt&&!(r.state.status==="error"&&e.retryOnMount===!1)}function M(r,e){return ie(r,e)||r.state.dataUpdatedAt>0&&E(r,e,e.refetchOnMount)}function E(r,e,t){if(e.enabled!==!1){const s=typeof t=="function"?t(r):t;return s==="always"||s!==!1&&w(r,e)}return!1}function k(r,e,t,s){return t.enabled!==!1&&(r!==e||s.enabled===!1)&&(!t.suspense||r.state.status!=="error")&&w(r,t)}function w(r,e){return r.isStaleByTime(e.staleTime)}function ne(r,e,t){return t.keepPreviousData?!1:t.placeholderData!==void 0?e.isPlaceholderData:!T(r.getCurrentResult(),e)}function ue(r=""){var e;if(!((e=G())==null?void 0:e.proxy))throw new Error("vue-query hooks can only be used inside setup() function.");const s=H(r),n=$(s);if(!n)throw new Error("No 'queryClient' found in Vue context, use 'VueQueryPlugin' to properly initialize the library.");return n}function ae(r,e,t={},s={}){var n;const i=Q(()=>le(e,t,s)),u=(n=i.value.queryClient)!=null?n:ue(i.value.queryClientKey),a=Q(()=>{const d=u.defaultQueryOptions(i.value);return d._optimisticResults=u.isRestoring.value?"isRestoring":"optimistic",d}),c=new r(u,a.value),h=J(c.getCurrentResult());let l=()=>{};b(u.isRestoring,d=>{d||(l(),l=c.subscribe(R=>{x(h,R)}))},{immediate:!0}),b(a,()=>{c.setOptions(a.value),x(h,c.getCurrentResult())}),Y(()=>{l()});const o=()=>new Promise((d,R)=>{let m=()=>{};const v=()=>{if(a.value.enabled!==!1){const f=c.getOptimisticResult(a.value);f.isStale?(m(),c.fetchOptimistic(a.value).then(d,R)):(m(),d(f))}};v(),m=b(a,v,{deep:!0})});return b(()=>h.error,d=>{if(h.isError&&!h.isFetching&&_(a.value.useErrorBoundary,[d,c.getCurrentQuery()]))throw d}),{...X(Z(h)),suspense:o}}function le(r,e={},t={}){const s=S(r),n=S(e),i=S(t);let u=s;return ee(s)?typeof n=="function"?u={...i,queryKey:s,queryFn:n}:u={...n,queryKey:s}:u=s,te(u)}function ce(r,e,t){const s=ae(re,r,e,t);return{...s,refetch:s.refetch.value,remove:s.remove.value}}const oe=3;async function he(r,e){const t=r.startsWith("/")?r.slice(1):r;let s=`${window.DATA_HOST}${t}`;r.startsWith("http")&&(s=r),s.endsWith("/")&&(s=s.slice(0,-1));const n=await fetch(`${s}/config.json?t=${e??0}`),i=await fetch(`${s}/team.json?t=${e??0}`),u=await fetch(`${s}/run.json?t=${e??0}`),{status:a,statusText:c}=n;if(a>=300||a<200)throw new Error(`fetch data failed. [status=${a}] [statusText=${c}]`);return Promise.all([n.json(),i.json(),u.json()]).then(l=>({contest:l[0],teams:l[1],submissions:l[2]}))}function pe(r,e){let t=3e4,s=Q(()=>Math.floor(e.value.getTime()/1e3/10));return se.value==="I18N"&&(t=10*1e3,s=Q(()=>Math.floor(e.value.getTime()/1e3))),ce({queryKey:[r,s.value],queryFn:()=>he(r,s.value),retry:oe,staleTime:t,refetchInterval:t})}function ye(){return j("data-source","",{transform:String})}function ve(){return j("battle-of-giants","",{transform:String})}export{ve as a,ye as g,pe as u};
@@ -1 +1 @@
1
- import{_ as m}from"./TheInput.vue_vue_type_script_setup_true_lang-d53a2e94.js";import{g as _,j as p,G as f,u as h,o as b,c as v,d as e,t as n,l as o,b as y,H as x,I as g,q as i}from"./index-c5ed7f0e.js";import{u as w}from"./user-59dce06c.js";const V={flex:"","flex-col":"","justify-center":"","items-center":""},k=e("div",{"text-4xl":""},[e("div",{"i-carbon-campsite":""})],-1),I=e("p",null,[e("a",{rel:"noreferrer",href:"https://github.com/antfu/vitesse",target:"_blank"}," Vitesse ")],-1),B={"text-sm":"","opacity-75":""},C=e("div",{"py-4":""},null,-1),K={"w-48":""},N={class:"hidden",for:"input"},R=["disabled"],U=_({name:"IndexPage",__name:"test",setup(j){const r=w(),t=p(r.savedName),c=f();function a(){t.value&&c.push(`/hi/${encodeURIComponent(t.value)}`)}const{t:s}=h();return(S,l)=>{const u=m;return b(),v("div",V,[k,I,e("p",null,[e("em",B,n(o(s)("intro.desc")),1)]),C,e("div",K,[y(u,{modelValue:o(t),"onUpdate:modelValue":l[0]||(l[0]=d=>x(t)?t.value=d:null),placeholder:o(s)("intro.whats-your-name"),autocomplete:"false",onKeydown:g(a,["enter"])},null,8,["modelValue","placeholder","onKeydown"]),e("label",N,n(o(s)("intro.whats-your-name")),1)]),e("div",null,[e("button",{"m-3":"","text-sm":"",btn:"",disabled:!o(t),onClick:a},n(o(s)("button.go")),9,R)])])}}});typeof i=="function"&&i(U);export{U as default};
1
+ import{_ as m}from"./TheInput.vue_vue_type_script_setup_true_lang-5240cefb.js";import{g as _,j as p,G as f,u as h,o as b,c as v,d as e,t as n,l as o,b as y,H as x,I as g,q as i}from"./index-8920b1dd.js";import{u as w}from"./user-c84c315a.js";const V={flex:"","flex-col":"","justify-center":"","items-center":""},k=e("div",{"text-4xl":""},[e("div",{"i-carbon-campsite":""})],-1),I=e("p",null,[e("a",{rel:"noreferrer",href:"https://github.com/antfu/vitesse",target:"_blank"}," Vitesse ")],-1),B={"text-sm":"","opacity-75":""},C=e("div",{"py-4":""},null,-1),K={"w-48":""},N={class:"hidden",for:"input"},R=["disabled"],U=_({name:"IndexPage",__name:"test",setup(j){const r=w(),t=p(r.savedName),c=f();function a(){t.value&&c.push(`/hi/${encodeURIComponent(t.value)}`)}const{t:s}=h();return(S,l)=>{const u=m;return b(),v("div",V,[k,I,e("p",null,[e("em",B,n(o(s)("intro.desc")),1)]),C,e("div",K,[y(u,{modelValue:o(t),"onUpdate:modelValue":l[0]||(l[0]=d=>x(t)?t.value=d:null),placeholder:o(s)("intro.whats-your-name"),autocomplete:"false",onKeydown:g(a,["enter"])},null,8,["modelValue","placeholder","onKeydown"]),e("label",N,n(o(s)("intro.whats-your-name")),1)]),e("div",null,[e("button",{"m-3":"","text-sm":"",btn:"",disabled:!o(t),onClick:a},n(o(s)("button.go")),9,R)])])}}});typeof i=="function"&&i(U);export{U as default};
@@ -1 +1 @@
1
- import{aT as m,j as r,s as t}from"./index-c5ed7f0e.js";const l=m("user",()=>{const e=r(""),s=r(new Set),o=t(()=>Array.from(s.value)),u=t(()=>o.value.filter(a=>a!==e.value));function n(a){e.value&&s.value.add(e.value),e.value=a}return{setNewName:n,otherNames:u,savedName:e}});export{l as u};
1
+ import{aV as m,j as r,s as t}from"./index-8920b1dd.js";const l=m("user",()=>{const e=r(""),s=r(new Set),o=t(()=>Array.from(s.value)),u=t(()=>o.value.filter(a=>a!==e.value));function n(a){e.value&&s.value.add(e.value),e.value=a}return{setNewName:n,otherNames:u,savedName:e}});export{l as u};
@@ -1 +1 @@
1
- import{_ as u}from"./index-c5ed7f0e.js";function p(d={}){const{immediate:l=!1,onNeedRefresh:v,onOfflineReady:t,onRegistered:r,onRegisteredSW:o,onRegisterError:s}=d;let i,n;const c=async(a=!0)=>{await n};async function f(){if("serviceWorker"in navigator){const{Workbox:a}=await u(()=>import("./workbox-window.prod.es5-a7b12eab.js"),[],import.meta.url);i=new a("/sw.js",{scope:"/",type:"classic"}),i.addEventListener("activated",e=>{(e.isUpdate||e.isExternal)&&window.location.reload()}),i.addEventListener("installed",e=>{e.isUpdate||t==null||t()}),i.register({immediate:l}).then(e=>{o?o("/sw.js",e):r==null||r(e)}).catch(e=>{s==null||s(e)})}}return n=f(),c}export{p as registerSW};
1
+ import{_ as u}from"./index-8920b1dd.js";function p(d={}){const{immediate:l=!1,onNeedRefresh:v,onOfflineReady:t,onRegistered:r,onRegisteredSW:o,onRegisterError:s}=d;let i,n;const c=async(a=!0)=>{await n};async function f(){if("serviceWorker"in navigator){const{Workbox:a}=await u(()=>import("./workbox-window.prod.es5-a7b12eab.js"),[],import.meta.url);i=new a("/sw.js",{scope:"/",type:"classic"}),i.addEventListener("activated",e=>{(e.isUpdate||e.isExternal)&&window.location.reload()}),i.addEventListener("installed",e=>{e.isUpdate||t==null||t()}),i.register({immediate:l}).then(e=>{o?o("/sw.js",e):r==null||r(e)}).catch(e=>{s==null||s(e)})}}return n=f(),c}export{p as registerSW};
package/dist/index.html CHANGED
@@ -1 +1 @@
1
- <!doctype html><html lang="en"><head><meta charset="UTF-8"><link rel="apple-touch-icon" href="https://cdn.jsdelivr.net/npm/@xcpcio/board-app@0.45.0/dist/balloon-192x192.png"><link rel="mask-icon" href="https://cdn.jsdelivr.net/npm/@xcpcio/board-app@0.45.0/dist/balloon-512x512.svg" color="#00aba9"><meta name="msapplication-TileColor" content="#00aba9"><script>function normalizePath(_){for(;_.endsWith("/");)_=_.slice(0,-1);return`${_}/`}{let _="https://cdn.jsdelivr.net/npm/@xcpcio/board-app@0.45.0/dist";_=normalizePath(_),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.45.0/dist/assets/index-c5ed7f0e.js"></script><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@xcpcio/board-app@0.45.0/dist/assets/index-ea1c658f.css"><link rel="manifest" href="/manifest.webmanifest"><style></style></head><body class="font-sans"><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 plausibleJSUrl=__PLAUSIBLE_JS_URL__,plausibleDataDomain=__PLAUSIBLE_DATA_DOMAIN__;!function(){var e=document.createElement("script");e.src=plausibleJSUrl,e.defer=!0,e.setAttribute("data-domain",plausibleDataDomain);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){}try{var googleAnalyticsId=__GOOGLE_ANALYTICS_ID__;!function(){var e,t,a,r,c,n;location.port||(e=window,t=document,a="script",r="ga",e.GoogleAnalyticsObject=r,e[r]=e[r]||function(){(e[r].q=e[r].q||[]).push(arguments)},e[r].l=1*new Date,c=t.createElement(a),n=t.getElementsByTagName(a)[0],c.async=1,c.src="//www.google-analytics.com/analytics.js",n.parentNode.insertBefore(c,n),ga("create",`${googleAnalyticsId}`,"auto"),ga("send","pageview"))}()}catch(e){}</script></body></html>
1
+ <!doctype html><html lang="en"><head><meta charset="UTF-8"><link rel="apple-touch-icon" href="https://cdn.jsdelivr.net/npm/@xcpcio/board-app@0.45.1/dist/balloon-192x192.png"><link rel="mask-icon" href="https://cdn.jsdelivr.net/npm/@xcpcio/board-app@0.45.1/dist/balloon-512x512.svg" color="#00aba9"><meta name="msapplication-TileColor" content="#00aba9"><script>function normalizePath(_){for(;_.endsWith("/");)_=_.slice(0,-1);return`${_}/`}{let _="https://cdn.jsdelivr.net/npm/@xcpcio/board-app@0.45.1/dist";_=normalizePath(_),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.45.1/dist/assets/index-8920b1dd.js"></script><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@xcpcio/board-app@0.45.1/dist/assets/index-ea1c658f.css"><link rel="manifest" href="/manifest.webmanifest"><style></style></head><body class="font-sans"><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 plausibleJSUrl=__PLAUSIBLE_JS_URL__,plausibleDataDomain=__PLAUSIBLE_DATA_DOMAIN__;!function(){var e=document.createElement("script");e.src=plausibleJSUrl,e.defer=!0,e.setAttribute("data-domain",plausibleDataDomain);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){}try{var googleAnalyticsId=__GOOGLE_ANALYTICS_ID__;!function(){var e,t,a,r,c,n;location.port||(e=window,t=document,a="script",r="ga",e.GoogleAnalyticsObject=r,e[r]=e[r]||function(){(e[r].q=e[r].q||[]).push(arguments)},e[r].l=1*new Date,c=t.createElement(a),n=t.getElementsByTagName(a)[0],c.async=1,c.src="//www.google-analytics.com/analytics.js",n.parentNode.insertBefore(c,n),ga("create",`${googleAnalyticsId}`,"auto"),ga("send","pageview"))}()}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,i)=>{const r=s||("document"in self?document.currentScript.src:"")||location.href;if(e[r])return;let u={};const a=s=>l(s,r),t={module:{uri:r},exports:u,require:a};e[r]=Promise.all(n.map((s=>t[s]||a(s)))).then((s=>(i(...s),u)))}}define(["./workbox-b8d87ee1"],(function(s){"use strict";self.skipWaiting(),s.clientsClaim(),s.precacheAndRoute([{url:"assets/_...all_-49fdf693.js",revision:null},{url:"assets/_name_-ecfcaff9.js",revision:null},{url:"assets/about-aafa19e0.js",revision:null},{url:"assets/board-ac08a49e.js",revision:null},{url:"assets/Board-d8672557.js",revision:null},{url:"assets/Board-eada7b82.css",revision:null},{url:"assets/board-layout-ca4c1273.js",revision:null},{url:"assets/DataSourceInput.vue_vue_type_script_setup_true_lang-355e8892.js",revision:null},{url:"assets/en-c9a8dbb5.js",revision:null},{url:"assets/headless-e170f56d.js",revision:null},{url:"assets/home-3bd8e303.js",revision:null},{url:"assets/index-67b2a8c5.css",revision:null},{url:"assets/index-c5ed7f0e.js",revision:null},{url:"assets/index-ea1c658f.css",revision:null},{url:"assets/index-eb93e748.js",revision:null},{url:"assets/index-fa8b49d4.js",revision:null},{url:"assets/index-layout-4c56300c.js",revision:null},{url:"assets/query-3fa14ec7.js",revision:null},{url:"assets/test-8377af2c.js",revision:null},{url:"assets/TheInput.vue_vue_type_script_setup_true_lang-d53a2e94.js",revision:null},{url:"assets/user-59dce06c.js",revision:null},{url:"assets/virtual_pwa-register-97a9bef2.js",revision:null},{url:"assets/workbox-window.prod.es5-a7b12eab.js",revision:null},{url:"assets/zh-CN-8e545f66.js",revision:null},{url:"index.html",revision:"5d1dd3e7aa01dbc349f2d6f0caca2449"},{url:"favicon.svg",revision:"5a744f4ccbb122d4a0575be779ddcd43"},{url:"safari-pinned-tab.svg",revision:"5eaf74d1c43d30e0af743b68a3f48504"},{url:"balloon2-192x192.png",revision:"c857ae6d9dfae118ab4397d4358422bd"},{url:"balloon2-512x512.png",revision:"065594f4f743fe3884793c03d3fe7d9e"},{url:"manifest.webmanifest",revision:"3082e8d8ebc9619c6c1055ff243a02a8"}],{}),s.cleanupOutdatedCaches(),s.registerRoute(new s.NavigationRoute(s.createHandlerBoundToURL("index.html")))}));
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,i)=>{const r=s||("document"in self?document.currentScript.src:"")||location.href;if(e[r])return;let u={};const t=s=>l(s,r),a={module:{uri:r},exports:u,require:t};e[r]=Promise.all(n.map((s=>a[s]||t(s)))).then((s=>(i(...s),u)))}}define(["./workbox-b8d87ee1"],(function(s){"use strict";self.skipWaiting(),s.clientsClaim(),s.precacheAndRoute([{url:"assets/_...all_-3f3ad044.js",revision:null},{url:"assets/_name_-b216f907.js",revision:null},{url:"assets/about-82769d21.js",revision:null},{url:"assets/Board-18b9172e.js",revision:null},{url:"assets/Board-24564942.css",revision:null},{url:"assets/board-bb7bf0ea.js",revision:null},{url:"assets/board-layout-57ee4bf7.js",revision:null},{url:"assets/DataSourceInput.vue_vue_type_script_setup_true_lang-427dce23.js",revision:null},{url:"assets/en-c9a8dbb5.js",revision:null},{url:"assets/headless-97bcf036.js",revision:null},{url:"assets/home-cb1bfaec.js",revision:null},{url:"assets/index-3feadeb5.js",revision:null},{url:"assets/index-40849fcd.js",revision:null},{url:"assets/index-67b2a8c5.css",revision:null},{url:"assets/index-8920b1dd.js",revision:null},{url:"assets/index-ea1c658f.css",revision:null},{url:"assets/index-layout-f82ee3d7.js",revision:null},{url:"assets/query-98ac309e.js",revision:null},{url:"assets/test-4db0702c.js",revision:null},{url:"assets/TheInput.vue_vue_type_script_setup_true_lang-5240cefb.js",revision:null},{url:"assets/user-c84c315a.js",revision:null},{url:"assets/virtual_pwa-register-3935cae2.js",revision:null},{url:"assets/workbox-window.prod.es5-a7b12eab.js",revision:null},{url:"assets/zh-CN-8e545f66.js",revision:null},{url:"index.html",revision:"bf393401b7f48b0df276ce0acf179871"},{url:"favicon.svg",revision:"5a744f4ccbb122d4a0575be779ddcd43"},{url:"safari-pinned-tab.svg",revision:"5eaf74d1c43d30e0af743b68a3f48504"},{url:"balloon2-192x192.png",revision:"c857ae6d9dfae118ab4397d4358422bd"},{url:"balloon2-512x512.png",revision:"065594f4f743fe3884793c03d3fe7d9e"},{url:"manifest.webmanifest",revision:"3082e8d8ebc9619c6c1055ff243a02a8"}],{}),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.45.0",
4
+ "version": "0.45.1",
5
5
  "description": "XCPCIO Board App",
6
6
  "author": "Dup4 <lyuzhi.pan@gmail.com>",
7
7
  "license": "MIT",
@@ -53,8 +53,8 @@
53
53
  "vue-router": "^4.2.4",
54
54
  "vue-search-select": "^3.1.2",
55
55
  "vue-toast-notification": "^3",
56
- "@xcpcio/core": "0.45.0",
57
- "@xcpcio/types": "0.45.0"
56
+ "@xcpcio/core": "0.45.1",
57
+ "@xcpcio/types": "0.45.1"
58
58
  },
59
59
  "devDependencies": {
60
60
  "@antfu/eslint-config": "^0.39.8",
@@ -1,7 +1,7 @@
1
1
  <script setup lang="ts">
2
2
  import _ from "lodash";
3
3
  import { useRouteQuery } from "@vueuse/router";
4
- import { onKeyStroke, useIntervalFn, useNow } from "@vueuse/core";
4
+ import { onKeyStroke, useDocumentVisibility, useIntervalFn, useNow } from "@vueuse/core";
5
5
 
6
6
  import { Rank, RankOptions, createContest, createSubmissions, createTeams, getImageSource, getTimeDiff } from "@xcpcio/core";
7
7
  import type { Contest, Submissions, Teams } from "@xcpcio/core";
@@ -94,7 +94,7 @@ function reBuildRank(options = { force: false }) {
94
94
  isReBuildRank.value = false;
95
95
  }
96
96
 
97
- const { data, isError, error } = useQueryBoardData(props.dataSourceUrl ?? route.path, now);
97
+ const { data, isError, error, refetch } = useQueryBoardData(props.dataSourceUrl ?? route.path, now);
98
98
  watch(data, async () => {
99
99
  if (data.value === null || data.value === undefined) {
100
100
  return;
@@ -294,13 +294,25 @@ const contestState = computed(() => {
294
294
  return ContestState.PAUSED;
295
295
  }
296
296
 
297
- return rank.value.contest.getContestState();
297
+ return rank.value.contest.getContestState(now.value);
298
298
  });
299
299
 
300
300
  const pausedTime = computed(() => {
301
301
  return getTimeDiff(rank.value.options.timestamp);
302
302
  });
303
303
 
304
+ const reFetchThrottleFn = useThrottleFn(() => {
305
+ refetch();
306
+ }, 30 * 1000);
307
+ const visibility = useDocumentVisibility();
308
+ watch(visibility, () => {
309
+ if (visibility.value === "hidden") {
310
+ return;
311
+ }
312
+
313
+ reFetchThrottleFn();
314
+ });
315
+
304
316
  onUnmounted(() => {
305
317
  clearAutoScrollInterval();
306
318
  });