var g=Object.defineProperty;var D=(t,s,e)=>s in t?g(t,s,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[s]=e;var d=(t,s,e)=>D(t,typeof s!="symbol"?s+"":s,e);import{s as S,a as b,b as y,c as E,d as Y,e as H,f as T,g as p,h as w,i as N,j as A,k as $,l as I,m as O,n as R,o as F,p as P}from"./Bv5e84VY.mjs";const M=1,u=60*M,i=60*u,c=24*i,o=365*c,f=o/12;var x=(t=>(t[t.Seconds=0]="Seconds",t[t.Minutes=1]="Minutes",t[t.Hours=2]="Hours",t[t.Days=3]="Days",t[t.Months=4]="Months",t[t.Years=5]="Years",t))(x||{});function C(t){switch(t){case 0:return"seconds";case 1:return"minutes";case 2:return"hours";case 3:return"days";case 4:return"months";case 5:return"years"}}function l(t){return t=Math.abs(t),t<u?0:t<i?1:t<c?2:t<f?3:t<o?4:5}function m(t){switch(t){case 0:return M;case 1:return u;case 2:return i;case 3:return c;case 4:return f;case 5:return o}}function h(t,s){return s/m(t)}function v(t){let s=l(t);for(;s!=0;){const e=Math.round(h(s,t));if(Math.abs(t-e*m(s))<Number.EPSILON)return s;s-=1}return s}function W(t,s){const e=Math.min(l(s),1),a=h(e,s),r=C(e);let n=0;return t>0&&(n=s/t),I({unit:r,secsPerCard:n,cards:t,amount:a})}function L(t,s){if(s)switch(t){case 0:return H;case 1:return Y;case 2:return E;case 3:return y;case 4:return b;case 5:return S}else switch(t){case 0:return $;case 1:return A;case 2:return N;case 3:return w;case 4:return p;case 5:return T}}function q(t,s=!1,e=!0,a=5){const r=Math.min(l(t),a);let n=h(r,t);return!e&&r<4&&(n=Math.round(n)),L(r,s)({amount:n})}function z(t,s){const e=Math.max(Math.abs(t),Math.abs(s)),a=Math.min(Math.abs(t),Math.abs(s));return e-a<=1?t>=0?O({days:t}):R({days:-t}):t>=0?F({daysStart:t,daysEnd:s-1}):P({daysStart:Math.abs(s-1),daysEnd:-t})}class B{constructor(s){d(this,"date");this.date=new Date(s*1e3)}dateString(){const s=this.date.getFullYear(),e=("0"+(this.date.getMonth()+1)).slice(-2),a=("0"+this.date.getDate()).slice(-2);return`${s}-${e}-${a}`}timeString(){const s=("0"+this.date.getHours()).slice(-2),e=("0"+this.date.getMinutes()).slice(-2);return`${s}:${e}`}}export{c as D,f as M,x as T,o as Y,h as a,B as b,v as c,z as d,m as e,l as n,W as s,q as t,C as u};
