dist: rebuilt client assets and bumped v1 version string

This commit is contained in:
BobbyWibowo 2022-08-04 16:49:25 +00:00 committed by loli-bot
parent 8c26fa4ffa
commit bdf6557368
12 changed files with 14 additions and 14 deletions

2
dist/js/auth.js vendored
View File

@ -1,2 +1,2 @@
var lsKeys={token:"token"},page={token:localStorage[lsKeys.token],user:null,pass:null,unhide:function(){var e=document.querySelector("#loader");e&&e.classList.add("is-hidden");var r=document.querySelector("#login.is-hidden");r&&r.classList.remove("is-hidden");var o=document.querySelector(".floating-home-button.is-hidden");o&&o.classList.remove("is-hidden")},onAxiosError:function(e){console.error(e);var r={520:"Unknown Error",521:"Web Server Is Down",522:"Connection Timed Out",523:"Origin Is Unreachable",524:"A Timeout Occurred",525:"SSL Handshake Failed",526:"Invalid SSL Certificate",527:"Railgun Error",530:"Origin DNS Error"}[e.response.status]||e.response.statusText,o=e.response.data&&e.response.data.description?e.response.data.description:"There was an error with the request.\nPlease check the console for more information.";return swal(e.response.status+" "+r,o,"error")},do:function(e,r){var o=page.user.value.trim();if(!o)return swal("An error occurred!","You need to specify a username.","error");var n=page.pass.value.trim();if(!n)return swal("An error occurred!","You need to specify a password.","error");r.classList.add("is-loading"),axios.post("api/"+e,{username:o,password:n}).then((function(o){if(!1===o.data.success)return r.classList.remove("is-loading"),swal("Unable to "+e+"!",o.data.description,"error");localStorage.token=o.data.token,window.location="dashboard"})).catch((function(e){r.classList.remove("is-loading"),page.onAxiosError(e)}))},verify:function(){axios.post("api/tokens/verify",{token:page.token}).then((function(e){if(!1===e.data.success)return page.unhide(),swal("An error occurred!",e.data.description,"error");window.location="dashboard"})).catch((function(e){e.response.data&&10001===e.response.data.code&&localStorage.removeItem(lsKeys.token),page.unhide(),page.onAxiosError(e)}))}};window.addEventListener("DOMContentLoaded",(function(){page.user=document.querySelector("#user"),page.pass=document.querySelector("#pass");var e=document.querySelector("#authForm");e.addEventListener("submit",(function(e){e.preventDefault()}));var r=document.querySelector("#loginBtn");r&&r.addEventListener("click",(function(r){e.checkValidity()&&page.do("login",r.currentTarget)}));var o=document.querySelector("#registerBtn");o&&o.addEventListener("click",(function(o){if(!e.checkValidity())return r.click();page.do("register",o.currentTarget)})),page.token?page.verify():page.unhide()}));
var lsKeys={token:"token"},page={token:localStorage[lsKeys.token],user:null,pass:null,cloudflareErrors:{520:"Unknown Error",521:"Web Server Is Down",522:"Connection Timed Out",523:"Origin Is Unreachable",524:"A Timeout Occurred",525:"SSL Handshake Failed",526:"Invalid SSL Certificate",527:"Railgun Error",530:"Origin DNS Error"},unhide:function(){var e=document.querySelector("#loader");e&&e.classList.add("is-hidden");var r=document.querySelector("#login.is-hidden");r&&r.classList.remove("is-hidden");var o=document.querySelector(".floating-home-button.is-hidden");o&&o.classList.remove("is-hidden")},onAxiosError:function(e){var r=page.cloudflareErrors[e.response.status]||e.response.statusText,o=e.response.data&&e.response.data.description?e.response.data.description:"There was an error with the request.\nPlease check the console for more information.";return swal(e.response.status+" "+r,o,"error")},do:function(e,r){var o=page.user.value.trim();if(!o)return swal("An error occurred!","You need to specify a username.","error");var n=page.pass.value.trim();if(!n)return swal("An error occurred!","You need to specify a password.","error");r.classList.add("is-loading"),axios.post("api/"+e,{username:o,password:n}).then((function(o){if(!1===o.data.success)return r.classList.remove("is-loading"),swal("Unable to "+e+"!",o.data.description,"error");localStorage.token=o.data.token,window.location="dashboard"})).catch((function(e){r.classList.remove("is-loading"),page.onAxiosError(e)}))},verify:function(){axios.post("api/tokens/verify",{token:page.token}).then((function(e){if(!1===e.data.success)return page.unhide(),swal("An error occurred!",e.data.description,"error");window.location="dashboard"})).catch((function(e){e.response.data&&10001===e.response.data.code&&localStorage.removeItem(lsKeys.token),page.unhide(),page.onAxiosError(e)}))}};window.addEventListener("DOMContentLoaded",(function(){page.user=document.querySelector("#user"),page.pass=document.querySelector("#pass");var e=document.querySelector("#authForm");e.addEventListener("submit",(function(e){e.preventDefault()}));var r=document.querySelector("#loginBtn");r&&r.addEventListener("click",(function(r){e.checkValidity()&&page.do("login",r.currentTarget)}));var o=document.querySelector("#registerBtn");o&&o.addEventListener("click",(function(o){if(!e.checkValidity())return r.click();page.do("register",o.currentTarget)})),page.token?page.verify():page.unhide()}));
//# sourceMappingURL=auth.js.map

