@ucap-llm/ai-ui 1.1.6 → 1.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. package/_basePickBy-7d00d05e.mjs +153 -0
  2. package/_baseUniq-1876be04.mjs +440 -0
  3. package/ai-ui.es.js +11 -78207
  4. package/ai-ui.umd.js +2701 -143
  5. package/arc-bb1e7b28.mjs +85 -0
  6. package/architecture-4AB2E3PP-26f07d27.mjs +10 -0
  7. package/architectureDiagram-IEHRJDOE-535e4958.mjs +4640 -0
  8. package/blockDiagram-JOT3LUYC-e5536854.mjs +2251 -0
  9. package/c4Diagram-VJAJSXHY-311741c3.mjs +1583 -0
  10. package/channel-5d097975.mjs +5 -0
  11. package/chunk-4BMEZGHF-55420838.mjs +9 -0
  12. package/chunk-A2AXSNBT-5f9de039.mjs +1373 -0
  13. package/chunk-AEK57VVT-bd6e836f.mjs +1416 -0
  14. package/chunk-D6G4REZN-69cf348a.mjs +64 -0
  15. package/chunk-RZ5BOZE2-ebe3985e.mjs +24 -0
  16. package/chunk-XZIHB7SX-ed9a9d65.mjs +15 -0
  17. package/classDiagram-GIVACNV2-4d61f06d.mjs +18 -0
  18. package/classDiagram-v2-COTLJTTW-4d61f06d.mjs +18 -0
  19. package/clone-44064c55.mjs +8 -0
  20. package/cytoscape.esm-bb479f88.mjs +18232 -0
  21. package/dagre-OKDRZEBW-0574359b.mjs +448 -0
  22. package/diagram-SSKATNLV-f4dd04b2.mjs +225 -0
  23. package/diagram-VNBRO52H-f77f925a.mjs +130 -0
  24. package/erDiagram-Q7BY3M3F-8213684f.mjs +843 -0
  25. package/flowDiagram-4HSFHLVR-1decdff6.mjs +1624 -0
  26. package/ganttDiagram-APWFNJXF-461381a5.mjs +2521 -0
  27. package/gitGraph-O2Q2CXLX-d961db16.mjs +10 -0
  28. package/gitGraphDiagram-7IBYFJ6S-be6c39c3.mjs +716 -0
  29. package/graph-7ba79f74.mjs +249 -0
  30. package/index-f5aac161.mjs +93487 -0
  31. package/info-4N47QTOZ-615527c9.mjs +10 -0
  32. package/infoDiagram-PH2N3AL5-064df479.mjs +26 -0
  33. package/init-f9637058.mjs +16 -0
  34. package/journeyDiagram-U35MCT3I-94c54b39.mjs +811 -0
  35. package/kanban-definition-NDS4AKOZ-58a05db1.mjs +720 -0
  36. package/katex-2e45926a.mjs +11700 -0
  37. package/layout-c953b0e7.mjs +1344 -0
  38. package/linear-3c81794f.mjs +447 -0
  39. package/mermaid-parser.core-7afd2b2f.mjs +12845 -0
  40. package/mindmap-definition-ALO5MXBD-60e68e28.mjs +3222 -0
  41. package/ordinal-980380c7.mjs +65 -0
  42. package/package.json +1 -1
  43. package/packet-KVYON367-4b5a305e.mjs +10 -0
  44. package/pie-R6RNRRYF-0f27d16d.mjs +10 -0
  45. package/pieDiagram-IB7DONF6-66cebf11.mjs +167 -0
  46. package/quadrantDiagram-7GDLP6J5-f2cbfc79.mjs +1027 -0
  47. package/radar-MK3ICKWK-9e1913d7.mjs +10 -0
  48. package/requirementDiagram-KVF5MWMF-36d316c2.mjs +853 -0
  49. package/sankeyDiagram-QLVOVGJD-76245efb.mjs +826 -0
  50. package/sequenceDiagram-X6HHIX6F-a0ec0021.mjs +2283 -0
  51. package/stateDiagram-DGXRK772-e6387816.mjs +274 -0
  52. package/stateDiagram-v2-YXO3MK2T-f011ada4.mjs +18 -0
  53. package/style.css +1 -1
  54. package/timeline-definition-BDJGKUSR-a62514a7.mjs +806 -0
  55. package/xychartDiagram-VJFVF3MP-1b807048.mjs +1306 -0
