@nylas/react 1.0.2-prealpha1 → 1.1.0-canary.4
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.
- package/dist/add-circle-icon_22.entry-077661c3.cjs +1 -0
- package/dist/add-circle-icon_22.entry-f699d91e.js +1733 -0
- package/dist/{archive-icon_7.entry-91aaa1aa.js → archive-icon_7.entry-40b7ef3b.js} +20 -20
- package/dist/{archive-icon_7.entry-84d70dbf.cjs → archive-icon_7.entry-e8630de9.cjs} +1 -1
- package/dist/arrow-icon.entry-58246303.js +15 -0
- package/dist/{arrow-icon.entry-400a08fa.cjs → arrow-icon.entry-ffa53114.cjs} +1 -1
- package/dist/{bold-icon_3.entry-9ad35153.cjs → bold-icon_3.entry-106a4e77.cjs} +1 -1
- package/dist/{bold-icon_3.entry-4b2798a8.js → bold-icon_3.entry-f5f1643d.js} +4 -4
- package/dist/{calendar-cancel-icon.entry-fcb66929.cjs → calendar-cancel-icon.entry-6ae0fd0f.cjs} +1 -1
- package/dist/{calendar-cancel-icon.entry-83ba884a.js → calendar-cancel-icon.entry-75b15b19.js} +4 -4
- package/dist/calendar-check-icon_2.entry-57339318.js +25 -0
- package/dist/calendar-check-icon_2.entry-c57f83f3.cjs +1 -0
- package/dist/{calendar-icon.entry-8f38af4a.js → calendar-icon.entry-2069fec6.js} +2 -2
- package/dist/{calendar-icon.entry-7bae38d7.cjs → calendar-icon.entry-492c2630.cjs} +1 -1
- package/dist/chevron-icon_3.entry-83df50c3.js +117 -0
- package/dist/chevron-icon_3.entry-878ff6df.cjs +1 -0
- package/dist/close-icon.entry-480c199d.js +15 -0
- package/dist/close-icon.entry-8015ca05.cjs +1 -0
- package/dist/{nylas-booked-event-card_10.entry-7e66a648.js → constants-6ee60d6d-4cd16450.js} +1656 -2374
- package/dist/{nylas-booked-event-card_10.entry-ed515326.cjs → constants-6ee60d6d-6c0540db.cjs} +6 -6
- package/dist/document-refresh-icon.entry-06f7972b.cjs +1 -0
- package/dist/document-refresh-icon.entry-09870b14.js +15 -0
- package/dist/elements/index.d.ts +31 -2
- package/dist/{forward-icon_6.entry-b60fcb35.js → forward-icon_6.entry-8bb201eb.js} +127 -127
- package/dist/{forward-icon_6.entry-3345af84.cjs → forward-icon_6.entry-eeecf2a2.cjs} +3 -3
- package/dist/{globe-icon.entry-8325e73e.cjs → globe-icon.entry-a690028c.cjs} +1 -1
- package/dist/{globe-icon.entry-e3fd373f.js → globe-icon.entry-d515cbfa.js} +4 -4
- package/dist/google-logo-icon_3.entry-2164cec1.js +258 -0
- package/dist/google-logo-icon_3.entry-b2b85284.cjs +1 -0
- package/dist/index-2b8437d6.cjs +30 -0
- package/dist/index-db0c5017.js +1824 -0
- package/dist/index.d.ts +3 -1
- package/dist/index.es-2578c6a5-098d48d0.cjs +7 -0
- package/dist/{index-b30d446a-a90f84b2.js → index.es-2578c6a5-71441142.js} +833 -933
- package/dist/info-icon_2.entry-300ef196.js +34 -0
- package/dist/info-icon_2.entry-e286aaa5.cjs +1 -0
- package/dist/{loading-icon.entry-27410cf8.js → loading-icon.entry-6d8adaa4.js} +4 -4
- package/dist/{loading-icon.entry-b2096d2b.cjs → loading-icon.entry-dc40e97d.cjs} +1 -1
- package/dist/{mailbox-store-19f0c6c9-e3e8b4e5.js → mailbox-store-bb21512c-649a374c.js} +17 -16
- package/dist/mailbox-store-bb21512c-fc3c8c03.cjs +1 -0
- package/dist/nylas-additional-participants.entry-4afba192.js +83 -0
- package/dist/nylas-additional-participants.entry-db05e510.cjs +1 -0
- package/dist/nylas-booked-event-card_10.entry-1ebbe0c0.js +784 -0
- package/dist/nylas-booked-event-card_10.entry-6b6fdfae.cjs +1 -0
- package/dist/nylas-form-card.entry-70b20571.cjs +1 -0
- package/dist/nylas-form-card.entry-7bc23695.js +56 -0
- package/dist/nylas-if-state.entry-3829cb3d.js +96 -0
- package/dist/nylas-if-state.entry-ebeffe22.cjs +1 -0
- package/dist/nylas-list-folders.entry-191688f2.cjs +1 -0
- package/dist/{nylas-list-folders.entry-a5437201.js → nylas-list-folders.entry-7347e78d.js} +9 -8
- package/dist/{nylas-list-threads.entry-fd6cda61.js → nylas-list-threads.entry-432a8d8c.js} +5 -4
- package/dist/nylas-list-threads.entry-44658578.cjs +1 -0
- package/dist/nylas-login.entry-5311f0a7.js +75 -0
- package/dist/nylas-login.entry-db17a3d2.cjs +1 -0
- package/dist/{nylas-mailbox-pagination.entry-988214bc.js → nylas-mailbox-pagination.entry-20150fb2.js} +4 -3
- package/dist/nylas-mailbox-pagination.entry-9d3f5baa.cjs +1 -0
- package/dist/nylas-mailbox-toolbar-button.entry-6c0f7299.cjs +1 -0
- package/dist/{nylas-mailbox-toolbar-button.entry-c720e22a.js → nylas-mailbox-toolbar-button.entry-eec426d5.js} +11 -10
- package/dist/nylas-mailbox.entry-b6c758b9.js +136 -0
- package/dist/nylas-mailbox.entry-d41401e0.cjs +1 -0
- package/dist/{nylas-provider.entry-70721009.js → nylas-provider.entry-271cafd2.js} +46 -33
- package/dist/nylas-provider.entry-6173b721.cjs +1 -0
- package/dist/nylas-scheduler-editor.entry-0c75d39e.cjs +7 -0
- package/dist/nylas-scheduler-editor.entry-b51ad4b1.js +2192 -0
- package/dist/nylas-scheduling.entry-081c8825.cjs +1 -0
- package/dist/nylas-scheduling.entry-0a8d1da8.js +237 -0
- package/dist/{nylas-threads-refresh.entry-b7f9e93f.js → nylas-threads-refresh.entry-72dd854e.js} +6 -5
- package/dist/nylas-threads-refresh.entry-c3509e6a.cjs +1 -0
- package/dist/nylas-threads-search.entry-16a59ef6.cjs +1 -0
- package/dist/{nylas-threads-search.entry-95afea9c.js → nylas-threads-search.entry-4750a187.js} +15 -14
- package/dist/nylas-view-thread.entry-27df3349.cjs +1 -0
- package/dist/{nylas-view-thread.entry-165173b1.js → nylas-view-thread.entry-c6adce43.js} +5 -4
- package/dist/people-icon.entry-342be0c8.js +15 -0
- package/dist/people-icon.entry-35252ca9.cjs +1 -0
- package/dist/play-icon_2.entry-0787352c.js +25 -0
- package/dist/play-icon_2.entry-f83fa92a.cjs +1 -0
- package/dist/react.cjs +1 -1
- package/dist/react.js +92 -61
- package/dist/{refresh-icon.entry-e48a338f.js → refresh-icon.entry-8fbabfe7.js} +2 -2
- package/dist/{refresh-icon.entry-601cac89.cjs → refresh-icon.entry-ddbc5446.cjs} +1 -1
- package/dist/{register-component-152c6ad2-a06f58c2.js → register-component-dc659dc3-e43e8fae.js} +2 -2
- package/dist/{register-component-152c6ad2-0df7215b.cjs → register-component-dc659dc3-fb85ee68.cjs} +1 -1
- package/dist/scheduler-config-store-51ee4f42-66f8c2ac.js +14 -0
- package/dist/scheduler-config-store-51ee4f42-d7d9c25d.cjs +1 -0
- package/dist/scheduler-store-72116723-ce4c7a69.cjs +1 -0
- package/dist/{scheduler-store-7d48e682-0c0c3991.js → scheduler-store-72116723-e5f87122.js} +100 -95
- package/dist/time-period-selector.entry-333942a8.js +78 -0
- package/dist/time-period-selector.entry-78d5b3c2.cjs +1 -0
- package/dist/translate-icon.entry-87a62108.js +15 -0
- package/dist/translate-icon.entry-cb19864c.cjs +1 -0
- package/dist/utils-c00bdc3c-89ab163d.js +2111 -0
- package/dist/utils-c00bdc3c-94b9c3b6.cjs +8 -0
- package/dist/warning-icon.entry-50755d91.cjs +1 -0
- package/dist/warning-icon.entry-7a72e24a.js +15 -0
- package/package.json +7 -4
- package/dist/add-circle-icon.entry-2ccb238b.cjs +0 -1
- package/dist/add-circle-icon.entry-35d6aa07.js +0 -15
- package/dist/arrow-icon.entry-8b2e96a6.js +0 -15
- package/dist/calendar-check-icon_3.entry-903e2d82.js +0 -35
- package/dist/calendar-check-icon_3.entry-a16ce05e.cjs +0 -1
- package/dist/chevron-icon.entry-58366662.cjs +0 -1
- package/dist/chevron-icon.entry-5e11cef5.js +0 -15
- package/dist/close-icon_2.entry-011d9cf4.js +0 -25
- package/dist/close-icon_2.entry-83088b9a.cjs +0 -1
- package/dist/document-refresh-icon.entry-071ffd66.cjs +0 -1
- package/dist/document-refresh-icon.entry-9083a2e9.js +0 -15
- package/dist/duration-bddc4a13-05d3e3e2.cjs +0 -1
- package/dist/duration-bddc4a13-179ce826.js +0 -41
- package/dist/index-3b6f5cd5.cjs +0 -30
- package/dist/index-630f4e87.js +0 -1498
- package/dist/index-b30d446a-cbbef925.cjs +0 -7
- package/dist/mailbox-store-19f0c6c9-a0cbfa97.cjs +0 -1
- package/dist/nylas-if-state_3.entry-504be976.cjs +0 -1
- package/dist/nylas-if-state_3.entry-e96d01f1.js +0 -291
- package/dist/nylas-list-folders.entry-866361cc.cjs +0 -1
- package/dist/nylas-list-threads.entry-04989295.cjs +0 -1
- package/dist/nylas-mailbox-pagination.entry-e0bd4aef.cjs +0 -1
- package/dist/nylas-mailbox-toolbar-button.entry-3d772b26.cjs +0 -1
- package/dist/nylas-open-hours-picker.entry-6bdc7c73.js +0 -186
- package/dist/nylas-open-hours-picker.entry-881b6db7.cjs +0 -1
- package/dist/nylas-provider.entry-8d9a844b.cjs +0 -1
- package/dist/nylas-scheduler.entry-7321e18f.js +0 -230
- package/dist/nylas-scheduler.entry-e82977fb.cjs +0 -1
- package/dist/nylas-threads-refresh.entry-477e68e4.cjs +0 -1
- package/dist/nylas-threads-search.entry-c5854641.cjs +0 -1
- package/dist/nylas-view-thread.entry-8b72cbdb.cjs +0 -1
- package/dist/play-icon_2.entry-ed5877e3.js +0 -25
- package/dist/play-icon_2.entry-f23ed6c1.cjs +0 -1
- package/dist/scheduler-store-7d48e682-674705ef.cjs +0 -1
- package/dist/search-icon_3.entry-292138c3.js +0 -101
- package/dist/search-icon_3.entry-8e555357.cjs +0 -1
- package/dist/utils-5074a070-ce33ee6b.js +0 -119
- package/dist/utils-5074a070-d5ba6add.cjs +0 -2
|
@@ -0,0 +1,2111 @@
|
|
|
1
|
+
import { c as ve } from "./_commonjsHelpers-57e89916-af061c86.js";
|
|
2
|
+
var oe = { exports: {} };
|
|
3
|
+
(function(e, t) {
|
|
4
|
+
(function(r, n) {
|
|
5
|
+
e.exports = n();
|
|
6
|
+
})(ve, function() {
|
|
7
|
+
var r = 1e3, n = 6e4, i = 36e5, a = "millisecond", s = "second", o = "minute", u = "hour", f = "day", l = "week", m = "month", h = "quarter", d = "year", w = "date", M = "Invalid Date", S = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, U = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, j = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(g) {
|
|
8
|
+
var v = ["th", "st", "nd", "rd"], y = g % 100;
|
|
9
|
+
return "[" + g + (v[(y - 20) % 10] || v[y] || v[0]) + "]";
|
|
10
|
+
} }, B = function(g, v, y) {
|
|
11
|
+
var k = String(g);
|
|
12
|
+
return !k || k.length >= v ? g : "" + Array(v + 1 - k.length).join(y) + g;
|
|
13
|
+
}, ot = { s: B, z: function(g) {
|
|
14
|
+
var v = -g.utcOffset(), y = Math.abs(v), k = Math.floor(y / 60), p = y % 60;
|
|
15
|
+
return (v <= 0 ? "+" : "-") + B(k, 2, "0") + ":" + B(p, 2, "0");
|
|
16
|
+
}, m: function g(v, y) {
|
|
17
|
+
if (v.date() < y.date())
|
|
18
|
+
return -g(y, v);
|
|
19
|
+
var k = 12 * (y.year() - v.year()) + (y.month() - v.month()), p = v.clone().add(k, m), E = y - p < 0, T = v.clone().add(k + (E ? -1 : 1), m);
|
|
20
|
+
return +(-(k + (y - p) / (E ? p - T : T - p)) || 0);
|
|
21
|
+
}, a: function(g) {
|
|
22
|
+
return g < 0 ? Math.ceil(g) || 0 : Math.floor(g);
|
|
23
|
+
}, p: function(g) {
|
|
24
|
+
return { M: m, y: d, w: l, d: f, D: w, h: u, m: o, s, ms: a, Q: h }[g] || String(g || "").toLowerCase().replace(/s$/, "");
|
|
25
|
+
}, u: function(g) {
|
|
26
|
+
return g === void 0;
|
|
27
|
+
} }, Q = "en", H = {};
|
|
28
|
+
H[Q] = j;
|
|
29
|
+
var dt = function(g) {
|
|
30
|
+
return g instanceof gt;
|
|
31
|
+
}, wt = function g(v, y, k) {
|
|
32
|
+
var p;
|
|
33
|
+
if (!v)
|
|
34
|
+
return Q;
|
|
35
|
+
if (typeof v == "string") {
|
|
36
|
+
var E = v.toLowerCase();
|
|
37
|
+
H[E] && (p = E), y && (H[E] = y, p = E);
|
|
38
|
+
var T = v.split("-");
|
|
39
|
+
if (!p && T.length > 1)
|
|
40
|
+
return g(T[0]);
|
|
41
|
+
} else {
|
|
42
|
+
var O = v.name;
|
|
43
|
+
H[O] = v, p = O;
|
|
44
|
+
}
|
|
45
|
+
return !k && p && (Q = p), p || !k && Q;
|
|
46
|
+
}, N = function(g, v) {
|
|
47
|
+
if (dt(g))
|
|
48
|
+
return g.clone();
|
|
49
|
+
var y = typeof v == "object" ? v : {};
|
|
50
|
+
return y.date = g, y.args = arguments, new gt(y);
|
|
51
|
+
}, Y = ot;
|
|
52
|
+
Y.l = wt, Y.i = dt, Y.w = function(g, v) {
|
|
53
|
+
return N(g, { locale: v.$L, utc: v.$u, x: v.$x, $offset: v.$offset });
|
|
54
|
+
};
|
|
55
|
+
var gt = function() {
|
|
56
|
+
function g(y) {
|
|
57
|
+
this.$L = wt(y.locale, null, !0), this.parse(y);
|
|
58
|
+
}
|
|
59
|
+
var v = g.prototype;
|
|
60
|
+
return v.parse = function(y) {
|
|
61
|
+
this.$d = function(k) {
|
|
62
|
+
var p = k.date, E = k.utc;
|
|
63
|
+
if (p === null)
|
|
64
|
+
return /* @__PURE__ */ new Date(NaN);
|
|
65
|
+
if (Y.u(p))
|
|
66
|
+
return /* @__PURE__ */ new Date();
|
|
67
|
+
if (p instanceof Date)
|
|
68
|
+
return new Date(p);
|
|
69
|
+
if (typeof p == "string" && !/Z$/i.test(p)) {
|
|
70
|
+
var T = p.match(S);
|
|
71
|
+
if (T) {
|
|
72
|
+
var O = T[2] - 1 || 0, I = (T[7] || "0").substring(0, 3);
|
|
73
|
+
return E ? new Date(Date.UTC(T[1], O, T[3] || 1, T[4] || 0, T[5] || 0, T[6] || 0, I)) : new Date(T[1], O, T[3] || 1, T[4] || 0, T[5] || 0, T[6] || 0, I);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
return new Date(p);
|
|
77
|
+
}(y), this.$x = y.x || {}, this.init();
|
|
78
|
+
}, v.init = function() {
|
|
79
|
+
var y = this.$d;
|
|
80
|
+
this.$y = y.getFullYear(), this.$M = y.getMonth(), this.$D = y.getDate(), this.$W = y.getDay(), this.$H = y.getHours(), this.$m = y.getMinutes(), this.$s = y.getSeconds(), this.$ms = y.getMilliseconds();
|
|
81
|
+
}, v.$utils = function() {
|
|
82
|
+
return Y;
|
|
83
|
+
}, v.isValid = function() {
|
|
84
|
+
return this.$d.toString() !== M;
|
|
85
|
+
}, v.isSame = function(y, k) {
|
|
86
|
+
var p = N(y);
|
|
87
|
+
return this.startOf(k) <= p && p <= this.endOf(k);
|
|
88
|
+
}, v.isAfter = function(y, k) {
|
|
89
|
+
return N(y) < this.startOf(k);
|
|
90
|
+
}, v.isBefore = function(y, k) {
|
|
91
|
+
return this.endOf(k) < N(y);
|
|
92
|
+
}, v.$g = function(y, k, p) {
|
|
93
|
+
return Y.u(y) ? this[k] : this.set(p, y);
|
|
94
|
+
}, v.unix = function() {
|
|
95
|
+
return Math.floor(this.valueOf() / 1e3);
|
|
96
|
+
}, v.valueOf = function() {
|
|
97
|
+
return this.$d.getTime();
|
|
98
|
+
}, v.startOf = function(y, k) {
|
|
99
|
+
var p = this, E = !!Y.u(k) || k, T = Y.p(y), O = function(ut, F) {
|
|
100
|
+
var nt = Y.w(p.$u ? Date.UTC(p.$y, F, ut) : new Date(p.$y, F, ut), p);
|
|
101
|
+
return E ? nt : nt.endOf(f);
|
|
102
|
+
}, I = function(ut, F) {
|
|
103
|
+
return Y.w(p.toDate()[ut].apply(p.toDate("s"), (E ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(F)), p);
|
|
104
|
+
}, _ = this.$W, C = this.$M, rt = this.$D, V = "set" + (this.$u ? "UTC" : "");
|
|
105
|
+
switch (T) {
|
|
106
|
+
case d:
|
|
107
|
+
return E ? O(1, 0) : O(31, 11);
|
|
108
|
+
case m:
|
|
109
|
+
return E ? O(1, C) : O(0, C + 1);
|
|
110
|
+
case l:
|
|
111
|
+
var yt = this.$locale().weekStart || 0, mt = (_ < yt ? _ + 7 : _) - yt;
|
|
112
|
+
return O(E ? rt - mt : rt + (6 - mt), C);
|
|
113
|
+
case f:
|
|
114
|
+
case w:
|
|
115
|
+
return I(V + "Hours", 0);
|
|
116
|
+
case u:
|
|
117
|
+
return I(V + "Minutes", 1);
|
|
118
|
+
case o:
|
|
119
|
+
return I(V + "Seconds", 2);
|
|
120
|
+
case s:
|
|
121
|
+
return I(V + "Milliseconds", 3);
|
|
122
|
+
default:
|
|
123
|
+
return this.clone();
|
|
124
|
+
}
|
|
125
|
+
}, v.endOf = function(y) {
|
|
126
|
+
return this.startOf(y, !1);
|
|
127
|
+
}, v.$set = function(y, k) {
|
|
128
|
+
var p, E = Y.p(y), T = "set" + (this.$u ? "UTC" : ""), O = (p = {}, p[f] = T + "Date", p[w] = T + "Date", p[m] = T + "Month", p[d] = T + "FullYear", p[u] = T + "Hours", p[o] = T + "Minutes", p[s] = T + "Seconds", p[a] = T + "Milliseconds", p)[E], I = E === f ? this.$D + (k - this.$W) : k;
|
|
129
|
+
if (E === m || E === d) {
|
|
130
|
+
var _ = this.clone().set(w, 1);
|
|
131
|
+
_.$d[O](I), _.init(), this.$d = _.set(w, Math.min(this.$D, _.daysInMonth())).$d;
|
|
132
|
+
} else
|
|
133
|
+
O && this.$d[O](I);
|
|
134
|
+
return this.init(), this;
|
|
135
|
+
}, v.set = function(y, k) {
|
|
136
|
+
return this.clone().$set(y, k);
|
|
137
|
+
}, v.get = function(y) {
|
|
138
|
+
return this[Y.p(y)]();
|
|
139
|
+
}, v.add = function(y, k) {
|
|
140
|
+
var p, E = this;
|
|
141
|
+
y = Number(y);
|
|
142
|
+
var T = Y.p(k), O = function(C) {
|
|
143
|
+
var rt = N(E);
|
|
144
|
+
return Y.w(rt.date(rt.date() + Math.round(C * y)), E);
|
|
145
|
+
};
|
|
146
|
+
if (T === m)
|
|
147
|
+
return this.set(m, this.$M + y);
|
|
148
|
+
if (T === d)
|
|
149
|
+
return this.set(d, this.$y + y);
|
|
150
|
+
if (T === f)
|
|
151
|
+
return O(1);
|
|
152
|
+
if (T === l)
|
|
153
|
+
return O(7);
|
|
154
|
+
var I = (p = {}, p[o] = n, p[u] = i, p[s] = r, p)[T] || 1, _ = this.$d.getTime() + y * I;
|
|
155
|
+
return Y.w(_, this);
|
|
156
|
+
}, v.subtract = function(y, k) {
|
|
157
|
+
return this.add(-1 * y, k);
|
|
158
|
+
}, v.format = function(y) {
|
|
159
|
+
var k = this, p = this.$locale();
|
|
160
|
+
if (!this.isValid())
|
|
161
|
+
return p.invalidDate || M;
|
|
162
|
+
var E = y || "YYYY-MM-DDTHH:mm:ssZ", T = Y.z(this), O = this.$H, I = this.$m, _ = this.$M, C = p.weekdays, rt = p.months, V = function(F, nt, Dt, kt) {
|
|
163
|
+
return F && (F[nt] || F(k, E)) || Dt[nt].slice(0, kt);
|
|
164
|
+
}, yt = function(F) {
|
|
165
|
+
return Y.s(O % 12 || 12, F, "0");
|
|
166
|
+
}, mt = p.meridiem || function(F, nt, Dt) {
|
|
167
|
+
var kt = F < 12 ? "AM" : "PM";
|
|
168
|
+
return Dt ? kt.toLowerCase() : kt;
|
|
169
|
+
}, ut = { YY: String(this.$y).slice(-2), YYYY: this.$y, M: _ + 1, MM: Y.s(_ + 1, 2, "0"), MMM: V(p.monthsShort, _, rt, 3), MMMM: V(rt, _), D: this.$D, DD: Y.s(this.$D, 2, "0"), d: String(this.$W), dd: V(p.weekdaysMin, this.$W, C, 2), ddd: V(p.weekdaysShort, this.$W, C, 3), dddd: C[this.$W], H: String(O), HH: Y.s(O, 2, "0"), h: yt(1), hh: yt(2), a: mt(O, I, !0), A: mt(O, I, !1), m: String(I), mm: Y.s(I, 2, "0"), s: String(this.$s), ss: Y.s(this.$s, 2, "0"), SSS: Y.s(this.$ms, 3, "0"), Z: T };
|
|
170
|
+
return E.replace(U, function(F, nt) {
|
|
171
|
+
return nt || ut[F] || T.replace(":", "");
|
|
172
|
+
});
|
|
173
|
+
}, v.utcOffset = function() {
|
|
174
|
+
return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
|
|
175
|
+
}, v.diff = function(y, k, p) {
|
|
176
|
+
var E, T = Y.p(k), O = N(y), I = (O.utcOffset() - this.utcOffset()) * n, _ = this - O, C = Y.m(this, O);
|
|
177
|
+
return C = (E = {}, E[d] = C / 12, E[m] = C, E[h] = C / 3, E[l] = (_ - I) / 6048e5, E[f] = (_ - I) / 864e5, E[u] = _ / i, E[o] = _ / n, E[s] = _ / r, E)[T] || _, p ? C : Y.a(C);
|
|
178
|
+
}, v.daysInMonth = function() {
|
|
179
|
+
return this.endOf(m).$D;
|
|
180
|
+
}, v.$locale = function() {
|
|
181
|
+
return H[this.$L];
|
|
182
|
+
}, v.locale = function(y, k) {
|
|
183
|
+
if (!y)
|
|
184
|
+
return this.$L;
|
|
185
|
+
var p = this.clone(), E = wt(y, k, !0);
|
|
186
|
+
return E && (p.$L = E), p;
|
|
187
|
+
}, v.clone = function() {
|
|
188
|
+
return Y.w(this.$d, this);
|
|
189
|
+
}, v.toDate = function() {
|
|
190
|
+
return new Date(this.valueOf());
|
|
191
|
+
}, v.toJSON = function() {
|
|
192
|
+
return this.isValid() ? this.toISOString() : null;
|
|
193
|
+
}, v.toISOString = function() {
|
|
194
|
+
return this.$d.toISOString();
|
|
195
|
+
}, v.toString = function() {
|
|
196
|
+
return this.$d.toUTCString();
|
|
197
|
+
}, g;
|
|
198
|
+
}(), Ht = gt.prototype;
|
|
199
|
+
return N.prototype = Ht, [["$ms", a], ["$s", s], ["$m", o], ["$H", u], ["$W", f], ["$M", m], ["$y", d], ["$D", w]].forEach(function(g) {
|
|
200
|
+
Ht[g[1]] = function(v) {
|
|
201
|
+
return this.$g(v, g[0], g[1]);
|
|
202
|
+
};
|
|
203
|
+
}), N.extend = function(g, v) {
|
|
204
|
+
return g.$i || (g(v, gt, N), g.$i = !0), N;
|
|
205
|
+
}, N.locale = wt, N.isDayjs = dt, N.unix = function(g) {
|
|
206
|
+
return N(1e3 * g);
|
|
207
|
+
}, N.en = H[Q], N.Ls = H, N.p = {}, N;
|
|
208
|
+
});
|
|
209
|
+
})(oe);
|
|
210
|
+
const se = oe.exports;
|
|
211
|
+
var Yt = [
|
|
212
|
+
"MO",
|
|
213
|
+
"TU",
|
|
214
|
+
"WE",
|
|
215
|
+
"TH",
|
|
216
|
+
"FR",
|
|
217
|
+
"SA",
|
|
218
|
+
"SU"
|
|
219
|
+
], P = (
|
|
220
|
+
/** @class */
|
|
221
|
+
function() {
|
|
222
|
+
function e(t, r) {
|
|
223
|
+
if (r === 0)
|
|
224
|
+
throw new Error("Can't create weekday with n == 0");
|
|
225
|
+
this.weekday = t, this.n = r;
|
|
226
|
+
}
|
|
227
|
+
return e.fromStr = function(t) {
|
|
228
|
+
return new e(Yt.indexOf(t));
|
|
229
|
+
}, e.prototype.nth = function(t) {
|
|
230
|
+
return this.n === t ? this : new e(this.weekday, t);
|
|
231
|
+
}, e.prototype.equals = function(t) {
|
|
232
|
+
return this.weekday === t.weekday && this.n === t.n;
|
|
233
|
+
}, e.prototype.toString = function() {
|
|
234
|
+
var t = Yt[this.weekday];
|
|
235
|
+
return this.n && (t = (this.n > 0 ? "+" : "") + String(this.n) + t), t;
|
|
236
|
+
}, e.prototype.getJsWeekday = function() {
|
|
237
|
+
return this.weekday === 6 ? 0 : this.weekday + 1;
|
|
238
|
+
}, e;
|
|
239
|
+
}()
|
|
240
|
+
), A = function(e) {
|
|
241
|
+
return e != null;
|
|
242
|
+
}, G = function(e) {
|
|
243
|
+
return typeof e == "number";
|
|
244
|
+
}, Pt = function(e) {
|
|
245
|
+
return typeof e == "string" && Yt.includes(e);
|
|
246
|
+
}, z = Array.isArray, X = function(e, t) {
|
|
247
|
+
t === void 0 && (t = e), arguments.length === 1 && (t = e, e = 0);
|
|
248
|
+
for (var r = [], n = e; n < t; n++)
|
|
249
|
+
r.push(n);
|
|
250
|
+
return r;
|
|
251
|
+
}, D = function(e, t) {
|
|
252
|
+
var r = 0, n = [];
|
|
253
|
+
if (z(e))
|
|
254
|
+
for (; r < t; r++)
|
|
255
|
+
n[r] = [].concat(e);
|
|
256
|
+
else
|
|
257
|
+
for (; r < t; r++)
|
|
258
|
+
n[r] = e;
|
|
259
|
+
return n;
|
|
260
|
+
}, be = function(e) {
|
|
261
|
+
return z(e) ? e : [e];
|
|
262
|
+
};
|
|
263
|
+
function ft(e, t, r) {
|
|
264
|
+
r === void 0 && (r = " ");
|
|
265
|
+
var n = String(e);
|
|
266
|
+
return t = t >> 0, n.length > t ? String(n) : (t = t - n.length, t > r.length && (r += D(r, t / r.length)), r.slice(0, t) + String(n));
|
|
267
|
+
}
|
|
268
|
+
var we = function(e, t, r) {
|
|
269
|
+
var n = e.split(t);
|
|
270
|
+
return r ? n.slice(0, r).concat([n.slice(r).join(t)]) : n;
|
|
271
|
+
}, q = function(e, t) {
|
|
272
|
+
var r = e % t;
|
|
273
|
+
return r * t < 0 ? r + t : r;
|
|
274
|
+
}, xt = function(e, t) {
|
|
275
|
+
return { div: Math.floor(e / t), mod: q(e, t) };
|
|
276
|
+
}, J = function(e) {
|
|
277
|
+
return !A(e) || e.length === 0;
|
|
278
|
+
}, $ = function(e) {
|
|
279
|
+
return !J(e);
|
|
280
|
+
}, L = function(e, t) {
|
|
281
|
+
return $(e) && e.indexOf(t) !== -1;
|
|
282
|
+
}, st = function(e, t, r, n, i, a) {
|
|
283
|
+
return n === void 0 && (n = 0), i === void 0 && (i = 0), a === void 0 && (a = 0), new Date(Date.UTC(e, t - 1, r, n, i, a));
|
|
284
|
+
}, ge = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], ue = 1e3 * 60 * 60 * 24, fe = 9999, he = st(1970, 1, 1), ke = [6, 0, 1, 2, 3, 4, 5], vt = function(e) {
|
|
285
|
+
return e % 4 === 0 && e % 100 !== 0 || e % 400 === 0;
|
|
286
|
+
}, ce = function(e) {
|
|
287
|
+
return e instanceof Date;
|
|
288
|
+
}, pt = function(e) {
|
|
289
|
+
return ce(e) && !isNaN(e.getTime());
|
|
290
|
+
}, Ft = function(e) {
|
|
291
|
+
return e.getTimezoneOffset() * 60 * 1e3;
|
|
292
|
+
}, Te = function(e, t) {
|
|
293
|
+
var r = e.getTime() - Ft(e), n = t.getTime() - Ft(t), i = r - n;
|
|
294
|
+
return Math.round(i / ue);
|
|
295
|
+
}, Lt = function(e) {
|
|
296
|
+
return Te(e, he);
|
|
297
|
+
}, le = function(e) {
|
|
298
|
+
return new Date(he.getTime() + e * ue);
|
|
299
|
+
}, Ee = function(e) {
|
|
300
|
+
var t = e.getUTCMonth();
|
|
301
|
+
return t === 1 && vt(e.getUTCFullYear()) ? 29 : ge[t];
|
|
302
|
+
}, ct = function(e) {
|
|
303
|
+
return ke[e.getUTCDay()];
|
|
304
|
+
}, jt = function(e, t) {
|
|
305
|
+
var r = st(e, t + 1, 1);
|
|
306
|
+
return [ct(r), Ee(r)];
|
|
307
|
+
}, de = function(e, t) {
|
|
308
|
+
return t = t || e, new Date(Date.UTC(e.getUTCFullYear(), e.getUTCMonth(), e.getUTCDate(), t.getHours(), t.getMinutes(), t.getSeconds(), t.getMilliseconds()));
|
|
309
|
+
}, Ut = function(e) {
|
|
310
|
+
var t = new Date(e.getTime());
|
|
311
|
+
return t;
|
|
312
|
+
}, zt = function(e) {
|
|
313
|
+
for (var t = [], r = 0; r < e.length; r++)
|
|
314
|
+
t.push(Ut(e[r]));
|
|
315
|
+
return t;
|
|
316
|
+
}, bt = function(e) {
|
|
317
|
+
e.sort(function(t, r) {
|
|
318
|
+
return t.getTime() - r.getTime();
|
|
319
|
+
});
|
|
320
|
+
}, Nt = function(e, t) {
|
|
321
|
+
t === void 0 && (t = !0);
|
|
322
|
+
var r = new Date(e);
|
|
323
|
+
return [
|
|
324
|
+
ft(r.getUTCFullYear().toString(), 4, "0"),
|
|
325
|
+
ft(r.getUTCMonth() + 1, 2, "0"),
|
|
326
|
+
ft(r.getUTCDate(), 2, "0"),
|
|
327
|
+
"T",
|
|
328
|
+
ft(r.getUTCHours(), 2, "0"),
|
|
329
|
+
ft(r.getUTCMinutes(), 2, "0"),
|
|
330
|
+
ft(r.getUTCSeconds(), 2, "0"),
|
|
331
|
+
t ? "Z" : ""
|
|
332
|
+
].join("");
|
|
333
|
+
}, $t = function(e) {
|
|
334
|
+
var t = /^(\d{4})(\d{2})(\d{2})(T(\d{2})(\d{2})(\d{2})Z?)?$/, r = t.exec(e);
|
|
335
|
+
if (!r)
|
|
336
|
+
throw new Error("Invalid UNTIL value: ".concat(e));
|
|
337
|
+
return new Date(Date.UTC(parseInt(r[1], 10), parseInt(r[2], 10) - 1, parseInt(r[3], 10), parseInt(r[5], 10) || 0, parseInt(r[6], 10) || 0, parseInt(r[7], 10) || 0));
|
|
338
|
+
}, Kt = function(e, t) {
|
|
339
|
+
var r = e.toLocaleString("sv-SE", { timeZone: t });
|
|
340
|
+
return r.replace(" ", "T") + "Z";
|
|
341
|
+
}, Me = function(e, t) {
|
|
342
|
+
var r = Intl.DateTimeFormat().resolvedOptions().timeZone, n = new Date(Kt(e, r)), i = new Date(Kt(e, t ?? "UTC")), a = i.getTime() - n.getTime();
|
|
343
|
+
return new Date(e.getTime() - a);
|
|
344
|
+
}, ht = (
|
|
345
|
+
/** @class */
|
|
346
|
+
function() {
|
|
347
|
+
function e(t, r) {
|
|
348
|
+
this.minDate = null, this.maxDate = null, this._result = [], this.total = 0, this.method = t, this.args = r, t === "between" ? (this.maxDate = r.inc ? r.before : new Date(r.before.getTime() - 1), this.minDate = r.inc ? r.after : new Date(r.after.getTime() + 1)) : t === "before" ? this.maxDate = r.inc ? r.dt : new Date(r.dt.getTime() - 1) : t === "after" && (this.minDate = r.inc ? r.dt : new Date(r.dt.getTime() + 1));
|
|
349
|
+
}
|
|
350
|
+
return e.prototype.accept = function(t) {
|
|
351
|
+
++this.total;
|
|
352
|
+
var r = this.minDate && t < this.minDate, n = this.maxDate && t > this.maxDate;
|
|
353
|
+
if (this.method === "between") {
|
|
354
|
+
if (r)
|
|
355
|
+
return !0;
|
|
356
|
+
if (n)
|
|
357
|
+
return !1;
|
|
358
|
+
} else if (this.method === "before") {
|
|
359
|
+
if (n)
|
|
360
|
+
return !1;
|
|
361
|
+
} else if (this.method === "after")
|
|
362
|
+
return r ? !0 : (this.add(t), !1);
|
|
363
|
+
return this.add(t);
|
|
364
|
+
}, e.prototype.add = function(t) {
|
|
365
|
+
return this._result.push(t), !0;
|
|
366
|
+
}, e.prototype.getValue = function() {
|
|
367
|
+
var t = this._result;
|
|
368
|
+
switch (this.method) {
|
|
369
|
+
case "all":
|
|
370
|
+
case "between":
|
|
371
|
+
return t;
|
|
372
|
+
case "before":
|
|
373
|
+
case "after":
|
|
374
|
+
default:
|
|
375
|
+
return t.length ? t[t.length - 1] : null;
|
|
376
|
+
}
|
|
377
|
+
}, e.prototype.clone = function() {
|
|
378
|
+
return new e(this.method, this.args);
|
|
379
|
+
}, e;
|
|
380
|
+
}()
|
|
381
|
+
), _t = function(e, t) {
|
|
382
|
+
return _t = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(r, n) {
|
|
383
|
+
r.__proto__ = n;
|
|
384
|
+
} || function(r, n) {
|
|
385
|
+
for (var i in n)
|
|
386
|
+
Object.prototype.hasOwnProperty.call(n, i) && (r[i] = n[i]);
|
|
387
|
+
}, _t(e, t);
|
|
388
|
+
};
|
|
389
|
+
function Ct(e, t) {
|
|
390
|
+
if (typeof t != "function" && t !== null)
|
|
391
|
+
throw new TypeError("Class extends value " + String(t) + " is not a constructor or null");
|
|
392
|
+
_t(e, t);
|
|
393
|
+
function r() {
|
|
394
|
+
this.constructor = e;
|
|
395
|
+
}
|
|
396
|
+
e.prototype = t === null ? Object.create(t) : (r.prototype = t.prototype, new r());
|
|
397
|
+
}
|
|
398
|
+
var K = function() {
|
|
399
|
+
return K = Object.assign || function(t) {
|
|
400
|
+
for (var r, n = 1, i = arguments.length; n < i; n++) {
|
|
401
|
+
r = arguments[n];
|
|
402
|
+
for (var a in r)
|
|
403
|
+
Object.prototype.hasOwnProperty.call(r, a) && (t[a] = r[a]);
|
|
404
|
+
}
|
|
405
|
+
return t;
|
|
406
|
+
}, K.apply(this, arguments);
|
|
407
|
+
};
|
|
408
|
+
function c(e, t, r) {
|
|
409
|
+
if (r || arguments.length === 2)
|
|
410
|
+
for (var n = 0, i = t.length, a; n < i; n++)
|
|
411
|
+
(a || !(n in t)) && (a || (a = Array.prototype.slice.call(t, 0, n)), a[n] = t[n]);
|
|
412
|
+
return e.concat(a || Array.prototype.slice.call(t));
|
|
413
|
+
}
|
|
414
|
+
var qt = (
|
|
415
|
+
/** @class */
|
|
416
|
+
function(e) {
|
|
417
|
+
Ct(t, e);
|
|
418
|
+
function t(r, n, i) {
|
|
419
|
+
var a = e.call(this, r, n) || this;
|
|
420
|
+
return a.iterator = i, a;
|
|
421
|
+
}
|
|
422
|
+
return t.prototype.add = function(r) {
|
|
423
|
+
return this.iterator(r, this._result.length) ? (this._result.push(r), !0) : !1;
|
|
424
|
+
}, t;
|
|
425
|
+
}(ht)
|
|
426
|
+
), Tt = {
|
|
427
|
+
dayNames: [
|
|
428
|
+
"Sunday",
|
|
429
|
+
"Monday",
|
|
430
|
+
"Tuesday",
|
|
431
|
+
"Wednesday",
|
|
432
|
+
"Thursday",
|
|
433
|
+
"Friday",
|
|
434
|
+
"Saturday"
|
|
435
|
+
],
|
|
436
|
+
monthNames: [
|
|
437
|
+
"January",
|
|
438
|
+
"February",
|
|
439
|
+
"March",
|
|
440
|
+
"April",
|
|
441
|
+
"May",
|
|
442
|
+
"June",
|
|
443
|
+
"July",
|
|
444
|
+
"August",
|
|
445
|
+
"September",
|
|
446
|
+
"October",
|
|
447
|
+
"November",
|
|
448
|
+
"December"
|
|
449
|
+
],
|
|
450
|
+
tokens: {
|
|
451
|
+
SKIP: /^[ \r\n\t]+|^\.$/,
|
|
452
|
+
number: /^[1-9][0-9]*/,
|
|
453
|
+
numberAsText: /^(one|two|three)/i,
|
|
454
|
+
every: /^every/i,
|
|
455
|
+
"day(s)": /^days?/i,
|
|
456
|
+
"weekday(s)": /^weekdays?/i,
|
|
457
|
+
"week(s)": /^weeks?/i,
|
|
458
|
+
"hour(s)": /^hours?/i,
|
|
459
|
+
"minute(s)": /^minutes?/i,
|
|
460
|
+
"month(s)": /^months?/i,
|
|
461
|
+
"year(s)": /^years?/i,
|
|
462
|
+
on: /^(on|in)/i,
|
|
463
|
+
at: /^(at)/i,
|
|
464
|
+
the: /^the/i,
|
|
465
|
+
first: /^first/i,
|
|
466
|
+
second: /^second/i,
|
|
467
|
+
third: /^third/i,
|
|
468
|
+
nth: /^([1-9][0-9]*)(\.|th|nd|rd|st)/i,
|
|
469
|
+
last: /^last/i,
|
|
470
|
+
for: /^for/i,
|
|
471
|
+
"time(s)": /^times?/i,
|
|
472
|
+
until: /^(un)?til/i,
|
|
473
|
+
monday: /^mo(n(day)?)?/i,
|
|
474
|
+
tuesday: /^tu(e(s(day)?)?)?/i,
|
|
475
|
+
wednesday: /^we(d(n(esday)?)?)?/i,
|
|
476
|
+
thursday: /^th(u(r(sday)?)?)?/i,
|
|
477
|
+
friday: /^fr(i(day)?)?/i,
|
|
478
|
+
saturday: /^sa(t(urday)?)?/i,
|
|
479
|
+
sunday: /^su(n(day)?)?/i,
|
|
480
|
+
january: /^jan(uary)?/i,
|
|
481
|
+
february: /^feb(ruary)?/i,
|
|
482
|
+
march: /^mar(ch)?/i,
|
|
483
|
+
april: /^apr(il)?/i,
|
|
484
|
+
may: /^may/i,
|
|
485
|
+
june: /^june?/i,
|
|
486
|
+
july: /^july?/i,
|
|
487
|
+
august: /^aug(ust)?/i,
|
|
488
|
+
september: /^sep(t(ember)?)?/i,
|
|
489
|
+
october: /^oct(ober)?/i,
|
|
490
|
+
november: /^nov(ember)?/i,
|
|
491
|
+
december: /^dec(ember)?/i,
|
|
492
|
+
comma: /^(,\s*|(and|or)\s*)+/i
|
|
493
|
+
}
|
|
494
|
+
}, Zt = function(e, t) {
|
|
495
|
+
return e.indexOf(t) !== -1;
|
|
496
|
+
}, Se = function(e) {
|
|
497
|
+
return e.toString();
|
|
498
|
+
}, De = function(e, t, r) {
|
|
499
|
+
return "".concat(t, " ").concat(r, ", ").concat(e);
|
|
500
|
+
}, et = (
|
|
501
|
+
/** @class */
|
|
502
|
+
function() {
|
|
503
|
+
function e(t, r, n, i) {
|
|
504
|
+
if (r === void 0 && (r = Se), n === void 0 && (n = Tt), i === void 0 && (i = De), this.text = [], this.language = n || Tt, this.gettext = r, this.dateFormatter = i, this.rrule = t, this.options = t.options, this.origOptions = t.origOptions, this.origOptions.bymonthday) {
|
|
505
|
+
var a = [].concat(this.options.bymonthday), s = [].concat(this.options.bynmonthday);
|
|
506
|
+
a.sort(function(l, m) {
|
|
507
|
+
return l - m;
|
|
508
|
+
}), s.sort(function(l, m) {
|
|
509
|
+
return m - l;
|
|
510
|
+
}), this.bymonthday = a.concat(s), this.bymonthday.length || (this.bymonthday = null);
|
|
511
|
+
}
|
|
512
|
+
if (A(this.origOptions.byweekday)) {
|
|
513
|
+
var o = z(this.origOptions.byweekday) ? this.origOptions.byweekday : [this.origOptions.byweekday], u = String(o);
|
|
514
|
+
this.byweekday = {
|
|
515
|
+
allWeeks: o.filter(function(l) {
|
|
516
|
+
return !l.n;
|
|
517
|
+
}),
|
|
518
|
+
someWeeks: o.filter(function(l) {
|
|
519
|
+
return !!l.n;
|
|
520
|
+
}),
|
|
521
|
+
isWeekdays: u.indexOf("MO") !== -1 && u.indexOf("TU") !== -1 && u.indexOf("WE") !== -1 && u.indexOf("TH") !== -1 && u.indexOf("FR") !== -1 && u.indexOf("SA") === -1 && u.indexOf("SU") === -1,
|
|
522
|
+
isEveryDay: u.indexOf("MO") !== -1 && u.indexOf("TU") !== -1 && u.indexOf("WE") !== -1 && u.indexOf("TH") !== -1 && u.indexOf("FR") !== -1 && u.indexOf("SA") !== -1 && u.indexOf("SU") !== -1
|
|
523
|
+
};
|
|
524
|
+
var f = function(l, m) {
|
|
525
|
+
return l.weekday - m.weekday;
|
|
526
|
+
};
|
|
527
|
+
this.byweekday.allWeeks.sort(f), this.byweekday.someWeeks.sort(f), this.byweekday.allWeeks.length || (this.byweekday.allWeeks = null), this.byweekday.someWeeks.length || (this.byweekday.someWeeks = null);
|
|
528
|
+
} else
|
|
529
|
+
this.byweekday = null;
|
|
530
|
+
}
|
|
531
|
+
return e.isFullyConvertible = function(t) {
|
|
532
|
+
var r = !0;
|
|
533
|
+
if (!(t.options.freq in e.IMPLEMENTED) || t.origOptions.until && t.origOptions.count)
|
|
534
|
+
return !1;
|
|
535
|
+
for (var n in t.origOptions) {
|
|
536
|
+
if (Zt(["dtstart", "wkst", "freq"], n))
|
|
537
|
+
return !0;
|
|
538
|
+
if (!Zt(e.IMPLEMENTED[t.options.freq], n))
|
|
539
|
+
return !1;
|
|
540
|
+
}
|
|
541
|
+
return r;
|
|
542
|
+
}, e.prototype.isFullyConvertible = function() {
|
|
543
|
+
return e.isFullyConvertible(this.rrule);
|
|
544
|
+
}, e.prototype.toString = function() {
|
|
545
|
+
var t = this.gettext;
|
|
546
|
+
if (!(this.options.freq in e.IMPLEMENTED))
|
|
547
|
+
return t("RRule error: Unable to fully convert this rrule to text");
|
|
548
|
+
if (this.text = [t("every")], this[b.FREQUENCIES[this.options.freq]](), this.options.until) {
|
|
549
|
+
this.add(t("until"));
|
|
550
|
+
var r = this.options.until;
|
|
551
|
+
this.add(this.dateFormatter(r.getUTCFullYear(), this.language.monthNames[r.getUTCMonth()], r.getUTCDate()));
|
|
552
|
+
} else
|
|
553
|
+
this.options.count && this.add(t("for")).add(this.options.count.toString()).add(this.plural(this.options.count) ? t("times") : t("time"));
|
|
554
|
+
return this.isFullyConvertible() || this.add(t("(~ approximate)")), this.text.join("");
|
|
555
|
+
}, e.prototype.HOURLY = function() {
|
|
556
|
+
var t = this.gettext;
|
|
557
|
+
this.options.interval !== 1 && this.add(this.options.interval.toString()), this.add(this.plural(this.options.interval) ? t("hours") : t("hour"));
|
|
558
|
+
}, e.prototype.MINUTELY = function() {
|
|
559
|
+
var t = this.gettext;
|
|
560
|
+
this.options.interval !== 1 && this.add(this.options.interval.toString()), this.add(this.plural(this.options.interval) ? t("minutes") : t("minute"));
|
|
561
|
+
}, e.prototype.DAILY = function() {
|
|
562
|
+
var t = this.gettext;
|
|
563
|
+
this.options.interval !== 1 && this.add(this.options.interval.toString()), this.byweekday && this.byweekday.isWeekdays ? this.add(this.plural(this.options.interval) ? t("weekdays") : t("weekday")) : this.add(this.plural(this.options.interval) ? t("days") : t("day")), this.origOptions.bymonth && (this.add(t("in")), this._bymonth()), this.bymonthday ? this._bymonthday() : this.byweekday ? this._byweekday() : this.origOptions.byhour && this._byhour();
|
|
564
|
+
}, e.prototype.WEEKLY = function() {
|
|
565
|
+
var t = this.gettext;
|
|
566
|
+
this.options.interval !== 1 && this.add(this.options.interval.toString()).add(this.plural(this.options.interval) ? t("weeks") : t("week")), this.byweekday && this.byweekday.isWeekdays ? this.options.interval === 1 ? this.add(this.plural(this.options.interval) ? t("weekdays") : t("weekday")) : this.add(t("on")).add(t("weekdays")) : this.byweekday && this.byweekday.isEveryDay ? this.add(this.plural(this.options.interval) ? t("days") : t("day")) : (this.options.interval === 1 && this.add(t("week")), this.origOptions.bymonth && (this.add(t("in")), this._bymonth()), this.bymonthday ? this._bymonthday() : this.byweekday && this._byweekday());
|
|
567
|
+
}, e.prototype.MONTHLY = function() {
|
|
568
|
+
var t = this.gettext;
|
|
569
|
+
this.origOptions.bymonth ? (this.options.interval !== 1 && (this.add(this.options.interval.toString()).add(t("months")), this.plural(this.options.interval) && this.add(t("in"))), this._bymonth()) : (this.options.interval !== 1 && this.add(this.options.interval.toString()), this.add(this.plural(this.options.interval) ? t("months") : t("month"))), this.bymonthday ? this._bymonthday() : this.byweekday && this.byweekday.isWeekdays ? this.add(t("on")).add(t("weekdays")) : this.byweekday && this._byweekday();
|
|
570
|
+
}, e.prototype.YEARLY = function() {
|
|
571
|
+
var t = this.gettext;
|
|
572
|
+
this.origOptions.bymonth ? (this.options.interval !== 1 && (this.add(this.options.interval.toString()), this.add(t("years"))), this._bymonth()) : (this.options.interval !== 1 && this.add(this.options.interval.toString()), this.add(this.plural(this.options.interval) ? t("years") : t("year"))), this.bymonthday ? this._bymonthday() : this.byweekday && this._byweekday(), this.options.byyearday && this.add(t("on the")).add(this.list(this.options.byyearday, this.nth, t("and"))).add(t("day")), this.options.byweekno && this.add(t("in")).add(this.plural(this.options.byweekno.length) ? t("weeks") : t("week")).add(this.list(this.options.byweekno, void 0, t("and")));
|
|
573
|
+
}, e.prototype._bymonthday = function() {
|
|
574
|
+
var t = this.gettext;
|
|
575
|
+
this.byweekday && this.byweekday.allWeeks ? this.add(t("on")).add(this.list(this.byweekday.allWeeks, this.weekdaytext, t("or"))).add(t("the")).add(this.list(this.bymonthday, this.nth, t("or"))) : this.add(t("on the")).add(this.list(this.bymonthday, this.nth, t("and")));
|
|
576
|
+
}, e.prototype._byweekday = function() {
|
|
577
|
+
var t = this.gettext;
|
|
578
|
+
this.byweekday.allWeeks && !this.byweekday.isWeekdays && this.add(t("on")).add(this.list(this.byweekday.allWeeks, this.weekdaytext)), this.byweekday.someWeeks && (this.byweekday.allWeeks && this.add(t("and")), this.add(t("on the")).add(this.list(this.byweekday.someWeeks, this.weekdaytext, t("and"))));
|
|
579
|
+
}, e.prototype._byhour = function() {
|
|
580
|
+
var t = this.gettext;
|
|
581
|
+
this.add(t("at")).add(this.list(this.origOptions.byhour, void 0, t("and")));
|
|
582
|
+
}, e.prototype._bymonth = function() {
|
|
583
|
+
this.add(this.list(this.options.bymonth, this.monthtext, this.gettext("and")));
|
|
584
|
+
}, e.prototype.nth = function(t) {
|
|
585
|
+
t = parseInt(t.toString(), 10);
|
|
586
|
+
var r, n = this.gettext;
|
|
587
|
+
if (t === -1)
|
|
588
|
+
return n("last");
|
|
589
|
+
var i = Math.abs(t);
|
|
590
|
+
switch (i) {
|
|
591
|
+
case 1:
|
|
592
|
+
case 21:
|
|
593
|
+
case 31:
|
|
594
|
+
r = i + n("st");
|
|
595
|
+
break;
|
|
596
|
+
case 2:
|
|
597
|
+
case 22:
|
|
598
|
+
r = i + n("nd");
|
|
599
|
+
break;
|
|
600
|
+
case 3:
|
|
601
|
+
case 23:
|
|
602
|
+
r = i + n("rd");
|
|
603
|
+
break;
|
|
604
|
+
default:
|
|
605
|
+
r = i + n("th");
|
|
606
|
+
}
|
|
607
|
+
return t < 0 ? r + " " + n("last") : r;
|
|
608
|
+
}, e.prototype.monthtext = function(t) {
|
|
609
|
+
return this.language.monthNames[t - 1];
|
|
610
|
+
}, e.prototype.weekdaytext = function(t) {
|
|
611
|
+
var r = G(t) ? (t + 1) % 7 : t.getJsWeekday();
|
|
612
|
+
return (t.n ? this.nth(t.n) + " " : "") + this.language.dayNames[r];
|
|
613
|
+
}, e.prototype.plural = function(t) {
|
|
614
|
+
return t % 100 !== 1;
|
|
615
|
+
}, e.prototype.add = function(t) {
|
|
616
|
+
return this.text.push(" "), this.text.push(t), this;
|
|
617
|
+
}, e.prototype.list = function(t, r, n, i) {
|
|
618
|
+
var a = this;
|
|
619
|
+
i === void 0 && (i = ","), z(t) || (t = [t]);
|
|
620
|
+
var s = function(u, f, l) {
|
|
621
|
+
for (var m = "", h = 0; h < u.length; h++)
|
|
622
|
+
h !== 0 && (h === u.length - 1 ? m += " " + l + " " : m += f + " "), m += u[h];
|
|
623
|
+
return m;
|
|
624
|
+
};
|
|
625
|
+
r = r || function(u) {
|
|
626
|
+
return u.toString();
|
|
627
|
+
};
|
|
628
|
+
var o = function(u) {
|
|
629
|
+
return r && r.call(a, u);
|
|
630
|
+
};
|
|
631
|
+
return n ? s(t.map(o), i, n) : t.map(o).join(i + " ");
|
|
632
|
+
}, e;
|
|
633
|
+
}()
|
|
634
|
+
), xe = (
|
|
635
|
+
/** @class */
|
|
636
|
+
function() {
|
|
637
|
+
function e(t) {
|
|
638
|
+
this.done = !0, this.rules = t;
|
|
639
|
+
}
|
|
640
|
+
return e.prototype.start = function(t) {
|
|
641
|
+
return this.text = t, this.done = !1, this.nextSymbol();
|
|
642
|
+
}, e.prototype.isDone = function() {
|
|
643
|
+
return this.done && this.symbol === null;
|
|
644
|
+
}, e.prototype.nextSymbol = function() {
|
|
645
|
+
var t, r;
|
|
646
|
+
this.symbol = null, this.value = null;
|
|
647
|
+
do {
|
|
648
|
+
if (this.done)
|
|
649
|
+
return !1;
|
|
650
|
+
var n = void 0;
|
|
651
|
+
t = null;
|
|
652
|
+
for (var i in this.rules) {
|
|
653
|
+
n = this.rules[i];
|
|
654
|
+
var a = n.exec(this.text);
|
|
655
|
+
a && (t === null || a[0].length > t[0].length) && (t = a, r = i);
|
|
656
|
+
}
|
|
657
|
+
if (t != null && (this.text = this.text.substr(t[0].length), this.text === "" && (this.done = !0)), t == null) {
|
|
658
|
+
this.done = !0, this.symbol = null, this.value = null;
|
|
659
|
+
return;
|
|
660
|
+
}
|
|
661
|
+
} while (r === "SKIP");
|
|
662
|
+
return this.symbol = r, this.value = t, !0;
|
|
663
|
+
}, e.prototype.accept = function(t) {
|
|
664
|
+
if (this.symbol === t) {
|
|
665
|
+
if (this.value) {
|
|
666
|
+
var r = this.value;
|
|
667
|
+
return this.nextSymbol(), r;
|
|
668
|
+
}
|
|
669
|
+
return this.nextSymbol(), !0;
|
|
670
|
+
}
|
|
671
|
+
return !1;
|
|
672
|
+
}, e.prototype.acceptNumber = function() {
|
|
673
|
+
return this.accept("number");
|
|
674
|
+
}, e.prototype.expect = function(t) {
|
|
675
|
+
if (this.accept(t))
|
|
676
|
+
return !0;
|
|
677
|
+
throw new Error("expected " + t + " but found " + this.symbol);
|
|
678
|
+
}, e;
|
|
679
|
+
}()
|
|
680
|
+
);
|
|
681
|
+
function ye(e, t) {
|
|
682
|
+
t === void 0 && (t = Tt);
|
|
683
|
+
var r = {}, n = new xe(t.tokens);
|
|
684
|
+
if (!n.start(e))
|
|
685
|
+
return null;
|
|
686
|
+
return i(), r;
|
|
687
|
+
function i() {
|
|
688
|
+
n.expect("every");
|
|
689
|
+
var h = n.acceptNumber();
|
|
690
|
+
if (h && (r.interval = parseInt(h[0], 10)), n.isDone())
|
|
691
|
+
throw new Error("Unexpected end");
|
|
692
|
+
switch (n.symbol) {
|
|
693
|
+
case "day(s)":
|
|
694
|
+
r.freq = b.DAILY, n.nextSymbol() && (s(), m());
|
|
695
|
+
break;
|
|
696
|
+
case "weekday(s)":
|
|
697
|
+
r.freq = b.WEEKLY, r.byweekday = [b.MO, b.TU, b.WE, b.TH, b.FR], n.nextSymbol(), m();
|
|
698
|
+
break;
|
|
699
|
+
case "week(s)":
|
|
700
|
+
r.freq = b.WEEKLY, n.nextSymbol() && (a(), m());
|
|
701
|
+
break;
|
|
702
|
+
case "hour(s)":
|
|
703
|
+
r.freq = b.HOURLY, n.nextSymbol() && (a(), m());
|
|
704
|
+
break;
|
|
705
|
+
case "minute(s)":
|
|
706
|
+
r.freq = b.MINUTELY, n.nextSymbol() && (a(), m());
|
|
707
|
+
break;
|
|
708
|
+
case "month(s)":
|
|
709
|
+
r.freq = b.MONTHLY, n.nextSymbol() && (a(), m());
|
|
710
|
+
break;
|
|
711
|
+
case "year(s)":
|
|
712
|
+
r.freq = b.YEARLY, n.nextSymbol() && (a(), m());
|
|
713
|
+
break;
|
|
714
|
+
case "monday":
|
|
715
|
+
case "tuesday":
|
|
716
|
+
case "wednesday":
|
|
717
|
+
case "thursday":
|
|
718
|
+
case "friday":
|
|
719
|
+
case "saturday":
|
|
720
|
+
case "sunday":
|
|
721
|
+
r.freq = b.WEEKLY;
|
|
722
|
+
var d = n.symbol.substr(0, 2).toUpperCase();
|
|
723
|
+
if (r.byweekday = [b[d]], !n.nextSymbol())
|
|
724
|
+
return;
|
|
725
|
+
for (; n.accept("comma"); ) {
|
|
726
|
+
if (n.isDone())
|
|
727
|
+
throw new Error("Unexpected end");
|
|
728
|
+
var w = u();
|
|
729
|
+
if (!w)
|
|
730
|
+
throw new Error("Unexpected symbol " + n.symbol + ", expected weekday");
|
|
731
|
+
r.byweekday.push(b[w]), n.nextSymbol();
|
|
732
|
+
}
|
|
733
|
+
l(), m();
|
|
734
|
+
break;
|
|
735
|
+
case "january":
|
|
736
|
+
case "february":
|
|
737
|
+
case "march":
|
|
738
|
+
case "april":
|
|
739
|
+
case "may":
|
|
740
|
+
case "june":
|
|
741
|
+
case "july":
|
|
742
|
+
case "august":
|
|
743
|
+
case "september":
|
|
744
|
+
case "october":
|
|
745
|
+
case "november":
|
|
746
|
+
case "december":
|
|
747
|
+
if (r.freq = b.YEARLY, r.bymonth = [o()], !n.nextSymbol())
|
|
748
|
+
return;
|
|
749
|
+
for (; n.accept("comma"); ) {
|
|
750
|
+
if (n.isDone())
|
|
751
|
+
throw new Error("Unexpected end");
|
|
752
|
+
var M = o();
|
|
753
|
+
if (!M)
|
|
754
|
+
throw new Error("Unexpected symbol " + n.symbol + ", expected month");
|
|
755
|
+
r.bymonth.push(M), n.nextSymbol();
|
|
756
|
+
}
|
|
757
|
+
a(), m();
|
|
758
|
+
break;
|
|
759
|
+
default:
|
|
760
|
+
throw new Error("Unknown symbol");
|
|
761
|
+
}
|
|
762
|
+
}
|
|
763
|
+
function a() {
|
|
764
|
+
var h = n.accept("on"), d = n.accept("the");
|
|
765
|
+
if (h || d)
|
|
766
|
+
do {
|
|
767
|
+
var w = f(), M = u(), S = o();
|
|
768
|
+
if (w)
|
|
769
|
+
M ? (n.nextSymbol(), r.byweekday || (r.byweekday = []), r.byweekday.push(b[M].nth(w))) : (r.bymonthday || (r.bymonthday = []), r.bymonthday.push(w), n.accept("day(s)"));
|
|
770
|
+
else if (M)
|
|
771
|
+
n.nextSymbol(), r.byweekday || (r.byweekday = []), r.byweekday.push(b[M]);
|
|
772
|
+
else if (n.symbol === "weekday(s)")
|
|
773
|
+
n.nextSymbol(), r.byweekday || (r.byweekday = [b.MO, b.TU, b.WE, b.TH, b.FR]);
|
|
774
|
+
else if (n.symbol === "week(s)") {
|
|
775
|
+
n.nextSymbol();
|
|
776
|
+
var U = n.acceptNumber();
|
|
777
|
+
if (!U)
|
|
778
|
+
throw new Error("Unexpected symbol " + n.symbol + ", expected week number");
|
|
779
|
+
for (r.byweekno = [parseInt(U[0], 10)]; n.accept("comma"); ) {
|
|
780
|
+
if (U = n.acceptNumber(), !U)
|
|
781
|
+
throw new Error("Unexpected symbol " + n.symbol + "; expected monthday");
|
|
782
|
+
r.byweekno.push(parseInt(U[0], 10));
|
|
783
|
+
}
|
|
784
|
+
} else if (S)
|
|
785
|
+
n.nextSymbol(), r.bymonth || (r.bymonth = []), r.bymonth.push(S);
|
|
786
|
+
else
|
|
787
|
+
return;
|
|
788
|
+
} while (n.accept("comma") || n.accept("the") || n.accept("on"));
|
|
789
|
+
}
|
|
790
|
+
function s() {
|
|
791
|
+
var h = n.accept("at");
|
|
792
|
+
if (h)
|
|
793
|
+
do {
|
|
794
|
+
var d = n.acceptNumber();
|
|
795
|
+
if (!d)
|
|
796
|
+
throw new Error("Unexpected symbol " + n.symbol + ", expected hour");
|
|
797
|
+
for (r.byhour = [parseInt(d[0], 10)]; n.accept("comma"); ) {
|
|
798
|
+
if (d = n.acceptNumber(), !d)
|
|
799
|
+
throw new Error("Unexpected symbol " + n.symbol + "; expected hour");
|
|
800
|
+
r.byhour.push(parseInt(d[0], 10));
|
|
801
|
+
}
|
|
802
|
+
} while (n.accept("comma") || n.accept("at"));
|
|
803
|
+
}
|
|
804
|
+
function o() {
|
|
805
|
+
switch (n.symbol) {
|
|
806
|
+
case "january":
|
|
807
|
+
return 1;
|
|
808
|
+
case "february":
|
|
809
|
+
return 2;
|
|
810
|
+
case "march":
|
|
811
|
+
return 3;
|
|
812
|
+
case "april":
|
|
813
|
+
return 4;
|
|
814
|
+
case "may":
|
|
815
|
+
return 5;
|
|
816
|
+
case "june":
|
|
817
|
+
return 6;
|
|
818
|
+
case "july":
|
|
819
|
+
return 7;
|
|
820
|
+
case "august":
|
|
821
|
+
return 8;
|
|
822
|
+
case "september":
|
|
823
|
+
return 9;
|
|
824
|
+
case "october":
|
|
825
|
+
return 10;
|
|
826
|
+
case "november":
|
|
827
|
+
return 11;
|
|
828
|
+
case "december":
|
|
829
|
+
return 12;
|
|
830
|
+
default:
|
|
831
|
+
return !1;
|
|
832
|
+
}
|
|
833
|
+
}
|
|
834
|
+
function u() {
|
|
835
|
+
switch (n.symbol) {
|
|
836
|
+
case "monday":
|
|
837
|
+
case "tuesday":
|
|
838
|
+
case "wednesday":
|
|
839
|
+
case "thursday":
|
|
840
|
+
case "friday":
|
|
841
|
+
case "saturday":
|
|
842
|
+
case "sunday":
|
|
843
|
+
return n.symbol.substr(0, 2).toUpperCase();
|
|
844
|
+
default:
|
|
845
|
+
return !1;
|
|
846
|
+
}
|
|
847
|
+
}
|
|
848
|
+
function f() {
|
|
849
|
+
switch (n.symbol) {
|
|
850
|
+
case "last":
|
|
851
|
+
return n.nextSymbol(), -1;
|
|
852
|
+
case "first":
|
|
853
|
+
return n.nextSymbol(), 1;
|
|
854
|
+
case "second":
|
|
855
|
+
return n.nextSymbol(), n.accept("last") ? -2 : 2;
|
|
856
|
+
case "third":
|
|
857
|
+
return n.nextSymbol(), n.accept("last") ? -3 : 3;
|
|
858
|
+
case "nth":
|
|
859
|
+
var h = parseInt(n.value[1], 10);
|
|
860
|
+
if (h < -366 || h > 366)
|
|
861
|
+
throw new Error("Nth out of range: " + h);
|
|
862
|
+
return n.nextSymbol(), n.accept("last") ? -h : h;
|
|
863
|
+
default:
|
|
864
|
+
return !1;
|
|
865
|
+
}
|
|
866
|
+
}
|
|
867
|
+
function l() {
|
|
868
|
+
n.accept("on"), n.accept("the");
|
|
869
|
+
var h = f();
|
|
870
|
+
if (h)
|
|
871
|
+
for (r.bymonthday = [h], n.nextSymbol(); n.accept("comma"); ) {
|
|
872
|
+
if (h = f(), !h)
|
|
873
|
+
throw new Error("Unexpected symbol " + n.symbol + "; expected monthday");
|
|
874
|
+
r.bymonthday.push(h), n.nextSymbol();
|
|
875
|
+
}
|
|
876
|
+
}
|
|
877
|
+
function m() {
|
|
878
|
+
if (n.symbol === "until") {
|
|
879
|
+
var h = Date.parse(n.text);
|
|
880
|
+
if (!h)
|
|
881
|
+
throw new Error("Cannot parse until date:" + n.text);
|
|
882
|
+
r.until = new Date(h);
|
|
883
|
+
} else
|
|
884
|
+
n.accept("for") && (r.count = parseInt(n.value[0], 10), n.expect("number"));
|
|
885
|
+
}
|
|
886
|
+
}
|
|
887
|
+
var x;
|
|
888
|
+
(function(e) {
|
|
889
|
+
e[e.YEARLY = 0] = "YEARLY", e[e.MONTHLY = 1] = "MONTHLY", e[e.WEEKLY = 2] = "WEEKLY", e[e.DAILY = 3] = "DAILY", e[e.HOURLY = 4] = "HOURLY", e[e.MINUTELY = 5] = "MINUTELY", e[e.SECONDLY = 6] = "SECONDLY";
|
|
890
|
+
})(x || (x = {}));
|
|
891
|
+
function Rt(e) {
|
|
892
|
+
return e < x.HOURLY;
|
|
893
|
+
}
|
|
894
|
+
var Oe = function(e, t) {
|
|
895
|
+
return t === void 0 && (t = Tt), new b(ye(e, t) || void 0);
|
|
896
|
+
}, lt = [
|
|
897
|
+
"count",
|
|
898
|
+
"until",
|
|
899
|
+
"interval",
|
|
900
|
+
"byweekday",
|
|
901
|
+
"bymonthday",
|
|
902
|
+
"bymonth"
|
|
903
|
+
];
|
|
904
|
+
et.IMPLEMENTED = [];
|
|
905
|
+
et.IMPLEMENTED[x.HOURLY] = lt;
|
|
906
|
+
et.IMPLEMENTED[x.MINUTELY] = lt;
|
|
907
|
+
et.IMPLEMENTED[x.DAILY] = ["byhour"].concat(lt);
|
|
908
|
+
et.IMPLEMENTED[x.WEEKLY] = lt;
|
|
909
|
+
et.IMPLEMENTED[x.MONTHLY] = lt;
|
|
910
|
+
et.IMPLEMENTED[x.YEARLY] = ["byweekno", "byyearday"].concat(lt);
|
|
911
|
+
var Ye = function(e, t, r, n) {
|
|
912
|
+
return new et(e, t, r, n).toString();
|
|
913
|
+
}, Le = et.isFullyConvertible, Et = (
|
|
914
|
+
/** @class */
|
|
915
|
+
function() {
|
|
916
|
+
function e(t, r, n, i) {
|
|
917
|
+
this.hour = t, this.minute = r, this.second = n, this.millisecond = i || 0;
|
|
918
|
+
}
|
|
919
|
+
return e.prototype.getHours = function() {
|
|
920
|
+
return this.hour;
|
|
921
|
+
}, e.prototype.getMinutes = function() {
|
|
922
|
+
return this.minute;
|
|
923
|
+
}, e.prototype.getSeconds = function() {
|
|
924
|
+
return this.second;
|
|
925
|
+
}, e.prototype.getMilliseconds = function() {
|
|
926
|
+
return this.millisecond;
|
|
927
|
+
}, e.prototype.getTime = function() {
|
|
928
|
+
return (this.hour * 60 * 60 + this.minute * 60 + this.second) * 1e3 + this.millisecond;
|
|
929
|
+
}, e;
|
|
930
|
+
}()
|
|
931
|
+
), Ue = (
|
|
932
|
+
/** @class */
|
|
933
|
+
function(e) {
|
|
934
|
+
Ct(t, e);
|
|
935
|
+
function t(r, n, i, a, s, o, u) {
|
|
936
|
+
var f = e.call(this, a, s, o, u) || this;
|
|
937
|
+
return f.year = r, f.month = n, f.day = i, f;
|
|
938
|
+
}
|
|
939
|
+
return t.fromDate = function(r) {
|
|
940
|
+
return new this(r.getUTCFullYear(), r.getUTCMonth() + 1, r.getUTCDate(), r.getUTCHours(), r.getUTCMinutes(), r.getUTCSeconds(), r.valueOf() % 1e3);
|
|
941
|
+
}, t.prototype.getWeekday = function() {
|
|
942
|
+
return ct(new Date(this.getTime()));
|
|
943
|
+
}, t.prototype.getTime = function() {
|
|
944
|
+
return new Date(Date.UTC(this.year, this.month - 1, this.day, this.hour, this.minute, this.second, this.millisecond)).getTime();
|
|
945
|
+
}, t.prototype.getDay = function() {
|
|
946
|
+
return this.day;
|
|
947
|
+
}, t.prototype.getMonth = function() {
|
|
948
|
+
return this.month;
|
|
949
|
+
}, t.prototype.getYear = function() {
|
|
950
|
+
return this.year;
|
|
951
|
+
}, t.prototype.addYears = function(r) {
|
|
952
|
+
this.year += r;
|
|
953
|
+
}, t.prototype.addMonths = function(r) {
|
|
954
|
+
if (this.month += r, this.month > 12) {
|
|
955
|
+
var n = Math.floor(this.month / 12), i = q(this.month, 12);
|
|
956
|
+
this.month = i, this.year += n, this.month === 0 && (this.month = 12, --this.year);
|
|
957
|
+
}
|
|
958
|
+
}, t.prototype.addWeekly = function(r, n) {
|
|
959
|
+
n > this.getWeekday() ? this.day += -(this.getWeekday() + 1 + (6 - n)) + r * 7 : this.day += -(this.getWeekday() - n) + r * 7, this.fixDay();
|
|
960
|
+
}, t.prototype.addDaily = function(r) {
|
|
961
|
+
this.day += r, this.fixDay();
|
|
962
|
+
}, t.prototype.addHours = function(r, n, i) {
|
|
963
|
+
for (n && (this.hour += Math.floor((23 - this.hour) / r) * r); ; ) {
|
|
964
|
+
this.hour += r;
|
|
965
|
+
var a = xt(this.hour, 24), s = a.div, o = a.mod;
|
|
966
|
+
if (s && (this.hour = o, this.addDaily(s)), J(i) || L(i, this.hour))
|
|
967
|
+
break;
|
|
968
|
+
}
|
|
969
|
+
}, t.prototype.addMinutes = function(r, n, i, a) {
|
|
970
|
+
for (n && (this.minute += Math.floor((1439 - (this.hour * 60 + this.minute)) / r) * r); ; ) {
|
|
971
|
+
this.minute += r;
|
|
972
|
+
var s = xt(this.minute, 60), o = s.div, u = s.mod;
|
|
973
|
+
if (o && (this.minute = u, this.addHours(o, !1, i)), (J(i) || L(i, this.hour)) && (J(a) || L(a, this.minute)))
|
|
974
|
+
break;
|
|
975
|
+
}
|
|
976
|
+
}, t.prototype.addSeconds = function(r, n, i, a, s) {
|
|
977
|
+
for (n && (this.second += Math.floor((86399 - (this.hour * 3600 + this.minute * 60 + this.second)) / r) * r); ; ) {
|
|
978
|
+
this.second += r;
|
|
979
|
+
var o = xt(this.second, 60), u = o.div, f = o.mod;
|
|
980
|
+
if (u && (this.second = f, this.addMinutes(u, !1, i, a)), (J(i) || L(i, this.hour)) && (J(a) || L(a, this.minute)) && (J(s) || L(s, this.second)))
|
|
981
|
+
break;
|
|
982
|
+
}
|
|
983
|
+
}, t.prototype.fixDay = function() {
|
|
984
|
+
if (!(this.day <= 28)) {
|
|
985
|
+
var r = jt(this.year, this.month - 1)[1];
|
|
986
|
+
if (!(this.day <= r))
|
|
987
|
+
for (; this.day > r; ) {
|
|
988
|
+
if (this.day -= r, ++this.month, this.month === 13 && (this.month = 1, ++this.year, this.year > fe))
|
|
989
|
+
return;
|
|
990
|
+
r = jt(this.year, this.month - 1)[1];
|
|
991
|
+
}
|
|
992
|
+
}
|
|
993
|
+
}, t.prototype.add = function(r, n) {
|
|
994
|
+
var i = r.freq, a = r.interval, s = r.wkst, o = r.byhour, u = r.byminute, f = r.bysecond;
|
|
995
|
+
switch (i) {
|
|
996
|
+
case x.YEARLY:
|
|
997
|
+
return this.addYears(a);
|
|
998
|
+
case x.MONTHLY:
|
|
999
|
+
return this.addMonths(a);
|
|
1000
|
+
case x.WEEKLY:
|
|
1001
|
+
return this.addWeekly(a, s);
|
|
1002
|
+
case x.DAILY:
|
|
1003
|
+
return this.addDaily(a);
|
|
1004
|
+
case x.HOURLY:
|
|
1005
|
+
return this.addHours(a, n, o);
|
|
1006
|
+
case x.MINUTELY:
|
|
1007
|
+
return this.addMinutes(a, n, o, u);
|
|
1008
|
+
case x.SECONDLY:
|
|
1009
|
+
return this.addSeconds(a, n, o, u, f);
|
|
1010
|
+
}
|
|
1011
|
+
}, t;
|
|
1012
|
+
}(Et)
|
|
1013
|
+
);
|
|
1014
|
+
function me(e) {
|
|
1015
|
+
for (var t = [], r = Object.keys(e), n = 0, i = r; n < i.length; n++) {
|
|
1016
|
+
var a = i[n];
|
|
1017
|
+
L(sr, a) || t.push(a), ce(e[a]) && !pt(e[a]) && t.push(a);
|
|
1018
|
+
}
|
|
1019
|
+
if (t.length)
|
|
1020
|
+
throw new Error("Invalid options: " + t.join(", "));
|
|
1021
|
+
return K({}, e);
|
|
1022
|
+
}
|
|
1023
|
+
function _e(e) {
|
|
1024
|
+
var t = K(K({}, Wt), me(e));
|
|
1025
|
+
if (A(t.byeaster) && (t.freq = b.YEARLY), !(A(t.freq) && b.FREQUENCIES[t.freq]))
|
|
1026
|
+
throw new Error("Invalid frequency: ".concat(t.freq, " ").concat(e.freq));
|
|
1027
|
+
if (t.dtstart || (t.dtstart = new Date((/* @__PURE__ */ new Date()).setMilliseconds(0))), A(t.wkst) ? G(t.wkst) || (t.wkst = t.wkst.weekday) : t.wkst = b.MO.weekday, A(t.bysetpos)) {
|
|
1028
|
+
G(t.bysetpos) && (t.bysetpos = [t.bysetpos]);
|
|
1029
|
+
for (var r = 0; r < t.bysetpos.length; r++) {
|
|
1030
|
+
var n = t.bysetpos[r];
|
|
1031
|
+
if (n === 0 || !(n >= -366 && n <= 366))
|
|
1032
|
+
throw new Error("bysetpos must be between 1 and 366, or between -366 and -1");
|
|
1033
|
+
}
|
|
1034
|
+
}
|
|
1035
|
+
if (!(t.byweekno || $(t.byweekno) || $(t.byyearday) || t.bymonthday || $(t.bymonthday) || A(t.byweekday) || A(t.byeaster)))
|
|
1036
|
+
switch (t.freq) {
|
|
1037
|
+
case b.YEARLY:
|
|
1038
|
+
t.bymonth || (t.bymonth = t.dtstart.getUTCMonth() + 1), t.bymonthday = t.dtstart.getUTCDate();
|
|
1039
|
+
break;
|
|
1040
|
+
case b.MONTHLY:
|
|
1041
|
+
t.bymonthday = t.dtstart.getUTCDate();
|
|
1042
|
+
break;
|
|
1043
|
+
case b.WEEKLY:
|
|
1044
|
+
t.byweekday = [ct(t.dtstart)];
|
|
1045
|
+
break;
|
|
1046
|
+
}
|
|
1047
|
+
if (A(t.bymonth) && !z(t.bymonth) && (t.bymonth = [t.bymonth]), A(t.byyearday) && !z(t.byyearday) && G(t.byyearday) && (t.byyearday = [t.byyearday]), !A(t.bymonthday))
|
|
1048
|
+
t.bymonthday = [], t.bynmonthday = [];
|
|
1049
|
+
else if (z(t.bymonthday)) {
|
|
1050
|
+
for (var i = [], a = [], r = 0; r < t.bymonthday.length; r++) {
|
|
1051
|
+
var n = t.bymonthday[r];
|
|
1052
|
+
n > 0 ? i.push(n) : n < 0 && a.push(n);
|
|
1053
|
+
}
|
|
1054
|
+
t.bymonthday = i, t.bynmonthday = a;
|
|
1055
|
+
} else
|
|
1056
|
+
t.bymonthday < 0 ? (t.bynmonthday = [t.bymonthday], t.bymonthday = []) : (t.bynmonthday = [], t.bymonthday = [t.bymonthday]);
|
|
1057
|
+
if (A(t.byweekno) && !z(t.byweekno) && (t.byweekno = [t.byweekno]), !A(t.byweekday))
|
|
1058
|
+
t.bynweekday = null;
|
|
1059
|
+
else if (G(t.byweekday))
|
|
1060
|
+
t.byweekday = [t.byweekday], t.bynweekday = null;
|
|
1061
|
+
else if (Pt(t.byweekday))
|
|
1062
|
+
t.byweekday = [P.fromStr(t.byweekday).weekday], t.bynweekday = null;
|
|
1063
|
+
else if (t.byweekday instanceof P)
|
|
1064
|
+
!t.byweekday.n || t.freq > b.MONTHLY ? (t.byweekday = [t.byweekday.weekday], t.bynweekday = null) : (t.bynweekday = [[t.byweekday.weekday, t.byweekday.n]], t.byweekday = null);
|
|
1065
|
+
else {
|
|
1066
|
+
for (var s = [], o = [], r = 0; r < t.byweekday.length; r++) {
|
|
1067
|
+
var u = t.byweekday[r];
|
|
1068
|
+
if (G(u)) {
|
|
1069
|
+
s.push(u);
|
|
1070
|
+
continue;
|
|
1071
|
+
} else if (Pt(u)) {
|
|
1072
|
+
s.push(P.fromStr(u).weekday);
|
|
1073
|
+
continue;
|
|
1074
|
+
}
|
|
1075
|
+
!u.n || t.freq > b.MONTHLY ? s.push(u.weekday) : o.push([u.weekday, u.n]);
|
|
1076
|
+
}
|
|
1077
|
+
t.byweekday = $(s) ? s : null, t.bynweekday = $(o) ? o : null;
|
|
1078
|
+
}
|
|
1079
|
+
return A(t.byhour) ? G(t.byhour) && (t.byhour = [t.byhour]) : t.byhour = t.freq < b.HOURLY ? [t.dtstart.getUTCHours()] : null, A(t.byminute) ? G(t.byminute) && (t.byminute = [t.byminute]) : t.byminute = t.freq < b.MINUTELY ? [t.dtstart.getUTCMinutes()] : null, A(t.bysecond) ? G(t.bysecond) && (t.bysecond = [t.bysecond]) : t.bysecond = t.freq < b.SECONDLY ? [t.dtstart.getUTCSeconds()] : null, { parsedOptions: t };
|
|
1080
|
+
}
|
|
1081
|
+
function Ie(e) {
|
|
1082
|
+
var t = e.dtstart.getTime() % 1e3;
|
|
1083
|
+
if (!Rt(e.freq))
|
|
1084
|
+
return [];
|
|
1085
|
+
var r = [];
|
|
1086
|
+
return e.byhour.forEach(function(n) {
|
|
1087
|
+
e.byminute.forEach(function(i) {
|
|
1088
|
+
e.bysecond.forEach(function(a) {
|
|
1089
|
+
r.push(new Et(n, i, a, t));
|
|
1090
|
+
});
|
|
1091
|
+
});
|
|
1092
|
+
}), r;
|
|
1093
|
+
}
|
|
1094
|
+
function It(e) {
|
|
1095
|
+
var t = e.split(`
|
|
1096
|
+
`).map(Ae).filter(function(r) {
|
|
1097
|
+
return r !== null;
|
|
1098
|
+
});
|
|
1099
|
+
return K(K({}, t[0]), t[1]);
|
|
1100
|
+
}
|
|
1101
|
+
function Mt(e) {
|
|
1102
|
+
var t = {}, r = /DTSTART(?:;TZID=([^:=]+?))?(?::|=)([^;\s]+)/i.exec(e);
|
|
1103
|
+
if (!r)
|
|
1104
|
+
return t;
|
|
1105
|
+
var n = r[1], i = r[2];
|
|
1106
|
+
return n && (t.tzid = n), t.dtstart = $t(i), t;
|
|
1107
|
+
}
|
|
1108
|
+
function Ae(e) {
|
|
1109
|
+
if (e = e.replace(/^\s+|\s+$/, ""), !e.length)
|
|
1110
|
+
return null;
|
|
1111
|
+
var t = /^([A-Z]+?)[:;]/.exec(e.toUpperCase());
|
|
1112
|
+
if (!t)
|
|
1113
|
+
return Bt(e);
|
|
1114
|
+
var r = t[1];
|
|
1115
|
+
switch (r.toUpperCase()) {
|
|
1116
|
+
case "RRULE":
|
|
1117
|
+
case "EXRULE":
|
|
1118
|
+
return Bt(e);
|
|
1119
|
+
case "DTSTART":
|
|
1120
|
+
return Mt(e);
|
|
1121
|
+
default:
|
|
1122
|
+
throw new Error("Unsupported RFC prop ".concat(r, " in ").concat(e));
|
|
1123
|
+
}
|
|
1124
|
+
}
|
|
1125
|
+
function Bt(e) {
|
|
1126
|
+
var t = e.replace(/^RRULE:/i, ""), r = Mt(t), n = e.replace(/^(?:RRULE|EXRULE):/i, "").split(";");
|
|
1127
|
+
return n.forEach(function(i) {
|
|
1128
|
+
var a = i.split("="), s = a[0], o = a[1];
|
|
1129
|
+
switch (s.toUpperCase()) {
|
|
1130
|
+
case "FREQ":
|
|
1131
|
+
r.freq = x[o.toUpperCase()];
|
|
1132
|
+
break;
|
|
1133
|
+
case "WKST":
|
|
1134
|
+
r.wkst = Z[o.toUpperCase()];
|
|
1135
|
+
break;
|
|
1136
|
+
case "COUNT":
|
|
1137
|
+
case "INTERVAL":
|
|
1138
|
+
case "BYSETPOS":
|
|
1139
|
+
case "BYMONTH":
|
|
1140
|
+
case "BYMONTHDAY":
|
|
1141
|
+
case "BYYEARDAY":
|
|
1142
|
+
case "BYWEEKNO":
|
|
1143
|
+
case "BYHOUR":
|
|
1144
|
+
case "BYMINUTE":
|
|
1145
|
+
case "BYSECOND":
|
|
1146
|
+
var u = Ne(o), f = s.toLowerCase();
|
|
1147
|
+
r[f] = u;
|
|
1148
|
+
break;
|
|
1149
|
+
case "BYWEEKDAY":
|
|
1150
|
+
case "BYDAY":
|
|
1151
|
+
r.byweekday = $e(o);
|
|
1152
|
+
break;
|
|
1153
|
+
case "DTSTART":
|
|
1154
|
+
case "TZID":
|
|
1155
|
+
var l = Mt(e);
|
|
1156
|
+
r.tzid = l.tzid, r.dtstart = l.dtstart;
|
|
1157
|
+
break;
|
|
1158
|
+
case "UNTIL":
|
|
1159
|
+
r.until = $t(o);
|
|
1160
|
+
break;
|
|
1161
|
+
case "BYEASTER":
|
|
1162
|
+
r.byeaster = Number(o);
|
|
1163
|
+
break;
|
|
1164
|
+
default:
|
|
1165
|
+
throw new Error("Unknown RRULE property '" + s + "'");
|
|
1166
|
+
}
|
|
1167
|
+
}), r;
|
|
1168
|
+
}
|
|
1169
|
+
function Ne(e) {
|
|
1170
|
+
if (e.indexOf(",") !== -1) {
|
|
1171
|
+
var t = e.split(",");
|
|
1172
|
+
return t.map(Gt);
|
|
1173
|
+
}
|
|
1174
|
+
return Gt(e);
|
|
1175
|
+
}
|
|
1176
|
+
function Gt(e) {
|
|
1177
|
+
return /^[+-]?\d+$/.test(e) ? Number(e) : e;
|
|
1178
|
+
}
|
|
1179
|
+
function $e(e) {
|
|
1180
|
+
var t = e.split(",");
|
|
1181
|
+
return t.map(function(r) {
|
|
1182
|
+
if (r.length === 2)
|
|
1183
|
+
return Z[r];
|
|
1184
|
+
var n = r.match(/^([+-]?\d{1,2})([A-Z]{2})$/);
|
|
1185
|
+
if (!n || n.length < 3)
|
|
1186
|
+
throw new SyntaxError("Invalid weekday string: ".concat(r));
|
|
1187
|
+
var i = Number(n[1]), a = n[2], s = Z[a].weekday;
|
|
1188
|
+
return new P(s, i);
|
|
1189
|
+
});
|
|
1190
|
+
}
|
|
1191
|
+
var St = (
|
|
1192
|
+
/** @class */
|
|
1193
|
+
function() {
|
|
1194
|
+
function e(t, r) {
|
|
1195
|
+
if (isNaN(t.getTime()))
|
|
1196
|
+
throw new RangeError("Invalid date passed to DateWithZone");
|
|
1197
|
+
this.date = t, this.tzid = r;
|
|
1198
|
+
}
|
|
1199
|
+
return Object.defineProperty(e.prototype, "isUTC", {
|
|
1200
|
+
get: function() {
|
|
1201
|
+
return !this.tzid || this.tzid.toUpperCase() === "UTC";
|
|
1202
|
+
},
|
|
1203
|
+
enumerable: !1,
|
|
1204
|
+
configurable: !0
|
|
1205
|
+
}), e.prototype.toString = function() {
|
|
1206
|
+
var t = Nt(this.date.getTime(), this.isUTC);
|
|
1207
|
+
return this.isUTC ? ":".concat(t) : ";TZID=".concat(this.tzid, ":").concat(t);
|
|
1208
|
+
}, e.prototype.getTime = function() {
|
|
1209
|
+
return this.date.getTime();
|
|
1210
|
+
}, e.prototype.rezonedDate = function() {
|
|
1211
|
+
return this.isUTC ? this.date : Me(this.date, this.tzid);
|
|
1212
|
+
}, e;
|
|
1213
|
+
}()
|
|
1214
|
+
);
|
|
1215
|
+
function At(e) {
|
|
1216
|
+
for (var t = [], r = "", n = Object.keys(e), i = Object.keys(Wt), a = 0; a < n.length; a++)
|
|
1217
|
+
if (n[a] !== "tzid" && L(i, n[a])) {
|
|
1218
|
+
var s = n[a].toUpperCase(), o = e[n[a]], u = "";
|
|
1219
|
+
if (!(!A(o) || z(o) && !o.length)) {
|
|
1220
|
+
switch (s) {
|
|
1221
|
+
case "FREQ":
|
|
1222
|
+
u = b.FREQUENCIES[e.freq];
|
|
1223
|
+
break;
|
|
1224
|
+
case "WKST":
|
|
1225
|
+
G(o) ? u = new P(o).toString() : u = o.toString();
|
|
1226
|
+
break;
|
|
1227
|
+
case "BYWEEKDAY":
|
|
1228
|
+
s = "BYDAY", u = be(o).map(function(d) {
|
|
1229
|
+
return d instanceof P ? d : z(d) ? new P(d[0], d[1]) : new P(d);
|
|
1230
|
+
}).toString();
|
|
1231
|
+
break;
|
|
1232
|
+
case "DTSTART":
|
|
1233
|
+
r = Ce(o, e.tzid);
|
|
1234
|
+
break;
|
|
1235
|
+
case "UNTIL":
|
|
1236
|
+
u = Nt(o, !e.tzid);
|
|
1237
|
+
break;
|
|
1238
|
+
default:
|
|
1239
|
+
if (z(o)) {
|
|
1240
|
+
for (var f = [], l = 0; l < o.length; l++)
|
|
1241
|
+
f[l] = String(o[l]);
|
|
1242
|
+
u = f.toString();
|
|
1243
|
+
} else
|
|
1244
|
+
u = String(o);
|
|
1245
|
+
}
|
|
1246
|
+
u && t.push([s, u]);
|
|
1247
|
+
}
|
|
1248
|
+
}
|
|
1249
|
+
var m = t.map(function(d) {
|
|
1250
|
+
var w = d[0], M = d[1];
|
|
1251
|
+
return "".concat(w, "=").concat(M.toString());
|
|
1252
|
+
}).join(";"), h = "";
|
|
1253
|
+
return m !== "" && (h = "RRULE:".concat(m)), [r, h].filter(function(d) {
|
|
1254
|
+
return !!d;
|
|
1255
|
+
}).join(`
|
|
1256
|
+
`);
|
|
1257
|
+
}
|
|
1258
|
+
function Ce(e, t) {
|
|
1259
|
+
return e ? "DTSTART" + new St(new Date(e), t).toString() : "";
|
|
1260
|
+
}
|
|
1261
|
+
function Re(e, t) {
|
|
1262
|
+
return Array.isArray(e) ? !Array.isArray(t) || e.length !== t.length ? !1 : e.every(function(r, n) {
|
|
1263
|
+
return r.getTime() === t[n].getTime();
|
|
1264
|
+
}) : e instanceof Date ? t instanceof Date && e.getTime() === t.getTime() : e === t;
|
|
1265
|
+
}
|
|
1266
|
+
var We = (
|
|
1267
|
+
/** @class */
|
|
1268
|
+
function() {
|
|
1269
|
+
function e() {
|
|
1270
|
+
this.all = !1, this.before = [], this.after = [], this.between = [];
|
|
1271
|
+
}
|
|
1272
|
+
return e.prototype._cacheAdd = function(t, r, n) {
|
|
1273
|
+
r && (r = r instanceof Date ? Ut(r) : zt(r)), t === "all" ? this.all = r : (n._value = r, this[t].push(n));
|
|
1274
|
+
}, e.prototype._cacheGet = function(t, r) {
|
|
1275
|
+
var n = !1, i = r ? Object.keys(r) : [], a = function(l) {
|
|
1276
|
+
for (var m = 0; m < i.length; m++) {
|
|
1277
|
+
var h = i[m];
|
|
1278
|
+
if (!Re(r[h], l[h]))
|
|
1279
|
+
return !0;
|
|
1280
|
+
}
|
|
1281
|
+
return !1;
|
|
1282
|
+
}, s = this[t];
|
|
1283
|
+
if (t === "all")
|
|
1284
|
+
n = this.all;
|
|
1285
|
+
else if (z(s))
|
|
1286
|
+
for (var o = 0; o < s.length; o++) {
|
|
1287
|
+
var u = s[o];
|
|
1288
|
+
if (!(i.length && a(u))) {
|
|
1289
|
+
n = u._value;
|
|
1290
|
+
break;
|
|
1291
|
+
}
|
|
1292
|
+
}
|
|
1293
|
+
if (!n && this.all) {
|
|
1294
|
+
for (var f = new ht(t, r), o = 0; o < this.all.length && f.accept(this.all[o]); o++)
|
|
1295
|
+
;
|
|
1296
|
+
n = f.getValue(), this._cacheAdd(t, n, r);
|
|
1297
|
+
}
|
|
1298
|
+
return z(n) ? zt(n) : n instanceof Date ? Ut(n) : n;
|
|
1299
|
+
}, e;
|
|
1300
|
+
}()
|
|
1301
|
+
), He = c(c(c(c(c(c(c(c(c(c(c(c(c([], D(1, 31), !0), D(2, 28), !0), D(3, 31), !0), D(4, 30), !0), D(5, 31), !0), D(6, 30), !0), D(7, 31), !0), D(8, 31), !0), D(9, 30), !0), D(10, 31), !0), D(11, 30), !0), D(12, 31), !0), D(1, 7), !0), Pe = c(c(c(c(c(c(c(c(c(c(c(c(c([], D(1, 31), !0), D(2, 29), !0), D(3, 31), !0), D(4, 30), !0), D(5, 31), !0), D(6, 30), !0), D(7, 31), !0), D(8, 31), !0), D(9, 30), !0), D(10, 31), !0), D(11, 30), !0), D(12, 31), !0), D(1, 7), !0), Fe = X(1, 29), je = X(1, 30), it = X(1, 31), R = X(1, 32), ze = c(c(c(c(c(c(c(c(c(c(c(c(c([], R, !0), je, !0), R, !0), it, !0), R, !0), it, !0), R, !0), R, !0), it, !0), R, !0), it, !0), R, !0), R.slice(0, 7), !0), Ke = c(c(c(c(c(c(c(c(c(c(c(c(c([], R, !0), Fe, !0), R, !0), it, !0), R, !0), it, !0), R, !0), R, !0), it, !0), R, !0), it, !0), R, !0), R.slice(0, 7), !0), qe = X(-28, 0), Ze = X(-29, 0), at = X(-30, 0), W = X(-31, 0), Be = c(c(c(c(c(c(c(c(c(c(c(c(c([], W, !0), Ze, !0), W, !0), at, !0), W, !0), at, !0), W, !0), W, !0), at, !0), W, !0), at, !0), W, !0), W.slice(0, 7), !0), Ge = c(c(c(c(c(c(c(c(c(c(c(c(c([], W, !0), qe, !0), W, !0), at, !0), W, !0), at, !0), W, !0), W, !0), at, !0), W, !0), at, !0), W, !0), W.slice(0, 7), !0), Je = [0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335, 366], Xe = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365], Jt = function() {
|
|
1302
|
+
for (var e = [], t = 0; t < 55; t++)
|
|
1303
|
+
e = e.concat(X(7));
|
|
1304
|
+
return e;
|
|
1305
|
+
}();
|
|
1306
|
+
function Qe(e, t) {
|
|
1307
|
+
var r = st(e, 1, 1), n = vt(e) ? 366 : 365, i = vt(e + 1) ? 366 : 365, a = Lt(r), s = ct(r), o = K(K({ yearlen: n, nextyearlen: i, yearordinal: a, yearweekday: s }, Ve(e)), { wnomask: null });
|
|
1308
|
+
if (J(t.byweekno))
|
|
1309
|
+
return o;
|
|
1310
|
+
o.wnomask = D(0, n + 7);
|
|
1311
|
+
var u, f, l = u = q(7 - s + t.wkst, 7);
|
|
1312
|
+
l >= 4 ? (l = 0, f = o.yearlen + q(s - t.wkst, 7)) : f = n - l;
|
|
1313
|
+
for (var m = Math.floor(f / 7), h = q(f, 7), d = Math.floor(m + h / 4), w = 0; w < t.byweekno.length; w++) {
|
|
1314
|
+
var M = t.byweekno[w];
|
|
1315
|
+
if (M < 0 && (M += d + 1), M > 0 && M <= d) {
|
|
1316
|
+
var S = void 0;
|
|
1317
|
+
M > 1 ? (S = l + (M - 1) * 7, l !== u && (S -= 7 - u)) : S = l;
|
|
1318
|
+
for (var U = 0; U < 7 && (o.wnomask[S] = 1, S++, o.wdaymask[S] !== t.wkst); U++)
|
|
1319
|
+
;
|
|
1320
|
+
}
|
|
1321
|
+
}
|
|
1322
|
+
if (L(t.byweekno, 1)) {
|
|
1323
|
+
var S = l + d * 7;
|
|
1324
|
+
if (l !== u && (S -= 7 - u), S < n)
|
|
1325
|
+
for (var w = 0; w < 7 && (o.wnomask[S] = 1, S += 1, o.wdaymask[S] !== t.wkst); w++)
|
|
1326
|
+
;
|
|
1327
|
+
}
|
|
1328
|
+
if (l) {
|
|
1329
|
+
var j = void 0;
|
|
1330
|
+
if (L(t.byweekno, -1))
|
|
1331
|
+
j = -1;
|
|
1332
|
+
else {
|
|
1333
|
+
var B = ct(st(e - 1, 1, 1)), ot = q(7 - B.valueOf() + t.wkst, 7), Q = vt(e - 1) ? 366 : 365, H = void 0;
|
|
1334
|
+
ot >= 4 ? (ot = 0, H = Q + q(B - t.wkst, 7)) : H = n - l, j = Math.floor(52 + q(H, 7) / 4);
|
|
1335
|
+
}
|
|
1336
|
+
if (L(t.byweekno, j))
|
|
1337
|
+
for (var S = 0; S < l; S++)
|
|
1338
|
+
o.wnomask[S] = 1;
|
|
1339
|
+
}
|
|
1340
|
+
return o;
|
|
1341
|
+
}
|
|
1342
|
+
function Ve(e) {
|
|
1343
|
+
var t = vt(e) ? 366 : 365, r = st(e, 1, 1), n = ct(r);
|
|
1344
|
+
return t === 365 ? {
|
|
1345
|
+
mmask: He,
|
|
1346
|
+
mdaymask: Ke,
|
|
1347
|
+
nmdaymask: Ge,
|
|
1348
|
+
wdaymask: Jt.slice(n),
|
|
1349
|
+
mrange: Xe
|
|
1350
|
+
} : {
|
|
1351
|
+
mmask: Pe,
|
|
1352
|
+
mdaymask: ze,
|
|
1353
|
+
nmdaymask: Be,
|
|
1354
|
+
wdaymask: Jt.slice(n),
|
|
1355
|
+
mrange: Je
|
|
1356
|
+
};
|
|
1357
|
+
}
|
|
1358
|
+
function tr(e, t, r, n, i, a) {
|
|
1359
|
+
var s = {
|
|
1360
|
+
lastyear: e,
|
|
1361
|
+
lastmonth: t,
|
|
1362
|
+
nwdaymask: []
|
|
1363
|
+
}, o = [];
|
|
1364
|
+
if (a.freq === b.YEARLY)
|
|
1365
|
+
if (J(a.bymonth))
|
|
1366
|
+
o = [[0, r]];
|
|
1367
|
+
else
|
|
1368
|
+
for (var u = 0; u < a.bymonth.length; u++)
|
|
1369
|
+
t = a.bymonth[u], o.push(n.slice(t - 1, t + 1));
|
|
1370
|
+
else
|
|
1371
|
+
a.freq === b.MONTHLY && (o = [n.slice(t - 1, t + 1)]);
|
|
1372
|
+
if (J(o))
|
|
1373
|
+
return s;
|
|
1374
|
+
s.nwdaymask = D(0, r);
|
|
1375
|
+
for (var u = 0; u < o.length; u++)
|
|
1376
|
+
for (var f = o[u], l = f[0], m = f[1] - 1, h = 0; h < a.bynweekday.length; h++) {
|
|
1377
|
+
var d = void 0, w = a.bynweekday[h], M = w[0], S = w[1];
|
|
1378
|
+
S < 0 ? (d = m + (S + 1) * 7, d -= q(i[d] - M, 7)) : (d = l + (S - 1) * 7, d += q(7 - i[d] + M, 7)), l <= d && d <= m && (s.nwdaymask[d] = 1);
|
|
1379
|
+
}
|
|
1380
|
+
return s;
|
|
1381
|
+
}
|
|
1382
|
+
function er(e, t) {
|
|
1383
|
+
t === void 0 && (t = 0);
|
|
1384
|
+
var r = e % 19, n = Math.floor(e / 100), i = e % 100, a = Math.floor(n / 4), s = n % 4, o = Math.floor((n + 8) / 25), u = Math.floor((n - o + 1) / 3), f = Math.floor(19 * r + n - a - u + 15) % 30, l = Math.floor(i / 4), m = i % 4, h = Math.floor(32 + 2 * s + 2 * l - f - m) % 7, d = Math.floor((r + 11 * f + 22 * h) / 451), w = Math.floor((f + h - 7 * d + 114) / 31), M = (f + h - 7 * d + 114) % 31 + 1, S = Date.UTC(e, w - 1, M + t), U = Date.UTC(e, 0, 1);
|
|
1385
|
+
return [Math.ceil((S - U) / (1e3 * 60 * 60 * 24))];
|
|
1386
|
+
}
|
|
1387
|
+
var rr = (
|
|
1388
|
+
/** @class */
|
|
1389
|
+
function() {
|
|
1390
|
+
function e(t) {
|
|
1391
|
+
this.options = t;
|
|
1392
|
+
}
|
|
1393
|
+
return e.prototype.rebuild = function(t, r) {
|
|
1394
|
+
var n = this.options;
|
|
1395
|
+
if (t !== this.lastyear && (this.yearinfo = Qe(t, n)), $(n.bynweekday) && (r !== this.lastmonth || t !== this.lastyear)) {
|
|
1396
|
+
var i = this.yearinfo, a = i.yearlen, s = i.mrange, o = i.wdaymask;
|
|
1397
|
+
this.monthinfo = tr(t, r, a, s, o, n);
|
|
1398
|
+
}
|
|
1399
|
+
A(n.byeaster) && (this.eastermask = er(t, n.byeaster));
|
|
1400
|
+
}, Object.defineProperty(e.prototype, "lastyear", {
|
|
1401
|
+
get: function() {
|
|
1402
|
+
return this.monthinfo ? this.monthinfo.lastyear : null;
|
|
1403
|
+
},
|
|
1404
|
+
enumerable: !1,
|
|
1405
|
+
configurable: !0
|
|
1406
|
+
}), Object.defineProperty(e.prototype, "lastmonth", {
|
|
1407
|
+
get: function() {
|
|
1408
|
+
return this.monthinfo ? this.monthinfo.lastmonth : null;
|
|
1409
|
+
},
|
|
1410
|
+
enumerable: !1,
|
|
1411
|
+
configurable: !0
|
|
1412
|
+
}), Object.defineProperty(e.prototype, "yearlen", {
|
|
1413
|
+
get: function() {
|
|
1414
|
+
return this.yearinfo.yearlen;
|
|
1415
|
+
},
|
|
1416
|
+
enumerable: !1,
|
|
1417
|
+
configurable: !0
|
|
1418
|
+
}), Object.defineProperty(e.prototype, "yearordinal", {
|
|
1419
|
+
get: function() {
|
|
1420
|
+
return this.yearinfo.yearordinal;
|
|
1421
|
+
},
|
|
1422
|
+
enumerable: !1,
|
|
1423
|
+
configurable: !0
|
|
1424
|
+
}), Object.defineProperty(e.prototype, "mrange", {
|
|
1425
|
+
get: function() {
|
|
1426
|
+
return this.yearinfo.mrange;
|
|
1427
|
+
},
|
|
1428
|
+
enumerable: !1,
|
|
1429
|
+
configurable: !0
|
|
1430
|
+
}), Object.defineProperty(e.prototype, "wdaymask", {
|
|
1431
|
+
get: function() {
|
|
1432
|
+
return this.yearinfo.wdaymask;
|
|
1433
|
+
},
|
|
1434
|
+
enumerable: !1,
|
|
1435
|
+
configurable: !0
|
|
1436
|
+
}), Object.defineProperty(e.prototype, "mmask", {
|
|
1437
|
+
get: function() {
|
|
1438
|
+
return this.yearinfo.mmask;
|
|
1439
|
+
},
|
|
1440
|
+
enumerable: !1,
|
|
1441
|
+
configurable: !0
|
|
1442
|
+
}), Object.defineProperty(e.prototype, "wnomask", {
|
|
1443
|
+
get: function() {
|
|
1444
|
+
return this.yearinfo.wnomask;
|
|
1445
|
+
},
|
|
1446
|
+
enumerable: !1,
|
|
1447
|
+
configurable: !0
|
|
1448
|
+
}), Object.defineProperty(e.prototype, "nwdaymask", {
|
|
1449
|
+
get: function() {
|
|
1450
|
+
return this.monthinfo ? this.monthinfo.nwdaymask : [];
|
|
1451
|
+
},
|
|
1452
|
+
enumerable: !1,
|
|
1453
|
+
configurable: !0
|
|
1454
|
+
}), Object.defineProperty(e.prototype, "nextyearlen", {
|
|
1455
|
+
get: function() {
|
|
1456
|
+
return this.yearinfo.nextyearlen;
|
|
1457
|
+
},
|
|
1458
|
+
enumerable: !1,
|
|
1459
|
+
configurable: !0
|
|
1460
|
+
}), Object.defineProperty(e.prototype, "mdaymask", {
|
|
1461
|
+
get: function() {
|
|
1462
|
+
return this.yearinfo.mdaymask;
|
|
1463
|
+
},
|
|
1464
|
+
enumerable: !1,
|
|
1465
|
+
configurable: !0
|
|
1466
|
+
}), Object.defineProperty(e.prototype, "nmdaymask", {
|
|
1467
|
+
get: function() {
|
|
1468
|
+
return this.yearinfo.nmdaymask;
|
|
1469
|
+
},
|
|
1470
|
+
enumerable: !1,
|
|
1471
|
+
configurable: !0
|
|
1472
|
+
}), e.prototype.ydayset = function() {
|
|
1473
|
+
return [X(this.yearlen), 0, this.yearlen];
|
|
1474
|
+
}, e.prototype.mdayset = function(t, r) {
|
|
1475
|
+
for (var n = this.mrange[r - 1], i = this.mrange[r], a = D(null, this.yearlen), s = n; s < i; s++)
|
|
1476
|
+
a[s] = s;
|
|
1477
|
+
return [a, n, i];
|
|
1478
|
+
}, e.prototype.wdayset = function(t, r, n) {
|
|
1479
|
+
for (var i = D(null, this.yearlen + 7), a = Lt(st(t, r, n)) - this.yearordinal, s = a, o = 0; o < 7 && (i[a] = a, ++a, this.wdaymask[a] !== this.options.wkst); o++)
|
|
1480
|
+
;
|
|
1481
|
+
return [i, s, a];
|
|
1482
|
+
}, e.prototype.ddayset = function(t, r, n) {
|
|
1483
|
+
var i = D(null, this.yearlen), a = Lt(st(t, r, n)) - this.yearordinal;
|
|
1484
|
+
return i[a] = a, [i, a, a + 1];
|
|
1485
|
+
}, e.prototype.htimeset = function(t, r, n, i) {
|
|
1486
|
+
var a = this, s = [];
|
|
1487
|
+
return this.options.byminute.forEach(function(o) {
|
|
1488
|
+
s = s.concat(a.mtimeset(t, o, n, i));
|
|
1489
|
+
}), bt(s), s;
|
|
1490
|
+
}, e.prototype.mtimeset = function(t, r, n, i) {
|
|
1491
|
+
var a = this.options.bysecond.map(function(s) {
|
|
1492
|
+
return new Et(t, r, s, i);
|
|
1493
|
+
});
|
|
1494
|
+
return bt(a), a;
|
|
1495
|
+
}, e.prototype.stimeset = function(t, r, n, i) {
|
|
1496
|
+
return [new Et(t, r, n, i)];
|
|
1497
|
+
}, e.prototype.getdayset = function(t) {
|
|
1498
|
+
switch (t) {
|
|
1499
|
+
case x.YEARLY:
|
|
1500
|
+
return this.ydayset.bind(this);
|
|
1501
|
+
case x.MONTHLY:
|
|
1502
|
+
return this.mdayset.bind(this);
|
|
1503
|
+
case x.WEEKLY:
|
|
1504
|
+
return this.wdayset.bind(this);
|
|
1505
|
+
case x.DAILY:
|
|
1506
|
+
return this.ddayset.bind(this);
|
|
1507
|
+
default:
|
|
1508
|
+
return this.ddayset.bind(this);
|
|
1509
|
+
}
|
|
1510
|
+
}, e.prototype.gettimeset = function(t) {
|
|
1511
|
+
switch (t) {
|
|
1512
|
+
case x.HOURLY:
|
|
1513
|
+
return this.htimeset.bind(this);
|
|
1514
|
+
case x.MINUTELY:
|
|
1515
|
+
return this.mtimeset.bind(this);
|
|
1516
|
+
case x.SECONDLY:
|
|
1517
|
+
return this.stimeset.bind(this);
|
|
1518
|
+
}
|
|
1519
|
+
}, e;
|
|
1520
|
+
}()
|
|
1521
|
+
);
|
|
1522
|
+
function nr(e, t, r, n, i, a) {
|
|
1523
|
+
for (var s = [], o = 0; o < e.length; o++) {
|
|
1524
|
+
var u = void 0, f = void 0, l = e[o];
|
|
1525
|
+
l < 0 ? (u = Math.floor(l / t.length), f = q(l, t.length)) : (u = Math.floor((l - 1) / t.length), f = q(l - 1, t.length));
|
|
1526
|
+
for (var m = [], h = r; h < n; h++) {
|
|
1527
|
+
var d = a[h];
|
|
1528
|
+
A(d) && m.push(d);
|
|
1529
|
+
}
|
|
1530
|
+
var w = void 0;
|
|
1531
|
+
u < 0 ? w = m.slice(u)[0] : w = m[u];
|
|
1532
|
+
var M = t[f], S = le(i.yearordinal + w), U = de(S, M);
|
|
1533
|
+
L(s, U) || s.push(U);
|
|
1534
|
+
}
|
|
1535
|
+
return bt(s), s;
|
|
1536
|
+
}
|
|
1537
|
+
function pe(e, t) {
|
|
1538
|
+
var r = t.dtstart, n = t.freq, i = t.interval, a = t.until, s = t.bysetpos, o = t.count;
|
|
1539
|
+
if (o === 0 || i === 0)
|
|
1540
|
+
return tt(e);
|
|
1541
|
+
var u = Ue.fromDate(r), f = new rr(t);
|
|
1542
|
+
f.rebuild(u.year, u.month);
|
|
1543
|
+
for (var l = or(f, u, t); ; ) {
|
|
1544
|
+
var m = f.getdayset(n)(u.year, u.month, u.day), h = m[0], d = m[1], w = m[2], M = ar(h, d, w, f, t);
|
|
1545
|
+
if ($(s))
|
|
1546
|
+
for (var S = nr(s, l, d, w, f, h), U = 0; U < S.length; U++) {
|
|
1547
|
+
var j = S[U];
|
|
1548
|
+
if (a && j > a)
|
|
1549
|
+
return tt(e);
|
|
1550
|
+
if (j >= r) {
|
|
1551
|
+
var B = Xt(j, t);
|
|
1552
|
+
if (!e.accept(B) || o && (--o, !o))
|
|
1553
|
+
return tt(e);
|
|
1554
|
+
}
|
|
1555
|
+
}
|
|
1556
|
+
else
|
|
1557
|
+
for (var U = d; U < w; U++) {
|
|
1558
|
+
var ot = h[U];
|
|
1559
|
+
if (A(ot))
|
|
1560
|
+
for (var Q = le(f.yearordinal + ot), H = 0; H < l.length; H++) {
|
|
1561
|
+
var dt = l[H], j = de(Q, dt);
|
|
1562
|
+
if (a && j > a)
|
|
1563
|
+
return tt(e);
|
|
1564
|
+
if (j >= r) {
|
|
1565
|
+
var B = Xt(j, t);
|
|
1566
|
+
if (!e.accept(B) || o && (--o, !o))
|
|
1567
|
+
return tt(e);
|
|
1568
|
+
}
|
|
1569
|
+
}
|
|
1570
|
+
}
|
|
1571
|
+
if (t.interval === 0 || (u.add(t, M), u.year > fe))
|
|
1572
|
+
return tt(e);
|
|
1573
|
+
Rt(n) || (l = f.gettimeset(n)(u.hour, u.minute, u.second, 0)), f.rebuild(u.year, u.month);
|
|
1574
|
+
}
|
|
1575
|
+
}
|
|
1576
|
+
function ir(e, t, r) {
|
|
1577
|
+
var n = r.bymonth, i = r.byweekno, a = r.byweekday, s = r.byeaster, o = r.bymonthday, u = r.bynmonthday, f = r.byyearday;
|
|
1578
|
+
return $(n) && !L(n, e.mmask[t]) || $(i) && !e.wnomask[t] || $(a) && !L(a, e.wdaymask[t]) || $(e.nwdaymask) && !e.nwdaymask[t] || s !== null && !L(e.eastermask, t) || ($(o) || $(u)) && !L(o, e.mdaymask[t]) && !L(u, e.nmdaymask[t]) || $(f) && (t < e.yearlen && !L(f, t + 1) && !L(f, -e.yearlen + t) || t >= e.yearlen && !L(f, t + 1 - e.yearlen) && !L(f, -e.nextyearlen + t - e.yearlen));
|
|
1579
|
+
}
|
|
1580
|
+
function Xt(e, t) {
|
|
1581
|
+
return new St(e, t.tzid).rezonedDate();
|
|
1582
|
+
}
|
|
1583
|
+
function tt(e) {
|
|
1584
|
+
return e.getValue();
|
|
1585
|
+
}
|
|
1586
|
+
function ar(e, t, r, n, i) {
|
|
1587
|
+
for (var a = !1, s = t; s < r; s++) {
|
|
1588
|
+
var o = e[s];
|
|
1589
|
+
a = ir(n, o, i), a && (e[o] = null);
|
|
1590
|
+
}
|
|
1591
|
+
return a;
|
|
1592
|
+
}
|
|
1593
|
+
function or(e, t, r) {
|
|
1594
|
+
var n = r.freq, i = r.byhour, a = r.byminute, s = r.bysecond;
|
|
1595
|
+
return Rt(n) ? Ie(r) : n >= b.HOURLY && $(i) && !L(i, t.hour) || n >= b.MINUTELY && $(a) && !L(a, t.minute) || n >= b.SECONDLY && $(s) && !L(s, t.second) ? [] : e.gettimeset(n)(t.hour, t.minute, t.second, t.millisecond);
|
|
1596
|
+
}
|
|
1597
|
+
var Z = {
|
|
1598
|
+
MO: new P(0),
|
|
1599
|
+
TU: new P(1),
|
|
1600
|
+
WE: new P(2),
|
|
1601
|
+
TH: new P(3),
|
|
1602
|
+
FR: new P(4),
|
|
1603
|
+
SA: new P(5),
|
|
1604
|
+
SU: new P(6)
|
|
1605
|
+
}, Wt = {
|
|
1606
|
+
freq: x.YEARLY,
|
|
1607
|
+
dtstart: null,
|
|
1608
|
+
interval: 1,
|
|
1609
|
+
wkst: Z.MO,
|
|
1610
|
+
count: null,
|
|
1611
|
+
until: null,
|
|
1612
|
+
tzid: null,
|
|
1613
|
+
bysetpos: null,
|
|
1614
|
+
bymonth: null,
|
|
1615
|
+
bymonthday: null,
|
|
1616
|
+
bynmonthday: null,
|
|
1617
|
+
byyearday: null,
|
|
1618
|
+
byweekno: null,
|
|
1619
|
+
byweekday: null,
|
|
1620
|
+
bynweekday: null,
|
|
1621
|
+
byhour: null,
|
|
1622
|
+
byminute: null,
|
|
1623
|
+
bysecond: null,
|
|
1624
|
+
byeaster: null
|
|
1625
|
+
}, sr = Object.keys(Wt), b = (
|
|
1626
|
+
/** @class */
|
|
1627
|
+
function() {
|
|
1628
|
+
function e(t, r) {
|
|
1629
|
+
t === void 0 && (t = {}), r === void 0 && (r = !1), this._cache = r ? null : new We(), this.origOptions = me(t);
|
|
1630
|
+
var n = _e(t).parsedOptions;
|
|
1631
|
+
this.options = n;
|
|
1632
|
+
}
|
|
1633
|
+
return e.parseText = function(t, r) {
|
|
1634
|
+
return ye(t, r);
|
|
1635
|
+
}, e.fromText = function(t, r) {
|
|
1636
|
+
return Oe(t, r);
|
|
1637
|
+
}, e.fromString = function(t) {
|
|
1638
|
+
return new e(e.parseString(t) || void 0);
|
|
1639
|
+
}, e.prototype._iter = function(t) {
|
|
1640
|
+
return pe(t, this.options);
|
|
1641
|
+
}, e.prototype._cacheGet = function(t, r) {
|
|
1642
|
+
return this._cache ? this._cache._cacheGet(t, r) : !1;
|
|
1643
|
+
}, e.prototype._cacheAdd = function(t, r, n) {
|
|
1644
|
+
if (this._cache)
|
|
1645
|
+
return this._cache._cacheAdd(t, r, n);
|
|
1646
|
+
}, e.prototype.all = function(t) {
|
|
1647
|
+
if (t)
|
|
1648
|
+
return this._iter(new qt("all", {}, t));
|
|
1649
|
+
var r = this._cacheGet("all");
|
|
1650
|
+
return r === !1 && (r = this._iter(new ht("all", {})), this._cacheAdd("all", r)), r;
|
|
1651
|
+
}, e.prototype.between = function(t, r, n, i) {
|
|
1652
|
+
if (n === void 0 && (n = !1), !pt(t) || !pt(r))
|
|
1653
|
+
throw new Error("Invalid date passed in to RRule.between");
|
|
1654
|
+
var a = {
|
|
1655
|
+
before: r,
|
|
1656
|
+
after: t,
|
|
1657
|
+
inc: n
|
|
1658
|
+
};
|
|
1659
|
+
if (i)
|
|
1660
|
+
return this._iter(new qt("between", a, i));
|
|
1661
|
+
var s = this._cacheGet("between", a);
|
|
1662
|
+
return s === !1 && (s = this._iter(new ht("between", a)), this._cacheAdd("between", s, a)), s;
|
|
1663
|
+
}, e.prototype.before = function(t, r) {
|
|
1664
|
+
if (r === void 0 && (r = !1), !pt(t))
|
|
1665
|
+
throw new Error("Invalid date passed in to RRule.before");
|
|
1666
|
+
var n = { dt: t, inc: r }, i = this._cacheGet("before", n);
|
|
1667
|
+
return i === !1 && (i = this._iter(new ht("before", n)), this._cacheAdd("before", i, n)), i;
|
|
1668
|
+
}, e.prototype.after = function(t, r) {
|
|
1669
|
+
if (r === void 0 && (r = !1), !pt(t))
|
|
1670
|
+
throw new Error("Invalid date passed in to RRule.after");
|
|
1671
|
+
var n = { dt: t, inc: r }, i = this._cacheGet("after", n);
|
|
1672
|
+
return i === !1 && (i = this._iter(new ht("after", n)), this._cacheAdd("after", i, n)), i;
|
|
1673
|
+
}, e.prototype.count = function() {
|
|
1674
|
+
return this.all().length;
|
|
1675
|
+
}, e.prototype.toString = function() {
|
|
1676
|
+
return At(this.origOptions);
|
|
1677
|
+
}, e.prototype.toText = function(t, r, n) {
|
|
1678
|
+
return Ye(this, t, r, n);
|
|
1679
|
+
}, e.prototype.isFullyConvertibleToText = function() {
|
|
1680
|
+
return Le(this);
|
|
1681
|
+
}, e.prototype.clone = function() {
|
|
1682
|
+
return new e(this.origOptions);
|
|
1683
|
+
}, e.FREQUENCIES = [
|
|
1684
|
+
"YEARLY",
|
|
1685
|
+
"MONTHLY",
|
|
1686
|
+
"WEEKLY",
|
|
1687
|
+
"DAILY",
|
|
1688
|
+
"HOURLY",
|
|
1689
|
+
"MINUTELY",
|
|
1690
|
+
"SECONDLY"
|
|
1691
|
+
], e.YEARLY = x.YEARLY, e.MONTHLY = x.MONTHLY, e.WEEKLY = x.WEEKLY, e.DAILY = x.DAILY, e.HOURLY = x.HOURLY, e.MINUTELY = x.MINUTELY, e.SECONDLY = x.SECONDLY, e.MO = Z.MO, e.TU = Z.TU, e.WE = Z.WE, e.TH = Z.TH, e.FR = Z.FR, e.SA = Z.SA, e.SU = Z.SU, e.parseString = It, e.optionsToString = At, e;
|
|
1692
|
+
}()
|
|
1693
|
+
);
|
|
1694
|
+
function ur(e, t, r, n, i, a) {
|
|
1695
|
+
var s = {}, o = e.accept;
|
|
1696
|
+
function u(h, d) {
|
|
1697
|
+
r.forEach(function(w) {
|
|
1698
|
+
w.between(h, d, !0).forEach(function(M) {
|
|
1699
|
+
s[Number(M)] = !0;
|
|
1700
|
+
});
|
|
1701
|
+
});
|
|
1702
|
+
}
|
|
1703
|
+
i.forEach(function(h) {
|
|
1704
|
+
var d = new St(h, a).rezonedDate();
|
|
1705
|
+
s[Number(d)] = !0;
|
|
1706
|
+
}), e.accept = function(h) {
|
|
1707
|
+
var d = Number(h);
|
|
1708
|
+
return isNaN(d) ? o.call(this, h) : !s[d] && (u(new Date(d - 1), new Date(d + 1)), !s[d]) ? (s[d] = !0, o.call(this, h)) : !0;
|
|
1709
|
+
}, e.method === "between" && (u(e.args.after, e.args.before), e.accept = function(h) {
|
|
1710
|
+
var d = Number(h);
|
|
1711
|
+
return s[d] ? !0 : (s[d] = !0, o.call(this, h));
|
|
1712
|
+
});
|
|
1713
|
+
for (var f = 0; f < n.length; f++) {
|
|
1714
|
+
var l = new St(n[f], a).rezonedDate();
|
|
1715
|
+
if (!e.accept(new Date(l.getTime())))
|
|
1716
|
+
break;
|
|
1717
|
+
}
|
|
1718
|
+
t.forEach(function(h) {
|
|
1719
|
+
pe(e, h.options);
|
|
1720
|
+
});
|
|
1721
|
+
var m = e._result;
|
|
1722
|
+
switch (bt(m), e.method) {
|
|
1723
|
+
case "all":
|
|
1724
|
+
case "between":
|
|
1725
|
+
return m;
|
|
1726
|
+
case "before":
|
|
1727
|
+
return m.length && m[m.length - 1] || null;
|
|
1728
|
+
case "after":
|
|
1729
|
+
default:
|
|
1730
|
+
return m.length && m[0] || null;
|
|
1731
|
+
}
|
|
1732
|
+
}
|
|
1733
|
+
var Qt = {
|
|
1734
|
+
dtstart: null,
|
|
1735
|
+
cache: !1,
|
|
1736
|
+
unfold: !1,
|
|
1737
|
+
forceset: !1,
|
|
1738
|
+
compatible: !1,
|
|
1739
|
+
tzid: null
|
|
1740
|
+
};
|
|
1741
|
+
function fr(e, t) {
|
|
1742
|
+
var r = [], n = [], i = [], a = [], s = Mt(e), o = s.dtstart, u = s.tzid, f = yr(e, t.unfold);
|
|
1743
|
+
return f.forEach(function(l) {
|
|
1744
|
+
var m;
|
|
1745
|
+
if (l) {
|
|
1746
|
+
var h = dr(l), d = h.name, w = h.parms, M = h.value;
|
|
1747
|
+
switch (d.toUpperCase()) {
|
|
1748
|
+
case "RRULE":
|
|
1749
|
+
if (w.length)
|
|
1750
|
+
throw new Error("unsupported RRULE parm: ".concat(w.join(",")));
|
|
1751
|
+
r.push(It(l));
|
|
1752
|
+
break;
|
|
1753
|
+
case "RDATE":
|
|
1754
|
+
var S = (m = /RDATE(?:;TZID=([^:=]+))?/i.exec(l)) !== null && m !== void 0 ? m : [], U = S[1];
|
|
1755
|
+
U && !u && (u = U), n = n.concat(te(M, w));
|
|
1756
|
+
break;
|
|
1757
|
+
case "EXRULE":
|
|
1758
|
+
if (w.length)
|
|
1759
|
+
throw new Error("unsupported EXRULE parm: ".concat(w.join(",")));
|
|
1760
|
+
i.push(It(M));
|
|
1761
|
+
break;
|
|
1762
|
+
case "EXDATE":
|
|
1763
|
+
a = a.concat(te(M, w));
|
|
1764
|
+
break;
|
|
1765
|
+
case "DTSTART":
|
|
1766
|
+
break;
|
|
1767
|
+
default:
|
|
1768
|
+
throw new Error("unsupported property: " + d);
|
|
1769
|
+
}
|
|
1770
|
+
}
|
|
1771
|
+
}), {
|
|
1772
|
+
dtstart: o,
|
|
1773
|
+
tzid: u,
|
|
1774
|
+
rrulevals: r,
|
|
1775
|
+
rdatevals: n,
|
|
1776
|
+
exrulevals: i,
|
|
1777
|
+
exdatevals: a
|
|
1778
|
+
};
|
|
1779
|
+
}
|
|
1780
|
+
function hr(e, t) {
|
|
1781
|
+
var r = fr(e, t), n = r.rrulevals, i = r.rdatevals, a = r.exrulevals, s = r.exdatevals, o = r.dtstart, u = r.tzid, f = t.cache === !1;
|
|
1782
|
+
if (t.compatible && (t.forceset = !0, t.unfold = !0), t.forceset || n.length > 1 || i.length || a.length || s.length) {
|
|
1783
|
+
var l = new pr(f);
|
|
1784
|
+
return l.dtstart(o), l.tzid(u || void 0), n.forEach(function(h) {
|
|
1785
|
+
l.rrule(new b(Ot(h, o, u), f));
|
|
1786
|
+
}), i.forEach(function(h) {
|
|
1787
|
+
l.rdate(h);
|
|
1788
|
+
}), a.forEach(function(h) {
|
|
1789
|
+
l.exrule(new b(Ot(h, o, u), f));
|
|
1790
|
+
}), s.forEach(function(h) {
|
|
1791
|
+
l.exdate(h);
|
|
1792
|
+
}), t.compatible && t.dtstart && l.rdate(o), l;
|
|
1793
|
+
}
|
|
1794
|
+
var m = n[0] || {};
|
|
1795
|
+
return new b(Ot(m, m.dtstart || t.dtstart || o, m.tzid || t.tzid || u), f);
|
|
1796
|
+
}
|
|
1797
|
+
function Vt(e, t) {
|
|
1798
|
+
return t === void 0 && (t = {}), hr(e, cr(t));
|
|
1799
|
+
}
|
|
1800
|
+
function Ot(e, t, r) {
|
|
1801
|
+
return K(K({}, e), { dtstart: t, tzid: r });
|
|
1802
|
+
}
|
|
1803
|
+
function cr(e) {
|
|
1804
|
+
var t = [], r = Object.keys(e), n = Object.keys(Qt);
|
|
1805
|
+
if (r.forEach(function(i) {
|
|
1806
|
+
L(n, i) || t.push(i);
|
|
1807
|
+
}), t.length)
|
|
1808
|
+
throw new Error("Invalid options: " + t.join(", "));
|
|
1809
|
+
return K(K({}, Qt), e);
|
|
1810
|
+
}
|
|
1811
|
+
function lr(e) {
|
|
1812
|
+
if (e.indexOf(":") === -1)
|
|
1813
|
+
return {
|
|
1814
|
+
name: "RRULE",
|
|
1815
|
+
value: e
|
|
1816
|
+
};
|
|
1817
|
+
var t = we(e, ":", 1), r = t[0], n = t[1];
|
|
1818
|
+
return {
|
|
1819
|
+
name: r,
|
|
1820
|
+
value: n
|
|
1821
|
+
};
|
|
1822
|
+
}
|
|
1823
|
+
function dr(e) {
|
|
1824
|
+
var t = lr(e), r = t.name, n = t.value, i = r.split(";");
|
|
1825
|
+
if (!i)
|
|
1826
|
+
throw new Error("empty property name");
|
|
1827
|
+
return {
|
|
1828
|
+
name: i[0].toUpperCase(),
|
|
1829
|
+
parms: i.slice(1),
|
|
1830
|
+
value: n
|
|
1831
|
+
};
|
|
1832
|
+
}
|
|
1833
|
+
function yr(e, t) {
|
|
1834
|
+
if (t === void 0 && (t = !1), e = e && e.trim(), !e)
|
|
1835
|
+
throw new Error("Invalid empty string");
|
|
1836
|
+
if (!t)
|
|
1837
|
+
return e.split(/\s/);
|
|
1838
|
+
for (var r = e.split(`
|
|
1839
|
+
`), n = 0; n < r.length; ) {
|
|
1840
|
+
var i = r[n] = r[n].replace(/\s+$/g, "");
|
|
1841
|
+
i ? n > 0 && i[0] === " " ? (r[n - 1] += i.slice(1), r.splice(n, 1)) : n += 1 : r.splice(n, 1);
|
|
1842
|
+
}
|
|
1843
|
+
return r;
|
|
1844
|
+
}
|
|
1845
|
+
function mr(e) {
|
|
1846
|
+
e.forEach(function(t) {
|
|
1847
|
+
if (!/(VALUE=DATE(-TIME)?)|(TZID=)/.test(t))
|
|
1848
|
+
throw new Error("unsupported RDATE/EXDATE parm: " + t);
|
|
1849
|
+
});
|
|
1850
|
+
}
|
|
1851
|
+
function te(e, t) {
|
|
1852
|
+
return mr(t), e.split(",").map(function(r) {
|
|
1853
|
+
return $t(r);
|
|
1854
|
+
});
|
|
1855
|
+
}
|
|
1856
|
+
function ee(e) {
|
|
1857
|
+
var t = this;
|
|
1858
|
+
return function(r) {
|
|
1859
|
+
if (r !== void 0 && (t["_".concat(e)] = r), t["_".concat(e)] !== void 0)
|
|
1860
|
+
return t["_".concat(e)];
|
|
1861
|
+
for (var n = 0; n < t._rrule.length; n++) {
|
|
1862
|
+
var i = t._rrule[n].origOptions[e];
|
|
1863
|
+
if (i)
|
|
1864
|
+
return i;
|
|
1865
|
+
}
|
|
1866
|
+
};
|
|
1867
|
+
}
|
|
1868
|
+
var pr = (
|
|
1869
|
+
/** @class */
|
|
1870
|
+
function(e) {
|
|
1871
|
+
Ct(t, e);
|
|
1872
|
+
function t(r) {
|
|
1873
|
+
r === void 0 && (r = !1);
|
|
1874
|
+
var n = e.call(this, {}, r) || this;
|
|
1875
|
+
return n.dtstart = ee.apply(n, ["dtstart"]), n.tzid = ee.apply(n, ["tzid"]), n._rrule = [], n._rdate = [], n._exrule = [], n._exdate = [], n;
|
|
1876
|
+
}
|
|
1877
|
+
return t.prototype._iter = function(r) {
|
|
1878
|
+
return ur(r, this._rrule, this._exrule, this._rdate, this._exdate, this.tzid());
|
|
1879
|
+
}, t.prototype.rrule = function(r) {
|
|
1880
|
+
re(r, this._rrule);
|
|
1881
|
+
}, t.prototype.exrule = function(r) {
|
|
1882
|
+
re(r, this._exrule);
|
|
1883
|
+
}, t.prototype.rdate = function(r) {
|
|
1884
|
+
ne(r, this._rdate);
|
|
1885
|
+
}, t.prototype.exdate = function(r) {
|
|
1886
|
+
ne(r, this._exdate);
|
|
1887
|
+
}, t.prototype.rrules = function() {
|
|
1888
|
+
return this._rrule.map(function(r) {
|
|
1889
|
+
return Vt(r.toString());
|
|
1890
|
+
});
|
|
1891
|
+
}, t.prototype.exrules = function() {
|
|
1892
|
+
return this._exrule.map(function(r) {
|
|
1893
|
+
return Vt(r.toString());
|
|
1894
|
+
});
|
|
1895
|
+
}, t.prototype.rdates = function() {
|
|
1896
|
+
return this._rdate.map(function(r) {
|
|
1897
|
+
return new Date(r.getTime());
|
|
1898
|
+
});
|
|
1899
|
+
}, t.prototype.exdates = function() {
|
|
1900
|
+
return this._exdate.map(function(r) {
|
|
1901
|
+
return new Date(r.getTime());
|
|
1902
|
+
});
|
|
1903
|
+
}, t.prototype.valueOf = function() {
|
|
1904
|
+
var r = [];
|
|
1905
|
+
return !this._rrule.length && this._dtstart && (r = r.concat(At({ dtstart: this._dtstart }))), this._rrule.forEach(function(n) {
|
|
1906
|
+
r = r.concat(n.toString().split(`
|
|
1907
|
+
`));
|
|
1908
|
+
}), this._exrule.forEach(function(n) {
|
|
1909
|
+
r = r.concat(n.toString().split(`
|
|
1910
|
+
`).map(function(i) {
|
|
1911
|
+
return i.replace(/^RRULE:/, "EXRULE:");
|
|
1912
|
+
}).filter(function(i) {
|
|
1913
|
+
return !/^DTSTART/.test(i);
|
|
1914
|
+
}));
|
|
1915
|
+
}), this._rdate.length && r.push(ie("RDATE", this._rdate, this.tzid())), this._exdate.length && r.push(ie("EXDATE", this._exdate, this.tzid())), r;
|
|
1916
|
+
}, t.prototype.toString = function() {
|
|
1917
|
+
return this.valueOf().join(`
|
|
1918
|
+
`);
|
|
1919
|
+
}, t.prototype.clone = function() {
|
|
1920
|
+
var r = new t(!!this._cache);
|
|
1921
|
+
return this._rrule.forEach(function(n) {
|
|
1922
|
+
return r.rrule(n.clone());
|
|
1923
|
+
}), this._exrule.forEach(function(n) {
|
|
1924
|
+
return r.exrule(n.clone());
|
|
1925
|
+
}), this._rdate.forEach(function(n) {
|
|
1926
|
+
return r.rdate(new Date(n.getTime()));
|
|
1927
|
+
}), this._exdate.forEach(function(n) {
|
|
1928
|
+
return r.exdate(new Date(n.getTime()));
|
|
1929
|
+
}), r;
|
|
1930
|
+
}, t;
|
|
1931
|
+
}(b)
|
|
1932
|
+
);
|
|
1933
|
+
function re(e, t) {
|
|
1934
|
+
if (!(e instanceof b))
|
|
1935
|
+
throw new TypeError(String(e) + " is not RRule instance");
|
|
1936
|
+
L(t.map(String), String(e)) || t.push(e);
|
|
1937
|
+
}
|
|
1938
|
+
function ne(e, t) {
|
|
1939
|
+
if (!(e instanceof Date))
|
|
1940
|
+
throw new TypeError(String(e) + " is not Date instance");
|
|
1941
|
+
L(t.map(Number), Number(e)) || (t.push(e), bt(t));
|
|
1942
|
+
}
|
|
1943
|
+
function ie(e, t, r) {
|
|
1944
|
+
var n = !r || r.toUpperCase() === "UTC", i = n ? "".concat(e, ":") : "".concat(e, ";TZID=").concat(r, ":"), a = t.map(function(s) {
|
|
1945
|
+
return Nt(s.valueOf(), n);
|
|
1946
|
+
}).join(",");
|
|
1947
|
+
return "".concat(i).concat(a);
|
|
1948
|
+
}
|
|
1949
|
+
function wr(...e) {
|
|
1950
|
+
window && window.localStorage && window.localStorage.getItem("debug") && console.debug(...e);
|
|
1951
|
+
}
|
|
1952
|
+
function gr(...e) {
|
|
1953
|
+
console.error(...e);
|
|
1954
|
+
}
|
|
1955
|
+
function kr() {
|
|
1956
|
+
return Math.random().toString(36).substr(2, 9);
|
|
1957
|
+
}
|
|
1958
|
+
function Tr(e) {
|
|
1959
|
+
return e.toString().replace(/^on/, "");
|
|
1960
|
+
}
|
|
1961
|
+
function Er(e) {
|
|
1962
|
+
const t = new Date(e * 1e3), r = /* @__PURE__ */ new Date(), n = new Date(r.getFullYear(), r.getMonth(), r.getDate());
|
|
1963
|
+
return t >= n ? new Intl.DateTimeFormat("default", {
|
|
1964
|
+
hour: "numeric",
|
|
1965
|
+
minute: "numeric",
|
|
1966
|
+
hour12: !0
|
|
1967
|
+
}).format(t) : new Intl.DateTimeFormat("default", {
|
|
1968
|
+
month: "short",
|
|
1969
|
+
day: "numeric"
|
|
1970
|
+
}).format(t);
|
|
1971
|
+
}
|
|
1972
|
+
function Mr(e) {
|
|
1973
|
+
return e.name ? `${e.name} - ${e.email}` : e.email;
|
|
1974
|
+
}
|
|
1975
|
+
function Sr(e, t = "", r = 1, n = 3) {
|
|
1976
|
+
const i = e.find((u) => {
|
|
1977
|
+
var f;
|
|
1978
|
+
return ((f = u.email) == null ? void 0 : f.toLowerCase()) === t.toLowerCase();
|
|
1979
|
+
}), a = e.filter((u) => {
|
|
1980
|
+
var f;
|
|
1981
|
+
return ((f = u.email) == null ? void 0 : f.toLowerCase()) !== t.toLowerCase();
|
|
1982
|
+
}), s = a.length, o = a.slice(0, n).map((u) => u.name || u.email).join(", ");
|
|
1983
|
+
return s === 0 ? i ? "me" : "" : s === 1 ? i && r > 1 ? `me, ${o}` : o : s === 2 ? i ? `me, ${o}` : `${o}` : i ? `me, ${o}, +${s - n}` : `${o}, +${s - n}`;
|
|
1984
|
+
}
|
|
1985
|
+
const ae = [
|
|
1986
|
+
{ amount: 60, name: "seconds" },
|
|
1987
|
+
{ amount: 60, name: "minutes" },
|
|
1988
|
+
{ amount: 24, name: "hours" },
|
|
1989
|
+
{ amount: 7, name: "days" },
|
|
1990
|
+
{ amount: 4.34524, name: "weeks" },
|
|
1991
|
+
{ amount: 12, name: "months" },
|
|
1992
|
+
{ amount: Number.POSITIVE_INFINITY, name: "years" }
|
|
1993
|
+
], Dr = (e) => {
|
|
1994
|
+
const t = new Intl.RelativeTimeFormat(void 0, {
|
|
1995
|
+
numeric: "auto"
|
|
1996
|
+
}), r = /* @__PURE__ */ new Date();
|
|
1997
|
+
let n = (e.getTime() - r.getTime()) / 1e3;
|
|
1998
|
+
for (let i = 0; i <= ae.length; i++) {
|
|
1999
|
+
const a = ae[i];
|
|
2000
|
+
if (Math.abs(n) < a.amount)
|
|
2001
|
+
return t.format(Math.round(n), a.name);
|
|
2002
|
+
n /= a.amount;
|
|
2003
|
+
}
|
|
2004
|
+
};
|
|
2005
|
+
function xr(e) {
|
|
2006
|
+
return new Date(e.getFullYear(), e.getMonth() + 1, 0);
|
|
2007
|
+
}
|
|
2008
|
+
function Or(e) {
|
|
2009
|
+
return new Date(e.getFullYear(), e.getMonth(), 1);
|
|
2010
|
+
}
|
|
2011
|
+
function Yr(e, t) {
|
|
2012
|
+
return e.getFullYear() === t.getFullYear() && e.getMonth() === t.getMonth() && e.getDate() === t.getDate();
|
|
2013
|
+
}
|
|
2014
|
+
function Lr(e, t) {
|
|
2015
|
+
return e.getFullYear() === t.getFullYear() && e.getMonth() === t.getMonth();
|
|
2016
|
+
}
|
|
2017
|
+
function Ur(e) {
|
|
2018
|
+
return e.replace(/\w\S*/g, (t) => t.charAt(0).toUpperCase() + t.substr(1).toLowerCase());
|
|
2019
|
+
}
|
|
2020
|
+
function _r(e) {
|
|
2021
|
+
return e.replace("CATEGORY_", "").replace(/_/g, " ");
|
|
2022
|
+
}
|
|
2023
|
+
function vr(e) {
|
|
2024
|
+
return /<[^>]*>/g.test(e) ? "html" : "plain";
|
|
2025
|
+
}
|
|
2026
|
+
function Ir(e) {
|
|
2027
|
+
var i, a;
|
|
2028
|
+
const t = e.headers, r = t && ((i = t.find((s) => s.name === "Content-Type")) == null ? void 0 : i.value) || "", n = t && ((a = t.find((s) => s.name === "Content-Disposition")) == null ? void 0 : a.value) || "";
|
|
2029
|
+
return !!(r.includes("text/html") || n.includes("inline") || e.body && vr(e.body) === "html");
|
|
2030
|
+
}
|
|
2031
|
+
function Ar(e) {
|
|
2032
|
+
let n = e.split(`
|
|
2033
|
+
`).filter((a) => a.trim().length > 0).map((a) => `<p>${a}</p>`).join("");
|
|
2034
|
+
const i = /((?:https?|ftp):\/\/[^\s]+)/g;
|
|
2035
|
+
return n = n.replace(i, '<a href="$1">$1</a>'), n;
|
|
2036
|
+
}
|
|
2037
|
+
function Nr(e) {
|
|
2038
|
+
return new DOMParser().parseFromString(e, "text/html").body.textContent || "";
|
|
2039
|
+
}
|
|
2040
|
+
const $r = (e) => e === "" ? !0 : /^(0[0-9]|1[0-2]|^[0-9])(:[0-5][0-9][ap]m?|:[0-5][0-9]|:[0-5]|:)?$/i.test(e), Cr = (e) => /^(0[1-9]|1[0-2]):([0-5][0-9])(am|pm)$/i.test(e);
|
|
2041
|
+
function Rr(e = null) {
|
|
2042
|
+
let t = se();
|
|
2043
|
+
e && (t = e);
|
|
2044
|
+
const r = t.minute() % 15;
|
|
2045
|
+
let n;
|
|
2046
|
+
return r !== 0 ? n = t.add(15 - r, "minute") : n = t, n;
|
|
2047
|
+
}
|
|
2048
|
+
function Wr(e) {
|
|
2049
|
+
const t = se();
|
|
2050
|
+
let r = "";
|
|
2051
|
+
const [n, i] = e.split(":");
|
|
2052
|
+
n.length === 1 ? r += "0" + n : n.length === 2 && (r += n), r += ":", i === void 0 || i == "" ? r += "00" : i.length === 1 ? r += i + "0" : r += i;
|
|
2053
|
+
const a = r.slice(-1);
|
|
2054
|
+
return a === "a" && (r += "m"), a === "p" && (r += "m"), r.slice(-1) !== "m" && (r.split(":")[0] == "00" ? r += "am" : r += t.format("a")), r;
|
|
2055
|
+
}
|
|
2056
|
+
function Hr(e) {
|
|
2057
|
+
const [t, r] = e.split(":").map((o) => parseInt(o, 10));
|
|
2058
|
+
let n = t;
|
|
2059
|
+
const i = n >= 12 ? "pm" : "am";
|
|
2060
|
+
n = n % 12, n = n || 12;
|
|
2061
|
+
const a = n.toString().padStart(2, "0"), s = r.toString().padStart(2, "0");
|
|
2062
|
+
return `${a}:${s}${i}`;
|
|
2063
|
+
}
|
|
2064
|
+
function Pr(e) {
|
|
2065
|
+
const [t, r] = e.split(/(am|pm)/i), [n, i] = t.split(":").map((s) => parseInt(s, 10));
|
|
2066
|
+
let a = n;
|
|
2067
|
+
return r.toLowerCase() === "pm" && a < 12 ? a += 12 : r.toLowerCase() === "am" && a === 12 && (a = 0), `${a.toString().padStart(2, "0")}:${i.toString().padStart(2, "0")}`;
|
|
2068
|
+
}
|
|
2069
|
+
function Fr(e) {
|
|
2070
|
+
const [t, r] = e.match(/(\d+):(\d+)(am|pm)/).slice(1);
|
|
2071
|
+
let n = parseInt(t, 10) * 60 + parseInt(r, 10);
|
|
2072
|
+
return e.includes("pm") && parseInt(t, 10) < 12 && (n += 12 * 60), e.includes("am") && parseInt(t, 10) === 12 && (n -= 12 * 60), n;
|
|
2073
|
+
}
|
|
2074
|
+
function jr(e) {
|
|
2075
|
+
const t = Math.floor(e / 60), r = e % 60;
|
|
2076
|
+
return `${t}:${r < 10 ? "0" : ""}${r}`;
|
|
2077
|
+
}
|
|
2078
|
+
function zr() {
|
|
2079
|
+
const e = navigator.userAgent, t = /Chrome/.test(e) && /Google Inc/.test(navigator.vendor), r = /Safari/.test(e) && /Apple Computer/.test(navigator.vendor), n = /Firefox/.test(e), i = /Trident/.test(e), a = /Edge/.test(e);
|
|
2080
|
+
return t && /Edg/.test(e) ? "Edge (Chromium)" : t ? "Chrome" : r ? "Safari" : n ? "Firefox" : i ? "Internet Explorer" : a ? "Edge (Legacy)" : "Unknown";
|
|
2081
|
+
}
|
|
2082
|
+
export {
|
|
2083
|
+
zr as A,
|
|
2084
|
+
gr as B,
|
|
2085
|
+
Sr as a,
|
|
2086
|
+
Er as b,
|
|
2087
|
+
Tr as c,
|
|
2088
|
+
wr as d,
|
|
2089
|
+
Dr as e,
|
|
2090
|
+
_r as f,
|
|
2091
|
+
Mr as g,
|
|
2092
|
+
Ir as h,
|
|
2093
|
+
vr as i,
|
|
2094
|
+
Nr as j,
|
|
2095
|
+
xr as k,
|
|
2096
|
+
Or as l,
|
|
2097
|
+
Yr as m,
|
|
2098
|
+
Lr as n,
|
|
2099
|
+
Fr as o,
|
|
2100
|
+
Ar as p,
|
|
2101
|
+
Hr as q,
|
|
2102
|
+
Pr as r,
|
|
2103
|
+
se as s,
|
|
2104
|
+
Ur as t,
|
|
2105
|
+
kr as u,
|
|
2106
|
+
Wr as v,
|
|
2107
|
+
$r as w,
|
|
2108
|
+
Rr as x,
|
|
2109
|
+
Cr as y,
|
|
2110
|
+
jr as z
|
|
2111
|
+
};
|