@schmitech/chatbot-widget 0.5.3 → 0.5.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Tableau10-D7jGxypv-BNlEL2G_.js +9 -0
- package/dist/arc-D-ZI5fuh-CvDHBzlN.js +84 -0
- package/dist/blockDiagram-c4efeb88-DUnNxfIR-Bhh-x1q6.js +1221 -0
- package/dist/c4Diagram-c83219d4-cC4OxfBG-DRTO_jy5.js +1580 -0
- package/dist/channel-hcYozyrT-BSOc2Hp-.js +6 -0
- package/dist/chatbot-widget.bundle.js +3881 -1586
- package/dist/chatbot-widget.css +1 -1
- package/dist/chatbot-widget.es.js +12 -63659
- package/dist/chatbot-widget.umd.js +3880 -1585
- package/dist/classDiagram-beda092f-BLYhf5Mr-vk4Ko58U.js +218 -0
- package/dist/classDiagram-v2-2358418a-VBkbF8mr-Ca0l1fEs.js +201 -0
- package/dist/clone-BZIkCMuw-B9owNq6E.js +9 -0
- package/dist/config/index.d.ts +2 -2
- package/dist/createText-1719965b-UejsQ47k-B1DYw0WW.js +2955 -0
- package/dist/edges-96097737-1M5QvjOd-BpQVVoQN.js +1088 -0
- package/dist/erDiagram-0228fc6a-CjBNxHoC-DXDVlH55.js +929 -0
- package/dist/flowDb-c6c81e3f-Q2aoOxdz-DfrfI3H1.js +1127 -0
- package/dist/flowDiagram-50d868cf-zizL6ppE-BAH-_juu.js +788 -0
- package/dist/flowDiagram-v2-4f6560a1-DVx_vlO5-bkcRE0UW.js +18 -0
- package/dist/flowchart-elk-definition-6af322e1-Eyez36go-B_lk3oHt.js +48132 -0
- package/dist/ganttDiagram-a2739b55-C82Jv-TO-DoS-s1Yu.js +1743 -0
- package/dist/gitGraphDiagram-82fe8481-D9o_9-U8-DJF-ZeR8.js +1265 -0
- package/dist/graph-BjmGDpTe-DgbYS1Ie.js +848 -0
- package/dist/index-5325376f-CJL5w-Sw-BXp44Ej5.js +374 -0
- package/dist/index-s6Yb6o1D.js +116386 -0
- package/dist/infoDiagram-8eee0895-FpS-TLK_-BnvO_wUe.js +320 -0
- package/dist/journeyDiagram-c64418c1-CMj1efQ9-CshcRDhm.js +802 -0
- package/dist/layout-D_6hdlf3-B7guhEBN.js +1470 -0
- package/dist/mindmap-definition-8da855dc-D4SxHjUd-jFZFomnk.js +21924 -0
- package/dist/pieDiagram-a8764435-BF5ZqOjB-Mqzg2J4Q.js +498 -0
- package/dist/quadrantDiagram-1e28029f-GtQb80VU-DCy1QjzW.js +903 -0
- package/dist/requirementDiagram-08caed73-CHtPj3FO-AHEP0cIt.js +767 -0
- package/dist/sankeyDiagram-a04cb91d-CBlXzOgd-CWJTc5AX.js +802 -0
- package/dist/sequenceDiagram-c5b8d532-Cs1iyw97-oayOJE8v.js +2235 -0
- package/dist/shared/styles.d.ts +1 -1
- package/dist/stateDiagram-1ecb1508-CpRKICMQ-C5OFJeRZ.js +266 -0
- package/dist/stateDiagram-v2-c2b004d7-BtkhFyQ5-DxzE8Je5.js +185 -0
- package/dist/styles-b4e223ce-D0oeHeKH-BmNvk4NR.js +1090 -0
- package/dist/styles-ca3715f6-BouNgl-L-_qXsPDP3.js +961 -0
- package/dist/styles-d45a18b0-Cvhb8Ltu-43I3Cd_I.js +437 -0
- package/dist/svgDrawCommon-b86b1483-mg-1NjZY-DrmnILcc.js +65 -0
- package/dist/timeline-definition-faaaa080-3olbep_P-BqKpgsPZ.js +793 -0
- package/dist/ui/Message.d.ts +1 -5
- package/dist/ui/MessagesList.d.ts +1 -5
- package/dist/xychartDiagram-f5964ef8-BN6HXpmW-C-g_F1w2.js +1238 -0
- package/package.json +3 -3
- package/dist/ui/TypingEffect.d.ts +0 -18
|
@@ -0,0 +1,1743 @@
|
|
|
1
|
+
import { v as Ae, y as Ee, w as Ye, x as Le, b as Ie, a as Fe, g as ot, P as kt, M as We, o as Oe, V as Pe, W as ze, p as Be, s as R, O as vt, A as Kt, C as Ut, D as Ne, F as Ve, H as Ge, I as Re, J as qe, K as Qe, Q as je, U as Zt, X as Xt, $ as te, a0 as ee, a1 as ne, l as He, h as Je, m as Ke, a2 as $t, i as Ue, a3 as le, a4 as Ze, a5 as ue, a6 as de, a7 as he, a8 as Xe, a9 as Bt } from "./index-s6Yb6o1D.js";
|
|
2
|
+
typeof window < "u" && (window.global = window);
|
|
3
|
+
function tn(t) {
|
|
4
|
+
return t;
|
|
5
|
+
}
|
|
6
|
+
var gt = 1, Dt = 2, Et = 3, pt = 4, ie = 1e-6;
|
|
7
|
+
function en(t) {
|
|
8
|
+
return "translate(" + t + ",0)";
|
|
9
|
+
}
|
|
10
|
+
function nn(t) {
|
|
11
|
+
return "translate(0," + t + ")";
|
|
12
|
+
}
|
|
13
|
+
function rn(t) {
|
|
14
|
+
return (e) => +t(e);
|
|
15
|
+
}
|
|
16
|
+
function sn(t, e) {
|
|
17
|
+
return e = Math.max(0, t.bandwidth() - e * 2) / 2, t.round() && (e = Math.round(e)), (i) => +t(i) + e;
|
|
18
|
+
}
|
|
19
|
+
function an() {
|
|
20
|
+
return !this.__axis;
|
|
21
|
+
}
|
|
22
|
+
function fe(t, e) {
|
|
23
|
+
var i = [], s = null, o = null, l = 6, d = 6, b = 3, D = typeof window < "u" && window.devicePixelRatio > 1 ? 0 : 0.5, w = t === gt || t === pt ? -1 : 1, x = t === pt || t === Dt ? "x" : "y", E = t === gt || t === Et ? en : nn;
|
|
24
|
+
function T(v) {
|
|
25
|
+
var B = s ?? (e.ticks ? e.ticks.apply(e, i) : e.domain()), A = o ?? (e.tickFormat ? e.tickFormat.apply(e, i) : tn), k = Math.max(l, 0) + b, C = e.range(), L = +C[0] + D, I = +C[C.length - 1] + D, P = (e.bandwidth ? sn : rn)(e.copy(), D), O = v.selection ? v.selection() : v, N = O.selectAll(".domain").data([null]), W = O.selectAll(".tick").data(B, e).order(), f = W.exit(), p = W.enter().append("g").attr("class", "tick"), y = W.select("line"), m = W.select("text");
|
|
26
|
+
N = N.merge(N.enter().insert("path", ".tick").attr("class", "domain").attr("stroke", "currentColor")), W = W.merge(p), y = y.merge(p.append("line").attr("stroke", "currentColor").attr(x + "2", w * l)), m = m.merge(p.append("text").attr("fill", "currentColor").attr(x, w * k).attr("dy", t === gt ? "0em" : t === Et ? "0.71em" : "0.32em")), v !== O && (N = N.transition(v), W = W.transition(v), y = y.transition(v), m = m.transition(v), f = f.transition(v).attr("opacity", ie).attr("transform", function(r) {
|
|
27
|
+
return isFinite(r = P(r)) ? E(r + D) : this.getAttribute("transform");
|
|
28
|
+
}), p.attr("opacity", ie).attr("transform", function(r) {
|
|
29
|
+
var u = this.parentNode.__axis;
|
|
30
|
+
return E((u && isFinite(u = u(r)) ? u : P(r)) + D);
|
|
31
|
+
})), f.remove(), N.attr("d", t === pt || t === Dt ? d ? "M" + w * d + "," + L + "H" + D + "V" + I + "H" + w * d : "M" + D + "," + L + "V" + I : d ? "M" + L + "," + w * d + "V" + D + "H" + I + "V" + w * d : "M" + L + "," + D + "H" + I), W.attr("opacity", 1).attr("transform", function(r) {
|
|
32
|
+
return E(P(r) + D);
|
|
33
|
+
}), y.attr(x + "2", w * l), m.attr(x, w * k).text(A), O.filter(an).attr("fill", "none").attr("font-size", 10).attr("font-family", "sans-serif").attr("text-anchor", t === Dt ? "start" : t === pt ? "end" : "middle"), O.each(function() {
|
|
34
|
+
this.__axis = P;
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
return T.scale = function(v) {
|
|
38
|
+
return arguments.length ? (e = v, T) : e;
|
|
39
|
+
}, T.ticks = function() {
|
|
40
|
+
return i = Array.from(arguments), T;
|
|
41
|
+
}, T.tickArguments = function(v) {
|
|
42
|
+
return arguments.length ? (i = v == null ? [] : Array.from(v), T) : i.slice();
|
|
43
|
+
}, T.tickValues = function(v) {
|
|
44
|
+
return arguments.length ? (s = v == null ? null : Array.from(v), T) : s && s.slice();
|
|
45
|
+
}, T.tickFormat = function(v) {
|
|
46
|
+
return arguments.length ? (o = v, T) : o;
|
|
47
|
+
}, T.tickSize = function(v) {
|
|
48
|
+
return arguments.length ? (l = d = +v, T) : l;
|
|
49
|
+
}, T.tickSizeInner = function(v) {
|
|
50
|
+
return arguments.length ? (l = +v, T) : l;
|
|
51
|
+
}, T.tickSizeOuter = function(v) {
|
|
52
|
+
return arguments.length ? (d = +v, T) : d;
|
|
53
|
+
}, T.tickPadding = function(v) {
|
|
54
|
+
return arguments.length ? (b = +v, T) : b;
|
|
55
|
+
}, T.offset = function(v) {
|
|
56
|
+
return arguments.length ? (D = +v, T) : D;
|
|
57
|
+
}, T;
|
|
58
|
+
}
|
|
59
|
+
function on(t) {
|
|
60
|
+
return fe(gt, t);
|
|
61
|
+
}
|
|
62
|
+
function cn(t) {
|
|
63
|
+
return fe(Et, t);
|
|
64
|
+
}
|
|
65
|
+
const ln = Math.PI / 180, un = 180 / Math.PI, Tt = 18, me = 0.96422, ye = 1, ke = 0.82521, pe = 4 / 29, ct = 6 / 29, ge = 3 * ct * ct, dn = ct * ct * ct;
|
|
66
|
+
function be(t) {
|
|
67
|
+
if (t instanceof K) return new K(t.l, t.a, t.b, t.opacity);
|
|
68
|
+
if (t instanceof tt) return xe(t);
|
|
69
|
+
t instanceof le || (t = Ze(t));
|
|
70
|
+
var e = At(t.r), i = At(t.g), s = At(t.b), o = Ct((0.2225045 * e + 0.7168786 * i + 0.0606169 * s) / ye), l, d;
|
|
71
|
+
return e === i && i === s ? l = d = o : (l = Ct((0.4360747 * e + 0.3850649 * i + 0.1430804 * s) / me), d = Ct((0.0139322 * e + 0.0971045 * i + 0.7141733 * s) / ke)), new K(116 * o - 16, 500 * (l - o), 200 * (o - d), t.opacity);
|
|
72
|
+
}
|
|
73
|
+
function hn(t, e, i, s) {
|
|
74
|
+
return arguments.length === 1 ? be(t) : new K(t, e, i, s ?? 1);
|
|
75
|
+
}
|
|
76
|
+
function K(t, e, i, s) {
|
|
77
|
+
this.l = +t, this.a = +e, this.b = +i, this.opacity = +s;
|
|
78
|
+
}
|
|
79
|
+
ue(K, hn, de(he, {
|
|
80
|
+
brighter(t) {
|
|
81
|
+
return new K(this.l + Tt * (t ?? 1), this.a, this.b, this.opacity);
|
|
82
|
+
},
|
|
83
|
+
darker(t) {
|
|
84
|
+
return new K(this.l - Tt * (t ?? 1), this.a, this.b, this.opacity);
|
|
85
|
+
},
|
|
86
|
+
rgb() {
|
|
87
|
+
var t = (this.l + 16) / 116, e = isNaN(this.a) ? t : t + this.a / 500, i = isNaN(this.b) ? t : t - this.b / 200;
|
|
88
|
+
return e = me * St(e), t = ye * St(t), i = ke * St(i), new le(
|
|
89
|
+
Mt(3.1338561 * e - 1.6168667 * t - 0.4906146 * i),
|
|
90
|
+
Mt(-0.9787684 * e + 1.9161415 * t + 0.033454 * i),
|
|
91
|
+
Mt(0.0719453 * e - 0.2289914 * t + 1.4052427 * i),
|
|
92
|
+
this.opacity
|
|
93
|
+
);
|
|
94
|
+
}
|
|
95
|
+
}));
|
|
96
|
+
function Ct(t) {
|
|
97
|
+
return t > dn ? Math.pow(t, 1 / 3) : t / ge + pe;
|
|
98
|
+
}
|
|
99
|
+
function St(t) {
|
|
100
|
+
return t > ct ? t * t * t : ge * (t - pe);
|
|
101
|
+
}
|
|
102
|
+
function Mt(t) {
|
|
103
|
+
return 255 * (t <= 31308e-7 ? 12.92 * t : 1.055 * Math.pow(t, 1 / 2.4) - 0.055);
|
|
104
|
+
}
|
|
105
|
+
function At(t) {
|
|
106
|
+
return (t /= 255) <= 0.04045 ? t / 12.92 : Math.pow((t + 0.055) / 1.055, 2.4);
|
|
107
|
+
}
|
|
108
|
+
function fn(t) {
|
|
109
|
+
if (t instanceof tt) return new tt(t.h, t.c, t.l, t.opacity);
|
|
110
|
+
if (t instanceof K || (t = be(t)), t.a === 0 && t.b === 0) return new tt(NaN, 0 < t.l && t.l < 100 ? 0 : NaN, t.l, t.opacity);
|
|
111
|
+
var e = Math.atan2(t.b, t.a) * un;
|
|
112
|
+
return new tt(e < 0 ? e + 360 : e, Math.sqrt(t.a * t.a + t.b * t.b), t.l, t.opacity);
|
|
113
|
+
}
|
|
114
|
+
function Yt(t, e, i, s) {
|
|
115
|
+
return arguments.length === 1 ? fn(t) : new tt(t, e, i, s ?? 1);
|
|
116
|
+
}
|
|
117
|
+
function tt(t, e, i, s) {
|
|
118
|
+
this.h = +t, this.c = +e, this.l = +i, this.opacity = +s;
|
|
119
|
+
}
|
|
120
|
+
function xe(t) {
|
|
121
|
+
if (isNaN(t.h)) return new K(t.l, 0, 0, t.opacity);
|
|
122
|
+
var e = t.h * ln;
|
|
123
|
+
return new K(t.l, Math.cos(e) * t.c, Math.sin(e) * t.c, t.opacity);
|
|
124
|
+
}
|
|
125
|
+
ue(tt, Yt, de(he, {
|
|
126
|
+
brighter(t) {
|
|
127
|
+
return new tt(this.h, this.c, this.l + Tt * (t ?? 1), this.opacity);
|
|
128
|
+
},
|
|
129
|
+
darker(t) {
|
|
130
|
+
return new tt(this.h, this.c, this.l - Tt * (t ?? 1), this.opacity);
|
|
131
|
+
},
|
|
132
|
+
rgb() {
|
|
133
|
+
return xe(this).rgb();
|
|
134
|
+
}
|
|
135
|
+
}));
|
|
136
|
+
function mn(t) {
|
|
137
|
+
return function(e, i) {
|
|
138
|
+
var s = t((e = Yt(e)).h, (i = Yt(i)).h), o = $t(e.c, i.c), l = $t(e.l, i.l), d = $t(e.opacity, i.opacity);
|
|
139
|
+
return function(b) {
|
|
140
|
+
return e.h = s(b), e.c = o(b), e.l = l(b), e.opacity = d(b), e + "";
|
|
141
|
+
};
|
|
142
|
+
};
|
|
143
|
+
}
|
|
144
|
+
const yn = mn(Xe);
|
|
145
|
+
var Lt = { exports: {} }, kn = Lt.exports, re;
|
|
146
|
+
function pn() {
|
|
147
|
+
return re || (re = 1, function(t, e) {
|
|
148
|
+
(function(i, s) {
|
|
149
|
+
t.exports = s();
|
|
150
|
+
})(kn, function() {
|
|
151
|
+
var i = "day";
|
|
152
|
+
return function(s, o, l) {
|
|
153
|
+
var d = function(w) {
|
|
154
|
+
return w.add(4 - w.isoWeekday(), i);
|
|
155
|
+
}, b = o.prototype;
|
|
156
|
+
b.isoWeekYear = function() {
|
|
157
|
+
return d(this).year();
|
|
158
|
+
}, b.isoWeek = function(w) {
|
|
159
|
+
if (!this.$utils().u(w)) return this.add(7 * (w - this.isoWeek()), i);
|
|
160
|
+
var x, E, T, v, B = d(this), A = (x = this.isoWeekYear(), E = this.$u, T = (E ? l.utc : l)().year(x).startOf("year"), v = 4 - T.isoWeekday(), T.isoWeekday() > 4 && (v += 7), T.add(v, i));
|
|
161
|
+
return B.diff(A, "week") + 1;
|
|
162
|
+
}, b.isoWeekday = function(w) {
|
|
163
|
+
return this.$utils().u(w) ? this.day() || 7 : this.day(this.day() % 7 ? w : w - 7);
|
|
164
|
+
};
|
|
165
|
+
var D = b.startOf;
|
|
166
|
+
b.startOf = function(w, x) {
|
|
167
|
+
var E = this.$utils(), T = !!E.u(x) || x;
|
|
168
|
+
return E.p(w) === "isoweek" ? T ? this.date(this.date() - (this.isoWeekday() - 1)).startOf("day") : this.date(this.date() - 1 - (this.isoWeekday() - 1) + 7).endOf("day") : D.bind(this)(w, x);
|
|
169
|
+
};
|
|
170
|
+
};
|
|
171
|
+
});
|
|
172
|
+
}(Lt)), Lt.exports;
|
|
173
|
+
}
|
|
174
|
+
var gn = pn();
|
|
175
|
+
const bn = /* @__PURE__ */ Bt(gn);
|
|
176
|
+
var It = { exports: {} }, xn = It.exports, se;
|
|
177
|
+
function vn() {
|
|
178
|
+
return se || (se = 1, function(t, e) {
|
|
179
|
+
(function(i, s) {
|
|
180
|
+
t.exports = s();
|
|
181
|
+
})(xn, function() {
|
|
182
|
+
var i = { 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" }, s = /(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g, o = /\d/, l = /\d\d/, d = /\d\d?/, b = /\d*[^-_:/,()\s\d]+/, D = {}, w = function(k) {
|
|
183
|
+
return (k = +k) + (k > 68 ? 1900 : 2e3);
|
|
184
|
+
}, x = function(k) {
|
|
185
|
+
return function(C) {
|
|
186
|
+
this[k] = +C;
|
|
187
|
+
};
|
|
188
|
+
}, E = [/[+-]\d\d:?(\d\d)?|Z/, function(k) {
|
|
189
|
+
(this.zone || (this.zone = {})).offset = function(C) {
|
|
190
|
+
if (!C || C === "Z") return 0;
|
|
191
|
+
var L = C.match(/([+-]|\d\d)/g), I = 60 * L[1] + (+L[2] || 0);
|
|
192
|
+
return I === 0 ? 0 : L[0] === "+" ? -I : I;
|
|
193
|
+
}(k);
|
|
194
|
+
}], T = function(k) {
|
|
195
|
+
var C = D[k];
|
|
196
|
+
return C && (C.indexOf ? C : C.s.concat(C.f));
|
|
197
|
+
}, v = function(k, C) {
|
|
198
|
+
var L, I = D.meridiem;
|
|
199
|
+
if (I) {
|
|
200
|
+
for (var P = 1; P <= 24; P += 1) if (k.indexOf(I(P, 0, C)) > -1) {
|
|
201
|
+
L = P > 12;
|
|
202
|
+
break;
|
|
203
|
+
}
|
|
204
|
+
} else L = k === (C ? "pm" : "PM");
|
|
205
|
+
return L;
|
|
206
|
+
}, B = { A: [b, function(k) {
|
|
207
|
+
this.afternoon = v(k, !1);
|
|
208
|
+
}], a: [b, function(k) {
|
|
209
|
+
this.afternoon = v(k, !0);
|
|
210
|
+
}], Q: [o, function(k) {
|
|
211
|
+
this.month = 3 * (k - 1) + 1;
|
|
212
|
+
}], S: [o, function(k) {
|
|
213
|
+
this.milliseconds = 100 * +k;
|
|
214
|
+
}], SS: [l, function(k) {
|
|
215
|
+
this.milliseconds = 10 * +k;
|
|
216
|
+
}], SSS: [/\d{3}/, function(k) {
|
|
217
|
+
this.milliseconds = +k;
|
|
218
|
+
}], s: [d, x("seconds")], ss: [d, x("seconds")], m: [d, x("minutes")], mm: [d, x("minutes")], H: [d, x("hours")], h: [d, x("hours")], HH: [d, x("hours")], hh: [d, x("hours")], D: [d, x("day")], DD: [l, x("day")], Do: [b, function(k) {
|
|
219
|
+
var C = D.ordinal, L = k.match(/\d+/);
|
|
220
|
+
if (this.day = L[0], C) for (var I = 1; I <= 31; I += 1) C(I).replace(/\[|\]/g, "") === k && (this.day = I);
|
|
221
|
+
}], w: [d, x("week")], ww: [l, x("week")], M: [d, x("month")], MM: [l, x("month")], MMM: [b, function(k) {
|
|
222
|
+
var C = T("months"), L = (T("monthsShort") || C.map(function(I) {
|
|
223
|
+
return I.slice(0, 3);
|
|
224
|
+
})).indexOf(k) + 1;
|
|
225
|
+
if (L < 1) throw new Error();
|
|
226
|
+
this.month = L % 12 || L;
|
|
227
|
+
}], MMMM: [b, function(k) {
|
|
228
|
+
var C = T("months").indexOf(k) + 1;
|
|
229
|
+
if (C < 1) throw new Error();
|
|
230
|
+
this.month = C % 12 || C;
|
|
231
|
+
}], Y: [/[+-]?\d+/, x("year")], YY: [l, function(k) {
|
|
232
|
+
this.year = w(k);
|
|
233
|
+
}], YYYY: [/\d{4}/, x("year")], Z: E, ZZ: E };
|
|
234
|
+
function A(k) {
|
|
235
|
+
var C, L;
|
|
236
|
+
C = k, L = D && D.formats;
|
|
237
|
+
for (var I = (k = C.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, function(y, m, r) {
|
|
238
|
+
var u = r && r.toUpperCase();
|
|
239
|
+
return m || L[r] || i[r] || L[u].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, function(c, h, a) {
|
|
240
|
+
return h || a.slice(1);
|
|
241
|
+
});
|
|
242
|
+
})).match(s), P = I.length, O = 0; O < P; O += 1) {
|
|
243
|
+
var N = I[O], W = B[N], f = W && W[0], p = W && W[1];
|
|
244
|
+
I[O] = p ? { regex: f, parser: p } : N.replace(/^\[|\]$/g, "");
|
|
245
|
+
}
|
|
246
|
+
return function(y) {
|
|
247
|
+
for (var m = {}, r = 0, u = 0; r < P; r += 1) {
|
|
248
|
+
var c = I[r];
|
|
249
|
+
if (typeof c == "string") u += c.length;
|
|
250
|
+
else {
|
|
251
|
+
var h = c.regex, a = c.parser, Y = y.slice(u), n = h.exec(Y)[0];
|
|
252
|
+
a.call(m, n), y = y.replace(n, "");
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
return function(g) {
|
|
256
|
+
var M = g.afternoon;
|
|
257
|
+
if (M !== void 0) {
|
|
258
|
+
var S = g.hours;
|
|
259
|
+
M ? S < 12 && (g.hours += 12) : S === 12 && (g.hours = 0), delete g.afternoon;
|
|
260
|
+
}
|
|
261
|
+
}(m), m;
|
|
262
|
+
};
|
|
263
|
+
}
|
|
264
|
+
return function(k, C, L) {
|
|
265
|
+
L.p.customParseFormat = !0, k && k.parseTwoDigitYear && (w = k.parseTwoDigitYear);
|
|
266
|
+
var I = C.prototype, P = I.parse;
|
|
267
|
+
I.parse = function(O) {
|
|
268
|
+
var N = O.date, W = O.utc, f = O.args;
|
|
269
|
+
this.$u = W;
|
|
270
|
+
var p = f[1];
|
|
271
|
+
if (typeof p == "string") {
|
|
272
|
+
var y = f[2] === !0, m = f[3] === !0, r = y || m, u = f[2];
|
|
273
|
+
m && (u = f[2]), D = this.$locale(), !y && u && (D = L.Ls[u]), this.$d = function(Y, n, g, M) {
|
|
274
|
+
try {
|
|
275
|
+
if (["x", "X"].indexOf(n) > -1) return new Date((n === "X" ? 1e3 : 1) * Y);
|
|
276
|
+
var S = A(n)(Y), $ = S.year, F = S.month, _ = S.day, Q = S.hours, nt = S.minutes, dt = S.seconds, _t = S.milliseconds, yt = S.zone, V = S.week, j = /* @__PURE__ */ new Date(), G = _ || ($ || F ? 1 : j.getDate()), it = $ || j.getFullYear(), H = 0;
|
|
277
|
+
$ && !F || (H = F > 0 ? F - 1 : j.getMonth());
|
|
278
|
+
var U, q = Q || 0, at = nt || 0, et = dt || 0, rt = _t || 0;
|
|
279
|
+
return yt ? new Date(Date.UTC(it, H, G, q, at, et, rt + 60 * yt.offset * 1e3)) : g ? new Date(Date.UTC(it, H, G, q, at, et, rt)) : (U = new Date(it, H, G, q, at, et, rt), V && (U = M(U).week(V).toDate()), U);
|
|
280
|
+
} catch {
|
|
281
|
+
return /* @__PURE__ */ new Date("");
|
|
282
|
+
}
|
|
283
|
+
}(N, p, W, L), this.init(), u && u !== !0 && (this.$L = this.locale(u).$L), r && N != this.format(p) && (this.$d = /* @__PURE__ */ new Date("")), D = {};
|
|
284
|
+
} else if (p instanceof Array) for (var c = p.length, h = 1; h <= c; h += 1) {
|
|
285
|
+
f[1] = p[h - 1];
|
|
286
|
+
var a = L.apply(this, f);
|
|
287
|
+
if (a.isValid()) {
|
|
288
|
+
this.$d = a.$d, this.$L = a.$L, this.init();
|
|
289
|
+
break;
|
|
290
|
+
}
|
|
291
|
+
h === c && (this.$d = /* @__PURE__ */ new Date(""));
|
|
292
|
+
}
|
|
293
|
+
else P.call(this, O);
|
|
294
|
+
};
|
|
295
|
+
};
|
|
296
|
+
});
|
|
297
|
+
}(It)), It.exports;
|
|
298
|
+
}
|
|
299
|
+
var Tn = vn();
|
|
300
|
+
const wn = /* @__PURE__ */ Bt(Tn);
|
|
301
|
+
var Ft = { exports: {} }, _n = Ft.exports, ae;
|
|
302
|
+
function $n() {
|
|
303
|
+
return ae || (ae = 1, function(t, e) {
|
|
304
|
+
(function(i, s) {
|
|
305
|
+
t.exports = s();
|
|
306
|
+
})(_n, function() {
|
|
307
|
+
return function(i, s) {
|
|
308
|
+
var o = s.prototype, l = o.format;
|
|
309
|
+
o.format = function(d) {
|
|
310
|
+
var b = this, D = this.$locale();
|
|
311
|
+
if (!this.isValid()) return l.bind(this)(d);
|
|
312
|
+
var w = this.$utils(), x = (d || "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(E) {
|
|
313
|
+
switch (E) {
|
|
314
|
+
case "Q":
|
|
315
|
+
return Math.ceil((b.$M + 1) / 3);
|
|
316
|
+
case "Do":
|
|
317
|
+
return D.ordinal(b.$D);
|
|
318
|
+
case "gggg":
|
|
319
|
+
return b.weekYear();
|
|
320
|
+
case "GGGG":
|
|
321
|
+
return b.isoWeekYear();
|
|
322
|
+
case "wo":
|
|
323
|
+
return D.ordinal(b.week(), "W");
|
|
324
|
+
case "w":
|
|
325
|
+
case "ww":
|
|
326
|
+
return w.s(b.week(), E === "w" ? 1 : 2, "0");
|
|
327
|
+
case "W":
|
|
328
|
+
case "WW":
|
|
329
|
+
return w.s(b.isoWeek(), E === "W" ? 1 : 2, "0");
|
|
330
|
+
case "k":
|
|
331
|
+
case "kk":
|
|
332
|
+
return w.s(String(b.$H === 0 ? 24 : b.$H), E === "k" ? 1 : 2, "0");
|
|
333
|
+
case "X":
|
|
334
|
+
return Math.floor(b.$d.getTime() / 1e3);
|
|
335
|
+
case "x":
|
|
336
|
+
return b.$d.getTime();
|
|
337
|
+
case "z":
|
|
338
|
+
return "[" + b.offsetName() + "]";
|
|
339
|
+
case "zzz":
|
|
340
|
+
return "[" + b.offsetName("long") + "]";
|
|
341
|
+
default:
|
|
342
|
+
return E;
|
|
343
|
+
}
|
|
344
|
+
});
|
|
345
|
+
return l.bind(this)(x);
|
|
346
|
+
};
|
|
347
|
+
};
|
|
348
|
+
});
|
|
349
|
+
}(Ft)), Ft.exports;
|
|
350
|
+
}
|
|
351
|
+
var Dn = $n();
|
|
352
|
+
const Cn = /* @__PURE__ */ Bt(Dn);
|
|
353
|
+
var Wt = function() {
|
|
354
|
+
var t = function(m, r, u, c) {
|
|
355
|
+
for (u = u || {}, c = m.length; c--; u[m[c]] = r)
|
|
356
|
+
;
|
|
357
|
+
return u;
|
|
358
|
+
}, e = [6, 8, 10, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 30, 32, 33, 35, 37], i = [1, 25], s = [1, 26], o = [1, 27], l = [1, 28], d = [1, 29], b = [1, 30], D = [1, 31], w = [1, 9], x = [1, 10], E = [1, 11], T = [1, 12], v = [1, 13], B = [1, 14], A = [1, 15], k = [1, 16], C = [1, 18], L = [1, 19], I = [1, 20], P = [1, 21], O = [1, 22], N = [1, 24], W = [1, 32], f = {
|
|
359
|
+
trace: function() {
|
|
360
|
+
},
|
|
361
|
+
yy: {},
|
|
362
|
+
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, dateFormat: 19, inclusiveEndDates: 20, topAxis: 21, axisFormat: 22, tickInterval: 23, excludes: 24, includes: 25, todayMarker: 26, title: 27, acc_title: 28, acc_title_value: 29, acc_descr: 30, acc_descr_value: 31, acc_descr_multiline_value: 32, section: 33, clickStatement: 34, taskTxt: 35, taskData: 36, click: 37, callbackname: 38, callbackargs: 39, href: 40, clickStatementDebug: 41, $accept: 0, $end: 1 },
|
|
363
|
+
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", 19: "dateFormat", 20: "inclusiveEndDates", 21: "topAxis", 22: "axisFormat", 23: "tickInterval", 24: "excludes", 25: "includes", 26: "todayMarker", 27: "title", 28: "acc_title", 29: "acc_title_value", 30: "acc_descr", 31: "acc_descr_value", 32: "acc_descr_multiline_value", 33: "section", 35: "taskTxt", 36: "taskData", 37: "click", 38: "callbackname", 39: "callbackargs", 40: "href" },
|
|
364
|
+
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], [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], [34, 2], [34, 3], [34, 3], [34, 4], [34, 3], [34, 4], [34, 2], [41, 2], [41, 3], [41, 3], [41, 4], [41, 3], [41, 4], [41, 2]],
|
|
365
|
+
performAction: function(m, r, u, c, h, a, Y) {
|
|
366
|
+
var n = a.length - 1;
|
|
367
|
+
switch (h) {
|
|
368
|
+
case 1:
|
|
369
|
+
return a[n - 1];
|
|
370
|
+
case 2:
|
|
371
|
+
this.$ = [];
|
|
372
|
+
break;
|
|
373
|
+
case 3:
|
|
374
|
+
a[n - 1].push(a[n]), this.$ = a[n - 1];
|
|
375
|
+
break;
|
|
376
|
+
case 4:
|
|
377
|
+
case 5:
|
|
378
|
+
this.$ = a[n];
|
|
379
|
+
break;
|
|
380
|
+
case 6:
|
|
381
|
+
case 7:
|
|
382
|
+
this.$ = [];
|
|
383
|
+
break;
|
|
384
|
+
case 8:
|
|
385
|
+
c.setWeekday("monday");
|
|
386
|
+
break;
|
|
387
|
+
case 9:
|
|
388
|
+
c.setWeekday("tuesday");
|
|
389
|
+
break;
|
|
390
|
+
case 10:
|
|
391
|
+
c.setWeekday("wednesday");
|
|
392
|
+
break;
|
|
393
|
+
case 11:
|
|
394
|
+
c.setWeekday("thursday");
|
|
395
|
+
break;
|
|
396
|
+
case 12:
|
|
397
|
+
c.setWeekday("friday");
|
|
398
|
+
break;
|
|
399
|
+
case 13:
|
|
400
|
+
c.setWeekday("saturday");
|
|
401
|
+
break;
|
|
402
|
+
case 14:
|
|
403
|
+
c.setWeekday("sunday");
|
|
404
|
+
break;
|
|
405
|
+
case 15:
|
|
406
|
+
c.setDateFormat(a[n].substr(11)), this.$ = a[n].substr(11);
|
|
407
|
+
break;
|
|
408
|
+
case 16:
|
|
409
|
+
c.enableInclusiveEndDates(), this.$ = a[n].substr(18);
|
|
410
|
+
break;
|
|
411
|
+
case 17:
|
|
412
|
+
c.TopAxis(), this.$ = a[n].substr(8);
|
|
413
|
+
break;
|
|
414
|
+
case 18:
|
|
415
|
+
c.setAxisFormat(a[n].substr(11)), this.$ = a[n].substr(11);
|
|
416
|
+
break;
|
|
417
|
+
case 19:
|
|
418
|
+
c.setTickInterval(a[n].substr(13)), this.$ = a[n].substr(13);
|
|
419
|
+
break;
|
|
420
|
+
case 20:
|
|
421
|
+
c.setExcludes(a[n].substr(9)), this.$ = a[n].substr(9);
|
|
422
|
+
break;
|
|
423
|
+
case 21:
|
|
424
|
+
c.setIncludes(a[n].substr(9)), this.$ = a[n].substr(9);
|
|
425
|
+
break;
|
|
426
|
+
case 22:
|
|
427
|
+
c.setTodayMarker(a[n].substr(12)), this.$ = a[n].substr(12);
|
|
428
|
+
break;
|
|
429
|
+
case 24:
|
|
430
|
+
c.setDiagramTitle(a[n].substr(6)), this.$ = a[n].substr(6);
|
|
431
|
+
break;
|
|
432
|
+
case 25:
|
|
433
|
+
this.$ = a[n].trim(), c.setAccTitle(this.$);
|
|
434
|
+
break;
|
|
435
|
+
case 26:
|
|
436
|
+
case 27:
|
|
437
|
+
this.$ = a[n].trim(), c.setAccDescription(this.$);
|
|
438
|
+
break;
|
|
439
|
+
case 28:
|
|
440
|
+
c.addSection(a[n].substr(8)), this.$ = a[n].substr(8);
|
|
441
|
+
break;
|
|
442
|
+
case 30:
|
|
443
|
+
c.addTask(a[n - 1], a[n]), this.$ = "task";
|
|
444
|
+
break;
|
|
445
|
+
case 31:
|
|
446
|
+
this.$ = a[n - 1], c.setClickEvent(a[n - 1], a[n], null);
|
|
447
|
+
break;
|
|
448
|
+
case 32:
|
|
449
|
+
this.$ = a[n - 2], c.setClickEvent(a[n - 2], a[n - 1], a[n]);
|
|
450
|
+
break;
|
|
451
|
+
case 33:
|
|
452
|
+
this.$ = a[n - 2], c.setClickEvent(a[n - 2], a[n - 1], null), c.setLink(a[n - 2], a[n]);
|
|
453
|
+
break;
|
|
454
|
+
case 34:
|
|
455
|
+
this.$ = a[n - 3], c.setClickEvent(a[n - 3], a[n - 2], a[n - 1]), c.setLink(a[n - 3], a[n]);
|
|
456
|
+
break;
|
|
457
|
+
case 35:
|
|
458
|
+
this.$ = a[n - 2], c.setClickEvent(a[n - 2], a[n], null), c.setLink(a[n - 2], a[n - 1]);
|
|
459
|
+
break;
|
|
460
|
+
case 36:
|
|
461
|
+
this.$ = a[n - 3], c.setClickEvent(a[n - 3], a[n - 1], a[n]), c.setLink(a[n - 3], a[n - 2]);
|
|
462
|
+
break;
|
|
463
|
+
case 37:
|
|
464
|
+
this.$ = a[n - 1], c.setLink(a[n - 1], a[n]);
|
|
465
|
+
break;
|
|
466
|
+
case 38:
|
|
467
|
+
case 44:
|
|
468
|
+
this.$ = a[n - 1] + " " + a[n];
|
|
469
|
+
break;
|
|
470
|
+
case 39:
|
|
471
|
+
case 40:
|
|
472
|
+
case 42:
|
|
473
|
+
this.$ = a[n - 2] + " " + a[n - 1] + " " + a[n];
|
|
474
|
+
break;
|
|
475
|
+
case 41:
|
|
476
|
+
case 43:
|
|
477
|
+
this.$ = a[n - 3] + " " + a[n - 2] + " " + a[n - 1] + " " + a[n];
|
|
478
|
+
break;
|
|
479
|
+
}
|
|
480
|
+
},
|
|
481
|
+
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: i, 13: s, 14: o, 15: l, 16: d, 17: b, 18: D, 19: w, 20: x, 21: E, 22: T, 23: v, 24: B, 25: A, 26: k, 27: C, 28: L, 30: I, 32: P, 33: O, 34: 23, 35: N, 37: W }, t(e, [2, 7], { 1: [2, 1] }), t(e, [2, 3]), { 9: 33, 11: 17, 12: i, 13: s, 14: o, 15: l, 16: d, 17: b, 18: D, 19: w, 20: x, 21: E, 22: T, 23: v, 24: B, 25: A, 26: k, 27: C, 28: L, 30: I, 32: P, 33: O, 34: 23, 35: N, 37: W }, t(e, [2, 5]), t(e, [2, 6]), t(e, [2, 15]), t(e, [2, 16]), 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]), { 29: [1, 34] }, { 31: [1, 35] }, t(e, [2, 27]), t(e, [2, 28]), t(e, [2, 29]), { 36: [1, 36] }, 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]), { 38: [1, 37], 40: [1, 38] }, t(e, [2, 4]), t(e, [2, 25]), t(e, [2, 26]), t(e, [2, 30]), t(e, [2, 31], { 39: [1, 39], 40: [1, 40] }), t(e, [2, 37], { 38: [1, 41] }), t(e, [2, 32], { 40: [1, 42] }), t(e, [2, 33]), t(e, [2, 35], { 39: [1, 43] }), t(e, [2, 34]), t(e, [2, 36])],
|
|
482
|
+
defaultActions: {},
|
|
483
|
+
parseError: function(m, r) {
|
|
484
|
+
if (r.recoverable)
|
|
485
|
+
this.trace(m);
|
|
486
|
+
else {
|
|
487
|
+
var u = new Error(m);
|
|
488
|
+
throw u.hash = r, u;
|
|
489
|
+
}
|
|
490
|
+
},
|
|
491
|
+
parse: function(m) {
|
|
492
|
+
var r = this, u = [0], c = [], h = [null], a = [], Y = this.table, n = "", g = 0, M = 0, S = 2, $ = 1, F = a.slice.call(arguments, 1), _ = Object.create(this.lexer), Q = { yy: {} };
|
|
493
|
+
for (var nt in this.yy)
|
|
494
|
+
Object.prototype.hasOwnProperty.call(this.yy, nt) && (Q.yy[nt] = this.yy[nt]);
|
|
495
|
+
_.setInput(m, Q.yy), Q.yy.lexer = _, Q.yy.parser = this, typeof _.yylloc > "u" && (_.yylloc = {});
|
|
496
|
+
var dt = _.yylloc;
|
|
497
|
+
a.push(dt);
|
|
498
|
+
var _t = _.options && _.options.ranges;
|
|
499
|
+
typeof Q.yy.parseError == "function" ? this.parseError = Q.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
|
|
500
|
+
function yt() {
|
|
501
|
+
var Z;
|
|
502
|
+
return Z = c.pop() || _.lex() || $, typeof Z != "number" && (Z instanceof Array && (c = Z, Z = c.pop()), Z = r.symbols_[Z] || Z), Z;
|
|
503
|
+
}
|
|
504
|
+
for (var V, j, G, it, H = {}, U, q, at, et; ; ) {
|
|
505
|
+
if (j = u[u.length - 1], this.defaultActions[j] ? G = this.defaultActions[j] : ((V === null || typeof V > "u") && (V = yt()), G = Y[j] && Y[j][V]), typeof G > "u" || !G.length || !G[0]) {
|
|
506
|
+
var rt = "";
|
|
507
|
+
et = [];
|
|
508
|
+
for (U in Y[j])
|
|
509
|
+
this.terminals_[U] && U > S && et.push("'" + this.terminals_[U] + "'");
|
|
510
|
+
_.showPosition ? rt = "Parse error on line " + (g + 1) + `:
|
|
511
|
+
` + _.showPosition() + `
|
|
512
|
+
Expecting ` + et.join(", ") + ", got '" + (this.terminals_[V] || V) + "'" : rt = "Parse error on line " + (g + 1) + ": Unexpected " + (V == $ ? "end of input" : "'" + (this.terminals_[V] || V) + "'"), this.parseError(rt, {
|
|
513
|
+
text: _.match,
|
|
514
|
+
token: this.terminals_[V] || V,
|
|
515
|
+
line: _.yylineno,
|
|
516
|
+
loc: dt,
|
|
517
|
+
expected: et
|
|
518
|
+
});
|
|
519
|
+
}
|
|
520
|
+
if (G[0] instanceof Array && G.length > 1)
|
|
521
|
+
throw new Error("Parse Error: multiple actions possible at state: " + j + ", token: " + V);
|
|
522
|
+
switch (G[0]) {
|
|
523
|
+
case 1:
|
|
524
|
+
u.push(V), h.push(_.yytext), a.push(_.yylloc), u.push(G[1]), V = null, M = _.yyleng, n = _.yytext, g = _.yylineno, dt = _.yylloc;
|
|
525
|
+
break;
|
|
526
|
+
case 2:
|
|
527
|
+
if (q = this.productions_[G[1]][1], H.$ = h[h.length - q], H._$ = {
|
|
528
|
+
first_line: a[a.length - (q || 1)].first_line,
|
|
529
|
+
last_line: a[a.length - 1].last_line,
|
|
530
|
+
first_column: a[a.length - (q || 1)].first_column,
|
|
531
|
+
last_column: a[a.length - 1].last_column
|
|
532
|
+
}, _t && (H._$.range = [
|
|
533
|
+
a[a.length - (q || 1)].range[0],
|
|
534
|
+
a[a.length - 1].range[1]
|
|
535
|
+
]), it = this.performAction.apply(H, [
|
|
536
|
+
n,
|
|
537
|
+
M,
|
|
538
|
+
g,
|
|
539
|
+
Q.yy,
|
|
540
|
+
G[1],
|
|
541
|
+
h,
|
|
542
|
+
a
|
|
543
|
+
].concat(F)), typeof it < "u")
|
|
544
|
+
return it;
|
|
545
|
+
q && (u = u.slice(0, -1 * q * 2), h = h.slice(0, -1 * q), a = a.slice(0, -1 * q)), u.push(this.productions_[G[1]][0]), h.push(H.$), a.push(H._$), at = Y[u[u.length - 2]][u[u.length - 1]], u.push(at);
|
|
546
|
+
break;
|
|
547
|
+
case 3:
|
|
548
|
+
return !0;
|
|
549
|
+
}
|
|
550
|
+
}
|
|
551
|
+
return !0;
|
|
552
|
+
}
|
|
553
|
+
}, p = /* @__PURE__ */ function() {
|
|
554
|
+
var m = {
|
|
555
|
+
EOF: 1,
|
|
556
|
+
parseError: function(r, u) {
|
|
557
|
+
if (this.yy.parser)
|
|
558
|
+
this.yy.parser.parseError(r, u);
|
|
559
|
+
else
|
|
560
|
+
throw new Error(r);
|
|
561
|
+
},
|
|
562
|
+
// resets the lexer, sets new input
|
|
563
|
+
setInput: function(r, u) {
|
|
564
|
+
return this.yy = u || this.yy || {}, this._input = r, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
|
|
565
|
+
first_line: 1,
|
|
566
|
+
first_column: 0,
|
|
567
|
+
last_line: 1,
|
|
568
|
+
last_column: 0
|
|
569
|
+
}, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
|
|
570
|
+
},
|
|
571
|
+
// consumes and returns one char from the input
|
|
572
|
+
input: function() {
|
|
573
|
+
var r = this._input[0];
|
|
574
|
+
this.yytext += r, this.yyleng++, this.offset++, this.match += r, this.matched += r;
|
|
575
|
+
var u = r.match(/(?:\r\n?|\n).*/g);
|
|
576
|
+
return u ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), r;
|
|
577
|
+
},
|
|
578
|
+
// unshifts one char (or a string) into the input
|
|
579
|
+
unput: function(r) {
|
|
580
|
+
var u = r.length, c = r.split(/(?:\r\n?|\n)/g);
|
|
581
|
+
this._input = r + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - u), this.offset -= u;
|
|
582
|
+
var h = this.match.split(/(?:\r\n?|\n)/g);
|
|
583
|
+
this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), c.length - 1 && (this.yylineno -= c.length - 1);
|
|
584
|
+
var a = this.yylloc.range;
|
|
585
|
+
return this.yylloc = {
|
|
586
|
+
first_line: this.yylloc.first_line,
|
|
587
|
+
last_line: this.yylineno + 1,
|
|
588
|
+
first_column: this.yylloc.first_column,
|
|
589
|
+
last_column: c ? (c.length === h.length ? this.yylloc.first_column : 0) + h[h.length - c.length].length - c[0].length : this.yylloc.first_column - u
|
|
590
|
+
}, this.options.ranges && (this.yylloc.range = [a[0], a[0] + this.yyleng - u]), this.yyleng = this.yytext.length, this;
|
|
591
|
+
},
|
|
592
|
+
// When called from action, caches matched text and appends it on next action
|
|
593
|
+
more: function() {
|
|
594
|
+
return this._more = !0, this;
|
|
595
|
+
},
|
|
596
|
+
// 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.
|
|
597
|
+
reject: function() {
|
|
598
|
+
if (this.options.backtrack_lexer)
|
|
599
|
+
this._backtrack = !0;
|
|
600
|
+
else
|
|
601
|
+
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).
|
|
602
|
+
` + this.showPosition(), {
|
|
603
|
+
text: "",
|
|
604
|
+
token: null,
|
|
605
|
+
line: this.yylineno
|
|
606
|
+
});
|
|
607
|
+
return this;
|
|
608
|
+
},
|
|
609
|
+
// retain first n characters of the match
|
|
610
|
+
less: function(r) {
|
|
611
|
+
this.unput(this.match.slice(r));
|
|
612
|
+
},
|
|
613
|
+
// displays already matched input, i.e. for error messages
|
|
614
|
+
pastInput: function() {
|
|
615
|
+
var r = this.matched.substr(0, this.matched.length - this.match.length);
|
|
616
|
+
return (r.length > 20 ? "..." : "") + r.substr(-20).replace(/\n/g, "");
|
|
617
|
+
},
|
|
618
|
+
// displays upcoming input, i.e. for error messages
|
|
619
|
+
upcomingInput: function() {
|
|
620
|
+
var r = this.match;
|
|
621
|
+
return r.length < 20 && (r += this._input.substr(0, 20 - r.length)), (r.substr(0, 20) + (r.length > 20 ? "..." : "")).replace(/\n/g, "");
|
|
622
|
+
},
|
|
623
|
+
// displays the character position where the lexing error occurred, i.e. for error messages
|
|
624
|
+
showPosition: function() {
|
|
625
|
+
var r = this.pastInput(), u = new Array(r.length + 1).join("-");
|
|
626
|
+
return r + this.upcomingInput() + `
|
|
627
|
+
` + u + "^";
|
|
628
|
+
},
|
|
629
|
+
// test the lexed token: return FALSE when not a match, otherwise return token
|
|
630
|
+
test_match: function(r, u) {
|
|
631
|
+
var c, h, a;
|
|
632
|
+
if (this.options.backtrack_lexer && (a = {
|
|
633
|
+
yylineno: this.yylineno,
|
|
634
|
+
yylloc: {
|
|
635
|
+
first_line: this.yylloc.first_line,
|
|
636
|
+
last_line: this.last_line,
|
|
637
|
+
first_column: this.yylloc.first_column,
|
|
638
|
+
last_column: this.yylloc.last_column
|
|
639
|
+
},
|
|
640
|
+
yytext: this.yytext,
|
|
641
|
+
match: this.match,
|
|
642
|
+
matches: this.matches,
|
|
643
|
+
matched: this.matched,
|
|
644
|
+
yyleng: this.yyleng,
|
|
645
|
+
offset: this.offset,
|
|
646
|
+
_more: this._more,
|
|
647
|
+
_input: this._input,
|
|
648
|
+
yy: this.yy,
|
|
649
|
+
conditionStack: this.conditionStack.slice(0),
|
|
650
|
+
done: this.done
|
|
651
|
+
}, this.options.ranges && (a.yylloc.range = this.yylloc.range.slice(0))), h = r[0].match(/(?:\r\n?|\n).*/g), h && (this.yylineno += h.length), this.yylloc = {
|
|
652
|
+
first_line: this.yylloc.last_line,
|
|
653
|
+
last_line: this.yylineno + 1,
|
|
654
|
+
first_column: this.yylloc.last_column,
|
|
655
|
+
last_column: h ? h[h.length - 1].length - h[h.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + r[0].length
|
|
656
|
+
}, this.yytext += r[0], this.match += r[0], this.matches = r, 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(r[0].length), this.matched += r[0], c = this.performAction.call(this, this.yy, this, u, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), c)
|
|
657
|
+
return c;
|
|
658
|
+
if (this._backtrack) {
|
|
659
|
+
for (var Y in a)
|
|
660
|
+
this[Y] = a[Y];
|
|
661
|
+
return !1;
|
|
662
|
+
}
|
|
663
|
+
return !1;
|
|
664
|
+
},
|
|
665
|
+
// return next match in input
|
|
666
|
+
next: function() {
|
|
667
|
+
if (this.done)
|
|
668
|
+
return this.EOF;
|
|
669
|
+
this._input || (this.done = !0);
|
|
670
|
+
var r, u, c, h;
|
|
671
|
+
this._more || (this.yytext = "", this.match = "");
|
|
672
|
+
for (var a = this._currentRules(), Y = 0; Y < a.length; Y++)
|
|
673
|
+
if (c = this._input.match(this.rules[a[Y]]), c && (!u || c[0].length > u[0].length)) {
|
|
674
|
+
if (u = c, h = Y, this.options.backtrack_lexer) {
|
|
675
|
+
if (r = this.test_match(c, a[Y]), r !== !1)
|
|
676
|
+
return r;
|
|
677
|
+
if (this._backtrack) {
|
|
678
|
+
u = !1;
|
|
679
|
+
continue;
|
|
680
|
+
} else
|
|
681
|
+
return !1;
|
|
682
|
+
} else if (!this.options.flex)
|
|
683
|
+
break;
|
|
684
|
+
}
|
|
685
|
+
return u ? (r = this.test_match(u, a[h]), r !== !1 ? r : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
|
|
686
|
+
` + this.showPosition(), {
|
|
687
|
+
text: "",
|
|
688
|
+
token: null,
|
|
689
|
+
line: this.yylineno
|
|
690
|
+
});
|
|
691
|
+
},
|
|
692
|
+
// return next match that has a token
|
|
693
|
+
lex: function() {
|
|
694
|
+
var r = this.next();
|
|
695
|
+
return r || this.lex();
|
|
696
|
+
},
|
|
697
|
+
// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
|
|
698
|
+
begin: function(r) {
|
|
699
|
+
this.conditionStack.push(r);
|
|
700
|
+
},
|
|
701
|
+
// pop the previously active lexer condition state off the condition stack
|
|
702
|
+
popState: function() {
|
|
703
|
+
var r = this.conditionStack.length - 1;
|
|
704
|
+
return r > 0 ? this.conditionStack.pop() : this.conditionStack[0];
|
|
705
|
+
},
|
|
706
|
+
// produce the lexer rule set which is active for the currently active lexer condition state
|
|
707
|
+
_currentRules: function() {
|
|
708
|
+
return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
|
|
709
|
+
},
|
|
710
|
+
// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
|
|
711
|
+
topState: function(r) {
|
|
712
|
+
return r = this.conditionStack.length - 1 - Math.abs(r || 0), r >= 0 ? this.conditionStack[r] : "INITIAL";
|
|
713
|
+
},
|
|
714
|
+
// alias for begin(condition)
|
|
715
|
+
pushState: function(r) {
|
|
716
|
+
this.begin(r);
|
|
717
|
+
},
|
|
718
|
+
// return the number of states currently on the stack
|
|
719
|
+
stateStackSize: function() {
|
|
720
|
+
return this.conditionStack.length;
|
|
721
|
+
},
|
|
722
|
+
options: { "case-insensitive": !0 },
|
|
723
|
+
performAction: function(r, u, c, h) {
|
|
724
|
+
switch (c) {
|
|
725
|
+
case 0:
|
|
726
|
+
return this.begin("open_directive"), "open_directive";
|
|
727
|
+
case 1:
|
|
728
|
+
return this.begin("acc_title"), 28;
|
|
729
|
+
case 2:
|
|
730
|
+
return this.popState(), "acc_title_value";
|
|
731
|
+
case 3:
|
|
732
|
+
return this.begin("acc_descr"), 30;
|
|
733
|
+
case 4:
|
|
734
|
+
return this.popState(), "acc_descr_value";
|
|
735
|
+
case 5:
|
|
736
|
+
this.begin("acc_descr_multiline");
|
|
737
|
+
break;
|
|
738
|
+
case 6:
|
|
739
|
+
this.popState();
|
|
740
|
+
break;
|
|
741
|
+
case 7:
|
|
742
|
+
return "acc_descr_multiline_value";
|
|
743
|
+
case 8:
|
|
744
|
+
break;
|
|
745
|
+
case 9:
|
|
746
|
+
break;
|
|
747
|
+
case 10:
|
|
748
|
+
break;
|
|
749
|
+
case 11:
|
|
750
|
+
return 10;
|
|
751
|
+
case 12:
|
|
752
|
+
break;
|
|
753
|
+
case 13:
|
|
754
|
+
break;
|
|
755
|
+
case 14:
|
|
756
|
+
this.begin("href");
|
|
757
|
+
break;
|
|
758
|
+
case 15:
|
|
759
|
+
this.popState();
|
|
760
|
+
break;
|
|
761
|
+
case 16:
|
|
762
|
+
return 40;
|
|
763
|
+
case 17:
|
|
764
|
+
this.begin("callbackname");
|
|
765
|
+
break;
|
|
766
|
+
case 18:
|
|
767
|
+
this.popState();
|
|
768
|
+
break;
|
|
769
|
+
case 19:
|
|
770
|
+
this.popState(), this.begin("callbackargs");
|
|
771
|
+
break;
|
|
772
|
+
case 20:
|
|
773
|
+
return 38;
|
|
774
|
+
case 21:
|
|
775
|
+
this.popState();
|
|
776
|
+
break;
|
|
777
|
+
case 22:
|
|
778
|
+
return 39;
|
|
779
|
+
case 23:
|
|
780
|
+
this.begin("click");
|
|
781
|
+
break;
|
|
782
|
+
case 24:
|
|
783
|
+
this.popState();
|
|
784
|
+
break;
|
|
785
|
+
case 25:
|
|
786
|
+
return 37;
|
|
787
|
+
case 26:
|
|
788
|
+
return 4;
|
|
789
|
+
case 27:
|
|
790
|
+
return 19;
|
|
791
|
+
case 28:
|
|
792
|
+
return 20;
|
|
793
|
+
case 29:
|
|
794
|
+
return 21;
|
|
795
|
+
case 30:
|
|
796
|
+
return 22;
|
|
797
|
+
case 31:
|
|
798
|
+
return 23;
|
|
799
|
+
case 32:
|
|
800
|
+
return 25;
|
|
801
|
+
case 33:
|
|
802
|
+
return 24;
|
|
803
|
+
case 34:
|
|
804
|
+
return 26;
|
|
805
|
+
case 35:
|
|
806
|
+
return 12;
|
|
807
|
+
case 36:
|
|
808
|
+
return 13;
|
|
809
|
+
case 37:
|
|
810
|
+
return 14;
|
|
811
|
+
case 38:
|
|
812
|
+
return 15;
|
|
813
|
+
case 39:
|
|
814
|
+
return 16;
|
|
815
|
+
case 40:
|
|
816
|
+
return 17;
|
|
817
|
+
case 41:
|
|
818
|
+
return 18;
|
|
819
|
+
case 42:
|
|
820
|
+
return "date";
|
|
821
|
+
case 43:
|
|
822
|
+
return 27;
|
|
823
|
+
case 44:
|
|
824
|
+
return "accDescription";
|
|
825
|
+
case 45:
|
|
826
|
+
return 33;
|
|
827
|
+
case 46:
|
|
828
|
+
return 35;
|
|
829
|
+
case 47:
|
|
830
|
+
return 36;
|
|
831
|
+
case 48:
|
|
832
|
+
return ":";
|
|
833
|
+
case 49:
|
|
834
|
+
return 6;
|
|
835
|
+
case 50:
|
|
836
|
+
return "INVALID";
|
|
837
|
+
}
|
|
838
|
+
},
|
|
839
|
+
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, /^(?:\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],
|
|
840
|
+
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], inclusive: !0 } }
|
|
841
|
+
};
|
|
842
|
+
return m;
|
|
843
|
+
}();
|
|
844
|
+
f.lexer = p;
|
|
845
|
+
function y() {
|
|
846
|
+
this.yy = {};
|
|
847
|
+
}
|
|
848
|
+
return y.prototype = f, f.Parser = y, new y();
|
|
849
|
+
}();
|
|
850
|
+
Wt.parser = Wt;
|
|
851
|
+
const Sn = Wt;
|
|
852
|
+
R.extend(bn);
|
|
853
|
+
R.extend(wn);
|
|
854
|
+
R.extend(Cn);
|
|
855
|
+
let J = "", Nt = "", Vt, Gt = "", ht = [], ft = [], Rt = {}, qt = [], wt = [], ut = "", Qt = "";
|
|
856
|
+
const ve = ["active", "done", "crit", "milestone"];
|
|
857
|
+
let jt = [], mt = !1, Ht = !1, Jt = "sunday", Ot = 0;
|
|
858
|
+
const Mn = function() {
|
|
859
|
+
qt = [], wt = [], ut = "", jt = [], bt = 0, zt = void 0, xt = void 0, z = [], J = "", Nt = "", Qt = "", Vt = void 0, Gt = "", ht = [], ft = [], mt = !1, Ht = !1, Ot = 0, Rt = {}, Ke(), Jt = "sunday";
|
|
860
|
+
}, An = function(t) {
|
|
861
|
+
Nt = t;
|
|
862
|
+
}, En = function() {
|
|
863
|
+
return Nt;
|
|
864
|
+
}, Yn = function(t) {
|
|
865
|
+
Vt = t;
|
|
866
|
+
}, Ln = function() {
|
|
867
|
+
return Vt;
|
|
868
|
+
}, In = function(t) {
|
|
869
|
+
Gt = t;
|
|
870
|
+
}, Fn = function() {
|
|
871
|
+
return Gt;
|
|
872
|
+
}, Wn = function(t) {
|
|
873
|
+
J = t;
|
|
874
|
+
}, On = function() {
|
|
875
|
+
mt = !0;
|
|
876
|
+
}, Pn = function() {
|
|
877
|
+
return mt;
|
|
878
|
+
}, zn = function() {
|
|
879
|
+
Ht = !0;
|
|
880
|
+
}, Bn = function() {
|
|
881
|
+
return Ht;
|
|
882
|
+
}, Nn = function(t) {
|
|
883
|
+
Qt = t;
|
|
884
|
+
}, Vn = function() {
|
|
885
|
+
return Qt;
|
|
886
|
+
}, Gn = function() {
|
|
887
|
+
return J;
|
|
888
|
+
}, Rn = function(t) {
|
|
889
|
+
ht = t.toLowerCase().split(/[\s,]+/);
|
|
890
|
+
}, qn = function() {
|
|
891
|
+
return ht;
|
|
892
|
+
}, Qn = function(t) {
|
|
893
|
+
ft = t.toLowerCase().split(/[\s,]+/);
|
|
894
|
+
}, jn = function() {
|
|
895
|
+
return ft;
|
|
896
|
+
}, Hn = function() {
|
|
897
|
+
return Rt;
|
|
898
|
+
}, Jn = function(t) {
|
|
899
|
+
ut = t, qt.push(t);
|
|
900
|
+
}, Kn = function() {
|
|
901
|
+
return qt;
|
|
902
|
+
}, Un = function() {
|
|
903
|
+
let t = oe();
|
|
904
|
+
const e = 10;
|
|
905
|
+
let i = 0;
|
|
906
|
+
for (; !t && i < e; )
|
|
907
|
+
t = oe(), i++;
|
|
908
|
+
return wt = z, wt;
|
|
909
|
+
}, Te = function(t, e, i, s) {
|
|
910
|
+
return s.includes(t.format(e.trim())) ? !1 : t.isoWeekday() >= 6 && i.includes("weekends") || i.includes(t.format("dddd").toLowerCase()) ? !0 : i.includes(t.format(e.trim()));
|
|
911
|
+
}, Zn = function(t) {
|
|
912
|
+
Jt = t;
|
|
913
|
+
}, Xn = function() {
|
|
914
|
+
return Jt;
|
|
915
|
+
}, we = function(t, e, i, s) {
|
|
916
|
+
if (!i.length || t.manualEndTime)
|
|
917
|
+
return;
|
|
918
|
+
let o;
|
|
919
|
+
t.startTime instanceof Date ? o = R(t.startTime) : o = R(t.startTime, e, !0), o = o.add(1, "d");
|
|
920
|
+
let l;
|
|
921
|
+
t.endTime instanceof Date ? l = R(t.endTime) : l = R(t.endTime, e, !0);
|
|
922
|
+
const [d, b] = ti(
|
|
923
|
+
o,
|
|
924
|
+
l,
|
|
925
|
+
e,
|
|
926
|
+
i,
|
|
927
|
+
s
|
|
928
|
+
);
|
|
929
|
+
t.endTime = d.toDate(), t.renderEndTime = b;
|
|
930
|
+
}, ti = function(t, e, i, s, o) {
|
|
931
|
+
let l = !1, d = null;
|
|
932
|
+
for (; t <= e; )
|
|
933
|
+
l || (d = e.toDate()), l = Te(t, i, s, o), l && (e = e.add(1, "d")), t = t.add(1, "d");
|
|
934
|
+
return [e, d];
|
|
935
|
+
}, Pt = function(t, e, i) {
|
|
936
|
+
i = i.trim();
|
|
937
|
+
const s = /^after\s+(?<ids>[\d\w- ]+)/.exec(i);
|
|
938
|
+
if (s !== null) {
|
|
939
|
+
let l = null;
|
|
940
|
+
for (const b of s.groups.ids.split(" ")) {
|
|
941
|
+
let D = st(b);
|
|
942
|
+
D !== void 0 && (!l || D.endTime > l.endTime) && (l = D);
|
|
943
|
+
}
|
|
944
|
+
if (l)
|
|
945
|
+
return l.endTime;
|
|
946
|
+
const d = /* @__PURE__ */ new Date();
|
|
947
|
+
return d.setHours(0, 0, 0, 0), d;
|
|
948
|
+
}
|
|
949
|
+
let o = R(i, e.trim(), !0);
|
|
950
|
+
if (o.isValid())
|
|
951
|
+
return o.toDate();
|
|
952
|
+
{
|
|
953
|
+
vt.debug("Invalid date:" + i), vt.debug("With date format:" + e.trim());
|
|
954
|
+
const l = new Date(i);
|
|
955
|
+
if (l === void 0 || isNaN(l.getTime()) || // WebKit browsers can mis-parse invalid dates to be ridiculously
|
|
956
|
+
// huge numbers, e.g. new Date('202304') gets parsed as January 1, 202304.
|
|
957
|
+
// This can cause virtually infinite loops while rendering, so for the
|
|
958
|
+
// purposes of Gantt charts we'll just treat any date beyond 10,000 AD/BC as
|
|
959
|
+
// invalid.
|
|
960
|
+
l.getFullYear() < -1e4 || l.getFullYear() > 1e4)
|
|
961
|
+
throw new Error("Invalid date:" + i);
|
|
962
|
+
return l;
|
|
963
|
+
}
|
|
964
|
+
}, _e = function(t) {
|
|
965
|
+
const e = /^(\d+(?:\.\d+)?)([Mdhmswy]|ms)$/.exec(t.trim());
|
|
966
|
+
return e !== null ? [Number.parseFloat(e[1]), e[2]] : [NaN, "ms"];
|
|
967
|
+
}, $e = function(t, e, i, s = !1) {
|
|
968
|
+
i = i.trim();
|
|
969
|
+
const o = /^until\s+(?<ids>[\d\w- ]+)/.exec(i);
|
|
970
|
+
if (o !== null) {
|
|
971
|
+
let w = null;
|
|
972
|
+
for (const E of o.groups.ids.split(" ")) {
|
|
973
|
+
let T = st(E);
|
|
974
|
+
T !== void 0 && (!w || T.startTime < w.startTime) && (w = T);
|
|
975
|
+
}
|
|
976
|
+
if (w)
|
|
977
|
+
return w.startTime;
|
|
978
|
+
const x = /* @__PURE__ */ new Date();
|
|
979
|
+
return x.setHours(0, 0, 0, 0), x;
|
|
980
|
+
}
|
|
981
|
+
let l = R(i, e.trim(), !0);
|
|
982
|
+
if (l.isValid())
|
|
983
|
+
return s && (l = l.add(1, "d")), l.toDate();
|
|
984
|
+
let d = R(t);
|
|
985
|
+
const [b, D] = _e(i);
|
|
986
|
+
if (!Number.isNaN(b)) {
|
|
987
|
+
const w = d.add(b, D);
|
|
988
|
+
w.isValid() && (d = w);
|
|
989
|
+
}
|
|
990
|
+
return d.toDate();
|
|
991
|
+
};
|
|
992
|
+
let bt = 0;
|
|
993
|
+
const lt = function(t) {
|
|
994
|
+
return t === void 0 ? (bt = bt + 1, "task" + bt) : t;
|
|
995
|
+
}, ei = function(t, e) {
|
|
996
|
+
let i;
|
|
997
|
+
e.substr(0, 1) === ":" ? i = e.substr(1, e.length) : i = e;
|
|
998
|
+
const s = i.split(","), o = {};
|
|
999
|
+
Me(s, o, ve);
|
|
1000
|
+
for (let d = 0; d < s.length; d++)
|
|
1001
|
+
s[d] = s[d].trim();
|
|
1002
|
+
let l = "";
|
|
1003
|
+
switch (s.length) {
|
|
1004
|
+
case 1:
|
|
1005
|
+
o.id = lt(), o.startTime = t.endTime, l = s[0];
|
|
1006
|
+
break;
|
|
1007
|
+
case 2:
|
|
1008
|
+
o.id = lt(), o.startTime = Pt(void 0, J, s[0]), l = s[1];
|
|
1009
|
+
break;
|
|
1010
|
+
case 3:
|
|
1011
|
+
o.id = lt(s[0]), o.startTime = Pt(void 0, J, s[1]), l = s[2];
|
|
1012
|
+
break;
|
|
1013
|
+
}
|
|
1014
|
+
return l && (o.endTime = $e(o.startTime, J, l, mt), o.manualEndTime = R(l, "YYYY-MM-DD", !0).isValid(), we(o, J, ft, ht)), o;
|
|
1015
|
+
}, ni = function(t, e) {
|
|
1016
|
+
let i;
|
|
1017
|
+
e.substr(0, 1) === ":" ? i = e.substr(1, e.length) : i = e;
|
|
1018
|
+
const s = i.split(","), o = {};
|
|
1019
|
+
Me(s, o, ve);
|
|
1020
|
+
for (let l = 0; l < s.length; l++)
|
|
1021
|
+
s[l] = s[l].trim();
|
|
1022
|
+
switch (s.length) {
|
|
1023
|
+
case 1:
|
|
1024
|
+
o.id = lt(), o.startTime = {
|
|
1025
|
+
type: "prevTaskEnd",
|
|
1026
|
+
id: t
|
|
1027
|
+
}, o.endTime = {
|
|
1028
|
+
data: s[0]
|
|
1029
|
+
};
|
|
1030
|
+
break;
|
|
1031
|
+
case 2:
|
|
1032
|
+
o.id = lt(), o.startTime = {
|
|
1033
|
+
type: "getStartDate",
|
|
1034
|
+
startData: s[0]
|
|
1035
|
+
}, o.endTime = {
|
|
1036
|
+
data: s[1]
|
|
1037
|
+
};
|
|
1038
|
+
break;
|
|
1039
|
+
case 3:
|
|
1040
|
+
o.id = lt(s[0]), o.startTime = {
|
|
1041
|
+
type: "getStartDate",
|
|
1042
|
+
startData: s[1]
|
|
1043
|
+
}, o.endTime = {
|
|
1044
|
+
data: s[2]
|
|
1045
|
+
};
|
|
1046
|
+
break;
|
|
1047
|
+
}
|
|
1048
|
+
return o;
|
|
1049
|
+
};
|
|
1050
|
+
let zt, xt, z = [];
|
|
1051
|
+
const De = {}, ii = function(t, e) {
|
|
1052
|
+
const i = {
|
|
1053
|
+
section: ut,
|
|
1054
|
+
type: ut,
|
|
1055
|
+
processed: !1,
|
|
1056
|
+
manualEndTime: !1,
|
|
1057
|
+
renderEndTime: null,
|
|
1058
|
+
raw: { data: e },
|
|
1059
|
+
task: t,
|
|
1060
|
+
classes: []
|
|
1061
|
+
}, s = ni(xt, e);
|
|
1062
|
+
i.raw.startTime = s.startTime, i.raw.endTime = s.endTime, i.id = s.id, i.prevTaskId = xt, i.active = s.active, i.done = s.done, i.crit = s.crit, i.milestone = s.milestone, i.order = Ot, Ot++;
|
|
1063
|
+
const o = z.push(i);
|
|
1064
|
+
xt = i.id, De[i.id] = o - 1;
|
|
1065
|
+
}, st = function(t) {
|
|
1066
|
+
const e = De[t];
|
|
1067
|
+
return z[e];
|
|
1068
|
+
}, ri = function(t, e) {
|
|
1069
|
+
const i = {
|
|
1070
|
+
section: ut,
|
|
1071
|
+
type: ut,
|
|
1072
|
+
description: t,
|
|
1073
|
+
task: t,
|
|
1074
|
+
classes: []
|
|
1075
|
+
}, s = ei(zt, e);
|
|
1076
|
+
i.startTime = s.startTime, i.endTime = s.endTime, i.id = s.id, i.active = s.active, i.done = s.done, i.crit = s.crit, i.milestone = s.milestone, zt = i, wt.push(i);
|
|
1077
|
+
}, oe = function() {
|
|
1078
|
+
const t = function(i) {
|
|
1079
|
+
const s = z[i];
|
|
1080
|
+
let o = "";
|
|
1081
|
+
switch (z[i].raw.startTime.type) {
|
|
1082
|
+
case "prevTaskEnd": {
|
|
1083
|
+
const l = st(s.prevTaskId);
|
|
1084
|
+
s.startTime = l.endTime;
|
|
1085
|
+
break;
|
|
1086
|
+
}
|
|
1087
|
+
case "getStartDate":
|
|
1088
|
+
o = Pt(void 0, J, z[i].raw.startTime.startData), o && (z[i].startTime = o);
|
|
1089
|
+
break;
|
|
1090
|
+
}
|
|
1091
|
+
return z[i].startTime && (z[i].endTime = $e(
|
|
1092
|
+
z[i].startTime,
|
|
1093
|
+
J,
|
|
1094
|
+
z[i].raw.endTime.data,
|
|
1095
|
+
mt
|
|
1096
|
+
), z[i].endTime && (z[i].processed = !0, z[i].manualEndTime = R(
|
|
1097
|
+
z[i].raw.endTime.data,
|
|
1098
|
+
"YYYY-MM-DD",
|
|
1099
|
+
!0
|
|
1100
|
+
).isValid(), we(z[i], J, ft, ht))), z[i].processed;
|
|
1101
|
+
};
|
|
1102
|
+
let e = !0;
|
|
1103
|
+
for (const [i, s] of z.entries())
|
|
1104
|
+
t(i), e = e && s.processed;
|
|
1105
|
+
return e;
|
|
1106
|
+
}, si = function(t, e) {
|
|
1107
|
+
let i = e;
|
|
1108
|
+
ot().securityLevel !== "loose" && (i = Je.sanitizeUrl(e)), t.split(",").forEach(function(s) {
|
|
1109
|
+
st(s) !== void 0 && (Se(s, () => {
|
|
1110
|
+
window.open(i, "_self");
|
|
1111
|
+
}), Rt[s] = i);
|
|
1112
|
+
}), Ce(t, "clickable");
|
|
1113
|
+
}, Ce = function(t, e) {
|
|
1114
|
+
t.split(",").forEach(function(i) {
|
|
1115
|
+
let s = st(i);
|
|
1116
|
+
s !== void 0 && s.classes.push(e);
|
|
1117
|
+
});
|
|
1118
|
+
}, ai = function(t, e, i) {
|
|
1119
|
+
if (ot().securityLevel !== "loose" || e === void 0)
|
|
1120
|
+
return;
|
|
1121
|
+
let s = [];
|
|
1122
|
+
if (typeof i == "string") {
|
|
1123
|
+
s = i.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);
|
|
1124
|
+
for (let o = 0; o < s.length; o++) {
|
|
1125
|
+
let l = s[o].trim();
|
|
1126
|
+
l.charAt(0) === '"' && l.charAt(l.length - 1) === '"' && (l = l.substr(1, l.length - 2)), s[o] = l;
|
|
1127
|
+
}
|
|
1128
|
+
}
|
|
1129
|
+
s.length === 0 && s.push(t), st(t) !== void 0 && Se(t, () => {
|
|
1130
|
+
Ue.runFunc(e, ...s);
|
|
1131
|
+
});
|
|
1132
|
+
}, Se = function(t, e) {
|
|
1133
|
+
jt.push(
|
|
1134
|
+
function() {
|
|
1135
|
+
const i = document.querySelector(`[id="${t}"]`);
|
|
1136
|
+
i !== null && i.addEventListener("click", function() {
|
|
1137
|
+
e();
|
|
1138
|
+
});
|
|
1139
|
+
},
|
|
1140
|
+
function() {
|
|
1141
|
+
const i = document.querySelector(`[id="${t}-text"]`);
|
|
1142
|
+
i !== null && i.addEventListener("click", function() {
|
|
1143
|
+
e();
|
|
1144
|
+
});
|
|
1145
|
+
}
|
|
1146
|
+
);
|
|
1147
|
+
}, oi = function(t, e, i) {
|
|
1148
|
+
t.split(",").forEach(function(s) {
|
|
1149
|
+
ai(s, e, i);
|
|
1150
|
+
}), Ce(t, "clickable");
|
|
1151
|
+
}, ci = function(t) {
|
|
1152
|
+
jt.forEach(function(e) {
|
|
1153
|
+
e(t);
|
|
1154
|
+
});
|
|
1155
|
+
}, li = {
|
|
1156
|
+
getConfig: () => ot().gantt,
|
|
1157
|
+
clear: Mn,
|
|
1158
|
+
setDateFormat: Wn,
|
|
1159
|
+
getDateFormat: Gn,
|
|
1160
|
+
enableInclusiveEndDates: On,
|
|
1161
|
+
endDatesAreInclusive: Pn,
|
|
1162
|
+
enableTopAxis: zn,
|
|
1163
|
+
topAxisEnabled: Bn,
|
|
1164
|
+
setAxisFormat: An,
|
|
1165
|
+
getAxisFormat: En,
|
|
1166
|
+
setTickInterval: Yn,
|
|
1167
|
+
getTickInterval: Ln,
|
|
1168
|
+
setTodayMarker: In,
|
|
1169
|
+
getTodayMarker: Fn,
|
|
1170
|
+
setAccTitle: Fe,
|
|
1171
|
+
getAccTitle: Ie,
|
|
1172
|
+
setDiagramTitle: Le,
|
|
1173
|
+
getDiagramTitle: Ye,
|
|
1174
|
+
setDisplayMode: Nn,
|
|
1175
|
+
getDisplayMode: Vn,
|
|
1176
|
+
setAccDescription: Ee,
|
|
1177
|
+
getAccDescription: Ae,
|
|
1178
|
+
addSection: Jn,
|
|
1179
|
+
getSections: Kn,
|
|
1180
|
+
getTasks: Un,
|
|
1181
|
+
addTask: ii,
|
|
1182
|
+
findTaskById: st,
|
|
1183
|
+
addTaskOrg: ri,
|
|
1184
|
+
setIncludes: Rn,
|
|
1185
|
+
getIncludes: qn,
|
|
1186
|
+
setExcludes: Qn,
|
|
1187
|
+
getExcludes: jn,
|
|
1188
|
+
setClickEvent: oi,
|
|
1189
|
+
setLink: si,
|
|
1190
|
+
getLinks: Hn,
|
|
1191
|
+
bindFunctions: ci,
|
|
1192
|
+
parseDuration: _e,
|
|
1193
|
+
isInvalidDate: Te,
|
|
1194
|
+
setWeekday: Zn,
|
|
1195
|
+
getWeekday: Xn
|
|
1196
|
+
};
|
|
1197
|
+
function Me(t, e, i) {
|
|
1198
|
+
let s = !0;
|
|
1199
|
+
for (; s; )
|
|
1200
|
+
s = !1, i.forEach(function(o) {
|
|
1201
|
+
const l = "^\\s*" + o + "\\s*$", d = new RegExp(l);
|
|
1202
|
+
t[0].match(d) && (e[o] = !0, t.shift(1), s = !0);
|
|
1203
|
+
});
|
|
1204
|
+
}
|
|
1205
|
+
const ui = function() {
|
|
1206
|
+
vt.debug("Something is calling, setConf, remove the call");
|
|
1207
|
+
}, ce = {
|
|
1208
|
+
monday: je,
|
|
1209
|
+
tuesday: Qe,
|
|
1210
|
+
wednesday: qe,
|
|
1211
|
+
thursday: Re,
|
|
1212
|
+
friday: Ge,
|
|
1213
|
+
saturday: Ve,
|
|
1214
|
+
sunday: Ne
|
|
1215
|
+
}, di = (t, e) => {
|
|
1216
|
+
let i = [...t].map(() => -1 / 0), s = [...t].sort((l, d) => l.startTime - d.startTime || l.order - d.order), o = 0;
|
|
1217
|
+
for (const l of s)
|
|
1218
|
+
for (let d = 0; d < i.length; d++)
|
|
1219
|
+
if (l.startTime >= i[d]) {
|
|
1220
|
+
i[d] = l.endTime, l.order = d + e, d > o && (o = d);
|
|
1221
|
+
break;
|
|
1222
|
+
}
|
|
1223
|
+
return o;
|
|
1224
|
+
};
|
|
1225
|
+
let X;
|
|
1226
|
+
const hi = function(t, e, i, s) {
|
|
1227
|
+
const o = ot().gantt, l = ot().securityLevel;
|
|
1228
|
+
let d;
|
|
1229
|
+
l === "sandbox" && (d = kt("#i" + e));
|
|
1230
|
+
const b = l === "sandbox" ? kt(d.nodes()[0].contentDocument.body) : kt("body"), D = l === "sandbox" ? d.nodes()[0].contentDocument : document, w = D.getElementById(e);
|
|
1231
|
+
X = w.parentElement.offsetWidth, X === void 0 && (X = 1200), o.useWidth !== void 0 && (X = o.useWidth);
|
|
1232
|
+
const x = s.db.getTasks();
|
|
1233
|
+
let E = [];
|
|
1234
|
+
for (const f of x)
|
|
1235
|
+
E.push(f.type);
|
|
1236
|
+
E = W(E);
|
|
1237
|
+
const T = {};
|
|
1238
|
+
let v = 2 * o.topPadding;
|
|
1239
|
+
if (s.db.getDisplayMode() === "compact" || o.displayMode === "compact") {
|
|
1240
|
+
const f = {};
|
|
1241
|
+
for (const y of x)
|
|
1242
|
+
f[y.section] === void 0 ? f[y.section] = [y] : f[y.section].push(y);
|
|
1243
|
+
let p = 0;
|
|
1244
|
+
for (const y of Object.keys(f)) {
|
|
1245
|
+
const m = di(f[y], p) + 1;
|
|
1246
|
+
p += m, v += m * (o.barHeight + o.barGap), T[y] = m;
|
|
1247
|
+
}
|
|
1248
|
+
} else {
|
|
1249
|
+
v += x.length * (o.barHeight + o.barGap);
|
|
1250
|
+
for (const f of E)
|
|
1251
|
+
T[f] = x.filter((p) => p.type === f).length;
|
|
1252
|
+
}
|
|
1253
|
+
w.setAttribute("viewBox", "0 0 " + X + " " + v);
|
|
1254
|
+
const B = b.select(`[id="${e}"]`), A = We().domain([
|
|
1255
|
+
Oe(x, function(f) {
|
|
1256
|
+
return f.startTime;
|
|
1257
|
+
}),
|
|
1258
|
+
Pe(x, function(f) {
|
|
1259
|
+
return f.endTime;
|
|
1260
|
+
})
|
|
1261
|
+
]).rangeRound([0, X - o.leftPadding - o.rightPadding]);
|
|
1262
|
+
function k(f, p) {
|
|
1263
|
+
const y = f.startTime, m = p.startTime;
|
|
1264
|
+
let r = 0;
|
|
1265
|
+
return y > m ? r = 1 : y < m && (r = -1), r;
|
|
1266
|
+
}
|
|
1267
|
+
x.sort(k), C(x, X, v), ze(B, v, X, o.useMaxWidth), B.append("text").text(s.db.getDiagramTitle()).attr("x", X / 2).attr("y", o.titleTopMargin).attr("class", "titleText");
|
|
1268
|
+
function C(f, p, y) {
|
|
1269
|
+
const m = o.barHeight, r = m + o.barGap, u = o.topPadding, c = o.leftPadding, h = Be().domain([0, E.length]).range(["#00B9FA", "#F95002"]).interpolate(yn);
|
|
1270
|
+
I(
|
|
1271
|
+
r,
|
|
1272
|
+
u,
|
|
1273
|
+
c,
|
|
1274
|
+
p,
|
|
1275
|
+
y,
|
|
1276
|
+
f,
|
|
1277
|
+
s.db.getExcludes(),
|
|
1278
|
+
s.db.getIncludes()
|
|
1279
|
+
), P(c, u, p, y), L(f, r, u, c, m, h, p), O(r, u), N(c, u, p, y);
|
|
1280
|
+
}
|
|
1281
|
+
function L(f, p, y, m, r, u, c) {
|
|
1282
|
+
const h = [...new Set(f.map((n) => n.order))].map((n) => f.find((g) => g.order === n));
|
|
1283
|
+
B.append("g").selectAll("rect").data(h).enter().append("rect").attr("x", 0).attr("y", function(n, g) {
|
|
1284
|
+
return g = n.order, g * p + y - 2;
|
|
1285
|
+
}).attr("width", function() {
|
|
1286
|
+
return c - o.rightPadding / 2;
|
|
1287
|
+
}).attr("height", p).attr("class", function(n) {
|
|
1288
|
+
for (const [g, M] of E.entries())
|
|
1289
|
+
if (n.type === M)
|
|
1290
|
+
return "section section" + g % o.numberSectionStyles;
|
|
1291
|
+
return "section section0";
|
|
1292
|
+
});
|
|
1293
|
+
const a = B.append("g").selectAll("rect").data(f).enter(), Y = s.db.getLinks();
|
|
1294
|
+
if (a.append("rect").attr("id", function(n) {
|
|
1295
|
+
return n.id;
|
|
1296
|
+
}).attr("rx", 3).attr("ry", 3).attr("x", function(n) {
|
|
1297
|
+
return n.milestone ? A(n.startTime) + m + 0.5 * (A(n.endTime) - A(n.startTime)) - 0.5 * r : A(n.startTime) + m;
|
|
1298
|
+
}).attr("y", function(n, g) {
|
|
1299
|
+
return g = n.order, g * p + y;
|
|
1300
|
+
}).attr("width", function(n) {
|
|
1301
|
+
return n.milestone ? r : A(n.renderEndTime || n.endTime) - A(n.startTime);
|
|
1302
|
+
}).attr("height", r).attr("transform-origin", function(n, g) {
|
|
1303
|
+
return g = n.order, (A(n.startTime) + m + 0.5 * (A(n.endTime) - A(n.startTime))).toString() + "px " + (g * p + y + 0.5 * r).toString() + "px";
|
|
1304
|
+
}).attr("class", function(n) {
|
|
1305
|
+
const g = "task";
|
|
1306
|
+
let M = "";
|
|
1307
|
+
n.classes.length > 0 && (M = n.classes.join(" "));
|
|
1308
|
+
let S = 0;
|
|
1309
|
+
for (const [F, _] of E.entries())
|
|
1310
|
+
n.type === _ && (S = F % o.numberSectionStyles);
|
|
1311
|
+
let $ = "";
|
|
1312
|
+
return n.active ? n.crit ? $ += " activeCrit" : $ = " active" : n.done ? n.crit ? $ = " doneCrit" : $ = " done" : n.crit && ($ += " crit"), $.length === 0 && ($ = " task"), n.milestone && ($ = " milestone " + $), $ += S, $ += " " + M, g + $;
|
|
1313
|
+
}), a.append("text").attr("id", function(n) {
|
|
1314
|
+
return n.id + "-text";
|
|
1315
|
+
}).text(function(n) {
|
|
1316
|
+
return n.task;
|
|
1317
|
+
}).attr("font-size", o.fontSize).attr("x", function(n) {
|
|
1318
|
+
let g = A(n.startTime), M = A(n.renderEndTime || n.endTime);
|
|
1319
|
+
n.milestone && (g += 0.5 * (A(n.endTime) - A(n.startTime)) - 0.5 * r), n.milestone && (M = g + r);
|
|
1320
|
+
const S = this.getBBox().width;
|
|
1321
|
+
return S > M - g ? M + S + 1.5 * o.leftPadding > c ? g + m - 5 : M + m + 5 : (M - g) / 2 + g + m;
|
|
1322
|
+
}).attr("y", function(n, g) {
|
|
1323
|
+
return g = n.order, g * p + o.barHeight / 2 + (o.fontSize / 2 - 2) + y;
|
|
1324
|
+
}).attr("text-height", r).attr("class", function(n) {
|
|
1325
|
+
const g = A(n.startTime);
|
|
1326
|
+
let M = A(n.endTime);
|
|
1327
|
+
n.milestone && (M = g + r);
|
|
1328
|
+
const S = this.getBBox().width;
|
|
1329
|
+
let $ = "";
|
|
1330
|
+
n.classes.length > 0 && ($ = n.classes.join(" "));
|
|
1331
|
+
let F = 0;
|
|
1332
|
+
for (const [Q, nt] of E.entries())
|
|
1333
|
+
n.type === nt && (F = Q % o.numberSectionStyles);
|
|
1334
|
+
let _ = "";
|
|
1335
|
+
return n.active && (n.crit ? _ = "activeCritText" + F : _ = "activeText" + F), n.done ? n.crit ? _ = _ + " doneCritText" + F : _ = _ + " doneText" + F : n.crit && (_ = _ + " critText" + F), n.milestone && (_ += " milestoneText"), S > M - g ? M + S + 1.5 * o.leftPadding > c ? $ + " taskTextOutsideLeft taskTextOutside" + F + " " + _ : $ + " taskTextOutsideRight taskTextOutside" + F + " " + _ + " width-" + S : $ + " taskText taskText" + F + " " + _ + " width-" + S;
|
|
1336
|
+
}), ot().securityLevel === "sandbox") {
|
|
1337
|
+
let n;
|
|
1338
|
+
n = kt("#i" + e);
|
|
1339
|
+
const g = n.nodes()[0].contentDocument;
|
|
1340
|
+
a.filter(function(M) {
|
|
1341
|
+
return Y[M.id] !== void 0;
|
|
1342
|
+
}).each(function(M) {
|
|
1343
|
+
var S = g.querySelector("#" + M.id), $ = g.querySelector("#" + M.id + "-text");
|
|
1344
|
+
const F = S.parentNode;
|
|
1345
|
+
var _ = g.createElement("a");
|
|
1346
|
+
_.setAttribute("xlink:href", Y[M.id]), _.setAttribute("target", "_top"), F.appendChild(_), _.appendChild(S), _.appendChild($);
|
|
1347
|
+
});
|
|
1348
|
+
}
|
|
1349
|
+
}
|
|
1350
|
+
function I(f, p, y, m, r, u, c, h) {
|
|
1351
|
+
if (c.length === 0 && h.length === 0)
|
|
1352
|
+
return;
|
|
1353
|
+
let a, Y;
|
|
1354
|
+
for (const { startTime: $, endTime: F } of u)
|
|
1355
|
+
(a === void 0 || $ < a) && (a = $), (Y === void 0 || F > Y) && (Y = F);
|
|
1356
|
+
if (!a || !Y)
|
|
1357
|
+
return;
|
|
1358
|
+
if (R(Y).diff(R(a), "year") > 5) {
|
|
1359
|
+
vt.warn(
|
|
1360
|
+
"The difference between the min and max time is more than 5 years. This will cause performance issues. Skipping drawing exclude days."
|
|
1361
|
+
);
|
|
1362
|
+
return;
|
|
1363
|
+
}
|
|
1364
|
+
const n = s.db.getDateFormat(), g = [];
|
|
1365
|
+
let M = null, S = R(a);
|
|
1366
|
+
for (; S.valueOf() <= Y; )
|
|
1367
|
+
s.db.isInvalidDate(S, n, c, h) ? M ? M.end = S : M = {
|
|
1368
|
+
start: S,
|
|
1369
|
+
end: S
|
|
1370
|
+
} : M && (g.push(M), M = null), S = S.add(1, "d");
|
|
1371
|
+
B.append("g").selectAll("rect").data(g).enter().append("rect").attr("id", function($) {
|
|
1372
|
+
return "exclude-" + $.start.format("YYYY-MM-DD");
|
|
1373
|
+
}).attr("x", function($) {
|
|
1374
|
+
return A($.start) + y;
|
|
1375
|
+
}).attr("y", o.gridLineStartPadding).attr("width", function($) {
|
|
1376
|
+
const F = $.end.add(1, "day");
|
|
1377
|
+
return A(F) - A($.start);
|
|
1378
|
+
}).attr("height", r - p - o.gridLineStartPadding).attr("transform-origin", function($, F) {
|
|
1379
|
+
return (A($.start) + y + 0.5 * (A($.end) - A($.start))).toString() + "px " + (F * f + 0.5 * r).toString() + "px";
|
|
1380
|
+
}).attr("class", "exclude-range");
|
|
1381
|
+
}
|
|
1382
|
+
function P(f, p, y, m) {
|
|
1383
|
+
let r = cn(A).tickSize(-m + p + o.gridLineStartPadding).tickFormat(Kt(s.db.getAxisFormat() || o.axisFormat || "%Y-%m-%d"));
|
|
1384
|
+
const u = /^([1-9]\d*)(millisecond|second|minute|hour|day|week|month)$/.exec(
|
|
1385
|
+
s.db.getTickInterval() || o.tickInterval
|
|
1386
|
+
);
|
|
1387
|
+
if (u !== null) {
|
|
1388
|
+
const c = u[1], h = u[2], a = s.db.getWeekday() || o.weekday;
|
|
1389
|
+
switch (h) {
|
|
1390
|
+
case "millisecond":
|
|
1391
|
+
r.ticks(ne.every(c));
|
|
1392
|
+
break;
|
|
1393
|
+
case "second":
|
|
1394
|
+
r.ticks(ee.every(c));
|
|
1395
|
+
break;
|
|
1396
|
+
case "minute":
|
|
1397
|
+
r.ticks(te.every(c));
|
|
1398
|
+
break;
|
|
1399
|
+
case "hour":
|
|
1400
|
+
r.ticks(Xt.every(c));
|
|
1401
|
+
break;
|
|
1402
|
+
case "day":
|
|
1403
|
+
r.ticks(Zt.every(c));
|
|
1404
|
+
break;
|
|
1405
|
+
case "week":
|
|
1406
|
+
r.ticks(ce[a].every(c));
|
|
1407
|
+
break;
|
|
1408
|
+
case "month":
|
|
1409
|
+
r.ticks(Ut.every(c));
|
|
1410
|
+
break;
|
|
1411
|
+
}
|
|
1412
|
+
}
|
|
1413
|
+
if (B.append("g").attr("class", "grid").attr("transform", "translate(" + f + ", " + (m - 50) + ")").call(r).selectAll("text").style("text-anchor", "middle").attr("fill", "#000").attr("stroke", "none").attr("font-size", 10).attr("dy", "1em"), s.db.topAxisEnabled() || o.topAxis) {
|
|
1414
|
+
let c = on(A).tickSize(-m + p + o.gridLineStartPadding).tickFormat(Kt(s.db.getAxisFormat() || o.axisFormat || "%Y-%m-%d"));
|
|
1415
|
+
if (u !== null) {
|
|
1416
|
+
const h = u[1], a = u[2], Y = s.db.getWeekday() || o.weekday;
|
|
1417
|
+
switch (a) {
|
|
1418
|
+
case "millisecond":
|
|
1419
|
+
c.ticks(ne.every(h));
|
|
1420
|
+
break;
|
|
1421
|
+
case "second":
|
|
1422
|
+
c.ticks(ee.every(h));
|
|
1423
|
+
break;
|
|
1424
|
+
case "minute":
|
|
1425
|
+
c.ticks(te.every(h));
|
|
1426
|
+
break;
|
|
1427
|
+
case "hour":
|
|
1428
|
+
c.ticks(Xt.every(h));
|
|
1429
|
+
break;
|
|
1430
|
+
case "day":
|
|
1431
|
+
c.ticks(Zt.every(h));
|
|
1432
|
+
break;
|
|
1433
|
+
case "week":
|
|
1434
|
+
c.ticks(ce[Y].every(h));
|
|
1435
|
+
break;
|
|
1436
|
+
case "month":
|
|
1437
|
+
c.ticks(Ut.every(h));
|
|
1438
|
+
break;
|
|
1439
|
+
}
|
|
1440
|
+
}
|
|
1441
|
+
B.append("g").attr("class", "grid").attr("transform", "translate(" + f + ", " + p + ")").call(c).selectAll("text").style("text-anchor", "middle").attr("fill", "#000").attr("stroke", "none").attr("font-size", 10);
|
|
1442
|
+
}
|
|
1443
|
+
}
|
|
1444
|
+
function O(f, p) {
|
|
1445
|
+
let y = 0;
|
|
1446
|
+
const m = Object.keys(T).map((r) => [r, T[r]]);
|
|
1447
|
+
B.append("g").selectAll("text").data(m).enter().append(function(r) {
|
|
1448
|
+
const u = r[0].split(He.lineBreakRegex), c = -(u.length - 1) / 2, h = D.createElementNS("http://www.w3.org/2000/svg", "text");
|
|
1449
|
+
h.setAttribute("dy", c + "em");
|
|
1450
|
+
for (const [a, Y] of u.entries()) {
|
|
1451
|
+
const n = D.createElementNS("http://www.w3.org/2000/svg", "tspan");
|
|
1452
|
+
n.setAttribute("alignment-baseline", "central"), n.setAttribute("x", "10"), a > 0 && n.setAttribute("dy", "1em"), n.textContent = Y, h.appendChild(n);
|
|
1453
|
+
}
|
|
1454
|
+
return h;
|
|
1455
|
+
}).attr("x", 10).attr("y", function(r, u) {
|
|
1456
|
+
if (u > 0)
|
|
1457
|
+
for (let c = 0; c < u; c++)
|
|
1458
|
+
return y += m[u - 1][1], r[1] * f / 2 + y * f + p;
|
|
1459
|
+
else
|
|
1460
|
+
return r[1] * f / 2 + p;
|
|
1461
|
+
}).attr("font-size", o.sectionFontSize).attr("class", function(r) {
|
|
1462
|
+
for (const [u, c] of E.entries())
|
|
1463
|
+
if (r[0] === c)
|
|
1464
|
+
return "sectionTitle sectionTitle" + u % o.numberSectionStyles;
|
|
1465
|
+
return "sectionTitle";
|
|
1466
|
+
});
|
|
1467
|
+
}
|
|
1468
|
+
function N(f, p, y, m) {
|
|
1469
|
+
const r = s.db.getTodayMarker();
|
|
1470
|
+
if (r === "off")
|
|
1471
|
+
return;
|
|
1472
|
+
const u = B.append("g").attr("class", "today"), c = /* @__PURE__ */ new Date(), h = u.append("line");
|
|
1473
|
+
h.attr("x1", A(c) + f).attr("x2", A(c) + f).attr("y1", o.titleTopMargin).attr("y2", m - o.titleTopMargin).attr("class", "today"), r !== "" && h.attr("style", r.replace(/,/g, ";"));
|
|
1474
|
+
}
|
|
1475
|
+
function W(f) {
|
|
1476
|
+
const p = {}, y = [];
|
|
1477
|
+
for (let m = 0, r = f.length; m < r; ++m)
|
|
1478
|
+
Object.prototype.hasOwnProperty.call(p, f[m]) || (p[f[m]] = !0, y.push(f[m]));
|
|
1479
|
+
return y;
|
|
1480
|
+
}
|
|
1481
|
+
}, fi = {
|
|
1482
|
+
setConf: ui,
|
|
1483
|
+
draw: hi
|
|
1484
|
+
}, mi = (t) => `
|
|
1485
|
+
.mermaid-main-font {
|
|
1486
|
+
font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif);
|
|
1487
|
+
}
|
|
1488
|
+
|
|
1489
|
+
.exclude-range {
|
|
1490
|
+
fill: ${t.excludeBkgColor};
|
|
1491
|
+
}
|
|
1492
|
+
|
|
1493
|
+
.section {
|
|
1494
|
+
stroke: none;
|
|
1495
|
+
opacity: 0.2;
|
|
1496
|
+
}
|
|
1497
|
+
|
|
1498
|
+
.section0 {
|
|
1499
|
+
fill: ${t.sectionBkgColor};
|
|
1500
|
+
}
|
|
1501
|
+
|
|
1502
|
+
.section2 {
|
|
1503
|
+
fill: ${t.sectionBkgColor2};
|
|
1504
|
+
}
|
|
1505
|
+
|
|
1506
|
+
.section1,
|
|
1507
|
+
.section3 {
|
|
1508
|
+
fill: ${t.altSectionBkgColor};
|
|
1509
|
+
opacity: 0.2;
|
|
1510
|
+
}
|
|
1511
|
+
|
|
1512
|
+
.sectionTitle0 {
|
|
1513
|
+
fill: ${t.titleColor};
|
|
1514
|
+
}
|
|
1515
|
+
|
|
1516
|
+
.sectionTitle1 {
|
|
1517
|
+
fill: ${t.titleColor};
|
|
1518
|
+
}
|
|
1519
|
+
|
|
1520
|
+
.sectionTitle2 {
|
|
1521
|
+
fill: ${t.titleColor};
|
|
1522
|
+
}
|
|
1523
|
+
|
|
1524
|
+
.sectionTitle3 {
|
|
1525
|
+
fill: ${t.titleColor};
|
|
1526
|
+
}
|
|
1527
|
+
|
|
1528
|
+
.sectionTitle {
|
|
1529
|
+
text-anchor: start;
|
|
1530
|
+
font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif);
|
|
1531
|
+
}
|
|
1532
|
+
|
|
1533
|
+
|
|
1534
|
+
/* Grid and axis */
|
|
1535
|
+
|
|
1536
|
+
.grid .tick {
|
|
1537
|
+
stroke: ${t.gridColor};
|
|
1538
|
+
opacity: 0.8;
|
|
1539
|
+
shape-rendering: crispEdges;
|
|
1540
|
+
}
|
|
1541
|
+
|
|
1542
|
+
.grid .tick text {
|
|
1543
|
+
font-family: ${t.fontFamily};
|
|
1544
|
+
fill: ${t.textColor};
|
|
1545
|
+
}
|
|
1546
|
+
|
|
1547
|
+
.grid path {
|
|
1548
|
+
stroke-width: 0;
|
|
1549
|
+
}
|
|
1550
|
+
|
|
1551
|
+
|
|
1552
|
+
/* Today line */
|
|
1553
|
+
|
|
1554
|
+
.today {
|
|
1555
|
+
fill: none;
|
|
1556
|
+
stroke: ${t.todayLineColor};
|
|
1557
|
+
stroke-width: 2px;
|
|
1558
|
+
}
|
|
1559
|
+
|
|
1560
|
+
|
|
1561
|
+
/* Task styling */
|
|
1562
|
+
|
|
1563
|
+
/* Default task */
|
|
1564
|
+
|
|
1565
|
+
.task {
|
|
1566
|
+
stroke-width: 2;
|
|
1567
|
+
}
|
|
1568
|
+
|
|
1569
|
+
.taskText {
|
|
1570
|
+
text-anchor: middle;
|
|
1571
|
+
font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif);
|
|
1572
|
+
}
|
|
1573
|
+
|
|
1574
|
+
.taskTextOutsideRight {
|
|
1575
|
+
fill: ${t.taskTextDarkColor};
|
|
1576
|
+
text-anchor: start;
|
|
1577
|
+
font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif);
|
|
1578
|
+
}
|
|
1579
|
+
|
|
1580
|
+
.taskTextOutsideLeft {
|
|
1581
|
+
fill: ${t.taskTextDarkColor};
|
|
1582
|
+
text-anchor: end;
|
|
1583
|
+
}
|
|
1584
|
+
|
|
1585
|
+
|
|
1586
|
+
/* Special case clickable */
|
|
1587
|
+
|
|
1588
|
+
.task.clickable {
|
|
1589
|
+
cursor: pointer;
|
|
1590
|
+
}
|
|
1591
|
+
|
|
1592
|
+
.taskText.clickable {
|
|
1593
|
+
cursor: pointer;
|
|
1594
|
+
fill: ${t.taskTextClickableColor} !important;
|
|
1595
|
+
font-weight: bold;
|
|
1596
|
+
}
|
|
1597
|
+
|
|
1598
|
+
.taskTextOutsideLeft.clickable {
|
|
1599
|
+
cursor: pointer;
|
|
1600
|
+
fill: ${t.taskTextClickableColor} !important;
|
|
1601
|
+
font-weight: bold;
|
|
1602
|
+
}
|
|
1603
|
+
|
|
1604
|
+
.taskTextOutsideRight.clickable {
|
|
1605
|
+
cursor: pointer;
|
|
1606
|
+
fill: ${t.taskTextClickableColor} !important;
|
|
1607
|
+
font-weight: bold;
|
|
1608
|
+
}
|
|
1609
|
+
|
|
1610
|
+
|
|
1611
|
+
/* Specific task settings for the sections*/
|
|
1612
|
+
|
|
1613
|
+
.taskText0,
|
|
1614
|
+
.taskText1,
|
|
1615
|
+
.taskText2,
|
|
1616
|
+
.taskText3 {
|
|
1617
|
+
fill: ${t.taskTextColor};
|
|
1618
|
+
}
|
|
1619
|
+
|
|
1620
|
+
.task0,
|
|
1621
|
+
.task1,
|
|
1622
|
+
.task2,
|
|
1623
|
+
.task3 {
|
|
1624
|
+
fill: ${t.taskBkgColor};
|
|
1625
|
+
stroke: ${t.taskBorderColor};
|
|
1626
|
+
}
|
|
1627
|
+
|
|
1628
|
+
.taskTextOutside0,
|
|
1629
|
+
.taskTextOutside2
|
|
1630
|
+
{
|
|
1631
|
+
fill: ${t.taskTextOutsideColor};
|
|
1632
|
+
}
|
|
1633
|
+
|
|
1634
|
+
.taskTextOutside1,
|
|
1635
|
+
.taskTextOutside3 {
|
|
1636
|
+
fill: ${t.taskTextOutsideColor};
|
|
1637
|
+
}
|
|
1638
|
+
|
|
1639
|
+
|
|
1640
|
+
/* Active task */
|
|
1641
|
+
|
|
1642
|
+
.active0,
|
|
1643
|
+
.active1,
|
|
1644
|
+
.active2,
|
|
1645
|
+
.active3 {
|
|
1646
|
+
fill: ${t.activeTaskBkgColor};
|
|
1647
|
+
stroke: ${t.activeTaskBorderColor};
|
|
1648
|
+
}
|
|
1649
|
+
|
|
1650
|
+
.activeText0,
|
|
1651
|
+
.activeText1,
|
|
1652
|
+
.activeText2,
|
|
1653
|
+
.activeText3 {
|
|
1654
|
+
fill: ${t.taskTextDarkColor} !important;
|
|
1655
|
+
}
|
|
1656
|
+
|
|
1657
|
+
|
|
1658
|
+
/* Completed task */
|
|
1659
|
+
|
|
1660
|
+
.done0,
|
|
1661
|
+
.done1,
|
|
1662
|
+
.done2,
|
|
1663
|
+
.done3 {
|
|
1664
|
+
stroke: ${t.doneTaskBorderColor};
|
|
1665
|
+
fill: ${t.doneTaskBkgColor};
|
|
1666
|
+
stroke-width: 2;
|
|
1667
|
+
}
|
|
1668
|
+
|
|
1669
|
+
.doneText0,
|
|
1670
|
+
.doneText1,
|
|
1671
|
+
.doneText2,
|
|
1672
|
+
.doneText3 {
|
|
1673
|
+
fill: ${t.taskTextDarkColor} !important;
|
|
1674
|
+
}
|
|
1675
|
+
|
|
1676
|
+
|
|
1677
|
+
/* Tasks on the critical line */
|
|
1678
|
+
|
|
1679
|
+
.crit0,
|
|
1680
|
+
.crit1,
|
|
1681
|
+
.crit2,
|
|
1682
|
+
.crit3 {
|
|
1683
|
+
stroke: ${t.critBorderColor};
|
|
1684
|
+
fill: ${t.critBkgColor};
|
|
1685
|
+
stroke-width: 2;
|
|
1686
|
+
}
|
|
1687
|
+
|
|
1688
|
+
.activeCrit0,
|
|
1689
|
+
.activeCrit1,
|
|
1690
|
+
.activeCrit2,
|
|
1691
|
+
.activeCrit3 {
|
|
1692
|
+
stroke: ${t.critBorderColor};
|
|
1693
|
+
fill: ${t.activeTaskBkgColor};
|
|
1694
|
+
stroke-width: 2;
|
|
1695
|
+
}
|
|
1696
|
+
|
|
1697
|
+
.doneCrit0,
|
|
1698
|
+
.doneCrit1,
|
|
1699
|
+
.doneCrit2,
|
|
1700
|
+
.doneCrit3 {
|
|
1701
|
+
stroke: ${t.critBorderColor};
|
|
1702
|
+
fill: ${t.doneTaskBkgColor};
|
|
1703
|
+
stroke-width: 2;
|
|
1704
|
+
cursor: pointer;
|
|
1705
|
+
shape-rendering: crispEdges;
|
|
1706
|
+
}
|
|
1707
|
+
|
|
1708
|
+
.milestone {
|
|
1709
|
+
transform: rotate(45deg) scale(0.8,0.8);
|
|
1710
|
+
}
|
|
1711
|
+
|
|
1712
|
+
.milestoneText {
|
|
1713
|
+
font-style: italic;
|
|
1714
|
+
}
|
|
1715
|
+
.doneCritText0,
|
|
1716
|
+
.doneCritText1,
|
|
1717
|
+
.doneCritText2,
|
|
1718
|
+
.doneCritText3 {
|
|
1719
|
+
fill: ${t.taskTextDarkColor} !important;
|
|
1720
|
+
}
|
|
1721
|
+
|
|
1722
|
+
.activeCritText0,
|
|
1723
|
+
.activeCritText1,
|
|
1724
|
+
.activeCritText2,
|
|
1725
|
+
.activeCritText3 {
|
|
1726
|
+
fill: ${t.taskTextDarkColor} !important;
|
|
1727
|
+
}
|
|
1728
|
+
|
|
1729
|
+
.titleText {
|
|
1730
|
+
text-anchor: middle;
|
|
1731
|
+
font-size: 18px;
|
|
1732
|
+
fill: ${t.titleColor || t.textColor};
|
|
1733
|
+
font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif);
|
|
1734
|
+
}
|
|
1735
|
+
`, yi = mi, pi = {
|
|
1736
|
+
parser: Sn,
|
|
1737
|
+
db: li,
|
|
1738
|
+
renderer: fi,
|
|
1739
|
+
styles: yi
|
|
1740
|
+
};
|
|
1741
|
+
export {
|
|
1742
|
+
pi as diagram
|
|
1743
|
+
};
|