var m=Object.defineProperty;var D=(t,s,e)=>s in t?m(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{gs as S,gq as b,gn as y,go as E,gp as Y,gr as w,fz as H,fx as T,fu as p,fv as N,fw as A,fy as $,h6 as I,gE as O,gj as R,gD as x,gi as F}from"./ceRbsEBD.mjs";const g=1,u=60*g,i=60*u,c=24*i,o=365*c,f=o/12;var P=(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))(P||{});function v(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 g;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 q(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 z(t,s){const e=Math.min(l(s),1),a=h(e,s),r=v(e);let n=0;return t>0&&(n=s/t),I({unit:r,secsPerCard:n,cards:t,amount:a})}function C(t,s){if(s)switch(t){case 0:return w;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 p;case 4:return T;case 5:return H}}function W(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)),C(r,s)({amount:n})}function k(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?x({daysStart:t,daysEnd:s-1}):F({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,P as T,o as Y,B as a,q as b,v as c,k as d,M as e,l as n,z as s,W as t,h as u};
