var e,r;function s(){if(r)return e;r=1;var s=1e3,n=60*s,a=60*n,t=24*a,c=7*t,u=365.25*t;function i(e,r,s,n){var a=r>=1.5*s;return Math.round(e/s)+" "+n+(a?"s":"")}return e=function(e,r){r=r||{};var o=typeof e;if("string"===o&&e.length>0)return function(e){if((e=String(e)).length>100)return;var r=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!r)return;var i=parseFloat(r[1]);switch((r[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return i*u;case"weeks":case"week":case"w":return i*c;case"days":case"day":case"d":return i*t;case"hours":case"hour":case"hrs":case"hr":case"h":return i*a;case"minutes":case"minute":case"mins":case"min":case"m":return i*n;case"seconds":case"second":case"secs":case"sec":case"s":return i*s;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return i;default:return}}(e);if("number"===o&&isFinite(e))return r.long?function(e){var r=Math.abs(e);if(r>=t)return i(e,r,t,"day");if(r>=a)return i(e,r,a,"hour");if(r>=n)return i(e,r,n,"minute");if(r>=s)return i(e,r,s,"second");return e+" ms"}(e):function(e){var r=Math.abs(e);if(r>=t)return Math.round(e/t)+"d";if(r>=a)return Math.round(e/a)+"h";if(r>=n)return Math.round(e/n)+"m";if(r>=s)return Math.round(e/s)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}}export{s as __require};