@@ -0,0 +1,2521 @@
1
+ import { aI as Te, aH as be, aV as $e, aW as Je, aX as Ke, aY as tn, aZ as Un, a_ as re, a$ as En, _ as h, b0 as at, d as _t, s as Ln, g as An, n as In, o as Wn, c as On, b as Hn, t as Nn, m as Vn, l as Qt, j as Zt, k as zn, e as Pn, u as Rn } from "./index-f5aac161.mjs";
2
+ import { b as Bn, t as Ie, c as Zn, a as Xn, l as qn } from "./linear-3c81794f.mjs";
3
+ import { i as Gn } from "./init-f9637058.mjs";
4
+ import "vue";
5
+ var en = { exports: {} };
6
+ (function(t, e) {
7
+ (function(n, r) {
8
+ t.exports = r();
9
+ })(be, function() {
10
+ return function(n, r) {
11
+ var a = r.prototype, i = a.format;
12
+ a.format = function(s) {
13
+ var k = this, M = this.$locale();
14
+ if (!this.isValid())
15
+ return i.bind(this)(s);
16
+ var T = this.$utils(), g = (s || "YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g, function(U) {
17
+ switch (U) {
18
+ case "Q":
19
+ return Math.ceil((k.$M + 1) / 3);
20
+ case "Do":
21
+ return M.ordinal(k.$D);
22
+ case "gggg":
23
+ return k.weekYear();
24
+ case "GGGG":
25
+ return k.isoWeekYear();
26
+ case "wo":
27
+ return M.ordinal(k.week(), "W");
28
+ case "w":
29
+ case "ww":
30
+ return T.s(k.week(), U === "w" ? 1 : 2, "0");
31
+ case "W":
32
+ case "WW":
33
+ return T.s(k.isoWeek(), U === "W" ? 1 : 2, "0");
34
+ case "k":
35
+ case "kk":
36
+ return T.s(String(k.$H === 0 ? 24 : k.$H), U === "k" ? 1 : 2, "0");
37
+ case "X":
38
+ return Math.floor(k.$d.getTime() / 1e3);
39
+ case "x":
40
+ return k.$d.getTime();
41
+ case "z":
42
+ return "[" + k.offsetName() + "]";
43
+ case "zzz":
44
+ return "[" + k.offsetName("long") + "]";
45
+ default:
46
+ return U;
47
+ }
48
+ });
49
+ return i.bind(this)(g);
50
+ };
51
+ };
52
+ });
53
+ })(en);
54
+ var jn = en.exports;
55
+ const Qn = /* @__PURE__ */ Te(jn);
56
+ var nn = { exports: {} };
57
+ (function(t, e) {
58
+ (function(n, r) {
59
+ t.exports = r();
60
+ })(be, function() {
61
+ var n = { LTS: "h:mm:ss A", LT: "h:mm A", L: "MM/DD/YYYY", LL: "MMMM D, YYYY", LLL: "MMMM D, YYYY h:mm A", LLLL: "dddd, MMMM D, YYYY h:mm A" }, r = /(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g, a = /\d/, i = /\d\d/, s = /\d\d?/, k = /\d*[^-_:/,()\s\d]+/, M = {}, T = function(C) {
62
+ return (C = +C) + (C > 68 ? 1900 : 2e3);
63
+ }, g = function(C) {
64
+ return function(I) {
65
+ this[C] = +I;
66
+ };
67
+ }, U = [/[+-]\d\d:?(\d\d)?|Z/, function(C) {
68
+ (this.zone || (this.zone = {})).offset = function(I) {
69
+ if (!I || I === "Z")
70
+ return 0;
71
+ var V = I.match(/([+-]|\d\d)/g), W = 60 * V[1] + (+V[2] || 0);
72
+ return W === 0 ? 0 : V[0] === "+" ? -W : W;
73
+ }(C);
74
+ }], D = function(C) {
75
+ var I = M[C];
76
+ return I && (I.indexOf ? I : I.s.concat(I.f));
77
+ }, b = function(C, I) {
78
+ var V, W = M.meridiem;
79
+ if (W) {
80
+ for (var Z = 1; Z <= 24; Z += 1)
81
+ if (C.indexOf(W(Z, 0, I)) > -1) {
82
+ V = Z > 12;
83
+ break;
84
+ }
85
+ } else
86
+ V = C === (I ? "pm" : "PM");
87
+ return V;
88
+ }, q = { A: [k, function(C) {
89
+ this.afternoon = b(C, !1);
90
+ }], a: [k, function(C) {
91
+ this.afternoon = b(C, !0);
92
+ }], Q: [a, function(C) {
93
+ this.month = 3 * (C - 1) + 1;
94
+ }], S: [a, function(C) {
95
+ this.milliseconds = 100 * +C;
96
+ }], SS: [i, function(C) {
97
+ this.milliseconds = 10 * +C;
98
+ }], SSS: [/\d{3}/, function(C) {
99
+ this.milliseconds = +C;
100
+ }], s: [s, g("seconds")], ss: [s, g("seconds")], m: [s, g("minutes")], mm: [s, g("minutes")], H: [s, g("hours")], h: [s, g("hours")], HH: [s, g("hours")], hh: [s, g("hours")], D: [s, g("day")], DD: [i, g("day")], Do: [k, function(C) {
101
+ var I = M.ordinal, V = C.match(/\d+/);
102
+ if (this.day = V[0], I)
103
+ for (var W = 1; W <= 31; W += 1)
104
+ I(W).replace(/\[|\]/g, "") === C && (this.day = W);
105
+ }], w: [s, g("week")], ww: [i, g("week")], M: [s, g("month")], MM: [i, g("month")], MMM: [k, function(C) {
106
+ var I = D("months"), V = (D("monthsShort") || I.map(function(W) {
107
+ return W.slice(0, 3);
108
+ })).indexOf(C) + 1;
109
+ if (V < 1)
110
+ throw new Error();
111
+ this.month = V % 12 || V;
112
+ }], MMMM: [k, function(C) {
113
+ var I = D("months").indexOf(C) + 1;
114
+ if (I < 1)
115
+ throw new Error();
116
+ this.month = I % 12 || I;
117
+ }], Y: [/[+-]?\d+/, g("year")], YY: [i, function(C) {
118
+ this.year = T(C);
119
+ }], YYYY: [/\d{4}/, g("year")], Z: U, ZZ: U };
120
+ function O(C) {
121
+ var I, V;
122
+ I = C, V = M && M.formats;
123
+ for (var W = (C = I.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, function(_, S, p) {
124
+ var Y = p && p.toUpperCase();
125
+ return S || V[p] || n[p] || V[Y].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, function(l, f, y) {
126
+ return f || y.slice(1);
127
+ });
128
+ })).match(r), Z = W.length, Q = 0; Q < Z; Q += 1) {
129
+ var w = W[Q], H = q[w], x = H && H[0], F = H && H[1];
130
+ W[Q] = F ? { regex: x, parser: F } : w.replace(/^\[|\]$/g, "");
131
+ }
132
+ return function(_) {
133
+ for (var S = {}, p = 0, Y = 0; p < Z; p += 1) {
134
+ var l = W[p];
135
+ if (typeof l == "string")
136
+ Y += l.length;
137
+ else {
138
+ var f = l.regex, y = l.parser, m = _.slice(Y), E = f.exec(m)[0];
139
+ y.call(S, E), _ = _.replace(E, "");
140
+ }
141
+ }
142
+ return function(c) {
143
+ var d = c.afternoon;
144
+ if (d !== void 0) {
145
+ var o = c.hours;
146
+ d ? o < 12 && (c.hours += 12) : o === 12 && (c.hours = 0), delete c.afternoon;
147
+ }
148
+ }(S), S;
149
+ };
150
+ }
151
+ return function(C, I, V) {
152
+ V.p.customParseFormat = !0, C && C.parseTwoDigitYear && (T = C.parseTwoDigitYear);
153
+ var W = I.prototype, Z = W.parse;
154
+ W.parse = function(Q) {
155
+ var w = Q.date, H = Q.utc, x = Q.args;
156
+ this.$u = H;
157
+ var F = x[1];
158
+ if (typeof F == "string") {
159
+ var _ = x[2] === !0, S = x[3] === !0, p = _ || S, Y = x[2];
160
+ S && (Y = x[2]), M = this.$locale(), !_ && Y && (M = V.Ls[Y]), this.$d = function(m, E, c, d) {
161
+ try {
162
+ if (["x", "X"].indexOf(E) > -1)
163
+ return new Date((E === "X" ? 1e3 : 1) * m);
164
+ var o = O(E)(m), P = o.year, z = o.month, R = o.day, K = o.hours, G = o.minutes, $ = o.seconds, it = o.milliseconds, v = o.zone, A = o.week, N = /* @__PURE__ */ new Date(), u = R || (P || z ? 1 : N.getDate()), J = P || N.getFullYear(), L = 0;
165
+ P && !z || (L = z > 0 ? z - 1 : N.getMonth());
166
+ var j, X = K || 0, rt = G || 0, st = $ || 0, pt = it || 0;
167
+ return v ? new Date(Date.UTC(J, L, u, X, rt, st, pt + 60 * v.offset * 1e3)) : c ? new Date(Date.UTC(J, L, u, X, rt, st, pt)) : (j = new Date(J, L, u, X, rt, st, pt), A && (j = d(j).week(A).toDate()), j);
168
+ } catch {
169
+ return /* @__PURE__ */ new Date("");
170
+ }
171
+ }(w, F, H, V), this.init(), Y && Y !== !0 && (this.$L = this.locale(Y).$L), p && w != this.format(F) && (this.$d = /* @__PURE__ */ new Date("")), M = {};
172
+ } else if (F instanceof Array)
173
+ for (var l = F.length, f = 1; f <= l; f += 1) {
174
+ x[1] = F[f - 1];
175
+ var y = V.apply(this, x);
176
+ if (y.isValid()) {
177
+ this.$d = y.$d, this.$L = y.$L, this.init();
178
+ break;
179
+ }
180
+ f === l && (this.$d = /* @__PURE__ */ new Date(""));
181
+ }
182
+ else
183
+ Z.call(this, Q);
184
+ };
185
+ };
186
+ });
187
+ })(nn);
188
+ var $n = nn.exports;
189
+ const Jn = /* @__PURE__ */ Te($n);
190
+ function Kn(t, e) {
191
+ let n;
192
+ if (e === void 0)
193
+ for (const r of t)
194
+ r != null && (n < r || n === void 0 && r >= r) && (n = r);
195
+ else {
196
+ let r = -1;
197
+ for (let a of t)
198
+ (a = e(a, ++r, t)) != null && (n < a || n === void 0 && a >= a) && (n = a);
199
+ }
200
+ return n;
201
+ }
202
+ function tr(t, e) {
203
+ let n;
204
+ if (e === void 0)
205
+ for (const r of t)
206
+ r != null && (n > r || n === void 0 && r >= r) && (n = r);
207
+ else {
208
+ let r = -1;
209
+ for (let a of t)
210
+ (a = e(a, ++r, t)) != null && (n > a || n === void 0 && a >= a) && (n = a);
211
+ }
212
+ return n;
213
+ }
214
+ function er(t) {
215
+ return t;
216
+ }
217
+ var qt = 1, ae = 2, me = 3, Xt = 4, We = 1e-6;
218
+ function nr(t) {
219
+ return "translate(" + t + ",0)";
220
+ }
221
+ function rr(t) {
222
+ return "translate(0," + t + ")";
223
+ }
224
+ function ar(t) {
225
+ return (e) => +t(e);
226
+ }
227
+ function ir(t, e) {
228
+ return e = Math.max(0, t.bandwidth() - e * 2) / 2, t.round() && (e = Math.round(e)), (n) => +t(n) + e;
229
+ }
230
+ function sr() {
231
+ return !this.__axis;
232
+ }
233
+ function rn(t, e) {
234
+ var n = [], r = null, a = null, i = 6, s = 6, k = 3, M = typeof window < "u" && window.devicePixelRatio > 1 ? 0 : 0.5, T = t === qt || t === Xt ? -1 : 1, g = t === Xt || t === ae ? "x" : "y", U = t === qt || t === me ? nr : rr;
235
+ function D(b) {
236
+ var q = r ?? (e.ticks ? e.ticks.apply(e, n) : e.domain()), O = a ?? (e.tickFormat ? e.tickFormat.apply(e, n) : er), C = Math.max(i, 0) + k, I = e.range(), V = +I[0] + M, W = +I[I.length - 1] + M, Z = (e.bandwidth ? ir : ar)(e.copy(), M), Q = b.selection ? b.selection() : b, w = Q.selectAll(".domain").data([null]), H = Q.selectAll(".tick").data(q, e).order(), x = H.exit(), F = H.enter().append("g").attr("class", "tick"), _ = H.select("line"), S = H.select("text");
237
+ w = w.merge(w.enter().insert("path", ".tick").attr("class", "domain").attr("stroke", "currentColor")), H = H.merge(F), _ = _.merge(F.append("line").attr("stroke", "currentColor").attr(g + "2", T * i)), S = S.merge(F.append("text").attr("fill", "currentColor").attr(g, T * C).attr("dy", t === qt ? "0em" : t === me ? "0.71em" : "0.32em")), b !== Q && (w = w.transition(b), H = H.transition(b), _ = _.transition(b), S = S.transition(b), x = x.transition(b).attr("opacity", We).attr("transform", function(p) {
238
+ return isFinite(p = Z(p)) ? U(p + M) : this.getAttribute("transform");
239
+ }), F.attr("opacity", We).attr("transform", function(p) {
240
+ var Y = this.parentNode.__axis;
241
+ return U((Y && isFinite(Y = Y(p)) ? Y : Z(p)) + M);
242
+ })), x.remove(), w.attr("d", t === Xt || t === ae ? s ? "M" + T * s + "," + V + "H" + M + "V" + W + "H" + T * s : "M" + M + "," + V + "V" + W : s ? "M" + V + "," + T * s + "V" + M + "H" + W + "V" + T * s : "M" + V + "," + M + "H" + W), H.attr("opacity", 1).attr("transform", function(p) {
243
+ return U(Z(p) + M);
244
+ }), _.attr(g + "2", T * i), S.attr(g, T * C).text(O), Q.filter(sr).attr("fill", "none").attr("font-size", 10).attr("font-family", "sans-serif").attr("text-anchor", t === ae ? "start" : t === Xt ? "end" : "middle"), Q.each(function() {
245
+ this.__axis = Z;
246
+ });
247
+ }
248
+ return D.scale = function(b) {
249
+ return arguments.length ? (e = b, D) : e;
250
+ }, D.ticks = function() {
251
+ return n = Array.from(arguments), D;
252
+ }, D.tickArguments = function(b) {
253
+ return arguments.length ? (n = b == null ? [] : Array.from(b), D) : n.slice();
254
+ }, D.tickValues = function(b) {
255
+ return arguments.length ? (r = b == null ? null : Array.from(b), D) : r && r.slice();
256
+ }, D.tickFormat = function(b) {
257
+ return arguments.length ? (a = b, D) : a;
258
+ }, D.tickSize = function(b) {
259
+ return arguments.length ? (i = s = +b, D) : i;
260
+ }, D.tickSizeInner = function(b) {
261
+ return arguments.length ? (i = +b, D) : i;
262
+ }, D.tickSizeOuter = function(b) {
263
+ return arguments.length ? (s = +b, D) : s;
264
+ }, D.tickPadding = function(b) {
265
+ return arguments.length ? (k = +b, D) : k;
266
+ }, D.offset = function(b) {
267
+ return arguments.length ? (M = +b, D) : M;
268
+ }, D;
269
+ }
270
+ function or(t) {
271
+ return rn(qt, t);
272
+ }
273
+ function cr(t) {
274
+ return rn(me, t);
275
+ }
276
+ const lr = Math.PI / 180, ur = 180 / Math.PI, $t = 18, an = 0.96422, sn = 1, on = 0.82521, cn = 4 / 29, St = 6 / 29, ln = 3 * St * St, fr = St * St * St;
277
+ function un(t) {
278
+ if (t instanceof ft)
279
+ return new ft(t.l, t.a, t.b, t.opacity);
280
+ if (t instanceof dt)
281
+ return fn(t);
282
+ t instanceof Ke || (t = Un(t));
283
+ var e = ce(t.r), n = ce(t.g), r = ce(t.b), a = ie((0.2225045 * e + 0.7168786 * n + 0.0606169 * r) / sn), i, s;
284
+ return e === n && n === r ? i = s = a : (i = ie((0.4360747 * e + 0.3850649 * n + 0.1430804 * r) / an), s = ie((0.0139322 * e + 0.0971045 * n + 0.7141733 * r) / on)), new ft(116 * a - 16, 500 * (i - a), 200 * (a - s), t.opacity);
285
+ }
286
+ function hr(t, e, n, r) {
287
+ return arguments.length === 1 ? un(t) : new ft(t, e, n, r ?? 1);
288
+ }
289
+ function ft(t, e, n, r) {
290
+ this.l = +t, this.a = +e, this.b = +n, this.opacity = +r;
291
+ }
292
+ $e(ft, hr, Je(tn, {
293
+ brighter(t) {
294
+ return new ft(this.l + $t * (t ?? 1), this.a, this.b, this.opacity);
295
+ },
296
+ darker(t) {
297
+ return new ft(this.l - $t * (t ?? 1), this.a, this.b, this.opacity);
298
+ },
299
+ rgb() {
300
+ var t = (this.l + 16) / 116, e = isNaN(this.a) ? t : t + this.a / 500, n = isNaN(this.b) ? t : t - this.b / 200;
301
+ return e = an * se(e), t = sn * se(t), n = on * se(n), new Ke(
302
+ oe(3.1338561 * e - 1.6168667 * t - 0.4906146 * n),
303
+ oe(-0.9787684 * e + 1.9161415 * t + 0.033454 * n),
304
+ oe(0.0719453 * e - 0.2289914 * t + 1.4052427 * n),
305
+ this.opacity
306
+ );
307
+ }
308
+ }));
309
+ function ie(t) {
310
+ return t > fr ? Math.pow(t, 1 / 3) : t / ln + cn;
311
+ }
312
+ function se(t) {
313
+ return t > St ? t * t * t : ln * (t - cn);
314
+ }
315
+ function oe(t) {
316
+ return 255 * (t <= 31308e-7 ? 12.92 * t : 1.055 * Math.pow(t, 1 / 2.4) - 0.055);
317
+ }
318
+ function ce(t) {
319
+ return (t /= 255) <= 0.04045 ? t / 12.92 : Math.pow((t + 0.055) / 1.055, 2.4);
320
+ }
321
+ function dr(t) {
322
+ if (t instanceof dt)
323
+ return new dt(t.h, t.c, t.l, t.opacity);
324
+ if (t instanceof ft || (t = un(t)), t.a === 0 && t.b === 0)
325
+ return new dt(NaN, 0 < t.l && t.l < 100 ? 0 : NaN, t.l, t.opacity);
326
+ var e = Math.atan2(t.b, t.a) * ur;
327
+ return new dt(e < 0 ? e + 360 : e, Math.sqrt(t.a * t.a + t.b * t.b), t.l, t.opacity);
328
+ }
329
+ function ge(t, e, n, r) {
330
+ return arguments.length === 1 ? dr(t) : new dt(t, e, n, r ?? 1);
331
+ }
332
+ function dt(t, e, n, r) {
333
+ this.h = +t, this.c = +e, this.l = +n, this.opacity = +r;
334
+ }
335
+ function fn(t) {
336
+ if (isNaN(t.h))
337
+ return new ft(t.l, 0, 0, t.opacity);
338
+ var e = t.h * lr;
339
+ return new ft(t.l, Math.cos(e) * t.c, Math.sin(e) * t.c, t.opacity);
340
+ }
341
+ $e(dt, ge, Je(tn, {
342
+ brighter(t) {
343
+ return new dt(this.h, this.c, this.l + $t * (t ?? 1), this.opacity);
344
+ },
345
+ darker(t) {
346
+ return new dt(this.h, this.c, this.l - $t * (t ?? 1), this.opacity);
347
+ },
348
+ rgb() {
349
+ return fn(this).rgb();
350
+ }
351
+ }));
352
+ function mr(t) {
353
+ return function(e, n) {
354
+ var r = t((e = ge(e)).h, (n = ge(n)).h), a = re(e.c, n.c), i = re(e.l, n.l), s = re(e.opacity, n.opacity);
355
+ return function(k) {
356
+ return e.h = r(k), e.c = a(k), e.l = i(k), e.opacity = s(k), e + "";
357
+ };
358
+ };
359
+ }
360
+ const gr = mr(En);
361
+ function yr(t, e) {
362
+ t = t.slice();
363
+ var n = 0, r = t.length - 1, a = t[n], i = t[r], s;
364
+ return i < a && (s = n, n = r, r = s, s = a, a = i, i = s), t[n] = e.floor(a), t[r] = e.ceil(i), t;
365
+ }
366
+ const le = /* @__PURE__ */ new Date(), ue = /* @__PURE__ */ new Date();
367
+ function et(t, e, n, r) {
368
+ function a(i) {
369
+ return t(i = arguments.length === 0 ? /* @__PURE__ */ new Date() : /* @__PURE__ */ new Date(+i)), i;
370
+ }
371
+ return a.floor = (i) => (t(i = /* @__PURE__ */ new Date(+i)), i), a.ceil = (i) => (t(i = new Date(i - 1)), e(i, 1), t(i), i), a.round = (i) => {
372
+ const s = a(i), k = a.ceil(i);
373
+ return i - s < k - i ? s : k;
374
+ }, a.offset = (i, s) => (e(i = /* @__PURE__ */ new Date(+i), s == null ? 1 : Math.floor(s)), i), a.range = (i, s, k) => {
375
+ const M = [];
376
+ if (i = a.ceil(i), k = k == null ? 1 : Math.floor(k), !(i < s) || !(k > 0))
377
+ return M;
378
+ let T;
379
+ do
380
+ M.push(T = /* @__PURE__ */ new Date(+i)), e(i, k), t(i);
381
+ while (T < i && i < s);
382
+ return M;
383
+ }, a.filter = (i) => et((s) => {
384
+ if (s >= s)
385
+ for (; t(s), !i(s); )
386
+ s.setTime(s - 1);
387
+ }, (s, k) => {
388
+ if (s >= s)
389
+ if (k < 0)
390
+ for (; ++k <= 0; )
391
+ for (; e(s, -1), !i(s); )
392
+ ;
393
+ else
394
+ for (; --k >= 0; )
395
+ for (; e(s, 1), !i(s); )
396
+ ;
397
+ }), n && (a.count = (i, s) => (le.setTime(+i), ue.setTime(+s), t(le), t(ue), Math.floor(n(le, ue))), a.every = (i) => (i = Math.floor(i), !isFinite(i) || !(i > 0) ? null : i > 1 ? a.filter(r ? (s) => r(s) % i === 0 : (s) => a.count(0, s) % i === 0) : a)), a;
398
+ }
399
+ const Yt = et(() => {
400
+ }, (t, e) => {
401
+ t.setTime(+t + e);
402
+ }, (t, e) => e - t);
403
+ Yt.every = (t) => (t = Math.floor(t), !isFinite(t) || !(t > 0) ? null : t > 1 ? et((e) => {
404
+ e.setTime(Math.floor(e / t) * t);
405
+ }, (e, n) => {
406
+ e.setTime(+e + n * t);
407
+ }, (e, n) => (n - e) / t) : Yt);
408
+ Yt.range;
409
+ const mt = 1e3, ct = mt * 60, gt = ct * 60, yt = gt * 24, xe = yt * 7, Oe = yt * 30, fe = yt * 365, vt = et((t) => {
410
+ t.setTime(t - t.getMilliseconds());
411
+ }, (t, e) => {
412
+ t.setTime(+t + e * mt);
413
+ }, (t, e) => (e - t) / mt, (t) => t.getUTCSeconds());
414
+ vt.range;
415
+ const Wt = et((t) => {
416
+ t.setTime(t - t.getMilliseconds() - t.getSeconds() * mt);
417
+ }, (t, e) => {
418
+ t.setTime(+t + e * ct);
419
+ }, (t, e) => (e - t) / ct, (t) => t.getMinutes());
420
+ Wt.range;
421
+ const kr = et((t) => {
422
+ t.setUTCSeconds(0, 0);
423
+ }, (t, e) => {
424
+ t.setTime(+t + e * ct);
425
+ }, (t, e) => (e - t) / ct, (t) => t.getUTCMinutes());
426
+ kr.range;
427
+ const Ot = et((t) => {
428
+ t.setTime(t - t.getMilliseconds() - t.getSeconds() * mt - t.getMinutes() * ct);
429
+ }, (t, e) => {
430
+ t.setTime(+t + e * gt);
431
+ }, (t, e) => (e - t) / gt, (t) => t.getHours());
432
+ Ot.range;
433
+ const pr = et((t) => {
434
+ t.setUTCMinutes(0, 0, 0);
435
+ }, (t, e) => {
436
+ t.setTime(+t + e * gt);
437
+ }, (t, e) => (e - t) / gt, (t) => t.getUTCHours());
438
+ pr.range;
439
+ const Tt = et(
440
+ (t) => t.setHours(0, 0, 0, 0),
441
+ (t, e) => t.setDate(t.getDate() + e),
442
+ (t, e) => (e - t - (e.getTimezoneOffset() - t.getTimezoneOffset()) * ct) / yt,
443
+ (t) => t.getDate() - 1
444
+ );
445
+ Tt.range;
446
+ const we = et((t) => {
447
+ t.setUTCHours(0, 0, 0, 0);
448
+ }, (t, e) => {
449
+ t.setUTCDate(t.getUTCDate() + e);
450
+ }, (t, e) => (e - t) / yt, (t) => t.getUTCDate() - 1);
451
+ we.range;
452
+ const vr = et((t) => {
453
+ t.setUTCHours(0, 0, 0, 0);
454
+ }, (t, e) => {
455
+ t.setUTCDate(t.getUTCDate() + e);
456
+ }, (t, e) => (e - t) / yt, (t) => Math.floor(t / yt));
457
+ vr.range;
458
+ function wt(t) {
459
+ return et((e) => {
460
+ e.setDate(e.getDate() - (e.getDay() + 7 - t) % 7), e.setHours(0, 0, 0, 0);
461
+ }, (e, n) => {
462
+ e.setDate(e.getDate() + n * 7);
463
+ }, (e, n) => (n - e - (n.getTimezoneOffset() - e.getTimezoneOffset()) * ct) / xe);
464
+ }
465
+ const Vt = wt(0), Ht = wt(1), hn = wt(2), dn = wt(3), bt = wt(4), mn = wt(5), gn = wt(6);
466
+ Vt.range;
467
+ Ht.range;
468
+ hn.range;
469
+ dn.range;
470
+ bt.range;
471
+ mn.range;
472
+ gn.range;
473
+ function Dt(t) {
474
+ return et((e) => {
475
+ e.setUTCDate(e.getUTCDate() - (e.getUTCDay() + 7 - t) % 7), e.setUTCHours(0, 0, 0, 0);
476
+ }, (e, n) => {
477
+ e.setUTCDate(e.getUTCDate() + n * 7);
478
+ }, (e, n) => (n - e) / xe);
479
+ }
480
+ const yn = Dt(0), Jt = Dt(1), Tr = Dt(2), br = Dt(3), Ut = Dt(4), xr = Dt(5), wr = Dt(6);
481
+ yn.range;
482
+ Jt.range;
483
+ Tr.range;
484
+ br.range;
485
+ Ut.range;
486
+ xr.range;
487
+ wr.range;
488
+ const Nt = et((t) => {
489
+ t.setDate(1), t.setHours(0, 0, 0, 0);
490
+ }, (t, e) => {
491
+ t.setMonth(t.getMonth() + e);
492
+ }, (t, e) => e.getMonth() - t.getMonth() + (e.getFullYear() - t.getFullYear()) * 12, (t) => t.getMonth());
493
+ Nt.range;
494
+ const Dr = et((t) => {
495
+ t.setUTCDate(1), t.setUTCHours(0, 0, 0, 0);
496
+ }, (t, e) => {
497
+ t.setUTCMonth(t.getUTCMonth() + e);
498
+ }, (t, e) => e.getUTCMonth() - t.getUTCMonth() + (e.getUTCFullYear() - t.getUTCFullYear()) * 12, (t) => t.getUTCMonth());
499
+ Dr.range;
500
+ const kt = et((t) => {
501
+ t.setMonth(0, 1), t.setHours(0, 0, 0, 0);
502
+ }, (t, e) => {
503
+ t.setFullYear(t.getFullYear() + e);
504
+ }, (t, e) => e.getFullYear() - t.getFullYear(), (t) => t.getFullYear());
505
+ kt.every = (t) => !isFinite(t = Math.floor(t)) || !(t > 0) ? null : et((e) => {
506
+ e.setFullYear(Math.floor(e.getFullYear() / t) * t), e.setMonth(0, 1), e.setHours(0, 0, 0, 0);
507
+ }, (e, n) => {
508
+ e.setFullYear(e.getFullYear() + n * t);
509
+ });
510
+ kt.range;
511
+ const xt = et((t) => {
512
+ t.setUTCMonth(0, 1), t.setUTCHours(0, 0, 0, 0);
513
+ }, (t, e) => {
514
+ t.setUTCFullYear(t.getUTCFullYear() + e);
515
+ }, (t, e) => e.getUTCFullYear() - t.getUTCFullYear(), (t) => t.getUTCFullYear());
516
+ xt.every = (t) => !isFinite(t = Math.floor(t)) || !(t > 0) ? null : et((e) => {
517
+ e.setUTCFullYear(Math.floor(e.getUTCFullYear() / t) * t), e.setUTCMonth(0, 1), e.setUTCHours(0, 0, 0, 0);
518
+ }, (e, n) => {
519
+ e.setUTCFullYear(e.getUTCFullYear() + n * t);
520
+ });
521
+ xt.range;
522
+ function Cr(t, e, n, r, a, i) {
523
+ const s = [
524
+ [vt, 1, mt],
525
+ [vt, 5, 5 * mt],
526
+ [vt, 15, 15 * mt],
527
+ [vt, 30, 30 * mt],
528
+ [i, 1, ct],
529
+ [i, 5, 5 * ct],
530
+ [i, 15, 15 * ct],
531
+ [i, 30, 30 * ct],
532
+ [a, 1, gt],
533
+ [a, 3, 3 * gt],
534
+ [a, 6, 6 * gt],
535
+ [a, 12, 12 * gt],
536
+ [r, 1, yt],
537
+ [r, 2, 2 * yt],
538
+ [n, 1, xe],
539
+ [e, 1, Oe],
540
+ [e, 3, 3 * Oe],
541
+ [t, 1, fe]
542
+ ];
543
+ function k(T, g, U) {
544
+ const D = g < T;
545
+ D && ([T, g] = [g, T]);
546
+ const b = U && typeof U.range == "function" ? U : M(T, g, U), q = b ? b.range(T, +g + 1) : [];
547
+ return D ? q.reverse() : q;
548
+ }
549
+ function M(T, g, U) {
550
+ const D = Math.abs(g - T) / U, b = Bn(([, , C]) => C).right(s, D);
551
+ if (b === s.length)
552
+ return t.every(Ie(T / fe, g / fe, U));
553
+ if (b === 0)
554
+ return Yt.every(Math.max(Ie(T, g, U), 1));
555
+ const [q, O] = s[D / s[b - 1][2] < s[b][2] / D ? b - 1 : b];
556
+ return q.every(O);
557
+ }
558
+ return [k, M];
559
+ }
560
+ const [Mr, _r] = Cr(kt, Nt, Vt, Tt, Ot, Wt);
561
+ function he(t) {
562
+ if (0 <= t.y && t.y < 100) {
563
+ var e = new Date(-1, t.m, t.d, t.H, t.M, t.S, t.L);
564
+ return e.setFullYear(t.y), e;
565
+ }
566
+ return new Date(t.y, t.m, t.d, t.H, t.M, t.S, t.L);
567
+ }
568
+ function de(t) {
569
+ if (0 <= t.y && t.y < 100) {
570
+ var e = new Date(Date.UTC(-1, t.m, t.d, t.H, t.M, t.S, t.L));
571
+ return e.setUTCFullYear(t.y), e;
572
+ }
573
+ return new Date(Date.UTC(t.y, t.m, t.d, t.H, t.M, t.S, t.L));
574
+ }
575
+ function Lt(t, e, n) {
576
+ return { y: t, m: e, d: n, H: 0, M: 0, S: 0, L: 0 };
577
+ }
578
+ function Sr(t) {
579
+ var e = t.dateTime, n = t.date, r = t.time, a = t.periods, i = t.days, s = t.shortDays, k = t.months, M = t.shortMonths, T = At(a), g = It(a), U = At(i), D = It(i), b = At(s), q = It(s), O = At(k), C = It(k), I = At(M), V = It(M), W = {
580
+ a: m,
581
+ A: E,
582
+ b: c,
583
+ B: d,
584
+ c: null,
585
+ d: Re,
586
+ e: Re,
587
+ f: $r,
588
+ g: oa,
589
+ G: la,
590
+ H: Gr,
591
+ I: jr,
592
+ j: Qr,
593
+ L: kn,
594
+ m: Jr,
595
+ M: Kr,
596
+ p: o,
597
+ q: P,
598
+ Q: Xe,
599
+ s: qe,
600
+ S: ta,
601
+ u: ea,
602
+ U: na,
603
+ V: ra,
604
+ w: aa,
605
+ W: ia,
606
+ x: null,
607
+ X: null,
608
+ y: sa,
609
+ Y: ca,
610
+ Z: ua,
611
+ "%": Ze
612
+ }, Z = {
613
+ a: z,
614
+ A: R,
615
+ b: K,
616
+ B: G,
617
+ c: null,
618
+ d: Be,
619
+ e: Be,
620
+ f: ma,
621
+ g: Da,
622
+ G: Ma,
623
+ H: fa,
624
+ I: ha,
625
+ j: da,
626
+ L: vn,
627
+ m: ga,
628
+ M: ya,
629
+ p: $,
630
+ q: it,
631
+ Q: Xe,
632
+ s: qe,
633
+ S: ka,
634
+ u: pa,
635
+ U: va,
636
+ V: Ta,
637
+ w: ba,
638
+ W: xa,
639
+ x: null,
640
+ X: null,
641
+ y: wa,
642
+ Y: Ca,
643
+ Z: _a,
644
+ "%": Ze
645
+ }, Q = {
646
+ a: _,
647
+ A: S,
648
+ b: p,
649
+ B: Y,
650
+ c: l,
651
+ d: ze,
652
+ e: ze,
653
+ f: Br,
654
+ g: Ve,
655
+ G: Ne,
656
+ H: Pe,
657
+ I: Pe,
658
+ j: Vr,
659
+ L: Rr,
660
+ m: Nr,
661
+ M: zr,
662
+ p: F,
663
+ q: Hr,
664
+ Q: Xr,
665
+ s: qr,
666
+ S: Pr,
667
+ u: Lr,
668
+ U: Ar,
669
+ V: Ir,
670
+ w: Er,
671
+ W: Wr,
672
+ x: f,
673
+ X: y,
674
+ y: Ve,
675
+ Y: Ne,
676
+ Z: Or,
677
+ "%": Zr
678
+ };
679
+ W.x = w(n, W), W.X = w(r, W), W.c = w(e, W), Z.x = w(n, Z), Z.X = w(r, Z), Z.c = w(e, Z);
680
+ function w(v, A) {
681
+ return function(N) {
682
+ var u = [], J = -1, L = 0, j = v.length, X, rt, st;
683
+ for (N instanceof Date || (N = /* @__PURE__ */ new Date(+N)); ++J < j; )
684
+ v.charCodeAt(J) === 37 && (u.push(v.slice(L, J)), (rt = He[X = v.charAt(++J)]) != null ? X = v.charAt(++J) : rt = X === "e" ? " " : "0", (st = A[X]) && (X = st(N, rt)), u.push(X), L = J + 1);
685
+ return u.push(v.slice(L, J)), u.join("");
686
+ };
687
+ }
688
+ function H(v, A) {
689
+ return function(N) {
690
+ var u = Lt(1900, void 0, 1), J = x(u, v, N += "", 0), L, j;
691
+ if (J != N.length)
692
+ return null;
693
+ if ("Q" in u)
694
+ return new Date(u.Q);
695
+ if ("s" in u)
696
+ return new Date(u.s * 1e3 + ("L" in u ? u.L : 0));
697
+ if (A && !("Z" in u) && (u.Z = 0), "p" in u && (u.H = u.H % 12 + u.p * 12), u.m === void 0 && (u.m = "q" in u ? u.q : 0), "V" in u) {
698
+ if (u.V < 1 || u.V > 53)
699
+ return null;
700
+ "w" in u || (u.w = 1), "Z" in u ? (L = de(Lt(u.y, 0, 1)), j = L.getUTCDay(), L = j > 4 || j === 0 ? Jt.ceil(L) : Jt(L), L = we.offset(L, (u.V - 1) * 7), u.y = L.getUTCFullYear(), u.m = L.getUTCMonth(), u.d = L.getUTCDate() + (u.w + 6) % 7) : (L = he(Lt(u.y, 0, 1)), j = L.getDay(), L = j > 4 || j === 0 ? Ht.ceil(L) : Ht(L), L = Tt.offset(L, (u.V - 1) * 7), u.y = L.getFullYear(), u.m = L.getMonth(), u.d = L.getDate() + (u.w + 6) % 7);
701
+ } else
702
+ ("W" in u || "U" in u) && ("w" in u || (u.w = "u" in u ? u.u % 7 : "W" in u ? 1 : 0), j = "Z" in u ? de(Lt(u.y, 0, 1)).getUTCDay() : he(Lt(u.y, 0, 1)).getDay(), u.m = 0, u.d = "W" in u ? (u.w + 6) % 7 + u.W * 7 - (j + 5) % 7 : u.w + u.U * 7 - (j + 6) % 7);
703
+ return "Z" in u ? (u.H += u.Z / 100 | 0, u.M += u.Z % 100, de(u)) : he(u);
704
+ };
705
+ }
706
+ function x(v, A, N, u) {
707
+ for (var J = 0, L = A.length, j = N.length, X, rt; J < L; ) {
708
+ if (u >= j)
709
+ return -1;
710
+ if (X = A.charCodeAt(J++), X === 37) {
711
+ if (X = A.charAt(J++), rt = Q[X in He ? A.charAt(J++) : X], !rt || (u = rt(v, N, u)) < 0)
712
+ return -1;
713
+ } else if (X != N.charCodeAt(u++))
714
+ return -1;
715
+ }
716
+ return u;
717
+ }
718
+ function F(v, A, N) {
719
+ var u = T.exec(A.slice(N));
720
+ return u ? (v.p = g.get(u[0].toLowerCase()), N + u[0].length) : -1;
721
+ }
722
+ function _(v, A, N) {
723
+ var u = b.exec(A.slice(N));
724
+ return u ? (v.w = q.get(u[0].toLowerCase()), N + u[0].length) : -1;
725
+ }
726
+ function S(v, A, N) {
727
+ var u = U.exec(A.slice(N));
728
+ return u ? (v.w = D.get(u[0].toLowerCase()), N + u[0].length) : -1;
729
+ }
730
+ function p(v, A, N) {
731
+ var u = I.exec(A.slice(N));
732
+ return u ? (v.m = V.get(u[0].toLowerCase()), N + u[0].length) : -1;
733
+ }
734
+ function Y(v, A, N) {
735
+ var u = O.exec(A.slice(N));
736
+ return u ? (v.m = C.get(u[0].toLowerCase()), N + u[0].length) : -1;
737
+ }
738
+ function l(v, A, N) {
739
+ return x(v, e, A, N);
740
+ }
741
+ function f(v, A, N) {
742
+ return x(v, n, A, N);
743
+ }
744
+ function y(v, A, N) {
745
+ return x(v, r, A, N);
746
+ }
747
+ function m(v) {
748
+ return s[v.getDay()];
749
+ }
750
+ function E(v) {
751
+ return i[v.getDay()];
752
+ }
753
+ function c(v) {
754
+ return M[v.getMonth()];
755
+ }
756
+ function d(v) {
757
+ return k[v.getMonth()];
758
+ }
759
+ function o(v) {
760
+ return a[+(v.getHours() >= 12)];
761
+ }
762
+ function P(v) {
763
+ return 1 + ~~(v.getMonth() / 3);
764
+ }
765
+ function z(v) {
766
+ return s[v.getUTCDay()];
767
+ }
768
+ function R(v) {
769
+ return i[v.getUTCDay()];
770
+ }
771
+ function K(v) {
772
+ return M[v.getUTCMonth()];
773
+ }
774
+ function G(v) {
775
+ return k[v.getUTCMonth()];
776
+ }
777
+ function $(v) {
778
+ return a[+(v.getUTCHours() >= 12)];
779
+ }
780
+ function it(v) {
781
+ return 1 + ~~(v.getUTCMonth() / 3);
782
+ }
783
+ return {
784
+ format: function(v) {
785
+ var A = w(v += "", W);
786
+ return A.toString = function() {
787
+ return v;
788
+ }, A;
789
+ },
790
+ parse: function(v) {
791
+ var A = H(v += "", !1);
792
+ return A.toString = function() {
793
+ return v;
794
+ }, A;
795
+ },
796
+ utcFormat: function(v) {
797
+ var A = w(v += "", Z);
798
+ return A.toString = function() {
799
+ return v;
800
+ }, A;
801
+ },
802
+ utcParse: function(v) {
803
+ var A = H(v += "", !0);
804
+ return A.toString = function() {
805
+ return v;
806
+ }, A;
807
+ }
808
+ };
809
+ }
810
+ var He = { "-": "", _: " ", 0: "0" }, nt = /^\s*\d+/, Fr = /^%/, Yr = /[\\^$*+?|[\]().{}]/g;
811
+ function B(t, e, n) {
812
+ var r = t < 0 ? "-" : "", a = (r ? -t : t) + "", i = a.length;
813
+ return r + (i < n ? new Array(n - i + 1).join(e) + a : a);
814
+ }
815
+ function Ur(t) {
816
+ return t.replace(Yr, "\\$&");
817
+ }
818
+ function At(t) {
819
+ return new RegExp("^(?:" + t.map(Ur).join("|") + ")", "i");
820
+ }
821
+ function It(t) {
822
+ return new Map(t.map((e, n) => [e.toLowerCase(), n]));
823
+ }
824
+ function Er(t, e, n) {
825
+ var r = nt.exec(e.slice(n, n + 1));
826
+ return r ? (t.w = +r[0], n + r[0].length) : -1;
827
+ }
828
+ function Lr(t, e, n) {
829
+ var r = nt.exec(e.slice(n, n + 1));
830
+ return r ? (t.u = +r[0], n + r[0].length) : -1;
831
+ }
832
+ function Ar(t, e, n) {
833
+ var r = nt.exec(e.slice(n, n + 2));
834
+ return r ? (t.U = +r[0], n + r[0].length) : -1;
835
+ }
836
+ function Ir(t, e, n) {
837
+ var r = nt.exec(e.slice(n, n + 2));
838
+ return r ? (t.V = +r[0], n + r[0].length) : -1;
839
+ }
840
+ function Wr(t, e, n) {
841
+ var r = nt.exec(e.slice(n, n + 2));
842
+ return r ? (t.W = +r[0], n + r[0].length) : -1;
843
+ }
844
+ function Ne(t, e, n) {
845
+ var r = nt.exec(e.slice(n, n + 4));
846
+ return r ? (t.y = +r[0], n + r[0].length) : -1;
847
+ }
848
+ function Ve(t, e, n) {
849
+ var r = nt.exec(e.slice(n, n + 2));
850
+ return r ? (t.y = +r[0] + (+r[0] > 68 ? 1900 : 2e3), n + r[0].length) : -1;
851
+ }
852
+ function Or(t, e, n) {
853
+ var r = /^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n, n + 6));
854
+ return r ? (t.Z = r[1] ? 0 : -(r[2] + (r[3] || "00")), n + r[0].length) : -1;
855
+ }
856
+ function Hr(t, e, n) {
857
+ var r = nt.exec(e.slice(n, n + 1));
858
+ return r ? (t.q = r[0] * 3 - 3, n + r[0].length) : -1;
859
+ }
860
+ function Nr(t, e, n) {
861
+ var r = nt.exec(e.slice(n, n + 2));
862
+ return r ? (t.m = r[0] - 1, n + r[0].length) : -1;
863
+ }
864
+ function ze(t, e, n) {
865
+ var r = nt.exec(e.slice(n, n + 2));
866
+ return r ? (t.d = +r[0], n + r[0].length) : -1;
867
+ }
868
+ function Vr(t, e, n) {
869
+ var r = nt.exec(e.slice(n, n + 3));
870
+ return r ? (t.m = 0, t.d = +r[0], n + r[0].length) : -1;
871
+ }
872
+ function Pe(t, e, n) {
873
+ var r = nt.exec(e.slice(n, n + 2));
874
+ return r ? (t.H = +r[0], n + r[0].length) : -1;
875
+ }
876
+ function zr(t, e, n) {
877
+ var r = nt.exec(e.slice(n, n + 2));
878
+ return r ? (t.M = +r[0], n + r[0].length) : -1;
879
+ }
880
+ function Pr(t, e, n) {
881
+ var r = nt.exec(e.slice(n, n + 2));
882
+ return r ? (t.S = +r[0], n + r[0].length) : -1;
883
+ }
884
+ function Rr(t, e, n) {
885
+ var r = nt.exec(e.slice(n, n + 3));
886
+ return r ? (t.L = +r[0], n + r[0].length) : -1;
887
+ }
888
+ function Br(t, e, n) {
889
+ var r = nt.exec(e.slice(n, n + 6));
890
+ return r ? (t.L = Math.floor(r[0] / 1e3), n + r[0].length) : -1;
891
+ }
892
+ function Zr(t, e, n) {
893
+ var r = Fr.exec(e.slice(n, n + 1));
894
+ return r ? n + r[0].length : -1;
895
+ }
896
+ function Xr(t, e, n) {
897
+ var r = nt.exec(e.slice(n));
898
+ return r ? (t.Q = +r[0], n + r[0].length) : -1;
899
+ }
900
+ function qr(t, e, n) {
901
+ var r = nt.exec(e.slice(n));
902
+ return r ? (t.s = +r[0], n + r[0].length) : -1;
903
+ }
904
+ function Re(t, e) {
905
+ return B(t.getDate(), e, 2);
906
+ }
907
+ function Gr(t, e) {
908
+ return B(t.getHours(), e, 2);
909
+ }
910
+ function jr(t, e) {
911
+ return B(t.getHours() % 12 || 12, e, 2);
912
+ }
913
+ function Qr(t, e) {
914
+ return B(1 + Tt.count(kt(t), t), e, 3);
915
+ }
916
+ function kn(t, e) {
917
+ return B(t.getMilliseconds(), e, 3);
918
+ }
919
+ function $r(t, e) {
920
+ return kn(t, e) + "000";
921
+ }
922
+ function Jr(t, e) {
923
+ return B(t.getMonth() + 1, e, 2);
924
+ }
925
+ function Kr(t, e) {
926
+ return B(t.getMinutes(), e, 2);
927
+ }
928
+ function ta(t, e) {
929
+ return B(t.getSeconds(), e, 2);
930
+ }
931
+ function ea(t) {
932
+ var e = t.getDay();
933
+ return e === 0 ? 7 : e;
934
+ }
935
+ function na(t, e) {
936
+ return B(Vt.count(kt(t) - 1, t), e, 2);
937
+ }
938
+ function pn(t) {
939
+ var e = t.getDay();
940
+ return e >= 4 || e === 0 ? bt(t) : bt.ceil(t);
941
+ }
942
+ function ra(t, e) {
943
+ return t = pn(t), B(bt.count(kt(t), t) + (kt(t).getDay() === 4), e, 2);
944
+ }
945
+ function aa(t) {
946
+ return t.getDay();
947
+ }
948
+ function ia(t, e) {
949
+ return B(Ht.count(kt(t) - 1, t), e, 2);
950
+ }
951
+ function sa(t, e) {
952
+ return B(t.getFullYear() % 100, e, 2);
953
+ }
954
+ function oa(t, e) {
955
+ return t = pn(t), B(t.getFullYear() % 100, e, 2);
956
+ }
957
+ function ca(t, e) {
958
+ return B(t.getFullYear() % 1e4, e, 4);
959
+ }
960
+ function la(t, e) {
961
+ var n = t.getDay();
962
+ return t = n >= 4 || n === 0 ? bt(t) : bt.ceil(t), B(t.getFullYear() % 1e4, e, 4);
963
+ }
964
+ function ua(t) {
965
+ var e = t.getTimezoneOffset();
966
+ return (e > 0 ? "-" : (e *= -1, "+")) + B(e / 60 | 0, "0", 2) + B(e % 60, "0", 2);
967
+ }
968
+ function Be(t, e) {
969
+ return B(t.getUTCDate(), e, 2);
970
+ }
971
+ function fa(t, e) {
972
+ return B(t.getUTCHours(), e, 2);
973
+ }
974
+ function ha(t, e) {
975
+ return B(t.getUTCHours() % 12 || 12, e, 2);
976
+ }
977
+ function da(t, e) {
978
+ return B(1 + we.count(xt(t), t), e, 3);
979
+ }
980
+ function vn(t, e) {
981
+ return B(t.getUTCMilliseconds(), e, 3);
982
+ }
983
+ function ma(t, e) {
984
+ return vn(t, e) + "000";
985
+ }
986
+ function ga(t, e) {
987
+ return B(t.getUTCMonth() + 1, e, 2);
988
+ }
989
+ function ya(t, e) {
990
+ return B(t.getUTCMinutes(), e, 2);
991
+ }
992
+ function ka(t, e) {
993
+ return B(t.getUTCSeconds(), e, 2);
994
+ }
995
+ function pa(t) {
996
+ var e = t.getUTCDay();
997
+ return e === 0 ? 7 : e;
998
+ }
999
+ function va(t, e) {
1000
+ return B(yn.count(xt(t) - 1, t), e, 2);
1001
+ }
1002
+ function Tn(t) {
1003
+ var e = t.getUTCDay();
1004
+ return e >= 4 || e === 0 ? Ut(t) : Ut.ceil(t);
1005
+ }
1006
+ function Ta(t, e) {
1007
+ return t = Tn(t), B(Ut.count(xt(t), t) + (xt(t).getUTCDay() === 4), e, 2);
1008
+ }
1009
+ function ba(t) {
1010
+ return t.getUTCDay();
1011
+ }
1012
+ function xa(t, e) {
1013
+ return B(Jt.count(xt(t) - 1, t), e, 2);
1014
+ }
1015
+ function wa(t, e) {
1016
+ return B(t.getUTCFullYear() % 100, e, 2);
1017
+ }
1018
+ function Da(t, e) {
1019
+ return t = Tn(t), B(t.getUTCFullYear() % 100, e, 2);
1020
+ }
1021
+ function Ca(t, e) {
1022
+ return B(t.getUTCFullYear() % 1e4, e, 4);
1023
+ }
1024
+ function Ma(t, e) {
1025
+ var n = t.getUTCDay();
1026
+ return t = n >= 4 || n === 0 ? Ut(t) : Ut.ceil(t), B(t.getUTCFullYear() % 1e4, e, 4);
1027
+ }
1028
+ function _a() {
1029
+ return "+0000";
1030
+ }
1031
+ function Ze() {
1032
+ return "%";
1033
+ }
1034
+ function Xe(t) {
1035
+ return +t;
1036
+ }
1037
+ function qe(t) {
1038
+ return Math.floor(+t / 1e3);
1039
+ }
1040
+ var Mt, Kt;
1041
+ Sa({
1042
+ dateTime: "%x, %X",
1043
+ date: "%-m/%-d/%Y",
1044
+ time: "%-I:%M:%S %p",
1045
+ periods: ["AM", "PM"],
1046
+ days: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"],
1047
+ shortDays: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
1048
+ months: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"],
1049
+ shortMonths: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]
1050
+ });
1051
+ function Sa(t) {
1052
+ return Mt = Sr(t), Kt = Mt.format, Mt.parse, Mt.utcFormat, Mt.utcParse, Mt;
1053
+ }
1054
+ function Fa(t) {
1055
+ return new Date(t);
1056
+ }
1057
+ function Ya(t) {
1058
+ return t instanceof Date ? +t : +/* @__PURE__ */ new Date(+t);
1059
+ }
1060
+ function bn(t, e, n, r, a, i, s, k, M, T) {
1061
+ var g = Zn(), U = g.invert, D = g.domain, b = T(".%L"), q = T(":%S"), O = T("%I:%M"), C = T("%I %p"), I = T("%a %d"), V = T("%b %d"), W = T("%B"), Z = T("%Y");
1062
+ function Q(w) {
1063
+ return (M(w) < w ? b : k(w) < w ? q : s(w) < w ? O : i(w) < w ? C : r(w) < w ? a(w) < w ? I : V : n(w) < w ? W : Z)(w);
1064
+ }
1065
+ return g.invert = function(w) {
1066
+ return new Date(U(w));
1067
+ }, g.domain = function(w) {
1068
+ return arguments.length ? D(Array.from(w, Ya)) : D().map(Fa);
1069
+ }, g.ticks = function(w) {
1070
+ var H = D();
1071
+ return t(H[0], H[H.length - 1], w ?? 10);
1072
+ }, g.tickFormat = function(w, H) {
1073
+ return H == null ? Q : T(H);
1074
+ }, g.nice = function(w) {
1075
+ var H = D();
1076
+ return (!w || typeof w.range != "function") && (w = e(H[0], H[H.length - 1], w ?? 10)), w ? D(yr(H, w)) : g;
1077
+ }, g.copy = function() {
1078
+ return Xn(g, bn(t, e, n, r, a, i, s, k, M, T));
1079
+ }, g;
1080
+ }
1081
+ function Ua() {
1082
+ return Gn.apply(bn(Mr, _r, kt, Nt, Vt, Tt, Ot, Wt, vt, Kt).domain([new Date(2e3, 0, 1), new Date(2e3, 0, 2)]), arguments);
1083
+ }
1084
+ var xn = { exports: {} };
1085
+ (function(t, e) {
1086
+ (function(n, r) {
1087
+ t.exports = r();
1088
+ })(be, function() {
1089
+ var n = "day";
1090
+ return function(r, a, i) {
1091
+ var s = function(T) {
1092
+ return T.add(4 - T.isoWeekday(), n);
1093
+ }, k = a.prototype;
1094
+ k.isoWeekYear = function() {
1095
+ return s(this).year();
1096
+ }, k.isoWeek = function(T) {
1097
+ if (!this.$utils().u(T))
1098
+ return this.add(7 * (T - this.isoWeek()), n);
1099
+ var g, U, D, b, q = s(this), O = (g = this.isoWeekYear(), U = this.$u, D = (U ? i.utc : i)().year(g).startOf("year"), b = 4 - D.isoWeekday(), D.isoWeekday() > 4 && (b += 7), D.add(b, n));
1100
+ return q.diff(O, "week") + 1;
1101
+ }, k.isoWeekday = function(T) {
1102
+ return this.$utils().u(T) ? this.day() || 7 : this.day(this.day() % 7 ? T : T - 7);
1103
+ };
1104
+ var M = k.startOf;
1105
+ k.startOf = function(T, g) {
1106
+ var U = this.$utils(), D = !!U.u(g) || g;
1107
+ return U.p(T) === "isoweek" ? D ? this.date(this.date() - (this.isoWeekday() - 1)).startOf("day") : this.date(this.date() - 1 - (this.isoWeekday() - 1) + 7).endOf("day") : M.bind(this)(T, g);
1108
+ };
1109
+ };
1110
+ });
1111
+ })(xn);
1112
+ var Ea = xn.exports;
1113
+ const La = /* @__PURE__ */ Te(Ea);
1114
+ var ye = function() {
1115
+ var t = /* @__PURE__ */ h(function(Y, l, f, y) {
1116
+ for (f = f || {}, y = Y.length; y--; f[Y[y]] = l)
1117
+ ;
1118
+ return f;
1119
+ }, "o"), e = [6, 8, 10, 12, 13, 14, 15, 16, 17, 18, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 33, 35, 36, 38, 40], n = [1, 26], r = [1, 27], a = [1, 28], i = [1, 29], s = [1, 30], k = [1, 31], M = [1, 32], T = [1, 33], g = [1, 34], U = [1, 9], D = [1, 10], b = [1, 11], q = [1, 12], O = [1, 13], C = [1, 14], I = [1, 15], V = [1, 16], W = [1, 19], Z = [1, 20], Q = [1, 21], w = [1, 22], H = [1, 23], x = [1, 25], F = [1, 35], _ = {
1120
+ trace: /* @__PURE__ */ h(function() {
1121
+ }, "trace"),
1122
+ yy: {},
1123
+ symbols_: { error: 2, start: 3, gantt: 4, document: 5, EOF: 6, line: 7, SPACE: 8, statement: 9, NL: 10, weekday: 11, weekday_monday: 12, weekday_tuesday: 13, weekday_wednesday: 14, weekday_thursday: 15, weekday_friday: 16, weekday_saturday: 17, weekday_sunday: 18, weekend: 19, weekend_friday: 20, weekend_saturday: 21, dateFormat: 22, inclusiveEndDates: 23, topAxis: 24, axisFormat: 25, tickInterval: 26, excludes: 27, includes: 28, todayMarker: 29, title: 30, acc_title: 31, acc_title_value: 32, acc_descr: 33, acc_descr_value: 34, acc_descr_multiline_value: 35, section: 36, clickStatement: 37, taskTxt: 38, taskData: 39, click: 40, callbackname: 41, callbackargs: 42, href: 43, clickStatementDebug: 44, $accept: 0, $end: 1 },
1124
+ terminals_: { 2: "error", 4: "gantt", 6: "EOF", 8: "SPACE", 10: "NL", 12: "weekday_monday", 13: "weekday_tuesday", 14: "weekday_wednesday", 15: "weekday_thursday", 16: "weekday_friday", 17: "weekday_saturday", 18: "weekday_sunday", 20: "weekend_friday", 21: "weekend_saturday", 22: "dateFormat", 23: "inclusiveEndDates", 24: "topAxis", 25: "axisFormat", 26: "tickInterval", 27: "excludes", 28: "includes", 29: "todayMarker", 30: "title", 31: "acc_title", 32: "acc_title_value", 33: "acc_descr", 34: "acc_descr_value", 35: "acc_descr_multiline_value", 36: "section", 38: "taskTxt", 39: "taskData", 40: "click", 41: "callbackname", 42: "callbackargs", 43: "href" },
1125
+ productions_: [0, [3, 3], [5, 0], [5, 2], [7, 2], [7, 1], [7, 1], [7, 1], [11, 1], [11, 1], [11, 1], [11, 1], [11, 1], [11, 1], [11, 1], [19, 1], [19, 1], [9, 1], [9, 1], [9, 1], [9, 1], [9, 1], [9, 1], [9, 1], [9, 1], [9, 1], [9, 1], [9, 1], [9, 2], [9, 2], [9, 1], [9, 1], [9, 1], [9, 2], [37, 2], [37, 3], [37, 3], [37, 4], [37, 3], [37, 4], [37, 2], [44, 2], [44, 3], [44, 3], [44, 4], [44, 3], [44, 4], [44, 2]],
1126
+ performAction: /* @__PURE__ */ h(function(l, f, y, m, E, c, d) {
1127
+ var o = c.length - 1;
1128
+ switch (E) {
1129
+ case 1:
1130
+ return c[o - 1];
1131
+ case 2:
1132
+ this.$ = [];
1133
+ break;
1134
+ case 3:
1135
+ c[o - 1].push(c[o]), this.$ = c[o - 1];
1136
+ break;
1137
+ case 4:
1138
+ case 5:
1139
+ this.$ = c[o];
1140
+ break;
1141
+ case 6:
1142
+ case 7:
1143
+ this.$ = [];
1144
+ break;
1145
+ case 8:
1146
+ m.setWeekday("monday");
1147
+ break;
1148
+ case 9:
1149
+ m.setWeekday("tuesday");
1150
+ break;
1151
+ case 10:
1152
+ m.setWeekday("wednesday");
1153
+ break;
1154
+ case 11:
1155
+ m.setWeekday("thursday");
1156
+ break;
1157
+ case 12:
1158
+ m.setWeekday("friday");
1159
+ break;
1160
+ case 13:
1161
+ m.setWeekday("saturday");
1162
+ break;
1163
+ case 14:
1164
+ m.setWeekday("sunday");
1165
+ break;
1166
+ case 15:
1167
+ m.setWeekend("friday");
1168
+ break;
1169
+ case 16:
1170
+ m.setWeekend("saturday");
1171
+ break;
1172
+ case 17:
1173
+ m.setDateFormat(c[o].substr(11)), this.$ = c[o].substr(11);
1174
+ break;
1175
+ case 18:
1176
+ m.enableInclusiveEndDates(), this.$ = c[o].substr(18);
1177
+ break;
1178
+ case 19:
1179
+ m.TopAxis(), this.$ = c[o].substr(8);
1180
+ break;
1181
+ case 20:
1182
+ m.setAxisFormat(c[o].substr(11)), this.$ = c[o].substr(11);
1183
+ break;
1184
+ case 21:
1185
+ m.setTickInterval(c[o].substr(13)), this.$ = c[o].substr(13);
1186
+ break;
1187
+ case 22:
1188
+ m.setExcludes(c[o].substr(9)), this.$ = c[o].substr(9);
1189
+ break;
1190
+ case 23:
1191
+ m.setIncludes(c[o].substr(9)), this.$ = c[o].substr(9);
1192
+ break;
1193
+ case 24:
1194
+ m.setTodayMarker(c[o].substr(12)), this.$ = c[o].substr(12);
1195
+ break;
1196
+ case 27:
1197
+ m.setDiagramTitle(c[o].substr(6)), this.$ = c[o].substr(6);
1198
+ break;
1199
+ case 28:
1200
+ this.$ = c[o].trim(), m.setAccTitle(this.$);
1201
+ break;
1202
+ case 29:
1203
+ case 30:
1204
+ this.$ = c[o].trim(), m.setAccDescription(this.$);
1205
+ break;
1206
+ case 31:
1207
+ m.addSection(c[o].substr(8)), this.$ = c[o].substr(8);
1208
+ break;
1209
+ case 33:
1210
+ m.addTask(c[o - 1], c[o]), this.$ = "task";
1211
+ break;
1212
+ case 34:
1213
+ this.$ = c[o - 1], m.setClickEvent(c[o - 1], c[o], null);
1214
+ break;
1215
+ case 35:
1216
+ this.$ = c[o - 2], m.setClickEvent(c[o - 2], c[o - 1], c[o]);
1217
+ break;
1218
+ case 36:
1219
+ this.$ = c[o - 2], m.setClickEvent(c[o - 2], c[o - 1], null), m.setLink(c[o - 2], c[o]);
1220
+ break;
1221
+ case 37:
1222
+ this.$ = c[o - 3], m.setClickEvent(c[o - 3], c[o - 2], c[o - 1]), m.setLink(c[o - 3], c[o]);
1223
+ break;
1224
+ case 38:
1225
+ this.$ = c[o - 2], m.setClickEvent(c[o - 2], c[o], null), m.setLink(c[o - 2], c[o - 1]);
1226
+ break;
1227
+ case 39:
1228
+ this.$ = c[o - 3], m.setClickEvent(c[o - 3], c[o - 1], c[o]), m.setLink(c[o - 3], c[o - 2]);
1229
+ break;
1230
+ case 40:
1231
+ this.$ = c[o - 1], m.setLink(c[o - 1], c[o]);
1232
+ break;
1233
+ case 41:
1234
+ case 47:
1235
+ this.$ = c[o - 1] + " " + c[o];
1236
+ break;
1237
+ case 42:
1238
+ case 43:
1239
+ case 45:
1240
+ this.$ = c[o - 2] + " " + c[o - 1] + " " + c[o];
1241
+ break;
1242
+ case 44:
1243
+ case 46:
1244
+ this.$ = c[o - 3] + " " + c[o - 2] + " " + c[o - 1] + " " + c[o];
1245
+ break;
1246
+ }
1247
+ }, "anonymous"),
1248
+ table: [{ 3: 1, 4: [1, 2] }, { 1: [3] }, t(e, [2, 2], { 5: 3 }), { 6: [1, 4], 7: 5, 8: [1, 6], 9: 7, 10: [1, 8], 11: 17, 12: n, 13: r, 14: a, 15: i, 16: s, 17: k, 18: M, 19: 18, 20: T, 21: g, 22: U, 23: D, 24: b, 25: q, 26: O, 27: C, 28: I, 29: V, 30: W, 31: Z, 33: Q, 35: w, 36: H, 37: 24, 38: x, 40: F }, t(e, [2, 7], { 1: [2, 1] }), t(e, [2, 3]), { 9: 36, 11: 17, 12: n, 13: r, 14: a, 15: i, 16: s, 17: k, 18: M, 19: 18, 20: T, 21: g, 22: U, 23: D, 24: b, 25: q, 26: O, 27: C, 28: I, 29: V, 30: W, 31: Z, 33: Q, 35: w, 36: H, 37: 24, 38: x, 40: F }, t(e, [2, 5]), t(e, [2, 6]), t(e, [2, 17]), t(e, [2, 18]), t(e, [2, 19]), t(e, [2, 20]), t(e, [2, 21]), t(e, [2, 22]), t(e, [2, 23]), t(e, [2, 24]), t(e, [2, 25]), t(e, [2, 26]), t(e, [2, 27]), { 32: [1, 37] }, { 34: [1, 38] }, t(e, [2, 30]), t(e, [2, 31]), t(e, [2, 32]), { 39: [1, 39] }, t(e, [2, 8]), t(e, [2, 9]), t(e, [2, 10]), t(e, [2, 11]), t(e, [2, 12]), t(e, [2, 13]), t(e, [2, 14]), t(e, [2, 15]), t(e, [2, 16]), { 41: [1, 40], 43: [1, 41] }, t(e, [2, 4]), t(e, [2, 28]), t(e, [2, 29]), t(e, [2, 33]), t(e, [2, 34], { 42: [1, 42], 43: [1, 43] }), t(e, [2, 40], { 41: [1, 44] }), t(e, [2, 35], { 43: [1, 45] }), t(e, [2, 36]), t(e, [2, 38], { 42: [1, 46] }), t(e, [2, 37]), t(e, [2, 39])],
1249
+ defaultActions: {},
1250
+ parseError: /* @__PURE__ */ h(function(l, f) {
1251
+ if (f.recoverable)
1252
+ this.trace(l);
1253
+ else {
1254
+ var y = new Error(l);
1255
+ throw y.hash = f, y;
1256
+ }
1257
+ }, "parseError"),
1258
+ parse: /* @__PURE__ */ h(function(l) {
1259
+ var f = this, y = [0], m = [], E = [null], c = [], d = this.table, o = "", P = 0, z = 0, R = 2, K = 1, G = c.slice.call(arguments, 1), $ = Object.create(this.lexer), it = { yy: {} };
1260
+ for (var v in this.yy)
1261
+ Object.prototype.hasOwnProperty.call(this.yy, v) && (it.yy[v] = this.yy[v]);
1262
+ $.setInput(l, it.yy), it.yy.lexer = $, it.yy.parser = this, typeof $.yylloc > "u" && ($.yylloc = {});
1263
+ var A = $.yylloc;
1264
+ c.push(A);
1265
+ var N = $.options && $.options.ranges;
1266
+ typeof it.yy.parseError == "function" ? this.parseError = it.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
1267
+ function u(ot) {
1268
+ y.length = y.length - 2 * ot, E.length = E.length - ot, c.length = c.length - ot;
1269
+ }
1270
+ h(u, "popStack");
1271
+ function J() {
1272
+ var ot;
1273
+ return ot = m.pop() || $.lex() || K, typeof ot != "number" && (ot instanceof Array && (m = ot, ot = m.pop()), ot = f.symbols_[ot] || ot), ot;
1274
+ }
1275
+ h(J, "lex");
1276
+ for (var L, j, X, rt, st = {}, pt, lt, Ae, Bt; ; ) {
1277
+ if (j = y[y.length - 1], this.defaultActions[j] ? X = this.defaultActions[j] : ((L === null || typeof L > "u") && (L = J()), X = d[j] && d[j][L]), typeof X > "u" || !X.length || !X[0]) {
1278
+ var ne = "";
1279
+ Bt = [];
1280
+ for (pt in d[j])
1281
+ this.terminals_[pt] && pt > R && Bt.push("'" + this.terminals_[pt] + "'");
1282
+ $.showPosition ? ne = "Parse error on line " + (P + 1) + `:
1283
+ ` + $.showPosition() + `
1284
+ Expecting ` + Bt.join(", ") + ", got '" + (this.terminals_[L] || L) + "'" : ne = "Parse error on line " + (P + 1) + ": Unexpected " + (L == K ? "end of input" : "'" + (this.terminals_[L] || L) + "'"), this.parseError(ne, {
1285
+ text: $.match,
1286
+ token: this.terminals_[L] || L,
1287
+ line: $.yylineno,
1288
+ loc: A,
1289
+ expected: Bt
1290
+ });
1291
+ }
1292
+ if (X[0] instanceof Array && X.length > 1)
1293
+ throw new Error("Parse Error: multiple actions possible at state: " + j + ", token: " + L);
1294
+ switch (X[0]) {
1295
+ case 1:
1296
+ y.push(L), E.push($.yytext), c.push($.yylloc), y.push(X[1]), L = null, z = $.yyleng, o = $.yytext, P = $.yylineno, A = $.yylloc;
1297
+ break;
1298
+ case 2:
1299
+ if (lt = this.productions_[X[1]][1], st.$ = E[E.length - lt], st._$ = {
1300
+ first_line: c[c.length - (lt || 1)].first_line,
1301
+ last_line: c[c.length - 1].last_line,
1302
+ first_column: c[c.length - (lt || 1)].first_column,
1303
+ last_column: c[c.length - 1].last_column
1304
+ }, N && (st._$.range = [
1305
+ c[c.length - (lt || 1)].range[0],
1306
+ c[c.length - 1].range[1]
1307
+ ]), rt = this.performAction.apply(st, [
1308
+ o,
1309
+ z,
1310
+ P,
1311
+ it.yy,
1312
+ X[1],
1313
+ E,
1314
+ c
1315
+ ].concat(G)), typeof rt < "u")
1316
+ return rt;
1317
+ lt && (y = y.slice(0, -1 * lt * 2), E = E.slice(0, -1 * lt), c = c.slice(0, -1 * lt)), y.push(this.productions_[X[1]][0]), E.push(st.$), c.push(st._$), Ae = d[y[y.length - 2]][y[y.length - 1]], y.push(Ae);
1318
+ break;
1319
+ case 3:
1320
+ return !0;
1321
+ }
1322
+ }
1323
+ return !0;
1324
+ }, "parse")
1325
+ }, S = /* @__PURE__ */ function() {
1326
+ var Y = {
1327
+ EOF: 1,
1328
+ parseError: /* @__PURE__ */ h(function(f, y) {
1329
+ if (this.yy.parser)
1330
+ this.yy.parser.parseError(f, y);
1331
+ else
1332
+ throw new Error(f);
1333
+ }, "parseError"),
1334
+ // resets the lexer, sets new input
1335
+ setInput: /* @__PURE__ */ h(function(l, f) {
1336
+ return this.yy = f || this.yy || {}, this._input = l, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
1337
+ first_line: 1,
1338
+ first_column: 0,
1339
+ last_line: 1,
1340
+ last_column: 0
1341
+ }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
1342
+ }, "setInput"),
1343
+ // consumes and returns one char from the input
1344
+ input: /* @__PURE__ */ h(function() {
1345
+ var l = this._input[0];
1346
+ this.yytext += l, this.yyleng++, this.offset++, this.match += l, this.matched += l;
1347
+ var f = l.match(/(?:\r\n?|\n).*/g);
1348
+ return f ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), l;
1349
+ }, "input"),
1350
+ // unshifts one char (or a string) into the input
1351
+ unput: /* @__PURE__ */ h(function(l) {
1352
+ var f = l.length, y = l.split(/(?:\r\n?|\n)/g);
1353
+ this._input = l + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - f), this.offset -= f;
1354
+ var m = this.match.split(/(?:\r\n?|\n)/g);
1355
+ this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), y.length - 1 && (this.yylineno -= y.length - 1);
1356
+ var E = this.yylloc.range;
1357
+ return this.yylloc = {
1358
+ first_line: this.yylloc.first_line,
1359
+ last_line: this.yylineno + 1,
1360
+ first_column: this.yylloc.first_column,
1361
+ last_column: y ? (y.length === m.length ? this.yylloc.first_column : 0) + m[m.length - y.length].length - y[0].length : this.yylloc.first_column - f
1362
+ }, this.options.ranges && (this.yylloc.range = [E[0], E[0] + this.yyleng - f]), this.yyleng = this.yytext.length, this;
1363
+ }, "unput"),
1364
+ // When called from action, caches matched text and appends it on next action
1365
+ more: /* @__PURE__ */ h(function() {
1366
+ return this._more = !0, this;
1367
+ }, "more"),
1368
+ // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.
1369
+ reject: /* @__PURE__ */ h(function() {
1370
+ if (this.options.backtrack_lexer)
1371
+ this._backtrack = !0;
1372
+ else
1373
+ return this.parseError("Lexical error on line " + (this.yylineno + 1) + `. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
1374
+ ` + this.showPosition(), {
1375
+ text: "",
1376
+ token: null,
1377
+ line: this.yylineno
1378
+ });
1379
+ return this;
1380
+ }, "reject"),
1381
+ // retain first n characters of the match
1382
+ less: /* @__PURE__ */ h(function(l) {
1383
+ this.unput(this.match.slice(l));
1384
+ }, "less"),
1385
+ // displays already matched input, i.e. for error messages
1386
+ pastInput: /* @__PURE__ */ h(function() {
1387
+ var l = this.matched.substr(0, this.matched.length - this.match.length);
1388
+ return (l.length > 20 ? "..." : "") + l.substr(-20).replace(/\n/g, "");
1389
+ }, "pastInput"),
1390
+ // displays upcoming input, i.e. for error messages
1391
+ upcomingInput: /* @__PURE__ */ h(function() {
1392
+ var l = this.match;
1393
+ return l.length < 20 && (l += this._input.substr(0, 20 - l.length)), (l.substr(0, 20) + (l.length > 20 ? "..." : "")).replace(/\n/g, "");
1394
+ }, "upcomingInput"),
1395
+ // displays the character position where the lexing error occurred, i.e. for error messages
1396
+ showPosition: /* @__PURE__ */ h(function() {
1397
+ var l = this.pastInput(), f = new Array(l.length + 1).join("-");
1398
+ return l + this.upcomingInput() + `
1399
+ ` + f + "^";
1400
+ }, "showPosition"),
1401
+ // test the lexed token: return FALSE when not a match, otherwise return token
1402
+ test_match: /* @__PURE__ */ h(function(l, f) {
1403
+ var y, m, E;
1404
+ if (this.options.backtrack_lexer && (E = {
1405
+ yylineno: this.yylineno,
1406
+ yylloc: {
1407
+ first_line: this.yylloc.first_line,
1408
+ last_line: this.last_line,
1409
+ first_column: this.yylloc.first_column,
1410
+ last_column: this.yylloc.last_column
1411
+ },
1412
+ yytext: this.yytext,
1413
+ match: this.match,
1414
+ matches: this.matches,
1415
+ matched: this.matched,
1416
+ yyleng: this.yyleng,
1417
+ offset: this.offset,
1418
+ _more: this._more,
1419
+ _input: this._input,
1420
+ yy: this.yy,
1421
+ conditionStack: this.conditionStack.slice(0),
1422
+ done: this.done
1423
+ }, this.options.ranges && (E.yylloc.range = this.yylloc.range.slice(0))), m = l[0].match(/(?:\r\n?|\n).*/g), m && (this.yylineno += m.length), this.yylloc = {
1424
+ first_line: this.yylloc.last_line,
1425
+ last_line: this.yylineno + 1,
1426
+ first_column: this.yylloc.last_column,
1427
+ last_column: m ? m[m.length - 1].length - m[m.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + l[0].length
1428
+ }, this.yytext += l[0], this.match += l[0], this.matches = l, this.yyleng = this.yytext.length, this.options.ranges && (this.yylloc.range = [this.offset, this.offset += this.yyleng]), this._more = !1, this._backtrack = !1, this._input = this._input.slice(l[0].length), this.matched += l[0], y = this.performAction.call(this, this.yy, this, f, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), y)
1429
+ return y;
1430
+ if (this._backtrack) {
1431
+ for (var c in E)
1432
+ this[c] = E[c];
1433
+ return !1;
1434
+ }
1435
+ return !1;
1436
+ }, "test_match"),
1437
+ // return next match in input
1438
+ next: /* @__PURE__ */ h(function() {
1439
+ if (this.done)
1440
+ return this.EOF;
1441
+ this._input || (this.done = !0);
1442
+ var l, f, y, m;
1443
+ this._more || (this.yytext = "", this.match = "");
1444
+ for (var E = this._currentRules(), c = 0; c < E.length; c++)
1445
+ if (y = this._input.match(this.rules[E[c]]), y && (!f || y[0].length > f[0].length)) {
1446
+ if (f = y, m = c, this.options.backtrack_lexer) {
1447
+ if (l = this.test_match(y, E[c]), l !== !1)
1448
+ return l;
1449
+ if (this._backtrack) {
1450
+ f = !1;
1451
+ continue;
1452
+ } else
1453
+ return !1;
1454
+ } else if (!this.options.flex)
1455
+ break;
1456
+ }
1457
+ return f ? (l = this.test_match(f, E[m]), l !== !1 ? l : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
1458
+ ` + this.showPosition(), {
1459
+ text: "",
1460
+ token: null,
1461
+ line: this.yylineno
1462
+ });
1463
+ }, "next"),
1464
+ // return next match that has a token
1465
+ lex: /* @__PURE__ */ h(function() {
1466
+ var f = this.next();
1467
+ return f || this.lex();
1468
+ }, "lex"),
1469
+ // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
1470
+ begin: /* @__PURE__ */ h(function(f) {
1471
+ this.conditionStack.push(f);
1472
+ }, "begin"),
1473
+ // pop the previously active lexer condition state off the condition stack
1474
+ popState: /* @__PURE__ */ h(function() {
1475
+ var f = this.conditionStack.length - 1;
1476
+ return f > 0 ? this.conditionStack.pop() : this.conditionStack[0];
1477
+ }, "popState"),
1478
+ // produce the lexer rule set which is active for the currently active lexer condition state
1479
+ _currentRules: /* @__PURE__ */ h(function() {
1480
+ return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
1481
+ }, "_currentRules"),
1482
+ // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
1483
+ topState: /* @__PURE__ */ h(function(f) {
1484
+ return f = this.conditionStack.length - 1 - Math.abs(f || 0), f >= 0 ? this.conditionStack[f] : "INITIAL";
1485
+ }, "topState"),
1486
+ // alias for begin(condition)
1487
+ pushState: /* @__PURE__ */ h(function(f) {
1488
+ this.begin(f);
1489
+ }, "pushState"),
1490
+ // return the number of states currently on the stack
1491
+ stateStackSize: /* @__PURE__ */ h(function() {
1492
+ return this.conditionStack.length;
1493
+ }, "stateStackSize"),
1494
+ options: { "case-insensitive": !0 },
1495
+ performAction: /* @__PURE__ */ h(function(f, y, m, E) {
1496
+ switch (m) {
1497
+ case 0:
1498
+ return this.begin("open_directive"), "open_directive";
1499
+ case 1:
1500
+ return this.begin("acc_title"), 31;
1501
+ case 2:
1502
+ return this.popState(), "acc_title_value";
1503
+ case 3:
1504
+ return this.begin("acc_descr"), 33;
1505
+ case 4:
1506
+ return this.popState(), "acc_descr_value";
1507
+ case 5:
1508
+ this.begin("acc_descr_multiline");
1509
+ break;
1510
+ case 6:
1511
+ this.popState();
1512
+ break;
1513
+ case 7:
1514
+ return "acc_descr_multiline_value";
1515
+ case 8:
1516
+ break;
1517
+ case 9:
1518
+ break;
1519
+ case 10:
1520
+ break;
1521
+ case 11:
1522
+ return 10;
1523
+ case 12:
1524
+ break;
1525
+ case 13:
1526
+ break;
1527
+ case 14:
1528
+ this.begin("href");
1529
+ break;
1530
+ case 15:
1531
+ this.popState();
1532
+ break;
1533
+ case 16:
1534
+ return 43;
1535
+ case 17:
1536
+ this.begin("callbackname");
1537
+ break;
1538
+ case 18:
1539
+ this.popState();
1540
+ break;
1541
+ case 19:
1542
+ this.popState(), this.begin("callbackargs");
1543
+ break;
1544
+ case 20:
1545
+ return 41;
1546
+ case 21:
1547
+ this.popState();
1548
+ break;
1549
+ case 22:
1550
+ return 42;
1551
+ case 23:
1552
+ this.begin("click");
1553
+ break;
1554
+ case 24:
1555
+ this.popState();
1556
+ break;
1557
+ case 25:
1558
+ return 40;
1559
+ case 26:
1560
+ return 4;
1561
+ case 27:
1562
+ return 22;
1563
+ case 28:
1564
+ return 23;
1565
+ case 29:
1566
+ return 24;
1567
+ case 30:
1568
+ return 25;
1569
+ case 31:
1570
+ return 26;
1571
+ case 32:
1572
+ return 28;
1573
+ case 33:
1574
+ return 27;
1575
+ case 34:
1576
+ return 29;
1577
+ case 35:
1578
+ return 12;
1579
+ case 36:
1580
+ return 13;
1581
+ case 37:
1582
+ return 14;
1583
+ case 38:
1584
+ return 15;
1585
+ case 39:
1586
+ return 16;
1587
+ case 40:
1588
+ return 17;
1589
+ case 41:
1590
+ return 18;
1591
+ case 42:
1592
+ return 20;
1593
+ case 43:
1594
+ return 21;
1595
+ case 44:
1596
+ return "date";
1597
+ case 45:
1598
+ return 30;
1599
+ case 46:
1600
+ return "accDescription";
1601
+ case 47:
1602
+ return 36;
1603
+ case 48:
1604
+ return 38;
1605
+ case 49:
1606
+ return 39;
1607
+ case 50:
1608
+ return ":";
1609
+ case 51:
1610
+ return 6;
1611
+ case 52:
1612
+ return "INVALID";
1613
+ }
1614
+ }, "anonymous"),
1615
+ rules: [/^(?:%%\{)/i, /^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?:%%(?!\{)*[^\n]*)/i, /^(?:[^\}]%%*[^\n]*)/i, /^(?:%%*[^\n]*[\n]*)/i, /^(?:[\n]+)/i, /^(?:\s+)/i, /^(?:%[^\n]*)/i, /^(?:href[\s]+["])/i, /^(?:["])/i, /^(?:[^"]*)/i, /^(?:call[\s]+)/i, /^(?:\([\s]*\))/i, /^(?:\()/i, /^(?:[^(]*)/i, /^(?:\))/i, /^(?:[^)]*)/i, /^(?:click[\s]+)/i, /^(?:[\s\n])/i, /^(?:[^\s\n]*)/i, /^(?:gantt\b)/i, /^(?:dateFormat\s[^#\n;]+)/i, /^(?:inclusiveEndDates\b)/i, /^(?:topAxis\b)/i, /^(?:axisFormat\s[^#\n;]+)/i, /^(?:tickInterval\s[^#\n;]+)/i, /^(?:includes\s[^#\n;]+)/i, /^(?:excludes\s[^#\n;]+)/i, /^(?:todayMarker\s[^\n;]+)/i, /^(?:weekday\s+monday\b)/i, /^(?:weekday\s+tuesday\b)/i, /^(?:weekday\s+wednesday\b)/i, /^(?:weekday\s+thursday\b)/i, /^(?:weekday\s+friday\b)/i, /^(?:weekday\s+saturday\b)/i, /^(?:weekday\s+sunday\b)/i, /^(?:weekend\s+friday\b)/i, /^(?:weekend\s+saturday\b)/i, /^(?:\d\d\d\d-\d\d-\d\d\b)/i, /^(?:title\s[^\n]+)/i, /^(?:accDescription\s[^#\n;]+)/i, /^(?:section\s[^\n]+)/i, /^(?:[^:\n]+)/i, /^(?::[^#\n;]+)/i, /^(?::)/i, /^(?:$)/i, /^(?:.)/i],
1616
+ conditions: { acc_descr_multiline: { rules: [6, 7], inclusive: !1 }, acc_descr: { rules: [4], inclusive: !1 }, acc_title: { rules: [2], inclusive: !1 }, callbackargs: { rules: [21, 22], inclusive: !1 }, callbackname: { rules: [18, 19, 20], inclusive: !1 }, href: { rules: [15, 16], inclusive: !1 }, click: { rules: [24, 25], inclusive: !1 }, INITIAL: { rules: [0, 1, 3, 5, 8, 9, 10, 11, 12, 13, 14, 17, 23, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52], inclusive: !0 } }
1617
+ };
1618
+ return Y;
1619
+ }();
1620
+ _.lexer = S;
1621
+ function p() {
1622
+ this.yy = {};
1623
+ }
1624
+ return h(p, "Parser"), p.prototype = _, _.Parser = p, new p();
1625
+ }();
1626
+ ye.parser = ye;
1627
+ var Aa = ye;
1628
+ at.extend(La);
1629
+ at.extend(Jn);
1630
+ at.extend(Qn);
1631
+ var Ge = { friday: 5, saturday: 6 }, ut = "", De = "", Ce = void 0, Me = "", zt = [], Pt = [], _e = /* @__PURE__ */ new Map(), Se = [], te = [], Et = "", Fe = "", wn = ["active", "done", "crit", "milestone"], Ye = [], Rt = !1, Ue = !1, Ee = "sunday", ee = "saturday", ke = 0, Ia = /* @__PURE__ */ h(function() {
1632
+ Se = [], te = [], Et = "", Ye = [], Gt = 0, ve = void 0, jt = void 0, tt = [], ut = "", De = "", Fe = "", Ce = void 0, Me = "", zt = [], Pt = [], Rt = !1, Ue = !1, ke = 0, _e = /* @__PURE__ */ new Map(), Nn(), Ee = "sunday", ee = "saturday";
1633
+ }, "clear"), Wa = /* @__PURE__ */ h(function(t) {
1634
+ De = t;
1635
+ }, "setAxisFormat"), Oa = /* @__PURE__ */ h(function() {
1636
+ return De;
1637
+ }, "getAxisFormat"), Ha = /* @__PURE__ */ h(function(t) {
1638
+ Ce = t;
1639
+ }, "setTickInterval"), Na = /* @__PURE__ */ h(function() {
1640
+ return Ce;
1641
+ }, "getTickInterval"), Va = /* @__PURE__ */ h(function(t) {
1642
+ Me = t;
1643
+ }, "setTodayMarker"), za = /* @__PURE__ */ h(function() {
1644
+ return Me;
1645
+ }, "getTodayMarker"), Pa = /* @__PURE__ */ h(function(t) {
1646
+ ut = t;
1647
+ }, "setDateFormat"), Ra = /* @__PURE__ */ h(function() {
1648
+ Rt = !0;
1649
+ }, "enableInclusiveEndDates"), Ba = /* @__PURE__ */ h(function() {
1650
+ return Rt;
1651
+ }, "endDatesAreInclusive"), Za = /* @__PURE__ */ h(function() {
1652
+ Ue = !0;
1653
+ }, "enableTopAxis"), Xa = /* @__PURE__ */ h(function() {
1654
+ return Ue;
1655
+ }, "topAxisEnabled"), qa = /* @__PURE__ */ h(function(t) {
1656
+ Fe = t;
1657
+ }, "setDisplayMode"), Ga = /* @__PURE__ */ h(function() {
1658
+ return Fe;
1659
+ }, "getDisplayMode"), ja = /* @__PURE__ */ h(function() {
1660
+ return ut;
1661
+ }, "getDateFormat"), Qa = /* @__PURE__ */ h(function(t) {
1662
+ zt = t.toLowerCase().split(/[\s,]+/);
1663
+ }, "setIncludes"), $a = /* @__PURE__ */ h(function() {
1664
+ return zt;
1665
+ }, "getIncludes"), Ja = /* @__PURE__ */ h(function(t) {
1666
+ Pt = t.toLowerCase().split(/[\s,]+/);
1667
+ }, "setExcludes"), Ka = /* @__PURE__ */ h(function() {
1668
+ return Pt;
1669
+ }, "getExcludes"), ti = /* @__PURE__ */ h(function() {
1670
+ return _e;
1671
+ }, "getLinks"), ei = /* @__PURE__ */ h(function(t) {
1672
+ Et = t, Se.push(t);
1673
+ }, "addSection"), ni = /* @__PURE__ */ h(function() {
1674
+ return Se;
1675
+ }, "getSections"), ri = /* @__PURE__ */ h(function() {
1676
+ let t = je();
1677
+ const e = 10;
1678
+ let n = 0;
1679
+ for (; !t && n < e; )
1680
+ t = je(), n++;
1681
+ return te = tt, te;
1682
+ }, "getTasks"), Dn = /* @__PURE__ */ h(function(t, e, n, r) {
1683
+ return r.includes(t.format(e.trim())) ? !1 : n.includes("weekends") && (t.isoWeekday() === Ge[ee] || t.isoWeekday() === Ge[ee] + 1) || n.includes(t.format("dddd").toLowerCase()) ? !0 : n.includes(t.format(e.trim()));
1684
+ }, "isInvalidDate"), ai = /* @__PURE__ */ h(function(t) {
1685
+ Ee = t;
1686
+ }, "setWeekday"), ii = /* @__PURE__ */ h(function() {
1687
+ return Ee;
1688
+ }, "getWeekday"), si = /* @__PURE__ */ h(function(t) {
1689
+ ee = t;
1690
+ }, "setWeekend"), Cn = /* @__PURE__ */ h(function(t, e, n, r) {
1691
+ if (!n.length || t.manualEndTime)
1692
+ return;
1693
+ let a;
1694
+ t.startTime instanceof Date ? a = at(t.startTime) : a = at(t.startTime, e, !0), a = a.add(1, "d");
1695
+ let i;
1696
+ t.endTime instanceof Date ? i = at(t.endTime) : i = at(t.endTime, e, !0);
1697
+ const [s, k] = oi(
1698
+ a,
1699
+ i,
1700
+ e,
1701
+ n,
1702
+ r
1703
+ );
1704
+ t.endTime = s.toDate(), t.renderEndTime = k;
1705
+ }, "checkTaskDates"), oi = /* @__PURE__ */ h(function(t, e, n, r, a) {
1706
+ let i = !1, s = null;
1707
+ for (; t <= e; )
1708
+ i || (s = e.toDate()), i = Dn(t, n, r, a), i && (e = e.add(1, "d")), t = t.add(1, "d");
1709
+ return [e, s];
1710
+ }, "fixTaskDates"), pe = /* @__PURE__ */ h(function(t, e, n) {
1711
+ n = n.trim();
1712
+ const a = /^after\s+(?<ids>[\d\w- ]+)/.exec(n);
1713
+ if (a !== null) {
1714
+ let s = null;
1715
+ for (const M of a.groups.ids.split(" ")) {
1716
+ let T = Ct(M);
1717
+ T !== void 0 && (!s || T.endTime > s.endTime) && (s = T);
1718
+ }
1719
+ if (s)
1720
+ return s.endTime;
1721
+ const k = /* @__PURE__ */ new Date();
1722
+ return k.setHours(0, 0, 0, 0), k;
1723
+ }
1724
+ let i = at(n, e.trim(), !0);
1725
+ if (i.isValid())
1726
+ return i.toDate();
1727
+ {
1728
+ Qt.debug("Invalid date:" + n), Qt.debug("With date format:" + e.trim());
1729
+ const s = new Date(n);
1730
+ if (s === void 0 || isNaN(s.getTime()) || // WebKit browsers can mis-parse invalid dates to be ridiculously
1731
+ // huge numbers, e.g. new Date('202304') gets parsed as January 1, 202304.
1732
+ // This can cause virtually infinite loops while rendering, so for the
1733
+ // purposes of Gantt charts we'll just treat any date beyond 10,000 AD/BC as
1734
+ // invalid.
1735
+ s.getFullYear() < -1e4 || s.getFullYear() > 1e4)
1736
+ throw new Error("Invalid date:" + n);
1737
+ return s;
1738
+ }
1739
+ }, "getStartDate"), Mn = /* @__PURE__ */ h(function(t) {
1740
+ const e = /^(\d+(?:\.\d+)?)([Mdhmswy]|ms)$/.exec(t.trim());
1741
+ return e !== null ? [Number.parseFloat(e[1]), e[2]] : [NaN, "ms"];
1742
+ }, "parseDuration"), _n = /* @__PURE__ */ h(function(t, e, n, r = !1) {
1743
+ n = n.trim();
1744
+ const i = /^until\s+(?<ids>[\d\w- ]+)/.exec(n);
1745
+ if (i !== null) {
1746
+ let g = null;
1747
+ for (const D of i.groups.ids.split(" ")) {
1748
+ let b = Ct(D);
1749
+ b !== void 0 && (!g || b.startTime < g.startTime) && (g = b);
1750
+ }
1751
+ if (g)
1752
+ return g.startTime;
1753
+ const U = /* @__PURE__ */ new Date();
1754
+ return U.setHours(0, 0, 0, 0), U;
1755
+ }
1756
+ let s = at(n, e.trim(), !0);
1757
+ if (s.isValid())
1758
+ return r && (s = s.add(1, "d")), s.toDate();
1759
+ let k = at(t);
1760
+ const [M, T] = Mn(n);
1761
+ if (!Number.isNaN(M)) {
1762
+ const g = k.add(M, T);
1763
+ g.isValid() && (k = g);
1764
+ }
1765
+ return k.toDate();
1766
+ }, "getEndDate"), Gt = 0, Ft = /* @__PURE__ */ h(function(t) {
1767
+ return t === void 0 ? (Gt = Gt + 1, "task" + Gt) : t;
1768
+ }, "parseId"), ci = /* @__PURE__ */ h(function(t, e) {
1769
+ let n;
1770
+ e.substr(0, 1) === ":" ? n = e.substr(1, e.length) : n = e;
1771
+ const r = n.split(","), a = {};
1772
+ Le(r, a, wn);
1773
+ for (let s = 0; s < r.length; s++)
1774
+ r[s] = r[s].trim();
1775
+ let i = "";
1776
+ switch (r.length) {
1777
+ case 1:
1778
+ a.id = Ft(), a.startTime = t.endTime, i = r[0];
1779
+ break;
1780
+ case 2:
1781
+ a.id = Ft(), a.startTime = pe(void 0, ut, r[0]), i = r[1];
1782
+ break;
1783
+ case 3:
1784
+ a.id = Ft(r[0]), a.startTime = pe(void 0, ut, r[1]), i = r[2];
1785
+ break;
1786
+ }
1787
+ return i && (a.endTime = _n(a.startTime, ut, i, Rt), a.manualEndTime = at(i, "YYYY-MM-DD", !0).isValid(), Cn(a, ut, Pt, zt)), a;
1788
+ }, "compileData"), li = /* @__PURE__ */ h(function(t, e) {
1789
+ let n;
1790
+ e.substr(0, 1) === ":" ? n = e.substr(1, e.length) : n = e;
1791
+ const r = n.split(","), a = {};
1792
+ Le(r, a, wn);
1793
+ for (let i = 0; i < r.length; i++)
1794
+ r[i] = r[i].trim();
1795
+ switch (r.length) {
1796
+ case 1:
1797
+ a.id = Ft(), a.startTime = {
1798
+ type: "prevTaskEnd",
1799
+ id: t
1800
+ }, a.endTime = {
1801
+ data: r[0]
1802
+ };
1803
+ break;
1804
+ case 2:
1805
+ a.id = Ft(), a.startTime = {
1806
+ type: "getStartDate",
1807
+ startData: r[0]
1808
+ }, a.endTime = {
1809
+ data: r[1]
1810
+ };
1811
+ break;
1812
+ case 3:
1813
+ a.id = Ft(r[0]), a.startTime = {
1814
+ type: "getStartDate",
1815
+ startData: r[1]
1816
+ }, a.endTime = {
1817
+ data: r[2]
1818
+ };
1819
+ break;
1820
+ }
1821
+ return a;
1822
+ }, "parseData"), ve, jt, tt = [], Sn = {}, ui = /* @__PURE__ */ h(function(t, e) {
1823
+ const n = {
1824
+ section: Et,
1825
+ type: Et,
1826
+ processed: !1,
1827
+ manualEndTime: !1,
1828
+ renderEndTime: null,
1829
+ raw: { data: e },
1830
+ task: t,
1831
+ classes: []
1832
+ }, r = li(jt, e);
1833
+ n.raw.startTime = r.startTime, n.raw.endTime = r.endTime, n.id = r.id, n.prevTaskId = jt, n.active = r.active, n.done = r.done, n.crit = r.crit, n.milestone = r.milestone, n.order = ke, ke++;
1834
+ const a = tt.push(n);
1835
+ jt = n.id, Sn[n.id] = a - 1;
1836
+ }, "addTask"), Ct = /* @__PURE__ */ h(function(t) {
1837
+ const e = Sn[t];
1838
+ return tt[e];
1839
+ }, "findTaskById"), fi = /* @__PURE__ */ h(function(t, e) {
1840
+ const n = {
1841
+ section: Et,
1842
+ type: Et,
1843
+ description: t,
1844
+ task: t,
1845
+ classes: []
1846
+ }, r = ci(ve, e);
1847
+ n.startTime = r.startTime, n.endTime = r.endTime, n.id = r.id, n.active = r.active, n.done = r.done, n.crit = r.crit, n.milestone = r.milestone, ve = n, te.push(n);
1848
+ }, "addTaskOrg"), je = /* @__PURE__ */ h(function() {
1849
+ const t = /* @__PURE__ */ h(function(n) {
1850
+ const r = tt[n];
1851
+ let a = "";
1852
+ switch (tt[n].raw.startTime.type) {
1853
+ case "prevTaskEnd": {
1854
+ const i = Ct(r.prevTaskId);
1855
+ r.startTime = i.endTime;
1856
+ break;
1857
+ }
1858
+ case "getStartDate":
1859
+ a = pe(void 0, ut, tt[n].raw.startTime.startData), a && (tt[n].startTime = a);
1860
+ break;
1861
+ }
1862
+ return tt[n].startTime && (tt[n].endTime = _n(
1863
+ tt[n].startTime,
1864
+ ut,
1865
+ tt[n].raw.endTime.data,
1866
+ Rt
1867
+ ), tt[n].endTime && (tt[n].processed = !0, tt[n].manualEndTime = at(
1868
+ tt[n].raw.endTime.data,
1869
+ "YYYY-MM-DD",
1870
+ !0
1871
+ ).isValid(), Cn(tt[n], ut, Pt, zt))), tt[n].processed;
1872
+ }, "compileTask");
1873
+ let e = !0;
1874
+ for (const [n, r] of tt.entries())
1875
+ t(n), e = e && r.processed;
1876
+ return e;
1877
+ }, "compileTasks"), hi = /* @__PURE__ */ h(function(t, e) {
1878
+ let n = e;
1879
+ _t().securityLevel !== "loose" && (n = Vn(e)), t.split(",").forEach(function(r) {
1880
+ Ct(r) !== void 0 && (Yn(r, () => {
1881
+ window.open(n, "_self");
1882
+ }), _e.set(r, n));
1883
+ }), Fn(t, "clickable");
1884
+ }, "setLink"), Fn = /* @__PURE__ */ h(function(t, e) {
1885
+ t.split(",").forEach(function(n) {
1886
+ let r = Ct(n);
1887
+ r !== void 0 && r.classes.push(e);
1888
+ });
1889
+ }, "setClass"), di = /* @__PURE__ */ h(function(t, e, n) {
1890
+ if (_t().securityLevel !== "loose" || e === void 0)
1891
+ return;
1892
+ let r = [];
1893
+ if (typeof n == "string") {
1894
+ r = n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);
1895
+ for (let i = 0; i < r.length; i++) {
1896
+ let s = r[i].trim();
1897
+ s.startsWith('"') && s.endsWith('"') && (s = s.substr(1, s.length - 2)), r[i] = s;
1898
+ }
1899
+ }
1900
+ r.length === 0 && r.push(t), Ct(t) !== void 0 && Yn(t, () => {
1901
+ Rn.runFunc(e, ...r);
1902
+ });
1903
+ }, "setClickFun"), Yn = /* @__PURE__ */ h(function(t, e) {
1904
+ Ye.push(
1905
+ function() {
1906
+ const n = document.querySelector(`[id="${t}"]`);
1907
+ n !== null && n.addEventListener("click", function() {
1908
+ e();
1909
+ });
1910
+ },
1911
+ function() {
1912
+ const n = document.querySelector(`[id="${t}-text"]`);
1913
+ n !== null && n.addEventListener("click", function() {
1914
+ e();
1915
+ });
1916
+ }
1917
+ );
1918
+ }, "pushFun"), mi = /* @__PURE__ */ h(function(t, e, n) {
1919
+ t.split(",").forEach(function(r) {
1920
+ di(r, e, n);
1921
+ }), Fn(t, "clickable");
1922
+ }, "setClickEvent"), gi = /* @__PURE__ */ h(function(t) {
1923
+ Ye.forEach(function(e) {
1924
+ e(t);
1925
+ });
1926
+ }, "bindFunctions"), yi = {
1927
+ getConfig: /* @__PURE__ */ h(() => _t().gantt, "getConfig"),
1928
+ clear: Ia,
1929
+ setDateFormat: Pa,
1930
+ getDateFormat: ja,
1931
+ enableInclusiveEndDates: Ra,
1932
+ endDatesAreInclusive: Ba,
1933
+ enableTopAxis: Za,
1934
+ topAxisEnabled: Xa,
1935
+ setAxisFormat: Wa,
1936
+ getAxisFormat: Oa,
1937
+ setTickInterval: Ha,
1938
+ getTickInterval: Na,
1939
+ setTodayMarker: Va,
1940
+ getTodayMarker: za,
1941
+ setAccTitle: Ln,
1942
+ getAccTitle: An,
1943
+ setDiagramTitle: In,
1944
+ getDiagramTitle: Wn,
1945
+ setDisplayMode: qa,
1946
+ getDisplayMode: Ga,
1947
+ setAccDescription: On,
1948
+ getAccDescription: Hn,
1949
+ addSection: ei,
1950
+ getSections: ni,
1951
+ getTasks: ri,
1952
+ addTask: ui,
1953
+ findTaskById: Ct,
1954
+ addTaskOrg: fi,
1955
+ setIncludes: Qa,
1956
+ getIncludes: $a,
1957
+ setExcludes: Ja,
1958
+ getExcludes: Ka,
1959
+ setClickEvent: mi,
1960
+ setLink: hi,
1961
+ getLinks: ti,
1962
+ bindFunctions: gi,
1963
+ parseDuration: Mn,
1964
+ isInvalidDate: Dn,
1965
+ setWeekday: ai,
1966
+ getWeekday: ii,
1967
+ setWeekend: si
1968
+ };
1969
+ function Le(t, e, n) {
1970
+ let r = !0;
1971
+ for (; r; )
1972
+ r = !1, n.forEach(function(a) {
1973
+ const i = "^\\s*" + a + "\\s*$", s = new RegExp(i);
1974
+ t[0].match(s) && (e[a] = !0, t.shift(1), r = !0);
1975
+ });
1976
+ }
1977
+ h(Le, "getTaskTags");
1978
+ var ki = /* @__PURE__ */ h(function() {
1979
+ Qt.debug("Something is calling, setConf, remove the call");
1980
+ }, "setConf"), Qe = {
1981
+ monday: Ht,
1982
+ tuesday: hn,
1983
+ wednesday: dn,
1984
+ thursday: bt,
1985
+ friday: mn,
1986
+ saturday: gn,
1987
+ sunday: Vt
1988
+ }, pi = /* @__PURE__ */ h((t, e) => {
1989
+ let n = [...t].map(() => -1 / 0), r = [...t].sort((i, s) => i.startTime - s.startTime || i.order - s.order), a = 0;
1990
+ for (const i of r)
1991
+ for (let s = 0; s < n.length; s++)
1992
+ if (i.startTime >= n[s]) {
1993
+ n[s] = i.endTime, i.order = s + e, s > a && (a = s);
1994
+ break;
1995
+ }
1996
+ return a;
1997
+ }, "getMaxIntersections"), ht, vi = /* @__PURE__ */ h(function(t, e, n, r) {
1998
+ const a = _t().gantt, i = _t().securityLevel;
1999
+ let s;
2000
+ i === "sandbox" && (s = Zt("#i" + e));
2001
+ const k = i === "sandbox" ? Zt(s.nodes()[0].contentDocument.body) : Zt("body"), M = i === "sandbox" ? s.nodes()[0].contentDocument : document, T = M.getElementById(e);
2002
+ ht = T.parentElement.offsetWidth, ht === void 0 && (ht = 1200), a.useWidth !== void 0 && (ht = a.useWidth);
2003
+ const g = r.db.getTasks();
2004
+ let U = [];
2005
+ for (const x of g)
2006
+ U.push(x.type);
2007
+ U = H(U);
2008
+ const D = {};
2009
+ let b = 2 * a.topPadding;
2010
+ if (r.db.getDisplayMode() === "compact" || a.displayMode === "compact") {
2011
+ const x = {};
2012
+ for (const _ of g)
2013
+ x[_.section] === void 0 ? x[_.section] = [_] : x[_.section].push(_);
2014
+ let F = 0;
2015
+ for (const _ of Object.keys(x)) {
2016
+ const S = pi(x[_], F) + 1;
2017
+ F += S, b += S * (a.barHeight + a.barGap), D[_] = S;
2018
+ }
2019
+ } else {
2020
+ b += g.length * (a.barHeight + a.barGap);
2021
+ for (const x of U)
2022
+ D[x] = g.filter((F) => F.type === x).length;
2023
+ }
2024
+ T.setAttribute("viewBox", "0 0 " + ht + " " + b);
2025
+ const q = k.select(`[id="${e}"]`), O = Ua().domain([
2026
+ tr(g, function(x) {
2027
+ return x.startTime;
2028
+ }),
2029
+ Kn(g, function(x) {
2030
+ return x.endTime;
2031
+ })
2032
+ ]).rangeRound([0, ht - a.leftPadding - a.rightPadding]);
2033
+ function C(x, F) {
2034
+ const _ = x.startTime, S = F.startTime;
2035
+ let p = 0;
2036
+ return _ > S ? p = 1 : _ < S && (p = -1), p;
2037
+ }
2038
+ h(C, "taskCompare"), g.sort(C), I(g, ht, b), zn(q, b, ht, a.useMaxWidth), q.append("text").text(r.db.getDiagramTitle()).attr("x", ht / 2).attr("y", a.titleTopMargin).attr("class", "titleText");
2039
+ function I(x, F, _) {
2040
+ const S = a.barHeight, p = S + a.barGap, Y = a.topPadding, l = a.leftPadding, f = qn().domain([0, U.length]).range(["#00B9FA", "#F95002"]).interpolate(gr);
2041
+ W(
2042
+ p,
2043
+ Y,
2044
+ l,
2045
+ F,
2046
+ _,
2047
+ x,
2048
+ r.db.getExcludes(),
2049
+ r.db.getIncludes()
2050
+ ), Z(l, Y, F, _), V(x, p, Y, l, S, f, F), Q(p, Y), w(l, Y, F, _);
2051
+ }
2052
+ h(I, "makeGantt");
2053
+ function V(x, F, _, S, p, Y, l) {
2054
+ const y = [...new Set(x.map((d) => d.order))].map((d) => x.find((o) => o.order === d));
2055
+ q.append("g").selectAll("rect").data(y).enter().append("rect").attr("x", 0).attr("y", function(d, o) {
2056
+ return o = d.order, o * F + _ - 2;
2057
+ }).attr("width", function() {
2058
+ return l - a.rightPadding / 2;
2059
+ }).attr("height", F).attr("class", function(d) {
2060
+ for (const [o, P] of U.entries())
2061
+ if (d.type === P)
2062
+ return "section section" + o % a.numberSectionStyles;
2063
+ return "section section0";
2064
+ });
2065
+ const m = q.append("g").selectAll("rect").data(x).enter(), E = r.db.getLinks();
2066
+ if (m.append("rect").attr("id", function(d) {
2067
+ return d.id;
2068
+ }).attr("rx", 3).attr("ry", 3).attr("x", function(d) {
2069
+ return d.milestone ? O(d.startTime) + S + 0.5 * (O(d.endTime) - O(d.startTime)) - 0.5 * p : O(d.startTime) + S;
2070
+ }).attr("y", function(d, o) {
2071
+ return o = d.order, o * F + _;
2072
+ }).attr("width", function(d) {
2073
+ return d.milestone ? p : O(d.renderEndTime || d.endTime) - O(d.startTime);
2074
+ }).attr("height", p).attr("transform-origin", function(d, o) {
2075
+ return o = d.order, (O(d.startTime) + S + 0.5 * (O(d.endTime) - O(d.startTime))).toString() + "px " + (o * F + _ + 0.5 * p).toString() + "px";
2076
+ }).attr("class", function(d) {
2077
+ const o = "task";
2078
+ let P = "";
2079
+ d.classes.length > 0 && (P = d.classes.join(" "));
2080
+ let z = 0;
2081
+ for (const [K, G] of U.entries())
2082
+ d.type === G && (z = K % a.numberSectionStyles);
2083
+ let R = "";
2084
+ return d.active ? d.crit ? R += " activeCrit" : R = " active" : d.done ? d.crit ? R = " doneCrit" : R = " done" : d.crit && (R += " crit"), R.length === 0 && (R = " task"), d.milestone && (R = " milestone " + R), R += z, R += " " + P, o + R;
2085
+ }), m.append("text").attr("id", function(d) {
2086
+ return d.id + "-text";
2087
+ }).text(function(d) {
2088
+ return d.task;
2089
+ }).attr("font-size", a.fontSize).attr("x", function(d) {
2090
+ let o = O(d.startTime), P = O(d.renderEndTime || d.endTime);
2091
+ d.milestone && (o += 0.5 * (O(d.endTime) - O(d.startTime)) - 0.5 * p), d.milestone && (P = o + p);
2092
+ const z = this.getBBox().width;
2093
+ return z > P - o ? P + z + 1.5 * a.leftPadding > l ? o + S - 5 : P + S + 5 : (P - o) / 2 + o + S;
2094
+ }).attr("y", function(d, o) {
2095
+ return o = d.order, o * F + a.barHeight / 2 + (a.fontSize / 2 - 2) + _;
2096
+ }).attr("text-height", p).attr("class", function(d) {
2097
+ const o = O(d.startTime);
2098
+ let P = O(d.endTime);
2099
+ d.milestone && (P = o + p);
2100
+ const z = this.getBBox().width;
2101
+ let R = "";
2102
+ d.classes.length > 0 && (R = d.classes.join(" "));
2103
+ let K = 0;
2104
+ for (const [$, it] of U.entries())
2105
+ d.type === it && (K = $ % a.numberSectionStyles);
2106
+ let G = "";
2107
+ return d.active && (d.crit ? G = "activeCritText" + K : G = "activeText" + K), d.done ? d.crit ? G = G + " doneCritText" + K : G = G + " doneText" + K : d.crit && (G = G + " critText" + K), d.milestone && (G += " milestoneText"), z > P - o ? P + z + 1.5 * a.leftPadding > l ? R + " taskTextOutsideLeft taskTextOutside" + K + " " + G : R + " taskTextOutsideRight taskTextOutside" + K + " " + G + " width-" + z : R + " taskText taskText" + K + " " + G + " width-" + z;
2108
+ }), _t().securityLevel === "sandbox") {
2109
+ let d;
2110
+ d = Zt("#i" + e);
2111
+ const o = d.nodes()[0].contentDocument;
2112
+ m.filter(function(P) {
2113
+ return E.has(P.id);
2114
+ }).each(function(P) {
2115
+ var z = o.querySelector("#" + P.id), R = o.querySelector("#" + P.id + "-text");
2116
+ const K = z.parentNode;
2117
+ var G = o.createElement("a");
2118
+ G.setAttribute("xlink:href", E.get(P.id)), G.setAttribute("target", "_top"), K.appendChild(G), G.appendChild(z), G.appendChild(R);
2119
+ });
2120
+ }
2121
+ }
2122
+ h(V, "drawRects");
2123
+ function W(x, F, _, S, p, Y, l, f) {
2124
+ if (l.length === 0 && f.length === 0)
2125
+ return;
2126
+ let y, m;
2127
+ for (const { startTime: z, endTime: R } of Y)
2128
+ (y === void 0 || z < y) && (y = z), (m === void 0 || R > m) && (m = R);
2129
+ if (!y || !m)
2130
+ return;
2131
+ if (at(m).diff(at(y), "year") > 5) {
2132
+ Qt.warn(
2133
+ "The difference between the min and max time is more than 5 years. This will cause performance issues. Skipping drawing exclude days."
2134
+ );
2135
+ return;
2136
+ }
2137
+ const E = r.db.getDateFormat(), c = [];
2138
+ let d = null, o = at(y);
2139
+ for (; o.valueOf() <= m; )
2140
+ r.db.isInvalidDate(o, E, l, f) ? d ? d.end = o : d = {
2141
+ start: o,
2142
+ end: o
2143
+ } : d && (c.push(d), d = null), o = o.add(1, "d");
2144
+ q.append("g").selectAll("rect").data(c).enter().append("rect").attr("id", function(z) {
2145
+ return "exclude-" + z.start.format("YYYY-MM-DD");
2146
+ }).attr("x", function(z) {
2147
+ return O(z.start) + _;
2148
+ }).attr("y", a.gridLineStartPadding).attr("width", function(z) {
2149
+ const R = z.end.add(1, "day");
2150
+ return O(R) - O(z.start);
2151
+ }).attr("height", p - F - a.gridLineStartPadding).attr("transform-origin", function(z, R) {
2152
+ return (O(z.start) + _ + 0.5 * (O(z.end) - O(z.start))).toString() + "px " + (R * x + 0.5 * p).toString() + "px";
2153
+ }).attr("class", "exclude-range");
2154
+ }
2155
+ h(W, "drawExcludeDays");
2156
+ function Z(x, F, _, S) {
2157
+ let p = cr(O).tickSize(-S + F + a.gridLineStartPadding).tickFormat(Kt(r.db.getAxisFormat() || a.axisFormat || "%Y-%m-%d"));
2158
+ const l = /^([1-9]\d*)(millisecond|second|minute|hour|day|week|month)$/.exec(
2159
+ r.db.getTickInterval() || a.tickInterval
2160
+ );
2161
+ if (l !== null) {
2162
+ const f = l[1], y = l[2], m = r.db.getWeekday() || a.weekday;
2163
+ switch (y) {
2164
+ case "millisecond":
2165
+ p.ticks(Yt.every(f));
2166
+ break;
2167
+ case "second":
2168
+ p.ticks(vt.every(f));
2169
+ break;
2170
+ case "minute":
2171
+ p.ticks(Wt.every(f));
2172
+ break;
2173
+ case "hour":
2174
+ p.ticks(Ot.every(f));
2175
+ break;
2176
+ case "day":
2177
+ p.ticks(Tt.every(f));
2178
+ break;
2179
+ case "week":
2180
+ p.ticks(Qe[m].every(f));
2181
+ break;
2182
+ case "month":
2183
+ p.ticks(Nt.every(f));
2184
+ break;
2185
+ }
2186
+ }
2187
+ if (q.append("g").attr("class", "grid").attr("transform", "translate(" + x + ", " + (S - 50) + ")").call(p).selectAll("text").style("text-anchor", "middle").attr("fill", "#000").attr("stroke", "none").attr("font-size", 10).attr("dy", "1em"), r.db.topAxisEnabled() || a.topAxis) {
2188
+ let f = or(O).tickSize(-S + F + a.gridLineStartPadding).tickFormat(Kt(r.db.getAxisFormat() || a.axisFormat || "%Y-%m-%d"));
2189
+ if (l !== null) {
2190
+ const y = l[1], m = l[2], E = r.db.getWeekday() || a.weekday;
2191
+ switch (m) {
2192
+ case "millisecond":
2193
+ f.ticks(Yt.every(y));
2194
+ break;
2195
+ case "second":
2196
+ f.ticks(vt.every(y));
2197
+ break;
2198
+ case "minute":
2199
+ f.ticks(Wt.every(y));
2200
+ break;
2201
+ case "hour":
2202
+ f.ticks(Ot.every(y));
2203
+ break;
2204
+ case "day":
2205
+ f.ticks(Tt.every(y));
2206
+ break;
2207
+ case "week":
2208
+ f.ticks(Qe[E].every(y));
2209
+ break;
2210
+ case "month":
2211
+ f.ticks(Nt.every(y));
2212
+ break;
2213
+ }
2214
+ }
2215
+ q.append("g").attr("class", "grid").attr("transform", "translate(" + x + ", " + F + ")").call(f).selectAll("text").style("text-anchor", "middle").attr("fill", "#000").attr("stroke", "none").attr("font-size", 10);
2216
+ }
2217
+ }
2218
+ h(Z, "makeGrid");
2219
+ function Q(x, F) {
2220
+ let _ = 0;
2221
+ const S = Object.keys(D).map((p) => [p, D[p]]);
2222
+ q.append("g").selectAll("text").data(S).enter().append(function(p) {
2223
+ const Y = p[0].split(Pn.lineBreakRegex), l = -(Y.length - 1) / 2, f = M.createElementNS("http://www.w3.org/2000/svg", "text");
2224
+ f.setAttribute("dy", l + "em");
2225
+ for (const [y, m] of Y.entries()) {
2226
+ const E = M.createElementNS("http://www.w3.org/2000/svg", "tspan");
2227
+ E.setAttribute("alignment-baseline", "central"), E.setAttribute("x", "10"), y > 0 && E.setAttribute("dy", "1em"), E.textContent = m, f.appendChild(E);
2228
+ }
2229
+ return f;
2230
+ }).attr("x", 10).attr("y", function(p, Y) {
2231
+ if (Y > 0)
2232
+ for (let l = 0; l < Y; l++)
2233
+ return _ += S[Y - 1][1], p[1] * x / 2 + _ * x + F;
2234
+ else
2235
+ return p[1] * x / 2 + F;
2236
+ }).attr("font-size", a.sectionFontSize).attr("class", function(p) {
2237
+ for (const [Y, l] of U.entries())
2238
+ if (p[0] === l)
2239
+ return "sectionTitle sectionTitle" + Y % a.numberSectionStyles;
2240
+ return "sectionTitle";
2241
+ });
2242
+ }
2243
+ h(Q, "vertLabels");
2244
+ function w(x, F, _, S) {
2245
+ const p = r.db.getTodayMarker();
2246
+ if (p === "off")
2247
+ return;
2248
+ const Y = q.append("g").attr("class", "today"), l = /* @__PURE__ */ new Date(), f = Y.append("line");
2249
+ f.attr("x1", O(l) + x).attr("x2", O(l) + x).attr("y1", a.titleTopMargin).attr("y2", S - a.titleTopMargin).attr("class", "today"), p !== "" && f.attr("style", p.replace(/,/g, ";"));
2250
+ }
2251
+ h(w, "drawToday");
2252
+ function H(x) {
2253
+ const F = {}, _ = [];
2254
+ for (let S = 0, p = x.length; S < p; ++S)
2255
+ Object.prototype.hasOwnProperty.call(F, x[S]) || (F[x[S]] = !0, _.push(x[S]));
2256
+ return _;
2257
+ }
2258
+ h(H, "checkUnique");
2259
+ }, "draw"), Ti = {
2260
+ setConf: ki,
2261
+ draw: vi
2262
+ }, bi = /* @__PURE__ */ h((t) => `
2263
+ .mermaid-main-font {
2264
+ font-family: ${t.fontFamily};
2265
+ }
2266
+
2267
+ .exclude-range {
2268
+ fill: ${t.excludeBkgColor};
2269
+ }
2270
+
2271
+ .section {
2272
+ stroke: none;
2273
+ opacity: 0.2;
2274
+ }
2275
+
2276
+ .section0 {
2277
+ fill: ${t.sectionBkgColor};
2278
+ }
2279
+
2280
+ .section2 {
2281
+ fill: ${t.sectionBkgColor2};
2282
+ }
2283
+
2284
+ .section1,
2285
+ .section3 {
2286
+ fill: ${t.altSectionBkgColor};
2287
+ opacity: 0.2;
2288
+ }
2289
+
2290
+ .sectionTitle0 {
2291
+ fill: ${t.titleColor};
2292
+ }
2293
+
2294
+ .sectionTitle1 {
2295
+ fill: ${t.titleColor};
2296
+ }
2297
+
2298
+ .sectionTitle2 {
2299
+ fill: ${t.titleColor};
2300
+ }
2301
+
2302
+ .sectionTitle3 {
2303
+ fill: ${t.titleColor};
2304
+ }
2305
+
2306
+ .sectionTitle {
2307
+ text-anchor: start;
2308
+ font-family: ${t.fontFamily};
2309
+ }
2310
+
2311
+
2312
+ /* Grid and axis */
2313
+
2314
+ .grid .tick {
2315
+ stroke: ${t.gridColor};
2316
+ opacity: 0.8;
2317
+ shape-rendering: crispEdges;
2318
+ }
2319
+
2320
+ .grid .tick text {
2321
+ font-family: ${t.fontFamily};
2322
+ fill: ${t.textColor};
2323
+ }
2324
+
2325
+ .grid path {
2326
+ stroke-width: 0;
2327
+ }
2328
+
2329
+
2330
+ /* Today line */
2331
+
2332
+ .today {
2333
+ fill: none;
2334
+ stroke: ${t.todayLineColor};
2335
+ stroke-width: 2px;
2336
+ }
2337
+
2338
+
2339
+ /* Task styling */
2340
+
2341
+ /* Default task */
2342
+
2343
+ .task {
2344
+ stroke-width: 2;
2345
+ }
2346
+
2347
+ .taskText {
2348
+ text-anchor: middle;
2349
+ font-family: ${t.fontFamily};
2350
+ }
2351
+
2352
+ .taskTextOutsideRight {
2353
+ fill: ${t.taskTextDarkColor};
2354
+ text-anchor: start;
2355
+ font-family: ${t.fontFamily};
2356
+ }
2357
+
2358
+ .taskTextOutsideLeft {
2359
+ fill: ${t.taskTextDarkColor};
2360
+ text-anchor: end;
2361
+ }
2362
+
2363
+
2364
+ /* Special case clickable */
2365
+
2366
+ .task.clickable {
2367
+ cursor: pointer;
2368
+ }
2369
+
2370
+ .taskText.clickable {
2371
+ cursor: pointer;
2372
+ fill: ${t.taskTextClickableColor} !important;
2373
+ font-weight: bold;
2374
+ }
2375
+
2376
+ .taskTextOutsideLeft.clickable {
2377
+ cursor: pointer;
2378
+ fill: ${t.taskTextClickableColor} !important;
2379
+ font-weight: bold;
2380
+ }
2381
+
2382
+ .taskTextOutsideRight.clickable {
2383
+ cursor: pointer;
2384
+ fill: ${t.taskTextClickableColor} !important;
2385
+ font-weight: bold;
2386
+ }
2387
+
2388
+
2389
+ /* Specific task settings for the sections*/
2390
+
2391
+ .taskText0,
2392
+ .taskText1,
2393
+ .taskText2,
2394
+ .taskText3 {
2395
+ fill: ${t.taskTextColor};
2396
+ }
2397
+
2398
+ .task0,
2399
+ .task1,
2400
+ .task2,
2401
+ .task3 {
2402
+ fill: ${t.taskBkgColor};
2403
+ stroke: ${t.taskBorderColor};
2404
+ }
2405
+
2406
+ .taskTextOutside0,
2407
+ .taskTextOutside2
2408
+ {
2409
+ fill: ${t.taskTextOutsideColor};
2410
+ }
2411
+
2412
+ .taskTextOutside1,
2413
+ .taskTextOutside3 {
2414
+ fill: ${t.taskTextOutsideColor};
2415
+ }
2416
+
2417
+
2418
+ /* Active task */
2419
+
2420
+ .active0,
2421
+ .active1,
2422
+ .active2,
2423
+ .active3 {
2424
+ fill: ${t.activeTaskBkgColor};
2425
+ stroke: ${t.activeTaskBorderColor};
2426
+ }
2427
+
2428
+ .activeText0,
2429
+ .activeText1,
2430
+ .activeText2,
2431
+ .activeText3 {
2432
+ fill: ${t.taskTextDarkColor} !important;
2433
+ }
2434
+
2435
+
2436
+ /* Completed task */
2437
+
2438
+ .done0,
2439
+ .done1,
2440
+ .done2,
2441
+ .done3 {
2442
+ stroke: ${t.doneTaskBorderColor};
2443
+ fill: ${t.doneTaskBkgColor};
2444
+ stroke-width: 2;
2445
+ }
2446
+
2447
+ .doneText0,
2448
+ .doneText1,
2449
+ .doneText2,
2450
+ .doneText3 {
2451
+ fill: ${t.taskTextDarkColor} !important;
2452
+ }
2453
+
2454
+
2455
+ /* Tasks on the critical line */
2456
+
2457
+ .crit0,
2458
+ .crit1,
2459
+ .crit2,
2460
+ .crit3 {
2461
+ stroke: ${t.critBorderColor};
2462
+ fill: ${t.critBkgColor};
2463
+ stroke-width: 2;
2464
+ }
2465
+
2466
+ .activeCrit0,
2467
+ .activeCrit1,
2468
+ .activeCrit2,
2469
+ .activeCrit3 {
2470
+ stroke: ${t.critBorderColor};
2471
+ fill: ${t.activeTaskBkgColor};
2472
+ stroke-width: 2;
2473
+ }
2474
+
2475
+ .doneCrit0,
2476
+ .doneCrit1,
2477
+ .doneCrit2,
2478
+ .doneCrit3 {
2479
+ stroke: ${t.critBorderColor};
2480
+ fill: ${t.doneTaskBkgColor};
2481
+ stroke-width: 2;
2482
+ cursor: pointer;
2483
+ shape-rendering: crispEdges;
2484
+ }
2485
+
2486
+ .milestone {
2487
+ transform: rotate(45deg) scale(0.8,0.8);
2488
+ }
2489
+
2490
+ .milestoneText {
2491
+ font-style: italic;
2492
+ }
2493
+ .doneCritText0,
2494
+ .doneCritText1,
2495
+ .doneCritText2,
2496
+ .doneCritText3 {
2497
+ fill: ${t.taskTextDarkColor} !important;
2498
+ }
2499
+
2500
+ .activeCritText0,
2501
+ .activeCritText1,
2502
+ .activeCritText2,
2503
+ .activeCritText3 {
2504
+ fill: ${t.taskTextDarkColor} !important;
2505
+ }
2506
+
2507
+ .titleText {
2508
+ text-anchor: middle;
2509
+ font-size: 18px;
2510
+ fill: ${t.titleColor || t.textColor};
2511
+ font-family: ${t.fontFamily};
2512
+ }
2513
+ `, "getStyles"), xi = bi, _i = {
2514
+ parser: Aa,
2515
+ db: yi,
2516
+ renderer: Ti,
2517
+ styles: xi
2518
+ };
2519
+ export {
2520
+ _i as diagram
2521
+ };