Socket
Socket
Sign inDemoInstall

cronstrue

Package Overview
Dependencies
0
Maintainers
1
Versions
194
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.125.0 to 2.1.0

locales/be.js

816

dist/cronstrue.js

@@ -10,99 +10,212 @@ (function webpackUniversalModuleDefinition(root, factory) {

root["cronstrue"] = factory();
})(typeof self !== 'undefined' ? self : this, function() {
return /******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId]) {
/******/ return installedModules[moduleId].exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ i: moduleId,
/******/ l: false,
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ // Flag the module as loaded
/******/ module.l = true;
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/******/
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;
/******/
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
/******/
/******/ // define getter function for harmony exports
/******/ __webpack_require__.d = function(exports, name, getter) {
/******/ if(!__webpack_require__.o(exports, name)) {
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
/******/ }
/******/ };
/******/
/******/ // define __esModule on exports
/******/ __webpack_require__.r = function(exports) {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/
/******/ // create a fake namespace object
/******/ // mode & 1: value is a module id, require it
/******/ // mode & 2: merge all properties of value into the ns
/******/ // mode & 4: return value when already ns object
/******/ // mode & 8|1: behave like require
/******/ __webpack_require__.t = function(value, mode) {
/******/ if(mode & 1) value = __webpack_require__(value);
/******/ if(mode & 8) return value;
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
/******/ var ns = Object.create(null);
/******/ __webpack_require__.r(ns);
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
/******/ return ns;
/******/ };
/******/
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __webpack_require__.n = function(module) {
/******/ var getter = module && module.__esModule ?
/******/ function getDefault() { return module['default']; } :
/******/ function getModuleExports() { return module; };
/******/ __webpack_require__.d(getter, 'a', getter);
/******/ return getter;
/******/ };
/******/
/******/ // Object.prototype.hasOwnProperty.call
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "";
/******/
/******/
/******/ // Load entry module and return exports
/******/ return __webpack_require__(__webpack_require__.s = 5);
/******/ })
/************************************************************************/
/******/ ([
/* 0 */
/***/ (function(module, exports, __webpack_require__) {
})(globalThis, function() {
return /******/ (() => { // webpackBootstrap
/******/ "use strict";
/******/ var __webpack_modules__ = ({
"use strict";
/***/ 794:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
Object.defineProperty(exports, "__esModule", { value: true });
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.CronParser = void 0;
var rangeValidator_1 = __webpack_require__(586);
var CronParser = (function () {
function CronParser(expression, dayOfWeekStartIndexZero, monthStartIndexZero) {
if (dayOfWeekStartIndexZero === void 0) { dayOfWeekStartIndexZero = true; }
if (monthStartIndexZero === void 0) { monthStartIndexZero = false; }
this.expression = expression;
this.dayOfWeekStartIndexZero = dayOfWeekStartIndexZero;
this.monthStartIndexZero = monthStartIndexZero;
}
CronParser.prototype.parse = function () {
var parsed = this.extractParts(this.expression);
this.normalize(parsed);
this.validate(parsed);
return parsed;
};
CronParser.prototype.extractParts = function (expression) {
if (!this.expression) {
throw new Error("Expression is empty");
}
var parsed = expression.trim().split(/[ ]+/);
if (parsed.length < 5) {
throw new Error("Expression has only ".concat(parsed.length, " part").concat(parsed.length == 1 ? "" : "s", ". At least 5 parts are required."));
}
else if (parsed.length == 5) {
parsed.unshift("");
parsed.push("");
}
else if (parsed.length == 6) {
var isYearWithNoSecondsPart = /\d{4}$/.test(parsed[5]) || parsed[4] == "?" || parsed[2] == "?";
if (isYearWithNoSecondsPart) {
parsed.unshift("");
}
else {
parsed.push("");
}
}
else if (parsed.length > 7) {
throw new Error("Expression has ".concat(parsed.length, " parts; too many!"));
}
return parsed;
};
CronParser.prototype.normalize = function (expressionParts) {
var _this = this;
expressionParts[3] = expressionParts[3].replace("?", "*");
expressionParts[5] = expressionParts[5].replace("?", "*");
expressionParts[2] = expressionParts[2].replace("?", "*");
if (expressionParts[0].indexOf("0/") == 0) {
expressionParts[0] = expressionParts[0].replace("0/", "*/");
}
if (expressionParts[1].indexOf("0/") == 0) {
expressionParts[1] = expressionParts[1].replace("0/", "*/");
}
if (expressionParts[2].indexOf("0/") == 0) {
expressionParts[2] = expressionParts[2].replace("0/", "*/");
}
if (expressionParts[3].indexOf("1/") == 0) {
expressionParts[3] = expressionParts[3].replace("1/", "*/");
}
if (expressionParts[4].indexOf("1/") == 0) {
expressionParts[4] = expressionParts[4].replace("1/", "*/");
}
if (expressionParts[6].indexOf("1/") == 0) {
expressionParts[6] = expressionParts[6].replace("1/", "*/");
}
expressionParts[5] = expressionParts[5].replace(/(^\d)|([^#/\s]\d)/g, function (t) {
var dowDigits = t.replace(/\D/, "");
var dowDigitsAdjusted = dowDigits;
if (_this.dayOfWeekStartIndexZero) {
if (dowDigits == "7") {
dowDigitsAdjusted = "0";
}
}
else {
dowDigitsAdjusted = (parseInt(dowDigits) - 1).toString();
}
return t.replace(dowDigits, dowDigitsAdjusted);
});
if (expressionParts[5] == "L") {
expressionParts[5] = "6";
}
if (expressionParts[3] == "?") {
expressionParts[3] = "*";
}
if (expressionParts[3].indexOf("W") > -1 &&
(expressionParts[3].indexOf(",") > -1 || expressionParts[3].indexOf("-") > -1)) {
throw new Error("The 'W' character can be specified only when the day-of-month is a single day, not a range or list of days.");
}
var days = {
SUN: 0,
MON: 1,
TUE: 2,
WED: 3,
THU: 4,
FRI: 5,
SAT: 6,
};
for (var day in days) {
expressionParts[5] = expressionParts[5].replace(new RegExp(day, "gi"), days[day].toString());
}
expressionParts[4] = expressionParts[4].replace(/(^\d{1,2})|([^#/\s]\d{1,2})/g, function (t) {
var dowDigits = t.replace(/\D/, "");
var dowDigitsAdjusted = dowDigits;
if (_this.monthStartIndexZero) {
dowDigitsAdjusted = (parseInt(dowDigits) + 1).toString();
}
return t.replace(dowDigits, dowDigitsAdjusted);
});
var months = {
JAN: 1,
FEB: 2,
MAR: 3,
APR: 4,
MAY: 5,
JUN: 6,
JUL: 7,
AUG: 8,
SEP: 9,
OCT: 10,
NOV: 11,
DEC: 12,
};
for (var month in months) {
expressionParts[4] = expressionParts[4].replace(new RegExp(month, "gi"), months[month].toString());
}
if (expressionParts[0] == "0") {
expressionParts[0] = "";
}
if (!/\*|\-|\,|\//.test(expressionParts[2]) &&
(/\*|\//.test(expressionParts[1]) || /\*|\//.test(expressionParts[0]))) {
expressionParts[2] += "-".concat(expressionParts[2]);
}
for (var i = 0; i < expressionParts.length; i++) {
if (expressionParts[i].indexOf(",") != -1) {
expressionParts[i] =
expressionParts[i]
.split(",")
.filter(function (str) { return str !== ""; })
.join(",") || "*";
}
if (expressionParts[i] == "*/1") {
expressionParts[i] = "*";
}
if (expressionParts[i].indexOf("/") > -1 && !/^\*|\-|\,/.test(expressionParts[i])) {
var stepRangeThrough = null;
switch (i) {
case 4:
stepRangeThrough = "12";
break;
case 5:
stepRangeThrough = "6";
break;
case 6:
stepRangeThrough = "9999";
break;
default:
stepRangeThrough = null;
break;
}
if (stepRangeThrough !== null) {
var parts = expressionParts[i].split("/");
expressionParts[i] = "".concat(parts[0], "-").concat(stepRangeThrough, "/").concat(parts[1]);
}
}
}
};
CronParser.prototype.validate = function (parsed) {
this.assertNoInvalidCharacters("DOW", parsed[5]);
this.assertNoInvalidCharacters("DOM", parsed[3]);
this.validateRange(parsed);
};
CronParser.prototype.validateRange = function (parsed) {
rangeValidator_1.default.secondRange(parsed[0]);
rangeValidator_1.default.minuteRange(parsed[1]);
rangeValidator_1.default.hourRange(parsed[2]);
rangeValidator_1.default.dayOfMonthRange(parsed[3]);
rangeValidator_1.default.monthRange(parsed[4], this.monthStartIndexZero);
rangeValidator_1.default.dayOfWeekRange(parsed[5], this.dayOfWeekStartIndexZero);
};
CronParser.prototype.assertNoInvalidCharacters = function (partDescription, expression) {
var invalidChars = expression.match(/[A-KM-VX-Z]+/gi);
if (invalidChars && invalidChars.length) {
throw new Error("".concat(partDescription, " part contains invalid values: '").concat(invalidChars.toString(), "'"));
}
};
return CronParser;
}());
exports.CronParser = CronParser;
/***/ }),
/***/ 728:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.ExpressionDescriptor = void 0;
var stringUtilities_1 = __webpack_require__(1);
var cronParser_1 = __webpack_require__(2);
var stringUtilities_1 = __webpack_require__(910);
var cronParser_1 = __webpack_require__(794);
var ExpressionDescriptor = (function () {

@@ -113,9 +226,11 @@ function ExpressionDescriptor(expression, options) {

this.expressionParts = new Array(5);
if (ExpressionDescriptor.locales[options.locale]) {
this.i18n = ExpressionDescriptor.locales[options.locale];
if (!this.options.locale && ExpressionDescriptor.defaultLocale) {
this.options.locale = ExpressionDescriptor.defaultLocale;
}
else {
console.warn("Locale '" + options.locale + "' could not be found; falling back to 'en'.");
this.i18n = ExpressionDescriptor.locales["en"];
if (!ExpressionDescriptor.locales[this.options.locale]) {
var fallBackLocale = Object.keys(ExpressionDescriptor.locales)[0];
console.warn("Locale '".concat(this.options.locale, "' could not be found; falling back to '").concat(fallBackLocale, "'."));
this.options.locale = fallBackLocale;
}
this.i18n = ExpressionDescriptor.locales[this.options.locale];
if (options.use24HourTimeFormat === undefined) {

@@ -126,3 +241,3 @@ options.use24HourTimeFormat = this.i18n.use24HourTimeFormatByDefault();

ExpressionDescriptor.toString = function (expression, _a) {
var _b = _a === void 0 ? {} : _a, _c = _b.throwExceptionOnParseError, throwExceptionOnParseError = _c === void 0 ? true : _c, _d = _b.verbose, verbose = _d === void 0 ? false : _d, _e = _b.dayOfWeekStartIndexZero, dayOfWeekStartIndexZero = _e === void 0 ? true : _e, _f = _b.monthStartIndexZero, monthStartIndexZero = _f === void 0 ? false : _f, use24HourTimeFormat = _b.use24HourTimeFormat, _g = _b.locale, locale = _g === void 0 ? "en" : _g;
var _b = _a === void 0 ? {} : _a, _c = _b.throwExceptionOnParseError, throwExceptionOnParseError = _c === void 0 ? true : _c, _d = _b.verbose, verbose = _d === void 0 ? false : _d, _e = _b.dayOfWeekStartIndexZero, dayOfWeekStartIndexZero = _e === void 0 ? true : _e, _f = _b.monthStartIndexZero, monthStartIndexZero = _f === void 0 ? false : _f, use24HourTimeFormat = _b.use24HourTimeFormat, _g = _b.locale, locale = _g === void 0 ? null : _g;
var options = {

@@ -139,4 +254,6 @@ throwExceptionOnParseError: throwExceptionOnParseError,

};
ExpressionDescriptor.initialize = function (localesLoader) {
ExpressionDescriptor.initialize = function (localesLoader, defaultLocale) {
if (defaultLocale === void 0) { defaultLocale = "en"; }
ExpressionDescriptor.specialCharacters = ["/", "-", ",", "*"];
ExpressionDescriptor.defaultLocale = defaultLocale;
localesLoader.load(ExpressionDescriptor.locales);

@@ -155,3 +272,3 @@ };

description += timeSegment + dayOfMonthDesc + dayOfWeekDesc + monthDesc + yearDesc;
description = this.transformVerbosity(description, this.options.verbose);
description = this.transformVerbosity(description, !!this.options.verbose);
description = description.charAt(0).toLocaleUpperCase() + description.substr(1);

@@ -164,3 +281,3 @@ }

else {
throw "" + ex;
throw "".concat(ex);
}

@@ -211,3 +328,3 @@ }

description += secondsDescription;
if (description.length > 0 && minutesDescription.length > 0) {
if (description && minutesDescription) {
description += ", ";

@@ -219,3 +336,3 @@ }

}
if (description.length > 0 && hoursDescription.length > 0) {
if (description && hoursDescription) {
description += ", ";

@@ -453,3 +570,3 @@ }

if (i > 0 && segments.length > 1 && (i == segments.length - 1 || segments.length == 2)) {
descriptionContent += this.i18n.spaceAnd() + " ";
descriptionContent += "".concat(this.i18n.spaceAnd(), " ");
}

@@ -514,4 +631,4 @@ if (segments[i].indexOf("/") > -1 || segments[i].indexOf("-") > -1) {

if (!this.options.use24HourTimeFormat) {
setPeriodBeforeTime = this.i18n.setPeriodBeforeTime && this.i18n.setPeriodBeforeTime();
period = setPeriodBeforeTime ? this.getPeriod(hour) + " " : " " + this.getPeriod(hour);
setPeriodBeforeTime = !!(this.i18n.setPeriodBeforeTime && this.i18n.setPeriodBeforeTime());
period = setPeriodBeforeTime ? "".concat(this.getPeriod(hour), " ") : " ".concat(this.getPeriod(hour));
if (hour > 12) {

@@ -527,10 +644,10 @@ hour -= 12;

if (secondExpression) {
second = ":" + ("00" + secondExpression).substring(secondExpression.length);
second = ":".concat(("00" + secondExpression).substring(secondExpression.length));
}
return "" + (setPeriodBeforeTime ? period : "") + ("00" + hour.toString()).substring(hour.toString().length) + ":" + ("00" + minute.toString()).substring(minute.toString().length) + second + (!setPeriodBeforeTime ? period : "");
return "".concat(setPeriodBeforeTime ? period : "").concat(("00" + hour.toString()).substring(hour.toString().length), ":").concat(("00" + minute.toString()).substring(minute.toString().length)).concat(second).concat(!setPeriodBeforeTime ? period : "");
};
ExpressionDescriptor.prototype.transformVerbosity = function (description, useVerboseFormat) {
if (!useVerboseFormat) {
description = description.replace(new RegExp(", " + this.i18n.everyMinute(), "g"), "");
description = description.replace(new RegExp(", " + this.i18n.everyHour(), "g"), "");
description = description.replace(new RegExp(", ".concat(this.i18n.everyMinute()), "g"), "");
description = description.replace(new RegExp(", ".concat(this.i18n.everyHour()), "g"), "");
description = description.replace(new RegExp(this.i18n.commaEveryDay(), "g"), "");

@@ -551,309 +668,28 @@ description = description.replace(/\, ?$/, "");

/***/ }),
/* 1 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/***/ 336:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
Object.defineProperty(exports, "__esModule", { value: true });
exports.StringUtilities = void 0;
var StringUtilities = (function () {
function StringUtilities() {
}
StringUtilities.format = function (template) {
var values = [];
for (var _i = 1; _i < arguments.length; _i++) {
values[_i - 1] = arguments[_i];
}
return template.replace(/%s/g, function () {
return values.shift();
});
};
StringUtilities.containsAny = function (text, searchStrings) {
return searchStrings.some(function (c) {
return text.indexOf(c) > -1;
});
};
return StringUtilities;
}());
exports.StringUtilities = StringUtilities;
/***/ }),
/* 2 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.CronParser = void 0;
var rangeValidator_1 = __webpack_require__(3);
var CronParser = (function () {
function CronParser(expression, dayOfWeekStartIndexZero, monthStartIndexZero) {
if (dayOfWeekStartIndexZero === void 0) { dayOfWeekStartIndexZero = true; }
if (monthStartIndexZero === void 0) { monthStartIndexZero = false; }
this.expression = expression;
this.dayOfWeekStartIndexZero = dayOfWeekStartIndexZero;
this.monthStartIndexZero = monthStartIndexZero;
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.enLocaleLoader = void 0;
var en_1 = __webpack_require__(751);
var enLocaleLoader = (function () {
function enLocaleLoader() {
}
CronParser.prototype.parse = function () {
var parsed = this.extractParts(this.expression);
this.normalize(parsed);
this.validate(parsed);
return parsed;
enLocaleLoader.prototype.load = function (availableLocales) {
availableLocales["en"] = new en_1.en();
};
CronParser.prototype.extractParts = function (expression) {
if (!this.expression) {
throw new Error("Expression is empty");
}
var parsed = expression.trim().split(/[ ]+/);
if (parsed.length < 5) {
throw new Error("Expression has only " + parsed.length + " part" + (parsed.length == 1 ? "" : "s") + ". At least 5 parts are required.");
}
else if (parsed.length == 5) {
parsed.unshift("");
parsed.push("");
}
else if (parsed.length == 6) {
var isYearWithNoSecondsPart = /\d{4}$/.test(parsed[5]) || parsed[4] == "?" || parsed[2] == "?";
if (isYearWithNoSecondsPart) {
parsed.unshift("");
}
else {
parsed.push("");
}
}
else if (parsed.length > 7) {
throw new Error("Expression has " + parsed.length + " parts; too many!");
}
return parsed;
};
CronParser.prototype.normalize = function (expressionParts) {
var _this = this;
expressionParts[3] = expressionParts[3].replace("?", "*");
expressionParts[5] = expressionParts[5].replace("?", "*");
expressionParts[2] = expressionParts[2].replace("?", "*");
if (expressionParts[0].indexOf("0/") == 0) {
expressionParts[0] = expressionParts[0].replace("0/", "*/");
}
if (expressionParts[1].indexOf("0/") == 0) {
expressionParts[1] = expressionParts[1].replace("0/", "*/");
}
if (expressionParts[2].indexOf("0/") == 0) {
expressionParts[2] = expressionParts[2].replace("0/", "*/");
}
if (expressionParts[3].indexOf("1/") == 0) {
expressionParts[3] = expressionParts[3].replace("1/", "*/");
}
if (expressionParts[4].indexOf("1/") == 0) {
expressionParts[4] = expressionParts[4].replace("1/", "*/");
}
if (expressionParts[6].indexOf("1/") == 0) {
expressionParts[6] = expressionParts[6].replace("1/", "*/");
}
expressionParts[5] = expressionParts[5].replace(/(^\d)|([^#/\s]\d)/g, function (t) {
var dowDigits = t.replace(/\D/, "");
var dowDigitsAdjusted = dowDigits;
if (_this.dayOfWeekStartIndexZero) {
if (dowDigits == "7") {
dowDigitsAdjusted = "0";
}
}
else {
dowDigitsAdjusted = (parseInt(dowDigits) - 1).toString();
}
return t.replace(dowDigits, dowDigitsAdjusted);
});
if (expressionParts[5] == "L") {
expressionParts[5] = "6";
}
if (expressionParts[3] == "?") {
expressionParts[3] = "*";
}
if (expressionParts[3].indexOf("W") > -1 &&
(expressionParts[3].indexOf(",") > -1 || expressionParts[3].indexOf("-") > -1)) {
throw new Error("The 'W' character can be specified only when the day-of-month is a single day, not a range or list of days.");
}
var days = {
SUN: 0,
MON: 1,
TUE: 2,
WED: 3,
THU: 4,
FRI: 5,
SAT: 6,
};
for (var day in days) {
expressionParts[5] = expressionParts[5].replace(new RegExp(day, "gi"), days[day].toString());
}
expressionParts[4] = expressionParts[4].replace(/(^\d{1,2})|([^#/\s]\d{1,2})/g, function (t) {
var dowDigits = t.replace(/\D/, "");
var dowDigitsAdjusted = dowDigits;
if (_this.monthStartIndexZero) {
dowDigitsAdjusted = (parseInt(dowDigits) + 1).toString();
}
return t.replace(dowDigits, dowDigitsAdjusted);
});
var months = {
JAN: 1,
FEB: 2,
MAR: 3,
APR: 4,
MAY: 5,
JUN: 6,
JUL: 7,
AUG: 8,
SEP: 9,
OCT: 10,
NOV: 11,
DEC: 12,
};
for (var month in months) {
expressionParts[4] = expressionParts[4].replace(new RegExp(month, "gi"), months[month].toString());
}
if (expressionParts[0] == "0") {
expressionParts[0] = "";
}
if (!/\*|\-|\,|\//.test(expressionParts[2]) &&
(/\*|\//.test(expressionParts[1]) || /\*|\//.test(expressionParts[0]))) {
expressionParts[2] += "-" + expressionParts[2];
}
for (var i = 0; i < expressionParts.length; i++) {
if (expressionParts[i].indexOf(",") != -1) {
expressionParts[i] =
expressionParts[i]
.split(",")
.filter(function (str) { return str !== ""; })
.join(",") || "*";
}
if (expressionParts[i] == "*/1") {
expressionParts[i] = "*";
}
if (expressionParts[i].indexOf("/") > -1 && !/^\*|\-|\,/.test(expressionParts[i])) {
var stepRangeThrough = null;
switch (i) {
case 4:
stepRangeThrough = "12";
break;
case 5:
stepRangeThrough = "6";
break;
case 6:
stepRangeThrough = "9999";
break;
default:
stepRangeThrough = null;
break;
}
if (stepRangeThrough != null) {
var parts = expressionParts[i].split("/");
expressionParts[i] = parts[0] + "-" + stepRangeThrough + "/" + parts[1];
}
}
}
};
CronParser.prototype.validate = function (parsed) {
this.assertNoInvalidCharacters("DOW", parsed[5]);
this.assertNoInvalidCharacters("DOM", parsed[3]);
this.validateRange(parsed);
};
CronParser.prototype.validateRange = function (parsed) {
rangeValidator_1.default.secondRange(parsed[0]);
rangeValidator_1.default.minuteRange(parsed[1]);
rangeValidator_1.default.hourRange(parsed[2]);
rangeValidator_1.default.dayOfMonthRange(parsed[3]);
rangeValidator_1.default.monthRange(parsed[4], this.monthStartIndexZero);
rangeValidator_1.default.dayOfWeekRange(parsed[5], this.dayOfWeekStartIndexZero);
};
CronParser.prototype.assertNoInvalidCharacters = function (partDescription, expression) {
var invalidChars = expression.match(/[A-KM-VX-Z]+/gi);
if (invalidChars && invalidChars.length) {
throw new Error(partDescription + " part contains invalid values: '" + invalidChars.toString() + "'");
}
};
return CronParser;
return enLocaleLoader;
}());
exports.CronParser = CronParser;
exports.enLocaleLoader = enLocaleLoader;
/***/ }),
/* 3 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/***/ 751:
/***/ ((__unused_webpack_module, exports) => {
Object.defineProperty(exports, "__esModule", { value: true });
function assert(value, message) {
if (!value) {
throw new Error(message);
}
}
var RangeValidator = (function () {
function RangeValidator() {
}
RangeValidator.secondRange = function (parse) {
var parsed = parse.split(',');
for (var i = 0; i < parsed.length; i++) {
if (!isNaN(parseInt(parsed[i], 10))) {
var second = parseInt(parsed[i], 10);
assert(second >= 0 && second <= 59, 'seconds part must be >= 0 and <= 59');
}
}
};
RangeValidator.minuteRange = function (parse) {
var parsed = parse.split(',');
for (var i = 0; i < parsed.length; i++) {
if (!isNaN(parseInt(parsed[i], 10))) {
var minute = parseInt(parsed[i], 10);
assert(minute >= 0 && minute <= 59, 'minutes part must be >= 0 and <= 59');
}
}
};
RangeValidator.hourRange = function (parse) {
var parsed = parse.split(',');
for (var i = 0; i < parsed.length; i++) {
if (!isNaN(parseInt(parsed[i], 10))) {
var hour = parseInt(parsed[i], 10);
assert(hour >= 0 && hour <= 23, 'hours part must be >= 0 and <= 23');
}
}
};
RangeValidator.dayOfMonthRange = function (parse) {
var parsed = parse.split(',');
for (var i = 0; i < parsed.length; i++) {
if (!isNaN(parseInt(parsed[i], 10))) {
var dayOfMonth = parseInt(parsed[i], 10);
assert(dayOfMonth >= 1 && dayOfMonth <= 31, 'DOM part must be >= 1 and <= 31');
}
}
};
RangeValidator.monthRange = function (parse, monthStartIndexZero) {
var parsed = parse.split(',');
for (var i = 0; i < parsed.length; i++) {
if (!isNaN(parseInt(parsed[i], 10))) {
var month = parseInt(parsed[i], 10);
assert(month >= 1 && month <= 12, monthStartIndexZero ? 'month part must be >= 0 and <= 11' : 'month part must be >= 1 and <= 12');
}
}
};
RangeValidator.dayOfWeekRange = function (parse, dayOfWeekStartIndexZero) {
var parsed = parse.split(',');
for (var i = 0; i < parsed.length; i++) {
if (!isNaN(parseInt(parsed[i], 10))) {
var dayOfWeek = parseInt(parsed[i], 10);
assert(dayOfWeek >= 0 && dayOfWeek <= 6, dayOfWeekStartIndexZero ? 'DOW part must be >= 0 and <= 6' : 'DOW part must be >= 1 and <= 7');
}
}
};
return RangeValidator;
}());
exports.default = RangeValidator;
/***/ }),
/* 4 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.en = void 0;

@@ -1038,39 +874,157 @@ var en = (function () {

/***/ }),
/* 5 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/***/ 586:
/***/ ((__unused_webpack_module, exports) => {
Object.defineProperty(exports, "__esModule", { value: true });
exports.toString = void 0;
var expressionDescriptor_1 = __webpack_require__(0);
var enLocaleLoader_1 = __webpack_require__(6);
expressionDescriptor_1.ExpressionDescriptor.initialize(new enLocaleLoader_1.enLocaleLoader());
exports.default = expressionDescriptor_1.ExpressionDescriptor;
var toString = expressionDescriptor_1.ExpressionDescriptor.toString;
exports.toString = toString;
Object.defineProperty(exports, "__esModule", ({ value: true }));
function assert(value, message) {
if (!value) {
throw new Error(message);
}
}
var RangeValidator = (function () {
function RangeValidator() {
}
RangeValidator.secondRange = function (parse) {
var parsed = parse.split(',');
for (var i = 0; i < parsed.length; i++) {
if (!isNaN(parseInt(parsed[i], 10))) {
var second = parseInt(parsed[i], 10);
assert(second >= 0 && second <= 59, 'seconds part must be >= 0 and <= 59');
}
}
};
RangeValidator.minuteRange = function (parse) {
var parsed = parse.split(',');
for (var i = 0; i < parsed.length; i++) {
if (!isNaN(parseInt(parsed[i], 10))) {
var minute = parseInt(parsed[i], 10);
assert(minute >= 0 && minute <= 59, 'minutes part must be >= 0 and <= 59');
}
}
};
RangeValidator.hourRange = function (parse) {
var parsed = parse.split(',');
for (var i = 0; i < parsed.length; i++) {
if (!isNaN(parseInt(parsed[i], 10))) {
var hour = parseInt(parsed[i], 10);
assert(hour >= 0 && hour <= 23, 'hours part must be >= 0 and <= 23');
}
}
};
RangeValidator.dayOfMonthRange = function (parse) {
var parsed = parse.split(',');
for (var i = 0; i < parsed.length; i++) {
if (!isNaN(parseInt(parsed[i], 10))) {
var dayOfMonth = parseInt(parsed[i], 10);
assert(dayOfMonth >= 1 && dayOfMonth <= 31, 'DOM part must be >= 1 and <= 31');
}
}
};
RangeValidator.monthRange = function (parse, monthStartIndexZero) {
var parsed = parse.split(',');
for (var i = 0; i < parsed.length; i++) {
if (!isNaN(parseInt(parsed[i], 10))) {
var month = parseInt(parsed[i], 10);
assert(month >= 1 && month <= 12, monthStartIndexZero ? 'month part must be >= 0 and <= 11' : 'month part must be >= 1 and <= 12');
}
}
};
RangeValidator.dayOfWeekRange = function (parse, dayOfWeekStartIndexZero) {
var parsed = parse.split(',');
for (var i = 0; i < parsed.length; i++) {
if (!isNaN(parseInt(parsed[i], 10))) {
var dayOfWeek = parseInt(parsed[i], 10);
assert(dayOfWeek >= 0 && dayOfWeek <= 6, dayOfWeekStartIndexZero ? 'DOW part must be >= 0 and <= 6' : 'DOW part must be >= 1 and <= 7');
}
}
};
return RangeValidator;
}());
exports["default"] = RangeValidator;
/***/ }),
/* 6 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/***/ 910:
/***/ ((__unused_webpack_module, exports) => {
Object.defineProperty(exports, "__esModule", { value: true });
exports.enLocaleLoader = void 0;
var en_1 = __webpack_require__(4);
var enLocaleLoader = (function () {
function enLocaleLoader() {
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.StringUtilities = void 0;
var StringUtilities = (function () {
function StringUtilities() {
}
enLocaleLoader.prototype.load = function (availableLocales) {
availableLocales["en"] = new en_1.en();
StringUtilities.format = function (template) {
var values = [];
for (var _i = 1; _i < arguments.length; _i++) {
values[_i - 1] = arguments[_i];
}
return template.replace(/%s/g, function (substring) {
var args = [];
for (var _i = 1; _i < arguments.length; _i++) {
args[_i - 1] = arguments[_i];
}
return values.shift();
});
};
return enLocaleLoader;
StringUtilities.containsAny = function (text, searchStrings) {
return searchStrings.some(function (c) {
return text.indexOf(c) > -1;
});
};
return StringUtilities;
}());
exports.enLocaleLoader = enLocaleLoader;
exports.StringUtilities = StringUtilities;
/***/ })
/******/ ]);
/******/ });
/************************************************************************/
/******/ // The module cache
/******/ var __webpack_module_cache__ = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ // Check if module is in cache
/******/ var cachedModule = __webpack_module_cache__[moduleId];
/******/ if (cachedModule !== undefined) {
/******/ return cachedModule.exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = __webpack_module_cache__[moduleId] = {
/******/ // no module.id needed
/******/ // no module.loaded needed
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/************************************************************************/
var __webpack_exports__ = {};
// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
(() => {
var exports = __webpack_exports__;
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.toString = void 0;
var expressionDescriptor_1 = __webpack_require__(728);
var enLocaleLoader_1 = __webpack_require__(336);
expressionDescriptor_1.ExpressionDescriptor.initialize(new enLocaleLoader_1.enLocaleLoader());
exports["default"] = expressionDescriptor_1.ExpressionDescriptor;
var toString = expressionDescriptor_1.ExpressionDescriptor.toString;
exports.toString = toString;
})();
/******/ return __webpack_exports__;
/******/ })()
;
});

@@ -1,1 +0,1 @@

!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("cronstrue",[],t):"object"==typeof exports?exports.cronstrue=t():e.cronstrue=t()}("undefined"!=typeof self?self:this,function(){return r={},i.m=n=[function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExpressionDescriptor=void 0;var g=n(1),o=n(2),r=(l.toString=function(e,t){var n=void 0===t?{}:t,r=n.throwExceptionOnParseError,i=void 0===r||r,o=n.verbose,s=void 0!==o&&o,a=n.dayOfWeekStartIndexZero,u=void 0===a||a,c=n.monthStartIndexZero,f=void 0!==c&&c,p=n.use24HourTimeFormat,h=n.locale;return new l(e,{throwExceptionOnParseError:i,verbose:s,dayOfWeekStartIndexZero:u,monthStartIndexZero:f,use24HourTimeFormat:p,locale:void 0===h?"en":h}).getFullDescription()},l.initialize=function(e){l.specialCharacters=["/","-",",","*"],e.load(l.locales)},l.prototype.getFullDescription=function(){var t="";try{var e=new o.CronParser(this.expression,this.options.dayOfWeekStartIndexZero,this.options.monthStartIndexZero);this.expressionParts=e.parse();var n=this.getTimeOfDayDescription(),r=this.getDayOfMonthDescription(),i=this.getMonthDescription();t+=n+r+this.getDayOfWeekDescription()+i+this.getYearDescription(),t=(t=this.transformVerbosity(t,this.options.verbose)).charAt(0).toLocaleUpperCase()+t.substr(1)}catch(e){if(this.options.throwExceptionOnParseError)throw""+e;t=this.i18n.anErrorOccuredWhenGeneratingTheExpressionD()}return t},l.prototype.getTimeOfDayDescription=function(){var e=this.expressionParts[0],t=this.expressionParts[1],n=this.expressionParts[2],r="";if(g.StringUtilities.containsAny(t,l.specialCharacters)||g.StringUtilities.containsAny(n,l.specialCharacters)||g.StringUtilities.containsAny(e,l.specialCharacters))if(e||!(-1<t.indexOf("-"))||-1<t.indexOf(",")||-1<t.indexOf("/")||g.StringUtilities.containsAny(n,l.specialCharacters))if(!e&&-1<n.indexOf(",")&&-1==n.indexOf("-")&&-1==n.indexOf("/")&&!g.StringUtilities.containsAny(t,l.specialCharacters)){var i=n.split(",");r+=this.i18n.at();for(var o=0;o<i.length;o++)r+=" ",r+=this.formatTime(i[o],t,""),o<i.length-2&&(r+=","),o==i.length-2&&(r+=this.i18n.spaceAnd())}else{var s=this.getSecondsDescription(),a=this.getMinutesDescription(),u=this.getHoursDescription();if(0<(r+=s).length&&0<a.length&&(r+=", "),r+=a,a===u)return r;0<r.length&&0<u.length&&(r+=", "),r+=u}else{var c=t.split("-");r+=g.StringUtilities.format(this.i18n.everyMinuteBetweenX0AndX1(),this.formatTime(n,c[0],""),this.formatTime(n,c[1],""))}else r+=this.i18n.atSpace()+this.formatTime(n,t,e);return r},l.prototype.getSecondsDescription=function(){var t=this;return this.getSegmentDescription(this.expressionParts[0],this.i18n.everySecond(),function(e){return e},function(e){return g.StringUtilities.format(t.i18n.everyX0Seconds(),e)},function(e){return t.i18n.secondsX0ThroughX1PastTheMinute()},function(e){return"0"==e?"":parseInt(e)<20?t.i18n.atX0SecondsPastTheMinute():t.i18n.atX0SecondsPastTheMinuteGt20()||t.i18n.atX0SecondsPastTheMinute()})},l.prototype.getMinutesDescription=function(){var t=this,n=this.expressionParts[0],r=this.expressionParts[2];return this.getSegmentDescription(this.expressionParts[1],this.i18n.everyMinute(),function(e){return e},function(e){return g.StringUtilities.format(t.i18n.everyX0Minutes(),e)},function(e){return t.i18n.minutesX0ThroughX1PastTheHour()},function(e){try{return"0"==e&&-1==r.indexOf("/")&&""==n?t.i18n.everyHour():parseInt(e)<20?t.i18n.atX0MinutesPastTheHour():t.i18n.atX0MinutesPastTheHourGt20()||t.i18n.atX0MinutesPastTheHour()}catch(e){return t.i18n.atX0MinutesPastTheHour()}})},l.prototype.getHoursDescription=function(){var t=this,e=this.expressionParts[2];return this.getSegmentDescription(e,this.i18n.everyHour(),function(e){return t.formatTime(e,"0","")},function(e){return g.StringUtilities.format(t.i18n.everyX0Hours(),e)},function(e){return t.i18n.betweenX0AndX1()},function(e){return t.i18n.atX0()})},l.prototype.getDayOfWeekDescription=function(){var r=this,n=this.i18n.daysOfTheWeek();return"*"==this.expressionParts[5]?"":this.getSegmentDescription(this.expressionParts[5],this.i18n.commaEveryDay(),function(e){var t=e;return-1<e.indexOf("#")?t=e.substr(0,e.indexOf("#")):-1<e.indexOf("L")&&(t=t.replace("L","")),n[parseInt(t)]},function(e){return 1==parseInt(e)?"":g.StringUtilities.format(r.i18n.commaEveryX0DaysOfTheWeek(),e)},function(e){return r.i18n.commaX0ThroughX1()},function(e){var t=null;if(-1<e.indexOf("#")){var n=null;switch(e.substring(e.indexOf("#")+1)){case"1":n=r.i18n.first();break;case"2":n=r.i18n.second();break;case"3":n=r.i18n.third();break;case"4":n=r.i18n.fourth();break;case"5":n=r.i18n.fifth()}t=r.i18n.commaOnThe()+n+r.i18n.spaceX0OfTheMonth()}else t=-1<e.indexOf("L")?r.i18n.commaOnTheLastX0OfTheMonth():"*"!=r.expressionParts[3]?r.i18n.commaAndOnX0():r.i18n.commaOnlyOnX0();return t})},l.prototype.getMonthDescription=function(){var t=this,n=this.i18n.monthsOfTheYear();return this.getSegmentDescription(this.expressionParts[4],"",function(e){return n[parseInt(e)-1]},function(e){return 1==parseInt(e)?"":g.StringUtilities.format(t.i18n.commaEveryX0Months(),e)},function(e){return t.i18n.commaMonthX0ThroughMonthX1()||t.i18n.commaX0ThroughX1()},function(e){return t.i18n.commaOnlyInMonthX0?t.i18n.commaOnlyInMonthX0():t.i18n.commaOnlyInX0()})},l.prototype.getDayOfMonthDescription=function(){var t=this,e=null,n=this.expressionParts[3];switch(n){case"L":e=this.i18n.commaOnTheLastDayOfTheMonth();break;case"WL":case"LW":e=this.i18n.commaOnTheLastWeekdayOfTheMonth();break;default:var r=n.match(/(\d{1,2}W)|(W\d{1,2})/);if(r){var i=parseInt(r[0].replace("W","")),o=1==i?this.i18n.firstWeekday():g.StringUtilities.format(this.i18n.weekdayNearestDayX0(),i.toString());e=g.StringUtilities.format(this.i18n.commaOnTheX0OfTheMonth(),o);break}var s=n.match(/L-(\d{1,2})/);if(s){var a=s[1];e=g.StringUtilities.format(this.i18n.commaDaysBeforeTheLastDayOfTheMonth(),a);break}if("*"==n&&"*"!=this.expressionParts[5])return"";e=this.getSegmentDescription(n,this.i18n.commaEveryDay(),function(e){return"L"==e?t.i18n.lastDay():t.i18n.dayX0?g.StringUtilities.format(t.i18n.dayX0(),e):e},function(e){return"1"==e?t.i18n.commaEveryDay():t.i18n.commaEveryX0Days()},function(e){return t.i18n.commaBetweenDayX0AndX1OfTheMonth()},function(e){return t.i18n.commaOnDayX0OfTheMonth()})}return e},l.prototype.getYearDescription=function(){var t=this;return this.getSegmentDescription(this.expressionParts[6],"",function(e){return/^\d+$/.test(e)?new Date(parseInt(e),1).getFullYear().toString():e},function(e){return g.StringUtilities.format(t.i18n.commaEveryX0Years(),e)},function(e){return t.i18n.commaYearX0ThroughYearX1()||t.i18n.commaX0ThroughX1()},function(e){return t.i18n.commaOnlyInYearX0?t.i18n.commaOnlyInYearX0():t.i18n.commaOnlyInX0()})},l.prototype.getSegmentDescription=function(e,t,n,r,i,o){var s=null,a=-1<e.indexOf("/"),u=-1<e.indexOf("-"),c=-1<e.indexOf(",");if(e)if("*"===e)s=t;else if(a||u||c)if(c){for(var f=e.split(","),p="",h=0;h<f.length;h++)if(0<h&&2<f.length&&(p+=",",h<f.length-1&&(p+=" ")),0<h&&1<f.length&&(h==f.length-1||2==f.length)&&(p+=this.i18n.spaceAnd()+" "),-1<f[h].indexOf("/")||-1<f[h].indexOf("-")){var l=-1<f[h].indexOf("-")&&-1==f[h].indexOf("/"),y=this.getSegmentDescription(f[h],t,n,r,l?this.i18n.commaX0ThroughX1:i,o);l&&(y=y.replace(", ","")),p+=y}else p+=a?this.getSegmentDescription(f[h],t,n,r,i,o):n(f[h]);s=a?p:g.StringUtilities.format(o(e),p)}else if(a){if(f=e.split("/"),s=g.StringUtilities.format(r(f[1]),f[1]),-1<f[0].indexOf("-")){var d=this.generateRangeSegmentDescription(f[0],i,n);0!=d.indexOf(", ")&&(s+=", "),s+=d}else if(-1==f[0].indexOf("*")){var m=g.StringUtilities.format(o(f[0]),n(f[0]));m=m.replace(", ",""),s+=g.StringUtilities.format(this.i18n.commaStartingX0(),m)}}else u&&(s=this.generateRangeSegmentDescription(e,i,n));else s=g.StringUtilities.format(o(e),n(e));else s="";return s},l.prototype.generateRangeSegmentDescription=function(e,t,n){var r="",i=e.split("-"),o=n(i[0]),s=n(i[1]);s=s.replace(":00",":59");var a=t(e);return r+=g.StringUtilities.format(a,o,s)},l.prototype.formatTime=function(e,t,n){var r=parseInt(e),i="",o=!1;this.options.use24HourTimeFormat||(i=(o=this.i18n.setPeriodBeforeTime&&this.i18n.setPeriodBeforeTime())?this.getPeriod(r)+" ":" "+this.getPeriod(r),12<r&&(r-=12),0===r&&(r=12));var s=t,a="";return n&&(a=":"+("00"+n).substring(n.length)),""+(o?i:"")+("00"+r.toString()).substring(r.toString().length)+":"+("00"+s.toString()).substring(s.toString().length)+a+(o?"":i)},l.prototype.transformVerbosity=function(e,t){return t||(e=(e=(e=(e=e.replace(new RegExp(", "+this.i18n.everyMinute(),"g"),"")).replace(new RegExp(", "+this.i18n.everyHour(),"g"),"")).replace(new RegExp(this.i18n.commaEveryDay(),"g"),"")).replace(/\, ?$/,"")),e},l.prototype.getPeriod=function(e){return 12<=e?this.i18n.pm&&this.i18n.pm()||"PM":this.i18n.am&&this.i18n.am()||"AM"},l.locales={},l);function l(e,t){this.expression=e,this.options=t,this.expressionParts=new Array(5),l.locales[t.locale]?this.i18n=l.locales[t.locale]:(console.warn("Locale '"+t.locale+"' could not be found; falling back to 'en'."),this.i18n=l.locales.en),void 0===t.use24HourTimeFormat&&(t.use24HourTimeFormat=this.i18n.use24HourTimeFormatByDefault())}t.ExpressionDescriptor=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StringUtilities=void 0;var r=(i.format=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return e.replace(/%s/g,function(){return t.shift()})},i.containsAny=function(t,e){return e.some(function(e){return-1<t.indexOf(e)})},i);function i(){}t.StringUtilities=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CronParser=void 0;var r=n(3),i=(o.prototype.parse=function(){var e=this.extractParts(this.expression);return this.normalize(e),this.validate(e),e},o.prototype.extractParts=function(e){if(!this.expression)throw new Error("Expression is empty");var t=e.trim().split(/[ ]+/);if(t.length<5)throw new Error("Expression has only "+t.length+" part"+(1==t.length?"":"s")+". At least 5 parts are required.");if(5==t.length)t.unshift(""),t.push("");else if(6==t.length)/\d{4}$/.test(t[5])||"?"==t[4]||"?"==t[2]?t.unshift(""):t.push("");else if(7<t.length)throw new Error("Expression has "+t.length+" parts; too many!");return t},o.prototype.normalize=function(e){var r=this;if(e[3]=e[3].replace("?","*"),e[5]=e[5].replace("?","*"),e[2]=e[2].replace("?","*"),0==e[0].indexOf("0/")&&(e[0]=e[0].replace("0/","*/")),0==e[1].indexOf("0/")&&(e[1]=e[1].replace("0/","*/")),0==e[2].indexOf("0/")&&(e[2]=e[2].replace("0/","*/")),0==e[3].indexOf("1/")&&(e[3]=e[3].replace("1/","*/")),0==e[4].indexOf("1/")&&(e[4]=e[4].replace("1/","*/")),0==e[6].indexOf("1/")&&(e[6]=e[6].replace("1/","*/")),e[5]=e[5].replace(/(^\d)|([^#/\s]\d)/g,function(e){var t=e.replace(/\D/,""),n=t;return r.dayOfWeekStartIndexZero?"7"==t&&(n="0"):n=(parseInt(t)-1).toString(),e.replace(t,n)}),"L"==e[5]&&(e[5]="6"),"?"==e[3]&&(e[3]="*"),-1<e[3].indexOf("W")&&(-1<e[3].indexOf(",")||-1<e[3].indexOf("-")))throw new Error("The 'W' character can be specified only when the day-of-month is a single day, not a range or list of days.");var t={SUN:0,MON:1,TUE:2,WED:3,THU:4,FRI:5,SAT:6};for(var n in t)e[5]=e[5].replace(new RegExp(n,"gi"),t[n].toString());e[4]=e[4].replace(/(^\d{1,2})|([^#/\s]\d{1,2})/g,function(e){var t=e.replace(/\D/,""),n=t;return r.monthStartIndexZero&&(n=(parseInt(t)+1).toString()),e.replace(t,n)});var i={JAN:1,FEB:2,MAR:3,APR:4,MAY:5,JUN:6,JUL:7,AUG:8,SEP:9,OCT:10,NOV:11,DEC:12};for(var o in i)e[4]=e[4].replace(new RegExp(o,"gi"),i[o].toString());"0"==e[0]&&(e[0]=""),/\*|\-|\,|\//.test(e[2])||!/\*|\//.test(e[1])&&!/\*|\//.test(e[0])||(e[2]+="-"+e[2]);for(var s=0;s<e.length;s++)if(-1!=e[s].indexOf(",")&&(e[s]=e[s].split(",").filter(function(e){return""!==e}).join(",")||"*"),"*/1"==e[s]&&(e[s]="*"),-1<e[s].indexOf("/")&&!/^\*|\-|\,/.test(e[s])){var a=null;switch(s){case 4:a="12";break;case 5:a="6";break;case 6:a="9999";break;default:a=null}if(null!=a){var u=e[s].split("/");e[s]=u[0]+"-"+a+"/"+u[1]}}},o.prototype.validate=function(e){this.assertNoInvalidCharacters("DOW",e[5]),this.assertNoInvalidCharacters("DOM",e[3]),this.validateRange(e)},o.prototype.validateRange=function(e){r.default.secondRange(e[0]),r.default.minuteRange(e[1]),r.default.hourRange(e[2]),r.default.dayOfMonthRange(e[3]),r.default.monthRange(e[4],this.monthStartIndexZero),r.default.dayOfWeekRange(e[5],this.dayOfWeekStartIndexZero)},o.prototype.assertNoInvalidCharacters=function(e,t){var n=t.match(/[A-KM-VX-Z]+/gi);if(n&&n.length)throw new Error(e+" part contains invalid values: '"+n.toString()+"'")},o);function o(e,t,n){void 0===t&&(t=!0),void 0===n&&(n=!1),this.expression=e,this.dayOfWeekStartIndexZero=t,this.monthStartIndexZero=n}t.CronParser=i},function(e,t,n){"use strict";function o(e,t){if(!e)throw new Error(t)}Object.defineProperty(t,"__esModule",{value:!0});var r=(i.secondRange=function(e){for(var t=e.split(","),n=0;n<t.length;n++)if(!isNaN(parseInt(t[n],10))){var r=parseInt(t[n],10);o(0<=r&&r<=59,"seconds part must be >= 0 and <= 59")}},i.minuteRange=function(e){for(var t=e.split(","),n=0;n<t.length;n++)if(!isNaN(parseInt(t[n],10))){var r=parseInt(t[n],10);o(0<=r&&r<=59,"minutes part must be >= 0 and <= 59")}},i.hourRange=function(e){for(var t=e.split(","),n=0;n<t.length;n++)if(!isNaN(parseInt(t[n],10))){var r=parseInt(t[n],10);o(0<=r&&r<=23,"hours part must be >= 0 and <= 23")}},i.dayOfMonthRange=function(e){for(var t=e.split(","),n=0;n<t.length;n++)if(!isNaN(parseInt(t[n],10))){var r=parseInt(t[n],10);o(1<=r&&r<=31,"DOM part must be >= 1 and <= 31")}},i.monthRange=function(e,t){for(var n=e.split(","),r=0;r<n.length;r++)if(!isNaN(parseInt(n[r],10))){var i=parseInt(n[r],10);o(1<=i&&i<=12,t?"month part must be >= 0 and <= 11":"month part must be >= 1 and <= 12")}},i.dayOfWeekRange=function(e,t){for(var n=e.split(","),r=0;r<n.length;r++)if(!isNaN(parseInt(n[r],10))){var i=parseInt(n[r],10);o(0<=i&&i<=6,t?"DOW part must be >= 0 and <= 6":"DOW part must be >= 1 and <= 7")}},i);function i(){}t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.en=void 0;var r=(i.prototype.atX0SecondsPastTheMinuteGt20=function(){return null},i.prototype.atX0MinutesPastTheHourGt20=function(){return null},i.prototype.commaMonthX0ThroughMonthX1=function(){return null},i.prototype.commaYearX0ThroughYearX1=function(){return null},i.prototype.use24HourTimeFormatByDefault=function(){return!1},i.prototype.anErrorOccuredWhenGeneratingTheExpressionD=function(){return"An error occured when generating the expression description. Check the cron expression syntax."},i.prototype.everyMinute=function(){return"every minute"},i.prototype.everyHour=function(){return"every hour"},i.prototype.atSpace=function(){return"At "},i.prototype.everyMinuteBetweenX0AndX1=function(){return"Every minute between %s and %s"},i.prototype.at=function(){return"At"},i.prototype.spaceAnd=function(){return" and"},i.prototype.everySecond=function(){return"every second"},i.prototype.everyX0Seconds=function(){return"every %s seconds"},i.prototype.secondsX0ThroughX1PastTheMinute=function(){return"seconds %s through %s past the minute"},i.prototype.atX0SecondsPastTheMinute=function(){return"at %s seconds past the minute"},i.prototype.everyX0Minutes=function(){return"every %s minutes"},i.prototype.minutesX0ThroughX1PastTheHour=function(){return"minutes %s through %s past the hour"},i.prototype.atX0MinutesPastTheHour=function(){return"at %s minutes past the hour"},i.prototype.everyX0Hours=function(){return"every %s hours"},i.prototype.betweenX0AndX1=function(){return"between %s and %s"},i.prototype.atX0=function(){return"at %s"},i.prototype.commaEveryDay=function(){return", every day"},i.prototype.commaEveryX0DaysOfTheWeek=function(){return", every %s days of the week"},i.prototype.commaX0ThroughX1=function(){return", %s through %s"},i.prototype.first=function(){return"first"},i.prototype.second=function(){return"second"},i.prototype.third=function(){return"third"},i.prototype.fourth=function(){return"fourth"},i.prototype.fifth=function(){return"fifth"},i.prototype.commaOnThe=function(){return", on the "},i.prototype.spaceX0OfTheMonth=function(){return" %s of the month"},i.prototype.lastDay=function(){return"the last day"},i.prototype.commaOnTheLastX0OfTheMonth=function(){return", on the last %s of the month"},i.prototype.commaOnlyOnX0=function(){return", only on %s"},i.prototype.commaAndOnX0=function(){return", and on %s"},i.prototype.commaEveryX0Months=function(){return", every %s months"},i.prototype.commaOnlyInX0=function(){return", only in %s"},i.prototype.commaOnTheLastDayOfTheMonth=function(){return", on the last day of the month"},i.prototype.commaOnTheLastWeekdayOfTheMonth=function(){return", on the last weekday of the month"},i.prototype.commaDaysBeforeTheLastDayOfTheMonth=function(){return", %s days before the last day of the month"},i.prototype.firstWeekday=function(){return"first weekday"},i.prototype.weekdayNearestDayX0=function(){return"weekday nearest day %s"},i.prototype.commaOnTheX0OfTheMonth=function(){return", on the %s of the month"},i.prototype.commaEveryX0Days=function(){return", every %s days"},i.prototype.commaBetweenDayX0AndX1OfTheMonth=function(){return", between day %s and %s of the month"},i.prototype.commaOnDayX0OfTheMonth=function(){return", on day %s of the month"},i.prototype.commaEveryHour=function(){return", every hour"},i.prototype.commaEveryX0Years=function(){return", every %s years"},i.prototype.commaStartingX0=function(){return", starting %s"},i.prototype.daysOfTheWeek=function(){return["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},i.prototype.monthsOfTheYear=function(){return["January","February","March","April","May","June","July","August","September","October","November","December"]},i);function i(){}t.en=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toString=void 0;var r=n(0),i=n(6);r.ExpressionDescriptor.initialize(new i.enLocaleLoader),t.default=r.ExpressionDescriptor;var o=r.ExpressionDescriptor.toString;t.toString=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.enLocaleLoader=void 0;var r=n(4),i=(o.prototype.load=function(e){e.en=new r.en},o);function o(){}t.enLocaleLoader=i}],i.c=r,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)i.d(n,r,function(e){return t[e]}.bind(null,r));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=5);function i(e){if(r[e])return r[e].exports;var t=r[e]={i:e,l:!1,exports:{}};return n[e].call(t.exports,t,t.exports,i),t.l=!0,t.exports}var n,r});
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("cronstrue",[],e):"object"==typeof exports?exports.cronstrue=e():t.cronstrue=e()}(globalThis,(function(){return(()=>{"use strict";var t={794:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CronParser=void 0;var r=n(586),o=function(){function t(t,e,n){void 0===e&&(e=!0),void 0===n&&(n=!1),this.expression=t,this.dayOfWeekStartIndexZero=e,this.monthStartIndexZero=n}return t.prototype.parse=function(){var t=this.extractParts(this.expression);return this.normalize(t),this.validate(t),t},t.prototype.extractParts=function(t){if(!this.expression)throw new Error("Expression is empty");var e=t.trim().split(/[ ]+/);if(e.length<5)throw new Error("Expression has only ".concat(e.length," part").concat(1==e.length?"":"s",". At least 5 parts are required."));if(5==e.length)e.unshift(""),e.push("");else if(6==e.length){/\d{4}$/.test(e[5])||"?"==e[4]||"?"==e[2]?e.unshift(""):e.push("")}else if(e.length>7)throw new Error("Expression has ".concat(e.length," parts; too many!"));return e},t.prototype.normalize=function(t){var e=this;if(t[3]=t[3].replace("?","*"),t[5]=t[5].replace("?","*"),t[2]=t[2].replace("?","*"),0==t[0].indexOf("0/")&&(t[0]=t[0].replace("0/","*/")),0==t[1].indexOf("0/")&&(t[1]=t[1].replace("0/","*/")),0==t[2].indexOf("0/")&&(t[2]=t[2].replace("0/","*/")),0==t[3].indexOf("1/")&&(t[3]=t[3].replace("1/","*/")),0==t[4].indexOf("1/")&&(t[4]=t[4].replace("1/","*/")),0==t[6].indexOf("1/")&&(t[6]=t[6].replace("1/","*/")),t[5]=t[5].replace(/(^\d)|([^#/\s]\d)/g,(function(t){var n=t.replace(/\D/,""),r=n;return e.dayOfWeekStartIndexZero?"7"==n&&(r="0"):r=(parseInt(n)-1).toString(),t.replace(n,r)})),"L"==t[5]&&(t[5]="6"),"?"==t[3]&&(t[3]="*"),t[3].indexOf("W")>-1&&(t[3].indexOf(",")>-1||t[3].indexOf("-")>-1))throw new Error("The 'W' character can be specified only when the day-of-month is a single day, not a range or list of days.");var n={SUN:0,MON:1,TUE:2,WED:3,THU:4,FRI:5,SAT:6};for(var r in n)t[5]=t[5].replace(new RegExp(r,"gi"),n[r].toString());t[4]=t[4].replace(/(^\d{1,2})|([^#/\s]\d{1,2})/g,(function(t){var n=t.replace(/\D/,""),r=n;return e.monthStartIndexZero&&(r=(parseInt(n)+1).toString()),t.replace(n,r)}));var o={JAN:1,FEB:2,MAR:3,APR:4,MAY:5,JUN:6,JUL:7,AUG:8,SEP:9,OCT:10,NOV:11,DEC:12};for(var i in o)t[4]=t[4].replace(new RegExp(i,"gi"),o[i].toString());"0"==t[0]&&(t[0]=""),/\*|\-|\,|\//.test(t[2])||!/\*|\//.test(t[1])&&!/\*|\//.test(t[0])||(t[2]+="-".concat(t[2]));for(var a=0;a<t.length;a++)if(-1!=t[a].indexOf(",")&&(t[a]=t[a].split(",").filter((function(t){return""!==t})).join(",")||"*"),"*/1"==t[a]&&(t[a]="*"),t[a].indexOf("/")>-1&&!/^\*|\-|\,/.test(t[a])){var s=null;switch(a){case 4:s="12";break;case 5:s="6";break;case 6:s="9999";break;default:s=null}if(null!==s){var c=t[a].split("/");t[a]="".concat(c[0],"-").concat(s,"/").concat(c[1])}}},t.prototype.validate=function(t){this.assertNoInvalidCharacters("DOW",t[5]),this.assertNoInvalidCharacters("DOM",t[3]),this.validateRange(t)},t.prototype.validateRange=function(t){r.default.secondRange(t[0]),r.default.minuteRange(t[1]),r.default.hourRange(t[2]),r.default.dayOfMonthRange(t[3]),r.default.monthRange(t[4],this.monthStartIndexZero),r.default.dayOfWeekRange(t[5],this.dayOfWeekStartIndexZero)},t.prototype.assertNoInvalidCharacters=function(t,e){var n=e.match(/[A-KM-VX-Z]+/gi);if(n&&n.length)throw new Error("".concat(t," part contains invalid values: '").concat(n.toString(),"'"))},t}();e.CronParser=o},728:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.ExpressionDescriptor=void 0;var r=n(910),o=n(794),i=function(){function t(e,n){if(this.expression=e,this.options=n,this.expressionParts=new Array(5),!this.options.locale&&t.defaultLocale&&(this.options.locale=t.defaultLocale),!t.locales[this.options.locale]){var r=Object.keys(t.locales)[0];console.warn("Locale '".concat(this.options.locale,"' could not be found; falling back to '").concat(r,"'.")),this.options.locale=r}this.i18n=t.locales[this.options.locale],void 0===n.use24HourTimeFormat&&(n.use24HourTimeFormat=this.i18n.use24HourTimeFormatByDefault())}return t.toString=function(e,n){var r=void 0===n?{}:n,o=r.throwExceptionOnParseError,i=void 0===o||o,a=r.verbose,s=void 0!==a&&a,c=r.dayOfWeekStartIndexZero,u=void 0===c||c,p=r.monthStartIndexZero,h=void 0!==p&&p,f=r.use24HourTimeFormat,l=r.locale;return new t(e,{throwExceptionOnParseError:i,verbose:s,dayOfWeekStartIndexZero:u,monthStartIndexZero:h,use24HourTimeFormat:f,locale:void 0===l?null:l}).getFullDescription()},t.initialize=function(e,n){void 0===n&&(n="en"),t.specialCharacters=["/","-",",","*"],t.defaultLocale=n,e.load(t.locales)},t.prototype.getFullDescription=function(){var t="";try{var e=new o.CronParser(this.expression,this.options.dayOfWeekStartIndexZero,this.options.monthStartIndexZero);this.expressionParts=e.parse();var n=this.getTimeOfDayDescription(),r=this.getDayOfMonthDescription(),i=this.getMonthDescription();t+=n+r+this.getDayOfWeekDescription()+i+this.getYearDescription(),t=(t=this.transformVerbosity(t,!!this.options.verbose)).charAt(0).toLocaleUpperCase()+t.substr(1)}catch(e){if(this.options.throwExceptionOnParseError)throw"".concat(e);t=this.i18n.anErrorOccuredWhenGeneratingTheExpressionD()}return t},t.prototype.getTimeOfDayDescription=function(){var e=this.expressionParts[0],n=this.expressionParts[1],o=this.expressionParts[2],i="";if(r.StringUtilities.containsAny(n,t.specialCharacters)||r.StringUtilities.containsAny(o,t.specialCharacters)||r.StringUtilities.containsAny(e,t.specialCharacters))if(e||!(n.indexOf("-")>-1)||n.indexOf(",")>-1||n.indexOf("/")>-1||r.StringUtilities.containsAny(o,t.specialCharacters))if(!e&&o.indexOf(",")>-1&&-1==o.indexOf("-")&&-1==o.indexOf("/")&&!r.StringUtilities.containsAny(n,t.specialCharacters)){var a=o.split(",");i+=this.i18n.at();for(var s=0;s<a.length;s++)i+=" ",i+=this.formatTime(a[s],n,""),s<a.length-2&&(i+=","),s==a.length-2&&(i+=this.i18n.spaceAnd())}else{var c=this.getSecondsDescription(),u=this.getMinutesDescription(),p=this.getHoursDescription();if((i+=c)&&u&&(i+=", "),i+=u,u===p)return i;i&&p&&(i+=", "),i+=p}else{var h=n.split("-");i+=r.StringUtilities.format(this.i18n.everyMinuteBetweenX0AndX1(),this.formatTime(o,h[0],""),this.formatTime(o,h[1],""))}else i+=this.i18n.atSpace()+this.formatTime(o,n,e);return i},t.prototype.getSecondsDescription=function(){var t=this;return this.getSegmentDescription(this.expressionParts[0],this.i18n.everySecond(),(function(t){return t}),(function(e){return r.StringUtilities.format(t.i18n.everyX0Seconds(),e)}),(function(e){return t.i18n.secondsX0ThroughX1PastTheMinute()}),(function(e){return"0"==e?"":parseInt(e)<20?t.i18n.atX0SecondsPastTheMinute():t.i18n.atX0SecondsPastTheMinuteGt20()||t.i18n.atX0SecondsPastTheMinute()}))},t.prototype.getMinutesDescription=function(){var t=this,e=this.expressionParts[0],n=this.expressionParts[2];return this.getSegmentDescription(this.expressionParts[1],this.i18n.everyMinute(),(function(t){return t}),(function(e){return r.StringUtilities.format(t.i18n.everyX0Minutes(),e)}),(function(e){return t.i18n.minutesX0ThroughX1PastTheHour()}),(function(r){try{return"0"==r&&-1==n.indexOf("/")&&""==e?t.i18n.everyHour():parseInt(r)<20?t.i18n.atX0MinutesPastTheHour():t.i18n.atX0MinutesPastTheHourGt20()||t.i18n.atX0MinutesPastTheHour()}catch(e){return t.i18n.atX0MinutesPastTheHour()}}))},t.prototype.getHoursDescription=function(){var t=this,e=this.expressionParts[2];return this.getSegmentDescription(e,this.i18n.everyHour(),(function(e){return t.formatTime(e,"0","")}),(function(e){return r.StringUtilities.format(t.i18n.everyX0Hours(),e)}),(function(e){return t.i18n.betweenX0AndX1()}),(function(e){return t.i18n.atX0()}))},t.prototype.getDayOfWeekDescription=function(){var t=this,e=this.i18n.daysOfTheWeek();return"*"==this.expressionParts[5]?"":this.getSegmentDescription(this.expressionParts[5],this.i18n.commaEveryDay(),(function(t){var n=t;return t.indexOf("#")>-1?n=t.substr(0,t.indexOf("#")):t.indexOf("L")>-1&&(n=n.replace("L","")),e[parseInt(n)]}),(function(e){return 1==parseInt(e)?"":r.StringUtilities.format(t.i18n.commaEveryX0DaysOfTheWeek(),e)}),(function(e){return t.i18n.commaX0ThroughX1()}),(function(e){var n=null;if(e.indexOf("#")>-1){var r=null;switch(e.substring(e.indexOf("#")+1)){case"1":r=t.i18n.first();break;case"2":r=t.i18n.second();break;case"3":r=t.i18n.third();break;case"4":r=t.i18n.fourth();break;case"5":r=t.i18n.fifth()}n=t.i18n.commaOnThe()+r+t.i18n.spaceX0OfTheMonth()}else if(e.indexOf("L")>-1)n=t.i18n.commaOnTheLastX0OfTheMonth();else{n="*"!=t.expressionParts[3]?t.i18n.commaAndOnX0():t.i18n.commaOnlyOnX0()}return n}))},t.prototype.getMonthDescription=function(){var t=this,e=this.i18n.monthsOfTheYear();return this.getSegmentDescription(this.expressionParts[4],"",(function(t){return e[parseInt(t)-1]}),(function(e){return 1==parseInt(e)?"":r.StringUtilities.format(t.i18n.commaEveryX0Months(),e)}),(function(e){return t.i18n.commaMonthX0ThroughMonthX1()||t.i18n.commaX0ThroughX1()}),(function(e){return t.i18n.commaOnlyInMonthX0?t.i18n.commaOnlyInMonthX0():t.i18n.commaOnlyInX0()}))},t.prototype.getDayOfMonthDescription=function(){var t=this,e=null,n=this.expressionParts[3];switch(n){case"L":e=this.i18n.commaOnTheLastDayOfTheMonth();break;case"WL":case"LW":e=this.i18n.commaOnTheLastWeekdayOfTheMonth();break;default:var o=n.match(/(\d{1,2}W)|(W\d{1,2})/);if(o){var i=parseInt(o[0].replace("W","")),a=1==i?this.i18n.firstWeekday():r.StringUtilities.format(this.i18n.weekdayNearestDayX0(),i.toString());e=r.StringUtilities.format(this.i18n.commaOnTheX0OfTheMonth(),a);break}var s=n.match(/L-(\d{1,2})/);if(s){var c=s[1];e=r.StringUtilities.format(this.i18n.commaDaysBeforeTheLastDayOfTheMonth(),c);break}if("*"==n&&"*"!=this.expressionParts[5])return"";e=this.getSegmentDescription(n,this.i18n.commaEveryDay(),(function(e){return"L"==e?t.i18n.lastDay():t.i18n.dayX0?r.StringUtilities.format(t.i18n.dayX0(),e):e}),(function(e){return"1"==e?t.i18n.commaEveryDay():t.i18n.commaEveryX0Days()}),(function(e){return t.i18n.commaBetweenDayX0AndX1OfTheMonth()}),(function(e){return t.i18n.commaOnDayX0OfTheMonth()}))}return e},t.prototype.getYearDescription=function(){var t=this;return this.getSegmentDescription(this.expressionParts[6],"",(function(t){return/^\d+$/.test(t)?new Date(parseInt(t),1).getFullYear().toString():t}),(function(e){return r.StringUtilities.format(t.i18n.commaEveryX0Years(),e)}),(function(e){return t.i18n.commaYearX0ThroughYearX1()||t.i18n.commaX0ThroughX1()}),(function(e){return t.i18n.commaOnlyInYearX0?t.i18n.commaOnlyInYearX0():t.i18n.commaOnlyInX0()}))},t.prototype.getSegmentDescription=function(t,e,n,o,i,a){var s=null,c=t.indexOf("/")>-1,u=t.indexOf("-")>-1,p=t.indexOf(",")>-1;if(t)if("*"===t)s=e;else if(c||u||p)if(p){for(var h=t.split(","),f="",l=0;l<h.length;l++)if(l>0&&h.length>2&&(f+=",",l<h.length-1&&(f+=" ")),l>0&&h.length>1&&(l==h.length-1||2==h.length)&&(f+="".concat(this.i18n.spaceAnd()," ")),h[l].indexOf("/")>-1||h[l].indexOf("-")>-1){var y=h[l].indexOf("-")>-1&&-1==h[l].indexOf("/"),m=this.getSegmentDescription(h[l],e,n,o,y?this.i18n.commaX0ThroughX1:i,a);y&&(m=m.replace(", ","")),f+=m}else f+=c?this.getSegmentDescription(h[l],e,n,o,i,a):n(h[l]);s=c?f:r.StringUtilities.format(a(t),f)}else if(c){h=t.split("/");if(s=r.StringUtilities.format(o(h[1]),h[1]),h[0].indexOf("-")>-1){var d=this.generateRangeSegmentDescription(h[0],i,n);0!=d.indexOf(", ")&&(s+=", "),s+=d}else if(-1==h[0].indexOf("*")){var g=r.StringUtilities.format(a(h[0]),n(h[0]));g=g.replace(", ",""),s+=r.StringUtilities.format(this.i18n.commaStartingX0(),g)}}else u&&(s=this.generateRangeSegmentDescription(t,i,n));else s=r.StringUtilities.format(a(t),n(t));else s="";return s},t.prototype.generateRangeSegmentDescription=function(t,e,n){var o="",i=t.split("-"),a=n(i[0]),s=n(i[1]);s=s.replace(":00",":59");var c=e(t);return o+=r.StringUtilities.format(c,a,s)},t.prototype.formatTime=function(t,e,n){var r=parseInt(t),o="",i=!1;this.options.use24HourTimeFormat||(o=(i=!(!this.i18n.setPeriodBeforeTime||!this.i18n.setPeriodBeforeTime()))?"".concat(this.getPeriod(r)," "):" ".concat(this.getPeriod(r)),r>12&&(r-=12),0===r&&(r=12));var a=e,s="";return n&&(s=":".concat(("00"+n).substring(n.length))),"".concat(i?o:"").concat(("00"+r.toString()).substring(r.toString().length),":").concat(("00"+a.toString()).substring(a.toString().length)).concat(s).concat(i?"":o)},t.prototype.transformVerbosity=function(t,e){return e||(t=(t=(t=(t=t.replace(new RegExp(", ".concat(this.i18n.everyMinute()),"g"),"")).replace(new RegExp(", ".concat(this.i18n.everyHour()),"g"),"")).replace(new RegExp(this.i18n.commaEveryDay(),"g"),"")).replace(/\, ?$/,"")),t},t.prototype.getPeriod=function(t){return t>=12?this.i18n.pm&&this.i18n.pm()||"PM":this.i18n.am&&this.i18n.am()||"AM"},t.locales={},t}();e.ExpressionDescriptor=i},336:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.enLocaleLoader=void 0;var r=n(751),o=function(){function t(){}return t.prototype.load=function(t){t.en=new r.en},t}();e.enLocaleLoader=o},751:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.en=void 0;var n=function(){function t(){}return t.prototype.atX0SecondsPastTheMinuteGt20=function(){return null},t.prototype.atX0MinutesPastTheHourGt20=function(){return null},t.prototype.commaMonthX0ThroughMonthX1=function(){return null},t.prototype.commaYearX0ThroughYearX1=function(){return null},t.prototype.use24HourTimeFormatByDefault=function(){return!1},t.prototype.anErrorOccuredWhenGeneratingTheExpressionD=function(){return"An error occured when generating the expression description. Check the cron expression syntax."},t.prototype.everyMinute=function(){return"every minute"},t.prototype.everyHour=function(){return"every hour"},t.prototype.atSpace=function(){return"At "},t.prototype.everyMinuteBetweenX0AndX1=function(){return"Every minute between %s and %s"},t.prototype.at=function(){return"At"},t.prototype.spaceAnd=function(){return" and"},t.prototype.everySecond=function(){return"every second"},t.prototype.everyX0Seconds=function(){return"every %s seconds"},t.prototype.secondsX0ThroughX1PastTheMinute=function(){return"seconds %s through %s past the minute"},t.prototype.atX0SecondsPastTheMinute=function(){return"at %s seconds past the minute"},t.prototype.everyX0Minutes=function(){return"every %s minutes"},t.prototype.minutesX0ThroughX1PastTheHour=function(){return"minutes %s through %s past the hour"},t.prototype.atX0MinutesPastTheHour=function(){return"at %s minutes past the hour"},t.prototype.everyX0Hours=function(){return"every %s hours"},t.prototype.betweenX0AndX1=function(){return"between %s and %s"},t.prototype.atX0=function(){return"at %s"},t.prototype.commaEveryDay=function(){return", every day"},t.prototype.commaEveryX0DaysOfTheWeek=function(){return", every %s days of the week"},t.prototype.commaX0ThroughX1=function(){return", %s through %s"},t.prototype.first=function(){return"first"},t.prototype.second=function(){return"second"},t.prototype.third=function(){return"third"},t.prototype.fourth=function(){return"fourth"},t.prototype.fifth=function(){return"fifth"},t.prototype.commaOnThe=function(){return", on the "},t.prototype.spaceX0OfTheMonth=function(){return" %s of the month"},t.prototype.lastDay=function(){return"the last day"},t.prototype.commaOnTheLastX0OfTheMonth=function(){return", on the last %s of the month"},t.prototype.commaOnlyOnX0=function(){return", only on %s"},t.prototype.commaAndOnX0=function(){return", and on %s"},t.prototype.commaEveryX0Months=function(){return", every %s months"},t.prototype.commaOnlyInX0=function(){return", only in %s"},t.prototype.commaOnTheLastDayOfTheMonth=function(){return", on the last day of the month"},t.prototype.commaOnTheLastWeekdayOfTheMonth=function(){return", on the last weekday of the month"},t.prototype.commaDaysBeforeTheLastDayOfTheMonth=function(){return", %s days before the last day of the month"},t.prototype.firstWeekday=function(){return"first weekday"},t.prototype.weekdayNearestDayX0=function(){return"weekday nearest day %s"},t.prototype.commaOnTheX0OfTheMonth=function(){return", on the %s of the month"},t.prototype.commaEveryX0Days=function(){return", every %s days"},t.prototype.commaBetweenDayX0AndX1OfTheMonth=function(){return", between day %s and %s of the month"},t.prototype.commaOnDayX0OfTheMonth=function(){return", on day %s of the month"},t.prototype.commaEveryHour=function(){return", every hour"},t.prototype.commaEveryX0Years=function(){return", every %s years"},t.prototype.commaStartingX0=function(){return", starting %s"},t.prototype.daysOfTheWeek=function(){return["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},t.prototype.monthsOfTheYear=function(){return["January","February","March","April","May","June","July","August","September","October","November","December"]},t}();e.en=n},586:(t,e)=>{function n(t,e){if(!t)throw new Error(e)}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(){}return t.secondRange=function(t){for(var e=t.split(","),r=0;r<e.length;r++)if(!isNaN(parseInt(e[r],10))){var o=parseInt(e[r],10);n(o>=0&&o<=59,"seconds part must be >= 0 and <= 59")}},t.minuteRange=function(t){for(var e=t.split(","),r=0;r<e.length;r++)if(!isNaN(parseInt(e[r],10))){var o=parseInt(e[r],10);n(o>=0&&o<=59,"minutes part must be >= 0 and <= 59")}},t.hourRange=function(t){for(var e=t.split(","),r=0;r<e.length;r++)if(!isNaN(parseInt(e[r],10))){var o=parseInt(e[r],10);n(o>=0&&o<=23,"hours part must be >= 0 and <= 23")}},t.dayOfMonthRange=function(t){for(var e=t.split(","),r=0;r<e.length;r++)if(!isNaN(parseInt(e[r],10))){var o=parseInt(e[r],10);n(o>=1&&o<=31,"DOM part must be >= 1 and <= 31")}},t.monthRange=function(t,e){for(var r=t.split(","),o=0;o<r.length;o++)if(!isNaN(parseInt(r[o],10))){var i=parseInt(r[o],10);n(i>=1&&i<=12,e?"month part must be >= 0 and <= 11":"month part must be >= 1 and <= 12")}},t.dayOfWeekRange=function(t,e){for(var r=t.split(","),o=0;o<r.length;o++)if(!isNaN(parseInt(r[o],10))){var i=parseInt(r[o],10);n(i>=0&&i<=6,e?"DOW part must be >= 0 and <= 6":"DOW part must be >= 1 and <= 7")}},t}();e.default=r},910:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.StringUtilities=void 0;var n=function(){function t(){}return t.format=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return t.replace(/%s/g,(function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];return e.shift()}))},t.containsAny=function(t,e){return e.some((function(e){return t.indexOf(e)>-1}))},t}();e.StringUtilities=n}},e={};function n(r){var o=e[r];if(void 0!==o)return o.exports;var i=e[r]={exports:{}};return t[r](i,i.exports,n),i.exports}var r={};return(()=>{var t=r;Object.defineProperty(t,"__esModule",{value:!0}),t.toString=void 0;var e=n(728),o=n(336);e.ExpressionDescriptor.initialize(new o.enLocaleLoader),t.default=e.ExpressionDescriptor;var i=e.ExpressionDescriptor.toString;t.toString=i})(),r})()}));

@@ -8,2 +8,3 @@ import { Options } from "./options";

};
static defaultLocale: string;
static specialCharacters: string[];

@@ -15,3 +16,3 @@ expression: string;

static toString(expression: string, { throwExceptionOnParseError, verbose, dayOfWeekStartIndexZero, monthStartIndexZero, use24HourTimeFormat, locale, }?: Options): string;
static initialize(localesLoader: LocaleLoader): void;
static initialize(localesLoader: LocaleLoader, defaultLocale?: string): void;
constructor(expression: string, options: Options);

@@ -25,5 +26,5 @@ protected getFullDescription(): string;

protected getMonthDescription(): string;
protected getDayOfMonthDescription(): string;
protected getDayOfMonthDescription(): string | null;
protected getYearDescription(): string;
protected getSegmentDescription(expression: string, allDescription: string, getSingleItemDescription: (t: string) => string, getIncrementDescriptionFormat: (t: string) => string, getRangeDescriptionFormat: (t: string) => string, getDescriptionFormat: (t: string) => string): string;
protected getSegmentDescription(expression: string, allDescription: string, getSingleItemDescription: (t: string) => string, getIncrementDescriptionFormat: (t: string) => string, getRangeDescriptionFormat: (t: string) => string, getDescriptionFormat: (t: string) => string): string | null;
protected generateRangeSegmentDescription(rangeExpression: string, getRangeDescriptionFormat: (t: string) => string, getSingleItemDescription: (t: string) => string): string;

@@ -30,0 +31,0 @@ protected formatTime(hourExpression: string, minuteExpression: string, secondExpression: string): string;

@@ -17,7 +17,7 @@ export interface Locale {

atX0SecondsPastTheMinute(): string;
atX0SecondsPastTheMinuteGt20(): string;
atX0SecondsPastTheMinuteGt20(): string | null;
everyX0Minutes(): string;
minutesX0ThroughX1PastTheHour(): string;
atX0MinutesPastTheHour(): string;
atX0MinutesPastTheHourGt20(): string;
atX0MinutesPastTheHourGt20(): string | null;
everyX0Hours(): string;

@@ -29,4 +29,4 @@ betweenX0AndX1(): string;

commaX0ThroughX1(): string;
commaMonthX0ThroughMonthX1(): string;
commaYearX0ThroughYearX1(): string;
commaMonthX0ThroughMonthX1(): string | null;
commaYearX0ThroughYearX1(): string | null;
first(): string;

@@ -33,0 +33,0 @@ second(): string;

import { Locale } from "../locale";
export declare class be implements Locale {
atX0SecondsPastTheMinuteGt20(): string;
atX0MinutesPastTheHourGt20(): string;
commaMonthX0ThroughMonthX1(): string;
commaYearX0ThroughYearX1(): string;
atX0SecondsPastTheMinuteGt20(): string | null;
atX0MinutesPastTheHourGt20(): string | null;
commaMonthX0ThroughMonthX1(): string | null;
commaYearX0ThroughYearX1(): string | null;
use24HourTimeFormatByDefault(): boolean;

@@ -8,0 +8,0 @@ everyMinute(): string;

import { Locale } from "../locale";
export declare class ca implements Locale {
atX0SecondsPastTheMinuteGt20(): string;
atX0MinutesPastTheHourGt20(): string;
commaMonthX0ThroughMonthX1(): string;
commaYearX0ThroughYearX1(): string;
atX0SecondsPastTheMinuteGt20(): string | null;
atX0MinutesPastTheHourGt20(): string | null;
commaMonthX0ThroughMonthX1(): string | null;
commaYearX0ThroughYearX1(): string | null;
use24HourTimeFormatByDefault(): boolean;

@@ -8,0 +8,0 @@ anErrorOccuredWhenGeneratingTheExpressionD(): string;

import { Locale } from "../locale";
export declare class cs implements Locale {
atX0SecondsPastTheMinuteGt20(): string;
atX0MinutesPastTheHourGt20(): string;
commaMonthX0ThroughMonthX1(): string;
commaYearX0ThroughYearX1(): string;
atX0SecondsPastTheMinuteGt20(): string | null;
atX0MinutesPastTheHourGt20(): string | null;
commaMonthX0ThroughMonthX1(): string | null;
commaYearX0ThroughYearX1(): string | null;
use24HourTimeFormatByDefault(): boolean;

@@ -8,0 +8,0 @@ anErrorOccuredWhenGeneratingTheExpressionD(): string;

@@ -47,6 +47,6 @@ import { Locale } from "../locale";

weekdayNearestDayX0(): string;
commaMonthX0ThroughMonthX1(): string;
commaYearX0ThroughYearX1(): string;
atX0MinutesPastTheHourGt20(): string;
atX0SecondsPastTheMinuteGt20(): string;
commaMonthX0ThroughMonthX1(): string | null;
commaYearX0ThroughYearX1(): string | null;
atX0MinutesPastTheHourGt20(): string | null;
atX0SecondsPastTheMinuteGt20(): string | null;
commaStartingX0(): string;

@@ -53,0 +53,0 @@ daysOfTheWeek(): string[];

import { Locale } from "../locale";
export declare class de implements Locale {
atX0SecondsPastTheMinuteGt20(): string;
atX0MinutesPastTheHourGt20(): string;
commaMonthX0ThroughMonthX1(): string;
commaYearX0ThroughYearX1(): string;
atX0SecondsPastTheMinuteGt20(): string | null;
atX0MinutesPastTheHourGt20(): string | null;
commaMonthX0ThroughMonthX1(): string | null;
commaYearX0ThroughYearX1(): string | null;
use24HourTimeFormatByDefault(): boolean;

@@ -8,0 +8,0 @@ everyMinute(): string;

import { Locale } from "../locale";
export declare class en implements Locale {
atX0SecondsPastTheMinuteGt20(): string;
atX0MinutesPastTheHourGt20(): string;
commaMonthX0ThroughMonthX1(): string;
commaYearX0ThroughYearX1(): string;
atX0SecondsPastTheMinuteGt20(): string | null;
atX0MinutesPastTheHourGt20(): string | null;
commaMonthX0ThroughMonthX1(): string | null;
commaYearX0ThroughYearX1(): string | null;
use24HourTimeFormatByDefault(): boolean;

@@ -8,0 +8,0 @@ anErrorOccuredWhenGeneratingTheExpressionD(): string;

import { Locale } from "../locale";
export declare class es implements Locale {
atX0SecondsPastTheMinuteGt20(): string;
atX0MinutesPastTheHourGt20(): string;
commaMonthX0ThroughMonthX1(): string;
commaYearX0ThroughYearX1(): string;
atX0SecondsPastTheMinuteGt20(): string | null;
atX0MinutesPastTheHourGt20(): string | null;
commaMonthX0ThroughMonthX1(): string | null;
commaYearX0ThroughYearX1(): string | null;
use24HourTimeFormatByDefault(): boolean;

@@ -8,0 +8,0 @@ anErrorOccuredWhenGeneratingTheExpressionD(): string;

import { Locale } from "../locale";
export declare class fa implements Locale {
atX0SecondsPastTheMinuteGt20(): string;
atX0MinutesPastTheHourGt20(): string;
commaMonthX0ThroughMonthX1(): string;
commaYearX0ThroughYearX1(): string;
atX0SecondsPastTheMinuteGt20(): string | null;
atX0MinutesPastTheHourGt20(): string | null;
commaMonthX0ThroughMonthX1(): string | null;
commaYearX0ThroughYearX1(): string | null;
use24HourTimeFormatByDefault(): boolean;

@@ -8,0 +8,0 @@ anErrorOccuredWhenGeneratingTheExpressionD(): string;

@@ -9,3 +9,3 @@ import { Locale } from "../locale";

atX0MinutesPastTheHour(): string;
atX0MinutesPastTheHourGt20(): string;
atX0MinutesPastTheHourGt20(): string | null;
atX0SecondsPastTheMinute(): string;

@@ -51,5 +51,5 @@ betweenX0AndX1(): string;

weekdayNearestDayX0(): string;
atX0SecondsPastTheMinuteGt20(): string;
commaMonthX0ThroughMonthX1(): string;
commaYearX0ThroughYearX1(): string;
atX0SecondsPastTheMinuteGt20(): string | null;
commaMonthX0ThroughMonthX1(): string | null;
commaYearX0ThroughYearX1(): string | null;
lastDay(): string;

@@ -56,0 +56,0 @@ commaAndOnX0(): string;

import { Locale } from "../locale";
export declare class fr implements Locale {
atX0SecondsPastTheMinuteGt20(): string;
atX0MinutesPastTheHourGt20(): string;
commaMonthX0ThroughMonthX1(): string;
commaYearX0ThroughYearX1(): string;
atX0SecondsPastTheMinuteGt20(): string | null;
atX0MinutesPastTheHourGt20(): string | null;
commaMonthX0ThroughMonthX1(): string | null;
commaYearX0ThroughYearX1(): string | null;
use24HourTimeFormatByDefault(): boolean;

@@ -8,0 +8,0 @@ everyMinute(): string;

import { Locale } from "../locale";
export declare class he implements Locale {
atX0SecondsPastTheMinuteGt20(): string;
atX0MinutesPastTheHourGt20(): string;
commaMonthX0ThroughMonthX1(): string;
commaYearX0ThroughYearX1(): string;
atX0SecondsPastTheMinuteGt20(): string | null;
atX0MinutesPastTheHourGt20(): string | null;
commaMonthX0ThroughMonthX1(): string | null;
commaYearX0ThroughYearX1(): string | null;
use24HourTimeFormatByDefault(): boolean;

@@ -8,0 +8,0 @@ anErrorOccuredWhenGeneratingTheExpressionD(): string;

import { Locale } from "../locale";
export declare class id implements Locale {
atX0SecondsPastTheMinuteGt20(): string;
atX0MinutesPastTheHourGt20(): string;
commaMonthX0ThroughMonthX1(): string;
commaYearX0ThroughYearX1(): string;
atX0SecondsPastTheMinuteGt20(): string | null;
atX0MinutesPastTheHourGt20(): string | null;
commaMonthX0ThroughMonthX1(): string | null;
commaYearX0ThroughYearX1(): string | null;
use24HourTimeFormatByDefault(): boolean;

@@ -8,0 +8,0 @@ anErrorOccuredWhenGeneratingTheExpressionD(): string;

import { Locale } from "../locale";
export declare class it implements Locale {
atX0SecondsPastTheMinuteGt20(): string;
atX0MinutesPastTheHourGt20(): string;
commaMonthX0ThroughMonthX1(): string;
commaYearX0ThroughYearX1(): string;
atX0SecondsPastTheMinuteGt20(): string | null;
atX0MinutesPastTheHourGt20(): string | null;
commaMonthX0ThroughMonthX1(): string | null;
commaYearX0ThroughYearX1(): string | null;
use24HourTimeFormatByDefault(): boolean;

@@ -8,0 +8,0 @@ anErrorOccuredWhenGeneratingTheExpressionD(): string;

@@ -51,6 +51,6 @@ import { Locale } from "../locale";

commaDaysBeforeTheLastDayOfTheMonth(): string;
atX0SecondsPastTheMinuteGt20(): string;
atX0MinutesPastTheHourGt20(): string;
commaMonthX0ThroughMonthX1(): string;
commaYearX0ThroughYearX1(): string;
atX0SecondsPastTheMinuteGt20(): string | null;
atX0MinutesPastTheHourGt20(): string | null;
commaMonthX0ThroughMonthX1(): string | null;
commaYearX0ThroughYearX1(): string | null;
lastDay(): string;

@@ -57,0 +57,0 @@ commaAndOnX0(): string;

@@ -6,6 +6,6 @@ import { Locale } from "../locale";

am(): string;
atX0SecondsPastTheMinuteGt20(): string;
atX0MinutesPastTheHourGt20(): string;
commaMonthX0ThroughMonthX1(): string;
commaYearX0ThroughYearX1(): string;
atX0SecondsPastTheMinuteGt20(): string | null;
atX0MinutesPastTheHourGt20(): string | null;
commaMonthX0ThroughMonthX1(): string | null;
commaYearX0ThroughYearX1(): string | null;
use24HourTimeFormatByDefault(): boolean;

@@ -12,0 +12,0 @@ anErrorOccuredWhenGeneratingTheExpressionD(): string;

import { Locale } from "../locale";
export declare class nb implements Locale {
atX0SecondsPastTheMinuteGt20(): string;
atX0MinutesPastTheHourGt20(): string;
commaMonthX0ThroughMonthX1(): string;
commaYearX0ThroughYearX1(): string;
atX0SecondsPastTheMinuteGt20(): string | null;
atX0MinutesPastTheHourGt20(): string | null;
commaMonthX0ThroughMonthX1(): string | null;
commaYearX0ThroughYearX1(): string | null;
use24HourTimeFormatByDefault(): boolean;

@@ -8,0 +8,0 @@ anErrorOccuredWhenGeneratingTheExpressionD(): string;

import { Locale } from "../locale";
export declare class nl implements Locale {
atX0SecondsPastTheMinuteGt20(): string;
atX0MinutesPastTheHourGt20(): string;
commaMonthX0ThroughMonthX1(): string;
commaYearX0ThroughYearX1(): string;
atX0SecondsPastTheMinuteGt20(): string | null;
atX0MinutesPastTheHourGt20(): string | null;
commaMonthX0ThroughMonthX1(): string | null;
commaYearX0ThroughYearX1(): string | null;
use24HourTimeFormatByDefault(): boolean;

@@ -8,0 +8,0 @@ everyMinute(): string;

import { Locale } from "../locale";
export declare class pl implements Locale {
atX0SecondsPastTheMinuteGt20(): string;
atX0MinutesPastTheHourGt20(): string;
commaMonthX0ThroughMonthX1(): string;
commaYearX0ThroughYearX1(): string;
atX0SecondsPastTheMinuteGt20(): string | null;
atX0MinutesPastTheHourGt20(): string | null;
commaMonthX0ThroughMonthX1(): string | null;
commaYearX0ThroughYearX1(): string | null;
use24HourTimeFormatByDefault(): boolean;

@@ -8,0 +8,0 @@ anErrorOccuredWhenGeneratingTheExpressionD(): string;

import { Locale } from "../locale";
export declare class pt_BR implements Locale {
atX0SecondsPastTheMinuteGt20(): string;
atX0MinutesPastTheHourGt20(): string;
commaMonthX0ThroughMonthX1(): string;
commaYearX0ThroughYearX1(): string;
atX0SecondsPastTheMinuteGt20(): string | null;
atX0MinutesPastTheHourGt20(): string | null;
commaMonthX0ThroughMonthX1(): string | null;
commaYearX0ThroughYearX1(): string | null;
use24HourTimeFormatByDefault(): boolean;

@@ -8,0 +8,0 @@ anErrorOccuredWhenGeneratingTheExpressionD(): string;

import { Locale } from "../locale";
export declare class ru implements Locale {
atX0SecondsPastTheMinuteGt20(): string;
atX0MinutesPastTheHourGt20(): string;
commaMonthX0ThroughMonthX1(): string;
commaYearX0ThroughYearX1(): string;
atX0SecondsPastTheMinuteGt20(): string | null;
atX0MinutesPastTheHourGt20(): string | null;
commaMonthX0ThroughMonthX1(): string | null;
commaYearX0ThroughYearX1(): string | null;
use24HourTimeFormatByDefault(): boolean;

@@ -8,0 +8,0 @@ everyMinute(): string;

import { Locale } from "../locale";
export declare class sk implements Locale {
atX0SecondsPastTheMinuteGt20(): string;
atX0MinutesPastTheHourGt20(): string;
commaMonthX0ThroughMonthX1(): string;
commaYearX0ThroughYearX1(): string;
atX0SecondsPastTheMinuteGt20(): string | null;
atX0MinutesPastTheHourGt20(): string | null;
commaMonthX0ThroughMonthX1(): string | null;
commaYearX0ThroughYearX1(): string | null;
use24HourTimeFormatByDefault(): boolean;

@@ -8,0 +8,0 @@ anErrorOccuredWhenGeneratingTheExpressionD(): string;

@@ -47,6 +47,6 @@ import { Locale } from "../locale";

weekdayNearestDayX0(): string;
commaMonthX0ThroughMonthX1(): string;
commaYearX0ThroughYearX1(): string;
atX0MinutesPastTheHourGt20(): string;
atX0SecondsPastTheMinuteGt20(): string;
commaMonthX0ThroughMonthX1(): string | null;
commaYearX0ThroughYearX1(): string | null;
atX0MinutesPastTheHourGt20(): string | null;
atX0SecondsPastTheMinuteGt20(): string | null;
commaStartingX0(): string;

@@ -53,0 +53,0 @@ daysOfTheWeek(): string[];

import { Locale } from "../locale";
export declare class sv implements Locale {
atX0SecondsPastTheMinuteGt20(): string;
atX0MinutesPastTheHourGt20(): string;
commaMonthX0ThroughMonthX1(): string;
commaYearX0ThroughYearX1(): string;
atX0SecondsPastTheMinuteGt20(): string | null;
atX0MinutesPastTheHourGt20(): string | null;
commaMonthX0ThroughMonthX1(): string | null;
commaYearX0ThroughYearX1(): string | null;
use24HourTimeFormatByDefault(): boolean;

@@ -8,0 +8,0 @@ anErrorOccuredWhenGeneratingTheExpressionD(): string;

import { Locale } from "../locale";
export declare class sw implements Locale {
atX0SecondsPastTheMinuteGt20(): string;
atX0MinutesPastTheHourGt20(): string;
commaMonthX0ThroughMonthX1(): string;
commaYearX0ThroughYearX1(): string;
atX0SecondsPastTheMinuteGt20(): string | null;
atX0MinutesPastTheHourGt20(): string | null;
commaMonthX0ThroughMonthX1(): string | null;
commaYearX0ThroughYearX1(): string | null;
use24HourTimeFormatByDefault(): boolean;

@@ -8,0 +8,0 @@ anErrorOccuredWhenGeneratingTheExpressionD(): string;

import { Locale } from "../locale";
export declare class tr implements Locale {
atX0SecondsPastTheMinuteGt20(): string;
atX0MinutesPastTheHourGt20(): string;
commaMonthX0ThroughMonthX1(): string;
commaYearX0ThroughYearX1(): string;
atX0SecondsPastTheMinuteGt20(): string | null;
atX0MinutesPastTheHourGt20(): string | null;
commaMonthX0ThroughMonthX1(): string | null;
commaYearX0ThroughYearX1(): string | null;
use24HourTimeFormatByDefault(): boolean;

@@ -8,0 +8,0 @@ everyMinute(): string;

import { Locale } from "../locale";
export declare class uk implements Locale {
atX0SecondsPastTheMinuteGt20(): string;
atX0MinutesPastTheHourGt20(): string;
commaMonthX0ThroughMonthX1(): string;
commaYearX0ThroughYearX1(): string;
atX0SecondsPastTheMinuteGt20(): string | null;
atX0MinutesPastTheHourGt20(): string | null;
commaMonthX0ThroughMonthX1(): string | null;
commaYearX0ThroughYearX1(): string | null;
use24HourTimeFormatByDefault(): boolean;

@@ -8,0 +8,0 @@ everyMinute(): string;

@@ -6,6 +6,6 @@ import { Locale } from "../locale";

am(): string;
atX0SecondsPastTheMinuteGt20(): string;
atX0MinutesPastTheHourGt20(): string;
commaMonthX0ThroughMonthX1(): string;
commaYearX0ThroughYearX1(): string;
atX0SecondsPastTheMinuteGt20(): string | null;
atX0MinutesPastTheHourGt20(): string | null;
commaMonthX0ThroughMonthX1(): string | null;
commaYearX0ThroughYearX1(): string | null;
use24HourTimeFormatByDefault(): boolean;

@@ -12,0 +12,0 @@ everyMinute(): string;

import { Locale } from "../locale";
export declare class zh_TW implements Locale {
atX0SecondsPastTheMinuteGt20(): string;
atX0MinutesPastTheHourGt20(): string;
commaMonthX0ThroughMonthX1(): string;
commaYearX0ThroughYearX1(): string;
atX0SecondsPastTheMinuteGt20(): string | null;
atX0MinutesPastTheHourGt20(): string | null;
commaMonthX0ThroughMonthX1(): string | null;
commaYearX0ThroughYearX1(): string | null;
use24HourTimeFormatByDefault(): boolean;

@@ -8,0 +8,0 @@ everyMinute(): string;

@@ -7,3 +7,3 @@ export interface Options {

use24HourTimeFormat?: boolean;
locale?: string;
locale?: string | null;
}
{
"name": "cronstrue",
"title": "cRonstrue",
"version": "1.125.0",
"version": "2.1.0",
"description": "Convert cron expressions into human readable descriptions",

@@ -32,2 +32,3 @@ "author": "Brady Holt",

"dist/",
"locales/",
"i18n.js",

@@ -55,8 +56,8 @@ "i18n.d.ts"

"prettier": "^2.1.1",
"ts-loader": "^8.0.1",
"ts-node": "^8.10.2",
"typescript": "^3.9.6",
"uglifyjs-webpack-plugin": "^2.2.0",
"webpack": "^4.43.0",
"webpack-cli": "^4.9.1",
"terser-webpack-plugin": "^5.3.1",
"ts-loader": "^9.2.6",
"ts-node": "^10.5.0",
"typescript": "^4.6.2",
"webpack": "^5.69.1",
"webpack-cli": "^4.9.2",
"xml2js": "^0.4.23"

@@ -68,5 +69,5 @@ },

"test": "npx mocha --reporter spec --require ts-node/register \"./test/**/*.ts\"",
"prerelease": "rm -rf ./dist && ./node_modules/webpack-cli/bin/cli.js && npx jbash ./scripts/generate-docs.js && git add -A"
"prepublish": "rm -rf ./dist && ./node_modules/webpack-cli/bin/cli.js && npx jbash ./scripts/generate-docs.js && git add -A"
},
"dependencies": {}
}

@@ -102,19 +102,29 @@ # cRonstrue ![Build Status](https://github.com/bradymholt/cRonstrue/workflows/build/badge.svg) [![NPM Package](https://img.shields.io/npm/v/cronstrue.svg)](https://www.npmjs.com/package/cronstrue)

To use the i18n support cRonstrue provides, you must use the packaged library that contains the locale translations. Once you do this, you can pass the name of a supported locale as an option to `cronstrue.toString()`. For example, for the es (Spanish) locale, you would use: `cronstrue.toString("* * * * *", { locale: "es" });`.
To use the i18n support cRonstrue provides, you can import a specific locale and then call `toString()`. For example, for the es (Spanish) locale:
### Node
```js
var cronstrue = require('cronstrue/i18n');
cronstrue.toString("*/5 * * * *", { locale: "fr" });
import cronstrue from 'cronstrue/locales/es';
cronstrue.toString("*/5 * * * *");
```
### Browser
The `cronstrue-i18n.min.js` file from the `/dist` folder in the npm package should be served to the browser.
A locale file from the `/locales` folder in the npm package should be served to the browser.
```html
<script src="cronstrue-i18n.min.js" type="text/javascript"></script>
<script src="https://unpkg.com/cronstrue@latest/locales/es.min.js" async></script>
<script>
cronstrue.toString("*/5 * * * *", { locale: "fr" });
cronstrue.toString("*/5 * * * *");
</script>
```
## All Locales
Alternatively you can import all locales and then pass in the `locale` option:
```js
import cronstrue from 'cronstrue/i18n';
cronstrue.toString("*/5 * * * *", { locale: "es" });
```
## Frequently Asked Questions

@@ -121,0 +131,0 @@

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc