classVTUtils{staticrandom(t,e){leta=Math.random();if(void0===t)returna;if(void0===e)returntinstanceofArray?t[Math.floor(a*t.length)]:a*t;if(t>e){leta=t;t=e,e=a}returna*(e-t)+t}staticrandomInt(t,e){returnMath.floor(VTUtils.random(t,e))}staticnormalize(t,e,a){return(t-a)/(e-a)}staticdistance(t,e,a,i){lets=t-a,n=e-i;returnMath.sqrt(s*s+n*n)}staticmap(t,e,a,i,s,n){letl=(t-e)/(a-e)*(s-i)+i;returnn?i<s?this.constrain(l,i,s):this.constrain(l,s,i):l}staticconstrain(t,e,a){returnMath.max(Math.min(t,a),e)}statichsvToRgb(t,e,a){leti,s,n,l=Math.floor(6*t),r=6*t-l,o=a*(1-e),d=a*(1-r*e),c=a*(1-(1-r)*e);switch(l%6){case0:i=a,s=c,n=o;break;case1:i=d,s=a,n=o;break;case2:i=o,s=a,n=c;break;case3:i=o,s=d,n=a;break;case4:i=c,s=o,n=a;break;case5:i=a,s=o,n=d}return{r:i,g:s,b:n}}staticpeakRGB(t){return{r:t,g:1-t,b:0}}}classVTVector{constructor(t,e,a){this.x=t||0,this.y=e||0,this.z=a||0}staticcreateRandom(t,e,a){returnt=t||1,e=e||1,a=a||0,newVTVector(VTUtils.random(-t,t),VTUtils.random(-e,e),VTUtils.random(-a,a))}mult(t){this.x*=t,this.y*=t,this.z*=t}set(t){this.x=t.x,this.y=t.y,this.z=t.z}add(t){this.x=this.x+t.x,this.y=this.y+t.y,this.z=this.z+t.z}addXYZ(t,e,a){this.x+=t,this.y+=e,this.z+=a}setXYZ(t,e,a){this.x=t||0,this.y=e||0,this.z=a||0}clone(){returnnewVTVector(this.x,this.y,this.z)}}function$(t,e){return(e=e||document).querySelector(t)}function$$(t,e){return(e=e||document).querySelectorAll(t)}functionb64toBlob(t,e){consta=atob(t),i=newArray(a.length);for(lett=0;t<a.length;t++)i[t]=a.charCodeAt(t);consts=newUint8Array(i);returnnewBlob([s],{type:e})}functioncreate(t,e){leta=document.createElement(t);returne&&(a.innerHTML=e),a}functionappend(t,e){for(letaofe)t.appendChild(a)}functionhexToRgb(t){t=t.replace("#","");lete=parseInt(t,16);return[(e>>16&255)/255,(e>>8&255)/255,(255&e)/255]}Node.prototype.addDelegatedEventListener=function(t,e,a){this.addEventListener(t,t=>{leti=t.target;if(i.matches(e))a(t,i);else{lets=i.closest(e);if(s)try{a(t,s)}catch(t){NotificationHandler.createNotification("FATAL ERROR WITHIN HANDLER!","error",1e3)}}})},Node.prototype.hasClass=function(t){lete=t.split(","),a=null;for(lettofe){if(!1===a)break;a=this.classList.contains(t.trim())}return!0===a},Node.prototype.addClass=function(t){lete=t.split(",");for(lettofe)this.classList.add(t.trim());returnthis},Node.prototype.removeClass=function(t){lete=t.split(",");for(lettofe)this.classList.remove(t.trim());returnthis},Node.prototype.toggleClass=function(t,e){leta=t.split(",");for(lettofa)this.classList.toggle(t.trim(),e)},Node.prototype.switchClass=function(t,e,a){leti=this.classList;a?(i.remove(t),i.add(e)):(i.remove(e),i.add(t))},Node.prototype.toggleCheck=function(t,e){leta=this.classList,i=t.split(",");for(lettofi){leti=t.trim();e?a.add(i):a.remove(i)}},File.prototype.toBase64=function(t){conste=newFileReader;e.onloadend=t,e.readAsDataURL(this)};classTDUtils{staticlastMatrix={m:null};staticmultiply(t,e){leta=e[0],i=e[1],s=e[2],n=e[3],l=e[4],r=e[5],o=e[6],d=e[7],c=e[8],h=e[9],u=e[10],p=e[11],g=e[12],f=e[13],m=e[14],v=e[15],y=t[0],C=t[1],w=t[2],T=t[3],b=t[4],S=t[5],x=t[6],D=t[7],U=t[8],H=t[9],A=t[10],L=t[11],R=t[12],E=t[13],F=t[14],I=t[15];return[a*y+i*b+s*U+n*R,a*C+i*S+s*H+n*E,a*w+i*x+s*A+n*F,a*T+i*D+s*L+n*I,l*y+r*b+o*U+d*R,l*C+r*S+o*H+d*E,l*w+r*x+o*A+d*F,l*T+r*D+o*L+d*I,c*y+h*b+u*U+p*R,c*C+h*S+u*H+p*E,c*w+h*x+u*A+p*F,c*T+h*D+u*L+p*I,g*y+f*b+m*U+v*R,g*C+f*S+m*H+v*E,g*w+f*x+m*A+v*F,g*T+f*D+m*L+v*I]}statictranslate(t,e,a,i,s){s=s||newFloat32Array(16);letn=t[0],l=t[1],r=t[2],o=t[3],d=t[4],c=t[5],h=t[6],u=t[7],p=t[8],g=t[9],f=t[10],m=t[11],v=t[12],y=t[13],C=t[14],w=t[15];returns[0]=n,s[1]=l,s[2]=r,s[3]=o,s[4]=d,s[5]=c,s[6]=h,s[7]=u,s[8]=p,s[9]=g,s[10]=f,s[11]=m,s[12]=n*e+d*a+p*i+v,s[13]=l*e+c*a+g*i+y,s[14]=r*e+h*a+f*i+C,s[15]=o*e+u*a+m*i+w,s}staticxRotation(t){t=TDUtils.degToRad(t);lete=Math.cos(t),a=Math.sin(t);return[1,0,0,0,0,e,a,0,0,-a,e,0,0,0,0,1]}staticyRotation(t){t=TDUtils.degToRad(t);lete=Math.cos(t),a=Math.sin(t);return[e,0,-a,0,0,1,0,0,a,0,e,0,0,0,0,1]}staticzRotat