diff --git a/assets/js/helper.mjs b/assets/js/helper.mjs index a45b21c4..8c45e977 100644 --- a/assets/js/helper.mjs +++ b/assets/js/helper.mjs @@ -100,6 +100,8 @@ export function titleize(text) { "to", "update", "updates", + "unprotect", + "unprotects", "vs", "with", ]; @@ -233,6 +235,10 @@ export function titleize(text) { text = text.replace(/(Lotus 123)/g, "Lotus 1-2-3"); text = text.replace(/(Falcon at )/g, "Falcon AT "); text = text.replace(/(the Games)/g, "The Games"); + // Move "Unprotect for" to the suffix if it is the prefix + text = text.replace(/^(Unprotect for )(.+)/, "$2 unprotect"); + text = text.replace(/^(Unprotecting )(.+)/, "$2 unprotect"); + text = text.replace(/^(Unprotect )(.+)/, "$2 unprotect"); // replace formatting quirks text = text.replace(/( : a)/g, " : A"); text = text.replace(/( - a)/g, " - A"); @@ -251,6 +257,7 @@ export function titleize(text) { text = text.replace(/\[([^)]+)\]/g, function (match) { return match.toUpperCase(); }); + return text; } diff --git a/public/js/editor-artifact.min.js b/public/js/editor-artifact.min.js index 1ebc750e..b5eb5b1d 100644 --- a/public/js/editor-artifact.min.js +++ b/public/js/editor-artifact.min.js @@ -1,2 +1,2 @@ /* editor-artifact.min.js © Defacto2 2024 */ -(()=>{function U(e,r,i){if(e==null)throw new Error("The year input element is null.");if(r==null)throw new Error("The month input element is null.");if(i==null)throw new Error("The day input element is null.");e.classList.remove("is-invalid","is-valid"),r.classList.remove("is-invalid","is-valid"),i.classList.remove("is-invalid","is-valid");let l=parseInt(e.value,10);isNaN(l)?e.value="0":e.value=l;let n=parseInt(r.value,10);isNaN(n)?r.value="0":r.value=n;let a=parseInt(i.value,10);isNaN(a)?i.value="0":i.value=a;let s=0,p=new Date().getFullYear(),g=l>=1980&&l<=p;l>s&&!g&&e.classList.add("is-invalid");let I=n>=1&&n<=12;n>s&&!I&&r.classList.add("is-invalid");let E=a>=1&&a<=31;a>s&&!E&&i.classList.add("is-invalid"),isNaN(l)&&(I||E)&&e.classList.add("is-invalid"),(n==s||isNaN(n))&&E&&r.classList.add("is-invalid")}function ye(e){return Be(e,!0)}function be(e){return Be(e,!1)}function Be(e,r){if(e==null)throw new Error("The repository URL element is null.");e.classList.remove("is-valid","is-invalid");let i=e.value.trim();if(i.length===0)return;if(r==!0&&i.startsWith("refs/")){e.classList.add("is-invalid");return}if(i.includes("://")){e.classList.add("is-invalid");return}let n=/[^A-Za-z0-9-._/]/g;i=i.replace(n,""),i=i.replaceAll("//","/");let a=/^\//;i=i.replace(a,""),e.value=i;let s=e.getAttribute("maxlength");if(s===null)throw new Error(`The maxlength attribute is required for ${e.id}.`);if(i.length>s){e.classList.add("is-invalid");return}}function N(e){if(e==null)throw new Error("The element of the releaser validator is null.");e.classList.remove("is-valid","is-invalid");let r=e.value.trimStart().toUpperCase();r=r.replace("+",", "),r=r.replace(/[^ A-ZÀ-ÖØ-Þ0-9\-,&]/g,""),r=r.replace(/[ ]{2,}/g," "),e.value=r;let i=e.getAttribute("minlength"),l=e.getAttribute("maxlength"),n=e.getAttribute("required");if(i===null)throw new Error(`The minlength attribute is required for ${e.id}.`);if(l===null)throw new Error(`The maxlength attribute is required for ${e.id}.`);let a=document.getElementById("artifact-editor-releasers-error");if(a===null)throw new Error("The releasers error element is null.");let s=r.lengthl;if(n!=null&&s){e.classList.add("is-invalid"),e.id==="-1"&&a.classList.add("d-block");return}let p=r.length>0&&(r.lengthl);if(n==null&&p){e.classList.add("is-invalid");return}e.classList.remove("is-invalid"),a.classList.remove("d-block")}function Te(e){if(e==null)throw new Error("The element of the releaser validator is null.");e.classList.remove("is-valid","is-invalid");let r=e.value.trim();r.length>0&&r.length!=11&&e.classList.add("is-invalid")}function Z(e,r){if(e==null)throw new Error("The element of the number validator is null.");e.classList.remove("is-valid","is-invalid");let i=parseInt(e.value,10);isNaN(i)&&e.classList.add("is-invalid"),(i>r||i<0)&&e.classList.add("is-invalid")}function ke(e){e.preventDefault();let r=(e.clipboardData||window.Clipboard).getData("text"),i=this,l=i.selectionStart,n=i.selectionEnd;i.value=i.value.slice(0,l)+r+i.value.slice(n),i.setSelectionRange(l+r.length,l+r.length);let a=H(i.value);i.value!=a&&(console.log('Formatted input text "%s" is formatted to "%s".',i.value,a),i.value=a)}function H(e){let r=["a","addon","aka","an","and","as","at","beta","betas","but","by","compatibility","crack","cracks","demo","demos","doc","docs","documentation","fix","fixes","for","final","from","if","in","installer","installers","is","hint","hints","map","maps","mod","mods","of","on","or","patch","patches","part","prerelease","prereleases","preview","previews","proper","release","releases","repack","repacks","rip","rips","so","solve","solves","the","trainer","trainers","to","update","updates","vs","with"],i=[".com",".exe","2d","3d","4d","abc","ad&d","api","bbs","bios","bsa","cd","cga","dos","dox","dvd","ega","ehq","f1","fbi","ftp","hd","hq","ibm","id","iso","la","lego","ls","masm","mbl","ms","mtv","nascar","nba","ncaa","nfl","nsa","nfo","nhl","nt","oem","os","pc","pga","ppe","pfs","pkarc","pkzip","psx","rac","rom","sdk","sfx","spa","tv","usa","ushq","uss","vga","whq","ww1","ww2","ww3","wwf","xp","ys"];e=e.trim(),e=e.replace(/_/g," "),e.match(/\./g)&&e.match(/\./g).length>4&&(e=e.replace(/\./g," ")),e=e.replace(/['"`]/g,""),e=e.replace(/ \([0-9a-z]\)/g,""),e=e.replace(/([a-zA-Z0-9]): /g,"$1 : "),e=e.replace(/([xX][-| ][Mm]en)/g,"X-Men"),e=e.replace(/\(/g,"( "),e=e.replace(/\)/g," )");let l=e.split(" ").length;return e=e.split(" ").map((n,a)=>{var s=n;if(Re(s)===!0)return s.toLowerCase();if(i.includes(s.toLowerCase()))return s.toUpperCase();let p=Ue(s);if(p!=="")return p;let g=Fe(s);a>0&&Number.isInteger(g)&&(s=`${g}`);let I=Me(s,a,l);return I!==s&&(s=I),n!==s?s:a===0||!r.includes(s.toLowerCase())?s.charAt(0).toUpperCase()+s.slice(1).toLowerCase():n.toLowerCase()}).join(" ").trim(),e=e.replace(/(Lotus 123)/g,"Lotus 1-2-3"),e=e.replace(/(Falcon at )/g,"Falcon AT "),e=e.replace(/(the Games)/g,"The Games"),e=e.replace(/( : a)/g," : A"),e=e.replace(/( - a)/g," - A"),e=e.replace(/( : t)/g," : T"),e=e.replace(/( - t)/g," - T"),e=e.replace(/(f-)/g,"F-"),e=e.replace(/(3-d)/g,"3D"),e=e.replace(/(Pfs-)/g,"PFS-"),e=e.replace(/(Mean-18)/g,"Mean 18"),e=e.replace(/(v\d+)\.0/g,"$1"),e=e.replace(/\( /g,"("),e=e.replace(/ \)/g,")"),e=e.replace(/\[([^)]+)\]/g,function(n){return n.toUpperCase()}),e}function Re(e){return/^[vV]\d+(\.\d+)?[a-z]?$/i.test(e)}function Me(e,r,i){return r!=i-1?e:["cheat","cheater","cracktro","loader","installer","trainer","version"].includes(e.toLowerCase())?"":e}function Fe(e){let r={I:1,V:5,X:10},i=0,l=0;for(let n=e.length-1;n>=0;n--){let a=r[e[n].toUpperCase()];aa?`${(Math.round(e*100/a)/100).toFixed(2)} GB`:e>n?`${(Math.round(e*100/n)/100).toFixed(1)} MB`:e>1e3?`${(Math.round(e*100/1e3)/100).toFixed()} kB`:`${Math.round(e).toFixed()} bytes`}(()=>{"use strict";function e(t){return function(){t.forEach(o=>{o.disabled=!0,o.classList.remove("btn-outline-primary"),o.classList.add("btn-light")})}}function r(t){return function(){t.forEach(o=>{o.disabled=!1,o.classList.remove("btn-light"),o.classList.add("btn-outline-primary")})}}let i=document.getElementById("artifact-editor-modal"),l=document.getElementsByName("artifact-editor-dataeditor");i.addEventListener("shown.bs.modal",()=>{e(l)()}),i.addEventListener("hidden.bs.modal",()=>{r(l)()});let n=document.getElementById("asset-editor-modal"),a=document.getElementsByName("artifact-editor-fileeditor");n.addEventListener("shown.bs.modal",()=>{e(a)()}),n.addEventListener("hidden.bs.modal",()=>{r(a)()});let s=document.getElementById("emulate-editor-modal"),p=document.getElementsByName("artifact-editor-emueditor");s.addEventListener("shown.bs.modal",()=>{e(p)()}),s.addEventListener("hidden.bs.modal",()=>{r(p)()});let g=document.getElementById("emulate-run-program");if(g!==null){let t=document.getElementById("emulate-guess-program");if(t===null)throw new Error("The guess program input is missing.");g.addEventListener("input",()=>{if(g.value=g.value.toUpperCase(),g.value!==""){t.disabled=!0;return}t.disabled=!1})}if(c("artifact-dataeditor-key-value")===null)throw new Error("The key value is missing.");let E=c("artifact-dataeditor-key-label");if(E===null)throw new Error("The key label is missing.");if(E.addEventListener("click",()=>k("artifact-dataeditor-key-value")),c("artifact-fileeditor-key-value")===null)throw new Error("The key value is missing.");let Ie=c("artifact-fileeditor-key-label");if(E===null)throw new Error("The key label is missing.");if(Ie.addEventListener("click",()=>k("artifact-fileeditor-key-value")),c("artifact-dataeditor-unique-id-value")===null)throw new Error("The unique id value is missing.");let K=c("artifact-dataeditor-unique-id-label");if(K===null)throw new Error("The unique id label is missing.");if(K.addEventListener("click",()=>k("artifact-dataeditor-unique-id-value")),c("artifact-fileeditor-unique-id-value")===null)throw new Error("The unique id value is missing.");let _=c("artifact-fileeditor-unique-id-label");if(_===null)throw new Error("The unique id label is missing.");if(_.addEventListener("click",()=>k("artifact-fileeditor-unique-id-value")),c("artifact-editor-location-value")===null)throw new Error("The location value is missing.");let J=c("artifact-editor-location-label");if(J===null)throw new Error("The location label is missing.");J.addEventListener("click",()=>k("artifact-editor-location-value"));let Q=c("artifact-editor-templocation");if(Q!=null){let t=c("artifact-editor-templocation-label");t!==null&&t.addEventListener("click",()=>k("artifact-editor-templocation"))}if(document.getElementById("artifact-editor-os-label")===null)throw new Error("The operating system label is missing.");let L=document.getElementById("artifact-editor-operating-system");if(L===null)throw new Error("The operating system input is missing.");L.addEventListener("input",P);let y=document.getElementById("artifact-editor-category");if(y===null)throw new Error("The category input is missing.");y.addEventListener("input",S),P(),S();function P(){L.selectedIndex==0&&(L.classList.remove("is-valid"),L.classList.add("is-invalid"))}function S(){y.selectedIndex==0&&(y.classList.remove("is-valid"),y.classList.add("is-invalid"))}let x=document.getElementsByName("prereset-classifications");if(x.length===0)throw new Error("The preset classifications are missing.");for(let t=0;t{A.preventDefault(),L.value=h,L.classList.remove("is-invalid"),y.value=f,y.classList.remove("is-invalid"),P(),S()})}let w=document.getElementById("artifact-editor-filename");if(w===null)throw new Error("The filename input is missing.");w.addEventListener("input",t=>{t.target.classList.remove("is-valid"),t.target.classList.remove("is-invalid"),t.target.value.trim().length===0&&t.target.classList.add("is-invalid")});let ee=document.getElementById("artifact-editor-filename-reset");if(ee===null)throw new Error("The filename reset is missing.");let z=document.getElementsByName("artifact-editor-filename-undo");if(z.length===0)throw new Error("The filename resetter is missing.");ee.addEventListener("click",()=>{if(w.classList.remove("is-valid"),z.length===0)throw new Error("The filename resetter is missing.");w.value=z[0].value,w.classList.add("is-valid"),w.classList.remove("is-invalid"),w.value.trim().length===0&&w.classList.add("is-invalid")});let D=document.getElementById("artifact-editor-releaser-1");if(D===null)throw new Error("The releaser 1 input is missing.");D.addEventListener("input",t=>N(t.target));let q=document.getElementById("artifact-editor-releaser-2");if(q===null)throw new Error("The releaser 2 input is missing.");q.addEventListener("input",t=>N(t.target));let te=document.getElementById("artifact-editor-releaser-undo");if(te===null)throw new Error("The releasers reset is missing.");te.addEventListener("click",Ae);function Ae(){let t=D.getAttribute("data-reset-rel1");if(t===null)throw new Error("data-reset-rel1 attribute is required for artifact-editor-releaser-1.");D.value=t,N(D);let o=q.getAttribute("data-reset-rel2");if(o===null)throw new Error("data-reset-rel2 attribute is required for artifact-editor-releaser-2.");q.value=o,N(q)}let u=document.getElementById("artifact-editor-title");if(u===null)throw new Error("The title input is missing.");u.addEventListener("paste",ke),u.addEventListener("input",t=>{t.target.classList.remove("is-valid")});let ie=document.getElementById("artifact-editor-title-undo");if(ie===null)throw new Error("The title reset is missing.");let Y=document.getElementsByName("artifact-editor-titleundo");if(Y.length===0)throw new Error("The title resetter is missing.");ie.addEventListener("click",()=>{if(u.classList.remove("is-valid"),Y.length===0)throw new Error("The title resetter is missing.");u.value=Y[0].value,u.classList.add("is-valid")});let re=document.getElementById("artifact-editor-titleize");if(re.length===0)throw new Error("The titleize button is missing.");re.addEventListener("click",()=>{u.value=H(u.value);let t=new Event("keyup");u.dispatchEvent(t)});let ne=document.getElementById("artifact-editor-title-delete");if(ne.length===0)throw new Error("The title delete button is missing.");ne.addEventListener("click",()=>{u.value="";let t=new Event("keyup");u.dispatchEvent(t)});let V=document.getElementById("artifact-editor-credit-text");if(V===null)throw new Error("The creator text input is missing.");V.addEventListener("input",t=>{t.target.classList.remove("is-valid")});let j=document.getElementById("artifact-editor-credit-ill");if(j===null)throw new Error("The creator illustrator input is missing.");j.addEventListener("input",t=>{t.target.classList.remove("is-valid")});let G=document.getElementById("artifact-editor-credit-prog");if(G===null)throw new Error("The creator programmer input is missing.");G.addEventListener("input",t=>{t.target.classList.remove("is-valid")});let O=document.getElementById("artifact-editor-credit-audio");if(O===null)throw new Error("The creator audio input is missing.");O.addEventListener("input",t=>{t.target.classList.remove("is-valid")});let W=document.getElementById("artifact-editor-credits-undo");if(W===null)throw new Error("The creator resetter is missing.");let ae=document.getElementById("artifact-editor-credit-undo");if(ae===null)throw new Error("The creator reset is missing.");ae.addEventListener("click",()=>{if(W.length===0)throw new Error("The creator resetter is missing.");let t=W.value.split(";");if(t.length!=4)throw new Error("The creator resetter values are invalid.");let o=t[0],h=t[1],f=t[2],A=t[3];V.value=o,j.value=h,G.value=f,O.value=A});let se=document.getElementById("artifact-editor-virustotal");if(se===null)throw new Error("The virustotal input is missing.");se.addEventListener("input",t=>{t.target.classList.remove("is-valid","is-invalid");let o=t.target.value.trim();o.length!=0&&(o.startsWith("https://www.virustotal.com/")||t.target.classList.add("is-invalid"))});let d=document.getElementById("artifact-editor-year");if(d===null)throw new Error("The year input is missing.");d.addEventListener("input",()=>{let t=parseInt(d.value,10);t>=79&&t<=99&&(d.value=1900+t),U(d,m,v)});let m=document.getElementById("artifact-editor-month");if(m===null)throw new Error("The month input is missing.");m.addEventListener("input",()=>{U(d,m,v)});let v=document.getElementById("artifact-editor-day");if(v===null)throw new Error("The day input is missing.");v.addEventListener("input",()=>{U(d,m,v)});let oe=document.getElementById("artifact-editor-date-reset");if(oe===null)throw new Error("The date reset is missing.");let le=document.getElementById("artifact-editor-date-resetter");if(le===null)throw new Error("The date resetter is missing.");oe.addEventListener("click",()=>{d.classList.remove("is-invalid","is-valid"),m.classList.remove("is-invalid","is-valid"),v.classList.remove("is-invalid","is-valid");let o=le.value.split("-");if(o.length!=3)throw new Error("The date resetter values are invalid.");d.value=o[0],m.value=o[1],v.value=o[2]});let $=document.getElementById("artifact-editor-comment");if($===null)throw new Error("The comment input is missing.");$.addEventListener("input",t=>{if(t.target.classList.remove("is-valid"),(d.value==0&&m.value==0&&v.value==0)==!1)return;let f=/(0[1-9]|1[0-2])\/(0[1-9]|[12][0-9]|3[01])\/(\d{2})/.exec(t.target.value);if(f||(f=/(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])-(\d{2})/.exec(t.target.value)),f){let A=f[1],Ne=f[2],$e=f[3],F=parseInt($e,10);d.value=2e3+F,F>=79&&F<=99&&(d.value=1900+F),m.value=A,v.value=Ne;let Le=document.getElementById("artifact-editor-date-update");Le!==null&&Le.click()}});let de=document.getElementById("artifact-editor-comment-undo");if(de===null)throw new Error("The comment reset is missing.");let ce=document.getElementById("artifact-editor-comment-resetter");if(ce===null)throw new Error("The comment resetter is missing.");de.addEventListener("click",()=>{$.classList.remove("is-valid"),$.value=ce.value});let ue=document.getElementById("artifact-editor-date-lastmod");if(ue!==null){let t=document.getElementById("artifact-editor-date-lastmodder");if(t===null)throw new Error("The date last modder input is missing.");ue.addEventListener("click",()=>{d.classList.remove("is-invalid","is-valid"),m.classList.remove("is-invalid","is-valid"),v.classList.remove("is-invalid","is-valid");let h=t.value.split("-");if(h.length!=3)throw new Error("The date last modder values are invalid.");d.value=h[0],m.value=h[1],v.value=h[2]})}let me=document.getElementById("artifact-editor-links-reset");if(me===null)throw new Error("The links reset is missing.");let b=document.getElementById("artifact-editor-youtube"),ve=document.getElementById("artifact-editor-youtube-reset");if(b===null||ve===null)throw new Error("A YouTube input is missing.");let R=document.getElementById("artifact-editor-demozoo"),fe=document.getElementById("artifact-editor-demozoo-reset");if(R===null||fe===null)throw new Error("A Demozoo input is missing.");let M=document.getElementById("artifact-editor-pouet"),ge=document.getElementById("artifact-editor-pouet-reset");if(M===null||ge===null)throw new Error("A Pouet input is missing.");let B=document.getElementById("artifact-editor-16colors"),he=document.getElementById("artifact-editor-16colors-reset");if(B===null||he===null)throw new Error("A 16colors input is missing.");let T=document.getElementById("artifact-editor-github"),pe=document.getElementById("artifact-editor-github-reset");if(T===null||pe===null)throw new Error("A GitHub input is missing.");let X=document.getElementById("artifact-editor-relations"),we=document.getElementById("artifact-editor-relations-reset");if(X===null||we===null)throw new Error("A relations input is missing.");let C=document.getElementById("artifact-editor-websites"),Ee=document.getElementById("artifact-editor-websites-reset");if(C===null||Ee===null)throw new Error("A websites input is missing.");C.addEventListener("paste",()=>{setTimeout(()=>{C.value=C.value.replace(/https?:\/\//,"")},0)}),me.addEventListener("click",()=>{b.classList.remove("is-invalid","is-valid"),R.classList.remove("is-invalid","is-valid"),M.classList.remove("is-invalid","is-valid"),B.classList.remove("is-invalid","is-valid"),T.classList.remove("is-invalid","is-valid"),X.classList.remove("is-invalid","is-valid"),C.classList.remove("is-invalid","is-valid"),b.value=ve.value,R.value=fe.value,M.value=ge.value,B.value=he.value,T.value=pe.value,X.value=we.value,C.value=Ee.value});let De=45e4,qe=2e5;b.addEventListener("paste",()=>{setTimeout(()=>{b.value=b.value.replace(/https?:\/\/www.youtube.com\/watch\?v=/,"")},0)}),b.addEventListener("input",t=>Te(t.target)),R.addEventListener("input",t=>Z(t.target,De)),M.addEventListener("input",t=>Z(t.target,qe)),B.addEventListener("paste",()=>{setTimeout(()=>{B.value=B.value.replace(/https?:\/\/16colo.rs\//,"")},0)}),B.addEventListener("input",t=>be(t.target)),T.addEventListener("paste",()=>{setTimeout(()=>{T.value=T.value.replace(/https?:\/\/github.com\//,"")},0)}),T.addEventListener("input",t=>ye(t.target))})();})(); +(()=>{function F(e,i,r){if(e==null)throw new Error("The year input element is null.");if(i==null)throw new Error("The month input element is null.");if(r==null)throw new Error("The day input element is null.");e.classList.remove("is-invalid","is-valid"),i.classList.remove("is-invalid","is-valid"),r.classList.remove("is-invalid","is-valid");let l=parseInt(e.value,10);isNaN(l)?e.value="0":e.value=l;let n=parseInt(i.value,10);isNaN(n)?i.value="0":i.value=n;let a=parseInt(r.value,10);isNaN(a)?r.value="0":r.value=a;let s=0,p=new Date().getFullYear(),g=l>=1980&&l<=p;l>s&&!g&&e.classList.add("is-invalid");let I=n>=1&&n<=12;n>s&&!I&&i.classList.add("is-invalid");let E=a>=1&&a<=31;a>s&&!E&&r.classList.add("is-invalid"),isNaN(l)&&(I||E)&&e.classList.add("is-invalid"),(n==s||isNaN(n))&&E&&i.classList.add("is-invalid")}function ye(e){return Be(e,!0)}function be(e){return Be(e,!1)}function Be(e,i){if(e==null)throw new Error("The repository URL element is null.");e.classList.remove("is-valid","is-invalid");let r=e.value.trim();if(r.length===0)return;if(i==!0&&r.startsWith("refs/")){e.classList.add("is-invalid");return}if(r.includes("://")){e.classList.add("is-invalid");return}let n=/[^A-Za-z0-9-._/]/g;r=r.replace(n,""),r=r.replaceAll("//","/");let a=/^\//;r=r.replace(a,""),e.value=r;let s=e.getAttribute("maxlength");if(s===null)throw new Error(`The maxlength attribute is required for ${e.id}.`);if(r.length>s){e.classList.add("is-invalid");return}}function q(e){if(e==null)throw new Error("The element of the releaser validator is null.");e.classList.remove("is-valid","is-invalid");let i=e.value.trimStart().toUpperCase();i=i.replace("+",", "),i=i.replace(/[^ A-ZÀ-ÖØ-Þ0-9\-,&]/g,""),i=i.replace(/[ ]{2,}/g," "),e.value=i;let r=e.getAttribute("minlength"),l=e.getAttribute("maxlength"),n=e.getAttribute("required");if(r===null)throw new Error(`The minlength attribute is required for ${e.id}.`);if(l===null)throw new Error(`The maxlength attribute is required for ${e.id}.`);let a=document.getElementById("artifact-editor-releasers-error");if(a===null)throw new Error("The releasers error element is null.");let s=i.lengthl;if(n!=null&&s){e.classList.add("is-invalid"),e.id==="-1"&&a.classList.add("d-block");return}let p=i.length>0&&(i.lengthl);if(n==null&&p){e.classList.add("is-invalid");return}e.classList.remove("is-invalid"),a.classList.remove("d-block")}function Te(e){if(e==null)throw new Error("The element of the releaser validator is null.");e.classList.remove("is-valid","is-invalid");let i=e.value.trim();i.length>0&&i.length!=11&&e.classList.add("is-invalid")}function Z(e,i){if(e==null)throw new Error("The element of the number validator is null.");e.classList.remove("is-valid","is-invalid");let r=parseInt(e.value,10);isNaN(r)&&e.classList.add("is-invalid"),(r>i||r<0)&&e.classList.add("is-invalid")}function ke(e){e.preventDefault();let i=(e.clipboardData||window.Clipboard).getData("text"),r=this,l=r.selectionStart,n=r.selectionEnd;r.value=r.value.slice(0,l)+i+r.value.slice(n),r.setSelectionRange(l+i.length,l+i.length);let a=H(r.value);r.value!=a&&(console.log('Formatted input text "%s" is formatted to "%s".',r.value,a),r.value=a)}function H(e){let i=["a","addon","aka","an","and","as","at","beta","betas","but","by","compatibility","crack","cracks","demo","demos","doc","docs","documentation","fix","fixes","for","final","from","if","in","installer","installers","is","hint","hints","map","maps","mod","mods","of","on","or","patch","patches","part","prerelease","prereleases","preview","previews","proper","release","releases","repack","repacks","rip","rips","so","solve","solves","the","trainer","trainers","to","update","updates","unprotect","unprotects","vs","with"],r=[".com",".exe","2d","3d","4d","abc","ad&d","api","bbs","bios","bsa","cd","cga","dos","dox","dvd","ega","ehq","f1","fbi","ftp","hd","hq","ibm","id","iso","la","lego","ls","masm","mbl","ms","mtv","nascar","nba","ncaa","nfl","nsa","nfo","nhl","nt","oem","os","pc","pga","ppe","pfs","pkarc","pkzip","psx","rac","rom","sdk","sfx","spa","tv","usa","ushq","uss","vga","whq","ww1","ww2","ww3","wwf","xp","ys"];e=e.trim(),e=e.replace(/_/g," "),e.match(/\./g)&&e.match(/\./g).length>4&&(e=e.replace(/\./g," ")),e=e.replace(/['"`]/g,""),e=e.replace(/ \([0-9a-z]\)/g,""),e=e.replace(/([a-zA-Z0-9]): /g,"$1 : "),e=e.replace(/([xX][-| ][Mm]en)/g,"X-Men"),e=e.replace(/\(/g,"( "),e=e.replace(/\)/g," )");let l=e.split(" ").length;return e=e.split(" ").map((n,a)=>{var s=n;if(Re(s)===!0)return s.toLowerCase();if(r.includes(s.toLowerCase()))return s.toUpperCase();let p=Fe(s);if(p!=="")return p;let g=Ue(s);a>0&&Number.isInteger(g)&&(s=`${g}`);let I=Me(s,a,l);return I!==s&&(s=I),n!==s?s:a===0||!i.includes(s.toLowerCase())?s.charAt(0).toUpperCase()+s.slice(1).toLowerCase():n.toLowerCase()}).join(" ").trim(),e=e.replace(/(Lotus 123)/g,"Lotus 1-2-3"),e=e.replace(/(Falcon at )/g,"Falcon AT "),e=e.replace(/(the Games)/g,"The Games"),e=e.replace(/^(Unprotect for )(.+)/,"$2 unprotect"),e=e.replace(/^(Unprotecting )(.+)/,"$2 unprotect"),e=e.replace(/^(Unprotect )(.+)/,"$2 unprotect"),e=e.replace(/( : a)/g," : A"),e=e.replace(/( - a)/g," - A"),e=e.replace(/( : t)/g," : T"),e=e.replace(/( - t)/g," - T"),e=e.replace(/(f-)/g,"F-"),e=e.replace(/(3-d)/g,"3D"),e=e.replace(/(Pfs-)/g,"PFS-"),e=e.replace(/(Mean-18)/g,"Mean 18"),e=e.replace(/(v\d+)\.0/g,"$1"),e=e.replace(/\( /g,"("),e=e.replace(/ \)/g,")"),e=e.replace(/\[([^)]+)\]/g,function(n){return n.toUpperCase()}),e}function Re(e){return/^[vV]\d+(\.\d+)?[a-z]?$/i.test(e)}function Me(e,i,r){return i!=r-1?e:["cheat","cheater","cracktro","loader","installer","trainer","version"].includes(e.toLowerCase())?"":e}function Ue(e){let i={I:1,V:5,X:10},r=0,l=0;for(let n=e.length-1;n>=0;n--){let a=i[e[n].toUpperCase()];aa?`${(Math.round(e*100/a)/100).toFixed(2)} GB`:e>n?`${(Math.round(e*100/n)/100).toFixed(1)} MB`:e>1e3?`${(Math.round(e*100/1e3)/100).toFixed()} kB`:`${Math.round(e).toFixed()} bytes`}(()=>{"use strict";function e(t){return function(){t.forEach(o=>{o.disabled=!0,o.classList.remove("btn-outline-primary"),o.classList.add("btn-light")})}}function i(t){return function(){t.forEach(o=>{o.disabled=!1,o.classList.remove("btn-light"),o.classList.add("btn-outline-primary")})}}let r=document.getElementById("artifact-editor-modal"),l=document.getElementsByName("artifact-editor-dataeditor");r.addEventListener("shown.bs.modal",()=>{e(l)()}),r.addEventListener("hidden.bs.modal",()=>{i(l)()});let n=document.getElementById("asset-editor-modal"),a=document.getElementsByName("artifact-editor-fileeditor");n.addEventListener("shown.bs.modal",()=>{e(a)()}),n.addEventListener("hidden.bs.modal",()=>{i(a)()});let s=document.getElementById("emulate-editor-modal"),p=document.getElementsByName("artifact-editor-emueditor");s.addEventListener("shown.bs.modal",()=>{e(p)()}),s.addEventListener("hidden.bs.modal",()=>{i(p)()});let g=document.getElementById("emulate-run-program");if(g!==null){let t=document.getElementById("emulate-guess-program");if(t===null)throw new Error("The guess program input is missing.");g.addEventListener("input",()=>{if(g.value=g.value.toUpperCase(),g.value!==""){t.disabled=!0;return}t.disabled=!1})}if(c("artifact-dataeditor-key-value")===null)throw new Error("The key value is missing.");let E=c("artifact-dataeditor-key-label");if(E===null)throw new Error("The key label is missing.");if(E.addEventListener("click",()=>k("artifact-dataeditor-key-value")),c("artifact-fileeditor-key-value")===null)throw new Error("The key value is missing.");let Ie=c("artifact-fileeditor-key-label");if(E===null)throw new Error("The key label is missing.");if(Ie.addEventListener("click",()=>k("artifact-fileeditor-key-value")),c("artifact-dataeditor-unique-id-value")===null)throw new Error("The unique id value is missing.");let K=c("artifact-dataeditor-unique-id-label");if(K===null)throw new Error("The unique id label is missing.");if(K.addEventListener("click",()=>k("artifact-dataeditor-unique-id-value")),c("artifact-fileeditor-unique-id-value")===null)throw new Error("The unique id value is missing.");let _=c("artifact-fileeditor-unique-id-label");if(_===null)throw new Error("The unique id label is missing.");if(_.addEventListener("click",()=>k("artifact-fileeditor-unique-id-value")),c("artifact-editor-location-value")===null)throw new Error("The location value is missing.");let J=c("artifact-editor-location-label");if(J===null)throw new Error("The location label is missing.");J.addEventListener("click",()=>k("artifact-editor-location-value"));let Q=c("artifact-editor-templocation");if(Q!=null){let t=c("artifact-editor-templocation-label");t!==null&&t.addEventListener("click",()=>k("artifact-editor-templocation"))}if(document.getElementById("artifact-editor-os-label")===null)throw new Error("The operating system label is missing.");let L=document.getElementById("artifact-editor-operating-system");if(L===null)throw new Error("The operating system input is missing.");L.addEventListener("input",P);let y=document.getElementById("artifact-editor-category");if(y===null)throw new Error("The category input is missing.");y.addEventListener("input",S),P(),S();function P(){L.selectedIndex==0&&(L.classList.remove("is-valid"),L.classList.add("is-invalid"))}function S(){y.selectedIndex==0&&(y.classList.remove("is-valid"),y.classList.add("is-invalid"))}let z=document.getElementsByName("prereset-classifications");if(z.length===0)throw new Error("The preset classifications are missing.");for(let t=0;t{A.preventDefault(),L.value=h,L.classList.remove("is-invalid"),y.value=f,y.classList.remove("is-invalid"),P(),S()})}let w=document.getElementById("artifact-editor-filename");if(w===null)throw new Error("The filename input is missing.");w.addEventListener("input",t=>{t.target.classList.remove("is-valid"),t.target.classList.remove("is-invalid"),t.target.value.trim().length===0&&t.target.classList.add("is-invalid")});let ee=document.getElementById("artifact-editor-filename-reset");if(ee===null)throw new Error("The filename reset is missing.");let Y=document.getElementsByName("artifact-editor-filename-undo");if(Y.length===0)throw new Error("The filename resetter is missing.");ee.addEventListener("click",()=>{if(w.classList.remove("is-valid"),Y.length===0)throw new Error("The filename resetter is missing.");w.value=Y[0].value,w.classList.add("is-valid"),w.classList.remove("is-invalid"),w.value.trim().length===0&&w.classList.add("is-invalid")});let D=document.getElementById("artifact-editor-releaser-1");if(D===null)throw new Error("The releaser 1 input is missing.");D.addEventListener("input",t=>q(t.target));let $=document.getElementById("artifact-editor-releaser-2");if($===null)throw new Error("The releaser 2 input is missing.");$.addEventListener("input",t=>q(t.target));let te=document.getElementById("artifact-editor-releaser-undo");if(te===null)throw new Error("The releasers reset is missing.");te.addEventListener("click",Ae);function Ae(){let t=D.getAttribute("data-reset-rel1");if(t===null)throw new Error("data-reset-rel1 attribute is required for artifact-editor-releaser-1.");D.value=t,q(D);let o=$.getAttribute("data-reset-rel2");if(o===null)throw new Error("data-reset-rel2 attribute is required for artifact-editor-releaser-2.");$.value=o,q($)}let u=document.getElementById("artifact-editor-title");if(u===null)throw new Error("The title input is missing.");u.addEventListener("paste",ke),u.addEventListener("input",t=>{t.target.classList.remove("is-valid")});let re=document.getElementById("artifact-editor-title-undo");if(re===null)throw new Error("The title reset is missing.");let x=document.getElementsByName("artifact-editor-titleundo");if(x.length===0)throw new Error("The title resetter is missing.");re.addEventListener("click",()=>{if(u.classList.remove("is-valid"),x.length===0)throw new Error("The title resetter is missing.");u.value=x[0].value,u.classList.add("is-valid")});let ie=document.getElementById("artifact-editor-titleize");if(ie.length===0)throw new Error("The titleize button is missing.");ie.addEventListener("click",()=>{u.value=H(u.value);let t=new Event("keyup");u.dispatchEvent(t)});let ne=document.getElementById("artifact-editor-title-delete");if(ne.length===0)throw new Error("The title delete button is missing.");ne.addEventListener("click",()=>{u.value="";let t=new Event("keyup");u.dispatchEvent(t)});let V=document.getElementById("artifact-editor-credit-text");if(V===null)throw new Error("The creator text input is missing.");V.addEventListener("input",t=>{t.target.classList.remove("is-valid")});let j=document.getElementById("artifact-editor-credit-ill");if(j===null)throw new Error("The creator illustrator input is missing.");j.addEventListener("input",t=>{t.target.classList.remove("is-valid")});let G=document.getElementById("artifact-editor-credit-prog");if(G===null)throw new Error("The creator programmer input is missing.");G.addEventListener("input",t=>{t.target.classList.remove("is-valid")});let O=document.getElementById("artifact-editor-credit-audio");if(O===null)throw new Error("The creator audio input is missing.");O.addEventListener("input",t=>{t.target.classList.remove("is-valid")});let W=document.getElementById("artifact-editor-credits-undo");if(W===null)throw new Error("The creator resetter is missing.");let ae=document.getElementById("artifact-editor-credit-undo");if(ae===null)throw new Error("The creator reset is missing.");ae.addEventListener("click",()=>{if(W.length===0)throw new Error("The creator resetter is missing.");let t=W.value.split(";");if(t.length!=4)throw new Error("The creator resetter values are invalid.");let o=t[0],h=t[1],f=t[2],A=t[3];V.value=o,j.value=h,G.value=f,O.value=A});let se=document.getElementById("artifact-editor-virustotal");if(se===null)throw new Error("The virustotal input is missing.");se.addEventListener("input",t=>{t.target.classList.remove("is-valid","is-invalid");let o=t.target.value.trim();o.length!=0&&(o.startsWith("https://www.virustotal.com/")||t.target.classList.add("is-invalid"))});let d=document.getElementById("artifact-editor-year");if(d===null)throw new Error("The year input is missing.");d.addEventListener("input",()=>{let t=parseInt(d.value,10);t>=79&&t<=99&&(d.value=1900+t),F(d,m,v)});let m=document.getElementById("artifact-editor-month");if(m===null)throw new Error("The month input is missing.");m.addEventListener("input",()=>{F(d,m,v)});let v=document.getElementById("artifact-editor-day");if(v===null)throw new Error("The day input is missing.");v.addEventListener("input",()=>{F(d,m,v)});let oe=document.getElementById("artifact-editor-date-reset");if(oe===null)throw new Error("The date reset is missing.");let le=document.getElementById("artifact-editor-date-resetter");if(le===null)throw new Error("The date resetter is missing.");oe.addEventListener("click",()=>{d.classList.remove("is-invalid","is-valid"),m.classList.remove("is-invalid","is-valid"),v.classList.remove("is-invalid","is-valid");let o=le.value.split("-");if(o.length!=3)throw new Error("The date resetter values are invalid.");d.value=o[0],m.value=o[1],v.value=o[2]});let N=document.getElementById("artifact-editor-comment");if(N===null)throw new Error("The comment input is missing.");N.addEventListener("input",t=>{if(t.target.classList.remove("is-valid"),(d.value==0&&m.value==0&&v.value==0)==!1)return;let f=/(0[1-9]|1[0-2])\/(0[1-9]|[12][0-9]|3[01])\/(\d{2})/.exec(t.target.value);if(f||(f=/(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])-(\d{2})/.exec(t.target.value)),f){let A=f[1],qe=f[2],Ne=f[3],U=parseInt(Ne,10);d.value=2e3+U,U>=79&&U<=99&&(d.value=1900+U),m.value=A,v.value=qe;let Le=document.getElementById("artifact-editor-date-update");Le!==null&&Le.click()}});let de=document.getElementById("artifact-editor-comment-undo");if(de===null)throw new Error("The comment reset is missing.");let ce=document.getElementById("artifact-editor-comment-resetter");if(ce===null)throw new Error("The comment resetter is missing.");de.addEventListener("click",()=>{N.classList.remove("is-valid"),N.value=ce.value});let ue=document.getElementById("artifact-editor-date-lastmod");if(ue!==null){let t=document.getElementById("artifact-editor-date-lastmodder");if(t===null)throw new Error("The date last modder input is missing.");ue.addEventListener("click",()=>{d.classList.remove("is-invalid","is-valid"),m.classList.remove("is-invalid","is-valid"),v.classList.remove("is-invalid","is-valid");let h=t.value.split("-");if(h.length!=3)throw new Error("The date last modder values are invalid.");d.value=h[0],m.value=h[1],v.value=h[2]})}let me=document.getElementById("artifact-editor-links-reset");if(me===null)throw new Error("The links reset is missing.");let b=document.getElementById("artifact-editor-youtube"),ve=document.getElementById("artifact-editor-youtube-reset");if(b===null||ve===null)throw new Error("A YouTube input is missing.");let R=document.getElementById("artifact-editor-demozoo"),fe=document.getElementById("artifact-editor-demozoo-reset");if(R===null||fe===null)throw new Error("A Demozoo input is missing.");let M=document.getElementById("artifact-editor-pouet"),ge=document.getElementById("artifact-editor-pouet-reset");if(M===null||ge===null)throw new Error("A Pouet input is missing.");let B=document.getElementById("artifact-editor-16colors"),he=document.getElementById("artifact-editor-16colors-reset");if(B===null||he===null)throw new Error("A 16colors input is missing.");let T=document.getElementById("artifact-editor-github"),pe=document.getElementById("artifact-editor-github-reset");if(T===null||pe===null)throw new Error("A GitHub input is missing.");let X=document.getElementById("artifact-editor-relations"),we=document.getElementById("artifact-editor-relations-reset");if(X===null||we===null)throw new Error("A relations input is missing.");let C=document.getElementById("artifact-editor-websites"),Ee=document.getElementById("artifact-editor-websites-reset");if(C===null||Ee===null)throw new Error("A websites input is missing.");C.addEventListener("paste",()=>{setTimeout(()=>{C.value=C.value.replace(/https?:\/\//,"")},0)}),me.addEventListener("click",()=>{b.classList.remove("is-invalid","is-valid"),R.classList.remove("is-invalid","is-valid"),M.classList.remove("is-invalid","is-valid"),B.classList.remove("is-invalid","is-valid"),T.classList.remove("is-invalid","is-valid"),X.classList.remove("is-invalid","is-valid"),C.classList.remove("is-invalid","is-valid"),b.value=ve.value,R.value=fe.value,M.value=ge.value,B.value=he.value,T.value=pe.value,X.value=we.value,C.value=Ee.value});let De=45e4,$e=2e5;b.addEventListener("paste",()=>{setTimeout(()=>{b.value=b.value.replace(/https?:\/\/www.youtube.com\/watch\?v=/,"")},0)}),b.addEventListener("input",t=>Te(t.target)),R.addEventListener("input",t=>Z(t.target,De)),M.addEventListener("input",t=>Z(t.target,$e)),B.addEventListener("paste",()=>{setTimeout(()=>{B.value=B.value.replace(/https?:\/\/16colo.rs\//,"")},0)}),B.addEventListener("input",t=>be(t.target)),T.addEventListener("paste",()=>{setTimeout(()=>{T.value=T.value.replace(/https?:\/\/github.com\//,"")},0)}),T.addEventListener("input",t=>ye(t.target))})();})(); diff --git a/public/js/editor-assets.min.js b/public/js/editor-assets.min.js index bbc30b96..994ad028 100644 --- a/public/js/editor-assets.min.js +++ b/public/js/editor-assets.min.js @@ -1,2 +1,2 @@ /* editor-assets.min.js © Defacto2 2024 */ -(()=>{function d(r){let t=document.getElementById(r);if(t==null){console.error(`The ${r} for getElmById() element is null.`);return}return t}var T="is-invalid",p="d-none",P=100,b=1024*1024,$=100*b;async function R(r){if(r==null)throw new Error("The file value of checkSHA is null.");let t=await q(r),o=await fetch(`/uploader/sha384/${t}`,{method:"PATCH",headers:{"Content-Type":"text/plain"},body:t});if(!o.ok)throw new Error(`Hashing is not possible, server response: ${o.status}`);return await o.text()}async function q(r){if(r==null)throw new Error("The file value of sha384 is null.");try{let t=await r.arrayBuffer(),o=await crypto.subtle.digest("SHA-384",t);return Array.from(new Uint8Array(o)).map(i=>i.toString(16).padStart(2,"0")).join("")}catch(t){throw new Error(`Could not use arrayBuffer or crypto.subtle: ${t}`)}}function k(r,t){if(r==null)throw new Error("The formId value of progress is null.");if(t==null)throw new Error("The elementId value of progress is null.");htmx.on(`#${r}`,"htmx:xhr:progress",function(o){o.target.id==`${r}`&&htmx.find(`#${t}`).setAttribute("value",o.detail.loaded/o.detail.total*P)})}function M(r){if(r==null)throw new Error("The file value of checkSize is null.");return r.size>$?`The chosen file is too big at ${Math.round(r.size/b)}MB, maximum size is ${$/b}MB.`:""}function B(r,t,o,i){if(r==null)throw new Error("The errors value of checkErrors is null.");if(t==null)throw new Error("The alert value of checkErrors is null.");if(o==null)throw new Error("The fileInput value of checkErrors is null.");if(i==null)throw new Error("The results value of checkErrors is null.");r=r.filter(h=>h!=""),!(r.length<=0)&&(t.innerText=r.join(" "),t.classList.remove(p),o.innerText="",o.classList.add(T),i.classList.add(p))}async function I(r,t,o,i){if(r==null)throw new Error("The file value of checkDuplicate is null.");if(t==null)throw new Error("The alert value of checkDuplicate is null.");if(o==null)throw new Error("The fileInput value of checkDuplicate is null.");if(i==null)throw new Error("The results value of checkDuplicate is null.");let h=()=>{t.classList.remove(p),o.innerText="",o.classList.add(T),i.classList.add(p)},w="";try{let u=await R(r);if(u==""){t.innerText="";return}w=u}catch(u){console.log(`${u}`),t.innerText=`${u}`,h();return}t.innerText="The chosen file already exists in the database: ";let f=document.createElement("a");f.href=`/f/${w}`,f.innerText=`${r.name}`,t.appendChild(f),h()}function C(r,t,o){if(r==null)throw new Error("The fileInput value of resetInput is null.");if(t==null)throw new Error("The alert value of resetInput is null.");if(o==null)throw new Error("The results value of resetInput is null.");r.innerText="",r.classList.remove(T),t.innerText="",t.classList.add(p),o.innerText="",o.classList.add(p)}(()=>{"use strict";k("artifact-editor-dl-form","artifact-editor-dl-progress"),k("artifact-editor-preview-form","artifact-editor-preview-progress");let r=d("artifact-editor-preview-reset"),t=d("artifact-editor-replace-preview"),o=d("artifact-editor-preview-submit"),i=d("artifact-editor-dl-alert"),h=d("artifact-editor-dl-reset"),w=d("artifact-editor-last-modified"),f=d("artifact-editor-dl-results"),u=d("artifact-editor-dl-up");u.addEventListener("change",S);async function S(){C(u,i,f);let e=this.files[0],s=[M(e)];B(s,i,u,f),I(e,i,u,f);let n=e.lastModified,a=new Date().getTime(),l=60*60*1e3;a-n{location.reload()},500);return}if(e.detail.failed&&e.detail.xhr){a.classList.add(l),a.innerText=`Something on the server is not working, ${v.status} status: ${v.responseText}.`;return}a.classList.add(l),a.innerText="Something with the browser is not working, please try again or refresh the page."}function L(e,s,n,a){if(e.detail.elt===null||e.detail.elt.id!==`${s}`)return;let l=document.getElementById(n);if(l===null)throw new Error(`The htmx successful input element ${n} is null`);let c=document.getElementById(a);if(c===null)throw new Error(`The htmx successful feedback element ${a} is null`);if(e.detail.successful)return z(e,l,c);if(e.detail.failed&&e.detail.xhr)return j(e,l,c);H(l,c)}function z(e,s,n){let a=e.detail.xhr;n.innerText=`${a.responseText}`,n.classList.remove("invalid-feedback"),n.classList.add("valid-feedback"),s.classList.remove("is-invalid"),s.classList.add("is-valid"),setTimeout(()=>{location.reload()},500)}function j(e,s,n){let a=e.detail.xhr;n.innerText=`Something on the server is not working, ${a.status} status: ${a.responseText}.`,n.classList.remove("valid-feedback"),n.classList.add("invalid-feedback"),s.classList.remove("is-valid"),s.classList.add("is-invalid")}function H(e,s){e.classList.remove("is-valid"),e.classList.add("is-invalid"),s.innerText="Something with the browser is not working, please try again or refresh the page.",s.classList.remove("d-none")}h.addEventListener("click",function(){i.innerText="",i.classList.add("d-none"),u.value="",u.classList.remove("is-invalid","is-valid")}),r.addEventListener("click",function(){t.value="",t.classList.remove("is-invalid","is-valid")}),t.addEventListener("change",function(e){e.target.value.trim()!==""&&(console.log("Submitting the image or photo preview form"),o.click())})})();})(); +(()=>{function d(r){let t=document.getElementById(r);if(t==null){console.error(`The ${r} for getElmById() element is null.`);return}return t}var T="is-invalid",p="d-none",H=100,b=1024*1024,$=100*b;async function P(r){if(r==null)throw new Error("The file value of checkSHA is null.");let t=await R(r),o=await fetch(`/uploader/sha384/${t}`,{method:"PATCH",headers:{"Content-Type":"text/plain"},body:t});if(!o.ok)throw new Error(`Hashing is not possible, server response: ${o.status}`);return await o.text()}async function R(r){if(r==null)throw new Error("The file value of sha384 is null.");try{let t=await r.arrayBuffer(),o=await crypto.subtle.digest("SHA-384",t);return Array.from(new Uint8Array(o)).map(i=>i.toString(16).padStart(2,"0")).join("")}catch(t){throw new Error(`Could not use arrayBuffer or crypto.subtle: ${t}`)}}function k(r,t){if(r==null)throw new Error("The formId value of progress is null.");if(t==null)throw new Error("The elementId value of progress is null.");htmx.on(`#${r}`,"htmx:xhr:progress",function(o){o.target.id==`${r}`&&htmx.find(`#${t}`).setAttribute("value",o.detail.loaded/o.detail.total*H)})}function M(r){if(r==null)throw new Error("The file value of checkSize is null.");return r.size>$?`The chosen file is too big at ${Math.round(r.size/b)}MB, maximum size is ${$/b}MB.`:""}function B(r,t,o,i){if(r==null)throw new Error("The errors value of checkErrors is null.");if(t==null)throw new Error("The alert value of checkErrors is null.");if(o==null)throw new Error("The fileInput value of checkErrors is null.");if(i==null)throw new Error("The results value of checkErrors is null.");r=r.filter(h=>h!=""),!(r.length<=0)&&(t.innerText=r.join(" "),t.classList.remove(p),o.innerText="",o.classList.add(T),i.classList.add(p))}async function I(r,t,o,i){if(r==null)throw new Error("The file value of checkDuplicate is null.");if(t==null)throw new Error("The alert value of checkDuplicate is null.");if(o==null)throw new Error("The fileInput value of checkDuplicate is null.");if(i==null)throw new Error("The results value of checkDuplicate is null.");let h=()=>{t.classList.remove(p),o.innerText="",o.classList.add(T),i.classList.add(p)},w="";try{let u=await P(r);if(u==""){t.innerText="";return}w=u}catch(u){console.log(`${u}`),t.innerText=`${u}`,h();return}t.innerText="The chosen file already exists in the database: ";let f=document.createElement("a");f.href=`/f/${w}`,f.innerText=`${r.name}`,t.appendChild(f),h()}function C(r,t,o){if(r==null)throw new Error("The fileInput value of resetInput is null.");if(t==null)throw new Error("The alert value of resetInput is null.");if(o==null)throw new Error("The results value of resetInput is null.");r.innerText="",r.classList.remove(T),t.innerText="",t.classList.add(p),o.innerText="",o.classList.add(p)}(()=>{"use strict";k("artifact-editor-dl-form","artifact-editor-dl-progress"),k("artifact-editor-preview-form","artifact-editor-preview-progress");let r=d("artifact-editor-preview-reset"),t=d("artifact-editor-replace-preview"),o=d("artifact-editor-preview-submit"),i=d("artifact-editor-dl-alert"),h=d("artifact-editor-dl-reset"),w=d("artifact-editor-last-modified"),f=d("artifact-editor-dl-results"),u=d("artifact-editor-dl-up");u.addEventListener("change",S);async function S(){C(u,i,f);let e=this.files[0],s=[M(e)];B(s,i,u,f),I(e,i,u,f);let n=e.lastModified,a=new Date().getTime(),l=60*60*1e3;a-n{location.reload()},500);return}if(e.detail.failed&&e.detail.xhr){a.classList.add(l),a.innerText=`Something on the server is not working, ${v.status} status: ${v.responseText}.`;return}a.classList.add(l),a.innerText="Something with the browser is not working, please try again or refresh the page."}function x(e,s,n,a){if(e.detail.elt===null||e.detail.elt.id!==`${s}`)return;let l=document.getElementById(n);if(l===null)throw new Error(`The htmx successful input element ${n} is null`);let c=document.getElementById(a);if(c===null)throw new Error(`The htmx successful feedback element ${a} is null`);if(e.detail.successful)return z(e,l,c);if(e.detail.failed&&e.detail.xhr)return U(e,l,c);j(l,c)}function z(e,s,n){let a=e.detail.xhr;n.innerText=`${a.responseText}`,n.classList.remove("invalid-feedback"),n.classList.add("valid-feedback"),s.classList.remove("is-invalid"),s.classList.add("is-valid"),setTimeout(()=>{location.reload()},500)}function U(e,s,n){let a=e.detail.xhr;n.innerText=`Something on the server is not working, ${a.status} status: ${a.responseText}.`,n.classList.remove("valid-feedback"),n.classList.add("invalid-feedback"),s.classList.remove("is-valid"),s.classList.add("is-invalid")}function j(e,s){e.classList.remove("is-valid"),e.classList.add("is-invalid"),s.innerText="Something with the browser is not working, please try again or refresh the page.",s.classList.remove("d-none")}h.addEventListener("click",function(){i.innerText="",i.classList.add("d-none"),u.value="",u.classList.remove("is-invalid","is-valid")}),r.addEventListener("click",function(){t.value="",t.classList.remove("is-invalid","is-valid")}),t.addEventListener("change",function(e){e.target.value.trim()!==""&&(console.log("Submitting the image or photo preview form"),o.click())})})();})(); diff --git a/public/js/uploader.min.js b/public/js/uploader.min.js index e5e02ec0..e1a271d5 100644 --- a/public/js/uploader.min.js +++ b/public/js/uploader.min.js @@ -1,2 +1,2 @@ /* uploader.min.js © Defacto2 2024 */ -(()=>{function T(e){e.preventDefault();let a=(e.clipboardData||window.Clipboard).getData("text"),t=this,s=t.selectionStart,n=t.selectionEnd;t.value=t.value.slice(0,s)+a+t.value.slice(n),t.setSelectionRange(s+a.length,s+a.length);let o=wt(t.value);t.value!=o&&(console.log('Formatted input text "%s" is formatted to "%s".',t.value,o),t.value=o)}function wt(e){let a=["a","addon","aka","an","and","as","at","beta","betas","but","by","compatibility","crack","cracks","demo","demos","doc","docs","documentation","fix","fixes","for","final","from","if","in","installer","installers","is","hint","hints","map","maps","mod","mods","of","on","or","patch","patches","part","prerelease","prereleases","preview","previews","proper","release","releases","repack","repacks","rip","rips","so","solve","solves","the","trainer","trainers","to","update","updates","vs","with"],t=[".com",".exe","2d","3d","4d","abc","ad&d","api","bbs","bios","bsa","cd","cga","dos","dox","dvd","ega","ehq","f1","fbi","ftp","hd","hq","ibm","id","iso","la","lego","ls","masm","mbl","ms","mtv","nascar","nba","ncaa","nfl","nsa","nfo","nhl","nt","oem","os","pc","pga","ppe","pfs","pkarc","pkzip","psx","rac","rom","sdk","sfx","spa","tv","usa","ushq","uss","vga","whq","ww1","ww2","ww3","wwf","xp","ys"];e=e.trim(),e=e.replace(/_/g," "),e.match(/\./g)&&e.match(/\./g).length>4&&(e=e.replace(/\./g," ")),e=e.replace(/['"`]/g,""),e=e.replace(/ \([0-9a-z]\)/g,""),e=e.replace(/([a-zA-Z0-9]): /g,"$1 : "),e=e.replace(/([xX][-| ][Mm]en)/g,"X-Men"),e=e.replace(/\(/g,"( "),e=e.replace(/\)/g," )");let s=e.split(" ").length;return e=e.split(" ").map((n,o)=>{var i=n;if(xt(i)===!0)return i.toLowerCase();if(t.includes(i.toLowerCase()))return i.toUpperCase();let x=Tt(i);if(x!=="")return x;let ce=kt(i);o>0&&Number.isInteger(ce)&&(i=`${ce}`);let ue=yt(i,o,s);return ue!==i&&(i=ue),n!==i?i:o===0||!a.includes(i.toLowerCase())?i.charAt(0).toUpperCase()+i.slice(1).toLowerCase():n.toLowerCase()}).join(" ").trim(),e=e.replace(/(Lotus 123)/g,"Lotus 1-2-3"),e=e.replace(/(Falcon at )/g,"Falcon AT "),e=e.replace(/(the Games)/g,"The Games"),e=e.replace(/( : a)/g," : A"),e=e.replace(/( - a)/g," - A"),e=e.replace(/( : t)/g," : T"),e=e.replace(/( - t)/g," - T"),e=e.replace(/(f-)/g,"F-"),e=e.replace(/(3-d)/g,"3D"),e=e.replace(/(Pfs-)/g,"PFS-"),e=e.replace(/(Mean-18)/g,"Mean 18"),e=e.replace(/(v\d+)\.0/g,"$1"),e=e.replace(/\( /g,"("),e=e.replace(/ \)/g,")"),e=e.replace(/\[([^)]+)\]/g,function(n){return n.toUpperCase()}),e}function xt(e){return/^[vV]\d+(\.\d+)?[a-z]?$/i.test(e)}function yt(e,a,t){return a!=t-1?e:["cheat","cheater","cracktro","loader","installer","trainer","version"].includes(e.toLowerCase())?"":e}function kt(e){let a={I:1,V:5,X:10},t=0,s=0;for(let n=e.length-1;n>=0;n--){let o=a[e[n].toUpperCase()];ot)}function u(e){return`${e}`==""?!0:!(e<1||e>12)}function pe(e){return`${e}`==""?!0:!(e<1||e>31)}function Fe(e,a){if(e=="")return!0;let t=Number(e),s=Number(a);if(!Number.isInteger(s)||s<1)throw new Error(`The ID sanity value is invalid: ${s}`);return Number.isInteger(t)&&t>0&&t<=s}var d="is-invalid",$="d-none",Et=100,Ee=1024*1024,Ae=100*Ee;function z(e,a){if(e==null)throw new Error("The elementId value of focusModalById is null.");if(a==null)throw new Error("The submissionId value of focusModalById is null.");let t=document.getElementById(a);if(t==null)throw new Error(`The ${a} element is null.`);let s=r(e);if(s.addEventListener("shown.bs.modal",function(){t.focus()}),bootstrap===void 0)throw new Error("The bootstrap object is undefined.");return new bootstrap.Modal(s,{keyboard:!0})}async function Mt(e){if(e==null)throw new Error("The file value of checkSHA is null.");let a=await zt(e),t=await fetch(`/uploader/sha384/${a}`,{method:"PATCH",headers:{"Content-Type":"text/plain"},body:a});if(!t.ok)throw new Error(`Hashing is not possible, server response: ${t.status}`);return await t.text()}async function zt(e){if(e==null)throw new Error("The file value of sha384 is null.");try{let a=await e.arrayBuffer(),t=await crypto.subtle.digest("SHA-384",a);return Array.from(new Uint8Array(t)).map(s=>s.toString(16).padStart(2,"0")).join("")}catch(a){throw new Error(`Could not use arrayBuffer or crypto.subtle: ${a}`)}}function Y(e,a){if(e==null)throw new Error("The formId value of progress is null.");if(a==null)throw new Error("The elementId value of progress is null.");htmx.on(`#${e}`,"htmx:xhr:progress",function(t){t.target.id==`${e}`&&htmx.find(`#${a}`).setAttribute("value",t.detail.loaded/t.detail.total*Et)})}function f(e){if(e==null)throw new Error("The file value of checkSize is null.");return e.size>Ae?`The chosen file is too big at ${Math.round(e.size/Ee)}MB, maximum size is ${Ae/Ee}MB.`:""}function Ye(){return pe(this.value)==!1?(this.classList.add(d),!1):(this.classList.remove(d),!0)}function m(){return console.log(`The month value is ${this.value}.`),u(this.value)==!1?(this.classList.add(d),!1):(this.classList.remove(d),!0)}function h(){return c(this.value)==!1?(this.classList.add(d),!1):(this.classList.remove(d),!0)}function v(e,a,t,s){if(e==null)throw new Error("The errors value of checkErrors is null.");if(a==null)throw new Error("The alert value of checkErrors is null.");if(t==null)throw new Error("The fileInput value of checkErrors is null.");if(s==null)throw new Error("The results value of checkErrors is null.");e=e.filter(n=>n!=""),!(e.length<=0)&&(a.innerText=e.join(" "),a.classList.remove($),t.innerText="",t.classList.add(d),s.classList.add($))}async function L(e,a,t,s){if(e==null)throw new Error("The file value of checkDuplicate is null.");if(a==null)throw new Error("The alert value of checkDuplicate is null.");if(t==null)throw new Error("The fileInput value of checkDuplicate is null.");if(s==null)throw new Error("The results value of checkDuplicate is null.");let n=()=>{a.classList.remove($),t.innerText="",t.classList.add(d),s.classList.add($)},o="";try{let x=await Mt(e);if(x==""){a.innerText="";return}o=x}catch(x){console.log(`${x}`),a.innerText=`${x}`,n();return}a.innerText="The chosen file already exists in the database: ";let i=document.createElement("a");i.href=`/f/${o}`,i.innerText=`${e.name}`,a.appendChild(i),n()}function g(e,a,t){if(e==null)throw new Error("The file1 value of hiddenDetails is null.");if(a==null)throw new Error("The lastMod value of hiddenDetails is null.");if(t==null)throw new Error("The magic value of hiddenDetails is null.");let s=e.lastModified,n=new Date().getTime(),o=60*60*1e3;n-s=400&&s.classList.remove(re)}),document.body.addEventListener("htmx:afterRequest",function(A){if(A.detail.elt===null||A.detail.elt.id!==`${e}`)return;if(A.detail.successful)return Ot(t);let de=A.detail.xhr;if(A.detail.failed&&de)return de.status===404?Wt(s,n,a):_t(s,de);Zt(s)})}function Ve(e,a){e.addEventListener("input",function(){if(!Fe(e.value,a)){e.classList.add(Me);return}e.classList.remove(Me)})}function Xt(e,a){a.innerHTML="",e.innerText="",e.classList.add(re)}function Ot(e){e.focus()}function Wt(e,a,t){a.innerText=`Production not found on ${t}.`}function Zt(e){e.innerText="Something with the browser is not working, please refresh the page.",e.classList.remove(re)}function _t(e,a){e.innerText=`Something went wrong, ${a.status} status: ${a.responseText}.`,e.classList.remove(re)}var Jt="application/x-freearc",Qt="application/x-arj",er="application/x-bzip",tr="application/x-bzip2",rr="application/gzip",ar="application/vnd.rar",sr="application/x-tar",nr="application/zip",ir="application/x-7z-compressed",or="application/x-msdos-program",lr="image/bmp",cr="image/gif",ur="image/jpeg",dr="image/vnd.zbrush.pcx",pr="image/png",fr="image/tiff",mr="image/webp",hr="application/x-csh",vr="application/x-chrome-extension",Lr="text/x-script.perl",gr="application/x-httpd-php",br="text/x-script.phyton",wr="text/x-script.rexx",xr="application/x-sh",yr="application/x-shellscript",kr="text/x-script.tcl",Tr="text/x-shellscript",Er="text/x-script.zsh";function Mr(){return[hr,vr,Lr,gr,br,wr,xr,yr,kr,Tr,Er]}function Re(){return[or]}function fe(){return[Jt,Qt,er,tr,rr,ar,sr,nr,ir]}function qe(){return["application/octet-stream","application/x-binary","application/x-ms-dos-executable"]}function zr(){return[lr,cr,ur,dr,pr,fr,mr]}function Ne(){return["text/plain","text/x-nfo"]}function Ue(e){return Mr().includes(e)}function Ke(e){return zr().concat(fe()).includes(e)}function me(e){return Re().concat(fe(),qe()).includes(e)}function Ge(e){return Ne().concat(fe(),Re(),qe()).includes(e)}function Xe(e){return Ne().concat(fe()).includes(e)}var Ir="uploader-image-form",I="is-invalid",Ie="d-none",$r=r(Ir),K=r("uploader-image-alert"),j=r("uploader-image-file"),Oe=r("uploader-image-last-modified"),Dr=r("uploader-image-list-1"),Br=r("uploader-image-list-2"),We=r("uploader-image-magic"),ae=r("uploader-image-month"),he=r("uploader-image-releaser-1"),D=r("uploader-image-results"),Sr=r("uploader-image-title"),U=r("uploader-image-year");$r.addEventListener("reset",function(){Oe.value="",We.value="",_e()});j.addEventListener("change",Cr);Sr.addEventListener("paste",T);he.addEventListener("input",p);U.addEventListener("input",h);ae.addEventListener("input",m);function Ze(e){r(e).addEventListener("click",function(){let t=!0;if(he.value==""&&(he.classList.add(I),t=!1),c(U.value)==!1&&(U.classList.add(I),t=!1),u(ae.value)==!1&&(ae.classList.add(I),t=!1),ae.value!=""&&U.value==""&&(U.classList.add(I),t=!1),j.value==""&&(j.classList.add(I),t=!1),t==!1)return w(K,D);_e(),D.innerText="...",D.classList.remove(Ie)})}async function Cr(){b(j,K,D);let e=this.files[0],a=[f(e),Hr(e)];v(a,K,j,D),L(e,K,j,D),g(e,Oe,We)}function Hr(e){return Ke(e.type)?"":`The chosen file mime type ${e.type} might not be suitable for an image.`}function _e(){Dr.innerHTML="",Br.innerHTML="",D.innerHTML="",D.classList.add(Ie),K.innerText="",K.classList.add(Ie),U.classList.remove(I),ae.classList.remove(I),he.classList.remove(I),j.classList.remove(I)}var Fr="uploader-intro-form",E="is-invalid",$e="d-none",Ar=r(Fr),X=r("uploader-intro-alert"),P=r("uploader-intro-file"),Je=r("uploader-intro-last-modified"),Yr=r("uploader-intro-list-1"),jr=r("uploader-intro-list-2"),Qe=r("uploader-intro-magic"),se=r("uploader-intro-month"),ve=r("uploader-intro-releaser-1"),B=r("uploader-intro-results"),Pr=r("uploader-intro-title"),G=r("uploader-intro-year"),et=r("uploader-intro-youtube");Ar.addEventListener("reset",function(){Je.value="",Qe.value="",rt()});P.addEventListener("change",Vr);Pr.addEventListener("paste",T);ve.addEventListener("input",p);G.addEventListener("input",h);se.addEventListener("input",m);et.addEventListener("input",je);function tt(e){r(e).addEventListener("click",function(){let t=!0;if(ve.value==""&&(ve.classList.add(E),t=!1),c(G.value)==!1&&(G.classList.add(E),t=!1),u(se.value)==!1&&(se.classList.add(E),t=!1),se.value!=""&&G.value==""&&(G.classList.add(E),t=!1),P.value==""&&(P.classList.add(E),t=!1),t==!1)return w(X,B);rt(),B.innerText="...",B.classList.remove($e)})}async function Vr(){b(P,X,B);let e=this.files[0],a=[f(e),Rr(e)];v(a,X,P,B),L(e,X,P,B),g(e,Je,Qe)}function Rr(e){return me(e.type)?"":`The chosen file mime type ${e.type} might not be suitable for an intro.`}function rt(){Yr.innerHTML="",jr.innerHTML="",B.innerHTML="",B.classList.add($e),X.innerText="",X.classList.add($e),G.classList.remove(E),se.classList.remove(E),ve.classList.remove(E),et.classList.remove(E),P.classList.remove(E)}var qr="uploader-magazine-form",y="is-invalid",De="d-none",Nr=r(qr),W=r("uploader-magazine-alert"),V=r("uploader-magazine-file"),at=r("uploader-magazine-last-modified"),Ur=r("uploader-magazine-list-1"),st=r("uploader-magazine-magic"),ne=r("uploader-magazine-month"),Le=r("uploader-magazine-releaser-1"),S=r("uploader-magazine-results"),Be=r("uploader-magazine-title"),O=r("uploader-magazine-year");Nr.addEventListener("reset",function(){at.value="",st.value="",it()});V.addEventListener("change",Kr);Le.addEventListener("input",p);O.addEventListener("input",h);ne.addEventListener("input",m);function nt(e){r(e).addEventListener("click",function(){let t=!0;if(Be.value==""&&(Be.classList.add(y),t=!1),Le.value==""&&(Le.classList.add(y),t=!1),c(O.value)==!1&&(O.classList.add(y),t=!1),u(ne.value)==!1&&(ne.classList.add(y),t=!1),ne.value!=""&&O.value==""&&(O.classList.add(y),t=!1),V.value==""&&(V.classList.add(y),t=!1),t==!1)return w(W,S);it(),S.innerText="...",S.classList.remove(De)})}async function Kr(){b(V,W,S);let e=this.files[0],a=[f(e),Gr(e)];v(a,W,V,S),L(e,W,V,S),g(e,at,st)}function Gr(e){return Ge(e.type)?"":`The chosen file mime type ${e.type} might not be suitable for an image.`}function it(){Ur.innerHTML="",S.innerHTML="",S.classList.add(De),W.innerText="",W.classList.add(De),O.classList.remove(y),ne.classList.remove(y),Le.classList.remove(y),V.classList.remove(y),Be.classList.remove(y)}var Xr="uploader-text-form",M="is-invalid",Se="d-none",Or=r(Xr),_=r("uploader-text-alert"),R=r("uploader-text-file"),ot=r("uploader-text-last-modified"),Wr=r("uploader-text-list-1"),Zr=r("uploader-text-list-2"),lt=r("uploader-text-magic"),ie=r("uploader-text-month"),ge=r("uploader-text-releaser-1"),C=r("uploader-text-results"),ct=r("uploader-text-title"),Z=r("uploader-text-year");Or.addEventListener("reset",function(){ot.value="",lt.value="",dt()});R.addEventListener("change",_r);ct.addEventListener("paste",T);ge.addEventListener("input",p);Z.addEventListener("input",h);ie.addEventListener("input",m);function ut(e){r(e).addEventListener("click",function(){let t=!0;if(ge.value==""&&(ge.classList.add(M),t=!1),c(Z.value)==!1&&(Z.classList.add(M),t=!1),u(ie.value)==!1&&(ie.classList.add(M),t=!1),ie.value!=""&&Z.value==""&&(Z.classList.add(M),t=!1),R.value==""&&(R.classList.add(M),t=!1),t==!1)return w(_,C);dt(),C.innerText="...",C.classList.remove(Se)})}async function _r(){b(R,_,C);let e=this.files[0],a=[f(e),Jr(e)];v(a,_,R,C),L(e,_,R,C),g(e,ot,lt)}function Jr(e){return Xe(e.type)?"":`The chosen file mime type ${e.type} might not be suitable for a text.`}function dt(){Wr.innerHTML="",Zr.innerHTML="",C.innerHTML="",C.classList.add(Se),_.innerText="",_.classList.add(Se),Z.classList.remove(M),ie.classList.remove(M),ge.classList.remove(M),R.classList.remove(M),ct.classList.remove(M)}var Qr="uploader-trainer-form",k="is-invalid",Ce="d-none",ea=r(Qr),Q=r("uploader-trainer-alert"),q=r("uploader-trainer-file"),pt=r("uploader-trainer-last-modified"),ta=r("uploader-trainer-list-1"),ra=r("uploader-trainer-list-2"),ft=r("uploader-trainer-magic"),oe=r("uploader-trainer-month"),be=r("uploader-trainer-releaser-1"),H=r("uploader-trainer-results"),we=r("uploader-trainer-title"),J=r("uploader-trainer-year");ea.addEventListener("reset",function(){pt.value="",ft.value="",ht()});q.addEventListener("change",aa);we.addEventListener("paste",T);be.addEventListener("input",p);J.addEventListener("input",h);oe.addEventListener("input",m);function mt(e){r(e).addEventListener("click",function(){let t=!0;if(we.value==""&&(we.classList.add(k),t=!1),be.value==""&&(be.classList.add(k),t=!1),c(J.value)==!1&&(J.classList.add(k),t=!1),u(oe.value)==!1&&(oe.classList.add(k),t=!1),oe.value!=""&&J.value==""&&(J.classList.add(k),t=!1),q.value==""&&(q.classList.add(k),t=!1),t==!1)return w(Q,H);ht(),H.innerText="...",H.classList.remove(Ce)})}async function aa(){b(q,Q,H);let e=this.files[0],a=[f(e),sa(e)];v(a,Q,q,H),L(e,Q,q,H),g(e,pt,ft)}function sa(e){return me(e.type)?"":`The chosen file mime type ${e.type} might not be suitable for an intro.`}function ht(){ta.innerHTML="",ra.innerHTML="",H.innerHTML="",H.classList.add(Ce),Q.innerText="",Q.classList.add(Ce),J.classList.remove(k),oe.classList.remove(k),be.classList.remove(k),q.classList.remove(k),we.classList.remove(k)}var na="uploader-advanced-form",l="is-invalid",He="d-none",ia=r(na),te=r("uploader-advanced-alert"),xe=r("uploader-advanced-category"),oa=r("uploader-advanced-classification-help"),ye=r("uploader-advanced-day"),N=r("uploader-advanced-file"),vt=r("uploader-advanced-last-modified"),la=r("uploader-advanced-list-1"),ca=r("uploader-advanced-list-2"),Lt=r("uploader-advanced-magic"),le=r("uploader-advanced-month"),ke=r("uploader-advanced-operating-system"),Te=r("uploader-advanced-releaser-1"),F=r("uploader-advanced-results"),ua=r("uploader-advanced-title"),ee=r("uploader-advanced-year");ia.addEventListener("reset",function(){vt.value="",Lt.value="",bt()});N.addEventListener("change",da);ua.addEventListener("paste",T);Te.addEventListener("input",p);ee.addEventListener("input",h);le.addEventListener("input",m);ye.addEventListener("input",Ye);xe.addEventListener("change",p);ke.addEventListener("change",p);function gt(e){r(e).addEventListener("click",function(){let t=!0;if(Te.value==""&&(Te.classList.add(l),t=!1),c(ee.value)==!1&&(ee.classList.add(l),t=!1),u(le.value)==!1&&(le.classList.add(l),t=!1),pe(ye.value)==!1&&(ye.classList.add(l),t=!1),le.value!=""&&ee.value==""&&(ee.classList.add(l),t=!1),N.value==""&&(N.classList.add(l),t=!1),ke.value==""&&(ke.classList.add(l),t=!1),xe.value==""&&(xe.classList.add(l),t=!1),t==!1)return w(te,F);bt(),F.innerText="...",F.classList.remove(He)})}async function da(){b(N,te,F);let e=this.files[0],a=[f(e),pa(e)];v(a,te,N,F),L(e,te,N,F),g(e,vt,Lt)}function pa(e){return Ue(e.type)?`The chosen file mime type ${e.type} might not be suitable for an upload.`:""}function bt(){la.innerHTML="",ca.innerHTML="",F.innerHTML="",oa.innerHTML="",F.classList.add(He),te.innerText="",te.classList.add(He),ee.classList.remove(l),le.classList.remove(l),ye.classList.remove(l),Te.classList.remove(l),N.classList.remove(l),ke.classList.remove(l),xe.classList.remove(l)}(()=>{"use strict";Pe(),ze("demozoo-submission","Demozoo"),ze("pouet-submission","Pou\xEBt"),Ze("uploader-image-submit"),Y("uploader-image-form","uploader-image-progress"),tt("uploader-intro-submit"),Y("uploader-intro-form","uploader-intro-progress"),mt("uploader-trainer-submit"),Y("uploader-trainer-form","uploader-trainer-progress"),nt("uploader-magazine-submit"),Y("uploader-magazine-form","uploader-magazine-progress"),ut("uploader-text-submit"),Y("uploader-text-form","uploader-text-progress"),gt("uploader-advanced-submit"),Y("uploader-advanced-form","uploader-advanced-progress")})();})(); +(()=>{function T(e){e.preventDefault();let a=(e.clipboardData||window.Clipboard).getData("text"),t=this,s=t.selectionStart,n=t.selectionEnd;t.value=t.value.slice(0,s)+a+t.value.slice(n),t.setSelectionRange(s+a.length,s+a.length);let o=wt(t.value);t.value!=o&&(console.log('Formatted input text "%s" is formatted to "%s".',t.value,o),t.value=o)}function wt(e){let a=["a","addon","aka","an","and","as","at","beta","betas","but","by","compatibility","crack","cracks","demo","demos","doc","docs","documentation","fix","fixes","for","final","from","if","in","installer","installers","is","hint","hints","map","maps","mod","mods","of","on","or","patch","patches","part","prerelease","prereleases","preview","previews","proper","release","releases","repack","repacks","rip","rips","so","solve","solves","the","trainer","trainers","to","update","updates","unprotect","unprotects","vs","with"],t=[".com",".exe","2d","3d","4d","abc","ad&d","api","bbs","bios","bsa","cd","cga","dos","dox","dvd","ega","ehq","f1","fbi","ftp","hd","hq","ibm","id","iso","la","lego","ls","masm","mbl","ms","mtv","nascar","nba","ncaa","nfl","nsa","nfo","nhl","nt","oem","os","pc","pga","ppe","pfs","pkarc","pkzip","psx","rac","rom","sdk","sfx","spa","tv","usa","ushq","uss","vga","whq","ww1","ww2","ww3","wwf","xp","ys"];e=e.trim(),e=e.replace(/_/g," "),e.match(/\./g)&&e.match(/\./g).length>4&&(e=e.replace(/\./g," ")),e=e.replace(/['"`]/g,""),e=e.replace(/ \([0-9a-z]\)/g,""),e=e.replace(/([a-zA-Z0-9]): /g,"$1 : "),e=e.replace(/([xX][-| ][Mm]en)/g,"X-Men"),e=e.replace(/\(/g,"( "),e=e.replace(/\)/g," )");let s=e.split(" ").length;return e=e.split(" ").map((n,o)=>{var i=n;if(yt(i)===!0)return i.toLowerCase();if(t.includes(i.toLowerCase()))return i.toUpperCase();let y=Tt(i);if(y!=="")return y;let ce=kt(i);o>0&&Number.isInteger(ce)&&(i=`${ce}`);let ue=xt(i,o,s);return ue!==i&&(i=ue),n!==i?i:o===0||!a.includes(i.toLowerCase())?i.charAt(0).toUpperCase()+i.slice(1).toLowerCase():n.toLowerCase()}).join(" ").trim(),e=e.replace(/(Lotus 123)/g,"Lotus 1-2-3"),e=e.replace(/(Falcon at )/g,"Falcon AT "),e=e.replace(/(the Games)/g,"The Games"),e=e.replace(/^(Unprotect for )(.+)/,"$2 unprotect"),e=e.replace(/^(Unprotecting )(.+)/,"$2 unprotect"),e=e.replace(/^(Unprotect )(.+)/,"$2 unprotect"),e=e.replace(/( : a)/g," : A"),e=e.replace(/( - a)/g," - A"),e=e.replace(/( : t)/g," : T"),e=e.replace(/( - t)/g," - T"),e=e.replace(/(f-)/g,"F-"),e=e.replace(/(3-d)/g,"3D"),e=e.replace(/(Pfs-)/g,"PFS-"),e=e.replace(/(Mean-18)/g,"Mean 18"),e=e.replace(/(v\d+)\.0/g,"$1"),e=e.replace(/\( /g,"("),e=e.replace(/ \)/g,")"),e=e.replace(/\[([^)]+)\]/g,function(n){return n.toUpperCase()}),e}function yt(e){return/^[vV]\d+(\.\d+)?[a-z]?$/i.test(e)}function xt(e,a,t){return a!=t-1?e:["cheat","cheater","cracktro","loader","installer","trainer","version"].includes(e.toLowerCase())?"":e}function kt(e){let a={I:1,V:5,X:10},t=0,s=0;for(let n=e.length-1;n>=0;n--){let o=a[e[n].toUpperCase()];ot)}function u(e){return`${e}`==""?!0:!(e<1||e>12)}function pe(e){return`${e}`==""?!0:!(e<1||e>31)}function Fe(e,a){if(e=="")return!0;let t=Number(e),s=Number(a);if(!Number.isInteger(s)||s<1)throw new Error(`The ID sanity value is invalid: ${s}`);return Number.isInteger(t)&&t>0&&t<=s}var d="is-invalid",$="d-none",Et=100,Ee=1024*1024,Ae=100*Ee;function z(e,a){if(e==null)throw new Error("The elementId value of focusModalById is null.");if(a==null)throw new Error("The submissionId value of focusModalById is null.");let t=document.getElementById(a);if(t==null)throw new Error(`The ${a} element is null.`);let s=r(e);if(s.addEventListener("shown.bs.modal",function(){t.focus()}),bootstrap===void 0)throw new Error("The bootstrap object is undefined.");return new bootstrap.Modal(s,{keyboard:!0})}async function Mt(e){if(e==null)throw new Error("The file value of checkSHA is null.");let a=await zt(e),t=await fetch(`/uploader/sha384/${a}`,{method:"PATCH",headers:{"Content-Type":"text/plain"},body:a});if(!t.ok)throw new Error(`Hashing is not possible, server response: ${t.status}`);return await t.text()}async function zt(e){if(e==null)throw new Error("The file value of sha384 is null.");try{let a=await e.arrayBuffer(),t=await crypto.subtle.digest("SHA-384",a);return Array.from(new Uint8Array(t)).map(s=>s.toString(16).padStart(2,"0")).join("")}catch(a){throw new Error(`Could not use arrayBuffer or crypto.subtle: ${a}`)}}function Y(e,a){if(e==null)throw new Error("The formId value of progress is null.");if(a==null)throw new Error("The elementId value of progress is null.");htmx.on(`#${e}`,"htmx:xhr:progress",function(t){t.target.id==`${e}`&&htmx.find(`#${a}`).setAttribute("value",t.detail.loaded/t.detail.total*Et)})}function f(e){if(e==null)throw new Error("The file value of checkSize is null.");return e.size>Ae?`The chosen file is too big at ${Math.round(e.size/Ee)}MB, maximum size is ${Ae/Ee}MB.`:""}function Ye(){return pe(this.value)==!1?(this.classList.add(d),!1):(this.classList.remove(d),!0)}function m(){return console.log(`The month value is ${this.value}.`),u(this.value)==!1?(this.classList.add(d),!1):(this.classList.remove(d),!0)}function h(){return c(this.value)==!1?(this.classList.add(d),!1):(this.classList.remove(d),!0)}function v(e,a,t,s){if(e==null)throw new Error("The errors value of checkErrors is null.");if(a==null)throw new Error("The alert value of checkErrors is null.");if(t==null)throw new Error("The fileInput value of checkErrors is null.");if(s==null)throw new Error("The results value of checkErrors is null.");e=e.filter(n=>n!=""),!(e.length<=0)&&(a.innerText=e.join(" "),a.classList.remove($),t.innerText="",t.classList.add(d),s.classList.add($))}async function L(e,a,t,s){if(e==null)throw new Error("The file value of checkDuplicate is null.");if(a==null)throw new Error("The alert value of checkDuplicate is null.");if(t==null)throw new Error("The fileInput value of checkDuplicate is null.");if(s==null)throw new Error("The results value of checkDuplicate is null.");let n=()=>{a.classList.remove($),t.innerText="",t.classList.add(d),s.classList.add($)},o="";try{let y=await Mt(e);if(y==""){a.innerText="";return}o=y}catch(y){console.log(`${y}`),a.innerText=`${y}`,n();return}a.innerText="The chosen file already exists in the database: ";let i=document.createElement("a");i.href=`/f/${o}`,i.innerText=`${e.name}`,a.appendChild(i),n()}function g(e,a,t){if(e==null)throw new Error("The file1 value of hiddenDetails is null.");if(a==null)throw new Error("The lastMod value of hiddenDetails is null.");if(t==null)throw new Error("The magic value of hiddenDetails is null.");let s=e.lastModified,n=new Date().getTime(),o=60*60*1e3;n-s=400&&s.classList.remove(re)}),document.body.addEventListener("htmx:afterRequest",function(A){if(A.detail.elt===null||A.detail.elt.id!==`${e}`)return;if(A.detail.successful)return Ot(t);let de=A.detail.xhr;if(A.detail.failed&&de)return de.status===404?Wt(s,n,a):_t(s,de);Zt(s)})}function Ve(e,a){e.addEventListener("input",function(){if(!Fe(e.value,a)){e.classList.add(Me);return}e.classList.remove(Me)})}function Xt(e,a){a.innerHTML="",e.innerText="",e.classList.add(re)}function Ot(e){e.focus()}function Wt(e,a,t){a.innerText=`Production not found on ${t}.`}function Zt(e){e.innerText="Something with the browser is not working, please refresh the page.",e.classList.remove(re)}function _t(e,a){e.innerText=`Something went wrong, ${a.status} status: ${a.responseText}.`,e.classList.remove(re)}var Jt="application/x-freearc",Qt="application/x-arj",er="application/x-bzip",tr="application/x-bzip2",rr="application/gzip",ar="application/vnd.rar",sr="application/x-tar",nr="application/zip",ir="application/x-7z-compressed",or="application/x-msdos-program",lr="image/bmp",cr="image/gif",ur="image/jpeg",dr="image/vnd.zbrush.pcx",pr="image/png",fr="image/tiff",mr="image/webp",hr="application/x-csh",vr="application/x-chrome-extension",Lr="text/x-script.perl",gr="application/x-httpd-php",br="text/x-script.phyton",wr="text/x-script.rexx",yr="application/x-sh",xr="application/x-shellscript",kr="text/x-script.tcl",Tr="text/x-shellscript",Er="text/x-script.zsh";function Mr(){return[hr,vr,Lr,gr,br,wr,yr,xr,kr,Tr,Er]}function Re(){return[or]}function fe(){return[Jt,Qt,er,tr,rr,ar,sr,nr,ir]}function Ue(){return["application/octet-stream","application/x-binary","application/x-ms-dos-executable"]}function zr(){return[lr,cr,ur,dr,pr,fr,mr]}function qe(){return["text/plain","text/x-nfo"]}function Ne(e){return Mr().includes(e)}function Ke(e){return zr().concat(fe()).includes(e)}function me(e){return Re().concat(fe(),Ue()).includes(e)}function Ge(e){return qe().concat(fe(),Re(),Ue()).includes(e)}function Xe(e){return qe().concat(fe()).includes(e)}var Ir="uploader-image-form",I="is-invalid",Ie="d-none",$r=r(Ir),K=r("uploader-image-alert"),j=r("uploader-image-file"),Oe=r("uploader-image-last-modified"),Dr=r("uploader-image-list-1"),Br=r("uploader-image-list-2"),We=r("uploader-image-magic"),ae=r("uploader-image-month"),he=r("uploader-image-releaser-1"),D=r("uploader-image-results"),Sr=r("uploader-image-title"),N=r("uploader-image-year");$r.addEventListener("reset",function(){Oe.value="",We.value="",_e()});j.addEventListener("change",Cr);Sr.addEventListener("paste",T);he.addEventListener("input",p);N.addEventListener("input",h);ae.addEventListener("input",m);function Ze(e){r(e).addEventListener("click",function(){let t=!0;if(he.value==""&&(he.classList.add(I),t=!1),c(N.value)==!1&&(N.classList.add(I),t=!1),u(ae.value)==!1&&(ae.classList.add(I),t=!1),ae.value!=""&&N.value==""&&(N.classList.add(I),t=!1),j.value==""&&(j.classList.add(I),t=!1),t==!1)return w(K,D);_e(),D.innerText="...",D.classList.remove(Ie)})}async function Cr(){b(j,K,D);let e=this.files[0],a=[f(e),Hr(e)];v(a,K,j,D),L(e,K,j,D),g(e,Oe,We)}function Hr(e){return Ke(e.type)?"":`The chosen file mime type ${e.type} might not be suitable for an image.`}function _e(){Dr.innerHTML="",Br.innerHTML="",D.innerHTML="",D.classList.add(Ie),K.innerText="",K.classList.add(Ie),N.classList.remove(I),ae.classList.remove(I),he.classList.remove(I),j.classList.remove(I)}var Fr="uploader-intro-form",E="is-invalid",$e="d-none",Ar=r(Fr),X=r("uploader-intro-alert"),P=r("uploader-intro-file"),Je=r("uploader-intro-last-modified"),Yr=r("uploader-intro-list-1"),jr=r("uploader-intro-list-2"),Qe=r("uploader-intro-magic"),se=r("uploader-intro-month"),ve=r("uploader-intro-releaser-1"),B=r("uploader-intro-results"),Pr=r("uploader-intro-title"),G=r("uploader-intro-year"),et=r("uploader-intro-youtube");Ar.addEventListener("reset",function(){Je.value="",Qe.value="",rt()});P.addEventListener("change",Vr);Pr.addEventListener("paste",T);ve.addEventListener("input",p);G.addEventListener("input",h);se.addEventListener("input",m);et.addEventListener("input",je);function tt(e){r(e).addEventListener("click",function(){let t=!0;if(ve.value==""&&(ve.classList.add(E),t=!1),c(G.value)==!1&&(G.classList.add(E),t=!1),u(se.value)==!1&&(se.classList.add(E),t=!1),se.value!=""&&G.value==""&&(G.classList.add(E),t=!1),P.value==""&&(P.classList.add(E),t=!1),t==!1)return w(X,B);rt(),B.innerText="...",B.classList.remove($e)})}async function Vr(){b(P,X,B);let e=this.files[0],a=[f(e),Rr(e)];v(a,X,P,B),L(e,X,P,B),g(e,Je,Qe)}function Rr(e){return me(e.type)?"":`The chosen file mime type ${e.type} might not be suitable for an intro.`}function rt(){Yr.innerHTML="",jr.innerHTML="",B.innerHTML="",B.classList.add($e),X.innerText="",X.classList.add($e),G.classList.remove(E),se.classList.remove(E),ve.classList.remove(E),et.classList.remove(E),P.classList.remove(E)}var Ur="uploader-magazine-form",x="is-invalid",De="d-none",qr=r(Ur),W=r("uploader-magazine-alert"),V=r("uploader-magazine-file"),at=r("uploader-magazine-last-modified"),Nr=r("uploader-magazine-list-1"),st=r("uploader-magazine-magic"),ne=r("uploader-magazine-month"),Le=r("uploader-magazine-releaser-1"),S=r("uploader-magazine-results"),Be=r("uploader-magazine-title"),O=r("uploader-magazine-year");qr.addEventListener("reset",function(){at.value="",st.value="",it()});V.addEventListener("change",Kr);Le.addEventListener("input",p);O.addEventListener("input",h);ne.addEventListener("input",m);function nt(e){r(e).addEventListener("click",function(){let t=!0;if(Be.value==""&&(Be.classList.add(x),t=!1),Le.value==""&&(Le.classList.add(x),t=!1),c(O.value)==!1&&(O.classList.add(x),t=!1),u(ne.value)==!1&&(ne.classList.add(x),t=!1),ne.value!=""&&O.value==""&&(O.classList.add(x),t=!1),V.value==""&&(V.classList.add(x),t=!1),t==!1)return w(W,S);it(),S.innerText="...",S.classList.remove(De)})}async function Kr(){b(V,W,S);let e=this.files[0],a=[f(e),Gr(e)];v(a,W,V,S),L(e,W,V,S),g(e,at,st)}function Gr(e){return Ge(e.type)?"":`The chosen file mime type ${e.type} might not be suitable for an image.`}function it(){Nr.innerHTML="",S.innerHTML="",S.classList.add(De),W.innerText="",W.classList.add(De),O.classList.remove(x),ne.classList.remove(x),Le.classList.remove(x),V.classList.remove(x),Be.classList.remove(x)}var Xr="uploader-text-form",M="is-invalid",Se="d-none",Or=r(Xr),_=r("uploader-text-alert"),R=r("uploader-text-file"),ot=r("uploader-text-last-modified"),Wr=r("uploader-text-list-1"),Zr=r("uploader-text-list-2"),lt=r("uploader-text-magic"),ie=r("uploader-text-month"),ge=r("uploader-text-releaser-1"),C=r("uploader-text-results"),ct=r("uploader-text-title"),Z=r("uploader-text-year");Or.addEventListener("reset",function(){ot.value="",lt.value="",dt()});R.addEventListener("change",_r);ct.addEventListener("paste",T);ge.addEventListener("input",p);Z.addEventListener("input",h);ie.addEventListener("input",m);function ut(e){r(e).addEventListener("click",function(){let t=!0;if(ge.value==""&&(ge.classList.add(M),t=!1),c(Z.value)==!1&&(Z.classList.add(M),t=!1),u(ie.value)==!1&&(ie.classList.add(M),t=!1),ie.value!=""&&Z.value==""&&(Z.classList.add(M),t=!1),R.value==""&&(R.classList.add(M),t=!1),t==!1)return w(_,C);dt(),C.innerText="...",C.classList.remove(Se)})}async function _r(){b(R,_,C);let e=this.files[0],a=[f(e),Jr(e)];v(a,_,R,C),L(e,_,R,C),g(e,ot,lt)}function Jr(e){return Xe(e.type)?"":`The chosen file mime type ${e.type} might not be suitable for a text.`}function dt(){Wr.innerHTML="",Zr.innerHTML="",C.innerHTML="",C.classList.add(Se),_.innerText="",_.classList.add(Se),Z.classList.remove(M),ie.classList.remove(M),ge.classList.remove(M),R.classList.remove(M),ct.classList.remove(M)}var Qr="uploader-trainer-form",k="is-invalid",Ce="d-none",ea=r(Qr),Q=r("uploader-trainer-alert"),U=r("uploader-trainer-file"),pt=r("uploader-trainer-last-modified"),ta=r("uploader-trainer-list-1"),ra=r("uploader-trainer-list-2"),ft=r("uploader-trainer-magic"),oe=r("uploader-trainer-month"),be=r("uploader-trainer-releaser-1"),H=r("uploader-trainer-results"),we=r("uploader-trainer-title"),J=r("uploader-trainer-year");ea.addEventListener("reset",function(){pt.value="",ft.value="",ht()});U.addEventListener("change",aa);we.addEventListener("paste",T);be.addEventListener("input",p);J.addEventListener("input",h);oe.addEventListener("input",m);function mt(e){r(e).addEventListener("click",function(){let t=!0;if(we.value==""&&(we.classList.add(k),t=!1),be.value==""&&(be.classList.add(k),t=!1),c(J.value)==!1&&(J.classList.add(k),t=!1),u(oe.value)==!1&&(oe.classList.add(k),t=!1),oe.value!=""&&J.value==""&&(J.classList.add(k),t=!1),U.value==""&&(U.classList.add(k),t=!1),t==!1)return w(Q,H);ht(),H.innerText="...",H.classList.remove(Ce)})}async function aa(){b(U,Q,H);let e=this.files[0],a=[f(e),sa(e)];v(a,Q,U,H),L(e,Q,U,H),g(e,pt,ft)}function sa(e){return me(e.type)?"":`The chosen file mime type ${e.type} might not be suitable for an intro.`}function ht(){ta.innerHTML="",ra.innerHTML="",H.innerHTML="",H.classList.add(Ce),Q.innerText="",Q.classList.add(Ce),J.classList.remove(k),oe.classList.remove(k),be.classList.remove(k),U.classList.remove(k),we.classList.remove(k)}var na="uploader-advanced-form",l="is-invalid",He="d-none",ia=r(na),te=r("uploader-advanced-alert"),ye=r("uploader-advanced-category"),oa=r("uploader-advanced-classification-help"),xe=r("uploader-advanced-day"),q=r("uploader-advanced-file"),vt=r("uploader-advanced-last-modified"),la=r("uploader-advanced-list-1"),ca=r("uploader-advanced-list-2"),Lt=r("uploader-advanced-magic"),le=r("uploader-advanced-month"),ke=r("uploader-advanced-operating-system"),Te=r("uploader-advanced-releaser-1"),F=r("uploader-advanced-results"),ua=r("uploader-advanced-title"),ee=r("uploader-advanced-year");ia.addEventListener("reset",function(){vt.value="",Lt.value="",bt()});q.addEventListener("change",da);ua.addEventListener("paste",T);Te.addEventListener("input",p);ee.addEventListener("input",h);le.addEventListener("input",m);xe.addEventListener("input",Ye);ye.addEventListener("change",p);ke.addEventListener("change",p);function gt(e){r(e).addEventListener("click",function(){let t=!0;if(Te.value==""&&(Te.classList.add(l),t=!1),c(ee.value)==!1&&(ee.classList.add(l),t=!1),u(le.value)==!1&&(le.classList.add(l),t=!1),pe(xe.value)==!1&&(xe.classList.add(l),t=!1),le.value!=""&&ee.value==""&&(ee.classList.add(l),t=!1),q.value==""&&(q.classList.add(l),t=!1),ke.value==""&&(ke.classList.add(l),t=!1),ye.value==""&&(ye.classList.add(l),t=!1),t==!1)return w(te,F);bt(),F.innerText="...",F.classList.remove(He)})}async function da(){b(q,te,F);let e=this.files[0],a=[f(e),pa(e)];v(a,te,q,F),L(e,te,q,F),g(e,vt,Lt)}function pa(e){return Ne(e.type)?`The chosen file mime type ${e.type} might not be suitable for an upload.`:""}function bt(){la.innerHTML="",ca.innerHTML="",F.innerHTML="",oa.innerHTML="",F.classList.add(He),te.innerText="",te.classList.add(He),ee.classList.remove(l),le.classList.remove(l),xe.classList.remove(l),Te.classList.remove(l),q.classList.remove(l),ke.classList.remove(l),ye.classList.remove(l)}(()=>{"use strict";Pe(),ze("demozoo-submission","Demozoo"),ze("pouet-submission","Pou\xEBt"),Ze("uploader-image-submit"),Y("uploader-image-form","uploader-image-progress"),tt("uploader-intro-submit"),Y("uploader-intro-form","uploader-intro-progress"),mt("uploader-trainer-submit"),Y("uploader-trainer-form","uploader-trainer-progress"),nt("uploader-magazine-submit"),Y("uploader-magazine-form","uploader-magazine-progress"),ut("uploader-text-submit"),Y("uploader-text-form","uploader-text-progress"),gt("uploader-advanced-submit"),Y("uploader-advanced-form","uploader-advanced-progress")})();})();