You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1 line
1.8 KiB

function e(){return 60}var t=`/api/auth/sms/send`,n=`/api/auth/sms/login`,r=`cxxfds_token`,i=`cxxfds_participant_competition_slug`,a=`cxxfds_admin_token`,o=`cxxfds_admin_competition_id`,s=`cxxfds_reviewer_token`,c=`cxxfds_reviewer_competition_slug`,l=`/api/v1/review/auth/login`,u=`/api/v1/review/me`,d=`/api/v1/review/applications`;function f(e,t){let n=new URLSearchParams({competition_slug:t});return`${_()}/api/v1/review/applications/${e}?${n.toString()}`}function p(e){return`${_()}/api/v1/review/applications/${e}/score`}var m=`/v1/admin`;function h(){let e=`/admin/`;return e===`/`?`/admin/login`:`${e.endsWith(`/`)?e.slice(0,-1):e}/admin/login`}function g(){let e=`false`.replace(/^['"]|['"]$/g,``);return e===`true`||e===`1`||e===`yes`||e===`on`}function _(){return(void 0)?.trim()?(void 0).trim().replace(/\/$/,``):(window.location.hostname,``)}function v(e){let t=String(e??``).trim();if(!t)return t;if(/^https?:\/\//i.test(t))try{let e=new URL(t),n=e.pathname.replace(/\/{2,}/g,`/`);return e.pathname=n.startsWith(`/`)?n:`/${n}`,e.toString()}catch{return t.replace(/([^:])\/\/+/g,`$1/`)}return t.replace(/\/{2,}/g,`/`)}function y(e,t,n){let r=new URLSearchParams({competition_slug:n});return`${_()}/api/v1/review/applications/${e}/files/${t}/download?${r.toString()}`}function b(){let e=(void 0)?.trim();return e?e.replace(/\/$/,``):`${_()}/api${m}`}function x(){return{token:localStorage.getItem(`cxxfds_reviewer_token`)??``,competitionSlug:localStorage.getItem(`cxxfds_reviewer_competition_slug`)??``}}function S(e,t){localStorage.setItem(s,e),localStorage.setItem(c,t)}function C(){localStorage.removeItem(s),localStorage.removeItem(c)}function w(e){return/^\/c\/[^/]+\/review(?:\/|$)/.test(e)}export{S,h as _,t as a,y as b,u as c,C as d,b as f,w as g,v as h,n as i,r as l,e as m,a as n,d as o,_ as p,i as r,l as s,o as t,g as u,x as v,p as x,f as y};