var e={redDays:2,yellowDays:7};function t(e,t=new Date){let n=new Date(e),r=new Date(t.getFullYear(),t.getMonth(),t.getDate()),i=new Date(n.getFullYear(),n.getMonth(),n.getDate());return Math.round((i.getTime()-r.getTime())/864e5)}function n(n,r=e,i=new Date){if(!n)return`none`;let a=t(n,i);return a<=r.redDays?`red`:a<=r.yellowDays?`yellow`:`green`}function r(n,r=e,i=new Date){if(!n)return 0;let a=t(n,i);return a<0?100+Math.min(30,Math.abs(a)):a<=r.redDays?80-a*5:a<=r.yellowDays?40-a:Math.max(1,20-a)}function i(t,n=new Date){return r(t.expirationDate,e,n)}export{i as n,n as r,t};