(function(n,t){typeof exports=="object"&&typeof module<"u"?module.exports=t():typeof define=="function"&&define.amd?define(t):(n=typeof globalThis<"u"?globalThis:n||self,n["sleep-dots"]=t())})(this,function(){"use strict";const n=e=>{const s="\x1B[?25l";process.stdout.write(e+s+"\r")},t={milliseconds:"ms",seconds:"sec",minutes:"min",hours:"h"},r=e=>e.toString().padStart(2,"0"),u=e=>{const s=new Date(e);return e>1e3*60*60?`${s.getHours()}:${r(s.getMinutes())}:${r(s.getSeconds())} ${t.hours}`:e>1e3*60?`${s.getMinutes()}:${r(s.getSeconds())} ${t.minutes}`:e>1e3?`${s.getSeconds()}.${s.getMilliseconds()} ${t.seconds}`:`${e.toFixed(2)} ${t.milliseconds}`},l=e=>new Promise(s=>setTimeout(s,e));return async({customMessage:e="Waiting for",finalBreakLine:s=!0,stepTime:d=500,totalTime:c=3e3})=>{const f=u(c),p=s?` `:` `;let o=c,i="";for(;o>0;){const $=o