import{Za as s}from"./chunk-KBLF2WKH.js";var c=(()=>{let e=class e{transform(n){if(!n)return"";let o;try{if(o=new Date(n),Number.isNaN(o.getTime()))return console.warn("TimeAgoPipe: Invalid date provided:",n),"date invalide"}catch(r){return console.warn("TimeAgoPipe: Error parsing date:",n,r),"date invalide"}let t=Math.floor((new Date().getTime()-o.getTime())/1e3);if(t<0||t<60)return"maintenant";if(t<3600)return`${Math.floor(t/60)}min`;if(t<86400)return`${Math.floor(t/3600)}h`;if(t<604800)return`${Math.floor(t/86400)}j`;if(t<2592e3)return`${Math.floor(t/604800)}sem`;if(t<31536e3)return`${Math.floor(t/2592e3)}mois`;let a=Math.floor(t/31536e3);return`${a}an${a>1?"s":""}`}};e.\u0275fac=function(o){return new(o||e)},e.\u0275pipe=s({name:"timeAgo",type:e,pure:!0});let i=e;return i})();export{c as a};
