function u(n){if(n===0)return"0 B";const i=["B","KB","MB","GB","TB"],o=Math.floor(Math.log(n)/Math.log(1024));return`${(n/Math.pow(1024,o)).toFixed(o>0?1:0)} ${i[o]}`}function a(n,i=!1){if(!n)return"";const o=new Date(n),t={day:"2-digit",month:"2-digit",year:"numeric"};return i&&(t.hour="2-digit",t.minute="2-digit"),o.toLocaleDateString("ru-RU",t)}function s(n){if(!n)return"";const i=new Date(n),t=Math.floor((new Date-i)/1e3);if(t<60)return"только что";if(t<3600){const r=Math.floor(t/60);return`${r} ${f(r,"минуту","минуты","минут")} назад`}if(t<86400){const r=Math.floor(t/3600);return`${r} ${f(r,"час","часа","часов")} назад`}if(t<2592e3){const r=Math.floor(t/86400);return`${r} ${f(r,"день","дня","дней")} назад`}return a(n)}function f(n,i,o,t){const r=Math.abs(n)%100,e=r%10;return r>10&&r<20?t:e>1&&e<5?o:e===1?i:t}export{a,s as b,u as f};
