1 |
- {"version":3,"file":"workflowengine-workflowengine.mjs","sources":["../apps/workflowengine/src/helpers/api.js","../apps/workflowengine/src/store.js","../apps/workflowengine/src/components/Event.vue","../node_modules/vue-click-outside/index.js","../apps/workflowengine/src/components/Check.vue","../apps/workflowengine/src/components/Operation.vue","../apps/workflowengine/src/components/Rule.vue","../apps/workflowengine/img/workflow-off.svg?raw","../apps/workflowengine/src/components/Workflow.vue","../apps/workflowengine/src/helpers/validators.js","../apps/workflowengine/src/mixins/valueMixin.js","../apps/workflowengine/src/components/Checks/FileMimeType.vue","../apps/workflowengine/src/components/Checks/FileSystemTag.vue","../apps/workflowengine/src/components/Checks/file.js","../apps/workflowengine/src/components/Checks/RequestUserAgent.vue","../node_modules/moment-timezone/moment-timezone.js","../node_modules/moment-timezone/index.js","../apps/workflowengine/src/components/Checks/RequestTime.vue","../apps/workflowengine/src/components/Checks/RequestURL.vue","../apps/workflowengine/src/components/Checks/RequestUserGroup.vue","../apps/workflowengine/src/components/Checks/request.js","../apps/workflowengine/src/components/Checks/index.js","../apps/workflowengine/src/workflowengine.js"],"sourcesContent":["/**\n * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport { loadState } from '@nextcloud/initial-state'\nimport { generateOcsUrl } from '@nextcloud/router'\n\nconst scopeValue = loadState('workflowengine', 'scope') === 0 ? 'global' : 'user'\n\nconst getApiUrl = (url) => {\n\treturn generateOcsUrl('apps/workflowengine/api/v1/workflows/{scopeValue}', { scopeValue }) + url + '?format=json'\n}\n\nexport {\n\tgetApiUrl,\n}\n","/**\n * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport Vue from 'vue'\nimport Vuex, { Store } from 'vuex'\nimport axios from '@nextcloud/axios'\nimport { getApiUrl } from './helpers/api.js'\nimport { confirmPassword } from '@nextcloud/password-confirmation'\nimport '@nextcloud/password-confirmation/dist/style.css'\nimport { loadState } from '@nextcloud/initial-state'\n\nVue.use(Vuex)\n\nconst store = new Store({\n\tstate: {\n\t\trules: [],\n\t\tscope: loadState('workflowengine', 'scope'),\n\t\tappstoreEnabled: loadState('workflowengine', 'appstoreenabled'),\n\t\toperations: loadState('workflowengine', 'operators'),\n\n\t\tplugins: Vue.observable({\n\t\t\tchecks: {},\n\t\t\toperators: {},\n\t\t}),\n\n\t\tentities: loadState('workflowengine', 'entities'),\n\t\tevents: loadState('workflowengine', 'entities')\n\t\t\t.map((entity) => entity.events.map(event => {\n\t\t\t\treturn {\n\t\t\t\t\tid: `${entity.id}::${event.eventName}`,\n\t\t\t\t\tentity,\n\t\t\t\t\t...event,\n\t\t\t\t}\n\t\t\t})).flat(),\n\t\tchecks: loadState('workflowengine', 'checks'),\n\t},\n\tmutations: {\n\t\taddRule(state, rule) {\n\t\t\tstate.rules.push({ ...rule, valid: true })\n\t\t},\n\t\tupdateRule(state, rule) {\n\t\t\tconst index = state.rules.findIndex((item) => rule.id === item.id)\n\t\t\tconst newRule = Object.assign({}, rule)\n\t\t\tVue.set(state.rules, index, newRule)\n\t\t},\n\t\tremoveRule(state, rule) {\n\t\t\tconst index = state.rules.findIndex((item) => rule.id === item.id)\n\t\t\tstate.rules.splice(index, 1)\n\t\t},\n\t\taddPluginCheck(state, plugin) {\n\t\t\tVue.set(state.plugins.checks, plugin.class, plugin)\n\t\t},\n\t\taddPluginOperator(state, plugin) {\n\t\t\tplugin = Object.assign(\n\t\t\t\t{ color: 'var(--color-primary-element)' },\n\t\t\t\tplugin, state.operations[plugin.id] || {})\n\t\t\tif (typeof state.operations[plugin.id] !== 'undefined') {\n\t\t\t\tVue.set(state.operations, plugin.id, plugin)\n\t\t\t}\n\t\t},\n\t},\n\tactions: {\n\t\tasync fetchRules(context) {\n\t\t\tconst { data } = await axios.get(getApiUrl(''))\n\t\t\tObject.values(data.ocs.data).flat().forEach((rule) => {\n\t\t\t\tcontext.commit('addRule', rule)\n\t\t\t})\n\t\t},\n\t\tasync createNewRule(context, rule) {\n\t\t\tawait confirmPassword()\n\t\t\tlet entity = null\n\t\t\tlet events = []\n\t\t\tif (rule.isComplex === false && rule.fixedEntity === '') {\n\t\t\t\tentity = context.state.entities.find((item) => rule.entities && rule.entities[0] === item.id)\n\t\t\t\tentity = entity || Object.values(context.state.entities)[0]\n\t\t\t\tevents = [entity.events[0].eventName]\n\t\t\t}\n\n\t\t\tcontext.commit('addRule', {\n\t\t\t\tid: -(new Date().getTime()),\n\t\t\t\tclass: rule.id,\n\t\t\t\tentity: entity ? entity.id : rule.fixedEntity,\n\t\t\t\tevents,\n\t\t\t\tname: '', // unused in the new ui, there for legacy reasons\n\t\t\t\tchecks: [\n\t\t\t\t\t{ class: null, operator: null, value: '' },\n\t\t\t\t],\n\t\t\t\toperation: rule.operation || '',\n\t\t\t})\n\t\t},\n\t\tupdateRule(context, rule) {\n\t\t\tcontext.commit('updateRule', {\n\t\t\t\t...rule,\n\t\t\t\tevents: typeof rule.events === 'string' ? JSON.parse(rule.events) : rule.events,\n\t\t\t})\n\t\t},\n\t\tremoveRule(context, rule) {\n\t\t\tcontext.commit('removeRule', rule)\n\t\t},\n\t\tasync pushUpdateRule(context, rule) {\n\t\t\tawait confirmPassword()\n\t\t\tlet result\n\t\t\tif (rule.id < 0) {\n\t\t\t\tresult = await axios.post(getApiUrl(''), rule)\n\t\t\t} else {\n\t\t\t\tresult = await axios.put(getApiUrl(`/${rule.id}`), rule)\n\t\t\t}\n\t\t\tVue.set(rule, 'id', result.data.ocs.data.id)\n\t\t\tcontext.commit('updateRule', rule)\n\t\t},\n\t\tasync deleteRule(context, rule) {\n\t\t\tawait confirmPassword()\n\t\t\tawait axios.delete(getApiUrl(`/${rule.id}`))\n\t\t\tcontext.commit('removeRule', rule)\n\t\t},\n\t\tsetValid(context, { rule, valid }) {\n\t\t\trule.valid = valid\n\t\t\tcontext.commit('updateRule', rule)\n\t\t},\n\t},\n\tgetters: {\n\t\tgetRules(state) {\n\t\t\treturn state.rules.filter((rule) => typeof state.operations[rule.class] !== 'undefined').sort((rule1, rule2) => {\n\t\t\t\treturn rule1.id - rule2.id || rule2.class - rule1.class\n\t\t\t})\n\t\t},\n\t\tgetOperationForRule(state) {\n\t\t\treturn (rule) => state.operations[rule.class]\n\t\t},\n\t\tgetEntityForOperation(state) {\n\t\t\treturn (operation) => state.entities.find((entity) => operation.fixedEntity === entity.id)\n\t\t},\n\t\tgetEventsForOperation(state) {\n\t\t\treturn (operation) => state.events\n\t\t},\n\n\t\t/**\n\t\t * Return all available checker plugins for a given entity class\n\t\t *\n\t\t * @param {object} state the store state\n\t\t * @return {Function} the available plugins\n\t\t */\n\t\tgetChecksForEntity(state) {\n\t\t\treturn (entity) => {\n\t\t\t\treturn Object.values(state.checks)\n\t\t\t\t\t.filter((check) => check.supportedEntities.indexOf(entity) > -1 || check.supportedEntities.length === 0)\n\t\t\t\t\t.map((check) => state.plugins.checks[check.id])\n\t\t\t\t\t.reduce((obj, item) => {\n\t\t\t\t\t\tobj[item.class] = item\n\t\t\t\t\t\treturn obj\n\t\t\t\t\t}, {})\n\t\t\t}\n\t\t},\n\t},\n})\n\nexport default store\n","<!--\n - SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n<template>\n\t<div class=\"event\">\n\t\t<div v-if=\"operation.isComplex && operation.fixedEntity !== ''\" class=\"isComplex\">\n\t\t\t<img class=\"option__icon\" :src=\"entity.icon\" alt=\"\">\n\t\t\t<span class=\"option__title option__title_single\">{{ operation.triggerHint }}</span>\n\t\t</div>\n\t\t<NcSelect v-else\n\t\t\t:disabled=\"allEvents.length <= 1\"\n\t\t\t:multiple=\"true\"\n\t\t\t:options=\"allEvents\"\n\t\t\t:value=\"currentEvent\"\n\t\t\t:placeholder=\"placeholderString\"\n\t\t\tclass=\"event__trigger\"\n\t\t\tlabel=\"displayName\"\n\t\t\t@input=\"updateEvent\">\n\t\t\t<template #option=\"option\">\n\t\t\t\t<img class=\"option__icon\" :src=\"option.entity.icon\" alt=\"\">\n\t\t\t\t<span class=\"option__title\">{{ option.displayName }}</span>\n\t\t\t</template>\n\t\t\t<template #selected-option=\"option\">\n\t\t\t\t<img class=\"option__icon\" :src=\"option.entity.icon\" alt=\"\">\n\t\t\t\t<span class=\"option__title\">{{ option.displayName }}</span>\n\t\t\t</template>\n\t\t</NcSelect>\n\t</div>\n</template>\n\n<script>\nimport NcSelect from '@nextcloud/vue/dist/Components/NcSelect.js'\nimport { showWarning } from '@nextcloud/dialogs'\n\nexport default {\n\tname: 'Event',\n\tcomponents: {\n\t\tNcSelect,\n\t},\n\tprops: {\n\t\trule: {\n\t\t\ttype: Object,\n\t\t\trequired: true,\n\t\t},\n\t},\n\tcomputed: {\n\t\tentity() {\n\t\t\treturn this.$store.getters.getEntityForOperation(this.operation)\n\t\t},\n\t\toperation() {\n\t\t\treturn this.$store.getters.getOperationForRule(this.rule)\n\t\t},\n\t\tallEvents() {\n\t\t\treturn this.$store.getters.getEventsForOperation(this.operation)\n\t\t},\n\t\tcurrentEvent() {\n\t\t\treturn this.allEvents.filter(event => event.entity.id === this.rule.entity && this.rule.events.indexOf(event.eventName) !== -1)\n\t\t},\n\t\tplaceholderString() {\n\t\t\t// TRANSLATORS: Users should select a trigger for a workflow action\n\t\t\treturn t('workflowengine', 'Select a trigger')\n\t\t},\n\t},\n\tmethods: {\n\t\tupdateEvent(events) {\n\t\t\tif (events.length === 0) {\n\t\t\t\t// TRANSLATORS: Users must select an event as of \"happening\" or \"incident\" which triggers an action\n\t\t\t\tshowWarning(t('workflowengine', 'At least one event must be selected'))\n\t\t\t\treturn\n\t\t\t}\n\t\t\tconst existingEntity = this.rule.entity\n\t\t\tconst newEntities = events.map(event => event.entity.id).filter((value, index, self) => self.indexOf(value) === index)\n\t\t\tlet newEntity = null\n\t\t\tif (newEntities.length > 1) {\n\t\t\t\tnewEntity = newEntities.filter(entity => entity !== existingEntity)[0]\n\t\t\t} else {\n\t\t\t\tnewEntity = newEntities[0]\n\t\t\t}\n\n\t\t\tthis.$set(this.rule, 'entity', newEntity)\n\t\t\tthis.$set(this.rule, 'events', events.filter(event => event.entity.id === newEntity).map(event => event.eventName))\n\t\t\tthis.$emit('update', this.rule)\n\t\t},\n\t},\n}\n</script>\n\n<style scoped lang=\"scss\">\n\t.event {\n\t\tmargin-bottom: 5px;\n\n\t\t&__trigger {\n\t\t\tmax-width: 550px;\n\t\t}\n\t}\n\t.isComplex {\n\t\timg {\n\t\t\tvertical-align: text-top;\n\t\t}\n\t\tspan {\n\t\t\tpadding-top: 2px;\n\t\t\tdisplay: inline-block;\n\t\t}\n\t}\n\n\t.option__title {\n\t\tmargin-left: 5px;\n\t\tcolor: var(--color-main-text);\n\t}\n\n\t.option__icon {\n\t\twidth: 16px;\n\t\theight: 16px;\n\t\tfilter: var(--background-invert-if-dark);\n\t}\n</style>\n","function validate(binding) {\n if (typeof binding.value !== 'function') {\n console.warn('[Vue-click-outside:] provided expression', binding.expression, 'is not a function.')\n return false\n }\n\n return true\n}\n\nfunction isPopup(popupItem, elements) {\n if (!popupItem || !elements)\n return false\n\n for (var i = 0, len = elements.length; i < len; i++) {\n try {\n if (popupItem.contains(elements[i])) {\n return true\n }\n if (elements[i].contains(popupItem)) {\n return false\n }\n } catch(e) {\n return false\n }\n }\n\n return false\n}\n\nfunction isServer(vNode) {\n return typeof vNode.componentInstance !== 'undefined' && vNode.componentInstance.$isServer\n}\n\nexports = module.exports = {\n bind: function (el, binding, vNode) {\n if (!validate(binding)) return\n\n // Define Handler and cache it on the element\n function handler(e) {\n if (!vNode.context) return\n\n // some components may have related popup item, on which we shall prevent the click outside event handler.\n var elements = e.path || (e.composedPath && e.composedPath())\n elements && elements.length > 0 && elements.unshift(e.target)\n\n if (el.contains(e.target) || isPopup(vNode.context.popupItem, elements)) return\n\n el.__vueClickOutside__.callback(e)\n }\n\n // add Event Listeners\n el.__vueClickOutside__ = {\n handler: handler,\n callback: binding.value\n }\n const clickHandler = 'ontouchstart' in document.documentElement ? 'touchstart' : 'click';\n !isServer(vNode) && document.addEventListener(clickHandler, handler)\n },\n\n update: function (el, binding) {\n if (validate(binding)) el.__vueClickOutside__.callback = binding.value\n },\n\n unbind: function (el, binding, vNode) {\n // Remove Event Listeners\n const clickHandler = 'ontouchstart' in document.documentElement ? 'touchstart' : 'click';\n !isServer(vNode) && el.__vueClickOutside__ && document.removeEventListener(clickHandler, el.__vueClickOutside__.handler)\n delete el.__vueClickOutside__\n }\n}\n","<!--\n - SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n<template>\n\t<div v-click-outside=\"hideDelete\" class=\"check\" @click=\"showDelete\">\n\t\t<NcSelect ref=\"checkSelector\"\n\t\t\tv-model=\"currentOption\"\n\t\t\t:options=\"options\"\n\t\t\tlabel=\"name\"\n\t\t\t:clearable=\"false\"\n\t\t\t:placeholder=\"t('workflowengine', 'Select a filter')\"\n\t\t\t@input=\"updateCheck\" />\n\t\t<NcSelect v-model=\"currentOperator\"\n\t\t\t:disabled=\"!currentOption\"\n\t\t\t:options=\"operators\"\n\t\t\tclass=\"comparator\"\n\t\t\tlabel=\"name\"\n\t\t\t:clearable=\"false\"\n\t\t\t:placeholder=\"t('workflowengine', 'Select a comparator')\"\n\t\t\t@input=\"updateCheck\" />\n\t\t<component :is=\"currentOption.component\"\n\t\t\tv-if=\"currentOperator && currentComponent\"\n\t\t\tv-model=\"check.value\"\n\t\t\t:disabled=\"!currentOption\"\n\t\t\t:check=\"check\"\n\t\t\tclass=\"option\"\n\t\t\t@input=\"updateCheck\"\n\t\t\t@valid=\"(valid=true) && validate()\"\n\t\t\t@invalid=\"!(valid=false) && validate()\" />\n\t\t<input v-else\n\t\t\tv-model=\"check.value\"\n\t\t\ttype=\"text\"\n\t\t\t:class=\"{ invalid: !valid }\"\n\t\t\t:disabled=\"!currentOption\"\n\t\t\t:placeholder=\"valuePlaceholder\"\n\t\t\tclass=\"option\"\n\t\t\t@input=\"updateCheck\">\n\t\t<NcActions v-if=\"deleteVisible || !currentOption\">\n\t\t\t<NcActionButton :title=\"t('workflowengine', 'Remove filter')\" @click=\"$emit('remove')\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<CloseIcon :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t</NcActionButton>\n\t\t</NcActions>\n\t</div>\n</template>\n\n<script>\nimport NcActions from '@nextcloud/vue/dist/Components/NcActions.js'\nimport NcActionButton from '@nextcloud/vue/dist/Components/NcActionButton.js'\nimport NcSelect from '@nextcloud/vue/dist/Components/NcSelect.js'\n\nimport CloseIcon from 'vue-material-design-icons/Close.vue'\n\nimport ClickOutside from 'vue-click-outside'\n\nexport default {\n\tname: 'Check',\n\tcomponents: {\n\t\tNcActionButton,\n\t\tNcActions,\n\t\tNcSelect,\n\n\t\t// Icons\n\t\tCloseIcon,\n\t},\n\tdirectives: {\n\t\tClickOutside,\n\t},\n\tprops: {\n\t\tcheck: {\n\t\t\ttype: Object,\n\t\t\trequired: true,\n\t\t},\n\t\trule: {\n\t\t\ttype: Object,\n\t\t\trequired: true,\n\t\t},\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tdeleteVisible: false,\n\t\t\tcurrentOption: null,\n\t\t\tcurrentOperator: null,\n\t\t\toptions: [],\n\t\t\tvalid: false,\n\t\t}\n\t},\n\tcomputed: {\n\t\tchecks() {\n\t\t\treturn this.$store.getters.getChecksForEntity(this.rule.entity)\n\t\t},\n\t\toperators() {\n\t\t\tif (!this.currentOption) { return [] }\n\t\t\tconst operators = this.checks[this.currentOption.class].operators\n\t\t\tif (typeof operators === 'function') {\n\t\t\t\treturn operators(this.check)\n\t\t\t}\n\t\t\treturn operators\n\t\t},\n\t\tcurrentComponent() {\n\t\t\tif (!this.currentOption) { return [] }\n\t\t\treturn this.checks[this.currentOption.class].component\n\t\t},\n\t\tvaluePlaceholder() {\n\t\t\tif (this.currentOption && this.currentOption.placeholder) {\n\t\t\t\treturn this.currentOption.placeholder(this.check)\n\t\t\t}\n\t\t\treturn ''\n\t\t},\n\t},\n\twatch: {\n\t\t'check.operator'() {\n\t\t\tthis.validate()\n\t\t},\n\t},\n\tmounted() {\n\t\tthis.options = Object.values(this.checks)\n\t\tthis.currentOption = this.checks[this.check.class]\n\t\tthis.currentOperator = this.operators.find((operator) => operator.operator === this.check.operator)\n\n\t\tif (this.check.class === null) {\n\t\t\tthis.$nextTick(() => this.$refs.checkSelector.$el.focus())\n\t\t}\n\t\tthis.validate()\n\t},\n\tmethods: {\n\t\tshowDelete() {\n\t\t\tthis.deleteVisible = true\n\t\t},\n\t\thideDelete() {\n\t\t\tthis.deleteVisible = false\n\t\t},\n\t\tvalidate() {\n\t\t\tthis.valid = true\n\t\t\tif (this.currentOption && this.currentOption.validate) {\n\t\t\t\tthis.valid = !!this.currentOption.validate(this.check)\n\t\t\t}\n\t\t\t// eslint-disable-next-line vue/no-mutating-props\n\t\t\tthis.check.invalid = !this.valid\n\t\t\tthis.$emit('validate', this.valid)\n\t\t},\n\t\tupdateCheck() {\n\t\t\tconst matchingOperator = this.operators.findIndex((operator) => this.check.operator === operator.operator)\n\t\t\tif (this.check.class !== this.currentOption.class || matchingOperator === -1) {\n\t\t\t\tthis.currentOperator = this.operators[0]\n\t\t\t}\n\t\t\t// eslint-disable-next-line vue/no-mutating-props\n\t\t\tthis.check.class = this.currentOption.class\n\t\t\t// eslint-disable-next-line vue/no-mutating-props\n\t\t\tthis.check.operator = this.currentOperator.operator\n\n\t\t\tthis.validate()\n\n\t\t\tthis.$emit('update', this.check)\n\t\t},\n\t},\n}\n</script>\n\n<style scoped lang=\"scss\">\n\t.check {\n\t\tdisplay: flex;\n\t\tflex-wrap: wrap;\n\t\talign-items: flex-start; // to not stretch components vertically\n\t\twidth: 100%;\n\t\tpadding-right: 20px;\n\n\t\t& > *:not(.close) {\n\t\t\twidth: 180px;\n\t\t}\n\t\t& > .comparator {\n\t\t\tmin-width: 200px;\n\t\t\twidth: 200px;\n\t\t}\n\t\t& > .option {\n\t\t\tmin-width: 260px;\n\t\t\twidth: 260px;\n\t\t\tmin-height: 48px;\n\n\t\t\t& > input[type=text] {\n\t\t\t\tmin-height: 48px;\n\t\t\t}\n\t\t}\n\t\t& > .v-select,\n\t\t& > .button-vue,\n\t\t& > input[type=text] {\n\t\t\tmargin-right: 5px;\n\t\t\tmargin-bottom: 5px;\n\t\t}\n\t}\n\tinput[type=text] {\n\t\tmargin: 0;\n\t}\n\t.invalid {\n\t\tborder-color: var(--color-error) !important;\n\t}\n</style>\n","<!--\n - SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n<template>\n\t<div class=\"actions__item\" :class=\"{'colored': colored}\" :style=\"{ backgroundColor: colored ? operation.color : 'transparent' }\">\n\t\t<div class=\"icon\" :class=\"operation.iconClass\" :style=\"{ backgroundImage: operation.iconClass ? '' : `url(${operation.icon})` }\" />\n\t\t<div class=\"actions__item__description\">\n\t\t\t<h3>{{ operation.name }}</h3>\n\t\t\t<small>{{ operation.description }}</small>\n\t\t\t<NcButton v-if=\"colored\">\n\t\t\t\t{{ t('workflowengine', 'Add new flow') }}\n\t\t\t</NcButton>\n\t\t</div>\n\t\t<div class=\"actions__item_options\">\n\t\t\t<slot />\n\t\t</div>\n\t</div>\n</template>\n\n<script>\nimport NcButton from '@nextcloud/vue/dist/Components/NcButton.js'\n\nexport default {\n\tname: 'Operation',\n\tcomponents: {\n\t\tNcButton,\n\t},\n\tprops: {\n\t\toperation: {\n\t\t\ttype: Object,\n\t\t\trequired: true,\n\t\t},\n\t\tcolored: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\t},\n}\n</script>\n\n<style scoped lang=\"scss\">\n\t@import \"./../styles/operation\";\n</style>\n","<!--\n - SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n<template>\n\t<div v-if=\"operation\" class=\"section rule\" :style=\"{ borderLeftColor: operation.color || '' }\">\n\t\t<div class=\"trigger\">\n\t\t\t<p>\n\t\t\t\t<span>{{ t('workflowengine', 'When') }}</span>\n\t\t\t\t<Event :rule=\"rule\" @update=\"updateRule\" />\n\t\t\t</p>\n\t\t\t<p v-for=\"(check, index) in rule.checks\" :key=\"index\">\n\t\t\t\t<span>{{ t('workflowengine', 'and') }}</span>\n\t\t\t\t<Check :check=\"check\"\n\t\t\t\t\t:rule=\"rule\"\n\t\t\t\t\t@update=\"updateRule\"\n\t\t\t\t\t@validate=\"validate\"\n\t\t\t\t\t@remove=\"removeCheck(check)\" />\n\t\t\t</p>\n\t\t\t<p>\n\t\t\t\t<span />\n\t\t\t\t<input v-if=\"lastCheckComplete\"\n\t\t\t\t\ttype=\"button\"\n\t\t\t\t\tclass=\"check--add\"\n\t\t\t\t\t:value=\"t('workflowengine', 'Add a new filter')\"\n\t\t\t\t\t@click=\"onAddFilter\">\n\t\t\t</p>\n\t\t</div>\n\t\t<div class=\"flow-icon icon-confirm\" />\n\t\t<div class=\"action\">\n\t\t\t<Operation :operation=\"operation\" :colored=\"false\">\n\t\t\t\t<component :is=\"operation.options\"\n\t\t\t\t\tv-if=\"operation.options\"\n\t\t\t\t\tv-model=\"rule.operation\"\n\t\t\t\t\t@input=\"updateOperation\" />\n\t\t\t</Operation>\n\t\t\t<div class=\"buttons\">\n\t\t\t\t<NcButton v-if=\"rule.id < -1 || dirty\" @click=\"cancelRule\">\n\t\t\t\t\t{{ t('workflowengine', 'Cancel') }}\n\t\t\t\t</NcButton>\n\t\t\t\t<NcButton v-else-if=\"!dirty\" @click=\"deleteRule\">\n\t\t\t\t\t{{ t('workflowengine', 'Delete') }}\n\t\t\t\t</NcButton>\n\t\t\t\t<NcButton :type=\"ruleStatus.type\"\n\t\t\t\t\t@click=\"saveRule\">\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<component :is=\"ruleStatus.icon\" :size=\"20\" />\n\t\t\t\t\t</template>\n\t\t\t\t\t{{ ruleStatus.title }}\n\t\t\t\t</NcButton>\n\t\t\t</div>\n\t\t\t<p v-if=\"error\" class=\"error-message\">\n\t\t\t\t{{ error }}\n\t\t\t</p>\n\t\t</div>\n\t</div>\n</template>\n\n<script>\nimport Tooltip from '@nextcloud/vue/dist/Directives/Tooltip.js'\nimport NcActions from '@nextcloud/vue/dist/Components/NcActions.js'\nimport NcActionButton from '@nextcloud/vue/dist/Components/NcActionButton.js'\nimport NcButton from '@nextcloud/vue/dist/Components/NcButton.js'\nimport ArrowRight from 'vue-material-design-icons/ArrowRight.vue'\nimport CheckMark from 'vue-material-design-icons/Check.vue'\nimport Close from 'vue-material-design-icons/Close.vue'\n\nimport Event from './Event.vue'\nimport Check from './Check.vue'\nimport Operation from './Operation.vue'\n\nexport default {\n\tname: 'Rule',\n\tcomponents: {\n\t\tArrowRight,\n\t\tCheck,\n\t\tCheckMark,\n\t\tClose,\n\t\tEvent,\n\t\tNcActionButton,\n\t\tNcActions,\n\t\tNcButton,\n\t\tOperation,\n\t},\n\tdirectives: {\n\t\tTooltip,\n\t},\n\tprops: {\n\t\trule: {\n\t\t\ttype: Object,\n\t\t\trequired: true,\n\t\t},\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tediting: false,\n\t\t\tchecks: [],\n\t\t\terror: null,\n\t\t\tdirty: this.rule.id < 0,\n\t\t\toriginalRule: null,\n\t\t}\n\t},\n\tcomputed: {\n\t\toperation() {\n\t\t\treturn this.$store.getters.getOperationForRule(this.rule)\n\t\t},\n\t\truleStatus() {\n\t\t\tif (this.error || !this.rule.valid || this.rule.checks.length === 0 || this.rule.checks.some((check) => check.invalid === true)) {\n\t\t\t\treturn {\n\t\t\t\t\ttitle: t('workflowengine', 'The configuration is invalid'),\n\t\t\t\t\ticon: 'Close',\n\t\t\t\t\ttype: 'warning',\n\t\t\t\t\ttooltip: { placement: 'bottom', show: true, content: this.error },\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!this.dirty) {\n\t\t\t\treturn { title: t('workflowengine', 'Active'), icon: 'CheckMark', type: 'success' }\n\t\t\t}\n\t\t\treturn { title: t('workflowengine', 'Save'), icon: 'ArrowRight', type: 'primary' }\n\n\t\t},\n\t\tlastCheckComplete() {\n\t\t\tconst lastCheck = this.rule.checks[this.rule.checks.length - 1]\n\t\t\treturn typeof lastCheck === 'undefined' || lastCheck.class !== null\n\t\t},\n\t},\n\tmounted() {\n\t\tthis.originalRule = JSON.parse(JSON.stringify(this.rule))\n\t},\n\tmethods: {\n\t\tasync updateOperation(operation) {\n\t\t\tthis.$set(this.rule, 'operation', operation)\n\t\t\tawait this.updateRule()\n\t\t},\n\t\tvalidate(state) {\n\t\t\tthis.error = null\n\t\t\tthis.$store.dispatch('updateRule', this.rule)\n\t\t},\n\t\tupdateRule() {\n\t\t\tif (!this.dirty) {\n\t\t\t\tthis.dirty = true\n\t\t\t}\n\n\t\t\tthis.error = null\n\t\t\tthis.$store.dispatch('updateRule', this.rule)\n\t\t},\n\t\tasync saveRule() {\n\t\t\ttry {\n\t\t\t\tawait this.$store.dispatch('pushUpdateRule', this.rule)\n\t\t\t\tthis.dirty = false\n\t\t\t\tthis.error = null\n\t\t\t\tthis.originalRule = JSON.parse(JSON.stringify(this.rule))\n\t\t\t} catch (e) {\n\t\t\t\tconsole.error('Failed to save operation')\n\t\t\t\tthis.error = e.response.data.ocs.meta.message\n\t\t\t}\n\t\t},\n\t\tasync deleteRule() {\n\t\t\ttry {\n\t\t\t\tawait this.$store.dispatch('deleteRule', this.rule)\n\t\t\t} catch (e) {\n\t\t\t\tconsole.error('Failed to delete operation')\n\t\t\t\tthis.error = e.response.data.ocs.meta.message\n\t\t\t}\n\t\t},\n\t\tcancelRule() {\n\t\t\tif (this.rule.id < 0) {\n\t\t\t\tthis.$store.dispatch('removeRule', this.rule)\n\t\t\t} else {\n\t\t\t\tthis.$store.dispatch('updateRule', this.originalRule)\n\t\t\t\tthis.originalRule = JSON.parse(JSON.stringify(this.rule))\n\t\t\t\tthis.dirty = false\n\t\t\t}\n\t\t},\n\n\t\tasync removeCheck(check) {\n\t\t\tconst index = this.rule.checks.findIndex(item => item === check)\n\t\t\tif (index > -1) {\n\t\t\t\tthis.$delete(this.rule.checks, index)\n\t\t\t}\n\t\t\tthis.$store.dispatch('updateRule', this.rule)\n\t\t},\n\n\t\tonAddFilter() {\n\t\t\t// eslint-disable-next-line vue/no-mutating-props\n\t\t\tthis.rule.checks.push({ class: null, operator: null, value: '' })\n\t\t},\n\t},\n}\n</script>\n\n<style scoped lang=\"scss\">\n\n\t.buttons {\n\t\tdisplay: flex;\n\t\tjustify-content: end;\n\n\t\tbutton {\n\t\t\tmargin-left: 5px;\n\t\t}\n\t\tbutton:last-child{\n\t\t\tmargin-right: 10px;\n\t\t}\n\t}\n\n\t.error-message {\n\t\tfloat: right;\n\t\tmargin-right: 10px;\n\t}\n\n\t.flow-icon {\n\t\twidth: 44px;\n\t}\n\n\t.rule {\n\t\tdisplay: flex;\n\t\tflex-wrap: wrap;\n\t\tborder-left: 5px solid var(--color-primary-element);\n\n\t\t.trigger,\n\t\t.action {\n\t\t\tflex-grow: 1;\n\t\t\tmin-height: 100px;\n\t\t\tmax-width: 920px;\n\t\t}\n\t\t.action {\n\t\t\tmax-width: 400px;\n\t\t\tposition: relative;\n\t\t}\n\t\t.icon-confirm {\n\t\t\tbackground-position: right 27px;\n\t\t\tpadding-right: 20px;\n\t\t\tmargin-right: 20px;\n\t\t}\n\t}\n\t.trigger p, .action p {\n\t\tmin-height: 34px;\n\t\tdisplay: flex;\n\n\t\t& > span {\n\t\t\tmin-width: 50px;\n\t\t\ttext-align: right;\n\t\t\tcolor: var(--color-text-maxcontrast);\n\t\t\tpadding-right: 10px;\n\t\t\tpadding-top: 6px;\n\t\t}\n\t\t.multiselect {\n\t\t\tflex-grow: 1;\n\t\t\tmax-width: 300px;\n\t\t}\n\t}\n\t.trigger p:first-child span {\n\t\t\tpadding-top: 3px;\n\t}\n\t.trigger p:last-child {\n\t\t\tpadding-top: 8px;\n\t}\n\n\t.check--add {\n\t\tbackground-position: 7px center;\n\t\tbackground-color: transparent;\n\t\tpadding-left: 6px;\n\t\tmargin: 0;\n\t\twidth: 180px;\n\t\tborder-radius: var(--border-radius);\n\t\tcolor: var(--color-text-maxcontrast);\n\t\tfont-weight: normal;\n\t\ttext-align: left;\n\t\tfont-size: 1em;\n\t}\n\n\t@media (max-width:1400px) {\n\t\t.rule {\n\t\t\t&, .trigger, .action {\n\t\t\t\twidth: 100%;\n\t\t\t\tmax-width: 100%;\n\t\t\t}\n\t\t\t.flow-icon {\n\t\t\t\tdisplay: none;\n\t\t\t}\n\t\t}\n\t}\n\n</style>\n","export default \"<svg width=\\\"16\\\" height=\\\"16\\\" version=\\\"1.1\\\" viewBox=\\\"0 0 16 16\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\">\\n <path d=\\\"M 3.0839844 3 C 2.0812854 3 1.25 3.8312754 1.25 4.8339844 L 1.25 7 L 1.0136719 7 C -0.33862677 6.980875 -0.33862677 9.0191 1.0136719 9 L 1.25 9 L 1.25 11.166016 C 1.25 12.168715 2.0812754 13 3.0839844 13 L 7.4160156 13 C 8.4187146 13 9.25 12.168725 9.25 11.166016 L 9.25 9 L 10.060547 9 L 7.75 6.6894531 L 7.75 11.166016 C 7.75 11.363655 7.6136554 11.5 7.4160156 11.5 L 3.0839844 11.5 C 2.8863446 11.5 2.75 11.363655 2.75 11.166016 L 2.75 4.8339844 C 2.75 4.6363446 2.8863446 4.5 3.0839844 4.5 L 5.5605469 4.5 L 4.0605469 3 L 3.0839844 3 z M 6.1816406 3 L 9.25 6.0683594 L 9.25 4.8339844 C 9.25 3.8312854 8.4187246 3 7.4160156 3 L 6.1816406 3 z M 11.5 3.5 C 10.602601 3.5 10.159605 4.5908975 10.802734 5.2167969 L 12.585938 7 L 10.181641 7 L 12.181641 9 L 12.585938 9 L 12.382812 9.203125 L 13.796875 10.617188 L 15.707031 8.7070312 C 16.094031 8.3192316 16.098031 7.6841684 15.707031 7.2929688 L 12.216797 3.8027344 C 12.028497 3.6092346 11.77 3.50002 11.5 3.5 z M 11.324219 10.261719 L 10.802734 10.783203 C 9.8211054 11.725712 11.274208 13.178865 12.216797 12.197266 L 12.738281 11.675781 L 11.324219 10.261719 z \\\" />\\n <path d=\\\"M 0,1.0606601 1.06066,0 16.00033,14.93967 14.93967,16.00033 Z\\\" />\\n</svg>\\n\"","<!--\n - SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n<template>\n\t<div id=\"workflowengine\">\n\t\t<NcSettingsSection :name=\"t('workflowengine', 'Available flows')\"\n\t\t\t:doc-url=\"workflowDocUrl\">\n\t\t\t<p v-if=\"isAdminScope\" class=\"settings-hint\">\n\t\t\t\t<a href=\"https://nextcloud.com/developer/\">{{ t('workflowengine', 'For details on how to write your own flow, check out the development documentation.') }}</a>\n\t\t\t</p>\n\n\t\t\t<NcEmptyContent v-if=\"!isUserAdmin && mainOperations.length === 0\"\n\t\t\t\t:name=\"t('workflowengine', 'No flows installed')\"\n\t\t\t\t:description=\"!isUserAdmin ? t('workflowengine', 'Ask your administrator to install new flows.') : undefined\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<NcIconSvgWrapper :svg=\"WorkflowOffSvg\" :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t</NcEmptyContent>\n\t\t\t<transition-group v-else\n\t\t\t\tname=\"slide\"\n\t\t\t\ttag=\"div\"\n\t\t\t\tclass=\"actions\">\n\t\t\t\t<Operation v-for=\"operation in mainOperations\"\n\t\t\t\t\t:key=\"operation.id\"\n\t\t\t\t\t:operation=\"operation\"\n\t\t\t\t\t@click.native=\"createNewRule(operation)\" />\n\t\t\t\t<a v-if=\"showAppStoreHint\"\n\t\t\t\t\tkey=\"add\"\n\t\t\t\t\t:href=\"appstoreUrl\"\n\t\t\t\t\tclass=\"actions__item colored more\">\n\t\t\t\t\t<div class=\"icon icon-add\" />\n\t\t\t\t\t<div class=\"actions__item__description\">\n\t\t\t\t\t\t<h3>{{ t('workflowengine', 'More flows') }}</h3>\n\t\t\t\t\t\t<small>{{ t('workflowengine', 'Browse the App Store') }}</small>\n\t\t\t\t\t</div>\n\t\t\t\t</a>\n\t\t\t</transition-group>\n\n\t\t\t<div v-if=\"hasMoreOperations\" class=\"actions__more\">\n\t\t\t\t<NcButton @click=\"showMoreOperations = !showMoreOperations\">\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<MenuUp v-if=\"showMoreOperations\" :size=\"20\" />\n\t\t\t\t\t\t<MenuDown v-else :size=\"20\" />\n\t\t\t\t\t</template>\n\t\t\t\t\t{{ showMoreOperations ? t('workflowengine', 'Show less') : t('workflowengine', 'Show more') }}\n\t\t\t\t</NcButton>\n\t\t\t</div>\n\t\t</NcSettingsSection>\n\n\t\t<NcSettingsSection v-if=\"mainOperations.length > 0\"\n\t\t\t:name=\"isAdminScope ? t('workflowengine', 'Configured flows') : t('workflowengine', 'Your flows')\">\n\t\t\t<transition-group v-if=\"rules.length > 0\" name=\"slide\">\n\t\t\t\t<Rule v-for=\"rule in rules\" :key=\"rule.id\" :rule=\"rule\" />\n\t\t\t</transition-group>\n\t\t\t<NcEmptyContent v-else :name=\"t('workflowengine', 'No flows configured')\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<NcIconSvgWrapper :svg=\"WorkflowOffSvg\" :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t</NcEmptyContent>\n\t\t</NcSettingsSection>\n\t</div>\n</template>\n\n<script>\nimport Rule from './Rule.vue'\nimport Operation from './Operation.vue'\nimport NcButton from '@nextcloud/vue/dist/Components/NcButton.js'\nimport NcEmptyContent from '@nextcloud/vue/dist/Components/NcEmptyContent.js'\nimport NcIconSvgWrapper from '@nextcloud/vue/dist/Components/NcIconSvgWrapper.js'\nimport NcSettingsSection from '@nextcloud/vue/dist/Components/NcSettingsSection.js'\nimport { mapGetters, mapState } from 'vuex'\nimport { generateUrl } from '@nextcloud/router'\nimport { loadState } from '@nextcloud/initial-state'\nimport MenuUp from 'vue-material-design-icons/MenuUp.vue'\nimport MenuDown from 'vue-material-design-icons/MenuDown.vue'\nimport WorkflowOffSvg from '../../img/workflow-off.svg?raw'\n\nconst ACTION_LIMIT = 3\nconst ADMIN_SCOPE = 0\n// const PERSONAL_SCOPE = 1\n\nexport default {\n\tname: 'Workflow',\n\tcomponents: {\n\t\tMenuDown,\n\t\tMenuUp,\n\t\tNcButton,\n\t\tNcEmptyContent,\n\t\tNcIconSvgWrapper,\n\t\tNcSettingsSection,\n\t\tOperation,\n\t\tRule,\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tshowMoreOperations: false,\n\t\t\tappstoreUrl: generateUrl('settings/apps/workflow'),\n\t\t\tworkflowDocUrl: loadState('workflowengine', 'doc-url'),\n\t\t\tWorkflowOffSvg,\n\t\t}\n\t},\n\tcomputed: {\n\t\t...mapGetters({\n\t\t\trules: 'getRules',\n\t\t}),\n\t\t...mapState({\n\t\t\tappstoreEnabled: 'appstoreEnabled',\n\t\t\tscope: 'scope',\n\t\t\toperations: 'operations',\n\t\t}),\n\t\thasMoreOperations() {\n\t\t\treturn Object.keys(this.operations).length > ACTION_LIMIT\n\t\t},\n\t\tmainOperations() {\n\t\t\tif (this.showMoreOperations) {\n\t\t\t\treturn Object.values(this.operations)\n\t\t\t}\n\t\t\treturn Object.values(this.operations).slice(0, ACTION_LIMIT)\n\t\t},\n\t\tshowAppStoreHint() {\n\t\t\treturn this.appstoreEnabled && OC.isUserAdmin()\n\t\t},\n\t\tisUserAdmin() {\n\t\t\treturn OC.isUserAdmin()\n\t\t},\n\t\tisAdminScope() {\n\t\t\treturn this.scope === ADMIN_SCOPE\n\t\t},\n\t},\n\tmounted() {\n\t\tthis.$store.dispatch('fetchRules')\n\t},\n\tmethods: {\n\t\tcreateNewRule(operation) {\n\t\t\tthis.$store.dispatch('createNewRule', operation)\n\t\t},\n\t},\n}\n</script>\n\n<style scoped lang=\"scss\">\n\t#workflowengine {\n\t\tborder-bottom: 1px solid var(--color-border);\n\t}\n\t.section {\n\t\tmax-width: 100vw;\n\n\t\th2.configured-flows {\n\t\t\tmargin-top: 50px;\n\t\t\tmargin-bottom: 0;\n\t\t}\n\t}\n\t.actions {\n\t\tdisplay: flex;\n\t\tflex-wrap: wrap;\n\t\tmax-width: 1200px;\n\t\t.actions__item {\n\t\t\tmax-width: 280px;\n\t\t\tflex-basis: 250px;\n\t\t}\n\t}\n\t.actions__more {\n\t\tmargin-bottom: 10px;\n\t}\n\n\t.slide-enter-active {\n\t\t-moz-transition-duration: 0.3s;\n\t\t-webkit-transition-duration: 0.3s;\n\t\t-o-transition-duration: 0.3s;\n\t\ttransition-duration: 0.3s;\n\t\t-moz-transition-timing-function: ease-in;\n\t\t-webkit-transition-timing-function: ease-in;\n\t\t-o-transition-timing-function: ease-in;\n\t\ttransition-timing-function: ease-in;\n\t}\n\n\t.slide-leave-active {\n\t\t-moz-transition-duration: 0.3s;\n\t\t-webkit-transition-duration: 0.3s;\n\t\t-o-transition-duration: 0.3s;\n\t\ttransition-duration: 0.3s;\n\t\t-moz-transition-timing-function: cubic-bezier(0, 1, 0.5, 1);\n\t\t-webkit-transition-timing-function: cubic-bezier(0, 1, 0.5, 1);\n\t\t-o-transition-timing-function: cubic-bezier(0, 1, 0.5, 1);\n\t\ttransition-timing-function: cubic-bezier(0, 1, 0.5, 1);\n\t}\n\n\t.slide-enter-to, .slide-leave {\n\t\tmax-height: 500px;\n\t\toverflow: hidden;\n\t}\n\n\t.slide-enter, .slide-leave-to {\n\t\toverflow: hidden;\n\t\tmax-height: 0;\n\t\tpadding-top: 0;\n\t\tpadding-bottom: 0;\n\t}\n\n\t@import \"./../styles/operation\";\n\n\t.actions__item.more {\n\t\tbackground-color: var(--color-background-dark);\n\t}\n</style>\n","/**\n * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nconst regexRegex = /^\\/(.*)\\/([gui]{0,3})$/\nconst regexIPv4 = /^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\/(3[0-2]|[1-2][0-9]|[1-9])$/\nconst regexIPv6 = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\\/(1([01][0-9]|2[0-8])|[1-9][0-9]|[0-9])$/\n\nconst validateRegex = function(string) {\n\tif (!string) {\n\t\treturn false\n\t}\n\treturn regexRegex.exec(string) !== null\n}\n\nconst validateIPv4 = function(string) {\n\tif (!string) {\n\t\treturn false\n\t}\n\treturn regexIPv4.exec(string) !== null\n}\n\nconst validateIPv6 = function(string) {\n\tif (!string) {\n\t\treturn false\n\t}\n\treturn regexIPv6.exec(string) !== null\n}\n\nconst stringValidator = (check) => {\n\tif (check.operator === 'matches' || check.operator === '!matches') {\n\t\treturn validateRegex(check.value)\n\t}\n\treturn true\n}\n\nexport { validateRegex, stringValidator, validateIPv4, validateIPv6 }\n","/**\n * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nconst valueMixin = {\n\tprops: {\n\t\tvalue: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t\tcheck: {\n\t\t\ttype: Object,\n\t\t\tdefault: () => { return {} },\n\t\t},\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tnewValue: '',\n\t\t}\n\t},\n\twatch: {\n\t\tvalue: {\n\t\t\timmediate: true,\n\t\t\thandler(value) {\n\t\t\t\tthis.updateInternalValue(value)\n\t\t\t},\n\t\t},\n\t},\n\tmethods: {\n\t\tupdateInternalValue(value) {\n\t\t\tthis.newValue = value\n\t\t},\n\t},\n}\n\nexport default valueMixin\n","<!--\n - SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n<template>\n\t<div>\n\t\t<NcSelect :value=\"currentValue\"\n\t\t\t:placeholder=\"t('workflowengine', 'Select a file type')\"\n\t\t\tlabel=\"label\"\n\t\t\t:options=\"options\"\n\t\t\t:clearable=\"false\"\n\t\t\t@input=\"setValue\">\n\t\t\t<template #option=\"option\">\n\t\t\t\t<span v-if=\"option.icon\" class=\"option__icon\" :class=\"option.icon\" />\n\t\t\t\t<span v-else class=\"option__icon-img\">\n\t\t\t\t\t<img :src=\"option.iconUrl\" alt=\"\">\n\t\t\t\t</span>\n\t\t\t\t<span class=\"option__title\">\n\t\t\t\t\t<NcEllipsisedOption :name=\"String(option.label)\" />\n\t\t\t\t</span>\n\t\t\t</template>\n\t\t\t<template #selected-option=\"selectedOption\">\n\t\t\t\t<span v-if=\"selectedOption.icon\" class=\"option__icon\" :class=\"selectedOption.icon\" />\n\t\t\t\t<span v-else class=\"option__icon-img\">\n\t\t\t\t\t<img :src=\"selectedOption.iconUrl\" alt=\"\">\n\t\t\t\t</span>\n\t\t\t\t<span class=\"option__title\">\n\t\t\t\t\t<NcEllipsisedOption :name=\"String(selectedOption.label)\" />\n\t\t\t\t</span>\n\t\t\t</template>\n\t\t</NcSelect>\n\t\t<input v-if=\"!isPredefined\"\n\t\t\ttype=\"text\"\n\t\t\t:value=\"currentValue.id\"\n\t\t\t:placeholder=\"t('workflowengine', 'e.g. httpd/unix-directory')\"\n\t\t\t@input=\"updateCustom\">\n\t</div>\n</template>\n\n<script>\nimport NcEllipsisedOption from '@nextcloud/vue/dist/Components/NcEllipsisedOption.js'\nimport NcSelect from '@nextcloud/vue/dist/Components/NcSelect.js'\nimport valueMixin from './../../mixins/valueMixin.js'\nimport { imagePath } from '@nextcloud/router'\n\nexport default {\n\tname: 'FileMimeType',\n\tcomponents: {\n\t\tNcEllipsisedOption,\n\t\tNcSelect,\n\t},\n\tmixins: [\n\t\tvalueMixin,\n\t],\n\tdata() {\n\t\treturn {\n\t\t\tpredefinedTypes: [\n\t\t\t\t{\n\t\t\t\t\ticon: 'icon-folder',\n\t\t\t\t\tlabel: t('workflowengine', 'Folder'),\n\t\t\t\t\tid: 'httpd/unix-directory',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\ticon: 'icon-picture',\n\t\t\t\t\tlabel: t('workflowengine', 'Images'),\n\t\t\t\t\tid: '/image\\\\/.*/',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\ticonUrl: imagePath('core', 'filetypes/x-office-document'),\n\t\t\t\t\tlabel: t('workflowengine', 'Office documents'),\n\t\t\t\t\tid: '/(vnd\\\\.(ms-|openxmlformats-|oasis\\\\.opendocument).*)$/',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\ticonUrl: imagePath('core', 'filetypes/application-pdf'),\n\t\t\t\t\tlabel: t('workflowengine', 'PDF documents'),\n\t\t\t\t\tid: 'application/pdf',\n\t\t\t\t},\n\t\t\t],\n\t\t}\n\t},\n\tcomputed: {\n\t\toptions() {\n\t\t\treturn [...this.predefinedTypes, this.customValue]\n\t\t},\n\t\tisPredefined() {\n\t\t\tconst matchingPredefined = this.predefinedTypes.find((type) => this.newValue === type.id)\n\t\t\tif (matchingPredefined) {\n\t\t\t\treturn true\n\t\t\t}\n\t\t\treturn false\n\t\t},\n\t\tcustomValue() {\n\t\t\treturn {\n\t\t\t\ticon: 'icon-settings-dark',\n\t\t\t\tlabel: t('workflowengine', 'Custom MIME type'),\n\t\t\t\tid: '',\n\t\t\t}\n\t\t},\n\t\tcurrentValue() {\n\t\t\tconst matchingPredefined = this.predefinedTypes.find((type) => this.newValue === type.id)\n\t\t\tif (matchingPredefined) {\n\t\t\t\treturn matchingPredefined\n\t\t\t}\n\t\t\treturn {\n\t\t\t\ticon: 'icon-settings-dark',\n\t\t\t\tlabel: t('workflowengine', 'Custom mimetype'),\n\t\t\t\tid: this.newValue,\n\t\t\t}\n\t\t},\n\t},\n\tmethods: {\n\t\tvalidateRegex(string) {\n\t\t\tconst regexRegex = /^\\/(.*)\\/([gui]{0,3})$/\n\t\t\tconst result = regexRegex.exec(string)\n\t\t\treturn result !== null\n\t\t},\n\t\tsetValue(value) {\n\t\t\tif (value !== null) {\n\t\t\t\tthis.newValue = value.id\n\t\t\t\tthis.$emit('input', this.newValue)\n\t\t\t}\n\t\t},\n\t\tupdateCustom(event) {\n\t\t\tthis.newValue = event.target.value\n\t\t\tthis.$emit('input', this.newValue)\n\t\t},\n\t},\n}\n</script>\n<style scoped lang=\"scss\">\n.v-select,\ninput[type='text'] {\n\twidth: 100%;\n}\n\ninput[type=text] {\n\tmin-height: 48px;\n}\n\n.option__icon,\n.option__icon-img {\n\tdisplay: inline-block;\n\tmin-width: 30px;\n\tbackground-position: center;\n\tvertical-align: middle;\n}\n\n.option__icon-img {\n\ttext-align: center;\n}\n\n.option__title {\n\tdisplay: inline-flex;\n\twidth: calc(100% - 36px);\n\tvertical-align: middle;\n}\n</style>\n","<!--\n - SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n<template>\n\t<NcSelectTags v-model=\"newValue\"\n\t\t:multiple=\"false\"\n\t\t@input=\"update\" />\n</template>\n\n<script>\nimport NcSelectTags from '@nextcloud/vue/dist/Components/NcSelectTags.js'\n\nexport default {\n\tname: 'FileSystemTag',\n\tcomponents: {\n\t\tNcSelectTags,\n\t},\n\tprops: {\n\t\tvalue: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tnewValue: [],\n\t\t}\n\t},\n\twatch: {\n\t\tvalue() {\n\t\t\tthis.updateValue()\n\t\t},\n\t},\n\tbeforeMount() {\n\t\tthis.updateValue()\n\t},\n\tmethods: {\n\t\tupdateValue() {\n\t\t\tif (this.value !== '') {\n\t\t\t\tthis.newValue = parseInt(this.value)\n\t\t\t} else {\n\t\t\t\tthis.newValue = null\n\t\t\t}\n\t\t},\n\t\tupdate() {\n\t\t\tthis.$emit('input', this.newValue || '')\n\t\t},\n\t},\n}\n</script>\n\n<style scoped>\n\n</style>\n","/**\n * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport { stringValidator, validateIPv4, validateIPv6 } from '../../helpers/validators.js'\nimport FileMimeType from './FileMimeType.vue'\nimport FileSystemTag from './FileSystemTag.vue'\n\nconst stringOrRegexOperators = () => {\n\treturn [\n\t\t{ operator: 'matches', name: t('workflowengine', 'matches') },\n\t\t{ operator: '!matches', name: t('workflowengine', 'does not match') },\n\t\t{ operator: 'is', name: t('workflowengine', 'is') },\n\t\t{ operator: '!is', name: t('workflowengine', 'is not') },\n\t]\n}\n\nconst FileChecks = [\n\t{\n\t\tclass: 'OCA\\\\WorkflowEngine\\\\Check\\\\FileName',\n\t\tname: t('workflowengine', 'File name'),\n\t\toperators: stringOrRegexOperators,\n\t\tplaceholder: (check) => {\n\t\t\tif (check.operator === 'matches' || check.operator === '!matches') {\n\t\t\t\treturn '/^dummy-.+$/i'\n\t\t\t}\n\t\t\treturn 'filename.txt'\n\t\t},\n\t\tvalidate: stringValidator,\n\t},\n\n\t{\n\t\tclass: 'OCA\\\\WorkflowEngine\\\\Check\\\\FileMimeType',\n\t\tname: t('workflowengine', 'File MIME type'),\n\t\toperators: stringOrRegexOperators,\n\t\tcomponent: FileMimeType,\n\t},\n\n\t{\n\t\tclass: 'OCA\\\\WorkflowEngine\\\\Check\\\\FileSize',\n\t\tname: t('workflowengine', 'File size (upload)'),\n\t\toperators: [\n\t\t\t{ operator: 'less', name: t('workflowengine', 'less') },\n\t\t\t{ operator: '!greater', name: t('workflowengine', 'less or equals') },\n\t\t\t{ operator: '!less', name: t('workflowengine', 'greater or equals') },\n\t\t\t{ operator: 'greater', name: t('workflowengine', 'greater') },\n\t\t],\n\t\tplaceholder: (check) => '5 MB',\n\t\tvalidate: (check) => check.value ? check.value.match(/^[0-9]+[ ]?[kmgt]?b$/i) !== null : false,\n\t},\n\n\t{\n\t\tclass: 'OCA\\\\WorkflowEngine\\\\Check\\\\RequestRemoteAddress',\n\t\tname: t('workflowengine', 'Request remote address'),\n\t\toperators: [\n\t\t\t{ operator: 'matchesIPv4', name: t('workflowengine', 'matches IPv4') },\n\t\t\t{ operator: '!matchesIPv4', name: t('workflowengine', 'does not match IPv4') },\n\t\t\t{ operator: 'matchesIPv6', name: t('workflowengine', 'matches IPv6') },\n\t\t\t{ operator: '!matchesIPv6', name: t('workflowengine', 'does not match IPv6') },\n\t\t],\n\t\tplaceholder: (check) => {\n\t\t\tif (check.operator === 'matchesIPv6' || check.operator === '!matchesIPv6') {\n\t\t\t\treturn '::1/128'\n\t\t\t}\n\t\t\treturn '127.0.0.1/32'\n\t\t},\n\t\tvalidate: (check) => {\n\t\t\tif (check.operator === 'matchesIPv6' || check.operator === '!matchesIPv6') {\n\t\t\t\treturn validateIPv6(check.value)\n\t\t\t}\n\t\t\treturn validateIPv4(check.value)\n\t\t},\n\t},\n\n\t{\n\t\tclass: 'OCA\\\\WorkflowEngine\\\\Check\\\\FileSystemTags',\n\t\tname: t('workflowengine', 'File system tag'),\n\t\toperators: [\n\t\t\t{ operator: 'is', name: t('workflowengine', 'is tagged with') },\n\t\t\t{ operator: '!is', name: t('workflowengine', 'is not tagged with') },\n\t\t],\n\t\tcomponent: FileSystemTag,\n\t},\n]\n\nexport default FileChecks\n","<!--\n - SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n<template>\n\t<div>\n\t\t<NcSelect :value=\"currentValue\"\n\t\t\t:placeholder=\"t('workflowengine', 'Select a user agent')\"\n\t\t\tlabel=\"label\"\n\t\t\t:options=\"options\"\n\t\t\t:clearable=\"false\"\n\t\t\t@input=\"setValue\">\n\t\t\t<template #option=\"option\">\n\t\t\t\t<span class=\"option__icon\" :class=\"option.icon\" />\n\t\t\t\t<span class=\"option__title\">\n\t\t\t\t\t<NcEllipsisedOption :name=\"String(option.label)\" />\n\t\t\t\t</span>\n\t\t\t</template>\n\t\t\t<template #selected-option=\"selectedOption\">\n\t\t\t\t<span class=\"option__icon\" :class=\"selectedOption.icon\" />\n\t\t\t\t<span class=\"option__title\">\n\t\t\t\t\t<NcEllipsisedOption :name=\"String(selectedOption.label)\" />\n\t\t\t\t</span>\n\t\t\t</template>\n\t\t</NcSelect>\n\t\t<input v-if=\"!isPredefined\"\n\t\t\ttype=\"text\"\n\t\t\t:value=\"currentValue.pattern\"\n\t\t\t@input=\"updateCustom\">\n\t</div>\n</template>\n\n<script>\nimport NcEllipsisedOption from '@nextcloud/vue/dist/Components/NcEllipsisedOption.js'\nimport NcSelect from '@nextcloud/vue/dist/Components/NcSelect.js'\nimport valueMixin from '../../mixins/valueMixin.js'\n\nexport default {\n\tname: 'RequestUserAgent',\n\tcomponents: {\n\t\tNcEllipsisedOption,\n\t\tNcSelect,\n\t},\n\tmixins: [\n\t\tvalueMixin,\n\t],\n\tdata() {\n\t\treturn {\n\t\t\tnewValue: '',\n\t\t\tpredefinedTypes: [\n\t\t\t\t{ id: 'android', label: t('workflowengine', 'Android client'), icon: 'icon-phone' },\n\t\t\t\t{ id: 'ios', label: t('workflowengine', 'iOS client'), icon: 'icon-phone' },\n\t\t\t\t{ id: 'desktop', label: t('workflowengine', 'Desktop client'), icon: 'icon-desktop' },\n\t\t\t\t{ id: 'mail', label: t('workflowengine', 'Thunderbird & Outlook addons'), icon: 'icon-mail' },\n\t\t\t],\n\t\t}\n\t},\n\tcomputed: {\n\t\toptions() {\n\t\t\treturn [...this.predefinedTypes, this.customValue]\n\t\t},\n\t\tmatchingPredefined() {\n\t\t\treturn this.predefinedTypes\n\t\t\t\t.find((type) => this.newValue === type.id)\n\t\t},\n\t\tisPredefined() {\n\t\t\treturn !!this.matchingPredefined\n\t\t},\n\t\tcustomValue() {\n\t\t\treturn {\n\t\t\t\ticon: 'icon-settings-dark',\n\t\t\t\tlabel: t('workflowengine', 'Custom user agent'),\n\t\t\t\tid: '',\n\t\t\t}\n\t\t},\n\t\tcurrentValue() {\n\t\t\tif (this.matchingPredefined) {\n\t\t\t\treturn this.matchingPredefined\n\t\t\t}\n\t\t\treturn {\n\t\t\t\ticon: 'icon-settings-dark',\n\t\t\t\tlabel: t('workflowengine', 'Custom user agent'),\n\t\t\t\tid: this.newValue,\n\t\t\t}\n\t\t},\n\t},\n\tmethods: {\n\t\tvalidateRegex(string) {\n\t\t\tconst regexRegex = /^\\/(.*)\\/([gui]{0,3})$/\n\t\t\tconst result = regexRegex.exec(string)\n\t\t\treturn result !== null\n\t\t},\n\t\tsetValue(value) {\n\t\t\t// TODO: check if value requires a regex and set the check operator according to that\n\t\t\tif (value !== null) {\n\t\t\t\tthis.newValue = value.id\n\t\t\t\tthis.$emit('input', this.newValue)\n\t\t\t}\n\t\t},\n\t\tupdateCustom(event) {\n\t\t\tthis.newValue = event.target.value\n\t\t\tthis.$emit('input', this.newValue)\n\t\t},\n\t},\n}\n</script>\n<style scoped>\n\t.v-select,\n\tinput[type='text'] {\n\t\twidth: 100%;\n\t}\n\tinput[type='text'] {\n\t\tmin-height: 48px;\n\t}\n\n\t.option__icon {\n\t\tdisplay: inline-block;\n\t\tmin-width: 30px;\n\t\tbackground-position: center;\n\t\tvertical-align: middle;\n\t}\n\n\t.option__title {\n\t\tdisplay: inline-flex;\n\t\twidth: calc(100% - 36px);\n\t\tvertical-align: middle;\n\t}\n</style>\n","//! moment-timezone.js\n//! version : 0.5.45\n//! Copyright (c) JS Foundation and other contributors\n//! license : MIT\n//! github.com/moment/moment-timezone\n\n(function (root, factory) {\n\t\"use strict\";\n\n\t/*global define*/\n\tif (typeof module === 'object' && module.exports) {\n\t\tmodule.exports = factory(require('moment')); // Node\n\t} else if (typeof define === 'function' && define.amd) {\n\t\tdefine(['moment'], factory); // AMD\n\t} else {\n\t\tfactory(root.moment); // Browser\n\t}\n}(this, function (moment) {\n\t\"use strict\";\n\n\t// Resolves es6 module loading issue\n\tif (moment.version === undefined && moment.default) {\n\t\tmoment = moment.default;\n\t}\n\n\t// Do not load moment-timezone a second time.\n\t// if (moment.tz !== undefined) {\n\t// \tlogError('Moment Timezone ' + moment.tz.version + ' was already loaded ' + (moment.tz.dataVersion ? 'with data from ' : 'without any data') + moment.tz.dataVersion);\n\t// \treturn moment;\n\t// }\n\n\tvar VERSION = \"0.5.45\",\n\t\tzones = {},\n\t\tlinks = {},\n\t\tcountries = {},\n\t\tnames = {},\n\t\tguesses = {},\n\t\tcachedGuess;\n\n\tif (!moment || typeof moment.version !== 'string') {\n\t\tlogError('Moment Timezone requires Moment.js. See https://momentjs.com/timezone/docs/#/use-it/browser/');\n\t}\n\n\tvar momentVersion = moment.version.split('.'),\n\t\tmajor = +momentVersion[0],\n\t\tminor = +momentVersion[1];\n\n\t// Moment.js version check\n\tif (major < 2 || (major === 2 && minor < 6)) {\n\t\tlogError('Moment Timezone requires Moment.js >= 2.6.0. You are using Moment.js ' + moment.version + '. See momentjs.com');\n\t}\n\n\t/************************************\n\t\tUnpacking\n\t************************************/\n\n\tfunction charCodeToInt(charCode) {\n\t\tif (charCode > 96) {\n\t\t\treturn charCode - 87;\n\t\t} else if (charCode > 64) {\n\t\t\treturn charCode - 29;\n\t\t}\n\t\treturn charCode - 48;\n\t}\n\n\tfunction unpackBase60(string) {\n\t\tvar i = 0,\n\t\t\tparts = string.split('.'),\n\t\t\twhole = parts[0],\n\t\t\tfractional = parts[1] || '',\n\t\t\tmultiplier = 1,\n\t\t\tnum,\n\t\t\tout = 0,\n\t\t\tsign = 1;\n\n\t\t// handle negative numbers\n\t\tif (string.charCodeAt(0) === 45) {\n\t\t\ti = 1;\n\t\t\tsign = -1;\n\t\t}\n\n\t\t// handle digits before the decimal\n\t\tfor (i; i < whole.length; i++) {\n\t\t\tnum = charCodeToInt(whole.charCodeAt(i));\n\t\t\tout = 60 * out + num;\n\t\t}\n\n\t\t// handle digits after the decimal\n\t\tfor (i = 0; i < fractional.length; i++) {\n\t\t\tmultiplier = multiplier / 60;\n\t\t\tnum = charCodeToInt(fractional.charCodeAt(i));\n\t\t\tout += num * multiplier;\n\t\t}\n\n\t\treturn out * sign;\n\t}\n\n\tfunction arrayToInt (array) {\n\t\tfor (var i = 0; i < array.length; i++) {\n\t\t\tarray[i] = unpackBase60(array[i]);\n\t\t}\n\t}\n\n\tfunction intToUntil (array, length) {\n\t\tfor (var i = 0; i < length; i++) {\n\t\t\tarray[i] = Math.round((array[i - 1] || 0) + (array[i] * 60000)); // minutes to milliseconds\n\t\t}\n\n\t\tarray[length - 1] = Infinity;\n\t}\n\n\tfunction mapIndices (source, indices) {\n\t\tvar out = [], i;\n\n\t\tfor (i = 0; i < indices.length; i++) {\n\t\t\tout[i] = source[indices[i]];\n\t\t}\n\n\t\treturn out;\n\t}\n\n\tfunction unpack (string) {\n\t\tvar data = string.split('|'),\n\t\t\toffsets = data[2].split(' '),\n\t\t\tindices = data[3].split(''),\n\t\t\tuntils = data[4].split(' ');\n\n\t\tarrayToInt(offsets);\n\t\tarrayToInt(indices);\n\t\tarrayToInt(untils);\n\n\t\tintToUntil(untils, indices.length);\n\n\t\treturn {\n\t\t\tname : data[0],\n\t\t\tabbrs : mapIndices(data[1].split(' '), indices),\n\t\t\toffsets : mapIndices(offsets, indices),\n\t\t\tuntils : untils,\n\t\t\tpopulation : data[5] | 0\n\t\t};\n\t}\n\n\t/************************************\n\t\tZone object\n\t************************************/\n\n\tfunction Zone (packedString) {\n\t\tif (packedString) {\n\t\t\tthis._set(unpack(packedString));\n\t\t}\n\t}\n\n\tfunction closest (num, arr) {\n\t\tvar len = arr.length;\n\t\tif (num < arr[0]) {\n\t\t\treturn 0;\n\t\t} else if (len > 1 && arr[len - 1] === Infinity && num >= arr[len - 2]) {\n\t\t\treturn len - 1;\n\t\t} else if (num >= arr[len - 1]) {\n\t\t\treturn -1;\n\t\t}\n\n\t\tvar mid;\n\t\tvar lo = 0;\n\t\tvar hi = len - 1;\n\t\twhile (hi - lo > 1) {\n\t\t\tmid = Math.floor((lo + hi) / 2);\n\t\t\tif (arr[mid] <= num) {\n\t\t\t\tlo = mid;\n\t\t\t} else {\n\t\t\t\thi = mid;\n\t\t\t}\n\t\t}\n\t\treturn hi;\n\t}\n\n\tZone.prototype = {\n\t\t_set : function (unpacked) {\n\t\t\tthis.name = unpacked.name;\n\t\t\tthis.abbrs = unpacked.abbrs;\n\t\t\tthis.untils = unpacked.untils;\n\t\t\tthis.offsets = unpacked.offsets;\n\t\t\tthis.population = unpacked.population;\n\t\t},\n\n\t\t_index : function (timestamp) {\n\t\t\tvar target = +timestamp,\n\t\t\t\tuntils = this.untils,\n\t\t\t\ti;\n\n\t\t\ti = closest(target, untils);\n\t\t\tif (i >= 0) {\n\t\t\t\treturn i;\n\t\t\t}\n\t\t},\n\n\t\tcountries : function () {\n\t\t\tvar zone_name = this.name;\n\t\t\treturn Object.keys(countries).filter(function (country_code) {\n\t\t\t\treturn countries[country_code].zones.indexOf(zone_name) !== -1;\n\t\t\t});\n\t\t},\n\n\t\tparse : function (timestamp) {\n\t\t\tvar target = +timestamp,\n\t\t\t\toffsets = this.offsets,\n\t\t\t\tuntils = this.untils,\n\t\t\t\tmax = untils.length - 1,\n\t\t\t\toffset, offsetNext, offsetPrev, i;\n\n\t\t\tfor (i = 0; i < max; i++) {\n\t\t\t\toffset = offsets[i];\n\t\t\t\toffsetNext = offsets[i + 1];\n\t\t\t\toffsetPrev = offsets[i ? i - 1 : i];\n\n\t\t\t\tif (offset < offsetNext && tz.moveAmbiguousForward) {\n\t\t\t\t\toffset = offsetNext;\n\t\t\t\t} else if (offset > offsetPrev && tz.moveInvalidForward) {\n\t\t\t\t\toffset = offsetPrev;\n\t\t\t\t}\n\n\t\t\t\tif (target < untils[i] - (offset * 60000)) {\n\t\t\t\t\treturn offsets[i];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn offsets[max];\n\t\t},\n\n\t\tabbr : function (mom) {\n\t\t\treturn this.abbrs[this._index(mom)];\n\t\t},\n\n\t\toffset : function (mom) {\n\t\t\tlogError(\"zone.offset has been deprecated in favor of zone.utcOffset\");\n\t\t\treturn this.offsets[this._index(mom)];\n\t\t},\n\n\t\tutcOffset : function (mom) {\n\t\t\treturn this.offsets[this._index(mom)];\n\t\t}\n\t};\n\n\t/************************************\n\t\tCountry object\n\t************************************/\n\n\tfunction Country (country_name, zone_names) {\n\t\tthis.name = country_name;\n\t\tthis.zones = zone_names;\n\t}\n\n\t/************************************\n\t\tCurrent Timezone\n\t************************************/\n\n\tfunction OffsetAt(at) {\n\t\tvar timeString = at.toTimeString();\n\t\tvar abbr = timeString.match(/\\([a-z ]+\\)/i);\n\t\tif (abbr && abbr[0]) {\n\t\t\t// 17:56:31 GMT-0600 (CST)\n\t\t\t// 17:56:31 GMT-0600 (Central Standard Time)\n\t\t\tabbr = abbr[0].match(/[A-Z]/g);\n\t\t\tabbr = abbr ? abbr.join('') : undefined;\n\t\t} else {\n\t\t\t// 17:56:31 CST\n\t\t\t// 17:56:31 GMT+0800 (台北標準時間)\n\t\t\tabbr = timeString.match(/[A-Z]{3,5}/g);\n\t\t\tabbr = abbr ? abbr[0] : undefined;\n\t\t}\n\n\t\tif (abbr === 'GMT') {\n\t\t\tabbr = undefined;\n\t\t}\n\n\t\tthis.at = +at;\n\t\tthis.abbr = abbr;\n\t\tthis.offset = at.getTimezoneOffset();\n\t}\n\n\tfunction ZoneScore(zone) {\n\t\tthis.zone = zone;\n\t\tthis.offsetScore = 0;\n\t\tthis.abbrScore = 0;\n\t}\n\n\tZoneScore.prototype.scoreOffsetAt = function (offsetAt) {\n\t\tthis.offsetScore += Math.abs(this.zone.utcOffset(offsetAt.at) - offsetAt.offset);\n\t\tif (this.zone.abbr(offsetAt.at).replace(/[^A-Z]/g, '') !== offsetAt.abbr) {\n\t\t\tthis.abbrScore++;\n\t\t}\n\t};\n\n\tfunction findChange(low, high) {\n\t\tvar mid, diff;\n\n\t\twhile ((diff = ((high.at - low.at) / 12e4 | 0) * 6e4)) {\n\t\t\tmid = new OffsetAt(new Date(low.at + diff));\n\t\t\tif (mid.offset === low.offset) {\n\t\t\t\tlow = mid;\n\t\t\t} else {\n\t\t\t\thigh = mid;\n\t\t\t}\n\t\t}\n\n\t\treturn low;\n\t}\n\n\tfunction userOffsets() {\n\t\tvar startYear = new Date().getFullYear() - 2,\n\t\t\tlast = new OffsetAt(new Date(startYear, 0, 1)),\n\t\t\tlastOffset = last.offset,\n\t\t\toffsets = [last],\n\t\t\tchange, next, nextOffset, i;\n\n\t\tfor (i = 1; i < 48; i++) {\n\t\t\tnextOffset = new Date(startYear, i, 1).getTimezoneOffset();\n\t\t\tif (nextOffset !== lastOffset) {\n\t\t\t\t// Create OffsetAt here to avoid unnecessary abbr parsing before checking offsets\n\t\t\t\tnext = new OffsetAt(new Date(startYear, i, 1));\n\t\t\t\tchange = findChange(last, next);\n\t\t\t\toffsets.push(change);\n\t\t\t\toffsets.push(new OffsetAt(new Date(change.at + 6e4)));\n\t\t\t\tlast = next;\n\t\t\t\tlastOffset = nextOffset;\n\t\t\t}\n\t\t}\n\n\t\tfor (i = 0; i < 4; i++) {\n\t\t\toffsets.push(new OffsetAt(new Date(startYear + i, 0, 1)));\n\t\t\toffsets.push(new OffsetAt(new Date(startYear + i, 6, 1)));\n\t\t}\n\n\t\treturn offsets;\n\t}\n\n\tfunction sortZoneScores (a, b) {\n\t\tif (a.offsetScore !== b.offsetScore) {\n\t\t\treturn a.offsetScore - b.offsetScore;\n\t\t}\n\t\tif (a.abbrScore !== b.abbrScore) {\n\t\t\treturn a.abbrScore - b.abbrScore;\n\t\t}\n\t\tif (a.zone.population !== b.zone.population) {\n\t\t\treturn b.zone.population - a.zone.population;\n\t\t}\n\t\treturn b.zone.name.localeCompare(a.zone.name);\n\t}\n\n\tfunction addToGuesses (name, offsets) {\n\t\tvar i, offset;\n\t\tarrayToInt(offsets);\n\t\tfor (i = 0; i < offsets.length; i++) {\n\t\t\toffset = offsets[i];\n\t\t\tguesses[offset] = guesses[offset] || {};\n\t\t\tguesses[offset][name] = true;\n\t\t}\n\t}\n\n\tfunction guessesForUserOffsets (offsets) {\n\t\tvar offsetsLength = offsets.length,\n\t\t\tfilteredGuesses = {},\n\t\t\tout = [],\n\t\t\tcheckedOffsets = {},\n\t\t\ti, j, offset, guessesOffset;\n\n\t\tfor (i = 0; i < offsetsLength; i++) {\n\t\t\toffset = offsets[i].offset;\n\t\t\tif (checkedOffsets.hasOwnProperty(offset)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tguessesOffset = guesses[offset] || {};\n\t\t\tfor (j in guessesOffset) {\n\t\t\t\tif (guessesOffset.hasOwnProperty(j)) {\n\t\t\t\t\tfilteredGuesses[j] = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tcheckedOffsets[offset] = true;\n\t\t}\n\n\t\tfor (i in filteredGuesses) {\n\t\t\tif (filteredGuesses.hasOwnProperty(i)) {\n\t\t\t\tout.push(names[i]);\n\t\t\t}\n\t\t}\n\n\t\treturn out;\n\t}\n\n\tfunction rebuildGuess () {\n\n\t\t// use Intl API when available and returning valid time zone\n\t\ttry {\n\t\t\tvar intlName = Intl.DateTimeFormat().resolvedOptions().timeZone;\n\t\t\tif (intlName && intlName.length > 3) {\n\t\t\t\tvar name = names[normalizeName(intlName)];\n\t\t\t\tif (name) {\n\t\t\t\t\treturn name;\n\t\t\t\t}\n\t\t\t\tlogError(\"Moment Timezone found \" + intlName + \" from the Intl api, but did not have that data loaded.\");\n\t\t\t}\n\t\t} catch (e) {\n\t\t\t// Intl unavailable, fall back to manual guessing.\n\t\t}\n\n\t\tvar offsets = userOffsets(),\n\t\t\toffsetsLength = offsets.length,\n\t\t\tguesses = guessesForUserOffsets(offsets),\n\t\t\tzoneScores = [],\n\t\t\tzoneScore, i, j;\n\n\t\tfor (i = 0; i < guesses.length; i++) {\n\t\t\tzoneScore = new ZoneScore(getZone(guesses[i]), offsetsLength);\n\t\t\tfor (j = 0; j < offsetsLength; j++) {\n\t\t\t\tzoneScore.scoreOffsetAt(offsets[j]);\n\t\t\t}\n\t\t\tzoneScores.push(zoneScore);\n\t\t}\n\n\t\tzoneScores.sort(sortZoneScores);\n\n\t\treturn zoneScores.length > 0 ? zoneScores[0].zone.name : undefined;\n\t}\n\n\tfunction guess (ignoreCache) {\n\t\tif (!cachedGuess || ignoreCache) {\n\t\t\tcachedGuess = rebuildGuess();\n\t\t}\n\t\treturn cachedGuess;\n\t}\n\n\t/************************************\n\t\tGlobal Methods\n\t************************************/\n\n\tfunction normalizeName (name) {\n\t\treturn (name || '').toLowerCase().replace(/\\//g, '_');\n\t}\n\n\tfunction addZone (packed) {\n\t\tvar i, name, split, normalized;\n\n\t\tif (typeof packed === \"string\") {\n\t\t\tpacked = [packed];\n\t\t}\n\n\t\tfor (i = 0; i < packed.length; i++) {\n\t\t\tsplit = packed[i].split('|');\n\t\t\tname = split[0];\n\t\t\tnormalized = normalizeName(name);\n\t\t\tzones[normalized] = packed[i];\n\t\t\tnames[normalized] = name;\n\t\t\taddToGuesses(normalized, split[2].split(' '));\n\t\t}\n\t}\n\n\tfunction getZone (name, caller) {\n\n\t\tname = normalizeName(name);\n\n\t\tvar zone = zones[name];\n\t\tvar link;\n\n\t\tif (zone instanceof Zone) {\n\t\t\treturn zone;\n\t\t}\n\n\t\tif (typeof zone === 'string') {\n\t\t\tzone = new Zone(zone);\n\t\t\tzones[name] = zone;\n\t\t\treturn zone;\n\t\t}\n\n\t\t// Pass getZone to prevent recursion more than 1 level deep\n\t\tif (links[name] && caller !== getZone && (link = getZone(links[name], getZone))) {\n\t\t\tzone = zones[name] = new Zone();\n\t\t\tzone._set(link);\n\t\t\tzone.name = names[name];\n\t\t\treturn zone;\n\t\t}\n\n\t\treturn null;\n\t}\n\n\tfunction getNames () {\n\t\tvar i, out = [];\n\n\t\tfor (i in names) {\n\t\t\tif (names.hasOwnProperty(i) && (zones[i] || zones[links[i]]) && names[i]) {\n\t\t\t\tout.push(names[i]);\n\t\t\t}\n\t\t}\n\n\t\treturn out.sort();\n\t}\n\n\tfunction getCountryNames () {\n\t\treturn Object.keys(countries);\n\t}\n\n\tfunction addLink (aliases) {\n\t\tvar i, alias, normal0, normal1;\n\n\t\tif (typeof aliases === \"string\") {\n\t\t\taliases = [aliases];\n\t\t}\n\n\t\tfor (i = 0; i < aliases.length; i++) {\n\t\t\talias = aliases[i].split('|');\n\n\t\t\tnormal0 = normalizeName(alias[0]);\n\t\t\tnormal1 = normalizeName(alias[1]);\n\n\t\t\tlinks[normal0] = normal1;\n\t\t\tnames[normal0] = alias[0];\n\n\t\t\tlinks[normal1] = normal0;\n\t\t\tnames[normal1] = alias[1];\n\t\t}\n\t}\n\n\tfunction addCountries (data) {\n\t\tvar i, country_code, country_zones, split;\n\t\tif (!data || !data.length) return;\n\t\tfor (i = 0; i < data.length; i++) {\n\t\t\tsplit = data[i].split('|');\n\t\t\tcountry_code = split[0].toUpperCase();\n\t\t\tcountry_zones = split[1].split(' ');\n\t\t\tcountries[country_code] = new Country(\n\t\t\t\tcountry_code,\n\t\t\t\tcountry_zones\n\t\t\t);\n\t\t}\n\t}\n\n\tfunction getCountry (name) {\n\t\tname = name.toUpperCase();\n\t\treturn countries[name] || null;\n\t}\n\n\tfunction zonesForCountry(country, with_offset) {\n\t\tcountry = getCountry(country);\n\n\t\tif (!country) return null;\n\n\t\tvar zones = country.zones.sort();\n\n\t\tif (with_offset) {\n\t\t\treturn zones.map(function (zone_name) {\n\t\t\t\tvar zone = getZone(zone_name);\n\t\t\t\treturn {\n\t\t\t\t\tname: zone_name,\n\t\t\t\t\toffset: zone.utcOffset(new Date())\n\t\t\t\t};\n\t\t\t});\n\t\t}\n\n\t\treturn zones;\n\t}\n\n\tfunction loadData (data) {\n\t\taddZone(data.zones);\n\t\taddLink(data.links);\n\t\taddCountries(data.countries);\n\t\ttz.dataVersion = data.version;\n\t}\n\n\tfunction zoneExists (name) {\n\t\tif (!zoneExists.didShowError) {\n\t\t\tzoneExists.didShowError = true;\n\t\t\t\tlogError(\"moment.tz.zoneExists('\" + name + \"') has been deprecated in favor of !moment.tz.zone('\" + name + \"')\");\n\t\t}\n\t\treturn !!getZone(name);\n\t}\n\n\tfunction needsOffset (m) {\n\t\tvar isUnixTimestamp = (m._f === 'X' || m._f === 'x');\n\t\treturn !!(m._a && (m._tzm === undefined) && !isUnixTimestamp);\n\t}\n\n\tfunction logError (message) {\n\t\tif (typeof console !== 'undefined' && typeof console.error === 'function') {\n\t\t\tconsole.error(message);\n\t\t}\n\t}\n\n\t/************************************\n\t\tmoment.tz namespace\n\t************************************/\n\n\tfunction tz (input) {\n\t\tvar args = Array.prototype.slice.call(arguments, 0, -1),\n\t\t\tname = arguments[arguments.length - 1],\n\t\t\tout = moment.utc.apply(null, args),\n\t\t\tzone;\n\n\t\tif (!moment.isMoment(input) && needsOffset(out) && (zone = getZone(name))) {\n\t\t\tout.add(zone.parse(out), 'minutes');\n\t\t}\n\n\t\tout.tz(name);\n\n\t\treturn out;\n\t}\n\n\ttz.version = VERSION;\n\ttz.dataVersion = '';\n\ttz._zones = zones;\n\ttz._links = links;\n\ttz._names = names;\n\ttz._countries\t= countries;\n\ttz.add = addZone;\n\ttz.link = addLink;\n\ttz.load = loadData;\n\ttz.zone = getZone;\n\ttz.zoneExists = zoneExists; // deprecated in 0.1.0\n\ttz.guess = guess;\n\ttz.names = getNames;\n\ttz.Zone = Zone;\n\ttz.unpack = unpack;\n\ttz.unpackBase60 = unpackBase60;\n\ttz.needsOffset = needsOffset;\n\ttz.moveInvalidForward = true;\n\ttz.moveAmbiguousForward = false;\n\ttz.countries = getCountryNames;\n\ttz.zonesForCountry = zonesForCountry;\n\n\t/************************************\n\t\tInterface with Moment.js\n\t************************************/\n\n\tvar fn = moment.fn;\n\n\tmoment.tz = tz;\n\n\tmoment.defaultZone = null;\n\n\tmoment.updateOffset = function (mom, keepTime) {\n\t\tvar zone = moment.defaultZone,\n\t\t\toffset;\n\n\t\tif (mom._z === undefined) {\n\t\t\tif (zone && needsOffset(mom) && !mom._isUTC && mom.isValid()) {\n\t\t\t\tmom._d = moment.utc(mom._a)._d;\n\t\t\t\tmom.utc().add(zone.parse(mom), 'minutes');\n\t\t\t}\n\t\t\tmom._z = zone;\n\t\t}\n\t\tif (mom._z) {\n\t\t\toffset = mom._z.utcOffset(mom);\n\t\t\tif (Math.abs(offset) < 16) {\n\t\t\t\toffset = offset / 60;\n\t\t\t}\n\t\t\tif (mom.utcOffset !== undefined) {\n\t\t\t\tvar z = mom._z;\n\t\t\t\tmom.utcOffset(-offset, keepTime);\n\t\t\t\tmom._z = z;\n\t\t\t} else {\n\t\t\t\tmom.zone(offset, keepTime);\n\t\t\t}\n\t\t}\n\t};\n\n\tfn.tz = function (name, keepTime) {\n\t\tif (name) {\n\t\t\tif (typeof name !== 'string') {\n\t\t\t\tthrow new Error('Time zone name must be a string, got ' + name + ' [' + typeof name + ']');\n\t\t\t}\n\t\t\tthis._z = getZone(name);\n\t\t\tif (this._z) {\n\t\t\t\tmoment.updateOffset(this, keepTime);\n\t\t\t} else {\n\t\t\t\tlogError(\"Moment Timezone has no data for \" + name + \". See http://momentjs.com/timezone/docs/#/data-loading/.\");\n\t\t\t}\n\t\t\treturn this;\n\t\t}\n\t\tif (this._z) { return this._z.name; }\n\t};\n\n\tfunction abbrWrap (old) {\n\t\treturn function () {\n\t\t\tif (this._z) { return this._z.abbr(this); }\n\t\t\treturn old.call(this);\n\t\t};\n\t}\n\n\tfunction resetZoneWrap (old) {\n\t\treturn function () {\n\t\t\tthis._z = null;\n\t\t\treturn old.apply(this, arguments);\n\t\t};\n\t}\n\n\tfunction resetZoneWrap2 (old) {\n\t\treturn function () {\n\t\t\tif (arguments.length > 0) this._z = null;\n\t\t\treturn old.apply(this, arguments);\n\t\t};\n\t}\n\n\tfn.zoneName = abbrWrap(fn.zoneName);\n\tfn.zoneAbbr = abbrWrap(fn.zoneAbbr);\n\tfn.utc = resetZoneWrap(fn.utc);\n\tfn.local = resetZoneWrap(fn.local);\n\tfn.utcOffset = resetZoneWrap2(fn.utcOffset);\n\n\tmoment.tz.setDefault = function(name) {\n\t\tif (major < 2 || (major === 2 && minor < 9)) {\n\t\t\tlogError('Moment Timezone setDefault() requires Moment.js >= 2.9.0. You are using Moment.js ' + moment.version + '.');\n\t\t}\n\t\tmoment.defaultZone = name ? getZone(name) : null;\n\t\treturn moment;\n\t};\n\n\t// Cloning a moment should include the _z property.\n\tvar momentProperties = moment.momentProperties;\n\tif (Object.prototype.toString.call(momentProperties) === '[object Array]') {\n\t\t// moment 2.8.1+\n\t\tmomentProperties.push('_z');\n\t\tmomentProperties.push('_a');\n\t} else if (momentProperties) {\n\t\t// moment 2.7.0\n\t\tmomentProperties._z = null;\n\t}\n\n\t// INJECT DATA\n\n\treturn moment;\n}));\n","var moment = module.exports = require(\"./moment-timezone\");\nmoment.tz.load(require('./data/packed/latest.json'));\n","<!--\n - SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n<template>\n\t<div class=\"timeslot\">\n\t\t<input v-model=\"newValue.startTime\"\n\t\t\ttype=\"text\"\n\t\t\tclass=\"timeslot--start\"\n\t\t\tplaceholder=\"e.g. 08:00\"\n\t\t\t@input=\"update\">\n\t\t<input v-model=\"newValue.endTime\"\n\t\t\ttype=\"text\"\n\t\t\tplaceholder=\"e.g. 18:00\"\n\t\t\t@input=\"update\">\n\t\t<p v-if=\"!valid\" class=\"invalid-hint\">\n\t\t\t{{ t('workflowengine', 'Please enter a valid time span') }}\n\t\t</p>\n\t\t<NcSelect v-show=\"valid\"\n\t\t\tv-model=\"newValue.timezone\"\n\t\t\t:clearable=\"false\"\n\t\t\t:options=\"timezones\"\n\t\t\t@input=\"update\" />\n\t</div>\n</template>\n\n<script>\nimport NcSelect from '@nextcloud/vue/dist/Components/NcSelect.js'\nimport moment from 'moment-timezone'\nimport valueMixin from '../../mixins/valueMixin.js'\n\nconst zones = moment.tz.names()\nexport default {\n\tname: 'RequestTime',\n\tcomponents: {\n\t\tNcSelect,\n\t},\n\tmixins: [\n\t\tvalueMixin,\n\t],\n\tprops: {\n\t\tvalue: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t},\n\tdata() {\n\t\treturn {\n\t\t\ttimezones: zones,\n\t\t\tvalid: false,\n\t\t\tnewValue: {\n\t\t\t\tstartTime: null,\n\t\t\t\tendTime: null,\n\t\t\t\ttimezone: moment.tz.guess(),\n\t\t\t},\n\t\t}\n\t},\n\tmounted() {\n\t\tthis.validate()\n\t},\n\tmethods: {\n\t\tupdateInternalValue(value) {\n\t\t\ttry {\n\t\t\t\tconst data = JSON.parse(value)\n\t\t\t\tif (data.length === 2) {\n\t\t\t\t\tthis.newValue = {\n\t\t\t\t\t\tstartTime: data[0].split(' ', 2)[0],\n\t\t\t\t\t\tendTime: data[1].split(' ', 2)[0],\n\t\t\t\t\t\ttimezone: data[0].split(' ', 2)[1],\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch (e) {\n\t\t\t\t// ignore invalid values\n\t\t\t}\n\t\t},\n\t\tvalidate() {\n\t\t\tthis.valid = this.newValue.startTime && this.newValue.startTime.match(/^(0[0-9]|1[0-9]|2[0-3]|[0-9]):[0-5][0-9]$/i) !== null\n\t\t\t\t&& this.newValue.endTime && this.newValue.endTime.match(/^(0[0-9]|1[0-9]|2[0-3]|[0-9]):[0-5][0-9]$/i) !== null\n\t\t\t\t&& moment.tz.zone(this.newValue.timezone) !== null\n\t\t\tif (this.valid) {\n\t\t\t\tthis.$emit('valid')\n\t\t\t} else {\n\t\t\t\tthis.$emit('invalid')\n\t\t\t}\n\t\t\treturn this.valid\n\t\t},\n\t\tupdate() {\n\t\t\tif (this.newValue.timezone === null) {\n\t\t\t\tthis.newValue.timezone = moment.tz.guess()\n\t\t\t}\n\t\t\tif (this.validate()) {\n\t\t\t\tconst output = `[\"${this.newValue.startTime} ${this.newValue.timezone}\",\"${this.newValue.endTime} ${this.newValue.timezone}\"]`\n\t\t\t\tthis.$emit('input', output)\n\t\t\t}\n\t\t},\n\t},\n}\n</script>\n\n<style scoped lang=\"scss\">\n\t.timeslot {\n\t\tdisplay: flex;\n\t\tflex-grow: 1;\n\t\tflex-wrap: wrap;\n\t\tmax-width: 180px;\n\n\t\t.multiselect {\n\t\t\twidth: 100%;\n\t\t\tmargin-bottom: 5px;\n\t\t}\n\n\t\t.multiselect::v-deep .multiselect__tags:not(:hover):not(:focus):not(:active) {\n\t\t\tborder: 1px solid transparent;\n\t\t}\n\n\t\tinput[type=text] {\n\t\t\twidth: 50%;\n\t\t\tmargin: 0;\n\t\t\tmargin-bottom: 5px;\n\t\t\tmin-height: 48px;\n\n\t\t\t&.timeslot--start {\n\t\t\t\tmargin-right: 5px;\n\t\t\t\twidth: calc(50% - 5px);\n\t\t\t}\n\t\t}\n\n\t\t.invalid-hint {\n\t\t\tcolor: var(--color-text-maxcontrast);\n\t\t}\n\t}\n</style>\n","<!--\n - SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n<template>\n\t<div>\n\t\t<NcSelect :value=\"currentValue\"\n\t\t\t:placeholder=\"t('workflowengine', 'Select a request URL')\"\n\t\t\tlabel=\"label\"\n\t\t\t:clearable=\"false\"\n\t\t\t:options=\"options\"\n\t\t\t@input=\"setValue\">\n\t\t\t<template #option=\"option\">\n\t\t\t\t<span class=\"option__icon\" :class=\"option.icon\" />\n\t\t\t\t<span class=\"option__title\">\n\t\t\t\t\t<NcEllipsisedOption :name=\"String(option.label)\" />\n\t\t\t\t</span>\n\t\t\t</template>\n\t\t\t<template #selected-option=\"selectedOption\">\n\t\t\t\t<span class=\"option__icon\" :class=\"selectedOption.icon\" />\n\t\t\t\t<span class=\"option__title\">\n\t\t\t\t\t<NcEllipsisedOption :name=\"String(selectedOption.label)\" />\n\t\t\t\t</span>\n\t\t\t</template>\n\t\t</NcSelect>\n\t\t<input v-if=\"!isPredefined\"\n\t\t\ttype=\"text\"\n\t\t\t:value=\"currentValue.id\"\n\t\t\t:placeholder=\"placeholder\"\n\t\t\t@input=\"updateCustom\">\n\t</div>\n</template>\n\n<script>\nimport NcEllipsisedOption from '@nextcloud/vue/dist/Components/NcEllipsisedOption.js'\nimport NcSelect from '@nextcloud/vue/dist/Components/NcSelect.js'\nimport valueMixin from '../../mixins/valueMixin.js'\n\nexport default {\n\tname: 'RequestURL',\n\tcomponents: {\n\t\tNcEllipsisedOption,\n\t\tNcSelect,\n\t},\n\tmixins: [\n\t\tvalueMixin,\n\t],\n\tdata() {\n\t\treturn {\n\t\t\tnewValue: '',\n\t\t\tpredefinedTypes: [\n\t\t\t\t{\n\t\t\t\t\ticon: 'icon-files-dark',\n\t\t\t\t\tid: 'webdav',\n\t\t\t\t\tlabel: t('workflowengine', 'Files WebDAV'),\n\t\t\t\t},\n\t\t\t],\n\t\t}\n\t},\n\tcomputed: {\n\t\toptions() {\n\t\t\treturn [...this.predefinedTypes, this.customValue]\n\t\t},\n\t\tplaceholder() {\n\t\t\tif (this.check.operator === 'matches' || this.check.operator === '!matches') {\n\t\t\t\treturn '/^https\\\\:\\\\/\\\\/localhost\\\\/index\\\\.php$/i'\n\t\t\t}\n\t\t\treturn 'https://localhost/index.php'\n\t\t},\n\t\tmatchingPredefined() {\n\t\t\treturn this.predefinedTypes\n\t\t\t\t.find((type) => this.newValue === type.id)\n\t\t},\n\t\tisPredefined() {\n\t\t\treturn !!this.matchingPredefined\n\t\t},\n\t\tcustomValue() {\n\t\t\treturn {\n\t\t\t\ticon: 'icon-settings-dark',\n\t\t\t\tlabel: t('workflowengine', 'Custom URL'),\n\t\t\t\tid: '',\n\t\t\t}\n\t\t},\n\t\tcurrentValue() {\n\t\t\tif (this.matchingPredefined) {\n\t\t\t\treturn this.matchingPredefined\n\t\t\t}\n\t\t\treturn {\n\t\t\t\ticon: 'icon-settings-dark',\n\t\t\t\tlabel: t('workflowengine', 'Custom URL'),\n\t\t\t\tid: this.newValue,\n\t\t\t}\n\t\t},\n\t},\n\tmethods: {\n\t\tvalidateRegex(string) {\n\t\t\tconst regexRegex = /^\\/(.*)\\/([gui]{0,3})$/\n\t\t\tconst result = regexRegex.exec(string)\n\t\t\treturn result !== null\n\t\t},\n\t\tsetValue(value) {\n\t\t\t// TODO: check if value requires a regex and set the check operator according to that\n\t\t\tif (value !== null) {\n\t\t\t\tthis.newValue = value.id\n\t\t\t\tthis.$emit('input', this.newValue)\n\t\t\t}\n\t\t},\n\t\tupdateCustom(event) {\n\t\t\tthis.newValue = event.target.value\n\t\t\tthis.$emit('input', this.newValue)\n\t\t},\n\t},\n}\n</script>\n<style scoped lang=\"scss\">\n\t.v-select,\n\tinput[type='text'] {\n\t\twidth: 100%;\n\t}\n\tinput[type='text'] {\n\t\tmin-height: 48px;\n\t}\n\n\t.option__icon {\n\t\tdisplay: inline-block;\n\t\tmin-width: 30px;\n\t\tbackground-position: center;\n\t\tvertical-align: middle;\n\t}\n\n\t.option__title {\n\t\tdisplay: inline-flex;\n\t\twidth: calc(100% - 36px);\n\t\tvertical-align: middle;\n\t}\n</style>\n","<!--\n - SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n<template>\n\t<div>\n\t\t<NcSelect :aria-label-combobox=\"t('workflowengine', 'Select groups')\"\n\t\t\t:aria-label-listbox=\"t('workflowengine', 'Groups')\"\n\t\t\t:clearable=\"false\"\n\t\t\t:loading=\"status.isLoading && groups.length === 0\"\n\t\t\t:placeholder=\"t('workflowengine', 'Type to search for group …')\"\n\t\t\t:options=\"groups\"\n\t\t\t:value=\"currentValue\"\n\t\t\tlabel=\"displayname\"\n\t\t\t@search=\"searchAsync\"\n\t\t\t@input=\"(value) => $emit('input', value.id)\" />\n\t</div>\n</template>\n\n<script>\nimport { translate as t } from '@nextcloud/l10n'\nimport { generateOcsUrl } from '@nextcloud/router'\n\nimport axios from '@nextcloud/axios'\nimport NcSelect from '@nextcloud/vue/dist/Components/NcSelect.js'\n\nconst groups = []\nconst status = {\n\tisLoading: false,\n}\n\nexport default {\n\tname: 'RequestUserGroup',\n\tcomponents: {\n\t\tNcSelect,\n\t},\n\tprops: {\n\t\tvalue: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t\tcheck: {\n\t\t\ttype: Object,\n\t\t\tdefault: () => { return {} },\n\t\t},\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tgroups,\n\t\t\tstatus,\n\t\t}\n\t},\n\tcomputed: {\n\t\tcurrentValue() {\n\t\t\treturn this.groups.find(group => group.id === this.value) || null\n\t\t},\n\t},\n\tasync mounted() {\n\t\t// If empty, load first chunk of groups\n\t\tif (this.groups.length === 0) {\n\t\t\tawait this.searchAsync('')\n\t\t}\n\t\t// If a current group is set but not in our list of groups then search for that group\n\t\tif (this.currentValue === null && this.value) {\n\t\t\tawait this.searchAsync(this.value)\n\t\t}\n\t},\n\tmethods: {\n\t\tt,\n\n\t\tsearchAsync(searchQuery) {\n\t\t\tif (this.status.isLoading) {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tthis.status.isLoading = true\n\t\t\treturn axios.get(generateOcsUrl('cloud/groups/details?limit=20&search={searchQuery}', { searchQuery })).then((response) => {\n\t\t\t\tresponse.data.ocs.data.groups.forEach((group) => {\n\t\t\t\t\tthis.addGroup({\n\t\t\t\t\t\tid: group.id,\n\t\t\t\t\t\tdisplayname: group.displayname,\n\t\t\t\t\t})\n\t\t\t\t})\n\t\t\t\tthis.status.isLoading = false\n\t\t\t}, (error) => {\n\t\t\t\tconsole.error('Error while loading group list', error.response)\n\t\t\t})\n\t\t},\n\t\taddGroup(group) {\n\t\t\tconst index = this.groups.findIndex((item) => item.id === group.id)\n\t\t\tif (index === -1) {\n\t\t\t\tthis.groups.push(group)\n\t\t\t}\n\t\t},\n\t},\n}\n</script>\n<style scoped>\n.v-select {\n\twidth: 100%;\n}\n</style>\n","/**\n * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport RequestUserAgent from './RequestUserAgent.vue'\nimport RequestTime from './RequestTime.vue'\nimport RequestURL from './RequestURL.vue'\nimport RequestUserGroup from './RequestUserGroup.vue'\n\nconst RequestChecks = [\n\t{\n\t\tclass: 'OCA\\\\WorkflowEngine\\\\Check\\\\RequestURL',\n\t\tname: t('workflowengine', 'Request URL'),\n\t\toperators: [\n\t\t\t{ operator: 'is', name: t('workflowengine', 'is') },\n\t\t\t{ operator: '!is', name: t('workflowengine', 'is not') },\n\t\t\t{ operator: 'matches', name: t('workflowengine', 'matches') },\n\t\t\t{ operator: '!matches', name: t('workflowengine', 'does not match') },\n\t\t],\n\t\tcomponent: RequestURL,\n\t},\n\t{\n\t\tclass: 'OCA\\\\WorkflowEngine\\\\Check\\\\RequestTime',\n\t\tname: t('workflowengine', 'Request time'),\n\t\toperators: [\n\t\t\t{ operator: 'in', name: t('workflowengine', 'between') },\n\t\t\t{ operator: '!in', name: t('workflowengine', 'not between') },\n\t\t],\n\t\tcomponent: RequestTime,\n\t},\n\t{\n\t\tclass: 'OCA\\\\WorkflowEngine\\\\Check\\\\RequestUserAgent',\n\t\tname: t('workflowengine', 'Request user agent'),\n\t\toperators: [\n\t\t\t{ operator: 'is', name: t('workflowengine', 'is') },\n\t\t\t{ operator: '!is', name: t('workflowengine', 'is not') },\n\t\t\t{ operator: 'matches', name: t('workflowengine', 'matches') },\n\t\t\t{ operator: '!matches', name: t('workflowengine', 'does not match') },\n\t\t],\n\t\tcomponent: RequestUserAgent,\n\t},\n\t{\n\t\tclass: 'OCA\\\\WorkflowEngine\\\\Check\\\\UserGroupMembership',\n\t\tname: t('workflowengine', 'Group membership'),\n\t\toperators: [\n\t\t\t{ operator: 'is', name: t('workflowengine', 'is member of') },\n\t\t\t{ operator: '!is', name: t('workflowengine', 'is not member of') },\n\t\t],\n\t\tcomponent: RequestUserGroup,\n\t},\n]\n\nexport default RequestChecks\n","/**\n * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport FileChecks from './file.js'\nimport RequestChecks from './request.js'\n\nexport default [...FileChecks, ...RequestChecks]\n","/**\n * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport Vue from 'vue'\nimport Vuex from 'vuex'\nimport store from './store.js'\nimport Settings from './components/Workflow.vue'\nimport ShippedChecks from './components/Checks/index.js'\n\n/**\n * A plugin for displaying a custom value field for checks\n *\n * @typedef {object} CheckPlugin\n * @property {string} class - The PHP class name of the check\n * @property {Comparison[]} operators - A list of possible comparison operations running on the check\n * @property {Vue} component - A vue component to handle the rendering of options\n * The component should handle the v-model directive properly,\n * so it needs a value property to receive data and emit an input\n * event once the data has changed\n * @property {Function} placeholder - Return a placeholder of no custom component is used\n * @property {Function} validate - validate a check if no custom component is used\n */\n\n/**\n * A plugin for extending the admin page representation of an operator\n *\n * @typedef {object} OperatorPlugin\n * @property {string} id - The PHP class name of the check\n * @property {string} operation - Default value for the operation field\n * @property {string} color - Custom color code to be applied for the operator selector\n * @property {Vue} component - A vue component to handle the rendering of options\n * The component should handle the v-model directive properly,\n * so it needs a value property to receive data and emit an input\n * event once the data has changed\n */\n\n/**\n * @typedef {object} Comparison\n * @property {string} operator - value the comparison should have, e.g. !less, greater\n * @property {string} name - Translated readable text, e.g. less or equals\n */\n\n/**\n * Public javascript api for apps to register custom plugins\n */\nwindow.OCA.WorkflowEngine = Object.assign({}, OCA.WorkflowEngine, {\n\n\t/**\n\t *\n\t * @param {CheckPlugin} Plugin the plugin to register\n\t */\n\tregisterCheck(Plugin) {\n\t\tstore.commit('addPluginCheck', Plugin)\n\t},\n\t/**\n\t *\n\t * @param {OperatorPlugin} Plugin the plugin to register\n\t */\n\tregisterOperator(Plugin) {\n\t\tstore.commit('addPluginOperator', Plugin)\n\t},\n})\n\n// Register shipped checks\nShippedChecks.forEach((checkPlugin) => window.OCA.WorkflowEngine.registerCheck(checkPlugin))\n\nVue.use(Vuex)\nVue.prototype.t = t\n\nconst View = Vue.extend(Settings)\nconst workflowengine = new View({\n\tstore,\n})\nworkflowengine.$mount('#workflowengine')\n"],"names":["scopeValue","loadState","getApiUrl","url","generateOcsUrl","Vue","Vuex","store","Store","entity","event","state","rule","index","item","newRule","plugin","context","data","axios","confirmPassword","events","result","valid","rule1","rule2","operation","check","obj","_sfc_main","NcSelect","showWarning","existingEntity","newEntities","value","self","newEntity","validate","binding","isPopup","popupItem","elements","i","len","isServer","vNode","module","el","handler","e","clickHandler","NcActionButton","NcActions","CloseIcon","ClickOutside","operators","operator","matchingOperator","NcButton","ArrowRight","Check","CheckMark","Close","Event","Operation","Tooltip","lastCheck","WorkflowOffSvg","ACTION_LIMIT","ADMIN_SCOPE","MenuDown","MenuUp","NcEmptyContent","NcIconSvgWrapper","NcSettingsSection","Rule","generateUrl","mapGetters","mapState","regexRegex","regexIPv4","regexIPv6","validateRegex","string","validateIPv4","validateIPv6","stringValidator","valueMixin","NcEllipsisedOption","imagePath","type","NcSelectTags","stringOrRegexOperators","FileChecks","FileMimeType","FileSystemTag","root","factory","require$$0","this","moment","VERSION","zones","links","countries","names","guesses","cachedGuess","logError","momentVersion","major","minor","charCodeToInt","charCode","unpackBase60","parts","whole","fractional","multiplier","num","out","sign","arrayToInt","array","intToUntil","length","mapIndices","source","indices","unpack","offsets","untils","Zone","packedString","closest","arr","mid","lo","hi","unpacked","timestamp","target","zone_name","country_code","max","offset","offsetNext","offsetPrev","tz","mom","Country","country_name","zone_names","OffsetAt","at","timeString","abbr","ZoneScore","zone","offsetAt","findChange","low","high","diff","userOffsets","startYear","last","lastOffset","change","next","nextOffset","sortZoneScores","a","b","addToGuesses","name","guessesForUserOffsets","offsetsLength","filteredGuesses","checkedOffsets","j","guessesOffset","rebuildGuess","intlName","normalizeName","zoneScores","zoneScore","getZone","guess","ignoreCache","addZone","packed","split","normalized","caller","link","getNames","getCountryNames","addLink","aliases","alias","normal0","normal1","addCountries","country_zones","getCountry","zonesForCountry","country","with_offset","loadData","zoneExists","needsOffset","m","isUnixTimestamp","message","input","args","fn","keepTime","z","abbrWrap","old","resetZoneWrap","resetZoneWrap2","momentProperties","momentTimezoneModule","require$$1","output","groups","status","group","t","searchQuery","response","error","RequestChecks","RequestURL","RequestTime","RequestUserAgent","RequestUserGroup","ShippedChecks","Plugin","checkPlugin","View","Settings","workflowengine"],"mappings":";wmBAQA,MAAMA,GAAaC,EAAU,iBAAkB,OAAO,IAAM,EAAI,SAAW,OAErE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