{"version":3,"sources":["dashboard.js"],"names":["const","lsKeys","token","viewType","uploads","uploadsAll","selected","users","page","dom","localStorage","username","permissions","menusContainer","menus","currentView","views","type","album","pageNum","filters","all","checkboxes","lastSelected","upload","user","selectAlbumContainer","cache","albums","clipboardJS","lazyLoad","imageExts","videoExts","isTriggerLoading","fadingIn","albumTitleMaxLength","albumDescMaxLength","onError","error","console","content","document","createElement","innerHTML","toString","swal","title","icon","onAxiosError","statusText","520","521","522","523","524","525","526","527","530","response","status","description","data","preparePage","verifyToken","window","location","reloadOnError","axios","post","then","success","text","removeItem","defaults","headers","common","prepareDashboard","catch","querySelector","addEventListener","domClick","event","target","classList","contains","preventDefault","itemMenus","selector","onclick","getUploads","deleteUploadsByNames","getAlbums","changeToken","changePassword","logout","params","group","getStatistics","getUsers","loop","i","item","call","Object","assign","trigger","currentTarget","remove","push","length","moderator","getAlbumsSidebar","prepareShareX","updateTrigger","newState","add","parentNode","tagName","let","getItemID","element","parent","parseInt","dataset","id","includes","action","hasAttribute","stopPropagation","setUploadsView","clearSelection","addSelectedUploadsToAlbum","select","selectAll","addToAlbum","deleteUpload","bulkDeleteUploads","displayPreview","submitAlbum","editAlbum","deleteAlbum","getNewToken","editUser","disableUser","filtersHelp","filterUploads","viewUserUploads","focusJumpToPage","switchPage","fadeAndScroll","clearTimeout","setTimeout","scrollIntoView","behavior","block","inline","func","goto","jumpToPage","checkValidity","parsed","value","isNaN","focus","undefined","url","get","files","autoPage","Math","ceil","count","basedomain","pagination","paginate","filter","extraControls","controls","unselected","hasExpiryDateColumn","some","file","expirydate","thumb","exec","extname","toLowerCase","name","original","prettyBytes","getPrettyBytes","size","prettyDate","getPrettyDate","Date","timestamp","prettyExpiryDate","appendix","userid","albumid","table","div","className","appendChild","querySelectorAll","update","tr","ip","checked","view","isimage","isvideo","src","onload","body","onerror","video","autoplay","insertAdjacentElement","buttons","splice","indexOf","JSON","stringify","selectInBetween","lastElement","thisIndex","index","lastIndex","abs","shiftKey","suffix","substring","proceed","style","trim","replace","postBulkDeleteUploads","field","values","cb","failed","textArea","seen","names","split","map","trimmed","test","prototype","hasOwnProperty","join","objective","dangerMode","cancel","confirm","closeModal","fields","Array","isArray","addUploadsToAlbum","ids","callback","choose","added","list","getElementsByTagName","removeAttribute","homeDomain","albumUrl","download","public","requestLink","identifier","purge","albumsContainer","oldAlbums","li","a","sendNewPassword","pass","password","admin","displayGroup","groups","keys","enabled","usage","groupOptions","g","resetPassword","totalItems","itemsPerPage","currentPage","numPages","template","start","end","elementsToShow","step","stats","rows","types","_types","valKeys","j","number","toLocaleString","byte","byteUsage","used","total","round","toUpperCase","defineProperty","varArgs","arguments$1","arguments","TypeError","to","nextSource","nextKey","writable","configurable","documentElement","selectedKeys","ls","parse","ClipboardJS","on","LazyLoad"],"mappings":"AAEAA,IAAMC,OAAS,CACbC,MAAO,QACPC,SAAU,CACRC,QAAS,kBACTC,WAAY,sBAEdC,SAAU,CACRF,QAAS,kBACTC,WAAY,qBACZE,MAAO,kBAILC,KAAO,CAEXC,IAAK,KAGLP,MAAOQ,aAAaT,OAAOC,OAG3BS,SAAU,KACVC,YAAa,KAGbC,eAAgB,KAChBC,MAAO,GAEPC,YAAa,KACbC,MAAO,CAELZ,QAAS,CACPa,KAAMP,aAAaT,OAAOE,SAASC,SACnCc,MAAO,KACPC,QAAS,MAGXd,WAAY,CACVY,KAAMP,aAAaT,OAAOE,SAASE,YACnCe,QAAS,KACTD,QAAS,KACTE,KAAK,GAGPd,MAAO,CACLY,QAAS,OAKbb,SAAU,CACRF,QAAS,GACTC,WAAY,GACZE,MAAO,IAETe,WAAY,CACVlB,QAAS,GACTC,WAAY,GACZE,MAAO,IAETgB,aAAc,CACZC,OAAQ,KACRnB,WAAY,KACZoB,KAAM,MAIRC,qBAAsB,KAGtBC,MAAO,CACLvB,QAAS,GACTwB,OAAQ,GACRrB,MAAO,IAGTsB,YAAa,KACbC,SAAU,KAEVC,UAAW,CAAC,QAAS,OAAQ,QAAS,OAAQ,OAAQ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tC0D,MAAO,SAAiB/E,EAAQyO,GAC9B,aA9iBA,IAAIC,EAAcC,UA+iBlB,GAAI3O,MAAAA,EACF,MAAM,IAAI4O,UAAU,8CAEtB,IADA/T,IAAMgU,EAAKxN,OAAOrB,GACTkB,EAAI,EAAGA,EAAIyN,UAAUhN,OAAQT,IAAK,CACzCrG,IAAMiU,EAAaH,EAAUzN,GAC7B,GAAI4N,MAAAA,EACF,IAAKjU,IAAMkU,KAAWD,EAEhBzN,OAAOkJ,UAAUC,eAAepJ,KAAK0N,EAAYC,KACnDF,EAAGE,GAAWD,EAAWC,IAEjC,OAAOF,GAETG,UAAU,EACVC,cAAc,IAIZ,iBAAkB3R,SAAS4R,iBAC/B5R,SAAS4R,gBAAgBjP,UAAUgC,IAAI,YAGzC,IADApH,IAAMsU,EAAe,CAAC,UAAW,aAAc,SACtCjO,EAAI,EAAGA,EAAIiO,EAAaxN,OAAQT,IAAK,CAC5CrG,IAAMuU,EAAK7T,aAAaT,OAAOK,SAASgU,EAAajO,KACjDkO,IAAI/T,KAAKF,SAASgU,EAAajO,IAAM0H,KAAKyG,MAAMD,IAGtD/T,KAAKuD,cAELvD,KAAKqB,YAAc,IAAI4S,YAAY,iBAEnCjU,KAAKqB,YAAY6S,GAAG,WAAS,WAC3B,OAAO7R,KAAK,UAAW,yCAA0C,cAGnErC,KAAKqB,YAAY6S,GAAG,QAASlU,KAAK6B,SAElC7B,KAAKsB,SAAW,IAAI6S","file":"dashboard.js","sourcesContent":["/* global swal, axios, ClipboardJS, LazyLoad */\n\nconst lsKeys = {\n token: 'token',\n viewType: {\n uploads: 'viewTypeUploads',\n uploadsAll: 'viewTypeUploadsAll'\n },\n selected: {\n uploads: 'selectedUploads',\n uploadsAll: 'selectedUploadsAll',\n users: 'selectedUsers'\n }\n}\n\nconst page = {\n // #page\n dom: null,\n\n // user token\n token: localStorage[lsKeys.token],\n\n // from api/tokens/verify\n username: null,\n permissions: null,\n\n // sidebar menus\n menusContainer: null,\n menus: [],\n\n currentView: null,\n views: {\n // config of uploads view\n uploads: {\n type: localStorage[lsKeys.viewType.uploads],\n album: null, // album's id\n pageNum: null // page num\n },\n // config of uploads view (all)\n uploadsAll: {\n type: localStorage[lsKeys.viewType.uploadsAll],\n filters: null, // uploads' filters\n pageNum: null, // page num\n all: true\n },\n // config of users view\n users: {\n pageNum: null\n }\n },\n\n // id of selected items (shared across pages and will be synced with localStorage)\n selected: {\n uploads: [],\n uploadsAll: [],\n users: []\n },\n checkboxes: {\n uploads: [],\n uploadsAll: [],\n users: []\n },\n lastSelected: {\n upload: null,\n uploadsAll: null,\n user: null\n },\n\n // select album dom for dialogs/modals\n selectAlbumContainer: null,\n\n // cache for dialogs/modals\n cache: {\n uploads: {},\n albums: {},\n users: {}\n },\n\n clipboardJS: null,\n lazyLoad: null,\n\n imageExts: ['.webp', '.jpg', '.jpeg', '.gif', '.png', '.tiff', '.tif', '.svg'],\n // some of these extensions can not be played directly in browsers\n videoExts: ['.webm', '.mp4', '.wmv', '.avi', '.mov', '.mkv'],\n\n isTriggerLoading: null,\n fadingIn: null,\n\n albumTitleMaxLength: 70,\n albumDescMaxLength: 4000\n}\n\n// Handler for regular JS errors\npage.onError = error => {\n console.error(error)\n\n const content = document.createElement('div')\n content.innerHTML = `${error.toString()}
`\n return swal({\n title: 'An error occurred!',\n icon: 'error',\n content\n })\n}\n\n// Handler for Axios errors\npage.onAxiosError = error => {\n console.error(error)\n\n // Better Cloudflare errors\n const cloudflareErrors = {\n 520: 'Unknown Error',\n 521: 'Web Server Is Down',\n 522: 'Connection Timed Out',\n 523: 'Origin Is Unreachable',\n 524: 'A Timeout Occurred',\n 525: 'SSL Handshake Failed',\n 526: 'Invalid SSL Certificate',\n 527: 'Railgun Error',\n 530: 'Origin DNS Error'\n }\n\n const statusText = cloudflareErrors[error.response.status] || error.response.statusText\n const description = error.response.data && error.response.data.description\n ? error.response.data.description\n : 'There was an error with the request, please check the console for more information.'\n\n return swal(`${error.response.status} ${statusText}`, description, 'error')\n}\n\npage.preparePage = () => {\n if (page.token)\n page.verifyToken(page.token, true)\n else\n window.location = 'auth'\n}\n\npage.verifyToken = (token, reloadOnError) => {\n axios.post('api/tokens/verify', { token }).then(response => {\n if (response.data.success === false)\n return swal({\n title: 'An error occurred!',\n text: response.data.description,\n icon: 'error'\n }).then(() => {\n if (!reloadOnError) return\n localStorage.removeItem(lsKeys.token)\n window.location = 'auth'\n })\n\n axios.defaults.headers.common.token = token\n localStorage[lsKeys.token] = token\n\n page.token = token\n page.username = response.data.username\n page.permissions = response.data.permissions\n page.prepareDashboard()\n }).catch(page.onAxiosError)\n}\n\npage.prepareDashboard = () => {\n page.dom = document.querySelector('#page')\n\n // Capture all click events\n page.dom.addEventListener('click', page.domClick, true)\n\n // Capture all submit events\n page.dom.addEventListener('submit', event => {\n // Prevent default if necessary\n if (event.target && event.target.classList.contains('prevent-default'))\n return event.preventDefault()\n }, true)\n\n page.menusContainer = document.querySelector('#menu')\n\n // All item menus in the sidebar\n const itemMenus = [\n { selector: '#itemUploads', onclick: page.getUploads },\n { selector: '#itemDeleteUploadsByNames', onclick: page.deleteUploadsByNames },\n { selector: '#itemManageAlbums', onclick: page.getAlbums },\n { selector: '#itemManageToken', onclick: page.changeToken },\n { selector: '#itemChangePassword', onclick: page.changePassword },\n { selector: '#itemLogout', onclick: page.logout },\n { selector: '#itemManageUploads', onclick: page.getUploads, params: { all: true }, group: 'moderator' },\n { selector: '#itemStatistics', onclick: page.getStatistics, group: 'admin' },\n { selector: '#itemManageUsers', onclick: page.getUsers, group: 'admin' }\n ]\n\n for (let i = 0; i < itemMenus.length; i++) {\n // Skip item menu if not enough permission\n if (itemMenus[i].group && !page.permissions[itemMenus[i].group])\n continue\n\n // Add onclick event listener\n const item = document.querySelector(itemMenus[i].selector)\n item.addEventListener('click', event => {\n // This class name isn't actually being applied fast enough\n if (page.menusContainer.classList.contains('is-loading'))\n return\n\n // eslint-disable-next-line compat/compat\n itemMenus[i].onclick.call(null, Object.assign({\n trigger: event.currentTarget\n }, itemMenus[i].params || {}))\n })\n\n item.classList.remove('is-hidden')\n page.menus.push(item)\n }\n\n // If at least a moderator, show administration section\n if (page.permissions.moderator) {\n document.querySelector('#itemLabelAdmin').classList.remove('is-hidden')\n document.querySelector('#itemListAdmin').classList.remove('is-hidden')\n }\n\n // Update text of logout button\n document.querySelector('#itemLogout').innerHTML = `Logout ( ${page.username} )`\n\n // Finally display dashboard\n document.querySelector('#dashboard').classList.remove('is-hidden')\n\n // Load albums sidebar\n page.getAlbumsSidebar()\n\n if (typeof page.prepareShareX === 'function')\n page.prepareShareX()\n}\n\npage.logout = params => {\n page.updateTrigger(params.trigger, 'active')\n localStorage.removeItem(lsKeys.token)\n window.location = 'auth'\n}\n\npage.updateTrigger = (trigger, newState) => {\n if (!trigger) return\n\n // Disable menus container when loading\n if (newState === 'loading')\n page.menusContainer.classList.add('is-loading')\n else\n page.menusContainer.classList.remove('is-loading')\n\n if (newState === 'loading') {\n trigger.classList.add('is-loading')\n } else if (newState === 'active') {\n if (trigger.parentNode.tagName !== 'LI')\n return\n for (let i = 0; i < page.menus.length; i++)\n page.menus[i].classList.remove('is-active')\n trigger.classList.remove('is-loading')\n trigger.classList.add('is-active')\n } else {\n trigger.classList.remove('is-loading')\n trigger.classList.remove('is-active')\n }\n}\n\npage.getItemID = element => {\n // This expects the item's parent to have the item's ID\n let parent = element.parentNode\n // If the element is part of a set of controls, use the container's parent instead\n if (element.parentNode.classList.contains('controls')) parent = parent.parentNode\n return parseInt(parent.dataset.id)\n}\n\npage.domClick = event => {\n // We are processing clicks this way to avoid using \"onclick\" attribute\n // Apparently we will need to use \"unsafe-inline\" for \"script-src\" directive\n // of Content Security Policy (CSP), if we want to use \"onclick\" attribute\n // Though I think that only applies to some browsers (?)\n // Of course it wouldn't have mattered if we didn't use CSP to begin with\n // Anyway, I personally would rather not use \"onclick\" attribute\n let element = event.target\n if (!element) return\n\n // Delegate click events to their A or BUTTON parents\n if (['I'].includes(element.tagName) && ['SPAN'].includes(element.parentNode.tagName))\n element = element.parentNode\n if (['SPAN'].includes(element.tagName) && ['A', 'BUTTON'].includes(element.parentNode.tagName))\n element = element.parentNode\n\n // Skip elements that have no action data\n if (!element.dataset || !element.dataset.action) return\n\n // Skip disabled elements\n if (element.hasAttribute('disabled')) return\n\n event.stopPropagation() // maybe necessary\n const id = page.getItemID(element)\n const action = element.dataset.action\n\n switch (action) {\n case 'view-list':\n return page.setUploadsView('list', element)\n case 'view-thumbs':\n return page.setUploadsView('thumbs', element)\n case 'clear-selection':\n return page.clearSelection()\n case 'add-selected-uploads-to-album':\n return page.addSelectedUploadsToAlbum()\n case 'select':\n return page.select(element, event)\n case 'select-all':\n return page.selectAll(element)\n case 'add-to-album':\n return page.addToAlbum(id)\n case 'delete-upload':\n return page.deleteUpload(id)\n case 'bulk-delete-uploads':\n return page.bulkDeleteUploads()\n case 'display-preview':\n return page.displayPreview(id)\n case 'submit-album':\n return page.submitAlbum(element)\n case 'edit-album':\n return page.editAlbum(id)\n case 'delete-album':\n return page.deleteAlbum(id)\n case 'get-new-token':\n return page.getNewToken(element)\n case 'edit-user':\n return page.editUser(id)\n case 'disable-user':\n return page.disableUser(id)\n case 'filters-help':\n return page.filtersHelp(element)\n case 'filter-uploads':\n return page.filterUploads(element)\n case 'view-user-uploads':\n return page.viewUserUploads(id, element)\n case 'page-ellipsis':\n return page.focusJumpToPage()\n case 'page-prev':\n case 'page-next':\n case 'page-goto':\n case 'jump-to-page':\n return page.switchPage(action, element)\n }\n}\n\npage.fadeAndScroll = content => {\n if (page.fadingIn) {\n clearTimeout(page.fadingIn)\n page.dom.classList.remove('fade-in')\n }\n\n page.dom.classList.add('fade-in')\n page.fadingIn = setTimeout(() => {\n page.dom.classList.remove('fade-in')\n }, 500)\n\n page.dom.scrollIntoView({\n behavior: 'smooth',\n block: 'start',\n inline: 'nearest'\n })\n}\n\npage.switchPage = (action, element) => {\n // eslint-disable-next-line compat/compat\n const params = Object.assign({\n trigger: element\n }, page.views[page.currentView])\n const func = page.currentView === 'users' ? page.getUsers : page.getUploads\n switch (action) {\n case 'page-prev':\n params.pageNum = page.views[page.currentView].pageNum - 1\n if (params.pageNum < 0)\n return swal('An error occurred!', 'This is already the first page.', 'error')\n return func(params)\n case 'page-next':\n params.pageNum = page.views[page.currentView].pageNum + 1\n return func(params)\n case 'page-goto':\n params.pageNum = parseInt(element.dataset.goto)\n return func(params)\n case 'jump-to-page': {\n const jumpToPage = document.querySelector('#jumpToPage')\n if (!jumpToPage.checkValidity()) return\n const parsed = parseInt(jumpToPage.value)\n params.pageNum = isNaN(parsed) ? 0 : (parsed - 1)\n if (params.pageNum < 0) params.pageNum = 0\n return func(params)\n }\n }\n}\n\npage.focusJumpToPage = () => {\n const element = document.querySelector('#jumpToPage')\n if (!element) return\n element.focus()\n element.select()\n}\n\npage.getUploads = (params = {}) => {\n if (params === undefined)\n params = {}\n\n if ((params.all || params.filters) && !page.permissions.moderator)\n return swal('An error occurred!', 'You can not do this!', 'error')\n\n page.updateTrigger(params.trigger, 'loading')\n\n if (typeof params.pageNum !== 'number' || params.pageNum < 0)\n params.pageNum = 0\n\n const url = params.album !== undefined\n ? `api/album/${params.album}/${params.pageNum}`\n : `api/uploads/${params.pageNum}`\n\n const headers = {\n all: params.all ? '1' : '',\n filters: params.filters || ''\n }\n\n axios.get(url, { headers }).then(response => {\n if (response.data.success === false)\n if (response.data.description === 'No token provided') {\n return page.verifyToken(page.token)\n } else {\n page.updateTrigger(params.trigger)\n return swal('An error occurred!', response.data.description, 'error')\n }\n\n const files = response.data.files\n if (params.pageNum && (files.length === 0))\n if (params.autoPage) {\n params.pageNum = Math.ceil(response.data.count / 25) - 1\n return page.getUploads(params)\n } else {\n page.updateTrigger(params.trigger)\n return swal('An error occurred!', `There are no more uploads to populate page ${params.pageNum + 1}.`, 'error')\n }\n\n page.currentView = params.all ? 'uploadsAll' : 'uploads'\n page.cache.uploads = {}\n\n const albums = response.data.albums\n const users = response.data.users\n const basedomain = response.data.basedomain\n const pagination = page.paginate(response.data.count, 25, params.pageNum)\n\n let filter = '
${upload.name}
\n${upload.appendix ? `${upload.appendix} – ` : ''}${upload.prettyBytes}
\n ${hasExpiryDateColumn && upload.prettyExpiryDate ? `\nEXP: ${upload.prettyExpiryDate}
` : ''}\n\n | File | \n ${params.album === undefined ? `${params.all ? 'User' : 'Album'} | ` : ''}\nSize | \n ${params.all ? 'IP | ' : ''}\nDate | \n ${hasExpiryDateColumn ? 'Expiry date | ' : ''}\n\n |
---|
user:demo
\n\n Uploads from users with username either \"John Doe\" OR \"demo\":\n user:John\\\\ Doe user:demo
\n\n Uploads from IP \"127.0.0.1\" AND which upload names match \"*.rar\" OR \"*.zip\":\n ip:127.0.0.1 name:*.rar name:*.zip
\n\n Uploads from user with username \"test\" OR from non-registered users:\n user:test -user
\n `.trim().replace(/^ {6}/gm, '').replace(/\\n/g, 'You won't be able to recover ${boldObjective}!
`\n\n if (params.all) {\n const obj1 = count === 1 ? 'an upload' : 'some uploads'\n const obj2 = count === 1 ? 'another user' : 'other users'\n text += `\\nWarning: You may be nuking ${obj1} by ${obj2}!
`\n }\n\n const content = document.createElement('div')\n content.innerHTML = text\n\n swal({\n title: 'Are you sure?',\n content,\n icon: 'warning',\n dangerMode: true,\n buttons: {\n cancel: true,\n confirm: {\n text: `Yes, nuke ${params.values.length === 1 ? 'it' : 'them'}!`,\n closeModal: false\n }\n }\n }).then(proceed => {\n if (!proceed) return\n\n axios.post('api/upload/bulkdelete', {\n field: params.fields,\n values: params.values\n }).then(response => {\n if (!response) return\n\n if (response.data.success === false)\n if (response.data.description === 'No token provided') {\n return page.verifyToken(page.token)\n } else {\n return swal('An error occurred!', response.data.description, 'error')\n }\n\n const failed = Array.isArray(response.data.failed) ? response.data.failed : []\n if (failed.length === params.values.length)\n swal('An error occurred!', `Unable to delete any of the ${objective}.`, 'error')\n else if (failed.length && failed.length < params.values.length)\n swal('Warning!', `From ${objective}, unable to delete ${failed.length} of them.`, 'warning')\n else\n swal('Deleted!', `${objective} ${count === 1 ? 'has' : 'have'} been deleted.`, 'success')\n\n if (typeof params.cb === 'function')\n params.cb(failed)\n }).catch(page.onAxiosError)\n })\n}\n\npage.addSelectedUploadsToAlbum = () => {\n if (page.currentView !== 'uploads')\n return\n\n const count = page.selected[page.currentView].length\n if (!count)\n return swal('An error occurred!', 'You have not selected any uploads.', 'error')\n\n page.addUploadsToAlbum(page.selected[page.currentView], failed => {\n if (!failed) return\n if (failed.length)\n page.selected[page.currentView] = page.selected[page.currentView].filter(id => {\n return failed.includes(id)\n })\n else\n page.selected[page.currentView] = []\n\n localStorage[lsKeys.selected[page.currentView]] = JSON.stringify(page.selected[page.currentView])\n page.getUploads(page.views[page.currentView])\n })\n}\n\npage.addToAlbum = id => {\n page.addUploadsToAlbum([id], failed => {\n if (!failed) return\n page.getUploads(page.views[page.currentView])\n })\n}\n\npage.addUploadsToAlbum = (ids, callback) => {\n const count = ids.length\n\n const content = document.createElement('div')\n content.innerHTML = `\nYou are about to add ${count} upload${count === 1 ? '' : 's'} to an album.
\nIf an upload is already in an album, it will be moved.
\nID | \nName | \nFiles | \nCreated at | \nPublic link | \n\n |
---|
Max length is ${page.albumTitleMaxLength} characters.
\nMax length is ${page.albumDescMaxLength} characters.
\n\n | ID | \nUsername | \nUploads | \nUsage | \nGroup | \n\n |
---|
${user.username}'s new password is:
\n${response.data.password}
${keys[i].toUpperCase()} | \n\n |
---|