photos/js/photos-src_mixins_FetchFile...

1 line
56 KiB
XML

{"version":3,"file":"photos-src_mixins_FetchFilesMixin_js-src_mixins_FilesSelectionMixin_js-node_modules_vue-material-des-d0b874.js?v=f92cac9386133df01c09","mappings":";+xCA0Ce,aAAf,gFAAe,kIAAeA,EAAf,+BAAsB,GAAIC,EAA1B,+BAAoC,CAAC,EAEnDA,EAAU,EAAH,CACNC,YAAa,EACbC,UAAW,IACXC,UAAWC,EAAAA,GACXC,WAAW,EACXC,eAAe,GACZN,GAGEO,EAXQ,kBAWeC,EAAAA,EAAAA,MAAiBC,KAIxCC,EAASV,EAAQG,UAAUQ,QAAO,SAACC,EAAKC,GAAN,gBAAkBD,EAAlB,wGAKzBC,EALyB,mCAOrC,IAEGC,EAAcd,EAAQM,cAAR,yHAOjB,GAEGD,EAAYL,EAAQK,UAAR,gBACNU,MAAM,IAAIC,KAAK,GACxBC,KAAI,SAACC,EAAGC,GACR,IAAMC,EAAQC,IAAOC,KAAKC,OAAOC,QAAQ,OAAOC,SAAS,EAAG,KAAKA,SAASN,EAAQ,EAAG,KAC/EO,EAAML,IAAOC,KAAKC,OAAOI,MAAM,OAAOC,IAAI,EAAG,KAAKH,SAASN,EAAQ,EAAG,KAC5E,0IAKcC,EAAMS,OAAOR,IAAAA,kBAL3B,2JAWcK,EAAIG,OAAOR,IAAAA,kBAXzB,gDAcA,IAAES,KAAK,MAnBQ,WAoBf,GAEH9B,EAAU+B,OAAOC,OAAO,CACvBC,OAAQ,SACRC,QAAS,CACR,eAAgB,YAEjBC,KAAM,4XAAF,OASGC,EAAAA,EATH,4HAcW7B,EAdX,YAcyBR,EAdzB,8LAqBIW,EArBJ,kDAuBGI,EAvBH,2BAwBGT,EAxBH,wRAkCcL,EAAQE,UAlCtB,sDAmCkBF,EAAQC,YAnC1B,+FAuCJoC,MAAM,EACNC,SAAS,GACPtC,GArGW,UAuGSuC,EAAAA,EAAAA,qBAA4B,GAAIvC,GAvGzC,eAuGRwC,EAvGQ,yBA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ID,EAAIC,IAAIjC,YAAY,YAAYqD,MAAM,CAAC,oCAAqCrB,EAAItB,MAAM,GAAGS,eAAee,MAAM,CAAEd,OAAUY,EAAU,OAAI,OAAStC,EAAIqC,GAAIC,EAAS,OAAE,SAASpB,GAAM,OAAOf,EAAG,KAAK,CAACoC,IAAIrB,EAAKvC,GAAG6D,MAAM,CAAGX,MAAOX,EAAKC,MAAUmB,EAAIZ,OAASR,EAAKC,MAAS,KAAQ,OAAQO,OAAUY,EAAU,OAAI,OAAS,CAACtC,EAAIyC,GAAG,UAAU,KAAK,CAAC,KAAOvB,EAAK,WAAaoB,EAAIsB,cAAc,EAAE,IAAG,EAAE,IAAG,EAAE,GAAI5D,EAAW,QAAE,CAACuC,IAAI,SAASY,GAAG,WAAW,MAAO,CAAChD,EAAG,SAAS,CAACG,YAAY,8BAA8B,EAAEgD,OAAM,GAAM,MAAM,MAAK,IAAO,QAAQ,EAAE,GACplB,IaOpB,EACA,KACA,WACA,MAI8B","sources":["webpack:///photos/src/services/PhotoSearch.js","webpack:///photos/src/mixins/FetchFilesMixin.js","webpack:///photos/src/mixins/FilesSelectionMixin.js","webpack:///photos/src/components/FilesListViewer.vue?vue&type=style&index=0&id=5196d262&lang=scss&scoped=true&","webpack:///photos/src/components/TiledLayout.vue?vue&type=style&index=0&id=58b32a0e&scoped=true&lang=scss&","webpack:///photos/src/components/TiledRows.vue?vue&type=style&index=0&id=452165e4&lang=scss&scoped=true&","webpack:///photos/node_modules/vue-material-design-icons/Download.vue","webpack:///photos/node_modules/vue-material-design-icons/Download.vue?vue&type=script&lang=js&","webpack://photos/./node_modules/vue-material-design-icons/Download.vue?b226","webpack:///photos/node_modules/vue-material-design-icons/Download.vue?vue&type=template&id=67aea606&","webpack:///photos/src/components/FilesListViewer.vue?vue&type=template&id=5196d262&scoped=true&","webpack:///photos/src/services/TiledLayout.js","webpack:///photos/src/components/TiledRows.vue?vue&type=template&id=452165e4&scoped=true&functional=true&","webpack://photos/./src/components/TiledRows.vue?b166","webpack:///photos/src/components/TiledLayout.vue","webpack:///photos/src/components/TiledLayout.vue?vue&type=script&lang=js&","webpack:///photos/src/components/TiledRows.vue","webpack://photos/./src/components/TiledLayout.vue?7709","webpack://photos/./src/components/TiledLayout.vue?e02f","webpack:///photos/src/components/TiledLayout.vue?vue&type=template&id=58b32a0e&scoped=true&","webpack:///photos/src/components/FilesListViewer.vue","webpack:///photos/src/components/FilesListViewer.vue?vue&type=script&lang=js&","webpack://photos/./src/components/FilesListViewer.vue?620d","webpack://photos/./src/components/FilesListViewer.vue?5a4f"],"sourcesContent":["/**\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\nimport { genFileInfo } from '../utils/fileUtils.js'\nimport { getCurrentUser } from '@nextcloud/auth'\nimport { allMimes } from './AllowedMimes.js'\nimport client from './DavClient.js'\nimport { props } from './DavRequest.js'\nimport moment from '@nextcloud/moment'\n\n/**\n * List files from a folder and filter out unwanted mimes\n *\n * @param {object} path the lookup path\n * @param {object} [options] used for the cancellable requests\n * @param {number} [options.firstResult=0] Index of the first result that we want (starts at 0)\n * @param {number} [options.nbResults=200] The number of file to fetch\n * @param {string[]} [options.mimesType=allMimes] Mime type of the files\n * @param {boolean} [options.full=false] get full data of the files\n * @param {boolean} [options.onThisDay=false] get only items from this day of year\n * @param {boolean} [options.onlyFavorites=false] get only favorite items\n * @return {Promise<object[]>} the file list\n */\nexport default async function(path = '', options = {}) {\n\t// default function options\n\toptions = {\n\t\tfirstResult: 0,\n\t\tnbResults: 200,\n\t\tmimesType: allMimes,\n\t\tonThisDay: false,\n\t\tonlyFavorites: false,\n\t\t...options,\n\t}\n\n\tconst prefixPath = `/files/${getCurrentUser().uid}`\n\n\t// generating the search or condition\n\t// based on the allowed mimetypes\n\tconst orMime = options.mimesType.reduce((str, mime) => `${str}\n\t\t<d:eq>\n\t\t\t<d:prop>\n\t\t\t\t<d:getcontenttype/>\n\t\t\t</d:prop>\n\t\t\t<d:literal>${mime}</d:literal>\n\t\t</d:eq>\n\t`, '')\n\n\tconst eqFavorites = options.onlyFavorites\n\t\t? `<d:eq>\n\t\t\t\t<d:prop>\n\t\t\t\t\t<oc:favorite/>\n\t\t\t\t</d:prop>\n\t\t\t\t<d:literal>1</d:literal>\n\t\t\t</d:eq>`\n\t\t: ''\n\n\tconst onThisDay = options.onThisDay\n\t\t? `<d:or>${Array(20).fill(1)\n\t\t\t.map((_, years) => {\n\t\t\t\tconst start = moment(Date.now()).startOf('day').subtract(3, 'd').subtract(years + 1, 'y')\n\t\t\t\tconst end = moment(Date.now()).endOf('day').add(3, 'd').subtract(years + 1, 'y')\n\t\t\t\treturn `<d:and>\n\t\t\t\t<d:gt>\n\t\t\t\t\t<d:prop>\n\t\t\t\t\t\t<d:getlastmodified />\n\t\t\t\t\t</d:prop>\n\t\t\t\t\t<d:literal>${start.format(moment.defaultFormatUtc)}</d:literal>\n\t\t\t\t</d:gt>\n\t\t\t\t<d:lt>\n\t\t\t\t\t<d:prop>\n\t\t\t\t\t\t<d:getlastmodified />\n\t\t\t\t\t</d:prop>\n\t\t\t\t\t<d:literal>${end.format(moment.defaultFormatUtc)}</d:literal>\n\t\t\t\t</d:lt>\n\t\t\t</d:and>`\n\t\t\t}).join('\\n')}</d:or>`\n\t\t: ''\n\n\toptions = Object.assign({\n\t\tmethod: 'SEARCH',\n\t\theaders: {\n\t\t\t'content-Type': 'text/xml',\n\t\t},\n\t\tdata: `<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\t\t\t<d:searchrequest xmlns: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:ns=\"https://github.com/icewind1991/SearchDAV/ns\"\n\t\t\t\txmlns:ocs=\"http://open-collaboration-services.org/ns\">\n\t\t\t\t<d:basicsearch>\n\t\t\t\t\t<d:select>\n\t\t\t\t\t\t<d:prop>\n\t\t\t\t\t\t\t${props}\n\t\t\t\t\t\t</d:prop>\n\t\t\t\t\t</d:select>\n\t\t\t\t\t<d:from>\n\t\t\t\t\t\t<d:scope>\n\t\t\t\t\t\t\t<d:href>${prefixPath}/${path}</d:href>\n\t\t\t\t\t\t\t<d:depth>infinity</d:depth>\n\t\t\t\t\t\t</d:scope>\n\t\t\t\t\t</d:from>\n\t\t\t\t\t<d:where>\n\t\t\t\t\t\t<d:and>\n\t\t\t\t\t\t\t<d:or>\n\t\t\t\t\t\t\t\t${orMime}\n\t\t\t\t\t\t\t</d:or>\n\t\t\t\t\t\t\t${eqFavorites}\n\t\t\t\t\t\t\t${onThisDay}\n\t\t\t\t\t\t</d:and>\n\t\t\t\t\t</d:where>\n\t\t\t\t\t<d:orderby>\n\t\t\t\t\t\t<d:order>\n\t\t\t\t\t\t\t<d:prop><d:getlastmodified/></d:prop>\n\t\t\t\t\t\t\t<d:descending/>\n\t\t\t\t\t\t</d:order>\n\t\t\t\t\t</d:orderby>\n\t\t\t\t\t<d:limit>\n\t\t\t\t\t\t<d:nresults>${options.nbResults}</d:nresults>\n\t\t\t\t\t\t<ns:firstresult>${options.firstResult}</ns:firstresult>\n\t\t\t\t\t</d:limit>\n\t\t\t\t</d:basicsearch>\n\t\t\t</d:searchrequest>`,\n\t\tdeep: true,\n\t\tdetails: true,\n\t}, options)\n\n\tconst response = await client.getDirectoryContents('', options)\n\n\treturn response.data\n\t\t.map(data => genFileInfo(data))\n\t\t// remove prefix path from full file path\n\t\t.map(data => ({ ...data, filename: data.filename.replace(prefixPath, '') }))\n\n}\n","/**\n * @copyright Copyright (c) 2022 Louis Chemineau <louis@chmn.me>\n *\n * @author Louis Chemineau <louis@chmn.me>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\n\nimport logger from '../services/logger.js'\nimport getPhotos from '../services/PhotoSearch.js'\nimport cancelableRequest from '../utils/CancelableRequest.js'\nimport SemaphoreWithPriority from '../utils/semaphoreWithPriority.js'\n\nexport default {\n\tname: 'FetchFilesMixin',\n\n\tdata() {\n\t\treturn {\n\t\t\terrorFetchingFiles: null,\n\t\t\tloadingFiles: false,\n\t\t\tdoneFetchingFiles: false,\n\t\t\tcancelFilesRequest: () => { },\n\t\t\tsemaphore: new SemaphoreWithPriority(30),\n\t\t\tfetchSemaphore: new SemaphoreWithPriority(1),\n\t\t\tsemaphoreSymbol: null,\n\t\t\tfetchedFileIds: [],\n\t\t}\n\t},\n\n\tbeforeDestroy() {\n\t\tif (this.cancelFilesRequest) {\n\t\t\tthis.cancelFilesRequest('Changed view')\n\t\t}\n\t},\n\n\tbeforeRouteLeave(from, to, next) {\n\t\tif (this.cancelFilesRequest) {\n\t\t\tthis.cancelFilesRequest('Changed view')\n\t\t}\n\t\treturn next()\n\t},\n\n\twatch: {\n\t\t$route() {\n\t\t\tthis.resetFetchFilesState()\n\t\t},\n\t},\n\n\tmethods: {\n\t\t/**\n\t\t * @param {string} path - Path to pass to getPhotos.\n\t\t * @param {object} options - Options to pass to getPhotos.\n\t\t * @param {string[]} [blacklist=[]] - Array of ids to filter out.\n\t\t * @return {Promise<string[]>} - The next batch of data depending on global offset.\n\t\t */\n\t\tasync fetchFiles(path = '', options = {}, blacklist = []) {\n\t\t\tif (this.doneFetchingFiles || this.loadingFiles) {\n\t\t\t\treturn []\n\t\t\t}\n\n\t\t\tconst semaphoreSymbol = await this.semaphore.acquire(() => 0, 'fetchFiles')\n\t\t\tconst fetchSemaphoreSymbol = await this.fetchSemaphore.acquire()\n\n\t\t\ttry {\n\t\t\t\tthis.errorFetchingFiles = null\n\t\t\t\tthis.loadingFiles = true\n\t\t\t\tthis.semaphoreSymbol = semaphoreSymbol\n\n\t\t\t\tconst { request, cancel } = cancelableRequest(getPhotos)\n\t\t\t\tthis.cancelFilesRequest = cancel\n\n\t\t\t\tconst numberOfImagesPerBatch = 1000\n\n\t\t\t\t// Load next batch of images\n\t\t\t\tconst fetchedFiles = await request(path, {\n\t\t\t\t\tfirstResult: this.fetchedFileIds.length,\n\t\t\t\t\tnbResults: numberOfImagesPerBatch,\n\t\t\t\t\t...options,\n\t\t\t\t})\n\n\t\t\t\t// If we get less files than requested that means we got to the end\n\t\t\t\tif (fetchedFiles.length !== numberOfImagesPerBatch) {\n\t\t\t\t\tthis.doneFetchingFiles = true\n\t\t\t\t}\n\n\t\t\t\tconst fileIds = fetchedFiles\n\t\t\t\t\t.map(file => file.fileid)\n\t\t\t\t\t.filter(fileId => !this.fetchedFileIds.includes(fileId)) // Filter to prevent duplicate fileIds.\n\n\t\t\t\tthis.fetchedFileIds.push(\n\t\t\t\t\t...fileIds\n\t\t\t\t\t\t.map((fileId) => fileId.toString())\n\t\t\t\t\t\t.filter((fileId) => !blacklist.includes(fileId))\n\t\t\t\t)\n\n\t\t\t\tthis.$store.dispatch('appendFiles', fetchedFiles)\n\n\t\t\t\tlogger.debug(`[FetchFilesMixin] Fetched ${fileIds.length} new files: `, fileIds)\n\n\t\t\t\treturn fileIds\n\t\t\t} catch (error) {\n\t\t\t\tif (error.response?.status === 404) {\n\t\t\t\t\tthis.errorFetchingFiles = 404\n\t\t\t\t} else if (error.code === 'ERR_CANCELED') {\n\t\t\t\t\treturn []\n\t\t\t\t} else {\n\t\t\t\t\tthis.errorFetchingFiles = error\n\t\t\t\t}\n\n\t\t\t\t// cancelled request, moving on...\n\t\t\t\tlogger.error('Error fetching files', error)\n\t\t\t\tconsole.error(error)\n\t\t\t} finally {\n\t\t\t\tthis.loadingFiles = false\n\t\t\t\tthis.cancelFilesRequest = () => { }\n\t\t\t\tthis.semaphore.release(semaphoreSymbol)\n\t\t\t\tthis.fetchSemaphore.release(fetchSemaphoreSymbol)\n\t\t\t}\n\n\t\t\treturn []\n\t\t},\n\n\t\tresetFetchFilesState() {\n\t\t\tthis.doneFetchingFiles = false\n\t\t\tthis.errorFetchingFiles = null\n\t\t\tthis.loadingFiles = false\n\t\t\tthis.fetchedFileIds = []\n\t\t\tthis.cancelFilesRequest = () => { }\n\t\t},\n\t},\n}\n","/**\n * @copyright Copyright (c) 2019 Louis Chemineau <louis@chmn.me>\n *\n * @author Louis Chemineau <louis@chmn.me>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\n\nexport default {\n\tname: 'FilesSelectionMixin',\n\n\tdata() {\n\t\treturn {\n\t\t\t/** @type {Object<string, boolean>} */\n\t\t\tselection: {},\n\t\t}\n\t},\n\n\tmethods: {\n\t\tonFileSelectToggle({ id, value }) {\n\t\t\tthis.$set(this.selection, id, value)\n\t\t},\n\n\t\t/**\n\t\t * @param {string[]} filesIds - The ids of the files to uncheck.\n\t\t */\n\t\tonUncheckFiles(filesIds) {\n\t\t\tfilesIds.forEach((/** @type {string} */ filesId) => this.$set(this.selection, filesId, false))\n\t\t},\n\n\t\tresetSelection() {\n\t\t\tthis.selection = {}\n\t\t},\n\t},\n\n\tcomputed: {\n\t\t/**\n\t\t * @return {string[]}\n\t\t */\n\t\tselectedFileIds() {\n\t\t\treturn Object.keys(this.selection).filter(fileId => this.selection[fileId])\n\t\t},\n\t},\n}\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../node_modules/css-loader/dist/runtime/sourceMaps.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_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".files-list-viewer[data-v-5196d262]{height:100%;position:relative}.files-list-viewer[data-v-5196d262] .empty-content__icon{width:200px;height:200px}.files-list-viewer[data-v-5196d262] .empty-content__icon .empty-content-illustration svg{width:200px;height:200px}.files-list-viewer .tiled-row[data-v-5196d262]{display:flex}.files-list-viewer__section-header[data-v-5196d262]{position:-webkit-sticky;position:sticky;top:0;z-index:3;background:var(--color-main-background)}.files-list-viewer__loader[data-v-5196d262]{margin:50px 0}\", \"\",{\"version\":3,\"sources\":[\"webpack://./src/components/FilesListViewer.vue\"],\"names\":[],\"mappings\":\"AAiNA,oCACC,WAAA,CACA,iBAAA,CAEA,0DACC,WAAA,CACA,YAAA,CAEA,0FACC,WAAA,CACA,YAAA,CAIF,+CACC,YAAA,CAGD,oDACC,uBAAA,CAAA,eAAA,CACA,KAAA,CACA,SAAA,CACA,uCAAA,CAGD,4CACC,aAAA\",\"sourcesContent\":[\"$sizes: (\\\"400\\\": (\\\"count\\\": 3, \\\"marginTop\\\": 66, \\\"marginW\\\": 8), \\\"700\\\": (\\\"count\\\": 4, \\\"marginTop\\\": 66, \\\"marginW\\\": 8), \\\"1024\\\": (\\\"count\\\": 5, \\\"marginTop\\\": 66, \\\"marginW\\\": 44), \\\"1280\\\": (\\\"count\\\": 4, \\\"marginTop\\\": 66, \\\"marginW\\\": 44), \\\"1440\\\": (\\\"count\\\": 5, \\\"marginTop\\\": 88, \\\"marginW\\\": 66), \\\"1600\\\": (\\\"count\\\": 6, \\\"marginTop\\\": 88, \\\"marginW\\\": 66), \\\"2048\\\": (\\\"count\\\": 7, \\\"marginTop\\\": 88, \\\"marginW\\\": 66), \\\"2560\\\": (\\\"count\\\": 8, \\\"marginTop\\\": 88, \\\"marginW\\\": 88), \\\"3440\\\": (\\\"count\\\": 9, \\\"marginTop\\\": 88, \\\"marginW\\\": 88), \\\"max\\\": (\\\"count\\\": 10, \\\"marginTop\\\": 88, \\\"marginW\\\": 88));\\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\\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\\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\\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\\n.files-list-viewer {\\n\\theight: 100%;\\n\\tposition: relative;\\n\\n\\t::v-deep .empty-content__icon {\\n\\t\\twidth: 200px;\\n\\t\\theight: 200px;\\n\\n\\t\\t.empty-content-illustration svg {\\n\\t\\t\\twidth: 200px;\\n\\t\\t\\theight: 200px;\\n\\t\\t}\\n\\t}\\n\\n\\t.tiled-row {\\n\\t\\tdisplay: flex;\\n\\t}\\n\\n\\t&__section-header {\\n\\t\\tposition: sticky;\\n\\t\\ttop: 0;\\n\\t\\tz-index: 3;\\n\\t\\tbackground: var(--color-main-background);\\n\\t}\\n\\n\\t&__loader {\\n\\t\\tmargin: 50px 0;\\n\\t}\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../node_modules/css-loader/dist/runtime/sourceMaps.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_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".tiled-container[data-v-58b32a0e]{height:100%}.tiled-container .tiled-row[data-v-58b32a0e]{display:flex}\", \"\",{\"version\":3,\"sources\":[\"webpack://./src/components/TiledLayout.vue\"],\"names\":[],\"mappings\":\"AA8FA,kCACC,WAAA,CAEA,6CACC,YAAA\",\"sourcesContent\":[\"$sizes: (\\\"400\\\": (\\\"count\\\": 3, \\\"marginTop\\\": 66, \\\"marginW\\\": 8), \\\"700\\\": (\\\"count\\\": 4, \\\"marginTop\\\": 66, \\\"marginW\\\": 8), \\\"1024\\\": (\\\"count\\\": 5, \\\"marginTop\\\": 66, \\\"marginW\\\": 44), \\\"1280\\\": (\\\"count\\\": 4, \\\"marginTop\\\": 66, \\\"marginW\\\": 44), \\\"1440\\\": (\\\"count\\\": 5, \\\"marginTop\\\": 88, \\\"marginW\\\": 66), \\\"1600\\\": (\\\"count\\\": 6, \\\"marginTop\\\": 88, \\\"marginW\\\": 66), \\\"2048\\\": (\\\"count\\\": 7, \\\"marginTop\\\": 88, \\\"marginW\\\": 66), \\\"2560\\\": (\\\"count\\\": 8, \\\"marginTop\\\": 88, \\\"marginW\\\": 88), \\\"3440\\\": (\\\"count\\\": 9, \\\"marginTop\\\": 88, \\\"marginW\\\": 88), \\\"max\\\": (\\\"count\\\": 10, \\\"marginTop\\\": 88, \\\"marginW\\\": 88));\\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\\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.tiled-container {\\n\\theight: 100%;\\n\\n\\t.tiled-row {\\n\\t\\tdisplay: flex;\\n\\t}\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../node_modules/css-loader/dist/runtime/sourceMaps.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_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".tiled-row[data-v-452165e4]{display:flex}\", \"\",{\"version\":3,\"sources\":[\"webpack://./src/components/TiledRows.vue\"],\"names\":[],\"mappings\":\"AAsCA,4BACC,YAAA\",\"sourcesContent\":[\"$sizes: (\\\"400\\\": (\\\"count\\\": 3, \\\"marginTop\\\": 66, \\\"marginW\\\": 8), \\\"700\\\": (\\\"count\\\": 4, \\\"marginTop\\\": 66, \\\"marginW\\\": 8), \\\"1024\\\": (\\\"count\\\": 5, \\\"marginTop\\\": 66, \\\"marginW\\\": 44), \\\"1280\\\": (\\\"count\\\": 4, \\\"marginTop\\\": 66, \\\"marginW\\\": 44), \\\"1440\\\": (\\\"count\\\": 5, \\\"marginTop\\\": 88, \\\"marginW\\\": 66), \\\"1600\\\": (\\\"count\\\": 6, \\\"marginTop\\\": 88, \\\"marginW\\\": 66), \\\"2048\\\": (\\\"count\\\": 7, \\\"marginTop\\\": 88, \\\"marginW\\\": 66), \\\"2560\\\": (\\\"count\\\": 8, \\\"marginTop\\\": 88, \\\"marginW\\\": 88), \\\"3440\\\": (\\\"count\\\": 9, \\\"marginTop\\\": 88, \\\"marginW\\\": 88), \\\"max\\\": (\\\"count\\\": 10, \\\"marginTop\\\": 88, \\\"marginW\\\": 88));\\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.tiled-row {\\n\\tdisplay: flex;\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","<template>\n <span v-bind=\"$attrs\"\n :aria-hidden=\"!title\"\n :aria-label=\"title\"\n class=\"material-design-icon download-icon\"\n role=\"img\"\n @click=\"$emit('click', $event)\">\n <svg :fill=\"fillColor\"\n class=\"material-design-icon__svg\"\n :width=\"size\"\n :height=\"size\"\n viewBox=\"0 0 24 24\">\n <path d=\"M5,20H19V18H5M19,9H15V3H9V9H5L12,16L19,9Z\">\n <title v-if=\"title\">{{ title }}</title>\n </path>\n </svg>\n </span>\n</template>\n\n<script>\nexport default {\n name: \"DownloadIcon\",\n emits: ['click'],\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</script>","import mod from \"-!../vue-loader/lib/index.js??vue-loader-options!./Download.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../vue-loader/lib/index.js??vue-loader-options!./Download.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./Download.vue?vue&type=template&id=67aea606&\"\nimport script from \"./Download.vue?vue&type=script&lang=js&\"\nexport * from \"./Download.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\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('span',_vm._b({staticClass:\"material-design-icon download-icon\",attrs:{\"aria-hidden\":!_vm.title,\"aria-label\":_vm.title,\"role\":\"img\"},on:{\"click\":function($event){return _vm.$emit('click', $event)}}},'span',_vm.$attrs,false),[_c('svg',{staticClass:\"material-design-icon__svg\",attrs:{\"fill\":_vm.fillColor,\"width\":_vm.size,\"height\":_vm.size,\"viewBox\":\"0 0 24 24\"}},[_c('path',{attrs:{\"d\":\"M5,20H19V18H5M19,9H15V3H9V9H5L12,16L19,9Z\"}},[(_vm.title)?_c('title',[_vm._v(_vm._s(_vm.title))]):_vm._e()])])])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"files-list-viewer\"},[(_vm.emptyMessage !== '' && _vm.items.length === 0 && !_vm.loading)?_c('EmptyContent',{key:\"emptycontent\",scopedSlots:_vm._u([{key:\"icon\",fn:function(){return [_c('span',{staticClass:\"empty-content-illustration\",domProps:{\"innerHTML\":_vm._s(_vm.EmptyBox)}})]},proxy:true}],null,false,3410044941)},[_vm._v(\"\\n\\t\\t\"+_vm._s(_vm.emptyMessage)+\"\\n\\t\")]):_vm._e(),_vm._v(\" \"),_c('TiledLayout',{attrs:{\"base-height\":_vm.baseHeight,\"items\":_vm.items},scopedSlots:_vm._u([{key:\"default\",fn:function(ref){\nvar rows = ref.rows;\nreturn _c('VirtualScrolling',{attrs:{\"use-window\":_vm.useWindow,\"rows\":rows,\"scroll-to-key\":_vm.scrollToSection},on:{\"need-content\":_vm.needContent},scopedSlots:_vm._u([{key:\"default\",fn:function(ref){\nvar renderedRows = ref.renderedRows;\nreturn _c('ul',{},_vm._l((renderedRows),function(row){return _c('div',{key:row.key,staticClass:\"tiled-row\",class:{'files-list-viewer__section-header': row.items[0].sectionHeader},style:({height: ((row.height) + \"px\")})},_vm._l((row.items),function(item){return _c('li',{key:item.id,style:({ width: item.ratio ? ((row.height * item.ratio) + \"px\") : '100%', height: ((row.height) + \"px\")})},[_vm._t(\"default\",null,{\"file\":item,\"visibility\":row.visibility})],2)}),0)}),0)}},(_vm.loading)?{key:\"loader\",fn:function(){return [_c('Loader',{staticClass:\"files-list-viewer__loader\"})]},proxy:true}:null],null,true)})}}])})],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","/**\n * @copyright Copyright (c) 2022 Louis Chemineau <louis@chmn.me>\n *\n * @author Louis Chemineau <louis@chmn.me>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\n\n/**\n * @typedef {object} TiledItem\n * @property {string} id\n * @property {number} [width] Real width of the item.\n * @property {number} height Real height of the item.\n * @property {number} [ratio] The aspect ratio of the item.\n * @property {boolean} [sectionHeader] Whether this row is a section header.\n */\n\n/**\n * @typedef {object} TiledRow\n * @property {TiledItem[]} items -\n * @property {number} height -\n * @property {string} key -\n */\n\n/**\n * Split items in rows of equal width.\n * The last row will not be forced to match containerWidth.\n *\n * @param {TiledItem[]} items The list of item to split in row of equal width.\n * @param {number} containerWidth The width of a row.\n * @param {number} baseHeight The base height of the rows.\n * @return {TiledRow[]}\n */\nexport function splitItemsInRows(items, containerWidth, baseHeight = 200) {\n\tif (containerWidth === 0) {\n\t\treturn []\n\t}\n\n\tconst rows = []\n\tlet rowNumber = 0\n\tlet currentItem = 0\n\n\twhile (currentItem < items.length) {\n\t\t/** @type { TiledItem[] } */\n\t\tconst rowItems = []\n\n\t\t// Fill the row with new items as long as the width is less than containerWidth.\n\t\tdo {\n\t\t\t// @ts-ignore - We know that items.shift() is not undefined as we always check that items.length > 0.\n\t\t\trowItems.push(items[currentItem++])\n\t\t} while (\n\t\t\tcurrentItem < items.length\n\t\t\t&& !items[currentItem - 1].sectionHeader && !items[currentItem].sectionHeader\n\t\t\t&& computeRowWidth([...rowItems, items[currentItem]], baseHeight) <= containerWidth\n\t\t)\n\n\t\trows[rowNumber] = {\n\t\t\titems: rowItems,\n\t\t\theight: computeRowHeight(\n\t\t\t\trowItems,\n\t\t\t\tcontainerWidth,\n\t\t\t\titems.length === currentItem || items[currentItem].sectionHeader === true,\n\t\t\t\tbaseHeight\n\t\t\t),\n\t\t\t// Key to help vue to keep track of the row in VirtualScrolling.\n\t\t\tkey: rowItems.map(item => item.id).join('-'),\n\t\t}\n\n\t\trowNumber += 1\n\t}\n\n\treturn rows\n}\n\n/**\n *\n * @param {TiledItem[]} items The list of items in the row.\n * @param {number} baseHeight The base height of the rows.\n * @return {number} The width of the row\n */\nfunction computeRowWidth(items, baseHeight) {\n\treturn items\n\t\t.map(item => baseHeight * item.ratio)\n\t\t.reduce((sum, itemWidth) => sum + itemWidth)\n}\n\n/**\n * Compute the row height based on its items and on the container's width.\n *\n * Math time !\n * With Rn the aspect ratio of item n\n * Wn the width of item n\n * Hn the height of item n\n * Wc the width of the container\n * Hr the height of the row\n * For n items we want: Wc = W1 + W2 + ... + Wn\n * We know Rn = Wn / Hn\n * So Wn = Rn * Hn\n * So Wc = (R1 * H1) + (R2 * H2) + ... + (Rn * Hn)\n * But we also want Hr === H1 === H2 === ... === Hn\n * So Wc = (R1 * Hr) + (R2 * Hr) + ... + (Rn * Hr)\n * So Wc = Hr * (R1 + R2 + ... + Rn)\n * So Hr = Wc / (R1 + R2 + ... + Rn)\n *\n * @param {TiledItem[]} items The list of items in the row.\n * @param {number} containerWidth The width of the row.\n * @param {boolean} isLastRow Whether we are computing the height for the last row.\n * @param {number} baseHeight The base height of the rows.\n * @return {number} The height of the row\n */\nfunction computeRowHeight(items, containerWidth, isLastRow, baseHeight) {\n\t// Exception 1: there is only one item and its width it is a sectionHeader, meaning take the full width.\n\tif (items.length === 1 && items[0].sectionHeader) {\n\t\treturn items[0].height\n\t}\n\n\tconst sumOfItemsRatio = items\n\t\t.map(item => item.ratio)\n\t\t.reduce((sum, itemRatio) => sum + itemRatio\n\t\t)\n\n\tlet rowHeight = containerWidth / sumOfItemsRatio\n\n\t// Exception 2: there is only one item which is larger than containerWidth.\n\t// Limit its height so that itemWidth === containerWidth\n\tif (items.length === 1 && items[0].width > containerWidth) {\n\t\trowHeight = containerWidth / items[0].ratio\n\t}\n\n\t// Exception 3: we reached the last row.\n\t// Force the items width to match containerWidth, and limit their heigh to baseHeight + 20.\n\tif (isLastRow) {\n\t\trowHeight = Math.min(baseHeight + 20, rowHeight)\n\t}\n\n\treturn rowHeight\n}\n","var render = function (_h,_vm) {var _c=_vm._c;return _c('ul',_vm._l((_vm.props.rows),function(row){return _c('div',{key:row.key,staticClass:\"tiled-row\",style:({height: ((row.height) + \"px\")})},_vm._l((row.items),function(item){return _c('li',{key:item.id,style:({ width: item.ratio ? ((row.height * item.ratio) + \"px\") : '100%', height: ((row.height) + \"px\")})},[_vm._t(\"default\",null,{\"row\":row,\"item\":item})],2)}),0)}),0)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\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!./TiledRows.vue?vue&type=style&index=0&id=452165e4&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!./TiledRows.vue?vue&type=style&index=0&id=452165e4&lang=scss&scoped=true&\";\n export default content && content.locals ? content.locals : undefined;\n","<!--\n - @copyright Copyright (c) 2022 Louis Chemineau <louis@chmn.me>\n -\n - @author Louis Chemineau <louis@chmn.me>\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<template>\n\t<div ref=\"tiledLayoutContainer\"\n\t\tclass=\"tiled-container\">\n\t\t<!-- Slot to allow changing the rows before passing them to TiledRows -->\n\t\t<!-- Useful for partially rendering rows like with VirtualScrolling -->\n\t\t<slot :rows=\"rows\">\n\t\t\t<!-- Default rendering -->\n\t\t\t<TiledRows :rows=\"rows\" />\n\t\t</slot>\n\t</div>\n</template>\n\n<script>\nimport logger from '../services/logger.js'\nimport { splitItemsInRows } from '../services/TiledLayout.js'\nimport TiledRows from './TiledRows.vue'\n\nexport default {\n\tname: 'TiledLayout',\n\n\tcomponents: {\n\t\tTiledRows,\n\t},\n\n\tprops: {\n\t\titems: {\n\t\t\ttype: Array,\n\t\t\trequired: true,\n\t\t},\n\t\tbaseHeight: {\n\t\t\ttype: Number,\n\t\t\tdefault: 200,\n\t\t},\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\tcontainerWidth: 0,\n\t\t\t/** @type {ResizeObserver} */\n\t\t\tresizeObserver: null,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\t/** @return {import('../services/TiledLayout.js').TiledRow[]} */\n\t\trows() {\n\t\t\tlogger.debug('[TiledLayout] Computing rows', this.items)\n\n\t\t\treturn splitItemsInRows(this.items, this.containerWidth, this.baseHeight)\n\t\t},\n\t},\n\n\tmounted() {\n\t\tthis.resizeObserver = new ResizeObserver(entries => {\n\t\t\tfor (const entry of entries) {\n\t\t\t\tconst cr = entry.contentRect\n\t\t\t\tif (entry.target.classList.contains('tiled-container')) {\n\t\t\t\t\tthis.containerWidth = cr.width\n\t\t\t\t}\n\t\t\t}\n\t\t})\n\n\t\tthis.resizeObserver.observe(this.$refs.tiledLayoutContainer)\n\t},\n\n\tbeforeDestroy() {\n\t\tthis.resizeObserver.disconnect()\n\t},\n}\n</script>\n\n<style scoped lang=\"scss\">\n.tiled-container {\n\theight: 100%;\n\n\t.tiled-row {\n\t\tdisplay: flex;\n\t}\n}\n</style>\n","import mod from \"-!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TiledLayout.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!./TiledLayout.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./TiledRows.vue?vue&type=template&id=452165e4&scoped=true&functional=true&\"\nvar script = {}\nimport style0 from \"./TiledRows.vue?vue&type=style&index=0&id=452165e4&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 true,\n null,\n \"452165e4\",\n null\n \n)\n\nexport default component.exports","\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!./TiledLayout.vue?vue&type=style&index=0&id=58b32a0e&scoped=true&lang=scss&\";\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!./TiledLayout.vue?vue&type=style&index=0&id=58b32a0e&scoped=true&lang=scss&\";\n export default content && content.locals ? content.locals : undefined;\n","import { render, staticRenderFns } from \"./TiledLayout.vue?vue&type=template&id=58b32a0e&scoped=true&\"\nimport script from \"./TiledLayout.vue?vue&type=script&lang=js&\"\nexport * from \"./TiledLayout.vue?vue&type=script&lang=js&\"\nimport style0 from \"./TiledLayout.vue?vue&type=style&index=0&id=58b32a0e&scoped=true&lang=scss&\"\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 \"58b32a0e\",\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{ref:\"tiledLayoutContainer\",staticClass:\"tiled-container\"},[_vm._t(\"default\",function(){return [_c('TiledRows',{attrs:{\"rows\":_vm.rows}})]},{\"rows\":_vm.rows})],2)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<!--\n - @copyright Copyright (c) 2022 Louis Chemineau <louis@chmn.me>\n -\n - @author Louis Chemineau <louis@chmn.me>\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<template>\n\t<div class=\"files-list-viewer\">\n\t\t<EmptyContent v-if=\"emptyMessage !== '' && items.length === 0 && !loading\"\n\t\t\tkey=\"emptycontent\">\n\t\t\t<template #icon>\n\t\t\t\t<!-- eslint-disable-next-line vue/no-v-html -->\n\t\t\t\t<span class=\"empty-content-illustration\" v-html=\"EmptyBox\" />\n\t\t\t</template>\n\t\t\t{{ emptyMessage }}\n\t\t</EmptyContent>\n\n\t\t<TiledLayout :base-height=\"baseHeight\" :items=\"items\">\n\t\t\t<VirtualScrolling slot-scope=\"{rows}\"\n\t\t\t\t:use-window=\"useWindow\"\n\t\t\t\t:rows=\"rows\"\n\t\t\t\t:scroll-to-key=\"scrollToSection\"\n\t\t\t\t@need-content=\"needContent\">\n\t\t\t\t<ul slot-scope=\"{renderedRows}\">\n\t\t\t\t\t<div v-for=\"row of renderedRows\"\n\t\t\t\t\t\t:key=\"row.key\"\n\t\t\t\t\t\tclass=\"tiled-row\"\n\t\t\t\t\t\t:class=\"{'files-list-viewer__section-header': row.items[0].sectionHeader}\"\n\t\t\t\t\t\t:style=\"{height: `${row.height}px`}\">\n\t\t\t\t\t\t<li v-for=\"item of row.items\"\n\t\t\t\t\t\t\t:key=\"item.id\"\n\t\t\t\t\t\t\t:style=\"{ width: item.ratio ? `${row.height * item.ratio}px` : '100%', height: `${row.height}px`}\">\n\t\t\t\t\t\t\t<slot :file=\"item\" :visibility=\"row.visibility\" />\n\t\t\t\t\t\t</li>\n\t\t\t\t\t</div>\n\t\t\t\t</ul>\n\t\t\t\t<template v-if=\"loading\" #loader>\n\t\t\t\t\t<Loader class=\"files-list-viewer__loader\" />\n\t\t\t\t</template>\n\t\t\t</VirtualScrolling>\n\t\t</TiledLayout>\n\t</div>\n</template>\n<script>\nimport { mapGetters } from 'vuex'\n\nimport { EmptyContent } from '@nextcloud/vue'\n\nimport TiledLayout from '../components/TiledLayout.vue'\nimport VirtualScrolling from '../components/VirtualScrolling.vue'\nimport Loader from '../components/Loader.vue'\nimport EmptyBox from '../assets/Illustrations/empty.svg'\n\nexport default {\n\tname: 'FilesListViewer',\n\n\tcomponents: {\n\t\tEmptyContent,\n\t\tTiledLayout,\n\t\tVirtualScrolling,\n\t\tLoader,\n\t},\n\n\tprops: {\n\t\t// Array of file ids that should be rendered.\n\t\tfileIds: {\n\t\t\ttype: Array,\n\t\t\tdefault: undefined,\n\t\t},\n\t\t// An object mapping a list of section to a list of fileIds.\n\t\tfileIdsBySection: {\n\t\t\ttype: Object,\n\t\t\tdefault: undefined,\n\t\t},\n\t\t// The list of sorted sections.\n\t\tsections: {\n\t\t\ttype: Array,\n\t\t\tdefault: undefined,\n\t\t},\n\t\t// Whether we should display a loading indicator.\n\t\tloading: {\n\t\t\ttype: Boolean,\n\t\t\trequired: true,\n\t\t},\n\t\t// Message to display when there is no files.\n\t\temptyMessage: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t\t// The base height to forward to TileLayout.\n\t\tbaseHeight: {\n\t\t\ttype: Number,\n\t\t\tdefault: 200,\n\t\t},\n\t\t// The height to use for section headers.\n\t\tsectionHeaderHeight: {\n\t\t\ttype: Number,\n\t\t\tdefault: 75,\n\t\t},\n\t\t// Instruct VirtualScrolling to scroll to the given section id.\n\t\tscrollToSection: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t\t// The containerElement props to forward to TileLayout.\n\t\tcontainerElement: {\n\t\t\ttype: HTMLElement,\n\t\t\tdefault: null,\n\t\t},\n\t\t// The useWindow props to forward to TileLayout.\n\t\tuseWindow: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\tEmptyBox,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\t...mapGetters([\n\t\t\t'files',\n\t\t]),\n\n\t\t/**\n\t\t * @return {object[]} The list of items to pass to TiledLayout.\n\t\t */\n\t\tfileIdsToItems() {\n\t\t\tif (this.fileIds === undefined) {\n\t\t\t\treturn []\n\t\t\t}\n\n\t\t\treturn this.fileIds.map(this.mapFileToItem)\n\t\t},\n\n\t\t/**\n\t\t * @return {object[]} The list of items separated by sections to pass to TiledLayout.\n\t\t */\n\t\tsectionsToItems() {\n\t\t\tif (this.sections === undefined) {\n\t\t\t\treturn []\n\t\t\t}\n\n\t\t\treturn this.sections.flatMap((sectionId) => {\n\t\t\t\treturn [\n\t\t\t\t\t{\n\t\t\t\t\t\tid: sectionId,\n\t\t\t\t\t\tsectionHeader: true,\n\t\t\t\t\t\theight: this.sectionHeaderHeight,\n\t\t\t\t\t},\n\t\t\t\t\t...this.fileIdsBySection[sectionId].map(this.mapFileToItem),\n\t\t\t\t]\n\t\t\t})\n\t\t},\n\n\t\t/**\n\t\t * @return {object[]} The list of items to pass to TiledLayout.\n\t\t */\n\t\titems() {\n\t\t\tif (this.fileIds !== undefined) {\n\t\t\t\treturn this.fileIdsToItems\n\t\t\t}\n\n\t\t\tif (this.sections !== undefined) {\n\t\t\t\treturn this.sectionsToItems\n\t\t\t}\n\n\t\t\treturn []\n\t\t},\n\t},\n\n\tmethods: {\n\t\t// Ask the parent for more content.\n\t\tneedContent() {\n\t\t\tthis.$emit('need-content')\n\t\t},\n\n\t\tmapFileToItem(fileId) {\n\t\t\tconst file = this.files[fileId]\n\t\t\treturn {\n\t\t\t\tid: file.fileid,\n\t\t\t\twidth: file.fileMetadataSizeParsed.width,\n\t\t\t\theight: file.fileMetadataSizeParsed.height,\n\t\t\t\tratio: file.fileMetadataSizeParsed.width / file.fileMetadataSizeParsed.height,\n\t\t\t}\n\t\t},\n\t},\n}\n</script>\n<style lang=\"scss\" scoped>\n.files-list-viewer {\n\theight: 100%;\n\tposition: relative;\n\n\t::v-deep .empty-content__icon {\n\t\twidth: 200px;\n\t\theight: 200px;\n\n\t\t.empty-content-illustration svg {\n\t\t\twidth: 200px;\n\t\t\theight: 200px;\n\t\t}\n\t}\n\n\t.tiled-row {\n\t\tdisplay: flex;\n\t}\n\n\t&__section-header {\n\t\tposition: sticky;\n\t\ttop: 0;\n\t\tz-index: 3;\n\t\tbackground: var(--color-main-background);\n\t}\n\n\t&__loader {\n\t\tmargin: 50px 0;\n\t}\n}\n</style>\n","import mod from \"-!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./FilesListViewer.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!./FilesListViewer.vue?vue&type=script&lang=js&\"","\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!./FilesListViewer.vue?vue&type=style&index=0&id=5196d262&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!./FilesListViewer.vue?vue&type=style&index=0&id=5196d262&lang=scss&scoped=true&\";\n export default content && content.locals ? content.locals : undefined;\n","import { render, staticRenderFns } from \"./FilesListViewer.vue?vue&type=template&id=5196d262&scoped=true&\"\nimport script from \"./FilesListViewer.vue?vue&type=script&lang=js&\"\nexport * from \"./FilesListViewer.vue?vue&type=script&lang=js&\"\nimport style0 from \"./FilesListViewer.vue?vue&type=style&index=0&id=5196d262&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 \"5196d262\",\n null\n \n)\n\nexport default component.exports"],"names":["path","options","firstResult","nbResults","mimesType","allMimes","onThisDay","onlyFavorites","prefixPath","getCurrentUser","uid","orMime","reduce","str","mime","eqFavorites","Array","fill","map","_","years","start","moment","Date","now","startOf","subtract","end","endOf","add","format","join","Object","assign","method","headers","data","props","deep","details","client","response","genFileInfo","filename","replace","name","errorFetchingFiles","loadingFiles","doneFetchingFiles","cancelFilesRequest","semaphore","SemaphoreWithPriority","fetchSemaphore","semaphoreSymbol","fetchedFileIds","beforeDestroy","this","beforeRouteLeave","from","to","next","watch","$route","resetFetchFilesState","methods","fetchFiles","blacklist","acquire","fetchSemaphoreSymbol","cancelableRequest","getPhotos","request","cancel","numberOfImagesPerBatch","length","fetchedFiles","fileIds","file","fileid","filter","fileId","includes","push","toString","$store","dispatch","logger","status","code","console","error","release","selection","onFileSelectToggle","id","value","$set","onUncheckFiles","filesIds","forEach","filesId","resetSelection","computed","selectedFileIds","keys","___CSS_LOADER_EXPORT___","module","emits","title","type","String","fillColor","default","size","Number","_vm","_h","$createElement","_c","_self","_b","staticClass","attrs","on","$event","$emit","$attrs","_v","_s","_e","computeRowWidth","items","baseHeight","item","ratio","sum","itemWidth","computeRowHeight","containerWidth","isLastRow","sectionHeader","height","rowHeight","itemRatio","width","Math","min","styleTagTransform","setAttributes","insert","domAPI","insertStyleElement","_l","row","key","style","_t","rows","rowNumber","currentItem","rowItems","ref","emptyMessage","loading","scopedSlots","_u","fn","domProps","EmptyBox","proxy","useWindow","scrollToSection","needContent","renderedRows","class","visibility"],"sourceRoot":""}