2
dist/js/auth.js.map vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

2
dist/js/file.js vendored

File diff suppressed because one or more lines are too long

2
dist/js/file.js.map vendored

File diff suppressed because one or more lines are too long

2
dist/js/home.js vendored

File diff suppressed because one or more lines are too long

2
dist/js/home.js.map vendored

File diff suppressed because one or more lines are too long

2
dist/js/player.js vendored
View File

@ -1,2 +1,2 @@
var lsKeys={},page={urlPrefix:null,urlIdentifier:null,urlInput:document.querySelector("#identifier"),reloadBtn:document.querySelector("#reloadBtn"),downloadBtn:document.querySelector("#downloadBtn"),uploadRoot:null,titleFormat:null,videoContainer:document.querySelector("#playerContainer"),player:null};window.HELP_IMPROVE_VIDEOJS=!1,page.onError=function(e){console.error(e);var o=document.createElement("div");return o.innerHTML="\n <p><code>"+e.toString()+"</code></p>\n <p>Please check your console for more information.</p>\n ",swal({title:"An error occurred!",icon:"error",content:o})},page.onAxiosError=function(e){var o={520:"Unknown Error",521:"Web Server Is Down",522:"Connection Timed Out",523:"Origin Is Unreachable",524:"A Timeout Occurred",525:"SSL Handshake Failed",526:"Invalid SSL Certificate",527:"Railgun Error",530:"Origin DNS Error"}[e.response.status]||e.response.statusText,t=e.response.data&&e.response.data.description?e.response.data.description:"";return swal(e.response.status+" "+o,t,"error")},page.toggleReloadBtn=function(e){e?(page.reloadBtn.classList.remove("is-loading"),page.reloadBtn.removeAttribute("disabled")):(page.reloadBtn.classList.add("is-loading"),page.reloadBtn.setAttribute("disabled","disabled"))},page.reloadVideo=function(){if(page.urlInput.value){page.toggleReloadBtn(!1);var e=page.uploadRoot+"/"+page.urlInput.value;axios.head(e).then((function(o){if(![200,304].includes(o.status))return page.toggleReloadBtn(!0),page.onAxiosError(o);var t=o.headers["content-type"]||"",r=t.startsWith("video/"),a=t.startsWith("audio/");if(!r&&!a)return page.toggleReloadBtn(!0),swal("An error occurred!","The requested upload does not appear to be a media file.","error");page.urlIdentifier=page.urlInput.value,page.player&&(page.player.dispose(),page.videoContainer.innerHTML="");var n=document.createElement("video-js");n.id="video-js",n.className="video-js vjs-default-skin vjs-fluid vjs-big-play-centered",n.setAttribute("controls",!0),n.setAttribute("preload","auto"),page.videoContainer.appendChild(n);var i={language:"en",playbackRates:[.25,.5,.75,1,1.25,1.5,1.75,2],responsive:!0,plugins:{}};a&&(i.plugins.wavesurfer={responsive:!0}),page.player=videojs("video-js",i,(function(){var o="Using video.js "+videojs.VERSION;a&&(o+=" with videojs-wavesurfer "+videojs.getPluginVersion("wavesurfer")+" and wavesurfer.js "+WaveSurfer.VERSION),videojs.log(o),page.player.src({src:e,type:t})})),page.player.seekButtons({forward:10,back:10});var l=videojs.getComponent("Button"),d=function(){return page.player.loop()?"Disable loop":"Enable loop"},p=videojs.extend(l,{constructor:function(){l.apply(this,arguments),this.addClass("vjs-loop-button"),this.controlText(d())},handleClick:function(){page.player.loop(!page.player.loop()),this.toggleClass("vjs-loop-enabled",page.player.loop()),this.controlText(d())}});videojs.registerComponent("loopButton",p),page.player.getChild("controlBar").addChild("loopButton"),page.titleFormat&&(document.title=page.titleFormat.replace(/%identifier%/g,page.urlIdentifier)),page.downloadBtn&&page.downloadBtn.setAttribute("href",e),window.history.pushState(null,null,page.urlPrefix+page.urlIdentifier),page.toggleReloadBtn(!0)})).catch((function(e){page.toggleReloadBtn(!0),void 0!==e.response?page.onAxiosError(e):page.onError(e)}))}},window.addEventListener("DOMContentLoaded",(function(){var e=document.querySelector("#mainScript");if(e&&void 0!==e.dataset.uploadRoot){page.uploadRoot=e.dataset.uploadRoot,page.titleFormat=e.dataset.titleFormat;var o=window.location.protocol+"//"+window.location.host,t=window.location.pathname.match(/.*\/(.*)$/);if(!t||!t[1])return swal("An error occurred!","Failed to parse upload identifier from URL.","error");if(page.urlIdentifier=t[1],o+=window.location.pathname.substring(0,window.location.pathname.indexOf(t[1])),page.urlPrefix=o,page.urlInput){page.urlInput.value=page.urlIdentifier;var r=document.querySelector("#inputForm");r.addEventListener("submit",(function(e){e.preventDefault()})),page.videoContainer&&(page.reloadBtn=document.querySelector("#reloadBtn"),page.reloadBtn&&page.reloadBtn.addEventListener("click",(function(e){r.checkValidity()&&page.reloadVideo()})),page.reloadVideo())}}}));
var lsKeys={},page={urlPrefix:null,urlIdentifier:null,urlInput:document.querySelector("#identifier"),reloadBtn:document.querySelector("#reloadBtn"),downloadBtn:document.querySelector("#downloadBtn"),uploadRoot:null,titleFormat:null,videoContainer:document.querySelector("#playerContainer"),player:null,cloudflareErrors:{520:"Unknown Error",521:"Web Server Is Down",522:"Connection Timed Out",523:"Origin Is Unreachable",524:"A Timeout Occurred",525:"SSL Handshake Failed",526:"Invalid SSL Certificate",527:"Railgun Error",530:"Origin DNS Error"}};window.HELP_IMPROVE_VIDEOJS=!1,page.onError=function(e){console.error(e);var o=document.createElement("div");return o.innerHTML="\n <p><code>"+e.toString()+"</code></p>\n <p>Please check your console for more information.</p>\n ",swal({title:"An error occurred!",icon:"error",content:o})},page.onAxiosError=function(e){var o=page.cloudflareErrors[e.response.status]||e.response.statusText,t=e.response.data&&e.response.data.description?e.response.data.description:"";return swal(e.response.status+" "+o,t,"error")},page.toggleReloadBtn=function(e){e?(page.reloadBtn.classList.remove("is-loading"),page.reloadBtn.removeAttribute("disabled")):(page.reloadBtn.classList.add("is-loading"),page.reloadBtn.setAttribute("disabled","disabled"))},page.reloadVideo=function(){if(page.urlInput.value){page.toggleReloadBtn(!1);var e=page.uploadRoot+"/"+page.urlInput.value;axios.head(e).then((function(o){if(![200,304].includes(o.status))return page.toggleReloadBtn(!0),page.onAxiosError(o);var t=o.headers["content-type"]||"",r=t.startsWith("video/"),a=t.startsWith("audio/");if(!r&&!a)return page.toggleReloadBtn(!0),swal("An error occurred!","The requested upload does not appear to be a media file.","error");page.urlIdentifier=page.urlInput.value,page.player&&(page.player.dispose(),page.videoContainer.innerHTML="");var n=document.createElement("video-js");n.id="video-js",n.className="video-js vjs-default-skin vjs-fluid vjs-big-play-centered",n.setAttribute("controls",!0),n.setAttribute("preload","auto"),page.videoContainer.appendChild(n);var i={language:"en",playbackRates:[.25,.5,.75,1,1.25,1.5,1.75,2],responsive:!0,plugins:{}};a&&(i.plugins.wavesurfer={responsive:!0}),page.player=videojs("video-js",i,(function(){var o="Using video.js "+videojs.VERSION;a&&(o+=" with videojs-wavesurfer "+videojs.getPluginVersion("wavesurfer")+" and wavesurfer.js "+WaveSurfer.VERSION),videojs.log(o),page.player.src({src:e,type:t})})),page.player.seekButtons({forward:10,back:10});var l=videojs.getComponent("Button"),d=function(){return page.player.loop()?"Disable loop":"Enable loop"},s=videojs.extend(l,{constructor:function(){l.apply(this,arguments),this.addClass("vjs-loop-button"),this.controlText(d())},handleClick:function(){page.player.loop(!page.player.loop()),this.toggleClass("vjs-loop-enabled",page.player.loop()),this.controlText(d())}});videojs.registerComponent("loopButton",s),page.player.getChild("controlBar").addChild("loopButton"),page.titleFormat&&(document.title=page.titleFormat.replace(/%identifier%/g,page.urlIdentifier)),page.downloadBtn&&page.downloadBtn.setAttribute("href",e),window.history.pushState(null,null,page.urlPrefix+page.urlIdentifier),page.toggleReloadBtn(!0)})).catch((function(e){page.toggleReloadBtn(!0),void 0!==e.response?page.onAxiosError(e):page.onError(e)}))}},window.addEventListener("DOMContentLoaded",(function(){var e=document.querySelector("#mainScript");if(e&&void 0!==e.dataset.uploadRoot){page.uploadRoot=e.dataset.uploadRoot,page.titleFormat=e.dataset.titleFormat;var o=window.location.protocol+"//"+window.location.host,t=window.location.pathname.match(/.*\/(.*)$/);if(!t||!t[1])return swal("An error occurred!","Failed to parse upload identifier from URL.","error");if(page.urlIdentifier=t[1],o+=window.location.pathname.substring(0,window.location.pathname.indexOf(t[1])),page.urlPrefix=o,page.urlInput){page.urlInput.value=page.urlIdentifier;var r=document.querySelector("#inputForm");r.addEventListener("submit",(function(e){e.preventDefault()})),page.videoContainer&&(page.reloadBtn=document.querySelector("#reloadBtn"),page.reloadBtn&&page.reloadBtn.addEventListener("click",(function(e){r.checkValidity()&&page.reloadVideo()})),page.reloadVideo())}}}));
//# sourceMappingURL=player.js.map

File diff suppressed because one or more lines are too long

View File

@ -1,5 +1,5 @@
{
"1": "1659342129",
"1": "1659631764",
"2": "1602515119",
"3": "1650485321",
"4": "1602515119",

View File

@ -1062,9 +1062,9 @@ caniuse-api@^3.0.0:
lodash.uniq "^4.5.0"
caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001304, caniuse-lite@^1.0.30001335, caniuse-lite@^1.0.30001366, caniuse-lite@^1.0.30001370:
version "1.0.30001373"
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001373.tgz#2dc3bc3bfcb5d5a929bec11300883040d7b4b4be"
integrity sha512-pJYArGHrPp3TUqQzFYRmP/lwJlj8RCbVe3Gd3eJQkAV8SAC6b19XS9BjMvRdvaS8RMkaTN8ZhoHP6S1y8zzwEQ==
version "1.0.30001374"
resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001374.tgz"
integrity sha512-mWvzatRx3w+j5wx/mpFN5v5twlPrabG8NqX2c6e45LCpymdoGqNvRkRutFUqpRTXKFQFNQJasvK0YT7suW6/Hw==
chalk@^2.0.0, chalk@^2.1.0, chalk@^2.3.0:
version "2.4.2"