cronli5 0.2.1 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/CHANGELOG.md +65 -0
  2. package/cronli5.min.js +2 -2
  3. package/dist/cronli5.cjs +471 -383
  4. package/dist/cronli5.js +471 -383
  5. package/dist/lang/de.cjs +286 -215
  6. package/dist/lang/de.js +286 -215
  7. package/dist/lang/en.cjs +413 -327
  8. package/dist/lang/en.js +413 -327
  9. package/dist/lang/es.cjs +303 -265
  10. package/dist/lang/es.js +303 -265
  11. package/dist/lang/fi.cjs +311 -266
  12. package/dist/lang/fi.js +311 -266
  13. package/dist/lang/zh.cjs +308 -236
  14. package/dist/lang/zh.js +308 -236
  15. package/package.json +1 -1
  16. package/src/core/analyze.ts +12 -12
  17. package/src/core/cadence.ts +164 -0
  18. package/src/core/index.ts +3 -1
  19. package/src/core/normalize.ts +3 -3
  20. package/src/core/parse.ts +1 -1
  21. package/src/core/{ir.ts → schedule.ts} +17 -18
  22. package/src/core/specs.ts +1 -1
  23. package/src/core/util.ts +3 -165
  24. package/src/core/validate.ts +1 -1
  25. package/src/core/weekday.ts +54 -0
  26. package/src/cronli5.ts +5 -5
  27. package/src/lang/de/index.ts +329 -219
  28. package/src/lang/en/dialects.ts +1 -1
  29. package/src/lang/en/index.ts +521 -372
  30. package/src/lang/es/index.ts +338 -286
  31. package/src/lang/es/notes.md +1 -1
  32. package/src/lang/fi/dialects.ts +1 -1
  33. package/src/lang/fi/index.ts +365 -299
  34. package/src/lang/fi/notes.md +23 -8
  35. package/src/lang/fi/status.json +1 -1
  36. package/src/lang/zh/index.ts +344 -237
  37. package/src/types.ts +6 -6
  38. package/types/core/analyze.d.ts +3 -3
  39. package/types/core/cadence.d.ts +33 -0
  40. package/types/core/index.d.ts +3 -1
  41. package/types/core/normalize.d.ts +1 -1
  42. package/types/core/parse.d.ts +1 -1
  43. package/types/core/{ir.d.ts → schedule.d.ts} +11 -16
  44. package/types/core/specs.d.ts +1 -1
  45. package/types/core/util.d.ts +1 -30
  46. package/types/core/weekday.d.ts +10 -0
  47. package/types/lang/de/index.d.ts +1 -1
  48. package/types/lang/en/dialects.d.ts +1 -1
  49. package/types/lang/en/index.d.ts +1 -1
  50. package/types/lang/es/index.d.ts +1 -1
  51. package/types/lang/fi/dialects.d.ts +1 -1
  52. package/types/lang/fi/index.d.ts +1 -1
  53. package/types/lang/zh/index.d.ts +1 -1
  54. package/types/types.d.ts +5 -5
