import {J,gr as Pd,a6 as pi,c as tS,gs as Ye,bR as De,ad as ce}from'./main-WUGO6e7n.js';var b,m=J(()=>{Pd();pi();tS();b=(()=>{class n{getFileNameWithoutExtension(t){if(!t)return "";let o=t.lastIndexOf(".");return o===-1?t:t.substr(0,o)}getFileExtension(t){if(!t)return "";let o=t.lastIndexOf(".");return o===-1?t:t.slice(o)}getFileType(t,o){if(!t)return Ye.Default;let e=t.split(".").pop().toLocaleLowerCase();if(e===t)return Ye.Default;let r=o.find(c=>c&&c.extensions.includes(e));return r?r.key:Ye.Default}getHumanFriendlyFileSize(t){if(t==null)return "n/a";if(t===0)return "0";let o=-1,e=[" kB"," MB"," GB"," TB","PB","EB","ZB","YB"];do t=t/1024,o++;while(t>1024);return Math.max(t,.1).toFixed(1)+e[o]}downloadFile(t,o){if(window.navigator.msSaveOrOpenBlob)window.navigator.msSaveOrOpenBlob(t,o);else {let e=window.URL.createObjectURL(t),r=document.createElement("a");document.body.appendChild(r),r.href=e,r.download=o,r.click(),setTimeout(function(){window.URL.revokeObjectURL(e);},100),document.body.removeChild(r);}}viewFile(t,o,e){window.navigator.msSaveOrOpenBlob?window.navigator.msSaveOrOpenBlob(t,o):(e.location=window.URL.createObjectURL(t),De(500).subscribe(c=>{try{e.location.protocol==="about:"&&e.close();}catch(f){return}}));}static{this.\u0275fac=function(o){return new(o||n)};}static{this.\u0275prov=ce({token:n,factory:n.\u0275fac,providedIn:"root"});}}return n})();});export{b,m};