photos/js/photos-node_modules_vue-mat...

1 line
42 KiB
XML

{"version":3,"file":"photos-node_modules_vue-material-design-icons_Video_vue-src_views_Tags_vue.js?v=df58bd3e9ae540a3cb20","mappings":";;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;ACvIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;ACpWA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;ACrEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;ACtFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;AC1BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAkBA;AACA;;;;;;;;;;;;;;ACtCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;ACnCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAkBA;AACA;;;;;;;;;;;;;;;;;;ACtCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAkBA;AACA;;;;;;;;;;;;;;;ACvCA;;;;;;;;;;;;;;;ACAA;;;;;;;;;;;;;;;;;;;;;;;;;;;ACAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;ACrDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;AChBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","sources":["webpack:///photos/src/components/Tag.vue?vue&type=script&lang=js&","webpack:///photos/src/views/Tags.vue?vue&type=script&lang=js&","webpack:///photos/src/services/SystemTags.js","webpack:///photos/src/services/TaggedImages.js","webpack:///photos/src/views/Tags.vue?vue&type=style&index=0&id=730c32d3&lang=scss&scoped=true&","webpack://photos/./src/views/Tags.vue?9829","webpack:///photos/node_modules/vue-material-design-icons/Video.vue","webpack:///photos/node_modules/vue-material-design-icons/Video.vue?vue&type=script&lang=js&","webpack:///photos/src/components/Tag.vue","webpack:///photos/src/views/Tags.vue","webpack://photos/./src/components/Tag.vue?86d1","webpack://photos/./src/views/Tags.vue?8481","webpack://photos/./node_modules/vue-material-design-icons/Video.vue?f118","webpack:///photos/node_modules/vue-material-design-icons/Video.vue?vue&type=template&id=ae109f02&","webpack:///photos/src/components/Tag.vue?vue&type=template&id=bb7ceecc&","webpack:///photos/src/views/Tags.vue?vue&type=template&id=730c32d3&scoped=true&"],"sourcesContent":["function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }\n\nfunction _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err); } _next(undefined); }); }; }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\nimport { mapGetters } from 'vuex';\nimport getTaggedImages from '../services/TaggedImages';\nimport cancelableRequest from '../utils/CancelableRequest';\nimport FolderTagPreview from './FolderTagPreview';\nexport default {\n name: 'Tag',\n components: {\n FolderTagPreview: FolderTagPreview\n },\n inheritAttrs: false,\n props: {\n item: {\n type: Object,\n required: true\n }\n },\n data: function data() {\n return {\n cancelRequest: null\n };\n },\n computed: _objectSpread(_objectSpread({}, mapGetters(['files', 'tags'])), {}, {\n // files list of the current folder\n folderContent: function folderContent() {\n return this.tags[this.item.injected.id].files;\n },\n fileList: function fileList() {\n var _this = this;\n\n return this.folderContent ? this.folderContent.map(function (id) {\n return _this.files[id];\n }).filter(function (file) {\n return !!file;\n }).slice(0, 4) // only get the 4 first images\n : [];\n }\n }),\n beforeDestroy: function beforeDestroy() {\n // cancel any pending requests\n if (this.cancelRequest) {\n this.cancelRequest('Navigated away');\n }\n },\n created: function created() {\n var _this2 = this;\n\n return _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {\n var _cancelableRequest, request, cancel, files;\n\n return regeneratorRuntime.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n // init cancellable request\n _cancelableRequest = cancelableRequest(getTaggedImages), request = _cancelableRequest.request, cancel = _cancelableRequest.cancel;\n _this2.cancelRequest = cancel;\n _context.prev = 2;\n _context.next = 5;\n return request(_this2.item.injected.id);\n\n case 5:\n files = _context.sent;\n\n _this2.$store.dispatch('updateTag', {\n id: _this2.item.injected.id,\n files: files\n });\n\n _this2.$store.dispatch('appendFiles', files);\n\n _context.next = 13;\n break;\n\n case 10:\n _context.prev = 10;\n _context.t0 = _context[\"catch\"](2);\n\n if (_context.t0.response && _context.t0.response.status) {\n console.error('Failed to get folder content', _this2.item.injected.id, _context.t0.response);\n }\n\n case 13:\n _context.prev = 13;\n _this2.cancelRequest = null;\n return _context.finish(13);\n\n case 16:\n case \"end\":\n return _context.stop();\n }\n }\n }, _callee, null, [[2, 10, 13, 16]]);\n }))();\n }\n};","function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }\n\nfunction _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err); } _next(undefined); }); }; }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\nimport { mapGetters } from 'vuex';\nimport VirtualGrid from 'vue-virtual-grid';\nimport getSystemTags from '../services/SystemTags';\nimport getTaggedImages from '../services/TaggedImages';\nimport EmptyContent from '../components/EmptyContent';\nimport Tag from '../components/Tag';\nimport File from '../components/File';\nimport Navigation from '../components/Navigation';\nimport GridConfigMixin from '../mixins/GridConfig';\nimport cancelableRequest from '../utils/CancelableRequest';\nexport default {\n name: 'Tags',\n components: {\n VirtualGrid: VirtualGrid,\n EmptyContent: EmptyContent,\n Navigation: Navigation\n },\n mixins: [GridConfigMixin],\n props: {\n rootTitle: {\n type: String,\n required: true\n },\n path: {\n type: String,\n default: ''\n },\n isRoot: {\n type: Boolean,\n default: true\n }\n },\n data: function data() {\n return {\n error: null,\n cancelRequest: null,\n loading: false\n };\n },\n computed: _objectSpread(_objectSpread({}, mapGetters(['files', 'tags', 'tagsNames'])), {}, {\n // current tag id from current path\n tagId: function tagId() {\n return this.$store.getters.tagId(this.path);\n },\n // current tag\n tag: function tag() {\n return this.tags[this.tagId];\n },\n tagsList: function tagsList() {\n var _this = this;\n\n return Object.values(this.tagsNames).map(function (tagsId) {\n return _this.tags[tagsId];\n });\n },\n // files list of the current tag\n fileList: function fileList() {\n var _this2 = this;\n\n return this.tag && this.tag.files.map(function (id) {\n return _this2.files[id];\n }).filter(function (file) {\n return !!file;\n });\n },\n contentList: function contentList() {\n var _this3 = this;\n\n if (this.isRoot) {\n return this.tagsList.flatMap(function (tag) {\n return tag.id === '' ? [] : [{\n id: \"tag-\".concat(tag.id),\n injected: _objectSpread({}, tag),\n width: 256,\n height: 256,\n columnSpan: 1,\n renderComponent: Tag\n }];\n });\n }\n\n return this.fileList.map(function (file) {\n return {\n id: \"file-\".concat(file.fileid),\n injected: _objectSpread(_objectSpread({}, file), {}, {\n list: _this3.fileList\n }),\n width: 256,\n height: 256,\n columnSpan: 1,\n renderComponent: File\n };\n });\n },\n isEmpty: function isEmpty() {\n if (this.isRoot) {\n return Object.keys(this.tagsNames).length === 0;\n }\n\n return this.fileList.length === 0;\n }\n }),\n watch: {\n path: function path() {\n var _this4 = this;\n\n return _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {\n return regeneratorRuntime.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n if (_this4.tagId) {\n _context.next = 3;\n break;\n }\n\n _context.next = 3;\n return _this4.fetchRootContent();\n\n case 3:\n // if we're not in the root, we fetch the data\n if (!_this4.isRoot) {\n _this4.fetchContent();\n }\n\n case 4:\n case \"end\":\n return _context.stop();\n }\n }\n }, _callee);\n }))();\n }\n },\n beforeDestroy: function beforeDestroy() {\n // cancel any pending requests\n if (this.cancelRequest) {\n this.cancelRequest('Navigated away');\n }\n },\n beforeMount: function beforeMount() {\n var _this5 = this;\n\n return _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2() {\n return regeneratorRuntime.wrap(function _callee2$(_context2) {\n while (1) {\n switch (_context2.prev = _context2.next) {\n case 0:\n if (_this5.tagId) {\n _context2.next = 3;\n break;\n }\n\n _context2.next = 3;\n return _this5.fetchRootContent();\n\n case 3:\n // if we're not in the root, we fetch the data\n if (!_this5.isRoot) {\n _this5.fetchContent();\n }\n\n case 4:\n case \"end\":\n return _context2.stop();\n }\n }\n }, _callee2);\n }))();\n },\n methods: {\n fetchRootContent: function fetchRootContent() {\n var _this6 = this;\n\n return _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3() {\n var _cancelableRequest, request, cancel, tags;\n\n return regeneratorRuntime.wrap(function _callee3$(_context3) {\n while (1) {\n switch (_context3.prev = _context3.next) {\n case 0:\n // cancel any pending requests\n if (_this6.cancelRequest) {\n _this6.cancelRequest('Changed folder');\n } // close any potential opened viewer\n\n\n OCA.Viewer.close(); // if we don't already have some cached data let's show a loader\n\n if (!_this6.tags[_this6.tagId]) {\n _this6.loading = true;\n }\n\n _this6.error = null; // init cancellable request\n\n _cancelableRequest = cancelableRequest(getSystemTags), request = _cancelableRequest.request, cancel = _cancelableRequest.cancel;\n _this6.cancelRequest = cancel;\n _context3.prev = 6;\n _context3.next = 9;\n return request();\n\n case 9:\n tags = _context3.sent;\n\n _this6.$store.dispatch('updateTags', tags);\n\n _context3.next = 17;\n break;\n\n case 13:\n _context3.prev = 13;\n _context3.t0 = _context3[\"catch\"](6);\n console.error(_context3.t0);\n _this6.error = true;\n\n case 17:\n _context3.prev = 17;\n // done loading\n _this6.loading = false;\n _this6.cancelRequest = null;\n return _context3.finish(17);\n\n case 21:\n case \"end\":\n return _context3.stop();\n }\n }\n }, _callee3, null, [[6, 13, 17, 21]]);\n }))();\n },\n fetchContent: function fetchContent() {\n var _this7 = this;\n\n return _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee4() {\n var _cancelableRequest2, request, cancel, files;\n\n return regeneratorRuntime.wrap(function _callee4$(_context4) {\n while (1) {\n switch (_context4.prev = _context4.next) {\n case 0:\n // cancel any pending requests\n if (_this7.cancelRequest) {\n _this7.cancelRequest();\n } // close any potential opened viewer\n\n\n OCA.Viewer.close(); // if we don't already have some cached data let's show a loader\n\n if (!_this7.tags[_this7.tagId]) {\n _this7.loading = true;\n }\n\n _this7.error = null; // init cancellable request\n\n _cancelableRequest2 = cancelableRequest(getTaggedImages), request = _cancelableRequest2.request, cancel = _cancelableRequest2.cancel;\n _this7.cancelRequest = cancel;\n _context4.prev = 6;\n _context4.next = 9;\n return request(_this7.tagId);\n\n case 9:\n files = _context4.sent;\n\n _this7.$store.dispatch('updateTag', {\n id: _this7.tagId,\n files: files\n });\n\n _this7.$store.dispatch('appendFiles', files);\n\n _context4.next = 18;\n break;\n\n case 14:\n _context4.prev = 14;\n _context4.t0 = _context4[\"catch\"](6);\n console.error(_context4.t0);\n _this7.error = true;\n\n case 18:\n _context4.prev = 18;\n // done loading\n _this7.loading = false;\n _this7.cancelRequest = null;\n return _context4.finish(18);\n\n case 22:\n case \"end\":\n return _context4.stop();\n }\n }\n }, _callee4, null, [[6, 14, 18, 22]]);\n }))();\n }\n }\n};","function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }\n\nfunction _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err); } _next(undefined); }); }; }\n\n/**\n * @copyright Copyright (c) 2019 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.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 client from './DavClient';\nimport { genFileInfo } from '../utils/fileUtils';\n/**\n * List system tags\n *\n * @param {string} path the path relative to the user root\n * @param {object} [options] optional options for axios\n * @return {Array} the file list\n */\n\nexport default function (_x) {\n return _ref.apply(this, arguments);\n}\n\nfunction _ref() {\n _ref = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(path) {\n var options,\n response,\n _args = arguments;\n return regeneratorRuntime.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n options = _args.length > 1 && _args[1] !== undefined ? _args[1] : {};\n _context.next = 3;\n return client.getDirectoryContents('/systemtags/', Object.assign({}, {\n data: \"<?xml version=\\\"1.0\\\"?>\\n\\t\\t\\t<d:propfind xmlns:d=\\\"DAV:\\\"\\n\\t\\t\\t\\txmlns:oc=\\\"http://owncloud.org/ns\\\">\\n\\t\\t\\t\\t<d:prop>\\n\\t\\t\\t\\t\\t<oc:id />\\n\\t\\t\\t\\t\\t<oc:display-name />\\n\\t\\t\\t\\t\\t<oc:user-visible />\\n\\t\\t\\t\\t\\t<oc:user-assignable />\\n\\t\\t\\t\\t\\t<oc:can-assign />\\n\\t\\t\\t\\t</d:prop>\\n\\t\\t\\t</d:propfind>\",\n details: true\n }, options));\n\n case 3:\n response = _context.sent;\n return _context.abrupt(\"return\", response.data.map(function (data) {\n return genFileInfo(data);\n }));\n\n case 5:\n case \"end\":\n return _context.stop();\n }\n }\n }, _callee);\n }));\n return _ref.apply(this, arguments);\n}","function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }\n\nfunction _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err); } _next(undefined); }); }; }\n\n/**\n * @copyright Copyright (c) 2019 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.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 { genFileInfo } from '../utils/fileUtils';\nimport { getCurrentUser } from '@nextcloud/auth';\nimport { props } from './DavRequest';\nimport allowedMimes from './AllowedMimes';\nimport client from './DavClient';\n/**\n * Get tagged files based on provided tag id\n *\n * @param {number} id the tag id to filter\n * @param {object} [options] optional options for axios\n * @return {Array} the file list\n */\n\nexport default function (_x) {\n return _ref.apply(this, arguments);\n}\n\nfunction _ref() {\n _ref = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(id) {\n var options,\n prefixPath,\n response,\n _args = arguments;\n return regeneratorRuntime.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n options = _args.length > 1 && _args[1] !== undefined ? _args[1] : {};\n options = Object.assign({\n method: 'REPORT',\n data: \"<?xml version=\\\"1.0\\\"?>\\n\\t\\t\\t<oc:filter-files\\n\\t\\t\\t\\txmlns:d=\\\"DAV:\\\"\\n\\t\\t\\t\\txmlns:oc=\\\"http://owncloud.org/ns\\\"\\n\\t\\t\\t\\txmlns:nc=\\\"http://nextcloud.org/ns\\\"\\n\\t\\t\\t\\txmlns:ocs=\\\"http://open-collaboration-services.org/ns\\\">\\n\\t\\t\\t\\t<d:prop>\\n\\t\\t\\t\\t\\t\".concat(props, \"\\n\\t\\t\\t\\t</d:prop>\\n\\t\\t\\t\\t<oc:filter-rules>\\n\\t\\t\\t\\t\\t<oc:systemtag>\").concat(id, \"</oc:systemtag>\\n\\t\\t\\t\\t</oc:filter-rules>\\n\\t\\t\\t</oc:filter-files>\"),\n details: true\n }, options);\n prefixPath = \"/files/\".concat(getCurrentUser().uid);\n _context.next = 5;\n return client.getDirectoryContents(prefixPath, options);\n\n case 5:\n response = _context.sent;\n return _context.abrupt(\"return\", response.data.map(function (data) {\n return genFileInfo(data);\n }) // filter out unwanted mime because server REPORT service only support\n // hardcoded props and mime is not one of them\n // https://github.com/nextcloud/server/blob/5bf3d1bb384da56adbf205752be8f840aac3b0c5/apps/dav/lib/Connector/Sabre/FilesReportPlugin.php#L274\n .filter(function (file) {\n return file.mime && allowedMimes.indexOf(file.mime) !== -1;\n }) // remove prefix path from full file path\n .map(function (data) {\n return Object.assign({}, data, {\n filename: data.filename.replace(prefixPath, '')\n });\n }));\n\n case 7:\n case \"end\":\n return _context.stop();\n }\n }\n }, _callee);\n }));\n return _ref.apply(this, arguments);\n}","// Imports\nimport ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ from \"../../node_modules/css-loader/dist/runtime/noSourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \"@charset \\\"UTF-8\\\";\\n/**\\n * @copyright Copyright (c) 2019 John Molakvoæ <skjnldsv@protonmail.com>\\n *\\n * @author John Molakvoæ <skjnldsv@protonmail.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 */\\n@media (min-width: 0px) and (max-width: 400px) {\\n.grid-container[data-v-730c32d3] {\\n padding: 0px 8px 256px 8px;\\n}\\n}\\n@media (min-width: 400px) and (max-width: 700px) {\\n.grid-container[data-v-730c32d3] {\\n padding: 0px 8px 256px 8px;\\n}\\n}\\n@media (min-width: 700px) and (max-width: 1024px) {\\n.grid-container[data-v-730c32d3] {\\n padding: 0px 44px 256px 44px;\\n}\\n}\\n@media (min-width: 1024px) and (max-width: 1280px) {\\n.grid-container[data-v-730c32d3] {\\n padding: 0px 44px 256px 44px;\\n}\\n}\\n@media (min-width: 1280px) and (max-width: 1440px) {\\n.grid-container[data-v-730c32d3] {\\n padding: 0px 66px 256px 66px;\\n}\\n}\\n@media (min-width: 1440px) and (max-width: 1600px) {\\n.grid-container[data-v-730c32d3] {\\n padding: 0px 66px 256px 66px;\\n}\\n}\\n@media (min-width: 1600px) and (max-width: 2048px) {\\n.grid-container[data-v-730c32d3] {\\n padding: 0px 66px 256px 66px;\\n}\\n}\\n@media (min-width: 2048px) and (max-width: 2560px) {\\n.grid-container[data-v-730c32d3] {\\n padding: 0px 88px 256px 88px;\\n}\\n}\\n@media (min-width: 2560px) and (max-width: 3440px) {\\n.grid-container[data-v-730c32d3] {\\n padding: 0px 88px 256px 88px;\\n}\\n}\\n@media (min-width: 3440px) {\\n.grid-container[data-v-730c32d3] {\\n padding: 0px 88px 256px 88px;\\n}\\n}\", \"\"]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","\n import API from \"!../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../node_modules/css-loader/dist/cjs.js!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/dist/cjs.js!../../node_modules/sass-loader/dist/cjs.js??clonedRuleSet-2[0].rules[0].use[3]!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Tags.vue?vue&type=style&index=0&id=730c32d3&lang=scss&scoped=true&\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\n\n options.insert = insertFn.bind(null, \"head\");\n \noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../node_modules/css-loader/dist/cjs.js!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/dist/cjs.js!../../node_modules/sass-loader/dist/cjs.js??clonedRuleSet-2[0].rules[0].use[3]!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Tags.vue?vue&type=style&index=0&id=730c32d3&lang=scss&scoped=true&\";\n export default content && content.locals ? content.locals : undefined;\n","import { render, staticRenderFns } from \"./Video.vue?vue&type=template&id=ae109f02&\"\nimport script from \"./Video.vue?vue&type=script&lang=js&\"\nexport * from \"./Video.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"/home/admin/Docker/apps2/photos/node_modules/vue-hot-reload-api/dist/index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('ae109f02')) {\n api.createRecord('ae109f02', component.options)\n } else {\n api.reload('ae109f02', component.options)\n }\n module.hot.accept(\"./Video.vue?vue&type=template&id=ae109f02&\", function () {\n api.rerender('ae109f02', {\n render: render,\n staticRenderFns: staticRenderFns\n })\n })\n }\n}\ncomponent.options.__file = \"node_modules/vue-material-design-icons/Video.vue\"\nexport default component.exports","//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\nexport default {\n name: \"VideoIcon\",\n props: {\n title: {\n type: String,\n },\n fillColor: {\n type: String,\n default: \"currentColor\"\n },\n size: {\n type: Number,\n default: 24\n }\n }\n}\n","import { render, staticRenderFns } from \"./Tag.vue?vue&type=template&id=bb7ceecc&\"\nimport script from \"./Tag.vue?vue&type=script&lang=js&\"\nexport * from \"./Tag.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"/home/admin/Docker/apps2/photos/node_modules/vue-hot-reload-api/dist/index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('bb7ceecc')) {\n api.createRecord('bb7ceecc', component.options)\n } else {\n api.reload('bb7ceecc', component.options)\n }\n module.hot.accept(\"./Tag.vue?vue&type=template&id=bb7ceecc&\", function () {\n api.rerender('bb7ceecc', {\n render: render,\n staticRenderFns: staticRenderFns\n })\n })\n }\n}\ncomponent.options.__file = \"src/components/Tag.vue\"\nexport default component.exports","import { render, staticRenderFns } from \"./Tags.vue?vue&type=template&id=730c32d3&scoped=true&\"\nimport script from \"./Tags.vue?vue&type=script&lang=js&\"\nexport * from \"./Tags.vue?vue&type=script&lang=js&\"\nimport style0 from \"./Tags.vue?vue&type=style&index=0&id=730c32d3&lang=scss&scoped=true&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"730c32d3\",\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"/home/admin/Docker/apps2/photos/node_modules/vue-hot-reload-api/dist/index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('730c32d3')) {\n api.createRecord('730c32d3', component.options)\n } else {\n api.reload('730c32d3', component.options)\n }\n module.hot.accept(\"./Tags.vue?vue&type=template&id=730c32d3&scoped=true&\", function () {\n api.rerender('730c32d3', {\n render: render,\n staticRenderFns: staticRenderFns\n })\n })\n }\n}\ncomponent.options.__file = \"src/views/Tags.vue\"\nexport default component.exports","import mod from \"-!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Tag.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Tag.vue?vue&type=script&lang=js&\"","import mod from \"-!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Tags.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Tags.vue?vue&type=script&lang=js&\"","import mod from \"-!../vue-loader/lib/index.js??vue-loader-options!./Video.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../vue-loader/lib/index.js??vue-loader-options!./Video.vue?vue&type=script&lang=js&\"","var render = function () {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\n \"span\",\n _vm._b(\n {\n staticClass: \"material-design-icon video-icon\",\n attrs: {\n \"aria-hidden\": !_vm.title,\n \"aria-label\": _vm.title,\n role: \"img\",\n },\n on: {\n click: function ($event) {\n return _vm.$emit(\"click\", $event)\n },\n },\n },\n \"span\",\n _vm.$attrs,\n false\n ),\n [\n _c(\n \"svg\",\n {\n staticClass: \"material-design-icon__svg\",\n attrs: {\n fill: _vm.fillColor,\n width: _vm.size,\n height: _vm.size,\n viewBox: \"0 0 24 24\",\n },\n },\n [\n _c(\n \"path\",\n {\n attrs: {\n d: \"M17,10.5V7A1,1 0 0,0 16,6H4A1,1 0 0,0 3,7V17A1,1 0 0,0 4,18H16A1,1 0 0,0 17,17V13.5L21,17.5V6.5L17,10.5Z\",\n },\n },\n [_vm.title ? _c(\"title\", [_vm._v(_vm._s(_vm.title))]) : _vm._e()]\n ),\n ]\n ),\n ]\n )\n}\nvar staticRenderFns = []\nrender._withStripped = true\n\nexport { render, staticRenderFns }","var render = function () {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\"FolderTagPreview\", {\n attrs: {\n id: _vm.item.injected.id,\n icon: \"icon-tag\",\n name: _vm.item.injected.displayName,\n path: _vm.item.injected.displayName,\n \"file-list\": _vm.fileList,\n },\n })\n}\nvar staticRenderFns = []\nrender._withStripped = true\n\nexport { render, staticRenderFns }","var render = function () {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _vm.error\n ? _c(\"EmptyContent\", [\n _vm._v(\"\\n\\t\" + _vm._s(_vm.t(\"photos\", \"An error occurred\")) + \"\\n\"),\n ])\n : !_vm.loading\n ? _c(\n \"div\",\n [\n _c(\"Navigation\", {\n key: \"navigation\",\n attrs: {\n basename: _vm.path,\n filename: \"/\" + _vm.path,\n \"root-title\": _vm.rootTitle,\n },\n }),\n _vm._v(\" \"),\n _vm.isEmpty\n ? _c(\n \"EmptyContent\",\n {\n key: \"emptycontent\",\n attrs: { \"illustration-name\": \"empty\" },\n scopedSlots: _vm._u(\n [\n {\n key: \"desc\",\n fn: function () {\n return [\n _vm._v(\n \"\\n\\t\\t\\t\" +\n _vm._s(\n _vm.t(\n \"photos\",\n \"Photos with tags will show up here\"\n )\n ) +\n \"\\n\\t\\t\"\n ),\n ]\n },\n proxy: true,\n },\n ],\n null,\n false,\n 4132175345\n ),\n },\n [\n _vm._v(\n \"\\n\\t\\t\" + _vm._s(_vm.t(\"photos\", \"No tags yet\")) + \"\\n\\t\\t\"\n ),\n ]\n )\n : _c(\n \"div\",\n { staticClass: \"grid-container\" },\n [\n _c(\"VirtualGrid\", {\n ref: \"virtualgrid\",\n attrs: {\n items: _vm.contentList,\n \"get-column-count\": function () {\n return _vm.gridConfig.count\n },\n \"get-grid-gap\": function () {\n return _vm.gridConfig.gap\n },\n },\n }),\n ],\n 1\n ),\n ],\n 1\n )\n : _vm._e()\n}\nvar staticRenderFns = []\nrender._withStripped = true\n\nexport { render, staticRenderFns }"],"names":[],"sourceRoot":""}