package/CHANGELOG.md CHANGED
@@ -6,6 +6,71 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [0.3.1]
10
+
11
+ ### Changed
12
+
13
+ - **en — dense crons read coarse-to-fine.** A dense cron (a seconds cadence
14
+ stacked on a minute cadence under an hour cadence, with a calendar anchor)
15
+ previously rendered as a robotic fine-to-coarse run-on. It now leads with the
16
+ day/month anchor, states cadences coarse-to-fine, and nests the second under
17
+ the minute — e.g. `0-10 */7 */5 LW` → "on the last weekday of the month, every
18
+ five hours from midnight through 8 p.m., every seven minutes from 0 through 56
19
+ minutes past the hour, and within each of those minutes, every second from 0
20
+ through 10 past the minute". Blind native-panel naturalness on these shapes
21
+ rose from ~2.0 to ~4.9. Dense shapes only; simple and medium crons, the
22
+ sentence wrapper, and the other languages are unchanged.
23
+
24
+ ## [0.3.0]
25
+
26
+ The OR-day union (both day-of-month and day-of-week restricted — cron fires on
27
+ EITHER, the union of days) now reads clearly and correctly in es, de, fi, and
28
+ zh, validated by native math-inclined panels. None needed en's condition-frame —
29
+ each language already had a union construction — so this was a per-language
30
+ audit + fix, which surfaced real bugs.
31
+
32
+ ### Fixed
33
+
34
+ - **de — month scope (union-breaking):** a trailing month scoped only the last
35
+ OR-branch ("am 1. oder sonntags im Januar"); it now leads and scopes the whole
36
+ union ("im Januar am 1. oder sonntags"). Also, `*/2` day-of-month rendered as a
37
+ 16-date enumeration → "an jedem ungeraden Tag des Monats".
38
+ - **fi — exclusive-or (union-breaking):** month-restricted OR-day used "joko …
39
+ tai …", the *exclusive* disjunction; now the inclusive "tai".
40
+ - **es/de/fi/zh — `*/2` day-of-month:** in the OR-union it read as a continuous
41
+ every-two-days cadence, mis-implying continuity across the month boundary
42
+ (`*/2` dom is the odd days, resetting each month). Now an odd-day predicate
43
+ ("un día impar del mes" / "ungerader Tag des Monats" / "kuukauden parittomina
44
+ päivinä" / "每月单数日"). Standalone `*/2` keeps the cadence.
45
+
46
+ ### Changed
47
+
48
+ - OR-day naturalness polish: es/de weekday-range parallelism; zh separates the
49
+ time window from the day union; tested even-day predicates in es/de/zh.
50
+ - The fuzz date FORMS now include `*/2` so a day-of-month step verbosity
51
+ regression can't slip through unswept.
52
+
53
+ ## [0.2.2]
54
+
55
+ Architecture cleanup from the code review, plus a zh consistency fix. Internal
56
+ refactors are output byte-identical; the zh change is noted below.
57
+
58
+ ### Changed
59
+
60
+ - Renamed the core semantic contract `IR` → `Schedule` and `Content` →
61
+ `ScheduleFacts` (now `src/core/schedule.ts`, `describe(schedule, opts)`) — a
62
+ domain name over compiler jargon, clearer for language contributors. Internal;
63
+ the public API is unchanged.
64
+ - Lifted the stride/cadence decision tree (hand-copied ~9× across the renderers)
65
+ into one core helper parameterized by per-language phrasing, and split
66
+ `util.ts` into generic / weekday-display / cadence modules. Output
67
+ byte-identical across all five languages.
68
+ - **zh:** an uneven 4-fire hour step now compacts to its bounded cadence
69
+ (`*/7` → "从0点起每7小时,至21点") instead of enumerating, matching
70
+ en/es/de/fi; clean-stride hour lists now enumerate to match the others too.
71
+ - Minor naming: `enumerateNonUniformStep` → `enumerateIfNonUniform`; removed the
72
+ dead `HoursPlan` `'single'` variant; inlined `isContiguousHourRange`.
73
+
9
74
  ## [0.2.1]
10
75
 
11
76
  ### Fixed
package/cronli5.min.js CHANGED
@@ -1,3 +1,3 @@
1
- "use strict";(()=>{var be={SUN:0,MON:1,TUE:2,WED:3,THU:4,FRI:5,SAT:6},ke={JAN:1,FEB:2,MAR:3,APR:4,MAY:5,JUN:6,JUL:7,AUG:8,SEP:9,OCT:10,NOV:11,DEC:12},S={second:{cyclic:!0,max:59,min:0,top:59},minute:{cyclic:!0,max:59,min:0,top:59},hour:{cyclic:!0,max:23,min:0,top:23},date:{aliases:{"?":"*"},cyclic:!0,max:31,min:1,top:31},month:{cyclic:!0,max:12,min:1,numbers:ke,top:12},weekday:{aliases:{"?":"*",L:"6"},cyclic:!0,max:7,min:0,numbers:be,top:6},year:{max:9999,min:1970}},C=["second","minute","hour","date","month","weekday","year"],en={"@annually":"0 0 1 1 *","@yearly":"0 0 1 1 *","@monthly":"0 0 1 * *","@weekly":"0 0 * * 0","@daily":"0 0 * * *","@midnight":"0 0 * * *","@hourly":"0 * * * *"},E=6;function l(n,e){return(""+n).indexOf(e)!==-1}function J(n){return Array.from(new Set(n))}function K(n){return/^\d+$/.test(n)}function tn(n){if(n.length<5)return null;let e=n[1]-n[0];if(e<2)return null;for(let t=2;t<n.length;t+=1)if(n[t]-n[t-1]!==e)return null;return{start:n[0],interval:e,last:n[n.length-1]}}function Pn(n){return n===0?7:n}function Cn(n){let e=n.flatMap(function(i){return i.kind==="step"?i.fires.map(function(o){return{kind:"single",value:""+o}}):[i]});function t(r){return r.kind==="range"?Pn(+r.bounds[0]):Pn(+r.value)}return e.map(function(i,u){return[i,u]}).sort(function(i,u){return t(i[0])-t(u[0])||i[1]-u[1]}).map(function(i){return i[0]})}function d(n,e){return K(n)?+n:e[n.toUpperCase()]}function c(n,e){return n.analyses.segments[e]??[]}function z(n,e){return c(n,e)[0]}function Y(n){let e=[];for(let t of n){if(t.kind!=="single")return null;e.push(+t.value)}return e}function rn(n){return n.start<n.interval&&24%n.interval===0}function In(n){if(n.length<2)return null;let e=n[1]-n[0];if(e<2)return null;for(let t=2;t<n.length;t+=1)if(n[t]-n[t-1]!==e)return null;return n[0]!==0&&n.length<5?null:{interval:e,last:n[n.length-1],start:n[0]}}function Mn(n){return C.forEach(function(t){Se(n[t],S[t],t)}),n}function Se(n,e,t){typeof n!="string"&&typeof n!="number"&&xn(n,t);let r=""+n;r!=="*"&&(t==="date"&&D(r)||t==="weekday"&&j(r,e)||r.split(",").forEach(function(u){Oe(u,e)||xn(u,t)}))}function D(n){if(n==="L"||n==="LW"||n==="WL")return!0;let e=/^L-(\d{1,2})$/.exec(n);if(e)return+e[1]>=1&&+e[1]<=30;let t=/^(\d{1,2})W$|^W(\d{1,2})$/.exec(n);if(t){let r=+(t[1]||t[2]);return r>=1&&r<=31}return!1}function j(n,e){if(/L$/.test(n))return F(n.slice(0,-1),e);let t=n.split("#");return t.length===2?F(t[0],e)&&/^[1-5]$/.test(t[1]):!1}function Oe(n,e){return l(n,"/")?Ne(n,e):l(n,"-")?Tn(n,e):F(n,e)}function Ne(n,e){let t=n.split("/");return t.length!==2||!K(t[1])||+t[1]<1?!1:t[0]==="*"||F(t[0],e)||Tn(t[0],e,!0)}function Tn(n,e,t){let r=n.split("-");return r.length!==2||!F(r[0],e)||!F(r[1],e)?!1:e.cyclic&&!t?!0:d(r[0],e.numbers)<=d(r[1],e.numbers)}function F(n,e){return n==="*"?!1:K(n)?+n>=e.min&&+n<=e.max:e.numbers?n.toUpperCase()in e.numbers:!1}function xn(n,e){throw new Error('`cronli5` was passed an invalid field value "'+n+'" for the '+e+" field.")}var ze={hour:24,minute:60,second:60};function Wn(n){C.forEach(function(t){let r=S[t].aliases,i=r&&r[""+n[t]];i&&(n[t]=i)})}function Hn(n){return C.forEach(function(t){let r=""+n[t];if(t==="date"&&D(r)||t==="weekday"&&j(r,S[t])){n[t]=r;return}n[t]=Re(r,t,S[t])}),n}function Re(n,e,t){let r=""+n;if(r==="*")return r;let i=ze[e],u=r.split(",").map(function(s){return ve(Ln(Ie(xe(Me(Ce(Pe(s,t),t),t),t),t,i),t),t)}).join(",").split(",");return u.indexOf("*")!==-1?"*":J(u).sort(function(s,m){return Fn(s,t)-Fn(m,t)}).join(",")}function ve(n,e){if(!e.numbers)return n;let t=n.split("/"),r=t[0].split("-").map(function(u){return we(u,e)}).join("-");return t.length===2?r+"/"+t[1]:r}function we(n,e){if(n==="*")return n;let t=d(n,e.numbers);return""+(t>e.top?e.min:t)}function Pe(n,e){let t=n.split("/");if(!e.cyclic||t.length!==2||+t[1]!=1)return n;let r=t[0];return l(r,"-")?r:r==="*"||d(r,e.numbers)===e.min?"*":r+"-"+e.top}function Ce(n,e){let t=n.split("/");if(!e.cyclic||typeof e.top!="number"||t.length!==2||l(t[0],"-"))return n;let r=t[0];return(r==="*"?e.min:d(r,e.numbers))+ +t[1]<=e.top?n:r==="*"?""+e.min:r}function Ie(n,e,t){let r=n.split("/");if(typeof t!="number"||r.length!==2||l(r[0],"-"))return n;let i=+r[1],u=r[0]==="*"?e.min:d(r[0]);if(t%i===0&&u<i)return n;let o=[];for(let s=u;s<=e.top;s+=i)o.push(s);return o.join(",")}function xe(n,e){let t=n.split("/");return t.length!==2||!l(t[0],"-")?n:Ln(t[0],e)==="*"?"*/"+t[1]:n}function Ln(n,e){if(typeof e.top!="number"||l(n,"/")||!l(n,"-"))return n;let t=n.split("-"),r=d(t[0],e.numbers),i=d(t[1],e.numbers);if(r>i)return n;let u=e.top,o={};for(let s=r;s<=i;s+=1)o[s>u?e.min:s]=!0;for(let s=e.min;s<=u;s+=1)if(!o[s])return n;return"*"}function Me(n,e){let t=n.split("/")[0];if(!l(t,"-"))return n;let r=t.split("-");return d(r[0],e.numbers)!==d(r[1],e.numbers)?n:r[0]}function Fn(n,e){let t=n.split("/")[0].split("-")[0];return t==="*"?e.min:d(t,e.numbers)}function En(n,e){let t=n instanceof Array;if(n===null||typeof n>"u"||n===""||t&&n.length===0)throw new Error("`cronli5` expects a non-empty cron pattern as the first argument.");if(t)return Dn(n,e);if(typeof n=="object")return Te(n);if(typeof n=="string")return Fe(n,e);throw new Error("`cronli5` was passed an unexpected type.")}function Dn(n,e){if(n.length>7)throw new Error("`cronli5` was passed a cron pattern with more than seven fields.");return!e.seconds&&n.length<(e.years?7:6)&&n.unshift("0"),{second:n[0]||"0",minute:n[1]||"*",hour:n[2]||"*",date:n[3]||"*",month:n[4]||"*",weekday:n[5]||"*",year:n[6]||"*"}}function Te(n){if(!n.second&&!n.minute&&!n.hour)throw new Error("`cronli5` expects that any object being interpreted as a cron pattern have at least one of the following properties: `second`, `minute`, or `hour`");let e=typeof n.second<"u",t=typeof n.minute<"u",r=e?"*":"0",i=e||t?"*":"0";return{second:I(n.second,"0"),minute:I(n.minute,r),hour:I(n.hour,i),date:I(n.date,"*"),month:I(n.month,"*"),weekday:I(n.weekday,"*"),year:I(n.year,"*")}}function I(n,e){return typeof n>"u"?e:n}function Fe(n,e){let t=We(n).split(/\s+/);return Dn(t,e)}function We(n){let e=n.trim();if(e.charAt(0)!=="@")return n;let t=e.toLowerCase();if(Object.hasOwn(en,t))return en[t];throw new Error("`cronli5` does not recognize the macro `"+e+"`.")}function jn(n){return n!=="*"&&!l(n,",")&&!l(n,"-")&&!l(n,"/")}function un(n){return l(n,"-")&&!l(n,",")&&!l(n,"/")}function He(n){return l(n,"/")&&!l(n,",")}function on(n){return n!=="*"&&!l(n,"-")&&!l(n,"/")}function sn(n){return n!=="*"&&!un(n)&&!He(n)}function W(n){return n.indexOf("/")!==-1&&n.indexOf("-")===-1&&n.indexOf(",")===-1}function A(n,e,t){let r=[],i=n;for(;i<=t;)r.push(i),i+=e;return r}function An(n,e,t,r){let i=n.split("/"),u=+i[1];if(l(i[0],"-")){let s=i[0].split("-");return A(d(s[0],r),u,d(s[1],r))}let o=i[0]==="*"?e:d(i[0],r);return A(o,u,t)}function ln(n,e,t){let r=[];return n.split(",").forEach(function(u){if(l(u,"/"))r.push(...An(u,e,t));else if(l(u,"-")){let o=u.split("-");+o[0]<=+o[1]?r.push(...A(+o[0],1,+o[1])):(r.push(...A(+o[0],1,t)),r.push(...A(e,1,+o[1])))}else r.push(+u)}),J(r)}function Le(n){return on(n)?n.split(",").map(Number):[0]}function Ee(n){if(n==="*")return[0,59];if(un(n)){let e=n.split("-");if(+e[0]<=+e[1])return[+e[0],+e[1]]}return null}function De(n){return n==="*"?59:Math.max(...ln(n,0,59))}function je(n){if(jn(n)&&n!=="0")return+n}function Ae(n,e){return n==="*"?"wildcard":e==="date"&&D(n)||e==="weekday"&&j(n,S.weekday)?"quartz":l(n,",")?"list":l(n,"/")?"step":l(n,"-")?"range":"single"}function Ue(n,e,t){return e==="wildcard"||e==="quartz"?null:n.split(",").map(function(i){if(l(i,"/")){let u=i.split("/");return{fires:An(i,t.min,t.top,t.numbers),interval:+u[1],kind:"step",startToken:u[0]}}return l(i,"-")?{bounds:i.split("-"),kind:"range"}:{kind:"single",value:i}})}function Un(n){let e={},t={};C.forEach(function(o){e[o]=Ae(n[o],o),t[o]=Ue(n[o],e[o],S[o])});let i={analyses:{clockSecond:je(n.second),lastMinuteFire:De(n.minute),minuteSpan:Ee(n.minute),segments:t},pattern:n,shapes:e};return{...i,plan:qe(i)}}function qe(n){let{analyses:e,pattern:t,shapes:r}=n;if(t.second!=="0"){let i=Qe(t,r,e);if(i)return i}return qn(t,r,e)||Qn(t,r,e)}function Qe(n,e,t){let r=Ve(n,e);return r||(n.hour==="*"&&e.minute==="single"&&n.second!=="*"?{kind:"secondsWithinMinute",singleSecond:e.second==="single"}:e.second==="single"&&on(n.minute)&&sn(n.hour)?null:{kind:"composeSeconds",rest:qn(n,e,t,!0)||Qn(n,e,t,!0)})}function Ve(n,e){return n.minute!=="*"||n.hour!=="*"?null:n.second==="*"?{kind:"everySecond"}:e.second==="single"?{kind:"secondPastMinute"}:{kind:"standaloneSeconds"}}function qn(n,e,t,r=!1){if(e.minute==="step")return{hours:Je(n,e,t),kind:"minuteFrequency"};if(e.hour==="single"&&t.minuteSpan)return{hour:+n.hour,kind:"minuteSpanInHour",span:t.minuteSpan};let i=Ke(n,e);if(i)return i;let u=$e(n,e);if(u)return u;if(n.hour==="*")return Ye(n,e,r)}function an(n){let[e,t]=n.split("/"),r=e==="*"?0:+e;return e.indexOf("-")===-1&&24%+t===0&&r<+t}function $e(n,e){return e.hour!=="step"?null:n.minute==="*"?an(n.hour)?{form:"wildcard",kind:"minuteSpanAcrossHourStep"}:{form:"wildcard",kind:"minutesAcrossHours",times:U(n.hour)}:e.minute==="range"?{form:"range",kind:"minuteSpanAcrossHourStep"}:e.minute==="list"&&an(n.hour)?{form:"list",kind:"minuteSpanAcrossHourStep"}:null}function Je(n,e,t){if(e.hour==="list")return{kind:"during",times:U(n.hour)};if(e.hour==="range"){let r=n.hour.split("-");return{from:+r[0],kind:"window",last:t.lastMinuteFire,to:+r[1]}}return e.hour==="single"?{from:+n.hour,kind:"window",last:t.lastMinuteFire,to:+n.hour}:e.hour==="step"?an(n.hour)?{kind:"step"}:{kind:"during",times:U(n.hour)}:{kind:"none"}}function Ke(n,e){return sn(n.hour)?n.minute==="*"?{form:"wildcard",kind:"minutesAcrossHours",times:U(n.hour)}:e.minute==="range"||e.minute==="list"&&l(n.minute,"-")&&!l(n.minute,"/")?{form:e.minute==="range"?"range":"list",kind:"minutesAcrossHours",times:U(n.hour)}:null:null}function Ye(n,e,t){if(e.minute==="range")return{kind:"rangeOfMinutes"};if(e.minute==="list")return{kind:"multipleMinutes"};if(n.minute==="*")return{kind:"everyMinute"};if(n.minute!=="0"||t)return{kind:"singleMinute"}}function Qn(n,e,t,r=!1){let i=r&&n.minute==="0";return e.hour==="range"&&!i?Ge(n,e,t):e.hour==="step"&&n.minute==="0"&&!r?{kind:"hourStep"}:n.hour==="*"&&!i?{kind:"everyHour"}:Ze(n,t,i)}function Ge(n,e,t){let r=n.hour.split("-"),i="lead";return n.minute==="*"?i="wildcard":e.minute==="range"&&(i="range"),{boundMinute:e.minute==="range"||e.minute==="list"?null:t.lastMinuteFire,from:+r[0],kind:"hourRange",last:t.lastMinuteFire,minuteForm:i,to:+r[1]}}function Ze(n,e,t=!1){let r=ln(n.hour,0,23),i=Le(n.minute);if(!t&&r.length*i.length>E)return{fold:i.length===1,kind:"compactClockTimes",minute:i[0]};let u=[];return r.forEach(function(s){i.forEach(function(k){u.push({hour:s,minute:k,second:e.clockSecond})})}),{kind:"clockTimes",times:u}}function U(n){let e=ln(n,0,23);return e.length<=E?{fires:e,kind:"fires"}:{kind:"segments"}}function Vn(n,e){let t=En(n,e);return Wn(t),Mn(t),Hn(t)}function R(n){return n=""+n,n.length<2?"0"+n:n}function $n(n,e,t){return t.short?n:e[n]||n}function cn(n,{sep:e,pad:t,lean:r}){let i=t?R(n.hour):""+n.hour;return r&&!n.minute&&!n.second?i:i+e+R(n.minute)+(n.second?e+R(n.second):"")}var fn={gb:{am:"am",closeUp:!0,dayFirst:!0,midday:"midday",midnight:"midnight",ordinals:!1,pm:"pm",sep:".",serialComma:!1,through:" to "},us:{am:"a.m.",closeUp:!1,dayFirst:!1,midday:"noon",midnight:"midnight",ordinals:!1,pm:"p.m.",sep:":",serialComma:!0,through:" through ",untilWindow:!0},house:{am:"AM",closeUp:!1,dayFirst:!1,midday:"noon",midnight:"midnight",ordinals:!0,pm:"PM",sep:":",serialComma:!0,through:" - "}};function Jn(n){return typeof n=="object"&&n!==null?{...fn.us,untilWindow:!1,...n}:fn[n==="uk"?"gb":n]||fn.us}var Be=["zero","one","two","three","four","five","six","seven","eight","nine","ten"],mn=["th","st","nd","rd"],Xe=[null,["January","Jan"],["February","Feb"],["March","Mar"],["April","Apr"],["May","May"],["June","Jun"],["July","Jul"],["August","Aug"],["September","Sep"],["October","Oct"],["November","Nov"],["December","Dec"]],v=[["Sunday","Sun"],["Monday","Mon"],["Tuesday","Tue"],["Wednesday","Wed"],["Thursday","Thu"],["Friday","Fri"],["Saturday","Sat"]],_e={SUN:v[0],MON:v[1],TUE:v[2],WED:v[3],THU:v[4],FRI:v[5],SAT:v[6]},nt=[null,"first","second","third","fourth","fifth"];function et(n){return n=n||{},{ampm:typeof n.ampm=="boolean"?n.ampm:!0,lenient:!!n.lenient,seconds:!!n.seconds,short:!!n.short,style:Jn(n.dialect),years:!!n.years}}function tt(n,e){let t=Ht(n,e)??Yn(n,n.plan,e),r=B(n,e)?Kt(n,e):"";return tr(r+t,n,e)}function Yn(n,e,t){let r=Lt[e.kind];return r(n,e,t)}function rt(n,e,t){return"every second"+a(n,t)}function it(n,e,t){return H(n,t)+a(n,t)}function ut(n,e,t){let r=n.pattern.second;return h(r,t)+" "+N(r,"second")+" past the minute, every minute"+a(n,t)}function ot(n,e,t){let r=n.pattern.minute,i=h(r,t),u=N(r,"minute");if(e.singleSecond){let o=n.pattern.second;return i+" "+u+" and "+h(o,t)+" "+N(o,"second")+" past the hour, every hour"+a(n,t)}return H(n,t)+", "+i+" "+u+" past the hour, every hour"+a(n,t)}function st(n,e,t){if(!(e.rest.kind==="clockTimes"||e.rest.kind==="compactClockTimes")||n.shapes.minute!=="single")return null;let i=+n.pattern.minute;return Sn(n,i,t)??On(n,i,t)}function at(n,e,t){return+e.times[0].minute==0&&n.shapes.minute==="single"?H(n,t)+" for one minute at "+ct(n,e,t):H(n,t)+" of "+ft(n,e,t)}function lt(n,e,t){let r=st(n,e,t);return r!==null?r:e.rest.kind==="clockTimes"&&(n.shapes.second==="wildcard"||n.shapes.second==="step")?at(n,e.rest,t):n.shapes.second==="wildcard"&&e.rest.kind==="minuteFrequency"&&e.rest.hours.kind==="none"&&n.pattern.minute==="*/2"?"every second of every other minute"+a(n,t):(e.rest.kind==="compactClockTimes"&&n.analyses.clockSecond?"":H(n,t)+", ")+Yn(n,e.rest,t)}function ct(n,e,t){let r=e.times.map(function(o){return f({hour:o.hour,minute:0},t)}),i=Z(n,Rn,t);return y(r,t)+(i&&", "+i)}function ft(n,e,t){let r=e.times.map(function(o){return f({hour:o.hour,minute:o.minute,second:o.second,explicit:!0},t)}),i=Z(n,Rn,t);return y(r,t)+(i&&", "+i)}function H(n,e){return x(n,"minute",e)}function x(n,e,t){let r=n.pattern.second,i=n.shapes.second;if(r==="*")return"every second";if(i==="step")return bn(z(n,"second"),"second",e,t);if(i==="range"){let u=r.split("-"),o=Nn();return"every second from "+o(u[0])+g(t)+o(u[1])+" past the "+e}return i==="single"?"at "+h(r,t)+" "+N(r,"second")+" past the "+e:L(c(n,"second"),"second",e,t)??P(T(c(n,"second"),t),"second",e,t)}function mt(n,e,t){return"every minute"+a(n,t)}function dt(n,e,t){let r=n.pattern.minute;return h(r,t)+" "+N(r,"minute")+" past the hour, every hour"+a(n,t)}function ht(n,e,t){return G(n.pattern.minute,t)+a(n,t)}function gt(n,e,t){return(L(c(n,"minute"),"minute","hour",t)??P(T(c(n,"minute"),t),"minute","hour",t))+a(n,t)}function pt(n,e,t){let r=bn(z(n,"minute"),"minute","hour",t);if(e.hours.kind==="during"){let i=$(n,t);r+=i?", "+i:" during the "+q(n,e.hours.times,!1,t)+" hours"}else e.hours.kind==="window"?r+=" "+V({continuous:!1,from:e.hours.from,throughMinute:e.hours.last,to:e.hours.to},t):e.hours.kind==="step"&&(r+=" "+yn(z(n,"hour"),t));return r+a(n,t)}function yt(n,e,t){return n.pattern.minute==="*"?"every minute of the "+f({hour:e.hour,minute:0},t)+" hour"+a(n,t):"every minute from "+f({hour:e.hour,minute:e.span[0]},t)+g(t)+f({hour:e.hour,minute:e.span[1]},t)+a(n,t)}function bt(n,e,t){let r=$(n,t);if(e.form==="wildcard")return r!==null?"every minute, "+r+a(n,t):"every minute during the "+q(n,e.times,!1,t)+" hours"+a(n,t);if(e.form==="range"){let o=G(n.pattern.minute,t);return r!==null?o+", "+r+a(n,t):Ut(e.times)?o+", at "+q(n,e.times,!0,t)+a(n,t):o+" during the "+q(n,e.times,!1,t)+" hours"+a(n,t)}let i=L(c(n,"minute"),"minute","hour",t)??P(T(c(n,"minute"),t),"minute","hour",t);if(r!==null)return i+", "+r+a(n,t);let u=q(n,e.times,!0,t);return i+", at "+u+a(n,t)}var Gn={2:"other",3:"third",4:"fourth",6:"sixth",8:"eighth",12:"twelfth"};function yn(n,e){let t="during every "+Gn[n.interval]+" hour",r=n.startToken==="*"?0:+n.startToken;return r===0?t:t+" starting at "+f({hour:r,minute:0},e)}function kt(n,e,t){let r=z(n,"hour");if(e.form==="wildcard")return"every minute "+yn(r,t)+a(n,t);let i=e.form==="list"?L(c(n,"minute"),"minute","hour",t)??P(T(c(n,"minute"),t),"minute","hour",t):G(n.pattern.minute,t),u=$(n,t);return i+", "+(u??ee(r,t))+a(n,t)}function G(n,e){let t=n.split("-"),r=Nn();return"every minute from "+r(t[0])+g(e)+r(t[1])+" past the hour"}function St(n,e,t){return"every hour"+a(n,t)}function Ot(n,e,t){let r=Rt(zt(e),t);return e.minuteForm==="wildcard"?"every minute "+r+a(n,t):e.minuteForm==="range"?G(n.pattern.minute,t)+", "+r+a(n,t):Zn(n,t)+" "+r+a(n,t)}function Zn(n,e){return n.pattern.minute==="0"?"every hour":L(c(n,"minute"),"minute","hour",e)??P(T(c(n,"minute"),e),"minute","hour",e)}function Nt(n,e,t){let r=$(n,t);return r!==null?r+a(n,t):ee(z(n,"hour"),t)+a(n,t)}function zt(n){let e=n.minuteForm==="wildcard",t=e?n.boundMinute??0:0;return{from:n.from,closeMinute:t,to:n.to,continuous:e}}function V(n,e){let{from:t,to:r,throughMinute:i,continuous:u}=n,o="from "+f({hour:t,minute:0},e);return e.style.untilWindow&&!e.short&&t!==r?u?o+" until "+f({hour:(r+1)%24,minute:0},e):o+g(e)+f({hour:r,minute:0},e):o+g(e)+f({hour:r,minute:i},e)}function Rt(n,e){return V({continuous:n.continuous,from:n.from,throughMinute:n.closeMinute,to:n.to},e)}function vt(n,e,t){if(n.shapes.minute==="single"){let u=+n.pattern.minute,o=Sn(n,u,t)??On(n,u,t);if(o!==null)return o}let r=zn(e.times),i=e.times.map(function(o){return f({hour:o.hour,minute:o.minute,second:o.second,plain:r},t)});return oe(n,t)+"at "+y(i,t)+Bn(n,t)}function Bn(n,e){return B(n,e)?ae(n,e):""}function wt(n,e,t){if(e.fold){let o=Sn(n,+e.minute,t)??On(n,+e.minute,t);if(o!==null)return o;if(c(n,"hour").some(function(p){return p.kind==="range"})&&!n.analyses.clockSecond)return Pt(n,e,t)+a(n,t);let m={minute:e.minute,second:n.analyses.clockSecond};return oe(n,t)+"at "+Q(n,m,!0,t)+Bn(n,t)}let r=L(c(n,"minute"),"minute","hour",t)??P(T(c(n,"minute"),t),"minute","hour",t),i=$(n,t),u=i?r+", "+i+a(n,t):r+", at "+Q(n,{minute:0,second:null},!0,t)+a(n,t);return n.analyses.clockSecond?H(n,t)+", "+u:u}function Pt(n,e,t){let r=e.minute,i=[],u=Xn(n).map(function(m){return f({hour:m,minute:r},t)});return c(n,"hour").forEach(function(m){m.kind==="range"&&i.push(V({continuous:!1,from:+m.bounds[0],throughMinute:r,to:+m.bounds[1]},t))}),Zn(n,t)+" "+y(i,t)+_n(u,t)}function Xn(n){let e=[];return c(n,"hour").forEach(function(r){r.kind==="step"?e.push(...r.fires):r.kind!=="range"&&e.push(+r.value)}),e}function _n(n,e){return n.length?" and at "+y(n,e):""}function M(n){return n==="*"||n.startsWith("*/")&&n.indexOf("-")===-1}function Ct(n,e){let{second:t,minute:r}=n.pattern;return M(t)?{secondLead:!0,text:x(n,"minute",e)}:t==="0"&&M(r)?{secondLead:!1,text:r==="*"?"every minute":bn(z(n,"minute"),"minute","hour",e)}:null}function It(n,e){let t=n.pattern.minute;if(t==="*")return"";if(M(t))return" of every other minute";let r=c(n,"minute");if(n.shapes.minute==="single")return" during minute :"+R(t);if(n.shapes.minute==="range"){let u=t.split("-");return" during minutes :"+R(u[0])+g(e)+":"+R(u[1])}let i=T(r,e).map(function(o){return":"+R(o)});return" during minutes "+y(i,e)}function xt(n,e){let t=n.pattern.hour;if(t==="*")return n.pattern.minute!=="*"&&!M(n.pattern.minute)?" of every hour":"";if(M(t))return t==="*/2"?" of every other hour":"";if(n.shapes.hour==="single"){let r=+t;return n.shapes.minute==="step"?" from "+f({hour:r,minute:0},e)+" until "+f({hour:(r+1)%24,minute:0},e):n.pattern.minute!=="*"&&!M(n.pattern.minute)?" at "+f({hour:r,minute:0},e):" of the "+f({hour:r,minute:0},e)+" hour"}if(n.shapes.hour==="range"){let r=t.split("-");return" "+V({continuous:n.pattern.minute==="*",from:+r[0],throughMinute:0,to:+r[1]},e)}return" during the "+Q(n,{minute:0,second:null},!1,e)+" hours"}function Mt(n){return n.shapes.hour==="range"}function Tt(n){if(n.shapes.hour!=="step")return!0;let e=z(n,"hour");return n.pattern.hour==="*/2"||e.startToken.indexOf("-")!==-1}function Ft(n){if(n.shapes.minute!=="list")return!1;let e=Y(c(n,"minute"));return e!==null&&tn(e)!==null}function Wt(n,e){let{minute:t,hour:r}=n.pattern,i=M(t)&&t!=="*";return Tt(n)?e.secondLead?i?t==="*/2"&&!Mt(n):!(Ft(n)||n.shapes.minute==="list"&&n.shapes.hour==="list"):r==="*/2"?!0:n.shapes.hour==="single"&&t==="*/2":!1}function Ht(n,e){if(!e.style.untilWindow||e.short||n.pattern.minute==="*"&&n.pattern.hour==="*")return null;let t=Ct(n,e);if(!t||!Wt(n,t))return null;let r=t.secondLead?It(n,e):"";return t.text+r+xt(n,e)+a(n,e)}var Lt={clockTimes:vt,compactClockTimes:wt,composeSeconds:lt,everyHour:St,everyMinute:mt,everySecond:rt,hourRange:Ot,hourStep:Nt,minuteFrequency:pt,minuteSpanAcrossHourStep:kt,minuteSpanInHour:yt,minutesAcrossHours:bt,multipleMinutes:gt,rangeOfMinutes:ht,secondPastMinute:ut,secondsWithinMinute:ot,singleMinute:dt,standaloneSeconds:it};function ne(n,e){let{interval:t,start:r,last:i,cycle:u,unit:o,anchor:s}=n,m="every "+h(t,e)+" "+o+"s",k=u%t===0;if(r===0&&k)return m;if(r<t&&k)return m+" from "+h(r,e)+" "+N(r,o)+" past the "+s;let p=Nn();return m+" from "+p(r)+g(e)+p(i)+" "+N(i,o)+" past the "+s}function L(n,e,t,r){let i=Y(n),u=i&&tn(i);return u?ne({...u,cycle:60,unit:e,anchor:t},r):null}function bn(n,e,t,r){if(n.startToken.indexOf("-")!==-1)return P(Kn(n.fires,r),e,t,r);let i=n.startToken==="*"?0:+n.startToken;return i!==0&&n.fires.length<=3?P(Kn(n.fires,r),e,t,r):ne({interval:n.interval,start:i,last:n.fires[n.fires.length-1],cycle:60,unit:e,anchor:t},r)}function ee(n,e){if(n.startToken.indexOf("-")!==-1)return"at "+hn(n.fires,e);let t=n.startToken==="*"?0:+n.startToken,r=n.interval;return t===0?"every "+h(r,e)+" hours":n.fires.length<=3?"at "+hn(n.fires,e):"every "+h(r,e)+" hours from "+f({hour:t,minute:0},e)}function dn(n,e){let{start:t,interval:r,last:i}=n,u="every "+h(r,e)+" hours",o=24%r===0;return t===0&&o?u:t<r&&o?u+" from "+f({hour:t,minute:0},e):u+" from "+f({hour:t,minute:0},e)+g(e)+f({hour:i,minute:0},e)}function $(n,e){let t=te(n);return!t||rn(t)?null:dn(t,e)}function te(n){let e=c(n,"hour");if(e.length===1&&e[0].kind==="step"){let r=e[0];if(r.fires.length<2)return null;let i=r.startToken==="*"?0:+r.startToken.split("-")[0];return{interval:r.interval,last:r.fires[r.fires.length-1],start:i}}let t=Y(e);return t&&In(t)}function kn(n){return n.pattern.second==="*"||n.shapes.second==="step"}function re(n,e,t){if(e===0)return kn(n)?x(n,"minute",t)+" for one minute":x(n,"hour",t);let r=h(e,t)+" "+N(e,"minute")+" past the hour";return n.pattern.second==="0"?r:x(n,"minute",t)+", "+r}function Sn(n,e,t){let r=te(n);if(!r)return null;let i=(r.last-r.start)/r.interval+1;if(n.pattern.second==="0"&&i<=E&&rn(r))return null;let u=e===0&&kn(n)&&Et(n);return u?x(n,"minute",t)+" for one minute "+yn(u,t)+a(n,t):e===0&&n.pattern.second==="0"?dn(r,t)+a(n,t):re(n,e,t)+", "+dn(r,t)+a(n,t)}function Et(n){let e=c(n,"hour"),t=e.length===1&&e[0];return!t||t.kind!=="step"||t.startToken.indexOf("-")!==-1||!(t.interval in Gn)?null:t}function Dt(n){return c(n,"hour").some(function(t){return t.kind==="range"})}function jt(n,e){let t=[],r=Xn(n);c(n,"hour").forEach(function(s){s.kind==="range"&&t.push(V({continuous:!1,from:+s.bounds[0],throughMinute:0,to:+s.bounds[1]},e))});let i="every hour "+y(t,e),u=r.map(function(s){return f({hour:s,minute:0},e)});return i+_n(u,e)}function On(n,e,t){return e!==0||!Dt(n)||n.pattern.second==="0"?null:kn(n)?x(n,"minute",t)+" for one minute during the "+Q(n,{minute:0,second:null},!1,t)+" hours"+a(n,t):re(n,e,t)+", "+jt(n,t)+a(n,t)}function Nn(){return function(e){return""+e}}function ie(n,e){return n>1?function(r){return""+r}:function(r){return h(r,e)}}function Kn(n,e){return n.map(ie(n.length,e))}function T(n,e){let t=n.reduce(function(u,o){return o.kind==="range"?u+1:u+(o.kind==="step"?o.fires.length:1)},0),r=ie(t,e);return n.flatMap(function(u){return u.kind==="range"?[r(u.bounds[0])+g(e)+r(u.bounds[1])]:u.kind==="step"?u.fires.map(r):[r(u.value)]})}function P(n,e,t,r){return"at "+y(n,r)+" "+e+"s past the "+t}function At(n,e,t){return(+n==0||+n==12)&&+e==0&&!(typeof t=="number"&&t>0)}function zn(n){let e=n.filter(function(r){return At(r.hour,r.minute,r.second)});return e.length>0&&e.length<n.length}function hn(n,e){let t=zn(n.map(function(u){return{hour:u,minute:0}})),r=n.map(function(u){return f({hour:u,minute:0,plain:t},e)});return y(r,e)}function Ut(n){return n.kind==="fires"&&n.fires.length===1}function q(n,e,t,r){return e.kind==="fires"?hn(e.fires,r):Q(n,{minute:0,second:null},t,r)}function qt(n){return n.kind==="range"?n.bounds:n.kind==="step"?n.fires:[n.value]}function Q(n,e,t,r){let{minute:i,second:u}=e,o=c(n,"hour"),s=zn(o.flatMap(function(p){return qt(p).map(function(nn){return{hour:+nn,minute:i,second:u}})})),m=[];return o.forEach(function(p){p.kind==="step"?m.push(...p.fires.map(function(nn){return f({hour:nn,minute:i,second:u,plain:s},r)})):p.kind==="range"?m.push(f({hour:p.bounds[0],minute:i,second:u,plain:s},r)+g(r)+f({hour:p.bounds[1],minute:i,second:u,plain:s},r)):m.push(f({hour:p.value,minute:i,second:u,plain:s},r))}),y(Qt(m,o,t),r)}function Qt(n,e,t){let r=e.some(function(u){return u.kind==="range"});return!t||!r?n:n.map(function(u,o){return o===0?u:"at "+u})}function ue(n,e,t){if(n.length<=1)return n.join("");if(n.length===2)return n[0]+e+n[1];let r=t.style.serialComma?","+e:e;return n.slice(0,-1).join(", ")+r+n[n.length-1]}function y(n,e){return ue(n," and ",e)}function Vt(n,e){return ue(n," or ",e)}var $t={all:"",month:"in ",recurringWeekday:!0,stepDate:"on ",weekday:"on "},Rn={all:"every day",month:"every day in ",recurringWeekday:!1,stepDate:"",weekday:"every "};function a(n,e){if(B(n,e))return ae(n,e);let t=Z(n,$t,e);return t&&" "+t}function oe(n,e){return B(n,e)?"":Z(n,Rn,e)+" "}function Z(n,e,t){let r=n.pattern;if(r.date!=="*"&&r.weekday!=="*")return Bt(n,t);if(r.date!=="*")return Jt(n,e,t);if(r.weekday!=="*"){let i=vn(r.weekday,t);return i?gn(i,n,t):e.weekday+de(n,e.recurringWeekday,t)+ce(n,t)}return r.month!=="*"?e.month+O(n,t):e.all}function Jt(n,e,t){let r=n.pattern,i=X(r.date,t);return i?gn(i,n,t):W(r.date)?gn(e.stepDate+fe(r.date),n,t):r.month!=="*"&&!se(n)?"on the "+pn(n,t)+ce(n,t):r.month!=="*"?"on "+le(n,t):"on the "+pn(n,t)}function se(n){return!me(n.pattern.month)&&c(n,"month").every(function(t){return t.kind!=="range"})}function B(n,e){return n.pattern.date!=="*"&&n.pattern.weekday!=="*"&&!!e.style.untilWindow&&!e.short}function ae(n,e){let t=[...Yt(n,e),...Gt(n,e)];return" whenever the day is "+Vt(t,e)}function Kt(n,e){return n.pattern.month==="*"?"":"in "+O(n,e)+" "}function Yt(n,e){let t=n.pattern.date,r=X(t,e);if(r)return[r.replace(/^on /,"")];let i=Zt(t);if(i)return[i];let u=[];return c(n,"date").forEach(function(s){s.kind==="range"?u.push("from the "+b(s.bounds[0])+g(e)+"the "+b(s.bounds[1])):s.kind==="step"?s.fires.forEach(function(k){u.push("the "+b(k))}):u.push("the "+b(s.value))}),u}function Gt(n,e){let t=n.pattern.weekday,r=vn(t,e);if(r)return[r.replace(/^on /,"")];let i=[];return c(n,"weekday").forEach(function(o){o.kind==="range"&&o.bounds[0]==="1"&&o.bounds[1]==="5"?i.push("a weekday"):o.kind==="range"?i.push("a "+w(o.bounds[0],e)+g(e)+"a "+w(o.bounds[1],e)):o.kind==="step"?o.fires.forEach(function(m){i.push("a "+w(m,e))}):i.push("a "+w(o.value,e))}),i}function Zt(n){if(!W(n))return null;let[e,t]=n.split("/");return+t!=2?null:e==="*"||e==="1"?"an odd-numbered day":e==="2"?"an even-numbered day":null}function Bt(n,e){let t=n.pattern,r=vn(t.weekday,e)||"on "+de(n,!1,e);return t.month!=="*"&&se(n)&&!X(t.date,e)&&!W(t.date)?"on "+le(n,e)+" or "+r+" in "+O(n,e):Xt(n,e)+" or "+r+_t(n,e)}function Xt(n,e){let t=n.pattern,r=X(t.date,e);return r||(W(t.date)?fe(t.date):"on the "+pn(n,e))}function _t(n,e){return n.pattern.month==="*"?"":", in "+O(n,e)}function X(n,e){if(n==="L")return"on the last day of the month";if(n==="LW"||n==="WL")return"on the last weekday of the month";let t=/^L-(\d{1,2})$/.exec(n);if(t)return h(+t[1],e)+" "+N(t[1],"day")+" before the last day of the month";let r=/^(\d{1,2})W$|^W(\d{1,2})$/.exec(n);if(r)return"on the weekday nearest the "+b(r[1]||r[2])}function vn(n,e){let t=n.split("#");if(t.length===2)return"on the "+nt[+t[1]]+" "+w(t[0],e)+" of the month";if(/L$/.test(n))return"on the last "+w(n.slice(0,-1),e)+" of the month"}function le(n,e){let t=O(n,e),r=_(c(n,"date"),e.style.ordinals?b:nr,e);return e.style.dayFirst&&n.shapes.date==="single"&&n.shapes.month!=="single"?"the "+b(n.pattern.date)+" of "+t:e.style.dayFirst?r+" "+t:t+" "+r}function nr(n){return""+n}function ce(n,e){return n.pattern.month==="*"?"":" in "+O(n,e)}function gn(n,e,t){if(e.pattern.month==="*")return n;let r=n.indexOf(" of the month")!==-1;return r&&e.shapes.month==="range"?n.replace(" of the month"," of each month")+" from "+O(e,t):r&&(e.shapes.month==="single"||e.shapes.month==="step")?n.replace(" of the month","")+" in "+O(e,t):n+" in "+O(e,t)}function fe(n){let e=n.split("/"),t=+e[1],r=e[0],u=(t===2?"every other":"every "+b(t))+" day of the month";return r!=="*"&&r!=="1"&&(u+=" from the "+b(r)),u}function pn(n,e){return _(c(n,"date"),b,e)}function O(n,e){let t=me(n.pattern.month);return t||_(c(n,"month"),function(i){return or(i,e)},e)}function me(n){if(!W(n))return null;let[e,t]=n.split("/");return+t!=2?null:e==="*"||e==="1"?"every odd-numbered month":e==="2"?"every even-numbered month":null}function de(n,e,t){let r=Cn(c(n,"weekday")),i=r.some(function(s){return s.kind==="range"});return _(r,e&&!i?function(s){return er(s,t)}:function(s){return w(s,t)},t)}function er(n,e){let t=w(n,e);return e.short?t:t+"s"}function _(n,e,t){let r=[];return n.forEach(function(u){u.kind==="step"?r.push(...u.fires.map(e)):u.kind==="range"?r.push(u.bounds.map(e).join(g(t))):r.push(e(u.value))}),y(r,t)}function tr(n,e,t){let r=e.pattern.year;if(r==="*")return n;if(r.indexOf("/")!==-1)return n+", "+ir(r,t);let i=rr(r,t);if(r.indexOf("-")===-1&&r.indexOf(",")===-1&&e.pattern.date!=="*"&&n.indexOf(" at ")!==-1){let u=t.style.dayFirst?" ":", ";return n.replace(" at ",u+i+" at ")}return n+" in "+i}function rr(n,e){return n.indexOf(",")!==-1?y(n.split(","),e):n.indexOf("-")!==-1?n.split("-").join(g(e)):n}function ir(n,e){let t=n.split("/"),r=+t[1],i=t[0];if(r<=1)return"every year";let u=r===2?"every other year":"every "+h(r,e)+" years";return i!=="*"&&i!=="0"&&(u+=" from "+i),u}function f(n,e){let{hour:t,minute:r,plain:i,explicit:u}=n,o=typeof n.second=="number"&&n.second>0?n.second:0;return e.ampm?ur({hour:t,minute:r,second:o,plain:i,explicit:u},e):cn({hour:t,minute:r,second:o},{pad:!0,sep:e.style.sep})}function ur(n,e){let{hour:t,minute:r,second:i,plain:u,explicit:o}=n,s=e.style;if(!u&&!o&&+r==0&&!i){if(+t==0)return s.midnight;if(+t==12)return s.midday}return cn({hour:t%12||12,minute:r,second:i},{lean:!o,sep:s.sep})+(s.closeUp?"":" ")+(t<12?s.am:s.pm)}function h(n,e){return $n(n,Be,e)}function N(n,e){return+n==1?e:e+"s"}function g(n){return n.short?"-":n.style.through}function b(n){let e=Math.abs(n),t=mn[e];return t||(e=(e%100-20)%10,t=mn[e]||mn[0]),n+t}function or(n,e){let t=Xe[+n];return t&&t[e.short?1:0]}function w(n,e){let t=n===7||n==="7"?0:n,r=v[t]||_e[t];return r&&r[e.short?1:0]}var sr={describe:tt,fallback:"an unrecognizable cron pattern",options:et,reboot:"at system startup",sentence:n=>"Runs "+n+(n.endsWith(".")?"":".")},he=sr;/**
1
+ "use strict";(()=>{var Or={SUN:0,MON:1,TUE:2,WED:3,THU:4,FRI:5,SAT:6},Nr={JAN:1,FEB:2,MAR:3,APR:4,MAY:5,JUN:6,JUL:7,AUG:8,SEP:9,OCT:10,NOV:11,DEC:12},k={second:{cyclic:!0,max:59,min:0,top:59},minute:{cyclic:!0,max:59,min:0,top:59},hour:{cyclic:!0,max:23,min:0,top:23},date:{aliases:{"?":"*"},cyclic:!0,max:31,min:1,top:31},month:{cyclic:!0,max:12,min:1,numbers:Nr,top:12},weekday:{aliases:{"?":"*",L:"6"},cyclic:!0,max:7,min:0,numbers:Or,top:6},year:{max:9999,min:1970}},M=["second","minute","hour","date","month","weekday","year"],tn={"@annually":"0 0 1 1 *","@yearly":"0 0 1 1 *","@monthly":"0 0 1 * *","@weekly":"0 0 * * 0","@daily":"0 0 * * *","@midnight":"0 0 * * *","@hourly":"0 * * * *"},A=6;function l(n,r){return(""+n).indexOf(r)!==-1}function Y(n){return Array.from(new Set(n))}function G(n){return/^\d+$/.test(n)}function d(n,r){return G(n)?+n:r[n.toUpperCase()]}function Tn(n){return M.forEach(function(e){zr(n[e],k[e],e)}),n}function zr(n,r,e){typeof n!="string"&&typeof n!="number"&&Mn(n,e);let t=""+n;t!=="*"&&(e==="date"&&U(t)||e==="weekday"&&q(t,r)||t.split(",").forEach(function(o){vr(o,r)||Mn(o,e)}))}function U(n){if(n==="L"||n==="LW"||n==="WL")return!0;let r=/^L-(\d{1,2})$/.exec(n);if(r)return+r[1]>=1&&+r[1]<=30;let e=/^(\d{1,2})W$|^W(\d{1,2})$/.exec(n);if(e){let t=+(e[1]||e[2]);return t>=1&&t<=31}return!1}function q(n,r){if(/L$/.test(n))return L(n.slice(0,-1),r);let e=n.split("#");return e.length===2?L(e[0],r)&&/^[1-5]$/.test(e[1]):!1}function vr(n,r){return l(n,"/")?wr(n,r):l(n,"-")?Wn(n,r):L(n,r)}function wr(n,r){let e=n.split("/");return e.length!==2||!G(e[1])||+e[1]<1?!1:e[0]==="*"||L(e[0],r)||Wn(e[0],r,!0)}function Wn(n,r,e){let t=n.split("-");return t.length!==2||!L(t[0],r)||!L(t[1],r)?!1:r.cyclic&&!e?!0:d(t[0],r.numbers)<=d(t[1],r.numbers)}function L(n,r){return n==="*"?!1:G(n)?+n>=r.min&&+n<=r.max:r.numbers?n.toUpperCase()in r.numbers:!1}function Mn(n,r){throw new Error('`cronli5` was passed an invalid field value "'+n+'" for the '+r+" field.")}var Pr={hour:24,minute:60,second:60};function Ln(n){M.forEach(function(e){let t=k[e].aliases,i=t&&t[""+n[e]];i&&(n[e]=i)})}function En(n){return M.forEach(function(e){let t=""+n[e];if(e==="date"&&U(t)||e==="weekday"&&q(t,k[e])){n[e]=t;return}n[e]=Cr(t,e,k[e])}),n}function Cr(n,r,e){let t=""+n;if(t==="*")return t;let i=Pr[r],o=t.split(",").map(function(s){return xr(Dn(Wr(Hr(Lr(Tr(Mr(s,e),e),e),e),e,i),e),e)}).join(",").split(",");return o.indexOf("*")!==-1?"*":Y(o).sort(function(s,m){return Hn(s,e)-Hn(m,e)}).join(",")}function xr(n,r){if(!r.numbers)return n;let e=n.split("/"),t=e[0].split("-").map(function(o){return Fr(o,r)}).join("-");return e.length===2?t+"/"+e[1]:t}function Fr(n,r){if(n==="*")return n;let e=d(n,r.numbers);return""+(e>r.top?r.min:e)}function Mr(n,r){let e=n.split("/");if(!r.cyclic||e.length!==2||+e[1]!=1)return n;let t=e[0];return l(t,"-")?t:t==="*"||d(t,r.numbers)===r.min?"*":t+"-"+r.top}function Tr(n,r){let e=n.split("/");if(!r.cyclic||typeof r.top!="number"||e.length!==2||l(e[0],"-"))return n;let t=e[0];return(t==="*"?r.min:d(t,r.numbers))+ +e[1]<=r.top?n:t==="*"?""+r.min:t}function Wr(n,r,e){let t=n.split("/");if(typeof e!="number"||t.length!==2||l(t[0],"-"))return n;let i=+t[1],o=t[0]==="*"?r.min:d(t[0]);if(e%i===0&&o<i)return n;let u=[];for(let s=o;s<=r.top;s+=i)u.push(s);return u.join(",")}function Hr(n,r){let e=n.split("/");return e.length!==2||!l(e[0],"-")?n:Dn(e[0],r)==="*"?"*/"+e[1]:n}function Dn(n,r){if(typeof r.top!="number"||l(n,"/")||!l(n,"-"))return n;let e=n.split("-"),t=d(e[0],r.numbers),i=d(e[1],r.numbers);if(t>i)return n;let o=r.top,u={};for(let s=t;s<=i;s+=1)u[s>o?r.min:s]=!0;for(let s=r.min;s<=o;s+=1)if(!u[s])return n;return"*"}function Lr(n,r){let e=n.split("/")[0];if(!l(e,"-"))return n;let t=e.split("-");return d(t[0],r.numbers)!==d(t[1],r.numbers)?n:t[0]}function Hn(n,r){let e=n.split("/")[0].split("-")[0];return e==="*"?r.min:d(e,r.numbers)}function jn(n,r){let e=n instanceof Array;if(n===null||typeof n>"u"||n===""||e&&n.length===0)throw new Error("`cronli5` expects a non-empty cron pattern as the first argument.");if(e)return Rn(n,r);if(typeof n=="object")return Er(n);if(typeof n=="string")return Dr(n,r);throw new Error("`cronli5` was passed an unexpected type.")}function Rn(n,r){if(n.length>7)throw new Error("`cronli5` was passed a cron pattern with more than seven fields.");return!r.seconds&&n.length<(r.years?7:6)&&n.unshift("0"),{second:n[0]||"0",minute:n[1]||"*",hour:n[2]||"*",date:n[3]||"*",month:n[4]||"*",weekday:n[5]||"*",year:n[6]||"*"}}function Er(n){if(!n.second&&!n.minute&&!n.hour)throw new Error("`cronli5` expects that any object being interpreted as a cron pattern have at least one of the following properties: `second`, `minute`, or `hour`");let r=typeof n.second<"u",e=typeof n.minute<"u",t=r?"*":"0",i=r||e?"*":"0";return{second:T(n.second,"0"),minute:T(n.minute,t),hour:T(n.hour,i),date:T(n.date,"*"),month:T(n.month,"*"),weekday:T(n.weekday,"*"),year:T(n.year,"*")}}function T(n,r){return typeof n>"u"?r:n}function Dr(n,r){let e=jr(n).split(/\s+/);return Rn(e,r)}function jr(n){let r=n.trim();if(r.charAt(0)!=="@")return n;let e=r.toLowerCase();if(Object.hasOwn(tn,e))return tn[e];throw new Error("`cronli5` does not recognize the macro `"+r+"`.")}function An(n){return n===0?7:n}function Un(n){let r=n.flatMap(function(i){return i.kind==="step"?i.fires.map(function(u){return{kind:"single",value:""+u}}):[i]});function e(t){return t.kind==="range"?An(+t.bounds[0]):An(+t.value)}return r.map(function(i,o){return[i,o]}).sort(function(i,o){return e(i[0])-e(o[0])||i[1]-o[1]}).map(function(i){return i[0]})}function on(n){if(n.length<5)return null;let r=n[1]-n[0];if(r<2)return null;for(let e=2;e<n.length;e+=1)if(n[e]-n[e-1]!==r)return null;return{start:n[0],interval:r,last:n[n.length-1]}}function c(n,r){return n.analyses.segments[r]??[]}function O(n,r){return c(n,r)[0]}function Z(n){let r=[];for(let e of n){if(e.kind!=="single")return null;r.push(+e.value)}return r}function un(n){return n.start<n.interval&&24%n.interval===0}function sn(n,r){let{start:e,interval:t,cycle:i}=n,o=i%t===0;return e===0&&o?r.bare():e<t&&o?r.offset():r.bounded()}function qn(n){if(n.length<2)return null;let r=n[1]-n[0];if(r<2)return null;for(let e=2;e<n.length;e+=1)if(n[e]-n[e-1]!==r)return null;return n[0]!==0&&n.length<5?null:{interval:r,last:n[n.length-1],start:n[0]}}function Qn(n){return n!=="*"&&!l(n,",")&&!l(n,"-")&&!l(n,"/")}function an(n){return l(n,"-")&&!l(n,",")&&!l(n,"/")}function Rr(n){return l(n,"/")&&!l(n,",")}function cn(n){return n!=="*"&&!l(n,"-")&&!l(n,"/")}function ln(n){return n!=="*"&&!an(n)&&!Rr(n)}function E(n){return n.indexOf("/")!==-1&&n.indexOf("-")===-1&&n.indexOf(",")===-1}function Q(n,r,e){let t=[],i=n;for(;i<=e;)t.push(i),i+=r;return t}function Vn(n,r,e,t){let i=n.split("/"),o=+i[1];if(l(i[0],"-")){let s=i[0].split("-");return Q(d(s[0],t),o,d(s[1],t))}let u=i[0]==="*"?r:d(i[0],t);return Q(u,o,e)}function mn(n,r,e){let t=[];return n.split(",").forEach(function(o){if(l(o,"/"))t.push(...Vn(o,r,e));else if(l(o,"-")){let u=o.split("-");+u[0]<=+u[1]?t.push(...Q(+u[0],1,+u[1])):(t.push(...Q(+u[0],1,e)),t.push(...Q(r,1,+u[1])))}else t.push(+o)}),Y(t)}function Ar(n){return cn(n)?n.split(",").map(Number):[0]}function Ur(n){if(n==="*")return[0,59];if(an(n)){let r=n.split("-");if(+r[0]<=+r[1])return[+r[0],+r[1]]}return null}function qr(n){return n==="*"?59:Math.max(...mn(n,0,59))}function Qr(n){if(Qn(n)&&n!=="0")return+n}function Vr(n,r){return n==="*"?"wildcard":r==="date"&&U(n)||r==="weekday"&&q(n,k.weekday)?"quartz":l(n,",")?"list":l(n,"/")?"step":l(n,"-")?"range":"single"}function Ir(n,r,e){return r==="wildcard"||r==="quartz"?null:n.split(",").map(function(i){if(l(i,"/")){let o=i.split("/");return{fires:Vn(i,e.min,e.top,e.numbers),interval:+o[1],kind:"step",startToken:o[0]}}return l(i,"-")?{bounds:i.split("-"),kind:"range"}:{kind:"single",value:i}})}function In(n){let r={},e={};M.forEach(function(u){r[u]=Vr(n[u],u),e[u]=Ir(n[u],r[u],k[u])});let i={analyses:{clockSecond:Qr(n.second),lastMinuteFire:qr(n.minute),minuteSpan:Ur(n.minute),segments:e},pattern:n,shapes:r};return{...i,plan:$r(i)}}function $r(n){let{analyses:r,pattern:e,shapes:t}=n;if(e.second!=="0"){let i=Jr(e,t,r);if(i)return i}return $n(e,t,r)||Jn(e,t,r)}function Jr(n,r,e){let t=Kr(n,r);return t||(n.hour==="*"&&r.minute==="single"&&n.second!=="*"?{kind:"secondsWithinMinute",singleSecond:r.second==="single"}:r.second==="single"&&cn(n.minute)&&ln(n.hour)?null:{kind:"composeSeconds",rest:$n(n,r,e,!0)||Jn(n,r,e,!0)})}function Kr(n,r){return n.minute!=="*"||n.hour!=="*"?null:n.second==="*"?{kind:"everySecond"}:r.second==="single"?{kind:"secondPastMinute"}:{kind:"standaloneSeconds"}}function $n(n,r,e,t=!1){if(r.minute==="step")return{hours:Gr(n,r,e),kind:"minuteFrequency"};if(r.hour==="single"&&e.minuteSpan)return{hour:+n.hour,kind:"minuteSpanInHour",span:e.minuteSpan};let i=Zr(n,r);if(i)return i;let o=Yr(n,r);if(o)return o;if(n.hour==="*")return Br(n,r,t)}function fn(n){let[r,e]=n.split("/"),t=r==="*"?0:+r;return r.indexOf("-")===-1&&24%+e===0&&t<+e}function Yr(n,r){return r.hour!=="step"?null:n.minute==="*"?fn(n.hour)?{form:"wildcard",kind:"minuteSpanAcrossHourStep"}:{form:"wildcard",kind:"minutesAcrossHours",times:V(n.hour)}:r.minute==="range"?{form:"range",kind:"minuteSpanAcrossHourStep"}:r.minute==="list"&&fn(n.hour)?{form:"list",kind:"minuteSpanAcrossHourStep"}:null}function Gr(n,r,e){if(r.hour==="list")return{kind:"during",times:V(n.hour)};if(r.hour==="range"){let t=n.hour.split("-");return{from:+t[0],kind:"window",last:e.lastMinuteFire,to:+t[1]}}return r.hour==="single"?{from:+n.hour,kind:"window",last:e.lastMinuteFire,to:+n.hour}:r.hour==="step"?fn(n.hour)?{kind:"step"}:{kind:"during",times:V(n.hour)}:{kind:"none"}}function Zr(n,r){return ln(n.hour)?n.minute==="*"?{form:"wildcard",kind:"minutesAcrossHours",times:V(n.hour)}:r.minute==="range"||r.minute==="list"&&l(n.minute,"-")&&!l(n.minute,"/")?{form:r.minute==="range"?"range":"list",kind:"minutesAcrossHours",times:V(n.hour)}:null:null}function Br(n,r,e){if(r.minute==="range")return{kind:"rangeOfMinutes"};if(r.minute==="list")return{kind:"multipleMinutes"};if(n.minute==="*")return{kind:"everyMinute"};if(n.minute!=="0"||e)return{kind:"singleMinute"}}function Jn(n,r,e,t=!1){let i=t&&n.minute==="0";return r.hour==="range"&&!i?Xr(n,r,e):r.hour==="step"&&n.minute==="0"&&!t?{kind:"hourStep"}:n.hour==="*"&&!i?{kind:"everyHour"}:_r(n,e,i)}function Xr(n,r,e){let t=n.hour.split("-"),i="lead";return n.minute==="*"?i="wildcard":r.minute==="range"&&(i="range"),{boundMinute:r.minute==="range"||r.minute==="list"?null:e.lastMinuteFire,from:+t[0],kind:"hourRange",last:e.lastMinuteFire,minuteForm:i,to:+t[1]}}function _r(n,r,e=!1){let t=mn(n.hour,0,23),i=Ar(n.minute);if(!e&&t.length*i.length>A)return{fold:i.length===1,kind:"compactClockTimes",minute:i[0]};let o=[];return t.forEach(function(s){i.forEach(function(S){o.push({hour:s,minute:S,second:r.clockSecond})})}),{kind:"clockTimes",times:o}}function V(n){let r=mn(n,0,23);return r.length<=A?{fires:r,kind:"fires"}:{kind:"segments"}}function Kn(n,r){let e=jn(n,r);return Ln(e),Tn(e),En(e)}function w(n){return n=""+n,n.length<2?"0"+n:n}function Yn(n,r,e){return e.short?n:r[n]||n}function dn(n,{sep:r,pad:e,lean:t}){let i=e?w(n.hour):""+n.hour;return t&&!n.minute&&!n.second?i:i+r+w(n.minute)+(n.second?r+w(n.second):"")}var gn={gb:{am:"am",closeUp:!0,dayFirst:!0,midday:"midday",midnight:"midnight",ordinals:!1,pm:"pm",sep:".",serialComma:!1,through:" to "},us:{am:"a.m.",closeUp:!1,dayFirst:!1,midday:"noon",midnight:"midnight",ordinals:!1,pm:"p.m.",sep:":",serialComma:!0,through:" through ",untilWindow:!0},house:{am:"AM",closeUp:!1,dayFirst:!1,midday:"noon",midnight:"midnight",ordinals:!0,pm:"PM",sep:":",serialComma:!0,through:" - "}};function Gn(n){return typeof n=="object"&&n!==null?{...gn.us,untilWindow:!1,...n}:gn[n==="uk"?"gb":n]||gn.us}var ne=["zero","one","two","three","four","five","six","seven","eight","nine","ten"],hn=["th","st","nd","rd"],re=[null,["January","Jan"],["February","Feb"],["March","Mar"],["April","Apr"],["May","May"],["June","Jun"],["July","Jul"],["August","Aug"],["September","Sep"],["October","Oct"],["November","Nov"],["December","Dec"]],P=[["Sunday","Sun"],["Monday","Mon"],["Tuesday","Tue"],["Wednesday","Wed"],["Thursday","Thu"],["Friday","Fri"],["Saturday","Sat"]],ee={SUN:P[0],MON:P[1],TUE:P[2],WED:P[3],THU:P[4],FRI:P[5],SAT:P[6]},te=[null,"first","second","third","fourth","fifth"];function ie(n){return n=n||{},{ampm:typeof n.ampm=="boolean"?n.ampm:!0,lenient:!!n.lenient,seconds:!!n.seconds,short:!!n.short,style:Gn(n.dialect),years:!!n.years}}function oe(n,r){let e=ce(n,r);if(e!==null)return Bn(e,n,r);let t=qe(n,r)??Xn(n,n.plan,r),i=K(n,r)?_e(n,r):"";return Bn(i+t,n,r)}function Xn(n,r,e){let t=Qe[r.kind];return t(n,r,e)}function pn(n){return n==="step"||n==="range"||n==="list"}function ue(n,r){if(!r.style.untilWindow||r.short||n.plan.kind!=="composeSeconds"||n.plan.rest.kind==="clockTimes"||K(n,r))return!1;let{shapes:e}=n;return pn(e.second)&&pn(e.minute)&&pn(e.hour)}function se(n,r){let e=On(n);if(e)return B(e,r);if(n.shapes.hour==="range"){let t=c(n,"hour").find(function(o){return o.kind==="range"});return R({continuous:!1,from:+t.bounds[0],throughMinute:0,to:+t.bounds[1]},r)}return"during the "+j(n,{minute:0,second:null},!1,r)+" hours"}function ae(n,r){return n.shapes.minute==="step"?X(O(n,"minute"),"minute","hour",r):n.shapes.minute==="range"?$(n.pattern.minute,r):H(c(n,"minute"),"minute","hour",r)??z(F(c(n,"minute"),r),"minute","hour",r)}function ce(n,r){if(!ue(n,r))return null;let e=se(n,r),t=ae(n,r),i=x(n,"minute",r),o=e+", "+t+", and within each of those minutes, "+i,u=a(n,r).trim();return u?u+", "+o:o}function le(n,r,e){return"every second"+a(n,e)}function fe(n,r,e){return D(n,e)+a(n,e)}function me(n,r,e){let t=n.pattern.second;return g(t,e)+" "+v(t,"second")+" past the minute, every minute"+a(n,e)}function de(n,r,e){let t=n.pattern.minute,i=g(t,e),o=v(t,"minute");if(r.singleSecond){let u=n.pattern.second;return i+" "+o+" and "+g(u,e)+" "+v(u,"second")+" past the hour, every hour"+a(n,e)}return D(n,e)+", "+i+" "+o+" past the hour, every hour"+a(n,e)}function ge(n,r,e){if(!(r.rest.kind==="clockTimes"||r.rest.kind==="compactClockTimes")||n.shapes.minute!=="single")return null;let i=+n.pattern.minute;return zn(n,i,e)??vn(n,i,e)}function he(n,r,e){return+r.times[0].minute==0&&n.shapes.minute==="single"?D(n,e)+" for one minute at "+ye(n,r,e):D(n,e)+" of "+be(n,r,e)}function pe(n,r,e){let t=ge(n,r,e);return t!==null?t:r.rest.kind==="clockTimes"&&(n.shapes.second==="wildcard"||n.shapes.second==="step")?he(n,r.rest,e):n.shapes.second==="wildcard"&&r.rest.kind==="minuteFrequency"&&r.rest.hours.kind==="none"&&n.pattern.minute==="*/2"?"every second of every other minute"+a(n,e):(r.rest.kind==="compactClockTimes"&&n.analyses.clockSecond?"":D(n,e)+", ")+Xn(n,r.rest,e)}function ye(n,r,e){let t=r.times.map(function(u){return f({hour:u.hour,minute:0},e)}),i=_(n,Cn,e);return p(t,e)+(i&&", "+i)}function be(n,r,e){let t=r.times.map(function(u){return f({hour:u.hour,minute:u.minute,second:u.second,explicit:!0},e)}),i=_(n,Cn,e);return p(t,e)+(i&&", "+i)}function D(n,r){return x(n,"minute",r)}function x(n,r,e){let t=n.pattern.second,i=n.shapes.second;if(t==="*")return"every second";if(i==="step")return X(O(n,"second"),"second",r,e);if(i==="range"){let o=t.split("-"),u=wn();return"every second from "+u(o[0])+h(e)+u(o[1])+" past the "+r}return i==="single"?"at "+g(t,e)+" "+v(t,"second")+" past the "+r:H(c(n,"second"),"second",r,e)??z(F(c(n,"second"),e),"second",r,e)}function Se(n,r,e){return"every minute"+a(n,e)}function ke(n,r,e){let t=n.pattern.minute;return g(t,e)+" "+v(t,"minute")+" past the hour, every hour"+a(n,e)}function Oe(n,r,e){return $(n.pattern.minute,e)+a(n,e)}function Ne(n,r,e){return(H(c(n,"minute"),"minute","hour",e)??z(F(c(n,"minute"),e),"minute","hour",e))+a(n,e)}function ze(n,r,e){let t=X(O(n,"minute"),"minute","hour",e);if(r.hours.kind==="during"){let i=J(n,e);t+=i?", "+i:" during the "+I(n,r.hours.times,!1,e)+" hours"}else r.hours.kind==="window"?t+=" "+R({continuous:!1,from:r.hours.from,throughMinute:r.hours.last,to:r.hours.to},e):r.hours.kind==="step"&&(t+=" "+kn(O(n,"hour"),e));return t+a(n,e)}function ve(n,r,e){return n.pattern.minute==="*"?"every minute of the "+f({hour:r.hour,minute:0},e)+" hour"+a(n,e):"every minute from "+f({hour:r.hour,minute:r.span[0]},e)+h(e)+f({hour:r.hour,minute:r.span[1]},e)+a(n,e)}function we(n,r,e){let t=J(n,e);if(r.form==="wildcard")return t!==null?"every minute, "+t+a(n,e):"every minute during the "+I(n,r.times,!1,e)+" hours"+a(n,e);if(r.form==="range"){let u=$(n.pattern.minute,e);return t!==null?u+", "+t+a(n,e):Ke(r.times)?u+", at "+I(n,r.times,!0,e)+a(n,e):u+" during the "+I(n,r.times,!1,e)+" hours"+a(n,e)}let i=H(c(n,"minute"),"minute","hour",e)??z(F(c(n,"minute"),e),"minute","hour",e);if(t!==null)return i+", "+t+a(n,e);let o=I(n,r.times,!0,e);return i+", at "+o+a(n,e)}var _n={2:"other",3:"third",4:"fourth",6:"sixth",8:"eighth",12:"twelfth"};function kn(n,r){let e="during every "+_n[n.interval]+" hour",t=n.startToken==="*"?0:+n.startToken;return t===0?e:e+" starting at "+f({hour:t,minute:0},r)}function Pe(n,r,e){let t=O(n,"hour");if(r.form==="wildcard")return"every minute "+kn(t,e)+a(n,e);let i=r.form==="list"?H(c(n,"minute"),"minute","hour",e)??z(F(c(n,"minute"),e),"minute","hour",e):$(n.pattern.minute,e),o=J(n,e);return i+", "+(o??or(t,e))+a(n,e)}function $(n,r){let e=n.split("-"),t=wn();return"every minute from "+t(e[0])+h(r)+t(e[1])+" past the hour"}function Ce(n,r,e){return"every hour"+a(n,e)}function xe(n,r,e){let t=Te(Me(r),e);return r.minuteForm==="wildcard"?"every minute "+t+a(n,e):r.minuteForm==="range"?$(n.pattern.minute,e)+", "+t+a(n,e):nr(n,e)+" "+t+a(n,e)}function nr(n,r){return n.pattern.minute==="0"?"every hour":H(c(n,"minute"),"minute","hour",r)??z(F(c(n,"minute"),r),"minute","hour",r)}function Fe(n,r,e){let t=J(n,e);return t!==null?t+a(n,e):or(O(n,"hour"),e)+a(n,e)}function Me(n){let r=n.minuteForm==="wildcard",e=r?n.boundMinute??0:0;return{from:n.from,closeMinute:e,to:n.to,continuous:r}}function R(n,r){let{from:e,to:t,throughMinute:i,continuous:o}=n,u="from "+f({hour:e,minute:0},r);return r.style.untilWindow&&!r.short&&e!==t?o?u+" until "+f({hour:(t+1)%24,minute:0},r):u+h(r)+f({hour:t,minute:0},r):u+h(r)+f({hour:t,minute:i},r)}function Te(n,r){return R({continuous:n.continuous,from:n.from,throughMinute:n.closeMinute,to:n.to},r)}function We(n,r,e){if(n.shapes.minute==="single"){let o=+n.pattern.minute,u=zn(n,o,e)??vn(n,o,e);if(u!==null)return u}let t=Pn(r.times),i=r.times.map(function(u){return f({hour:u.hour,minute:u.minute,second:u.second,plain:t},e)});return cr(n,e)+"at "+p(i,e)+rr(n,e)}function rr(n,r){return K(n,r)?fr(n,r):""}function He(n,r,e){if(r.fold){let u=zn(n,+r.minute,e)??vn(n,+r.minute,e);if(u!==null)return u;if(c(n,"hour").some(function(y){return y.kind==="range"})&&!n.analyses.clockSecond)return Le(n,r,e)+a(n,e);let m={minute:r.minute,second:n.analyses.clockSecond};return cr(n,e)+"at "+j(n,m,!0,e)+rr(n,e)}let t=H(c(n,"minute"),"minute","hour",e)??z(F(c(n,"minute"),e),"minute","hour",e),i=J(n,e),o=i?t+", "+i+a(n,e):t+", at "+j(n,{minute:0,second:null},!0,e)+a(n,e);return n.analyses.clockSecond?D(n,e)+", "+o:o}function Le(n,r,e){let t=r.minute,i=[],o=er(n).map(function(m){return f({hour:m,minute:t},e)});return c(n,"hour").forEach(function(m){m.kind==="range"&&i.push(R({continuous:!1,from:+m.bounds[0],throughMinute:t,to:+m.bounds[1]},e))}),nr(n,e)+" "+p(i,e)+tr(o,e)}function er(n){let r=[];return c(n,"hour").forEach(function(t){t.kind==="step"?r.push(...t.fires):t.kind!=="range"&&r.push(+t.value)}),r}function tr(n,r){return n.length?" and at "+p(n,r):""}function W(n){return n==="*"||n.startsWith("*/")&&n.indexOf("-")===-1}function Ee(n,r){let{second:e,minute:t}=n.pattern;return W(e)?{secondLead:!0,text:x(n,"minute",r)}:e==="0"&&W(t)?{secondLead:!1,text:t==="*"?"every minute":X(O(n,"minute"),"minute","hour",r)}:null}function De(n,r){let e=n.pattern.minute;if(e==="*")return"";if(W(e))return" of every other minute";let t=c(n,"minute");if(n.shapes.minute==="single")return" during minute :"+w(e);if(n.shapes.minute==="range"){let o=e.split("-");return" during minutes :"+w(o[0])+h(r)+":"+w(o[1])}let i=F(t,r).map(function(u){return":"+w(u)});return" during minutes "+p(i,r)}function je(n,r){let e=n.pattern.hour;if(e==="*")return n.pattern.minute!=="*"&&!W(n.pattern.minute)?" of every hour":"";if(W(e))return e==="*/2"?" of every other hour":"";if(n.shapes.hour==="single"){let t=+e;return n.shapes.minute==="step"?" from "+f({hour:t,minute:0},r)+" until "+f({hour:(t+1)%24,minute:0},r):n.pattern.minute!=="*"&&!W(n.pattern.minute)?" at "+f({hour:t,minute:0},r):" of the "+f({hour:t,minute:0},r)+" hour"}if(n.shapes.hour==="range"){let t=e.split("-");return" "+R({continuous:n.pattern.minute==="*",from:+t[0],throughMinute:0,to:+t[1]},r)}return" during the "+j(n,{minute:0,second:null},!1,r)+" hours"}function Re(n){if(n.shapes.hour!=="step")return!0;let r=O(n,"hour");return n.pattern.hour==="*/2"||r.startToken.indexOf("-")!==-1}function Ae(n){if(n.shapes.minute!=="list")return!1;let r=Z(c(n,"minute"));return r!==null&&on(r)!==null}function Ue(n,r){let{minute:e,hour:t}=n.pattern,i=W(e)&&e!=="*";return Re(n)?r.secondLead?i?e==="*/2"&&n.shapes.hour!=="range":!(Ae(n)||n.shapes.minute==="list"&&n.shapes.hour==="list"):t==="*/2"?!0:n.shapes.hour==="single"&&e==="*/2":!1}function qe(n,r){if(!r.style.untilWindow||r.short||n.pattern.minute==="*"&&n.pattern.hour==="*")return null;let e=Ee(n,r);if(!e||!Ue(n,e))return null;let t=e.secondLead?De(n,r):"";return e.text+t+je(n,r)+a(n,r)}var Qe={clockTimes:We,compactClockTimes:He,composeSeconds:pe,everyHour:Ce,everyMinute:Se,everySecond:le,hourRange:xe,hourStep:Fe,minuteFrequency:ze,minuteSpanAcrossHourStep:Pe,minuteSpanInHour:ve,minutesAcrossHours:we,multipleMinutes:Ne,rangeOfMinutes:Oe,secondPastMinute:me,secondsWithinMinute:de,singleMinute:ke,standaloneSeconds:fe};function ir(n,r){let{interval:e,start:t,last:i,cycle:o,unit:u,anchor:s}=n,m="every "+g(e,r)+" "+u+"s";return sn({start:t,interval:e,cycle:o},{bare:()=>m,offset:()=>m+" from "+g(t,r)+" "+v(t,u)+" past the "+s,bounded:()=>{let S=wn();return m+" from "+S(t)+h(r)+S(i)+" "+v(i,u)+" past the "+s}})}function H(n,r,e,t){let i=Z(n),o=i&&on(i);return o?ir({...o,cycle:60,unit:r,anchor:e},t):null}function X(n,r,e,t){if(n.startToken.indexOf("-")!==-1)return z(Zn(n.fires,t),r,e,t);let i=n.startToken==="*"?0:+n.startToken;return i!==0&&n.fires.length<=3?z(Zn(n.fires,t),r,e,t):ir({interval:n.interval,start:i,last:n.fires[n.fires.length-1],cycle:60,unit:r,anchor:e},t)}function or(n,r){if(n.startToken.indexOf("-")!==-1)return"at "+yn(n.fires,r);let e=n.startToken==="*"?0:+n.startToken,t=n.interval;return e===0?"every "+g(t,r)+" hours":n.fires.length<=3?"at "+yn(n.fires,r):"every "+g(t,r)+" hours from "+f({hour:e,minute:0},r)}function B(n,r){let{start:e,interval:t,last:i}=n,o="every "+g(t,r)+" hours";return sn({start:e,interval:t,cycle:24},{bare:()=>o,offset:()=>o+" from "+f({hour:e,minute:0},r),bounded:()=>o+" from "+f({hour:e,minute:0},r)+h(r)+f({hour:i,minute:0},r)})}function J(n,r){let e=On(n);return!e||un(e)?null:B(e,r)}function On(n){let r=c(n,"hour");if(r.length===1&&r[0].kind==="step"){let t=r[0];if(t.fires.length<2)return null;let i=t.startToken==="*"?0:+t.startToken.split("-")[0];return{interval:t.interval,last:t.fires[t.fires.length-1],start:i}}let e=Z(r);return e&&qn(e)}function Nn(n){return n.pattern.second==="*"||n.shapes.second==="step"}function ur(n,r,e){if(r===0)return Nn(n)?x(n,"minute",e)+" for one minute":x(n,"hour",e);let t=g(r,e)+" "+v(r,"minute")+" past the hour";return n.pattern.second==="0"?t:x(n,"minute",e)+", "+t}function zn(n,r,e){let t=On(n);if(!t)return null;let i=(t.last-t.start)/t.interval+1;if(n.pattern.second==="0"&&i<=A&&un(t))return null;let o=r===0&&Nn(n)&&Ve(n);return o?x(n,"minute",e)+" for one minute "+kn(o,e)+a(n,e):r===0&&n.pattern.second==="0"?B(t,e)+a(n,e):ur(n,r,e)+", "+B(t,e)+a(n,e)}function Ve(n){let r=c(n,"hour"),e=r.length===1&&r[0];return!e||e.kind!=="step"||e.startToken.indexOf("-")!==-1||!(e.interval in _n)?null:e}function Ie(n){return c(n,"hour").some(function(e){return e.kind==="range"})}function $e(n,r){let e=[],t=er(n);c(n,"hour").forEach(function(s){s.kind==="range"&&e.push(R({continuous:!1,from:+s.bounds[0],throughMinute:0,to:+s.bounds[1]},r))});let i="every hour "+p(e,r),o=t.map(function(s){return f({hour:s,minute:0},r)});return i+tr(o,r)}function vn(n,r,e){return r!==0||!Ie(n)||n.pattern.second==="0"?null:Nn(n)?x(n,"minute",e)+" for one minute during the "+j(n,{minute:0,second:null},!1,e)+" hours"+a(n,e):ur(n,r,e)+", "+$e(n,e)+a(n,e)}function wn(){return function(r){return""+r}}function sr(n,r){return n>1?function(t){return""+t}:function(t){return g(t,r)}}function Zn(n,r){return n.map(sr(n.length,r))}function F(n,r){let e=n.reduce(function(o,u){return u.kind==="range"?o+1:o+(u.kind==="step"?u.fires.length:1)},0),t=sr(e,r);return n.flatMap(function(o){return o.kind==="range"?[t(o.bounds[0])+h(r)+t(o.bounds[1])]:o.kind==="step"?o.fires.map(t):[t(o.value)]})}function z(n,r,e,t){return"at "+p(n,t)+" "+r+"s past the "+e}function Je(n,r,e){return(+n==0||+n==12)&&+r==0&&!(typeof e=="number"&&e>0)}function Pn(n){let r=n.filter(function(t){return Je(t.hour,t.minute,t.second)});return r.length>0&&r.length<n.length}function yn(n,r){let e=Pn(n.map(function(o){return{hour:o,minute:0}})),t=n.map(function(o){return f({hour:o,minute:0,plain:e},r)});return p(t,r)}function Ke(n){return n.kind==="fires"&&n.fires.length===1}function I(n,r,e,t){return r.kind==="fires"?yn(r.fires,t):j(n,{minute:0,second:null},e,t)}function Ye(n){return n.kind==="range"?n.bounds:n.kind==="step"?n.fires:[n.value]}function j(n,r,e,t){let{minute:i,second:o}=r,u=c(n,"hour"),s=Pn(u.flatMap(function(y){return Ye(y).map(function(en){return{hour:+en,minute:i,second:o}})})),m=[];return u.forEach(function(y){y.kind==="step"?m.push(...y.fires.map(function(en){return f({hour:en,minute:i,second:o,plain:s},t)})):y.kind==="range"?m.push(f({hour:y.bounds[0],minute:i,second:o,plain:s},t)+h(t)+f({hour:y.bounds[1],minute:i,second:o,plain:s},t)):m.push(f({hour:y.value,minute:i,second:o,plain:s},t))}),p(Ge(m,u,e),t)}function Ge(n,r,e){let t=r.some(function(o){return o.kind==="range"});return!e||!t?n:n.map(function(o,u){return u===0?o:"at "+o})}function ar(n,r,e){if(n.length<=1)return n.join("");if(n.length===2)return n[0]+r+n[1];let t=e.style.serialComma?","+r:r;return n.slice(0,-1).join(", ")+t+n[n.length-1]}function p(n,r){return ar(n," and ",r)}function Ze(n,r){return ar(n," or ",r)}var Be={all:"",month:"in ",recurringWeekday:!0,stepDate:"on ",weekday:"on "},Cn={all:"every day",month:"every day in ",recurringWeekday:!1,stepDate:"",weekday:"every "};function a(n,r){if(K(n,r))return fr(n,r);let e=_(n,Be,r);return e&&" "+e}function cr(n,r){return K(n,r)?"":_(n,Cn,r)+" "}function _(n,r,e){let t=n.pattern;if(t.date!=="*"&&t.weekday!=="*")return tt(n,e);if(t.date!=="*")return Xe(n,r,e);if(t.weekday!=="*"){let i=xn(t.weekday,e);return i?bn(i,n,e):r.weekday+pr(n,r.recurringWeekday,e)+dr(n,e)}return t.month!=="*"?r.month+N(n,e):r.all}function Xe(n,r,e){let t=n.pattern,i=nn(t.date,e);return i?bn(i,n,e):E(t.date)?bn(r.stepDate+gr(t.date),n,e):t.month!=="*"&&!lr(n)?"on the "+Sn(n,e)+dr(n,e):t.month!=="*"?"on "+mr(n,e):"on the "+Sn(n,e)}function lr(n){return!hr(n.pattern.month)&&c(n,"month").every(function(e){return e.kind!=="range"})}function K(n,r){return n.pattern.date!=="*"&&n.pattern.weekday!=="*"&&!!r.style.untilWindow&&!r.short}function fr(n,r){let e=[...nt(n,r),...rt(n,r)];return" whenever the day is "+Ze(e,r)}function _e(n,r){return n.pattern.month==="*"?"":"in "+N(n,r)+" "}function nt(n,r){let e=n.pattern.date,t=nn(e,r);if(t)return[t.replace(/^on /,"")];let i=et(e);if(i)return[i];let o=[];return c(n,"date").forEach(function(s){s.kind==="range"?o.push("from the "+b(s.bounds[0])+h(r)+"the "+b(s.bounds[1])):s.kind==="step"?s.fires.forEach(function(S){o.push("the "+b(S))}):o.push("the "+b(s.value))}),o}function rt(n,r){let e=n.pattern.weekday,t=xn(e,r);if(t)return[t.replace(/^on /,"")];let i=[];return c(n,"weekday").forEach(function(u){u.kind==="range"&&u.bounds[0]==="1"&&u.bounds[1]==="5"?i.push("a weekday"):u.kind==="range"?i.push("a "+C(u.bounds[0],r)+h(r)+"a "+C(u.bounds[1],r)):u.kind==="step"?u.fires.forEach(function(m){i.push("a "+C(m,r))}):i.push("a "+C(u.value,r))}),i}function et(n){if(!E(n))return null;let[r,e]=n.split("/");return+e!=2?null:r==="*"||r==="1"?"an odd-numbered day":r==="2"?"an even-numbered day":null}function tt(n,r){let e=n.pattern,t=xn(e.weekday,r)||"on "+pr(n,!1,r);return e.month!=="*"&&lr(n)&&!nn(e.date,r)&&!E(e.date)?"on "+mr(n,r)+" or "+t+" in "+N(n,r):it(n,r)+" or "+t+ot(n,r)}function it(n,r){let e=n.pattern,t=nn(e.date,r);return t||(E(e.date)?gr(e.date):"on the "+Sn(n,r))}function ot(n,r){return n.pattern.month==="*"?"":", in "+N(n,r)}function nn(n,r){if(n==="L")return"on the last day of the month";if(n==="LW"||n==="WL")return"on the last weekday of the month";let e=/^L-(\d{1,2})$/.exec(n);if(e)return g(+e[1],r)+" "+v(e[1],"day")+" before the last day of the month";let t=/^(\d{1,2})W$|^W(\d{1,2})$/.exec(n);if(t)return"on the weekday nearest the "+b(t[1]||t[2])}function xn(n,r){let e=n.split("#");if(e.length===2)return"on the "+te[+e[1]]+" "+C(e[0],r)+" of the month";if(/L$/.test(n))return"on the last "+C(n.slice(0,-1),r)+" of the month"}function mr(n,r){let e=N(n,r),t=rn(c(n,"date"),r.style.ordinals?b:ut,r);return r.style.dayFirst&&n.shapes.date==="single"&&n.shapes.month!=="single"?"the "+b(n.pattern.date)+" of "+e:r.style.dayFirst?t+" "+e:e+" "+t}function ut(n){return""+n}function dr(n,r){return n.pattern.month==="*"?"":" in "+N(n,r)}function bn(n,r,e){if(r.pattern.month==="*")return n;let t=n.indexOf(" of the month")!==-1;return t&&r.shapes.month==="range"?n.replace(" of the month"," of each month")+" from "+N(r,e):t&&(r.shapes.month==="single"||r.shapes.month==="step")?n.replace(" of the month","")+" in "+N(r,e):n+" in "+N(r,e)}function gr(n){let r=n.split("/"),e=+r[1],t=r[0],o=(e===2?"every other":"every "+b(e))+" day of the month";return t!=="*"&&t!=="1"&&(o+=" from the "+b(t)),o}function Sn(n,r){return rn(c(n,"date"),b,r)}function N(n,r){let e=hr(n.pattern.month);return e||rn(c(n,"month"),function(i){return ft(i,r)},r)}function hr(n){if(!E(n))return null;let[r,e]=n.split("/");return+e!=2?null:r==="*"||r==="1"?"every odd-numbered month":r==="2"?"every even-numbered month":null}function pr(n,r,e){let t=Un(c(n,"weekday")),i=t.some(function(s){return s.kind==="range"});return rn(t,r&&!i?function(s){return st(s,e)}:function(s){return C(s,e)},e)}function st(n,r){let e=C(n,r);return r.short?e:e+"s"}function rn(n,r,e){let t=[];return n.forEach(function(o){o.kind==="step"?t.push(...o.fires.map(r)):o.kind==="range"?t.push(o.bounds.map(r).join(h(e))):t.push(r(o.value))}),p(t,e)}function Bn(n,r,e){let t=r.pattern.year;if(t==="*")return n;if(t.indexOf("/")!==-1)return n+", "+ct(t,e);let i=at(t,e);if(t.indexOf("-")===-1&&t.indexOf(",")===-1&&r.pattern.date!=="*"&&n.indexOf(" at ")!==-1){let o=e.style.dayFirst?" ":", ";return n.replace(" at ",o+i+" at ")}return n+" in "+i}function at(n,r){return n.indexOf(",")!==-1?p(n.split(","),r):n.indexOf("-")!==-1?n.split("-").join(h(r)):n}function ct(n,r){let e=n.split("/"),t=+e[1],i=e[0];if(t<=1)return"every year";let o=t===2?"every other year":"every "+g(t,r)+" years";return i!=="*"&&i!=="0"&&(o+=" from "+i),o}function f(n,r){let{hour:e,minute:t,plain:i,explicit:o}=n,u=typeof n.second=="number"&&n.second>0?n.second:0;return r.ampm?lt({hour:e,minute:t,second:u,plain:i,explicit:o},r):dn({hour:e,minute:t,second:u},{pad:!0,sep:r.style.sep})}function lt(n,r){let{hour:e,minute:t,second:i,plain:o,explicit:u}=n,s=r.style;if(!o&&!u&&+t==0&&!i){if(+e==0)return s.midnight;if(+e==12)return s.midday}return dn({hour:e%12||12,minute:t,second:i},{lean:!u,sep:s.sep})+(s.closeUp?"":" ")+(e<12?s.am:s.pm)}function g(n,r){return Yn(n,ne,r)}function v(n,r){return+n==1?r:r+"s"}function h(n){return n.short?"-":n.style.through}function b(n){let r=Math.abs(n),e=hn[r];return e||(r=(r%100-20)%10,e=hn[r]||hn[0]),n+e}function ft(n,r){let e=re[+n];return e&&e[r.short?1:0]}function C(n,r){let e=n===7||n==="7"?0:n,t=P[e]||ee[e];return t&&t[r.short?1:0]}var mt={describe:oe,fallback:"an unrecognizable cron pattern",options:ie,reboot:"at system startup",sentence:n=>"Runs "+n+(n.endsWith(".")?"":".")},yr=mt;/**
2
2
  * @license MIT, Copyright (c) 2026 Andrew Brož
3
- */function ar(n,e){let t=e&&e.lang||he,r=t.options(e);if(!r.lenient)return ge(pe(n,t,r),t,e);try{return ge(pe(n,t,r),t,e)}catch{return t.fallback}}function ge(n,e,t){return t&&t.sentence?e.sentence(n):n}function pe(n,e,t){if(typeof n=="string"&&n.trim().toLowerCase()==="@reboot")return e.reboot;let r=Un(Vn(n,t)),i=e.plan?e.plan(r,r.plan):r.plan;return e.describe({...r,plan:i},t)}var wn=ar;typeof globalThis<"u"&&Object.assign(globalThis,{cronli5:wn});var Kr=wn;})();
3
+ */function dt(n,r){let e=r&&r.lang||yr,t=e.options(r);if(!t.lenient)return br(Sr(n,e,t),e,r);try{return br(Sr(n,e,t),e,r)}catch{return e.fallback}}function br(n,r,e){return e&&e.sentence?r.sentence(n):n}function Sr(n,r,e){if(typeof n=="string"&&n.trim().toLowerCase()==="@reboot")return r.reboot;let t=In(Kn(n,e)),i=r.plan?r.plan(t,t.plan):t.plan;return r.describe({...t,plan:i},e)}var Fn=dt;typeof globalThis<"u"&&Object.assign(globalThis,{cronli5:Fn});var ti=Fn;})();