Software zum Installieren eines Smart-Mirror Frameworks , zum Nutzen von hochschulrelevanten Informationen, auf einem Raspberry-Pi.
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.

rrule.js.map 221KB

1
  1. {"version":3,"sources":["webpack://rrule/webpack/universalModuleDefinition","webpack://rrule/webpack/bootstrap","webpack://rrule/./src/weekday.ts","webpack://rrule/./src/helpers.ts","webpack://rrule/./src/dateutil.ts","webpack://rrule/./src/iterresult.ts","webpack://rrule/./node_modules/tslib/tslib.es6.js","webpack://rrule/./src/callbackiterresult.ts","webpack://rrule/./src/nlp/i18n.ts","webpack://rrule/./src/nlp/totext.ts","webpack://rrule/./src/nlp/parsetext.ts","webpack://rrule/./src/types.ts","webpack://rrule/./src/nlp/index.ts","webpack://rrule/./src/datetime.ts","webpack://rrule/./src/parseoptions.ts","webpack://rrule/./src/parsestring.ts","webpack://rrule/./src/fake-luxon.ts","webpack://rrule/./src/datewithzone.ts","webpack://rrule/./src/optionstostring.ts","webpack://rrule/./src/cache.ts","webpack://rrule/./src/masks.ts","webpack://rrule/./src/iterinfo/yearinfo.ts","webpack://rrule/./src/iterinfo/monthinfo.ts","webpack://rrule/./src/iterinfo/easter.ts","webpack://rrule/./src/iterinfo/index.ts","webpack://rrule/./src/iter/poslist.ts","webpack://rrule/./src/iter/index.ts","webpack://rrule/./src/rrule.ts","webpack://rrule/./src/iterset.ts","webpack://rrule/./src/rrulestr.ts","webpack://rrule/./src/rruleset.ts","webpack://rrule/./src/index.ts"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;QCVA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAw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AI,CAAC,EAAE;QAC3B,MAAM,IAAI,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,uBAAuB,CAAC;KAC5D;IACD,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC,EAAE;QACnD,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC;QACrB,YAAQ,CAAC,IAAI,CAAC,UAAU,CAAC;KAC1B;AACH,CAAC;AAED,SAAS,cAAc,CAAE,KAAa,EAAE,MAAc,EAAE,IAAwB;IAC9E,IAAM,KAAK,GAAG,CAAC,IAAI,IAAI,IAAI,CAAC,WAAW,EAAE,KAAK,KAAK;IACnD,IAAM,MAAM,GAAG,KAAK,CAAC,CAAC,CAAI,KAAK,MAAG,CAAC,CAAC,CAAI,KAAK,cAAS,IAAI,MAAG;IAE7D,IAAM,UAAU,GAAG,MAAM;SACpB,GAAG,CAAC,eAAK,IAAI,mBAAQ,CAAC,iBAAiB,CAAC,KAAK,CAAC,OAAO,EAAE,EAAE,KAAK,CAAC,EAAlD,CAAkD,CAAC;SAChE,IAAI,CAAC,GAAG,CAAC;IAEd,OAAO,KAAG,MAAM,GAAG,UAAY;AACjC,CAAC;;;AClOD;AAAA;AAAA;AAAA;AAAA;AAAA;;;;;;;;;;;;;;GAcG;AAEwB;AACM;AAEI;AACkB;AACR;AAM9C;AAEc,kFAAK","file":"rrule.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"rrule\"] = factory();\n\telse\n\t\troot[\"rrule\"] = factory();\n})(typeof self !== 'undefined' ? self : this, function() {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 0);\n","// =============================================================================\n// Weekday\n// =============================================================================\n\nexport type WeekdayStr = 'MO' | 'TU' | 'WE' | 'TH' | 'FR' | 'SA' | 'SU'\nexport const ALL_WEEKDAYS: WeekdayStr[] = ['MO', 'TU', 'WE', 'TH', 'FR', 'SA', 'SU']\n\nexport class Weekday {\n public readonly weekday: number\n public readonly n?: number\n\n constructor (weekday: number, n?: number) {\n if (n === 0) throw new Error(\"Can't create weekday with n == 0\")\n this.weekday = weekday\n this.n = n\n }\n\n static fromStr (str: WeekdayStr): Weekday {\n return new Weekday(ALL_WEEKDAYS.indexOf(str))\n }\n\n // __call__ - Cannot call the object directly, do it through\n // e.g. RRule.TH.nth(-1) instead,\n nth (n: number) {\n return this.n === n ? this : new Weekday(this.weekday, n)\n }\n\n // __eq__\n equals (other: Weekday) {\n return this.weekday === other.weekday && this.n === other.n\n }\n\n // __repr__\n toString () {\n let s: string = ALL_WEEKDAYS[this.weekday]\n if (this.n) s = (this.n > 0 ? '+' : '') + String(this.n) + s\n return s\n }\n\n getJsWeekday () {\n return this.weekday === 6 ? 0 : this.weekday + 1\n }\n}\n","// =============================================================================\n// Helper functions\n// =============================================================================\n\nimport { ALL_WEEKDAYS, WeekdayStr } from './weekday'\n\nexport const isPresent = function<T>(value?: T | null | undefined): value is T {\n return value !== null && value !== undefined\n}\n\nexport const isNumber = function (value?: any): value is number {\n return typeof value === 'number'\n}\n\nexport const isWeekdayStr = function (value?: any): value is WeekdayStr {\n return ALL_WEEKDAYS.indexOf(value) >= 0\n}\n\nexport const isArray = Array.isArray\n\n/**\n * Simplified version of python's range()\n */\nexport const range = function (start: number, end: number = start): number[] {\n if (arguments.length === 1) {\n end = start\n start = 0\n }\n const rang = []\n for (let i = start; i < end; i++) rang.push(i)\n return rang\n}\n\nexport const clone = function<T>(array: T[]): T[] {\n return ([] as T[]).concat(array)\n}\n\nexport const repeat = function<T>(value: T | T[], times: number): (T | T[])[] {\n let i = 0\n const array: (T | T[])[] = []\n\n if (isArray(value)) {\n for (; i < times; i++) array[i] = ([] as T[]).concat(value)\n } else {\n for (; i < times; i++) array[i] = value\n }\n return array\n}\n\nexport const toArray = function<T>(item: T | T[]): T[] {\n if (isArray(item)) {\n return item\n }\n\n return [ item ]\n}\n\nexport function padStart (item: string | number, targetLength: number, padString: string = ' ') {\n const str = String(item)\n targetLength = targetLength >> 0\n if (str.length > targetLength) {\n return String(str)\n }\n\n targetLength = targetLength - str.length\n if (targetLength > padString.length) {\n padString += repeat(padString, targetLength / padString.length)\n }\n\n return padString.slice(0,targetLength) + String(str)\n}\n\n/**\n * Python like split\n */\nexport const split = function (str: string, sep: string, num: number) {\n const splits = str.split(sep)\n return num\n ? splits.slice(0, num).concat([splits.slice(num).join(sep)])\n : splits\n}\n\n/**\n * closure/goog/math/math.js:modulo\n * Copyright 2006 The Closure Library Authors.\n * The % operator in JavaScript returns the remainder of a / b, but differs from\n * some other languages in that the result will have the same sign as the\n * dividend. For example, -1 % 8 == -1, whereas in some other languages\n * (such as Python) the result would be 7. This function emulates the more\n * correct modulo behavior, which is useful for certain applications such as\n * calculating an offset index in a circular list.\n *\n * @param {number} a The dividend.\n * @param {number} b The divisor.\n * @return {number} a % b where the result is between 0 and b (either 0 <= x < b\n * or b < x <= 0, depending on the sign of b).\n */\nexport const pymod = function (a: number, b: number) {\n const r = a % b\n // If r and b differ in sign, add b to wrap the result to the correct sign.\n return r * b < 0 ? r + b : r\n}\n\n/**\n * @see: <http://docs.python.org/library/functions.html#divmod>\n */\nexport const divmod = function (a: number, b: number) {\n return { div: Math.floor(a / b), mod: pymod(a, b) }\n}\n\nexport const empty = function<T>(obj: T[] | null | undefined) {\n return !isPresent(obj) || obj.length === 0\n}\n\n/**\n * Python-like boolean\n * @return {Boolean} value of an object/primitive, taking into account\n * the fact that in Python an empty list's/tuple's\n * boolean value is False, whereas in JS it's true\n */\nexport const notEmpty = function<T>(obj: T[] | null | undefined): obj is T[] {\n return !empty(obj)\n}\n\n/**\n * Return true if a value is in an array\n */\nexport const includes = function<T>(arr: T[] | null | undefined, val: T) {\n return notEmpty(arr) && arr.indexOf(val) !== -1\n}\n","import { padStart } from './helpers'\nimport { Time } from './datetime'\n\ntype Datelike = Pick<Date, 'getTime'>\n\n/**\n * General date-related utilities.\n * Also handles several incompatibilities between JavaScript and Python\n *\n */\nexport namespace dateutil {\n export const MONTH_DAYS = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]\n\n /**\n * Number of milliseconds of one day\n */\n export const ONE_DAY = 1000 * 60 * 60 * 24\n\n /**\n * @see: <http://docs.python.org/library/datetime.html#datetime.MAXYEAR>\n */\n export const MAXYEAR = 9999\n\n /**\n * Python uses 1-Jan-1 as the base for calculating ordinals but we don't\n * want to confuse the JS engine with milliseconds > Number.MAX_NUMBER,\n * therefore we use 1-Jan-1970 instead\n */\n export const ORDINAL_BASE = new Date(Date.UTC(1970, 0, 1))\n\n /**\n * Python: MO-SU: 0 - 6\n * JS: SU-SAT 0 - 6\n */\n export const PY_WEEKDAYS = [6, 0, 1, 2, 3, 4, 5]\n\n /**\n * py_date.timetuple()[7]\n */\n export const getYearDay = function (date: Date) {\n const dateNoTime = new Date(\n date.getUTCFullYear(),\n date.getUTCMonth(),\n date.getUTCDate()\n )\n return (\n Math.ceil(\n (dateNoTime.valueOf() -\n new Date(date.getUTCFullYear(), 0, 1).valueOf()) /\n ONE_DAY\n ) + 1\n )\n }\n\n export const isLeapYear = function (year: number) {\n return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0\n }\n\n export const isDate = function (value: any): value is Date {\n return value instanceof Date\n }\n\n export const isValidDate = function (value: any): value is Date {\n return isDate(value) && !isNaN(value.getTime())\n }\n\n /**\n * @return {Number} the date's timezone offset in ms\n */\n export const tzOffset = function (date: Date) {\n return date.getTimezoneOffset() * 60 * 1000\n }\n\n /**\n * @see: <http://www.mcfedries.com/JavaScript/DaysBetween.asp>\n */\n export const daysBetween = function (date1: Date, date2: Date) {\n // The number of milliseconds in one day\n // Convert both dates to milliseconds\n const date1ms = date1.getTime() - tzOffset(date1)\n const date2ms = date2.getTime() - tzOffset(date2)\n // Calculate the difference in milliseconds\n const differencems = date1ms - date2ms\n // Convert back to days and return\n return Math.round(differencems / ONE_DAY)\n }\n\n /**\n * @see: <http://docs.python.org/library/datetime.html#datetime.date.toordinal>\n */\n export const toOrdinal = function (date: Date) {\n return daysBetween(date, ORDINAL_BASE)\n }\n\n /**\n * @see - <http://docs.python.org/library/datetime.html#datetime.date.fromordinal>\n */\n export const fromOrdinal = function (ordinal: number) {\n return new Date(ORDINAL_BASE.getTime() + ordinal * ONE_DAY)\n }\n\n export const getMonthDays = function (date: Date) {\n const month = date.getUTCMonth()\n return month === 1 && isLeapYear(date.getUTCFullYear())\n ? 29\n : MONTH_DAYS[month]\n }\n\n /**\n * @return {Number} python-like weekday\n */\n export const getWeekday = function (date: Date) {\n return PY_WEEKDAYS[date.getUTCDay()]\n }\n\n /**\n * @see: <http://docs.python.org/library/calendar.html#calendar.monthrange>\n */\n export const monthRange = function (year: number, month: number) {\n const date = new Date(Date.UTC(year, month, 1))\n return [getWeekday(date), getMonthDays(date)]\n }\n\n /**\n * @see: <http://docs.python.org/library/datetime.html#datetime.datetime.combine>\n */\n export const combine = function (date: Date, time: Date | Time) {\n time = time || date\n return new Date(\n Date.UTC(\n date.getUTCFullYear(),\n date.getUTCMonth(),\n date.getUTCDate(),\n time.getHours(),\n time.getMinutes(),\n time.getSeconds(),\n time.getMilliseconds()\n )\n )\n }\n\n export const clone = function (date: Date | Time) {\n const dolly = new Date(date.getTime())\n return dolly\n }\n\n export const cloneDates = function (dates: Date[] | Time[]) {\n const clones = []\n for (let i = 0; i < dates.length; i++) {\n clones.push(clone(dates[i]))\n }\n return clones\n }\n\n /**\n * Sorts an array of Date or dateutil.Time objects\n */\n export const sort = function<T extends Datelike>(dates: T[]) {\n dates.sort(function (a, b) {\n return a.getTime() - b.getTime()\n })\n }\n\n export const timeToUntilString = function (time: number, utc = true) {\n const date = new Date(time)\n return [\n padStart(date.getUTCFullYear().toString(), 4, '0'),\n padStart(date.getUTCMonth() + 1, 2, '0'),\n padStart(date.getUTCDate(), 2, '0'),\n 'T',\n padStart(date.getUTCHours(), 2, '0'),\n padStart(date.getUTCMinutes(), 2, '0'),\n padStart(date.getUTCSeconds(), 2, '0'),\n utc ? 'Z' : ''\n ].join('')\n }\n\n export const untilStringToDate = function (until: string) {\n const re = /^(\\d{4})(\\d{2})(\\d{2})(T(\\d{2})(\\d{2})(\\d{2})Z?)?$/\n const bits = re.exec(until)\n\n if (!bits) throw new Error(`Invalid UNTIL value: ${until}`)\n\n return new Date(\n Date.UTC(\n parseInt(bits[1], 10),\n parseInt(bits[2], 10) - 1,\n parseInt(bits[3], 10),\n parseInt(bits[5], 10) || 0,\n parseInt(bits[6], 10) || 0,\n parseInt(bits[7], 10) || 0\n )\n )\n }\n\n}\n\nexport default dateutil\n","import { QueryMethodTypes, IterResultType } from './types'\n\n// =============================================================================\n// Results\n// =============================================================================\n\nexport interface IterArgs {\n inc: boolean\n before: Date\n after: Date\n dt: Date\n _value: Date | Date[] | null\n}\n\n/**\n * This class helps us to emulate python's generators, sorta.\n */\nexport default class IterResult<M extends QueryMethodTypes> {\n public readonly method: M\n public readonly args: Partial<IterArgs>\n public readonly minDate: Date | null = null\n public readonly maxDate: Date | null = null\n public _result: Date[] = []\n public total = 0\n\n constructor (method: M, args: Partial<IterArgs>) {\n this.method = method\n this.args = args\n\n if (method === 'between') {\n this.maxDate = args.inc\n ? args.before!\n : new Date(args.before!.getTime() - 1)\n this.minDate = args.inc ? args.after! : new Date(args.after!.getTime() + 1)\n } else if (method === 'before') {\n this.maxDate = args.inc ? args.dt! : new Date(args.dt!.getTime() - 1)\n } else if (method === 'after') {\n this.minDate = args.inc ? args.dt! : new Date(args.dt!.getTime() + 1)\n }\n }\n\n /**\n * Possibly adds a date into the result.\n *\n * @param {Date} date - the date isn't necessarly added to the result\n * list (if it is too late/too early)\n * @return {Boolean} true if it makes sense to continue the iteration\n * false if we're done.\n */\n accept (date: Date) {\n ++this.total\n const tooEarly = this.minDate && date < this.minDate\n const tooLate = this.maxDate && date > this.maxDate\n\n if (this.method === 'between') {\n if (tooEarly) return true\n if (tooLate) return false\n } else if (this.method === 'before') {\n if (tooLate) return false\n } else if (this.method === 'after') {\n if (tooEarly) return true\n this.add(date)\n return false\n }\n\n return this.add(date)\n }\n\n /**\n *\n * @param {Date} date that is part of the result.\n * @return {Boolean} whether we are interested in more values.\n */\n add (date: Date) {\n this._result.push(date)\n return true\n }\n\n /**\n * 'before' and 'after' return only one date, whereas 'all'\n * and 'between' an array.\n * @return {Date,Array?}\n */\n getValue (): IterResultType<M> {\n const res = this._result\n switch (this.method) {\n case 'all':\n case 'between':\n return res as IterResultType<M>\n case 'before':\n case 'after':\n default:\n return (res.length ? res[res.length - 1] : null) as IterResultType<M>\n }\n }\n\n clone () {\n return new IterResult(this.method, this.args)\n }\n}\n","/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation. All rights reserved.\r\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\r\nthis file except in compliance with the License. You may obtain a copy of the\r\nLicense at http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nTHIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\r\nWARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\r\nMERCHANTABLITY OR NON-INFRINGEMENT.\r\n\r\nSee the Apache Version 2.0 License for specific language governing permissions\r\nand limitations under the License.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport function __exportStar(m, exports) {\r\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(o) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator], i = 0;\r\n if (m) return m.call(o);\r\n return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n};\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = mod;\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n","import IterResult, { IterArgs } from './iterresult'\n\ntype Iterator = (d: Date, len: number) => boolean\n\n/**\n * IterResult subclass that calls a callback function on each add,\n * and stops iterating when the callback returns false.\n */\nexport default class CallbackIterResult extends IterResult<'all' | 'between'> {\n private iterator: Iterator\n\n constructor (\n method: 'all' | 'between',\n args: Partial<IterArgs>,\n iterator: Iterator\n ) {\n super(method, args)\n\n this.iterator = iterator\n }\n\n add (date: Date) {\n if (this.iterator(date, this._result.length)) {\n this._result.push(date)\n return true\n }\n return false\n }\n}\n","// =============================================================================\n// i18n\n// =============================================================================\n\nexport interface Language {\n dayNames: string[]\n monthNames: string[]\n tokens: {\n [k: string]: RegExp\n }\n}\n\nconst ENGLISH: Language = {\n dayNames: [\n 'Sunday', 'Monday', 'Tuesday', 'Wednesday',\n 'Thursday', 'Friday', 'Saturday'\n ],\n monthNames: [\n 'January', 'February', 'March', 'April', 'May',\n 'June', 'July', 'August', 'September', 'October',\n 'November', 'December'\n ],\n tokens: {\n 'SKIP': /^[ \\r\\n\\t]+|^\\.$/,\n 'number': /^[1-9][0-9]*/,\n 'numberAsText': /^(one|two|three)/i,\n 'every': /^every/i,\n 'day(s)': /^days?/i,\n 'weekday(s)': /^weekdays?/i,\n 'week(s)': /^weeks?/i,\n 'hour(s)': /^hours?/i,\n 'minute(s)': /^minutes?/i,\n 'month(s)': /^months?/i,\n 'year(s)': /^years?/i,\n 'on': /^(on|in)/i,\n 'at': /^(at)/i,\n 'the': /^the/i,\n 'first': /^first/i,\n 'second': /^second/i,\n 'third': /^third/i,\n 'nth': /^([1-9][0-9]*)(\\.|th|nd|rd|st)/i,\n 'last': /^last/i,\n 'for': /^for/i,\n 'time(s)': /^times?/i,\n 'until': /^(un)?til/i,\n 'monday': /^mo(n(day)?)?/i,\n 'tuesday': /^tu(e(s(day)?)?)?/i,\n 'wednesday': /^we(d(n(esday)?)?)?/i,\n 'thursday': /^th(u(r(sday)?)?)?/i,\n 'friday': /^fr(i(day)?)?/i,\n 'saturday': /^sa(t(urday)?)?/i,\n 'sunday': /^su(n(day)?)?/i,\n 'january': /^jan(uary)?/i,\n 'february': /^feb(ruary)?/i,\n 'march': /^mar(ch)?/i,\n 'april': /^apr(il)?/i,\n 'may': /^may/i,\n 'june': /^june?/i,\n 'july': /^july?/i,\n 'august': /^aug(ust)?/i,\n 'september': /^sep(t(ember)?)?/i,\n 'october': /^oct(ober)?/i,\n 'november': /^nov(ember)?/i,\n 'december': /^dec(ember)?/i,\n 'comma': /^(,\\s*|(and|or)\\s*)+/i\n }\n}\n\nexport default ENGLISH\n","import ENGLISH, { Language } from './i18n'\nimport RRule from '../index'\nimport { Options, ByWeekday } from '../types'\nimport { Weekday } from '../weekday'\nimport { isArray, isNumber, isPresent, padStart } from '../helpers'\n\n// =============================================================================\n// Helper functions\n// =============================================================================\n\n/**\n * Return true if a value is in an array\n */\nconst contains = function (arr: string[], val: string) {\n return arr.indexOf(val) !== -1\n}\n\n// =============================================================================\n// ToText\n// =============================================================================\n\nexport type GetText = (id: string | number | Weekday) => string\n\nconst defaultGetText: GetText = id => id.toString()\n\nexport type DateFormatter = (year: number, month: string, day: number) => string\n\nconst defaultDateFormatter: DateFormatter = (year: number, month: string, day: number) => `${month} ${day}, ${year}`\n\n/**\n *\n * @param {RRule} rrule\n * Optional:\n * @param {Function} gettext function\n * @param {Object} language definition\n * @constructor\n */\nexport default class ToText {\n static IMPLEMENTED: string[][]\n private rrule: RRule\n private text: string[]\n private gettext: GetText\n private dateFormatter: DateFormatter\n private language: Language\n private options: Partial<Options>\n private origOptions: Partial<Options>\n private bymonthday: Options['bymonthday'] | null\n private byweekday: {\n allWeeks: ByWeekday[] | null\n someWeeks: ByWeekday[] | null\n isWeekdays: boolean\n isEveryDay: boolean\n } | null\n\n constructor (rrule: RRule, gettext: GetText = defaultGetText, language: Language = ENGLISH, dateFormatter: DateFormatter = defaultDateFormatter) {\n this.text = []\n this.language = language || ENGLISH\n this.gettext = gettext\n this.dateFormatter = dateFormatter\n this.rrule = rrule\n this.options = rrule.options\n this.origOptions = rrule.origOptions\n\n if (this.origOptions.bymonthday) {\n const bymonthday = ([] as number[]).concat(this.options.bymonthday!)\n const bynmonthday = ([] as number[]).concat(this.options.bynmonthday!)\n\n bymonthday.sort((a, b) => a - b)\n bynmonthday.sort((a, b) => b - a)\n // 1, 2, 3, .., -5, -4, -3, ..\n this.bymonthday = bymonthday.concat(bynmonthday)\n if (!this.bymonthday.length) this.bymonthday = null\n }\n\n if (isPresent(this.origOptions.byweekday)) {\n const byweekday = !isArray(this.origOptions.byweekday)\n ? [this.origOptions.byweekday]\n : this.origOptions.byweekday\n const days = String(byweekday)\n\n this.byweekday = {\n allWeeks: byweekday.filter(function (weekday: Weekday) {\n return !weekday.n\n }),\n someWeeks: byweekday.filter(function (weekday: Weekday) {\n return Boolean(weekday.n)\n }),\n isWeekdays:\n days.indexOf('MO') !== -1 &&\n days.indexOf('TU') !== -1 &&\n days.indexOf('WE') !== -1 &&\n days.indexOf('TH') !== -1 &&\n days.indexOf('FR') !== -1 &&\n days.indexOf('SA') === -1 &&\n days.indexOf('SU') === -1,\n isEveryDay:\n days.indexOf('MO') !== -1 &&\n days.indexOf('TU') !== -1 &&\n days.indexOf('WE') !== -1 &&\n days.indexOf('TH') !== -1 &&\n days.indexOf('FR') !== -1 &&\n days.indexOf('SA') !== -1 &&\n days.indexOf('SU') !== -1\n }\n\n const sortWeekDays = function (a: Weekday, b: Weekday) {\n return a.weekday - b.weekday\n }\n\n this.byweekday.allWeeks!.sort(sortWeekDays)\n this.byweekday.someWeeks!.sort(sortWeekDays)\n\n if (!this.byweekday.allWeeks!.length) this.byweekday.allWeeks = null\n if (!this.byweekday.someWeeks!.length) this.byweekday.someWeeks = null\n } else {\n this.byweekday = null\n }\n }\n\n /**\n * Test whether the rrule can be fully converted to text.\n * @param {RRule} rrule\n * @return {Boolean}\n */\n static isFullyConvertible (rrule: RRule) {\n let canConvert = true\n\n if (!(rrule.options.freq in ToText.IMPLEMENTED)) return false\n if (rrule.origOptions.until && rrule.origOptions.count) return false\n\n for (let key in rrule.origOptions) {\n if (contains(['dtstart', 'wkst', 'freq'], key)) return true\n if (!contains(ToText.IMPLEMENTED[rrule.options.freq], key)) return false\n }\n\n return canConvert\n }\n\n isFullyConvertible () {\n return ToText.isFullyConvertible(this.rrule)\n }\n\n /**\n * Perform the conversion. Only some of the frequencies are supported.\n * If some of the rrule's options aren't supported, they'll\n * be omitted from the output an \"(~ approximate)\" will be appended.\n * @return {*}\n */\n toString () {\n const gettext = this.gettext\n\n if (!(this.options.freq! in ToText.IMPLEMENTED)) {\n return gettext('RRule error: Unable to fully convert this rrule to text')\n }\n\n this.text = [gettext('every')]\n // @ts-ignore\n this[RRule.FREQUENCIES[this.options.freq]]()\n\n if (this.options.until) {\n this.add(gettext('until'))\n const until = this.options.until\n this.add(this.dateFormatter(until.getUTCFullYear(), this.language.monthNames[until.getUTCMonth()], until.getUTCDate()))\n } else if (this.options.count) {\n this.add(gettext('for'))\n .add(this.options.count.toString())\n .add(\n this.plural(this.options.count) ? gettext('times') : gettext('time')\n )\n }\n\n if (!this.isFullyConvertible()) this.add(gettext('(~ approximate)'))\n\n return this.text.join('')\n }\n\n HOURLY () {\n const gettext = this.gettext\n\n if (this.options.interval !== 1) this.add(this.options.interval!.toString())\n\n this.add(\n this.plural(this.options.interval!) ? gettext('hours') : gettext('hour')\n )\n }\n\n MINUTELY () {\n const gettext = this.gettext\n\n if (this.options.interval !== 1) this.add(this.options.interval!.toString())\n\n this.add(\n this.plural(this.options.interval!)\n ? gettext('minutes')\n : gettext('minute')\n )\n }\n\n DAILY () {\n const gettext = this.gettext\n\n if (this.options.interval !== 1) this.add(this.options.interval!.toString())\n\n if (this.byweekday && this.byweekday.isWeekdays) {\n this.add(\n this.plural(this.options.interval!)\n ? gettext('weekdays')\n : gettext('weekday')\n )\n } else {\n this.add(\n this.plural(this.options.interval!) ? gettext('days') : gettext('day')\n )\n\n }\n\n if (this.origOptions.bymonth) {\n this.add(gettext('in'))\n this._bymonth()\n }\n\n if (this.bymonthday) {\n this._bymonthday()\n } else if (this.byweekday) {\n this._byweekday()\n } else if (this.origOptions.byhour) {\n this._byhour()\n }\n }\n\n WEEKLY () {\n const gettext = this.gettext\n\n if (this.options.interval !== 1) {\n this.add(this.options.interval!.toString()).add(\n this.plural(this.options.interval!) ? gettext('weeks') : gettext('week')\n )\n }\n\n if (this.byweekday && this.byweekday.isWeekdays) {\n if (this.options.interval === 1) {\n this.add(\n this.plural(this.options.interval)\n ? gettext('weekdays')\n : gettext('weekday')\n )\n } else {\n this.add(gettext('on')).add(gettext('weekdays'))\n }\n } else if (this.byweekday && this.byweekday.isEveryDay) {\n this.add(\n this.plural(this.options.interval!) ? gettext('days') : gettext('day')\n )\n } else {\n if (this.options.interval === 1) this.add(gettext('week'))\n\n if (this.origOptions.bymonth) {\n this.add(gettext('in'))\n this._bymonth()\n }\n\n if (this.bymonthday) {\n this._bymonthday()\n } else if (this.byweekday) {\n this._byweekday()\n }\n }\n }\n\n MONTHLY () {\n const gettext = this.gettext\n\n if (this.origOptions.bymonth) {\n if (this.options.interval !== 1) {\n this.add(this.options.interval!.toString()).add(gettext('months'))\n if (this.plural(this.options.interval!)) this.add(gettext('in'))\n } else {\n // this.add(gettext('MONTH'))\n }\n this._bymonth()\n } else {\n if (this.options.interval !== 1) this.add(this.options.interval!.toString())\n this.add(\n this.plural(this.options.interval!)\n ? gettext('months')\n : gettext('month')\n )\n }\n if (this.bymonthday) {\n this._bymonthday()\n } else if (this.byweekday && this.byweekday.isWeekdays) {\n this.add(gettext('on')).add(gettext('weekdays'))\n } else if (this.byweekday) {\n this._byweekday()\n }\n }\n\n YEARLY () {\n const gettext = this.gettext\n\n if (this.origOptions.bymonth) {\n if (this.options.interval !== 1) {\n this.add(this.options.interval!.toString())\n this.add(gettext('years'))\n } else {\n // this.add(gettext('YEAR'))\n }\n this._bymonth()\n } else {\n if (this.options.interval !== 1) this.add(this.options.interval!.toString())\n this.add(\n this.plural(this.options.interval!) ? gettext('years') : gettext('year')\n )\n }\n\n if (this.bymonthday) {\n this._bymonthday()\n } else if (this.byweekday) {\n this._byweekday()\n }\n\n if (this.options.byyearday) {\n this.add(gettext('on the'))\n .add(this.list(this.options.byyearday, this.nth, gettext('and')))\n .add(gettext('day'))\n }\n\n if (this.options.byweekno) {\n this.add(gettext('in'))\n .add(\n this.plural((this.options.byweekno as number[]).length)\n ? gettext('weeks')\n : gettext('week')\n )\n .add(this.list(this.options.byweekno, undefined, gettext('and')))\n }\n }\n\n private _bymonthday () {\n const gettext = this.gettext\n if (this.byweekday && this.byweekday.allWeeks) {\n this.add(gettext('on'))\n .add(\n this.list(this.byweekday.allWeeks, this.weekdaytext, gettext('or'))\n )\n .add(gettext('the'))\n .add(this.list(this.bymonthday!, this.nth, gettext('or')))\n } else {\n this.add(gettext('on the')).add(\n this.list(this.bymonthday!, this.nth, gettext('and'))\n )\n }\n // this.add(gettext('DAY'))\n }\n\n private _byweekday () {\n const gettext = this.gettext\n if (this.byweekday!.allWeeks && !this.byweekday!.isWeekdays) {\n this.add(gettext('on')).add(\n this.list(this.byweekday!.allWeeks, this.weekdaytext)\n )\n }\n\n if (this.byweekday!.someWeeks) {\n if (this.byweekday!.allWeeks) this.add(gettext('and'))\n\n this.add(gettext('on the')).add(\n this.list(this.byweekday!.someWeeks, this.weekdaytext, gettext('and'))\n )\n }\n }\n\n private _byhour () {\n const gettext = this.gettext\n\n this.add(gettext('at')).add(\n this.list(this.origOptions.byhour!, undefined, gettext('and'))\n )\n }\n\n private _bymonth () {\n this.add(\n this.list(this.options.bymonth!, this.monthtext, this.gettext('and'))\n )\n }\n\n nth (n: number | string) {\n n = parseInt(n.toString(), 10)\n let nth: string\n let npos: number\n const gettext = this.gettext\n\n if (n === -1) return gettext('last')\n\n npos = Math.abs(n)\n switch (npos) {\n case 1:\n case 21:\n case 31:\n nth = npos + gettext('st')\n break\n case 2:\n case 22:\n nth = npos + gettext('nd')\n break\n case 3:\n case 23:\n nth = npos + gettext('rd')\n break\n default:\n nth = npos + gettext('th')\n }\n\n return n < 0 ? nth + ' ' + gettext('last') : nth\n }\n\n monthtext (m: number) {\n return this.language.monthNames[m - 1]\n }\n\n weekdaytext (wday: Weekday | number) {\n const weekday =\n isNumber(wday) ? (wday + 1) % 7 : wday.getJsWeekday()\n return (\n ((wday as Weekday).n ? this.nth((wday as Weekday).n!) + ' ' : '') + this.language.dayNames[weekday]\n )\n }\n\n plural (n: number) {\n return n % 100 !== 1\n }\n\n add (s: string) {\n this.text.push(' ')\n this.text.push(s)\n return this\n }\n\n list (arr: ByWeekday | ByWeekday[], callback?: GetText, finalDelim?: string, delim: string = ',') {\n if (!isArray(arr)) {\n arr = [arr]\n }\n const delimJoin = function (\n array: string[],\n delimiter: string,\n finalDelimiter: string\n ) {\n let list = ''\n\n for (let i = 0; i < array.length; i++) {\n if (i !== 0) {\n if (i === array.length - 1) {\n list += ' ' + finalDelimiter + ' '\n } else {\n list += delimiter + ' '\n }\n }\n list += array[i]\n }\n return list\n }\n\n callback =\n callback ||\n function (o) {\n return o.toString()\n }\n const self = this\n const realCallback = function (arg: ByWeekday) {\n return callback && callback.call(self, arg)\n }\n\n if (finalDelim) {\n return delimJoin(arr.map(realCallback), delim, finalDelim)\n } else {\n return arr.map(realCallback).join(delim + ' ')\n }\n }\n}\n","import ENGLISH, { Language } from './i18n'\nimport RRule from '../index'\nimport { Options } from '../types'\nimport { WeekdayStr } from '../weekday'\n\n// =============================================================================\n// Parser\n// =============================================================================\n\nclass Parser {\n private readonly rules: { [k: string]: RegExp }\n public text: string\n public symbol: string | null\n public value: RegExpExecArray | null\n private done = true\n\n constructor (rules: { [k: string]: RegExp }) {\n this.rules = rules\n }\n\n start (text: string) {\n this.text = text\n this.done = false\n return this.nextSymbol()\n }\n\n isDone () {\n return this.done && this.symbol === null\n }\n\n nextSymbol () {\n let best: RegExpExecArray | null\n let bestSymbol: string\n const p = this\n\n this.symbol = null\n this.value = null\n do {\n if (this.done) return false\n\n let rule: RegExp\n best = null\n for (let name in this.rules) {\n rule = this.rules[name]\n const match = rule.exec(p.text)\n if (match) {\n if (best === null || match[0].length > best[0].length) {\n best = match\n bestSymbol = name\n }\n }\n }\n\n if (best != null) {\n this.text = this.text.substr(best[0].length)\n\n if (this.text === '') this.done = true\n }\n\n if (best == null) {\n this.done = true\n this.symbol = null\n this.value = null\n return\n }\n // @ts-ignore\n } while (bestSymbol === 'SKIP')\n\n // @ts-ignore\n this.symbol = bestSymbol\n this.value = best\n return true\n }\n\n accept (name: string) {\n if (this.symbol === name) {\n if (this.value) {\n const v = this.value\n this.nextSymbol()\n return v\n }\n\n this.nextSymbol()\n return true\n }\n\n return false\n }\n\n acceptNumber () {\n return this.accept('number') as RegExpExecArray\n }\n\n expect (name: string) {\n if (this.accept(name)) return true\n\n throw new Error('expected ' + name + ' but found ' + this.symbol)\n }\n}\n\nexport default function parseText (text: string, language: Language = ENGLISH) {\n const options: Partial<Options> = {}\n const ttr = new Parser(language.tokens)\n\n if (!ttr.start(text)) return null\n\n S()\n return options\n\n function S () {\n // every [n]\n ttr.expect('every')\n let n = ttr.acceptNumber()\n if (n) options.interval = parseInt(n[0], 10)\n if (ttr.isDone()) throw new Error('Unexpected end')\n\n switch (ttr.symbol) {\n case 'day(s)':\n options.freq = RRule.DAILY\n if (ttr.nextSymbol()) {\n AT()\n F()\n }\n break\n\n // FIXME Note: every 2 weekdays != every two weeks on weekdays.\n // DAILY on weekdays is not a valid rule\n case 'weekday(s)':\n options.freq = RRule.WEEKLY\n options.byweekday = [\n RRule.MO,\n RRule.TU,\n RRule.WE,\n RRule.TH,\n RRule.FR\n ]\n ttr.nextSymbol()\n F()\n break\n\n case 'week(s)':\n options.freq = RRule.WEEKLY\n if (ttr.nextSymbol()) {\n ON()\n F()\n }\n break\n\n case 'hour(s)':\n options.freq = RRule.HOURLY\n if (ttr.nextSymbol()) {\n ON()\n F()\n }\n break\n\n case 'minute(s)':\n options.freq = RRule.MINUTELY\n if (ttr.nextSymbol()) {\n ON()\n F()\n }\n break\n\n case 'month(s)':\n options.freq = RRule.MONTHLY\n if (ttr.nextSymbol()) {\n ON()\n F()\n }\n break\n\n case 'year(s)':\n options.freq = RRule.YEARLY\n if (ttr.nextSymbol()) {\n ON()\n F()\n }\n break\n\n case 'monday':\n case 'tuesday':\n case 'wednesday':\n case 'thursday':\n case 'friday':\n case 'saturday':\n case 'sunday':\n options.freq = RRule.WEEKLY\n const key: WeekdayStr = ttr.symbol.substr(0, 2).toUpperCase() as WeekdayStr\n options.byweekday = [RRule[key]]\n\n if (!ttr.nextSymbol()) return\n\n // TODO check for duplicates\n while (ttr.accept('comma')) {\n if (ttr.isDone()) throw new Error('Unexpected end')\n\n let wkd = decodeWKD() as keyof typeof RRule\n if (!wkd) {\n throw new Error('Unexpected symbol ' + ttr.symbol + ', expected weekday')\n }\n\n // @ts-ignore\n options.byweekday.push(RRule[wkd])\n ttr.nextSymbol()\n }\n MDAYs()\n F()\n break\n\n case 'january':\n case 'february':\n case 'march':\n case 'april':\n case 'may':\n case 'june':\n case 'july':\n case 'august':\n case 'september':\n case 'october':\n case 'november':\n case 'december':\n options.freq = RRule.YEARLY\n options.bymonth = [decodeM() as number]\n\n if (!ttr.nextSymbol()) return\n\n // TODO check for duplicates\n while (ttr.accept('comma')) {\n if (ttr.isDone()) throw new Error('Unexpected end')\n\n let m = decodeM()\n if (!m) {\n throw new Error('Unexpected symbol ' + ttr.symbol + ', expected month')\n }\n\n options.bymonth.push(m)\n ttr.nextSymbol()\n }\n\n ON()\n F()\n break\n\n default:\n throw new Error('Unknown symbol')\n }\n }\n\n function ON () {\n const on = ttr.accept('on')\n const the = ttr.accept('the')\n if (!(on || the)) return\n\n do {\n let nth = decodeNTH()\n let wkd = decodeWKD()\n let m = decodeM()\n\n // nth <weekday> | <weekday>\n if (nth) {\n // ttr.nextSymbol()\n\n if (wkd) {\n ttr.nextSymbol()\n if (!options.byweekday) options.byweekday = []\n // @ts-ignore\n options.byweekday.push(RRule[wkd].nth(nth))\n } else {\n if (!options.bymonthday) options.bymonthday = []\n // @ts-ignore\n options.bymonthday.push(nth)\n ttr.accept('day(s)')\n }\n // <weekday>\n } else if (wkd) {\n ttr.nextSymbol()\n if (!options.byweekday) options.byweekday = []\n\n // @ts-ignore\n options.byweekday.push(RRule[wkd])\n } else if (ttr.symbol === 'weekday(s)') {\n ttr.nextSymbol()\n if (!options.byweekday) {\n options.byweekday = [\n RRule.MO,\n RRule.TU,\n RRule.WE,\n RRule.TH,\n RRule.FR\n ]\n }\n } else if (ttr.symbol === 'week(s)') {\n ttr.nextSymbol()\n let n = ttr.acceptNumber()\n if (!n) {\n throw new Error('Unexpected symbol ' + ttr.symbol + ', expected week number')\n }\n options.byweekno = [parseInt(n[0], 10)]\n while (ttr.accept('comma')) {\n n = ttr.acceptNumber()\n if (!n) {\n throw new Error('Unexpected symbol ' + ttr.symbol + '; expected monthday')\n }\n options.byweekno.push(parseInt(n[0], 10))\n }\n } else if (m) {\n ttr.nextSymbol()\n if (!options.bymonth) options.bymonth = []\n\n // @ts-ignore\n options.bymonth.push(m)\n } else {\n return\n }\n } while (ttr.accept('comma') || ttr.accept('the') || ttr.accept('on'))\n }\n\n function AT () {\n const at = ttr.accept('at')\n if (!at) return\n\n do {\n let n = ttr.acceptNumber()\n if (!n) {\n throw new Error('Unexpected symbol ' + ttr.symbol + ', expected hour')\n }\n options.byhour = [parseInt(n[0], 10)]\n while (ttr.accept('comma')) {\n n = ttr.acceptNumber()\n if (!n) {\n throw new Error('Unexpected symbol ' + ttr.symbol + '; expected hour')\n }\n options.byhour.push(parseInt(n[0], 10))\n }\n } while (ttr.accept('comma') || ttr.accept('at'))\n }\n\n function decodeM () {\n switch (ttr.symbol) {\n case 'january':\n return 1\n case 'february':\n return 2\n case 'march':\n return 3\n case 'april':\n return 4\n case 'may':\n return 5\n case 'june':\n return 6\n case 'july':\n return 7\n case 'august':\n return 8\n case 'september':\n return 9\n case 'october':\n return 10\n case 'november':\n return 11\n case 'december':\n return 12\n default:\n return false\n }\n }\n\n function decodeWKD () {\n switch (ttr.symbol) {\n case 'monday':\n case 'tuesday':\n case 'wednesday':\n case 'thursday':\n case 'friday':\n case 'saturday':\n case 'sunday':\n return ttr.symbol.substr(0, 2).toUpperCase()\n default:\n return false\n }\n }\n\n function decodeNTH () {\n switch (ttr.symbol) {\n case 'last':\n ttr.nextSymbol()\n return -1\n case 'first':\n ttr.nextSymbol()\n return 1\n case 'second':\n ttr.nextSymbol()\n return ttr.accept('last') ? -2 : 2\n case 'third':\n ttr.nextSymbol()\n return ttr.accept('last') ? -3 : 3\n case 'nth':\n const v = parseInt(ttr.value![1], 10)\n if (v < -366 || v > 366) throw new Error('Nth out of range: ' + v)\n\n ttr.nextSymbol()\n return ttr.accept('last') ? -v : v\n\n default:\n return false\n }\n }\n\n function MDAYs () {\n ttr.accept('on')\n ttr.accept('the')\n\n let nth = decodeNTH()\n if (!nth) return\n\n options.bymonthday = [nth]\n ttr.nextSymbol()\n\n while (ttr.accept('comma')) {\n nth = decodeNTH()\n if (!nth) {\n throw new Error('Unexpected symbol ' + ttr.symbol + '; expected monthday')\n }\n\n options.bymonthday.push(nth)\n ttr.nextSymbol()\n }\n }\n\n function F () {\n if (ttr.symbol === 'until') {\n const date = Date.parse(ttr.text)\n\n if (!date) throw new Error('Cannot parse until date:' + ttr.text)\n options.until = new Date(date)\n } else if (ttr.accept('for')) {\n options.count = parseInt(ttr.value![0], 10)\n ttr.expect('number')\n // ttr.expect('times')\n }\n }\n}\n","import { Weekday, WeekdayStr } from './weekday'\n\nexport interface QueryMethods {\n all (): Date[]\n between (after: Date, before: Date, inc: boolean): Date[]\n before (date: Date, inc: boolean): Date\n after (date: Date, inc: boolean): Date\n}\n\nexport type QueryMethodTypes = keyof QueryMethods\nexport type IterResultType<M extends QueryMethodTypes> = M extends 'all' | 'between' ? Date[] : (Date | null)\n\nexport enum Frequency {\n YEARLY = 0,\n MONTHLY = 1,\n WEEKLY = 2,\n DAILY = 3,\n HOURLY = 4,\n MINUTELY = 5,\n SECONDLY = 6\n}\n\nexport function freqIsDailyOrGreater (freq: Frequency): freq is Frequency.YEARLY | Frequency.MONTHLY | Frequency.WEEKLY | Frequency.DAILY {\n return freq < Frequency.HOURLY\n}\n\nexport interface Options {\n freq: Frequency\n dtstart: Date | null\n interval: number\n wkst: Weekday | number | null\n count: number | null\n until: Date | null\n tzid: string | null\n bysetpos: number | number[] | null\n bymonth: number | number[] | null\n bymonthday: number | number[] | null\n bynmonthday: number[] | null\n byyearday: number | number[] | null\n byweekno: number | number[] | null\n byweekday: ByWeekday | ByWeekday[] | null\n bynweekday: number[][] | null\n byhour: number | number[] | null\n byminute: number | number[] | null\n bysecond: number | number[] | null\n byeaster: number | null\n}\n\nexport interface ParsedOptions extends Options {\n dtstart: Date\n wkst: number\n bysetpos: number[]\n bymonth: number[]\n bymonthday: number[]\n bynmonthday: number[]\n byyearday: number[]\n byweekno: number[]\n byweekday: number[]\n byhour: number[]\n byminute: number[]\n bysecond: number[]\n}\n\nexport type ByWeekday = WeekdayStr | number | Weekday\n","import ToText, { DateFormatter, GetText } from './totext'\nimport parseText from './parsetext'\nimport RRule from '../index'\nimport { Frequency } from '../types'\nimport ENGLISH, { Language } from './i18n'\n\n/*!\n* rrule.js - Library for working with recurrence rules for calendar dates.\n* https://github.com/jakubroztocil/rrule\n*\n* Copyright 2010, Jakub Roztocil and Lars Schoning\n* Licenced under the BSD licence.\n* https://github.com/jakubroztocil/rrule/blob/master/LICENCE\n*\n*/\n\n/**\n *\n * Implementation of RRule.fromText() and RRule::toText().\n *\n *\n * On the client side, this file needs to be included\n * when those functions are used.\n *\n */\n\n// =============================================================================\n// fromText\n// =============================================================================\n/**\n * Will be able to convert some of the below described rules from\n * text format to a rule object.\n *\n *\n * RULES\n *\n * Every ([n])\n * day(s)\n * | [weekday], ..., (and) [weekday]\n * | weekday(s)\n * | week(s)\n * | month(s)\n * | [month], ..., (and) [month]\n * | year(s)\n *\n *\n * Plus 0, 1, or multiple of these:\n *\n * on [weekday], ..., (or) [weekday] the [monthday], [monthday], ... (or) [monthday]\n *\n * on [weekday], ..., (and) [weekday]\n *\n * on the [monthday], [monthday], ... (and) [monthday] (day of the month)\n *\n * on the [nth-weekday], ..., (and) [nth-weekday] (of the month/year)\n *\n *\n * Plus 0 or 1 of these:\n *\n * for [n] time(s)\n *\n * until [date]\n *\n * Plus (.)\n *\n *\n * Definitely no supported for parsing:\n *\n * (for year):\n * in week(s) [n], ..., (and) [n]\n *\n * on the [yearday], ..., (and) [n] day of the year\n * on day [yearday], ..., (and) [n]\n *\n *\n * NON-TERMINALS\n *\n * [n]: 1, 2 ..., one, two, three ..\n * [month]: January, February, March, April, May, ... December\n * [weekday]: Monday, ... Sunday\n * [nth-weekday]: first [weekday], 2nd [weekday], ... last [weekday], ...\n * [monthday]: first, 1., 2., 1st, 2nd, second, ... 31st, last day, 2nd last day, ..\n * [date]:\n * [month] (0-31(,) ([year])),\n * (the) 0-31.(1-12.([year])),\n * (the) 0-31/(1-12/([year])),\n * [weekday]\n *\n * [year]: 0000, 0001, ... 01, 02, ..\n *\n * Definitely not supported for parsing:\n *\n * [yearday]: first, 1., 2., 1st, 2nd, second, ... 366th, last day, 2nd last day, ..\n *\n * @param {String} text\n * @return {Object, Boolean} the rule, or null.\n */\nconst fromText = function (text: string, language: Language = ENGLISH) {\n return new RRule(parseText(text, language) || undefined)\n}\n\nconst common = [\n 'count',\n 'until',\n 'interval',\n 'byweekday',\n 'bymonthday',\n 'bymonth'\n]\n\nToText.IMPLEMENTED = []\nToText.IMPLEMENTED[Frequency.HOURLY] = common\nToText.IMPLEMENTED[Frequency.MINUTELY] = common\nToText.IMPLEMENTED[Frequency.DAILY] = ['byhour'].concat(common)\nToText.IMPLEMENTED[Frequency.WEEKLY] = common\nToText.IMPLEMENTED[Frequency.MONTHLY] = common\nToText.IMPLEMENTED[Frequency.YEARLY] = ['byweekno', 'byyearday'].concat(common)\n\n// =============================================================================\n// Export\n// =============================================================================\n\nconst toText = function (rrule: RRule, gettext?: GetText, language?: Language, dateFormatter?: DateFormatter) {\n return new ToText(rrule, gettext, language, dateFormatter).toString()\n}\n\nconst { isFullyConvertible } = ToText\n\nexport interface Nlp {\n fromText: typeof fromText\n parseText: typeof parseText\n isFullyConvertible: typeof isFullyConvertible\n toText: typeof toText\n}\n\nexport { fromText, parseText, isFullyConvertible, toText }\n","import { ParsedOptions, Frequency } from './types'\nimport { pymod, divmod, empty, includes } from './helpers'\nimport { dateutil } from './dateutil'\n\nexport class Time {\n public hour: number\n public minute: number\n public second: number\n public millisecond: number\n\n constructor (\n hour: number,\n minute: number,\n second: number,\n millisecond: number\n ) {\n this.hour = hour\n this.minute = minute\n this.second = second\n this.millisecond = millisecond || 0\n }\n\n getHours () {\n return this.hour\n }\n\n getMinutes () {\n return this.minute\n }\n\n getSeconds () {\n return this.second\n }\n\n getMilliseconds () {\n return this.millisecond\n }\n\n getTime () {\n return (\n (this.hour * 60 * 60 + this.minute * 60 + this.second) * 1000 +\n this.millisecond\n )\n }\n}\n\nexport class DateTime extends Time {\n public day: number\n public month: number\n public year: number\n\n static fromDate (date: Date) {\n return new this(\n date.getUTCFullYear(),\n date.getUTCMonth() + 1,\n date.getUTCDate(),\n date.getUTCHours(),\n date.getUTCMinutes(),\n date.getUTCSeconds(),\n date.valueOf() % 1000\n )\n }\n\n constructor (\n year: number,\n month: number,\n day: number,\n hour: number,\n minute: number,\n second: number,\n millisecond: number\n ) {\n super(hour, minute, second, millisecond)\n this.year = year\n this.month = month\n this.day = day\n }\n\n getWeekday () {\n return dateutil.getWeekday(new Date(this.getTime()))\n }\n\n getTime () {\n return new Date(\n Date.UTC(\n this.year, this.month - 1, this.day, this.hour, this.minute, this.second, this.millisecond\n )\n ).getTime()\n }\n\n getDay () {\n return this.day\n }\n\n getMonth () {\n return this.month\n }\n\n getYear () {\n return this.year\n }\n\n public addYears (years: number) {\n this.year += years\n }\n\n public addMonths (months: number) {\n this.month += months\n if (this.month > 12) {\n const yearDiv = Math.floor(this.month / 12)\n const monthMod = pymod(this.month, 12)\n this.month = monthMod\n this.year += yearDiv\n if (this.month === 0) {\n this.month = 12\n --this.year\n }\n }\n }\n\n public addWeekly (days: number, wkst: number) {\n if (wkst > this.getWeekday()) {\n this.day += -(this.getWeekday() + 1 + (6 - wkst)) + days * 7\n } else {\n this.day += -(this.getWeekday() - wkst) + days * 7\n }\n\n this.fixDay()\n }\n\n public addDaily (days: number) {\n this.day += days\n this.fixDay()\n }\n\n public addHours (hours: number, filtered: boolean, byhour: number[]) {\n if (filtered) {\n // Jump to one iteration before next day\n this.hour += Math.floor((23 - this.hour) / hours) * hours\n }\n\n while (true) {\n this.hour += hours\n const { div: dayDiv, mod: hourMod } = divmod(this.hour, 24)\n if (dayDiv) {\n this.hour = hourMod\n this.addDaily(dayDiv)\n }\n\n if (empty(byhour) || includes(byhour, this.hour)) break\n }\n }\n\n public addMinutes (minutes: number, filtered: boolean, byhour: number[], byminute: number[]) {\n if (filtered) {\n // Jump to one iteration before next day\n this.minute +=\n Math.floor((1439 - (this.hour * 60 + this.minute)) / minutes) * minutes\n }\n\n while (true) {\n this.minute += minutes\n const { div: hourDiv, mod: minuteMod } = divmod(this.minute, 60)\n if (hourDiv) {\n this.minute = minuteMod\n this.addHours(hourDiv, false, byhour)\n }\n\n if (\n (empty(byhour) || includes(byhour, this.hour)) &&\n (empty(byminute) || includes(byminute, this.minute))\n ) {\n break\n }\n }\n }\n\n public addSeconds (seconds: number, filtered: boolean, byhour: number[], byminute: number[], bysecond: number[]) {\n if (filtered) {\n // Jump to one iteration before next day\n this.second +=\n Math.floor(\n (86399 - (this.hour * 3600 + this.minute * 60 + this.second)) / seconds\n ) * seconds\n }\n\n while (true) {\n this.second += seconds\n const { div: minuteDiv, mod: secondMod } = divmod(this.second, 60)\n if (minuteDiv) {\n this.second = secondMod\n this.addMinutes(minuteDiv, false, byhour, byminute)\n }\n\n if (\n (empty(byhour) || includes(byhour, this.hour)) &&\n (empty(byminute) || includes(byminute, this.minute)) &&\n (empty(bysecond) || includes(bysecond, this.second))\n ) {\n break\n }\n }\n }\n\n public fixDay () {\n if (this.day <= 28) {\n return\n }\n\n let daysinmonth = dateutil.monthRange(this.year, this.month - 1)[1]\n if (this.day <= daysinmonth) {\n return\n }\n\n while (this.day > daysinmonth) {\n this.day -= daysinmonth\n ++this.month\n if (this.month === 13) {\n this.month = 1\n ++this.year\n if (this.year > dateutil.MAXYEAR) {\n return\n }\n }\n\n daysinmonth = dateutil.monthRange(this.year, this.month - 1)[1]\n }\n }\n\n public add (options: ParsedOptions, filtered: boolean) {\n const {\n freq,\n interval,\n wkst,\n byhour,\n byminute,\n bysecond\n } = options\n\n switch (freq) {\n case Frequency.YEARLY: return this.addYears(interval)\n case Frequency.MONTHLY: return this.addMonths(interval)\n case Frequency.WEEKLY: return this.addWeekly(interval, wkst)\n case Frequency.DAILY: return this.addDaily(interval)\n case Frequency.HOURLY: return this.addHours(interval, filtered, byhour)\n case Frequency.MINUTELY: return this.addMinutes(interval, filtered, byhour, byminute)\n case Frequency.SECONDLY: return this.addSeconds(interval, filtered, byhour, byminute, bysecond)\n }\n }\n}\n","import { Options, ParsedOptions, freqIsDailyOrGreater } from './types'\nimport { includes, notEmpty, isPresent, isNumber, isArray, isWeekdayStr } from './helpers'\nimport RRule, { defaultKeys, DEFAULT_OPTIONS } from './rrule'\nimport dateutil from './dateutil'\nimport { Weekday } from './weekday'\nimport { Time } from './datetime'\n\nexport function initializeOptions (options: Partial<Options>) {\n const invalid: string[] = []\n const keys = Object.keys(options) as (keyof Options)[]\n\n // Shallow copy for options and origOptions and check for invalid\n for (const key of keys) {\n if (!includes(defaultKeys, key)) invalid.push(key)\n if (dateutil.isDate(options[key]) && !dateutil.isValidDate(options[key])) invalid.push(key)\n }\n\n if (invalid.length) {\n throw new Error('Invalid options: ' + invalid.join(', '))\n }\n\n return { ...options }\n}\n\nexport function parseOptions (options: Partial<Options>) {\n const opts = { ...DEFAULT_OPTIONS, ...initializeOptions(options) }\n\n if (isPresent(opts.byeaster)) opts.freq = RRule.YEARLY\n\n if (!(isPresent(opts.freq) && RRule.FREQUENCIES[opts.freq])) {\n throw new Error(`Invalid frequency: ${opts.freq} ${options.freq}`)\n }\n\n if (!opts.dtstart) opts.dtstart = new Date(new Date().setMilliseconds(0))\n\n if (!isPresent(opts.wkst)) {\n opts.wkst = RRule.MO.weekday\n } else if (isNumber(opts.wkst)) {\n // cool, just keep it like that\n } else {\n opts.wkst = opts.wkst.weekday\n }\n\n if (isPresent(opts.bysetpos)) {\n if (isNumber(opts.bysetpos)) opts.bysetpos = [opts.bysetpos]\n\n for (let i = 0; i < opts.bysetpos.length; i++) {\n const v = opts.bysetpos[i]\n if (v === 0 || !(v >= -366 && v <= 366)) {\n throw new Error(\n 'bysetpos must be between 1 and 366,' + ' or between -366 and -1'\n )\n }\n }\n }\n\n if (\n !(\n Boolean(opts.byweekno as number) ||\n notEmpty(opts.byweekno as number[]) ||\n notEmpty(opts.byyearday as number[]) ||\n Boolean(opts.bymonthday) ||\n notEmpty(opts.bymonthday as number[]) ||\n isPresent(opts.byweekday) ||\n isPresent(opts.byeaster)\n )\n ) {\n switch (opts.freq) {\n case RRule.YEARLY:\n if (!opts.bymonth) opts.bymonth = opts.dtstart.getUTCMonth() + 1\n opts.bymonthday = opts.dtstart.getUTCDate()\n break\n case RRule.MONTHLY:\n opts.bymonthday = opts.dtstart.getUTCDate()\n break\n case RRule.WEEKLY:\n opts.byweekday = [dateutil.getWeekday(opts.dtstart)]\n break\n }\n }\n\n // bymonth\n if (isPresent(opts.bymonth) && !isArray(opts.bymonth)) {\n opts.bymonth = [opts.bymonth]\n }\n\n // byyearday\n if (\n isPresent(opts.byyearday) &&\n !isArray(opts.byyearday) &&\n isNumber(opts.byyearday)\n ) {\n opts.byyearday = [opts.byyearday]\n }\n\n // bymonthday\n if (!isPresent(opts.bymonthday)) {\n opts.bymonthday = []\n opts.bynmonthday = []\n } else if (isArray(opts.bymonthday)) {\n const bymonthday = []\n const bynmonthday = []\n\n for (let i = 0; i < opts.bymonthday.length; i++) {\n const v = opts.bymonthday[i]\n if (v > 0) {\n bymonthday.push(v)\n } else if (v < 0) {\n bynmonthday.push(v)\n }\n }\n opts.bymonthday = bymonthday\n opts.bynmonthday = bynmonthday\n } else if (opts.bymonthday < 0) {\n opts.bynmonthday = [opts.bymonthday]\n opts.bymonthday = []\n } else {\n opts.bynmonthday = []\n opts.bymonthday = [opts.bymonthday]\n }\n\n // byweekno\n if (isPresent(opts.byweekno) && !isArray(opts.byweekno)) {\n opts.byweekno = [opts.byweekno]\n }\n\n // byweekday / bynweekday\n if (!isPresent(opts.byweekday)) {\n opts.bynweekday = null\n } else if (isNumber(opts.byweekday)) {\n opts.byweekday = [opts.byweekday]\n opts.bynweekday = null\n } else if (isWeekdayStr(opts.byweekday)) {\n opts.byweekday = [Weekday.fromStr(opts.byweekday).weekday]\n opts.bynweekday = null\n } else if (opts.byweekday instanceof Weekday) {\n if (!opts.byweekday.n || opts.freq > RRule.MONTHLY) {\n opts.byweekday = [opts.byweekday.weekday]\n opts.bynweekday = null\n } else {\n opts.bynweekday = [[opts.byweekday.weekday, opts.byweekday.n]]\n opts.byweekday = null\n }\n } else {\n const byweekday: number[] = []\n const bynweekday = []\n\n for (let i = 0; i < opts.byweekday.length; i++) {\n const wday = opts.byweekday[i]\n\n if (isNumber(wday)) {\n byweekday.push(wday)\n continue\n } else if (isWeekdayStr(wday)) {\n byweekday.push(Weekday.fromStr(wday).weekday)\n continue\n }\n\n if (!wday.n || opts.freq > RRule.MONTHLY) {\n byweekday.push(wday.weekday)\n } else {\n bynweekday.push([wday.weekday, wday.n])\n }\n }\n opts.byweekday = notEmpty(byweekday) ? byweekday : null\n opts.bynweekday = notEmpty(bynweekday) ? bynweekday : null\n }\n\n // byhour\n if (!isPresent(opts.byhour)) {\n opts.byhour =\n opts.freq < RRule.HOURLY ? [opts.dtstart.getUTCHours()] : null\n } else if (isNumber(opts.byhour)) {\n opts.byhour = [opts.byhour]\n }\n\n // byminute\n if (!isPresent(opts.byminute)) {\n opts.byminute =\n opts.freq < RRule.MINUTELY ? [opts.dtstart.getUTCMinutes()] : null\n } else if (isNumber(opts.byminute)) {\n opts.byminute = [opts.byminute]\n }\n\n // bysecond\n if (!isPresent(opts.bysecond)) {\n opts.bysecond =\n opts.freq < RRule.SECONDLY ? [opts.dtstart.getUTCSeconds()] : null\n } else if (isNumber(opts.bysecond)) {\n opts.bysecond = [opts.bysecond]\n }\n\n return { parsedOptions: opts as ParsedOptions }\n}\n\nexport function buildTimeset (opts: ParsedOptions) {\n const millisecondModulo = opts.dtstart.getTime() % 1000\n if (!freqIsDailyOrGreater(opts.freq)) {\n return []\n }\n\n const timeset: Time[] = []\n opts.byhour.forEach(hour => {\n opts.byminute.forEach(minute => {\n opts.bysecond.forEach(second => {\n timeset.push(new Time(hour, minute, second, millisecondModulo))\n })\n })\n })\n\n return timeset\n}\n","import { Options, Frequency } from './types'\nimport { Weekday } from './weekday'\nimport dateutil from './dateutil'\nimport { Days } from './rrule'\n\nexport function parseString (rfcString: string): Partial<Options> {\n const options = rfcString.split('\\n').map(parseLine).filter(x => x !== null)\n return { ...options[0], ...options[1] }\n}\n\nexport function parseDtstart (line: string) {\n const options: Partial<Options> = {}\n\n const dtstartWithZone = /DTSTART(?:;TZID=([^:=]+?))?(?::|=)([^;\\s]+)/i.exec(line)\n\n if (!dtstartWithZone) {\n return options\n }\n\n const [ _, tzid, dtstart ] = dtstartWithZone\n\n if (tzid) {\n options.tzid = tzid\n }\n options.dtstart = dateutil.untilStringToDate(dtstart)\n return options\n}\n\nfunction parseLine (rfcString: string) {\n rfcString = rfcString.replace(/^\\s+|\\s+$/, '')\n if (!rfcString.length) return null\n\n const header = /^([A-Z]+?)[:;]/.exec(rfcString.toUpperCase())\n if (!header) {\n return parseRrule(rfcString)\n }\n\n const [ _, key ] = header\n switch (key.toUpperCase()) {\n case 'RRULE':\n case 'EXRULE':\n return parseRrule(rfcString)\n case 'DTSTART':\n return parseDtstart(rfcString)\n default:\n throw new Error(`Unsupported RFC prop ${key} in ${rfcString}`)\n }\n}\n\nfunction parseRrule (line: string) {\n const strippedLine = line.replace(/^RRULE:/i, '')\n const options = parseDtstart(strippedLine)\n\n const attrs = line.replace(/^(?:RRULE|EXRULE):/i, '').split(';')\n\n attrs.forEach(attr => {\n const [ key, value ] = attr.split('=')\n switch (key.toUpperCase()) {\n case 'FREQ':\n options.freq = Frequency[value.toUpperCase() as keyof typeof Frequency]\n break\n case 'WKST':\n options.wkst = Days[value.toUpperCase() as keyof typeof Days]\n break\n case 'COUNT':\n case 'INTERVAL':\n case 'BYSETPOS':\n case 'BYMONTH':\n case 'BYMONTHDAY':\n case 'BYYEARDAY':\n case 'BYWEEKNO':\n case 'BYHOUR':\n case 'BYMINUTE':\n case 'BYSECOND':\n const num = parseNumber(value)\n const optionKey = key.toLowerCase()\n // @ts-ignore\n options[optionKey] = num\n break\n case 'BYWEEKDAY':\n case 'BYDAY':\n options.byweekday = parseWeekday(value)\n break\n case 'DTSTART':\n case 'TZID':\n // for backwards compatibility\n const dtstart = parseDtstart(line)\n options.tzid = dtstart.tzid\n options.dtstart = dtstart.dtstart\n break\n case 'UNTIL':\n options.until = dateutil.untilStringToDate(value)\n break\n case 'BYEASTER':\n options.byeaster = Number(value)\n break\n default:\n throw new Error(\"Unknown RRULE property '\" + key + \"'\")\n }\n })\n\n return options\n}\n\nfunction parseNumber (value: string) {\n if (value.indexOf(',') !== -1) {\n const values = value.split(',')\n return values.map(parseIndividualNumber)\n }\n\n return parseIndividualNumber(value)\n}\n\nfunction parseIndividualNumber (value: string) {\n if (/^[+-]?\\d+$/.test(value)) {\n return Number(value)\n }\n\n return value\n}\n\nfunction parseWeekday (value: string) {\n const days = value.split(',')\n\n return days.map(day => {\n if (day.length === 2) {\n // MO, TU, ...\n return Days[day as keyof typeof Days] // wday instanceof Weekday\n }\n\n // -1MO, +3FR, 1SO, 13TU ...\n const parts = day.match(/^([+-]?\\d{1,2})([A-Z]{2})$/)!\n const n = Number(parts[1])\n const wdaypart = parts[2] as keyof typeof Days\n const wday = Days[wdaypart].weekday\n return new Weekday(wday, n)\n })\n}\n","export const DateTime = {\n fromJSDate () {\n throw new TypeError()\n }\n}\n","import dateutil from './dateutil'\nimport { DateTime } from 'luxon'\n\nexport class DateWithZone {\n public date: Date\n public tzid?: string | null\n\n constructor (date: Date, tzid?: string | null) {\n this.date = date\n this.tzid = tzid\n }\n\n private get isUTC () {\n return !this.tzid || this.tzid.toUpperCase() === 'UTC'\n }\n\n public toString () {\n const datestr = dateutil.timeToUntilString(this.date.getTime(), this.isUTC)\n if (!this.isUTC) {\n return `;TZID=${this.tzid}:${datestr}`\n }\n\n return `:${datestr}`\n }\n\n public getTime () {\n return this.date.getTime()\n }\n\n public rezonedDate () {\n if (this.isUTC) {\n return this.date\n }\n\n try {\n const datetime = DateTime\n .fromJSDate(this.date)\n\n const rezoned = datetime.setZone(this.tzid!, { keepLocalTime: true })\n\n return rezoned.toJSDate()\n } catch (e) {\n if (e instanceof TypeError) {\n console.error('Using TZID without Luxon available is unsupported. Returned times are in UTC, not the requested time zone')\n }\n return this.date\n }\n }\n}\n","import { Options } from './types'\nimport RRule, { DEFAULT_OPTIONS } from './rrule'\nimport { includes, isPresent, isArray, isNumber, toArray } from './helpers'\nimport { Weekday } from './weekday'\nimport dateutil from './dateutil'\nimport { DateWithZone } from './datewithzone'\n\nexport function optionsToString (options: Partial<Options>) {\n let rrule: string[][] = []\n let dtstart: string = ''\n const keys: (keyof Options)[] = Object.keys(options) as (keyof Options)[]\n const defaultKeys = Object.keys(DEFAULT_OPTIONS)\n\n for (let i = 0; i < keys.length; i++) {\n if (keys[i] === 'tzid') continue\n if (!includes(defaultKeys, keys[i])) continue\n\n let key = keys[i].toUpperCase()\n const value: any = options[keys[i]]\n let outValue: string = ''\n\n if (!isPresent(value) || (isArray(value) && !value.length)) continue\n\n switch (key) {\n case 'FREQ':\n outValue = RRule.FREQUENCIES[options.freq!]\n break\n case 'WKST':\n if (isNumber(value)) {\n outValue = new Weekday(value).toString()\n } else {\n outValue = value.toString()\n }\n break\n case 'BYWEEKDAY':\n /*\n NOTE: BYWEEKDAY is a special case.\n RRule() deconstructs the rule.options.byweekday array\n into an array of Weekday arguments.\n On the other hand, rule.origOptions is an array of Weekdays.\n We need to handle both cases here.\n It might be worth change RRule to keep the Weekdays.\n\n Also, BYWEEKDAY (used by RRule) vs. BYDAY (RFC)\n\n */\n key = 'BYDAY'\n outValue = toArray<Weekday | number[] | number>(value).map(wday => {\n if (wday instanceof Weekday) {\n return wday\n }\n\n if (isArray(wday)) {\n return new Weekday(wday[0], wday[1])\n }\n\n return new Weekday(wday)\n }).toString()\n\n break\n case 'DTSTART':\n dtstart = buildDtstart(value, options.tzid)\n break\n\n case 'UNTIL':\n outValue = dateutil.timeToUntilString(value, !options.tzid)\n break\n\n default:\n if (isArray(value)) {\n const strValues: string[] = []\n for (let j = 0; j < value.length; j++) {\n strValues[j] = String(value[j])\n }\n outValue = strValues.toString()\n } else {\n outValue = String(value)\n }\n }\n\n if (outValue) {\n rrule.push([key, outValue])\n }\n }\n\n const rules = rrule.map(([key, value]) => `${key}=${value.toString()}`).join(';')\n let ruleString = ''\n if (rules !== '') {\n ruleString = `RRULE:${rules}`\n }\n\n return [ dtstart, ruleString ].filter(x => !!x).join('\\n')\n}\n\nfunction buildDtstart (dtstart?: number, tzid?: string | null) {\n if (!dtstart) {\n return ''\n }\n\n return 'DTSTART' + new DateWithZone(new Date(dtstart), tzid).toString()\n}\n","import IterResult, { IterArgs } from './iterresult'\nimport dateutil from './dateutil'\nimport { isArray } from './helpers'\n\nexport type CacheKeys = 'before' | 'after' | 'between'\n\nexport class Cache {\n all: Date[] | Partial<IterArgs> | false = false\n before: IterArgs[] = []\n after: IterArgs[] = []\n between: IterArgs[] = []\n\n /**\n * @param {String} what - all/before/after/between\n * @param {Array,Date} value - an array of dates, one date, or null\n * @param {Object?} args - _iter arguments\n */\n public _cacheAdd (\n what: CacheKeys | 'all',\n value: Date[] | Date | null,\n args?: Partial<IterArgs>\n ) {\n if (value) {\n value =\n value instanceof Date\n ? dateutil.clone(value)\n : dateutil.cloneDates(value)\n }\n\n if (what === 'all') {\n this.all = value as Date[]\n } else {\n args!._value = value\n this[what].push(args as IterArgs)\n }\n }\n\n /**\n * @return false - not in the cache\n * null - cached, but zero occurrences (before/after)\n * Date - cached (before/after)\n * [] - cached, but zero occurrences (all/between)\n * [Date1, DateN] - cached (all/between)\n */\n public _cacheGet (\n what: CacheKeys | 'all',\n args?: Partial<IterArgs>\n ): Date | Date[] | false | null {\n let cached: Date | Date[] | false | null = false\n const argsKeys = args ? (Object.keys(args) as (keyof IterArgs)[]) : []\n const findCacheDiff = function (item: IterArgs) {\n for (let i = 0; i < argsKeys.length; i++) {\n const key = argsKeys[i]\n if (String(args![key]) !== String(item[key])) {\n return true\n }\n }\n return false\n }\n\n const cachedObject = this[what]\n if (what === 'all') {\n cached = this.all as Date[]\n } else if (isArray(cachedObject)) {\n // Let's see whether we've already called the\n // 'what' method with the same 'args'\n for (let i = 0; i < cachedObject.length; i++) {\n const item = cachedObject[i] as IterArgs\n if (argsKeys.length && findCacheDiff(item)) continue\n cached = item._value\n break\n }\n }\n\n if (!cached && this.all) {\n // Not in the cache, but we already know all the occurrences,\n // so we can find the correct dates from the cached ones.\n const iterResult = new IterResult(what, args!)\n for (let i = 0; i < (this.all as Date[]).length; i++) {\n if (!iterResult.accept((this.all as Date[])[i])) break\n }\n cached = iterResult.getValue() as Date\n this._cacheAdd(what, cached, args)\n }\n\n return isArray(cached)\n ? dateutil.cloneDates(cached)\n : cached instanceof Date\n ? dateutil.clone(cached)\n : cached\n }\n\n}\n","import { range, repeat, clone } from './helpers'\n\n// =============================================================================\n// Date masks\n// =============================================================================\n\n// Every mask is 7 days longer to handle cross-year weekly periods.\n\nconst M365MASK = [\n ...repeat(1, 31),\n ...repeat(2, 28),\n ...repeat(3, 31),\n ...repeat(4, 30),\n ...repeat(5, 31),\n ...repeat(6, 30),\n ...repeat(7, 31),\n ...repeat(8, 31),\n ...repeat(9, 30),\n ...repeat(10, 31),\n ...repeat(11, 30),\n ...repeat(12, 31),\n ...repeat(1, 7)\n]\n\nconst M366MASK = [\n ...repeat(1, 31),\n ...repeat(2, 29),\n ...repeat(3, 31),\n ...repeat(4, 30),\n ...repeat(5, 31),\n ...repeat(6, 30),\n ...repeat(7, 31),\n ...repeat(8, 31),\n ...repeat(9, 30),\n ...repeat(10, 31),\n ...repeat(11, 30),\n ...repeat(12, 31),\n ...repeat(1, 7)\n]\n\nconst M28 = range(1, 29)\nconst M29 = range(1, 30)\nconst M30 = range(1, 31)\nconst M31 = range(1, 32)\n\nconst MDAY366MASK = [\n ...M31,\n ...M29,\n ...M31,\n ...M30,\n ...M31,\n ...M30,\n ...M31,\n ...M31,\n ...M30,\n ...M31,\n ...M30,\n ...M31,\n ...M31.slice(0, 7)\n]\n\nconst MDAY365MASK = [\n ...M31,\n ...M28,\n ...M31,\n ...M30,\n ...M31,\n ...M30,\n ...M31,\n ...M31,\n ...M30,\n ...M31,\n ...M30,\n ...M31,\n ...M31.slice(0, 7)\n]\n\nconst NM28 = range(-28, 0)\nconst NM29 = range(-29, 0)\nconst NM30 = range(-30, 0)\nconst NM31 = range(-31, 0)\n\nconst NMDAY366MASK = [\n ...NM31,\n ...NM29,\n ...NM31,\n ...NM30,\n ...NM31,\n ...NM30,\n ...NM31,\n ...NM31,\n ...NM30,\n ...NM31,\n ...NM30,\n ...NM31,\n ...NM31.slice(0, 7)\n]\n\nconst NMDAY365MASK = [\n ...NM31,\n ...NM28,\n ...NM31,\n ...NM30,\n ...NM31,\n ...NM30,\n ...NM31,\n ...NM31,\n ...NM30,\n ...NM31,\n ...NM30,\n ...NM31,\n ...NM31.slice(0, 7)\n]\n\nconst M366RANGE = [0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335, 366]\nconst M365RANGE = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365]\n\nconst WDAYMASK = (function () {\n let wdaymask: number[] = []\n for (let i = 0; i < 55; i++) wdaymask = wdaymask.concat(range(7))\n return wdaymask\n})()\n\nexport {\n WDAYMASK,\n M365MASK,\n M365RANGE,\n M366MASK,\n M366RANGE,\n MDAY365MASK,\n MDAY366MASK,\n NMDAY365MASK,\n NMDAY366MASK\n}\n","import { ParsedOptions } from '../types'\nimport dateutil from '../dateutil'\nimport { empty, repeat, pymod, includes } from '../helpers'\nimport { M365MASK, MDAY365MASK, NMDAY365MASK, WDAYMASK, M365RANGE, M366MASK, MDAY366MASK, NMDAY366MASK, M366RANGE } from '../masks'\n\nexport interface YearInfo {\n yearlen: 365 | 366\n nextyearlen: 365 | 366\n yearordinal: number\n yearweekday: number\n mmask: number[]\n mrange: number[]\n mdaymask: number[]\n nmdaymask: number[]\n wdaymask: number[]\n wnomask: number[] | null\n}\n\nexport function rebuildYear (year: number, options: ParsedOptions) {\n const firstyday = new Date(Date.UTC(year, 0, 1))\n\n const yearlen = dateutil.isLeapYear(year) ? 366 : 365\n const nextyearlen = dateutil.isLeapYear(year + 1) ? 366 : 365\n const yearordinal = dateutil.toOrdinal(firstyday)\n const yearweekday = dateutil.getWeekday(firstyday)\n\n const result: YearInfo = {\n yearlen,\n nextyearlen,\n yearordinal,\n yearweekday,\n ...baseYearMasks(year),\n wnomask: null\n }\n\n if (empty(options.byweekno)) {\n return result\n }\n\n result.wnomask = repeat(0, yearlen + 7) as number[]\n let firstwkst: number\n let wyearlen: number\n let no1wkst = firstwkst = pymod(7 - yearweekday + options.wkst, 7)\n\n if (no1wkst >= 4) {\n no1wkst = 0\n // Number of days in the year, plus the days we got\n // from last year.\n wyearlen =\n result.yearlen + pymod(yearweekday - options.wkst, 7)\n } else {\n // Number of days in the year, minus the days we\n // left in last year.\n wyearlen = yearlen - no1wkst\n }\n\n const div = Math.floor(wyearlen / 7)\n const mod = pymod(wyearlen, 7)\n const numweeks = Math.floor(div + mod / 4)\n\n for (let j = 0; j < options.byweekno.length; j++) {\n let n = options.byweekno[j]\n if (n < 0) {\n n += numweeks + 1\n }\n if (!(n > 0 && n <= numweeks)) {\n continue\n }\n\n let i: number\n if (n > 1) {\n i = no1wkst + (n - 1) * 7\n if (no1wkst !== firstwkst) {\n i -= 7 - firstwkst\n }\n } else {\n i = no1wkst\n }\n\n for (let k = 0; k < 7; k++) {\n result.wnomask[i] = 1\n i++\n if (result.wdaymask[i] === options.wkst) break\n }\n }\n\n if (includes(options.byweekno, 1)) {\n // Check week number 1 of next year as well\n // orig-TODO : Check -numweeks for next year.\n let i = no1wkst + numweeks * 7\n if (no1wkst !== firstwkst) i -= 7 - firstwkst\n if (i < yearlen) {\n // If week starts in next year, we\n // don't care about it.\n for (let j = 0; j < 7; j++) {\n result.wnomask[i] = 1\n i += 1\n if (result.wdaymask[i] === options.wkst) break\n }\n }\n }\n\n if (no1wkst) {\n // Check last week number of last year as\n // well. If no1wkst is 0, either the year\n // started on week start, or week number 1\n // got days from last year, so there are no\n // days from last year's last week number in\n // this year.\n let lnumweeks: number\n if (!includes(options.byweekno, -1)) {\n const lyearweekday = dateutil.getWeekday(\n new Date(Date.UTC(year - 1, 0, 1))\n )\n\n let lno1wkst = pymod(\n 7 - lyearweekday.valueOf() + options.wkst,\n 7\n )\n\n const lyearlen = dateutil.isLeapYear(year - 1) ? 366 : 365\n let weekst: number\n if (lno1wkst >= 4) {\n lno1wkst = 0\n weekst = lyearlen + pymod(lyearweekday - options.wkst, 7)\n } else {\n weekst = yearlen - no1wkst\n }\n\n lnumweeks = Math.floor(52 + pymod(weekst, 7) / 4)\n } else {\n lnumweeks = -1\n }\n\n if (includes(options.byweekno, lnumweeks)) {\n for (let i = 0; i < no1wkst; i++) result.wnomask[i] = 1\n }\n }\n\n return result\n}\n\nfunction baseYearMasks (year: number) {\n const yearlen = dateutil.isLeapYear(year) ? 366 : 365\n const firstyday = new Date(Date.UTC(year, 0, 1))\n const wday = dateutil.getWeekday(firstyday)\n\n if (yearlen === 365) {\n return {\n mmask: M365MASK as number[],\n mdaymask: MDAY365MASK,\n nmdaymask: NMDAY365MASK,\n wdaymask: WDAYMASK.slice(wday),\n mrange: M365RANGE\n }\n }\n\n return {\n mmask: M366MASK as number[],\n mdaymask: MDAY366MASK,\n nmdaymask: NMDAY366MASK,\n wdaymask: WDAYMASK.slice(wday),\n mrange: M366RANGE\n }\n}\n","import { ParsedOptions } from '../types'\nimport RRule from '../rrule'\nimport { empty, repeat, pymod } from '../helpers'\n\nexport interface MonthInfo {\n lastyear: number\n lastmonth: number\n nwdaymask: number[]\n}\n\nexport function rebuildMonth (\n year: number,\n month: number,\n yearlen: number,\n mrange: number[],\n wdaymask: number[],\n options: ParsedOptions\n) {\n const result: MonthInfo = {\n lastyear: year,\n lastmonth: month,\n nwdaymask: []\n }\n\n let ranges: number[][] = []\n if (options.freq === RRule.YEARLY) {\n if (empty(options.bymonth)) {\n ranges = [[0, yearlen]]\n } else {\n for (let j = 0; j < options.bymonth.length; j++) {\n month = options.bymonth[j]\n ranges.push(mrange.slice(month - 1, month + 1))\n }\n }\n } else if (options.freq === RRule.MONTHLY) {\n ranges = [mrange.slice(month - 1, month + 1)]\n }\n\n if (empty(ranges)) {\n return result\n }\n\n // Weekly frequency won't get here, so we may not\n // care about cross-year weekly periods.\n result.nwdaymask = repeat(0, yearlen) as number[]\n\n for (let j = 0; j < ranges.length; j++) {\n const rang = ranges[j]\n const first = rang[0]\n const last = rang[1] - 1\n\n for (let k = 0; k < options.bynweekday!.length; k++) {\n let i\n const [ wday, n ] = options.bynweekday![k]\n if (n < 0) {\n i = last + (n + 1) * 7\n i -= pymod(wdaymask[i] - wday, 7)\n } else {\n i = first + (n - 1) * 7\n i += pymod(7 - wdaymask[i] + wday, 7)\n }\n if (first <= i && i <= last) result.nwdaymask[i] = 1\n }\n }\n\n return result\n}\n","export function easter (y: number, offset: number = 0) {\n const a = y % 19\n const b = Math.floor(y / 100)\n const c = y % 100\n const d = Math.floor(b / 4)\n const e = b % 4\n const f = Math.floor((b + 8) / 25)\n const g = Math.floor((b - f + 1) / 3)\n const h = Math.floor(19 * a + b - d - g + 15) % 30\n const i = Math.floor(c / 4)\n const k = c % 4\n const l = Math.floor(32 + 2 * e + 2 * i - h - k) % 7\n const m = Math.floor((a + 11 * h + 22 * l) / 451)\n const month = Math.floor((h + l - 7 * m + 114) / 31)\n const day = ((h + l - 7 * m + 114) % 31) + 1\n const date = Date.UTC(y, month - 1, day + offset)\n const yearStart = Date.UTC(y, 0, 1)\n\n return [Math.ceil((date - yearStart) / (1000 * 60 * 60 * 24))]\n}\n","import dateutil from '../dateutil'\nimport {\n notEmpty,\n repeat,\n range,\n isPresent\n} from '../helpers'\nimport { ParsedOptions, Frequency } from '../types'\nimport { YearInfo, rebuildYear } from './yearinfo'\nimport { rebuildMonth, MonthInfo } from './monthinfo'\nimport { easter } from './easter'\nimport { Time } from '../datetime'\n\nexport type DaySet = [(number | null)[], number, number]\nexport type GetDayset = () => DaySet\n\n// =============================================================================\n// Iterinfo\n// =============================================================================\n\nexport default class Iterinfo {\n public yearinfo: YearInfo\n public monthinfo: MonthInfo\n public eastermask: number[] | null\n\n constructor (private options: ParsedOptions) {}\n\n rebuild (year: number, month: number) {\n const options = this.options\n\n if (year !== this.lastyear) {\n this.yearinfo = rebuildYear(year, options)\n }\n\n if (\n notEmpty(options.bynweekday!) &&\n (month !== this.lastmonth || year !== this.lastyear)\n ) {\n const { yearlen, mrange, wdaymask } = this.yearinfo\n this.monthinfo = rebuildMonth(\n year, month, yearlen, mrange, wdaymask, options\n )\n }\n\n if (isPresent(options.byeaster)) {\n this.eastermask = easter(year, options.byeaster)\n }\n }\n\n get lastyear () {\n return this.monthinfo ? this.monthinfo.lastyear : null\n }\n\n get lastmonth () {\n return this.monthinfo ? this.monthinfo.lastmonth : null\n }\n\n get yearlen () {\n return this.yearinfo.yearlen\n }\n\n get yearordinal () {\n return this.yearinfo.yearordinal\n }\n\n get mrange () {\n return this.yearinfo.mrange\n }\n\n get wdaymask () {\n return this.yearinfo.wdaymask\n }\n\n get mmask () {\n return this.yearinfo.mmask\n }\n\n get wnomask () {\n return this.yearinfo.wnomask\n }\n\n get nwdaymask () {\n return this.monthinfo ? this.monthinfo.nwdaymask : []\n }\n\n get nextyearlen () {\n return this.yearinfo.nextyearlen\n }\n\n get mdaymask () {\n return this.yearinfo.mdaymask\n }\n\n get nmdaymask () {\n return this.yearinfo.nmdaymask\n }\n\n ydayset () {\n return [range(this.yearlen), 0, this.yearlen]\n }\n\n mdayset (_: any, month: number, __: any) {\n const start = this.mrange[month - 1]\n const end = this.mrange[month]\n const set = repeat<number | null>(null, this.yearlen)\n for (let i = start; i < end; i++) set[i] = i\n return [set, start, end]\n }\n\n wdayset (year: number, month: number, day: number) {\n // We need to handle cross-year weeks here.\n const set = repeat<number | null>(null, this.yearlen + 7)\n let i =\n dateutil.toOrdinal(new Date(Date.UTC(year, month - 1, day))) -\n this.yearordinal\n const start = i\n for (let j = 0; j < 7; j++) {\n set[i] = i\n ++i\n if (this.wdaymask[i] === this.options.wkst) break\n }\n return [set, start, i]\n }\n\n ddayset (year: number, month: number, day: number) {\n const set = repeat(null, this.yearlen) as (number | null)[]\n const i =\n dateutil.toOrdinal(new Date(Date.UTC(year, month - 1, day))) -\n this.yearordinal\n set[i] = i\n return [set, i, i + 1]\n }\n\n htimeset (hour: number, _: number, second: number, millisecond: number) {\n let set: Time[] = []\n this.options.byminute.forEach(minute => {\n set = set.concat(this.mtimeset(hour, minute, second, millisecond))\n })\n dateutil.sort(set)\n return set\n }\n\n mtimeset (hour: number, minute: number, _: number, millisecond: number) {\n const set = this.options.bysecond.map(second =>\n new Time(hour, minute, second, millisecond)\n )\n\n dateutil.sort(set)\n return set\n }\n\n stimeset (hour: number, minute: number, second: number, millisecond: number) {\n return [new Time(hour, minute, second, millisecond)]\n }\n\n getdayset (freq: Frequency): (y: number, m: number, d: number) => DaySet {\n switch (freq) {\n case Frequency.YEARLY: return this.ydayset.bind(this)\n case Frequency.MONTHLY: return this.mdayset.bind(this)\n case Frequency.WEEKLY: return this.wdayset.bind(this)\n case Frequency.DAILY: return this.ddayset.bind(this)\n default: return this.ddayset.bind(this)\n }\n }\n\n gettimeset (freq: Frequency.HOURLY | Frequency.MINUTELY | Frequency.SECONDLY): (h: number, m: number, s: number, ms: number) => Time[] {\n switch (freq) {\n case Frequency.HOURLY: return this.htimeset.bind(this)\n case Frequency.MINUTELY: return this.mtimeset.bind(this)\n case Frequency.SECONDLY: return this.stimeset.bind(this)\n }\n }\n}\n","import dateutil from '../dateutil'\nimport Iterinfo from '../iterinfo/index'\nimport { pymod, isPresent, includes } from '../helpers'\nimport { Time } from '../datetime'\n\nexport function buildPoslist (bysetpos: number[], timeset: Time[], start: number, end: number, ii: Iterinfo, dayset: (number | null)[]) {\n const poslist: Date[] = []\n\n for (let j = 0; j < bysetpos.length; j++) {\n let daypos: number\n let timepos: number\n const pos = bysetpos[j]\n\n if (pos < 0) {\n daypos = Math.floor(pos / timeset.length)\n timepos = pymod(pos, timeset.length)\n } else {\n daypos = Math.floor((pos - 1) / timeset.length)\n timepos = pymod(pos - 1, timeset.length)\n }\n\n const tmp = []\n for (let k = start; k < end; k++) {\n const val = dayset[k]\n if (!isPresent(val)) continue\n tmp.push(val)\n }\n let i: number\n if (daypos < 0) {\n i = tmp.slice(daypos)[0]\n } else {\n i = tmp[daypos]\n }\n\n const time = timeset[timepos]\n const date = dateutil.fromOrdinal(ii.yearordinal + i)\n const res = dateutil.combine(date, time)\n // XXX: can this ever be in the array?\n // - compare the actual date instead?\n if (!includes(poslist, res)) poslist.push(res)\n }\n\n dateutil.sort(poslist)\n\n return poslist\n}\n","import IterResult from '../iterresult'\nimport { ParsedOptions, freqIsDailyOrGreater, QueryMethodTypes } from '../types'\nimport dateutil from '../dateutil'\nimport Iterinfo from '../iterinfo/index'\nimport RRule from '../rrule'\nimport { buildTimeset } from '../parseoptions'\nimport { notEmpty, includes, isPresent } from '../helpers'\nimport { DateWithZone } from '../datewithzone'\nimport { buildPoslist } from './poslist'\nimport { Time, DateTime } from '../datetime'\n\nexport function iter <M extends QueryMethodTypes> (iterResult: IterResult<M>, options: ParsedOptions) {\n const {\n dtstart,\n freq,\n interval,\n until,\n bysetpos\n } = options\n\n let count = options.count\n if (count === 0 || interval === 0) {\n return emitResult(iterResult)\n }\n\n let counterDate = DateTime.fromDate(dtstart)\n\n const ii = new Iterinfo(options)\n ii.rebuild(counterDate.year, counterDate.month)\n\n let timeset = makeTimeset(ii, counterDate, options)\n\n while (true) {\n let [dayset, start, end] = ii.getdayset(freq)(\n counterDate.year,\n counterDate.month,\n counterDate.day\n )\n\n let filtered = removeFilteredDays(dayset, start, end, ii, options)\n\n if (notEmpty(bysetpos)) {\n const poslist = buildPoslist(bysetpos, timeset!, start, end, ii, dayset)\n\n for (let j = 0; j < poslist.length; j++) {\n const res = poslist[j]\n if (until && res > until) {\n return emitResult(iterResult)\n }\n\n if (res >= dtstart) {\n const rezonedDate = rezoneIfNeeded(res, options)\n if (!iterResult.accept(rezonedDate)) {\n return emitResult(iterResult)\n }\n\n if (count) {\n --count\n if (!count) {\n return emitResult(iterResult)\n }\n }\n }\n }\n } else {\n for (let j = start; j < end; j++) {\n const currentDay = dayset[j]\n if (!isPresent(currentDay)) {\n continue\n }\n\n const date = dateutil.fromOrdinal(ii.yearordinal + currentDay)\n for (let k = 0; k < timeset!.length; k++) {\n const time = timeset![k]\n const res = dateutil.combine(date, time)\n if (until && res > until) {\n return emitResult(iterResult)\n }\n\n if (res >= dtstart) {\n const rezonedDate = rezoneIfNeeded(res, options)\n if (!iterResult.accept(rezonedDate)) {\n return emitResult(iterResult)\n }\n\n if (count) {\n --count\n if (!count) {\n return emitResult(iterResult)\n }\n }\n }\n }\n }\n }\n if (options.interval === 0) {\n return emitResult(iterResult)\n }\n\n // Handle frequency and interval\n counterDate.add(options, filtered)\n\n if (counterDate.year > dateutil.MAXYEAR) {\n return emitResult(iterResult)\n }\n\n if (!freqIsDailyOrGreater(freq)) {\n timeset = ii.gettimeset(freq)(counterDate.hour, counterDate.minute, counterDate.second, 0)\n }\n\n ii.rebuild(counterDate.year, counterDate.month)\n }\n}\n\nfunction isFiltered (\n ii: Iterinfo,\n currentDay: number,\n options: ParsedOptions\n): boolean {\n const {\n bymonth,\n byweekno,\n byweekday,\n byeaster,\n bymonthday,\n bynmonthday,\n byyearday\n } = options\n\n return (\n (notEmpty(bymonth) && !includes(bymonth, ii.mmask[currentDay])) ||\n (notEmpty(byweekno) && !ii.wnomask![currentDay]) ||\n (notEmpty(byweekday) && !includes(byweekday, ii.wdaymask[currentDay])) ||\n (notEmpty(ii.nwdaymask) && !ii.nwdaymask[currentDay]) ||\n (byeaster !== null && !includes(ii.eastermask!, currentDay)) ||\n ((notEmpty(bymonthday) || notEmpty(bynmonthday)) &&\n !includes(bymonthday, ii.mdaymask[currentDay]) &&\n !includes(bynmonthday, ii.nmdaymask[currentDay])) ||\n (notEmpty(byyearday) &&\n ((currentDay < ii.yearlen &&\n !includes(byyearday, currentDay + 1) &&\n !includes(byyearday, -ii.yearlen + currentDay)) ||\n (currentDay >= ii.yearlen &&\n !includes(byyearday, currentDay + 1 - ii.yearlen) &&\n !includes(byyearday, -ii.nextyearlen + currentDay - ii.yearlen))))\n )\n}\n\nfunction rezoneIfNeeded (date: Date, options: ParsedOptions) {\n return new DateWithZone(date, options.tzid).rezonedDate()\n}\n\nfunction emitResult <M extends QueryMethodTypes> (iterResult: IterResult<M>) {\n return iterResult.getValue()\n}\n\nfunction removeFilteredDays (dayset: (number | null)[], start: number, end: number, ii: Iterinfo, options: ParsedOptions) {\n let filtered = false\n for (let dayCounter = start; dayCounter < end; dayCounter++) {\n let currentDay = dayset[dayCounter] as number\n\n filtered = isFiltered(\n ii,\n currentDay,\n options\n )\n\n if (filtered) dayset[currentDay] = null\n }\n\n return filtered\n}\n\nfunction makeTimeset (ii: Iterinfo, counterDate: DateTime, options: ParsedOptions): Time[] | null {\n const {\n freq,\n byhour,\n byminute,\n bysecond\n } = options\n\n if (freqIsDailyOrGreater(freq)) {\n return buildTimeset(options)\n }\n\n if (\n (freq >= RRule.HOURLY &&\n notEmpty(byhour) &&\n !includes(byhour, counterDate.hour)) ||\n (freq >= RRule.MINUTELY &&\n notEmpty(byminute) &&\n !includes(byminute, counterDate.minute)) ||\n (freq >= RRule.SECONDLY &&\n notEmpty(bysecond) &&\n !includes(bysecond, counterDate.second))\n ) {\n return []\n }\n\n return ii.gettimeset(freq)(\n counterDate.hour,\n counterDate.minute,\n counterDate.second,\n counterDate.millisecond\n )\n}\n","import dateutil from './dateutil'\n\nimport IterResult, { IterArgs } from './iterresult'\nimport CallbackIterResult from './callbackiterresult'\nimport { Language } from './nlp/i18n'\nimport { fromText, parseText, toText, isFullyConvertible } from './nlp/index'\nimport { DateFormatter, GetText } from './nlp/totext'\nimport { ParsedOptions, Options, Frequency, QueryMethods, QueryMethodTypes, IterResultType } from './types'\nimport { parseOptions, initializeOptions } from './parseoptions'\nimport { parseString } from './parsestring'\nimport { optionsToString } from './optionstostring'\nimport { Cache, CacheKeys } from './cache'\nimport { Weekday } from './weekday'\nimport { iter } from './iter/index'\n\n// =============================================================================\n// RRule\n// =============================================================================\n\nexport const Days = {\n MO: new Weekday(0),\n TU: new Weekday(1),\n WE: new Weekday(2),\n TH: new Weekday(3),\n FR: new Weekday(4),\n SA: new Weekday(5),\n SU: new Weekday(6)\n}\n\nexport const DEFAULT_OPTIONS: Options = {\n freq: Frequency.YEARLY,\n dtstart: null,\n interval: 1,\n wkst: Days.MO,\n count: null,\n until: null,\n tzid: null,\n bysetpos: null,\n bymonth: null,\n bymonthday: null,\n bynmonthday: null,\n byyearday: null,\n byweekno: null,\n byweekday: null,\n bynweekday: null,\n byhour: null,\n byminute: null,\n bysecond: null,\n byeaster: null\n}\n\nexport const defaultKeys = Object.keys(DEFAULT_OPTIONS) as (keyof Options)[]\n\n/**\n *\n * @param {Options?} options - see <http://labix.org/python-dateutil/#head-cf004ee9a75592797e076752b2a889c10f445418>\n * The only required option is `freq`, one of RRule.YEARLY, RRule.MONTHLY, ...\n * @constructor\n */\nexport default class RRule implements QueryMethods {\n public _cache: Cache | null\n public origOptions: Partial<Options>\n public options: ParsedOptions\n\n // RRule class 'constants'\n\n static readonly FREQUENCIES: (keyof typeof Frequency)[] = [\n 'YEARLY',\n 'MONTHLY',\n 'WEEKLY',\n 'DAILY',\n 'HOURLY',\n 'MINUTELY',\n 'SECONDLY'\n ]\n\n static readonly YEARLY = Frequency.YEARLY\n static readonly MONTHLY = Frequency.MONTHLY\n static readonly WEEKLY = Frequency.WEEKLY\n static readonly DAILY = Frequency.DAILY\n static readonly HOURLY = Frequency.HOURLY\n static readonly MINUTELY = Frequency.MINUTELY\n static readonly SECONDLY = Frequency.SECONDLY\n\n static readonly MO = Days.MO\n static readonly TU = Days.TU\n static readonly WE = Days.WE\n static readonly TH = Days.TH\n static readonly FR = Days.FR\n static readonly SA = Days.SA\n static readonly SU = Days.SU\n\n constructor (options: Partial<Options> = {}, noCache: boolean = false) {\n // RFC string\n this._cache = noCache ? null : new Cache()\n\n // used by toString()\n this.origOptions = initializeOptions(options)\n const { parsedOptions } = parseOptions(options)\n this.options = parsedOptions\n }\n\n static parseText (text: string, language?: Language) {\n return parseText(text, language)\n }\n\n static fromText (text: string, language?: Language) {\n return fromText(text, language)\n }\n\n static parseString = parseString\n\n static fromString (str: string) {\n return new RRule(RRule.parseString(str) || undefined)\n }\n\n static optionsToString = optionsToString\n\n protected _iter <M extends QueryMethodTypes> (iterResult: IterResult<M>): IterResultType<M> {\n return iter(iterResult, this.options)\n }\n\n private _cacheGet (what: CacheKeys | 'all', args?: Partial<IterArgs>) {\n if (!this._cache) return false\n return this._cache._cacheGet(what, args)\n }\n\n public _cacheAdd (\n what: CacheKeys | 'all',\n value: Date[] | Date | null,\n args?: Partial<IterArgs>\n ) {\n if (!this._cache) return\n return this._cache._cacheAdd(what, value, args)\n }\n\n /**\n * @param {Function} iterator - optional function that will be called\n * on each date that is added. It can return false\n * to stop the iteration.\n * @return Array containing all recurrences.\n */\n all (iterator?: (d: Date, len: number) => boolean): Date[] {\n if (iterator) {\n return this._iter(new CallbackIterResult('all', {}, iterator))\n }\n\n let result = this._cacheGet('all') as Date[] | false\n if (result === false) {\n result = this._iter(new IterResult('all', {}))\n this._cacheAdd('all', result)\n }\n return result\n }\n\n /**\n * Returns all the occurrences of the rrule between after and before.\n * The inc keyword defines what happens if after and/or before are\n * themselves occurrences. With inc == True, they will be included in the\n * list, if they are found in the recurrence set.\n * @return Array\n */\n between (\n after: Date,\n before: Date,\n inc: boolean = false,\n iterator?: (d: Date, len: number) => boolean\n ): Date[] {\n if (!dateutil.isValidDate(after) || !dateutil.isValidDate(before)) throw new Error('Invalid date passed in to RRule.between')\n const args = {\n before,\n after,\n inc\n }\n\n if (iterator) {\n return this._iter(\n new CallbackIterResult('between', args, iterator)\n )\n }\n\n let result = this._cacheGet('between', args)\n if (result === false) {\n result = this._iter(new IterResult('between', args))\n this._cacheAdd('between', result, args)\n }\n return result as Date[]\n }\n\n /**\n * Returns the last recurrence before the given datetime instance.\n * The inc keyword defines what happens if dt is an occurrence.\n * With inc == True, if dt itself is an occurrence, it will be returned.\n * @return Date or null\n */\n before (dt: Date, inc = false): Date {\n if (!dateutil.isValidDate(dt)) throw new Error('Invalid date passed in to RRule.before')\n const args = { dt: dt, inc: inc }\n let result = this._cacheGet('before', args)\n if (result === false) {\n result = this._iter(new IterResult('before', args))\n this._cacheAdd('before', result, args)\n }\n return result as Date\n }\n\n /**\n * Returns the first recurrence after the given datetime instance.\n * The inc keyword defines what happens if dt is an occurrence.\n * With inc == True, if dt itself is an occurrence, it will be returned.\n * @return Date or null\n */\n after (dt: Date, inc = false): Date {\n if (!dateutil.isValidDate(dt)) throw new Error('Invalid date passed in to RRule.after')\n const args = { dt: dt, inc: inc }\n let result = this._cacheGet('after', args)\n if (result === false) {\n result = this._iter(new IterResult('after', args))\n this._cacheAdd('after', result, args)\n }\n return result as Date\n }\n\n /**\n * Returns the number of recurrences in this set. It will have go trough\n * the whole recurrence, if this hasn't been done before.\n */\n count (): number {\n return this.all().length\n }\n\n /**\n * Converts the rrule into its string representation\n * @see <http://www.ietf.org/rfc/rfc2445.txt>\n * @return String\n */\n toString () {\n return optionsToString(this.origOptions)\n }\n\n /**\n * Will convert all rules described in nlp:ToText\n * to text.\n */\n toText (gettext?: GetText, language?: Language, dateFormatter?: DateFormatter) {\n return toText(this, gettext, language, dateFormatter)\n }\n\n isFullyConvertibleToText () {\n return isFullyConvertible(this)\n }\n\n /**\n * @return a RRule instance with the same freq and options\n * as this one (cache is not cloned)\n */\n clone (): RRule {\n return new RRule(this.origOptions)\n }\n}\n","import IterResult from './iterresult'\nimport RRule from './rrule'\nimport { DateWithZone } from './datewithzone'\nimport { iter } from './iter/index'\nimport dateutil from './dateutil'\nimport { QueryMethodTypes, IterResultType } from './types'\n\nexport function iterSet <M extends QueryMethodTypes> (\n iterResult: IterResult<M>,\n _rrule: RRule[],\n _exrule: RRule[],\n _rdate: Date[],\n _exdate: Date[],\n tzid: string | undefined\n) {\n const _exdateHash: { [k: number]: boolean } = {}\n const _accept = iterResult.accept\n\n function evalExdate (after: Date, before: Date) {\n _exrule.forEach(function (rrule) {\n rrule.between(after, before, true).forEach(function (date) {\n _exdateHash[Number(date)] = true\n })\n })\n }\n\n _exdate.forEach(function (date) {\n const zonedDate = new DateWithZone(date, tzid).rezonedDate()\n _exdateHash[Number(zonedDate)] = true\n })\n\n iterResult.accept = function (date) {\n const dt = Number(date)\n if (isNaN(dt)) return _accept.call(this, date)\n if (!_exdateHash[dt]) {\n evalExdate(new Date(dt - 1), new Date(dt + 1))\n if (!_exdateHash[dt]) {\n _exdateHash[dt] = true\n return _accept.call(this, date)\n }\n }\n return true\n }\n\n if (iterResult.method === 'between') {\n evalExdate(iterResult.args.after!, iterResult.args.before!)\n iterResult.accept = function (date) {\n const dt = Number(date)\n if (!_exdateHash[dt]) {\n _exdateHash[dt] = true\n return _accept.call(this, date)\n }\n return true\n }\n }\n\n for (let i = 0; i < _rdate.length; i++) {\n const zonedDate = new DateWithZone(_rdate[i], tzid).rezonedDate()\n if (!iterResult.accept(new Date(zonedDate.getTime()))) break\n }\n\n _rrule.forEach(function (rrule) {\n iter(iterResult, rrule.options)\n })\n\n const res = iterResult._result\n dateutil.sort(res)\n switch (iterResult.method) {\n case 'all':\n case 'between':\n return res as IterResultType<M>\n case 'before':\n return ((res.length && res[res.length - 1]) || null) as IterResultType<M>\n case 'after':\n default:\n return ((res.length && res[0]) || null) as IterResultType<M>\n }\n}\n","import RRule from './rrule'\nimport RRuleSet from './rruleset'\nimport dateutil from './dateutil'\nimport { includes, split } from './helpers'\nimport { Options } from './types'\nimport { parseString, parseDtstart } from './parsestring'\n\nexport interface RRuleStrOptions {\n dtstart: Date | null\n cache: boolean\n unfold: boolean\n forceset: boolean\n compatible: boolean\n tzid: string | null\n}\n\n/**\n * RRuleStr\n * To parse a set of rrule strings\n */\nconst DEFAULT_OPTIONS: RRuleStrOptions = {\n dtstart: null,\n cache: false,\n unfold: false,\n forceset: false,\n compatible: false,\n tzid: null\n}\n\nexport function parseInput (s: string, options: Partial<RRuleStrOptions>) {\n let rrulevals: Partial<Options>[] = []\n let rdatevals: Date[] = []\n let exrulevals: Partial<Options>[] = []\n let exdatevals: Date[] = []\n\n let { dtstart, tzid } = parseDtstart(s)\n\n const lines = splitIntoLines(s, options.unfold)\n\n lines.forEach(line => {\n if (!line) return\n const { name, parms, value } = breakDownLine(line)\n\n switch (name.toUpperCase()) {\n case 'RRULE':\n if (parms.length) {\n throw new Error(`unsupported RRULE parm: ${parms.join(',')}`)\n }\n\n rrulevals.push(parseString(line))\n break\n\n case 'RDATE':\n const [ _, rdateTzid ] = /RDATE(?:;TZID=([^:=]+))?/i.exec(line)!\n if (rdateTzid && !tzid) {\n tzid = rdateTzid\n }\n rdatevals = rdatevals.concat(parseRDate(value, parms))\n break\n\n case 'EXRULE':\n if (parms.length) {\n throw new Error(`unsupported EXRULE parm: ${parms.join(',')}`)\n }\n\n exrulevals.push(parseString(value))\n break\n\n case 'EXDATE':\n exdatevals = exdatevals.concat(parseRDate(value, parms))\n break\n\n case 'DTSTART':\n break\n\n default:\n throw new Error('unsupported property: ' + name)\n }\n })\n\n return {\n dtstart,\n tzid,\n rrulevals,\n rdatevals,\n exrulevals,\n exdatevals\n }\n}\n\nfunction buildRule (s: string, options: Partial<RRuleStrOptions>) {\n const {\n rrulevals,\n rdatevals,\n exrulevals,\n exdatevals,\n dtstart,\n tzid\n } = parseInput(s, options)\n\n const noCache = options.cache === false\n\n if (options.compatible) {\n options.forceset = true\n options.unfold = true\n }\n\n if (\n options.forceset ||\n rrulevals.length > 1 ||\n rdatevals.length ||\n exrulevals.length ||\n exdatevals.length\n ) {\n const rset = new RRuleSet(noCache)\n\n rset.dtstart(dtstart)\n rset.tzid(tzid || undefined)\n\n rrulevals.forEach(val => {\n rset.rrule(\n new RRule(\n groomRruleOptions(val, dtstart, tzid),\n noCache\n )\n )\n })\n\n rdatevals.forEach(date => {\n rset.rdate(date)\n })\n\n exrulevals.forEach(val => {\n rset.exrule(\n new RRule(\n groomRruleOptions(val, dtstart, tzid),\n noCache\n )\n )\n })\n\n exdatevals.forEach(date => {\n rset.exdate(date)\n })\n\n if (options.compatible && options.dtstart) rset.rdate(dtstart!)\n return rset\n }\n\n const val = rrulevals[0] || {}\n return new RRule(groomRruleOptions(\n val,\n val.dtstart || options.dtstart || dtstart,\n val.tzid || options.tzid || tzid\n ), noCache)\n}\n\nexport function rrulestr (\n s: string,\n options: Partial<RRuleStrOptions> = {}\n): RRule | RRuleSet {\n return buildRule(s, initializeOptions(options))\n}\n\nfunction groomRruleOptions (val: Partial<Options>, dtstart?: Date | null, tzid?: string | null) {\n return {\n ...val,\n dtstart,\n tzid\n }\n}\n\nfunction initializeOptions (options: Partial<RRuleStrOptions>) {\n const invalid: string[] = []\n const keys = Object.keys(options) as (keyof typeof options)[]\n const defaultKeys = Object.keys(\n DEFAULT_OPTIONS\n ) as (keyof typeof DEFAULT_OPTIONS)[]\n\n keys.forEach(function (key) {\n if (!includes(defaultKeys, key)) invalid.push(key)\n })\n\n if (invalid.length) {\n throw new Error('Invalid options: ' + invalid.join(', '))\n }\n\n return { ...DEFAULT_OPTIONS, ...options }\n}\n\nfunction extractName (line: string) {\n if (line.indexOf(':') === -1) {\n return {\n name: 'RRULE',\n value: line\n }\n }\n\n const [name, value] = split(line, ':', 1)\n return {\n name,\n value\n }\n}\n\nfunction breakDownLine (line: string) {\n const { name, value } = extractName(line)\n let parms = name.split(';')\n if (!parms) throw new Error('empty property name')\n\n return {\n name: parms[0].toUpperCase(),\n parms: parms.slice(1),\n value\n }\n}\n\nfunction splitIntoLines (s: string, unfold = false) {\n s = s && s.trim()\n if (!s) throw new Error('Invalid empty string')\n\n // More info about 'unfold' option\n // Go head to http://www.ietf.org/rfc/rfc2445.txt\n if (!unfold) {\n return s.split(/\\s/)\n }\n\n const lines = s.split('\\n')\n let i = 0\n while (i < lines.length) {\n // TODO\n const line = (lines[i] = lines[i].replace(/\\s+$/g, ''))\n if (!line) {\n lines.splice(i, 1)\n } else if (i > 0 && line[0] === ' ') {\n lines[i - 1] += line.slice(1)\n lines.splice(i, 1)\n } else {\n i += 1\n }\n }\n\n return lines\n}\n\nfunction validateDateParm (parms: string[]) {\n parms.forEach(parm => {\n if (!/(VALUE=DATE(-TIME)?)|(TZID=)/.test(parm)) {\n throw new Error('unsupported RDATE/EXDATE parm: ' + parm)\n }\n })\n}\n\nfunction parseRDate (rdateval: string, parms: string[]) {\n validateDateParm(parms)\n\n return rdateval\n .split(',')\n .map(datestr => dateutil.untilStringToDate(datestr))\n}\n","import RRule from './rrule'\nimport dateutil from './dateutil'\nimport { includes } from './helpers'\nimport IterResult from './iterresult'\nimport { iterSet } from './iterset'\nimport { QueryMethodTypes, IterResultType } from './types'\nimport { rrulestr } from './rrulestr'\nimport { optionsToString } from './optionstostring'\n\nfunction createGetterSetter <T> (fieldName: string) {\n return (field?: T) => {\n if (field !== undefined) {\n this[`_${fieldName}`] = field\n }\n\n if (this[`_${fieldName}`] !== undefined) {\n return this[`_${fieldName}`]\n }\n\n for (let i = 0; i < this._rrule.length; i++) {\n const field: T = this._rrule[i].origOptions[fieldName]\n if (field) {\n return field\n }\n }\n }\n}\n\nexport default class RRuleSet extends RRule {\n public readonly _rrule: RRule[]\n public readonly _rdate: Date[]\n public readonly _exrule: RRule[]\n public readonly _exdate: Date[]\n\n private _dtstart?: Date | null | undefined\n private _tzid?: string\n\n /**\n *\n * @param {Boolean?} noCache\n * The same stratagy as RRule on cache, default to false\n * @constructor\n */\n constructor (noCache: boolean = false) {\n super({}, noCache)\n\n this._rrule = []\n this._rdate = []\n this._exrule = []\n this._exdate = []\n }\n\n dtstart = createGetterSetter.apply(this, ['dtstart'])\n tzid = createGetterSetter.apply(this, ['tzid'])\n\n _iter <M extends QueryMethodTypes> (iterResult: IterResult<M>): IterResultType<M> {\n return iterSet(\n iterResult,\n this._rrule,\n this._exrule,\n this._rdate,\n this._exdate,\n this.tzid()\n )\n }\n\n /**\n * Adds an RRule to the set\n *\n * @param {RRule}\n */\n rrule (rrule: RRule) {\n _addRule(rrule, this._rrule)\n }\n\n /**\n * Adds an EXRULE to the set\n *\n * @param {RRule}\n */\n exrule (rrule: RRule) {\n _addRule(rrule, this._exrule)\n }\n\n /**\n * Adds an RDate to the set\n *\n * @param {Date}\n */\n rdate (date: Date) {\n _addDate(date, this._rdate)\n }\n\n /**\n * Adds an EXDATE to the set\n *\n * @param {Date}\n */\n exdate (date: Date) {\n _addDate(date, this._exdate)\n }\n\n /**\n * Get list of included rrules in this recurrence set.\n *\n * @return List of rrules\n */\n rrules () {\n return this._rrule.map(e => rrulestr(e.toString()))\n }\n\n /**\n * Get list of excluded rrules in this recurrence set.\n *\n * @return List of exrules\n */\n exrules () {\n return this._exrule.map(e => rrulestr(e.toString()))\n }\n\n /**\n * Get list of included datetimes in this recurrence set.\n *\n * @return List of rdates\n */\n rdates () {\n return this._rdate.map(e => new Date(e.getTime()))\n }\n\n /**\n * Get list of included datetimes in this recurrence set.\n *\n * @return List of exdates\n */\n exdates () {\n return this._exdate.map(e => new Date(e.getTime()))\n }\n\n valueOf () {\n let result: string[] = []\n\n if (!this._rrule.length && this._dtstart) {\n result = result.concat(optionsToString({ dtstart: this._dtstart }))\n }\n\n this._rrule.forEach(function (rrule) {\n result = result.concat(rrule.toString().split('\\n'))\n })\n\n this._exrule.forEach(function (exrule) {\n result = result.concat(\n exrule.toString().split('\\n')\n .map(line => line.replace(/^RRULE:/, 'EXRULE:'))\n .filter(line => !/^DTSTART/.test(line))\n )\n })\n\n if (this._rdate.length) {\n result.push(\n rdatesToString('RDATE', this._rdate, this.tzid())\n )\n }\n\n if (this._exdate.length) {\n result.push(\n rdatesToString('EXDATE', this._exdate, this.tzid())\n )\n }\n\n return result\n }\n\n /**\n * to generate recurrence field such as:\n * DTSTART:19970902T010000Z\n * RRULE:FREQ=YEARLY;COUNT=2;BYDAY=TU\n * RRULE:FREQ=YEARLY;COUNT=1;BYDAY=TH\n */\n toString () {\n return this.valueOf().join('\\n')\n }\n\n /**\n * Create a new RRuleSet Object completely base on current instance\n */\n clone (): RRuleSet {\n const rrs = new RRuleSet(!!this._cache)\n\n this._rrule.forEach(rule => rrs.rrule(rule.clone()))\n this._exrule.forEach(rule => rrs.exrule(rule.clone()))\n this._rdate.forEach(date => rrs.rdate(new Date(date.getTime())))\n this._exdate.forEach(date => rrs.exdate(new Date(date.getTime())))\n\n return rrs\n }\n}\n\nfunction _addRule (rrule: RRule, collection: RRule[]) {\n if (!(rrule instanceof RRule)) {\n throw new TypeError(String(rrule) + ' is not RRule instance')\n }\n\n if (!includes(collection.map(String), String(rrule))) {\n collection.push(rrule)\n }\n}\n\nfunction _addDate (date: Date, collection: Date[]) {\n if (!(date instanceof Date)) {\n throw new TypeError(String(date) + ' is not Date instance')\n }\n if (!includes(collection.map(Number), Number(date))) {\n collection.push(date)\n dateutil.sort(collection)\n }\n}\n\nfunction rdatesToString (param: string, rdates: Date[], tzid: string | undefined) {\n const isUTC = !tzid || tzid.toUpperCase() === 'UTC'\n const header = isUTC ? `${param}:` : `${param};TZID=${tzid}:`\n\n const dateString = rdates\n .map(rdate => dateutil.timeToUntilString(rdate.valueOf(), isUTC))\n .join(',')\n\n return `${header}${dateString}`\n}\n","/*!\n * rrule.js - Library for working with recurrence rules for calendar dates.\n * https://github.com/jakubroztocil/rrule\n *\n * Copyright 2010, Jakub Roztocil and Lars Schoning\n * Licenced under the BSD licence.\n * https://github.com/jakubroztocil/rrule/blob/master/LICENCE\n *\n * Based on:\n * python-dateutil - Extensions to the standard Python datetime module.\n * Copyright (c) 2003-2011 - Gustavo Niemeyer <gustavo@niemeyer.net>\n * Copyright (c) 2012 - Tomi Pieviläinen <tomi.pievilainen@iki.fi>\n * https://github.com/jakubroztocil/rrule/blob/master/LICENCE\n *\n */\n\nimport RRule from './rrule'\nimport RRuleSet from './rruleset'\n\nexport { rrulestr } from './rrulestr'\nexport { Frequency, ByWeekday, Options } from './types'\nexport { Weekday, WeekdayStr } from './weekday'\nexport { RRuleStrOptions } from './rrulestr'\n\nexport {\n RRule,\n RRuleSet\n}\n\nexport default RRule\n"],"sourceRoot":""}