{"version":3,"file":"index.cjs","sources":["../src/parsers/abstractParser.js","../src/errors/modificationNotAllowedError.js","../src/traits/lockable.js","../src/errors/expectedICalJSError.js","../src/helpers/stringHelper.js","../src/config.js","../src/factories/icalFactory.js","../src/traits/observer.js","../src/parameters/parameter.js","../src/values/abstractValue.js","../src/values/binaryValue.js","../src/values/durationValue.js","../src/values/dateTimeValue.js","../src/values/periodValue.js","../src/values/recurValue.js","../src/values/utcOffsetValue.js","../src/errors/unknownICALTypeError.js","../src/values/index.js","../src/properties/property.js","../src/properties/attachmentProperty.js","../src/properties/attendeeProperty.js","../src/properties/conferenceProperty.js","../src/properties/freeBusyProperty.js","../src/properties/geoProperty.js","../src/properties/imageProperty.js","../src/properties/relationProperty.js","../src/properties/requestStatusProperty.js","../src/properties/textProperty.js","../src/properties/triggerProperty.js","../src/properties/index.js","../src/components/abstractComponent.js","../src/factories/dateFactory.js","../src/errors/recurringWithoutDtStartError.js","../src/recurrence/recurrenceManager.js","../src/helpers/cryptoHelper.js","../src/components/nested/alarmComponent.js","../src/components/nested/index.js","../src/components/root/abstractRecurringComponent.js","../src/helpers/birthdayHelper.js","../src/components/root/eventComponent.js","../src/components/root/freeBusyComponent.js","../src/components/root/journalComponent.js","../src/components/root/timezoneComponent.js","../src/components/root/toDoComponent.js","../src/components/root/index.js","../src/components/calendarComponent.js","../src/parsers/repairsteps/abstractRepairStep.js","../src/parsers/repairsteps/icalendar/icalendarAddMissingUIDRepairStep.js","../src/parsers/repairsteps/icalendar/icalendarAddMissingValueDateDoubleColonRepairStep.js","../src/parsers/repairsteps/icalendar/icalendarAddMissingValueDateRepairStep.js","../src/parsers/repairsteps/icalendar/icalendarEmptyTriggerRepairStep.js","../src/parsers/repairsteps/icalendar/icalendarIllegalCreatedRepairStep.js","../src/parsers/repairsteps/icalendar/icalendarMultipleVCalendarBlocksRepairStep.js","../src/parsers/repairsteps/icalendar/icalendarRemoveXNCGroupIdRepairStep.js","../src/parsers/repairsteps/icalendar/icalendarRemoveUnicodeSpecialNoncharactersRepairStep.js","../src/parsers/repairsteps/icalendar/icalendarConvertInvalidDateTimeValuesRepairStep.js","../src/parsers/repairsteps/icalendar/index.js","../src/parsers/icalendarParser.js","../src/parsers/parserManager.js","../src/errors/illegalValueError.js","../src/index.js"],"sourcesContent":["/**\n * @copyright Copyright (c) 2019 Georg Ehrke\n *\n * @author Georg Ehrke <georg-nextcloud@ehrke.email>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\n\n/**\n * @class AbstractParser\n * @classdesc\n */\nexport default class AbstractParser {\n\n\t/**\n\t * @class\n\t *\n\t * @param {object=} options Object of options\n\t * @param {boolean=} options.extractGlobalProperties Whether or not to preserve properties from the VCALENDAR component (defaults to false)\n\t * @param {boolean=} options.removeRSVPForAttendees Whether or not to remove RSVP from attendees (defaults to false)\n\t * @param {boolean=} options.includeTimezones Whether or not to include timezones (defaults to false)\n\t * @param {boolean=} options.preserveMethod Whether or not to preserve the iCalendar method (defaults to false)\n\t * @param {boolean=} options.processFreeBusy Whether or not to process VFreeBusy components (defaults to false)\n\t */\n\tconstructor(options = {}) {\n\t\tif (new.target === AbstractParser) {\n\t\t\tthrow new TypeError('Cannot instantiate abstract class AbstractParser')\n\t\t}\n\n\t\t/**\n\t\t * Options for the parser\n\t\t *\n\t\t * @type {{removeRSVPForAttendees: boolean}}\n\t\t * @private\n\t\t */\n\t\tthis._options = Object.assign({}, options)\n\n\t\t/**\n\t\t * A name extracted from the calendar-data\n\t\t *\n\t\t * @type {string | null}\n\t\t * @protected\n\t\t */\n\t\tthis._name = null\n\n\t\t/**\n\t\t * A color extracted from the calendar-data\n\t\t *\n\t\t * @type {string | null}\n\t\t * @protected\n\t\t */\n\t\tthis._color = null\n\n\t\t/**\n\t\t * Gets the url that this icalendar file can be updated from\n\t\t *\n\t\t * @type {string}\n\t\t * @protected\n\t\t */\n\t\tthis._sourceURL = null\n\n\t\t/**\n\t\t * Gets the update interval if this icalendar file can be updated from a source\n\t\t *\n\t\t * @type {string}\n\t\t * @protected\n\t\t */\n\t\tthis._refreshInterval = null\n\n\t\t/**\n\t\t * Gets the default timezone of this calendar\n\t\t *\n\t\t * @type {string}\n\t\t * @protected\n\t\t */\n\t\tthis._calendarTimezone = null\n\n\t\t/**\n\t\t * Error count during parsing\n\t\t *\n\t\t * @type {Array}\n\t\t * @protected\n\t\t */\n\t\tthis._errors = []\n\t}\n\n\t/**\n\t * Gets the name extracted from the calendar-data\n\t *\n\t * @return {string | null}\n\t */\n\tgetName() {\n\t\treturn this._name\n\t}\n\n\t/**\n\t * Gets the color extracted from the calendar-data\n\t *\n\t * @return {string | null}\n\t */\n\tgetColor() {\n\t\treturn this._color\n\t}\n\n\t/**\n\t * Gets whether this import can be converted into a webcal subscription\n\t *\n\t * @return {boolean}\n\t */\n\toffersWebcalFeed() {\n\t\treturn this._sourceURL !== null\n\t}\n\n\t/**\n\t * Gets the url pointing to the webcal source\n\t *\n\t * @return {string | null}\n\t */\n\tgetSourceURL() {\n\t\treturn this._sourceURL\n\t}\n\n\t/**\n\t * Gets the recommended refresh rate to update this subscription\n\t *\n\t * @return {string | null}\n\t */\n\tgetRefreshInterval() {\n\t\treturn this._refreshInterval\n\t}\n\n\t/**\n\t * Gets the default timezone of this calendar\n\t *\n\t * @return {string}\n\t */\n\tgetCalendarTimezone() {\n\t\treturn this._calendarTimezone\n\t}\n\n\t/**\n\t * {String|Object} data\n\t *\n\t * @param {any} data The data to parse\n\t * @throws TypeError\n\t */\n\tparse(data) {\n\t\tthrow new TypeError('Abstract method not implemented by subclass')\n\t}\n\n\t/**\n\t * Returns one CalendarComponent at a time\n\t */\n\t* getItemIterator() { // eslint-disable-line require-yield\n\t\tthrow new TypeError('Abstract method not implemented by subclass')\n\t}\n\n\t/**\n\t * Get an array of all items\n\t *\n\t * @return {CalendarComponent[]}\n\t */\n\tgetAllItems() {\n\t\treturn Array.from(this.getItemIterator())\n\t}\n\n\t/**\n\t * Returns a boolean whether or not the parsed data contains vevents\n\t *\n\t * @return {boolean}\n\t */\n\tcontainsVEvents() {\n\t\treturn false\n\t}\n\n\t/**\n\t * Returns a boolean whether or not the parsed data contains vjournals\n\t *\n\t * @return {boolean}\n\t */\n\tcontainsVJournals() {\n\t\treturn false\n\t}\n\n\t/**\n\t * Returns a boolean whether or not the parsed data contains vtodos\n\t *\n\t * @return {boolean}\n\t */\n\tcontainsVTodos() {\n\t\treturn false\n\t}\n\n\t/**\n\t * Returns a boolean whether or not the parsed data contains vfreebusys\n\t *\n\t * @return {boolean}\n\t */\n\tcontainsVFreeBusy() {\n\t\treturn false\n\t}\n\n\t/**\n\t * Returns a boolean whether\n\t *\n\t * @return {boolean}\n\t */\n\thasErrors() {\n\t\treturn this._errors.length !== 0\n\t}\n\n\t/**\n\t * Get a list of all errors that occurred\n\t *\n\t * @return {*[]}\n\t */\n\tgetErrorList() {\n\t\treturn this._errors.slice()\n\t}\n\n\t/**\n\t * Returns the number of calendar-objects in parser\n\t *\n\t * @return {number}\n\t */\n\tgetItemCount() {\n\t\treturn 0\n\t}\n\n\t/**\n\t * Gets an option provided\n\t *\n\t * @param {string} name The name of the option to get\n\t * @param {*} defaultValue The default value to return if option not provided\n\t * @return {any}\n\t * @protected\n\t */\n\t_getOption(name, defaultValue) {\n\t\treturn Object.prototype.hasOwnProperty.call(this._options, name)\n\t\t\t? this._options[name]\n\t\t\t: defaultValue\n\t}\n\n\t/**\n\t * Return list of supported mime types\n\t *\n\t * @static\n\t */\n\tstatic getMimeTypes() {\n\t\tthrow new TypeError('Abstract method not implemented by subclass')\n\t}\n\n}\n","/**\n * @copyright Copyright (c) 2019 Georg Ehrke\n *\n * @author Georg Ehrke <georg-nextcloud@ehrke.email>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\n\nexport default class ModificationNotAllowedError extends Error {}\n","/**\n * @copyright Copyright (c) 2019 Georg Ehrke\n *\n * @author Georg Ehrke <georg-nextcloud@ehrke.email>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nimport ModificationNotAllowedError from '../errors/modificationNotAllowedError.js'\n\n/**\n *\n * @param baseClass\n */\nexport default function lockableTrait(baseClass) {\n\n\t/**\n\t * @class LockableTrait\n\t */\n\treturn class extends baseClass {\n\n\t\t/**\n\t\t * Constructor\n\t\t *\n\t\t * @param {...any} args\n\t\t */\n\t\tconstructor(...args) {\n\t\t\tsuper(...args)\n\n\t\t\t/**\n\t\t\t * Indicator whether this value was locked for changes\n\t\t\t *\n\t\t\t * @type {boolean}\n\t\t\t * @private\n\t\t\t */\n\t\t\tthis._mutable = true\n\t\t}\n\n\t\t/**\n\t\t * Returns whether or not this object is locked\n\t\t *\n\t\t * @return {boolean}\n\t\t */\n\t\tisLocked() {\n\t\t\treturn !this._mutable\n\t\t}\n\n\t\t/**\n\t\t * Marks this object is immutable\n\t\t * locks it against further modification\n\t\t */\n\t\tlock() {\n\t\t\tthis._mutable = false\n\t\t}\n\n\t\t/**\n\t\t * Marks this object as mutable\n\t\t * allowing further modification\n\t\t */\n\t\tunlock() {\n\t\t\tthis._mutable = true\n\t\t}\n\n\t\t/**\n\t\t * Check if modifications are allowed\n\t\t *\n\t\t * @throws {ModificationNotAllowedError} if this object is locked for modification\n\t\t * @protected\n\t\t */\n\t\t_modify() {\n\t\t\tif (!this._mutable) {\n\t\t\t\tthrow new ModificationNotAllowedError()\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Check if modification of content is allowed\n\t\t *\n\t\t * @throws {ModificationNotAllowedError} if this object is locked for modification\n\t\t * @protected\n\t\t */\n\t\t_modifyContent() {\n\t\t\tthis._modify()\n\t\t}\n\n\t}\n}\n","/**\n * @copyright Copyright (c) 2019 Georg Ehrke\n *\n * @author Georg Ehrke <georg-nextcloud@ehrke.email>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\n\nexport default class ExpectedICalJSError extends Error {}\n","/**\n * @copyright Copyright (c) 2019 Georg Ehrke\n *\n * @author Georg Ehrke <georg-nextcloud@ehrke.email>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\n\n/**\n * Turns the entire string lowercase\n *\n * @param {string} str The string to turn lowercase\n * @return {string}\n */\nexport function lc(str) {\n\treturn str.toLowerCase()\n}\n\n/**\n * Compares two strings, It is case-insensitive.\n *\n * @param {string} str1 String 1 to compare\n * @param {string} str2 String 2 to compare\n * @return {boolean}\n */\nexport function strcasecmp(str1, str2) {\n\treturn uc(str1) === uc(str2)\n}\n\n/**\n * Turns the entire string uppercase\n *\n * @param {string} str The string to turn uppercase\n * @return {string}\n */\nexport function uc(str) {\n\treturn str.toUpperCase()\n}\n\n/**\n * Capitalizes the string\n *\n * @param {string} str The string of which the first character will be turned uppercase\n * @return {string}\n */\nexport function ucFirst(str) {\n\treturn str.charAt(0).toUpperCase() + str.slice(1)\n}\n\n/**\n * Makes sure that a string starts with a certain other string\n * This is mostly used in the attendeeProperty to assure the uri starts with mailto:\n *\n * @param {string} str The string to check for the prefix and prepend if necessary\n * @param {string} startWith The prefix to be added if necessary\n * @return {string}\n */\nexport function startStringWith(str, startWith) {\n\tif (!str.startsWith(startWith)) {\n\t\tstr = startWith + str\n\t}\n\n\treturn str\n}\n","/**\n * @copyright Copyright (c) 2019 Georg Ehrke\n *\n * @author Georg Ehrke <georg-nextcloud@ehrke.email>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\n\n/**\n * @type {Map<string, *>}\n */\nconst GLOBAL_CONFIG = new Map()\n\n/**\n * Sets a new config key\n *\n * @param {string} key The config-key to set\n * @param {*} value The value to set for given config-key\n */\nexport function setConfig(key, value) {\n\tGLOBAL_CONFIG.set(key, value)\n}\n\n/**\n * Checks if a config for a certain key is present\n *\n * @param {string} key The config-key to check\n * @return {boolean}\n */\nexport function hasConfig(key) {\n\treturn GLOBAL_CONFIG.has(key)\n}\n\n/**\n * gets value of a config key\n *\n * @param {string} key The config-key to get\n * @param {*} defaultValue Default value of config does not exist\n * @return {*}\n */\nexport function getConfig(key, defaultValue) {\n\treturn GLOBAL_CONFIG.get(key) || defaultValue\n}\n\n/**\n * deletes a config key\n *\n * @param {string} key The config-key to delete\n */\nexport function deleteConfig(key) {\n\tGLOBAL_CONFIG.delete(key)\n}\n","/**\n * @copyright Copyright (c) 2019 Georg Ehrke\n *\n * @author Georg Ehrke <georg-nextcloud@ehrke.email>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\n\nimport { lc } from '../helpers/stringHelper.js'\nimport { getConfig } from '../config.js'\nimport ICAL from 'ical.js'\n\n/**\n * creates a new ICAL.Component object\n *\n * @param {string} componentName The name of the component to create\n * @return {ICAL.Component}\n */\nexport function createComponent(componentName) {\n\treturn new ICAL.Component(lc(componentName))\n}\n\n/**\n * creates a new ICAL.Property object\n *\n * @param {string} propertyName The name of the property to create\n * @return {ICAL.Property}\n */\nexport function createProperty(propertyName) {\n\treturn new ICAL.Property(lc(propertyName))\n}\n\n/**\n * creates a new calendar component\n *\n * @param {string=} method Name of the method to include in VCALENDAR component\n * @return {ICAL.Component}\n */\nexport function createCalendarComponent(method = null) {\n\tconst calendarComp = createComponent('VCALENDAR')\n\n\tcalendarComp.addPropertyWithValue('prodid', getConfig('PRODID', '-//IDN georgehrke.com//calendar-js//EN'))\n\tcalendarComp.addPropertyWithValue('calscale', 'GREGORIAN')\n\tcalendarComp.addPropertyWithValue('version', '2.0')\n\n\tif (method) {\n\t\tcalendarComp.addPropertyWithValue('method', method)\n\t}\n\n\treturn calendarComp\n}\n","/**\n * @copyright Copyright (c) 2019 Georg Ehrke\n *\n * @author Georg Ehrke <georg-nextcloud@ehrke.email>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\n\n/**\n *\n * @param baseClass\n */\nexport default function observerTrait(baseClass) {\n\n\t/**\n\t * @class ObserverTrait\n\t */\n\treturn class extends baseClass {\n\n\t\t/**\n\t\t * Constructor\n\t\t *\n\t\t * @param {...any} args\n\t\t */\n\t\tconstructor(...args) {\n\t\t\tsuper(...args)\n\n\t\t\t/**\n\t\t\t * List of subscribers\n\t\t\t *\n\t\t\t * @type {Function[]}\n\t\t\t * @private\n\t\t\t */\n\t\t\tthis._subscribers = []\n\t\t}\n\n\t\t/**\n\t\t * Adds a new subscriber\n\t\t *\n\t\t * @param {Function} handler - Handler to be called when modification happens\n\t\t */\n\t\tsubscribe(handler) {\n\t\t\tthis._subscribers.push(handler)\n\t\t}\n\n\t\t/**\n\t\t * Removes a subscriber\n\t\t *\n\t\t * @param {Function} handler - Handler to be no longer called when modification happens\n\t\t */\n\t\tunsubscribe(handler) {\n\t\t\tconst index = this._subscribers.indexOf(handler)\n\t\t\tif (index === -1) {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tthis._subscribers.splice(index, 1)\n\t\t}\n\n\t\t/**\n\t\t * Notify all subscribed handlers\n\t\t *\n\t\t * @param {...any} args\n\t\t * @protected\n\t\t */\n\t\t_notifySubscribers(...args) {\n\t\t\tfor (const handler of this._subscribers) {\n\t\t\t\thandler(...args)\n\t\t\t}\n\t\t}\n\n\t}\n}\n","/**\n * @copyright Copyright (c) 2019 Georg Ehrke\n *\n * @author Georg Ehrke <georg-nextcloud@ehrke.email>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\n\nimport { uc } from '../helpers/stringHelper.js'\nimport lockableTrait from '../traits/lockable.js'\nimport observerTrait from '../traits/observer.js'\n\n/**\n * @class Parameter\n * @classdesc This class represents a property parameters as defined in RFC 5545 Section 3.2\n *\n * @url https://tools.ietf.org/html/rfc5545#section-3.2\n * @url\n */\nexport default class Parameter extends observerTrait(lockableTrait(class {})) {\n\n\t/**\n\t * Constructor\n\t *\n\t * @param {string} name The name of the parameter\n\t * @param {string|Array|null} value The value of the parameter\n\t */\n\tconstructor(name, value = null) {\n\t\tsuper()\n\n\t\t/**\n\t\t * Name of the parameter\n\t\t *\n\t\t * @type {string}\n\t\t * @private\n\t\t */\n\t\tthis._name = uc(name)\n\n\t\t/**\n\t\t * Value of the parameter\n\t\t *\n\t\t * @type {string|Array|null}\n\t\t * @private\n\t\t */\n\t\tthis._value = value\n\t}\n\n\t/**\n\t * Get parameter name\n\t *\n\t * @readonly\n\t * @return {string}\n\t */\n\tget name() {\n\t\treturn this._name\n\t}\n\n\t/**\n\t * Get parameter value\n\t *\n\t * @return {string | Array}\n\t */\n\tget value() {\n\t\treturn this._value\n\t}\n\n\t/**\n\t * Set new parameter value\n\t *\n\t * @throws {ModificationNotAllowedError} if parameter is locked for modification\n\t * @param {string | Array} value The new value to set\n\t */\n\tset value(value) {\n\t\tthis._modifyContent()\n\t\tthis._value = value\n\t}\n\n\t/**\n\t * Gets the first value of this parameter\n\t *\n\t * @return {string | null}\n\t */\n\tgetFirstValue() {\n\t\tif (!this.isMultiValue()) {\n\t\t\treturn this.value\n\t\t} else {\n\t\t\tif (this.value.length > 0) {\n\t\t\t\treturn this.value[0]\n\t\t\t}\n\t\t}\n\n\t\treturn null\n\t}\n\n\t/**\n\t * Gets an iterator for all values\n\t */\n\t* getValueIterator() {\n\t\tif (this.isMultiValue()) {\n\t\t\tyield * this.value.slice()[Symbol.iterator]()\n\t\t} else {\n\t\t\tyield this.value\n\t\t}\n\t}\n\n\t/**\n\t * Returns whether or not the value is a multivalue\n\t *\n\t * @return {boolean}\n\t */\n\tisMultiValue() {\n\t\treturn Array.isArray(this._value)\n\t}\n\n\t/**\n\t * Creates a copy of this parameter\n\t *\n\t * @return {Parameter}\n\t */\n\tclone() {\n\t\tconst parameter = new this.constructor(this._name)\n\t\tif (this.isMultiValue()) {\n\t\t\t// only copy array values, don't copy array reference\n\t\t\tparameter.value = this._value.slice()\n\t\t} else {\n\t\t\tparameter.value = this._value\n\t\t}\n\n\t\t// cloned parameters are always mutable\n\t\treturn parameter\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\t_modifyContent() {\n\t\tsuper._modifyContent()\n\t\tthis._notifySubscribers()\n\t}\n\n}\n","/**\n * @copyright Copyright (c) 2019 Georg Ehrke\n *\n * @author Georg Ehrke <georg-nextcloud@ehrke.email>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nimport lockableTrait from '../traits/lockable.js'\nimport observerTrait from '../traits/observer.js'\n\n/**\n * @class AbstractValue\n * @classdesc BaseClass for all values\n */\nexport default class AbstractValue extends observerTrait(lockableTrait(class {})) {\n\n\t/**\n\t * Constructor\n\t *\n\t * @param {ICAL.Binary|ICAL.Duration|ICAL.Period|ICAL.Recur|ICAL.Time|ICAL.UtcOffset} icalValue The ICAL.JS object to wrap\n\t */\n\tconstructor(icalValue) {\n\t\tif (new.target === AbstractValue) {\n\t\t\tthrow new TypeError('Cannot instantiate abstract class AbstractValue')\n\t\t}\n\t\tsuper()\n\n\t\t/**\n\t\t * Wrapped ICAL.js value\n\t\t *\n\t\t * @type {ICAL.Binary|ICAL.Duration|ICAL.Period|ICAL.Recur|ICAL.Time|ICAL.UtcOffset}\n\t\t */\n\t\tthis._innerValue = icalValue\n\t}\n\n\t/**\n\t * Gets wrapped ICAL.JS object\n\t *\n\t * @return {*}\n\t */\n\ttoICALJs() {\n\t\treturn this._innerValue\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\t_modifyContent() {\n\t\tsuper._modifyContent()\n\t\tthis._notifySubscribers()\n\t}\n\n}\n","/**\n * @copyright Copyright (c) 2019 Georg Ehrke\n *\n * @author Georg Ehrke <georg-nextcloud@ehrke.email>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nimport AbstractValue from './abstractValue.js'\nimport ICAL from 'ical.js'\n\n/**\n * @class BinaryValue\n * @classdesc Wrapper for ICAL.Binary\n *\n * @url https://tools.ietf.org/html/rfc5545#section-3.1.3\n * @url https://github.com/mozilla-comm/ical.js/blob/master/lib/ical/binary.js\n */\nexport default class BinaryValue extends AbstractValue {\n\n\t/**\n\t * Sets the raw b64 encoded value\n\t *\n\t * @return {string}\n\t */\n\tget rawValue() {\n\t\treturn this._innerValue.value\n\t}\n\n\t/**\n\t * Gets the raw b64 encoded value\n\t *\n\t * @throws {ModificationNotAllowedError} if value is locked for modification\n\t * @param {string} value - The new raw value\n\t */\n\tset rawValue(value) {\n\t\tthis._modifyContent()\n\t\tthis._innerValue.value = value\n\t}\n\n\t/**\n\t * Gets the decoded value\n\t *\n\t * @return {string}\n\t */\n\tget value() {\n\t\treturn this._innerValue.decodeValue()\n\t}\n\n\t/**\n\t * Sets the decoded Value\n\t *\n\t * @throws {ModificationNotAllowedError} if value is locked for modification\n\t * @param  {string} decodedValue - The new encoded value\n\t */\n\tset value(decodedValue) {\n\t\tthis._modifyContent()\n\t\tthis._innerValue.setEncodedValue(decodedValue)\n\t}\n\n\t/**\n\t * clones this value\n\t *\n\t * @return {BinaryValue}\n\t */\n\tclone() {\n\t\treturn BinaryValue.fromRawValue(this._innerValue.value)\n\t}\n\n\t/**\n\t * Create a new BinaryValue object from an ICAL.Binary object\n\t *\n\t * @param {ICAL.Binary} icalValue - The ICAL.Binary object\n\t * @return {BinaryValue}\n\t */\n\tstatic fromICALJs(icalValue) {\n\t\treturn new BinaryValue(icalValue)\n\t}\n\n\t/**\n\t * Create a new BinaryValue object from a raw b64 encoded value\n\t *\n\t * @param {string} rawValue - The raw value\n\t * @return {BinaryValue}\n\t */\n\tstatic fromRawValue(rawValue) {\n\t\tconst icalBinary = new ICAL.Binary(rawValue)\n\t\treturn BinaryValue.fromICALJs(icalBinary)\n\t}\n\n\t/**\n\t * Create a new BinaryValue object from decoded value\n\t *\n\t * @param {string} decodedValue - The encoded value\n\t * @return {BinaryValue}\n\t */\n\tstatic fromDecodedValue(decodedValue) {\n\t\tconst icalBinary = new ICAL.Binary()\n\t\ticalBinary.setEncodedValue(decodedValue)\n\t\treturn BinaryValue.fromICALJs(icalBinary)\n\t}\n\n}\n","/**\n * @copyright Copyright (c) 2019 Georg Ehrke\n *\n * @author Georg Ehrke <georg-nextcloud@ehrke.email>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nimport AbstractValue from './abstractValue.js'\nimport ICAL from 'ical.js'\n\n/**\n * @class DurationValue\n * @classdesc Wrapper for ICAL.Duration\n *\n * @url https://tools.ietf.org/html/rfc5545#section-3.3.6\n * @url https://github.com/mozilla-comm/ical.js/blob/master/lib/ical/duration.js\n */\nexport default class DurationValue extends AbstractValue {\n\n\t/**\n\t * Gets the weeks of the stored duration-value\n\t *\n\t * @return {number}\n\t */\n\tget weeks() {\n\t\treturn this._innerValue.weeks\n\t}\n\n\t/**\n\t * Sets the weeks of the stored duration-value\n\t *\n\t * @throws {ModificationNotAllowedError} if value is locked for modification\n\t * @throws {TypeError} if value is negative\n\t * @param {number} weeks Amount of weeks\n\t */\n\tset weeks(weeks) {\n\t\tthis._modifyContent()\n\t\tif (weeks < 0) {\n\t\t\tthrow new TypeError('Weeks cannot be negative, use isNegative instead')\n\t\t}\n\n\t\tthis._innerValue.weeks = weeks\n\t}\n\n\t/**\n\t * Gets the days of the stored duration-value\n\t *\n\t * @return {number}\n\t */\n\tget days() {\n\t\treturn this._innerValue.days\n\t}\n\n\t/**\n\t * Sets the days of the stored duration-value\n\t *\n\t * @throws {ModificationNotAllowedError} if value is locked for modification\n\t * @throws {TypeError} if value is negative\n\t * @param {number} days Amount of days\n\t */\n\tset days(days) {\n\t\tthis._modifyContent()\n\t\tif (days < 0) {\n\t\t\tthrow new TypeError('Days cannot be negative, use isNegative instead')\n\t\t}\n\n\t\tthis._innerValue.days = days\n\t}\n\n\t/**\n\t * Gets the hours of the stored duration-value\n\t *\n\t * @return {number}\n\t */\n\tget hours() {\n\t\treturn this._innerValue.hours\n\t}\n\n\t/**\n\t * Sets the weeks of the stored duration-value\n\t *\n\t * @throws {ModificationNotAllowedError} if value is locked for modification\n\t * @throws {TypeError} if value is negative\n\t * @param {number} hours Amount of hours\n\t */\n\tset hours(hours) {\n\t\tthis._modifyContent()\n\t\tif (hours < 0) {\n\t\t\tthrow new TypeError('Hours cannot be negative, use isNegative instead')\n\t\t}\n\n\t\tthis._innerValue.hours = hours\n\t}\n\n\t/**\n\t * Gets the minutes of the stored duration-value\n\t *\n\t * @return {number}\n\t */\n\tget minutes() {\n\t\treturn this._innerValue.minutes\n\t}\n\n\t/**\n\t * Sets the minutes of the stored duration-value\n\t *\n\t * @throws {ModificationNotAllowedError} if value is locked for modification\n\t * @throws {TypeError} if value is negative\n\t * @param {number} minutes Amount of minutes\n\t */\n\tset minutes(minutes) {\n\t\tthis._modifyContent()\n\t\tif (minutes < 0) {\n\t\t\tthrow new TypeError('Minutes cannot be negative, use isNegative instead')\n\t\t}\n\n\t\tthis._innerValue.minutes = minutes\n\t}\n\n\t/**\n\t * Gets the seconds of the stored duration-value\n\t *\n\t * @return {number}\n\t */\n\tget seconds() {\n\t\treturn this._innerValue.seconds\n\t}\n\n\t/**\n\t * Sets the seconds of the stored duration-value\n\t *\n\t * @throws {ModificationNotAllowedError} if value is locked for modification\n\t * @throws {TypeError} if value is negative\n\t * @param {number} seconds Amount of seconds\n\t */\n\tset seconds(seconds) {\n\t\tthis._modifyContent()\n\t\tif (seconds < 0) {\n\t\t\tthrow new TypeError('Seconds cannot be negative, use isNegative instead')\n\t\t}\n\n\t\tthis._innerValue.seconds = seconds\n\t}\n\n\t/**\n\t * Gets the negative-indicator of the stored duration-value\n\t *\n\t * @return {boolean}\n\t */\n\tget isNegative() {\n\t\treturn this._innerValue.isNegative\n\t}\n\n\t/**\n\t * Gets the negative-indicator of the stored duration-value\n\t *\n\t * @throws {ModificationNotAllowedError} if value is locked for modification\n\t * @param {boolean} isNegative Whether or not the duration is negative\n\t */\n\tset isNegative(isNegative) {\n\t\tthis._modifyContent()\n\t\tthis._innerValue.isNegative = !!isNegative\n\t}\n\n\t/**\n\t * Gets the amount of total seconds of the stored duration-value\n\t *\n\t * @return {* | number}\n\t */\n\tget totalSeconds() {\n\t\treturn this._innerValue.toSeconds()\n\t}\n\n\t/**\n\t * Sets the amount of total seconds of the stored duration-value\n\t *\n\t * @throws {ModificationNotAllowedError} if value is locked for modification\n\t * @param {number} totalSeconds The total amounts of seconds to set\n\t */\n\tset totalSeconds(totalSeconds) {\n\t\tthis._modifyContent()\n\t\tthis._innerValue.fromSeconds(totalSeconds)\n\t}\n\n\t/**\n\t * Compares this duration to another one\n\t *\n\t * @param {DurationValue} otherDuration The duration to compare to\n\t * @return {number} -1, 0 or 1 for less/equal/greater\n\t */\n\tcompare(otherDuration) {\n\t\treturn this._innerValue.compare(otherDuration.toICALJs())\n\t}\n\n\t/**\n\t * Adds the value of another duration to this one\n\t *\n\t * @throws {ModificationNotAllowedError} if value is locked for modification\n\t * @param {DurationValue} otherDuration The duration to add\n\t */\n\taddDuration(otherDuration) {\n\t\tthis._modifyContent()\n\t\tthis.totalSeconds += otherDuration.totalSeconds\n\t\tthis._innerValue.normalize()\n\t}\n\n\t/**\n\t * Subtract the value of another duration from this one\n\t *\n\t * @throws {ModificationNotAllowedError} if value is locked for modification\n\t * @param {DurationValue} otherDuration The duration to subtract\n\t */\n\tsubtractDuration(otherDuration) {\n\t\tthis._modifyContent()\n\t\tthis.totalSeconds -= otherDuration.totalSeconds\n\t\tthis._innerValue.normalize()\n\t}\n\n\t/**\n\t * clones this value\n\t *\n\t * @return {DurationValue}\n\t */\n\tclone() {\n\t\treturn DurationValue.fromICALJs(this._innerValue.clone())\n\t}\n\n\t/**\n\t * Create a new DurationValue object from an ICAL.Duration object\n\t *\n\t * @param {ICAL.Duration} icalValue The ical.js duration value\n\t * @return {DurationValue}\n\t */\n\tstatic fromICALJs(icalValue) {\n\t\treturn new DurationValue(icalValue)\n\t}\n\n\t/**\n\t * Create a new DurationValue object from a number of seconds\n\t *\n\t * @param {number} seconds Total amount of seconds\n\t * @return {DurationValue}\n\t */\n\tstatic fromSeconds(seconds) {\n\t\tconst icalDuration = ICAL.Duration.fromSeconds(seconds)\n\t\treturn new DurationValue(icalDuration)\n\n\t}\n\n\t/**\n\t * Create a new DurationValue object from data\n\t *\n\t * @param {object} data The destructuring object\n\t * @param {number=} data.weeks Number of weeks to set\n\t * @param {number=} data.days Number of days to set\n\t * @param {number=} data.hours Number of hours to set\n\t * @param {number=} data.minutes Number of minutes to set\n\t * @param {number=} data.seconds Number of seconds to set\n\t * @param {boolean=} data.isNegative Whether or not duration is negative\n\t * @return {DurationValue}\n\t */\n\tstatic fromData(data) {\n\t\tconst icalDuration = ICAL.Duration.fromData(data)\n\t\treturn new DurationValue(icalDuration)\n\t}\n\n}\n","/**\n * @copyright Copyright (c) 2019 Georg Ehrke\n *\n * @author Georg Ehrke <georg-nextcloud@ehrke.email>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nimport AbstractValue from './abstractValue.js'\nimport DurationValue from './durationValue.js'\nimport ICAL from 'ical.js'\n\n/**\n * @class DateTimeValue\n * @classdesc Wrapper for ICAL.Time\n *\n * @url https://tools.ietf.org/html/rfc5545#section-3.3.4\n * @url https://tools.ietf.org/html/rfc5545#section-3.3.5\n * @url https://tools.ietf.org/html/rfc5545#section-3.3.12\n * @url https://github.com/mozilla-comm/ical.js/blob/master/lib/ical/time.js\n */\nexport default class DateTimeValue extends AbstractValue {\n\n\t/**\n\t * Gets the year of the stored date-time-value\n\t *\n\t * @return {number}\n\t */\n\tget year() {\n\t\treturn this._innerValue.year\n\t}\n\n\t/**\n\t * Sets the year of the stored date-time-value\n\t *\n\t * @throws {ModificationNotAllowedError} if value is locked for modification\n\t * @param {number} year Number of years to set\n\t */\n\tset year(year) {\n\t\tthis._modifyContent()\n\t\tthis._innerValue.year = year\n\t}\n\n\t/**\n\t * Gets the month of the stored date-time-value\n\t *\n\t * @return {number}\n\t */\n\tget month() {\n\t\treturn this._innerValue.month\n\t}\n\n\t/**\n\t * Sets the month of the stored date-time-value\n\t *\n\t * @throws {ModificationNotAllowedError} if value is locked for modification\n\t * @param {number} month Number of months to set\n\t */\n\tset month(month) {\n\t\tthis._modifyContent()\n\t\tif (month < 1 || month > 12) {\n\t\t\tthrow new TypeError('Month out of range')\n\t\t}\n\n\t\tthis._innerValue.month = month\n\t}\n\n\t/**\n\t * Gets the day of the stored date-time-value\n\t *\n\t * @return {number}\n\t */\n\tget day() {\n\t\treturn this._innerValue.day\n\t}\n\n\t/**\n\t * Sets the day of the stored date-time-value\n\t *\n\t * @throws {ModificationNotAllowedError} if value is locked for modification\n\t * @throws {TypeError} if out of range\n\t * @param {number} day Number of days to set\n\t */\n\tset day(day) {\n\t\tthis._modifyContent()\n\t\tif (day < 1 || day > 31) {\n\t\t\tthrow new TypeError('Day out of range')\n\t\t}\n\n\t\tthis._innerValue.day = day\n\t}\n\n\t/**\n\t * Gets the hour of the stored date-time-value\n\t *\n\t * @return {number}\n\t */\n\tget hour() {\n\t\treturn this._innerValue.hour\n\t}\n\n\t/**\n\t * Sets the hour of the stored date-time-value\n\t *\n\t * @throws {ModificationNotAllowedError} if value is locked for modification\n\t * @throws {TypeError} if out of range\n\t * @param {number} hour Number of hours to set\n\t */\n\tset hour(hour) {\n\t\tthis._modifyContent()\n\t\tif (hour < 0 || hour > 23) {\n\t\t\tthrow new TypeError('Hour out of range')\n\t\t}\n\n\t\tthis._innerValue.hour = hour\n\t}\n\n\t/**\n\t * Gets the minute of the stored date-time-value\n\t *\n\t * @return {number}\n\t */\n\tget minute() {\n\t\treturn this._innerValue.minute\n\t}\n\n\t/**\n\t * Sets the minute of the stored date-time-value\n\t *\n\t * @throws {ModificationNotAllowedError} if value is locked for modification\n\t * @throws {TypeError} if out of range\n\t * @param {number} minute Number of minutes to set\n\t */\n\tset minute(minute) {\n\t\tthis._modifyContent()\n\t\tif (minute < 0 || minute > 59) {\n\t\t\tthrow new TypeError('Minute out of range')\n\t\t}\n\n\t\tthis._innerValue.minute = minute\n\t}\n\n\t/**\n\t * Gets the second of the stored date-time-value\n\t *\n\t * @return {number}\n\t */\n\tget second() {\n\t\treturn this._innerValue.second\n\t}\n\n\t/**\n\t * Sets the second of the stored date-time-value\n\t *\n\t * @throws {ModificationNotAllowedError} if value is locked for modification\n\t * @throws {TypeError} if out of range\n\t * @param {number} second Number of seconds to set\n\t */\n\tset second(second) {\n\t\tthis._modifyContent()\n\t\tif (second < 0 || second > 59) {\n\t\t\tthrow new TypeError('Second out of range')\n\t\t}\n\n\t\tthis._innerValue.second = second\n\t}\n\n\t/**\n\t * Gets the timezone of this date-time-value\n\t *\n\t * @return {string | null}\n\t */\n\tget timezoneId() {\n\t\t// If zone.tzid is set and it's not 'floating' nor 'UTC', then it's a proper\n\t\t// timezone that we also have a timezone id for\n\t\tif (this._innerValue.zone.tzid && this._innerValue.zone.tzid !== 'floating' && this._innerValue.zone.tzid === 'UTC') {\n\t\t\treturn this._innerValue.zone.tzid\n\t\t}\n\n\t\t// If there is a timezone set, but we didn't have a zone.tzid in the previous if,\n\t\t// this means that the tzid does not have a definition stored along it.\n\t\t// we will keep this information anyway to not lose it\n\t\tif (this._innerValue.timezone) {\n\t\t\treturn this._innerValue.timezone\n\t\t}\n\n\t\t// this is the case when it's floating / UTC\n\t\treturn this._innerValue.zone.tzid || null\n\t}\n\n\t/**\n\t * Gets whether this date-time-value is a date or date-time\n\t *\n\t * @return {boolean}\n\t */\n\tget isDate() {\n\t\treturn this._innerValue.isDate\n\t}\n\n\t/**\n\t * Sets whether this date-time-value is a date or date-time\n\t *\n\t * @throws {ModificationNotAllowedError} if value is locked for modification\n\t * @param {boolean} isDate Whether this is a date or date-time value\n\t */\n\tset isDate(isDate) {\n\t\tthis._modifyContent()\n\t\tthis._innerValue.isDate = !!isDate\n\n\t\tif (isDate) {\n\t\t\tthis._innerValue.hour = 0\n\t\t\tthis._innerValue.minute = 0\n\t\t\tthis._innerValue.second = 0\n\t\t}\n\t}\n\n\t/**\n\t * Gets the unix-time\n\t *\n\t * @return {number}\n\t */\n\tget unixTime() {\n\t\treturn this._innerValue.toUnixTime()\n\t}\n\n\t/**\n\t * returns vanilla javascript date object\n\t *\n\t * @return {Date}\n\t */\n\tget jsDate() {\n\t\treturn this._innerValue.toJSDate()\n\t}\n\n\t/**\n\t * Adds a duration to this date-time-value\n\t *\n\t * @param {DurationValue} duration The duration to ad\n\t */\n\taddDuration(duration) {\n\t\tthis._innerValue.addDuration(duration.toICALJs())\n\t}\n\n\t/**\n\t * Subtract another date excluding timezones\n\t *\n\t * @param {DateTimeValue} other The date-time value to subtract\n\t * @return {DurationValue}\n\t */\n\tsubtractDateWithoutTimezone(other) {\n\t\tconst icalDuration = this._innerValue.subtractDate(other.toICALJs())\n\t\treturn DurationValue.fromICALJs(icalDuration)\n\t}\n\n\t/**\n\t * Subtract another date, taking timezones into account\n\t *\n\t * @param {DateTimeValue} other The date-time value to subtract\n\t * @return {DurationValue}\n\t */\n\tsubtractDateWithTimezone(other) {\n\t\tconst icalDuration = this._innerValue.subtractDateTz(other.toICALJs())\n\t\treturn DurationValue.fromICALJs(icalDuration)\n\t}\n\n\t/**\n\t * Compares this DateTimeValue object with another one\n\t *\n\t * @param {DateTimeValue} other The date-time to compare to\n\t * @return {number} -1, 0 or 1 for less/equal/greater\n\t */\n\tcompare(other) {\n\t\treturn this._innerValue.compare(other.toICALJs())\n\t}\n\n\t/**\n\t * Compares only the date part in a given timezone\n\t *\n\t * @param {DateTimeValue} other The date-time to compare to\n\t * @param {Timezone} timezone The timezone to compare in\n\t * @return {number} -1, 0 or 1 for less/equal/greater\n\t */\n\tcompareDateOnlyInGivenTimezone(other, timezone) {\n\t\treturn this._innerValue.compareDateOnlyTz(other.toICALJs(), timezone.toICALTimezone())\n\t}\n\n\t/**\n\t * Returns a clone of this object which was converted to a different timezone\n\t *\n\t * @param {Timezone} timezone TimezoneId to convert to\n\t * @return {DateTimeValue}\n\t */\n\tgetInTimezone(timezone) {\n\t\tconst clonedICALTime = this._innerValue.convertToZone(timezone.toICALTimezone())\n\t\treturn DateTimeValue.fromICALJs(clonedICALTime)\n\t}\n\n\t/**\n\t * Get the inner ICAL.Timezone\n\t *\n\t * @return {ICAL.Timezone}\n\t * @package\n\t */\n\tgetICALTimezone() {\n\t\treturn this._innerValue.zone\n\t}\n\n\t/**\n\t * Returns a clone of this object which was converted to a different timezone\n\t *\n\t * @param {ICAL.Timezone} timezone TimezoneId to convert to\n\t * @return {DateTimeValue}\n\t * @package\n\t */\n\tgetInICALTimezone(timezone) {\n\t\tconst clonedICALTime = this._innerValue.convertToZone(timezone)\n\t\treturn DateTimeValue.fromICALJs(clonedICALTime)\n\t}\n\n\t/**\n\t * Returns a clone of this object which was converted to UTC\n\t *\n\t * @return {DateTimeValue}\n\t */\n\tgetInUTC() {\n\t\tconst clonedICALTime = this._innerValue.convertToZone(ICAL.Timezone.utcTimezone)\n\t\treturn DateTimeValue.fromICALJs(clonedICALTime)\n\t}\n\n\t/**\n\t * This silently replaces the inner timezone without converting the actual time\n\t *\n\t * @param {ICAL.Timezone} timezone The timezone to replace with\n\t * @package\n\t */\n\tsilentlyReplaceTimezone(timezone) {\n\t\tthis._modify()\n\t\tthis._innerValue = new ICAL.Time({\n\t\t\tyear: this.year,\n\t\t\tmonth: this.month,\n\t\t\tday: this.day,\n\t\t\thour: this.hour,\n\t\t\tminute: this.minute,\n\t\t\tsecond: this.second,\n\t\t\tisDate: this.isDate,\n\t\t\ttimezone,\n\t\t})\n\t}\n\n\t/**\n\t * Replaces the inner timezone without converting the actual time\n\t *\n\t * @param {Timezone} timezone The timezone to replace with\n\t */\n\treplaceTimezone(timezone) {\n\t\tthis._modifyContent()\n\t\tthis._innerValue = ICAL.Time.fromData({\n\t\t\tyear: this.year,\n\t\t\tmonth: this.month,\n\t\t\tday: this.day,\n\t\t\thour: this.hour,\n\t\t\tminute: this.minute,\n\t\t\tsecond: this.second,\n\t\t\tisDate: this.isDate,\n\t\t}, timezone.toICALTimezone())\n\t}\n\n\t/**\n\t * Calculates the UTC offset of the date-time-value in its timezone\n\t *\n\t * @return {number}\n\t */\n\tutcOffset() {\n\t\treturn this._innerValue.utcOffset()\n\t}\n\n\t/**\n\t * Check if this is an event with floating time\n\t *\n\t * @return {boolean}\n\t */\n\tisFloatingTime() {\n\t\treturn this._innerValue.zone.tzid === 'floating'\n\t}\n\n\t/**\n\t * clones this value\n\t *\n\t * @return {DateTimeValue}\n\t */\n\tclone() {\n\t\treturn DateTimeValue.fromICALJs(this._innerValue.clone())\n\t}\n\n\t/**\n\t * Create a new DateTimeValue object from an ICAL.Time object\n\t *\n\t * @param {ICAL.Time} icalValue The ical.js Date value to initialise from\n\t * @return {DateTimeValue}\n\t */\n\tstatic fromICALJs(icalValue) {\n\t\treturn new DateTimeValue(icalValue)\n\t}\n\n\t/**\n\t * Creates a new DateTimeValue object based on a vanilla javascript object\n\t *\n\t * @param {Date} jsDate The JavaScript date to initialise from\n\t * @param {boolean=} useUTC Whether or not to treat it as UTC\n\t * @return {DateTimeValue}\n\t */\n\tstatic fromJSDate(jsDate, useUTC = false) {\n\t\tconst icalValue = ICAL.Time.fromJSDate(jsDate, useUTC)\n\t\treturn DateTimeValue.fromICALJs(icalValue)\n\t}\n\n\t/**\n\t * Creates a new DateTimeValue object based on simple parameters\n\t *\n\t * @param {object} data The destructuring object\n\t * @param {number=} data.year Amount of years to set\n\t * @param {number=} data.month Amount of month to set (1-based)\n\t * @param {number=} data.day Amount of days to set\n\t * @param {number=} data.hour Amount of hours to set\n\t * @param {number=} data.minute Amount of minutes to set\n\t * @param {number=} data.second Amount of seconds to set\n\t * @param {boolean=} data.isDate Whether this is a date or date-time\n\t * @param {Timezone=} timezone The timezone of the DateTimeValue\n\t * @return {DateTimeValue}\n\t */\n\tstatic fromData(data, timezone) {\n\t\tconst icalValue = ICAL.Time.fromData(data, timezone\n\t\t\t? timezone.toICALTimezone()\n\t\t\t: undefined)\n\t\treturn DateTimeValue.fromICALJs(icalValue)\n\t}\n\n}\n\nDateTimeValue.SUNDAY = ICAL.Time.SUNDAY\nDateTimeValue.MONDAY = ICAL.Time.MONDAY\nDateTimeValue.TUESDAY = ICAL.Time.TUESDAY\nDateTimeValue.WEDNESDAY = ICAL.Time.WEDNESDAY\nDateTimeValue.THURSDAY = ICAL.Time.THURSDAY\nDateTimeValue.FRIDAY = ICAL.Time.FRIDAY\nDateTimeValue.SATURDAY = ICAL.Time.SATURDAY\n\nDateTimeValue.DEFAULT_WEEK_START = DateTimeValue.MONDAY\n","/**\n * @copyright Copyright (c) 2019 Georg Ehrke\n *\n * @author Georg Ehrke <georg-nextcloud@ehrke.email>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nimport AbstractValue from './abstractValue.js'\nimport DateTimeValue from './dateTimeValue.js'\nimport DurationValue from './durationValue.js'\nimport ICAL from 'ical.js'\n\n/**\n * @class PeriodValue\n * @classdesc Wrapper for ICAL.Period\n *\n * @url https://tools.ietf.org/html/rfc5545#section-3.3.9\n * @url https://github.com/mozilla-comm/ical.js/blob/master/lib/ical/period.js\n */\nexport default class PeriodValue extends AbstractValue {\n\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor(...args) {\n\t\tsuper(...args)\n\n\t\t/**\n\t\t * DateTimeValue object for start\n\t\t *\n\t\t * @type {DateTimeValue}\n\t\t * @private\n\t\t */\n\t\tthis._start = DateTimeValue.fromICALJs(this._innerValue.start)\n\n\t\t/**\n\t\t * DateTimeValue object for end\n\t\t *\n\t\t * @type {DateTimeValue|null}\n\t\t * @private\n\t\t */\n\t\tthis._end = null\n\n\t\t/**\n\t\t * DurationValue object for duration\n\t\t *\n\t\t * @type {DurationValue|null}\n\t\t * @private\n\t\t */\n\t\tthis._duration = null\n\t}\n\n\t/**\n\t * Gets the start of the period-value\n\t *\n\t * @return {DateTimeValue}\n\t */\n\tget start() {\n\t\treturn this._start\n\t}\n\n\t/**\n\t * Sets the start of the period-value\n\t *\n\t * @throws {ModificationNotAllowedError} if value is locked for modification\n\t * @param {DateTimeValue} start The start of the period\n\t */\n\tset start(start) {\n\t\tthis._modifyContent()\n\t\tthis._start = start\n\t\tthis._innerValue.start = start.toICALJs()\n\t}\n\n\t/**\n\t * Gets the end of the period-value\n\t *\n\t * @return {DateTimeValue}\n\t */\n\tget end() {\n\t\tif (!this._end) {\n\t\t\tif (this._duration) {\n\t\t\t\tthis._duration.lock()\n\t\t\t\tthis._duration = null\n\t\t\t}\n\n\t\t\tthis._innerValue.end = this._innerValue.getEnd()\n\t\t\tthis._end = DateTimeValue.fromICALJs(this._innerValue.end)\n\t\t\tthis._innerValue.duration = null\n\n\t\t\tif (this.isLocked()) {\n\t\t\t\tthis._end.lock()\n\t\t\t}\n\t\t}\n\n\t\treturn this._end\n\t}\n\n\t/**\n\t * Sets the end of the period-value\n\t *\n\t * @throws {ModificationNotAllowedError} if value is locked for modification\n\t * @param {DateTimeValue} end The end of the period\n\t */\n\tset end(end) {\n\t\tthis._modifyContent()\n\t\tthis._innerValue.duration = null\n\t\tthis._innerValue.end = end.toICALJs()\n\t\tthis._end = end\n\t}\n\n\t/**\n\t * Gets the duration of the period-value\n\t * The value is automatically locked.\n\t * If you want to edit the value, clone it and it as new duration\n\t *\n\t * @return {DurationValue}\n\t */\n\tget duration() {\n\t\tif (!this._duration) {\n\t\t\tif (this._end) {\n\t\t\t\tthis._end.lock()\n\t\t\t\tthis._end = null\n\t\t\t}\n\n\t\t\tthis._innerValue.duration = this._innerValue.getDuration()\n\t\t\tthis._duration = DurationValue.fromICALJs(this._innerValue.duration)\n\t\t\tthis._innerValue.end = null\n\n\t\t\tif (this.isLocked()) {\n\t\t\t\tthis._duration.lock()\n\t\t\t}\n\t\t}\n\n\t\treturn this._duration\n\t}\n\n\t/**\n\t * Sets the duration of the period-value\n\t *\n\t * @throws {ModificationNotAllowedError} if value is locked for modification\n\t * @param {DurationValue} duration The duration to set\n\t */\n\tset duration(duration) {\n\t\tthis._modifyContent()\n\t\tthis._innerValue.end = null\n\t\tthis._innerValue.duration = duration.toICALJs()\n\t\tthis._duration = duration\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tlock() {\n\t\tsuper.lock()\n\t\tthis.start.lock()\n\n\t\tif (this._end) {\n\t\t\tthis._end.lock()\n\t\t}\n\t\tif (this._duration) {\n\t\t\tthis._duration.lock()\n\t\t}\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tunlock() {\n\t\tsuper.unlock()\n\t\tthis.start.unlock()\n\n\t\tif (this._end) {\n\t\t\tthis._end.unlock()\n\t\t}\n\t\tif (this._duration) {\n\t\t\tthis._duration.unlock()\n\t\t}\n\t}\n\n\t/**\n\t * clones this value\n\t *\n\t * @return {PeriodValue}\n\t */\n\tclone() {\n\t\treturn PeriodValue.fromICALJs(this._innerValue.clone())\n\t}\n\n\t/**\n\t * Create a new PeriodValue object from a ICAL.Period object\n\t *\n\t * @param {ICAL.Period} icalValue The ical.js period value to initialise from\n\t * @return {PeriodValue}\n\t */\n\tstatic fromICALJs(icalValue) {\n\t\treturn new PeriodValue(icalValue)\n\t}\n\n\t/**\n\t * Create a new PeriodValue object from start and end\n\t *\n\t * @param {object} data The destructuring object\n\t * @param {DateTimeValue} data.start The start of the period\n\t * @param {DateTimeValue} data.end The end of the period\n\t * @return {PeriodValue}\n\t */\n\tstatic fromDataWithEnd(data) {\n\t\tconst icalPeriod = ICAL.Period.fromData({\n\t\t\tstart: data.start.toICALJs(),\n\t\t\tend: data.end.toICALJs(),\n\t\t})\n\t\treturn PeriodValue.fromICALJs(icalPeriod)\n\t}\n\n\t/**\n\t * Create a new PeriodValue object from start and duration\n\t *\n\t * @param {object} data The destructuring object\n\t * @param {DateTimeValue} data.start The start of the period\n\t * @param {DurationValue} data.duration The duration of the period\n\t * @return {PeriodValue}\n\t */\n\tstatic fromDataWithDuration(data) {\n\t\tconst icalPeriod = ICAL.Period.fromData({\n\t\t\tstart: data.start.toICALJs(),\n\t\t\tduration: data.duration.toICALJs(),\n\t\t})\n\t\treturn PeriodValue.fromICALJs(icalPeriod)\n\t}\n\n}\n","/**\n * @copyright Copyright (c) 2019 Georg Ehrke\n *\n * @author Georg Ehrke <georg-nextcloud@ehrke.email>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nimport AbstractValue from './abstractValue.js'\nimport DateTimeValue from './dateTimeValue.js'\nimport { uc } from '../helpers/stringHelper.js'\nimport ICAL from 'ical.js'\n\nconst ALLOWED_FREQ = ['SECONDLY', 'MINUTELY', 'HOURLY', 'DAILY', 'WEEKLY', 'MONTHLY', 'YEARLY']\n\n/**\n * @class RecurValue\n * @classdesc Wrapper for ICAL.Recur\n *\n * @url https://tools.ietf.org/html/rfc5545#section-3.3.10\n * @url https://github.com/mozilla-comm/ical.js/blob/master/lib/ical/recur.js\n */\nexport default class RecurValue extends AbstractValue {\n\n\t/**\n\t * Constructor\n\t *\n\t * @param {ICAL.Recur} icalValue The ical.js rrule value\n\t * @param {DateTimeValue?} until The Until date\n\t */\n\tconstructor(icalValue, until) {\n\t\tsuper(icalValue)\n\n\t\t/**\n\t\t * DateTimeValue object for Until\n\t\t *\n\t\t * @type {DateTimeValue}\n\t\t * @private\n\t\t */\n\t\tthis._until = until\n\t}\n\n\t/**\n\t * Gets the stored interval of this recurrence rule\n\t *\n\t * @return {number}\n\t */\n\tget interval() {\n\t\treturn this._innerValue.interval\n\t}\n\n\t/**\n\t * Sets the stored interval of this recurrence rule\n\t *\n\t * @throws {ModificationNotAllowedError} if value is locked for modification\n\t * @param {number} interval New Interval to set\n\t */\n\tset interval(interval) {\n\t\tthis._modifyContent()\n\t\tthis._innerValue.interval = parseInt(interval, 10)\n\t}\n\n\t/**\n\t * Gets the weekstart used to calculate the recurrence expansion\n\t *\n\t * @return {number}\n\t */\n\tget weekStart() {\n\t\treturn this._innerValue.wkst\n\t}\n\n\t/**\n\t * Sets the weekstart used to calculate the recurrence expansion\n\t *\n\t * @throws {ModificationNotAllowedError} if value is locked for modification\n\t * @throws {TypeError} if weekstart out of range\n\t * @param {number} weekStart New start of week to set\n\t */\n\tset weekStart(weekStart) {\n\t\tthis._modifyContent()\n\t\tif (weekStart < DateTimeValue.SUNDAY || weekStart > DateTimeValue.SATURDAY) {\n\t\t\tthrow new TypeError('Weekstart out of range')\n\t\t}\n\n\t\tthis._innerValue.wkst = weekStart\n\t}\n\n\t/**\n\t * Gets the until value if set\n\t * The value is automatically locked.\n\t * If you want to edit the value, clone it and it as new until\n\t *\n\t * @return {null|DateTimeValue}\n\t */\n\tget until() {\n\t\tif (!this._until && this._innerValue.until) {\n\t\t\tthis._until = DateTimeValue.fromICALJs(this._innerValue.until)\n\t\t}\n\n\t\treturn this._until\n\t}\n\n\t/**\n\t * Sets the until value, automatically removes count\n\t *\n\t * @throws {ModificationNotAllowedError} if value is locked for modification\n\t * @param {DateTimeValue} until New until date to set\n\t */\n\tset until(until) {\n\t\tthis._modifyContent()\n\n\t\tif (this._until) {\n\t\t\tthis._until.lock()\n\t\t}\n\n\t\tthis._until = until\n\t\tthis._innerValue.count = null\n\t\tthis._innerValue.until = until.toICALJs()\n\t}\n\n\t/**\n\t * Gets the count value if set\n\t *\n\t * @return {null | number}\n\t */\n\tget count() {\n\t\treturn this._innerValue.count\n\t}\n\n\t/**\n\t * Sets the count value, automatically removes until\n\t *\n\t * @throws {ModificationNotAllowedError} if value is locked for modification\n\t * @param {number} count New occurrence limit to set\n\t */\n\tset count(count) {\n\t\tthis._modifyContent()\n\n\t\tif (this._until) {\n\t\t\tthis._until.lock()\n\t\t\tthis._until = null\n\t\t}\n\n\t\tthis._innerValue.until = null\n\t\tthis._innerValue.count = parseInt(count, 10)\n\t}\n\n\t/**\n\t * Gets the frequency of the recurrence rule\n\t *\n\t * @return {string} see\n\t */\n\tget frequency() {\n\t\treturn this._innerValue.freq\n\t}\n\n\t/**\n\t * Sets the frequency of the recurrence rule\n\t *\n\t * @throws {ModificationNotAllowedError} if value is locked for modification\n\t * @throws {TypeError} if frequency is unknown\n\t * @param {string} freq New frequency to set\n\t */\n\tset frequency(freq) {\n\t\tthis._modifyContent()\n\t\tif (!ALLOWED_FREQ.includes(freq)) {\n\t\t\tthrow new TypeError('Unknown frequency')\n\t\t}\n\n\t\tthis._innerValue.freq = freq\n\t}\n\n\t/**\n\t * Modifies this recurrence-value to unset count and until\n\t */\n\tsetToInfinite() {\n\t\tthis._modifyContent()\n\n\t\tif (this._until) {\n\t\t\tthis._until.lock()\n\t\t\tthis._until = null\n\t\t}\n\n\t\tthis._innerValue.until = null\n\t\tthis._innerValue.count = null\n\t}\n\n\t/**\n\t * Checks whether the stored rule is finite\n\t *\n\t * @return {boolean}\n\t */\n\tisFinite() {\n\t\treturn this._innerValue.isFinite()\n\t}\n\n\t/**\n\t * Checks whether the recurrence rule is limited by count\n\t *\n\t * @return {boolean}\n\t */\n\tisByCount() {\n\t\treturn this._innerValue.isByCount()\n\t}\n\n\t/**\n\t * Adds a part to a component to the recurrence-rule\n\t *\n\t * @throws {ModificationNotAllowedError} if value is locked for modification\n\t * @param {string} componentName The name of the recurrence-component to add\n\t * @param {string | number} value The value to add\n\t */\n\taddComponent(componentName, value) {\n\t\tthis._modifyContent()\n\t\tthis._innerValue.addComponent(componentName, value)\n\t}\n\n\t/**\n\t * Sets / overwrites a component to the recurrence-rule\n\t *\n\t * @throws {ModificationNotAllowedError} if value is locked for modification\n\t * @param {string} componentName The name of the component to set\n\t * @param {number[] | string[]} value The value to set\n\t */\n\tsetComponent(componentName, value) {\n\t\tthis._modifyContent()\n\n\t\tif (value.length === 0) {\n\t\t\tdelete this._innerValue.parts[componentName.toUpperCase()]\n\t\t} else {\n\t\t\tthis._innerValue.setComponent(componentName, value)\n\t\t}\n\t}\n\n\t/**\n\t * Removes all parts of a component\n\t *\n\t * @throws {ModificationNotAllowedError} if value is locked for modification\n\t * @param {string} componentName The name of the component to remove\n\t */\n\tremoveComponent(componentName) {\n\t\tdelete this._innerValue.parts[uc(componentName)]\n\t}\n\n\t/**\n\t * Gets all parts of a component\n\t *\n\t * @param {string} componentName The name of the component to get\n\t * @return {Array}\n\t */\n\tgetComponent(componentName) {\n\t\treturn this._innerValue.getComponent(componentName)\n\t}\n\n\t/**\n\t * Checks if this recurrence rule is valid according to RFC 5545\n\t *\n\t * @return {boolean}\n\t */\n\tisRuleValid() {\n\t\treturn true\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tlock() {\n\t\tsuper.lock()\n\n\t\tif (this._until) {\n\t\t\tthis._until.lock()\n\t\t}\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tunlock() {\n\t\tsuper.unlock()\n\n\t\tif (this._until) {\n\t\t\tthis._until.unlock()\n\t\t}\n\t}\n\n\t/**\n\t * clones this value\n\t *\n\t * @return {RecurValue}\n\t */\n\tclone() {\n\t\treturn RecurValue.fromICALJs(this._innerValue.clone())\n\t}\n\n\t/**\n\t * Create a new RecurValue object from a ICAL.Recur object\n\t *\n\t * @param {ICAL.Recur} icalValue The ICAL.JS Recur value\n\t * @param {DateTimeValue?} until The Until date\n\t * @return {RecurValue}\n\t */\n\tstatic fromICALJs(icalValue, until = null) {\n\t\treturn new RecurValue(icalValue, until)\n\t}\n\n\t/**\n\t * Create a new RecurValue object from a data object\n\t *\n\t * @param {object} data The destructuring object\n\t * @param {string=} data.freq FREQ part of RRULE\n\t * @param {number=} data.interval INTERVAL part of RRULE\n\t * @param {number=} data.wkst WEEKSTART part of RRULE\n\t * @param {DateTimeValue=} data.until UNTIL part of RRULE\n\t * @param {number=} data.count COUNT part of RRULE\n\t * @param {number[]=} data.bysecond BYSECOND part of RRULE\n\t * @param {number[]=} data.byminute BYMINUTE part of RRULE\n\t * @param {number[]=} data.byhour BYHOUR part of RRULE\n\t * @param {string[]=} data.byday BYDAY part of RRULE\n\t * @param {number[]=} data.bymonthday BYMONTHDAY part of RRULE\n\t * @param {number[]=} data.byyearday BYYEARDAY part of RRULE\n\t * @param {number[]=} data.byweekno BYWEEKNO part of RRULE\n\t * @param {number[]=} data.bymonth BYMONTH part of RRULE\n\t * @param {number[]=} data.bysetpos BYSETPOS part of RRULE\n\t * @return {RecurValue}\n\t */\n\tstatic fromData(data) {\n\t\tlet until = null\n\n\t\tif (data.until) {\n\t\t\tuntil = data.until\n\t\t\tdata.until = data.until.toICALJs()\n\t\t}\n\n\t\tconst icalRecur = ICAL.Recur.fromData(data)\n\t\treturn RecurValue.fromICALJs(icalRecur, until)\n\t}\n\n}\n","/**\n * @copyright Copyright (c) 2019 Georg Ehrke\n *\n * @author Georg Ehrke <georg-nextcloud@ehrke.email>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nimport AbstractValue from './abstractValue.js'\nimport ICAL from 'ical.js'\n\n/**\n * @class UTCOffsetValue\n * @classdesc Wrapper for ICAL.UtcOffset\n *\n * @url https://tools.ietf.org/html/rfc5545#section-3.3.14\n * @url https://github.com/mozilla-comm/ical.js/blob/master/lib/ical/utc_offset.js\n */\nexport default class UTCOffsetValue extends AbstractValue {\n\n\t/**\n\t * Gets the hour part of the offset-value\n\t *\n\t * @return {number}\n\t */\n\tget hours() {\n\t\treturn this._innerValue.hours\n\t}\n\n\t/**\n\t * Sets the hour part of the offset-value\n\t *\n\t * @throws {ModificationNotAllowedError} if value is locked for modification\n\t * @param {number} hours - New hours to set\n\t */\n\tset hours(hours) {\n\t\tthis._modifyContent()\n\t\tthis._innerValue.hours = hours\n\t}\n\n\t/**\n\t * Gets the minute part of the offset-value\n\t *\n\t * @return {number}\n\t */\n\tget minutes() {\n\t\treturn this._innerValue.minutes\n\t}\n\n\t/**\n\t * Sets the minute part of the offset-value\n\t *\n\t * @throws {ModificationNotAllowedError} if value is locked for modification\n\t * @param {number} minutes - New minutes to set\n\t */\n\tset minutes(minutes) {\n\t\tthis._modifyContent()\n\t\tthis._innerValue.minutes = minutes\n\t}\n\n\t/**\n\t * Gets the factor\n\t *\n\t * @return {number}\n\t */\n\tget factor() {\n\t\treturn this._innerValue.factor\n\t}\n\n\t/**\n\t * Sets the factor\n\t *\n\t * @throws {ModificationNotAllowedError} if value is locked for modification\n\t * @throws {TypeError} if factor is neither 1 nor -1\n\t * @param {number} factor - New factor to set, 1 for positive, -1 for negative\n\t */\n\tset factor(factor) {\n\t\tthis._modifyContent()\n\t\tif (factor !== 1 && factor !== -1) {\n\t\t\tthrow new TypeError('Factor may only be set to 1 or -1')\n\t\t}\n\n\t\tthis._innerValue.factor = factor\n\t}\n\n\t/**\n\t * Gets the total amount of seconds\n\t *\n\t * @return {number}\n\t */\n\tget totalSeconds() {\n\t\treturn this._innerValue.toSeconds()\n\t}\n\n\t/**\n\t * Sets the total amount of seconds\n\t *\n\t * @throws {ModificationNotAllowedError} if value is locked for modification\n\t * @param {number} totalSeconds - New number of total seconds to set\n\t */\n\tset totalSeconds(totalSeconds) {\n\t\tthis._modifyContent()\n\t\tthis._innerValue.fromSeconds(totalSeconds)\n\t}\n\n\t/**\n\t * Compares this UTCOffset to another one\n\t *\n\t * @param {UTCOffsetValue} other - The other UTCOffsetValue to compare with\n\t * @return {number} -1, 0 or 1 for less/equal/greater\n\t */\n\tcompare(other) {\n\t\treturn this._innerValue.compare(other.toICALJs())\n\t}\n\n\t/**\n\t * Clones this value\n\t *\n\t * @return {UTCOffsetValue}\n\t */\n\tclone() {\n\t\treturn UTCOffsetValue.fromICALJs(this._innerValue.clone())\n\t}\n\n\t/**\n\t * Create a new UTCOffsetValue object from a ICAL.UTCOffset object\n\t *\n\t * @param {ICAL.UtcOffset} icalValue - The ICAL.UtcOffset object to initialize this object from\n\t * @return {UTCOffsetValue}\n\t */\n\tstatic fromICALJs(icalValue) {\n\t\treturn new UTCOffsetValue(icalValue)\n\t}\n\n\t/**\n\t * Create a new UTCOffsetValue object from a data object\n\t *\n\t * @param {object} data - Object with data to create UTCOffsetValue object from\n\t * @param {number=} data.hours - The number of hours to set\n\t * @param {number=} data.minutes - The number of minutes to set\n\t * @param {number=} data.factor - The factor to use, 1 for positive, -1 for negative\n\t * @return {UTCOffsetValue}\n\t */\n\tstatic fromData(data) {\n\t\tconst icalUTCOffset = new ICAL.UtcOffset()\n\t\ticalUTCOffset.fromData(data)\n\t\treturn UTCOffsetValue.fromICALJs(icalUTCOffset)\n\t}\n\n\t/**\n\t * Create a new UTCOffsetValue object from an amount of seconds\n\t *w\n\t *\n\t * @param {number} seconds - The total number of seconds to create the UTCOffsetValue object from\n\t * @return {UTCOffsetValue}\n\t */\n\tstatic fromSeconds(seconds) {\n\t\tconst icalUTCOffset = ICAL.UtcOffset.fromSeconds(seconds)\n\t\treturn UTCOffsetValue.fromICALJs(icalUTCOffset)\n\t}\n\n}\n","/**\n * @copyright Copyright (c) 2019 Georg Ehrke\n *\n * @author Georg Ehrke <georg-nextcloud@ehrke.email>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\n\nexport default class UnknownICALTypeError extends Error {}\n","/**\n * @copyright Copyright (c) 2019 Georg Ehrke\n *\n * @author Georg Ehrke <georg-nextcloud@ehrke.email>\n *\n * @author Richard Steinmetz <richard@steinmetz.cloud>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nimport AbstractValue from './abstractValue.js'\nimport BinaryValue from './binaryValue.js'\nimport DurationValue from './durationValue.js'\nimport PeriodValue from './periodValue.js'\nimport RecurValue from './recurValue.js'\nimport DateTimeValue from './dateTimeValue.js'\nimport UTCOffsetValue from './utcOffsetValue.js'\nimport UnknownICALTypeError from '../errors/unknownICALTypeError.js'\nimport { lc } from '../helpers/stringHelper.js'\n\n/**\n *\n * @param {string} icaltype The icaltype to get a Value constructor for\n * @return {RecurValue|PeriodValue|BinaryValue|DurationValue|UTCOffsetValue|DateTimeValue}\n */\nexport function getConstructorForICALType(icaltype) {\n\tswitch (lc(icaltype)) {\n\tcase 'binary':\n\t\treturn BinaryValue\n\n\tcase 'date':\n\tcase 'date-time':\n\t\treturn DateTimeValue\n\n\tcase 'duration':\n\t\treturn DurationValue\n\n\tcase 'period':\n\t\treturn PeriodValue\n\n\tcase 'recur':\n\t\treturn RecurValue\n\n\tcase 'utc-offset':\n\t\treturn UTCOffsetValue\n\n\tdefault:\n\t\tthrow new UnknownICALTypeError()\n\t}\n}\n\nexport {\n\tAbstractValue,\n\tBinaryValue,\n\tDateTimeValue,\n\tDurationValue,\n\tPeriodValue,\n\tRecurValue,\n\tUTCOffsetValue,\n}\n","/**\n * @copyright Copyright (c) 2019 Georg Ehrke\n *\n * @author Georg Ehrke <georg-nextcloud@ehrke.email>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nimport ExpectedICalJSError from '../errors/expectedICalJSError.js'\nimport Parameter from '../parameters/parameter.js'\nimport { createProperty } from '../factories/icalFactory.js'\nimport { lc, uc } from '../helpers/stringHelper.js'\nimport { getConstructorForICALType } from '../values/index.js'\nimport AbstractValue from '../values/abstractValue.js'\nimport DateTimeValue from '../values/dateTimeValue.js'\nimport lockableTrait from '../traits/lockable.js'\nimport observerTrait from '../traits/observer.js'\nimport ICAL from 'ical.js'\n\n/**\n * @class Property\n * @classdesc This class represents a property as defined in RFC 5545 Section 3.5\n *\n * @url https://tools.ietf.org/html/rfc5545#section-3.5\n * @url https://github.com/mozilla-comm/ical.js/blob/master/lib/ical/property.js\n */\nexport default class Property extends observerTrait(lockableTrait(class {})) {\n\n\t/**\n\t * Constructor\n\t *\n\t * @param {string} name The name of the property\n\t * @param {string | number | AbstractValue | string[] | number[] | AbstractValue[] | null} value The value of the property\n\t * @param {Parameter[] | [string][]} parameters Array of parameters\n\t * @param {CalendarComponent|null} root The root of the calendar-document\n\t * @param {AbstractComponent|null} parent The parent-element of this property\n\t */\n\tconstructor(name, value = null, parameters = [], root = null, parent = null) {\n\t\tsuper()\n\n\t\t/**\n\t\t * Name of the property\n\t\t *\n\t\t * @type {string}\n\t\t * @protected\n\t\t */\n\t\tthis._name = uc(name)\n\n\t\t/**\n\t\t * Value of the property\n\t\t *\n\t\t * @type {string | number | AbstractValue | string[] | number[] | AbstractValue[] | null}\n\t\t * @protected\n\t\t */\n\t\tthis._value = value\n\n\t\t/**\n\t\t * List of parameters associated with this parameter\n\t\t *\n\t\t * @type {Map<string, Parameter>}\n\t\t */\n\t\tthis._parameters = new Map()\n\n\t\t/**\n\t\t * Root node of ical document\n\t\t *\n\t\t * @type {CalendarComponent|null}\n\t\t * @protected\n\t\t */\n\t\tthis._root = root\n\n\t\t/**\n\t\t * Parent node\n\t\t *\n\t\t * @type {AbstractComponent|null}\n\t\t * @protected\n\t\t */\n\t\tthis._parent = parent\n\n\t\tthis._setParametersFromConstructor(parameters)\n\t\tif (value instanceof AbstractValue) {\n\t\t\tvalue.subscribe(() => this._notifySubscribers())\n\t\t}\n\t}\n\n\t/**\n\t * Get property name\n\t *\n\t * @readonly\n\t * @return {string}\n\t */\n\tget name() {\n\t\treturn this._name\n\t}\n\n\t/**\n\t * Get parameter value\n\t *\n\t * @return {string | number | AbstractValue | string[] | number[] | AbstractValue[] | null}\n\t */\n\tget value() {\n\t\treturn this._value\n\t}\n\n\t/**\n\t * Set new parameter value\n\t *\n\t * @param {string | number | AbstractValue | string[] | number[] | AbstractValue[] | null} value The value of the property\n\t * @throws {ModificationNotAllowedError} if property is locked for modification\n\t */\n\tset value(value) {\n\t\tthis._modifyContent()\n\t\tthis._value = value\n\n\t\tif (value instanceof AbstractValue) {\n\t\t\tvalue.subscribe(() => this._notifySubscribers())\n\t\t}\n\t}\n\n\t/**\n\t * Gets the root of this property\n\t *\n\t * @return {CalendarComponent|null}\n\t */\n\tget root() {\n\t\treturn this._root\n\t}\n\n\t/**\n\t * Sets the root of this property\n\t *\n\t * @param {CalendarComponent|null} root The root of the calendar-document\n\t * @throws {ModificationNotAllowedError} if property is locked for modification\n\t */\n\tset root(root) {\n\t\tthis._modify()\n\t\tthis._root = root\n\t}\n\n\t/**\n\t * Gets the direct parent element of this property\n\t *\n\t * @return {AbstractComponent}\n\t */\n\tget parent() {\n\t\treturn this._parent\n\t}\n\n\t/**\n\t * Sets the direct parent element of this property\n\t *\n\t * @param {AbstractComponent|null} parent The parent element of this property\n\t * @throws {ModificationNotAllowedError} if property is locked for modification\n\t */\n\tset parent(parent) {\n\t\tthis._modify()\n\t\tthis._parent = parent\n\t}\n\n\t/**\n\t * Gets the first value of this property\n\t *\n\t * @return {null | string | number | AbstractValue}\n\t */\n\tgetFirstValue() {\n\t\tif (!this.isMultiValue()) {\n\t\t\treturn this.value\n\t\t} else {\n\t\t\tif (this.value.length > 0) {\n\t\t\t\treturn this.value[0]\n\t\t\t}\n\t\t}\n\n\t\treturn null\n\t}\n\n\t/**\n\t * Gets an iterator over all values\n\t */\n\t* getValueIterator() {\n\t\tif (this.isMultiValue()) {\n\t\t\tyield * this.value.slice()[Symbol.iterator]()\n\t\t} else {\n\t\t\tyield this.value\n\t\t}\n\t}\n\n\t/**\n\t * Adds a value to the multi-value property\n\t *\n\t * @param {string | AbstractValue} value Value to add\n\t */\n\taddValue(value) {\n\t\tif (!this.isMultiValue()) {\n\t\t\tthrow new TypeError('This is not a multivalue property')\n\t\t}\n\n\t\tthis._modifyContent()\n\t\tthis.value.push(value)\n\t}\n\n\t/**\n\t * Checks if a value is inside this multi-value property\n\t *\n\t * @param {string | AbstractValue} value Value to check for\n\t * @return {boolean}\n\t */\n\thasValue(value) {\n\t\tif (!this.isMultiValue()) {\n\t\t\tthrow new TypeError('This is not a multivalue property')\n\t\t}\n\n\t\treturn this.value.includes(value)\n\t}\n\n\t/**\n\t * Removes a value from this multi-value property\n\t *\n\t * @param {string | AbstractValue} value Value to remove\n\t */\n\tremoveValue(value) {\n\t\tif (!this.hasValue(value)) {\n\t\t\treturn\n\t\t}\n\n\t\tthis._modifyContent()\n\t\tconst index = this.value.indexOf(value)\n\t\tthis.value.splice(index, 1)\n\t}\n\n\t/**\n\t * Sets a parameter on this property\n\t *\n\t * @param {Parameter} parameter The parameter to set\n\t * @throws {ModificationNotAllowedError} if property is locked for modification\n\t */\n\tsetParameter(parameter) {\n\t\tthis._modify()\n\t\tthis._parameters.set(parameter.name, parameter)\n\t\tparameter.subscribe(() => this._notifySubscribers())\n\t}\n\n\t/**\n\t * Gets a parameter on this property by its name\n\t *\n\t * @param {string} parameterName Name of the parameter to get\n\t * @return {Parameter}\n\t */\n\tgetParameter(parameterName) {\n\t\treturn this._parameters.get(uc(parameterName))\n\t}\n\n\t/**\n\t * Gets an iterator over all available parameters\n\t */\n\t* getParametersIterator() {\n\t\tyield * this._parameters.values()\n\t}\n\n\t/**\n\t * Get first value of a parameter\n\t *\n\t * @param {string} parameterName Name of the parameter\n\t * @return {null | string}\n\t */\n\tgetParameterFirstValue(parameterName) {\n\t\tconst parameter = this.getParameter(parameterName)\n\t\tif (parameter instanceof Parameter) {\n\t\t\tif (parameter.isMultiValue()) {\n\t\t\t\treturn parameter.value[0]\n\t\t\t} else {\n\t\t\t\treturn parameter.value\n\t\t\t}\n\t\t}\n\n\t\treturn null\n\t}\n\n\t/**\n\t * Returns whether a parameter exists on this property\n\t *\n\t * @param {string} parameterName Name of the parameter\n\t * @return {boolean}\n\t */\n\thasParameter(parameterName) {\n\t\treturn this._parameters.has(uc(parameterName))\n\t}\n\n\t/**\n\t * Deletes a parameter on this property\n\t *\n\t * @param {string} parameterName Name of the parameter\n\t * @throws {ModificationNotAllowedError} if property is locked for modification\n\t */\n\tdeleteParameter(parameterName) {\n\t\tthis._modify()\n\t\tthis._parameters.delete(uc(parameterName))\n\t}\n\n\t/**\n\t * update a parameter if it exists,\n\t * create a new one if it doesn't\n\t *\n\t * @param {string} parameterName Name of the parameter\n\t * @param {string|Array|null} value Value to set\n\t * @throws {ModificationNotAllowedError} if property is locked for modification\n\t */\n\tupdateParameterIfExist(parameterName, value) {\n\t\tthis._modify()\n\t\tif (this.hasParameter(parameterName)) {\n\t\t\tconst parameter = this.getParameter(parameterName)\n\t\t\tparameter.value = value\n\t\t} else {\n\t\t\tconst parameter = new Parameter(uc(parameterName), value)\n\t\t\tthis.setParameter(parameter)\n\t\t}\n\t}\n\n\t/**\n\t * Returns whether or not the value is a multivalue\n\t *\n\t * @return {boolean}\n\t */\n\tisMultiValue() {\n\t\treturn Array.isArray(this._value)\n\t}\n\n\t/**\n\t * Returns whether or not this valus is decorated\n\t *\n\t * @return {boolean}\n\t */\n\tisDecoratedValue() {\n\t\tif (this.isMultiValue()) {\n\t\t\treturn this._value[0] instanceof AbstractValue\n\t\t} else {\n\t\t\treturn this._value instanceof AbstractValue\n\t\t}\n\t}\n\n\t/**\n\t * Marks this parameter is immutable\n\t * locks it against further modification\n\t */\n\tlock() {\n\t\tsuper.lock()\n\n\t\tfor (const parameter of this.getParametersIterator()) {\n\t\t\tparameter.lock()\n\t\t}\n\n\t\tif (this.isDecoratedValue()) {\n\t\t\tfor (const value of this.getValueIterator()) {\n\t\t\t\tvalue.lock()\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Marks this parameter as mutable\n\t * allowing further modification\n\t */\n\tunlock() {\n\t\tsuper.unlock()\n\n\t\tfor (const parameter of this.getParametersIterator()) {\n\t\t\tparameter.unlock()\n\t\t}\n\n\t\tif (this.isDecoratedValue()) {\n\t\t\tfor (const value of this.getValueIterator()) {\n\t\t\t\tvalue.unlock()\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Creates a copy of this parameter\n\t *\n\t * @return {Property}\n\t */\n\tclone() {\n\t\tconst parameters = []\n\t\tfor (const parameter of this.getParametersIterator()) {\n\t\t\tparameters.push(parameter.clone())\n\t\t}\n\n\t\treturn new this.constructor(this.name, this._cloneValue(), parameters, this.root, this.parent)\n\t}\n\n\t/**\n\t * Copies the values of this property\n\t *\n\t * @return {string | number | AbstractValue | string[] | number[] | AbstractValue[] | null}\n\t * @protected\n\t */\n\t_cloneValue() {\n\t\tif (this.isDecoratedValue()) {\n\t\t\tif (this.isMultiValue()) {\n\t\t\t\treturn this._value.map((val) => val.clone())\n\t\t\t} else {\n\t\t\t\treturn this._value.clone()\n\t\t\t}\n\t\t} else {\n\t\t\tif (this.isMultiValue()) {\n\t\t\t\t// only copy array values, don't copy array reference\n\t\t\t\treturn this._value.slice()\n\t\t\t} else {\n\t\t\t\treturn this._value\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Sets parameters from the constructor\n\t *\n\t * @param {Parameter[] | [string][]} parameters Array of parameters to set\n\t * @private\n\t */\n\t_setParametersFromConstructor(parameters) {\n\t\tparameters.forEach((parameter) => {\n\t\t\tif (!(parameter instanceof Parameter)) {\n\t\t\t\tparameter = new Parameter(parameter[0], parameter[1])\n\t\t\t}\n\n\t\t\tthis.setParameter(parameter)\n\t\t})\n\t}\n\n\t/**\n\t * Creates a new Component based on an ical object\n\t *\n\t * @param {ICAL.Property} icalProperty The ical.js property to initialise from\n\t * @param {CalendarComponent=} root The root of the calendar-document\n\t * @param {AbstractComponent=} parent The parent element of this property\n\t * @return {Property}\n\t */\n\tstatic fromICALJs(icalProperty, root = null, parent = null) {\n\t\tif (!(icalProperty instanceof ICAL.Property)) {\n\t\t\tthrow new ExpectedICalJSError()\n\t\t}\n\n\t\tlet value\n\t\tif (icalProperty.isDecorated) {\n\t\t\tconst constructor = getConstructorForICALType(icalProperty.getFirstValue().icaltype)\n\t\t\tif (icalProperty.isMultiValue) {\n\t\t\t\tvalue = icalProperty.getValues().map((val) => constructor.fromICALJs(val))\n\t\t\t} else {\n\t\t\t\tvalue = constructor.fromICALJs(icalProperty.getFirstValue())\n\t\t\t}\n\t\t} else {\n\t\t\tif (icalProperty.isMultiValue) {\n\t\t\t\tvalue = icalProperty.getValues()\n\t\t\t} else {\n\t\t\t\tvalue = icalProperty.getFirstValue()\n\t\t\t}\n\t\t}\n\n\t\tconst parameters = []\n\t\tconst paramNames = Object.keys(Object.assign({}, icalProperty.toJSON()[1]))\n\t\tparamNames.forEach((paramName) => {\n\t\t\t// Timezone id is handled by DateTimeValue\n\t\t\tif (uc(paramName) === 'TZID') {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tparameters.push([paramName, icalProperty.getParameter(paramName)])\n\t\t})\n\n\t\treturn new this(icalProperty.name, value, parameters, root, parent)\n\t}\n\n\t/**\n\t * Returns an ICAL.js property based on this Property\n\t *\n\t * @return {ICAL.Property}\n\t */\n\ttoICALJs() {\n\t\tconst icalProperty = createProperty(lc(this.name))\n\n\t\tif (this.isMultiValue()) {\n\t\t\tif (this.isDecoratedValue()) {\n\t\t\t\ticalProperty.setValues(this.value.map((val) => val.toICALJs()))\n\t\t\t} else {\n\t\t\t\ticalProperty.setValues(this.value)\n\t\t\t}\n\t\t} else {\n\t\t\tif (this.isDecoratedValue()) {\n\t\t\t\ticalProperty.setValue(this.value.toICALJs())\n\t\t\t} else {\n\t\t\t\ticalProperty.setValue(this.value)\n\n\t\t\t}\n\t\t}\n\n\t\tfor (const parameter of this.getParametersIterator()) {\n\t\t\ticalProperty.setParameter(lc(parameter.name), parameter.value)\n\t\t}\n\n\t\tconst firstValue = this.getFirstValue()\n\t\tif (firstValue instanceof DateTimeValue\n\t\t\t&& firstValue.timezoneId !== 'floating'\n\t\t\t&& firstValue.timezoneId !== 'UTC'\n\t\t\t&& !firstValue.isDate) {\n\t\t\ticalProperty.setParameter('tzid', firstValue.timezoneId)\n\t\t}\n\n\t\treturn icalProperty\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\t_modifyContent() {\n\t\tsuper._modifyContent()\n\t\tthis._notifySubscribers()\n\t}\n\n}\n","/**\n * @copyright Copyright (c) 2019 Georg Ehrke\n *\n * @author Georg Ehrke <georg-nextcloud@ehrke.email>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nimport Property from './property.js'\nimport BinaryValue from '../values/binaryValue.js'\n\n/**\n * @class AttachmentProperty\n * @classdesc This class represents an attachment property as defined in RFC 5545 Section 3.8.1.1\n *\n * @url https://tools.ietf.org/html/rfc5545#section-3.8.1.1\n */\nexport default class AttachmentProperty extends Property {\n\n\t/**\n\t * Gets the format-type of this attachment\n\t *\n\t * @return {string}\n\t */\n\tget formatType() {\n\t\treturn this.getParameterFirstValue('FMTTYPE')\n\t}\n\n\t/**\n\t * Sets the format-type of this attachment\n\t *\n\t * @param {string} fmtType Mime-type of attachment\n\t */\n\tset formatType(fmtType) {\n\t\tthis.updateParameterIfExist('FMTTYPE', fmtType)\n\t}\n\n\t/**\n\t * Gets the uri of this attachment\n\t *\n\t * @return {string | null}\n\t */\n\tget uri() {\n\t\tif (this._value instanceof BinaryValue) {\n\t\t\treturn null\n\t\t}\n\n\t\treturn this._value\n\t}\n\n\t/**\n\t * Sets the uri of this attachment\n\t *\n\t * @param {string} uri Link to attachment if applicable\n\t */\n\tset uri(uri) {\n\t\tthis.value = uri\n\t}\n\n\t/**\n\t * Gets the encoding of this attachment\n\t *\n\t * @return {string|null}\n\t */\n\tget encoding() {\n\t\tif (this._value instanceof BinaryValue) {\n\t\t\treturn 'BASE64'\n\t\t}\n\n\t\treturn null\n\t}\n\n\t/**\n\t * Gets the data stored in this attachment\n\t *\n\t * @return {string | null}\n\t */\n\tget data() {\n\t\tif (this._value instanceof BinaryValue) {\n\t\t\treturn this._value.value\n\t\t}\n\n\t\treturn null\n\t}\n\n\t/**\n\t * Sets the data stored in this attachment\n\t *\n\t * @param {string} data The data of the attachment\n\t */\n\tset data(data) {\n\t\tif (this.value instanceof BinaryValue) {\n\t\t\tthis.value.value = data\n\t\t} else {\n\t\t\tthis.value = BinaryValue.fromDecodedValue(data)\n\t\t}\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\ttoICALJs() {\n\t\tconst icalProperty = super.toICALJs()\n\t\tif (this._value instanceof BinaryValue && this.getParameterFirstValue('ENCODING') !== 'BASE64') {\n\t\t\ticalProperty.setParameter('ENCODING', 'BASE64')\n\t\t}\n\n\t\treturn icalProperty\n\t}\n\n\t/**\n\t * Creates a new AttachmentProperty based on data\n\t *\n\t * @param {string} data The data of the attachment\n\t * @param {string=} formatType The mime-type of the data\n\t * @return {AttachmentProperty}\n\t */\n\tstatic fromData(data, formatType = null) {\n\t\tconst binaryValue = BinaryValue.fromDecodedValue(data)\n\t\tconst property = new AttachmentProperty('ATTACH', binaryValue)\n\n\t\tif (formatType) {\n\t\t\tproperty.formatType = formatType\n\t\t}\n\n\t\treturn property\n\t}\n\n\t/**\n\t * Creates a new AttachmentProperty based on a link\n\t *\n\t * @param {string} uri The URI for the attachment\n\t * @param {string=} formatType The mime-type of the uri\n\t * @return {AttachmentProperty}\n\t */\n\tstatic fromLink(uri, formatType = null) {\n\t\tconst property = new AttachmentProperty('ATTACH', uri)\n\n\t\tif (formatType) {\n\t\t\tproperty.formatType = formatType\n\t\t}\n\n\t\treturn property\n\t}\n\n}\n","/**\n * @copyright Copyright (c) 2019 Georg Ehrke\n *\n * @author Georg Ehrke <georg-nextcloud@ehrke.email>\n * @author Richard Steinmetz <richard@steinmetz.cloud>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nimport Property from './property.js'\nimport { startStringWith, uc } from '../helpers/stringHelper.js'\n\n/**\n * @class AttendeeProperty\n * @classdesc This class represents an attendee property as defined in RFC 5545 Section 3.8.4.1\n *\n * @url https://tools.ietf.org/html/rfc5545#section-3.8.4.1\n */\nexport default class AttendeeProperty extends Property {\n\n\t/**\n\t * Returns the role of the attendee.\n\t *\n\t * @return {string}\n\t */\n\tget role() {\n\t\tconst allowed = ['CHAIR', 'REQ-PARTICIPANT', 'OPT-PARTICIPANT', 'NON-PARTICIPANT']\n\t\tconst defaultValue = 'REQ-PARTICIPANT'\n\n\t\tif (this.hasParameter('ROLE')) {\n\t\t\tconst value = this.getParameterFirstValue('ROLE')\n\t\t\tif (allowed.includes(value)) {\n\t\t\t\treturn value\n\t\t\t}\n\t\t}\n\n\t\treturn defaultValue\n\t}\n\n\t/**\n\t * Sets new role of the attendee\n\t *\n\t * @param {string} role The role of the attendee (e.g. CHAIR, REQ-PARTICIPANT)\n\t */\n\tset role(role) {\n\t\tthis.updateParameterIfExist('ROLE', role)\n\t}\n\n\t/**\n\t * Returns the calendar-user-type of an attendee\n\t *\n\t * @return {string}\n\t */\n\tget userType() {\n\t\tconst allowed = ['INDIVIDUAL', 'GROUP', 'RESOURCE', 'ROOM', 'UNKNOWN']\n\n\t\tif (!this.hasParameter('CUTYPE')) {\n\t\t\treturn 'INDIVIDUAL'\n\t\t} else {\n\t\t\tconst value = this.getParameterFirstValue('CUTYPE')\n\t\t\tif (allowed.includes(value)) {\n\t\t\t\treturn value\n\t\t\t}\n\n\t\t\treturn 'UNKNOWN'\n\t\t}\n\t}\n\n\t/**\n\t * Sets new calendar-user-type of attendee\n\t *\n\t * @param {string} userType The type of user (e.g. INDIVIDUAL, GROUP)\n\t */\n\tset userType(userType) {\n\t\tthis.updateParameterIfExist('CUTYPE', userType)\n\t}\n\n\t/**\n\t * Returns the \"Répondez s'il vous plaît\" value for attendee\n\t *\n\t * @return {boolean}\n\t */\n\tget rsvp() {\n\t\tif (!this.hasParameter('RSVP')) {\n\t\t\treturn false\n\t\t} else {\n\t\t\tconst value = this.getParameterFirstValue('RSVP')\n\t\t\treturn uc(value) === 'TRUE'\n\t\t}\n\t}\n\n\t/**\n\t * Updates the \"Répondez s'il vous plaît\" value for attendee\n\t *\n\t * @param {boolean} rsvp Whether or not to send out an invitation\n\t */\n\tset rsvp(rsvp) {\n\t\tthis.updateParameterIfExist('RSVP', rsvp ? 'TRUE' : 'FALSE')\n\t}\n\n\t/**\n\t * Returns the common-name of the attendee\n\t *\n\t * @return {string|null}\n\t */\n\tget commonName() {\n\t\treturn this.getParameterFirstValue('CN')\n\t}\n\n\t/**\n\t * Sets a new common-name of the attendee\n\t *\n\t * @param {string} commonName The display name of the attendee\n\t */\n\tset commonName(commonName) {\n\t\tthis.updateParameterIfExist('CN', commonName)\n\t}\n\n\t/**\n\t * Returns the participation-status of the attendee\n\t *\n\t * @return {string}\n\t */\n\tget participationStatus() {\n\t\tlet vobjectType\n\t\tif (this.parent) {\n\t\t\tvobjectType = this.parent.name\n\t\t} else {\n\t\t\t// let's assume we are inside an event\n\t\t\t// if we don't know better\n\t\t\tvobjectType = 'VEVENT'\n\t\t}\n\n\t\tconst allowed = {\n\t\t\tVEVENT: ['NEEDS-ACTION', 'ACCEPTED', 'DECLINED', 'TENTATIVE', 'DELEGATED'],\n\t\t\tVJOURNAL: ['NEEDS-ACTION', 'ACCEPTED', 'DECLINED'],\n\t\t\tVTODO: ['NEEDS-ACTION', 'ACCEPTED', 'DECLINED', 'TENTATIVE', 'DELEGATED', 'COMPLETED', 'IN-PROCESS'],\n\t\t}\n\n\t\tif (!this.hasParameter('PARTSTAT')) {\n\t\t\treturn 'NEEDS-ACTION'\n\t\t} else {\n\t\t\tconst value = this.getParameterFirstValue('PARTSTAT')\n\t\t\tif (allowed[vobjectType].includes(value)) {\n\t\t\t\treturn value\n\t\t\t}\n\n\t\t\treturn 'NEEDS-ACTION'\n\t\t}\n\t}\n\n\t/**\n\t * Sets a new participation-status of the attendee\n\t *\n\t * @param {string} participationStatus The participation status (e.g. ACCEPTED, DECLINED)\n\t */\n\tset participationStatus(participationStatus) {\n\t\tthis.updateParameterIfExist('PARTSTAT', participationStatus)\n\t}\n\n\t/**\n\t * Gets this attendee's language\n\t *\n\t * @return {string}\n\t */\n\tget language() {\n\t\treturn this.getParameterFirstValue('LANGUAGE')\n\t}\n\n\t/**\n\t * Sets this attendee's language\n\t * This can be used to influence the language of the invitation email\n\t *\n\t * @param {string} language The preferred language of the attendee\n\t */\n\tset language(language) {\n\t\tthis.updateParameterIfExist('LANGUAGE', language)\n\t}\n\n\t/**\n\t * Gets the email of the attendee\n\t *\n\t * @return {string}\n\t */\n\tget email() {\n\t\treturn this.value\n\t}\n\n\t/**\n\t * Sets the email address of the attendee\n\t *\n\t * @param {string} email The e-email address of the attendee\n\t */\n\tset email(email) {\n\t\tthis.value = startStringWith(email, 'mailto:')\n\t}\n\n\t/**\n\t * Gets the email addresses of groups the attendee is a part of\n\t *\n\t * @return {string[]|null} The email addresses of the groups\n\t */\n\tget member() {\n\t\treturn this.getParameter('MEMBER')?.value ?? null\n\t}\n\n\t/**\n\t * Sets the email addresses of groups the attendee is a part of\n\t *\n\t * @param {string[]} members The email addresses of the groups\n\t */\n\tset member(members) {\n\t\tmembers = members.map(member => startStringWith(member, 'mailto:'))\n\t\tthis.updateParameterIfExist('MEMBER', members)\n\t}\n\n\t/**\n\t * Is this attendee the organizer?\n\t *\n\t * @return {boolean}\n\t */\n\tisOrganizer() {\n\t\treturn this._name === 'ORGANIZER'\n\t}\n\n\t/**\n\t * Creates a new AttendeeProperty from name and email\n\t *\n\t * @param {string} name The display name\n\t * @param {string} email The email address\n\t * @param {boolean=} isOrganizer Whether this is the organizer or an attendee\n\t * @return {AttendeeProperty}\n\t */\n\tstatic fromNameAndEMail(name, email, isOrganizer = false) {\n\t\tconst propertyName = isOrganizer\n\t\t\t? 'ORGANIZER'\n\t\t\t: 'ATTENDEE'\n\n\t\temail = startStringWith(email, 'mailto:')\n\t\treturn new AttendeeProperty(propertyName, email, [['CN', name]])\n\t}\n\n\t/**\n\t * Creates a new AttendeeProperty from name, email, role, userType and rsvp\n\t *\n\t * @param {string} name The display name\n\t * @param {string} email The email address\n\t * @param {string} role The role\n\t * @param {string} userType The type of user\n\t * @param {boolean} rsvp Whether to send out an invitation\n\t * @param {boolean=} isOrganizer Whether this is the organizer or an attendee\n\t * @return {AttendeeProperty}\n\t */\n\tstatic fromNameEMailRoleUserTypeAndRSVP(name, email, role, userType, rsvp, isOrganizer = false) {\n\t\tconst propertyName = isOrganizer\n\t\t\t? 'ORGANIZER'\n\t\t\t: 'ATTENDEE'\n\n\t\temail = startStringWith(email, 'mailto:')\n\t\treturn new AttendeeProperty(propertyName, email, [\n\t\t\t['CN', name],\n\t\t\t['ROLE', role],\n\t\t\t['CUTYPE', userType],\n\t\t\t['RSVP', rsvp ? 'TRUE' : 'FALSE'],\n\t\t])\n\t}\n\n}\n","/**\n * @copyright Copyright (c) 2019 Georg Ehrke\n *\n * @author Georg Ehrke <georg-nextcloud@ehrke.email>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nimport Property from './property.js'\nimport ICAL from 'ical.js'\n\nICAL.design.icalendar.property.conference = {\n\tdefaultType: 'uri',\n}\n\nICAL.design.icalendar.param.feature = {\n\tvalueType: 'cal-address',\n\tmultiValue: ',',\n}\n\n/**\n * @class ConferenceProperty\n *\n * @url https://tools.ietf.org/html/rfc7986#section-5.11\n */\nexport default class ConferenceProperty extends Property {\n\n\t/**\n\t * Iterator that iterates over all supported features\n\t * of the conference system\n\t */\n\t* getFeatureIterator() {\n\t\tif (!this.hasParameter('FEATURE')) {\n\t\t\treturn\n\t\t}\n\n\t\tconst parameter = this.getParameter('FEATURE')\n\t\tyield * parameter.getValueIterator()\n\t}\n\n\t/**\n\t * Lists all supported features of the conference system\n\t *\n\t * @return {string[]}\n\t */\n\tlistAllFeatures() {\n\t\tif (!this.hasParameter('FEATURE')) {\n\t\t\treturn []\n\t\t}\n\n\t\treturn this.getParameter('FEATURE').value.slice()\n\t}\n\n\t/**\n\t * Adds a supported feature to the conference system\n\t *\n\t * @param {string} featureToAdd Feature to add\n\t */\n\taddFeature(featureToAdd) {\n\t\tthis._modify()\n\t\tif (!this.hasParameter('FEATURE')) {\n\t\t\tthis.updateParameterIfExist('FEATURE', [featureToAdd])\n\t\t} else {\n\t\t\tif (this.hasFeature(featureToAdd)) {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tconst parameter = this.getParameter('FEATURE')\n\t\t\tparameter.value.push(featureToAdd)\n\t\t}\n\t}\n\n\t/**\n\t * Removes a supported feature\n\t *\n\t * @param {string} feature The feature to remove\n\t */\n\tremoveFeature(feature) {\n\t\tthis._modify()\n\t\tif (!this.hasFeature(feature)) {\n\t\t\treturn\n\t\t}\n\n\t\tconst parameter = this.getParameter('FEATURE')\n\t\tconst index = parameter.value.indexOf(feature)\n\t\tparameter.value.splice(index, 1)\n\t}\n\n\t/**\n\t * Removes all supported features from this conference system\n\t */\n\tclearAllFeatures() {\n\t\tthis.deleteParameter('FEATURE')\n\t}\n\n\t/**\n\t * Check if this conference system supports a feature\n\t *\n\t * @param {string} feature The feature to check\n\t * @return {boolean}\n\t */\n\thasFeature(feature) {\n\t\tif (!this.hasParameter('FEATURE')) {\n\t\t\treturn false\n\t\t}\n\n\t\tconst parameter = this.getParameter('FEATURE')\n\t\tif (!Array.isArray(parameter.value)) {\n\t\t\treturn false\n\t\t}\n\n\t\treturn parameter.value.includes(feature)\n\t}\n\n\t/**\n\t * Gets label for the conference system\n\t *\n\t * @return {string}\n\t */\n\tget label() {\n\t\treturn this.getParameterFirstValue('LABEL')\n\t}\n\n\t/**\n\t * Updates the label for the conference system\n\t *\n\t * @param {string} label The label to set\n\t */\n\tset label(label) {\n\t\tthis.updateParameterIfExist('LABEL', label)\n\t}\n\n\t/**\n\t * Gets the uri for this conference system\n\t */\n\tget uri() {\n\t\treturn this.value\n\t}\n\n\t/**\n\t * Sets the uri for this conference system\n\t *\n\t * @param {string} uri The URI to set\n\t */\n\tset uri(uri) {\n\t\tthis.value = uri\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\ttoICALJs() {\n\t\tconst icalProperty = super.toICALJs()\n\t\ticalProperty.setParameter('value', 'URI')\n\n\t\treturn icalProperty\n\t}\n\n\t/**\n\t * Creates a new ConferenceProperty based on URI, label and features\n\t *\n\t * @param {string} uri URI of the Conference\n\t * @param {string=} label Label of the conference\n\t * @param {string[]=} features Features of the conference\n\t * @return {ConferenceProperty}\n\t */\n\tstatic fromURILabelAndFeatures(uri, label = null, features = null) {\n\t\tconst property = new ConferenceProperty('CONFERENCE', uri)\n\n\t\tif (label) {\n\t\t\tproperty.updateParameterIfExist('label', label)\n\t\t}\n\n\t\tif (features) {\n\t\t\tproperty.updateParameterIfExist('feature', features)\n\t\t}\n\n\t\treturn property\n\t}\n\n}\n","/**\n * @copyright Copyright (c) 2019 Georg Ehrke\n *\n * @author Georg Ehrke <georg-nextcloud@ehrke.email>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nimport Property from './property.js'\n\n/**\n * @class FreeBusyProperty\n * @classdesc\n *\n * @url https://tools.ietf.org/html/rfc5545#section-3.8.2.6\n */\nexport default class FreeBusyProperty extends Property {\n\n\t/**\n\t * Gets the type of this FreeBusyProperty\n\t *\n\t * @return {string}\n\t */\n\tget type() {\n\t\tconst allowed = ['FREE', 'BUSY', 'BUSY-UNAVAILABLE', 'BUSY-TENTATIVE']\n\t\tconst defaultValue = 'BUSY'\n\n\t\tif (this.hasParameter('FBTYPE')) {\n\t\t\tconst value = this.getParameterFirstValue('FBTYPE')\n\t\t\tif (allowed.includes(value)) {\n\t\t\t\treturn value\n\t\t\t}\n\t\t}\n\n\t\treturn defaultValue\n\t}\n\n\t/**\n\t * Sets the type of this FreeBusyProperty\n\t *\n\t * @param {string} type The type of information (e.g. FREE, BUSY, etc.)\n\t */\n\tset type(type) {\n\t\tthis.updateParameterIfExist('FBTYPE', type)\n\t}\n\n\t/**\n\t * Creates a new FreeBusyProperty based on period and type\n\t *\n\t * @param {PeriodValue} period The period for FreeBusy Information\n\t * @param {string} type The type of the period\n\t * @return {FreeBusyProperty}\n\t */\n\tstatic fromPeriodAndType(period, type) {\n\t\treturn new FreeBusyProperty('FREEBUSY', period, [['fbtype', type]])\n\t}\n\n}\n","/**\n * @copyright Copyright (c) 2019 Georg Ehrke\n *\n * @author Georg Ehrke <georg-nextcloud@ehrke.email>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nimport Property from './property.js'\nimport { createProperty } from '../factories/icalFactory.js'\nimport { lc } from '../helpers/stringHelper.js'\n\n/**\n * @class GeoProperty\n * @classdesc\n *\n * @url https://tools.ietf.org/html/rfc5545#section-3.8.1.6\n */\nexport default class GeoProperty extends Property {\n\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor(name, value = [0, 0], parameters = [], root = null, parent = null) {\n\t\tsuper(name, value, parameters, root, parent)\n\t}\n\n\t/**\n\t * Gets the latitude stored in this property\n\t *\n\t * @return {number}\n\t */\n\tget latitude() {\n\t\treturn this._value[0]\n\t}\n\n\t/**\n\t * Sets the latitude stored in this property\n\t *\n\t * @param {string | number} lat Latitude\n\t */\n\tset latitude(lat) {\n\t\tthis._modifyContent()\n\t\tif (typeof lat !== 'number') {\n\t\t\tlat = parseFloat(lat)\n\t\t}\n\n\t\tthis._value[0] = lat\n\t}\n\n\t/**\n\t * Gets the longitude stored in this property\n\t */\n\tget longitude() {\n\t\treturn this._value[1]\n\t}\n\n\t/**\n\t * Sets the longitude stored in this property\n\t *\n\t * @param {string | number} long Longitude\n\t */\n\tset longitude(long) {\n\t\tthis._modifyContent()\n\t\tif (typeof long !== 'number') {\n\t\t\tlong = parseFloat(long)\n\t\t}\n\n\t\tthis._value[1] = long\n\t}\n\n\t/**\n\t * @inheritDoc\n\t *\n\t * TODO: this is an ugly hack right now.\n\t * As soon as the value is an array, we assume it's multivalue\n\t * but GEO is a (the one and only besides request-status) structured value and is also\n\t * stored inside an array.\n\t *\n\t * Calling icalProperty.setValues will throw an error\n\t */\n\ttoICALJs() {\n\t\tconst icalProperty = createProperty(lc(this.name))\n\t\ticalProperty.setValue(this.value)\n\n\t\tthis._parameters.forEach((parameter) => {\n\t\t\ticalProperty.setParameter(lc(parameter.name), parameter.value)\n\t\t})\n\n\t\treturn icalProperty\n\t}\n\n\t/**\n\t * Creates a new GeoProperty based on a latitude and a longitude value\n\t *\n\t * @param {number} lat Latitude\n\t * @param {number} long Longitude\n\t * @return {GeoProperty}\n\t */\n\tstatic fromPosition(lat, long) {\n\t\treturn new GeoProperty('GEO', [lat, long])\n\t}\n\n}\n","/**\n * @copyright Copyright (c) 2019 Georg Ehrke\n *\n * @author Georg Ehrke <georg-nextcloud@ehrke.email>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nimport AttachmentProperty from './attachmentProperty.js'\nimport BinaryValue from '../values/binaryValue.js'\n\n/**\n * @class ImageProperty\n *\n * @url https://tools.ietf.org/html/rfc7986#section-5.10\n */\nexport default class ImageProperty extends AttachmentProperty {\n\n\t/**\n\t * Gets the image-type\n\t */\n\tget display() {\n\t\treturn this.getParameterFirstValue('DISPLAY') || 'BADGE'\n\t}\n\n\t/**\n\t * Gets the image-type\n\t *\n\t * @param {string} display The display-type image is optimized for\n\t */\n\tset display(display) {\n\t\tthis.updateParameterIfExist('DISPLAY', display)\n\t}\n\n\t/**\n\t * Creates a new ImageProperty based on data\n\t *\n\t * @param {string} data The data of the image\n\t * @param {string=} display The display-type it's optimized for\n\t * @param {string=} formatType The mime-type of the image\n\t * @return {ImageProperty}\n\t */\n\tstatic fromData(data, display = null, formatType = null) {\n\t\tconst binaryValue = BinaryValue.fromDecodedValue(data)\n\t\tconst property = new ImageProperty('IMAGE', binaryValue)\n\n\t\tif (display) {\n\t\t\tproperty.display = display\n\t\t}\n\n\t\tif (formatType) {\n\t\t\tproperty.formatType = formatType\n\t\t}\n\n\t\treturn property\n\t}\n\n\t/**\n\t * Creates a new ImageProperty based on a link\n\t *\n\t * @param {string} uri The uri of the image\n\t * @param {string=} display The display-type it's optimized for\n\t * @param {string=} formatType The mime-type of the image\n\t * @return {ImageProperty}\n\t */\n\tstatic fromLink(uri, display = null, formatType = null) {\n\t\tconst property = new ImageProperty('IMAGE', uri)\n\n\t\tif (display) {\n\t\t\tproperty.display = display\n\t\t}\n\n\t\tif (formatType) {\n\t\t\tproperty.formatType = formatType\n\t\t}\n\n\t\treturn property\n\t}\n\n}\n","/**\n * @copyright Copyright (c) 2019 Georg Ehrke\n *\n * @author Georg Ehrke <georg-nextcloud@ehrke.email>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nimport Property from './property.js'\n\n/**\n * @class RelationProperty\n * @classdesc\n *\n * @url https://tools.ietf.org/html/rfc5545#section-3.8.4.5\n */\nexport default class RelationProperty extends Property {\n\n\t/**\n\t * Get's the relation-type of this related-to property\n\t *\n\t * @return {string}\n\t */\n\tget relationType() {\n\t\tconst allowed = ['PARENT', 'CHILD', 'SIBLING']\n\t\tconst defaultValue = 'PARENT'\n\n\t\tif (!this.hasParameter('RELTYPE')) {\n\t\t\treturn defaultValue\n\t\t} else {\n\t\t\tconst value = this.getParameterFirstValue('RELTYPE')\n\t\t\tif (allowed.includes(value)) {\n\t\t\t\treturn value\n\t\t\t}\n\n\t\t\treturn defaultValue\n\t\t}\n\t}\n\n\t/**\n\t * Sets a new relation type\n\t *\n\t * @param {string} relationType The type of relation (e.g. SIBLING, PARENT, etc.)\n\t */\n\tset relationType(relationType) {\n\t\tthis.updateParameterIfExist('RELTYPE', relationType)\n\t}\n\n\t/**\n\t * Gets Id of related object\n\t *\n\t * @return {string}\n\t */\n\tget relatedId() {\n\t\treturn this.value\n\t}\n\n\t/**\n\t * Sets a new related id\n\t *\n\t * @param {string} relatedId The Id of the related document\n\t */\n\tset relatedId(relatedId) {\n\t\tthis.value = relatedId\n\t}\n\n\t/**\n\t * Creates a new RELATED-TO property based on a relation-type and id\n\t *\n\t * @param {string} relType The type of the relation (e.g. SIBLING, CHILD)\n\t * @param {string} relId The Id of the related document\n\t * @return {RelationProperty}\n\t */\n\tstatic fromRelTypeAndId(relType, relId) {\n\t\treturn new RelationProperty('RELATED-TO', relId, [['RELTYPE', relType]])\n\t}\n\n}\n","/**\n * @copyright Copyright (c) 2019 Georg Ehrke\n *\n * @author Georg Ehrke <georg-nextcloud@ehrke.email>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nimport Property from './property.js'\nimport { createProperty } from '../factories/icalFactory.js'\nimport { lc } from '../helpers/stringHelper.js'\n\n/**\n * @class RequestStatusProperty\n * @classdesc\n *\n * @url https://tools.ietf.org/html/rfc5545#section-3.8.8.3\n */\nexport default class RequestStatusProperty extends Property {\n\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor(name, value = ['1', 'Pending'], parameters = [], root = null, parent = null) {\n\t\tsuper(name, value, parameters, root, parent)\n\t}\n\n\t/**\n\t * Gets the status code of the request status\n\t *\n\t * @return {number}\n\t */\n\tget statusCode() {\n\t\treturn parseFloat(this.value[0])\n\t}\n\n\t/**\n\t * Sets the status code of the request status\n\t *\n\t * @param {number} statusCode The statusCode of the request\n\t */\n\tset statusCode(statusCode) {\n\t\tthis._modifyContent()\n\n\t\tthis.value[0] = statusCode.toString()\n\n\t\t// This makes sure 2.0 is actually saved as 2.0, not 2\n\t\tif (statusCode === Math.floor(statusCode)) {\n\t\t\tthis.value[0] += '.0'\n\t\t}\n\t}\n\n\t/**\n\t * Gets the status message of the request status\n\t *\n\t * @return {string}\n\t */\n\tget statusMessage() {\n\t\treturn this.value[1]\n\t}\n\n\t/**\n\t * Sets the status message of the request status\n\t *\n\t * @param {string} statusMessage The message of the request\n\t */\n\tset statusMessage(statusMessage) {\n\t\tthis._modifyContent()\n\t\tthis.value[1] = statusMessage\n\t}\n\n\t/**\n\t * Gets the exception data of the request status if available\n\t *\n\t * @return {null | string}\n\t */\n\tget exceptionData() {\n\t\tif (!this.value[2]) {\n\t\t\treturn null\n\t\t}\n\n\t\treturn this.value[2]\n\t}\n\n\t/**\n\t * Sets the exception dtat of the request status\n\t *\n\t * @param {string} exceptionData The additional exception-data\n\t */\n\tset exceptionData(exceptionData) {\n\t\tthis._modifyContent()\n\t\tthis.value[2] = exceptionData\n\t}\n\n\t/**\n\t * Check if request is pending\n\t *\n\t * @return {boolean}\n\t */\n\tisPending() {\n\t\treturn this.statusCode >= 1 && this.statusCode < 2\n\t}\n\n\t/**\n\t * Check if request was successful\n\t *\n\t * @return {boolean}\n\t */\n\tisSuccessful() {\n\t\treturn this.statusCode >= 2 && this.statusCode < 3\n\t}\n\n\t/**\n\t * Check if a client error occurred\n\t *\n\t * @return {boolean}\n\t */\n\tisClientError() {\n\t\treturn this.statusCode >= 3 && this.statusCode < 4\n\t}\n\n\t/**\n\t * Check if a scheduling error occurred\n\t *\n\t * @return {boolean}\n\t */\n\tisSchedulingError() {\n\t\treturn this.statusCode >= 4 && this.statusCode < 5\n\t}\n\n\t/**\n\t * @inheritDoc\n\t *\n\t * TODO: this is an ugly hack right now.\n\t * As soon as the value is an array, we assume it's multivalue\n\t * but REQUEST-STATUS is a (the one and only besides GEO) structured value and is also\n\t * stored inside an array.\n\t *\n\t * Calling icalProperty.setValues will throw an error\n\t */\n\ttoICALJs() {\n\t\tconst icalProperty = createProperty(lc(this.name))\n\t\ticalProperty.setValue(this.value)\n\n\t\tthis._parameters.forEach((parameter) => {\n\t\t\ticalProperty.setParameter(lc(parameter.name), parameter.value)\n\t\t})\n\n\t\treturn icalProperty\n\t}\n\n\t/**\n\t * Creates a new RequestStatusProperty from a code and a status message\n\t *\n\t * @param {number} code The status-code of the request\n\t * @param {string} message The message of the request\n\t * @return {RequestStatusProperty}\n\t */\n\tstatic fromCodeAndMessage(code, message) {\n\t\treturn new RequestStatusProperty('REQUEST-STATUS', [code.toString(), message])\n\t}\n\n}\n\n// All request statuses registered in RFC 5546\nRequestStatusProperty.SUCCESS = [2.0, 'Success']\nRequestStatusProperty.SUCCESS_FALLBACK = [2.1, 'Success, but fallback taken on one or more property values.']\nRequestStatusProperty.SUCCESS_PROP_IGNORED = [2.2, 'Success; invalid property ignored.']\nRequestStatusProperty.SUCCESS_PROPPARAM_IGNORED = [2.3, 'Success; invalid property parameter ignored.']\nRequestStatusProperty.SUCCESS_NONSTANDARD_PROP_IGNORED = [2.4, 'Success; unknown, non-standard property ignored.']\nRequestStatusProperty.SUCCESS_NONSTANDARD_PROPPARAM_IGNORED = [2.5, 'Success; unknown, non-standard property value ignored.']\nRequestStatusProperty.SUCCESS_COMP_IGNORED = [2.6, 'Success; invalid calendar component ignored.']\nRequestStatusProperty.SUCCESS_FORWARDED = [2.7, 'Success; request forwarded to Calendar User.']\nRequestStatusProperty.SUCCESS_REPEATING_IGNORED = [2.8, 'Success; repeating event ignored. Scheduled as a single component.']\nRequestStatusProperty.SUCCESS_TRUNCATED_END = [2.9, 'Success; truncated end date time to date boundary.']\nRequestStatusProperty.SUCCESS_REPEATING_VTODO_IGNORED = [2.10, 'Success; repeating VTODO ignored.  Scheduled as a single VTODO.']\nRequestStatusProperty.SUCCESS_UNBOUND_RRULE_CLIPPED = [2.11, 'Success; unbounded RRULE clipped at some finite number of instances.']\n\nRequestStatusProperty.CLIENT_INVALID_PROPNAME = [3.0, 'Invalid property name.']\nRequestStatusProperty.CLIENT_INVALID_PROPVALUE = [3.1, 'Invalid property value.']\nRequestStatusProperty.CLIENT_INVALID_PROPPARAM = [3.2, 'Invalid property parameter.']\nRequestStatusProperty.CLIENT_INVALID_PROPPARAMVALUE = [3.3, 'Invalid property parameter value.']\nRequestStatusProperty.CLIENT_INVALUD_CALENDAR_COMP_SEQ = [3.4, 'Invalid calendar component sequence.']\nRequestStatusProperty.CLIENT_INVALID_DATE_TIME = [3.5, 'Invalid date or time.']\nRequestStatusProperty.CLIENT_INVALID_RRULE = [3.6, 'Invalid rule.']\nRequestStatusProperty.CLIENT_INVALID_CU = [3.7, 'Invalid Calendar User.']\nRequestStatusProperty.CLIENT_NO_AUTHORITY = [3.8, 'No authority.']\nRequestStatusProperty.CLIENT_UNSUPPORTED_VERSION = [3.9, 'Unsupported version.']\nRequestStatusProperty.CLIENT_TOO_LARGE = [3.10, 'Request entity too large.']\nRequestStatusProperty.CLIENT_REQUIRED_COMP_OR_PROP_MISSING = [3.11, 'Required component or property missing.']\nRequestStatusProperty.CLIENT_UNKNOWN_COMP_OR_PROP = [3.12, 'Unknown component or property found.']\nRequestStatusProperty.CLIENT_UNSUPPORTED_COMP_OR_PROP = [3.13, 'Unsupported component or property found.']\nRequestStatusProperty.CLIENT_UNSUPPORTED_CAPABILITY = [3.14, 'Unsupported capability.']\n\nRequestStatusProperty.SCHEDULING_EVENT_CONFLICT = [4.0, 'Event conflict.  Date/time is busy.']\n\nRequestStatusProperty.SERVER_REQUEST_NOT_SUPPORTED = [5.0, 'Request not supported.']\nRequestStatusProperty.SERVER_SERVICE_UNAVAILABLE = [5.1, 'Service unavailable.']\nRequestStatusProperty.SERVER_INVALID_CALENDAR_SERVICE = [5.2, 'Invalid calendar service.']\nRequestStatusProperty.SERVER_NO_SCHEDULING_FOR_USER = [5.3, 'No scheduling support for user.']\n","/**\n * @copyright Copyright (c) 2019 Georg Ehrke\n *\n * @author Georg Ehrke <georg-nextcloud@ehrke.email>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nimport Property from './property.js'\n\n/**\n * @class TextProperty\n * @classdesc\n */\nexport default class TextProperty extends Property {\n\n\t/**\n\t * Gets the alternate text\n\t *\n\t * @return {string}\n\t */\n\tget alternateText() {\n\t\treturn this.getParameterFirstValue('ALTREP')\n\t}\n\n\t/**\n\t * Sets the alternate text\n\t *\n\t * @param {string} altRep The alternative text\n\t */\n\tset alternateText(altRep) {\n\t\tthis.updateParameterIfExist('ALTREP', altRep)\n\t}\n\n\t/**\n\t * Gets language of this property\n\t *\n\t * @return {string}\n\t */\n\tget language() {\n\t\treturn this.getParameterFirstValue('LANGUAGE')\n\t}\n\n\t/**\n\t * Sets language of this property\n\t *\n\t * @param {string} language The language of the text\n\t */\n\tset language(language) {\n\t\tthis.updateParameterIfExist('LANGUAGE', language)\n\t}\n\n}\n","/**\n * @copyright Copyright (c) 2019 Georg Ehrke\n *\n * @author Georg Ehrke <georg-nextcloud@ehrke.email>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nimport Property from './property.js'\nimport DurationValue from '../values/durationValue.js'\nimport DateTimeValue from '../values/dateTimeValue.js'\n\n/**\n * @class TriggerProperty\n * @classdesc\n *\n * @url https://tools.ietf.org/html/rfc5545#section-3.8.6.3\n */\nexport default class TriggerProperty extends Property {\n\n\t/**\n\t * Gets the related parameter\n\t *\n\t * @return {string}\n\t */\n\tget related() {\n\t\tif (!this.hasParameter('RELATED')) {\n\t\t\treturn 'START'\n\t\t}\n\n\t\treturn this.getParameterFirstValue('RELATED')\n\t}\n\n\t/**\n\t * Sets the related parameter\n\t *\n\t * @param {string} related Either START or END\n\t */\n\tset related(related) {\n\t\tthis.updateParameterIfExist('RELATED', related)\n\t}\n\n\t/**\n\t * Gets the value of this trigger\n\t * (If you override the setter, you also have to override the getter or\n\t *  it will simply be undefined)\n\t *\n\t * @return {string | number | AbstractValue | string[] | number[] | AbstractValue[]}\n\t */\n\tget value() {\n\t\treturn super.value\n\t}\n\n\t/**\n\t * Set the value of this trigger\n\t *\n\t * @param {DurationValue|DateTimeValue} value The time of trigger\n\t */\n\tset value(value) {\n\t\tsuper.value = value\n\n\t\t// If it's not a duration, remove related parameter\n\t\tif (value instanceof DateTimeValue) {\n\t\t\tthis.deleteParameter('RELATED')\n\t\t\tsuper.value = value.getInUTC()\n\t\t}\n\t}\n\n\t/**\n\t * Gets whether this alarm trigger is relative\n\t *\n\t * @return {boolean}\n\t */\n\tisRelative() {\n\t\treturn this.getFirstValue() instanceof DurationValue\n\t}\n\n\t/**\n\t * Creates a new absolute trigger\n\t *\n\t * @param {DateTimeValue} alarmTime Time to create Trigger from\n\t * @return {TriggerProperty}\n\t */\n\tstatic fromAbsolute(alarmTime) {\n\t\treturn new TriggerProperty('TRIGGER', alarmTime)\n\t}\n\n\t/**\n\t * Creates a new relative trigger\n\t *\n\t * @param {DurationValue} alarmOffset Duration to create Trigger from\n\t * @param {boolean=} relatedToStart Related to Start or end?\n\t * @return {TriggerProperty}\n\t */\n\tstatic fromRelativeAndRelated(alarmOffset, relatedToStart = true) {\n\t\treturn new TriggerProperty('TRIGGER', alarmOffset, [['RELATED', relatedToStart ? 'START' : 'END']])\n\t}\n\n}\n","/**\n * @copyright Copyright (c) 2019 Georg Ehrke\n *\n * @author Georg Ehrke <georg-nextcloud@ehrke.email>\n *\n * @author Richard Steinmetz <richard@steinmetz.cloud>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nimport AttachmentProperty from './attachmentProperty.js'\nimport AttendeeProperty from './attendeeProperty.js'\nimport ConferenceProperty from './conferenceProperty.js'\nimport FreeBusyProperty from './freeBusyProperty.js'\nimport GeoProperty from './geoProperty.js'\nimport ImageProperty from './imageProperty.js'\nimport RelationProperty from './relationProperty.js'\nimport RequestStatusProperty from './requestStatusProperty.js'\nimport TextProperty from './textProperty.js'\nimport TriggerProperty from './triggerProperty.js'\nimport Property from './property.js'\nimport { uc } from '../helpers/stringHelper.js'\n\n/**\n *\n * @param {string} propName Name of the prop to get constructor for\n * @return {AttendeeProperty|GeoProperty|ConferenceProperty|Property|AttachmentProperty|ImageProperty|RelationProperty|RequestStatusProperty}\n */\nexport function getConstructorForPropertyName(propName) {\n\tswitch (uc(propName)) {\n\tcase 'ATTACH':\n\t\treturn AttachmentProperty\n\n\tcase 'ATTENDEE':\n\tcase 'ORGANIZER':\n\t\treturn AttendeeProperty\n\n\tcase 'CONFERENCE':\n\t\treturn ConferenceProperty\n\n\tcase 'FREEBUSY':\n\t\treturn FreeBusyProperty\n\n\tcase 'GEO':\n\t\treturn GeoProperty\n\n\tcase 'IMAGE':\n\t\treturn ImageProperty\n\n\tcase 'RELATED-TO':\n\t\treturn RelationProperty\n\n\tcase 'REQUEST-STATUS':\n\t\treturn RequestStatusProperty\n\n\tcase 'TRIGGER':\n\t\treturn TriggerProperty\n\n\tcase 'COMMENT':\n\tcase 'CONTACT':\n\tcase 'DESCRIPTION':\n\tcase 'LOCATION':\n\tcase 'SUMMARY':\n\t\treturn TextProperty\n\n\tdefault:\n\t\treturn Property\n\t}\n}\n\nexport {\n\tAttachmentProperty,\n\tAttendeeProperty,\n\tConferenceProperty,\n\tFreeBusyProperty,\n\tGeoProperty,\n\tImageProperty,\n\tProperty,\n\tRelationProperty,\n\tRequestStatusProperty,\n\tTextProperty,\n\tTriggerProperty,\n}\n","/**\n * @copyright Copyright (c) 2019 Georg Ehrke\n *\n * @author Georg Ehrke <georg-nextcloud@ehrke.email>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nimport lockableTrait from '../traits/lockable.js'\nimport ExpectedICalJSError from '../errors/expectedICalJSError.js'\nimport { lc, uc, ucFirst } from '../helpers/stringHelper.js'\nimport { createComponent } from '../factories/icalFactory.js'\nimport { getConstructorForPropertyName } from '../properties/index.js'\nimport Property from '../properties/property.js'\nimport Parameter from '../parameters/parameter.js'\nimport observerTrait from '../traits/observer.js'\nimport ICAL from 'ical.js'\n\n/**\n * @class AbstractComponent\n */\nexport default class AbstractComponent extends observerTrait(lockableTrait(class {})) {\n\n\t/**\n\t * Constructor\n\t *\n\t * @param {string} name - Name of component\n\t * @param {Property[]} properties - Array of properties stored inside the component\n\t * @param {AbstractComponent[]} components - Array of subcomponents stored inside this component\n\t * @param {CalendarComponent|null} root - The root of this calendar document\n\t * @param {AbstractComponent|null} parent - The parent component of this element\n\t */\n\tconstructor(name, properties = [], components = [], root = null, parent = null) {\n\t\tsuper()\n\n\t\t/**\n\t\t * Name of component\n\t\t *\n\t\t * @type {string}\n\t\t * @private\n\t\t */\n\t\tthis._name = uc(name)\n\n\t\t/**\n\t\t * All properties in this component\n\t\t *\n\t\t * @type {Map<string, Property[]>}\n\t\t * @private\n\t\t */\n\t\tthis._properties = new Map()\n\n\t\t/**\n\t\t * All subcomponents of this component\n\t\t *\n\t\t * @type {Map<string, AbstractComponent[]>}\n\t\t * @private\n\t\t */\n\t\tthis._components = new Map()\n\n\t\t/**\n\t\t * Root node of ical document\n\t\t *\n\t\t * @type {CalendarComponent|null}\n\t\t * @private\n\t\t */\n\t\tthis._root = root\n\n\t\t/**\n\t\t * Parent node\n\t\t *\n\t\t * @type {AbstractComponent|null}\n\t\t * @private\n\t\t */\n\t\tthis._parent = parent\n\n\t\tthis._setPropertiesFromConstructor(properties)\n\t\tthis._setComponentsFromConstructor(components)\n\t}\n\n\t/**\n\t * Get the component's name\n\t *\n\t * @return {string}\n\t */\n\tget name() {\n\t\treturn this._name\n\t}\n\n\t/**\n\t * Gets the root of this calendar-document\n\t *\n\t * @return {CalendarComponent}\n\t */\n\tget root() {\n\t\treturn this._root\n\t}\n\n\t/**\n\t * Sets the root of this calendar-document\n\t *\n\t * @param {CalendarComponent} root The new root element\n\t */\n\tset root(root) {\n\t\tthis._modify()\n\t\tthis._root = root\n\n\t\tfor (const property of this.getPropertyIterator()) {\n\t\t\tproperty.root = root\n\t\t}\n\n\t\tfor (const component of this.getComponentIterator()) {\n\t\t\tcomponent.root = root\n\t\t}\n\n\t}\n\n\t/**\n\t * Gets the parent component\n\t *\n\t * @return {AbstractComponent}\n\t */\n\tget parent() {\n\t\treturn this._parent\n\t}\n\n\t/**\n\t * Sets the parent component\n\t *\n\t * @param {AbstractComponent} parent The new parent element\n\t */\n\tset parent(parent) {\n\t\tthis._modify()\n\t\tthis._parent = parent\n\t}\n\n\t/**\n\t * Gets the first property that matches the given propertyName\n\t *\n\t * @param {string} propertyName Name of the property to get\n\t * @return {Property|null}\n\t */\n\tgetFirstProperty(propertyName) {\n\t\tif (!this._properties.has(uc(propertyName))) {\n\t\t\treturn null\n\t\t}\n\n\t\treturn this._properties.get(uc(propertyName))[0]\n\t}\n\n\t/**\n\t * Gets the first value of the first property matching that name\n\t *\n\t * @param {string} propertyName Name of the property to get first value of\n\t * @return {string | number | AbstractValue | string[] | number[] | AbstractValue[] | null}\n\t */\n\tgetFirstPropertyFirstValue(propertyName) {\n\t\tconst property = this.getFirstProperty(propertyName)\n\t\tif (!property) {\n\t\t\treturn null\n\t\t}\n\n\t\treturn property.getFirstValue()\n\t}\n\n\t/**\n\t * update a property if it exists,\n\t * create a new one if it doesn't\n\t *\n\t * @param {string} propertyName Name of the property to update / create\n\t * @param {string | number | AbstractValue | string[] | number[] | AbstractValue[] | null} value The value to set\n\t */\n\tupdatePropertyWithValue(propertyName, value) {\n\t\tthis._modify()\n\t\tconst property = this.getFirstProperty(propertyName)\n\t\tif (property) {\n\t\t\tproperty.value = value\n\t\t} else {\n\t\t\tconst constructor = getConstructorForPropertyName(propertyName)\n\t\t\tconst newProperty = new constructor(propertyName, value, [], this, this.root)\n\t\t\tthis.addProperty(newProperty)\n\t\t}\n\t}\n\n\t/**\n\t * Returns iterator for all properties of a given propertyName\n\t * or if no propertyName was given over all available properties\n\t *\n\t * @param {string=} propertyName Name of the property to get an iterator for\n\t */\n\t* getPropertyIterator(propertyName = null) {\n\t\tif (propertyName) {\n\t\t\tif (!this.hasProperty(propertyName)) {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\t// this._properties.get() returns an array\n\t\t\t// [Symbol.iterator]() creates an iterator from that array\n\t\t\tyield * this._properties.get(uc(propertyName)).slice()[Symbol.iterator]()\n\t\t} else {\n\t\t\tfor (const key of this._properties.keys()) {\n\t\t\t\tyield * this.getPropertyIterator(key)\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Get all properties by name that match the given LANG parameter\n\t *\n\t * @param {string} propertyName The name of the property\n\t * @param {string | null} lang The lang to query\n\t * @private\n\t */\n\t* _getAllOfPropertyByLang(propertyName, lang) {\n\t\tfor (const property of this.getPropertyIterator(propertyName)) {\n\t\t\t// getParameterFirstValue will return null if language not set, so no language parameter will match lang=null\n\t\t\tif (property.getParameterFirstValue('LANGUAGE') === lang) {\n\t\t\t\tyield property\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Get the first property by name that matches the given LANG parameter\n\t *\n\t * @param {string} propertyName The name of the property\n\t * @param {string | null} lang The lang to query\n\t * @return {Property|null}\n\t * @private\n\t */\n\t_getFirstOfPropertyByLang(propertyName, lang) {\n\t\tconst iterator = this._getAllOfPropertyByLang(propertyName, lang)\n\t\treturn iterator.next().value || null\n\t}\n\n\t/**\n\t * Adds a property\n\t *\n\t * @param {Property} property The property to add\n\t * @return {boolean}\n\t */\n\taddProperty(property) {\n\t\tthis._modify()\n\n\t\tproperty.root = this.root\n\t\tproperty.parent = this\n\n\t\tif (this._properties.has(property.name)) {\n\t\t\tconst arr = this._properties.get(property.name)\n\t\t\tif (arr.indexOf(property) !== -1) {\n\t\t\t\t// If the property is already part of this component,\n\t\t\t\t// return false to indicate an error\n\t\t\t\treturn false\n\t\t\t}\n\n\t\t\tarr.push(property)\n\t\t} else {\n\t\t\tthis._properties.set(property.name, [property])\n\t\t}\n\n\t\tproperty.subscribe(() => this._notifySubscribers())\n\n\t\treturn true\n\t}\n\n\t/**\n\t * Checks if this component has a property of the given name\n\t *\n\t * @param {string} propertyName The name of the property\n\t * @return {boolean}\n\t */\n\thasProperty(propertyName) {\n\t\treturn this._properties.has(uc(propertyName))\n\t}\n\n\t/**\n\t * Removes the given property from this component\n\t *\n\t * @param {Property} property The property to delete\n\t * @return {boolean}\n\t */\n\tdeleteProperty(property) {\n\t\tthis._modify()\n\t\tif (!this._properties.has(property.name)) {\n\t\t\treturn false\n\t\t}\n\n\t\tconst arr = this._properties.get(property.name)\n\t\tconst index = arr.indexOf(property)\n\t\tif (index === -1) {\n\t\t\treturn false\n\t\t}\n\n\t\tif (index !== -1 && arr.length === 1) {\n\t\t\t// If this is the last property of the given name,\n\t\t\t// remove the entire array from _properties\n\t\t\t// This is required for hasProperty to work properly\n\t\t\tthis._properties.delete(property.name)\n\t\t} else {\n\t\t\tarr.splice(index, 1)\n\t\t}\n\n\t\treturn true\n\t}\n\n\t/**\n\t * Removes all properties of a given name\n\t *\n\t * @param {string} propertyName The name of the property\n\t * @return {boolean}\n\t */\n\tdeleteAllProperties(propertyName) {\n\t\tthis._modify()\n\t\treturn this._properties.delete(uc(propertyName))\n\t}\n\n\t/**\n\t * Gets the first component of a given name\n\t *\n\t * @param {string} componentName The name of the component\n\t * @return {AbstractComponent|null}\n\t */\n\tgetFirstComponent(componentName) {\n\t\tif (!this.hasComponent(componentName)) {\n\t\t\treturn null\n\t\t}\n\n\t\treturn this._components.get(uc(componentName))[0]\n\t}\n\n\t/**\n\t * Returns iterator for all components of a given componentName\n\t * or if no componentName was given over all available components\n\t *\n\t * @param {string=} componentName The name of the component\n\t */\n\t* getComponentIterator(componentName) {\n\t\tif (componentName) {\n\t\t\tif (!this.hasComponent(componentName)) {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\t// this._components.get() returns an array\n\t\t\t// [Symbol.iterator]() creates an iterator from that array\n\t\t\tyield * this._components.get(uc(componentName)).slice()[Symbol.iterator]()\n\t\t} else {\n\t\t\tfor (const key of this._components.keys()) {\n\t\t\t\tyield * this.getComponentIterator(key)\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Adds a new component to this component\n\t *\n\t * @param {AbstractComponent} component The component to add\n\t * @return {boolean}\n\t */\n\taddComponent(component) {\n\t\tthis._modify()\n\n\t\tcomponent.root = this.root\n\t\tcomponent.parent = this\n\n\t\tif (this._components.has(component.name)) {\n\t\t\tconst arr = this._components.get(component.name)\n\t\t\tif (arr.indexOf(component) !== -1) {\n\t\t\t\t// If the property is already part of this component,\n\t\t\t\t// return false to indicate an error\n\t\t\t\treturn false\n\t\t\t}\n\n\t\t\tarr.push(component)\n\t\t} else {\n\t\t\tthis._components.set(component.name, [component])\n\t\t}\n\n\t\tcomponent.subscribe(() => this._notifySubscribers())\n\n\t\treturn true\n\t}\n\n\t/**\n\t * Checks if this component has a component of the given name\n\t *\n\t * @param {string} componentName The name of the component\n\t * @return {boolean}\n\t */\n\thasComponent(componentName) {\n\t\treturn this._components.has(uc(componentName))\n\t}\n\n\t/**\n\t * Removes the given component from this component\n\t *\n\t * @param {AbstractComponent} component The component to delete\n\t * @return {boolean}\n\t */\n\tdeleteComponent(component) {\n\t\tthis._modify()\n\t\tif (!this._components.has(component.name)) {\n\t\t\treturn false\n\t\t}\n\n\t\tconst arr = this._components.get(component.name)\n\t\tconst index = arr.indexOf(component)\n\t\tif (index === -1) {\n\t\t\treturn false\n\t\t}\n\n\t\tif (index !== -1 && arr.length === 1) {\n\t\t\t// If this is the last component of the given name,\n\t\t\t// remove the entire array from _components\n\t\t\t// This is required for hasComponent to work properly\n\t\t\tthis._components.delete(component.name)\n\t\t} else {\n\t\t\tarr.splice(index, 1)\n\t\t}\n\n\t\treturn true\n\t}\n\n\t/**\n\t * Removes all components of a given name\n\t *\n\t * @param {string} componentName The name of the component\n\t * @return {boolean}\n\t */\n\tdeleteAllComponents(componentName) {\n\t\tthis._modify()\n\t\treturn this._components.delete(uc(componentName))\n\t}\n\n\t/**\n\t * Marks this parameter is immutable\n\t * locks it against further modification\n\t */\n\tlock() {\n\t\tsuper.lock()\n\n\t\tfor (const property of this.getPropertyIterator()) {\n\t\t\tproperty.lock()\n\t\t}\n\n\t\tfor (const component of this.getComponentIterator()) {\n\t\t\tcomponent.lock()\n\t\t}\n\t}\n\n\t/**\n\t * Marks this parameter as mutable\n\t * allowing further modification\n\t */\n\tunlock() {\n\t\tsuper.unlock()\n\n\t\tfor (const property of this.getPropertyIterator()) {\n\t\t\tproperty.unlock()\n\t\t}\n\n\t\tfor (const component of this.getComponentIterator()) {\n\t\t\tcomponent.unlock()\n\t\t}\n\t}\n\n\t/**\n\t * Creates a copy of this parameter\n\t *\n\t * @return {AbstractComponent}\n\t */\n\tclone() {\n\t\tconst properties = []\n\t\tfor (const property of this.getPropertyIterator()) {\n\t\t\tproperties.push(property.clone())\n\t\t}\n\n\t\tconst components = []\n\t\tfor (const component of this.getComponentIterator()) {\n\t\t\tcomponents.push(component.clone())\n\t\t}\n\n\t\treturn new this.constructor(this.name, properties, components, this.root, this.parent)\n\t}\n\n\t/**\n\t * Adds properties from constructor to this._properties\n\t *\n\t * @param {Property[]} properties Array of properties\n\t * @private\n\t */\n\t_setPropertiesFromConstructor(properties) {\n\t\tfor (let property of properties) {\n\t\t\tif (Array.isArray(property)) {\n\t\t\t\tconst constructor = getConstructorForPropertyName(property[0])\n\t\t\t\tproperty = new constructor(property[0], property[1])\n\t\t\t}\n\n\t\t\tthis.addProperty(property)\n\t\t}\n\t}\n\n\t/**\n\t * Adds components from constructor to this._components\n\t *\n\t * @param {AbstractComponent[]} components Array of components\n\t * @private\n\t */\n\t_setComponentsFromConstructor(components) {\n\t\tfor (const component of components) {\n\t\t\tthis.addComponent(component)\n\t\t}\n\t}\n\n\t/**\n\t * Creates a new Component based on an ical object\n\t *\n\t * @param {ICAL.Component} icalValue The ical.js component to initialise from\n\t * @param {CalendarComponent=} root The root of the Calendar Document\n\t * @param {AbstractComponent=} parent The parent element of this component\n\t * @return {AbstractComponent}\n\t */\n\tstatic fromICALJs(icalValue, root = null, parent = null) {\n\t\tif (!(icalValue instanceof ICAL.Component)) {\n\t\t\tthrow new ExpectedICalJSError()\n\t\t}\n\n\t\tconst name = icalValue.name\n\t\tconst newComponent = new this(name, [], [], root, parent)\n\n\t\tfor (const icalProp of icalValue.getAllProperties()) {\n\t\t\tconst constructor = getConstructorForPropertyName(icalProp.name)\n\t\t\tconst property = constructor.fromICALJs(icalProp, root, newComponent)\n\t\t\tnewComponent.addProperty(property)\n\t\t}\n\n\t\tfor (const icalComp of icalValue.getAllSubcomponents()) {\n\t\t\tconst constructor = this._getConstructorForComponentName(icalComp.name)\n\t\t\tconst component = constructor.fromICALJs(icalComp, root, newComponent)\n\t\t\tnewComponent.addComponent(component)\n\t\t}\n\n\t\treturn newComponent\n\t}\n\n\t/**\n\t * Gets a constructor for a give component name\n\t *\n\t * @param {string} componentName The name of the component\n\t * @return {AbstractComponent}\n\t * @protected\n\t */\n\tstatic _getConstructorForComponentName(componentName) {\n\t\treturn AbstractComponent\n\t}\n\n\t/**\n\t * turns this Component into an ICAL.js component\n\t *\n\t * @return {ICAL.Component}\n\t */\n\ttoICALJs() {\n\t\tconst component = createComponent(lc(this.name))\n\n\t\tfor (const prop of this.getPropertyIterator()) {\n\t\t\tcomponent.addProperty(prop.toICALJs())\n\t\t}\n\t\tfor (const comp of this.getComponentIterator()) {\n\t\t\tcomponent.addSubcomponent(comp.toICALJs())\n\t\t}\n\n\t\treturn component\n\t}\n\n}\n\n/**\n * Advertise properties that may at most occur once\n *\n * Properties, which may at most occur once, get a simple getter and setter\n *\n * @param {object} prototype The object's prototype\n * @param {object} options The options for advertising properties\n * @param {boolean} advertiseValueOnly Whether to advertise the value only or the entire property\n */\nexport function advertiseSingleOccurrenceProperty(prototype, options, advertiseValueOnly = true) {\n\toptions = getDefaultOncePropConfig(options)\n\n\tObject.defineProperty(prototype, options.name, {\n\t\tget() {\n\t\t\tconst value = this.getFirstPropertyFirstValue(options.iCalendarName)\n\n\t\t\tif (!value) {\n\t\t\t\treturn options.defaultValue\n\t\t\t} else {\n\t\t\t\tif (Array.isArray(options.allowedValues) && !options.allowedValues.includes(value)) {\n\t\t\t\t\treturn options.unknownValue\n\t\t\t\t}\n\n\t\t\t\treturn value\n\t\t\t}\n\t\t},\n\t\tset(value) {\n\t\t\tthis._modify()\n\n\t\t\tif (value === null) {\n\t\t\t\tthis.deleteAllProperties(options.iCalendarName)\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tif (Array.isArray(options.allowedValues) && !options.allowedValues.includes(value)) {\n\t\t\t\tthrow new TypeError('Illegal value')\n\t\t\t}\n\t\t\tthis.updatePropertyWithValue(options.iCalendarName, value)\n\t\t},\n\t})\n}\n\n/**\n * Advertise properties that may occur more than once\n *\n * Properties, which may occur more than once, won't get simple getter / setter,\n * but rather a more advanced set of get{name}Iterator, get{name}List, add{name},\n * remove{name} and clearAll{name} methods\n *\n * @param {object} prototype The object's prototype\n * @param {object} options The options for advertising properties\n */\nexport function advertiseMultipleOccurrenceProperty(prototype, options) {\n\toptions = getDefaultMultiplePropConfig(options)\n\n\tprototype['get' + ucFirst(options.name) + 'Iterator'] = function * () {\n\t\tyield * this.getPropertyIterator(options.iCalendarName)\n\t}\n\n\tprototype['get' + ucFirst(options.name) + 'List'] = function() {\n\t\treturn Array.from(this['get' + ucFirst(options.name) + 'Iterator']())\n\t}\n\n\tprototype['remove' + ucFirst(options.name)] = function(property) {\n\t\tthis.deleteProperty(property)\n\t}\n\n\tprototype['clearAll' + ucFirst(options.pluralName)] = function() {\n\t\tthis.deleteAllProperties(options.iCalendarName)\n\t}\n}\n\n/**\n * advertises a multi-value string property enabling simple access by language\n * This is used for:\n * - CATEGORIES\n * - RESOURCES\n *\n * @param {object} prototype The object's prototype\n * @param {object} options The options for advertising properties\n */\nexport function advertiseMultiValueStringPropertySeparatedByLang(prototype, options) {\n\toptions = getDefaultMultiplePropConfig(options)\n\n\tprototype['get' + ucFirst(options.name) + 'Iterator'] = function * (lang = null) {\n\t\tfor (const property of this._getAllOfPropertyByLang(options.iCalendarName, lang)) {\n\t\t\tyield * property.getValueIterator()\n\t\t}\n\t}\n\n\tprototype['get' + ucFirst(options.name) + 'List'] = function(lang = null) {\n\t\treturn Array.from(this['get' + ucFirst(options.name) + 'Iterator'](lang))\n\t}\n\n\tprototype['add' + ucFirst(options.name)] = function(value, lang = null) {\n\t\tconst property = this._getFirstOfPropertyByLang(options.iCalendarName, lang)\n\t\tif (property) {\n\t\t\tproperty.addValue(value)\n\t\t} else {\n\t\t\tconst newProperty = new Property(options.iCalendarName, [value])\n\t\t\tif (lang) {\n\t\t\t\tconst languageParameter = new Parameter('LANGUAGE', lang)\n\t\t\t\tnewProperty.setParameter(languageParameter)\n\t\t\t}\n\n\t\t\tthis.addProperty(newProperty)\n\t\t}\n\t}\n\n\tprototype['remove' + ucFirst(options.name)] = function(value, lang = null) {\n\t\tfor (const property of this._getAllOfPropertyByLang(options.iCalendarName, lang)) {\n\t\t\tif (property.isMultiValue() && property.hasValue(value)) {\n\t\t\t\tif (property.value.length === 1) {\n\t\t\t\t\tthis.deleteProperty(property)\n\t\t\t\t\treturn true\n\t\t\t\t}\n\n\t\t\t\tproperty.removeValue(value)\n\t\t\t\treturn true\n\t\t\t}\n\t\t}\n\n\t\treturn false\n\t}\n\n\tprototype['clearAll' + ucFirst(options.pluralName)] = function(lang = null) {\n\t\tfor (const property of this._getAllOfPropertyByLang(options.iCalendarName, lang)) {\n\t\t\tthis.deleteProperty(property)\n\t\t}\n\t}\n}\n\n/**\n * advertise a component\n *\n * @param {object} prototype The object's prototype\n * @param {object} options The options for advertising components\n */\nexport function advertiseComponent(prototype, options) {\n\toptions = getDefaultMultipleCompConfig(options)\n\n\tprototype['get' + ucFirst(options.name) + 'Iterator'] = function * () {\n\t\tyield * this.getComponentIterator(options.iCalendarName)\n\t}\n\n\tprototype['get' + ucFirst(options.name) + 'List'] = function() {\n\t\treturn Array.from(this['get' + ucFirst(options.name) + 'Iterator']())\n\t}\n\n\tprototype['remove' + ucFirst(options.name)] = function(component) {\n\t\tthis.deleteComponent(component)\n\t}\n\n\tprototype['clearAll' + ucFirst(options.pluralName)] = function() {\n\t\tthis.deleteAllComponents(options.iCalendarName)\n\t}\n}\n\n/**\n * Fill up the options object for advertiseProperty\n *\n * @param {object | string} options The options object\n * @param {string} options.name Advertised name of the property\n * @param {string=} options.iCalendarName The iCalendar name of the property\n * @param {string[]=} options.allowedValues A list of allowed values\n * @param {string | number=} options.defaultValue The default value if unset\n * @param {string | number=} options.unknownValue The fallback value if unknown value\n * @return {object}\n */\nfunction getDefaultOncePropConfig(options) {\n\tif (typeof options === 'string') {\n\t\toptions = {\n\t\t\tname: options,\n\t\t}\n\t}\n\n\treturn Object.assign({}, {\n\t\tiCalendarName: uc(options.name),\n\t\tpluralName: options.name + 's',\n\t\tallowedValues: null,\n\t\tdefaultValue: null,\n\t\tunknownValue: null,\n\t}, options)\n}\n\n/**\n * Fill up the options object for advertiseProperty\n *\n * @param {object | string} options The options object\n * @param {string} options.name Advertised name of property\n * @param {string=} options.iCalendarName The iCalendar name of the property\n * @param {boolean=} options.customAddMethod Whether or not to use a custom add method\n * @return {object}\n */\nfunction getDefaultMultiplePropConfig(options) {\n\tif (typeof options === 'string') {\n\t\toptions = {\n\t\t\tname: options,\n\t\t}\n\t}\n\n\treturn Object.assign({}, {\n\t\tiCalendarName: uc(options.name),\n\t\tpluralName: options.name + 's',\n\t}, options)\n}\n\n/**\n * Fill up the options object for advertiseComponent\n *\n * @param {object | string} options Options destructuring object\n * @param {string} options.name Advertised name of component\n * @param {string=} options.iCalendarName The iCalendar name of the component\n * @param {boolean=} options.customAddMethod Whether or not to use a custom add method\n * @return {object}\n */\nfunction getDefaultMultipleCompConfig(options) {\n\tif (typeof options === 'string') {\n\t\toptions = {\n\t\t\tname: options,\n\t\t}\n\t}\n\n\treturn Object.assign({}, {\n\t\tiCalendarName: 'V' + uc(options.name),\n\t\tpluralName: options.name + 's',\n\t}, options)\n}\n","/**\n * @copyright Copyright (c) 2019 Georg Ehrke\n *\n * @author Georg Ehrke <georg-nextcloud@ehrke.email>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\n\n/**\n * Gets a new DateObject set to now\n *\n * @return {Date}\n */\nexport function dateFactory() {\n\treturn new Date()\n}\n","/**\n * @copyright Copyright (c) 2019 Georg Ehrke\n *\n * @author Georg Ehrke <georg-nextcloud@ehrke.email>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\n\nexport default class RecurringWithoutDtStartError extends Error {}\n","/**\n * @copyright Copyright (c) 2019 Georg Ehrke\n *\n * @author Georg Ehrke <georg-nextcloud@ehrke.email>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nimport Property from '../properties/property.js'\nimport { uc } from '../helpers/stringHelper.js'\nimport DateTimeValue from '../values/dateTimeValue.js'\nimport ModificationNotAllowedError from '../errors/modificationNotAllowedError.js'\nimport RecurringWithoutDtStartError from '../errors/recurringWithoutDtStartError.js'\nimport PeriodValue from '../values/periodValue.js'\nimport ICAL from 'ical.js'\n\n/**\n * @class RecurrenceHelper\n * @classdesc\n *\n * TODO: This needs caching\n */\nexport default class RecurrenceManager {\n\n\t/**\n\t * Constructor\n\t *\n\t * @param {AbstractRecurringComponent} masterItem The master-item of the recurrence-set\n\t */\n\tconstructor(masterItem) {\n\n\t\t/**\n\t\t *\n\t\t * @type {AbstractRecurringComponent}\n\t\t * @private\n\t\t */\n\t\tthis._masterItem = masterItem\n\n\t\t/**\n\t\t * Set of Recurrence exception items\n\t\t *\n\t\t * Number is the unix time representation of the recurrence ID\n\t\t *\n\t\t * @type {Map<number, AbstractRecurringComponent>}\n\t\t * @private\n\t\t */\n\t\tthis._recurrenceExceptionItems = new Map()\n\n\t\t/**\n\t\t * A sorted index of recurrence ids with range\n\t\t *\n\t\t * @type {number[]}\n\t\t * @private\n\t\t */\n\t\tthis._rangeRecurrenceExceptionItemsIndex = []\n\n\t\t/**\n\t\t * Cached difference of dtstart and recurrenceId for recurrence exceptions with range\n\t\t *\n\t\t * @type {Map<number, DurationValue>}\n\t\t * @private\n\t\t */\n\t\tthis._rangeRecurrenceExceptionItemsDiffCache = new Map()\n\n\t\t/**\n\t\t * Set of Recurrence exception items that have a RANGE of THISANDFUTURE\n\t\t *\n\t\t * Number is the unix time representation of the recurrence ID\n\t\t *\n\t\t * @type {Map<number, AbstractRecurringComponent>}\n\t\t * @private\n\t\t */\n\t\tthis._rangeRecurrenceExceptionItems = new Map()\n\t}\n\n\t/**\n\t *\n\t * @return {AbstractRecurringComponent}\n\t */\n\tget masterItem() {\n\t\treturn this._masterItem\n\t}\n\n\t/**\n\t *\n\t * @param {AbstractRecurringComponent} masterItem The master-item of the recurrence-set\n\t */\n\tset masterItem(masterItem) {\n\t\tthis._masterItem = masterItem\n\t}\n\n\t/**\n\t * Gets an iterator over all registered recurrence exceptions of this calendar-document\n\t */\n\t* getRecurrenceExceptionIterator() {\n\t\tyield * this._recurrenceExceptionItems.values()\n\t}\n\n\t/**\n\t * Gets a list of all registered recurrence-exceptions of this calendar-document\n\t *\n\t * @return {AbstractRecurringComponent[]}\n\t */\n\tgetRecurrenceExceptionList() {\n\t\treturn Array.from(this.getRecurrenceExceptionIterator())\n\t}\n\n\t/**\n\t * Checks if there is a recurrence Exception for a given recurrenceId\n\t *\n\t * @param {DateTimeValue | number} recurrenceId The recurrenceId to check\n\t * @return {boolean}\n\t */\n\thasRecurrenceExceptionForId(recurrenceId) {\n\t\tif (recurrenceId instanceof DateTimeValue) {\n\t\t\trecurrenceId = recurrenceId.unixTime\n\t\t} else if (recurrenceId instanceof ICAL.Time) {\n\t\t\trecurrenceId = recurrenceId.toUnixTime()\n\t\t}\n\n\t\treturn this._recurrenceExceptionItems.has(recurrenceId)\n\t}\n\n\t/**\n\t * Gets the recurrence exception for a given recurrence Id\n\t *\n\t * @param {DateTimeValue | number} recurrenceId The recurrenceId to get\n\t * @return {AbstractRecurringComponent|null}\n\t */\n\tgetRecurrenceException(recurrenceId) {\n\t\tif (recurrenceId instanceof DateTimeValue) {\n\t\t\trecurrenceId = recurrenceId.unixTime\n\t\t} else if (recurrenceId instanceof ICAL.Time) {\n\t\t\trecurrenceId = recurrenceId.toUnixTime()\n\t\t}\n\n\t\treturn this._recurrenceExceptionItems.get(recurrenceId) || null\n\t}\n\n\t/**\n\t * Check if there is a recurrence-exception with a range for a given recurrence-id\n\t *\n\t * @param {DateTimeValue | number} recurrenceId The recurrenceId to check\n\t * @return {boolean}\n\t */\n\thasRangeRecurrenceExceptionForId(recurrenceId) {\n\t\tif (recurrenceId instanceof DateTimeValue) {\n\t\t\trecurrenceId = recurrenceId.unixTime\n\t\t} else if (recurrenceId instanceof ICAL.Time) {\n\t\t\trecurrenceId = recurrenceId.toUnixTime()\n\t\t}\n\n\t\tif (this._rangeRecurrenceExceptionItemsIndex.length === 0) {\n\t\t\treturn false\n\t\t}\n\n\t\treturn this._rangeRecurrenceExceptionItemsIndex[0] < recurrenceId\n\t}\n\n\t/**\n\t * Get recurrence-exception with range that's affecting the given recurrence-id\n\t *\n\t * @param {DateTimeValue | number} recurrenceId The recurrenceId to get\n\t * @return {AbstractRecurringComponent|null}\n\t */\n\tgetRangeRecurrenceExceptionForId(recurrenceId) {\n\t\tif (recurrenceId instanceof DateTimeValue) {\n\t\t\trecurrenceId = recurrenceId.unixTime\n\t\t} else if (recurrenceId instanceof ICAL.Time) {\n\t\t\trecurrenceId = recurrenceId.toUnixTime()\n\t\t}\n\n\t\tconst index = ICAL.helpers.binsearchInsert(\n\t\t\tthis._rangeRecurrenceExceptionItemsIndex,\n\t\t\trecurrenceId,\n\t\t\t(a, b) => a - b\n\t\t)\n\n\t\tif (index === 0) {\n\t\t\treturn null\n\t\t}\n\n\t\tconst key = this._rangeRecurrenceExceptionItemsIndex[index - 1]\n\t\treturn this._rangeRecurrenceExceptionItems.get(key)\n\t}\n\n\t/**\n\t * Gets the difference between recurrence-id and start\n\t * Mostly needed to handle recurrence-exceptions with range\n\t *\n\t * @param {DateTimeValue | number} recurrenceId The recurrenceId to get\n\t * @return {DurationValue|null}\n\t */\n\tgetRangeRecurrenceExceptionDiff(recurrenceId) {\n\t\tif (recurrenceId instanceof DateTimeValue) {\n\t\t\trecurrenceId = recurrenceId.unixTime\n\t\t} else if (recurrenceId instanceof ICAL.Time) {\n\t\t\trecurrenceId = recurrenceId.toUnixTime()\n\t\t}\n\n\t\tif (this._rangeRecurrenceExceptionItemsDiffCache.has(recurrenceId)) {\n\t\t\treturn this._rangeRecurrenceExceptionItemsDiffCache.get(recurrenceId)\n\t\t}\n\n\t\tconst recurrenceException = this.getRangeRecurrenceExceptionForId(recurrenceId)\n\t\tif (!recurrenceException) {\n\t\t\treturn null\n\t\t}\n\n\t\tconst originalRecurrenceId = recurrenceException.recurrenceId\n\t\tconst originalModifiedStart = recurrenceException.startDate\n\n\t\tconst difference = originalModifiedStart.subtractDateWithTimezone(originalRecurrenceId)\n\t\tdifference.lock()\n\n\t\tthis._rangeRecurrenceExceptionItemsDiffCache.set(recurrenceId, difference)\n\t\treturn difference\n\t}\n\n\t/**\n\t * Adds a new recurrence-exception to this calendar-document\n\t *\n\t * @param {AbstractRecurringComponent} recurrenceExceptionItem The recurrence-exception-item to relate to recurrence-set\n\t */\n\trelateRecurrenceException(recurrenceExceptionItem) {\n\t\tthis._modify()\n\t\tconst key = this._getRecurrenceIdKey(recurrenceExceptionItem)\n\n\t\tthis._recurrenceExceptionItems.set(key, recurrenceExceptionItem)\n\t\tif (recurrenceExceptionItem.modifiesFuture()) {\n\t\t\tthis._rangeRecurrenceExceptionItems.set(key, recurrenceExceptionItem)\n\t\t\tconst index = ICAL.helpers.binsearchInsert(\n\t\t\t\tthis._rangeRecurrenceExceptionItemsIndex,\n\t\t\t\tkey,\n\t\t\t\t(a, b) => a - b\n\t\t\t)\n\n\t\t\tthis._rangeRecurrenceExceptionItemsIndex.splice(index, 0, key)\n\t\t}\n\n\t\trecurrenceExceptionItem.recurrenceManager = this\n\t}\n\n\t/**\n\t * Removes a recurrence exception by the item itself\n\t *\n\t * @param {AbstractRecurringComponent} recurrenceExceptionItem The recurrence-exception remove\n\t */\n\tremoveRecurrenceException(recurrenceExceptionItem) {\n\t\tconst key = this._getRecurrenceIdKey(recurrenceExceptionItem)\n\t\tthis.removeRecurrenceExceptionByRecurrenceId(key)\n\t}\n\n\t/**\n\t * Removes a recurrence exception by it's unix-time\n\t *\n\t * @param {number} recurrenceId The recurrence-exception to remove\n\t */\n\tremoveRecurrenceExceptionByRecurrenceId(recurrenceId) {\n\t\tthis._modify()\n\t\tthis._recurrenceExceptionItems.delete(recurrenceId)\n\t\tthis._rangeRecurrenceExceptionItems.delete(recurrenceId)\n\t\tthis._rangeRecurrenceExceptionItemsDiffCache.delete(recurrenceId)\n\n\t\tconst index = this._rangeRecurrenceExceptionItemsIndex.indexOf(recurrenceId)\n\t\tif (index !== -1) {\n\t\t\tthis._rangeRecurrenceExceptionItemsIndex.splice(index, 1)\n\t\t}\n\t}\n\n\t/**\n\t *\n\t * @param {AbstractRecurringComponent} recurrenceExceptionItem Object to get key from\n\t * @return {number}\n\t * @private\n\t */\n\t_getRecurrenceIdKey(recurrenceExceptionItem) {\n\t\treturn recurrenceExceptionItem\n\t\t\t.recurrenceId\n\t\t\t.unixTime\n\t}\n\n\t/**\n\t * Gets an iterator over all recurrence rules\n\t */\n\t* getRecurrenceRuleIterator() {\n\t\tfor (const property of this._masterItem.getPropertyIterator('RRULE')) {\n\t\t\tyield property.getFirstValue()\n\t\t}\n\t}\n\n\t/**\n\t * Gets a list of all recurrence rules\n\t *\n\t * @return {RecurValue[]}\n\t */\n\tgetRecurrenceRuleList() {\n\t\treturn Array.from(this.getRecurrenceRuleIterator())\n\t}\n\n\t/**\n\t * Adds a new recurrence rule\n\t *\n\t * @param {RecurValue} recurrenceRule The RRULE to add\n\t */\n\taddRecurrenceRule(recurrenceRule) {\n\t\tthis._modify()\n\t\tthis.resetCache()\n\n\t\tconst property = new Property('RRULE', recurrenceRule)\n\t\tthis._masterItem.addProperty(property)\n\t}\n\n\t/**\n\t * Removes a recurrence rule\n\t *\n\t * @param {RecurValue} recurrenceRule The RRULE to remove\n\t */\n\tremoveRecurrenceRule(recurrenceRule) {\n\t\tthis._modify()\n\t\tthis.resetCache()\n\n\t\tfor (const property of this._masterItem.getPropertyIterator('RRULE')) {\n\t\t\tif (property.getFirstValue() === recurrenceRule) {\n\t\t\t\tthis._masterItem.deleteProperty(property)\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Removes all recurrence rules\n\t */\n\tclearAllRecurrenceRules() {\n\t\tthis._modify()\n\t\tthis.resetCache()\n\n\t\tthis._masterItem.deleteAllProperties('RRULE')\n\t}\n\n\t/**\n\t * Gets an iterator over all recurrence\n\t *\n\t * @param {boolean} isNegative Whether or not to get EXDATES\n\t * @param {string} valueType Limit type of EXDATES\n\t */\n\t* getRecurrenceDateIterator(isNegative = false, valueType = null) {\n\t\tfor (const property of this._getPropertiesForRecurrenceDate(isNegative, valueType)) {\n\t\t\tyield * property.getValueIterator()\n\t\t}\n\t}\n\n\t/**\n\t *\n\t * @param {boolean} isNegative Whether or not to get EXDATES\n\t * @param {string} valueType Limit type of EXDATES\n\t * @return {(DateTimeValue|PeriodValue)[]}\n\t */\n\tlistAllRecurrenceDates(isNegative = false, valueType = null) {\n\t\treturn Array.from(this.getRecurrenceDateIterator(isNegative, valueType))\n\t}\n\n\t/**\n\t * This adds a new recurrence-date value.\n\t * It automatically adds it to the first property of the same value-type\n\t * or creates a new one if necessary\n\t *\n\t * @param {boolean} isNegative Whether we are dealing with an EXDATE or RDATE\n\t * @param {DateTimeValue|PeriodValue} value EXDATE to add\n\t */\n\taddRecurrenceDate(isNegative = false, value) {\n\t\tthis._modify()\n\t\tthis.resetCache()\n\n\t\t// Only add DateTime Value if its of the same timezone\n\t\tlet timezoneId = null\n\t\tif (value instanceof DateTimeValue && !value.isDate) {\n\t\t\ttimezoneId = value.timezoneId\n\t\t}\n\n\t\tconst valueType = this._getValueTypeByValue(value)\n\t\tconst iterator = this._getPropertiesForRecurrenceDate(isNegative, valueType, timezoneId)\n\n\t\tconst first = iterator.next.value\n\t\tif (first instanceof Property) {\n\t\t\tconst propertyValue = first.value\n\t\t\tpropertyValue.push(value)\n\t\t\tthis.masterItem.markPropertyAsDirty(isNegative ? 'EXDATE' : 'RDATE')\n\t\t} else {\n\t\t\tconst propertyName = this._getPropertyNameByIsNegative(isNegative)\n\t\t\tconst property = new Property(propertyName, value)\n\t\t\tthis._masterItem.addProperty(property)\n\t\t}\n\t}\n\n\t/**\n\t * Checks if a recurrenceID is an RDATE or EXDATE\n\t *\n\t * @param {boolean} isNegative Whether we are dealing with an EXDATE or RDATE\n\t * @param {DateTimeValue} recurrenceId Recurrence-Id to check\n\t * @return {boolean}\n\t */\n\thasRecurrenceDate(isNegative = false, recurrenceId) {\n\t\tfor (let value of this.getRecurrenceDateIterator(isNegative)) {\n\t\t\tif (value instanceof PeriodValue) {\n\t\t\t\tvalue = value.start\n\t\t\t}\n\n\t\t\tif (value.compare(recurrenceId) === 0) {\n\t\t\t\treturn true\n\t\t\t}\n\t\t}\n\n\t\treturn false\n\t}\n\n\t/**\n\t *\n\t * @param {boolean} isNegative Whether we are dealing with an EXDATE or RDATE\n\t * @param {DateTimeValue} recurrenceId Recurrence-Id to get\n\t * @return {null|DateTimeValue|PeriodValue}\n\t */\n\tgetRecurrenceDate(isNegative = false, recurrenceId) {\n\t\tfor (const value of this.getRecurrenceDateIterator(isNegative)) {\n\t\t\tlet valueToCheck = value\n\t\t\tif (valueToCheck instanceof PeriodValue) {\n\t\t\t\tvalueToCheck = valueToCheck.start\n\t\t\t}\n\n\t\t\tif (valueToCheck.compare(recurrenceId) === 0) {\n\t\t\t\treturn value\n\t\t\t}\n\t\t}\n\n\t\treturn null\n\t}\n\n\t/**\n\t * This deletes a recurrence-date value from this recurrence-set\n\t *\n\t * @param {boolean} isNegative Whether we are dealing with an EXDATE or RDATE\n\t * @param {DateTimeValue|PeriodValue} value The EXDATE/RDATE to remove\n\t */\n\tremoveRecurrenceDate(isNegative = false, value) {\n\t\tthis._modify()\n\t\tthis.resetCache()\n\n\t\tconst valueType = this._getValueTypeByValue(value)\n\t\tfor (const property of this._getPropertiesForRecurrenceDate(isNegative, valueType)) {\n\t\t\tfor (const valueToCheck of property.getValueIterator()) {\n\t\t\t\tif (value === valueToCheck) {\n\t\t\t\t\tconst allValues = property.value\n\n\t\t\t\t\tif (allValues.length === 1) {\n\t\t\t\t\t\tthis.masterItem.deleteProperty(property)\n\t\t\t\t\t\tcontinue\n\t\t\t\t\t}\n\n\t\t\t\t\tconst index = allValues.indexOf(value)\n\t\t\t\t\tallValues.splice(index, 1)\n\t\t\t\t\tthis.masterItem.markPropertyAsDirty(isNegative ? 'EXDATE' : 'RDATE')\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Clears all recurrence-date information\n\t *\n\t * @param {boolean} isNegative Whether we are dealing with an EXDATE or RDATE\n\t * @param {string} valueType The type of RDATEs/EXDATEs to remove\n\t */\n\tclearAllRecurrenceDates(isNegative = false, valueType = null) {\n\t\tthis._modify()\n\t\tthis.resetCache()\n\n\t\tfor (const property of this._getPropertiesForRecurrenceDate(isNegative, valueType)) {\n\t\t\tthis._masterItem.deleteProperty(property)\n\t\t}\n\t}\n\n\t/**\n\t * Gets the property name for recurrence dates based on the isNegative boolean\n\t *\n\t * @param {boolean} isNegative Whether we are dealing with an EXDATE or RDATE\n\t * @return {string}\n\t * @private\n\t */\n\t_getPropertyNameByIsNegative(isNegative) {\n\t\treturn isNegative\n\t\t\t? 'EXDATE'\n\t\t\t: 'RDATE'\n\t}\n\n\t/**\n\t * Gets the value type based on the provided value\n\t *\n\t * @param {PeriodValue|DateTimeValue} value The value to get type of property from\n\t * @return {string}\n\t * @private\n\t */\n\t_getValueTypeByValue(value) {\n\t\tif (value instanceof PeriodValue) {\n\t\t\treturn 'PERIOD'\n\t\t} else if (value.isDate) {\n\t\t\treturn 'DATE'\n\t\t} else {\n\t\t\treturn 'DATETIME'\n\t\t}\n\t}\n\n\t/**\n\t *\n\t * @param {boolean} isNegative Whether we are dealing with an EXDATE or RDATE\n\t * @param {string | null} valueType The type of values to get\n\t * @param {ICAL.Timezone=} timezoneId Filter by timezone\n\t * @private\n\t */\n\t* _getPropertiesForRecurrenceDate(isNegative, valueType, timezoneId = null) {\n\t\tconst propertyName = this._getPropertyNameByIsNegative(isNegative)\n\n\t\tfor (const property of this._masterItem.getPropertyIterator(propertyName)) {\n\t\t\tif (valueType === null) {\n\t\t\t\tyield property\n\t\t\t} else if (uc(valueType) === 'PERIOD' && property.getFirstValue() instanceof PeriodValue) {\n\t\t\t\tyield property\n\t\t\t} else if (uc(valueType) === 'DATE' && property.getFirstValue().isDate) {\n\t\t\t\tyield property\n\t\t\t} else if (uc(valueType) === 'DATETIME' && !property.getFirstValue().isDate) {\n\t\t\t\tif (timezoneId === null || property.getFirstValue().timezoneId === timezoneId) {\n\t\t\t\t\tyield property\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Checks if the entire set of recurrence rules is finite\n\t *\n\t * @return {boolean}\n\t */\n\tisFinite() {\n\t\treturn this.getRecurrenceRuleList().every((rule) => rule.isFinite())\n\t}\n\n\t/**\n\t * @return {boolean}\n\t */\n\tisEmptyRecurrenceSet() {\n\t\treturn this._getRecurExpansionObject().next() === undefined\n\t}\n\n\t/**\n\t * Gets the occurrence at the exact given recurrenceId\n\t *\n\t * @param {DateTimeValue} recurrenceId RecurrenceId to get\n\t * @return {AbstractRecurringComponent|null}\n\t */\n\tgetOccurrenceAtExactly(recurrenceId) {\n\t\tif (!this.masterItem.isRecurring()) {\n\t\t\tif (this.masterItem.getReferenceRecurrenceId().compare(recurrenceId) === 0) {\n\t\t\t\treturn this.masterItem\n\t\t\t}\n\n\t\t\treturn null\n\t\t}\n\n\t\tconst iterator = this._getRecurExpansionObject()\n\t\tconst icalRecurrenceId = recurrenceId.toICALJs()\n\n\t\tlet next\n\t\twhile ((next = iterator.next())) {\n\t\t\tif (next.compare(icalRecurrenceId) === 0) {\n\t\t\t\t// It's a match 🔥\n\t\t\t\treturn this._getOccurrenceAtRecurrenceId(DateTimeValue.fromICALJs(next))\n\t\t\t}\n\n\t\t\tif (next.compare(icalRecurrenceId) === 1) {\n\t\t\t\t// We hit an occurrence in the future, return null\n\t\t\t\treturn null\n\t\t\t}\n\t\t}\n\n\t\treturn null\n\t}\n\n\t/**\n\t * Gets the closest occurrence to the given recurrenceId.\n\t * That's either the closest in the future, or in case the\n\t * recurrence-set ends before recurrenceId, the last one\n\t *\n\t * This function works solely on the basis of recurrence-ids.\n\t * It ignores the actual date of recurrence-exceptions.\n\t * Ideally we should fix it and provide a similar implementation\n\t * like getAllOccurrencesBetweenIterator, but for now it's the\n\t * accepted behavior.\n\t *\n\t * @param {DateTimeValue} recurrenceId RecurrenceId to get\n\t * @return {AbstractRecurringComponent}\n\t */\n\tgetClosestOccurrence(recurrenceId) {\n\t\tif (!this.masterItem.isRecurring()) {\n\t\t\treturn this.masterItem\n\t\t}\n\n\t\tconst iterator = this._getRecurExpansionObject()\n\t\trecurrenceId = recurrenceId.toICALJs()\n\n\t\tlet previous = null\n\t\tlet next\n\t\twhile ((next = iterator.next())) {\n\t\t\tif (next.compare(recurrenceId) === -1) {\n\t\t\t\tprevious = next\n\t\t\t} else {\n\t\t\t\t// This is the case when it's either equal or in the future\n\t\t\t\tconst dateTimeValue = DateTimeValue.fromICALJs(next)\n\t\t\t\treturn this._getOccurrenceAtRecurrenceId(dateTimeValue)\n\t\t\t}\n\t\t}\n\n\t\tconst dateTimeValue = DateTimeValue.fromICALJs(previous)\n\t\treturn this._getOccurrenceAtRecurrenceId(dateTimeValue)\n\t}\n\n\t/**\n\t * Counts all occurrences in the given time-range.\n\t * This function works solely on the basis of recurrence-ids.\n\t * Start and end are inclusive.\n\t *\n\t * @param {DateTimeValue} queriedTimeRangeStart Start of time-range\n\t * @param {DateTimeValue} queriedTimeRangeEnd End of time-range\n\t * @return {number} Count of occurrences in the given time-range\n\t */\n\tcountAllOccurrencesBetween(queriedTimeRangeStart, queriedTimeRangeEnd) {\n\t\tif (!this.masterItem.isRecurring()) {\n\t\t\tif (typeof this.masterItem.isInTimeFrame === 'function'\n\t\t\t\t&& !this.masterItem.isInTimeFrame(queriedTimeRangeStart, queriedTimeRangeEnd)) {\n\t\t\t\treturn 0\n\t\t\t}\n\n\t\t\treturn 1\n\t\t}\n\n\t\tconst iterator = this._getRecurExpansionObject()\n\t\tconst queriedICALJsTimeRangeStart = queriedTimeRangeStart.toICALJs()\n\t\tconst queriedICALJsTimeRangeEnd = queriedTimeRangeEnd.toICALJs()\n\n\t\tlet count = 0\n\t\tlet next\n\t\twhile ((next = iterator.next())) {\n\t\t\tif (next.compare(queriedICALJsTimeRangeStart) === -1) {\n\t\t\t\tcontinue\n\t\t\t}\n\n\t\t\tif (next.compare(queriedICALJsTimeRangeEnd) === 1) {\n\t\t\t\tbreak\n\t\t\t}\n\n\t\t\tcount += 1\n\t\t}\n\t\treturn count\n\t}\n\n\t/**\n\t * Get all occurrences between start and end\n\t * Start and End are inclusive\n\t *\n\t * @param {DateTimeValue} queriedTimeRangeStart Start of time-range\n\t * @param {DateTimeValue} queriedTimeRangeEnd End of time-range\n\t */\n\t* getAllOccurrencesBetweenIterator(queriedTimeRangeStart, queriedTimeRangeEnd) {\n\t\tif (!this.masterItem.isRecurring()) {\n\t\t\tif (typeof this.masterItem.isInTimeFrame !== 'function') {\n\t\t\t\tyield this.masterItem\n\t\t\t}\n\t\t\tif (this.masterItem.isInTimeFrame(queriedTimeRangeStart, queriedTimeRangeEnd)) {\n\t\t\t\tyield this.masterItem\n\t\t\t}\n\n\t\t\treturn\n\t\t}\n\n\t\tconst iterator = this._getRecurExpansionObject()\n\t\tconst queriedICALJsTimeRangeStart = queriedTimeRangeStart.toICALJs()\n\t\tconst queriedICALJsTimeRangeEnd = queriedTimeRangeEnd.toICALJs()\n\n\t\tconst recurrenceIdKeys = Array.from(this._recurrenceExceptionItems.keys())\n\t\tconst maximumRecurrenceId = Math.max.apply(Math, recurrenceIdKeys)\n\n\t\tlet next\n\t\twhile ((next = iterator.next())) {\n\t\t\t// We have to get the real occurrence to resolve RECURRENCE-IDs\n\t\t\tconst dateTimeValue = DateTimeValue.fromICALJs(next)\n\t\t\tconst occurrence = this._getOccurrenceAtRecurrenceId(dateTimeValue)\n\n\t\t\t// Check what type of recurrence object we are dealing with\n\t\t\t// Depending on that, the time to compare to changes\n\t\t\t// If we are dealing events, we have to compare to the end-date\n\t\t\t// If we are dealing with tasks, we will have to compare to the due-date\n\t\t\t// etc.\n\t\t\t// For now we are only implementing events, other components will come later\n\t\t\tlet compareDate = null\n\t\t\tswitch (uc(occurrence.name)) {\n\t\t\tcase 'VEVENT':\n\t\t\tcase 'VTODO':\n\t\t\t\tcompareDate = occurrence.endDate.toICALJs()\n\t\t\t\tbreak\n\n\t\t\tcase 'VJOURNAL':\n\t\t\tdefault:\n\t\t\t\tcompareDate = next\n\t\t\t\tbreak\n\t\t\t}\n\n\t\t\t// If the date we are comparing to is before our time-range,\n\t\t\t// we don't want to yield this event\n\t\t\tif (compareDate.compare(queriedICALJsTimeRangeStart) === -1) {\n\t\t\t\tcontinue\n\t\t\t}\n\n\t\t\t// If we have an object that is:\n\t\t\t// 1. either\n\t\t\t// 1.1 - no recurrence exception\n\t\t\t//     or\n\t\t\t// 1.2 - a recurrence-exception that modifies the future\n\t\t\t// and\n\t\t\t// 2. starts after the queried time-range ends, then we stop expanding\n\t\t\tconst startDate = occurrence.startDate.toICALJs()\n\t\t\tif ((!occurrence.isRecurrenceException() || occurrence.modifiesFuture()) && startDate.compare(queriedICALJsTimeRangeEnd) === 1) {\n\t\t\t\t// Just break if there are no recurrence-exceptions\n\t\t\t\tif (this._recurrenceExceptionItems.size === 0) {\n\t\t\t\t\tbreak\n\t\t\t\t}\n\n\t\t\t\t// Keep iterating until our currently checked recurrenceId\n\t\t\t\t// is bigger than the maximum recurrence-id that we have.\n\t\t\t\tif (next.toUnixTime() > maximumRecurrenceId) {\n\t\t\t\t\tbreak\n\t\t\t\t} else {\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (typeof occurrence.isInTimeFrame !== 'function') {\n\t\t\t\tyield occurrence\n\t\t\t}\n\t\t\tif (occurrence.isInTimeFrame(queriedTimeRangeStart, queriedTimeRangeEnd)) {\n\t\t\t\tyield occurrence\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Get all occurrences between start and end\n\t *\n\t * @param {DateTimeValue} start Start of time-range\n\t * @param {DateTimeValue} end End of time-range\n\t * @return {(*|null)[]}\n\t */\n\tgetAllOccurrencesBetween(start, end) {\n\t\treturn Array.from(this.getAllOccurrencesBetweenIterator(start, end))\n\t}\n\n\t/**\n\t * Update the UID of all components in the recurrence set\n\t *\n\t * @param {string} newUID The new UID of the calendar-document\n\t */\n\tupdateUID(newUID) {\n\t\tthis._masterItem.updatePropertyWithValue('UID', newUID)\n\n\t\tfor (const recurrenceExceptionItem of this.getRecurrenceExceptionIterator()) {\n\t\t\trecurrenceExceptionItem.updatePropertyWithValue('UID', newUID)\n\t\t}\n\t}\n\n\t/**\n\t * Updates the recurrence-information accordingly,\n\t * whenever the start-date of the master-item changes\n\t *\n\t * @param {DateTimeValue} newStartDate The new start-date\n\t * @param {DateTimeValue} oldStartDate The old start-date\n\t */\n\tupdateStartDateOfMasterItem(newStartDate, oldStartDate) {\n\t\tconst difference = newStartDate.subtractDateWithTimezone(oldStartDate)\n\n\t\t// update EXDATE\n\t\tfor (const exdate of this.getRecurrenceDateIterator(true)) {\n\t\t\t// If this EXDATE matches an RDATE, don't update, because we don't update RDATEs\n\t\t\tif (this.hasRecurrenceDate(false, exdate)) {\n\t\t\t\tcontinue\n\t\t\t}\n\n\t\t\t// EXDATE are always either DATE or DATETIME,\n\t\t\t// no need to check for PERIOD\n\t\t\texdate.addDuration(difference)\n\t\t}\n\n\t\tfor (const recurrenceException of this.getRecurrenceExceptionIterator()) {\n\t\t\t// We don't edit RDATES, so don't update recurrence-ids if they\n\t\t\t// are based on an RDATE\n\t\t\tif (this.hasRecurrenceDate(false, recurrenceException.recurrenceId)) {\n\t\t\t\tcontinue\n\t\t\t}\n\n\t\t\tthis.removeRecurrenceException(recurrenceException)\n\t\t\trecurrenceException.recurrenceId.addDuration(difference)\n\t\t\tthis.relateRecurrenceException(recurrenceException)\n\t\t}\n\n\t\t// update UNTIL of recurrence-rules\n\t\tfor (const rrule of this.getRecurrenceRuleIterator()) {\n\t\t\tif (rrule.until) {\n\t\t\t\trrule.until.addDuration(difference)\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Gets an object for the given recurrenceId\n\t * It does not verify that the given recurrenceId\n\t * is actually a valid recurrence of this calendar-document\n\t *\n\t * @param {DateTimeValue} recurrenceId Recurrence-Id to get\n\t * @return {AbstractRecurringComponent}\n\t * @private\n\t */\n\t_getOccurrenceAtRecurrenceId(recurrenceId) {\n\t\tif (this.hasRecurrenceExceptionForId(recurrenceId)) {\n\t\t\tconst recurrenceException = this.getRecurrenceException(recurrenceId)\n\n\t\t\tif (!recurrenceException.canCreateRecurrenceExceptions()) {\n\t\t\t\treturn recurrenceException\n\t\t\t}\n\n\t\t\treturn recurrenceException\n\t\t\t\t.forkItem(recurrenceId)\n\t\t} else if (this.hasRangeRecurrenceExceptionForId(recurrenceId)) {\n\t\t\tconst rangeRecurrenceException = this.getRangeRecurrenceExceptionForId(recurrenceId)\n\t\t\tconst difference = this.getRangeRecurrenceExceptionDiff(recurrenceId)\n\n\t\t\treturn rangeRecurrenceException\n\t\t\t\t.forkItem(recurrenceId, difference)\n\t\t} else if (recurrenceId.compare(this._masterItem.startDate) === 0) {\n\t\t\tif (!this._masterItem.canCreateRecurrenceExceptions()) {\n\t\t\t\treturn this._masterItem\n\t\t\t}\n\n\t\t\treturn this._masterItem\n\t\t\t\t.forkItem(recurrenceId)\n\t\t} else {\n\t\t\treturn this._masterItem\n\t\t\t\t.forkItem(recurrenceId)\n\t\t}\n\t}\n\n\t/**\n\t * Resets the internal recur-expansion object.\n\t * This is necessary after each modification of the\n\t * recurrence-information\n\t */\n\tresetCache() {\n\t\t// TODO - implement me\n\t}\n\n\t/**\n\t * Gets a new ICAL.RecurExpansion object\n\t *\n\t * Inspired by how ICAL.JS RecurExpansion\n\t * serialises and unserialises its state\n\t *\n\t * @return {ICAL.RecurExpansion}\n\t * @private\n\t */\n\t_getRecurExpansionObject() {\n\t\tif (this._masterItem.startDate === null) {\n\t\t\tthrow new RecurringWithoutDtStartError()\n\t\t}\n\n\t\tconst dtstart = this._masterItem.startDate.toICALJs()\n\t\tlet last = dtstart.clone()\n\t\tconst ruleIterators = []\n\t\tlet ruleDateInc\n\t\tconst ruleDates = []\n\t\tlet ruleDate = null\n\t\tconst exDates = []\n\t\tconst complete = false\n\n\t\tfor (const ruleValue of this.getRecurrenceRuleIterator()) {\n\t\t\truleIterators.push(ruleValue.toICALJs().iterator(dtstart))\n\t\t\truleIterators[ruleIterators.length - 1].next()\n\t\t}\n\n\t\tfor (let rDateValue of this.getRecurrenceDateIterator()) {\n\t\t\tif (rDateValue instanceof PeriodValue) {\n\t\t\t\trDateValue = rDateValue.start\n\t\t\t}\n\n\t\t\trDateValue = rDateValue.toICALJs()\n\t\t\tconst index = ICAL.helpers.binsearchInsert(\n\t\t\t\truleDates,\n\t\t\t\trDateValue,\n\t\t\t\t(a, b) => a.compare(b)\n\t\t\t)\n\n\t\t\truleDates.splice(index, 0, rDateValue)\n\t\t}\n\n\t\t// Is the first RDATE prior to our current DTSTART?\n\t\tif (ruleDates.length > 0 && ruleDates[0].compare(dtstart) === -1) {\n\t\t\truleDateInc = 0\n\t\t\tlast = ruleDates[0].clone()\n\t\t} else {\n\t\t\truleDateInc = ICAL.helpers.binsearchInsert(\n\t\t\t\truleDates,\n\t\t\t\tdtstart,\n\t\t\t\t(a, b) => a.compare(b)\n\t\t\t)\n\t\t\truleDate = exDates[ruleDateInc]\n\t\t}\n\n\t\tfor (let exDateValue of this.getRecurrenceDateIterator(true)) {\n\t\t\texDateValue = exDateValue.toICALJs()\n\t\t\tconst index = ICAL.helpers.binsearchInsert(\n\t\t\t\texDates,\n\t\t\t\texDateValue,\n\t\t\t\t(a, b) => a.compare(b)\n\t\t\t)\n\t\t\texDates.splice(index, 0, exDateValue)\n\t\t}\n\n\t\tconst exDateInc = ICAL.helpers.binsearchInsert(\n\t\t\texDates,\n\t\t\tdtstart,\n\t\t\t(a, b) => a.compare(b)\n\t\t)\n\t\tconst exDate = exDates[exDateInc]\n\n\t\treturn new ICAL.RecurExpansion({\n\t\t\tdtstart,\n\t\t\tlast,\n\t\t\truleIterators,\n\t\t\truleDateInc,\n\t\t\texDateInc,\n\t\t\truleDates,\n\t\t\truleDate,\n\t\t\texDates,\n\t\t\texDate,\n\t\t\tcomplete,\n\t\t})\n\t}\n\n\t/**\n\t * @private\n\t */\n\t_modify() {\n\t\tif (this._masterItem.isLocked()) {\n\t\t\tthrow new ModificationNotAllowedError()\n\t\t}\n\t}\n\n}\n","/**\n * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\n/**\n * Generates a random UUID v4.\n *\n * @return {string}\n */\nexport function randomUUID() {\n\tif (crypto?.randomUUID) {\n\t\t// Only available in secure contexts\n\t\treturn crypto.randomUUID()\n\t}\n\n\treturn insecureUuidV4()\n}\n\n/**\n * Generates a random UUID v4 from a weak, non-cryptographic random number generator.\n * Please use randomUUID() instead.\n *\n * Adapted from https://gist.github.com/scwood/3bff42cc005cc20ab7ec98f0d8e1d59d\n * Copyright 2018 Spencer Wood\n *\n * @return {string}\n */\nexport function insecureUuidV4() {\n\tconst uuid = new Array(36)\n\tfor (let i = 0; i < 36; i++) {\n\t\tuuid[i] = Math.floor(Math.random() * 16)\n\t}\n\tuuid[14] = 4 // set bits 12-15 of time-high-and-version to 0100\n\tuuid[19] = uuid[19] &= ~(1 << 2) // set bit 6 of clock-seq-and-reserved to zero\n\tuuid[19] = uuid[19] |= (1 << 3) // set bit 7 of clock-seq-and-reserved to one\n\tuuid[8] = uuid[13] = uuid[18] = uuid[23] = '-'\n\treturn uuid.map((x) => x.toString(16)).join('')\n}\n","/**\n * @copyright Copyright (c) 2019 Georg Ehrke\n *\n * @author Georg Ehrke <georg-nextcloud@ehrke.email>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nimport AbstractComponent, {\n\tadvertiseMultipleOccurrenceProperty,\n\tadvertiseSingleOccurrenceProperty,\n} from '../abstractComponent.js'\nimport AttendeeProperty from '../../properties/attendeeProperty.js'\nimport TriggerProperty from '../../properties/triggerProperty.js'\n\n/**\n * @class AlarmComponent\n * @classdesc\n *\n * @url https://tools.ietf.org/html/rfc5545#section-3.6.6\n */\nexport default class AlarmComponent extends AbstractComponent {\n\n\t/**\n\t * Adds a new attendee based on their name and email-address\n\t *\n\t * @param {string} name - Name of the attendee\n\t * @param {string} email - E-Mail address of the attendee\n\t * @return {boolean}\n\t */\n\taddAttendeeFromNameAndEMail(name, email) {\n\t\tconst attendeeProperty = AttendeeProperty.fromNameAndEMail(name, email)\n\t\treturn this.addProperty(attendeeProperty)\n\t}\n\n\t/**\n\t * Gets the trigger property\n\t *\n\t * @url https://tools.ietf.org/html/rfc5545#section-3.8.6.3\n\t *\n\t * @return {TriggerProperty}\n\t */\n\tget trigger() {\n\t\treturn this.getFirstProperty('TRIGGER')\n\t}\n\n\t/**\n\t * Sets an absolute alarm\n\t *\n\t * @param {DateTimeValue} alarmTime - Absolute time for the trigger\n\t */\n\tsetTriggerFromAbsolute(alarmTime) {\n\t\tconst triggerProperty = TriggerProperty.fromAbsolute(alarmTime)\n\t\tthis.deleteAllProperties('TRIGGER')\n\t\tthis.addProperty(triggerProperty)\n\t}\n\n\t/**\n\t * Sets a relative trigger\n\t *\n\t * @param {DurationValue} alarmOffset - Relative time of the trigger, either related to start or end\n\t * @param {boolean=} relatedToStart - Related to Start or end?\n\t */\n\tsetTriggerFromRelative(alarmOffset, relatedToStart = true) {\n\t\tconst triggerProperty = TriggerProperty.fromRelativeAndRelated(alarmOffset, relatedToStart)\n\t\tthis.deleteAllProperties('TRIGGER')\n\t\tthis.addProperty(triggerProperty)\n\t}\n\n}\n\n/**\n * Action to be taken when this Alarm is due\n * Possible values:\n * - AUDIO\n * - DISPLAY\n * - EMAIL\n *\n * @url https://tools.ietf.org/html/rfc5545#section-3.8.6.1\n *\n * @name AlarmComponent#action\n * @type {string}\n */\nadvertiseSingleOccurrenceProperty(AlarmComponent.prototype, 'action')\n\n/**\n * Description for this alarm\n * Can only be used in combination with action DISPLAY and EMAIL\n *\n * @url https://tools.ietf.org/html/rfc5545#section-3.8.1.5\n *\n * @name AlarmComponent#description\n * @type {string}\n */\nadvertiseSingleOccurrenceProperty(AlarmComponent.prototype, 'description')\n\n/**\n * Summary for this alarm\n * Can only be used in combination with action EMAIL\n * Will be used as the EMAIL's subject\n *\n * @url https://tools.ietf.org/html/rfc5545#section-3.8.1.12\n *\n * @name AlarmComponent#summary\n * @type {string}\n */\nadvertiseSingleOccurrenceProperty(AlarmComponent.prototype, 'summary')\n\n/**\n * The duration specifies the delay period between repeated alarms.\n * This property must be specified along with the repeat property\n *\n * @url https://tools.ietf.org/html/rfc5545#section-3.8.2.5\n *\n * @name AlarmComponent#duration\n * @type {string}\n */\nadvertiseSingleOccurrenceProperty(AlarmComponent.prototype, 'duration')\n\n/**\n * The number of times an alarm should be repeated.\n * This property must be specified along with the duration property\n *\n * @url https://tools.ietf.org/html/rfc5545#section-3.8.6.2\n *\n * @name AlarmComponent#repeat\n * @type {number}\n */\nadvertiseSingleOccurrenceProperty(AlarmComponent.prototype, 'repeat')\n\n/**\n * This attachment points to a sound file, can only be used in combination\n * with ACTION AUDIO\n *\n * @url https://tools.ietf.org/html/rfc5545#section-3.8.1.1\n *\n * @name AlarmComponent#attachment\n * @type {AttachmentProperty}\n */\nadvertiseSingleOccurrenceProperty(AlarmComponent.prototype, {\n\tname: 'attachment',\n\tiCalendarName: 'ATTACH',\n})\n\n/**\n * Get an iterator over all attendees\n *\n * @url https://tools.ietf.org/html/rfc5545#section-3.8.4.1\n *\n * @name AlarmComponent#getAttendeeIterator\n * @function\n * @return {IterableIterator<AttendeeProperty>}\n */\n\n/**\n * Get a list of all attendees\n *\n * @url https://tools.ietf.org/html/rfc5545#section-3.8.4.1\n *\n * @name AlarmComponent#getAttendeeList\n * @function\n * @return {AttendeeProperty[]}\n */\n\n/**\n * Adds a new attendee to this alarm-component\n *\n * @url https://tools.ietf.org/html/rfc5545#section-3.8.4.1\n *\n * @name AlarmComponent#addAttendee\n * @function\n * @param {AttendeeProperty} attendee - The attendee object to add\n */\n\n/**\n * Removes an attendee from this alarm-component\n *\n * @url https://tools.ietf.org/html/rfc5545#section-3.8.4.1\n *\n * @name AlarmComponent#removeAttendee\n * @function\n * @param {AttendeeProperty} attendee - The attendee object to remove\n */\n\n/**\n * Removes all attendees from this alarm-component\n *\n * @url https://tools.ietf.org/html/rfc5545#section-3.8.4.1\n *\n * @name AlarmComponent#clearAllAttendees\n * @function\n */\nadvertiseMultipleOccurrenceProperty(AlarmComponent.prototype, 'attendee')\n","/**\n * @copyright Copyright (c) 2019 Georg Ehrke\n *\n * @author Georg Ehrke <georg-nextcloud@ehrke.email>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nimport AbstractComponent from '../abstractComponent.js'\nimport AlarmComponent from './alarmComponent.js'\nimport { uc } from '../../helpers/stringHelper.js'\n\n/**\n * Gets the constructor for a component name\n * This will only return a constructor for components,\n * that can be nested inside other ones\n *\n * @param {string} compName - Component name to get default constructor for\n * @return {AlarmComponent|AbstractComponent}\n */\nexport function getConstructorForComponentName(compName) {\n\tswitch (uc(compName)) {\n\tcase 'VALARM':\n\t\treturn AlarmComponent\n\n\tdefault:\n\t\treturn AbstractComponent\n\t}\n}\n","/**\n * @copyright Copyright (c) 2019 Georg Ehrke\n *\n * @author Georg Ehrke <georg-nextcloud@ehrke.email>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nimport AbstractComponent, {\n\tadvertiseComponent,\n\tadvertiseMultipleOccurrenceProperty,\n\tadvertiseMultiValueStringPropertySeparatedByLang,\n\tadvertiseSingleOccurrenceProperty,\n} from '../abstractComponent.js'\nimport DateTimeValue from '../../values/dateTimeValue.js'\nimport DurationValue from '../../values/durationValue.js'\nimport PeriodValue from '../../values/periodValue.js'\nimport { dateFactory } from '../../factories/dateFactory.js'\nimport { uc } from '../../helpers/stringHelper.js'\nimport RecurrenceManager from '../../recurrence/recurrenceManager.js'\nimport { randomUUID } from '../../helpers/cryptoHelper.js'\nimport RelationProperty from '../../properties/relationProperty.js'\nimport AttendeeProperty from '../../properties/attendeeProperty.js'\nimport { Timezone } from '@nextcloud/timezones'\nimport RequestStatusProperty from '../../properties/requestStatusProperty.js'\nimport AttachmentProperty from '../../properties/attachmentProperty.js'\nimport ImageProperty from '../../properties/imageProperty.js'\nimport TextProperty from '../../properties/textProperty.js'\nimport AlarmComponent from '../nested/alarmComponent.js'\nimport TriggerProperty from '../../properties/triggerProperty.js'\nimport { getConfig } from '../../config.js'\nimport { getConstructorForComponentName } from '../nested/index.js'\n\n/**\n * @class AbstractRecurringComponent\n * @classdesc AbstractRecurringComponent is the basis for\n * EventComponent, JournalComponent and TodoComponent.\n *\n * It contains all the logic for recurrence-expansion and\n * recurrence-management plus all management for all\n * properties and all subcomponents that the three\n * components mentioned before have in common\n */\nexport default class AbstractRecurringComponent extends AbstractComponent {\n\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor(...args) {\n\t\tsuper(...args)\n\n\t\t/**\n\t\t * In case this object is virtual, primary item refers to the master object\n\t\t * that this object was forked from.\n\t\t *\n\t\t * Otherwise primary item is null\n\t\t *\n\t\t * @type {AbstractRecurringComponent}\n\t\t * @private\n\t\t */\n\t\tthis._primaryItem = null\n\n\t\t/**\n\t\t * Indicator whether this is a direct fork of a primary item, representing\n\t\t * the very same recurrence id\n\t\t *\n\t\t * @type {boolean}\n\t\t * @private\n\t\t */\n\t\tthis._isExactForkOfPrimary = false\n\n\t\t/**\n\t\t * The original recurrence-id of this occurrence.\n\t\t * Mostly needed for range exceptions with a range\n\t\t *\n\t\t * @type {DateTimeValue|null}\n\t\t * @private\n\t\t */\n\t\tthis._originalRecurrenceId = null\n\n\t\t/**\n\t\t * Instance of the recurrence manager.\n\t\t * This object is shared among all instances\n\t\t * of a recurrence-set\n\t\t *\n\t\t * @type {RecurrenceManager}\n\t\t * @private\n\t\t */\n\t\tthis._recurrenceManager = null\n\n\t\t/**\n\t\t * Indicator whether this component was modified\n\t\t * In case it was, the last-modified property\n\t\t * needs to be updated before saving the event\n\t\t *\n\t\t * @type {boolean}\n\t\t * @private\n\t\t */\n\t\tthis._dirty = false\n\n\t\t/**\n\t\t * Indicator whether there have been significant changes\n\t\t * In case the changes are considered significant,\n\t\t * the sequence needs to be incremented\n\t\t *\n\t\t * @type {boolean}\n\t\t * @private\n\t\t */\n\t\tthis._significantChange = false\n\n\t\t/**\n\t\t * Id of this AbstractRecurringComponent\n\t\t *\n\t\t * @type {string | null}\n\t\t * @private\n\t\t */\n\t\tthis._cachedId = null\n\t}\n\n\t/**\n\t * Gets the primary-item of this recurring item\n\t *\n\t * @return {AbstractRecurringComponent}\n\t */\n\tget primaryItem() {\n\t\treturn this._primaryItem\n\t}\n\n\t/**\n\t * Sets the primary-item of this recurring item\n\t *\n\t * @param {AbstractRecurringComponent} primaryItem The new primary-item\n\t */\n\tset primaryItem(primaryItem) {\n\t\tthis._modify()\n\t\tthis._primaryItem = primaryItem\n\t}\n\n\t/**\n\t * Gets whether or not this is a fork of the primary item\n\t * for the same recurrence-id\n\t *\n\t * @return {boolean}\n\t */\n\tget isExactForkOfPrimary() {\n\t\treturn this._isExactForkOfPrimary\n\t}\n\n\t/**\n\t * Sets the isExactForkOfPrimary indicator, see getter for description\n\t *\n\t * @param {boolean} isExactForkOfPrimary Whether or not this is an exact fork\n\t */\n\tset isExactForkOfPrimary(isExactForkOfPrimary) {\n\t\tthis._isExactForkOfPrimary = isExactForkOfPrimary\n\t}\n\n\t/**\n\t * Gets the original recurrence-id\n\t *\n\t * @return {DateTimeValue}\n\t */\n\tget originalRecurrenceId() {\n\t\treturn this._originalRecurrenceId\n\t}\n\n\t/**\n\t * Sets the original recurrence-id\n\t *\n\t * @param {DateTimeValue} originalRecurrenceId The new original recurrence-id\n\t */\n\tset originalRecurrenceId(originalRecurrenceId) {\n\t\tthis._originalRecurrenceId = originalRecurrenceId\n\t}\n\n\t/**\n\t * Gets the recurrence-manager of this recurrence-set\n\t *\n\t * @return {RecurrenceManager}\n\t */\n\tget recurrenceManager() {\n\t\treturn this._recurrenceManager\n\t}\n\n\t/**\n\t * Sets the recurrence-manager of this recurrence-set\n\t *\n\t * @param {RecurrenceManager} recurrenceManager The new recurrence-manager\n\t */\n\tset recurrenceManager(recurrenceManager) {\n\t\tthis._recurrenceManager = recurrenceManager\n\t}\n\n\t/**\n\t * Gets the master-item of this recurring item\n\t *\n\t * @return {AbstractRecurringComponent}\n\t */\n\tget masterItem() {\n\t\treturn this.recurrenceManager.masterItem\n\t}\n\n\t/**\n\t * Returns whether this item is the master item\n\t *\n\t * @return {boolean}\n\t */\n\tisMasterItem() {\n\t\treturn this.masterItem === this\n\t}\n\n\t/**\n\t * Gets a unique ID for this occurrence of the event\n\t *\n\t * Please note that if the same event occurs in multiple calendars,\n\t * this id will not be unique. Software using this library will have to\n\t * manually mix in the calendar id into this id\n\t *\n\t * @return {string}\n\t */\n\tget id() {\n\t\tif (this._cachedId) {\n\t\t\treturn this._cachedId\n\t\t}\n\n\t\tif (this.startDate === null) {\n\t\t\tthis._cachedId = encodeURIComponent(this.uid)\n\t\t\treturn this._cachedId\n\t\t}\n\n\t\tthis._cachedId = [\n\t\t\tencodeURIComponent(this.uid),\n\t\t\tencodeURIComponent(this.getReferenceRecurrenceId().unixTime.toString()),\n\t\t].join('###')\n\n\t\treturn this._cachedId\n\t}\n\n\t/**\n\t * Gets the UID property\n\t *\n\t * @return {string | null}\n\t */\n\tget uid() {\n\t\treturn this.getFirstPropertyFirstValue('UID')\n\t}\n\n\t/**\n\t * Sets the UID property and the UID property of all related exceptions\n\t *\n\t * @param {string} uid The new UID\n\t */\n\tset uid(uid) {\n\t\tthis._recurrenceManager.updateUID(uid)\n\t}\n\n\t/**\n\t * Gets the start date of the event\n\t *\n\t * @return {DateTimeValue}\n\t */\n\tget startDate() {\n\t\treturn this.getFirstPropertyFirstValue('dtstart')\n\t}\n\n\t/**\n\t * Sets the start date of the event\n\t *\n\t * @param {DateTimeValue} start The new start-date to set\n\t */\n\tset startDate(start) {\n\t\tconst oldStartDate = this.startDate\n\t\tthis.updatePropertyWithValue('dtstart', start)\n\n\t\tif (this.isMasterItem()) {\n\t\t\tthis._recurrenceManager.updateStartDateOfMasterItem(start, oldStartDate)\n\t\t}\n\t}\n\n\t/**\n\t * Checks whether this item is part of a recurring set\n\t *\n\t * @return {boolean}\n\t */\n\tisPartOfRecurrenceSet() {\n\t\treturn this.masterItem.isRecurring()\n\t}\n\n\t/**\n\t * Checks whether this component is recurring\n\t *\n\t * @return {boolean}\n\t */\n\tisRecurring() {\n\t\treturn this.hasProperty('RRULE') || this.hasProperty('RDATE')\n\t}\n\n\t/**\n\t * Checks whether this component is a recurrence-exception\n\t *\n\t * @return {boolean}\n\t */\n\tisRecurrenceException() {\n\t\treturn this.hasProperty('RECURRENCE-ID')\n\t}\n\n\t/**\n\t * Checks wether this component is a recurrence-exception\n\t * and whether it's modifying the future\n\t *\n\t * @return {boolean}\n\t */\n\tmodifiesFuture() {\n\t\tif (!this.isRecurrenceException()) {\n\t\t\treturn false\n\t\t}\n\n\t\tconst property = this.getFirstProperty('RECURRENCE-ID')\n\t\treturn property.getParameterFirstValue('RANGE') === 'THISANDFUTURE'\n\t}\n\n\t/**\n\t * Creates an occurrence at the given time\n\t *\n\t * This is an internal function for calendar-js, used by the recurrence-manager\n\t * Do not call from outside\n\t *\n\t * @param {DateTimeValue} recurrenceId The recurrence-Id of the forked item\n\t * @param {DurationValue=} startDiff to be used when The start-diff (used for RECURRENCE-ID;RANGE=THISANDFUTURE)\n\t * @return {AbstractRecurringComponent}\n\t */\n\tforkItem(recurrenceId, startDiff = null) {\n\t\tconst occurrence = this.clone()\n\n\t\toccurrence.recurrenceManager = this.recurrenceManager\n\t\toccurrence.primaryItem = this\n\n\t\t// Exact match for master item or recurrence-exception\n\t\tif (occurrence.getReferenceRecurrenceId().compare(recurrenceId) === 0) {\n\t\t\toccurrence.isExactForkOfPrimary = true\n\t\t}\n\n\t\tif (!occurrence.hasProperty('DTSTART')) {\n\t\t\tthrow new TypeError('Can\\'t fork item without a DTSTART')\n\t\t}\n\n\t\t// Adjust RRULE COUNT if present\n\t\tconst rrule = occurrence.getFirstPropertyFirstValue('RRULE')\n\t\tif (rrule?.count) {\n\t\t\tlet index = occurrence.recurrenceManager.countAllOccurrencesBetween(\n\t\t\t\toccurrence.getReferenceRecurrenceId(),\n\t\t\t\trecurrenceId,\n\t\t\t)\n\n\t\t\tindex -= 1 // Don't count the forked occurrence\n\t\t\trrule.count -= index\n\t\t\tif (rrule.count < 1) {\n\t\t\t\trrule.count = 1\n\t\t\t}\n\t\t}\n\n\t\tif (occurrence.getFirstPropertyFirstValue('DTSTART').timezoneId !== recurrenceId.timezoneId) {\n\t\t\tconst originalTimezone = occurrence.getFirstPropertyFirstValue('DTSTART').getICALTimezone()\n\t\t\trecurrenceId = recurrenceId.getInICALTimezone(originalTimezone)\n\t\t}\n\n\t\toccurrence.originalRecurrenceId = recurrenceId.clone()\n\n\t\tconst dtStartValue = occurrence.getFirstPropertyFirstValue('DTSTART')\n\n\t\tlet period = null\n\t\tif (this._recurrenceManager.hasRecurrenceDate(false, recurrenceId)) {\n\t\t\tconst recurrenceDate = this._recurrenceManager.getRecurrenceDate(false, recurrenceId)\n\t\t\tif (recurrenceDate instanceof PeriodValue) {\n\t\t\t\tperiod = recurrenceDate\n\t\t\t}\n\t\t}\n\n\t\tlet duration\n\t\tif (occurrence.hasProperty('DTEND')) {\n\t\t\tconst dtEndValue = occurrence.getFirstPropertyFirstValue('DTEND')\n\t\t\tduration = dtEndValue.subtractDateWithTimezone(dtStartValue)\n\t\t} else if (occurrence.hasProperty('DUE')) {\n\t\t\tconst dueValue = occurrence.getFirstPropertyFirstValue('DUE')\n\t\t\tduration = dueValue.subtractDateWithTimezone(dtStartValue)\n\t\t}\n\n\t\tif (!(occurrence.isRecurrenceException() && occurrence.isExactForkOfPrimary)) {\n\t\t\toccurrence.updatePropertyWithValue('DTSTART', recurrenceId.clone())\n\n\t\t\tif (startDiff) {\n\t\t\t\toccurrence.startDate.addDuration(startDiff)\n\t\t\t}\n\n\t\t\tif (occurrence.hasProperty('DTEND')) {\n\t\t\t\tconst dtEnd = occurrence.startDate.clone()\n\t\t\t\tdtEnd.addDuration(duration)\n\t\t\t\toccurrence.updatePropertyWithValue('DTEND', dtEnd)\n\t\t\t} else if (occurrence.hasProperty('DUE')) {\n\t\t\t\tconst due = occurrence.startDate.clone()\n\t\t\t\tdue.addDuration(duration)\n\t\t\t\toccurrence.updatePropertyWithValue('DUE', due)\n\t\t\t}\n\n\t\t\tif (period) {\n\t\t\t\toccurrence.deleteAllProperties('DTEND')\n\t\t\t\toccurrence.deleteAllProperties('DURATION')\n\n\t\t\t\toccurrence.updatePropertyWithValue('DTEND', period.end.clone())\n\t\t\t}\n\t\t}\n\n\t\toccurrence.resetDirty()\n\n\t\treturn occurrence\n\t}\n\n\t/**\n\t * Checks whether it's possible to create a recurrence exception for this event\n\t * It is possible\n\t *\n\t * @return {boolean}\n\t */\n\tcanCreateRecurrenceExceptions() {\n\t\tlet primaryIsRecurring = false\n\t\tif (this.primaryItem && this.primaryItem.isRecurring()) {\n\t\t\tprimaryIsRecurring = true\n\t\t}\n\t\treturn this.isRecurring() || this.modifiesFuture() || (!this.isRecurring() && primaryIsRecurring)\n\t}\n\n\t/**\n\t * creates a recurrence exception based on this event\n\t * If the parameter thisAndAllFuture is set to true,\n\t * it will apply changes to this and all future occurrences\n\t *\n\t * @param {boolean} thisAndAllFuture Whether to create an exception for this and all future\n\t * @return {AbstractRecurringComponent[]} the AbstractRecurringComponent of the future events.\n\t * In case you set `thisAndAllFuture` to true, this will be an\n\t * AbstractRecurringComponent inside a entirely new calendar component\n\t */\n\tcreateRecurrenceException(thisAndAllFuture = false) {\n\t\tif (!this.canCreateRecurrenceExceptions()) {\n\t\t\tthrow new Error('Can\\'t create recurrence-exceptions for non-recurring items')\n\t\t}\n\n\t\tconst previousPrimaryItem = this.primaryItem\n\n\t\t/**\n\t\t * The overall support for RANGE=THISANDFUTURE is really bad.\n\t\t * Instead, we have to create a new event/journal/task and\n\t\t * set an until date on the old one.\n\t\t *\n\t\t * Also see:\n\t\t * - https://github.com/nextcloud/calendar/issues/7#issuecomment-292574813\n\t\t * - https://github.com/nextcloud/calendar/issues/7#issuecomment-299169143\n\t\t *\n\t\t * Right now, this replaces all future occurrence modifications,\n\t\t * including recurrence-exceptions, RDATES and EXDATES.\n\t\t * This is also how other CUAs handle it, but i would be happy\n\t\t * to put that up for discussion.\n\t\t *\n\t\t * Keeping future RDates + their recurrence-exceptions would be rather easy.\n\t\t * Updating recurrence-exceptions, that are based off normal recurrence rules,\n\t\t * could be very expensive.\n\t\t */\n\t\tif (thisAndAllFuture) {\n\t\t\tif (this.isExactForkOfPrimary) {\n\t\t\t\t// master item\n\t\t\t\tif (this.primaryItem.isMasterItem()) {\n\t\t\t\t\tthis._overridePrimaryItem()\n\t\t\t\t\treturn [this, this]\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis.removeThisOccurrence(true)\n\t\t\tthis.recurrenceManager = new RecurrenceManager(this)\n\t\t\tthis._originalRecurrenceId = null\n\n\t\t\tthis.primaryItem = this\n\t\t\tthis.updatePropertyWithValue('UID', randomUUID())\n\t\t\tthis._cachedId = null\n\n\t\t\tthis.addRelation('SIBLING', previousPrimaryItem.uid)\n\t\t\tpreviousPrimaryItem.addRelation('SIBLING', this.uid)\n\n\t\t\t// delete to make sure all parameters are gone\n\t\t\tthis.deleteAllProperties('RECURRENCE-ID')\n\t\t\tthis.deleteAllProperties('RDATE')\n\t\t\tthis.deleteAllProperties('EXDATE')\n\t\t\tthis.updatePropertyWithValue('CREATED', DateTimeValue.fromJSDate(dateFactory(), true))\n\t\t\tthis.updatePropertyWithValue('DTSTAMP', DateTimeValue.fromJSDate(dateFactory(), true))\n\t\t\tthis.updatePropertyWithValue('LAST-MODIFIED', DateTimeValue.fromJSDate(dateFactory(), true))\n\t\t\tthis.updatePropertyWithValue('SEQUENCE', 0)\n\t\t\tthis._significantChange = false\n\t\t\tthis._dirty = false\n\n\t\t\tthis.root = this.root.constructor.fromEmpty()\n\t\t\tthis.root.addComponent(this)\n\t\t\tthis.parent = this.root\n\n\t\t\t// this is a completely new event, we should set the RSVP of all attendees to true,\n\t\t\t// so that they receive an invitation to the new event, not only the cancellation of the old one\n\t\t\tfor (const attendee of this.getAttendeeIterator()) {\n\t\t\t\tattendee.rsvp = true\n\t\t\t}\n\t\t} else {\n\t\t\t// delete to make sure all parameters are gone\n\t\t\tthis.deleteAllProperties('RECURRENCE-ID')\n\t\t\tthis.recurrenceId = this.getReferenceRecurrenceId().clone()\n\t\t\tthis.root.addComponent(this)\n\t\t\tthis.recurrenceManager.relateRecurrenceException(this)\n\t\t\tthis.primaryItem = this\n\n\t\t\tthis.deleteAllProperties('RDATE')\n\t\t\tthis.deleteAllProperties('RRULE')\n\t\t\tthis.deleteAllProperties('EXDATE')\n\t\t\tthis.updatePropertyWithValue('CREATED', DateTimeValue.fromJSDate(dateFactory(), true))\n\t\t\tthis.updatePropertyWithValue('DTSTAMP', DateTimeValue.fromJSDate(dateFactory(), true))\n\t\t\tthis.updatePropertyWithValue('LAST-MODIFIED', DateTimeValue.fromJSDate(dateFactory(), true))\n\t\t\tthis.updatePropertyWithValue('SEQUENCE', 0)\n\n\t\t\tif (this.recurrenceManager.hasRecurrenceDate(false, this.getReferenceRecurrenceId())) {\n\t\t\t\tconst recurDate = this.recurrenceManager.getRecurrenceDate(false, this.getReferenceRecurrenceId())\n\t\t\t\tif (recurDate instanceof PeriodValue) {\n\t\t\t\t\tconst valueDateTimeRecurDate = recurDate.start\n\t\t\t\t\tthis.recurrenceManager.removeRecurrenceDate(false, recurDate)\n\t\t\t\t\tthis.recurrenceManager.addRecurrenceDate(false, valueDateTimeRecurDate)\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis.originalRecurrenceId = null\n\t\t}\n\n\t\treturn [previousPrimaryItem, this]\n\t}\n\n\t/**\n\t * Deletes this occurrence from the series of recurring events\n\t * If the parameter thisAndAllFuture is set to true,\n\t * it will remove this and all future occurrences\n\t *\n\t * @param {boolean} thisAndAllFuture Whether to create an exception for this and all future\n\t * @throws EmptyRecurrenceSetError Thrown, when deleting an occurrence results in no more events\n\t * @return {boolean} true if this deleted the last occurrence in set, false if there are occurrences left\n\t */\n\tremoveThisOccurrence(thisAndAllFuture = false) {\n\t\tif (!this.isPartOfRecurrenceSet()) {\n\t\t\t// When deleting an object, that's not part of a recurring set,\n\t\t\t// the calendar-document would be empty.\n\t\t\treturn true\n\t\t}\n\n\t\tif (thisAndAllFuture) {\n\t\t\t// To get the UNTIL date, just deduct one second.\n\t\t\t// That's also how macOS does it, so this should be fairly\n\t\t\t// well supported among all clients\n\t\t\tconst recurrenceId = this.getReferenceRecurrenceId().clone()\n\n\t\t\tconst until = recurrenceId.getInTimezone(Timezone.utc)\n\t\t\tuntil.addDuration(DurationValue.fromSeconds(-1))\n\n\t\t\tfor (const recurValue of this.recurrenceManager.getRecurrenceRuleIterator()) {\n\t\t\t\trecurValue.until = until.clone()\n\t\t\t}\n\n\t\t\tfor (const recurDate of this.recurrenceManager.getRecurrenceDateIterator()) {\n\t\t\t\tlet valueToCheck = recurDate\n\t\t\t\tif (recurDate instanceof PeriodValue) {\n\t\t\t\t\tvalueToCheck = valueToCheck.start\n\t\t\t\t}\n\n\t\t\t\tif (recurrenceId.compare(valueToCheck) <= 0) {\n\t\t\t\t\tthis.recurrenceManager.removeRecurrenceDate(false, recurDate)\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfor (const exceptionDate of this.recurrenceManager.getRecurrenceDateIterator(true)) {\n\t\t\t\tif (recurrenceId.compare(exceptionDate) <= 0) {\n\t\t\t\t\tthis.recurrenceManager.removeRecurrenceDate(true, exceptionDate)\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfor (const exception of this.recurrenceManager.getRecurrenceExceptionList()) {\n\t\t\t\tif (recurrenceId.compare(exception.recurrenceId) <= 0) {\n\t\t\t\t\tthis.root.deleteComponent(exception)\n\t\t\t\t\tthis.recurrenceManager.removeRecurrenceException(exception)\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t// Make sure we don't leave orphaned recurrence-exceptions\n\t\t\tif (this.isRecurrenceException() && !this.modifiesFuture()) {\n\t\t\t\tthis.root.deleteComponent(this)\n\t\t\t\tthis.recurrenceManager.removeRecurrenceException(this)\n\t\t\t}\n\n\t\t\t// If this is based on a recurrence-date, simply delete it\n\t\t\t// otherwise add an exception-date\n\t\t\tif (this.recurrenceManager.hasRecurrenceDate(false, this.getReferenceRecurrenceId())) {\n\t\t\t\tconst recurDate = this.recurrenceManager.getRecurrenceDate(false, this.getReferenceRecurrenceId())\n\t\t\t\tthis.recurrenceManager.removeRecurrenceDate(false, recurDate)\n\t\t\t} else {\n\t\t\t\tthis.recurrenceManager.addRecurrenceDate(true, this.getReferenceRecurrenceId().clone())\n\t\t\t}\n\t\t}\n\n\t\treturn this.recurrenceManager.isEmptyRecurrenceSet()\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tclone() {\n\t\tconst comp = super.clone()\n\t\tcomp.resetDirty()\n\n\t\treturn comp\n\t}\n\n\t/**\n\t * Adds a new attendee\n\t *\n\t * @param {AttendeeProperty} attendee The attendee property to add\n\t * @private\n\t * @return {boolean}\n\t */\n\t_addAttendee(attendee) {\n\t\t// Check for different Attendee objects with the same uri\n\t\tfor (const a of this.getAttendeeIterator()) {\n\t\t\tif (a.email === attendee.email) {\n\t\t\t\treturn false\n\t\t\t}\n\t\t}\n\n\t\tthis.addProperty(attendee)\n\t\treturn true\n\t}\n\n\t/**\n\t * Adds a new attendee based on their name and email-address\n\t *\n\t * @param {string} name The name of the attendee to add\n\t * @param {string} email The email-address of the attendee to add\n\t * @return {boolean}\n\t */\n\taddAttendeeFromNameAndEMail(name, email) {\n\t\tconst attendeeProperty = AttendeeProperty.fromNameAndEMail(name, email)\n\t\treturn this._addAttendee(attendeeProperty)\n\t}\n\n\t/**\n\t * Adds a new attendee based on their properties\n\t *\n\t * @param {string} name The name of the attendee to add\n\t * @param {string} email The email-address of the attendee to add\n\t * @param {string} role The role of the attendee to add\n\t * @param {string} userType The type of attendee to add\n\t * @param {boolean} rsvp Whether or not to request a response from the attendee\n\t * @return {boolean}\n\t */\n\taddAttendeeFromNameEMailRoleUserTypeAndRSVP(name, email, role, userType, rsvp) {\n\t\tconst attendeeProperty = AttendeeProperty.fromNameEMailRoleUserTypeAndRSVP(name, email, role, userType, rsvp, false)\n\t\treturn this._addAttendee(attendeeProperty)\n\t}\n\n\t/**\n\t * Sets the organiser property from common-name and email address\n\t *\n\t * @param {string} name The name of the organizer\n\t * @param {string} email The email-address of the organizer\n\t */\n\tsetOrganizerFromNameAndEMail(name, email) {\n\t\tthis.deleteAllProperties('ORGANIZER')\n\t\tthis.addProperty(AttendeeProperty.fromNameAndEMail(name, email, true))\n\t}\n\n\t/**\n\t * Adds a new attachment from raw data\n\t *\n\t * @param {string} data The data of the attachment\n\t * @param {string} formatType The mime-type of the attachment\n\t */\n\taddAttachmentFromData(data, formatType = null) {\n\t\tthis.addProperty(AttachmentProperty.fromData(data, formatType))\n\t}\n\n\t/**\n\t * Adds a new attachment from a link\n\t *\n\t * @param {string} uri The URI of the attachment\n\t * @param {string} formatType The mime-type of the attachment\n\t */\n\taddAttachmentFromLink(uri, formatType = null) {\n\t\tthis.addProperty(AttachmentProperty.fromLink(uri, formatType))\n\t}\n\n\t/**\n\t * Adds a new contact\n\t *\n\t * @url https://tools.ietf.org/html/rfc5545#section-3.8.4.2\n\t *\n\t * @param {string} contact The textual contact description to add\n\t */\n\taddContact(contact) {\n\t\tthis.addProperty(new TextProperty('CONTACT', contact))\n\t}\n\n\t/**\n\t * Adds a new comment\n\t *\n\t * @url https://tools.ietf.org/html/rfc5545#section-3.8.1.4\n\t *\n\t * @param {string} comment The comment to add\n\t */\n\taddComment(comment) {\n\t\tthis.addProperty(new TextProperty('COMMENT', comment))\n\t}\n\n\t/**\n\t * Adds a new image from raw data\n\t *\n\t * @param {string} data Data of the image to add\n\t * @param {string=} display What display-type the image is optimized for\n\t * @param {string=} formatType The mime-type of the image\n\t */\n\taddImageFromData(data, display = null, formatType = null) {\n\t\tthis.addProperty(ImageProperty.fromData(data, display, formatType))\n\t}\n\n\t/**\n\t * Adds a new image from a link\n\t *\n\t * @param {string} uri The URI of the image to add\n\t * @param {string=} display What display-type the image is optimized for\n\t * @param {string=} formatType The mime-type of the image\n\t */\n\taddImageFromLink(uri, display = null, formatType = null) {\n\t\tthis.addProperty(ImageProperty.fromLink(uri, display, formatType))\n\t}\n\n\t/**\n\t * Creates a new RELATED-TO property based on a relation-type and id\n\t * and adds it to this object\n\t *\n\t * @param {string} relType The type of relation to add\n\t * @param {string} relId The id of the related calendar-document\n\t */\n\taddRelation(relType, relId) {\n\t\tthis.addProperty(RelationProperty.fromRelTypeAndId(relType, relId))\n\t}\n\n\t/**\n\t * Creates a new REQUEST-STATUS property based on code and message\n\t * and adds it to this object\n\t *\n\t * @param {number} code The status-code of the request status\n\t * @param {string} message The message of the request status\n\t */\n\taddRequestStatus(code, message) {\n\t\tthis.addProperty(RequestStatusProperty.fromCodeAndMessage(code, message))\n\t}\n\n\t/**\n\t * Adds a new absolute alarm based on action and trigger time\n\t *\n\t * @param {string} action The type of alarm Action\n\t * @param {DateTimeValue} alarmTime The trigger time of the alarm\n\t * @return {AlarmComponent}\n\t */\n\taddAbsoluteAlarm(action, alarmTime) {\n\t\tconst alarmComp = new AlarmComponent('VALARM', [\n\t\t\t['action', action],\n\t\t\tTriggerProperty.fromAbsolute(alarmTime),\n\t\t])\n\n\t\tthis.addComponent(alarmComp)\n\t\treturn alarmComp\n\t}\n\n\t/**\n\t * Adds a new relative alarm based on action, trigger time and relativeTo parameter\n\t *\n\t * @param {string} action The type of alarm Action\n\t * @param {DurationValue} alarmOffset The trigger time of the alarm\n\t * @param {boolean=} relatedToStart Whether or not the alarm is related to the event's start\n\t * @return {AlarmComponent}\n\t */\n\taddRelativeAlarm(action, alarmOffset, relatedToStart = true) {\n\t\tconst alarmComp = new AlarmComponent('VALARM', [\n\t\t\t['action', action],\n\t\t\tTriggerProperty.fromRelativeAndRelated(alarmOffset, relatedToStart),\n\t\t])\n\n\t\tthis.addComponent(alarmComp)\n\t\treturn alarmComp\n\t}\n\n\t/**\n\t * Marks a certain property as edited\n\t *\n\t * @param {string} propertyName The name of the property\n\t */\n\tmarkPropertyAsDirty(propertyName) {\n\t\tthis.markDirty()\n\n\t\t// Properties that must be considered a significant change\n\t\t// according to RFC 5546 Section 2.1.4\n\t\tconst props = [\n\t\t\t'DTSTART',\n\t\t\t'DTEND',\n\t\t\t'DURATION',\n\t\t\t'RRULE',\n\t\t\t'RDATE',\n\t\t\t'EXDATE',\n\t\t\t'STATUS',\n\t\t\t...getConfig('property-list-significant-change', []),\n\t\t]\n\n\t\tif (props.includes(uc(propertyName))) {\n\t\t\tthis.markChangesAsSignificant()\n\t\t}\n\t}\n\n\t/**\n\t * Marks a certain component as edited\n\t *\n\t * @param {string} componentName The name of the component\n\t */\n\tmarkSubComponentAsDirty(componentName) {\n\t\tthis.markDirty()\n\n\t\tif (getConfig('component-list-significant-change', []).includes(componentName)) {\n\t\t\tthis.markChangesAsSignificant()\n\t\t}\n\t}\n\n\t/**\n\t * Returns whether or not this component is dirty\n\t *\n\t * @return {boolean}\n\t */\n\tisDirty() {\n\t\treturn this._dirty || this._significantChange\n\t}\n\n\t/**\n\t * Marks this object as dirty\n\t */\n\tmarkDirty() {\n\t\tthis._dirty = true\n\t}\n\n\t/**\n\t * Marks changes as significant. Can be called by the program using this lib\n\t */\n\tmarkChangesAsSignificant() {\n\t\tthis._significantChange = true\n\t}\n\n\t/**\n\t * Updates the event after modifications.\n\t *\n\t * @return {boolean} true if last-modified was updated\n\t */\n\tundirtify() {\n\t\tif (!this.isDirty()) {\n\t\t\treturn false\n\t\t}\n\n\t\tif (!this.hasProperty('SEQUENCE')) {\n\t\t\tthis.sequence = 0\n\t\t}\n\n\t\tthis.updatePropertyWithValue('DTSTAMP', DateTimeValue.fromJSDate(dateFactory(), true))\n\t\tthis.updatePropertyWithValue('LAST-MODIFIED', DateTimeValue.fromJSDate(dateFactory(), true))\n\t\tif (this._significantChange) {\n\t\t\tthis.sequence++\n\t\t}\n\n\t\tthis.resetDirty()\n\n\t\treturn true\n\t}\n\n\t/**\n\t * Resets the dirty indicators without updating DTSTAMP or LAST-MODIFIED\n\t */\n\tresetDirty() {\n\t\tthis._dirty = false\n\t\tthis._significantChange = false\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tupdatePropertyWithValue(propertyName, value) {\n\t\tsuper.updatePropertyWithValue(propertyName, value)\n\n\t\tif (uc(propertyName) === 'UID') {\n\t\t\tthis._cachedId = null\n\t\t}\n\n\t\tthis.markPropertyAsDirty(propertyName)\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\taddProperty(property) {\n\t\tthis.markPropertyAsDirty(property.name)\n\t\tproperty.subscribe(() => this.markPropertyAsDirty(property.name))\n\t\treturn super.addProperty(property)\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tdeleteProperty(property) {\n\t\tthis.markPropertyAsDirty(property.name)\n\t\treturn super.deleteProperty(property)\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tdeleteAllProperties(propertyName) {\n\t\tthis.markPropertyAsDirty(propertyName)\n\t\treturn super.deleteAllProperties(propertyName)\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\taddComponent(component) {\n\t\tthis.markSubComponentAsDirty(component.name)\n\t\tcomponent.subscribe(() => this.markSubComponentAsDirty(component.name))\n\t\treturn super.addComponent(component)\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tdeleteComponent(component) {\n\t\tthis.markSubComponentAsDirty(component.name)\n\t\treturn super.deleteComponent(component)\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tdeleteAllComponents(componentName) {\n\t\tthis.markSubComponentAsDirty(componentName)\n\t\treturn super.deleteAllComponents(componentName)\n\t}\n\n\t/**\n\t * Gets a recurrence-id that has to be used to refer to this event.\n\t * This is used for recurrence-management\n\t *\n\t * @return {DateTimeValue|null}\n\t */\n\tgetReferenceRecurrenceId() {\n\t\tif (this.originalRecurrenceId) {\n\t\t\treturn this.originalRecurrenceId\n\t\t} else if (this.recurrenceId) {\n\t\t\treturn this.recurrenceId\n\t\t} else if (this.startDate) {\n\t\t\treturn this.startDate\n\t\t}\n\n\t\treturn null\n\t}\n\n\t/**\n\t * Overrides the master item with this one\n\t *\n\t * @private\n\t */\n\t_overridePrimaryItem() {\n\t\tconst oldStartDate = this.primaryItem.startDate\n\n\t\tfor (const property of this.primaryItem.getPropertyIterator()) {\n\t\t\tthis.primaryItem.deleteProperty(property)\n\t\t}\n\n\t\tfor (const property of this.getPropertyIterator()) {\n\t\t\tthis.primaryItem.addProperty(property)\n\t\t}\n\n\t\tthis.recurrenceManager.resetCache()\n\t\tif (this.startDate.compare(oldStartDate) !== 0) {\n\t\t\tthis.recurrenceManager.updateStartDateOfMasterItem(this.startDate, oldStartDate)\n\t\t}\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tstatic _getConstructorForComponentName(componentName) {\n\t\treturn getConstructorForComponentName(componentName)\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tstatic fromICALJs(...args) {\n\t\tconst comp = super.fromICALJs(...args)\n\t\tcomp.resetDirty()\n\n\t\treturn comp\n\t}\n\n}\n\n/**\n * Date-Time stamp of this object.\n * It has different meaning, based on whether or not a method is defined\n *\n * @url https://tools.ietf.org/html/rfc5545#section-3.8.7.2\n *\n * @name EventComponent#stampTime\n * @type {string}\n */\nadvertiseSingleOccurrenceProperty(AbstractRecurringComponent.prototype, {\n\tname: 'stampTime',\n\tiCalendarName: 'DTSTAMP',\n})\n\n/**\n * Recurrence-ID of this object, used for recurrence-exceptions\n *\n * @url https://tools.ietf.org/html/rfc5545#section-3.8.4.4\n *\n * @name EventComponent#recurrenceId\n * @type {string}\n */\nadvertiseSingleOccurrenceProperty(AbstractRecurringComponent.prototype, {\n\tname: 'recurrenceId',\n\tiCalendarName: 'RECURRENCE-ID',\n})\n\n/**\n * Special color for this event / journal / task\n *\n * @url https://tools.ietf.org/html/rfc7986#section-5.9\n *\n * @name EventComponent#color\n * @type {string}\n */\nadvertiseSingleOccurrenceProperty(AbstractRecurringComponent.prototype, 'color')\n\n/**\n * Creation Time of this event / journal / task\n *\n * @url https://tools.ietf.org/html/rfc5545#section-3.8.7.1\n *\n * @name EventComponent#creationTime\n * @type {string}\n */\nadvertiseSingleOccurrenceProperty(AbstractRecurringComponent.prototype, {\n\tname: 'creationTime',\n\tiCalendarName: 'CREATED',\n})\n\n/**\n * The time this event / journal / task\n *\n * @url https://tools.ietf.org/html/rfc5545#section-3.8.7.3\n *\n * @name EventComponent#modificationTime\n * @type {string}\n */\nadvertiseSingleOccurrenceProperty(AbstractRecurringComponent.prototype, {\n\tname: 'modificationTime',\n\tiCalendarName: 'LAST-MODIFIED',\n})\n\n/**\n * Organizer of this event / journal / task\n *\n * @url https://tools.ietf.org/html/rfc5545#section-3.8.4.3\n *\n * @name EventComponent#organizer\n * @type {string}\n */\nadvertiseSingleOccurrenceProperty(AbstractRecurringComponent.prototype, 'organizer')\n\n/**\n * Revision of this this event / journal / task\n *\n * @url https://tools.ietf.org/html/rfc5545#section-3.8.7.4\n *\n * @name EventComponent#sequence\n * @type {string}\n */\nadvertiseSingleOccurrenceProperty(AbstractRecurringComponent.prototype, 'sequence')\n\n/**\n * Status of this event / journal / task\n * This indicates whether an event is tentative / confirmed / cancelled\n *\n * @url https://tools.ietf.org/html/rfc5545#section-3.8.1.11\n *\n * @name EventComponent#status\n * @type {string}\n */\nadvertiseSingleOccurrenceProperty(AbstractRecurringComponent.prototype, 'status')\n\n/**\n * URL of a more dynamic rendition of this event / journal / task\n * DO NOT use this to simply point to a website merely related.\n *\n * @url https://tools.ietf.org/html/rfc5545#section-3.8.4.6\n *\n * @name EventComponent#url\n * @type {string}\n */\nadvertiseSingleOccurrenceProperty(AbstractRecurringComponent.prototype, 'url')\n\n/**\n * Title of this event / journal / task\n *\n * @url https://tools.ietf.org/html/rfc5545#section-3.8.1.12\n *\n * @name EventComponent#title\n * @type {string}\n */\nadvertiseSingleOccurrenceProperty(AbstractRecurringComponent.prototype, {\n\tname: 'title',\n\tiCalendarName: 'SUMMARY',\n})\n\n/**\n * Access class of this event / journal / task\n * This determines what other users can see when sharing\n *\n * @url https://tools.ietf.org/html/rfc5545#section-3.8.1.3\n *\n * @name EventComponent#accessClass\n * @type {string}\n */\nadvertiseSingleOccurrenceProperty(AbstractRecurringComponent.prototype, {\n\tname: 'accessClass',\n\tiCalendarName: 'class',\n\tallowedValues: ['PUBLIC', 'PRIVATE', 'CONFIDENTIAL'],\n\tdefaultValue: 'PUBLIC',\n\tunknownValue: 'PRIVATE',\n})\n\n/**\n * Returns an iterator over all categories\n * If the parameter lang is given, it will only\n * return an iterator for Categories matching that language\n *\n * @name AbstractRecurringComponent#getCategoryIterator\n * @function\n * @param {string=} lang\n * @return {IterableIterator<string>}\n */\n\n/**\n * Returns a list of all categories\n * If the parameter lang is given, it will only\n * return an iterator for Categories matching that language\n *\n * @name AbstractRecurringComponent#getCategoryList\n * @function\n * @param {string=} lang\n * @return {string[]}\n */\n\n/**\n * Adds a new category\n *\n * @name AbstractRecurringComponent#addCategory\n * @function\n * @param {string} category\n * @param {string=} lang\n */\n\n/**\n * Removes a category\n *\n * @name AbstractRecurringComponent#removeCategory\n * @function\n * @param {string} category\n * @param {string=} lang\n */\n\n/**\n * Clear all categories of a given language\n *\n * @name AbstractRecurringComponent#clearAllCategories\n * @function\n */\nadvertiseMultiValueStringPropertySeparatedByLang(AbstractRecurringComponent.prototype, {\n\tname: 'category',\n\tpluralName: 'categories',\n\tiCalendarName: 'CATEGORIES',\n})\n\n/**\n * Returns an iterator over all attendees\n *\n * @name AbstractRecurringComponent#getAttendeeIterator\n * @function\n * @return {IterableIterator<AttendeeProperty>}\n */\n\n/**\n * Gets a list of all attendees\n *\n * @name AbstractRecurringComponent#getAttendeeList\n * @function\n * @return {AttachmentProperty[]}\n */\n\n/**\n * Removes an attendee from this event / journal / task\n *\n * @name AbstractRecurringComponent#removeAttendee\n * @function\n * @param {AttendeeProperty} attendee\n */\n\n/**\n * Removes all attendees from this event / journal / task\n *\n * @name AbstractRecurringComponent#clearAllAttendees\n * @function\n */\nadvertiseMultipleOccurrenceProperty(AbstractRecurringComponent.prototype, {\n\tname: 'attendee',\n})\n\n/**\n * Returns an iterator over all attachments\n *\n * @name AbstractRecurringComponent#getAttachmentIterator\n * @function\n * @return {IterableIterator<AttachmentProperty>}\n */\n\n/**\n * Gets a list of all attachments\n *\n * @name AbstractRecurringComponent#getAttachmentList\n * @function\n * @return {AttachmentProperty[]}\n */\n\n/**\n * Removes one attachment from this event / journal / task\n *\n * @name AbstractRecurringComponent#removeAttachment\n * @function\n * @param {AttachmentProperty} attachment\n */\n\n/**\n * Removes all attachments from this event / journal / task\n *\n * @name AbstractRecurringComponent#clearAllAttachments\n * @function\n */\nadvertiseMultipleOccurrenceProperty(AbstractRecurringComponent.prototype, {\n\tname: 'attachment',\n\tiCalendarName: 'ATTACH',\n})\n\n/**\n * Returns an iterator over all relation properties\n *\n * @name AbstractRecurringComponent#getRelationIterator\n * @function\n * @return {IterableIterator<RelationProperty>}\n */\n\n/**\n * Returns a list of all relation properties\n *\n * @name AbstractRecurringComponent#getRelationList\n * @function\n * @return {RelationProperty[]}\n */\n\n/**\n * Removes a relation from this event / journal / task\n *\n * @name AbstractRecurringComponent#removeRelation\n * @function\n * @param {RelationProperty} relation\n */\n\n/**\n * Removes all relations from this event / journal / task\n *\n * @name AbstractRecurringComponent#clearAllRelations\n * @function\n */\nadvertiseMultipleOccurrenceProperty(AbstractRecurringComponent.prototype, {\n\tname: 'relation',\n\tiCalendarName: 'RELATED-TO',\n})\n\n/**\n * Returns an iterator over all comments in this event / journal / task\n *\n * @name AbstractRecurringComponent#getCommentIterator\n * @function\n * @return {IterableIterator<TextProperty>}\n */\n\n/**\n * Returns a list of all comments in this event / journal / task\n *\n * @name AbstractRecurringComponent#getCommentList\n * @function\n * @return {TextProperty[]}\n */\n\n/**\n * Removes a comment from this event / journal / task\n *\n * @name AbstractRecurringComponent#removeComment\n * @function\n * @param {TextProperty} comment\n */\n\n/**\n * Removes all comments from this event / journal / task\n *\n * @name AbstractRecurringComponent#clearAllComments\n * @function\n */\nadvertiseMultipleOccurrenceProperty(AbstractRecurringComponent.prototype, 'comment')\n\n/**\n * Returns an iterator over all contacts referenced in this event / journal / task\n *\n * @name AbstractRecurringComponent#getContactIterator\n * @function\n * @return {IterableIterator<TextProperty>}\n */\n\n/**\n * Returns a list of all contacts referenced in this event / journal / task\n *\n * @name AbstractRecurringComponent#getContactList\n * @function\n * @return {TextProperty[]}\n */\n\n/**\n * Removes one contact from this event / journal / task\n *\n * @name AbstractRecurringComponent#removeContact\n * @function\n * @param {TextProperty} contact\n */\n\n/**\n * Removes all contacts from this event / journal / task\n *\n * @name AbstractRecurringComponent#clearAllContacts\n * @function\n */\nadvertiseMultipleOccurrenceProperty(AbstractRecurringComponent.prototype, 'contact')\n\n/**\n * Returns an iterator over all image properties\n *\n * @name AbstractRecurringComponent#getImageIterator\n * @function\n * @return {IterableIterator<ImageProperty>}\n */\n\n/**\n * Returns a list of all image properties\n *\n * @name AbstractRecurringComponent#getImageList\n * @function\n * @return {ImageProperty[]}\n */\n\n/**\n * Removes one image from this event / journal / task\n *\n * @name AbstractRecurringComponent#removeImage\n * @function\n * @param {ImageProperty} image\n */\n\n/**\n * Removes all images from this event / journal / task\n *\n * @name AbstractRecurringComponent#clearAllImages\n * @function\n */\nadvertiseMultipleOccurrenceProperty(AbstractRecurringComponent.prototype, 'image')\n\n/**\n * Returns an iterator over all request status\n *\n * @name AbstractRecurringComponent#getRequestStatusIterator\n * @function\n * @return {IterableIterator<RequestStatusProperty>}\n */\n\n/**\n * Returns a list of all request status\n *\n * @name AbstractRecurringComponent#getRequestStatusList\n * @function\n * @return {RequestStatusProperty[]}\n */\n\n/**\n * Removes one request status from this event / journal / task\n *\n * @name AbstractRecurringComponent#removeRequestStatus\n * @function\n * @param {RequestStatusProperty} requestStatus\n */\n\n/**\n * Removes all request status from this event / journal / task\n *\n * @name AbstractRecurringComponent#clearAllRequestStatus\n * @function\n */\nadvertiseMultipleOccurrenceProperty(AbstractRecurringComponent.prototype, {\n\tname: 'requestStatus',\n\tpluralName: 'requestStatus',\n\tiCalendarName: 'REQUEST-STATUS',\n})\n\n/**\n * Returns an iterator of all alarms\n *\n * @name AbstractRecurringComponent#getAlarmIterator\n * @function\n * @return {IterableIterator<AlarmComponent>}\n */\n\n/**\n * Returns a list of all alarms\n *\n * @name AbstractRecurringComponent#getAlarmList\n * @function\n * @return {AlarmComponent[]}\n */\n\n/**\n * Removes an alarm from this event / journal / task\n *\n * @name AbstractRecurringComponent#removeAlarm\n * @function\n * @param {AlarmComponent} alarm\n */\n\n/**\n * Removes all alarms from this event / journal / task\n *\n * @name AbstractRecurringComponent#clearAllAlarms\n * @function\n */\nadvertiseComponent(AbstractRecurringComponent.prototype, 'alarm')\n","/**\n * @copyright Copyright (c) 2019 Georg Ehrke\n *\n * @author Georg Ehrke <georg-nextcloud@ehrke.email>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\n\n/**\n * Gets kind of birthday event\n * returns \"BDAY\", \"DEATHDATE\", \"ANNIVERSARY\"\n * or null if this is not a birthday event\n *\n * @param {EventComponent} eventComponent The eventComponent of the birthday event\n * @return {null|string}\n */\nexport function getTypeOfBirthdayEvent(eventComponent) {\n\treturn eventComponent.getFirstPropertyFirstValue('X-NEXTCLOUD-BC-FIELD-TYPE')\n}\n\n/**\n * Gets icon for the birthday type\n *\n * @param {EventComponent} eventComponent The eventComponent of the birthday event\n * @return {string|null}\n */\nexport function getIconForBirthday(eventComponent) {\n\tconst birthdayType = getTypeOfBirthdayEvent(eventComponent)\n\tswitch (birthdayType) {\n\tcase 'BDAY':\n\t\treturn '🎂'\n\n\tcase 'DEATHDATE':\n\t\treturn '⚰️'\n\n\tcase 'ANNIVERSARY':\n\t\treturn '💍'\n\n\tdefault:\n\t\treturn null\n\t}\n}\n\n/**\n * Returns the age of the birthday person or null of no birth-year given\n *\n * @param {EventComponent} eventComponent The eventComponent of the birthday event\n * @param {number} yearOfOccurrence The year to calculate the age for\n * @return {null|number}\n */\nexport function getAgeOfBirthday(eventComponent, yearOfOccurrence) {\n\tif (!eventComponent.hasProperty('X-NEXTCLOUD-BC-YEAR')) {\n\t\treturn null\n\t}\n\n\tconst yearOfBirth = eventComponent.getFirstPropertyFirstValue('X-NEXTCLOUD-BC-YEAR')\n\treturn parseInt(yearOfOccurrence, 10) - parseInt(yearOfBirth, 10)\n}\n\n/**\n * Returns the name of the birthday person or null if not set\n *\n * @param {EventComponent} eventComponent The eventComponent of the birthday event\n * @return {null|string}\n */\nexport function getNameForBirthday(eventComponent) {\n\treturn eventComponent.getFirstPropertyFirstValue('X-NEXTCLOUD-BC-NAME')\n}\n","/**\n * @copyright Copyright (c) 2019 Georg Ehrke\n *\n * @author Georg Ehrke <georg-nextcloud@ehrke.email>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nimport AbstractRecurringComponent from './abstractRecurringComponent.js'\nimport {\n\tadvertiseMultipleOccurrenceProperty,\n\tadvertiseMultiValueStringPropertySeparatedByLang,\n\tadvertiseSingleOccurrenceProperty,\n} from '../abstractComponent.js'\nimport {\n\tgetAgeOfBirthday,\n\tgetIconForBirthday,\n\tgetTypeOfBirthdayEvent,\n} from '../../helpers/birthdayHelper.js'\nimport DurationValue from '../../values/durationValue.js'\nimport GeoProperty from '../../properties/geoProperty.js'\nimport ConferenceProperty from '../../properties/conferenceProperty.js'\n\n/**\n * @class EventComponent\n * @classdesc\n *\n * @url https://tools.ietf.org/html/rfc5545#section-3.6.1\n */\nexport default class EventComponent extends AbstractRecurringComponent {\n\n\t/**\n\t * Returns whether this event is an all-day event\n\t *\n\t * @return {boolean}\n\t */\n\tisAllDay() {\n\t\treturn this.startDate.isDate && this.endDate.isDate\n\t}\n\n\t/**\n\t * Checks whether it's possible to switch from date-time to date or vise-versa\n\t *\n\t * @return {boolean}\n\t */\n\tcanModifyAllDay() {\n\t\treturn !this.recurrenceManager.masterItem.isRecurring()\n\t}\n\n\t/**\n\t * Gets the calculated end-date of the event\n\t *\n\t * Quote from RFC 5545 3.6.1:\n\t * The \"DTSTART\" property for a \"VEVENT\" specifies the inclusive\n\t * start of the event.  For recurring events, it also specifies the\n\t * very first instance in the recurrence set.  The \"DTEND\" property\n\t * for a \"VEVENT\" calendar component specifies the non-inclusive end\n\t * of the event.  For cases where a \"VEVENT\" calendar component\n\t * specifies a \"DTSTART\" property with a DATE value type but no\n\t * \"DTEND\" nor \"DURATION\" property, the event's duration is taken to\n\t * be one day.  For cases where a \"VEVENT\" calendar component\n\t * specifies a \"DTSTART\" property with a DATE-TIME value type but no\n\t * \"DTEND\" property, the event ends on the same calendar date and\n\t * time of day specified by the \"DTSTART\" property.\n\t *\n\t * @return {DateTimeValue}\n\t */\n\tget endDate() {\n\t\tif (this.hasProperty('dtend')) {\n\t\t\treturn this.getFirstPropertyFirstValue('dtend')\n\t\t}\n\n\t\tconst dtend = this.startDate.clone()\n\n\t\tif (this.hasProperty('duration')) {\n\t\t\tdtend.addDuration(this.getFirstPropertyFirstValue('duration'))\n\t\t} else if (this.startDate.isDate) {\n\t\t\tdtend.addDuration(DurationValue.fromSeconds(60 * 60 * 24))\n\t\t} // There is nothing to do when this event is not allday\n\n\t\treturn dtend\n\t}\n\n\t/**\n\t * Sets the end time of the event\n\t *\n\t * @param {DateTimeValue} end The end of the event\n\t */\n\tset endDate(end) {\n\t\tthis.deleteAllProperties('duration')\n\t\tthis.updatePropertyWithValue('dtend', end)\n\t}\n\n\t/**\n\t * Gets the calculated duration of the event\n\t *\n\t * @return {DurationValue}\n\t */\n\tget duration() {\n\t\tif (this.hasProperty('duration')) {\n\t\t\treturn this.getFirstPropertyFirstValue('duration')\n\t\t}\n\n\t\treturn this.startDate.subtractDateWithTimezone(this.endDate)\n\t}\n\n\t/**\n\t * Sets the calculated duration of the event\n\t *\n\t * @param {DurationValue} duration The duration of the event\n\t */\n\tset duration(duration) {\n\t\tthis.deleteAllProperties('dtend')\n\t\tthis.updatePropertyWithValue('duration', duration)\n\t}\n\n\t/**\n\t * Sets the geographical position based on latitude and longitude\n\t *\n\t * @url https://tools.ietf.org/html/rfc5545#section-3.8.1.6\n\t *\n\t * @param {number} lat - latitude\n\t * @param {number} long - longitude\n\t */\n\tsetGeographicalPositionFromLatitudeAndLongitude(lat, long) {\n\t\tthis.deleteAllProperties('GEO')\n\t\tthis.addProperty(GeoProperty.fromPosition(lat, long))\n\t}\n\n\t/**\n\t * Adds a new conference property based on URI, label and features\n\t *\n\t * @url https://tools.ietf.org/html/rfc7986#section-5.11\n\t *\n\t * @param {string} uri The URI of the conference system\n\t * @param {string=} label The label for the conference system\n\t * @param {string[]=} features The features of the conference system\n\t */\n\taddConference(uri, label = null, features = null) {\n\t\tthis._modify()\n\t\tthis.addProperty(ConferenceProperty.fromURILabelAndFeatures(uri, label, features))\n\t}\n\n\t/**\n\t * Adds a duration to the start of the event\n\t *\n\t * @param {DurationValue} duration The duration to add\n\t */\n\taddDurationToStart(duration) {\n\t\tthis.startDate.addDuration(duration)\n\t}\n\n\t/**\n\t * Adds a duration to the end of the event\n\t *\n\t * @param {DurationValue} duration The duration to add\n\t */\n\taddDurationToEnd(duration) {\n\t\tconst endDate = this.endDate\n\t\tendDate.addDuration(duration)\n\n\t\tthis.endDate = endDate\n\t}\n\n\t/**\n\t * Shifts the entire event by the given duration\n\t *\n\t * @param {DurationValue} delta The duration to shift event by\n\t * @param {boolean} allDay Whether the updated event should be all-day or not\n\t * @param {Timezone} defaultTimezone The default timezone if moving from all-day to timed event\n\t * @param {DurationValue} defaultAllDayDuration The default all-day duration if moving from timed to all-day\n\t * @param {DurationValue} defaultTimedDuration The default timed duration if moving from all-day to timed\n\t */\n\tshiftByDuration(delta, allDay, defaultTimezone, defaultAllDayDuration, defaultTimedDuration) {\n\t\tconst currentAllDay = this.isAllDay()\n\n\t\tif (currentAllDay !== allDay && !this.canModifyAllDay()) {\n\t\t\tthrow new TypeError('Can\\'t modify all-day of this event')\n\t\t}\n\n\t\tthis.startDate.isDate = allDay\n\t\tthis.startDate.addDuration(delta)\n\n\t\t// If this event was moved from the all-day area into the time-grid,\n\t\t// then we have to add a timezone and the default duration\n\t\tif (currentAllDay && !allDay) {\n\t\t\tthis.startDate.replaceTimezone(defaultTimezone)\n\n\t\t\tthis.endDate = this.startDate.clone()\n\t\t\tthis.endDate.addDuration(defaultTimedDuration)\n\t\t}\n\n\t\t// If this event was moved from the time-grid into the all-day area,\n\t\t// then we have to change the default duration\n\t\tif (!currentAllDay && allDay) {\n\t\t\tthis.endDate = this.startDate.clone()\n\t\t\tthis.endDate.addDuration(defaultAllDayDuration)\n\t\t}\n\n\t\t// If this event was only moved inside the time-grid or only inside\n\t\t// the all-day area, then we only have to adjust the end-date\n\t\tif (currentAllDay === allDay) {\n\t\t\tconst endDate = this.endDate\n\t\t\tendDate.addDuration(delta)\n\t\t\tthis.endDate = endDate\n\t\t}\n\t}\n\n\t/**\n\t * Checks if this is a birthday event\n\t *\n\t * @return {boolean}\n\t */\n\tisBirthdayEvent() {\n\t\treturn getTypeOfBirthdayEvent(this) === 'BDAY'\n\t}\n\n\t/**\n\t * Gets the icon to the birthday event\n\t *\n\t * @return {string}\n\t */\n\tgetIconForBirthdayEvent() {\n\t\treturn getIconForBirthday(this)\n\t}\n\n\t/**\n\t * Calculates the age of the birthday\n\t *\n\t * @return {number}\n\t */\n\tgetAgeForBirthdayEvent() {\n\t\treturn getAgeOfBirthday(this, this.startDate.year)\n\t}\n\n\t/**\n\t * Serializes the entire series to ICS\n\t *\n\t * @return {string}\n\t */\n\ttoICSEntireSeries() {\n\t\treturn this.root.toICS()\n\t}\n\n\t/**\n\t * Serializes exactly this recurrence to ICS\n\t * It removes all recurrence information\n\t *\n\t * @return {string}\n\t */\n\ttoICSThisOccurrence() {\n\t\tconst clone = this.clone()\n\n\t\tclone.deleteAllProperties('RRULE')\n\t\tclone.deleteAllProperties('EXRULE')\n\t\tclone.deleteAllProperties('RDATE')\n\t\tclone.deleteAllProperties('EXDATE')\n\t\tclone.deleteAllProperties('RECURRENCE-ID')\n\n\t\tclone.root = clone.root.constructor.fromEmpty()\n\t\tclone.parent = clone.root\n\t\tclone.root.addComponent(clone)\n\n\t\treturn clone.root.toICS()\n\t}\n\n\t/**\n\t * Checks if this event is in a given time-frame\n\t *\n\t * @param {DateTimeValue} start Start of time-range to check\n\t * @param {DateTimeValue} end End of time-range to check\n\t * @return {boolean}\n\t */\n\tisInTimeFrame(start, end) {\n\t\treturn start.compare(this.endDate) <= 0 && end.compare(this.startDate) >= 0\n\t}\n\n}\n\n/**\n * Time-transparency of this event.\n * If set to TRANSPARENT, this event will be ignored for FREE/BUSY calculations.\n *\n * @url https://tools.ietf.org/html/rfc5545#section-3.8.2.7\n *\n * @name EventComponent#timeTransparency\n * @type {string}\n */\nadvertiseSingleOccurrenceProperty(EventComponent.prototype, {\n\tname: 'timeTransparency',\n\tiCalendarName: 'TRANSP',\n\tallowedValues: ['OPAQUE', 'TRANSPARENT'],\n\tdefaultValue: 'OPAQUE',\n})\n\n/**\n * Description of this event.\n *\n * @url https://tools.ietf.org/html/rfc5545#section-3.8.1.5\n *\n * @name EventComponent#description\n * @type {string}\n */\nadvertiseSingleOccurrenceProperty(EventComponent.prototype, 'description')\n\n/**\n * Geographical position of this event\n *\n * @url https://tools.ietf.org/html/rfc5545#section-3.8.1.6\n *\n * @name EventComponent#geographicalPosition\n * @type {string}\n */\nadvertiseSingleOccurrenceProperty(EventComponent.prototype, {\n\tname: 'geographicalPosition',\n\tiCalendarName: 'GEO',\n})\n\n/**\n * Location that this event takes place in\n *\n * @url https://tools.ietf.org/html/rfc5545#section-3.8.1.7\n *\n * @name EventComponent#location\n * @type {string}\n */\nadvertiseSingleOccurrenceProperty(EventComponent.prototype, 'location')\n\n/**\n * Priority of this event\n *\n * @url https://tools.ietf.org/html/rfc5545#section-3.8.1.9\n *\n * @name EventComponent#priority\n * @type Number\n */\nadvertiseSingleOccurrenceProperty(EventComponent.prototype, {\n\tname: 'priority',\n\tallowedValues: Array(9).keys(),\n\tdefaultValue: 0,\n\tunknownValue: 0,\n})\n\n/**\n * Returns an iterator over all resources\n * If the parameter lang is given, it will only\n * return an iterator for Resources matching that language\n *\n * @url https://tools.ietf.org/html/rfc5545#section-3.8.1.10\n *\n * @name EventComponent#getResourceIterator\n * @function\n * @param {string=} lang\n * @return {IterableIterator<string>}\n */\n\n/**\n * Returns a list of all resources\n * If the parameter lang is given, it will only\n * return an iterator for resources matching that language\n *\n * @url https://tools.ietf.org/html/rfc5545#section-3.8.1.10\n *\n * @name EventComponent#getResourceList\n * @function\n * @param {string=} lang\n * @return {string[]}\n */\n\n/**\n * Adds a resource\n *\n * @url https://tools.ietf.org/html/rfc5545#section-3.8.1.10\n *\n * @name EventComponent#addResource\n * @function\n * @param {string} resource\n * @param {string=} lang\n */\n\n/**\n * Removes a resource\n *\n * @url https://tools.ietf.org/html/rfc5545#section-3.8.1.10\n *\n * @name EventComponent#removeResource\n * @function\n * @param {string} resource\n * @param {string=} lang\n */\n\n/**\n * Removes all resources from this event\n *\n * @url https://tools.ietf.org/html/rfc5545#section-3.8.1.10\n *\n * @name EventComponent#clearAllResources\n * @function\n * @param {string=} lang\n */\nadvertiseMultiValueStringPropertySeparatedByLang(EventComponent.prototype, {\n\tname: 'resource',\n\tiCalendarName: 'RESOURCES',\n})\n\n/**\n * Gets an iterator over all conference properties\n *\n * @url https://tools.ietf.org/html/rfc7986#section-5.11\n *\n * @name EventComponent#getConferenceIterator\n * @function\n * @return {IterableIterator<ConferenceProperty>}\n */\n\n/**\n * Gets a list of all conference properties\n *\n * @url https://tools.ietf.org/html/rfc7986#section-5.11\n *\n * @name EventComponent#getConferenceList\n * @function\n * @return {ConferenceProperty[]}\n */\n\n/**\n * Removes a conference from this event\n *\n * @url https://tools.ietf.org/html/rfc7986#section-5.11\n *\n * @name EventComponent#removeConference\n * @function\n * @param {ConferenceProperty} conference\n */\n\n/**\n * Removes all conferences from this event\n *\n * @url https://tools.ietf.org/html/rfc7986#section-5.11\n *\n * @name EventComponent#clearAllConferences\n * @function\n */\nadvertiseMultipleOccurrenceProperty(EventComponent.prototype, 'conference')\n","/**\n * @copyright Copyright (c) 2019 Georg Ehrke\n *\n * @author Georg Ehrke <georg-nextcloud@ehrke.email>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nimport AbstractComponent, {\n\tadvertiseMultipleOccurrenceProperty,\n\tadvertiseSingleOccurrenceProperty,\n} from '../abstractComponent.js'\nimport { Timezone } from '@nextcloud/timezones'\nimport AttendeeProperty from '../../properties/attendeeProperty.js'\n\n/**\n * @class FreeBusyComponent\n * @classdesc\n *\n * @url https://tools.ietf.org/html/rfc5545#section-3.6.4\n */\nexport default class FreeBusyComponent extends AbstractComponent {\n\n\t/**\n\t * Gets the start-date of the FreeBusy component\n\t *\n\t * @return {DateTimeValue}\n\t */\n\tget startDate() {\n\t\treturn this.getFirstPropertyFirstValue('DTSTART')\n\t}\n\n\t/**\n\t * Sets the start-date of the FreeBusy component\n\t *\n\t * @param {DateTimeValue} startDate The start of the queried time-range\n\t */\n\tset startDate(startDate) {\n\t\tthis._modify()\n\t\tthis.updatePropertyWithValue('DTSTART', startDate.getInTimezone(Timezone.utc))\n\t}\n\n\t/**\n\t * Gets the end-date of the FreeBusy component\n\t *\n\t * @return {DateTimeValue}\n\t */\n\tget endDate() {\n\t\treturn this.getFirstPropertyFirstValue('DTEND')\n\t}\n\n\t/**\n\t * Sets the start-date of the FreeBusy component\n\t *\n\t * @param {DateTimeValue} endDate The end of the queried time-range\n\t */\n\tset endDate(endDate) {\n\t\tthis._modify()\n\t\tthis.updatePropertyWithValue('DTEND', endDate.getInTimezone(Timezone.utc))\n\t}\n\n\t/**\n\t * Gets an iterator over all FreeBusyProperties\n\t */\n\t* getFreeBusyIterator() {\n\t\tyield * this.getPropertyIterator('FREEBUSY')\n\t}\n\n\t/**\n\t * Adds a new attendee based on their name and email-address\n\t *\n\t * @url https://tools.ietf.org/html/rfc5545#section-3.8.4.1\n\t *\n\t * @param {string} name The name of the attendee to add\n\t * @param {string} email The email-address of the attendee to add\n\t */\n\taddAttendeeFromNameAndEMail(name, email) {\n\t\tthis._modify()\n\t\tthis.addProperty(AttendeeProperty.fromNameAndEMail(name, email))\n\t}\n\n\t/**\n\t * Sets the organiser property from common-name and email address\n\t *\n\t * @url https://tools.ietf.org/html/rfc5545#section-3.8.4.3\n\t *\n\t * @param {string} name The name of the organizer\n\t * @param {string} email The email-address of the organizer\n\t */\n\tsetOrganizerFromNameAndEMail(name, email) {\n\t\tthis._modify()\n\t\tthis.deleteAllProperties('ORGANIZER')\n\t\tthis.addProperty(AttendeeProperty.fromNameAndEMail(name, email, true))\n\t}\n\n}\n\n/**\n * The organizer of this FreeBusy component\n *\n * @url https://tools.ietf.org/html/rfc5545#section-3.8.4.3\n *\n * @name FreeBusyComponent#organizer\n * @type {AttendeeProperty}\n */\nadvertiseSingleOccurrenceProperty(FreeBusyComponent.prototype, 'organizer')\n\n/**\n * The UID of this FreeBusy component\n *\n * @url https://tools.ietf.org/html/rfc5545#section-3.8.4.7\n *\n * @name FreeBusyComponent#organizer\n * @type {AttendeeProperty}\n */\nadvertiseSingleOccurrenceProperty(FreeBusyComponent.prototype, 'uid')\n\n/**\n * Returns an iterator of all attendees\n *\n * @url https://tools.ietf.org/html/rfc5545#section-3.8.4.1\n *\n * @name FreeBusyComponent#getAttendeeIterator\n * @function\n * @return {IterableIterator<AttendeeProperty>}\n */\n\n/**\n * Returns a list of all attendees\n *\n * @url https://tools.ietf.org/html/rfc5545#section-3.8.4.1\n *\n * @name FreeBusyComponent#getAttendeeList\n * @function\n * @return {AttendeeProperty[]}\n */\n\n/**\n * Removes an attendee\n *\n * @url https://tools.ietf.org/html/rfc5545#section-3.8.4.1\n *\n * @name FreeBusyComponent#removeAttendee\n * @function\n * @param {AttendeeProperty} attendee\n */\n\n/**\n * Removes all attendees\n *\n * @url https://tools.ietf.org/html/rfc5545#section-3.8.4.1\n *\n * @name FreeBusyComponent#clearAllAttendees\n * @function\n */\nadvertiseMultipleOccurrenceProperty(FreeBusyComponent.prototype, 'attendee')\n","/**\n * @copyright Copyright (c) 2019 Georg Ehrke\n *\n * @author Georg Ehrke <georg-nextcloud@ehrke.email>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nimport AbstractRecurringComponent from './abstractRecurringComponent.js'\nimport { advertiseMultipleOccurrenceProperty } from '../abstractComponent.js'\nimport TextProperty from '../../properties/textProperty.js'\n\n/**\n * @class JournalComponent\n * @classdesc\n *\n * @url https://tools.ietf.org/html/rfc5545#section-3.6.3\n */\nexport default class JournalComponent extends AbstractRecurringComponent {\n\n\t/**\n\t * Adds a new description property\n\t *\n\t * @url https://tools.ietf.org/html/rfc5545#section-3.8.1.5\n\t *\n\t * @param {string} description The description text\n\t */\n\taddDescription(description) {\n\t\tthis.addProperty(new TextProperty('DESCRIPTION', description))\n\t}\n\n}\n\n/**\n * Gets an iterator over all description properties\n *\n * @url https://tools.ietf.org/html/rfc5545#section-3.8.1.5\n *\n * @name JournalComponent#getDescriptionIterator\n * @function\n * @return {IterableIterator<ConferenceProperty>}\n */\n\n/**\n * Gets a list of all description properties\n *\n * @url https://tools.ietf.org/html/rfc5545#section-3.8.1.5\n *\n * @name JournalComponent#getDescriptionList\n * @function\n * @return {ConferenceProperty[]}\n */\n\n/**\n * Removes a description from this event\n *\n * @url https://tools.ietf.org/html/rfc5545#section-3.8.1.5\n *\n * @name JournalComponent#removeDescription\n * @function\n * @param {ConferenceProperty} conference\n */\n\n/**\n * Removes all descriptions from this event\n *\n * @url https://tools.ietf.org/html/rfc5545#section-3.8.1.5\n *\n * @name JournalComponent#clearAllDescriptions\n * @function\n */\nadvertiseMultipleOccurrenceProperty(JournalComponent.prototype, 'description')\n","/**\n * @copyright Copyright (c) 2019 Georg Ehrke\n *\n * @author Georg Ehrke <georg-nextcloud@ehrke.email>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nimport AbstractComponent, {\n\tadvertiseSingleOccurrenceProperty,\n} from '../abstractComponent.js'\nimport { Timezone } from '@nextcloud/timezones'\n\n/**\n * @class TimezoneComponent\n * @classdesc\n *\n * There are no advertised properties / components for the TimezoneComponent,\n * since we don't care about it.\n * Editing / accessing the timezone information directly is not a use-case\n * All the timezone-handling is done by the underlying ICAL.JS\n *\n * @url https://tools.ietf.org/html/rfc5545#section-3.6.5\n */\nexport default class TimezoneComponent extends AbstractComponent {\n\n\t/**\n\t * Returns a calendar-js Timezone object\n\t *\n\t * @return {Timezone}\n\t */\n\ttoTimezone() {\n\t\treturn new Timezone(this.toICALJs())\n\t}\n\n}\n\n/**\n * The timezoneId of this timezone-component\n *\n * @name TimezoneComponent#timezoneId\n * @type {string}\n */\nadvertiseSingleOccurrenceProperty(TimezoneComponent.prototype, {\n\tname: 'timezoneId',\n\tiCalendarName: 'tzid',\n})\n","/**\n * @copyright Copyright (c) 2019 Georg Ehrke\n *\n * @author Georg Ehrke <georg-nextcloud@ehrke.email>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nimport AbstractRecurringComponent from './abstractRecurringComponent.js'\nimport {\n\tadvertiseMultipleOccurrenceProperty,\n\tadvertiseMultiValueStringPropertySeparatedByLang,\n\tadvertiseSingleOccurrenceProperty,\n} from '../abstractComponent.js'\nimport ConferenceProperty from '../../properties/conferenceProperty.js'\nimport GeoProperty from '../../properties/geoProperty.js'\n\n/**\n * @class ToDoComponent\n * @classdesc\n *\n * @url https://tools.ietf.org/html/rfc5545#section-3.6.2\n */\nexport default class ToDoComponent extends AbstractRecurringComponent {\n\n\t/**\n\t * Returns whether this event is an all-day event\n\t *\n\t * @return {boolean}\n\t */\n\tisAllDay() {\n\t\tconst propertiesToCheck = ['DTSTART', 'DUE']\n\t\tfor (const propertyToCheck of propertiesToCheck) {\n\t\t\tif (this.hasProperty(propertyToCheck)) {\n\t\t\t\treturn this.getFirstPropertyFirstValue(propertyToCheck).isDate\n\t\t\t}\n\t\t}\n\n\t\t// If a task is not associated with any date, it is defined to\n\t\t// occur on any successive date until it is completed.\n\t\t// We are treating it as all-day in that case.\n\t\treturn true\n\t}\n\n\t/**\n\t * Checks whether it's possible to switch from date-time to date or vise-versa\n\t *\n\t * @return {boolean}\n\t */\n\tcanModifyAllDay() {\n\t\tif (!this.hasProperty('dtstart') && !this.hasProperty('due')) {\n\t\t\treturn false\n\t\t}\n\n\t\treturn !this.recurrenceManager.masterItem.isRecurring()\n\t}\n\n\t/**\n\t * Gets the calculated end-date of the task\n\t *\n\t * If there is a due-date, we will just return that.\n\t * If there is a start-date and a duration, we will\n\t * calculate the end-date based on that.\n\t *\n\t * If there is neither a due-date nor a combination\n\t * of start-date and duration, we just return null\n\t *\n\t * @return {DateTimeValue|null}\n\t */\n\tget endDate() {\n\t\tif (this.hasProperty('due')) {\n\t\t\treturn this.getFirstPropertyFirstValue('due')\n\t\t}\n\n\t\tif (!this.hasProperty('dtstart') || !this.hasProperty('duration')) {\n\t\t\treturn null\n\t\t}\n\n\t\tconst endDate = this.startDate.clone()\n\t\tendDate.addDuration(this.getFirstPropertyFirstValue('duration'))\n\t\treturn endDate\n\t}\n\n\t/**\n\t * Shifts the entire task by the given duration\n\t *\n\t * @param {DurationValue} delta The duration to shift event by\n\t * @param {boolean} allDay Whether the updated event should be all-day or not\n\t * @param {Timezone} defaultTimezone The default timezone if moving from all-day to timed event\n\t * @param {DurationValue} defaultAllDayDuration The default all-day duration if moving from timed to all-day\n\t * @param {DurationValue} defaultTimedDuration The default timed duration if moving from all-day to timed\n\t */\n\tshiftByDuration(delta, allDay, defaultTimezone, defaultAllDayDuration, defaultTimedDuration) {\n\t\tconst currentAllDay = this.isAllDay()\n\n\t\tif (!this.hasProperty('dtstart') && !this.hasProperty('due')) {\n\t\t\tthrow new TypeError('This task does not have a start-date nor due-date')\n\t\t}\n\n\t\tif (currentAllDay !== allDay && !this.canModifyAllDay()) {\n\t\t\tthrow new TypeError('Can\\'t modify all-day of this todo')\n\t\t}\n\n\t\t// If this task has a start-date, update it\n\t\t// This is especially important, if you shift\n\t\t// the task by a negative duration, because\n\t\t// dtstart always has to be prior to the due date\n\t\tif (this.hasProperty('dtstart')) {\n\t\t\tthis.startDate.isDate = allDay\n\t\t\tthis.startDate.addDuration(delta)\n\n\t\t\tif (currentAllDay && !allDay) {\n\t\t\t\tthis.startDate.replaceTimezone(defaultTimezone)\n\t\t\t}\n\t\t}\n\n\t\tif (this.hasProperty('due')) {\n\t\t\tthis.dueTime.isDate = allDay\n\t\t\tthis.dueTime.addDuration(delta)\n\n\t\t\tif (currentAllDay && !allDay) {\n\t\t\t\tthis.dueTime.replaceTimezone(defaultTimezone)\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Checks if this event is in a given time-frame\n\t *\n\t * @param {DateTimeValue} start Start of time-range to check\n\t * @param {DateTimeValue} end End of time-range to check\n\t * @return {boolean}\n\t */\n\tisInTimeFrame(start, end) {\n\t\tif (!this.hasProperty('dtstart') && !this.hasProperty('due')) {\n\t\t\treturn true\n\t\t}\n\n\t\tif (!this.hasProperty('dtstart') && this.hasProperty('due')) {\n\t\t\treturn start.compare(this.endDate) <= 0\n\t\t}\n\n\t\treturn start.compare(this.endDate) <= 0 && end.compare(this.startDate) >= 0\n\t}\n\n\t/**\n\t * Gets the geographical position property\n\t *\n\t * @return {GeoProperty}\n\t */\n\tget geographicalPosition() {\n\t\treturn this.getFirstProperty('GEO')\n\t}\n\n\t/**\n\t * Sets the geographical position based on latitude and longitude\n\t *\n\t * @url https://tools.ietf.org/html/rfc5545#section-3.8.1.6\n\t *\n\t * @param {number} lat - latitude\n\t * @param {number} long - longitude\n\t */\n\tsetGeographicalPositionFromLatitudeAndLongitude(lat, long) {\n\t\tthis.deleteAllProperties('GEO')\n\t\tthis.addProperty(GeoProperty.fromPosition(lat, long))\n\t}\n\n\t/**\n\t * Adds a new conference property based on URI, label and features\n\t *\n\t * @url https://tools.ietf.org/html/rfc7986#section-5.11\n\t *\n\t * @param {string} uri The URI of the conference\n\t * @param {string=} label The label of the conference\n\t * @param {string[]=} features Supported features of conference-system\n\t */\n\taddConference(uri, label = null, features = null) {\n\t\tthis.addProperty(ConferenceProperty.fromURILabelAndFeatures(uri, label, features))\n\t}\n\n\t/**\n\t * Gets a recurrence-id that has to be used to refer to this task.\n\t * This is used for recurrence-management.\n\t *\n\t * Gracefully handles the case where a task has no start-date, but a due-date.\n\t *\n\t * @return {DateTimeValue|null}\n\t */\n\tgetReferenceRecurrenceId() {\n\t\treturn super.getReferenceRecurrenceId() ?? this.endDate\n\t}\n\n}\n\n/**\n * The time when a task was completed\n *\n * @url https://tools.ietf.org/html/rfc5545#section-3.8.2.1\n *\n * @name ToDoComponent#completedTime\n * @type {DateTimeValue}\n */\nadvertiseSingleOccurrenceProperty(ToDoComponent.prototype, {\n\tname: 'completedTime',\n\tiCalendarName: 'COMPLETED',\n})\n\n/**\n * The time when a task is due\n *\n * @url https://tools.ietf.org/html/rfc5545#section-3.8.2.3\n *\n * @name ToDoComponent#dueTime\n * @type {DateTimeValue}\n */\nadvertiseSingleOccurrenceProperty(ToDoComponent.prototype, {\n\tname: 'dueTime',\n\tiCalendarName: 'DUE',\n})\n\n/**\n * The time when a task was completed\n *\n * @url https://tools.ietf.org/html/rfc5545#section-3.8.2.5\n *\n * @name ToDoComponent#duration\n * @type {DurationValue}\n */\nadvertiseSingleOccurrenceProperty(ToDoComponent.prototype, {\n\tname: 'duration',\n})\n\n/**\n * The percentage a task was already fulfilled\n *\n * @url https://tools.ietf.org/html/rfc5545#section-3.8.1.8\n *\n * @name ToDoComponent#percent\n * @type {number}\n */\nadvertiseSingleOccurrenceProperty(ToDoComponent.prototype, {\n\tname: 'percent',\n\tiCalendarName: 'PERCENT-COMPLETE',\n})\n\n/**\n * Description of this task.\n *\n * @url https://tools.ietf.org/html/rfc5545#section-3.8.1.5\n *\n * @name ToDoComponent#description\n * @type {string}\n */\nadvertiseSingleOccurrenceProperty(ToDoComponent.prototype, 'description')\n\n/**\n * Location of this task.\n *\n * @url https://tools.ietf.org/html/rfc5545#section-3.8.1.7\n *\n * @name ToDoComponent#location\n * @type {string}\n */\nadvertiseSingleOccurrenceProperty(ToDoComponent.prototype, 'location')\n\n/**\n * Priority of this task.\n *\n * @url https://tools.ietf.org/html/rfc5545#section-3.8.1.9\n *\n * @name ToDoComponent#priority\n * @type {string}\n */\nadvertiseSingleOccurrenceProperty(ToDoComponent.prototype, {\n\tname: 'priority',\n\tallowedValues: Array.from(Array(10).keys()),\n\tdefaultValue: 0,\n\tunknownValue: 0,\n})\n\n/**\n * Returns an iterator over all resources\n * If the parameter lang is given, it will only\n * return an iterator for Resources matching that language\n *\n * @url https://tools.ietf.org/html/rfc5545#section-3.8.1.10\n *\n * @name ToDoComponent#getResourceIterator\n * @function\n * @param {string=} lang\n * @return {IterableIterator<string>}\n */\n\n/**\n * Returns a list of all resources\n * If the parameter lang is given, it will only\n * return an iterator for resources matching that language\n *\n * @url https://tools.ietf.org/html/rfc5545#section-3.8.1.10\n *\n * @name ToDoComponent#getResourceList\n * @function\n * @param {string=} lang\n * @return {string[]}\n */\n\n/**\n * Adds a resource\n *\n * @url https://tools.ietf.org/html/rfc5545#section-3.8.1.10\n *\n * @name ToDoComponent#addResource\n * @function\n * @param {string} resource\n * @param {string=} lang\n */\n\n/**\n * Removes a resource\n *\n * @url https://tools.ietf.org/html/rfc5545#section-3.8.1.10\n *\n * @name ToDoComponent#removeResource\n * @function\n * @param {string} resource\n * @param {string=} lang\n */\n\n/**\n * Removes all resources from this task\n *\n * @url https://tools.ietf.org/html/rfc5545#section-3.8.1.10\n *\n * @name ToDoComponent#clearAllResources\n * @function\n * @param {string=} lang\n */\nadvertiseMultiValueStringPropertySeparatedByLang(ToDoComponent.prototype, {\n\tname: 'resource',\n\tiCalendarName: 'RESOURCES',\n})\n\n/**\n * Gets an iterator over all conference properties\n *\n * @url https://tools.ietf.org/html/rfc7986#section-5.11\n *\n * @name ToDoComponent#getConferenceIterator\n * @function\n * @return {IterableIterator<ConferenceProperty>}\n */\n\n/**\n * Gets a list of all conference properties\n *\n * @url https://tools.ietf.org/html/rfc7986#section-5.11\n *\n * @name ToDoComponent#getConferenceList\n * @function\n * @return {ConferenceProperty[]}\n */\n\n/**\n * Removes a conference from this event\n *\n * @url https://tools.ietf.org/html/rfc7986#section-5.11\n *\n * @name ToDoComponent#removeConference\n * @function\n * @param {ConferenceProperty} conference\n */\n\n/**\n * Removes all conferences from this event\n *\n * @url https://tools.ietf.org/html/rfc7986#section-5.11\n *\n * @name ToDoComponent#clearAllConferences\n * @function\n */\nadvertiseMultipleOccurrenceProperty(ToDoComponent.prototype, 'conference')\n","/**\n * @copyright Copyright (c) 2019 Georg Ehrke\n *\n * @author Georg Ehrke <georg-nextcloud@ehrke.email>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nimport AbstractComponent from '../abstractComponent.js'\nimport EventComponent from './eventComponent.js'\nimport FreeBusyComponent from './freeBusyComponent.js'\nimport JournalComponent from './journalComponent.js'\nimport TimezoneComponent from './timezoneComponent.js'\nimport ToDoComponent from './toDoComponent.js'\nimport { uc } from '../../helpers/stringHelper.js'\n\n/**\n * Gets the constructor for a component name\n * This will only return a constructor for components,\n * that can be used in the root of a calendar-document\n *\n * @param {string} compName Name of the component to get constructor for\n * @return {AbstractComponent|ToDoComponent|JournalComponent|FreeBusyComponent|TimezoneComponent|EventComponent}\n */\nexport function getConstructorForComponentName(compName) {\n\tswitch (uc(compName)) {\n\tcase 'VEVENT':\n\t\treturn EventComponent\n\n\tcase 'VFREEBUSY':\n\t\treturn FreeBusyComponent\n\n\tcase 'VJOURNAL':\n\t\treturn JournalComponent\n\n\tcase 'VTIMEZONE':\n\t\treturn TimezoneComponent\n\n\tcase 'VTODO':\n\t\treturn ToDoComponent\n\n\tdefault:\n\t\treturn AbstractComponent\n\t}\n}\n","/**\n * @copyright Copyright (c) 2019 Georg Ehrke\n *\n * @author Georg Ehrke <georg-nextcloud@ehrke.email>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nimport AbstractComponent, {\n\tadvertiseSingleOccurrenceProperty,\n} from './abstractComponent.js'\nimport { getConstructorForComponentName } from './root/index.js'\nimport { getConfig } from '../config.js'\nimport ICAL from 'ical.js'\n\n/**\n * This class represents one VCALENDAR block\n *\n * @url https://tools.ietf.org/html/rfc5545#section-3.4\n */\nexport default class CalendarComponent extends AbstractComponent {\n\n\t/**\n\t * Constructor\n\t *\n\t * @inheritDoc\n\t */\n\tconstructor(name = 'VCALENDAR', properties = [], components = []) {\n\t\tsuper(name, properties, components)\n\t\tthis.root = this\n\t\tthis.parent = null\n\t}\n\n\t/**\n\t * Gets an iterator over all VTIMEZONE components\n\t */\n\t* getTimezoneIterator() {\n\t\tyield * this.getComponentIterator('vtimezone')\n\t}\n\n\t/**\n\t * Gets an iterator over all VObject components\n\t */\n\t* getVObjectIterator() {\n\t\tyield * this.getEventIterator()\n\t\tyield * this.getJournalIterator()\n\t\tyield * this.getTodoIterator()\n\t}\n\n\t/**\n\t * Gets an iterator over all VEVENT components\n\t */\n\t* getEventIterator() {\n\t\tyield * this.getComponentIterator('vevent')\n\t}\n\n\t/**\n\t * Gets an iterator over all VFREEBUSY components\n\t */\n\t* getFreebusyIterator() {\n\t\tyield * this.getComponentIterator('vfreebusy')\n\t}\n\n\t/**\n\t * Gets an iterator over all VJOURNAL components\n\t */\n\t* getJournalIterator() {\n\t\tyield * this.getComponentIterator('vjournal')\n\t}\n\n\t/**\n\t * Gets an iterator over all VTODO components\n\t */\n\t* getTodoIterator() {\n\t\tyield * this.getComponentIterator('vtodo')\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tstatic _getConstructorForComponentName(componentName) {\n\t\treturn getConstructorForComponentName(componentName)\n\t}\n\n\t/**\n\t * Converts this calendar component into text/calendar\n\t *\n\t * @param {boolean} cleanUpTimezones Whether or not to clean up timezone data\n\t * @return {string}\n\t */\n\ttoICS(cleanUpTimezones = true) {\n\t\tfor (const vObject of this.getVObjectIterator()) {\n\t\t\tvObject.undirtify()\n\t\t}\n\n\t\tconst icalRoot = this.toICALJs()\n\t\tif (cleanUpTimezones) {\n\t\t\tICAL.helpers.updateTimezones(icalRoot)\n\t\t}\n\t\treturn icalRoot.toString()\n\t}\n\n\t/**\n\t * Creates a new empty calendar-component\n\t *\n\t * @param {[string][]=} additionalProps Additional props to add to empty calendar-document\n\t * @return {CalendarComponent}\n\t */\n\tstatic fromEmpty(additionalProps = []) {\n\t\treturn new this('VCALENDAR', [\n\t\t\t['prodid', getConfig('PRODID', '-//IDN georgehrke.com//calendar-js//EN')],\n\t\t\t['calscale', 'GREGORIAN'],\n\t\t\t['version', '2.0'],\n\t\t].concat(additionalProps))\n\t}\n\n\t/**\n\t * Creates a new calendar-component with a method\n\t *\n\t * @param {string} method The method for the calendar-document\n\t * @return {CalendarComponent}\n\t */\n\tstatic fromMethod(method) {\n\t\treturn this.fromEmpty([['method', method]])\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tstatic fromICALJs(icalValue) {\n\t\tconst comp = super.fromICALJs(icalValue)\n\t\tcomp.root = comp\n\n\t\treturn comp\n\t}\n\n}\n\n/**\n * ProductId representing the software that created this calendar-document\n *\n * @url https://tools.ietf.org/html/rfc5545#section-3.7.3\n *\n * @name CalendarComponent#productId\n * @type {string}\n */\nadvertiseSingleOccurrenceProperty(CalendarComponent.prototype, {\n\tname: 'productId',\n\tiCalendarName: 'PRODID',\n})\n\n/**\n * iCalendar version of this calendar-document\n * minver and maxver parameters are not supported, since they\n * are virtually used by no calendaring-software\n *\n * @url https://tools.ietf.org/html/rfc5545#section-3.7.4\n *\n * @name CalendarComponent#version\n * @type {string}\n */\n\nadvertiseSingleOccurrenceProperty(CalendarComponent.prototype, {\n\tname: 'version',\n})\n\n/**\n * Calendar-scale used in this calendar-document\n * The default and only supported calendar-scale is GREGORIAN.\n * There is an iCalendar-extension about non-gregorian RRULES,\n * but that is not supported by calendar-js at the moment\n *\n * @see https://tools.ietf.org/html/rfc7529\n *\n * @url https://tools.ietf.org/html/rfc5545#section-3.7.1\n *\n * @name CalendarComponent#calendarScale\n * @type {string}\n * @default \"GREGORIAN\"\n */\nadvertiseSingleOccurrenceProperty(CalendarComponent.prototype, {\n\tname: 'calendarScale',\n\tiCalendarName: 'CALSCALE',\n\tdefaultValue: 'GREGORIAN',\n})\n\n/**\n * Method of this calendar-document when being used in an iTIP message\n * Please see https://tools.ietf.org/html/rfc5546#section-3.2 for more information\n *\n * @url https://tools.ietf.org/html/rfc5545#section-3.7.2\n *\n * @name CalendarComponent#method\n * @type {string}\n */\nadvertiseSingleOccurrenceProperty(CalendarComponent.prototype, {\n\tname: 'method',\n})\n","/**\n * @copyright Copyright (c) 2019 Georg Ehrke\n *\n * @author Georg Ehrke <georg-nextcloud@ehrke.email>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\n\n/**\n * @class AbstractRepairStep\n * @classdesc A repair step is used to fix calendar-data before it is parsed\n */\nexport default class AbstractRepairStep {\n\n\t/**\n\t * @class\n\t */\n\tconstructor() {\n\t\tif (new.target === AbstractRepairStep) {\n\t\t\tthrow new TypeError('Cannot instantiate abstract class AbstractRepairStep')\n\t\t}\n\t}\n\n\t/**\n\t * @param {string} input String representation of the data to repair\n\t */\n\trepair(input) {\n\t\tthrow new TypeError('Abstract method not implemented by subclass')\n\t}\n\n\t/**\n\t * @return {number}\n\t */\n\tstatic priority() {\n\t\treturn 0\n\t}\n\n}\n","/**\n * @copyright Copyright (c) 2019 Georg Ehrke\n *\n * @author Georg Ehrke <georg-nextcloud@ehrke.email>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nimport AbstractRepairStep from '../abstractRepairStep.js'\nimport { randomUUID } from '../../../helpers/cryptoHelper.js'\n\n/**\n * @class ICalendarAddMissingUIDRepairStep\n */\nexport default class ICalendarAddMissingUIDRepairStep extends AbstractRepairStep {\n\n\t/**\n\t * Please see the corresponding test file for an example of broken calendar-data\n\t *\n\t * @inheritDoc\n\t */\n\trepair(ics) {\n\t\treturn ics\n\t\t\t.replace(/^BEGIN:(VEVENT|VTODO|VJOURNAL)$(((?!^END:(VEVENT|VTODO|VJOURNAL)$)(?!^UID.*$)(.|\\n))*)^END:(VEVENT|VTODO|VJOURNAL)$\\n/gm, (match, vobjectName, vObjectBlock) => {\n\t\t\t\treturn 'BEGIN:' + vobjectName + '\\r\\n'\n\t\t\t\t\t+ 'UID:' + randomUUID()\n\t\t\t\t\t+ vObjectBlock\n\t\t\t\t\t+ 'END:' + vobjectName + '\\r\\n'\n\t\t\t})\n\t}\n\n}\n","/**\n * @copyright Copyright (c) 2019 Georg Ehrke\n *\n * @author Georg Ehrke <georg-nextcloud@ehrke.email>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nimport AbstractRepairStep from '../abstractRepairStep.js'\n\n/**\n * @class ICalendarAddMissingValueDateDoubleColonRepairStep\n */\nexport default class ICalendarAddMissingValueDateDoubleColonRepairStep extends AbstractRepairStep {\n\n\t/**\n\t * Please see the corresponding test file for an example of broken calendar-data\n\t *\n\t * @inheritDoc\n\t */\n\trepair(ics) {\n\t\treturn ics\n\t\t\t.replace(/^(DTSTART|DTEND)(.*):([0-9]{8})T(::)$/gm, (match, propName, parameters, date) => {\n\t\t\t\treturn propName + ';VALUE=DATE:' + date\n\t\t\t})\n\t}\n\n}\n","/**\n * @copyright Copyright (c) 2019 Georg Ehrke\n *\n * @author Georg Ehrke <georg-nextcloud@ehrke.email>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nimport AbstractRepairStep from '../abstractRepairStep.js'\n\n/**\n * @class ICalendarAddMissingValueDateRepairStep\n */\nexport default class ICalendarAddMissingValueDateRepairStep extends AbstractRepairStep {\n\n\t/**\n\t * Please see the corresponding test file for an example of broken calendar-data\n\t *\n\t * @inheritDoc\n\t */\n\trepair(ics) {\n\t\treturn ics\n\t\t\t.replace(/^(DTSTART|DTEND|EXDATE)(((?!VALUE=DATE).)*):([0-9]{8})$/gm, (match, propName, parameters, _, date) => {\n\t\t\t\treturn propName + parameters + ';VALUE=DATE:' + date\n\t\t\t})\n\t}\n\n}\n","/**\n * @copyright Copyright (c) 2019 Georg Ehrke\n *\n * @author Georg Ehrke <georg-nextcloud@ehrke.email>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nimport AbstractRepairStep from '../abstractRepairStep.js'\n\n/**\n * @class ICalendarEmptyTriggerRepairStep\n * @classdesc This repair step fixes malformed TRIGGER properties\n */\nexport default class ICalendarEmptyTriggerRepairStep extends AbstractRepairStep {\n\n\t/**\n\t * Please see the corresponding test file for an example of broken calendar-data\n\t *\n\t * @inheritDoc\n\t */\n\trepair(ics) {\n\t\treturn ics\n\t\t\t.replace(/^TRIGGER(:|;.*)-P$/gm, 'TRIGGER$1P0D')\n\t\t\t.replace(/^TRIGGER(:|;.*)P$/gm, 'TRIGGER$1P0D')\n\t}\n\n}\n","/**\n * @copyright Copyright (c) 2020 Georg Ehrke\n *\n * @author Georg Ehrke <georg-nextcloud@ehrke.email>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nimport AbstractRepairStep from '../abstractRepairStep.js'\n\nexport default class ICalendarIllegalCreatedRepairStep extends AbstractRepairStep {\n\n\t/**\n\t * Please see the corresponding test file for an example of broken calendar-data\n\t *\n\t * @inheritDoc\n\t */\n\trepair(ics) {\n\t\treturn ics\n\t\t\t.replace(/^CREATED:00001231T000000Z$/gm, 'CREATED:19700101T000000Z')\n\t}\n\n}\n","/**\n * @copyright Copyright (c) 2019 Georg Ehrke\n *\n * @author Georg Ehrke <georg-nextcloud@ehrke.email>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nimport AbstractRepairStep from '../abstractRepairStep.js'\nimport { uc } from '../../../helpers/stringHelper.js'\n\n/**\n * @class ICalendarMultipleVCalendarBlocksRepairStep\n * @classdesc This repair step merges multiple BEGIN:VCALENDAR...END:VCALENDAR blocks\n */\nexport default class ICalendarMultipleVCalendarBlocksRepairStep extends AbstractRepairStep {\n\n\t/**\n\t * Please see the corresponding test file for an example of broken calendar-data\n\t *\n\t * @inheritDoc\n\t */\n\trepair(ics) {\n\t\tlet containsProdId = false\n\t\tlet containsVersion = false\n\t\tlet containsCalscale = false\n\t\tconst includedTimezones = new Set()\n\n\t\treturn ics\n\t\t\t.replace(/^END:VCALENDAR$(((?!^BEGIN:)(.|\\n))*)^BEGIN:VCALENDAR$\\n/gm, '')\n\t\t\t.replace(/^PRODID:(.*)$\\n/gm, (match) => {\n\t\t\t\tif (containsProdId) {\n\t\t\t\t\treturn ''\n\t\t\t\t}\n\n\t\t\t\tcontainsProdId = true\n\t\t\t\treturn match\n\t\t\t})\n\t\t\t.replace(/^VERSION:(.*)$\\n/gm, (match) => {\n\t\t\t\tif (containsVersion) {\n\t\t\t\t\treturn ''\n\t\t\t\t}\n\n\t\t\t\tcontainsVersion = true\n\t\t\t\treturn match\n\t\t\t})\n\t\t\t.replace(/^CALSCALE:(.*)$\\n/gm, (match) => {\n\t\t\t\tif (containsCalscale) {\n\t\t\t\t\treturn ''\n\t\t\t\t}\n\n\t\t\t\tcontainsCalscale = true\n\t\t\t\treturn match\n\t\t\t})\n\t\t\t.replace(/^BEGIN:VTIMEZONE$(((?!^END:VTIMEZONE$)(.|\\n))*)^END:VTIMEZONE$\\n/gm, (match) => {\n\t\t\t\tconst tzidMatcher = match.match(/^TZID:(.*)$/gm)\n\n\t\t\t\t// If this Timezone definition contains no TZID for some reason,\n\t\t\t\t// just remove it, because we can't use it anyway\n\t\t\t\tif (tzidMatcher === null) {\n\t\t\t\t\treturn ''\n\t\t\t\t}\n\n\t\t\t\tconst tzid = uc(tzidMatcher[0].slice(5))\n\t\t\t\tif (includedTimezones.has(tzid)) {\n\t\t\t\t\t// If we already included this timezone, just skip\n\t\t\t\t\treturn ''\n\t\t\t\t}\n\n\t\t\t\tincludedTimezones.add(tzid)\n\t\t\t\treturn match\n\t\t\t})\n\t}\n\n}\n","/**\n * @copyright Copyright (c) 2019 Georg Ehrke\n *\n * @author Georg Ehrke <georg-nextcloud@ehrke.email>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nimport AbstractRepairStep from '../abstractRepairStep.js'\n\n/**\n * @class ICalendarRemoveXNCGroupIdRepairStep\n * @classdesc This repair step removes the X-NC-GroupID parameter used in previous versions of Nextcloud\n */\nexport default class ICalendarRemoveXNCGroupIdRepairStep extends AbstractRepairStep {\n\n\t/**\n\t * Please see the corresponding test file for an example of broken calendar-data\n\t *\n\t * @inheritDoc\n\t */\n\trepair(ics) {\n\t\treturn ics\n\t\t\t.replace(/(^.*)(;X-NC-GROUP-ID=\\d+)(:.*$)/gm, '$1$3')\n\t}\n\n}\n","/**\n * @copyright Copyright (c) 2024 Sanskar Soni\n *\n * @author Sanskar Soni <sanskarsoni300@gmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nimport AbstractRepairStep from '../abstractRepairStep.js'\n\n/**\n * @class ICalendarRemoveUnicodeSpecialNoncharactersRepairStep\n * @classdesc This repair step removes Unicode specials non-characters i.e. U+FFFE & U+FFFF\n */\nexport default class ICalendarRemoveUnicodeSpecialNoncharactersRepairStep extends AbstractRepairStep {\n\n\t/**\n\t * Please see the corresponding test file for an example of broken calendar-data\n\t *\n\t * @inheritDoc\n\t */\n\trepair(ics) {\n\t\treturn ics\n\t\t\t.replace(/(\\uFFFF|\\uFFFE)/g, '')\n\t}\n\n}\n","/**\n * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport AbstractRepairStep from '../abstractRepairStep.js'\n\nexport default class ICalendarConvertInvalidDateTimeValuesRepairStep extends AbstractRepairStep {\n\n\t/**\n\t * Please see the corresponding test files for an example of broken calendar-data\n\t *\n\t * @inheritDoc\n\t */\n\trepair(ics) {\n\t\treturn ics\n\t\t\t.replace(/^(CREATED|LAST-MODIFIED|DTSTAMP):([0-9]+)$/gm, '$1:$2T000000Z')\n\t}\n\n}\n","/**\n * @copyright Copyright (c) 2019 Georg Ehrke\n *\n * @author Georg Ehrke <georg-nextcloud@ehrke.email>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nimport ICalendarAddMissingUIDRepairStep from './icalendarAddMissingUIDRepairStep.js'\nimport ICalendarAddMissingValueDateDoubleColonRepairStep from './icalendarAddMissingValueDateDoubleColonRepairStep.js'\nimport ICalendarAddMissingValueDateRepairStep from './icalendarAddMissingValueDateRepairStep.js'\nimport ICalendarEmptyTriggerRepairStep from './icalendarEmptyTriggerRepairStep.js'\nimport ICalendarIllegalCreatedRepairStep from './icalendarIllegalCreatedRepairStep.js'\nimport ICalendarMultipleVCalendarBlocksRepairStep from './icalendarMultipleVCalendarBlocksRepairStep.js'\nimport ICalendarRemoveXNCGroupIdRepairStep from './icalendarRemoveXNCGroupIdRepairStep.js'\nimport ICalendarRemoveUnicodeSpecialNoncharactersRepairStep from './icalendarRemoveUnicodeSpecialNoncharactersRepairStep.js'\nimport ICalendarConvertInvalidDateTimeValuesRepairStep from './icalendarConvertInvalidDateTimeValuesRepairStep.js'\n\n/**\n * Get an iterator over all repair steps for iCalendar documents\n */\nexport function * getRepairSteps() {\n\tyield ICalendarAddMissingUIDRepairStep\n\tyield ICalendarAddMissingValueDateDoubleColonRepairStep\n\tyield ICalendarAddMissingValueDateRepairStep\n\tyield ICalendarEmptyTriggerRepairStep\n\tyield ICalendarIllegalCreatedRepairStep\n\tyield ICalendarMultipleVCalendarBlocksRepairStep\n\tyield ICalendarRemoveXNCGroupIdRepairStep\n\tyield ICalendarRemoveUnicodeSpecialNoncharactersRepairStep\n\tyield ICalendarConvertInvalidDateTimeValuesRepairStep\n}\n","/**\n * @copyright Copyright (c) 2019 Georg Ehrke\n *\n * @author Georg Ehrke <georg-nextcloud@ehrke.email>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nimport AbstractParser from './abstractParser.js'\nimport CalendarComponent from '../components/calendarComponent.js'\nimport { getRepairSteps } from './repairsteps/icalendar/index.js'\nimport { uc } from '../helpers/stringHelper.js'\nimport { getConstructorForComponentName } from '../components/root/index.js'\nimport { getTimezoneManager, Timezone } from '@nextcloud/timezones'\nimport RecurrenceManager from '../recurrence/recurrenceManager.js'\nimport DateTimeValue from '../values/dateTimeValue.js'\nimport ICAL from 'ical.js'\nimport TimezoneComponent from '../components/root/timezoneComponent.js'\n\n/**\n * @class ICalendarParser\n * @classdesc\n */\nexport default class ICalendarParser extends AbstractParser {\n\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor(...args) {\n\t\tsuper(...args)\n\n\t\t/**\n\t\t * The raw text/calendar data\n\t\t *\n\t\t * @type {string}\n\t\t * @protected\n\t\t */\n\t\tthis._rawData = null\n\n\t\t/**\n\t\t * The CalendarComponent representing the raw data\n\t\t *\n\t\t * @type {CalendarComponent}\n\t\t * @protected\n\t\t */\n\t\tthis._calendarComponent = null\n\n\t\t/**\n\t\t * A flag whether this calendar-data contains vevents\n\t\t *\n\t\t * @type {boolean}\n\t\t * @private\n\t\t */\n\t\tthis._containsVEvents = false\n\n\t\t/**\n\t\t * A flag whether this calendar-data contains vjournals\n\t\t *\n\t\t * @type {boolean}\n\t\t * @private\n\t\t */\n\t\tthis._containsVJournals = false\n\n\t\t/**\n\t\t * A flag whether this calendar-data contains vtodos\n\t\t *\n\t\t * @type {boolean}\n\t\t * @private\n\t\t */\n\t\tthis._containsVTodos = false\n\n\t\t/**\n\t\t * A flag whether this calendar-data contains vfreebusy\n\t\t *\n\t\t * @type {boolean}\n\t\t * @private\n\t\t */\n\t\tthis._containsVFreeBusy = false\n\n\t\t/**\n\t\t * A map containing all VObjects.\n\t\t * The key of this map is the UID\n\t\t * The value an array of all VObjects with that particular UID\n\t\t *\n\t\t * @type {Map<string, AbstractRecurringComponent[]>}\n\t\t * @private\n\t\t */\n\t\tthis._items = new Map()\n\n\t\t/**\n\t\t * Items that are no recurrence-exceptions\n\t\t * The key of this map is the UID\n\t\t *\n\t\t * @type {Map<string, AbstractRecurringComponent>}\n\t\t * @private\n\t\t */\n\t\tthis._masterItems = new Map()\n\n\t\t/**\n\t\t * Items that are recurrence exceptions\n\t\t *\n\t\t * @type {Map<string, AbstractRecurringComponent[]>}\n\t\t * @private\n\t\t */\n\t\tthis._recurrenceExceptionItems = new Map()\n\n\t\t/**\n\t\t * Some recurrence-exceptions come without a master item\n\t\t * In that case we need to forge a master item\n\t\t *\n\t\t * @type {Map<string, AbstractRecurringComponent>}\n\t\t * @private\n\t\t */\n\t\tthis._forgedMasterItems = new Map()\n\n\t\t/**\n\t\t * A list of timezone-components found in the calendar-data\n\t\t *\n\t\t * @type {Map<string, Timezone>}\n\t\t * @private\n\t\t */\n\t\tthis._timezones = new Map()\n\n\t\t/**\n\t\t * A set of required timezones for each UID\n\t\t *\n\t\t * @type {Map<string, Set<string>>}\n\t\t * @private\n\t\t */\n\t\tthis._requiredTimezones = new Map()\n\n\t\t/**\n\t\t * Instance of the default timezone-manager\n\t\t *\n\t\t * @type {TimezoneManager}\n\t\t * @private\n\t\t */\n\t\tthis._defaultTimezoneManager = getTimezoneManager()\n\t}\n\n\t/**\n\t * Parses the actual calendar-data\n\t *\n\t * @param {string} ics The icalendar data to parse\n\t */\n\tparse(ics) {\n\t\tthis._rawData = ics\n\n\t\tthis._applyRepairSteps()\n\n\t\t// If a timezone is not inside our TimezoneManager at the time of parsing\n\t\t// the internal zone will be marked as floating inside ICAL.Time\n\t\t// so before we start any actual parsing, we need to extract all timezones\n\t\t// and add them to the TimezoneManager\n\t\tthis._extractTimezones()\n\t\tthis._registerTimezones()\n\n\t\tthis._createCalendarComponent()\n\n\t\tif (this._getOption('extractGlobalProperties', false)) {\n\t\t\tthis._extractProperties()\n\t\t}\n\n\t\tthis._processVObjects()\n\n\t\tif (this._getOption('processFreeBusy', false)) {\n\t\t\tthis._processVFreeBusy()\n\t\t}\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\t* getItemIterator() {\n\t\tfor (const itemList of this._items.values()) {\n\t\t\tconst calendarComp = CalendarComponent.fromEmpty()\n\n\t\t\tif (this._getOption('includeTimezones', false)) {\n\t\t\t\tthis._addRequiredTimezonesToCalendarComp(calendarComp, itemList[0].uid)\n\t\t\t}\n\n\t\t\t// Preserve the original product id, just in case we need special handling for certain clients later on ...\n\t\t\tif (this._calendarComponent.hasProperty('PRODID')) {\n\t\t\t\tcalendarComp.deleteAllProperties('PRODID')\n\t\t\t\tcalendarComp.addProperty(this._calendarComponent.getFirstProperty('PRODID').clone())\n\t\t\t}\n\n\t\t\tif (this._getOption('preserveMethod', false)) {\n\t\t\t\tif (this._calendarComponent.hasProperty('METHOD')) {\n\t\t\t\t\tcalendarComp.deleteAllProperties('METHOD')\n\t\t\t\t\tcalendarComp.addProperty(this._calendarComponent.getFirstProperty('METHOD').clone())\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfor (const item of itemList) {\n\t\t\t\tcalendarComp.addComponent(item)\n\t\t\t}\n\n\t\t\tyield calendarComp\n\t\t}\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tcontainsVEvents() {\n\t\treturn this._containsVEvents\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tcontainsVJournals() {\n\t\treturn this._containsVJournals\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tcontainsVTodos() {\n\t\treturn this._containsVTodos\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tcontainsVFreeBusy() {\n\t\treturn this._containsVFreeBusy\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tgetItemCount() {\n\t\treturn Array.from(this._items.keys()).length\n\t}\n\n\t/**\n\t * Applies all registered repair steps\n\t *\n\t * @private\n\t */\n\t_applyRepairSteps() {\n\t\tfor (const RepairStep of getRepairSteps()) {\n\t\t\tconst step = new RepairStep()\n\t\t\tthis._rawData = step.repair(this._rawData)\n\t\t}\n\t}\n\n\t/**\n\t * Creates a calendar component based upon the repaired data\n\t *\n\t * @private\n\t */\n\t_createCalendarComponent() {\n\t\tconst jCal = ICAL.parse(this._rawData)\n\t\tconst icalComp = new ICAL.Component(jCal)\n\t\tthis._calendarComponent = CalendarComponent.fromICALJs(icalComp)\n\t}\n\n\t/**\n\t * extracts properties\n\t *\n\t * @protected\n\t */\n\t_extractProperties() {\n\t\tthis._extractPropertyAndPutResultIntoVariable(['name', 'x-wr-calname'], '_name')\n\t\tthis._extractPropertyAndPutResultIntoVariable(['color', 'x-apple-calendar-color'], '_color')\n\t\tthis._extractPropertyAndPutResultIntoVariable(['source'], '_sourceURL')\n\t\tthis._extractPropertyAndPutResultIntoVariable(['refresh-interval', 'x-published-ttl'], '_refreshInterval')\n\t\tthis._extractPropertyAndPutResultIntoVariable(['x-wr-timezone'], '_calendarTimezone')\n\t}\n\n\t/**\n\t * Extract a property and writes it into a class property\n\t * names must be an array, it will use the value of the fist\n\t * propertyname it can find\n\t *\n\t * @param {string[]} names The names of the properties to check\n\t * @param {string} variableName The variable name to save it under\n\t * @private\n\t */\n\t_extractPropertyAndPutResultIntoVariable(names, variableName) {\n\t\tfor (const name of names) {\n\t\t\tif (this._calendarComponent.hasProperty(name)) {\n\t\t\t\tthis[variableName] = this._calendarComponent.getFirstPropertyFirstValue(name)\n\t\t\t\treturn\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Extracts timezones from the calendar component\n\t *\n\t * @protected\n\t */\n\t_extractTimezones() {\n\t\tconst matches = this._rawData.match(/^BEGIN:VTIMEZONE$(((?!^END:VTIMEZONE$)(.|\\n))*)^END:VTIMEZONE$\\n/gm)\n\n\t\tif (!matches) {\n\t\t\treturn\n\t\t}\n\n\t\tfor (const match of matches) {\n\t\t\tconst tzidMatcher = match.match(/^TZID:(.*)$/gm)\n\t\t\tif (!tzidMatcher) {\n\t\t\t\tcontinue\n\t\t\t}\n\n\t\t\tconst tzid = tzidMatcher[0].slice(5)\n\t\t\tconst timezone = new Timezone(tzid, match)\n\t\t\tthis._timezones.set(tzid, timezone)\n\t\t}\n\t}\n\n\t/**\n\t * Registers unknown timezones into our timezone-manager\n\t *\n\t * @protected\n\t */\n\t_registerTimezones() {\n\t\tfor (const [tzid, timezone] of this._timezones) {\n\t\t\tif (!this._defaultTimezoneManager.hasTimezoneForId(tzid)) {\n\t\t\t\tthis._defaultTimezoneManager.registerTimezone(timezone)\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Processes the parsed vobjects\n\t *\n\t * @protected\n\t */\n\t_processVObjects() {\n\t\tfor (const vObject of this._calendarComponent.getVObjectIterator()) {\n\t\t\tthis._addItem(vObject)\n\t\t\tthis._markCompTypeAsSeen(vObject.name)\n\t\t\tif (vObject.isRecurrenceException()) {\n\t\t\t\tthis._addRecurrenceException(vObject)\n\t\t\t} else {\n\t\t\t\tvObject.recurrenceManager = new RecurrenceManager(vObject)\n\t\t\t\tthis._masterItems.set(vObject.uid, vObject)\n\t\t\t}\n\n\t\t\tfor (const propertyToCheck of vObject.getPropertyIterator()) {\n\t\t\t\tfor (const value of propertyToCheck.getValueIterator()) {\n\t\t\t\t\tif (value instanceof DateTimeValue && value.timezoneId) {\n\t\t\t\t\t\tthis._addRequiredTimezone(vObject.uid, value.timezoneId)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// TRIGGER is supposed to be stored in UTC only,\n\t\t\t// but not all clients stick to this\n\t\t\tfor (const alarm of vObject.getAlarmIterator()) {\n\t\t\t\tfor (const propertyToCheck of alarm.getPropertyIterator()) {\n\t\t\t\t\tfor (const value of propertyToCheck.getValueIterator()) {\n\t\t\t\t\t\tif (value instanceof DateTimeValue && value.timezoneId) {\n\t\t\t\t\t\t\tthis._addRequiredTimezone(vObject.uid, value.timezoneId)\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (this._getOption('removeRSVPForAttendees', false)) {\n\t\t\t\tfor (const attendee of vObject.getAttendeeIterator()) {\n\t\t\t\t\tattendee.deleteParameter('RSVP')\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfor (const recurrenceExceptionList of this._recurrenceExceptionItems.values()) {\n\t\t\tfor (const recurrenceException of recurrenceExceptionList) {\n\n\t\t\t\t// Check if there is a master item for this recurrence exception\n\t\t\t\t// otherwise we have to forge one\n\t\t\t\tif (!this._masterItems.has(recurrenceException.uid)) {\n\t\t\t\t\tconst constructor = getConstructorForComponentName(recurrenceException.name)\n\t\t\t\t\tconst forgedMaster = new constructor(recurrenceException.name, [\n\t\t\t\t\t\t['UID', recurrenceException.uid],\n\t\t\t\t\t\t['DTSTAMP', recurrenceException.stampTime.clone()],\n\t\t\t\t\t\t['DTSTART', recurrenceException.recurrenceId.clone()],\n\t\t\t\t\t])\n\n\t\t\t\t\tforgedMaster.recurrenceManager = new RecurrenceManager(forgedMaster)\n\n\t\t\t\t\tthis._forgedMasterItems.set(recurrenceException.uid, forgedMaster)\n\t\t\t\t\tthis._masterItems.set(recurrenceException.uid, forgedMaster)\n\t\t\t\t\tthis._addItem(forgedMaster)\n\t\t\t\t} else {\n\t\t\t\t\tconst master = this._masterItems.get(recurrenceException.uid)\n\n\t\t\t\t\t// This should usually not be the case,\n\t\t\t\t\t// only if the calendar-data is seriously broken.\n\t\t\t\t\t// Let's try to handle it anyway by adding it to\n\t\t\t\t\t// forgedMasterItems, we will simply add RDATEs\n\t\t\t\t\t// in the next step to make it recur\n\t\t\t\t\tif (!master.isRecurring()) {\n\t\t\t\t\t\tthis._forgedMasterItems.set(master.uid, master)\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (this._forgedMasterItems.has(recurrenceException.uid)) {\n\t\t\t\t\tconst forgedMaster = this._forgedMasterItems.get(recurrenceException.uid)\n\t\t\t\t\tforgedMaster.recurrenceManager.addRecurrenceDate(false, recurrenceException.recurrenceId.clone())\n\t\t\t\t}\n\n\t\t\t\tconst masterItem = this._masterItems.get(recurrenceException.uid)\n\t\t\t\tmasterItem.recurrenceManager.relateRecurrenceException(recurrenceException)\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Process FreeBusy components\n\t *\n\t * @private\n\t */\n\t_processVFreeBusy() {\n\t\tfor (const vObject of this._calendarComponent.getFreebusyIterator()) {\n\t\t\tthis._addItem(vObject)\n\t\t\tthis._markCompTypeAsSeen(vObject.name)\n\n\t\t\tfor (const propertyToCheck of vObject.getPropertyIterator()) {\n\t\t\t\tfor (const value of propertyToCheck.getValueIterator()) {\n\t\t\t\t\tif (value instanceof DateTimeValue && value.timezoneId) {\n\t\t\t\t\t\tthis._addRequiredTimezone(vObject.uid, value.timezoneId)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t *\n\t * @param {AbstractRecurringComponent} item The recurrence-item to register\n\t * @private\n\t */\n\t_addRecurrenceException(item) {\n\t\tif (this._recurrenceExceptionItems.has(item.uid)) {\n\t\t\tconst arr = this._recurrenceExceptionItems.get(item.uid)\n\t\t\tarr.push(item)\n\t\t} else {\n\t\t\tthis._recurrenceExceptionItems.set(item.uid, [item])\n\t\t}\n\t}\n\n\t/**\n\t *\n\t * @param {AbstractRecurringComponent} item The item to register\n\t * @private\n\t */\n\t_addItem(item) {\n\t\tif (this._items.has(item.uid)) {\n\t\t\tconst arr = this._items.get(item.uid)\n\t\t\tarr.push(item)\n\t\t} else {\n\t\t\tthis._items.set(item.uid, [item])\n\t\t}\n\t}\n\n\t/**\n\t *\n\t * @param {string} uid The uid of the calendar-object\n\t * @param {string} timezoneId The timezoneId required by the object\n\t * @private\n\t */\n\t_addRequiredTimezone(uid, timezoneId) {\n\t\tif (timezoneId === 'UTC' || timezoneId === 'floating' || timezoneId === 'GMT' || timezoneId === 'Z') {\n\t\t\treturn\n\t\t}\n\n\t\tif (this._requiredTimezones.has(uid)) {\n\t\t\tthis._requiredTimezones.get(uid).add(timezoneId)\n\t\t} else {\n\t\t\tconst set = new Set([timezoneId])\n\t\t\tthis._requiredTimezones.set(uid, set)\n\t\t}\n\t}\n\n\t/**\n\t *\n\t * @param {CalendarComponent} calendarComp The calendar-component to add timezones to\n\t * @param {string} uid The UID of the calendar-object\n\t * @private\n\t */\n\t_addRequiredTimezonesToCalendarComp(calendarComp, uid) {\n\t\tif (!this._requiredTimezones.has(uid)) {\n\t\t\treturn\n\t\t}\n\n\t\tfor (const requiredTimezone of this._requiredTimezones.get(uid)) {\n\t\t\tif (!this._defaultTimezoneManager.hasTimezoneForId(requiredTimezone)) {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tconst timezone = this._defaultTimezoneManager.getTimezoneForId(requiredTimezone)\n\t\t\t// Is this an alias?\n\t\t\tif (timezone.timezoneId !== requiredTimezone) {\n\t\t\t\tthis._replaceTimezoneWithAnotherOne(calendarComp, requiredTimezone, timezone.timezoneId)\n\t\t\t}\n\n\t\t\tconst timezoneComponent = TimezoneComponent.fromICALJs(timezone.toICALJs())\n\t\t\tcalendarComp.addComponent(timezoneComponent)\n\t\t}\n\t}\n\n\t/**\n\t * Replaces all occurrences of searchTimezone with replaceTimezone\n\t *\n\t * @param {CalendarComponent} calendarComponent The calendar-component to replace a timezone in\n\t * @param {string} searchTimezone The timezone to replace\n\t * @param {string} replaceTimezone The replacement timezone\n\t * @private\n\t */\n\t_replaceTimezoneWithAnotherOne(calendarComponent, searchTimezone, replaceTimezone) {\n\t\tfor (const vObject of this._calendarComponent.getVObjectIterator()) {\n\t\t\tfor (const propertyToCheck of vObject.getPropertyIterator()) {\n\t\t\t\tfor (const value of propertyToCheck.getValueIterator()) {\n\t\t\t\t\tif (!(value instanceof DateTimeValue)) {\n\t\t\t\t\t\tcontinue\n\t\t\t\t\t}\n\n\t\t\t\t\tif (value.timezoneId === searchTimezone) {\n\t\t\t\t\t\tvalue.silentlyReplaceTimezone(replaceTimezone)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// TRIGGER is supposed to be stored in UTC only,\n\t\t\t// but not all clients stick to this\n\t\t\tfor (const alarm of vObject.getAlarmIterator()) {\n\t\t\t\tfor (const propertyToCheck of alarm.getPropertyIterator()) {\n\t\t\t\t\tfor (const value of propertyToCheck.getValueIterator()) {\n\t\t\t\t\t\tif (!(value instanceof DateTimeValue)) {\n\t\t\t\t\t\t\tcontinue\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (value.timezoneId === searchTimezone) {\n\t\t\t\t\t\t\tvalue.silentlyReplaceTimezone(replaceTimezone)\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Marks a certain component type as seen.\n\t * This is used for\n\t * containsVEvents()\n\t * containsVJournals()\n\t * containsVTodos()\n\t *\n\t * @param {string} compName The name of the visited component\n\t * @private\n\t */\n\t_markCompTypeAsSeen(compName) {\n\t\tswitch (uc(compName)) {\n\t\tcase 'VEVENT':\n\t\t\tthis._containsVEvents = true\n\t\t\tbreak\n\n\t\tcase 'VJOURNAL':\n\t\t\tthis._containsVJournals = true\n\t\t\tbreak\n\n\t\tcase 'VTODO':\n\t\t\tthis._containsVTodos = true\n\t\t\tbreak\n\n\t\tcase 'VFREEBUSY':\n\t\t\tthis._containsVFreeBusy = true\n\t\t\tbreak\n\t\t}\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tstatic getMimeTypes() {\n\t\treturn ['text/calendar']\n\t}\n\n}\n","/**\n * @copyright Copyright (c) 2019 Georg Ehrke\n *\n * @author Georg Ehrke <georg-nextcloud@ehrke.email>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nimport ICalendarParser from './icalendarParser.js'\n\n/**\n * @class ParserManager\n * @classdesc\n */\nexport default class ParserManager {\n\n\t/**\n\t * Constructor\n\t */\n\tconstructor() {\n\n\t\t/**\n\t\t * List of supported parsers\n\t\t *\n\t\t * @type {Function[]}\n\t\t */\n\t\tthis._parsers = []\n\t}\n\n\t/**\n\t * Get a list of all supported file-types\n\t *\n\t * @return {string[]}\n\t */\n\tgetAllSupportedFileTypes() {\n\t\treturn this._parsers.reduce(\n\t\t\t(allFileTypes, parser) => allFileTypes.concat(parser.getMimeTypes()),\n\t\t\t[])\n\t}\n\n\t/**\n\t * Get an instance of a parser for one specific file-type\n\t *\n\t * @param {string} fileType The mime-type to get a parser for\n\t * @param {object=} options Options destructuring object\n\t * @param {boolean=} options.extractGlobalProperties Whether or not to preserve properties from the VCALENDAR component (defaults to false)\n\t * @param {boolean=} options.removeRSVPForAttendees Whether or not to remove RSVP from attendees (defaults to false)\n\t * @param {boolean=} options.includeTimezones Whether or not to include timezones (defaults to false)\n\t * @param {boolean=} options.preserveMethod Whether or not to preserve the iCalendar method (defaults to false)\n\t * @param {boolean=} options.processFreeBusy Whether or not to process VFreeBusy components (defaults to false)\n\t *\n\t * @return {AbstractParser}\n\t */\n\tgetParserForFileType(fileType, options) {\n\t\tconst Parser = this._parsers.find(\n\t\t\t(parser) => parser.getMimeTypes().includes(fileType))\n\n\t\tif (!Parser) {\n\t\t\tthrow new TypeError('Unknown file-type.')\n\t\t}\n\n\t\treturn new Parser(options)\n\t}\n\n\t/**\n\t * Registers a parser\n\t *\n\t * @param {Function} parser The parser to register\n\t */\n\tregisterParser(parser) {\n\t\tthis._parsers.push(parser)\n\t}\n\n}\n\n/**\n * Gets an instance of the ParserManager with all default parsers\n *\n * @return {ParserManager}\n */\nexport function getParserManager() {\n\tconst parserManager = new ParserManager()\n\n\t// We only support iCalendar for now.\n\t// JSON calendar and CSV will be supported soon,\n\t// but require some more work\n\n\tparserManager.registerParser(ICalendarParser)\n\t// parserManager.registerParser(JCalendarParser)\n\t// parserManager.registerParser(CSVParser)\n\n\treturn parserManager\n}\n","/**\n * @copyright Copyright (c) 2019 Georg Ehrke\n *\n * @author Georg Ehrke <georg-nextcloud@ehrke.email>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\n\nexport default class IllegalValueError extends Error {}\n","/**\n * @copyright Copyright (c) 2019 Georg Ehrke\n *\n * @author Georg Ehrke <georg-nextcloud@ehrke.email>\n *\n * @author Richard Steinmetz <richard@steinmetz.cloud>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nimport { getParserManager } from './parsers/parserManager.js'\nimport { randomUUID } from './helpers/cryptoHelper.js'\nimport DateTimeValue from './values/dateTimeValue.js'\nimport { dateFactory } from './factories/dateFactory.js'\nimport CalendarComponent from './components/calendarComponent.js'\nimport EventComponent from './components/root/eventComponent.js'\nimport RecurrenceManager from './recurrence/recurrenceManager.js'\nimport FreeBusyComponent from './components/root/freeBusyComponent.js'\n\n/**\n * parses a single ICS and returns an iterator over all occurrences\n * in a given timeframe\n *\n * @param {string} ics The calendar-data to parse\n * @param {DateTimeValue} start The start of the queried time-range\n * @param {DateTimeValue} end The end of the queried time-range\n */\nexport function * parseICSAndGetAllOccurrencesBetween(ics, start, end) {\n\tconst parserManager = getParserManager()\n\tconst icsParser = parserManager.getParserForFileType('text/calendar')\n\ticsParser.parse(ics)\n\n\tconst objectIterator = icsParser.getItemIterator()\n\tconst calendarComp = objectIterator.next().value\n\tif (calendarComp === undefined) {\n\t\treturn\n\t}\n\n\tconst vObjectIterator = calendarComp.getVObjectIterator()\n\tconst firstVObject = vObjectIterator.next().value\n\tif (firstVObject === undefined) {\n\t\treturn\n\t}\n\n\tyield * firstVObject.recurrenceManager.getAllOccurrencesBetweenIterator(start, end)\n}\n\n/**\n * Creates a new event\n *\n * @param {DateTimeValue} start Start-time of the new event\n * @param {DateTimeValue} end End-time of the new event\n * @return {CalendarComponent}\n */\nexport function createEvent(start, end) {\n\tconst calendar = CalendarComponent.fromEmpty()\n\tconst eventComponent = new EventComponent('VEVENT')\n\n\teventComponent.updatePropertyWithValue('CREATED', DateTimeValue.fromJSDate(dateFactory(), true))\n\teventComponent.updatePropertyWithValue('DTSTAMP', DateTimeValue.fromJSDate(dateFactory(), true))\n\teventComponent.updatePropertyWithValue('LAST-MODIFIED', DateTimeValue.fromJSDate(dateFactory(), true))\n\teventComponent.updatePropertyWithValue('SEQUENCE', 0)\n\teventComponent.updatePropertyWithValue('UID', randomUUID())\n\teventComponent.updatePropertyWithValue('DTSTART', start)\n\teventComponent.updatePropertyWithValue('DTEND', end)\n\n\tcalendar.addComponent(eventComponent)\n\teventComponent.recurrenceManager = new RecurrenceManager(eventComponent)\n\n\treturn calendar\n}\n\n/**\n * Creates a FreeBusy Request to be used on the scheduling outbox\n *\n * @param {DateTimeValue} start The start of the queried time-range\n * @param {DateTimeValue} end The end of the queried time-range\n * @param {AttendeeProperty} organizer The organizer querying information\n * @param {AttendeeProperty[]}attendees The list of attendees to query information for\n * @return {CalendarComponent}\n */\nexport function createFreeBusyRequest(start, end, organizer, attendees) {\n\tconst calendar = CalendarComponent.fromMethod('REQUEST')\n\tconst freeBusyComponent = new FreeBusyComponent('VFREEBUSY')\n\n\tfreeBusyComponent.updatePropertyWithValue('DTSTAMP', DateTimeValue.fromJSDate(dateFactory(), true))\n\tfreeBusyComponent.updatePropertyWithValue('UID', randomUUID())\n\tfreeBusyComponent.updatePropertyWithValue('DTSTART', start.clone().getInUTC())\n\tfreeBusyComponent.updatePropertyWithValue('DTEND', end.clone().getInUTC())\n\tfreeBusyComponent.addProperty(organizer.clone())\n\n\tfor (const attendee of attendees) {\n\t\tconst clonedAttendee = attendee.clone()\n\t\tclonedAttendee.deleteParameter('ROLE')\n\t\tclonedAttendee.deleteParameter('CUTYPE')\n\t\tclonedAttendee.deleteParameter('RSVP')\n\t\tclonedAttendee.deleteParameter('PARTSTAT')\n\t\tclonedAttendee.deleteParameter('REQUEST-STATUS')\n\t\tclonedAttendee.deleteParameter('LANGUAGE')\n\n\t\tfreeBusyComponent.addProperty(clonedAttendee)\n\t}\n\n\tcalendar.addComponent(freeBusyComponent)\n\treturn calendar\n}\n\nexport { setConfig } from './config.js'\nexport { getParserManager }\nexport * from './components/index.js'\nexport * from './errors/index.js'\nexport * from './parameters/index.js'\nexport * from './parsers/index.js'\nexport * from './properties/index.js'\nexport * from './recurrence/index.js'\nexport * from './values/index.js'\n"],"names":["ICAL","dateTimeValue","getConstructorForComponentName","Timezone","getTimezoneManager"],"mappings":";;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;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