UNPKG

@cpany/types

Version:
94 lines (90 loc) 3.07 kB
"use strict"; var __defProp = Object.defineProperty; var __getOwnPropDesc = Object.getOwnPropertyDescriptor; var __getOwnPropNames = Object.getOwnPropertyNames; var __hasOwnProp = Object.prototype.hasOwnProperty; var __export = (target, all) => { for (var name in all) __defProp(target, name, { get: all[name], enumerable: true }); }; var __copyProps = (to, from, except, desc) => { if (from && typeof from === "object" || typeof from === "function") { for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); } return to; }; var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); // src/index.ts var src_exports = {}; __export(src_exports, { ParticipantType: () => ParticipantType, Verdict: () => Verdict, isAtCoder: () => isAtCoder, isCodeforces: () => isCodeforces, isHdu: () => isHdu, isLuogu: () => isLuogu, isNowCoder: () => isNowCoder, isPintia: () => isPintia }); module.exports = __toCommonJS(src_exports); // src/enum.ts var Verdict = /* @__PURE__ */ ((Verdict2) => { Verdict2["OK"] = "OK"; Verdict2["FAILED"] = "FAILED"; Verdict2["PARTIAL"] = "PARTIAL"; Verdict2["COMPILATION_ERROR"] = "COMPILATION_ERROR"; Verdict2["RUNTIME_ERROR"] = "RUNTIME_ERROR"; Verdict2["WRONG_ANSWER"] = "WRONG_ANSWER"; Verdict2["PRESENTATION_ERROR"] = "PRESENTATION_ERROR"; Verdict2["TIME_LIMIT_EXCEEDED"] = "TIME_LIMIT_EXCEEDED"; Verdict2["MEMORY_LIMIT_EXCEEDED"] = "MEMORY_LIMIT_EXCEEDED"; Verdict2["IDLENESS_LIMIT_EXCEEDED"] = "IDLENESS_LIMIT_EXCEEDED"; Verdict2["SECURITY_VIOLATED"] = "SECURITY_VIOLATED"; Verdict2["CRASHED"] = "CRASHED"; Verdict2["INPUT_PREPARATION_CRASHED"] = "INPUT_PREPARATION_CRASHED"; Verdict2["CHALLENGED"] = "CHALLENGED"; Verdict2["SKIPPED"] = "SKIPPED"; Verdict2["TESTING"] = "TESTING"; Verdict2["REJECTED"] = "REJECTED"; return Verdict2; })(Verdict || {}); var ParticipantType = /* @__PURE__ */ ((ParticipantType2) => { ParticipantType2["CONTESTANT"] = "CONTESTANT"; ParticipantType2["PRACTICE"] = "PRACTICE"; ParticipantType2["VIRTUAL"] = "VIRTUAL"; ParticipantType2["MANAGER"] = "MANAGER"; ParticipantType2["OUT_OF_COMPETITION"] = "OUT_OF_COMPETITION"; return ParticipantType2; })(ParticipantType || {}); // src/platform.ts function isCodeforces(entity) { return entity.type.startsWith("codeforces"); } function isAtCoder(entity) { return entity.type.startsWith("atcoder"); } function isNowCoder(entity) { return entity.type.startsWith("nowcoder"); } function isLuogu(entity) { return entity.type.startsWith("luogu"); } function isHdu(entity) { return entity.type.startsWith("hdu"); } function isPintia(entity) { return entity.type.startsWith("pintia"); } // Annotate the CommonJS export names for ESM import in node: 0 && (module.exports = { ParticipantType, Verdict, isAtCoder, isCodeforces, isHdu, isLuogu, isNowCoder, isPintia });